:root {
    --brand-blue: #292862;
    --brand-gold: #a99c67;
    --brand-light: #f6f6f8;
    --brand-white: #ffffff;
    --text-dark: #252535;
}

body {
    font-family: Tahoma, Arial, sans-serif;
    background-color: var(--brand-light);
    color: var(--text-dark);
}

.login-page {
    min-height: 100vh;
    background:
        linear-gradient(
            135deg,
            rgba(41, 40, 98, 0.97),
            rgba(41, 40, 98, 0.87)
        );
}

.login-card {
    background-color: var(--brand-white);
    border-radius: 24px;
    padding: 42px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
    border-top: 6px solid var(--brand-gold);
}

.brand-icon {
    width: 78px;
    height: 78px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background-color: var(--brand-blue);
    color: var(--brand-white);
    border: 4px solid var(--brand-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: bold;
}

.login-title {
    color: var(--brand-blue);
    font-size: 25px;
    font-weight: bold;
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--brand-gold);
    font-size: 16px;
}

.form-label {
    color: var(--brand-blue);
    font-weight: bold;
}

.form-control {
    min-height: 48px;
    border-radius: 12px;
    border: 1px solid #d9d9e3;
}

.form-control:focus {
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 0.2rem rgba(169, 156, 103, 0.18);
}

.btn-brand {
    min-height: 50px;
    border-radius: 12px;
    background-color: var(--brand-blue);
    color: var(--brand-white);
    font-weight: bold;
}

.btn-brand:hover {
    background-color: #211f53;
    color: var(--brand-white);
}
.brand-navbar {
    background-color: var(--brand-blue);
    border-bottom: 4px solid var(--brand-gold);
}

.navbar-brand {
    color: #ffffff !important;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

.nav-link:hover {
    color: var(--brand-gold) !important;
}

.page-title {
    color: var(--brand-blue);
    font-size: 28px;
    font-weight: bold;
}

.dashboard-card {
    background-color: #ffffff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(41, 40, 98, 0.08);
    border-right: 5px solid var(--brand-gold);
}

.dashboard-label {
    display: block;
    color: #6c757d;
    margin-bottom: 10px;
}

.dashboard-value {
    color: var(--brand-blue);
    font-size: 30px;
}
.section-title {
    color: var(--brand-blue);
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(169, 156, 103, 0.35);
}

.form-select {
    min-height: 48px;
    border-radius: 12px;
    border: 1px solid #d9d9e3;
}

.form-select:focus {
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 0.2rem rgba(169, 156, 103, 0.18);
}

textarea.form-control {
    resize: vertical;
}
/* ===================================================
   خيارات حفظ وإرسال التقرير
=================================================== */

.report-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.report-action-card {
    width: 100%;
    min-height: 125px;
    border-radius: 18px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    text-align: right;
    cursor: pointer;
    transition: all 0.25s ease;
}

.report-action-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
}

.report-action-content {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.report-action-content strong {
    font-size: 18px;
}

.report-action-content small {
    font-size: 14px;
    line-height: 1.7;
}

/* المسودة */

.report-action-draft {
    background-color: #ffffff;
    color: var(--brand-blue);
    border: 2px solid rgba(169, 156, 103, 0.65);
}

.report-action-draft .report-action-icon {
    background-color: rgba(169, 156, 103, 0.16);
}

.report-action-draft:hover {
    border-color: var(--brand-gold);
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(41, 40, 98, 0.1);
}

/* الإكمال والإرسال */

.report-action-completed {
    background-color: var(--brand-blue);
    color: #ffffff;
    border: 2px solid var(--brand-blue);
}

.report-action-completed .report-action-icon {
    background-color: rgba(255, 255, 255, 0.14);
}

.report-action-completed:hover {
    background-color: #211f53;
    border-color: #211f53;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(41, 40, 98, 0.22);
}

/* رابط الإلغاء */

.report-cancel-link {
    grid-column: 1 / -1;
    text-align: center;
    color: #6c757d;
    text-decoration: none;
    padding-top: 4px;
}

.report-cancel-link:hover {
    color: var(--brand-blue);
}

/* الجوال */

@media (max-width: 767px) {
    .report-actions {
        grid-template-columns: 1fr;
    }

    .report-action-card {
        min-height: 110px;
    }
}

/* ===================================================
   لوحة الإدارة العليا
=================================================== */
.dashboard-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}.dashboard-date{background:#fff;border:1px solid rgba(169,156,103,.35);color:#6c757d;padding:10px 16px;border-radius:12px;font-size:14px}.executive-card{background:#fff;border-radius:18px;padding:24px;min-height:150px;box-shadow:0 8px 24px rgba(41,40,98,.08);border-top:4px solid var(--brand-gold);display:flex;flex-direction:column;justify-content:center}.executive-card-label{color:#6c757d;font-size:15px}.executive-card-value{color:var(--brand-blue);font-size:36px;margin:8px 0 4px}.executive-card-note{color:#9a9aa5;font-size:13px}.metric-card{background:#f8f8fb;border-radius:16px;padding:20px;min-height:115px;display:flex;flex-direction:column;justify-content:center;border:1px solid rgba(41,40,98,.06)}.metric-card span{color:#6c757d;margin-bottom:8px}.metric-card strong{color:var(--brand-blue);font-size:28px}.metric-highlight{background:var(--brand-blue)}.metric-highlight span,.metric-highlight strong{color:#fff}.insight-box{height:100%;background:#f8f8fb;border-radius:16px;padding:20px;border-right:4px solid var(--brand-blue)}.insight-box h3{color:var(--brand-blue);font-size:17px;font-weight:bold;margin-bottom:12px}.insight-box p{color:#555565;line-height:1.9;margin:0}.insight-warning{border-right-color:#dc3545}.insight-gold{border-right-color:var(--brand-gold)}.status-badge{display:inline-flex;align-items:center;justify-content:center;min-width:78px;padding:7px 12px;border-radius:999px;font-size:13px;font-weight:bold}.status-completed{background:rgba(25,135,84,.12);color:#198754}.status-draft{background:rgba(169,156,103,.16);color:#7c713e}.dashboard-table thead th{background:#f5f5f8;color:var(--brand-blue);border-bottom:0;white-space:nowrap}.dashboard-table td,.dashboard-table th{padding:14px 16px}.empty-state{text-align:center;padding:48px 20px;background:#f8f8fb;border-radius:16px}.empty-state h3{color:var(--brand-blue);font-size:20px}.empty-state p{color:#6c757d;margin-bottom:0}@media(max-width:767px){.executive-card{min-height:125px}.executive-card-value{font-size:30px}}


/* ===================================================
   صفحة عرض التقرير التنفيذي
=================================================== */

.report-sheet {
    background: #ffffff;
    border-radius: 22px;
    padding: 34px;
    box-shadow: 0 12px 36px rgba(41, 40, 98, 0.10);
    border-top: 6px solid var(--brand-gold);
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid #ececf2;
}

.report-kicker {
    display: block;
    color: var(--brand-gold);
    font-weight: bold;
    margin-bottom: 8px;
}

.report-header h2 {
    color: var(--brand-blue);
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 6px;
}

.report-header p {
    color: #6c757d;
    margin-bottom: 0;
}

.report-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 24px 0;
}

.report-meta-grid > div {
    background: #f8f8fb;
    border-radius: 14px;
    padding: 16px;
}

.report-meta-grid span {
    display: block;
    color: #7c7c89;
    font-size: 13px;
    margin-bottom: 6px;
}

.report-meta-grid strong {
    color: var(--brand-blue);
}

.report-section-heading {
    color: var(--brand-blue);
    font-size: 21px;
    font-weight: bold;
    margin: 30px 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(169, 156, 103, 0.32);
}

.report-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.report-metric {
    background: #f8f8fb;
    border-radius: 14px;
    padding: 18px;
    border-right: 4px solid var(--brand-gold);
}

.report-metric span {
    display: block;
    color: #6c757d;
    margin-bottom: 8px;
}

.report-metric strong {
    color: var(--brand-blue);
    font-size: 27px;
}

.report-progress-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.report-progress-card {
    background: #f8f8fb;
    border-radius: 14px;
    padding: 18px;
}

.report-progress-card span,
.report-progress-card strong {
    color: var(--brand-blue);
}

.report-progress-card .progress {
    height: 12px;
    border-radius: 999px;
}

.report-progress-card .progress-bar {
    background: var(--brand-blue);
}

.progress-bar-gold {
    background: var(--brand-gold) !important;
}

.report-content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.report-content-box {
    background: #fbfbfd;
    border: 1px solid #ececf2;
    border-radius: 14px;
    padding: 20px;
    min-height: 150px;
}

.report-content-box h4 {
    color: var(--brand-blue);
    font-size: 17px;
    font-weight: bold;
    margin-bottom: 12px;
}

.report-content-box p {
    color: #555565;
    line-height: 1.9;
    margin: 0;
}

.report-content-wide {
    grid-column: 1 / -1;
}

@media (max-width: 991px) {
    .report-meta-grid,
    .report-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .report-sheet {
        padding: 22px;
    }

    .report-header {
        flex-direction: column;
    }

    .report-meta-grid,
    .report-metrics-grid,
    .report-progress-grid,
    .report-content-grid {
        grid-template-columns: 1fr;
    }

    .report-content-wide {
        grid-column: auto;
    }
}

@media print {
    body {
        background: #ffffff !important;
    }

    .no-print,
    .brand-navbar {
        display: none !important;
    }

    .report-view-page {
        padding: 0 !important;
        max-width: none !important;
    }

    .report-sheet {
        box-shadow: none;
        border-radius: 0;
        padding: 18px;
    }

    .report-content-box,
    .report-metric,
    .report-meta-grid > div,
    .report-progress-card {
        break-inside: avoid;
    }
}

/* ===================================================
   صفحة عرض التقرير التنفيذي
=================================================== */

.report-sheet {
    background: #ffffff;
    border-radius: 22px;
    padding: 34px;
    box-shadow: 0 12px 36px rgba(41, 40, 98, 0.10);
    border-top: 6px solid var(--brand-gold);
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid #ececf2;
}

.report-kicker {
    display: block;
    color: var(--brand-gold);
    font-weight: bold;
    margin-bottom: 8px;
}

.report-header h2 {
    color: var(--brand-blue);
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 6px;
}

.report-header p {
    color: #6c757d;
    margin-bottom: 0;
}

.report-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 24px 0;
}

.report-meta-grid > div {
    background: #f8f8fb;
    border-radius: 14px;
    padding: 16px;
}

.report-meta-grid span {
    display: block;
    color: #7c7c89;
    font-size: 13px;
    margin-bottom: 6px;
}

.report-meta-grid strong {
    color: var(--brand-blue);
}

.report-section-heading {
    color: var(--brand-blue);
    font-size: 21px;
    font-weight: bold;
    margin: 30px 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(169, 156, 103, 0.32);
}

.report-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.report-metric {
    background: #f8f8fb;
    border-radius: 14px;
    padding: 18px;
    border-right: 4px solid var(--brand-gold);
}

.report-metric span {
    display: block;
    color: #6c757d;
    margin-bottom: 8px;
}

.report-metric strong {
    color: var(--brand-blue);
    font-size: 27px;
}

.report-progress-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.report-progress-card {
    background: #f8f8fb;
    border-radius: 14px;
    padding: 18px;
}

.report-progress-card span,
.report-progress-card strong {
    color: var(--brand-blue);
}

.report-progress-card .progress {
    height: 12px;
    border-radius: 999px;
}

.report-progress-card .progress-bar {
    background: var(--brand-blue);
}

.progress-bar-gold {
    background: var(--brand-gold) !important;
}

.report-content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.report-content-box {
    background: #fbfbfd;
    border: 1px solid #ececf2;
    border-radius: 14px;
    padding: 20px;
    min-height: 150px;
}

.report-content-box h4 {
    color: var(--brand-blue);
    font-size: 17px;
    font-weight: bold;
    margin-bottom: 12px;
}

.report-content-box p {
    color: #555565;
    line-height: 1.9;
    margin: 0;
}

.report-content-wide {
    grid-column: 1 / -1;
}

@media (max-width: 991px) {
    .report-meta-grid,
    .report-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .report-sheet {
        padding: 22px;
    }

    .report-header {
        flex-direction: column;
    }

    .report-meta-grid,
    .report-metrics-grid,
    .report-progress-grid,
    .report-content-grid {
        grid-template-columns: 1fr;
    }

    .report-content-wide {
        grid-column: auto;
    }
}

@media print {
    body {
        background: #ffffff !important;
    }

    .no-print,
    .brand-navbar {
        display: none !important;
    }

    .report-view-page {
        padding: 0 !important;
        max-width: none !important;
    }

    .report-sheet {
        box-shadow: none;
        border-radius: 0;
        padding: 18px;
    }

    .report-content-box,
    .report-metric,
    .report-meta-grid > div,
    .report-progress-card {
        break-inside: avoid;
    }

/* ===================================================
   إدارة العمائر
=================================================== */

.building-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    height: 100%;
    box-shadow: 0 10px 30px rgba(41, 40, 98, 0.09);
    border-top: 5px solid var(--brand-gold);
}

.building-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.building-card-header h3 {
    color: var(--brand-blue);
    font-size: 22px;
    font-weight: bold;
    margin: 5px 0 0;
}

.building-city {
    color: var(--brand-gold);
    font-size: 14px;
    font-weight: bold;
}

.building-icon {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    background: rgba(169, 156, 103, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
}

.building-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.building-stats > div {
    background: #f8f8fb;
    border-radius: 13px;
    padding: 13px;
    text-align: center;
}

.building-stats span {
    display: block;
    color: #7b7b89;
    font-size: 12px;
    margin-bottom: 5px;
}

.building-stats strong {
    color: var(--brand-blue);
    font-size: 21px;
}

.building-progress {
    margin-top: 18px;
    color: var(--brand-blue);
}

.building-progress .progress {
    height: 11px;
    border-radius: 999px;
}

.building-progress .progress-bar {
    background: #198754;
}

/* ===================================================
   عرض وحدات العمارة
=================================================== */

.unit-summary-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 18px;
    border-top: 4px solid var(--brand-gold);
    box-shadow: 0 8px 22px rgba(41, 40, 98, 0.08);
}

.unit-summary-card span {
    display: block;
    color: #777786;
    font-size: 13px;
    margin-bottom: 7px;
}

.unit-summary-card strong {
    color: var(--brand-blue);
    font-size: 27px;
}

.summary-occupied {
    border-top-color: #198754;
}

.summary-rate {
    background: var(--brand-blue);
}

.summary-rate span,
.summary-rate strong {
    color: #ffffff;
}

.unit-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    background: #ffffff;
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: 0 6px 18px rgba(41, 40, 98, 0.06);
}

.unit-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #555565;
    font-size: 14px;
}

.legend-box {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1px solid #d9d9e3;
}

.legend-occupied {
    background: #198754;
    border-color: #198754;
}

.legend-vacant {
    background: #ffffff;
}

.legend-maintenance {
    background: #dc3545;
    border-color: #dc3545;
}

.legend-preparation {
    background: var(--brand-gold);
    border-color: var(--brand-gold);
}

.building-visual {
    background: #ffffff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 12px 34px rgba(41, 40, 98, 0.10);
    border: 1px solid rgba(169, 156, 103, 0.25);
}

.building-visual-header {
    background: var(--brand-blue);
    color: #ffffff;
    padding: 22px 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.building-visual-header span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
}

.building-visual-header h2 {
    font-size: 24px;
    margin: 4px 0 0;
    font-weight: bold;
}

.building-visual-icon {
    font-size: 35px;
}

.floor-row {
    display: grid;
    grid-template-columns: 135px 1fr;
    border-bottom: 1px solid #ececf2;
}

.floor-row:last-child {
    border-bottom: 0;
}

.floor-label {
    background: #f7f7fa;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid #ececf2;
}

.floor-label strong {
    color: var(--brand-blue);
    font-size: 16px;
}

.floor-label span {
    color: #8b8b98;
    font-size: 12px;
    margin-top: 4px;
}

.floor-units {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 12px;
}

.housing-unit {
    min-height: 105px;
    border-radius: 14px;
    padding: 13px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid transparent;
}

.housing-unit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(41, 40, 98, 0.13);
}

.unit-number {
    font-size: 23px;
    font-weight: bold;
    margin-bottom: 3px;
}

.housing-unit small {
    font-size: 12px;
}

.housing-unit strong {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.5;
}

.unit-occupied {
    background: #198754;
    color: #ffffff;
}

.unit-vacant {
    background: #ffffff;
    color: var(--brand-blue);
    border-color: #d9d9e3;
}

.unit-maintenance {
    background: #dc3545;
    color: #ffffff;
}

.unit-preparation {
    background: var(--brand-gold);
    color: #ffffff;
}

@media (max-width: 767px) {
    .floor-row {
        grid-template-columns: 1fr;
    }

    .floor-label {
        border-left: 0;
        border-bottom: 1px solid #ececf2;
        padding: 12px 16px;
    }

    .floor-units {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ===================================================
   إدارة بيانات الوحدة والمستأجر
=================================================== */

.unit-status-banner {
    border-radius: 18px;
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(41, 40, 98, 0.10);
}

.unit-status-banner span {
    display: block;
    font-size: 13px;
    opacity: 0.78;
    margin-bottom: 5px;
}

.unit-status-banner strong {
    font-size: 24px;
}

.unit-status-icon {
    font-size: 35px;
}

.unit-status-occupied {
    background: #198754;
}

.unit-status-vacant {
    background: var(--brand-blue);
}

.unit-status-maintenance {
    background: #dc3545;
}

.unit-status-preparation {
    background: var(--brand-gold);
}

.unit-status-inactive {
    background: #6c757d;
}


}
