/* ═══════════════════════════════════════════════════════════════
   admin.css — Riyada Dashboard Design System
   Sections:
     1.  Admin Dashboard App  (#adminApp-scoped — DO NOT touch)
     2.  Global Layout Shell  (topbar, sidebar, page-content)
     3.  Global Components    (cards, tables, forms, buttons …)
     4.  Responsive overrides
═══════════════════════════════════════════════════════════════ */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SECTION 1 — ADMIN DASHBOARD APP  (#adminApp)
   Everything below is scoped to #adminApp so it never bleeds
   onto other pages.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

#adminApp, #adminApp * { box-sizing: border-box; }

/* ── CSS Variables — dark (default) ── */
#adminApp {
    --bg:        #0d1117;
    --bg2:       #161b27;
    --bg3:       #1c2235;
    --bg4:       #242a3e;
    --bg5:       #2b3250;
    --border:    rgba(255,255,255,0.06);
    --border2:   rgba(255,255,255,0.11);
    --border3:   rgba(255,255,255,0.18);
    --text:      #e4e8f5;
    --text2:     #c0c8de;
    --muted:     #7a85a3;
    --muted2:    #49516a;
    --blue:      #5b9cf6;
    --blue2:     #3a7de8;
    --blue-bg:   rgba(91,156,246,0.10);
    --blue-glow: rgba(91,156,246,0.18);
    --green:     #4ade98;
    --green-bg:  rgba(74,222,152,0.10);
    --amber:     #fbbf24;
    --amber-bg:  rgba(251,191,36,0.10);
    --red:       #f87171;
    --red-bg:    rgba(248,113,113,0.10);
    --purple:    #a78bfa;
    --purple-bg: rgba(167,139,250,0.10);
    --teal:      #34d399;
    --teal-bg:   rgba(52,211,153,0.10);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.35), 0 2px 4px rgba(0,0,0,0.2);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.45), 0 2px 8px rgba(0,0,0,0.25);
    --r-sm: 6px;  --r-md: 10px;  --r-lg: 14px;  --r-xl: 18px;
    font-family: 'DM Sans', 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 13px;
    color: var(--text);
    background: var(--bg);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* ── Light mode ── */
[data-bs-theme="light"] #adminApp,
body.light-theme        #adminApp {
    --bg:        #f0f4fb;
    --bg2:       #ffffff;
    --bg3:       #eef1f8;
    --bg4:       #e3e8f2;
    --bg5:       #d8deec;
    --border:    rgba(0,0,0,0.06);
    --border2:   rgba(0,0,0,0.11);
    --border3:   rgba(0,0,0,0.18);
    --text:      #17213a;
    --text2:     #2d3a5a;
    --muted:     #5a6584;
    --muted2:    #9ba3be;
    --blue:      #2563eb;
    --blue2:     #1d4ed8;
    --blue-bg:   rgba(37,99,235,0.08);
    --blue-glow: rgba(37,99,235,0.14);
    --green:     #16a34a;
    --green-bg:  rgba(22,163,74,0.09);
    --amber:     #b45309;
    --amber-bg:  rgba(180,83,9,0.09);
    --red:       #dc2626;
    --red-bg:    rgba(220,38,38,0.09);
    --purple:    #7c3aed;
    --purple-bg: rgba(124,58,237,0.09);
    --teal:      #0d9488;
    --teal-bg:   rgba(13,148,136,0.09);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
}
[data-bs-theme="light"] #adminApp input[type="date"]::-webkit-calendar-picker-indicator,
body.light-theme        #adminApp input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0);
}

/* ── Top Bar ── */
#adminApp .adm-topbar {
    display: flex; align-items: center; gap: 10px;
    padding: 0 20px; height: 54px;
    background: var(--bg2);
    border-bottom: 1px solid var(--border2);
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}
#adminApp .adm-logo {
    width: 30px; height: 30px;
    background: var(--blue-bg);
    border: 1px solid rgba(91,156,246,0.22);
    border-radius: var(--r-sm);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: background .15s;
}
#adminApp .adm-logo:hover { background: var(--blue-glow); }
#adminApp .adm-title  { font-size: 14px; font-weight: 700; letter-spacing: -0.3px; color: var(--text); }
#adminApp .adm-sep    { color: var(--muted2); font-size: 16px; }
#adminApp .adm-sub    { font-size: 12px; color: var(--muted); }
#adminApp .adm-spacer { flex: 1; }
#adminApp .adm-dlbl   { font-size: 11px; color: var(--muted); white-space: nowrap; }
#adminApp .adm-dinput {
    font-family: 'DM Mono', 'Courier New', monospace;
    font-size: 11px; background: var(--bg3);
    border: 1px solid var(--border2); border-radius: var(--r-sm);
    color: var(--text); padding: 4px 10px; height: 30px;
    outline: none; width: 140px;
    transition: border-color .15s, box-shadow .15s;
}
#adminApp .adm-dinput:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-glow); }
#adminApp .adm-btn {
    font-family: inherit; font-size: 12px; font-weight: 500;
    height: 30px; padding: 0 14px; border-radius: var(--r-sm);
    border: 1px solid var(--border2); background: var(--bg3);
    color: var(--text2); cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap; display: inline-flex; align-items: center; gap: 5px;
}
#adminApp .adm-btn:hover           { background: var(--bg4); border-color: var(--border3); color: var(--text); }
#adminApp .adm-btn-primary         { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 2px 8px var(--blue-glow); }
#adminApp .adm-btn-primary:hover   { background: var(--blue2); border-color: var(--blue2); }
#adminApp .adm-btn:disabled        { opacity: .45; cursor: not-allowed; }
#adminApp .adm-btn-fullscreen      { padding: 0 10px; }

/* ── Summary Strip ── */
#adminApp .adm-summary {
    display: flex; gap: 1px;
    background: var(--border);
    border-bottom: 1px solid var(--border2);
    flex-shrink: 0;
}
#adminApp .adm-sum-card {
    flex: 1; background: var(--bg2);
    padding: 11px 20px;
    display: flex; align-items: center; gap: 13px;
    transition: background .15s;
    position: relative; overflow: hidden;
}
#adminApp .adm-sum-card::before {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0;
    height: 2px; opacity: 0; transition: opacity .2s;
}
#adminApp .adm-sum-card:hover::before         { opacity: 1; }
#adminApp .adm-sum-card:nth-child(1)::before  { background: var(--blue); }
#adminApp .adm-sum-card:nth-child(2)::before  { background: var(--green); }
#adminApp .adm-sum-card:nth-child(3)::before  { background: var(--amber); }
#adminApp .adm-sum-card:nth-child(4)::before  { background: var(--purple); }
#adminApp .adm-sum-icon {
    width: 36px; height: 36px; border-radius: var(--r-md);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 16px;
}
#adminApp .si-blue   { background: var(--blue-bg);   color: var(--blue); }
#adminApp .si-green  { background: var(--green-bg);  color: var(--green); }
#adminApp .si-amber  { background: var(--amber-bg);  color: var(--amber); }
#adminApp .si-purple { background: var(--purple-bg); color: var(--purple); }
#adminApp .adm-sum-lbl { font-size: 10px; color: var(--muted); margin-bottom: 3px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
#adminApp .adm-sum-val { font-size: 24px; font-weight: 700; line-height: 1; letter-spacing: -0.8px; color: var(--text); }

/* ── Filter Bar ── */
#adminApp .adm-filterbar {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 20px; background: var(--bg2);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0; flex-wrap: wrap;
}
#adminApp .adm-fb-lbl { font-size: 11px; color: var(--muted); font-weight: 500; }
#adminApp .adm-fpill {
    font-family: inherit; font-size: 11px; font-weight: 500;
    padding: 4px 12px; border-radius: 20px;
    border: 1px solid var(--border2); background: transparent;
    color: var(--muted); cursor: pointer; transition: all .15s;
}
#adminApp .adm-fpill:hover { color: var(--text); border-color: var(--border3); background: var(--bg3); }
#adminApp .adm-fpill.act   { background: var(--blue-bg); border-color: rgba(91,156,246,0.35); color: var(--blue); font-weight: 600; }
#adminApp .adm-avg-chips   { display: flex; gap: 5px; margin-left: 6px; }
#adminApp .adm-chip { font-size: 10px; font-weight: 600; padding: 3px 9px; border-radius: 20px; letter-spacing: .02em; }
#adminApp .chip-crm   { background: var(--blue-bg);  color: var(--blue); }
#adminApp .chip-voice { background: var(--green-bg); color: var(--green); }
#adminApp .chip-tick  { background: var(--red-bg);   color: var(--red); }
#adminApp .adm-shown  { margin-left: auto; font-size: 11px; color: var(--muted); background: var(--bg3); border: 1px solid var(--border); border-radius: 20px; padding: 3px 11px; }

/* ── Board ── */
#adminApp .adm-board-wrap {
    flex: 1; overflow-x: hidden; overflow-y: auto;
    padding: 16px 20px 20px;
    scrollbar-width: thin; scrollbar-color: var(--bg5) transparent;
}
#adminApp .adm-board-wrap::-webkit-scrollbar       { width: 5px; }
#adminApp .adm-board-wrap::-webkit-scrollbar-thumb { background: var(--bg5); border-radius: 5px; }
#adminApp .adm-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 12px; align-items: start;
}

/* ── Loading ── */
#adminApp .adm-loading {
    grid-column: 1 / -1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 72px 0; gap: 16px; color: var(--muted); font-size: 13px;
}
#adminApp .adm-spin {
    width: 38px; height: 38px;
    border: 3px solid var(--bg4); border-top-color: var(--blue);
    border-radius: 50%; animation: adm-spin .75s linear infinite;
}
@keyframes adm-spin { to { transform: rotate(360deg); } }

/* ── Project Column ── */
#adminApp .adm-col { width: 100%; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
#adminApp .adm-col-header {
    background: var(--bg3); border: 1px solid var(--border2);
    border-radius: var(--r-lg); padding: 10px 14px;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
#adminApp .adm-col-header::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--blue), var(--purple));
}
#adminApp .adm-col-name  { font-size: 13px; font-weight: 700; letter-spacing: -0.2px; color: var(--text); }
#adminApp .adm-col-tags  { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
#adminApp .adm-col-tag   { font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: var(--r-sm); text-transform: uppercase; letter-spacing: 0.4px; }
#adminApp .ct-crm    { background: var(--blue-bg);  color: var(--blue); }
#adminApp .ct-voice  { background: var(--green-bg); color: var(--green); }
#adminApp .ct-social { background: var(--amber-bg); color: var(--amber); }
#adminApp .adm-hdot  { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 4px currentColor; }
#adminApp .adm-col-body { display: flex; flex-direction: column; gap: 7px; }

/* ── Section Card ── */
#adminApp .adm-sec {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--r-lg); overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
    box-shadow: var(--shadow-sm);
}
#adminApp .adm-sec:hover { border-color: var(--border2); box-shadow: var(--shadow-md); }
#adminApp .adm-sec-head {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 12px; font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.7px; color: var(--muted);
    cursor: pointer; user-select: none; transition: background .15s;
}
#adminApp .adm-sec-head:hover { background: rgba(255,255,255,0.03); }
#adminApp .adm-sec-head .adm-sec-acc        { color: var(--blue);  font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 11px; }
#adminApp .adm-sec-head .adm-sec-acc.green  { color: var(--green); }
#adminApp .adm-sec-head .adm-sec-acc.amber  { color: var(--amber); }
#adminApp .adm-sec-head::after {
    content: '▾'; margin-left: auto; font-size: 10px; color: var(--muted2);
    transition: transform .22s cubic-bezier(.4,0,.2,1); flex-shrink: 0;
}
#adminApp .adm-sec-head.collapsed::after { transform: rotate(-90deg); }
#adminApp .adm-collapse-body { height: 0; overflow: hidden; transition: height .25s cubic-bezier(.4,0,.2,1); }

/* ── Gauge ── */
#adminApp .adm-gauge-wrap  { display: flex; flex-direction: column; align-items: center; }
#adminApp .adm-gauge-inner { width: 100%; height: 160px; }
#adminApp .apexcharts-canvas { background: transparent !important; }
#adminApp .adm-gauge-legend { display: flex; gap: 12px; margin-top: 4px; flex-wrap: wrap; justify-content: center; }
#adminApp .adm-gl-item { display: flex; align-items: center; gap: 4px; font-size: 10px; color: var(--muted); }
#adminApp .adm-gl-dot  { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* ── Metrics Grid ── */
#adminApp .adm-mets  { display: grid; gap: 5px; padding: 7px; }
#adminApp .adm-mets3 { grid-template-columns: repeat(3, 1fr); }
#adminApp .adm-mets2 { grid-template-columns: repeat(2, 1fr); }
#adminApp .adm-met {
    background: var(--bg3); border: 1px solid var(--border); border-radius: var(--r-md);
    padding: 7px 5px; text-align: center; min-width: 0;
    transition: background .15s, border-color .15s, transform .15s;
}
#adminApp .adm-met:hover { background: var(--bg4); border-color: var(--border2); transform: translateY(-1px); }
#adminApp .adm-m-lbl { font-size: 10px; color: var(--muted); margin-bottom: 3px; white-space: normal; word-break: break-word; overflow-wrap: anywhere; line-height: 1.3; font-weight: 500; }
#adminApp .adm-m-val { font-size: 15px; font-weight: 700; line-height: 1.1; color: var(--text); letter-spacing: -0.3px; }
#adminApp .adm-m-sub { font-size: 10px; color: var(--green); margin-top: 2px; font-weight: 500; }

/* ── Badges (scoped) ── */
#adminApp .badge          { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 20px; font-family: 'DM Mono', monospace; line-height: 1.5; }
#adminApp .badge.tiny     { font-size: 9px; padding: 1px 6px; }
#adminApp .badge-soft-success { background: var(--green-bg);  color: var(--green); }
#adminApp .badge-soft-warning { background: var(--amber-bg);  color: var(--amber); }
#adminApp .badge-soft-danger  { background: var(--red-bg);    color: var(--red); }
#adminApp .badge-soft-purple  { background: var(--purple-bg); color: var(--purple); }

/* ── Social KPI Grid ── */
#adminApp .adm-sk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 7px; }
#adminApp .adm-sk-cell {
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: var(--r-md); padding: 6px 8px; text-align: center;
    transition: background .15s, border-color .15s;
}
#adminApp .adm-sk-cell:hover { background: var(--bg4); border-color: var(--border2); }

/* ── Performance Table ── */
#adminApp .adm-ptable           { width: 100%; border-collapse: collapse; }
#adminApp .adm-ptable td        { padding: 5px 12px; font-size: 11px; border-bottom: 1px solid var(--border); color: var(--text2); }
#adminApp .adm-ptable tr:last-child td  { border-bottom: none; }
#adminApp .adm-ptable td:first-child    { color: var(--muted); font-weight: 500; }
#adminApp .adm-ptable td:last-child     { text-align: right; font-weight: 600; }
#adminApp .adm-ptable tr:hover td       { background: var(--bg3); }

/* ── Inactive / Error ── */
#adminApp .adm-inactive { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 16px 0; font-size: 11px; color: var(--muted2); opacity: .6; }
#adminApp .adm-error    { font-size: 11px; color: var(--red); background: var(--red-bg); border: 1px solid rgba(248,113,113,0.18); border-radius: var(--r-sm); padding: 7px 12px; margin: 7px; }

/* ── Date Picker ── */
#adminApp input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.55); cursor: pointer; }

/* ── Fullscreen ── */
#adminApp .adm-btn-fullscreen { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; flex-shrink: 0; }
#adminApp.adm-fullscreen { position: fixed !important; inset: 0 !important; width: 100vw; height: 100vh; z-index: 9999; }
#adminApp.adm-fullscreen .adm-topbar,
#adminApp.adm-fullscreen .adm-summary,
#adminApp.adm-fullscreen .adm-filterbar { display: none !important; }
#adminApp.adm-fullscreen .adm-board-wrap { flex: 1; padding: 12px; }

/* Hide the global app chrome (topbar + sidebar) while the admin dashboard
   is in fullscreen. Uses :has() to walk up to <body> from #adminApp.adm-fullscreen
   so we don't need to touch JS or markup. Target both ID (#mainTopbar) and class
   (.topbar) so an ID-specific override elsewhere can't keep the bar visible. */
body:has(#adminApp.adm-fullscreen) #mainTopbar,
body:has(#adminApp.adm-fullscreen) .topbar,
body:has(#adminApp.adm-fullscreen) .main-nav,
body:has(#adminApp.adm-fullscreen) .nav-overlay {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
}
body:has(#adminApp.adm-fullscreen) .page-content { margin-left: 0 !important; }
body:has(#adminApp.adm-fullscreen) .below-topbar { overflow: visible; }

/* ── Exit Fullscreen floating button (hidden normally, visible in fullscreen) ── */
#admExitFsBtn {
    display: none;
    position: fixed;
    top: 14px; right: 16px;
    z-index: 10001;
    align-items: center; gap: 6px;
    padding: 0 14px; height: 32px;
    background: rgba(30,35,51,0.92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #e8eaf0; font-size: 12px; font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    white-space: nowrap;
}
#admExitFsBtn:hover {
    background: rgba(79,142,247,0.18);
    border-color: rgba(79,142,247,0.4);
    color: #4f8ef7;
}
#adminApp.adm-fullscreen #admExitFsBtn { display: flex; }

/* ── Table layout (two-column grid view) ── */
#adminApp .adm-table { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
#adminApp .adm-table thead th {
    font-size: 10px; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: .07em;
    padding: 9px 12px; text-align: left;
    border-bottom: 1px solid var(--border2);
    background: var(--bg3); position: sticky; top: 0; z-index: 2; white-space: nowrap;
}
#adminApp .col-project { width: 160px; }
#adminApp .col-service { width: auto; }
#adminApp .th-month    { color: var(--muted2); text-transform: none; font-weight: 400; letter-spacing: 0; }
#adminApp .th-green    { color: var(--green); }
#adminApp .th-amber    { color: var(--amber); }
#adminApp .adm-row           { border-bottom: 1px solid var(--border); transition: background .12s; }
#adminApp .adm-row:hover     { background: rgba(255,255,255,.025); }
#adminApp .adm-row:last-child { border-bottom: none; }
#adminApp .td-project { padding: 11px 12px; vertical-align: top; border-right: 1px solid var(--border); }
#adminApp .td-service { padding: 11px 12px; vertical-align: top; border-right: 1px solid var(--border); }
#adminApp .td-service:last-child { border-right: none; }
#adminApp .proj-name  { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; }
#adminApp .proj-tags  { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
#adminApp .ptag       { font-size: 9px; padding: 2px 6px; border-radius: 4px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
#adminApp .pt-crm    { background: var(--blue-bg);  color: var(--blue); }
#adminApp .pt-voice  { background: var(--green-bg); color: var(--green); }
#adminApp .pt-social { background: var(--amber-bg); color: var(--amber); }
#adminApp .svc-cell   { display: flex; flex-direction: column; gap: 6px; }
#adminApp .gauge-row  { display: flex; align-items: flex-start; gap: 10px; }
#adminApp .gauge-meta { display: flex; flex-direction: column; gap: 3px; flex: 1; padding-top: 2px; }
#adminApp .gm-sla-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-sm); display: inline-block; margin-bottom: 3px; }
#adminApp .gm-row  { display: flex; align-items: center; gap: 5px; line-height: 1.5; }
#adminApp .gm-lbl  { font-size: 10px; color: var(--muted); min-width: 60px; font-weight: 500; }
#adminApp .gm-val  { font-size: 10px; color: var(--text2); font-weight: 600; }
#adminApp .gm-sub  { font-size: 10px; color: var(--muted2); }
#adminApp .gm-badge { font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 3px; }
#adminApp .gv-green { color: var(--green) !important; }
#adminApp .gv-red   { color: var(--red)   !important; }
#adminApp .social-footer { display: flex; gap: 10px; padding-top: 5px; border-top: 1px solid var(--border); margin-top: 3px; }
#adminApp .social-footer span { font-size: 10px; color: var(--muted); }
#adminApp .adm-na   { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted2); padding: 10px 0; }

/* ── Two-column grid ── */
#adminApp .adm-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; position: relative; }
#adminApp .adm-grid-2::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--border2); }
#adminApp .adm-grid-2 .adm-table { background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
#adminApp .adm-grid-2 .adm-table:first-child .td-project { border-left: 3px solid var(--blue); }
#adminApp .adm-grid-2 .adm-table:last-child  .td-project { border-left: 3px solid var(--green); }
@media (max-width: 992px) {
    #adminApp .adm-grid-2 { grid-template-columns: 1fr; }
    #adminApp .adm-grid-2::before { display: none; }
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SECTION 2 — GLOBAL LAYOUT SHELL
   Topbar · Sidebar · Page-content · Mobile overlay
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

html, body { height: 100%; margin: 0; }

/* Auth layout: full-height flex column, no body scroll */
body.is-auth { overflow: hidden; }
body.is-auth .wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Guest layout: normal scroll */
body.is-guest { overflow: auto; }
body.is-guest .wrapper { display: flex; flex-direction: column; min-height: 100vh; }
body.is-guest .below-topbar { flex: 1; display: flex; flex-direction: column; }
body.is-guest .page-content { flex: 1; display: flex; flex-direction: column; }
body.is-guest .page-content main { flex: 1; display: flex; flex-direction: column; overflow: visible; padding: 0; }

/* ── TOPBAR ─────────────────────────────────────── */
.topbar {
    flex-shrink: 0;
    height: 58px;
    display: flex;
    align-items: center;
    z-index: 100;
    border-bottom: 1px solid var(--bs-border-color-translucent, rgba(0,0,0,0.08));
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.topbar .container-fluid {
    padding: 0 18px;
    width: 100%;
    background: transparent !important;
}
.topbar .navbar-header { width: 100%; }

.topbar h4 {
    font-size: 13.5px;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
    max-width: 55vw;
}
.topbar h4 .text-muted { font-size: 12px; font-weight: 400; opacity: .65; }

/* ── Topbar brand (logo + product name) ── */
.topbar-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none !important;
    padding: 4px 6px 4px 2px;
    border-radius: 8px;
}
.topbar-brand img {
    height: 28px;
    width: auto;
    max-width: 110px;
    object-fit: contain;
    flex-shrink: 0;
}
.topbar-brand-text {
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: -0.2px;
    white-space: nowrap;
    color: #1f4a5e;
}
.topbar-brand-text span {
    font-weight: 500;
    color: #387490;
    opacity: .9;
}
[data-bs-theme="dark"] .topbar-brand-text { color: #cfe3ee; }
[data-bs-theme="dark"] .topbar-brand-text span { color: #7ab8d4; }

/* ── Co-brand logo (tenant / role=user accounts) ── */
.topbar-brand-sep { width: 1px; height: 24px; border-radius: 1px; }
[data-bs-theme="light"] .topbar-brand-sep { background: rgba(0,0,0,.10); }
[data-bs-theme="dark"]  .topbar-brand-sep { background: rgba(255,255,255,.09); }
.topbar-cobrand { display: flex; align-items: center; gap: 9px; text-decoration: none !important; }
/* Match the Riyada brand-logo treatment (plain, contained, transparent) — just larger */
.topbar-cobrand-logo {
    height: 40px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    flex-shrink: 0;
}
.topbar-cobrand-name { font-size: 14.5px; font-weight: 800; letter-spacing: -0.2px; white-space: nowrap; color: #1f4a5e; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
[data-bs-theme="dark"] .topbar-cobrand-name { color: #cfe3ee; }

.topbar-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s, color .15s;
}
.topbar-button:hover { background: rgba(128,128,128,.12); }
[data-bs-theme="dark"] .topbar-button:hover { background: rgba(255,255,255,.1); }

/* ── BELOW-TOPBAR ───────────────────────────────── */
.below-topbar {
    display: flex;
    flex-direction: row;
    flex: 1;
    overflow: hidden;
    min-height: 0;
    position: relative;
}

/* ── SIDEBAR ────────────────────────────────────── */
:root {
    --sb-w: 248px;
    --sb-w-sm: 68px;
    --sb-ease: cubic-bezier(.4,0,.2,1);
}

.wrapper .main-nav,
.main-nav {
    flex-shrink: 0;
    width: var(--sb-w);
    min-width: var(--sb-w);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid rgba(128,128,128,.1);
    transition: width .28s var(--sb-ease), min-width .28s var(--sb-ease), box-shadow .28s var(--sb-ease);
    z-index: 50;
    background: var(--bs-body-bg, #fff);
}

/* ── Override theme data-menu-size=hidden margin trick ─────
   config.js sets data-menu-size="hidden" on html when
   window.innerWidth ≤ 1140, which pushes .main-nav off-screen
   via margin-left. We use transform instead, so neutralise it. */
html[data-menu-size=hidden] .main-nav,
html[data-menu-size=hidden].sidebar-enable .main-nav { margin-left: 0 !important; }

/* ── Pinned (in-flow, full width) ──────────────── */
body.sidebar-pinned .main-nav { position: relative; }

/* ── Unpinned (fixed, collapsed — hover to expand) */
body:not(.sidebar-pinned) .main-nav {
    position: fixed;
    top: 58px; left: 0; bottom: 0;
    width: var(--sb-w-sm);
    min-width: var(--sb-w-sm);
    z-index: 1020;
    transition-delay: .06s;
}
body:not(.sidebar-pinned) .main-nav:hover {
    width: var(--sb-w);
    min-width: var(--sb-w);
    box-shadow: 4px 0 28px rgba(0,0,0,.08);
    transition-delay: 0s;
}
html[data-bs-theme="dark"] body:not(.sidebar-pinned) .main-nav:hover {
    box-shadow: 4px 0 28px rgba(0,0,0,.32);
}

/* Unpinned: offset page content for collapsed sidebar */
body:not(.sidebar-pinned) .page-content { margin-left: var(--sb-w-sm); }

/* ── LOGO BOX ──────────────────────────────────── */
.main-nav .logo-box {
    flex-shrink: 0;
    height: 58px;
    min-height: 58px;
    padding: 0 14px;
    border-bottom: 1px solid rgba(128,128,128,.1);
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    white-space: nowrap;
}
.main-nav .logo-box img { max-height: 28px; width: auto; flex-shrink: 0; }
.main-nav .logo-box img.logo-sm { display: none; }
.main-nav .logo-box img.logo-lg { max-width: 120px; }

body:not(.sidebar-pinned) .main-nav .logo-lg { display: none !important; }
body:not(.sidebar-pinned) .main-nav .logo-sm { display: block !important; }
body:not(.sidebar-pinned) .main-nav:hover .logo-lg { display: block !important; }
body:not(.sidebar-pinned) .main-nav:hover .logo-sm { display: none !important; }

/* ── Pin button ────────────────────────────────── */
.sidebar-pin-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 6px;
    border: none; background: transparent;
    color: var(--bs-secondary-color, #6c757d);
    cursor: pointer; flex-shrink: 0; font-size: 18px;
    transition: background .15s, color .15s, transform .3s var(--sb-ease);
    margin-left: auto;
}
.sidebar-pin-btn:hover { background: rgba(128,128,128,.12); color: var(--bs-body-color); }
body.sidebar-pinned .sidebar-pin-btn { transform: rotate(45deg); }
body:not(.sidebar-pinned) .sidebar-pin-btn { opacity: 0; pointer-events: none; transition: opacity .2s, background .15s, color .15s, transform .3s var(--sb-ease); }
body:not(.sidebar-pinned) .main-nav:hover .sidebar-pin-btn { opacity: 1; pointer-events: auto; }

/* ── SCROLL AREA ───────────────────────────────── */
/* (logo-box removed — menu starts at the top with breathing room) */
.main-nav .sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 0 8px;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}
.main-nav .sidebar-scroll:hover { scrollbar-color: rgba(128,128,128,.18) transparent; }
.main-nav .sidebar-scroll::-webkit-scrollbar { width: 3px; }
.main-nav .sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
.main-nav .sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(128,128,128,.18); border-radius: 3px; }

/* ── NAV ITEMS ─────────────────────────────────── */
.navbar-nav { list-style: none; margin: 0; padding: 0; }
.nav-item    { margin: 1px 8px; }

.nav-section {
    font-size: 9px; font-weight: 800;
    text-transform: uppercase; letter-spacing: .1em;
    color: var(--bs-secondary-color, #6c757d);
    opacity: .55; padding: 14px 18px 5px;
    list-style: none; white-space: nowrap; overflow: hidden;
    transition: opacity .22s var(--sb-ease), max-height .22s var(--sb-ease), padding .22s var(--sb-ease);
}

.nav-text {
    flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
    transition: opacity .2s var(--sb-ease), max-width .2s var(--sb-ease);
}
.nav-arrow {
    flex-shrink: 0; font-size: 14px;
    transition: transform .2s ease, opacity .2s var(--sb-ease), max-width .2s var(--sb-ease);
}

/* Unpinned collapsed: hide text / arrows / sections */
body:not(.sidebar-pinned) .nav-text,
body:not(.sidebar-pinned) .nav-arrow { opacity: 0; max-width: 0; overflow: hidden; }
body:not(.sidebar-pinned) .nav-section { opacity: 0; max-height: 0; padding: 0; }

/* Unpinned hovered: reveal */
body:not(.sidebar-pinned) .main-nav:hover .nav-text  { opacity: 1; max-width: 200px; }
body:not(.sidebar-pinned) .main-nav:hover .nav-arrow { opacity: 1; max-width: 20px; }
body:not(.sidebar-pinned) .main-nav:hover .nav-section { opacity: .55; max-height: 40px; padding: 14px 18px 5px; }

/* ── NAV LINK ──────────────────────────────────── */
.main-nav .nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 11px; border-radius: 8px;
    font-size: 13px; font-weight: 500;
    color: var(--bs-secondary-color, #6c757d);
    text-decoration: none;
    transition: background .15s, color .15s;
    white-space: nowrap;
    position: relative;
}
.main-nav .nav-link:hover  { background: rgba(91,156,246,.09); color: #5b9cf6; }
.main-nav .nav-link.active { background: rgba(91,156,246,.13); color: #5b9cf6; font-weight: 600; }
.main-nav .nav-link.active::before {
    content: ''; position: absolute; left: -8px; top: 50%;
    transform: translateY(-50%); width: 3px; height: 18px;
    background: #5b9cf6; border-radius: 0 3px 3px 0;
}
[data-bs-theme="light"] .main-nav .nav-link:hover  { background: rgba(37,99,235,.08); color: #2563eb; }
[data-bs-theme="light"] .main-nav .nav-link.active { background: rgba(37,99,235,.11); color: #2563eb; }
[data-bs-theme="light"] .main-nav .nav-link.active::before { background: #2563eb; }

.main-nav .nav-icon {
    font-size: 18px; flex-shrink: 0;
    display: flex; align-items: center;
    width: 22px; justify-content: center;
    opacity: .8;
}
.main-nav .nav-link.active .nav-icon,
.main-nav .nav-link:hover  .nav-icon { opacity: 1; }

/* Collapsed: center icons, hide active bar */
body:not(.sidebar-pinned) .nav-item   { margin: 1px 4px; }
body:not(.sidebar-pinned) .nav-link   { padding: 9px; justify-content: center; }
body:not(.sidebar-pinned) .nav-link.active::before { display: none; }
/* Hovered: restore spacing */
body:not(.sidebar-pinned) .main-nav:hover .nav-item { margin: 1px 8px; }
body:not(.sidebar-pinned) .main-nav:hover .nav-link { padding: 8px 11px; justify-content: flex-start; }
body:not(.sidebar-pinned) .main-nav:hover .nav-link.active::before { display: block; }

/* ── PAGE CONTENT ───────────────────────────────── */
body.is-auth .page-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    transition: margin-left .28s var(--sb-ease);
}
body.is-auth .page-content > main {
    flex: 1 0 auto;
    width: 100%;
}
.page-content .container-fluid { background: transparent !important; }

/* ── FOOTER ─────────────────────────────────────── */
footer.footer {
    flex-shrink: 0; padding: 8px 18px;
    font-size: 11px; color: var(--bs-secondary-color, #6c757d);
    opacity: .6; border-top: 1px solid rgba(128,128,128,.08);
}

/* ── MOBILE OVERLAY ─────────────────────────────── */
.nav-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.45); z-index: 199;
    backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.nav-overlay.show { display: block; }

/* ── MOBILE BREAKPOINT ──────────────────────────── */
@media (max-width: 768px) {
    body.is-auth .below-topbar { overflow: visible; }
    body.is-auth .page-content { overflow-y: auto; margin-left: 0 !important; }
    body.is-auth .page-content > main { overflow: visible; }

    .main-nav {
        position: fixed !important;
        top: 58px; left: 0; bottom: 0;
        z-index: 1020 !important;          /* above theme topbar (1000) */
        width: var(--sb-w) !important;
        min-width: var(--sb-w) !important;
        /* Neutralise the theme's margin-based hide (data-menu-size=hidden) */
        margin-left: 0 !important;
        /* Use transform to hide/show instead */
        transform: translateX(-110%);
        overflow: hidden !important;
        transition: transform .24s var(--sb-ease) !important;
        display: flex !important;
        flex-direction: column !important;
    }
    .main-nav.open {
        transform: translateX(0) !important;
        margin-left: 0 !important;
        box-shadow: 6px 0 28px rgba(0,0,0,.28) !important;
    }
    /* Neutralise theme data-menu-size=hidden margin rule at all widths ≤ 1140px */
    html[data-menu-size=hidden] .main-nav {
        margin-left: 0 !important;
    }
    /* Always show full sidebar on mobile regardless of pin state */
    body:not(.sidebar-pinned) .nav-text    { opacity: 1; max-width: 200px; }
    body:not(.sidebar-pinned) .nav-arrow   { opacity: 1; max-width: 20px; }
    body:not(.sidebar-pinned) .nav-section { opacity: .55; max-height: none; padding: 14px 18px 5px; }
    body:not(.sidebar-pinned) .nav-item    { margin: 1px 8px; }
    body:not(.sidebar-pinned) .nav-link    { padding: 8px 11px; justify-content: flex-start; }
    body:not(.sidebar-pinned) .nav-link.active::before { display: block; }
    body:not(.sidebar-pinned) .main-nav .logo-lg { display: block !important; }
    body:not(.sidebar-pinned) .main-nav .logo-sm { display: none !important; }
    body:not(.sidebar-pinned) .sidebar-pin-btn { opacity: 1; pointer-events: auto; }

    .topbar h4 .text-muted { display: none; }
    .topbar h4 { font-size: 12.5px; max-width: 42vw; }
}

/* ── LIGHT MODE ─────────────────────────────────── */
html[data-bs-theme="light"] {
    --bs-main-nav-bg:               #ffffff;
    --bs-main-nav-item-color:       #536080;
    --bs-main-nav-item-hover-color: #2563eb;
    --bs-main-nav-border-color:     #e2e8f2;
}
/* The vendor theme reserves padding-left for its own fixed sidenav.
   Our layout puts the topbar ABOVE the sidebar (full width), so that
   padding just leaves a ~280px dead gap before the hamburger. */
.topbar { padding-left: 0 !important; }
.button-sm-hover { display: none !important; }


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SECTION 3 — GLOBAL COMPONENTS
   Cards · Tables · Forms · Buttons · Alerts · Badges …
   These apply to ALL pages (not scoped to #adminApp).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ── Cards ──────────────────────────────────────── */
.card {
    border-radius: 10px !important;
    border: 1px solid var(--bs-border-color-translucent, rgba(0,0,0,0.07)) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03) !important;
    transition: box-shadow .2s ease;
    overflow: hidden;
}
.card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.04) !important;
}
.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--bs-border-color-translucent, rgba(0,0,0,0.07)) !important;
    font-weight: 600;
    font-size: 13.5px;
    padding: 0.85rem 1.1rem;
}
.card-body  { padding: 1.1rem; }
.card-footer {
    background: transparent !important;
    border-top: 1px solid var(--bs-border-color-translucent, rgba(0,0,0,0.07)) !important;
    padding: 0.7rem 1.1rem;
}

/* Stat / KPI cards keep their subtle bg */
.card.bg-primary-subtle,
.card.bg-success-subtle,
.card.bg-warning-subtle,
.card.bg-danger-subtle,
.card.bg-info-subtle { border: none !important; }

/* ── Tables ─────────────────────────────────────── */
.table { font-size: 13.5px; margin-bottom: 0; }
.table thead th {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    border-top: none;
    white-space: nowrap;
}
.table td, .table th { vertical-align: middle; }
.table-hover > tbody > tr:hover > * {
    --bs-table-bg-state: rgba(13,110,253,0.035);
}
/* Borderless table inside a card */
.card > .card-body.p-0 > .table:first-child thead th:first-child { padding-left: 1.1rem; }
.card > .card-body.p-0 > .table:first-child thead th:last-child  { padding-right: 1.1rem; }
.card > .card-body.p-0 > .table tbody td:first-child { padding-left: 1.1rem; }
.card > .card-body.p-0 > .table tbody td:last-child  { padding-right: 1.1rem; }

/* ── Forms ──────────────────────────────────────── */
.form-control,
.form-select {
    font-size: 13.5px;
    border-radius: 8px;
    border-color: var(--bs-border-color, rgba(0,0,0,0.15));
    transition: border-color .15s ease, box-shadow .15s ease;
    min-height: 38px;
}
.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary, #0d6efd);
    box-shadow: 0 0 0 3px rgba(13,110,253,0.12);
}
.form-control-sm, .form-select-sm { min-height: 32px; font-size: 12.5px; border-radius: 6px; }
.form-control-lg, .form-select-lg { min-height: 46px; font-size: 15px;   border-radius: 10px; }

.form-label  { font-size: 13px; font-weight: 500; margin-bottom: 0.35rem; }
.form-text   { font-size: 11.5px; }
.form-check-input { cursor: pointer; }
.form-check-label { font-size: 13.5px; cursor: pointer; }

/* Input group */
.input-group > .form-control:not(:last-child),
.input-group > .form-select:not(:last-child)  { border-right: 0; border-radius: 8px 0 0 8px; }
.input-group > .form-control:not(:first-child),
.input-group > .form-select:not(:first-child) { border-left: 0; border-radius: 0 8px 8px 0; }
.input-group > .btn:only-child { border-radius: 8px; }
.input-group > .btn:first-child { border-radius: 8px 0 0 8px; }
.input-group > .btn:last-child  { border-radius: 0 8px 8px 0; }

/* ── Buttons ────────────────────────────────────── */
.btn { border-radius: 8px; font-size: 13.5px; font-weight: 500; transition: all .15s ease; }
.btn-sm  { border-radius: 6px !important; font-size: 12.5px; padding: 0.3rem 0.75rem; }
.btn-lg  { border-radius: 10px !important; font-size: 15px; }
.btn-xs  { border-radius: 5px !important; font-size: 11.5px; padding: 0.2rem 0.55rem; }
.btn-icon { width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.btn-icon.btn-sm { width: 30px; height: 30px; }

/* ── Badges ─────────────────────────────────────── */
.badge { font-weight: 600; border-radius: 6px; font-size: 11.5px; }
.badge.rounded-pill { border-radius: 20px; }

/* ── Alerts ─────────────────────────────────────── */
.alert {
    border-radius: 10px;
    border-width: 0;
    border-left: 4px solid transparent;
    font-size: 13.5px;
    font-weight: 500;
}
.alert-success { border-left-color: #16a34a; }
.alert-danger  { border-left-color: #dc2626; }
.alert-warning { border-left-color: #d97706; }
.alert-info    { border-left-color: #2563eb; }
.alert-primary { border-left-color: #0d6efd; }

/* ── Reusable validation error summary (@include('partials.errors')) ── */
.ryd-val-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 1rem 1.125rem;
    border-radius: 10px;
    border: 1.5px solid #fca5a5;
    border-left: 4px solid #ef4444;
    background: #fff1f2;
    color: #7f1d1d;
    margin-bottom: 1.25rem;
    font-size: .875rem;
    font-weight: 500;
}
.ryd-val-alert__icon   { flex-shrink:0; font-size:18px; margin-top:1px; color:#ef4444; }
.ryd-val-alert__body   { flex:1; min-width:0; }
.ryd-val-alert__title  { font-weight:700; margin:0 0 .375rem; font-size:.875rem; color:#991b1b; }
.ryd-val-alert__list   { margin:0; padding-inline-start:1.25rem; }
.ryd-val-alert__list li { margin-bottom:.2rem; line-height:1.4; }
.ryd-val-alert__close  {
    background:none; border:none; cursor:pointer; padding:2px; color:#ef4444;
    opacity:.7; flex-shrink:0; line-height:1; margin-top:1px;
}
.ryd-val-alert__close:hover { opacity:1; }

[data-bs-theme="dark"] .ryd-val-alert {
    background: rgba(239,68,68,.1);
    border-color: rgba(239,68,68,.3);
    border-left-color: #f87171;
    color: #fca5a5;
}
[data-bs-theme="dark"] .ryd-val-alert__title  { color: #fca5a5; }
[data-bs-theme="dark"] .ryd-val-alert__icon   { color: #f87171; }
[data-bs-theme="dark"] .ryd-val-alert__close  { color: #f87171; }

/* ── Modals ─────────────────────────────────────── */
.modal-content { border-radius: 12px; border: none; box-shadow: 0 16px 48px rgba(0,0,0,0.18); }
.modal-header  { padding: 1.1rem 1.25rem; border-bottom-color: rgba(0,0,0,0.06); }
.modal-body    { padding: 1.25rem; }
.modal-footer  { padding: 0.85rem 1.25rem; border-top-color: rgba(0,0,0,0.06); }

/* ── Dropdowns ──────────────────────────────────── */
.dropdown-menu {
    border-radius: 10px;
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1), 0 2px 6px rgba(0,0,0,0.06);
    padding: 0.35rem 0;
    font-size: 13.5px;
}
.dropdown-item {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    margin: 1px 4px;
    width: auto;
    transition: background .12s, color .12s;
}
.dropdown-item:hover, .dropdown-item:focus { background: rgba(13,110,253,0.07); }
.dropdown-item.text-danger:hover { background: rgba(220,53,69,0.07); }
.dropdown-divider { margin: 0.3rem 0; border-color: rgba(0,0,0,0.06); }
.dropdown-header  { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 0.5rem 1rem 0.3rem; opacity: .6; }

/* ── Offcanvas ──────────────────────────────────── */
.offcanvas { border-radius: 0; }

/* ── Pagination ─────────────────────────────────── */
.pagination .page-link   { border-radius: 6px !important; margin: 0 2px; font-size: 12.5px; border-color: transparent; }
.pagination .page-item.active .page-link { background-color: var(--bs-primary, #0d6efd); border-color: var(--bs-primary, #0d6efd); }
.pagination .page-item.disabled .page-link { opacity: .4; }

/* ── List groups ────────────────────────────────── */
.list-group-item { font-size: 13.5px; }
.list-group-item:first-child { border-top-left-radius: 10px; border-top-right-radius: 10px; }
.list-group-item:last-child  { border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; }

/* ── Section divider (used in HR views) ─────────── */
.section-divider {
    display: flex; align-items: center; gap: 10px;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .5px;
    margin: 0.75rem 0;
}
.section-divider::before,
.section-divider::after {
    content: ''; flex: 1;
    border-top: 1px solid var(--bs-border-color, rgba(0,0,0,.1));
}

/* ── Nav pills / tabs ───────────────────────────── */
.nav-pills .nav-link { border-radius: 8px; font-size: 13.5px; }
.nav-tabs  .nav-link { font-size: 13.5px; }

/* ── Toast ──────────────────────────────────────── */
.toast { border-radius: 10px; font-size: 13.5px; }

/* ── Breadcrumb ─────────────────────────────────── */
.breadcrumb { font-size: 12.5px; margin-bottom: 0; }

/* ── Scrollbars (global) ────────────────────────── */
::-webkit-scrollbar          { width: 6px; height: 6px; }
::-webkit-scrollbar-track    { background: transparent; }
::-webkit-scrollbar-thumb    { background: rgba(0,0,0,0.12); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.22); }
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); }
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SECTION 4 — RESPONSIVE OVERRIDES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 991px) {
    .card-body { padding: 0.9rem; }
    .card-header { padding: 0.75rem 0.9rem; }
}

@media (max-width: 768px) {
    .card  { border-radius: 8px !important; }
    .modal-content { border-radius: 10px; }
    .btn   { font-size: 13px; }
    .table { font-size: 13px; }
    .table thead { display: none; }   /* stacked tables on mobile */
    .table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0.75rem;
        border-top: none;
    }
    .table td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        opacity: .55;
        margin-right: 0.5rem;
        white-space: nowrap;
    }
    /* Opt-out: tables that shouldn't stack use .table-no-stack */
    .table-no-stack thead { display: table-header-group; }
    .table-no-stack td    { display: table-cell; }
    .table-no-stack td::before { display: none; }
}

@media (max-width: 576px) {
    .container-fluid { padding-left: 0.875rem; padding-right: 0.875rem; }
    .modal-dialog { margin: 0.375rem auto; max-width: calc(100vw - 0.75rem); }
    .modal-dialog.modal-sm { max-width: min(95vw, 380px); }
}

/* ─── Admin dashboard (#adminApp) responsive ──────── */

/* ≤ 900 px — summary strip starts crowding; allow horizontal scroll */
@media (max-width: 900px) {
    #adminApp .adm-summary { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    #adminApp .adm-sum-card { min-width: 130px; }
    /* Filter bar: unwrap avg-chips to prevent overflow */
    #adminApp .adm-avg-chips { margin-left: 0; }
    #adminApp .adm-filterbar .adm-shown { margin-left: 0; }
}

/* ≤ 992 px — single-column table grid: allow horizontal scroll so tables stay usable */
@media (max-width: 992px) {
    #adminApp .adm-board-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    /* Ensure tables have a minimum readable width so they scroll rather than crush */
    #adminApp .adm-grid-2 .adm-table {
        min-width: 480px;
    }
}

/* ≤ 768 px — tablet / large phone */
@media (max-width: 768px) {
    /* Topbar: wrap to second line if items don't fit; hide labels; shrink inputs */
    #adminApp .adm-topbar {
        flex-wrap: wrap;
        height: auto;
        min-height: 52px;
        padding: 6px 14px;
        row-gap: 4px;
    }
    #adminApp .adm-dlbl   { display: none; }
    #adminApp .adm-dinput { width: 110px; font-size: 10.5px; padding: 3px 7px; }

    /* Summary strip */
    #adminApp .adm-sum-card { padding: 9px 14px; }
    #adminApp .adm-sum-val  { font-size: 20px; }

    /* Board: smaller min-width so 2 columns survive longer */
    #adminApp .adm-board { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

/* ≤ 576 px — phones */
@media (max-width: 576px) {
    /* Topbar: hide date section entirely; keep Apply + Fullscreen */
    #adminApp .adm-sep    { display: none; }
    #adminApp .adm-sub    { display: none; }
    #adminApp .adm-dlbl   { display: none; }
    #adminApp .adm-dinput { display: none; }
    /* Hide "Today" button, keep Apply */
    #adminApp .adm-topbar .adm-btn:not(.adm-btn-primary):not(.adm-btn-fullscreen) { display: none; }

    /* Summary strip: horizontally scrollable row */
    #adminApp .adm-summary  { flex-wrap: nowrap; }
    #adminApp .adm-sum-card { flex: 0 0 auto; min-width: 115px; padding: 8px 12px; }
    #adminApp .adm-sum-val  { font-size: 18px; letter-spacing: -.5px; }
    #adminApp .adm-sum-lbl  { font-size: 9px; }

    /* Board: single column */
    #adminApp .adm-board { grid-template-columns: 1fr; }

    /* Filter bar: hide chip section to prevent overflow */
    #adminApp .adm-avg-chips { display: none; }
    #adminApp .adm-shown     { margin-left: 0; }

    /* Tables: reduce minimum width for very small phones; scroll on x-axis */
    #adminApp .adm-grid-2 .adm-table {
        min-width: 360px;
    }
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SECTION 5 — LIGHT MODE & DARK MODE SHELL COLORS
   Explicit surface colors so the layout looks professional in
   both themes regardless of what app.min.css provides.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ════════════════════════════════════════
   LIGHT MODE
════════════════════════════════════════ */
[data-bs-theme="light"] body {
    background-color: #f1f5f9;
    color: #1e293b;
}

/* Topbar */
[data-bs-theme="light"] .topbar {
    background-color: #ffffff;
    border-bottom-color: rgba(0,0,0,0.07);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    color: #1e293b;
}

/* Sidebar */
[data-bs-theme="light"] .main-nav {
    background-color: #ffffff;
    border-right-color: rgba(0,0,0,0.08);
}
[data-bs-theme="light"] .main-nav .logo-box {
    border-bottom-color: rgba(0,0,0,0.07);
    background-color: #ffffff;
}

/* Nav items */
[data-bs-theme="light"] .nav-section {
    color: #94a3b8;
}
[data-bs-theme="light"] .nav-link {
    color: #475569;
}
[data-bs-theme="light"] .nav-link:hover {
    background: rgba(37,99,235,0.07);
    color: #2563eb;
}
[data-bs-theme="light"] .nav-link.active {
    background: rgba(37,99,235,0.10);
    color: #2563eb;
    font-weight: 600;
}
[data-bs-theme="light"] .nav-link.active::before { background: #2563eb; }
[data-bs-theme="light"] .nav-icon { opacity: .75; }
[data-bs-theme="light"] .nav-link:hover .nav-icon,
[data-bs-theme="light"] .nav-link.active .nav-icon { opacity: 1; }

/* Pin button */
[data-bs-theme="light"] .sidebar-pin-btn {
    color: #94a3b8;
}
[data-bs-theme="light"] .sidebar-pin-btn:hover {
    color: #2563eb;
    background: rgba(37,99,235,0.07);
}

/* Flyout in light mode */
[data-bs-theme="light"] .nav-flyout {
    background-color: #ffffff;
    border-color: rgba(0,0,0,0.1);
    box-shadow: 4px 8px 28px rgba(0,0,0,0.12);
}
[data-bs-theme="light"] .nav-flyout-title { color: #94a3b8; border-bottom-color: rgba(0,0,0,0.06); }
[data-bs-theme="light"] .nav-flyout-item  { color: #475569; }
[data-bs-theme="light"] .nav-flyout-item:hover  { background: rgba(37,99,235,0.06); color: #2563eb; }
[data-bs-theme="light"] .nav-flyout-item.active { background: rgba(37,99,235,0.09); color: #2563eb; }

/* Page content background */
[data-bs-theme="light"] .page-content {
    background-color: #f1f5f9;
}

/* Cards in light mode */
[data-bs-theme="light"] .card {
    background-color: #ffffff !important;
    border-color: rgba(0,0,0,0.07) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03) !important;
}
[data-bs-theme="light"] .card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04) !important;
}
[data-bs-theme="light"] .card-header {
    background-color: #f8fafc !important;
    border-bottom-color: rgba(0,0,0,0.07) !important;
    color: #1e293b;
}
[data-bs-theme="light"] .card-footer {
    background-color: #f8fafc !important;
    border-top-color: rgba(0,0,0,0.07) !important;
}

/* Tables in light mode */
[data-bs-theme="light"] .table-light th,
[data-bs-theme="light"] .table thead th {
    background-color: #f8fafc;
    color: #475569;
}
[data-bs-theme="light"] .table-hover > tbody > tr:hover > * {
    --bs-table-bg-state: rgba(37,99,235,0.04);
}

/* Alerts in light mode */
[data-bs-theme="light"] .alert-success { background-color: #f0fdf4; color: #14532d; border-left-color: #16a34a; }
[data-bs-theme="light"] .alert-danger  { background-color: #fff1f2; color: #7f1d1d; border-left-color: #dc2626; font-weight:500; }
[data-bs-theme="light"] .alert-warning { background-color: #fffbeb; color: #78350f; border-left-color: #d97706; }
[data-bs-theme="light"] .alert-info    { background-color: #eff6ff; color: #1e3a8a; border-left-color: #2563eb; }

/* Dropdown in light mode */
[data-bs-theme="light"] .dropdown-menu {
    background-color: #ffffff;
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1), 0 2px 6px rgba(0,0,0,0.06);
}
[data-bs-theme="light"] .dropdown-item       { color: #334155; }
[data-bs-theme="light"] .dropdown-item:hover { background: rgba(37,99,235,0.07); color: #1e3a8a; }
[data-bs-theme="light"] .dropdown-divider    { border-color: rgba(0,0,0,0.07); }

/* Forms in light mode */
[data-bs-theme="light"] .form-control,
[data-bs-theme="light"] .form-select {
    background-color: #ffffff;
    border-color: #d1d5db;
    color: #1e293b;
}
[data-bs-theme="light"] .form-control:focus,
[data-bs-theme="light"] .form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
[data-bs-theme="light"] .form-control::placeholder { color: #94a3b8; }

/* Topbar button hover in light mode */
[data-bs-theme="light"] .topbar-button { color: #334155; }
[data-bs-theme="light"] .topbar-button:hover { background: rgba(0,0,0,0.06); color: #1e293b; }

/* Modals in light mode */
[data-bs-theme="light"] .modal-content { background-color: #ffffff; color: #1e293b; }
[data-bs-theme="light"] .modal-header  { border-bottom-color: rgba(0,0,0,0.07); }
[data-bs-theme="light"] .modal-footer  { border-top-color: rgba(0,0,0,0.07); }

/* Scrollbars in light mode */
[data-bs-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.14); }
[data-bs-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.24); }
[data-bs-theme="light"] .main-nav .scrollbar::-webkit-scrollbar-thumb,
[data-bs-theme="light"] .main-nav .sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); }

/* Nav overlay */
[data-bs-theme="light"] .nav-overlay { background: rgba(0,0,0,0.35); }

/* Section divider */
[data-bs-theme="light"] .section-divider { color: #94a3b8; }
[data-bs-theme="light"] .section-divider::before,
[data-bs-theme="light"] .section-divider::after { border-top-color: rgba(0,0,0,0.1); }

/* ════════════════════════════════════════
   DARK MODE — reinforce key surfaces
   (the theme handles most of this, but we
    ensure our overrides are consistently dark)
════════════════════════════════════════ */
[data-bs-theme="dark"] body {
    background-color: #0f172a;
}
[data-bs-theme="dark"] .topbar {
    border-bottom-color: rgba(255,255,255,0.06);
    box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
[data-bs-theme="dark"] .page-content {
    background-color: #0f172a;
}
[data-bs-theme="dark"] .card {
    border-color: rgba(255,255,255,0.07) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.14) !important;
}
[data-bs-theme="dark"] .card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.3), 0 1px 3px rgba(0,0,0,0.2) !important;
}
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.12);
}
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    border-color: #5b9cf6;
    box-shadow: 0 0 0 3px rgba(91,156,246,0.18);
}
[data-bs-theme="dark"] .topbar-button { color: rgba(255,255,255,0.75); }
[data-bs-theme="dark"] .topbar-button:hover { background: rgba(255,255,255,0.09); color: #fff; }
[data-bs-theme="dark"] .dropdown-item:hover { background: rgba(91,156,246,0.1); }
[data-bs-theme="dark"] .table-hover > tbody > tr:hover > * {
    --bs-table-bg-state: rgba(91,156,246,0.05);
}
/* Modals in dark mode — match the light-mode rule above so the modal
   doesn't end up transparent (Bootstrap's default --bs-modal-bg fallback
   doesn't always paint an opaque dark colour). */
[data-bs-theme="dark"] .modal-content {
    background-color: #0F172A;
    color: #e2e8f0;
    border-color: rgba(255,255,255,0.08);
    box-shadow: 0 20px 60px rgba(0,0,0,0.55);
}
[data-bs-theme="dark"] .modal-header { border-bottom-color: rgba(255,255,255,0.08); }
[data-bs-theme="dark"] .modal-footer { border-top-color: rgba(255,255,255,0.08); }
[data-bs-theme="dark"] .modal-title  { color: #e2e8f0; }
[data-bs-theme="dark"] .btn-close    { filter: invert(1) grayscale(100%) brightness(2); }


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SECTION 6 — ANIMATIONS & MICRO-INTERACTIONS
   All prefixed "ryd-" — safe to add on any page.
   Rule: #adminApp is EXCLUDED (Vue handles its own rendering).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ── Keyframes ─────────────────────────────────── */
@keyframes ryd-fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes ryd-fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes ryd-slideInRight {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes ryd-shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position:  600px 0; }
}
@keyframes ryd-toast-bar {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}
@keyframes ryd-toast-out {
    from { opacity: 1; transform: translateX(0);    max-height: 100px; margin-bottom: 0; padding: .875rem 1rem; }
    to   { opacity: 0; transform: translateX(20px); max-height: 0;     margin-bottom: -8px; padding: 0; }
}

/* ── Page entrance (non-adminApp pages) ─────────── */
body.is-auth .page-content > main {
    animation: ryd-fadeIn .2s ease-out both;
}

/* ── Bootstrap .card entrance + hover lift ──────── */
/* Excluded inside #adminApp (Vue-driven, has its own transitions) */
.page-content .card:not(#adminApp .card) {
    animation: ryd-fadeInUp .22s ease-out both;
    transition: box-shadow .2s ease, transform .18s ease !important;
}
.page-content .card:not(#adminApp .card):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0,0,0,.09), 0 2px 6px rgba(0,0,0,.05) !important;
}
[data-bs-theme="dark"] .page-content .card:not(#adminApp .card):hover {
    box-shadow: 0 8px 22px rgba(0,0,0,.32), 0 2px 6px rgba(0,0,0,.18) !important;
}

/* ── HR card entrance + hover ────────────────────── */
.hr-card {
    animation: ryd-fadeInUp .22s ease-out both;
    transition: box-shadow .2s ease, transform .18s ease, border-color .15s ease !important;
}
.hr-card:hover {
    box-shadow: 0 8px 28px rgba(79,70,229,.10), 0 2px 8px rgba(0,0,0,.06) !important;
    transform: translateY(-2px);
    border-color: #C7D2FE !important;
}
[data-bs-theme="dark"] .hr-card:hover {
    box-shadow: 0 8px 28px rgba(99,102,241,.20), 0 2px 8px rgba(0,0,0,.22) !important;
    border-color: rgba(99,102,241,.30) !important;
}

/* HR card stagger so page feels alive */
.hr-card:nth-child(1) { animation-delay: .04s; }
.hr-card:nth-child(2) { animation-delay: .09s; }
.hr-card:nth-child(3) { animation-delay: .14s; }
.hr-card:nth-child(4) { animation-delay: .19s; }
.hr-card:nth-child(5) { animation-delay: .24s; }

/* ── HR table: sticky header + row stagger ──────── */
.hr-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #F8FAFC;
    box-shadow: 0 1px 0 #E2E8F0;
}
[data-bs-theme="dark"] .hr-table thead th {
    background: #1e2535;
    box-shadow: 0 1px 0 rgba(255,255,255,.08);
}
.hr-table tbody tr {
    animation: ryd-fadeIn .16s ease-out both;
}
.hr-table tbody tr:nth-child(1)  { animation-delay: .03s; }
.hr-table tbody tr:nth-child(2)  { animation-delay: .06s; }
.hr-table tbody tr:nth-child(3)  { animation-delay: .09s; }
.hr-table tbody tr:nth-child(4)  { animation-delay: .12s; }
.hr-table tbody tr:nth-child(5)  { animation-delay: .15s; }
.hr-table tbody tr:nth-child(6)  { animation-delay: .18s; }
.hr-table tbody tr:nth-child(7)  { animation-delay: .21s; }
.hr-table tbody tr:nth-child(8)  { animation-delay: .24s; }
.hr-table tbody tr:nth-child(9)  { animation-delay: .27s; }
.hr-table tbody tr:nth-child(10) { animation-delay: .30s; }

/* ── HR button lift + press ─────────────────────── */
.hr-btn {
    transition: background .15s, opacity .15s, transform .12s, box-shadow .15s !important;
}
.hr-btn:not(:disabled):hover    { transform: translateY(-1px); }
.hr-btn:not(:disabled):active   { transform: scale(.97) translateY(0); }
.hr-btn-primary:not(:disabled):hover  { box-shadow: 0 4px 14px rgba(79,70,229,.30); }
.hr-btn-danger:not(:disabled):hover   { box-shadow: 0 4px 14px rgba(220,38,38,.22); }
.hr-btn-secondary:not(:disabled):hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); }

/* ── Global Bootstrap .btn micro-interactions ────── */
.btn:not(:disabled)               { transition: all .15s ease !important; }
.btn:not(:disabled):active         { transform: scale(.97) !important; }
.btn-primary:not(:disabled):hover  { transform: translateY(-1px) !important; box-shadow: 0 4px 14px rgba(13,110,253,.28) !important; }
.btn-success:not(:disabled):hover  { transform: translateY(-1px) !important; box-shadow: 0 4px 14px rgba(25,135,84,.26) !important; }
.btn-danger:not(:disabled):hover   { transform: translateY(-1px) !important; box-shadow: 0 4px 14px rgba(220,53,69,.26) !important; }

/* ── Sidebar nav icon scale on hover ────────────── */
.main-nav .nav-icon {
    transition: opacity .15s, transform .18s var(--sb-ease) !important;
}
.main-nav .nav-link:hover .nav-icon  { transform: scale(1.15); }
.main-nav .nav-link.active .nav-icon { transform: scale(1.08); }

/* ── Topbar button press ────────────────────────── */
.topbar-button { transition: background .15s, color .15s, transform .1s !important; }
.topbar-button:active { transform: scale(.90); }

/* ── Skeleton shimmer (use class="ryd-skeleton") ── */
.ryd-skeleton {
    display: inline-block;
    background: linear-gradient(90deg,
        rgba(0,0,0,.05) 25%,
        rgba(0,0,0,.10) 50%,
        rgba(0,0,0,.05) 75%);
    background-size: 1200px 100%;
    animation: ryd-shimmer 1.5s infinite linear;
    border-radius: 5px;
}
[data-bs-theme="dark"] .ryd-skeleton {
    background: linear-gradient(90deg,
        rgba(255,255,255,.05) 25%,
        rgba(255,255,255,.09) 50%,
        rgba(255,255,255,.05) 75%);
    background-size: 1200px 100%;
}

/* ── Toast notification container ───────────────── */
#rydToastContainer {
    position: fixed;
    top: 72px; right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 360px;
    width: calc(100vw - 32px);
    pointer-events: none;
}
.ryd-toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: .875rem 1rem;
    border-radius: 12px;
    font-size: .875rem;
    font-weight: 500;
    line-height: 1.45;
    pointer-events: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,.14), 0 2px 6px rgba(0,0,0,.07);
    animation: ryd-slideInRight .22s ease-out both;
    position: relative;
    overflow: hidden;
    cursor: default;
}
/* Progress bar at bottom — drains over toast lifetime */
.ryd-toast::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    transform-origin: left;
    animation: ryd-toast-bar var(--ryd-toast-dur, 4s) linear forwards;
}
.ryd-toast.ryd-toast-hiding {
    animation: ryd-toast-out .22s ease-in both;
}

/* Toast variants */
.ryd-toast-success { background:#ECFDF5; color:#065F46; border:1px solid #A7F3D0; }
.ryd-toast-success::after { background:#10B981; }
.ryd-toast-error   { background:#FEF2F2; color:#991B1B; border:1px solid #FECACA; }
.ryd-toast-error::after   { background:#EF4444; }
.ryd-toast-warning { background:#FFFBEB; color:#92400E; border:1px solid #FDE68A; }
.ryd-toast-warning::after { background:#F59E0B; }
.ryd-toast-info    { background:#EEF2FF; color:#3730A3; border:1px solid #C7D2FE; }
.ryd-toast-info::after    { background:#6366F1; }

/* Dark mode toast variants */
[data-bs-theme="dark"] .ryd-toast-success { background:rgba(16,185,129,.12); color:#6EE7B7; border-color:rgba(16,185,129,.25); }
[data-bs-theme="dark"] .ryd-toast-error   { background:rgba(239,68,68,.12);  color:#FCA5A5; border-color:rgba(239,68,68,.25); }
[data-bs-theme="dark"] .ryd-toast-warning { background:rgba(245,158,11,.12); color:#FCD34D; border-color:rgba(245,158,11,.25); }
[data-bs-theme="dark"] .ryd-toast-info    { background:rgba(99,102,241,.12); color:#A5B4FC; border-color:rgba(99,102,241,.25); }

.ryd-toast-icon  { font-size:18px; flex-shrink:0; margin-top:1px; }
.ryd-toast-msg   { flex:1; min-width:0; }
.ryd-toast-close {
    flex-shrink: 0;
    margin-left: auto;
    padding: 0 0 0 6px;
    cursor: pointer;
    opacity: .45;
    font-size: 14px;
    line-height: 1;
    background: none;
    border: none;
    color: inherit;
    transition: opacity .12s;
}
.ryd-toast-close:hover { opacity: 1; }

/* ── Avis page wrapper (used on all /avis/* pages) ── */
.avis-page-wrap { padding: 1.25rem 1.5rem; }
@media (max-width: 768px) { .avis-page-wrap { padding: 0.875rem; } }
@media (max-width: 576px) { .avis-page-wrap { padding: 0.625rem; } }

/* ── Avis components — dark mode ─────────────────── */
[data-bs-theme="dark"] .avis-card {
    background: #1e2337;
    border-color: rgba(255,255,255,.08);
}
[data-bs-theme="dark"] .avis-card-header {
    border-bottom-color: rgba(255,255,255,.08);
    color: #e2e8f0;
}
[data-bs-theme="dark"] .avis-table thead tr { background: rgba(255,255,255,.03); }
[data-bs-theme="dark"] .avis-table th {
    color: #94a3b8;
    border-bottom-color: rgba(255,255,255,.08);
    background: #1e2337;
    box-shadow: 0 1px 0 rgba(255,255,255,.08);
}
[data-bs-theme="dark"] .avis-table td { color: #e2e8f0; border-bottom-color: rgba(255,255,255,.06); }
[data-bs-theme="dark"] .avis-table tbody tr:hover { background: rgba(255,255,255,.03); }

/* Buttons */
[data-bs-theme="dark"] .avis-btn-outline {
    background: rgba(255,255,255,.06);
    color: #cbd5e1;
    border-color: rgba(255,255,255,.12);
}
[data-bs-theme="dark"] .avis-btn-outline:hover { background: rgba(255,255,255,.10); color: #e2e8f0; }
[data-bs-theme="dark"] .avis-btn-danger {
    background: rgba(239,68,68,.15);
    color: #f87171;
    border-color: rgba(239,68,68,.25);
}
[data-bs-theme="dark"] .avis-btn-danger:hover { background: rgba(239,68,68,.25); }

/* Form elements */
[data-bs-theme="dark"] .avis-input {
    background: rgba(255,255,255,.05);
    border-color: rgba(255,255,255,.12);
    color: #e2e8f0;
}
[data-bs-theme="dark"] .avis-input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129,140,248,.15);
}
[data-bs-theme="dark"] select.avis-input { color: #e2e8f0; }
[data-bs-theme="dark"] textarea.avis-input { color: #e2e8f0; }
[data-bs-theme="dark"] .avis-label { color: #94a3b8; }
[data-bs-theme="dark"] .avis-label .req { color: #f87171; }
[data-bs-theme="dark"] .avis-help  { color: #64748b; }
[data-bs-theme="dark"] .avis-error { color: #f87171; }

/* code snippets inside avis cards */
[data-bs-theme="dark"] .avis-card code {
    background: rgba(255,255,255,.08) !important;
    color: #a5b4fc !important;
}

/* Inline-colour overrides — catch hardcoded light colours */
[data-bs-theme="dark"] .avis-page-wrap h1[style*="color:#0F172A"]      { color: #e2e8f0 !important; }
[data-bs-theme="dark"] .avis-page-wrap [style*="color:#64748B"]         { color: #64748b !important; }
[data-bs-theme="dark"] .avis-page-wrap [style*="color:#475569"]         { color: #94a3b8 !important; }
[data-bs-theme="dark"] .avis-page-wrap [style*="color:#1E293B"]         { color: #e2e8f0 !important; }
[data-bs-theme="dark"] .avis-page-wrap [style*="color:#94A3B8"]         { color: #475569 !important; }
[data-bs-theme="dark"] .avis-page-wrap [style*="background:#F1F5F9"]    { background: rgba(255,255,255,.08) !important; color: #a5b4fc !important; }

/* avis-badge inline-style variants → dark equivalents */
[data-bs-theme="dark"] .avis-badge[style*="#FEF3C7"] { background: rgba(234,179,8,.15)   !important; color: #facc15 !important; }
[data-bs-theme="dark"] .avis-badge[style*="#EFF6FF"] { background: rgba(59,130,246,.15)  !important; color: #60a5fa !important; }
[data-bs-theme="dark"] .avis-badge[style*="#EDE9FE"] { background: rgba(139,92,246,.15)  !important; color: #a78bfa !important; }
[data-bs-theme="dark"] .avis-badge[style*="#D1FAE5"] { background: rgba(16,185,129,.15)  !important; color: #6ee7b7 !important; }
[data-bs-theme="dark"] .avis-badge[style*="#F1F5F9"] { background: rgba(255,255,255,.08) !important; color: #94a3b8 !important; }

/* Breadcrumb links in dark mode */
[data-bs-theme="dark"] .avis-page-wrap a[style*="color:#6366F1"] { color: #a5b4fc !important; }
[data-bs-theme="dark"] .avis-page-wrap a[style*="color:#3B82F6"] { color: #93c5fd !important; }

/* ── list-container: simple page wrapper used by users / projects / assignments ── */
.list-container {
    padding: 1.25rem 1.5rem;
}
@media (max-width: 768px) {
    .list-container { padding: 0.875rem 1rem; }
}
@media (max-width: 576px) {
    .list-container { padding: 0.625rem 0.75rem; }
}

/* ── Smooth scroll globally ─────────────────────── */
html { scroll-behavior: smooth; }


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SECTION 7 — SIDEBAR REDESIGN  (Minimal Glass)
   Overrides Section 2 + Section 5 sidebar rules.
   All selectors are at least as specific as the ones they replace.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ── 7.1  Sidebar shell ──────────────────────────── */
.wrapper .main-nav,
.main-nav {
    border-right: none !important;
    transition: width .28s var(--sb-ease), min-width .28s var(--sb-ease), box-shadow .28s var(--sb-ease) !important;
}

/* Dark — deep translucent panel */
[data-bs-theme="dark"] .main-nav {
    background: rgba(11,15,25,.94) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 1px 0 0 rgba(255,255,255,.05), 6px 0 28px rgba(0,0,0,.35) !important;
}

/* Light — frosted glass */
[data-bs-theme="light"] .main-nav {
    background: rgba(255,255,255,.88) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 1px 0 0 rgba(0,0,0,.06), 6px 0 24px rgba(0,0,0,.07) !important;
}

/* Unpinned hover — keep the same glass look, just expand width */
body:not(.sidebar-pinned) .main-nav:hover {
    box-shadow: 4px 0 32px rgba(0,0,0,.18) !important;
}
[data-bs-theme="dark"] body:not(.sidebar-pinned) .main-nav:hover {
    box-shadow: 4px 0 32px rgba(0,0,0,.45) !important;
}

/* ── 7.2  Logo box separator ─────────────────────── */
.main-nav .logo-box {
    border-bottom: 1px solid rgba(128,128,128,.08) !important;
    background: transparent !important;
}
[data-bs-theme="dark"] .main-nav .logo-box  { border-bottom-color: rgba(255,255,255,.05) !important; }
[data-bs-theme="light"] .main-nav .logo-box { border-bottom-color: rgba(0,0,0,.06) !important; }

/* ── 7.3  Section labels ─────────────────────────── */
.nav-section {
    padding: 14px 16px 5px !important;
    font-size: 9.5px !important;
    letter-spacing: .13em !important;
    font-weight: 700 !important;
}
[data-bs-theme="dark"] .nav-section  { color: rgba(255,255,255,.22) !important; opacity: 1 !important; }
[data-bs-theme="light"] .nav-section { color: rgba(0,0,0,.30) !important;        opacity: 1 !important; }

/* ── 7.4  Nav item spacing ───────────────────────── */
.nav-item { margin: 2px 7px !important; }
body:not(.sidebar-pinned) .nav-item               { margin: 2px 5px !important; }
body:not(.sidebar-pinned) .main-nav:hover .nav-item { margin: 2px 7px !important; }
@media (max-width: 768px) {
    body:not(.sidebar-pinned) .nav-item { margin: 2px 7px !important; }
}

/* ── 7.5  Nav link base ──────────────────────────── */
.main-nav .nav-link {
    border-radius: 10px !important;
    border: 1px solid transparent !important;
    padding: 7px 10px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    gap: 9px !important;
    transition: background .16s ease, color .16s ease, border-color .16s ease, box-shadow .18s ease !important;
    /* Remove old left-bar pseudo */
}
.main-nav .nav-link::before { display: none !important; }

/* Dark base colour */
[data-bs-theme="dark"] .main-nav .nav-link { color: rgba(255,255,255,.45) !important; }

/* Light base colour */
[data-bs-theme="light"] .main-nav .nav-link { color: #64748b !important; }

/* ── 7.6  Hover ──────────────────────────────────── */
[data-bs-theme="dark"] .main-nav .nav-link:hover {
    background: rgba(255,255,255,.06) !important;
    border-color: rgba(255,255,255,.07) !important;
    color: rgba(255,255,255,.82) !important;
}
[data-bs-theme="light"] .main-nav .nav-link:hover {
    background: rgba(0,0,0,.045) !important;
    border-color: rgba(0,0,0,.05) !important;
    color: #1e293b !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.05) !important;
}

/* ── 7.7  Active — glass pill ────────────────────── */
[data-bs-theme="dark"] .main-nav .nav-link.active {
    background: rgba(255,255,255,.09) !important;
    border-color: rgba(255,255,255,.10) !important;
    color: #f1f5f9 !important;
    font-weight: 600 !important;
    box-shadow:
        0 2px 10px rgba(0,0,0,.25),
        inset 0 1px 0 rgba(255,255,255,.07),
        inset 0 -1px 0 rgba(0,0,0,.10) !important;
}
[data-bs-theme="light"] .main-nav .nav-link.active {
    background: #ffffff !important;
    border-color: rgba(0,0,0,.07) !important;
    color: #1e293b !important;
    font-weight: 600 !important;
    box-shadow:
        0 2px 10px rgba(0,0,0,.09),
        0 1px 2px rgba(0,0,0,.05),
        inset 0 1px 0 rgba(255,255,255,.9) !important;
}

/* ── 7.8  Nav icon — clean, no chip ─────────────── */
.main-nav .nav-icon {
    font-size: 18px !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: .55 !important;
    transition: opacity .16s ease, transform .18s var(--sb-ease) !important;
}
.main-nav .nav-link:hover .nav-icon  { opacity: .80 !important; transform: scale(1.12) !important; }
.main-nav .nav-link.active .nav-icon { opacity: 1 !important;   transform: scale(1.08) !important; }

/* Light mode icon colours already fine at those opacities */
[data-bs-theme="light"] .main-nav .nav-icon { opacity: .60 !important; }
[data-bs-theme="light"] .main-nav .nav-link:hover .nav-icon  { opacity: .85 !important; }
[data-bs-theme="light"] .main-nav .nav-link.active .nav-icon { opacity: 1 !important; }

/* ── 7.9  Dropdown arrow ─────────────────────────── */
.nav-arrow {
    opacity: .40 !important;
    font-size: 13px !important;
    transition: transform .22s cubic-bezier(.4,0,.2,1), opacity .16s, max-width .2s var(--sb-ease) !important;
}
.main-nav .nav-link:hover .nav-arrow,
.main-nav .nav-link.active .nav-arrow { opacity: .75 !important; }
.has-dropdown.open > .nav-dropdown-toggle .nav-arrow { transform: rotate(-180deg) !important; }

/* ── 7.10 Child links ────────────────────────────── */
.nav-child-link {
    font-size: 12.5px !important;
    padding-left: 2.5rem !important;
    border-radius: 9px !important;
    color: rgba(255,255,255,.38) !important;
}
[data-bs-theme="light"] .nav-child-link { color: #94a3b8 !important; }

[data-bs-theme="dark"]  .nav-child-link:hover { color: rgba(255,255,255,.75) !important; }
[data-bs-theme="light"] .nav-child-link:hover { color: #1e293b !important; }

[data-bs-theme="dark"] .main-nav .nav-child-link.active {
    background: rgba(255,255,255,.08) !important;
    border-color: rgba(255,255,255,.09) !important;
    color: #f1f5f9 !important;
    box-shadow: 0 1px 6px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.06) !important;
}
[data-bs-theme="light"] .main-nav .nav-child-link.active {
    background: #ffffff !important;
    border-color: rgba(0,0,0,.06) !important;
    color: #1e293b !important;
    box-shadow: 0 1px 6px rgba(0,0,0,.07) !important;
}

/* ── 7.11 Collapsed state — icon-only ───────────── */
body:not(.sidebar-pinned) .main-nav .nav-link {
    padding: 8px !important;
    border-radius: 10px !important;
    justify-content: center !important;
}
body:not(.sidebar-pinned) .main-nav:hover .nav-link {
    padding: 7px 10px !important;
    justify-content: flex-start !important;
}
/* Mobile always full */
@media (max-width: 768px) {
    body:not(.sidebar-pinned) .main-nav .nav-link {
        padding: 7px 10px !important;
        justify-content: flex-start !important;
    }
}

/* ── 7.12 Pin button ─────────────────────────────── */
.sidebar-pin-btn {
    width: 26px !important;
    height: 26px !important;
    border-radius: 7px !important;
    font-size: 16px !important;
    transition: background .15s, color .15s, transform .3s var(--sb-ease), box-shadow .15s !important;
}
[data-bs-theme="dark"] .sidebar-pin-btn { color: rgba(255,255,255,.35) !important; }
[data-bs-theme="dark"] .sidebar-pin-btn:hover {
    background: rgba(255,255,255,.08) !important;
    color: rgba(255,255,255,.80) !important;
}
[data-bs-theme="light"] .sidebar-pin-btn:hover {
    background: rgba(0,0,0,.06) !important;
}
body.sidebar-pinned .sidebar-pin-btn {
    transform: rotate(45deg) !important;
}
[data-bs-theme="dark"]  body.sidebar-pinned .sidebar-pin-btn { color: rgba(255,255,255,.55) !important; }
[data-bs-theme="light"] body.sidebar-pinned .sidebar-pin-btn { color: #64748b !important; }

/* ── 7.13 Scroll area scrollbar — invisible ──────── */
.main-nav .sidebar-scroll {
    scrollbar-width: none !important;
}
.main-nav .sidebar-scroll::-webkit-scrollbar { width: 0 !important; }

/* ── 7.14 Mobile overlay — frosted glass tint ────── */
[data-bs-theme="dark"] .nav-overlay  { background: rgba(0,0,0,.55) !important; }
[data-bs-theme="light"] .nav-overlay { background: rgba(0,0,0,.30) !important; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SECTION 8 — TOPBAR REDESIGN  (Minimal Glass)
   Matches the sidebar glass treatment. Overrides Section 2 rules.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ── 8.1  Shell — glass panel ────────────────────── */
.topbar {
    position: relative;
    z-index: 1000;
    border-bottom: none !important;
    box-shadow: none !important;
}
.topbar::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0; height: 1px;
    pointer-events: none;
}
[data-bs-theme="dark"] .topbar {
    background: rgba(9,12,22,.93) !important;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
[data-bs-theme="dark"] .topbar::after {
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.06) 12%, rgba(255,255,255,.06) 88%, transparent 100%);
}
[data-bs-theme="light"] .topbar {
    background: rgba(255,255,255,.88) !important;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
[data-bs-theme="light"] .topbar::after {
    background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.07) 12%, rgba(0,0,0,.07) 88%, transparent 100%);
}

/* ── 8.2  Title + subtitle ───────────────────────── */
.topbar-title {
    display: block;
    font-size: 13.5px; font-weight: 700; letter-spacing: -.3px;
    line-height: 1.25; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; max-width: 50vw;
}
[data-bs-theme="dark"]  .topbar-title { color: rgba(255,255,255,.88); }
[data-bs-theme="light"] .topbar-title { color: #0f172a; }

.topbar-sub {
    display: block; font-size: 10.5px;
    line-height: 1.2; margin-top: 1px; white-space: nowrap;
}
[data-bs-theme="dark"]  .topbar-sub { color: rgba(255,255,255,.26); }
[data-bs-theme="light"] .topbar-sub { color: rgba(0,0,0,.30); }

@media (max-width: 768px) {
    .topbar-title { font-size: 12.5px; max-width: 38vw; }
}

/* ── 8.3  Live pulse dot ─────────────────────────── */
.topbar-live-dot {
    display: inline-flex; width: 7px; height: 7px;
    border-radius: 50%; background: #22c55e;
    flex-shrink: 0; position: relative;
}
.topbar-live-dot::before {
    content: ''; position: absolute; inset: -3px; border-radius: 50%;
    background: rgba(34,197,94,.35);
    animation: ryd-pulse-ring 2.4s ease-out infinite;
}

/* ── 8.4  Vertical divider ───────────────────────── */
.topbar-divider { width: 1px; height: 20px; flex-shrink: 0; border-radius: 1px; }
[data-bs-theme="dark"]  .topbar-divider { background: rgba(255,255,255,.09); }
[data-bs-theme="light"] .topbar-divider { background: rgba(0,0,0,.10); }

/* ── 8.5  Icon buttons ───────────────────────────── */
.topbar-button { border-radius: 9px !important; width: 36px !important; height: 36px !important; }
[data-bs-theme="dark"]  .topbar-button             { color: rgba(255,255,255,.50) !important; }
[data-bs-theme="dark"]  .topbar-button:hover        { background: rgba(255,255,255,.08) !important; color: rgba(255,255,255,.88) !important; }
[data-bs-theme="light"] .topbar-button             { color: #64748b !important; }
[data-bs-theme="light"] .topbar-button:hover        { background: rgba(0,0,0,.06) !important; color: #1e293b !important; }
#locale-toggle {
    font-size: 11.5px !important; font-weight: 700 !important; letter-spacing: .04em !important;
    border-radius: 9px !important; min-width: 36px !important;
    height: 36px !important; width: auto !important; padding: 0 9px !important;
}

/* ── 8.6  User pill button ───────────────────────── */
.topbar-user-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 3px 10px 3px 3px; border-radius: 40px;
    border: 1px solid transparent; cursor: pointer;
    background: transparent; text-decoration: none !important;
    font-family: inherit;
    transition: background .16s ease, border-color .16s ease, box-shadow .18s ease;
}
[data-bs-theme="dark"] .topbar-user-btn  { border-color: rgba(255,255,255,.09); background: rgba(255,255,255,.04); }
[data-bs-theme="dark"] .topbar-user-btn:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.14); box-shadow: 0 2px 14px rgba(0,0,0,.28); }
[data-bs-theme="light"] .topbar-user-btn { border-color: rgba(0,0,0,.07); background: rgba(0,0,0,.025); }
[data-bs-theme="light"] .topbar-user-btn:hover { background: rgba(0,0,0,.05); border-color: rgba(0,0,0,.10); box-shadow: 0 2px 10px rgba(0,0,0,.08); }

/* ── 8.7  Avatar gradient ring ───────────────────── */
.topbar-avatar {
    width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; padding: 2px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    display: flex; align-items: center; justify-content: center;
}
.topbar-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
[data-bs-theme="dark"]  .topbar-avatar img { border: 1.5px solid rgba(9,12,22,.85); }
[data-bs-theme="light"] .topbar-avatar img { border: 1.5px solid rgba(255,255,255,.95); }

/* ── 8.8  User name + role ───────────────────────── */
.topbar-user-info { flex-direction: column; align-items: flex-start; min-width: 0; max-width: 115px; gap: 1px; }
.topbar-user-name { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.topbar-user-role { display: block; font-size: 10.5px; line-height: 1.2; white-space: nowrap; text-transform: capitalize; }
.topbar-user-arrow { flex-shrink: 0; opacity: .45; }
[data-bs-theme="dark"]  .topbar-user-name { color: rgba(255,255,255,.82); }
[data-bs-theme="dark"]  .topbar-user-role { color: rgba(255,255,255,.30); }
[data-bs-theme="light"] .topbar-user-name { color: #0f172a; }
[data-bs-theme="light"] .topbar-user-role { color: #94a3b8; }

/* ── 8.9  Dropdown glass menu ────────────────────── */
[data-bs-theme="dark"] .topbar .dropdown-menu {
    background: rgba(12,16,28,.96); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-color: rgba(255,255,255,.09);
    box-shadow: 0 20px 52px rgba(0,0,0,.5), 0 4px 12px rgba(0,0,0,.3);
}
[data-bs-theme="dark"] .topbar .dropdown-item               { color: rgba(255,255,255,.60); }
[data-bs-theme="dark"] .topbar .dropdown-item:hover         { background: rgba(255,255,255,.07); color: rgba(255,255,255,.90); }
[data-bs-theme="dark"] .topbar .dropdown-item.text-danger   { color: #f87171 !important; }
[data-bs-theme="dark"] .topbar .dropdown-item.text-danger:hover { background: rgba(248,113,113,.10); }
[data-bs-theme="dark"] .topbar .dropdown-divider            { border-color: rgba(255,255,255,.07); }
[data-bs-theme="light"] .topbar .dropdown-menu {
    background: rgba(255,255,255,.96); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-color: rgba(0,0,0,.07);
    box-shadow: 0 16px 48px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);
}

/* ═══════════════════════════════════════════════════════════════════════
   GLOBAL PAGE FOOTER · Riyada attribution + Terms link
   ═══════════════════════════════════════════════════════════════════════ */
.ryd-footer {
    margin-top: 2.5rem;
    padding: 1.25rem 1.5rem 1.5rem;
    border-top: 1px solid #E2E8F0;
    background: transparent;
}
.ryd-footer-inner {
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    font-size: .78rem;
    color: #94A3B8;
}
.ryd-footer-brand { display: inline-flex; align-items: center; gap: .5rem; }
.ryd-footer-brand strong { color: #475569; font-weight: 700; }
.ryd-footer-links { display: inline-flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ryd-footer-links a {
    color: #64748B; text-decoration: none; font-weight: 600;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border-radius: 999px; transition: background .15s, color .15s;
}
.ryd-footer-links a:hover { color: #6366F1; background: rgba(99,102,241,.08); }
.ryd-footer-sep { color: #CBD5E1; }

[data-bs-theme="dark"] .ryd-footer { border-color: rgba(255,255,255,.06); }
[data-bs-theme="dark"] .ryd-footer-inner { color: #64748B; }
[data-bs-theme="dark"] .ryd-footer-brand strong { color: #CBD5E1; }
[data-bs-theme="dark"] .ryd-footer-links a { color: #94A3B8; }
[data-bs-theme="dark"] .ryd-footer-links a:hover { color: #A5B4FC; background: rgba(99,102,241,.15); }
[data-bs-theme="dark"] .ryd-footer-sep { color: #475569; }

/* ── HR modal two-column grid (responsive) ──────── */
.hr-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}
@media (max-width: 480px) {
    .hr-grid-2 { grid-template-columns: 1fr; }
}

/* ── HR index sidebar grid (table + quick-add panel) ── */
.hr-grid-sidebar {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.25rem;
    align-items: start;
}
@media (max-width: 900px) {
    .hr-grid-sidebar { grid-template-columns: 1fr; }
}

/* ── Respect prefers-reduced-motion ─────────────── */
@media (prefers-reduced-motion: reduce) {
    .hr-card, .page-content .card,
    .hr-table tbody tr,
    body.is-auth .page-content > main,
    .ryd-toast, .ryd-toast.ryd-toast-hiding,
    .ryd-skeleton { animation: none !important; }
    .hr-btn:not(:disabled):hover,
    .btn:not(:disabled):hover,
    .main-nav .nav-link:hover .nav-icon { transform: none !important; box-shadow: none !important; }
}
