:root {
    --navy-950: #071b2c;
    --navy-900: #0b2740;
    --navy-800: #113553;
    --navy-700: #173f63;
    --teal-700: #0c6b70;
    --teal-600: #147d82;
    --teal-500: #19a3a8;
    --teal-400: #28b7ad;
    --surface: #ffffff;
    --background: #f3f6f9;
    --border: #e4ebf1;
    --text: #182635;
    --muted: #6c7c8d;
    --sidebar-width: 268px;
    --topbar-height: 82px;
    --shadow-sm: 0 8px 24px rgba(12, 38, 61, .07);
    --shadow-md: 0 18px 45px rgba(12, 38, 61, .12);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
    margin: 0;
    color: var(--text);
    background: var(--background);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
}

a { text-decoration: none; }

.app-shell { min-height: 100vh; }

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #dfeaf2;
    background:
        radial-gradient(circle at 10% 10%, rgba(40, 183, 173, .18), transparent 26%),
        linear-gradient(165deg, var(--navy-900), var(--navy-950));
    box-shadow: 14px 0 35px rgba(7, 27, 44, .12);
    transition: transform .25s ease;
}

.sidebar-brand {
    min-height: var(--topbar-height);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.brand-mark {
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 13px;
    background: linear-gradient(145deg, var(--teal-500), var(--teal-700));
    box-shadow: 0 8px 20px rgba(20, 125, 130, .3);
    font-size: 20px;
}

.sidebar-brand strong, .login-logo strong { display: block; color: #fff; font-size: 20px; line-height: 1.1; letter-spacing: -.3px; }
.sidebar-brand small, .login-logo small { display: block; margin-top: 4px; color: rgba(224, 237, 244, .65); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

.sidebar-brand { flex: 0 0 var(--topbar-height); }
.sidebar-nav { flex: 1 1 auto; min-height: 0; padding: 20px 14px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(103,222,210,.42) transparent; }
.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(103,222,210,.38); border-radius: 99px; }
.sidebar-nav:hover::-webkit-scrollbar-thumb { background: rgba(103,222,210,.7); }
.nav-caption { padding: 16px 13px 8px; color: rgba(210, 227, 238, .46); font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.sidebar-nav .nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 3px 0;
    padding: 12px 14px;
    color: #c8d7e2;
    border-radius: 11px;
    font-weight: 600;
    transition: .2s ease;
}
.sidebar-nav .nav-link i { width: 21px; font-size: 17px; text-align: center; }
.sidebar-nav .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .07); transform: translateX(2px); }
.sidebar-nav .nav-link.active { color: #fff; background: linear-gradient(90deg, rgba(25, 163, 168, .95), rgba(20, 125, 130, .75)); box-shadow: 0 8px 22px rgba(7, 27, 44, .22); }
.sidebar-nav .nav-link.active::before { content: ""; position: absolute; left: -14px; width: 4px; height: 24px; border-radius: 0 4px 4px 0; background: #67ded2; }

.sidebar-footer { flex: 0 0 auto; margin: 10px 14px 14px; padding: 0; border: 1px solid rgba(255,255,255,.09); border-radius: 14px; background: rgba(255,255,255,.055); }
.stage-badge { display: flex; align-items: center; gap: 8px; color: #7ce4d7; font-weight: 700; }
.sidebar-footer small { display: block; margin-top: 5px; color: rgba(218, 234, 243, .55); }
.sidebar-profile { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px; color: #fff; text-align: left; background: transparent; border: 0; border-radius: 14px; }
.sidebar-profile:hover, .sidebar-profile[aria-expanded="true"] { background: rgba(255,255,255,.06); }
.sidebar-profile-avatar { width: 38px; height: 38px; flex: 0 0 38px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(145deg,var(--teal-500),var(--teal-700)); border-radius: 11px; font-weight: 800; }
.sidebar-profile-copy { min-width: 0; flex: 1; }
.sidebar-profile-copy strong, .sidebar-profile-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-profile-copy strong { font-size: 12px; }
.sidebar-profile-copy small { margin-top: 2px; color: rgba(218,234,243,.6); font-size: 9.5px; }
.sidebar-profile > i { color: rgba(255,255,255,.48); }
.sidebar-profile-menu { width: 226px; margin: 0 0 8px 0 !important; }
.nav-count { min-width: 21px; height: 21px; margin-left: auto; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; color: #fff; background: var(--teal-500); border-radius: 99px; font-size: 9px; }
.nav-count.warning { color: #5d3b00; background: #ffd275; }
.nav-count.danger { background: #d85b6b; }

.app-content { min-height: 100vh; margin-left: var(--sidebar-width); display: flex; flex-direction: column; }
.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    min-height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 30px;
    background: rgba(255, 255, 255, .9);
    border-bottom: 1px solid rgba(228, 235, 241, .9);
    backdrop-filter: blur(14px);
}
.page-eyebrow { display: block; margin-bottom: 2px; color: var(--teal-600); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.page-title { margin: 0; color: var(--navy-900); font-size: 21px; font-weight: 750; letter-spacing: -.3px; }
.icon-btn { width: 40px; height: 40px; color: var(--navy-800); background: #edf4f7; border: 0; font-size: 21px; }
.user-menu { display: flex; align-items: center; gap: 10px; padding: 7px 10px; color: var(--text); background: transparent; border: 1px solid transparent; border-radius: 13px; }
.user-menu:hover, .user-menu[aria-expanded="true"] { background: #f2f7f8; border-color: #dfebee; }
.user-menu strong { display: block; max-width: 160px; overflow: hidden; text-overflow: ellipsis; font-size: 13px; white-space: nowrap; }
.user-menu small { display: block; margin-top: 1px; color: var(--muted); font-size: 11px; }
.user-avatar, .table-user span { display: inline-flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(145deg, var(--navy-700), var(--teal-600)); font-weight: 800; }
.user-avatar { width: 38px; height: 38px; border-radius: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.notification-button { position: relative; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; color: var(--navy-700); background: #edf4f7; border: 1px solid #e2ebf0; border-radius: 12px; font-size: 17px; }
.notification-button > span { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; color: #fff; background: #d64e60; border: 2px solid #fff; border-radius: 99px; font-size: 8px; font-weight: 800; }
.notification-menu { width: min(390px,calc(100vw - 24px)); padding: 0; overflow: hidden; border-radius: 16px; }
.notification-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; color: #fff; background: linear-gradient(120deg,var(--navy-900),var(--teal-700)); }
.notification-head strong, .notification-head small { display: block; }
.notification-head strong { font-size: 14px; }.notification-head small { margin-top: 2px; color: rgba(255,255,255,.65); font-size: 10px; }.notification-head > i { font-size: 20px; }
.notification-scroll { max-height: 390px; overflow-y: auto; }
.notification-item { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 11px; align-items: start; padding: 13px 15px; color: inherit; border-bottom: 1px solid #edf1f4; }
.notification-item:hover { color: inherit; background: #f4f9f9; }
.notification-item strong, .notification-item small { display: block; }.notification-item strong { overflow: hidden; text-overflow: ellipsis; color: #334b5e; font-size: 11px; white-space: nowrap; }.notification-item small { margin-top: 3px; color: #7c8c99; font-size: 9.5px; line-height: 1.35; }
.notification-icon { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; }.notification-icon.invoice { color: #9a6814; background: #fff0d2; }.notification-icon.complaint { color: #176f75; background: #e2f3f3; }.notification-icon.maintenance { color: #a24150; background: #fbe6e9; }
.notification-empty { min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #8495a3; }.notification-empty i { color: #35a985; font-size: 28px; }
.notification-footer { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 12px; color: var(--teal-700); background: #f4f9f9; font-size: 11px; font-weight: 700; }
.dropdown-menu { padding: 8px; border-radius: 13px; }
.dropdown-item { padding: 9px 12px; border-radius: 8px; font-size: 13px; }

.page-content { flex: 1; padding: 28px 30px 34px; }
.app-footer { display: flex; justify-content: space-between; gap: 15px; padding: 18px 30px; color: #8090a0; border-top: 1px solid var(--border); font-size: 12px; }

.welcome-panel {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 34px 38px;
    overflow: hidden;
    color: #fff;
    border-radius: 20px;
    background:
        radial-gradient(circle at 86% 30%, rgba(57, 208, 196, .28), transparent 24%),
        linear-gradient(120deg, var(--navy-900), #124b69 68%, var(--teal-700));
    box-shadow: var(--shadow-md);
}
.welcome-label, .section-kicker { display: block; margin-bottom: 7px; color: var(--teal-500); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.welcome-label { color: #71e4d9; }
.welcome-panel h2 { max-width: 640px; margin: 0 0 9px; font-size: clamp(24px, 3vw, 34px); font-weight: 750; letter-spacing: -.7px; }
.welcome-panel p { max-width: 700px; margin: 0; color: rgba(234, 244, 249, .78); line-height: 1.65; }
.welcome-icon { width: 92px; height: 92px; flex: 0 0 92px; display: flex; align-items: center; justify-content: center; color: #8ff1e6; border: 1px solid rgba(255,255,255,.15); border-radius: 28px; background: rgba(255,255,255,.08); font-size: 40px; transform: rotate(3deg); }

.stat-card { min-height: 112px; display: flex; align-items: center; gap: 16px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 17px; box-shadow: var(--shadow-sm); }
.stat-icon { width: 50px; height: 50px; flex: 0 0 50px; display: flex; align-items: center; justify-content: center; border-radius: 15px; font-size: 20px; }
.stat-icon.navy { color: #174a75; background: #e8f1f8; }
.stat-icon.teal { color: #147d82; background: #e3f4f3; }
.stat-icon.cyan { color: #138e9e; background: #e5f6f8; }
.stat-icon.amber { color: #aa6d0c; background: #fff3da; }
.stat-icon.rose { color: #b14456; background: #fbe9ed; }
.stat-card span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.stat-card strong { display: block; color: var(--navy-900); font-size: 28px; line-height: 1; }
.stat-card small { display: block; margin-top: 5px; color: #82919e; font-size: 8.5px; }
.stat-card-link { position: relative; color: inherit; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.stat-card-link:hover { color: inherit; border-color: #b9dcd9; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card-link > div:nth-child(2) { min-width: 0; }
.stat-card-arrow { position: absolute; top: 15px; right: 16px; color: #9aabb7; font-size: 11px; transition: color .18s ease, transform .18s ease; }
.stat-card-link:hover .stat-card-arrow { color: var(--teal-700); transform: translate(2px,-2px); }

.content-card { padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-sm); }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.card-heading h3 { margin: 0; color: var(--navy-900); font-size: 19px; font-weight: 750; }
.card-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.heading-icon { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; color: var(--teal-600); background: #e7f5f4; border-radius: 15px; font-size: 22px; }
.chart-wrap { position: relative; height: 315px; }

.btn { border-radius: 10px; font-weight: 650; font-size: 13px; }
.btn-primary { --bs-btn-bg: var(--teal-600); --bs-btn-border-color: var(--teal-600); --bs-btn-hover-bg: #09686d; --bs-btn-hover-border-color: #09686d; --bs-btn-active-bg: #075b60; padding: 10px 16px; box-shadow: 0 7px 16px rgba(20, 125, 130, .17); }
.btn-soft { padding: 9px 14px; color: var(--navy-700); background: #edf3f7; border: 1px solid #e1e9ef; }
.btn-soft:hover { color: var(--teal-700); background: #e5f3f2; border-color: #d3e9e7; }
.btn-icon-soft, .btn-icon-danger { width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.btn-icon-soft { color: var(--teal-700); background: #e8f4f4; border-color: transparent; }
.btn-icon-danger { color: #bd3a4a; background: #fdecef; border-color: transparent; }

.activity-list { display: flex; flex-direction: column; }
.activity-item { position: relative; display: flex; gap: 13px; padding: 0 0 20px; }
.activity-item:not(:last-child)::before { content: ""; position: absolute; top: 13px; bottom: 1px; left: 5px; width: 1px; background: #dce8ea; }
.activity-dot { position: relative; z-index: 1; width: 11px; height: 11px; flex: 0 0 11px; margin-top: 5px; border: 3px solid #d9f0ef; border-radius: 50%; background: var(--teal-500); }
.activity-item strong { font-size: 12px; }
.activity-item p { margin: 2px 0; color: #536679; font-size: 12px; line-height: 1.45; }
.activity-item small { color: #94a0ad; font-size: 10px; }

.table { --bs-table-bg: transparent; margin: 0; }
.table thead th { padding: 12px 13px; color: #617487; background: #f3f6f8; border: 0; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.table thead th:first-child { border-radius: 10px 0 0 10px; }
.table thead th:last-child { border-radius: 0 10px 10px 0; }
.table tbody td { padding: 13px; border-color: #edf1f4; font-size: 12.5px; vertical-align: middle; }
.table-user { display: flex; align-items: center; gap: 10px; }
.table-user span { width: 32px; height: 32px; border-radius: 10px; font-size: 11px; }
.coa-header-row td { background: #f6f9fb; }
.coa-header-row td:first-child, .coa-header-row td:nth-child(2) { color: var(--navy-900); font-weight: 750; }
.coa-tree-line { display: inline-block; width: 13px; height: 10px; margin: 0 8px 3px 2px; border-left: 1px solid #b4c4d1; border-bottom: 1px solid #b4c4d1; }
.badge { padding: 6px 9px; font-size: 10px; font-weight: 750; }
.badge-soft-navy { color: #275271; background: #e8f0f6; }
.badge-soft-teal { color: #0c7377; background: #e2f3f2; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; font-size: 10px; font-weight: 750; }
.status-pill i { width: 6px; height: 6px; border-radius: 50%; }
.status-pill.active { color: #17735e; background: #e4f5ef; }
.status-pill.active i { background: #24a581; }
.status-pill.inactive { color: #9b4752; background: #fae9ec; }
.status-pill.inactive i { background: #d15a68; }
.status-pill.occupied { color: #235b84; background: #e3eff8; }
.status-pill.occupied i { background: #347fae; }
.status-pill.warning { color: #94620f; background: #fff1d3; }
.status-pill.warning i { background: #e1a52e; }
.status-pill.danger { color: #a13f4d; background: #fbe5e9; }
.status-pill.danger i { background: #d14f60; }
.status-pill.large { padding: 9px 13px; font-size: 12px; }

.metric-pill { min-width: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 6px 9px; border-radius: 9px; font-size: 11px; font-weight: 800; }
.metric-pill.navy { color: #2a5576; background: #e7eff5; }
.metric-pill.teal { color: #0e746f; background: #e2f3ef; }
.metric-pill.amber { color: #976315; background: #fff0d4; }
.table-address { max-width: 250px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facility-text { max-width: 220px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #536679; }

.mini-stat { min-height: 88px; display: flex; align-items: center; gap: 14px; padding: 17px 19px; background: #fff; border: 1px solid var(--border); border-radius: 15px; box-shadow: var(--shadow-sm); }
.mini-stat small { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; }
.mini-stat strong { color: var(--navy-900); font-size: 24px; line-height: 1; }
.room-status-dot { width: 13px; height: 44px; border-radius: 999px; }
.room-status-dot.available { background: #28a887; }
.room-status-dot.occupied { background: #3982b1; }
.room-status-dot.maintenance { background: #e2aa37; }
.room-status-dot.inactive { background: #9aa8b5; }
.contract-icon { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 13px; font-size: 18px; }
.contract-icon.draft { color: #94620f; background: #fff1d3; }
.contract-icon.active { color: #147862; background: #e2f3ed; }
.contract-icon.ended { color: #536a7d; background: #e9eff3; }
.contract-icon.cancelled { color: #a34350; background: #fbe6e9; }
.contract-icon.occupied { color: #235b84; background: #e3eff8; }
.room-number { display: flex; align-items: center; gap: 7px; color: var(--navy-800); }
.room-number i { color: var(--teal-600); }

.form-section-title { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; padding-bottom: 10px; color: var(--navy-800); border-bottom: 1px solid #e9eef2; font-size: 13px; font-weight: 800; }
.form-section-title i { color: var(--teal-600); font-size: 17px; }
.facility-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.facility-option { display: flex; align-items: flex-start; gap: 10px; padding: 13px; cursor: pointer; background: #f7f9fb; border: 1px solid #e2e9ee; border-radius: 11px; transition: .18s ease; }
.facility-option:hover { border-color: #a9d5d3; background: #f0f8f7; }
.facility-option .form-check-input { flex: 0 0 auto; margin-top: 3px; }
.facility-option strong, .facility-option small { display: block; }
.facility-option strong { color: #3d5264; font-size: 12px; }
.facility-option small { margin-top: 2px; color: #8493a1; font-size: 10px; }

.btn-icon-view { width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; color: #375f84; background: #e9f0f6; border-color: transparent; }
.contract-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 27px 30px; color: #fff; border-radius: 18px; background: linear-gradient(120deg, var(--navy-900), #124b69 70%, var(--teal-700)); box-shadow: var(--shadow-md); }
.contract-hero .section-kicker { color: #78e3d8; }
.contract-hero h2 { margin: 0 0 5px; font-size: 26px; }
.contract-hero p { margin: 0; color: rgba(232, 244, 249, .75); }
.contract-hero .status-pill { background-color: rgba(255,255,255,.94); }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.detail-grid > div { min-height: 96px; padding: 15px; background: #f6f9fa; border: 1px solid #e5ecef; border-radius: 12px; }
.detail-grid small, .detail-grid strong, .detail-grid span { display: block; }
.detail-grid small { margin-bottom: 6px; color: #8393a1; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.detail-grid strong { color: var(--navy-800); font-size: 14px; }
.detail-grid span { margin-top: 4px; color: #687a8b; font-size: 11px; line-height: 1.4; }
.contract-notes { margin: 0; color: #526578; line-height: 1.7; }
.contract-value-card > span { color: var(--muted); font-size: 11px; }
.contract-value-card > strong { display: block; margin: 5px 0 20px; color: var(--navy-900); font-size: 27px; }
.value-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid #edf1f4; font-size: 12px; }
.value-row span { color: var(--muted); }
.value-row b { color: #3d5264; }
.contract-meta { margin-top: 20px; padding-top: 15px; border-top: 1px solid #edf1f4; }
.contract-meta small, .contract-meta strong, .contract-meta span { display: block; }
.contract-meta small { color: #8796a4; font-size: 10px; }
.contract-meta strong { margin-top: 4px; color: #3e5365; font-size: 12px; }
.contract-meta span { color: #8796a4; font-size: 10px; }
.ending-list { display: flex; flex-direction: column; gap: 8px; }
.ending-item { display: grid; grid-template-columns: 43px minmax(0, 1fr) 18px; align-items: center; gap: 11px; padding: 10px; color: inherit; border: 1px solid #e8eef2; border-radius: 11px; transition: .18s ease; }
.ending-item:hover { color: inherit; border-color: #b8d9d8; background: #f5faf9; transform: translateX(2px); }
.ending-date { width: 43px; height: 43px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--teal-700); background: #e5f4f3; border-radius: 10px; line-height: 1; }
.ending-date b { font-size: 15px; }
.ending-date small { margin-top: 3px; font-size: 8px; text-transform: uppercase; }
.ending-item > span:nth-child(2) strong, .ending-item > span:nth-child(2) small { display: block; }
.ending-item > span:nth-child(2) strong { color: #3c5265; font-size: 12px; }
.ending-item > span:nth-child(2) small { margin-top: 3px; color: #8493a1; font-size: 10px; }
.ending-item > i { color: #9aabb8; }
.readiness-list { display: flex; flex-direction: column; }
.readiness-list a, .readiness-list > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 2px; color: #405568; border-bottom: 1px solid #edf1f4; }
.readiness-list a:hover { color: var(--teal-700); }
.readiness-list span { display: flex; align-items: center; gap: 9px; font-size: 12px; }
.readiness-list i { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; color: var(--teal-700); background: #e6f3f2; border-radius: 9px; }
.readiness-list strong { color: var(--navy-800); font-size: 15px; }
.filter-bar { display: grid; grid-template-columns: 190px 220px auto auto; gap: 10px; margin-bottom: 20px; padding: 14px; background: #f6f9fa; border: 1px solid #e7edf1; border-radius: 12px; }
.filter-bar-wide { grid-template-columns: minmax(180px,1fr) minmax(160px,.8fr) minmax(150px,.7fr) auto auto; }
.priority-badge { display: inline-flex; padding: 6px 9px; border-radius: 99px; font-size: 9px; font-weight: 800; }
.priority-badge.low { color: #4d697b; background: #eaf0f3; }.priority-badge.medium { color: #93610d; background: #fff0d2; }.priority-badge.high { color: #a24652; background: #fbe8eb; }.priority-badge.urgent { color: #fff; background: #c93f52; }
.payment-legend { display: flex; flex-wrap: wrap; gap: 15px; margin: -5px 0 16px; color: #6d7f8e; font-size: 10px; }.payment-legend span { display: inline-flex; align-items: center; gap: 6px; }.legend-dot { width: 8px; height: 8px; border-radius: 50%; }.legend-dot.unpaid { background: #e1a52e; }.legend-dot.partial { background: #347fae; }.legend-dot.paid { background: #24a581; }.legend-dot.overdue { background: #d14f60; }
.payment-state-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }.payment-state-head strong { color: var(--navy-700); font-size: 9px; letter-spacing: .04em; }.payment-state-head span { color: #607485; font-size: 10px; }
.invoice-progress { width: 100%; height: 6px; overflow: hidden; margin-bottom: 5px; background: #e8eef2; border-radius: 99px; }.invoice-progress > span { height: 100%; display: block; background: #dda02b; border-radius: inherit; }.invoice-progress.partial > span { background: #347fae; }.invoice-progress.paid > span { background: #24a581; }.invoice-progress.overdue > span { background: #d14f60; }
.invoice-row-paid { background: rgba(228,245,239,.23); }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 8px; }.welcome-actions a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; color: #e6fbf8; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12); border-radius: 9px; font-size: 10px; font-weight: 650; }
.due-table-card { padding: 0; overflow: hidden; }.due-table-card > .card-heading { margin: 0; padding: 21px 22px 17px; }.dashboard-due-table-wrap { border-top: 1px solid #e5ebef; }.dashboard-due-table { min-width: 760px; }.dashboard-due-table thead th { padding: 11px 13px; color: #718498; background: #f5f8fa; border-bottom: 1px solid #dfe7ec; font-size: 8.5px; font-weight: 800; letter-spacing: .02em; text-transform: none; }.dashboard-due-table tbody td { padding: 13px; color: #4b6073; border-color: #e8eef2; font-size: 10px; vertical-align: middle; }.dashboard-due-table tbody tr:last-child td { border-bottom: 0; }.dashboard-due-table tbody tr:hover { background: #f8fbfb; }.dashboard-due-table td strong,.dashboard-due-table td small { display: block; }.dashboard-due-table td strong,.due-tenant-link { color: var(--navy-800); font-size: 10.5px; font-weight: 750; }.dashboard-due-table td small { max-width: 145px; margin-top: 3px; overflow: hidden; color: #80909e; font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }.due-tenant-link:hover { color: var(--teal-700); }.due-urgency { display: inline-flex; align-items: center; justify-content: center; padding: 6px 8px; border: 1px solid transparent; border-radius: 7px; font-size: 8px; font-weight: 800; white-space: nowrap; }.due-urgency.overdue { color: #b73d50; background: #ffedf0; border-color: #ffc9d1; }.due-urgency.today { color: #c64f45; background: #fff0ed; border-color: #ffc8c1; }.due-urgency.soon { color: #a9650d; background: #fff5e8; border-color: #f3d09a; }.due-urgency.upcoming { color: #2077a5; background: #eaf6ff; border-color: #b9ddf6; }.dashboard-due-empty { min-height: 118px; display: flex; align-items: center; justify-content: center; gap: 9px; color: #718594; }.dashboard-due-empty i { color: var(--teal-600); font-size: 18px; }
.invoice-status-summary { display: flex; flex-direction: column; gap: 8px; }.invoice-status-item { display: flex; align-items: center; justify-content: space-between; padding: 13px; color: #405568; background: #f6f9fa; border: 1px solid #e8eef2; border-radius: 11px; }.invoice-status-item:hover { color: inherit; border-color: #bcdedb; }.invoice-status-item span { display: flex; align-items: center; gap: 9px; font-size: 11px; }.invoice-status-item i { font-size: 15px; }.invoice-status-item strong { font-size: 17px; }.invoice-status-item.paid i { color: #24a581; }.invoice-status-item.partial i { color: #347fae; }.invoice-status-item.unpaid i { color: #d99b25; }.invoice-status-item.overdue i { color: #d14f60; }
.service-alert-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }.service-alert-grid a { min-height: 76px; display: flex; align-items: center; gap: 10px; padding: 11px; color: #405568; background: #e9f6f4; border-radius: 11px; }.service-alert-grid a.danger { background: #fbe8eb; }.service-alert-grid i { font-size: 18px; }.service-alert-grid small,.service-alert-grid strong { display: block; }.service-alert-grid small { font-size: 8.5px; }.service-alert-grid strong { margin-top: 2px; color: var(--navy-800); font-size: 18px; }
.access-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; padding: 14px; background: #f5f8fa; border: 1px solid #e5ecef; border-radius: 12px; }.access-toolbar strong,.access-toolbar small { display: block; }.access-toolbar strong { color: var(--navy-800); font-size: 12px; }.access-toolbar small { margin-top: 2px; color: #80909d; font-size: 9.5px; }
.permission-group { margin-bottom: 16px; overflow: hidden; border: 1px solid #e3eaee; border-radius: 13px; }.permission-group-title { display: grid; grid-template-columns: 1fr 150px; padding: 10px 14px; color: #fff; background: var(--navy-800); font-size: 8px; font-weight: 800; letter-spacing: .08em; }.permission-group-title span:last-child { text-align: center; }.permission-row { display: grid; grid-template-columns: 1fr 150px; align-items: center; min-height: 61px; padding: 8px 14px; border-top: 1px solid #edf1f4; }.permission-row:nth-child(odd) { background: #f8fafb; }.permission-name { display: flex; align-items: center; gap: 11px; }.permission-icon { width: 35px; height: 35px; display: inline-flex; align-items: center; justify-content: center; color: var(--teal-700); background: #e5f3f2; border-radius: 10px; }.permission-name strong,.permission-name small { display: block; }.permission-name strong { color: #395064; font-size: 11px; }.permission-name small { margin-top: 2px; color: #8b99a5; font-size: 8px; }.permission-switches { display: grid; grid-template-columns: repeat(2,1fr); justify-items: center; }.permission-switches .form-check { min-height: auto; margin: 0; }.permission-switches .form-check-input { width: 2.1em; height: 1.1em; margin: 0; }
.invoice-item-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.invoice-item-card { display: grid; grid-template-columns: minmax(130px, .8fr) minmax(150px, .8fr) minmax(190px, 1fr); align-items: center; gap: 10px; padding: 14px; background: #f7f9fb; border: 1px solid #e2e9ee; border-radius: 12px; }
.invoice-item-card strong { color: #3e5366; font-size: 12px; }
.table tfoot td { padding: 10px 13px; border-color: #edf1f4; }
.table-total td { color: var(--navy-900); background: #eef6f5; }
.btn-icon-money { width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; color: #15765f; background: #e1f3ec; border-color: transparent; }
.payment-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.payment-summary > div { padding: 16px; background: #f6f9fa; border: 1px solid #e5ecef; border-radius: 12px; }
.payment-summary small, .payment-summary strong { display: block; }
.payment-summary small { color: var(--muted); font-size: 10px; }
.payment-summary strong { margin-top: 5px; color: var(--navy-800); font-size: 17px; }
.payment-summary .highlight { background: #e8f5f3; border-color: #cde7e3; }
.form-text { display: block; margin-top: 5px; color: #8493a1; font-size: 10px; }
.receipt-toolbar { display: flex; justify-content: space-between; }
.receipt-paper { max-width: 850px; margin: 0 auto; padding: 42px; background: #fff; border: 1px solid #e1e8ed; border-radius: 18px; box-shadow: var(--shadow-md); }
.receipt-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 24px; border-bottom: 2px solid var(--navy-900); }
.receipt-head > div:first-child { display: flex; align-items: center; gap: 12px; }
.receipt-head h2 { margin: 0; color: var(--navy-900); font-size: 22px; }
.receipt-head > div:last-child { text-align: right; }
.receipt-head small, .receipt-head strong { display: block; }
.receipt-head small { color: var(--teal-700); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.receipt-head strong { margin-top: 4px; color: var(--navy-900); font-size: 17px; }
.receipt-paid { margin-top: 28px; color: #8a99a6; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.receipt-person { margin-top: 7px; padding-bottom: 20px; border-bottom: 1px solid #e7edf1; }
.receipt-person strong, .receipt-person span { display: block; }
.receipt-person strong { color: var(--navy-900); font-size: 20px; }
.receipt-person span { margin-top: 3px; color: var(--muted); }
.receipt-amount { margin: 24px 0; padding: 22px; text-align: center; background: linear-gradient(120deg, #edf7f6, #f4f8fb); border-radius: 14px; }
.receipt-amount small, .receipt-amount strong { display: block; }
.receipt-amount small { color: var(--muted); font-size: 11px; }
.receipt-amount strong { margin-top: 5px; color: var(--teal-700); font-size: 32px; }
.receipt-footer { display: grid; grid-template-columns: 1fr 220px; gap: 40px; margin-top: 35px; }
.receipt-footer small { color: #8a99a6; font-size: 10px; }
.receipt-footer p { color: #536679; }
.receipt-sign { text-align: center; }
.receipt-sign span, .receipt-sign strong, .receipt-sign small { display: block; }
.receipt-sign > div { height: 60px; margin: 5px 0; border-bottom: 1px solid #95a3af; }
.receipt-sign strong { color: #3d5264; }

.dt-container .dt-layout-row { margin: 14px 0; align-items: center; }
.dt-container .dt-search input { min-width: 220px; padding: 8px 12px; border: 1px solid #dbe5ec; border-radius: 10px; outline: 0; }
.dt-container .dt-length select { margin: 0 5px; padding: 5px 28px 5px 9px; border-color: #dbe5ec; border-radius: 8px; }
.dt-container .dt-info { color: var(--muted); font-size: 11px; }
.pagination { --bs-pagination-color: var(--navy-700); --bs-pagination-active-bg: var(--teal-600); --bs-pagination-active-border-color: var(--teal-600); gap: 4px; }
.page-link { min-width: 32px; text-align: center; border-radius: 8px !important; border-color: #e2e9ee; font-size: 11px; }

.form-label { margin-bottom: 7px; color: #3e5265; font-size: 12px; font-weight: 700; }
.required { color: #d24b5b; }
.form-control, .form-select { min-height: 43px; color: var(--text); border-color: #d8e2e9; border-radius: 10px; font-size: 13px; box-shadow: none !important; }
.form-control:focus, .form-select:focus { border-color: #4cb3b3; box-shadow: 0 0 0 3px rgba(25, 163, 168, .11) !important; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 27px; padding-top: 20px; border-top: 1px solid #edf1f4; }
.switch-card { height: 100%; min-height: 72px; display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 14px 15px 14px 50px; background: #f7f9fb; border: 1px solid #e2e9ee; border-radius: 12px; }
.switch-card .form-check-input { margin-left: -35px; margin-top: 3px; }
.switch-card strong, .switch-card small { display: block; }
.switch-card strong { color: #3a5063; font-size: 12px; }
.switch-card small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.alert { border: 0; border-radius: 11px; font-size: 12px; }
.alert ul { margin-bottom: 0; padding-left: 18px; }

.empty-state { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #8898a8; }
.empty-state i { font-size: 28px; }
.empty-state.compact { min-height: 120px; }

.login-body { min-height: 100vh; overflow-x: hidden; background: #fff; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(430px, 1.15fr) minmax(430px, .85fr); }
.login-visual { position: relative; display: flex; align-items: flex-end; overflow: hidden; padding: clamp(40px, 7vw, 90px); color: #fff; background: linear-gradient(145deg, var(--navy-950), var(--navy-800) 70%, var(--teal-700)); }
.login-pattern { position: absolute; inset: 0; opacity: .45; background: radial-gradient(circle at 20% 20%, rgba(44,205,191,.4), transparent 24%), radial-gradient(circle at 76% 68%, rgba(39,163,183,.28), transparent 30%); }
.login-pattern::after { content: ""; position: absolute; width: 480px; height: 480px; right: -160px; top: -120px; border: 70px solid rgba(255,255,255,.035); border-radius: 50%; }
.login-visual-content { position: relative; z-index: 1; max-width: 650px; }
.login-kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; padding: 7px 11px; color: #8cebe1; background: rgba(25,163,168,.12); border: 1px solid rgba(105,225,214,.2); border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.login-visual h1 { max-width: 600px; margin: 0 0 18px; font-size: clamp(38px, 5vw, 65px); font-weight: 760; line-height: 1.08; letter-spacing: -2px; }
.login-visual p { max-width: 580px; margin: 0; color: rgba(229,241,247,.75); font-size: 16px; line-height: 1.7; }
.login-features { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 32px; }
.login-features span { display: flex; align-items: center; gap: 7px; color: #dbeaf1; font-size: 12px; font-weight: 600; }
.login-features i { color: #68dcd1; }
.login-form-panel { display: flex; align-items: center; justify-content: center; padding: 50px; background: #fff; }
.login-card { width: min(100%, 430px); }
.login-logo { display: flex; align-items: center; gap: 11px; margin-bottom: 55px; }
.login-logo strong { color: var(--navy-900); }
.login-logo small { color: #8697a5; }
.login-card h2 { margin: 0 0 7px; color: var(--navy-900); font-size: 30px; font-weight: 760; letter-spacing: -.6px; }
.login-card p { margin: 0; color: var(--muted); }
.input-icon-group { position: relative; }
.input-icon-group > i { position: absolute; z-index: 2; top: 50%; left: 14px; color: #8797a6; transform: translateY(-50%); }
.input-icon-group .form-control { min-height: 49px; padding-left: 42px; }
.input-icon-group.has-action .form-control { padding-right: 48px; }
.password-toggle { color: #738495; }
.input-icon-group .password-toggle { position: absolute; z-index: 3; top: 50%; right: 5px; width: 39px; height: 39px; padding: 0; color: #7c8e9e; background: transparent; border: 0; transform: translateY(-50%); }
.login-submit { min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 25px; }
.login-help { display: flex; align-items: center; gap: 10px; margin-top: 28px; padding: 14px; color: #617587; background: #f4f8f9; border-radius: 12px; font-size: 11px; }
.login-help i { color: var(--teal-600); font-size: 18px; }

.sidebar-backdrop { display: none; }

@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); }
    .app-sidebar.show { transform: translateX(0); }
    .app-content { margin-left: 0; }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 1035; display: block; visibility: hidden; background: rgba(6, 24, 39, .45); opacity: 0; transition: .2s ease; }
    .sidebar-backdrop.show { visibility: visible; opacity: 1; }
    body.sidebar-open { overflow: hidden; }
    .login-shell { grid-template-columns: 1fr; }
    .login-visual { display: none; }
    .login-form-panel { min-height: 100vh; }
    .dashboard-due-table { min-width: 720px; }
}

@media (max-width: 767.98px) {
    .app-topbar, .page-content { padding-left: 18px; padding-right: 18px; }
    .app-footer { flex-direction: column; padding-left: 18px; padding-right: 18px; }
    .welcome-panel { min-height: auto; padding: 27px 24px; }
    .welcome-icon { display: none; }
    .content-card { padding: 18px; }
    .card-heading { flex-direction: column; }
    .card-heading > .btn { width: 100%; }
    .dt-container .dt-layout-row { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
    .dt-container .dt-search input { width: 100%; min-width: 0; margin: 0; }
    .login-form-panel { padding: 28px 20px; }
    .login-logo { margin-bottom: 38px; }
    .facility-grid, .detail-grid { grid-template-columns: 1fr; }
    .contract-hero { align-items: flex-start; flex-direction: column; }
    .filter-bar, .invoice-item-grid, .payment-summary, .receipt-footer { grid-template-columns: 1fr; }
    .invoice-item-card { grid-template-columns: 1fr; }
    .receipt-paper { padding: 24px 18px; }
    .topbar-actions { gap: 3px; }
    .notification-button { width: 39px; height: 39px; }
    .due-table-card > .card-heading { padding: 18px; }
    .service-alert-grid { grid-template-columns: 1fr; }
    .access-toolbar { align-items: flex-start; flex-direction: column; }
    .permission-group-title,.permission-row { grid-template-columns: 1fr 104px; }
    .permission-group-title { font-size: 7px; }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    .facility-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media print {
    .app-sidebar, .app-topbar, .app-footer, .receipt-toolbar, .sidebar-backdrop, .no-print { display: none !important; }
    .app-content { margin: 0 !important; }
    .page-content { padding: 0 !important; }
    body { background: #fff !important; }
    .receipt-paper { max-width: none; padding: 20px; border: 0; border-radius: 0; box-shadow: none; }
}
