@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ═══════════════════════════════════════════════════════════════════
   TASKFLOW NOVA v3  ·  Dual-Theme Design System — FIXED
   Font  : Plus Jakarta Sans (all weights)
   Themes: [data-theme="light"] · [data-theme="dark"]
═══════════════════════════════════════════════════════════════════ */

/* ── LIGHT THEME ─────────────────────────────────────────────── */

/* ══════════════════════════════════════════════════════
   UNIVERSAL TOKEN ALIASES
   Maps every legacy / alternate variable name used
   across ALL view files to the canonical design tokens.
══════════════════════════════════════════════════════ */
:root, [data-theme="light"] {
  /* Semantic color aliases */
  --emerald:         var(--em);
  --emerald-bg:      var(--em-bg);
  --amber:           var(--am);
  --amber-bg:        var(--am-bg);
  --rose:            var(--ro);
  --rose-bg:         var(--ro-bg);
  --violet:          var(--vi);
  --violet-bg:       var(--vi-bg);

  /* MD token aliases (views that were never migrated) */
  --md-surface:              var(--bg-2);
  --md-surface-1:            var(--surface-2);
  --md-surface-variant:      var(--surface-2);
  --md-on-surface:           var(--t1);
  --md-on-surface-variant:   var(--t3);
  --md-outline:              var(--border-2);
  --md-outline-variant:      var(--border);
  --md-primary:              var(--pr);
  --md-primary-container:    var(--pr-bg);
  --md-secondary:            var(--cy);
  --md-tertiary:             var(--vi);
  --md-error:                var(--ro);
  --md-error-container:      var(--ro-bg);
  --md-success:              var(--em);
  --md-success-container:    var(--em-bg);
  --md-shadow-1:             var(--shadow-sm);
  --md-shadow-2:             var(--shadow-md);
  --md-shadow-3:             var(--shadow-lg);
  --md-radius-full:          9999px;

  /* Text aliases */
  --text-1:  var(--t1);
  --text-2:  var(--t2);
  --text-3:  var(--t3);
  --text-4:  var(--t4);

  /* Primary/cyan/rose aliases */
  --primary:       var(--pr);
  --primary-l:     var(--prl);
  --primary-d:     var(--prd);
  --primary-bg:    var(--pr-bg);
  --primary-glow:  var(--pr-glow);
  --cyan:          var(--cy);
  --cyan-l:        #22d3ee;
  --cyan-bg:       var(--cy-bg);

  /* Radius / transition */
  --r-sm:       8px;
  --r-md:       12px;
  --r-lg:       16px;
  --r-xl:       20px;
  --transition: .15s ease;
}
[data-theme="dark"] {
  --emerald:     var(--em);
  --emerald-bg:  var(--em-bg);
  --amber:       var(--am);
  --amber-bg:    var(--am-bg);
  --rose:        var(--ro);
  --rose-bg:     var(--ro-bg);
  --violet:      var(--vi);
  --violet-bg:   var(--vi-bg);
  --md-surface:              var(--bg-3);
  --md-surface-1:            var(--surface-2);
  --md-surface-variant:      var(--surface-2);
  --md-on-surface:           var(--t1);
  --md-on-surface-variant:   var(--t3);
  --md-outline:              var(--border-2);
  --md-outline-variant:      var(--border);
  --md-primary:              var(--pr);
  --md-primary-container:    var(--pr-bg);
  --md-secondary:            var(--cy);
  --md-tertiary:             var(--vi);
  --md-error:                var(--ro);
  --md-error-container:      var(--ro-bg);
  --md-success:              var(--em);
  --md-success-container:    var(--em-bg);
  --md-shadow-1:             var(--shadow-sm);
  --md-shadow-2:             var(--shadow-md);
  --md-shadow-3:             var(--shadow-lg);
  --md-radius-full:          9999px;
  --text-1:  var(--t1);
  --text-2:  var(--t2);
  --text-3:  var(--t3);
  --text-4:  var(--t4);
  --primary:       var(--pr);
  --primary-l:     var(--prl);
  --primary-d:     var(--prd);
  --primary-bg:    var(--pr-bg);
  --primary-glow:  var(--pr-glow);
  --cyan:          var(--cy);
  --cyan-l:        var(--cy);
  --cyan-bg:       var(--cy-bg);
  --r-sm:       8px;
  --r-md:       12px;
  --r-lg:       16px;
  --r-xl:       20px;
  --transition: .15s ease;
}

/* ══════════════════════════════════════════════════════
   TYPOGRAPHY SCALE — single source across ALL pages
   Uses Plus Jakarta Sans across all headings and body text
══════════════════════════════════════════════════════ */
html, body { font-family: var(--font-body); font-size: 16px; }

/* Material Design 3-style type scale */
.headline-large  { font-family:var(--font-display); font-size:32px; font-weight:800; letter-spacing:-.3px; color:var(--t1); line-height:1.15; }
.headline-medium { font-family:var(--font-display); font-size:26px; font-weight:800; letter-spacing:-.2px; color:var(--t1); line-height:1.2; }
.headline-small  { font-family:var(--font-display); font-size:21px; font-weight:700; letter-spacing:-.1px; color:var(--t1); line-height:1.25; }
.title-large     { font-family:var(--font-display); font-size:18px; font-weight:700; color:var(--t1); }
.title-medium    { font-size:16px; font-weight:600; color:var(--t1); }
.title-small     { font-size:14px; font-weight:700; color:var(--t1); }
.label-large     { font-size:14px; font-weight:600; color:var(--t1); }
.label-medium    { font-size:13px; font-weight:600; color:var(--t2); }
.label-small     { font-size:11px; font-weight:600; color:var(--t3); text-transform:uppercase; letter-spacing:.6px; }
.body-large      { font-size:16px; color:var(--t2); line-height:1.6; }
.body-medium     { font-size:14px; color:var(--t2); line-height:1.6; }
.body-small      { font-size:12px; color:var(--t3); line-height:1.5; }

/* ══════════════════════════════════════════════════════
   PAGE HEADER — variants (.page-header__* classes)
══════════════════════════════════════════════════════ */
.page-header__eyebrow {
  font-size:10px; font-weight:700; text-transform:uppercase;
  letter-spacing:1.5px; color:var(--pr);
  display:flex; align-items:center; gap:8px; margin-bottom:6px;
}
.page-header__eyebrow::before {
  content:''; width:20px; height:2px; background:var(--pr); border-radius:2px;
}
.page-header__title {
  font-family:var(--font-display);
  font-size:26px; font-weight:800; letter-spacing:-.5px;
  color:var(--t1); line-height:1.2; margin-bottom:4px;
}
.page-header__subtitle { font-size:13px; color:var(--t3); margin-bottom:0; }
.page-header__actions  { display:flex; gap:10px; flex-wrap:wrap; align-items:center; flex-shrink:0; }

/* ══════════════════════════════════════════════════════
   ANIMATION CLASSES
══════════════════════════════════════════════════════ */
.animate-fade-up   { animation: fadeUp .4s ease both; }
.animate-fade-up:nth-child(1) { animation-delay:.04s; }
.animate-fade-up:nth-child(2) { animation-delay:.08s; }
.animate-fade-up:nth-child(3) { animation-delay:.12s; }
.animate-fade-up:nth-child(4) { animation-delay:.16s; }
.animate-fade-up:nth-child(5) { animation-delay:.20s; }
.animate-fade-up:nth-child(6) { animation-delay:.24s; }
.anim-fade-up { animation: fadeUp .4s ease both; }

/* ══════════════════════════════════════════════════════
   EXTENDED BADGE VARIANTS
══════════════════════════════════════════════════════ */
.badge--primary  { background:var(--pr-bg);  color:var(--pr);  border:1px solid rgba(99,102,241,.2); }
.badge--emerald  { background:var(--em-bg);  color:var(--em);  border:1px solid rgba(16,185,129,.2); }
.badge--amber    { background:var(--am-bg);  color:var(--am);  border:1px solid rgba(245,158,11,.2); }
.badge--cyan     { background:var(--cy-bg);  color:var(--cy);  border:1px solid rgba(34,211,238,.2); }
.badge--rose     { background:var(--ro-bg);  color:var(--ro);  border:1px solid rgba(244,63,94,.2); }
.badge--error    { background:var(--ro-bg);  color:var(--ro);  border:1px solid rgba(244,63,94,.2); }
.badge--ghost    { background:var(--surface-2); color:var(--t3); border:1px solid var(--border); }
.badge--warning  { background:var(--am-bg);  color:var(--am);  border:1px solid rgba(245,158,11,.2); }
.badge--info     { background:var(--cy-bg);  color:var(--cy);  border:1px solid rgba(34,211,238,.2); }
.badge--success  { background:var(--em-bg);  color:var(--em);  border:1px solid rgba(16,185,129,.2); }

/* ══════════════════════════════════════════════════════
   GRID HELPERS
══════════════════════════════════════════════════════ */
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.grid-3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:16px; }
.grid-4 { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
.grid-auto { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:16px; }

/* ══════════════════════════════════════════════════════
   CHIP / FILTER PILLS
══════════════════════════════════════════════════════ */
.chip {
  display:inline-flex; align-items:center; gap:5px;
  padding:5px 14px; border-radius:20px;
  font-size:12px; font-weight:600;
  background:var(--surface-2); color:var(--t3);
  border:1px solid var(--border); cursor:pointer;
  transition:all .15s;
}
.chip:hover   { background:var(--surface-3); color:var(--t2); border-color:var(--border-2); }
.chip.active  { background:var(--pr-bg); color:var(--pr); border-color:rgba(99,102,241,.25); }

/* ══════════════════════════════════════════════════════
   ATTENDANCE / CLOCK CARD
══════════════════════════════════════════════════════ */
.clock-card {
  background:var(--bg-2);
  border:1px solid var(--border);
  border-radius:20px; padding:32px;
  text-align:center;
  box-shadow:var(--shadow-sm);
}
[data-theme="dark"] .clock-card { background:var(--bg-3); }
.live-time {
  font-family:var(--font-display);
  font-size:clamp(40px,5vw,60px);
  font-weight:800; letter-spacing:-2px;
  color:var(--t1); line-height:1; margin-bottom:8px;
}

/* ══════════════════════════════════════════════════════
   DATA TABLE — universal .data-table / .log-table
══════════════════════════════════════════════════════ */
.log-table, .data-table {
  width:100%; border-collapse:collapse;
}
.log-table thead th, .data-table thead th {
  padding:10px 16px;
  font-size:10px; font-weight:700; text-transform:uppercase;
  letter-spacing:1px; color:var(--t3);
  text-align:left; border-bottom:1px solid var(--border);
  white-space:nowrap; background:var(--surface-2);
}
.log-table tbody tr, .data-table tbody tr {
  border-bottom:1px solid var(--border);
  transition:background .12s;
}
.log-table tbody tr:last-child, .data-table tbody tr:last-child { border-bottom:none; }
.log-table tbody tr:hover, .data-table tbody tr:hover { background:var(--surface-2); }
.log-table td, .data-table td {
  padding:13px 16px; font-size:13px; color:var(--t2); vertical-align:middle;
}
.log-table td strong, .data-table td strong { color:var(--t1); font-weight:600; }

/* ══════════════════════════════════════════════════════
   ACTIVITY LOG ROWS
══════════════════════════════════════════════════════ */
.activity-row {
  display:flex; align-items:flex-start; gap:14px;
  padding:14px 0; border-bottom:1px solid var(--border);
}
.activity-row:last-child { border-bottom:none; }
.activity-icon {
  width:34px; height:34px; border-radius:10px;
  display:grid; place-items:center; flex-shrink:0;
}
.activity-icon .material-icons-round { font-size:16px; }
.activity-title { font-size:13px; font-weight:600; color:var(--t1); }
.activity-meta  { font-size:11px; color:var(--t3); margin-top:2px; }
.activity-time  { font-size:10px; color:var(--t3); flex-shrink:0; margin-left:auto; white-space:nowrap; }

/* ══════════════════════════════════════════════════════
   LIGHT MODE — force correct text colors on all surfaces
   Fixes the "can't see text in light mode" issue
══════════════════════════════════════════════════════ */
[data-theme="light"] {
  color-scheme: light;
}
[data-theme="light"] body           { color: var(--t1); background: var(--bg); }
[data-theme="light"] .card          { background: #ffffff; color: var(--t1); }
[data-theme="light"] .stat-card     { background: #ffffff; color: var(--t1); }
[data-theme="light"] .card-title    { color: var(--t1); }
[data-theme="light"] .card-sub      { color: var(--t3); }
[data-theme="light"] .stat-value    { color: var(--t1); }
[data-theme="light"] .stat-label    { color: var(--t3); }
[data-theme="light"] .page-title    { color: #0f172a; }
[data-theme="light"] .page-sub      { color: #64748b; }
[data-theme="light"] .page-header__title    { color: #0f172a; }
[data-theme="light"] .page-header__subtitle { color: #64748b; }
[data-theme="light"] .t1, [data-theme="light"] .text-strong { color: #0f172a; }
[data-theme="light"] .t2 { color: #475569; }
[data-theme="light"] .t3, [data-theme="light"] .text-muted  { color: #94a3b8; }
[data-theme="light"] .topbar { background: rgba(244,246,251,.92); }
[data-theme="light"] .topbar__title { color: #0f172a; }
[data-theme="light"] .task-title    { color: #0f172a; }
[data-theme="light"] .k-card__title { color: #0f172a; }
[data-theme="light"] .um-name       { color: #0f172a; }
[data-theme="light"] .meeting-info__title { color: #0f172a; }
[data-theme="light"] table td, [data-theme="light"] .log-table td { color: #475569; }
[data-theme="light"] table th, [data-theme="light"] .log-table thead th { color: #94a3b8; }
[data-theme="light"] .form-control  { color: #0f172a; background: #f8fafc; border-color: rgba(0,0,0,.12); }
[data-theme="light"] .form-label    { color: #475569; }
[data-theme="light"] .nav-drawer__logo-text { color: #1e293b; -webkit-text-fill-color: #1e293b; background: none; }
[data-theme="light"] .badge--gh,
[data-theme="light"] .badge--ghost  { background: rgba(0,0,0,.05); color: #64748b; }
[data-theme="light"] .btn--ghost    { background: rgba(0,0,0,.04); color: #475569; border-color: rgba(0,0,0,.09); }
[data-theme="light"] .btn--ghost:hover { background: rgba(0,0,0,.07); color: #0f172a; }
[data-theme="light"] .legend-label  { color: #475569; }
[data-theme="light"] .legend-val    { color: #0f172a; }
[data-theme="light"] .stat-trend--neutral { background: rgba(0,0,0,.04); color: #94a3b8; }
[data-theme="light"] .k-col         { background: rgba(0,0,0,.03); border-color: rgba(0,0,0,.07); }
[data-theme="light"] .k-col__head   { color: #475569; }
[data-theme="light"] .k-card        { background: #ffffff; border-color: rgba(0,0,0,.08); }
[data-theme="light"] .backlog-row:hover { background: rgba(0,0,0,.02); }
[data-theme="light"] .sprint-card   { background: #ffffff; }
[data-theme="light"] .sprint-card__head { background: rgba(0,0,0,.02); }
[data-theme="light"] .notif-item__title { color: #0f172a; }
[data-theme="light"] code           { background: rgba(0,0,0,.05); color: var(--pr); }

/* ══════════════════════════════════════════════════════
   STICKY TOPBAR FIX
   main-content must be a flex column with overflow:auto
   so sticky inside it works on all pages
══════════════════════════════════════════════════════ */
.main-content {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;       /* this column scrolls */
  overflow-x: hidden;
  scroll-behavior: smooth;
}
.topbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  flex-shrink: 0;
}
.page-content {
  flex: 1;
  padding: 28px;
  max-width: 1480px;
}
/* Legacy class used by company.php layout */
.main-content > .page-content,
.main-content > main { flex: 1; }

:root, [data-theme="light"] {
  --bg:           #f4f6fb;
  --bg-2:         #ffffff;
  --bg-3:         #eef0f7;
  --surface:      rgba(255,255,255,0.9);
  --surface-2:    rgba(0,0,0,.04);
  --surface-3:    rgba(0,0,0,.08);
  --border:       rgba(0,0,0,.09);
  --border-2:     rgba(0,0,0,.14);

  --pr:           #5b5ef4;
  --prl:          #7c7ff7;
  --prd:          #4446cc;
  --pr-glow:      rgba(91,94,244,.22);
  --pr-bg:        rgba(91,94,244,.1);
  --pr-bg2:       rgba(91,94,244,.18);

  --cy:           #06b6d4;
  --cy-bg:        rgba(6,182,212,.1);
  --em:           #10b981;
  --em-bg:        rgba(16,185,129,.1);
  --am:           #f59e0b;
  --am-bg:        rgba(245,158,11,.1);
  --ro:           #ef4444;
  --ro-bg:        rgba(239,68,68,.1);
  --vi:           #8b5cf6;
  --vi-bg:        rgba(139,92,246,.1);
  --pk:           #ec4899;
  --pk-bg:        rgba(236,72,153,.1);

  --t1:           #0f172a;
  --t2:           #475569;
  --t3:           #94a3b8;
  --t4:           #cbd5e1;

  --shadow-sm:    0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:    0 4px 16px rgba(0,0,0,.09), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg:    0 12px 40px rgba(0,0,0,.11), 0 4px 12px rgba(0,0,0,.07);
  --shadow-xl:    0 24px 60px rgba(0,0,0,.14);

  /* Sidebar — LIGHT: white panel with subtle borders */
  --sidebar-bg:   #ffffff;
  --sidebar-t1:   #1e293b;
  --sidebar-t2:   #64748b;
  --sidebar-t3:   #94a3b8;
  --sidebar-bd:   rgba(0,0,0,.07);
  --sidebar-act:  rgba(91,94,244,.08);
  --sidebar-logo: #5b5ef4;

  /* MD token aliases — used by main.php inline styles & app.js */
  --md-surface:              var(--bg-2);
  --md-surface-1:            var(--surface-2);
  --md-surface-variant:      var(--surface-2);
  --md-on-surface:           var(--t1);
  --md-on-surface-variant:   var(--t3);
  --md-outline:              var(--border-2);
  --md-outline-variant:      var(--border);
  --md-primary:              var(--pr);
  --md-on-primary:           #ffffff;
  --md-error:                var(--ro);
  --md-success:              var(--em);
  --md-warning:              var(--am);
  --md-info:                 var(--cy);
  --md-shadow-3:             var(--shadow-lg);
  --md-radius-lg:            14px;
  --md-radius-md:            10px;

  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-heading: 'Plus Jakarta Sans', system-ui, sans-serif;

  /* Nav widths */
  --nav-width:          256px;
  --nav-collapsed-width: 64px;
}

/* ── DARK THEME ──────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:           #080b14;
  --bg-2:         #0e1120;
  --bg-3:         #131726;
  --surface:      rgba(255,255,255,.04);
  --surface-2:    rgba(255,255,255,.07);
  --surface-3:    rgba(255,255,255,.11);
  --border:       rgba(255,255,255,.08);
  --border-2:     rgba(255,255,255,.15);

  --pr:           #6366f1;
  --prl:          #818cf8;
  --prd:          #4f52d1;
  --pr-glow:      rgba(99,102,241,.35);
  --pr-bg:        rgba(99,102,241,.14);
  --pr-bg2:       rgba(99,102,241,.22);

  --cy:           #22d3ee;
  --cy-bg:        rgba(34,211,238,.12);
  --em:           #10b981;
  --em-bg:        rgba(16,185,129,.12);
  --am:           #f59e0b;
  --am-bg:        rgba(245,158,11,.12);
  --ro:           #f43f5e;
  --ro-bg:        rgba(244,63,94,.12);
  --vi:           #a78bfa;
  --vi-bg:        rgba(167,139,250,.12);
  --pk:           #f472b6;
  --pk-bg:        rgba(244,114,182,.12);

  --t1:           #f1f5f9;
  --t2:           #94a3b8;
  --t3:           #64748b;
  --t4:           #334155;

  --shadow-sm:    0 1px 3px rgba(0,0,0,.4);
  --shadow-md:    0 4px 20px rgba(0,0,0,.5);
  --shadow-lg:    0 12px 48px rgba(0,0,0,.6);
  --shadow-xl:    0 24px 80px rgba(0,0,0,.7);
  --sidebar-bg:   #0d0f1d;
  --sidebar-t1:   rgba(255,255,255,.9);
  --sidebar-t2:   rgba(255,255,255,.45);
  --sidebar-t3:   rgba(255,255,255,.25);
  --sidebar-bd:   rgba(255,255,255,.07);
  --sidebar-act:  rgba(99,102,241,.18);
  --sidebar-logo: #818cf8;

  --md-surface:              var(--bg-3);
  --md-surface-1:            var(--surface-2);
  --md-surface-variant:      var(--surface-2);
  --md-on-surface:           var(--t1);
  --md-on-surface-variant:   var(--t3);
  --md-outline:              var(--border-2);
  --md-outline-variant:      var(--border);
  --md-primary:              var(--pr);
  --md-on-primary:           #ffffff;
  --md-error:                var(--ro);
  --md-success:              var(--em);
  --md-warning:              var(--am);
  --md-info:                 var(--cy);
  --md-shadow-3:             var(--shadow-lg);
}

/* ── RESET ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--t1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .25s, color .25s;
}
a { color: var(--pr); text-decoration: none; transition: color .15s; }
a:hover { color: var(--prl); }
button, input, select, textarea { font-family: inherit; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

/* ══════════════════════════════════════════════════════
   APP SHELL — two-column: nav-drawer + main
══════════════════════════════════════════════════════ */
.app-layout, .app-shell {
  display: grid;
  grid-template-columns: var(--nav-width) 1fr;
  min-height: 100vh;
  height: 100vh;           /* full viewport height */
  overflow: hidden;        /* prevent double scrollbar */
  transition: grid-template-columns .25s ease;
}
.app-layout.sidebar-collapsed,
.app-shell.sidebar-collapsed {
  grid-template-columns: var(--nav-collapsed-width) 1fr !important;
}

/* ══════════════════════════════════════════════════════
   NAV DRAWER  (used by main.php — class=nav-drawer)
   Also supports legacy .sidebar class
══════════════════════════════════════════════════════ */
.nav-drawer, .sidebar {
  background: var(--sidebar-bg);
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--nav-width);
  display: flex; flex-direction: column;
  overflow-y: auto; overflow-x: hidden;
  z-index: 200;
  border-right: 1px solid var(--sidebar-bd);
  transition: width .25s ease, transform .25s ease;
}
.nav-drawer.collapsed, .sidebar.collapsed {
  width: var(--nav-collapsed-width);
}
.nav-drawer.collapsed .nav-label,
.nav-drawer.collapsed .nav-drawer__section-label,
.nav-drawer.collapsed .nav-user__info,
.nav-drawer.collapsed .nav-logo-text-wrap,
.sidebar.collapsed .nav-label {
  opacity: 0;
  pointer-events: none;
  width: 0;
  overflow: hidden;
}
.nav-drawer.collapsed .nav-item {
  justify-content: center;
  padding: 10px 0;
  margin: 0 8px;
  border-radius: 10px;
}
.nav-drawer.collapsed .nav-item .material-icons-round {
  margin: 0 auto;
}
.nav-drawer.collapsed .nav-item.active::before {
  display: none; /* hide the left indicator bar when collapsed */
}
.nav-drawer.collapsed .nav-group,
.nav-drawer.collapsed .nav-drawer__section {
  padding: 4px 0;
}
.nav-drawer.collapsed .nav-drawer__header {
  padding: 16px 8px;
  display: flex;
  justify-content: center;
}
.nav-drawer.collapsed .nav-drawer__logo {
  justify-content: center;
}
.nav-drawer.collapsed .nav-drawer__footer { padding: 12px 8px; }
.nav-drawer.collapsed .nav-user {
  justify-content: center;
  padding: 8px;
}
.nav-drawer.collapsed .nav-user__avatar { margin: 0; }

/* Nav Drawer Header */
.nav-drawer__header {
  padding: 13px 39px 4px;
  border-bottom: 1px solid var(--sidebar-bd);
  flex-shrink: 0;
}
.nav-drawer__logo {
  display: flex; align-items: center; gap: 12px;
}
.nav-drawer__logo-icon {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--pr), #a78bfa);
  display: grid; place-items: center;
  box-shadow: 0 4px 16px var(--pr-glow);
}
.nav-drawer__logo-icon .material-icons-round { font-size: 20px; color: #fff; }
.nav-logo-text-wrap { overflow: hidden; transition: all .25s; }
.nav-drawer__logo-text {
  font-family: var(--font-display); font-size: 17px; font-weight: 800;
  letter-spacing: -.3px; white-space: nowrap;
  background: linear-gradient(135deg, #fff 40%, var(--sidebar-logo));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-drawer__logo-sub {
  font-size: 10px; color: var(--sidebar-t3); white-space: nowrap;
  margin-top: 1px;
}

/* Nav Sections */
.nav-drawer__section, .nav-group {
  padding: 6px 10px;
  flex-shrink: 0;
}
.nav-drawer__section-label, .nav-group__label {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.4px; color: var(--sidebar-t3);
  padding: 10px 8px 5px;
  transition: all .2s;
  white-space: nowrap;
}

/* Nav Items */
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px;
  color: var(--sidebar-t2); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all .15s;
  margin-bottom: 1px; position: relative;
  text-decoration: none; white-space: nowrap;
  overflow: hidden;
}
.nav-item:hover { background: var(--sidebar-act); color: var(--sidebar-t1); }
.nav-item.active {
  background: var(--sidebar-act);
  color: var(--sidebar-t1);
  font-weight: 700;
}
[data-theme="dark"] .nav-item.active { color: #fff; }
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 18%; bottom: 18%;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--sidebar-logo);
  box-shadow: 0 0 8px var(--pr-glow);
}
.nav-item .material-icons-round { font-size: 18px; flex-shrink: 0; }
.nav-label { transition: all .2s; overflow: hidden; }

.nav-badge, .badge-count {
  margin-left: auto;
  background: var(--ro);
  color: #fff;
  font-size: 9px; font-weight: 700;
  padding: 2px 6px; border-radius: 10px;
  min-width: 18px; text-align: center;
  flex-shrink: 0;
}

/* Nav Footer */
.nav-drawer__footer, .sidebar-footer {
  margin-top: auto; padding: 14px 12px;
  border-top: 1px solid var(--sidebar-bd);
  flex-shrink: 0;
}
.nav-user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 10px; cursor: pointer;
  transition: background .15s;
}
.nav-user:hover { background: rgba(255,255,255,.07); }
.nav-user__avatar,
.sidebar-footer__av {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--pr), var(--cy));
  display: grid; place-items: center;
  font-weight: 700; font-size: 12px; color: #fff;
}
.nav-user__info { overflow: hidden; transition: all .25s; }
.nav-user__name, .sidebar-footer__name {
  font-size: 12px; font-weight: 600; color: var(--sidebar-t1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-user__role, .sidebar-footer__role {
  font-size: 10px; color: var(--sidebar-t3); white-space: nowrap;
}
.nav-user-more { margin-left: auto; flex-shrink: 0; }

/* Legacy sidebar classes */
.sidebar-logo { display: flex; align-items: center; gap: 12px; padding: 22px 18px 18px; border-bottom: 1px solid var(--sidebar-bd); }
.sidebar-logo__mark { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, var(--pr), #a78bfa); display: grid; place-items: center; flex-shrink: 0; box-shadow: 0 4px 16px var(--pr-glow); }
.sidebar-logo__mark .material-icons-round { font-size: 20px; color: #fff; }
.sidebar-logo__text { font-family: var(--font-display); font-size: 18px; font-weight: 800; letter-spacing: -.3px; background: linear-gradient(135deg, #fff 40%, var(--sidebar-logo)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.sidebar-workspace { padding: 14px 16px 10px; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.sidebar-workspace__av { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--pr), var(--cy)); display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #fff; flex-shrink: 0; }
.sidebar-workspace__name { font-size: 12px; font-weight: 600; color: var(--sidebar-t1); }
.sidebar-workspace__role { font-size: 10px; color: var(--sidebar-t3); }


/* ── SIDEBAR: light vs dark appearance ───────────────────────── */
[data-theme="light"] .nav-drawer,
[data-theme="light"] .sidebar {
  box-shadow: 2px 0 12px rgba(0,0,0,.06);
  border-right: 1px solid rgba(0,0,0,.08);
}
[data-theme="light"] .nav-item { color: var(--sidebar-t2); }
[data-theme="light"] .nav-item:hover { color: var(--sidebar-t1); background: rgba(91,94,244,.06); }
[data-theme="light"] .nav-item.active { color: var(--pr); background: var(--pr-bg); }
[data-theme="light"] .nav-item.active::before { background: var(--pr); box-shadow: 0 0 8px var(--pr-glow); }
[data-theme="light"] .nav-drawer__section-label,
[data-theme="light"] .nav-group__label { color: var(--t3); }
[data-theme="light"] .nav-badge, [data-theme="light"] .badge-count { background: var(--ro); }
[data-theme="light"] .nav-user:hover { background: rgba(0,0,0,.04); }
[data-theme="light"] .sidebar-footer,
[data-theme="light"] .nav-drawer__footer { border-top: 1px solid rgba(0,0,0,.07); }

/* ══════════════════════════════════════════════════════
   MAIN CONTENT AREA
══════════════════════════════════════════════════════ */
.main-content {
  grid-column: 2;
  display: flex; flex-direction: column;
  min-height: 100vh;
}

/* Page content inner */
.page-content { padding: 28px 28px; max-width: 1480px; }

/* ══════════════════════════════════════════════════════
   TOPBAR
══════════════════════════════════════════════════════ */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(244,246,251,.88);
  border-bottom: 1px solid var(--border);
  height: 62px;
  display: flex; align-items: center;
  padding: 0 20px; gap: 10px;
  flex-shrink: 0;
}
[data-theme="dark"] .topbar { background: rgba(8,11,20,.88); }

.topbar__title {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 700;
  color: var(--t1); letter-spacing: -.2px;
}

.topbar__search {
  display: flex; align-items: center;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 24px; overflow: hidden;
  height: 38px; min-width: 0;
  transition: all .15s;
}
.topbar__search:focus-within {
  border-color: var(--pr);
  box-shadow: 0 0 0 3px var(--pr-bg);
}
.topbar__search input {
  background: none; border: none; outline: none;
  color: var(--t1); font-size: 13px;
  padding: 0 12px; flex: 1; min-width: 120px;
}
.topbar__search input::placeholder { color: var(--t3); }
.search-btn {
  background: var(--pr); border: none;
  width: 38px; height: 38px; flex-shrink: 0;
  display: grid; place-items: center; cursor: pointer;
  color: #fff; transition: background .15s;
}
.search-btn:hover { background: var(--prl); }

.topbar__actions { display: flex; align-items: center; gap: 7px; }

/* Topbar buttons */
.topbar-circle-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border);
  display: grid; place-items: center; cursor: pointer;
  color: var(--t2); transition: all .15s; flex-shrink: 0;
}
.topbar-circle-btn:hover { background: var(--surface-3); color: var(--t1); }
.topbar-outline-btn {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  display: grid; place-items: center; cursor: pointer;
  color: var(--t2); transition: all .15s; flex-shrink: 0;
  position: relative;
}
.topbar-outline-btn:hover { background: var(--surface-3); color: var(--t1); border-color: var(--border-2); }

/* Clock toggle */
.clock-toggle {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 20px;
  border: 1.5px solid var(--border); background: var(--surface-2);
  cursor: pointer; font-size: 11px; font-weight: 700;
  color: var(--t2); transition: all .15s; white-space: nowrap;
}
.clock-toggle .circle {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--t3); transition: background .2s;
}
.clock-toggle.active {
  border-color: rgba(16,185,129,.4);
  background: var(--em-bg); color: var(--em);
}
.clock-toggle.active .circle {
  background: var(--em);
  box-shadow: 0 0 6px var(--em);
  animation: pulse 1.5s ease infinite;
}

/* Topbar profile */
.topbar-profile {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 8px 4px 4px; border-radius: 22px;
  background: var(--surface-2); border: 1px solid var(--border);
  cursor: pointer; transition: all .15s;
}
.topbar-profile:hover { background: var(--surface-3); border-color: var(--border-2); }
.topbar-profile__avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pr), var(--cy));
  display: grid; place-items: center;
  font-weight: 700; font-size: 11px; color: #fff; flex-shrink: 0;
}
.topbar-profile__name { font-size: 12px; font-weight: 600; color: var(--t1); white-space: nowrap; line-height: 1.2; }
.topbar-profile__role { font-size: 10px; color: var(--t3); white-space: nowrap; }

/* Theme + icon btns */
.theme-toggle, .icon-btn {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  display: grid; place-items: center; cursor: pointer;
  color: var(--t2); transition: all .15s; position: relative;
}
.theme-toggle:hover, .icon-btn:hover { background: var(--surface-3); color: var(--t1); }
.theme-toggle .material-icons-round, .icon-btn .material-icons-round { font-size: 18px; }
.icon-btn .dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ro); border: 2px solid var(--bg);
}

/* ── Notifications popup ──────────────────────────────────────── */
.notif-popup {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 340px; max-height: 440px; overflow-y: auto;
  background: var(--md-surface);
  border: 1px solid var(--md-outline-variant);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  z-index: 500;
  display: none;
  animation: dropIn .18s ease;
}
.notif-popup.open { display: block; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-8px) scale(.97); } }
.notif-popup__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 700; color: var(--t1);
}
.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .12s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: var(--pr-bg); }
.notif-item__title { font-size: 12px; font-weight: 600; color: var(--t1); }
.notif-item__msg { font-size: 11px; color: var(--t3); margin-top: 2px; }
.notif-item__time { font-size: 10px; color: var(--t3); margin-top: 4px; }

/* ══════════════════════════════════════════════════════
   PAGE HEADER
══════════════════════════════════════════════════════ */
.page-header {
  margin-bottom: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.page-eyebrow {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--pr);
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.page-eyebrow::before {
  content: ''; width: 20px; height: 2px;
  background: var(--pr); border-radius: 2px;
}
.page-title {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 800; letter-spacing: -.3px;
  color: var(--t1); line-height: 1.2;
}
.page-sub { color: var(--t2); font-size: 13px; margin-top: 5px; }
.page-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* ══════════════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════════════ */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, border-color .2s;
  position: relative; overflow: hidden;
}
[data-theme="dark"] .card { background: var(--bg-3); }
.card:hover { box-shadow: var(--shadow-md); border-color: var(--border-2); }
.card-sheen::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
}
.card-hd {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; padding: 20px 20px 0;
}
.card-title { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--t1); }
.card-sub { font-size: 11px; color: var(--t3); margin-top: 2px; }
.card-body { padding: 18px 20px; }

/* ══════════════════════════════════════════════════════
   STAT CARDS
══════════════════════════════════════════════════════ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 20px;
  position: relative; overflow: hidden;
  transition: all .2s; cursor: default;
}
[data-theme="dark"] .stat-card { background: var(--bg-3); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-glow {
  position: absolute; top: -30px; right: -30px;
  width: 110px; height: 110px; border-radius: 50%;
  filter: blur(38px); opacity: .5; pointer-events: none;
}
.stat-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 14px;
}
.stat-icon .material-icons-round { font-size: 21px; }
.stat-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--t3); margin-bottom: 5px;
}
.stat-value {
  font-family: var(--font-display); font-size: 32px; font-weight: 800;
  letter-spacing: -1.5px; line-height: 1; color: var(--t1); margin-bottom: 10px;
}
.stat-trend {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 20px;
}
.stat-trend--up   { background: var(--em-bg); color: var(--em); }
.stat-trend--down { background: var(--ro-bg); color: var(--ro); }
.stat-trend--neutral { background: var(--surface-2); color: var(--t3); }
.stat-trend .material-icons-round { font-size: 13px; }
.stat-sparkline {
  display: flex; align-items: flex-end; gap: 2px;
  height: 32px; margin-top: 10px;
}
.sparkbar {
  flex: 1; border-radius: 2px 2px 0 0; min-height: 3px;
  transition: opacity .15s; opacity: .55;
}
.sparkbar:last-child { opacity: 1; }

/* ══════════════════════════════════════════════════════
   GRIDS
══════════════════════════════════════════════════════ */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.g4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.g-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 16px; }
.col-7-5 { display: grid; grid-template-columns: 7fr 5fr; gap: 16px; }
.col-5-7 { display: grid; grid-template-columns: 5fr 7fr; gap: 16px; }

/* ══════════════════════════════════════════════════════
   PROGRESS
══════════════════════════════════════════════════════ */
.prog { height: 6px; background: var(--surface-2); border-radius: 10px; overflow: hidden; }
.prog-bar {
  height: 100%; border-radius: 10px;
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
  position: relative;
}
.prog-bar::after {
  content: ''; position: absolute; right: 0; top: 0; bottom: 0;
  width: 16px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.25));
}
.prog-bar--pr  { background: linear-gradient(90deg, var(--prd), var(--prl)); }
.prog-bar--cy  { background: linear-gradient(90deg, #0891b2, var(--cy)); }
.prog-bar--em  { background: linear-gradient(90deg, #059669, var(--em)); }
.prog-bar--am  { background: linear-gradient(90deg, #d97706, var(--am)); }
.prog-bar--ro  { background: linear-gradient(90deg, #dc2626, var(--ro)); }
.prog-bar--vi  { background: linear-gradient(90deg, #7c3aed, var(--vi)); }

/* ══════════════════════════════════════════════════════
   BADGES
══════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 600; letter-spacing: .2px; white-space: nowrap;
}
.badge .material-icons-round { font-size: 11px; }
.badge--pr  { background: var(--pr-bg);  color: var(--pr);  border: 1px solid rgba(99,102,241,.2); }
.badge--cy  { background: var(--cy-bg);  color: var(--cy);  border: 1px solid rgba(34,211,238,.2); }
.badge--em  { background: var(--em-bg);  color: var(--em);  border: 1px solid rgba(16,185,129,.2); }
.badge--am  { background: var(--am-bg);  color: var(--am);  border: 1px solid rgba(245,158,11,.2); }
.badge--ro  { background: var(--ro-bg);  color: var(--ro);  border: 1px solid rgba(244,63,94,.2); }
.badge--vi  { background: var(--vi-bg);  color: var(--vi);  border: 1px solid rgba(167,139,250,.2); }
.badge--gh  { background: var(--surface-2); color: var(--t2); border: 1px solid var(--border); }

/* ══════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 11px;
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  cursor: pointer; border: none; transition: all .15s; white-space: nowrap;
}
.btn .material-icons-round { font-size: 17px; }
.btn--primary {
  background: var(--pr); color: #fff;
  box-shadow: 0 4px 16px var(--pr-glow);
}
.btn--primary:hover { background: var(--prl); box-shadow: 0 6px 24px var(--pr-glow); transform: translateY(-1px); }
.btn--ghost {
  background: var(--surface-2); color: var(--t2);
  border: 1px solid var(--border);
}
.btn--ghost:hover { background: var(--surface-3); color: var(--t1); border-color: var(--border-2); }
.btn--danger  { background: var(--ro-bg); color: var(--ro); border: 1px solid rgba(244,63,94,.2); }
.btn--danger:hover { background: var(--ro); color: #fff; }
.btn--error   { background: var(--ro); color: #fff; }
.btn--error:hover { filter: brightness(1.1); }
.btn--filled  { background: var(--pr); color: #fff; }
.btn--text    { background: none; color: var(--pr); padding: 6px 12px; }
.btn--text:hover { background: var(--pr-bg); }
.btn--icon {
  width: 34px; height: 34px; padding: 0; border-radius: 9px;
  background: var(--surface-2); color: var(--t2); border: 1px solid var(--border);
  display: grid; place-items: center;
}
.btn--icon:hover { background: var(--surface-3); color: var(--t1); }
.btn--icon .material-icons-round { font-size: 17px; }
.btn--sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.btn--sm .material-icons-round { font-size: 15px; }

/* ══════════════════════════════════════════════════════
   FORMS
══════════════════════════════════════════════════════ */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--t2); margin-bottom: 6px; }
.form-control {
  width: 100%; background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 13px; color: var(--t1);
  font-family: var(--font-body); font-size: 13px; outline: none;
  transition: all .15s;
}
[data-theme="dark"] .form-control { background: var(--bg-2); }
.form-control::placeholder { color: var(--t3); }
.form-control:focus { border-color: var(--pr); box-shadow: 0 0 0 3px var(--pr-bg); }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { cursor: pointer; }

/* ══════════════════════════════════════════════════════
   TABLES
══════════════════════════════════════════════════════ */
.tbl-wrap { overflow-x: auto; }
.data-tbl { width: 100%; border-collapse: collapse; }
.data-tbl thead th {
  padding: 10px 16px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--t3); text-align: left; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-tbl tbody tr { border-bottom: 1px solid var(--border); transition: background .12s; }
.data-tbl tbody tr:last-child { border-bottom: none; }
.data-tbl tbody tr:hover { background: var(--surface-2); }
.data-tbl td { padding: 12px 16px; font-size: 13px; color: var(--t2); vertical-align: middle; }
.data-tbl td strong { color: var(--t1); font-weight: 600; }

/* ══════════════════════════════════════════════════════
   AVATARS
══════════════════════════════════════════════════════ */
.av {
  display: grid; place-items: center; flex-shrink: 0;
  font-weight: 700; color: #fff; border-radius: 10px;
  background: linear-gradient(135deg, var(--pr), var(--cy));
}
.av--sm  { width: 28px; height: 28px; font-size: 11px; border-radius: 7px; }
.av--md  { width: 36px; height: 36px; font-size: 13px; border-radius: 9px; }
.av--lg  { width: 44px; height: 44px; font-size: 16px; border-radius: 12px; }
.av--xl  { width: 52px; height: 52px; font-size: 19px; border-radius: 14px; }
.av-group { display: flex; }
.av-group .av { border: 2px solid var(--bg-2); margin-left: -6px; }
.av-group .av:first-child { margin-left: 0; }

/* ══════════════════════════════════════════════════════
   ALERTS
══════════════════════════════════════════════════════ */
.alert {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: 10px;
  font-size: 13px; font-weight: 500; margin-bottom: 14px;
}
.alert .material-icons-round { font-size: 17px; flex-shrink: 0; }
.alert--success { background: var(--em-bg); color: var(--em); border: 1px solid rgba(16,185,129,.2); }
.alert--error   { background: var(--ro-bg); color: var(--ro); border: 1px solid rgba(244,63,94,.2); }
.alert--warning { background: var(--am-bg); color: var(--am); border: 1px solid rgba(245,158,11,.2); }
.alert--info    { background: var(--pr-bg); color: var(--pr); border: 1px solid rgba(99,102,241,.2); }

/* ══════════════════════════════════════════════════════
   MODAL / DIALOG OVERLAY
══════════════════════════════════════════════════════ */
.modal-overlay, .dialog-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  display: none; place-items: center; z-index: 1000;
}
.modal-overlay.open, .dialog-overlay.open { display: grid; }
.modal, .dialog {
  background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: 20px; padding: 28px;
  width: min(520px, 94vw);
  box-shadow: var(--shadow-xl);
  animation: modalIn .2s cubic-bezier(.34,1.56,.64,1);
}
[data-theme="dark"] .modal, [data-theme="dark"] .dialog { background: var(--bg-3); }
@keyframes modalIn { from { opacity:0; transform:scale(.93) translateY(12px); } }
.modal-title, .dialog__title { font-family: var(--font-display); font-size: 19px; font-weight: 800; color: var(--t1); margin-bottom: 4px; }
.modal-sub  { font-size: 12px; color: var(--t3); margin-bottom: 22px; }
.modal-hd   { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.modal-footer, .dialog__footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.dialog__header { padding: 0 0 16px; }
.dialog__body   { padding: 0 0 8px; }
.dialog-overlay--center { align-items: center; }

/* ══════════════════════════════════════════════════════
   TASK + MEETING + MONITOR CARDS
══════════════════════════════════════════════════════ */
.task-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--border);
}
.task-item:last-child { border-bottom: none; }
.task-check {
  width: 18px; height: 18px; border-radius: 5px;
  border: 2px solid var(--border-2);
  display: grid; place-items: center; flex-shrink: 0; cursor: pointer;
  transition: all .15s;
}
.task-check.done { background: var(--em); border-color: var(--em); }
.task-check.done .material-icons-round { font-size: 12px; color: #fff; display: block; }
.task-check:not(.done) .material-icons-round { display: none; }
.task-title { font-size: 13px; color: var(--t1); flex: 1; }
.task-title.done { text-decoration: line-through; color: var(--t3); }
.task-due { font-size: 10px; color: var(--t3); }
.task-due.overdue { color: var(--ro); font-weight: 600; }

.meeting-card {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--surface-2);
  transition: all .15s; margin-bottom: 8px;
}
.meeting-card:hover { border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.meeting-date { width: 44px; flex-shrink: 0; text-align: center; background: var(--pr-bg); border-radius: 10px; padding: 6px 0; }
.meeting-date__day { font-family: var(--font-display); font-size: 20px; font-weight: 800; color: var(--pr); line-height: 1; }
.meeting-date__mon { font-size: 10px; color: var(--pr); font-weight: 600; text-transform: uppercase; }
.meeting-info__title { font-size: 13px; font-weight: 600; color: var(--t1); }
.meeting-info__meta { font-size: 11px; color: var(--t3); margin-top: 3px; display: flex; align-items: center; gap: 6px; }

.user-monitor-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
  transition: all .15s; margin-bottom: 6px;
}
.user-monitor-card:hover { border-color: var(--border-2); background: var(--surface-3); }
.um-name { font-size: 12px; font-weight: 600; color: var(--t1); }
.um-task { font-size: 10px; color: var(--t3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }

/* ══════════════════════════════════════════════════════
   LEGEND
══════════════════════════════════════════════════════ */
.legend-row { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.legend-row:last-child { border-bottom: none; }
.legend-dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.legend-label { font-size: 12px; color: var(--t2); flex: 1; }
.legend-val { font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--t1); }
.legend-pct { font-size: 10px; color: var(--t3); margin-left: 4px; }

/* ══════════════════════════════════════════════════════
   TABS
══════════════════════════════════════════════════════ */
.tab-group {
  display: flex; gap: 2px;
  background: var(--surface-2); border-radius: 10px;
  padding: 3px; width: fit-content; margin-bottom: 16px;
}
.tab-btn {
  padding: 6px 16px; border-radius: 8px; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .15s; border: none;
  background: none; color: var(--t3); font-family: var(--font-body);
}
.tab-btn.active { background: var(--bg-2); color: var(--t1); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .tab-btn.active { background: var(--bg-3); }

/* ══════════════════════════════════════════════════════
   MISC
══════════════════════════════════════════════════════ */
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 12px; background: var(--surface-2);
  padding: 2px 6px; border-radius: 5px; color: var(--pr);
}
pre code {
  display: block; padding: 14px; font-size: 12px;
  background: var(--bg-3); border-radius: 10px;
  border: 1px solid var(--border); overflow-x: auto; color: var(--t1);
}

.method { padding: 2px 8px; border-radius: 6px; font-size: 10px; font-weight: 700; font-family: monospace; }
.method--get  { background: var(--em-bg); color: var(--em); border: 1px solid rgba(16,185,129,.2); }
.method--post { background: var(--pr-bg); color: var(--pr); border: 1px solid rgba(99,102,241,.2); }
.method--put  { background: var(--am-bg); color: var(--am); border: 1px solid rgba(245,158,11,.2); }
.method--del  { background: var(--ro-bg); color: var(--ro); border: 1px solid rgba(244,63,94,.2); }

.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; animation: pulse 2s ease infinite; }
.status-dot--active   { background: var(--em); box-shadow: 0 0 6px var(--em); }
.status-dot--break    { background: var(--am); box-shadow: 0 0 6px var(--am); }
.status-dot--inactive { background: var(--t3); }
.status-dot--offline  { background: var(--t4); }

/* ══════════════════════════════════════════════════════
   AUTH
══════════════════════════════════════════════════════ */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-visual { background: var(--sidebar-bg); border-right: 1px solid var(--sidebar-bd); display: flex; flex-direction: column; justify-content: center; padding: 60px; position: relative; overflow: hidden; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 60px; background: var(--bg); }
.auth-form { max-width: 380px; width: 100%; }
.auth-title { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--t1); margin-bottom: 6px; }
.auth-subtitle { font-size: 13px; color: var(--t3); margin-bottom: 28px; }

/* ══════════════════════════════════════════════════════
   KANBAN
══════════════════════════════════════════════════════ */
.kanban-board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 16px; align-items: flex-start; min-height: 0; }
.kanban-col { min-width: 270px; max-width: 310px; flex: 1; background: var(--surface-2); border-radius: 14px; border: 1px solid var(--border); }
.kanban-col__head { padding: 14px 16px 10px; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--t2); }
.kanban-col__body { padding: 0 10px 10px; min-height: 60px; display: flex; flex-direction: column; gap: 8px; }
.task-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: 11px; padding: 13px; cursor: grab; transition: all .15s; }
[data-theme="dark"] .task-card { background: var(--bg-3); }
.task-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-2); }
.task-card[data-dragging] { opacity: .5; }

/* ══════════════════════════════════════════════════════
   UTILITIES
══════════════════════════════════════════════════════ */
.flex          { display: flex; }
.flex-col      { flex-direction: column; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; }
.gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-14 { gap: 14px; }
.gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.mb-4  { margin-bottom: 4px; }  .mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; } .mb-14 { margin-bottom: 14px; }
.mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; } .mb-28 { margin-bottom: 28px; }
.mt-4  { margin-top: 4px; } .mt-8 { margin-top: 8px; }
.mt-auto { margin-top: auto; }
.ml-auto { margin-left: auto; }
.text-muted   { color: var(--t3); }
.text-2       { color: var(--t2); }
.text-strong  { color: var(--t1); font-weight: 600; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.w-full       { width: 100%; }
.truncate     { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.font-display { font-family: var(--font-display); }
.relative     { position: relative; }
.absolute     { position: absolute; }
.overflow-hidden { overflow: hidden; }
.body-medium  { font-size: 14px; color: var(--t2); line-height: 1.6; }
.body-small   { font-size: 12px; color: var(--t3); }
.title-small  { font-size: 14px; font-weight: 700; color: var(--t1); }

/* ══════════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════════ */
@keyframes fadeUp   { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes glowPulse { 0%,100% { opacity:.4; } 50% { opacity:.7; } }
@keyframes spin     { to { transform: rotate(360deg); } }
@keyframes pulse    { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes toastIn  { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:none; } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; transform:translateY(8px); } }

.anim-fade-up { animation: fadeUp .4s ease both; }
.anim-fade-up:nth-child(1) { animation-delay: .04s; }
.anim-fade-up:nth-child(2) { animation-delay: .08s; }
.anim-fade-up:nth-child(3) { animation-delay: .12s; }
.anim-fade-up:nth-child(4) { animation-delay: .16s; }
.anim-fade-up:nth-child(5) { animation-delay: .20s; }
.anim-fade-up:nth-child(6) { animation-delay: .24s; }
.spin { animation: spin .8s linear infinite; }


/* ══════════════════════════════════════════════════════
   MISSING TOKEN ALIASES — maps legacy --primary / --text-N
   vars used in auth views to the real design tokens
══════════════════════════════════════════════════════ */
:root, [data-theme="light"] {
  /* Primary aliases */
  --primary:        var(--pr);
  --primary-l:      var(--prl);
  --primary-d:      var(--prd);
  --primary-glow:   var(--pr-glow);
  --primary-bg:     var(--pr-bg);

  /* Cyan aliases */
  --cyan:           var(--cy);
  --cyan-l:         #22d3ee;
  --cyan-bg:        var(--cy-bg);

  /* Text aliases */
  --text-1:         var(--t1);
  --text-2:         var(--t2);
  --text-3:         var(--t3);
  --text-4:         var(--t4);

  /* Misc aliases */
  --r-sm:           8px;
  --r-md:           12px;
  --r-lg:           16px;
  --r-xl:           20px;
  --transition:     .15s ease;
}
[data-theme="dark"] {
  --primary:        var(--pr);
  --primary-l:      var(--prl);
  --primary-d:      var(--prd);
  --primary-glow:   var(--pr-glow);
  --primary-bg:     var(--pr-bg);
  --cyan:           var(--cy);
  --cyan-l:         var(--cy);
  --cyan-bg:        var(--cy-bg);
  --text-1:         var(--t1);
  --text-2:         var(--t2);
  --text-3:         var(--t3);
  --text-4:         var(--t4);
  --r-sm:           8px;
  --r-md:           12px;
  --r-lg:           16px;
  --r-xl:           20px;
  --transition:     .15s ease;
}

/* ══════════════════════════════════════════════════════
   AUTH PAGE LAYOUT — complete set of auth-* classes
══════════════════════════════════════════════════════ */
/* Full-viewport two-column grid */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

/* Left decorative panel */
.auth-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 60px;
  background: var(--sidebar-bg);
}

/* Glowing orb decorator */
.auth-visual__orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
}

/* Large headline inside visual panel */
.auth-visual__headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.5px;
}

/* Right form panel */
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: var(--bg);
  overflow-y: auto;
}

/* Form wrapper inside auth-panel */
.auth-form-wrap {
  width: 100%;
  max-width: 380px;
}

/* Logo row in the form panel */
.logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
}
.logo-icon {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--pr), #a78bfa);
  display: grid; place-items: center;
  box-shadow: 0 4px 14px var(--pr-glow);
  flex-shrink: 0;
}
.logo-icon .material-icons-round { font-size: 20px; color: #fff; }

/* Auth headings */
.auth-title {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 800;
  letter-spacing: -.4px;
  color: var(--t1);
  margin-bottom: 8px;
}
.auth-subtitle {
  font-size: 14px;
  color: var(--t3);
  margin-bottom: 28px;
  line-height: 1.5;
}

/* w-full utility (used in auth buttons) */
.w-full { width: 100%; }

/* ── Auth page responsive ────────────────────────────── */
@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-panel { padding: 40px 24px; align-items: flex-start; padding-top: 60px; }
}
@media (max-width: 480px) {
  .auth-panel { padding: 32px 20px; }
  .auth-title { font-size: 22px; }
}


/* ══════════════════════════════════════════════════════
   AUTH CARD — centered single-column card layout
   used by forgot.php, reset.php, otp.php
══════════════════════════════════════════════════════ */
/* When auth-page is used as single-col centered layout */
.auth-page:has(.auth-card) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
  padding: 32px 16px;
}
/* Fallback for browsers without :has() */
.auth-page--center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
  padding: 32px 16px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
  animation: fadeUp .35s ease both;
}
[data-theme="dark"] .auth-card { background: var(--bg-3); }

.auth-card__logo {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}
.auth-card__logo-icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, var(--pr), #a78bfa);
  display: grid; place-items: center;
  box-shadow: 0 8px 24px var(--pr-glow);
}
.auth-card__logo-icon .material-icons-round { font-size: 26px; color: #fff; }

.auth-card__title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800;
  text-align: center; color: var(--t1);
  margin-bottom: 8px;
  letter-spacing: -.3px;
}
.auth-card__subtitle {
  font-size: 14px; color: var(--t3);
  text-align: center; line-height: 1.6;
  margin-bottom: 28px;
}

/* animate-in */
.animate-in { animation: fadeUp .4s cubic-bezier(.22,.68,0,1.2) both; }

/* OTP digit inputs */
.otp-inputs {
  display: flex; gap: 10px; justify-content: center;
  margin: 24px 0;
}
.otp-digit {
  width: 52px; height: 60px;
  border: 2px solid var(--border-2);
  border-radius: 12px;
  background: var(--bg);
  font-family: var(--font-display);
  font-size: 24px; font-weight: 800;
  text-align: center; color: var(--t1);
  outline: none; transition: all .15s;
}
.otp-digit::-webkit-outer-spin-button,
.otp-digit::-webkit-inner-spin-button { -webkit-appearance: none; }
.otp-digit:focus {
  border-color: var(--pr);
  box-shadow: 0 0 0 3px var(--pr-bg);
  background: var(--bg-2);
}
[data-theme="dark"] .otp-digit { background: var(--bg-2); }
[data-theme="dark"] .otp-digit:focus { background: var(--bg-3); }

/* ══════════════════════════════════════════════════════
   RESPONSIVE — TABLET  (≤ 1200px)
══════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .col-7-5, .col-5-7 { grid-template-columns: 1fr; }
  .g3 { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE — MOBILE  (≤ 768px)
══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Nav slides off-canvas */
  .nav-drawer, .sidebar {
    transform: translateX(-100%);
    width: var(--nav-width) !important;
    box-shadow: none;
  }
  .nav-drawer.open, .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }
  /* Full width main */
  .app-layout, .app-shell {
    grid-template-columns: 1fr !important;
  }
  .main-content { grid-column: 1; }

  /* Mobile overlay backdrop */
  .nav-mobile-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 190;
  }
  .nav-mobile-overlay.open { display: block; }

  /* Topbar */
  .topbar { padding: 0 14px; }
  .topbar__search { display: none; } /* hidden on very small screens */
  .topbar-profile__info { display: none; }

  /* Page content */
  .page-content { padding: 16px; }

  /* Grids collapse */
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .stat-grid     { grid-template-columns: 1fr 1fr; }
  .col-7-5, .col-5-7 { grid-template-columns: 1fr; }

  /* Auth */
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-panel  { padding: 32px 20px; }

  /* Page header */
  .page-title { font-size: 22px; }
  .page-actions { flex-wrap: wrap; }
  .page-actions .btn { flex: 1; justify-content: center; }
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE — SMALL MOBILE  (≤ 480px)
══════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .stat-value { font-size: 26px; }
  .kanban-board { gap: 10px; }
  .kanban-col { min-width: 250px; }
}

/* ══════════════════════════════════════════════════════
   BUG FIXES — All 6 issues
   1. Dashboard layout fix
   2. Auth light-theme text visibility
   3. Offcanvas scrolling
   4. View toggle (grid/list) styles
   5. My Tasks blank fix (Bootstrap tab override)
   6. General page reachability
══════════════════════════════════════════════════════ */

/* ── FIX 1: Dashboard stat-card closing div mismatch ─
   Extra </div> in dashboard.php causes broken layout.
   Force stat-grid to display correctly regardless.     */
.stat-grid .stat-card {
  display: flex;
  flex-direction: column;
}
.stat-grid .stat-card .stat-glow {
  pointer-events: none;
}

/* ── FIX 2: Auth pages — light theme text visibility ── */
[data-theme="light"] .auth-visual {
  background: #1e1b4b;
}
[data-theme="light"] .auth-visual .auth-visual__headline,
[data-theme="light"] .auth-visual h1,
[data-theme="light"] .auth-visual h2,
[data-theme="light"] .auth-visual p,
[data-theme="light"] .auth-visual span,
[data-theme="light"] .auth-visual .stat-item__label,
[data-theme="light"] .auth-visual .feature-item__text {
  color: rgba(255,255,255,0.85) !important;
  -webkit-text-fill-color: rgba(255,255,255,0.85) !important;
}
[data-theme="light"] .auth-visual .stat-item__value {
  -webkit-text-fill-color: transparent !important;
}
[data-theme="light"] .auth-panel {
  background: var(--bg);
}
[data-theme="light"] .auth-panel .auth-title,
[data-theme="light"] .auth-panel .auth-form-wrap .auth-title,
[data-theme="light"] .auth-card__title {
  color: #0f172a !important;
}
[data-theme="light"] .auth-panel .auth-subtitle,
[data-theme="light"] .auth-card__subtitle {
  color: #64748b !important;
}
[data-theme="light"] .auth-panel .form-label,
[data-theme="light"] .auth-card .form-label {
  color: #475569 !important;
}
[data-theme="light"] .auth-panel .form-control,
[data-theme="light"] .auth-card .form-control {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(0,0,0,0.15) !important;
}
[data-theme="light"] .auth-panel .form-control::placeholder,
[data-theme="light"] .auth-card .form-control::placeholder {
  color: #94a3b8 !important;
}
[data-theme="light"] .auth-panel a,
[data-theme="light"] .auth-card a {
  color: var(--pr) !important;
}
[data-theme="light"] .auth-panel .or-divider span {
  color: #94a3b8 !important;
}
[data-theme="light"] .otp-digit {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(0,0,0,0.2) !important;
}
[data-theme="light"] .pwd-wrap .eye-btn {
  color: #94a3b8;
}
[data-theme="light"] .google-btn {
  background: #ffffff;
  color: #475569;
  border-color: rgba(0,0,0,0.15);
}
[data-theme="light"] .google-btn:hover {
  background: #f8fafc;
  color: #0f172a;
}
/* Auth card (forgot/reset/otp) light mode */
[data-theme="light"] .auth-card {
  background: #ffffff !important;
}

/* ── FIX 3: Offcanvas — full scrollable with sticky footer ── */
.offcanvas {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(480px, 95vw);
  height: 100vh;
  background: var(--bg-2);
  border-left: 1px solid var(--border-2);
  box-shadow: var(--shadow-xl);
  z-index: 900;
  transition: right .3s cubic-bezier(0.2,0,0,1);
  display: flex;
  flex-direction: column;
  overflow: hidden;        /* parent clips; children scroll */
}
[data-theme="dark"] .offcanvas { background: var(--bg-3); }
.offcanvas.open { right: 0; }

.offcanvas-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 899;
}
.offcanvas-backdrop.open { display: block; }

/* Header — fixed at top, never scrolls */
.offcanvas__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;           /* never shrinks */
}
.offcanvas__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--t1);
  letter-spacing: -.2px;
}
.offcanvas__subtitle {
  font-size: 12px;
  color: var(--t3);
  margin-top: 2px;
}
.offcanvas__close {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  cursor: pointer; color: var(--t2);
  transition: all .15s; flex-shrink: 0;
}
.offcanvas__close:hover { background: var(--surface-3); color: var(--t1); }
.offcanvas__close .material-icons-round { font-size: 18px; }

/* Body — scrollable middle section */
.offcanvas__body {
  flex: 1;                  /* takes all remaining height */
  overflow-y: auto;         /* THIS is the scroll region  */
  overflow-x: hidden;
  padding: 20px 24px;
}

/* Footer — fixed at bottom, never scrolls */
.offcanvas__footer {
  flex-shrink: 0;           /* never shrinks */
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}
[data-theme="dark"] .offcanvas__footer { background: var(--bg-3); }

/* Offcanvas form-group spacing */
.offcanvas__body .form-group { margin-bottom: 18px; }
.offcanvas__body .form-group:last-child { margin-bottom: 0; }

/* ── FIX 4: View toggle button styles (grid/list) ── */
.view-toggle {
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.view-toggle__btn {
  width: 32px; height: 32px;
  border-radius: 7px;
  background: none;
  border: none;
  display: grid; place-items: center;
  cursor: pointer;
  color: var(--t3);
  transition: all .15s;
}
.view-toggle__btn .material-icons-round { font-size: 18px; }
.view-toggle__btn:hover { color: var(--t1); background: var(--surface-3); }
.view-toggle__btn.active { background: var(--bg-2); color: var(--pr); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .view-toggle__btn.active { background: var(--bg-3); }

/* List view item styles */
.page-list-view {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
[data-theme="dark"] .page-list-view { background: var(--bg-3); }
.list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .12s;
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--surface-2); }
.list-item__icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
  color: #fff; flex-shrink: 0;
}
.list-item__name {
  font-size: 14px; font-weight: 600; color: var(--t1);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.list-item__sub { font-size: 12px; color: var(--t3); margin-top: 2px; }

/* ── FIX 5: My Tasks — Bootstrap tab integration fix ──
   Bootstrap's .tab-pane visibility conflicts with our layout */
.tab-pane { display: none; }
.tab-pane.show.active { display: block; }
/* Kanban tab needs flex layout */
#kanbanTab.show.active { display: block; }

/* ── FIX 6: Reports / Settings — ensure content shows ──
   page-content must not clip its children                  */
.page-content {
  flex: 1;
  padding: 28px;
  max-width: 1480px;
  overflow: visible;        /* don't clip dropdowns/charts  */
}

/* ── Utility: ensure dashboard stat-card stat-value visible */
[data-theme="light"] .stat-card .stat-value {
  color: #0f172a !important;
}
[data-theme="light"] .stat-card .stat-label {
  color: #94a3b8 !important;
}

/* ── Real-time badge fix on dashboard ── */
#dashStatusWidget {
  border-radius: 16px;
  overflow: hidden;
}

/* ── Mobile offcanvas full width ── */
@media (max-width: 480px) {
  .offcanvas { width: 100vw; }
}

/* ═══════════════════════════════════════════════════════════════
   TASKFLOW v2 — COMPREHENSIVE UI FIXES
   1. Universal table system (.tf-table)
   2. Activity log UI
   3. Attendance report
   4. Filter bar
   5. Sprint + task creation
   6. Project/Task activity log
═══════════════════════════════════════════════════════════════ */

/* ── 1. UNIVERSAL TABLE SYSTEM ────────────────────────────── */
.tf-table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-2);
}
[data-theme="dark"] .tf-table-wrap { background: var(--bg-3); }

.tf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tf-table thead tr {
  background: var(--surface-2);
  border-bottom: 2px solid var(--border-2);
}
.tf-table thead th {
  padding: 11px 16px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--t3); text-align: left;
  white-space: nowrap;
}
.tf-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.tf-table tbody tr:last-child { border-bottom: none; }
.tf-table tbody tr:hover { background: var(--surface-2); }
.tf-table td {
  padding: 13px 16px;
  color: var(--t2);
  vertical-align: middle;
}
.tf-table td strong, .tf-table .cell-strong { color: var(--t1); font-weight: 600; }
.tf-table .cell-muted { color: var(--t3); font-size: 12px; }
.tf-table .cell-mono  {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 12px; letter-spacing: .3px;
}
/* Also fix old .md-table / .data-table / .log-table classes */
.md-table, .data-table, .log-table,
table.data-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.md-table thead tr,
.data-table thead tr,
.log-table thead tr {
  background: var(--surface-2);
  border-bottom: 2px solid var(--border-2);
}
.md-table thead th,
.data-table thead th,
.log-table thead th {
  padding: 11px 16px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--t3); text-align: left; white-space: nowrap;
}
.md-table tbody tr,
.data-table tbody tr,
.log-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.md-table tbody tr:last-child,
.data-table tbody tr:last-child,
.log-table tbody tr:last-child { border-bottom: none; }
.md-table tbody tr:hover,
.data-table tbody tr:hover,
.log-table tbody tr:hover { background: var(--surface-2); }
.md-table td,
.data-table td,
.log-table td {
  padding: 13px 16px;
  color: var(--t2); vertical-align: middle;
}
.md-table td strong,
.data-table td strong { color: var(--t1); font-weight: 600; }
/* Wrapper for all table types */
.table-container, .tbl-wrap, .table-wrap {
  overflow-x: auto;
  border-radius: 0 0 14px 14px;
}

/* ── 2. ACTIVITY LOG UI ───────────────────────────────────── */
.activity-feed {
  display: flex;
  flex-direction: column;
  position: relative;
}
.activity-feed::before {
  content: '';
  position: absolute;
  left: 24px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--pr-bg), var(--border), transparent);
  border-radius: 2px;
  pointer-events: none;
}
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  position: relative;
  transition: background .12s;
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: var(--surface-2); }
.activity-dot {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  border: 2px solid var(--bg-2);
}
[data-theme="dark"] .activity-dot { border-color: var(--bg-3); }
.activity-dot .material-icons-round { font-size: 17px; }
.activity-item__body { flex: 1; min-width: 0; }
.activity-item__title {
  font-size: 13px; font-weight: 600;
  color: var(--t1); line-height: 1.4;
  margin-bottom: 3px;
}
.activity-item__meta {
  display: flex; align-items: center;
  gap: 8px; flex-wrap: wrap;
  font-size: 11px; color: var(--t3);
}
.activity-item__time {
  font-size: 11px; color: var(--t3);
  white-space: nowrap; flex-shrink: 0;
  text-align: right;
}
.activity-user-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 99px; padding: 2px 8px 2px 4px;
  font-size: 11px; font-weight: 600; color: var(--t2);
}
.activity-user-chip__av {
  width: 16px; height: 16px; border-radius: 4px;
  background: linear-gradient(135deg, var(--pr), var(--cy));
  display: grid; place-items: center;
  font-size: 8px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
/* Card header classes used by activity.php */
.card-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.card-header__title {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 700;
  color: var(--t1);
}
.card-header__subtitle { font-size: 12px; color: var(--t3); margin-top: 2px; }

/* ── 3. FILTER BAR ────────────────────────────────────────── */
.filter-bar {
  display: flex; align-items: center;
  gap: 10px; flex-wrap: wrap;
  padding: 14px 18px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 20px;
}
[data-theme="dark"] .filter-bar { background: var(--bg-3); }
.filter-bar__search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 24px; padding: 0 14px; height: 38px;
  flex: 1; min-width: 180px; max-width: 340px;
  transition: all .15s;
}
.filter-bar__search:focus-within {
  border-color: var(--pr);
  box-shadow: 0 0 0 3px var(--pr-bg);
}
.filter-bar__search input {
  background: none; border: none; outline: none;
  color: var(--t1); font-size: 13px; flex: 1;
  font-family: var(--font-body);
}
.filter-bar__search input::placeholder { color: var(--t3); }
.filter-bar__search .material-icons-round { font-size: 16px; color: var(--t3); }
.filter-bar select.form-control {
  height: 38px; padding: 0 32px 0 12px;
  font-size: 13px; min-width: 130px; width: auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%2394a3b8'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  -webkit-appearance: none; appearance: none;
  cursor: pointer;
}
.filter-bar .btn { height: 38px; }

/* ── 4. ATTENDANCE FULL REPORT ────────────────────────────── */
.report-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.report-stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  text-align: center;
}
[data-theme="dark"] .report-stat-card { background: var(--bg-3); }
.report-stat-card__val {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 800;
  letter-spacing: -1px; line-height: 1;
  margin-bottom: 5px;
}
.report-stat-card__lbl {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .6px;
  color: var(--t3);
}

/* ── 5. SPRINT / TASK CREATION ────────────────────────────── */
.sprint-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 16px;
  overflow: hidden;
  transition: box-shadow .2s;
}
[data-theme="dark"] .sprint-card { background: var(--bg-3); }
.sprint-card:hover { box-shadow: var(--shadow-md); }
.sprint-card__head {
  padding: 16px 20px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  transition: background .15s;
}
.sprint-card__head:hover { background: var(--surface-3); }
.sprint-card__meta {
  font-size: 11px; color: var(--t3);
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-top: 3px;
}
.sprint-card__progress {
  height: 4px; background: var(--surface-2);
  border-radius: 4px; overflow: hidden; flex: 1; min-width: 80px;
}
.sprint-card__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--prd), var(--prl));
  border-radius: 4px; transition: width .8s;
}
.sprint-empty-state {
  text-align: center; padding: 48px 24px; color: var(--t3);
}
.sprint-empty-state .material-icons-round {
  font-size: 56px; opacity: .2; display: block; margin-bottom: 12px;
}

/* Add Task to Sprint inline form */
.sprint-add-task {
  padding: 12px 16px;
  border-top: 1px dashed var(--border);
  display: none;
}
.sprint-add-task.open { display: block; }
.sprint-add-task-row {
  display: flex; gap: 8px; align-items: center;
}
.sprint-add-task-row input {
  flex: 1;
}

/* ── 6. PROJECT / TASK ACTIVITY TIMELINE ─────────────────── */
.proj-activity-timeline {
  display: flex; flex-direction: column; gap: 0;
  padding: 0 20px 20px;
  position: relative;
}
.proj-activity-timeline::before {
  content: '';
  position: absolute;
  left: 37px; top: 0; bottom: 20px;
  width: 2px;
  background: var(--border);
  border-radius: 2px;
}
.pal-item {
  display: flex; gap: 14px;
  align-items: flex-start;
  padding: 12px 0;
  position: relative;
}
.pal-dot {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center;
  flex-shrink: 0; position: relative; z-index: 1;
  border: 2px solid var(--bg-2);
}
[data-theme="dark"] .pal-dot { border-color: var(--bg-3); }
.pal-dot .material-icons-round { font-size: 16px; }
.pal-body { flex: 1; min-width: 0; padding-top: 5px; }
.pal-title { font-size: 13px; font-weight: 600; color: var(--t1); line-height: 1.4; }
.pal-meta  { font-size: 11px; color: var(--t3); margin-top: 2px; display: flex; gap: 6px; flex-wrap: wrap; }
.pal-time  { font-size: 11px; color: var(--t3); flex-shrink: 0; padding-top: 6px; white-space: nowrap; }

/* ── 7. PROGRESS BAR (attendance page uses different classes) */
.progress-track {
  height: 6px; background: var(--surface-2);
  border-radius: 10px; overflow: hidden;
}
.progress-bar {
  height: 100%; border-radius: 10px;
  transition: width .8s cubic-bezier(.4,0,.2,1);
}

/* ── 8. KANBAN COL HEADER ALIASES ─────────────────────────── */
.kanban-col__header {
  padding: 14px 16px 10px;
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; color: var(--t2);
  border-bottom: 1px solid var(--border);
}
.kanban-col__title { flex: 1; }
.kanban-col__count {
  background: var(--surface-3); color: var(--t3);
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 10px;
}
.task-card__title {
  font-size: 13px; font-weight: 600; color: var(--t1);
  margin-bottom: 8px; line-height: 1.4;
}
.task-card__meta {
  display: flex; align-items: center;
  flex-wrap: wrap; gap: 5px;
  font-size: 11px; color: var(--t3);
}
.task-card__due {
  display: flex; align-items: center; gap: 3px;
  font-size: 10px; color: var(--t3);
}
.task-card__due--overdue { color: var(--ro); }
.task-card__due .material-icons-round { font-size: 12px; }
.task-card__assignee {
  width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(135deg, var(--pr), var(--cy));
  display: grid; place-items: center;
  font-size: 9px; font-weight: 700; color: #fff;
  margin-left: auto;
}
.task-card__delete { margin-left: auto; }
.task-card:hover .task-card__delete { opacity: 1 !important; }

/* ── 9. AVATAR ALIASES ────────────────────────────────────── */
.avatar { display:grid;place-items:center;flex-shrink:0;font-weight:700;color:#fff;border-radius:10px;background:linear-gradient(135deg,var(--pr),var(--cy)); }
.avatar--sm { width:28px;height:28px;font-size:11px;border-radius:7px; }
.avatar--md { width:36px;height:36px;font-size:13px;border-radius:9px; }
.avatar--lg { width:44px;height:44px;font-size:16px;border-radius:12px; }

/* ── 10. PROGRESS BAR ALIAS ───────────────────────────────── */
.progress { height:6px;background:var(--surface-2);border-radius:10px;overflow:hidden; }
.progress__bar { height:100%;border-radius:10px;background:linear-gradient(90deg,var(--prd),var(--prl));transition:width 1.2s cubic-bezier(.4,0,.2,1); }
.progress__bar--success { background:linear-gradient(90deg,#059669,#10b981); }

/* Badge alias for inline status colors used in settings/attendance */
[data-theme="light"] .badge--emerald { background:rgba(16,185,129,.1);color:#059669;border:1px solid rgba(16,185,129,.2); }
[data-theme="light"] .badge--rose    { background:rgba(244,63,94,.1);color:#e11d48;border:1px solid rgba(244,63,94,.2); }
[data-theme="light"] .badge--amber   { background:rgba(245,158,11,.1);color:#d97706;border:1px solid rgba(245,158,11,.2); }
[data-theme="light"] .badge--cyan    { background:rgba(34,211,238,.1);color:#0891b2;border:1px solid rgba(34,211,238,.2); }

/* ═══════════════════════════════════════════════════════
   PATCH 4 — Task status flow + Sprint/Task modal fixes
═══════════════════════════════════════════════════════ */

/* ── Status badge: Paused state ─────────────────────── */
.status--paused {
  background: linear-gradient(135deg,rgba(245,158,11,.15),rgba(245,158,11,.08));
  color: #d97706;
  border: 1px solid rgba(245,158,11,.25);
}
.status--paused .status-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245,158,11,.25);
}

/* ── Timer action buttons ────────────────────────────── */
/* Pause button — amber */
.btn-timer--pause {
  background: linear-gradient(135deg,#f59e0b,#d97706);
  color: #fff;
  border: none;
}
.btn-timer--pause:hover {
  background: linear-gradient(135deg,#d97706,#b45309);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245,158,11,.4);
}

/* Hold button — slate/neutral with border */
.btn-timer--hold {
  background: transparent;
  color: var(--t2);
  border: 1.5px solid var(--border-2);
}
.btn-timer--hold:hover {
  background: var(--surface-2);
  color: var(--t1);
  border-color: var(--t3);
}

/* Resume button — green */
.btn-timer--resume {
  background: linear-gradient(135deg,#10b981,#059669);
  color: #fff;
  border: none;
}
.btn-timer--resume:hover {
  background: linear-gradient(135deg,#059669,#047857);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16,185,129,.4);
}

/* Complete button — blue/indigo */
.btn-timer--complete {
  background: linear-gradient(135deg,var(--pr),var(--prd));
  color: #fff;
  border: none;
}
.btn-timer--complete:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99,102,241,.4);
}

/* ── Modal overlay (ensure visible when .open) ────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 800;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open {
  display: flex !important;
}
.modal {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalIn .2s cubic-bezier(.34,1.56,.64,1);
}
[data-theme="dark"] .modal { background: var(--bg-3); }
.modal-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  color: var(--t1);
  letter-spacing: -.2px;
}
.modal-sub {
  font-size: 12px;
  color: var(--t3);
  margin-top: 2px;
}
.modal form { padding: 20px 24px 0; }
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

/* ── my-tasks sprint card improvements ───────────────── */
/* Ensure sprint body doesn't collapse when empty */
#panel-sprint .sprint-card .backlog-row:first-child {
  border-top: none;
}

/* ── Progress bar in task meta row ───────────────────── */
.td-meta-item input[type="hidden"] { display: none; }


/* ═══════════════════════════════════════════════════════════
   PATCH 5 — Unified task form + countdown timer UI
═══════════════════════════════════════════════════════════ */

/* ── Priority picker in forms ─────────────────────────── */
.pri-opt { transition: border-color .15s, background .15s; }
.pri-opt:hover { border-color: var(--pr) !important; background: var(--surface-2) !important; }

/* ── Duration picker ──────────────────────────────────── */
.dur-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dur-unit {
  position: relative;
}
.dur-unit input { padding-right: 40px; }
.dur-unit__label {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 11px; font-weight: 700; color: var(--t3); pointer-events: none;
  letter-spacing: .3px;
}

/* ── Countdown timer — overtime state ─────────────────── */
.timer--overtime {
  color: var(--td-red, #ef4444) !important;
  animation: overtimePulse 1.5s ease-in-out infinite;
}
@keyframes overtimePulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .65; }
}

/* ── Task detail countdown label ──────────────────────── */
#timerCountdownLabel {
  transition: color .3s;
}

/* ── offcanvas form layout improvements ──────────────── */
.offcanvas__body .form-group { margin-bottom: 16px; }
.offcanvas__body .form-group:last-child { margin-bottom: 0; }

/* ── Modal body padding ───────────────────────────────── */
.modal form > div:not(.modal-footer) { padding: 0 24px 4px; }

/* ── Unified task form sections ───────────────────────── */
.task-form-section {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 14px;
}
.task-form-section__label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .7px; color: var(--t3); margin-bottom: 10px;
}


/* ═══════════════════════════════════════════════════════
   PATCH 6 — Jira-style Sprint Board
═══════════════════════════════════════════════════════ */
.sprint-task-row:hover { background: var(--surface-2) !important; }
.sprint-card__head { cursor: pointer; }

/* Spin animation for loading state */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { display: inline-block; animation: spin .7s linear infinite; }

/* ── Offcanvas form wrapping body+footer — fix scroll ──────── */
.offcanvas form {
  display: contents; /* form doesn't interrupt flex layout */
}
/* .offcanvas__body must always be able to grow and scroll */
.offcanvas__body {
  flex: 1 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 20px 24px !important;
}
.offcanvas__footer {
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  padding: 16px 24px !important;
  border-top: 1px solid var(--border) !important;
  background: var(--bg-2) !important;
}
[data-theme="dark"] .offcanvas__footer { background: var(--bg-3) !important; }


