/* css/style.css */

/* =========================================================================
   ZENTRALER SCHRIFT-RIEGEL FÜR DAS GESAMTE PORTAL (HV BAUMEISTER GMBH)
   ========================================================================= */
html, body, div, p, h1, h2, h3, form, label, input, button, a, span, strong {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Calibri, Arial, sans-serif !important;
}

body {
    background-color: #f4f7f6;
    padding: 40px;
    color: #0A173B;
}

.container {
    max-width: 550px;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 0 auto;
    border: 1px solid #2F4759;
}

h1, h2 {
    margin-top: 0;
    color: #0A173B;
    line-height: 1.3;
}

h1 { 
    font-size: 24px; 
    font-weight: bold; 
}

h2 { 
    font-size: 21px; 
    font-weight: bold; 
    margin-bottom: 5px; 
}

h3 {
    color: #0A173B;
    border-bottom: 2px solid #2F4759;
    padding-bottom: 5px;
    margin-top: 30px;
    font-size: 17px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #0A173B;
}

input[type="email"], 
input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #2F4759;
    border-radius: 4px;
    box-sizing: border-box;
    color: #0A173B;
}

.checkbox-group {
    margin: 20px 0;
    display: flex;
    align-items: flex-start;
}

.checkbox-group input {
    margin-top: 4px;
    margin-right: 10px;
}

.checkbox-group label {
    font-weight: normal;
    font-size: 14px;
    line-height: 1.4;
}

.info-text {
    margin-top: 15px;
    font-size: 13px;
    color: #2F4759;
    line-height: 1.4;
    background-color: #f8f9fa;
    padding: 12px;
    border-left: 3px solid #2F4759;
    border-radius: 0 4px 4px 0;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

button, 
.btn {
    background-color: #2F4759;
    color: #ffffff !important;
    border: none;
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    font-weight: bold;
    box-sizing: border-box;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-align: center;
    transition: background 0.2s;
}

button:hover, 
.btn:hover {
    background-color: #0A173B;
    color: #ffffff !important;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

.success {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    margin-bottom: 20px;
}

th, 
td {
    border: 1px solid #2F4759;
    padding: 10px;
    text-align: left;
}

th {
    background-color: #0A173B;
    color: #f4f7f6;
}

td {
    color: #0A173B;
}

.logout-link {
    display: inline-block;
    margin-top: 20px;
    color: #2F4759;
    text-decoration: none;
    font-weight: bold;
}

.logout-link:hover {
    color: #0A173B;
    text-decoration: underline;
}

a {
    color: #2F4759;
    font-weight: bold;
}

a:hover {
    color: #0A173B;
}


/* =========================================================================
   SPEZIFISCHE LAYOUT-REGELN FÜR DIE LOGIN-SEITE (INDEX.PHP)
   ========================================================================= */

.login-page-box {
    margin-top: 30px !important;
}

.main-brand-title {
    text-align: center; 
    color: #0A173B; 
    font-size: 24px; 
    margin-top: 0; 
    margin-bottom: 2px; 
    font-weight: bold;
}

.sub-brand-title {
    text-align: center; 
    color: #2F4759; 
    font-size: 15px; 
    margin-top: 0; 
    margin-bottom: 25px; 
    font-weight: normal; 
    letter-spacing: 0.5px;
}

.login-form-header {
    text-align: center; 
    font-size: 18px; 
    margin-bottom: 22px; 
    color: #0A173B;
}

.login-notice-text {
    font-size: 14px; 
    text-align: center; 
    color: #555; 
    margin-bottom: 20px;
}

.login-field-space {
    margin-bottom: 18px !important;
}

.login-field-space-large {
    margin-bottom: 22px !important;
}

.login-check-row {
    display: flex !important; 
    align-items: center !important; 
    gap: 10px !important; 
    margin-top: 15px !important; 
    margin-bottom: 20px !important;
}

.login-check-input {
    margin: 0 !important; 
    transform: scale(1.1); 
    cursor: pointer; 
    flex-shrink: 0;
}

.login-check-label {
    font-size: 13px !important; 
    color: #555555 !important; 
    margin: 0 !important; 
    line-height: 1.3 !important;
}

.btn-block {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.btn-forgot-style {
    display: block; 
    width: 100%; 
    box-sizing: border-box; 
    background-color: #e9ecef; 
    color: #2F4759; 
    border: 1px solid #ccc; 
    margin-top: 15px; 
    padding: 11px; 
    font-size: 13px; 
    font-weight: bold; 
    cursor: pointer; 
    border-radius: 4px; 
    transition: background 0.2s;
    text-align: center;
}

.btn-forgot-style:hover {
    background-color: #dee2e6;
    color: #0A173B;
}


/* =========================================================================
   DASHBOARD-SPEZIFISCHE STYLES (Exakt fluchtende Hauptboxen & Zartes Grau)
   ========================================================================= */

.portal-box,
.box,
.dashboard-header { 
    max-width: 1700px !important;
    width: 100% !important;
    background: #f8f9fa !important; 
    padding: 30px !important; 
    border-radius: 8px !important; 
    margin: 0 auto 35px auto !important; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.06) !important; 
    border: 1px solid #2F4759 !important; 
    box-sizing: border-box !important;
}

/* Seitlicher blauer Balken links statt oben */
.box,
.dashboard-header {
    border-left: 6px solid #0A173B !important;
    border-top: 1px solid #2F4759 !important;
}

.dashboard-header-row {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap; 
    gap: 10px;
}

/* Blauer Abmelde-Button */
.btn-logout {
    background-color: #2F4759 !important; 
    color: #ffffff !important; 
    padding: 10px 18px !important; 
    font-size: 14px !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    font-weight: bold !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-logout:hover {
    background-color: #0A173B !important;
}

.dashboard-user-info {
    font-size: 14px; 
    color: #2F4759; 
    margin-top: -5px;
}

.dashboard-divider-main {
    border: 0; 
    border-top: 1px solid #2F4759; 
    margin: 15px 0 10px 0;
}

.dashboard-divider-sub {
    border: 0; 
    border-top: 1px solid #2F4759; 
    margin: 10px 0 20px 0;
}

/* Etwas kräftigerer grauer Trennstrich unter der Liegenschaft */
.objekt-header-hr {
    border: 0;
    border-top: 2px solid #a0a8b0;
    margin: 15px 0 20px 0;
}

.contact-line { 
    font-size: 14px; 
    color: #2F4759; 
    margin: 12px 0; 
    display: flex; 
    align-items: center; 
    gap: 6px; 
}

.contact-line a { 
    color: #0A173B; 
    font-weight: bold; 
    text-decoration: none; 
}

.contact-line a:hover { 
    text-decoration: underline; 
}

.dashboard-empty-notice {
    text-align: center; 
    padding: 20px; 
    color: #666; 
    font-style: italic;
}

.objekt-block { 
    background: #ffffff; 
    border: 1px solid #2F4759; 
    border-radius: 6px; 
    padding: 25px; 
    margin-bottom: 40px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); 
}

.objekt-title { 
    color: #0A173B; 
    font-size: 20px; 
    font-weight: bold; 
    margin-top: 0; 
    border-bottom: 3px solid #0A173B; 
    padding-bottom: 8px; 
    margin-bottom: 20px; 
}

.portal-columns,
.dashboard-split-row { 
    display: flex; 
    gap: 30px; 
    align-items: flex-start;
    flex-wrap: wrap;
    margin-top: 10px;
}

.column,
.dashboard-col-left,
.dashboard-col-right { 
    flex: 1; 
    min-width: 320px;
    background: #e9ecef !important; /* Etwas kräftigeres Grau für die Unterboxen */
    border: 1px solid #ced4da;
    padding: 22px;
    border-radius: 6px;
}

.column-title { 
    font-size: 16px; 
    font-weight: bold; 
    color: #0A173B; 
    background: #e9ecef; 
    padding: 8px 12px; 
    border-radius: 4px; 
    margin-bottom: 15px; 
    border-left: 4px solid #2F4759; 
}
        
/* Akkordeon für Ordner und Wohnungen inkl. Hover & Rechtsbündigkeit */
details { 
    border: 1px solid #2F4759; 
    border-radius: 4px; 
    margin-bottom: 12px; 
    background: #fff; 
    overflow: hidden; 
}

summary { 
    font-weight: bold; 
    color: #ffffff; 
    background: #2F4759; 
    padding: 12px 15px; 
    cursor: pointer; 
    user-select: none; 
    outline: none; 
    display: flex; 
    align-items: center; 
    position: relative; /* Wichtig für absolute Rechtsbündigkeit der Badges */
    font-size: 14px;
    transition: background 0.2s ease;
}

summary:hover { 
    background: #0A173B; 
}

details[open] summary { 
    border-bottom: 1px solid #2F4759; 
}

.accordion-content { 
    padding: 5px 0; 
    background: #fff; 
}

/* Aktive Wohnungs-Balken: Echtes, dunkles Grau (ohne Blaustich) */
.akten-main-folder {
    border: 1px solid #2F4759;
    border-radius: 4px;
    margin-bottom: 12px;
    background: #fff;
}

.akten-main-summary {
    background-color: #343a40 !important; 
    color: #ffffff !important;
}

.akten-main-summary:hover {
    background-color: #212529 !important; 
}

/* Sonderwunsch: VERKAUFTE Wohnungen im persönlichen Bereich (Deutlich helleres Grau) */
.verkauft-balken {
    border: 1px solid #6c757d !important;
}

.verkauft-balken summary {
    background-color: #f8f9fa !important;
    color: #495057 !important;
}

.verkauft-balken summary:hover {
    background-color: #e9ecef !important;
}
        
/* Dokumenten-Links im Dashboard (Schriftart: VERDANA) */
.doc-list {
    list-style: none;
    padding-left: 0;
    margin: 8px 0;
}

.doc-list-item {
    padding: 8px 12px;
    border-bottom: 1px dashed #ced4da;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Wichtig für die saubere Trennung von Link und Datum */
}

.doc-list-item:last-child {
    border-bottom: none;
}

.doc-link { 
    font-family: Verdana, Geneva, Tahoma, sans-serif !important;
    color: #1a202c !important; 
    text-decoration: none; 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    font-size: 13.5px !important; 
}

.doc-link:hover { 
    color: #0A173B !important; 
    text-decoration: underline; 
}

.meta-container { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    margin-left: auto; 
}

.doc-meta { 
    font-family: Verdana, Geneva, Tahoma, sans-serif !important;
    font-size: 11.5px !important; 
    color: #64748b; 
    white-space: nowrap; 
}

.badge-neu, 
.badge-neu-item { 
    background: #27ae60; 
    color: white; 
    font-size: 10px; 
    padding: 2px 6px; 
    border-radius: 3px; 
    font-weight: bold; 
    white-space: nowrap; 
    margin-left: 8px;
}

/* Box für "Weitere Dokumente" (Allgemein) */
.allgemein-box {
    margin-top: 15px; 
    border: 1px solid #2F4759; 
    border-radius: 4px; 
    background: #fff; 
    overflow: hidden;
}

.allgemein-box-header {
    background: #e9ecef; 
    color: #0A173B; 
    padding: 6px 12px; 
    font-size: 13px; 
    font-weight: bold; 
    border-bottom: 1px solid #2F4759;
}

.dashboard-empty-col {
    font-size: 13px; 
    color: #666; 
    font-style: italic;
}

/* =========================================================================
   EDLER ARCHIV-HINWEIS BEI KOMPLETTVERKAUF
   ========================================================================= */
.archiv-hinweis-box {
    background: #f0f4f8; 
    border: 1px solid #cbd5e1;
    border-left: 5px solid #4a5568;
    padding: 16px 20px;
    border-radius: 6px;
    font-size: 13.5px;
    color: #2d3748;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Allgemein-Dateien (ohne Ausklappen direkt aufgelistet) */
.allgemein-box-flach {
    background: #ffffff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 15px;
}

/* =========================================================================
   HIGHLIGHTS & RECHTSBÜNDIGE UNIFORME REITER-BADGES
   ========================================================================= */

/* Highlight für Kategorie: Aktuelles (Kräftiges Waldgrün) */
.highlight-aktuelles summary {
    background-color: #2E8B57 !important;
    color: #ffffff !important;
    font-weight: bold;
}

/* Highlight für Kategorie: Verwaltungsbeirat (Flieder/Lila) */
.highlight-beirat {
    border-color: #d8cce6 !important;
}
.highlight-beirat summary {
    background-color: #e0cff2 !important;
    color: #4a235a !important;
    font-weight: bold;
}
.highlight-beirat summary:hover { 
    background-color: #ccaae6 !important; /* Etwas dunkleres Flieder für den Hover-Effekt */
}


.highlight-aktuelles summary:hover { 
    background-color: #246d44 !important; 
}

/* Highlight für Kategorie: WEG-Versammlung (Edles Dunkelrot) */
.highlight-weg summary {
    background-color: #8B0000 !important;
    color: #ffffff !important;
    font-weight: bold;
}

.highlight-weg summary:hover { 
    background-color: #660000 !important; 
}

/* Das NEU-Badge auf den Reitern: Absolut rechtsbündig und immer identisch Grün */
summary .badge-neu,
summary .badge-neu-header {
    position: absolute;
    right: 35px;                          
    top: 50%;
    transform: translateY(-50%);          
    background-color: #27ae60 !important; 
    color: #ffffff !important;            
    border: 1px solid #ffffff !important; 
    padding: 2px 7px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}


/* =========================================================================
   BACKEND / ADMIN BEREICH (Unberührt und exakt erhalten!)
   ========================================================================= */
.admin-body {
    background-color: #f4f7f6;
}

.admin-login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 75vh;
}

.admin-login-box {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #2F4759;
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.admin-login-box h2 {
    color: #0A173B;
    margin-bottom: 25px;
    font-size: 20px;
}

.admin-menu-box {
    background: white;
    border: 1px solid #2F4759;
    padding: 30px;
    max-width: 650px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 40px auto;
}

.btn-admin {
    background: #2F4759;
    color: white;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

.btn-admin:hover {
    background: #0A173B;
}

.admin-menu-list {
    padding-left: 0;
    list-style: none;
    line-height: 2.2;
}

.admin-menu-list a {
    color: #2F4759;
    font-weight: bold;
    font-size: 15px;
    text-decoration: none;
    display: block;
    padding: 5px 10px;
    border-radius: 4px;
}

.admin-menu-list a:hover {
    background: #eef2f5;
    color: #0A173B;
}

.admin-logout-btn {
    float: right;
    color: #2F4759;
    border: 1px solid #2F4759;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    font-size: 13px;
}

.admin-logout-btn:hover {
    background: #2F4759;
    color: white;
}


/* =========================================================================
   ZURÜCK-BUTTON (Für alle Admin-Unterseiten)
   ========================================================================= */
.btn-back {
    display: inline-block;
    background-color: #eef2f5;
    color: #2F4759;
    padding: 6px 15px;
    border: 1px solid #2F4759;
    border-radius: 4px;
    text-decoration: none;
    font-size: 15px;
    font-weight: bold;
    margin-right: 15px;
    vertical-align: middle;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background-color: #2F4759;
    color: #ffffff;
}


/* ========================================================
   ADMIN-BEREICH: OBJEKT-SPIEGEL & SPEZIELLES DESIGN
   ======================================================== */
.spiegel-wide-box {
    max-width: 1200px !important; 
    width: 95%;
    box-shadow: none !important;  
    border: 1px solid #dcdcdc !important; 
    padding: 20px;
}

.objekt-block-flat {
    box-shadow: none !important;  
    border: none !important;      
    padding: 0 !important;
    margin-top: 0 !important;
}

.admin-page-title {
    display: flex; 
    align-items: center; 
    color: #0A173B; 
    font-size: 22px; 
    margin-bottom: 30px;
}

.admin-box-header-row {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 10px;
}

.admin-btn-reset {
    background-color: #6c757d; 
    float: none; 
    text-decoration: none;
}

.admin-dropdown-lg {
    width: 100%; 
    padding: 10px; 
    box-sizing: border-box; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    font-weight: bold; 
    color: #0A173B;
}

.objekt-title-flat {
    border-radius: 4px;
}


/* ========================================================
   ADMIN-BEREICH: IMPORT-TOOL (KARTHAGO)
   ======================================================== */
.admin-import-box {
    max-width: 1000px;
}

.admin-header-row {
    margin-bottom: 20px;
}

.admin-import-title {
    display: inline-block; 
    margin: 0 0 0 10px; 
    color: #2F4759; 
    vertical-align: middle;
}

.admin-import-desc {
    color: #666; 
    margin-bottom: 20px;
}

.admin-import-form {
    background: #f8f9fa; 
    padding: 15px; 
    border: 1px solid #ddd; 
    border-radius: 5px; 
    margin-bottom: 20px;
}

.admin-import-file {
    margin-bottom: 10px; 
    width: 100%;
}

.admin-section-title {
    color: #2F4759; 
    margin-top: 30px;
}

.table-responsive {
    overflow-x: auto;
}

.text-center {
    text-align: center;
}

/* Tabellen-Design für die Vorschau */
.table-preview { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 15px; 
    font-size: 13px; 
}

.table-preview th, 
.table-preview td { 
    border: 1px solid #ccc; 
    padding: 6px 10px; 
    text-align: left; 
}

.table-preview th { 
    background-color: #e9ecef; 
    color: #333; 
}

/* Status-Farben (Zeilen) */
.status-green { 
    background-color: #d4edda !important; 
    color: #155724; 
} 

.status-yellow { 
    background-color: #fff3cd !important; 
    color: #856404; 
} 

.status-red { 
    background-color: #f8d7da !important; 
    color: #721c24; 
} 

.status-blue { 
    background-color: #cce5ff !important; 
    color: #004085; 
} 

/* Status-Punkte (Ampel) */
.dot { 
    height: 16px; 
    width: 16px; 
    border-radius: 50%; 
    display: inline-block; 
    vertical-align: middle; 
}

.dot-green { 
    background-color: #28a745; 
    box-shadow: 0 0 5px #28a745; 
}

.dot-yellow { 
    background-color: #ffc107; 
    box-shadow: 0 0 5px #ffc107; 
}

.dot-red { 
    background-color: #dc3545; 
    box-shadow: 0 0 5px #dc3545; 
}

.dot-blue { 
    background-color: #007bff; 
    box-shadow: 0 0 5px #007bff; 
} 

/* Import-Buttons und Aktionsboxen */
.btn-action { 
    background-color: #27ae60; 
    color: white; 
    padding: 10px 15px; 
    text-decoration: none; 
    border-radius: 4px; 
    border: none; 
    cursor: pointer; 
}

.btn-action:hover { 
    background-color: #2ecc71; 
}

.btn-action-lg { 
    font-size: 16px; 
    padding: 12px 20px; 
}

.admin-import-action-box { 
    margin-top: 25px; 
    padding: 20px; 
    background: #e9ecef; 
    border: 1px solid #ccc; 
    border-radius: 5px; 
    text-align: center; 
}

.admin-action-title { 
    margin-top: 0; 
}

.admin-import-error { 
    color: red; 
    margin-top: 20px; 
}

.admin-import-log { 
    color: #333; 
}

.log-error { 
    color: red; 
}

.admin-import-success { 
    background-color: #d4edda; 
    color: #155724; 
    padding: 15px; 
    border-radius: 4px; 
    border: 1px solid #c3e6cb; 
    margin-top: 20px; 
}


/* =========================================================================
   ADMIN-BEREICH: Flex-Reihen & Reset-Buttons
   ========================================================================= */
.flex-select-row {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
    margin-top: 5px;
}

.flex-select-row select {
    flex-grow: 1;
    padding: 0 12px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-weight: bold;
    color: #0A173B;
    height: 42px;
    line-height: 40px;
}

.btn-header-reset {
    background-color: #6c757d;
    color: #ffffff !important;
    padding: 0 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    transition: background-color 0.2s ease;
    height: 42px;
    line-height: 42px !important; 
    display: inline-block;
    text-align: center;
    white-space: nowrap;
    box-sizing: border-box;
}

.btn-header-reset:hover {
    background-color: #5a6268;
    color: #ffffff !important;
}

/* =========================================================================
   RESPONSIVE ANPASSUNGEN
   ========================================================================= */
@media (max-width: 850px) {
    body { 
        padding: 15px; 
    }
    
    .portal-columns, 
    .dashboard-split-row { 
        flex-direction: column; 
        gap: 20px; 
    }
    
    .column, 
    .dashboard-col-left, 
    .dashboard-col-right { 
        width: 100%; 
    }
}


/* =========================================================================
   SPEZIFISCHER BUTTON FÜR BEIRATS-BELEGPRÜFUNG
   ========================================================================= */
.btn-beirat {
    display: inline-block;
    background-color: #ffffff;
    color: #4a235a !important;
    border: 2px solid #8e44ad;
    padding: 10px 18px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.btn-beirat:hover {
    background-color: #8e44ad;
    color: #ffffff !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}