/* BX portal look (bx.dejem.tech) applied to the GRC portal - Faiz, 2026-10-26.
   Measured from the live BX shell: Cairo / Tajawal, sidebar 280px with a #2A2147 -> #1E1638 gradient, active item #D9542A with an orange glow,
   rows 14px / 500 at rgba(255,255,255,.75), hover rgba(255,255,255,.10), section labels 11px bold at .42 white, sub-items 13px with a 2px
   rgba(217,84,42,.35) rail, page band 135deg #2A2147 -> #1E1638 with white 900 titles and #FFC000 accents, content #F8FAFC.
   Loaded by index.html (shell) and injected into every page shown in the content frame (variables + font + background only). */

:root {
    --orange: #D9542A;
    --orange-dark: #BF4520;
    --ink: #2A2147;
    --muted: #64748B;
    --line: #E2E8F0;
    --sidebar-w: 280px;
    --bx-purple: #2A2147;
    --bx-purple-deep: #1E1638;
    --bx-yellow: #FFC000;
    --bx-surface: #F8FAFC;
}
html, body { font-family: 'Cairo', 'Tajawal', 'Segoe UI', sans-serif; }
button, input, select, textarea { font-family: inherit; }
/* (no body colours here: the shell's own areas are styled below, framed pages keep their own palette) */

/* ---------------- shell: sidebar ---------------- */
.sidebar { background: linear-gradient(180deg, var(--bx-purple) 0%, var(--bx-purple-deep) 100%); 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: linear-gradient(135deg, #E8602F 0%, #C24A22 100%); box-shadow: 0 2px 8px rgba(217, 84, 42, 0.35); font-weight: 900; }
.brand h1 { font-size: 13px; font-weight: 700; color: #fff; line-height: 1.25; }
.brand p { font-size: 10px; font-weight: 600; color: var(--bx-yellow); }

.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; }

/* groups = BX's collapsible group rows ("JIRA", "GRC"): 14px / 600 with icon + chevron; their pages are smaller and indented under a rail */
.nav-label { line-height: 20px; font-size: 14px; font-weight: 600; letter-spacing: 0; color: rgba(255, 255, 255, 0.78); padding: 10px 12px; margin-top: 4px; border-radius: 8px; gap: 12px; transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1); }
.nav-label:hover { color: #fff; background: rgba(255, 255, 255, 0.10); }
.nav-label.collapsed { color: rgba(255, 255, 255, 0.78); }
.nav-label .gic { font-size: 16px; width: 20px; opacity: 1; }
.nav-label .chev { font-size: 12px; opacity: 0.75; }

/* pages inside a group (BX sub-items): 13px, softer white, indented on a 2px rail */
.nav-item { color: rgba(255, 255, 255, 0.65); 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: all 0.15s cubic-bezier(0.4, 0, 0.2, 1); }
.nav-item[data-group] { margin: 0 0 0 12px; padding: 8px 10px 8px 12px; border-left: 2px solid rgba(217, 84, 42, 0.35); border-radius: 0 8px 8px 0; }
.nav-item .ic { font-size: 14px; width: 18px; }
.nav-item:hover { background: rgba(255, 255, 255, 0.10); color: #fff; }
.nav-item.active, .nav-item[data-group].active { background: var(--orange); color: #fff; border-left-color: var(--orange); box-shadow: 0 2px 8px rgba(217, 84, 42, 0.35); }
.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); }
/* a page under a page (Open Observations, My Approvals, the mind-map pair): one level deeper, a touch smaller */
.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(255, 255, 255, 0.58); }
.nav-item.nav-subpage:hover { color: #fff; }
.nav-item.nav-subpage.active, .nav-item.nav-subpage[data-group].active { color: #fff; }

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

/* ---------------- shell: top band ---------------- */
.topbar { background: linear-gradient(135deg, var(--bx-purple) 0%, var(--bx-purple-deep) 100%); border-bottom: 0; box-shadow: none; color: #fff; }
.topbar .title { color: #fff; font-size: 18px; font-weight: 800; }
.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: var(--bx-yellow); color: var(--bx-yellow); }
.content { background: var(--bx-surface); }

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

/* the Yardi scheduler slide-out keeps the brand accent */
.drawer-head { border-bottom: 2px solid var(--orange); }

/* ---------------- Arabic / RTL (BX puts the sidebar on the right and mirrors the sub-page rail) ---------------- */
[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(217, 84, 42, 0.35); 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: var(--orange); 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; }
@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); }
}

/* top-level pages outside any group (My Progress): BX's Home / News / My Progress rows - 14px / 500, full-width active pill */
.nav-item:not([data-group]) { font-size: 14px; font-weight: 500; line-height: 20px; color: rgba(255, 255, 255, 0.78); 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.10); color: #fff; }
.nav-item:not([data-group]).active { background: var(--orange); color: #fff; box-shadow: 0 2px 8px rgba(217, 84, 42, 0.35); }
[dir="rtl"] .nav-item:not([data-group]) { margin: 4px 0 0; border-right: 0; }

/* Dejem logo beside the division name */
.brand .logo-img { height: 58px; width: auto; flex-shrink: 0; display: block; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35)); }
.brand { gap: 12px; }
/* logo to the left of the title (Faiz, 2026-10-26) */
.brand { flex-direction: row; align-items: center; text-align: start; gap: 12px; padding: 12px 16px; }
.brand h1 { font-size: 13px; line-height: 1.3; text-align: start; }
/* brand = logo on the LEFT, title to its right (hard rule so no older rule can stack them) */
.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; }
.sidebar .brand > div { order: 1; min-width: 0; }
