/**
 * 🚀 Reinhardt Server Environment: Core Host Style Framework
 * Ort: /index.css (Zentrale)
 */

/* Globale Variablen & CSS-Skelett */
:root {
    --bg-main: #f4f6f9;
    --panel-white: #ffffff;
    --border-gray: #cccccc;
    --text-dark: #333333;
    --accent-blue: #007bff;
    --accent-blue-hover: #0069d9;
    --accent-green: #28a745;
    --accent-green-hover: #218838;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-dark);
    padding: 40px;
}

/* 1. KOPFZEILE (Header) */
header {
    max-width: 1100px;
    margin: 0 auto 20px auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--accent-blue);
    padding-bottom: 10px;
}

header h1 {
    font-size: 22px;
    font-weight: bold;
    text-transform: uppercase;
}

header div {
    font-size: 11px;
    color: #666666;
    font-weight: bold;
}

/* 2. ZWEISPALTIER WORKSPACE-CONTAINER */
.container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Linke Spalte (Sidebar) */
aside {
    width: 250px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-title {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: bold;
    color: #666666;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-gray);
    padding-bottom: 2px;
}

/* Rechte Spalte (Hauptbereich) */
main {
    flex: 1;
}

/* Infokarten (Cards) */
.card {
    background: var(--panel-white);
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    padding: 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.card h2 {
    font-size: 18px;
    margin-bottom: 10px;
}

.card p {
    font-size: 13px;
    line-height: 1.5;
    color: #555555;
    margin-bottom: 15px;
}

/* 3. MENÜ- UND BUTTON-STYLING */
.project-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.project-list li {
    background: var(--panel-white);
    border: 1px solid var(--border-gray);
    border-radius: 4px;
}

.project-list li a {
    display: block;
    padding: 8px 12px;
    color: #000000;
    text-decoration: none;
    font-size: 13px;
}

.project-list li.active {
    border-color: var(--accent-blue);
}

.project-list li.active a {
    background-color: var(--accent-blue);
    color: #ffffff;
    font-weight: bold;
}

.project-list li:not(.active) a:hover {
    background-color: #e2e8f0;
}

/* Schaltflächen (Buttons) */
.btn-add {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: var(--accent-green);
    color: #ffffff;
    text-decoration: none;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    border-radius: 4px;
    border: 1px solid #1e7e34;
    cursor: pointer;
}
.btn-add:hover { background-color: var(--accent-green-hover); }
.btn-add span { font-size: 15px; margin-right: 4px; }

.btn-action {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--accent-blue);
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    border-radius: 4px;
    border: 1px solid #0062cc;
    cursor: pointer;
}
.btn-action:hover { background-color: var(--accent-blue-hover); }

.project-details-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-action-secondary {
    background-color: #e2e8f0 !important;
    color: #000000 !important;
    border: 1px solid var(--border-gray) !important;
}
.btn-action-secondary:hover { background-color: #cbd5e1 !important; }

.meta-info {
    margin-top: 20px;
    font-size: 11px;
    color: #666666;
    border-top: 1px dashed var(--border-gray);
    padding-top: 10px;
}

/* System-Benachrichtigungen */
.alert {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: bold;
}
.alert-danger { background-color: #ffeef0; border: 1px solid #f8b4b4; color: #5c1e1e; }
.alert-success { background-color: #e6ffed; border: 1px solid #b4f8c8; color: #1e4620; }

/* 4. MODAL INSTANZ-Blueprints */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.modal:target { display: flex; }
.modal-content {
    background: #ffffff;
    padding: 20px;
    border-radius: 6px;
    width: 400px;
    position: relative;
    border: 1px solid #aaaaaa;
}
.modal-close {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 20px;
    text-decoration: none;
    color: #333333;
    font-weight: bold;
}
.form-group { margin-bottom: 15px; display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 12px; font-weight: bold; }
.form-group input { padding: 6px 10px; border: 1px solid var(--border-gray); border-radius: 4px; font-size: 13px; }

/* 🎪 UNZERSTÖRBARES ID-BASIERTES PROMPT MODAL (Breite 80% / Höhe 80%) */
#promptModal {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    z-index: 999999 !important;
    justify-content: center !important;
    align-items: center !important;
}

#promptModal .cms-modal-window {
    background: #ffffff !important;
    border: 1px solid #999999 !important;
    border-radius: 8px !important;
    width: 80% !important;
    height: 80% !important;
    max-width: 95% !important;
    max-height: 95% !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
    padding: 0 !important;
    animation: cmsModalEffect 0.15s ease-out !important;
}

#promptModal .cms-modal-header {
    background-color: #eeeeee !important;
    color: #000000 !important;
    padding: 12px 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-weight: bold !important;
    font-size: 14px !important;
    font-family: Arial, sans-serif !important;
    border-bottom: 1px solid var(--border-gray) !important;
    flex-shrink: 0 !important;
}

#promptModal .cms-modal-close {
    cursor: pointer !important;
    font-size: 22px !important;
    line-height: 1 !important;
    font-weight: bold !important;
    color: #444444 !important;
    padding: 2px 6px !important;
    transition: color 0.1s !important;
}
#promptModal .cms-modal-close:hover { color: #cc0000 !important; }

#promptModal .cms-modal-body {
    padding: 0 !important;
    flex: 1 !important;
    background-color: #f1f5f9 !important;
}

#promptModal .cms-modal-body iframe {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    display: block !important;
}

@keyframes cmsModalEffect { 
    from { transform: scale(0.97); opacity: 0; } 
    to { transform: scale(1); opacity: 1; } 
}
