/* GRC portal own look: navy + teal (Faiz, 2026-11-04) - replaces the BX orange/purple shell (bx-theme.css kept for reference).
   Light is the default; html[data-theme="dark"] is set by the toggle in the top band (saved per browser in localStorage 'grc-theme').
   Loaded by index.html (shell). Pages inside the content frame get grc-page.css (accent + font only). */

:root {
    --orange: #0EA5A4;          /* name kept: 40+ pages use var(--orange) as their accent */
    --orange-dark: #0B8584;
    --teal: #0EA5A4;
    --teal-dark: #0B8584;
    --teal-soft: #E6F7F7;
    --navy: #0F1E3D;
    --navy-band: #13294B;
    --ink: #1F2937;
    --muted: #64748B;
    --line: #DDE3EA;
    --sidebar-w: 272px;
    --page-bg: #F4F7FA;
    --card-bg: #FFFFFF;
    --chip-bg: #EEF2F6;
}
html[data-theme="dark"] {
    --orange: #14B8A6;
    --orange-dark: #0D9488;
    --teal: #14B8A6;
    --teal-dark: #0D9488;
    --teal-soft: #0F3F3C;
    --navy: #070D1A;
    --navy-band: #0F1B33;
    --ink: #E5E7EB;
    --muted: #94A3B8;
    --line: #1E2A44;
    --page-bg: #0B1220;
    --card-bg: #111B2E;
    --chip-bg: #16223A;
    color-scheme: dark;
}
html, body { font-family: 'Inter', 'Segoe UI', sans-serif; }
[dir="rtl"], [dir="rtl"] body { font-family: 'Cairo', 'Tajawal', 'Segoe UI', sans-serif; }
button, input, select, textarea { font-family: inherit; }
body { background: var(--page-bg); color: var(--ink); }

/* ---------------- shell: sidebar ---------------- */
.sidebar { background: var(--navy); border-right: 0; color: #fff; }
.brand { padding: 12px 16px; gap: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.brand .logo { width: 40px; height: 40px; border-radius: 10px; background: var(--teal); font-weight: 800; }
.brand h1 { font-size: 13px; font-weight: 700; color: #fff; line-height: 1.3; }
.brand p { font-size: 10px; font-weight: 600; color: #5EEAD4; }

.nav { padding: 8px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.22) transparent; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.22); border-radius: 6px; }

.nav-label { line-height: 20px; font-size: 13.5px; font-weight: 600; color: #C9D6EA; padding: 10px 12px; margin-top: 4px; border-radius: 8px; gap: 12px; transition: background 0.15s ease, color 0.15s ease; }
.nav-label:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.nav-label.collapsed { color: #C9D6EA; }
.nav-label .gic { font-size: 16px; width: 20px; opacity: 1; }
.nav-label .chev { font-size: 12px; opacity: 0.75; }

.nav-item { color: rgba(226, 232, 240, 0.72); font-size: 13px; font-weight: 400; line-height: 19px; padding: 8px 10px 8px 12px; margin: 0; gap: 10px; border-radius: 0 8px 8px 0; transition: background 0.15s ease, color 0.15s ease; }
.nav-item[data-group] { margin: 0 0 0 12px; padding: 8px 10px 8px 12px; border-left: 2px solid rgba(20, 184, 166, 0.30); border-radius: 0 8px 8px 0; }
.nav-item .ic { font-size: 14px; width: 18px; }
.nav-item:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav-item.active, .nav-item[data-group].active { background: var(--teal); color: #fff; border-left-color: #5EEAD4; box-shadow: none; }
.nav-item.disabled, .nav-item.disabled:hover { color: rgba(255, 255, 255, 0.28); background: transparent; }
.nav-item .tag { color: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.12); }
.nav-item.nav-subpage, .nav-item.nav-subpage[data-group] { margin: 0 0 0 28px; padding: 7px 10px 7px 12px; font-size: 12.5px; color: rgba(226, 232, 240, 0.62); }
.nav-item.nav-subpage:hover { color: #fff; }
.nav-item.nav-subpage.active, .nav-item.nav-subpage[data-group].active { color: #fff; }

.nav-item:not([data-group]) { font-size: 14px; font-weight: 500; line-height: 20px; color: #C9D6EA; padding: 10px 12px; margin: 4px 0 0; border-radius: 8px; border-left: 0; gap: 12px; }
.nav-item:not([data-group]) .ic { font-size: 16px; width: 20px; }
.nav-item:not([data-group]):hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav-item:not([data-group]).active { background: var(--teal); color: #fff; box-shadow: none; }

.sidebar-footer { border-top: 1px solid rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.4); font-size: 10px; text-align: center; padding: 12px 16px; }

/* ---------------- shell: top band ---------------- */
.topbar { background: var(--navy-band); border-bottom: 3px solid var(--teal); box-shadow: none; color: #fff; }
.topbar .title { color: #fff; font-size: 18px; font-weight: 700; }
.topbar .icon-btn { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); color: #fff; }
.topbar .icon-btn:hover { background: rgba(255, 255, 255, 0.16); border-color: #5EEAD4; color: #5EEAD4; }
.topbar #userChip { background: rgba(255, 255, 255, 0.08) !important; border-color: rgba(255, 255, 255, 0.16) !important; color: #C9D6EA !important; }
.content { background: var(--page-bg); }

@media (max-width: 768px) {
    .sidebar { box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35); }
}

/* Yardi scheduler slide-out and other shell panels */
.drawer-head { border-bottom: 2px solid var(--teal); }
html[data-theme="dark"] .sched-drawer, html[data-theme="dark"] .drawer { background: var(--card-bg); color: var(--ink); }
html[data-theme="dark"] .badge { background: var(--chip-bg); color: var(--ink); }
html[data-theme="dark"] .run-items { color: var(--ink); }

/* ---------------- Arabic / RTL ---------------- */
[dir="rtl"] .nav-item { text-align: start; }
[dir="rtl"] .nav-item[data-group] { margin: 0 12px 0 0; border-left: 0; border-right: 2px solid rgba(20, 184, 166, 0.30); border-radius: 8px 0 0 8px; padding: 8px 12px 8px 10px; }
[dir="rtl"] .nav-item.active, [dir="rtl"] .nav-item[data-group].active { border-right-color: #5EEAD4; border-left: 0; }
[dir="rtl"] .nav-item.nav-subpage, [dir="rtl"] .nav-item.nav-subpage[data-group] { margin: 0 28px 0 0; padding: 7px 12px 7px 10px; }
[dir="rtl"] body.collapsed .sidebar { margin-left: 0; margin-right: calc(-1 * var(--sidebar-w)); }
[dir="rtl"] .nav-label .chev { margin-right: auto; margin-left: 0; }
[dir="rtl"] .nav-item:not([data-group]) { margin: 4px 0 0; border-right: 0; }
@media (max-width: 768px) {
    [dir="rtl"] .sidebar { left: auto; right: 0; transform: translateX(100%); box-shadow: -4px 0 24px rgba(0, 0, 0, 0.35); }
    [dir="rtl"] body.collapsed .sidebar { margin-right: 0; }
    [dir="rtl"] body.mobile-open .sidebar { transform: translateX(0); }
}

/* Dejem logo beside the division name (logo left, title right) */
.sidebar .brand { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; align-items: center !important; justify-content: flex-start !important; text-align: start !important; gap: 12px !important; }
.sidebar .brand .logo-img { order: 0; height: 58px; width: auto; flex-shrink: 0; display: block; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35)); }
.sidebar .brand > div { order: 1; min-width: 0; }
.brand h1 { text-align: start; }
