    /* ============================================================
   EARROW.NET SUPPORT PORTAL — DESIGN SYSTEM
   Aesthetic: Modern, soft-edged · Blue accent · Semantic status colours
   Fonts: Inter (UI) · JetBrains Mono (code only)
   ============================================================ */
    :root {
      --blue-900: #0a1f44;
      --blue-800: #0d2b5e;
      --blue-700: #103a7a;
      --blue-600: #154fa0;
      --blue-500: #1a65c8;
      --blue-400: #2e7de9;
      --blue-300: #5b9ef6;
      --blue-200: #93bffc;
      --blue-100: #c8dffe;
      --blue-50: #eaf3ff;

      --red-700: #991b1b;
      --red-600: #b91c1c;
      --red-500: #dc2626;
      --red-400: #ef4444;
      --red-300: #f87171;
      --red-100: #fee2e2;

      --black: #0d0d0d;
      --gray-900: #111827;
      --gray-800: #1f2937;
      --gray-700: #374151;
      --gray-600: #4b5563;
      --gray-500: #6b7280;
      --gray-400: #9ca3af;
      --gray-300: #d1d5db;
      --gray-200: #e5e7eb;
      --gray-100: #f3f4f6;
      --gray-50: #f9fafb;
      --white: #ffffff;

      --amber: #d97706;
      --amber-lt: #fef3c7;
      --green: #16a34a;
      --green-500: #16a34a;
      --green-lt: #dcfce7;
      --orange: #ea580c;
      --orange-500: #ea580c;
      --orange-lt: #ffedd5;
      --violet: #7c3aed;
      --violet-lt: #ede9fe;
      --sky: #0284c7;
      --sky-lt: #e0f2fe;

      --surface-1: #f3f4f6;
      --surface-2: #ffffff;
      --surface-3: #f9fafb;
      --surface-4: #e5e7eb;

      --border: rgba(17, 24, 39, 0.1);
      --border-bright: rgba(17, 24, 39, 0.22);
      --border-blue: rgba(26, 101, 200, 0.25);

      --text-primary: #111827;
      --text-secondary: #374151;
      --text-muted: #6b7280;
      --text-inverse: #ffffff;

      /* keep old variable names pointing to new values for JS compat */
      --acid: #1a65c8;
      --acid-dim: #154fa0;
      --red: #dc2626;
      --red-dim: #b91c1c;

      --sidebar-bg: #0a1f44;
      --sidebar-border: rgba(255, 255, 255, 0.07);
      --sidebar-text: rgba(255, 255, 255, 0.6);
      --sidebar-text-active: #ffffff;
      --sidebar-active-bg: rgba(46, 125, 233, 0.2);
      --sidebar-active-border: #2e7de9;

      --header-bg: #ffffff;
      --sidebar-w: 248px;
      --header-h: 60px;
      --radius: 8px;
      --radius-lg: 14px;
      --transition: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
      --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
      --font-display: var(--font-ui);
      --font-body: var(--font-ui);
      --font-mono: var(--font-ui); /* legacy name: UI labels/badges now use the UI font */
      --font-code: 'JetBrains Mono', ui-monospace, Consolas, monospace;
      --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.06);
      --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, 0.08), 0 2px 4px -2px rgba(16, 24, 40, 0.06);
      --shadow-lg: 0 20px 40px -12px rgba(16, 24, 40, 0.18);
      --shadow-acid: 0 4px 16px rgba(26, 101, 200, 0.3);
    }

    /* ── Dark Mode Overrides ── */
    body.dark-mode {
      --surface-1: #090e1a;
      --surface-2: #111827;
      --surface-3: #1f2937;
      --surface-4: #374151;

      --white: #111827;
      --black: #ffffff;

      --gray-900: #f9fafb;
      --gray-800: #f3f4f6;
      --gray-700: #e5e7eb;
      --gray-600: #d1d5db;
      --gray-500: #9ca3af;
      --gray-400: #6b7280;
      --gray-300: #4b5563;
      --gray-200: #374151;
      --gray-100: #1f2937;
      --gray-50: #111827;

      --text-primary: #ffffff;
      --text-secondary: #f8fafc;
      --text-muted: #cbd5e1;
      --text-inverse: #020617;

      --border: rgba(255, 255, 255, 0.08);
      --border-bright: rgba(255, 255, 255, 0.15);
      --border-blue: rgba(59, 130, 246, 0.3);

      --blue-50: rgba(26, 101, 200, 0.1);
      --blue-100: rgba(26, 101, 200, 0.2);

      --sidebar-bg: #030712;
      --header-bg: #111827;
    }

    body.dark-mode .alerts-container {
      background: rgba(220, 38, 38, 0.1);
      border-color: rgba(220, 38, 38, 0.3);
    }
    body.dark-mode .alert-item {
      background: #1a2332;
      border-left-color: #f87171;
    }
    body.dark-mode .alert-item.critical {
      background: rgba(220, 38, 38, 0.12);
      border-left-color: #ef4444;
    }
    body.dark-mode .alert-item:hover {
      background: rgba(220, 38, 38, 0.18);
    }

    body.dark-mode .timeline-body.internal {
      background: rgba(217, 119, 6, 0.15);
      border-color: rgba(217, 119, 6, 0.3);
    }

    body.dark-mode .detail-panel.panel-notes {
      border-color: rgba(217, 119, 6, 0.4);
    }

    body.dark-mode .detail-panel.panel-notes .detail-panel-header {
      background: rgba(217, 119, 6, 0.12);
      border-bottom-color: rgba(217, 119, 6, 0.3);
    }

    body.dark-mode .internal-notes-messages,
    body.dark-mode .notes-input-area {
      background: rgba(217, 119, 6, 0.07);
    }

    body.dark-mode .note-bubble {
      background: var(--bg-secondary);
      border-color: rgba(217, 119, 6, 0.3);
      border-left-color: rgba(217, 119, 6, 0.6);
    }

    body.dark-mode .internal-tag {
      background: rgba(217, 119, 6, 0.15);
      color: #fde68a;
      border-color: rgba(217, 119, 6, 0.3);
    }

    body.dark-mode .badge-progress,
    body.dark-mode .badge-resolved,
    body.dark-mode .prio-low,
    body.dark-mode .type-integration {
      background: rgba(22, 163, 74, 0.2);
      color: #86efac;
      border-color: rgba(22, 163, 74, 0.4);
    }

    body.dark-mode .prio-medium,
    body.dark-mode .badge-waiting,
    body.dark-mode .type-billing {
      background: rgba(217, 119, 6, 0.2);
      color: #fde68a;
      border-color: rgba(217, 119, 6, 0.4);
    }

    body.dark-mode .prio-high,
    body.dark-mode .prio-critical,
    body.dark-mode .type-bug,
    body.dark-mode .badge-escalated,
    body.dark-mode .sev-production {
      background: rgba(220, 38, 38, 0.2);
      color: #fca5a5;
      border-color: rgba(220, 38, 38, 0.4);
    }

    body.dark-mode .badge-assigned,
    body.dark-mode .type-feature {
      background: rgba(124, 58, 237, 0.2);
      color: #d8b4fe;
      border-color: rgba(124, 58, 237, 0.4);
    }

    body.dark-mode table thead th {
      color: #e2e8f0;
    }

    /* Enhanced Elements & Animations in Dark Mode */
    body.dark-mode .stat-card {
      background: linear-gradient(135deg, #111827 0%, #172033 100%);
      border: 1px solid rgba(255, 255, 255, 0.08);
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
      transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    }

    body.dark-mode .stat-card:hover {
      box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15), inset 0 0 0 1px var(--accent-color);
      transform: translateY(-5px);
    }

    body.dark-mode .stat-icon {
      background: rgba(255, 255, 255, 0.06);
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    }

    body.dark-mode .table-card {
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    }

    body.dark-mode tbody tr {
      transition: all 0.2s ease;
    }

    body.dark-mode tbody tr:hover {
      background: rgba(59, 130, 246, 0.12);
      box-shadow: inset 3px 0 0 0 var(--blue-400);
      transform: scale(1.002);
      z-index: 10;
      position: relative;
    }

    body.dark-mode .btn-primary {
      box-shadow: 0 4px 15px rgba(26, 101, 200, 0.6);
      border: 1px solid rgba(255, 255, 255, 0.1);
    }

    body.dark-mode .btn-primary:hover {
      box-shadow: 0 0 25px rgba(26, 101, 200, 0.9);
      background: #2e7de9;
    }

    @keyframes navPulseGlow {
      0% {
        box-shadow: inset 3px 0 0 0 var(--blue-400), 0 0 0 0 rgba(46, 125, 233, 0.4);
      }

      70% {
        box-shadow: inset 3px 0 0 0 var(--blue-400), 0 0 0 6px rgba(46, 125, 233, 0);
      }

      100% {
        box-shadow: inset 3px 0 0 0 var(--blue-400), 0 0 0 0 rgba(46, 125, 233, 0);
      }
    }

    body.dark-mode .nav-item.active {
      animation: navPulseGlow 3s infinite;
      background: linear-gradient(90deg, rgba(46, 125, 233, 0.3) 0%, transparent 100%);
      border-left: none;
    }

    body.dark-mode .topbar {
      box-shadow: 0 4px 25px rgba(0, 0, 0, 0.4);
      background: rgba(17, 24, 39, 0.95);
      backdrop-filter: blur(8px);
    }

    body {
      transition: background-color 0.3s ease, color 0.3s ease;
      font-family: var(--font-body);
      background: var(--surface-1);
      color: var(--text-primary);
      min-height: 100vh;
      overflow-x: hidden;
      line-height: 1.5;
      width: 100%;
    }

    *,
    *::before,
    *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0
    }

    html {
      font-size: 14px;
      scroll-behavior: smooth
    }

    /* ── Scrollbar ── */
    ::-webkit-scrollbar {
      width: 5px;
      height: 5px
    }

    ::-webkit-scrollbar-track {
      background: var(--gray-100)
    }

    ::-webkit-scrollbar-thumb {
      background: var(--gray-300);
      border-radius: 3px
    }

    ::-webkit-scrollbar-thumb:hover {
      background: var(--gray-400)
    }

    /* ── Auth Screen ── */
    /* ══ Login Page ══ */
    #auth-screen {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 100vh;
      position: fixed;
      inset: 0;
      z-index: 1000;
      overflow: hidden;
      background: #020b18;
    }

    /* Animated glow orbs that create the soft blue light effect */
    #auth-screen::before {
      content: '';
      position: absolute;
      inset: 0;
      background:
        radial-gradient(ellipse 55% 45% at 40% 38%, rgba(30,80,220,0.72) 0%, transparent 65%),
        radial-gradient(ellipse 40% 35% at 75% 20%, rgba(0,80,200,0.45) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 20% 80%, rgba(10,40,180,0.55) 0%, transparent 60%),
        radial-gradient(ellipse 35% 30% at 85% 75%, rgba(20,60,200,0.35) 0%, transparent 55%);
      animation: bgGlowShift 14s ease-in-out infinite alternate;
      pointer-events: none;
    }

    @keyframes bgGlowShift {
      0%   {
        background:
          radial-gradient(ellipse 55% 45% at 40% 38%, rgba(30,80,220,0.72) 0%, transparent 65%),
          radial-gradient(ellipse 40% 35% at 75% 20%, rgba(0,80,200,0.45) 0%, transparent 60%),
          radial-gradient(ellipse 50% 40% at 20% 80%, rgba(10,40,180,0.55) 0%, transparent 60%),
          radial-gradient(ellipse 35% 30% at 85% 75%, rgba(20,60,200,0.35) 0%, transparent 55%);
      }
      33%  {
        background:
          radial-gradient(ellipse 60% 50% at 55% 55%, rgba(20,60,210,0.75) 0%, transparent 65%),
          radial-gradient(ellipse 45% 38% at 15% 25%, rgba(0,60,190,0.5) 0%, transparent 60%),
          radial-gradient(ellipse 45% 35% at 80% 70%, rgba(15,50,200,0.6) 0%, transparent 60%),
          radial-gradient(ellipse 30% 28% at 60% 10%, rgba(10,80,220,0.3) 0%, transparent 55%);
      }
      66%  {
        background:
          radial-gradient(ellipse 50% 42% at 25% 60%, rgba(25,70,215,0.68) 0%, transparent 65%),
          radial-gradient(ellipse 42% 40% at 70% 35%, rgba(0,70,210,0.5) 0%, transparent 60%),
          radial-gradient(ellipse 55% 38% at 50% 85%, rgba(20,55,195,0.55) 0%, transparent 60%),
          radial-gradient(ellipse 38% 32% at 10% 50%, rgba(15,65,210,0.4) 0%, transparent 55%);
      }
      100% {
        background:
          radial-gradient(ellipse 58% 48% at 60% 30%, rgba(30,75,225,0.7) 0%, transparent 65%),
          radial-gradient(ellipse 44% 36% at 20% 70%, rgba(5,65,205,0.48) 0%, transparent 60%),
          radial-gradient(ellipse 48% 42% at 85% 55%, rgba(15,50,200,0.58) 0%, transparent 60%),
          radial-gradient(ellipse 32% 30% at 45% 15%, rgba(20,70,215,0.32) 0%, transparent 55%);
      }
    }

    /* ── Outer container — white floating card ── */
    .auth-container {
      position: relative;
      z-index: 1;
      width: 92%;
      max-width: 980px;
      min-height: 580px;
      background: #ffffff;
      border-radius: 28px;
      box-shadow:
        0 4px 6px rgba(0,0,0,0.04),
        0 20px 50px rgba(0,0,0,0.18),
        0 60px 120px rgba(0,0,0,0.12);
      display: flex;
      align-items: stretch;
      overflow: hidden;
      animation: authFadeIn 0.65s cubic-bezier(0.22,1,0.36,1);
    }

    @keyframes authFadeIn {
      from { opacity: 0; transform: translateY(28px) scale(0.97); }
      to   { opacity: 1; transform: translateY(0) scale(1); }
    }

    /* ══ Left panel — Form ══ */
    .auth-left {
      flex: 0 0 420px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      padding: 52px 48px;
      background: #ffffff;
      position: relative;
    }

    /* Logo */
    .auth-left-logo {
      width: 120px;
      height: 120px;
      object-fit: contain;
      display: block;
      margin-bottom: 8px;
    }

    .auth-brand-name {
      font-family: var(--font-display);
      font-size: 18px;
      letter-spacing: 3.5px;
      color: #2563eb;
      margin-bottom: 32px;
      line-height: 1;
    }

    .auth-title {
      font-size: 27px;
      font-weight: 700;
      color: #0f172a;
      margin-bottom: 5px;
      letter-spacing: -0.4px;
    }

    .auth-subtitle {
      font-size: 13.5px;
      color: #94a3b8;
      margin-bottom: 30px;
    }

    /* ── Form inputs ── */
    .auth-input-group { margin-bottom: 18px; }

    .auth-input-label {
      display: block;
      font-size: 13px;
      font-weight: 500;
      color: #374151;
      margin-bottom: 7px;
    }

    .auth-input {
      width: 100%;
      padding: 12px 16px;
      border: 1.5px solid #e2e8f0;
      border-radius: 10px;
      font-size: 14px;
      color: #0f172a;
      background: #f8fafc;
      outline: none;
      transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
      box-sizing: border-box;
    }

    .auth-input:focus {
      border-color: #3b82f6;
      background: #fff;
      box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
    }

    .auth-input::placeholder { color: #c1ccd8; }

    .auth-btn-primary {
      width: 100%;
      padding: 13px;
      background: #2563eb;
      color: #fff;
      border: none;
      border-radius: 50px;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
      margin-top: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      box-shadow: 0 4px 16px rgba(37,99,235,0.38);
      letter-spacing: 0.2px;
    }

    .auth-btn-primary:hover {
      background: #1d4ed8;
      box-shadow: 0 6px 22px rgba(37,99,235,0.45);
    }

    .auth-btn-primary:active { transform: scale(0.99); }

    .auth-error-box {
      margin-top: 12px;
      padding: 10px 13px;
      background: #fef2f2;
      border: 1px solid rgba(220,38,38,0.2);
      border-radius: 8px;
      font-size: 12.5px;
      color: #dc2626;
      display: none;
    }

    .auth-error-box.visible { display: block; }

    /* ══ Right panel — Fluid animation ══ */
    .auth-right {
      flex: 1;
      position: relative;
      overflow: hidden;
      background: #0d1b4b;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    /* Animated fluid blobs */
    .auth-blob {
      position: absolute;
      border-radius: 50%;
      filter: blur(72px);
      opacity: 0.72;
      will-change: transform;
    }

    .auth-blob-1 {
      width: 480px; height: 480px;
      background: radial-gradient(circle, #1e40af 0%, #1d4ed8 45%, transparent 70%);
      top: -120px; right: -80px;
      animation: blob1Move 14s ease-in-out infinite;
    }

    .auth-blob-2 {
      width: 380px; height: 380px;
      background: radial-gradient(circle, #3730a3 0%, #4f46e5 50%, transparent 70%);
      bottom: -60px; left: -40px;
      animation: blob2Move 18s ease-in-out infinite;
    }

    .auth-blob-3 {
      width: 300px; height: 300px;
      background: radial-gradient(circle, #1e3a8a 0%, #2563eb 50%, transparent 70%);
      top: 35%; left: 20%;
      animation: blob3Move 22s ease-in-out infinite;
    }

    .auth-blob-4 {
      width: 220px; height: 220px;
      background: radial-gradient(circle, #6366f1 0%, #4338ca 55%, transparent 70%);
      bottom: 15%; right: 10%;
      animation: blob4Move 16s ease-in-out infinite;
      opacity: 0.5;
    }

    @keyframes blob1Move {
      0%,100% { transform: translate(0,0) scale(1); }
      33%      { transform: translate(-60px, 80px) scale(1.08); }
      66%      { transform: translate(40px, 30px) scale(0.94); }
    }

    @keyframes blob2Move {
      0%,100% { transform: translate(0,0) scale(1); }
      40%      { transform: translate(80px,-60px) scale(1.12); }
      70%      { transform: translate(20px,-30px) scale(0.9); }
    }

    @keyframes blob3Move {
      0%,100% { transform: translate(0,0) scale(1); }
      50%      { transform: translate(-50px, 70px) scale(1.06); }
    }

    @keyframes blob4Move {
      0%,100% { transform: translate(0,0) scale(1); }
      45%      { transform: translate(-40px,-50px) scale(1.15); }
      80%      { transform: translate(30px,20px) scale(0.88); }
    }

    /* Subtle mesh/grain overlay on the right panel */
    .auth-right::after {
      content: '';
      position: absolute;
      inset: 0;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
      pointer-events: none;
      mix-blend-mode: overlay;
    }

    /* Centered icon + text on the right panel */
    .auth-right-content {
      position: relative;
      z-index: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 18px;
      text-align: center;
      padding: 40px;
    }

    .auth-right-icon {
      width: 80px; height: 80px;
      border-radius: 22px;
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.14);
      display: flex; align-items: center; justify-content: center;
      font-size: 32px;
      color: rgba(255,255,255,0.85);
      backdrop-filter: blur(12px);
      box-shadow: 0 8px 32px rgba(0,0,0,0.25);
      animation: iconFloat 5s ease-in-out infinite;
    }

    @keyframes iconFloat {
      0%,100% { transform: translateY(0); }
      50%      { transform: translateY(-10px); }
    }

    .auth-right-headline {
      font-size: 34px;
      font-weight: 700;
      color: rgba(255,255,255,0.92);
      letter-spacing: -0.5px;
      line-height: 1.25;
    }

    .auth-right-desc {
      font-size: 13.5px;
      color: rgba(255,255,255,0.48);
      line-height: 1.65;
      max-width: 260px;
    }

    /* Three pill stats */
    .auth-right-stats {
      display: flex;
      flex-direction: column;
      gap: 10px;
      width: 100%;
      max-width: 260px;
    }

    .auth-right-stat {
      display: flex;
      align-items: center;
      gap: 12px;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 12px;
      padding: 10px 16px;
      backdrop-filter: blur(8px);
    }

    .auth-right-stat-icon {
      font-size: 14px;
      color: rgba(147,197,253,0.9);
      flex-shrink: 0;
    }

    .auth-right-stat-text {
      font-size: 12.5px;
      color: rgba(255,255,255,0.65);
      font-weight: 500;
    }

    @media (max-width: 860px) {
      .auth-right { display: none; }
      .auth-container { max-width: 460px; }
      .auth-left { flex: 1; padding: 44px 36px; }
    }

    /* ── Form Elements ── */
    .form-group {
      margin-bottom: 16px
    }

    .form-label {
      display: block;
      font-size: 11px;
      font-weight: 600;
      color: var(--gray-600);
      text-transform: uppercase;
      letter-spacing: 0.9px;
      margin-bottom: 7px;
      font-family: var(--font-mono);
    }

    .form-control {
      width: 100%;
      padding: 10px 14px;
      background: var(--surface-3);
      border: 1.5px solid var(--border-bright);
      border-radius: var(--radius);
      color: var(--text-primary);
      font-family: var(--font-body);
      font-size: 14px;
      transition: var(--transition);
      outline: none;
    }

    .form-control:focus {
      border-color: var(--blue-500);
      background: var(--white);
      box-shadow: 0 0 0 3px rgba(26, 101, 200, 0.12);
    }

    .form-control::placeholder {
      color: var(--text-muted)
    }

    select.form-control option {
      background: var(--white);
      color: var(--text-primary)
    }

    textarea.form-control {
      resize: vertical;
      min-height: 100px
    }

    .form-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px
    }

    .form-hint {
      font-size: 11px;
      color: var(--text-muted);
      margin-top: 4px
    }

    /* ── Buttons ── */
    .btn {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 9px 18px;
      border-radius: var(--radius);
      font-family: var(--font-body);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      border: none;
      outline: none;
      transition: var(--transition);
      text-decoration: none;
      white-space: nowrap;
      letter-spacing: 0.2px;
    }

    .btn-primary {
      background: var(--blue-500);
      color: #fff;
      box-shadow: var(--shadow-blue);
    }

    .btn-primary:hover {
      background: var(--blue-600);
      transform: translateY(-1px);
      box-shadow: 0 6px 20px rgba(26, 101, 200, 0.35)
    }

    .btn-secondary {
      background: var(--white);
      color: var(--text-primary);
      border: 1.5px solid var(--border-bright);
    }

    .btn-secondary:hover {
      background: var(--gray-50);
      border-color: var(--gray-400)
    }

    .btn-danger {
      background: var(--red-500);
      color: #fff;
      box-shadow: var(--shadow-red)
    }

    .btn-danger:hover {
      background: var(--red-600)
    }

    .btn-outline {
      background: transparent;
      color: var(--blue-600);
      border: 1.5px solid var(--blue-200);
    }

    .btn-outline:hover {
      background: var(--blue-50);
      border-color: var(--blue-400)
    }

    .btn-sm {
      padding: 6px 12px;
      font-size: 12px
    }

    .btn-xs {
      padding: 4px 10px;
      font-size: 11px
    }

    .btn-icon {
      padding: 7px;
      border-radius: var(--radius);
      background: var(--white);
      border: 1.5px solid var(--border-bright);
      color: var(--gray-500);
      cursor: pointer;
      transition: var(--transition)
    }

    .btn-icon:hover {
      background: var(--gray-100);
      color: var(--text-primary)
    }

    .btn-full {
      width: 100%;
      justify-content: center
    }

    /* ── App Shell ── */
    #app {
      display: none;
      min-height: 100vh
    }

    .app-layout {
      display: flex;
      min-height: 100vh;
      width: 100%;
      max-width: 100vw;
      overflow-x: hidden;
    }

    /* ── Sidebar ── */
    /* ── Liquid Glass Sidebar ── */
    .sidebar {
      width: var(--sidebar-w);
      min-width: var(--sidebar-w);
      background: linear-gradient(
        160deg,
        rgba(8, 20, 55, 0.92) 0%,
        rgba(5, 14, 38, 0.96) 50%,
        rgba(10, 22, 60, 0.93) 100%
      );
      backdrop-filter: blur(28px) saturate(1.6);
      -webkit-backdrop-filter: blur(28px) saturate(1.6);
      border-right: 1px solid rgba(255, 255, 255, 0.08);
      box-shadow:
        inset 1px 0 0 rgba(255,255,255,0.04),
        4px 0 32px rgba(0, 0, 0, 0.45),
        0 0 0 0.5px rgba(46, 125, 233, 0.12);
      display: flex;
      flex-direction: column;
      position: fixed;
      top: 0;
      left: 0;
      height: 100vh;
      z-index: 100;
      transition: transform var(--transition);
      overflow: hidden;
    }

    /* Ambient light shimmer overlay */
    .sidebar::before {
      content: '';
      position: absolute;
      top: 0; left: 0; right: 0;
      height: 220px;
      background: radial-gradient(
        ellipse 180% 60% at 60% 0%,
        rgba(46, 125, 233, 0.18) 0%,
        transparent 70%
      );
      pointer-events: none;
      z-index: 0;
    }

    /* Bottom ambient glow */
    .sidebar::after {
      content: '';
      position: absolute;
      bottom: 0; left: 0; right: 0;
      height: 160px;
      background: radial-gradient(
        ellipse 160% 50% at 40% 100%,
        rgba(99, 179, 237, 0.08) 0%,
        transparent 70%
      );
      pointer-events: none;
      z-index: 0;
    }

    .sidebar-header {
      height: var(--header-h);
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 0 18px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.07);
      flex-shrink: 0;
      position: relative;
      z-index: 1;
      background: rgba(255, 255, 255, 0.025);
    }

    .logo-mark {
      width: 34px;
      height: 34px;
      background: rgba(255, 255, 255, 0.95);
      border: 1px solid rgba(255, 255, 255, 0.15);
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-family: var(--font-display);
      font-size: 18px;
      overflow: hidden;
      flex-shrink: 0;
      box-shadow:
        0 2px 12px rgba(46, 125, 233, 0.35),
        inset 0 1px 0 rgba(255,255,255,0.8);
    }

    .logo-mark img {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }

    .logo-text {
      font-family: var(--font-display);
      font-size: 17px;
      font-weight: 400;
      letter-spacing: 3px;
      color: rgba(255, 255, 255, 0.92);
      text-shadow: 0 0 20px rgba(46, 125, 233, 0.4);
    }

    .logo-text span {
      color: rgba(147, 197, 253, 0.9);
    }

    .sidebar-nav {
      flex: 1;
      overflow-y: auto;
      padding: 12px 10px;
      position: relative;
      z-index: 1;
      scrollbar-width: thin;
      scrollbar-color: rgba(255,255,255,0.1) transparent;
    }

    .sidebar-nav::-webkit-scrollbar { width: 3px; }
    .sidebar-nav::-webkit-scrollbar-track { background: transparent; }
    .sidebar-nav::-webkit-scrollbar-thumb {
      background: rgba(255,255,255,0.12);
      border-radius: 3px;
    }

    .nav-section-label {
      font-size: 9.5px;
      font-weight: 600;
      color: rgba(255, 255, 255, 0.22);
      text-transform: uppercase;
      letter-spacing: 1.5px;
      padding: 16px 10px 6px;
      font-family: var(--font-mono);
    }

    .nav-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 12px;
      margin: 1px 0;
      color: rgba(255, 255, 255, 0.55);
      cursor: pointer;
      font-size: 13px;
      font-weight: 400;
      border-radius: 10px;
      border: 1px solid transparent;
      user-select: none;
      position: relative;
      transition: all 0.2s ease;
    }

    .nav-item:hover {
      background: rgba(255, 255, 255, 0.07);
      border-color: rgba(255, 255, 255, 0.08);
      color: rgba(255, 255, 255, 0.88);
      transform: translateX(1px);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
    }

    .nav-item.active {
      background: linear-gradient(
        135deg,
        rgba(46, 125, 233, 0.28) 0%,
        rgba(46, 125, 233, 0.14) 100%
      );
      border-color: rgba(46, 125, 233, 0.4);
      color: #fff;
      font-weight: 500;
      box-shadow:
        0 4px 16px rgba(46, 125, 233, 0.2),
        inset 0 1px 0 rgba(255,255,255,0.12),
        inset 0 0 0 0.5px rgba(46, 125, 233, 0.3);
      text-shadow: 0 0 12px rgba(147, 197, 253, 0.5);
    }

    /* Glowing left accent for active */
    .nav-item.active::before {
      content: '';
      position: absolute;
      left: 0; top: 50%;
      transform: translateY(-50%);
      width: 3px;
      height: 60%;
      background: linear-gradient(180deg, #93c5fd, #3b82f6, #1d4ed8);
      border-radius: 0 3px 3px 0;
      box-shadow: 0 0 8px rgba(59, 130, 246, 0.7), 0 0 16px rgba(59, 130, 246, 0.3);
    }

    .nav-item.sub-item {
      padding-left: 28px;
      font-size: 12.5px;
      opacity: 0.9;
    }

    .nav-item.sub-item .nav-icon {
      font-size: 11px;
      width: 14px;
      color: var(--danger-color);
    }

    .nav-item .nav-icon {
      width: 16px;
      text-align: center;
      font-size: 13px;
      flex-shrink: 0;
      filter: drop-shadow(0 0 4px rgba(147, 197, 253, 0));
      transition: filter 0.2s ease;
    }

    .nav-item.active .nav-icon {
      filter: drop-shadow(0 0 6px rgba(147, 197, 253, 0.6));
    }

    .nav-counter {
      margin-left: auto;
      font-size: 10px;
      font-weight: 700;
      min-width: 18px;
      height: 18px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
    }

    .badge-new {
      background: linear-gradient(135deg, #3b82f6, #1d4ed8);
      color: #fff;
      border: 1px solid rgba(147, 197, 253, 0.3);
    }

    .badge-breach {
      background: linear-gradient(135deg, #ef4444, #b91c1c);
      color: #fff;
      border: 1px solid rgba(252, 165, 165, 0.3);
    }

    /* Approvals nav highlight */
    .nav-item.approvals-highlight {
      background: linear-gradient(
        135deg,
        rgba(245, 158, 11, 0.22) 0%,
        rgba(245, 158, 11, 0.10) 100%
      );
      border-color: rgba(245, 158, 11, 0.4);
      color: #fbbf24;
      animation: approval-pulse 2.5s ease-in-out infinite;
      box-shadow:
        0 4px 16px rgba(245, 158, 11, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }

    .nav-item.approvals-highlight .nav-counter {
      background: linear-gradient(135deg, #f59e0b, #d97706);
      color: #000;
      border: 1px solid rgba(253, 230, 138, 0.4);
    }

    @keyframes approval-pulse {
      0%, 100% {
        box-shadow: 0 4px 16px rgba(245, 158, 11, 0.12), inset 0 1px 0 rgba(255,255,255,0.06);
      }
      50% {
        box-shadow: 0 4px 24px rgba(245, 158, 11, 0.28), inset 0 1px 0 rgba(255,255,255,0.1);
      }
    }

    /* Approval cards */
    .approval-card {
      background: var(--bg-light);
      border: 1px solid var(--border-color);
      border-radius: 10px;
      margin-bottom: 14px;
      overflow: hidden;
      transition: box-shadow 0.2s;
    }

    .approval-card.pending {
      border-left: 4px solid #f59e0b;
    }

    .approval-card.approved {
      border-left: 4px solid var(--green-500);
    }

    .approval-card.rejected {
      border-left: 4px solid var(--danger-color);
    }

    .approval-card-header {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px 16px;
      flex-wrap: wrap;
    }

    .approval-card-body {
      padding: 0 16px 14px 16px;
      border-top: 1px solid var(--border-color);
    }

    .approval-detail-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 8px;
      padding: 10px 0 6px 0;
    }

    .approval-detail-item {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .approval-detail-label {
      font-size: 10px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--text-muted);
    }

    .approval-detail-value {
      font-size: 13px;
      color: var(--text-primary);
      word-break: break-word;
    }

    .approval-detail-changed {
      background: #fffbeb;
      border: 1px solid #fde68a;
      border-radius: 6px;
      padding: 6px 8px;
    }

    .approval-diff-cell {
      display: flex;
      align-items: center;
      gap: 5px;
      flex-wrap: wrap;
    }

    .approval-diff-old {
      font-size: 12px;
      color: #b91c1c;
      background: #fee2e2;
      border-radius: 4px;
      padding: 1px 6px;
      text-decoration: line-through;
      font-weight: 500;
    }

    .approval-diff-new {
      font-size: 12px;
      color: #15803d;
      background: #dcfce7;
      border-radius: 4px;
      padding: 1px 6px;
      font-weight: 600;
    }

    .btn-approve {
      background: #16a34a;
      color: #fff;
      border: none;
      padding: 7px 16px;
      border-radius: 6px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      transition: background 0.15s;
    }

    .btn-approve:hover {
      background: #15803d;
    }

    .btn-reject {
      background: #dc2626;
      color: #fff;
      border: none;
      padding: 7px 16px;
      border-radius: 6px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      transition: background 0.15s;
    }

    .btn-reject:hover {
      background: #b91c1c;
    }

    .sidebar-footer {
      padding: 12px 10px;
      border-top: 1px solid rgba(255, 255, 255, 0.07);
      flex-shrink: 0;
      position: relative;
      z-index: 1;
      background: rgba(255, 255, 255, 0.02);
    }

    .user-card {
      display: flex;
      align-items: center;
      gap: 10px;
      cursor: pointer;
      padding: 9px 10px;
      border-radius: 10px;
      border: 1px solid transparent;
      transition: all 0.2s ease;
    }

    .user-card:hover {
      background: rgba(255, 255, 255, 0.07);
      border-color: rgba(255, 255, 255, 0.09);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
    }

    .user-avatar {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background: linear-gradient(135deg, #1d4ed8, #2563eb);
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: var(--font-display);
      font-weight: 400;
      font-size: 13px;
      letter-spacing: 1px;
      color: #fff;
      flex-shrink: 0;
      border: 1.5px solid rgba(147, 197, 253, 0.4);
      box-shadow: 0 0 12px rgba(59, 130, 246, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
    }

    .user-info {
      flex: 1;
      min-width: 0
    }

    .user-name {
      font-size: 12px;
      font-weight: 500;
      color: rgba(255, 255, 255, 0.9)
    }

    .user-role {
      font-size: 10px;
      color: rgba(147, 197, 253, 0.5);
      font-family: var(--font-mono)
    }

    .user-card-action {
      font-size: 10px;
      color: rgba(255, 255, 255, 0.25)
    }

    /* ── Main Content ── */
    .main-content {
      margin-left: var(--sidebar-w);
      flex: 1;
      display: flex;
      flex-direction: column;
      min-height: 100vh;
      min-width: 0;
      /* Crucial for flexbox children to shrink */
    }

    .topbar {
      height: var(--header-h);
      background: var(--white);
      border-bottom: 1.5px solid var(--gray-200);
      display: flex;
      align-items: center;
      padding: 0 24px;
      gap: 16px;
      position: sticky;
      top: 0;
      z-index: 50;
      flex-shrink: 0;
      box-shadow: 0 1px 0 var(--gray-200);
    }

    .topbar-title {
      font-family: var(--font-display);
      font-size: 20px;
      font-weight: 400;
      letter-spacing: 2px;
      color: var(--black);
      flex: 1;
      text-transform: uppercase;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      min-width: 0;
    }

    .topbar-search {
      display: flex;
      align-items: center;
      gap: 8px;
      background: var(--gray-100);
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius);
      padding: 7px 14px;
      width: 240px;
      transition: var(--transition);
    }

    .topbar-search:focus-within {
      border-color: var(--blue-400);
      background: var(--white);
      box-shadow: 0 0 0 3px rgba(26, 101, 200, 0.1);
    }

    .topbar-search input {
      background: none;
      border: none;
      outline: none;
      color: var(--text-primary);
      font-family: var(--font-body);
      font-size: 13px;
      width: 100%;
    }

    .topbar-search input::placeholder {
      color: var(--text-muted)
    }

    .topbar-search .search-icon {
      color: var(--text-muted);
      font-size: 12px
    }

    .notif-btn {
      position: relative;
      width: 36px;
      height: 36px;
      background: var(--white);
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: var(--gray-500);
      transition: var(--transition);
    }

    .notif-btn:hover {
      border-color: var(--blue-300);
      color: var(--blue-500)
    }

    .theme-toggle-btn {
      width: 36px;
      height: 36px;
      background: var(--white);
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: var(--gray-500);
      transition: var(--transition);
    }

    .theme-toggle-btn:hover {
      border-color: var(--blue-300);
      color: var(--blue-500);
      background: var(--gray-50);
    }

    body.dark-mode .theme-toggle-btn i::before {
      content: "\f185";
      /* sun icon fa-sun */
      color: #fbbf24;
    }

    body.dark-mode .theme-toggle-btn {
      background: #1f2937;
      border-color: #374151;
    }

    /* ── Comprehensive Dark Mode Overrides ── */
    body.dark-mode {
      color-scheme: dark;
    }

    /* Fix undefined --border-color alias */
    :root { --border-color: rgba(17, 24, 39, 0.12); }
    body.dark-mode { --border-color: rgba(255, 255, 255, 0.1); }

    /* Topbar */
    body.dark-mode .topbar {
      background: #111827;
      border-bottom: 1px solid rgba(255,255,255,0.07);
    }
    body.dark-mode .topbar-search {
      background: #1f2937;
      border-color: rgba(255,255,255,0.1);
    }
    body.dark-mode .topbar-search input {
      background: transparent;
      color: #f1f5f9;
    }
    body.dark-mode .topbar-search input::placeholder { color: #64748b; }

    /* Page content & cards */
    body.dark-mode .page-content,
    body.dark-mode .table-card,
    body.dark-mode .detail-panel,
    body.dark-mode .modal,
    body.dark-mode .dropdown-menu,
    body.dark-mode .auth-card {
      background: #111827;
      border-color: rgba(255,255,255,0.08);
    }

    body.dark-mode .modal-header,
    body.dark-mode .detail-panel-header {
      background: #1a2332;
      border-bottom-color: rgba(255,255,255,0.08);
    }

    /* Tables */
    body.dark-mode table {
      color: #e2e8f0;
    }
    body.dark-mode table thead {
      background: #1a2332;
    }
    body.dark-mode table thead th {
      background: #1a2332;
      border-bottom: 1px solid rgba(255,255,255,0.08);
      color: #94a3b8;
    }
    body.dark-mode table tbody td {
      border-color: rgba(255,255,255,0.06);
      color: #e2e8f0;
    }
    body.dark-mode .ticket-row:hover td,
    body.dark-mode tbody tr:hover td {
      background: rgba(46,125,233,0.08);
    }

    /* Forms */
    body.dark-mode .form-control,
    body.dark-mode input[type="text"],
    body.dark-mode input[type="email"],
    body.dark-mode input[type="password"],
    body.dark-mode input[type="number"],
    body.dark-mode input[type="date"],
    body.dark-mode input[type="search"],
    body.dark-mode textarea,
    body.dark-mode select {
      background: #1f2937;
      border-color: rgba(255,255,255,0.12);
      color: #f1f5f9;
    }
    body.dark-mode .form-control:focus,
    body.dark-mode input:focus,
    body.dark-mode textarea:focus,
    body.dark-mode select:focus {
      background: #263347;
      border-color: var(--blue-400);
      color: #f1f5f9;
    }
    body.dark-mode .form-control::placeholder,
    body.dark-mode input::placeholder,
    body.dark-mode textarea::placeholder { color: #64748b; }
    body.dark-mode select option {
      background: #1f2937;
      color: #f1f5f9;
    }

    /* Info rows & labels */
    body.dark-mode .info-row {
      border-color: rgba(255,255,255,0.06);
    }
    body.dark-mode .info-row-label { color: #94a3b8; }

    /* Buttons */
    body.dark-mode .btn-outline,
    body.dark-mode .btn-secondary {
      background: #1f2937;
      border-color: rgba(255,255,255,0.15);
      color: #e2e8f0;
    }
    body.dark-mode .btn-outline:hover,
    body.dark-mode .btn-secondary:hover {
      background: #263347;
      border-color: rgba(255,255,255,0.25);
    }

    /* Sidebar user area & footer */
    body.dark-mode .sidebar-footer,
    body.dark-mode .sidebar-user {
      border-top-color: rgba(255,255,255,0.07);
    }

    /* Timeline / chat bubbles */
    body.dark-mode .timeline-item,
    body.dark-mode .chat-bubble {
      background: #1a2332;
      border-color: rgba(255,255,255,0.08);
    }
    body.dark-mode .timeline-body {
      background: #1f2937;
      border-color: rgba(255,255,255,0.08);
    }

    /* Tickets list row */
    body.dark-mode .ticket-row {
      border-bottom-color: rgba(255,255,255,0.06);
    }
    body.dark-mode .ticket-row:hover {
      background: rgba(46,125,233,0.08);
    }

    /* SLA bar */
    body.dark-mode .sla-bar {
      background: rgba(255,255,255,0.08);
    }

    /* Scrollbar dark */
    body.dark-mode ::-webkit-scrollbar-track { background: #111827; }
    body.dark-mode ::-webkit-scrollbar-thumb { background: #374151; }

    /* Inline-style modals (using var(--white) already — but shadow needs update) */
    body.dark-mode [style*="background:var(--white)"],
    body.dark-mode [style*="background: var(--white)"] {
      box-shadow: 0 20px 60px rgba(0,0,0,0.6) !important;
    }

    /* Dropdown & popover panels */
    body.dark-mode .notif-panel,
    body.dark-mode .search-results-panel,
    body.dark-mode .tag-autocomplete {
      background: #1f2937;
      border-color: rgba(255,255,255,0.1);
      box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    }

    /* Section dividers */
    body.dark-mode hr,
    body.dark-mode .divider {
      border-color: rgba(255,255,255,0.08);
    }

    /* Input group addons */
    body.dark-mode .input-group-text {
      background: #263347;
      border-color: rgba(255,255,255,0.12);
      color: #94a3b8;
    }

    /* Code blocks */
    body.dark-mode pre,
    body.dark-mode code {
      background: #0d1117;
      border-color: rgba(255,255,255,0.08);
      color: #e2e8f0;
    }

    /* Section headers in settings/admin pages */
    body.dark-mode .section-title {
      color: #94a3b8;
      border-bottom-color: rgba(255,255,255,0.08);
    }

    /* Checkbox & radio */
    body.dark-mode input[type="checkbox"],
    body.dark-mode input[type="radio"] {
      accent-color: var(--blue-400);
    }

    /* Text muted override */
    body.dark-mode .text-muted { color: #64748b; }

    .notif-dot {
      position: absolute;
      top: 6px;
      right: 6px;
      width: 7px;
      height: 7px;
      background: var(--red-500);
      border-radius: 50%;
      border: 1.5px solid var(--white);
    }

    .page-content {
      flex: 1;
      padding: 24px;
      overflow-y: auto
    }

    .mobile-toggle {
      display: none;
      width: 36px;
      height: 36px;
      background: var(--white);
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius);
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: var(--gray-500);
      font-size: 14px;
    }

    /* ── Pages ── */
    .page {
      display: none
    }

    .page.active {
      display: block
    }

    /* ── Dashboard Stats Grid ── */
    .stats-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 16px;
      margin-bottom: 24px;
    }

    .stat-card {
      background: var(--white);
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius-lg);
      padding: 20px;
      position: relative;
      overflow: hidden;
      transition: var(--transition);
    }

    .stat-card:hover {
      border-color: var(--blue-200);
      transform: translateY(-2px);
      box-shadow: var(--shadow-md)
    }

    .stat-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      background: var(--accent-color, var(--blue-400));
    }

    .stat-card.accent-green {
      --accent-color: #16a34a
    }

    .stat-card.accent-amber {
      --accent-color: var(--amber)
    }

    .stat-card.accent-red {
      --accent-color: var(--red-500)
    }

    .stat-card.accent-sky {
      --accent-color: var(--blue-500)
    }

    .stat-card.accent-violet {
      --accent-color: var(--violet)
    }

    .stat-card.accent-orange {
      --accent-color: var(--orange)
    }

    .stat-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      margin-bottom: 14px;
    }

    .stat-label {
      font-size: 11px;
      font-weight: 600;
      color: var(--gray-500);
      text-transform: uppercase;
      letter-spacing: 0.9px;
      font-family: var(--font-mono);
    }

    .stat-icon {
      width: 32px;
      height: 32px;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--blue-50);
      font-size: 13px;
      color: var(--accent-color, var(--blue-500));
    }

    .stat-value {
      font-family: var(--font-display);
      font-size: 38px;
      font-weight: 400;
      letter-spacing: 1px;
      color: var(--black);
      line-height: 1;
      margin-bottom: 8px;
    }

    .stat-trend {
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 12px;
      color: var(--text-muted);
    }

    .trend-up {
      color: #16a34a
    }

    .trend-down {
      color: var(--red-500)
    }

    /* ── Section Header ── */
    .section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 16px;
    }

    .section-header>div:first-child {
      flex: 1;
      min-width: 0;
      margin-right: 16px;
    }

    .section-title {
      font-family: var(--font-display);
      font-size: 18px;
      font-weight: 400;
      letter-spacing: 1.5px;
      color: var(--black);
      text-transform: uppercase;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .section-header .btn {
      flex-shrink: 0;
    }

    .section-subtitle {
      font-size: 12px;
      color: var(--text-muted);
      margin-top: 2px;
      font-family: var(--font-body);
      text-transform: none;
      letter-spacing: 0;
    }

    /* ── Table ── */
    .table-card {
      background: var(--white);
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius-lg);
      overflow: hidden;
    }

    .table-toolbar {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 14px 16px;
      border-bottom: 1.5px solid var(--gray-100);
      flex-wrap: wrap;
      background: var(--gray-50);
    }

    .table-toolbar>* {
      flex: 1 1 auto;
      min-width: 140px;
    }

    .table-toolbar .topbar-search {
      flex: 2 1 200px;
    }

    .filter-select {
      background: var(--white);
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius);
      color: var(--text-primary);
      font-family: var(--font-body);
      font-size: 12px;
      padding: 6px 10px;
      outline: none;
      cursor: pointer;
      min-width: 120px;
    }

    .filter-select:focus {
      border-color: var(--blue-400)
    }

    .table-wrap {
      overflow-x: auto
    }

    table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px
    }

    thead th {
      text-align: left;
      padding: 10px 14px;
      font-size: 10px;
      font-weight: 600;
      color: var(--gray-500);
      text-transform: uppercase;
      letter-spacing: 0.9px;
      font-family: var(--font-mono);
      background: var(--gray-50);
      border-bottom: 1.5px solid var(--gray-200);
      white-space: nowrap;
    }

    tbody tr {
      border-bottom: 1px solid var(--gray-100);
      transition: var(--transition);
    }

    tbody tr:last-child {
      border-bottom: none
    }

    tbody tr:hover {
      background: var(--blue-50);
      cursor: pointer
    }

    tbody td {
      padding: 11px 14px;
      color: var(--text-primary);
      vertical-align: middle
    }

    .table-footer {
      padding: 12px 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-top: 1px solid var(--gray-100);
      font-size: 12px;
      color: var(--text-muted);
      background: var(--gray-50);
    }

    /* ── Badges / Status Pills ── */
    .badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px 9px;
      border-radius: 4px;
      font-size: 11px;
      font-weight: 600;
      font-family: var(--font-mono);
      white-space: nowrap;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .badge-new {
      background: var(--blue-50);
      color: var(--blue-600);
      border: 1px solid var(--blue-100)
    }

    .badge-assigned {
      background: var(--violet-lt, #ede9fe);
      color: var(--violet, #7c3aed);
      border: 1px solid rgba(124, 58, 237, 0.2)
    }

    .badge-progress {
      background: #dcfce7;
      color: #15803d;
      border: 1px solid #bbf7d0
    }

    .badge-waiting {
      background: var(--orange-lt, #ffedd5);
      color: var(--orange, #ea580c);
      border: 1px solid rgba(234, 88, 12, 0.2)
    }

    .badge-escalated {
      background: var(--red-100);
      color: var(--red-600);
      border: 1px solid rgba(220, 38, 38, 0.2)
    }

    .badge-resolved {
      background: #dcfce7;
      color: #166534;
      border: 1px solid #bbf7d0
    }

    .badge-closed {
      background: var(--gray-100);
      color: var(--gray-500);
      border: 1px solid var(--gray-200)
    }

    .prio-critical {
      background: var(--red-100);
      color: var(--red-600);
      border: 1px solid rgba(220, 38, 38, 0.25)
    }

    .prio-high {
      background: var(--orange-lt, #ffedd5);
      color: var(--orange, #ea580c);
      border: 1px solid rgba(234, 88, 12, 0.25)
    }

    .prio-medium {
      background: var(--amber-lt, #fef3c7);
      color: var(--amber, #d97706);
      border: 1px solid rgba(217, 119, 6, 0.25)
    }

    .prio-low {
      background: #dcfce7;
      color: #15803d;
      border: 1px solid #bbf7d0
    }

    .type-bug {
      background: var(--red-100);
      color: var(--red-600)
    }

    .type-feature {
      background: var(--violet-lt, #ede9fe);
      color: var(--violet, #7c3aed)
    }

    .type-support {
      background: var(--blue-50);
      color: var(--blue-600)
    }

    .type-billing {
      background: var(--amber-lt, #fef3c7);
      color: var(--amber, #d97706)
    }

    .type-integration {
      background: #dcfce7;
      color: #15803d
    }

    .sev-production {
      background: var(--red-100);
      color: var(--red-700);
      font-weight: 700
    }

    /* ── Ticket Number ── */
    .ticket-num {
      font-family: var(--font-mono);
      font-size: 12px;
      color: var(--blue-600);
      font-weight: 600;
    }

    /* ── SLA Timer ── */
    .sla-timer {
      display: flex;
      align-items: center;
      gap: 6px;
      font-family: var(--font-mono);
      font-size: 12px;
    }

    .sla-timer.ok {
      color: #15803d
    }

    .sla-timer.warning {
      color: var(--amber)
    }

    .sla-timer.critical {
      color: var(--red-500)
    }

    .sla-timer.breached {
      color: var(--red-600);
      font-weight: 700
    }

    .sla-timer.paused {
      color: var(--gray-400)
    }

    .sla-bar {
      height: 4px;
      border-radius: 2px;
      background: var(--gray-200);
      overflow: hidden;
      margin-top: 4px;
    }

    .sla-bar-fill {
      height: 100%;
      border-radius: 2px;
      transition: width 1s linear
    }

    .sla-ok .sla-bar-fill {
      background: #16a34a
    }

    .sla-warning .sla-bar-fill {
      background: var(--amber)
    }

    .sla-critical .sla-bar-fill {
      background: var(--red-500)
    }

    /* ── Ticket Detail ── */
    .ticket-detail-header {
      background: var(--white);
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius-lg);
      padding: 24px;
      margin-bottom: 16px;
      border-top: 4px solid var(--blue-500);
    }

    .ticket-detail-title {
      font-family: var(--font-body);
      font-size: 20px;
      font-weight: 700;
      color: var(--black);
      margin-bottom: 12px;
      line-height: 1.3;
    }

    .ticket-meta-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 16px
    }

    .ticket-meta-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
      gap: 12px;
      margin-top: 16px;
    }

    .meta-item {
      padding: 10px 12px;
      background: var(--gray-50);
      border-radius: var(--radius);
      border: 1px solid var(--gray-200)
    }

    .meta-item-label {
      font-size: 10px;
      color: var(--gray-400);
      text-transform: uppercase;
      letter-spacing: 0.9px;
      font-family: var(--font-mono);
      font-weight: 600;
      margin-bottom: 4px
    }

    .meta-item-value {
      font-size: 13px;
      color: var(--text-primary);
      font-weight: 600
    }

    /* ── Two-column detail layout ── */
    .detail-grid {
      display: grid;
      grid-template-columns: 1fr 340px;
      gap: 16px;
      align-items: start
    }

    @media(max-width:1024px) {
      .detail-grid {
        grid-template-columns: 1fr
      }
    }

    .detail-panel {
      background: var(--white);
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius-lg);
      overflow: hidden;
    }

    .detail-panel-header {
      padding: 12px 18px;
      border-bottom: 1px solid var(--gray-100);
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: var(--gray-50);
    }

    .detail-panel-title {
      font-size: 11px;
      font-weight: 700;
      color: var(--gray-500);
      text-transform: uppercase;
      letter-spacing: 0.9px;
      font-family: var(--font-mono);
    }

    .detail-panel-body {
      padding: 18px
    }

    /* ── Fixed-height scrollable panels ── */
    /* Thread / Timeline — fixed box with internal scroll */
    .detail-panel.panel-timeline {
      display: flex;
      flex-direction: column;
    }

    .detail-panel.panel-timeline .detail-panel-body {
      padding: 14px 18px;
      height: 460px;
      overflow-y: auto;
    }

    /* Chat — fixed box; messages scroll, input stays at bottom */
    .detail-panel.panel-chat {
      display: flex;
      flex-direction: column;
    }

    .detail-panel.panel-chat .detail-panel-body {
      padding: 0;
      display: flex;
      flex-direction: column;
    }

    .detail-panel.panel-chat #ticket-chat-messages {
      height: 300px;
      min-height: 0;
      overflow-y: auto;
      border-radius: 0;
    }

    .detail-panel.panel-chat .ticket-chat-input-area {
      padding: 10px 18px 6px;
      border-top: 1px solid var(--border-color);
    }

    /* Internal Notes panel */
    .detail-panel.panel-notes {
      display: flex;
      flex-direction: column;
      border-color: var(--amber-300, #fcd34d);
    }

    .detail-panel.panel-notes .detail-panel-body {
      padding: 0;
      display: flex;
      flex-direction: column;
    }

    .internal-notes-messages {
      display: flex;
      flex-direction: column;
      gap: 12px;
      padding: 14px 18px;
      height: 240px;
      overflow-y: auto;
      background: var(--amber-50, #fffbeb);
    }

    .note-bubble {
      background: #fff;
      border: 1px solid var(--amber-200, #fde68a);
      border-left: 3px solid var(--amber-400, #fbbf24);
      border-radius: 6px;
      padding: 10px 14px;
      font-size: 13px;
    }

    .note-bubble-meta {
      font-size: 11px;
      color: var(--text-muted);
      margin-top: 6px;
    }

    .notes-input-area {
      padding: 10px 18px 14px;
      border-top: 1px solid var(--amber-200, #fde68a);
      background: var(--amber-50, #fffbeb);
    }

    /* ── Timeline / Replies ── */
    /* ── Attachment Styling ── */
    .attachment-panel {
      margin-bottom: 24px;
    }

    .attachment-box {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 16px;
      background: var(--surface-3);
      border: 1.5px solid var(--border-bright);
      border-radius: var(--radius-lg);
      color: var(--text-primary);
      text-decoration: none;
      transition: all 0.2s ease;
      min-width: 220px;
      max-width: 320px;
      box-shadow: var(--shadow-sm);
    }

    .attachment-box:hover {
      background: var(--white);
      border-color: var(--blue-500);
      box-shadow: var(--shadow-md);
      transform: translateY(-2px);
    }

    .attachment-icon {
      width: 36px;
      height: 36px;
      background: var(--blue-50);
      color: var(--blue-600);
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 8px;
      font-size: 18px;
      flex-shrink: 0;
    }

    .attachment-info {
      flex: 1;
      min-width: 0;
    }

    .attachment-name {
      font-size: 13px;
      font-weight: 600;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin-bottom: 2px;
    }

    .attachment-size {
      font-size: 11px;
      color: var(--text-muted);
    }

    .timeline-attachments {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px solid rgba(0, 0, 0, 0.04);
    }

    .attachment-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 5px 12px;
      background: rgba(26, 101, 200, 0.08);
      border: 1px solid rgba(26, 101, 200, 0.15);
      border-radius: 20px;
      font-size: 11px;
      font-weight: 500;
      color: var(--blue-700);
      text-decoration: none;
      transition: all 0.2s ease;
    }

    .attachment-pill:hover {
      background: var(--blue-500);
      color: #fff;
      border-color: var(--blue-500);
      transform: scale(1.03);
    }

    body.dark-mode .attachment-box {
      background: var(--gray-800);
      border-color: var(--gray-700);
    }

    body.dark-mode .attachment-box:hover {
      border-color: var(--blue-400);
    }

    body.dark-mode .timeline-attachments {
      border-top-color: rgba(255, 255, 255, 0.05);
    }

    body.dark-mode .attachment-pill {
      background: rgba(59, 130, 246, 0.15);
      color: #93c5fd;
      border-color: rgba(59, 130, 246, 0.3);
    }

    .timeline {
      display: flex;
      flex-direction: column;
      gap: 16px;
      padding-right: 4px;
    }

    .timeline-item {
      display: flex;
      gap: 12px
    }

    .timeline-avatar {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      background: var(--blue-600);
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: var(--font-display);
      font-weight: 400;
      font-size: 13px;
      letter-spacing: 1px;
      color: #fff;
      flex-shrink: 0;
      margin-top: 2px;
    }

    .timeline-content {
      flex: 1;
      min-width: 0
    }

    .timeline-header {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 6px;
      flex-wrap: wrap
    }

    .timeline-author {
      font-size: 13px;
      font-weight: 600;
      color: var(--black)
    }

    .timeline-role {
      font-size: 10px;
      color: var(--text-muted);
      font-family: var(--font-mono)
    }

    .timeline-time {
      font-size: 11px;
      color: var(--text-muted);
      margin-left: auto
    }

    .timeline-body {
      background: var(--gray-50);
      border: 1px solid var(--gray-200);
      border-radius: var(--radius);
      padding: 12px 14px;
      font-size: 13px;
      color: var(--text-secondary);
      line-height: 1.6;
    }

    .timeline-body.internal {
      background: #fffbeb;
      border-color: rgba(217, 119, 6, 0.2);
    }

    .timeline-body.event {
      background: transparent;
      border: none;
      padding: 0;
      color: var(--text-muted);
      font-size: 12px;
      font-family: var(--font-mono);
    }

    .internal-tag {
      font-size: 10px;
      font-family: var(--font-mono);
      font-weight: 600;
      color: var(--amber);
      background: #fef3c7;
      border: 1px solid rgba(217, 119, 6, 0.25);
      padding: 1px 6px;
      border-radius: 3px;
      text-transform: uppercase;
    }

    .attachment-image-wrap {
      position: relative;
      width: 120px;
      height: 120px;
      border-radius: 8px;
      overflow: hidden;
      border: 1.5px solid var(--border-bright);
      background: var(--gray-50);
    }

    .attachment-image-wrap img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.3s ease;
    }

    .attachment-image-wrap:hover img {
      transform: scale(1.1);
    }

    .image-overlay {
      position: absolute;
      inset: 0;
      background: rgba(10, 31, 68, 0.4);
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-size: 20px;
      opacity: 0;
      transition: opacity 0.2s ease;
      text-decoration: none;
    }

    .attachment-image-wrap:hover .image-overlay {
      opacity: 1;
    }

    .timeline-image-wrap {
      position: relative;
      width: 160px;
      max-width: 100%;
      border-radius: 6px;
      overflow: hidden;
      margin-top: 8px;
      border: 1px solid var(--border-bright);
    }

    .timeline-image-wrap img {
      width: 100%;
      display: block;
    }

    .timeline-image-wrap .image-overlay {
      font-size: 16px;
    }

    /* ── Reply Form ── */
    .reply-form {
      background: var(--white);
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius-lg);
      padding: 18px;
    }

    .reply-tabs {
      display: flex;
      gap: 2px;
      margin-bottom: 12px;
      background: var(--gray-100);
      padding: 3px;
      border-radius: var(--radius)
    }

    .reply-tab {
      flex: 1;
      padding: 7px;
      border-radius: 4px;
      font-size: 12px;
      font-weight: 600;
      color: var(--gray-500);
      cursor: pointer;
      transition: var(--transition);
      text-align: center;
      border: none;
      background: none;
    }

    .reply-tab.active {
      background: var(--white);
      color: var(--blue-600);
      box-shadow: var(--shadow-sm)
    }

    .reply-tab:hover:not(.active) {
      color: var(--text-secondary)
    }

    .reply-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      margin-top: 10px
    }

    /* ── Sidebar Info Panel ── */
    .info-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 0;
      border-bottom: 1px solid var(--gray-100);
      font-size: 13px;
    }

    .info-row:last-child {
      border-bottom: none
    }

    .info-row-label {
      color: var(--gray-400);
      font-size: 11px;
      font-family: var(--font-mono);
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px
    }

    .info-row-value {
      color: var(--text-primary);
      font-weight: 600
    }

    /* ── Modal ── */
    .modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(17, 24, 39, 0.6);
      backdrop-filter: blur(3px);
      z-index: 200;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }

    .modal-overlay.open {
      display: flex
    }

    .modal {
      background: var(--white);
      border: none;
      border-radius: var(--radius-lg);
      width: 100%;
      max-width: 560px;
      max-height: 90vh;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      animation: slideUp 0.25s ease;
      box-shadow: var(--shadow-lg);
    }

    .modal-header {
      padding: 18px 22px;
      border-bottom: 1.5px solid var(--gray-100);
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-shrink: 0;
      background: var(--gray-50);
    }

    .modal-title {
      font-family: var(--font-display);
      font-size: 18px;
      font-weight: 400;
      color: var(--black);
      letter-spacing: 2px;
      text-transform: uppercase;
    }

    .modal-close {
      width: 28px;
      height: 28px;
      border-radius: 5px;
      background: var(--gray-100);
      border: 1px solid var(--gray-200);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: var(--gray-500);
      font-size: 13px;
      transition: var(--transition);
    }

    .modal-close:hover {
      color: var(--black);
      background: var(--gray-200)
    }

    .modal-body {
      padding: 22px;
      overflow-y: auto;
      flex: 1
    }

    .modal-footer {
      padding: 14px 22px;
      border-top: 1.5px solid var(--gray-100);
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 10px;
      flex-shrink: 0;
      background: var(--gray-50);
    }

    /* ── ALERTS Section ── */
    .alerts-container {
      background: #fff5f5;
      border: 2px solid #feb2b2;
      border-radius: var(--radius-lg);
      padding: 20px;
      margin-bottom: 24px;
      box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
      display: none;
      /* Hidden by default, shown if there are alerts */
    }

    .alerts-header {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 15px;
      color: #c53030;
    }

    .alerts-header i {
      font-size: 20px;
    }

    .alerts-title {
      font-family: var(--font-display);
      font-size: 24px;
      letter-spacing: 2px;
      text-transform: uppercase;
    }

    .alerts-list {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 12px;
    }

    .alert-item {
      display: flex;
      gap: 12px;
      padding: 14px;
      background: var(--white);
      border-radius: var(--radius);
      border-left: 4px solid #fc8181;
      box-shadow: var(--shadow-sm);
      transition: var(--transition);
      cursor: pointer;
    }

    .alert-item:hover {
      transform: translateY(-2px);
      box-shadow: var(--shadow-md);
      border-left-color: #f56565;
    }

    .alert-item.critical {
      border-left-color: #e53e3e;
      background: #fff5f5;
    }

    .alert-item.unread {
      background: #fff;
      border-left-width: 6px;
    }

    .alert-icon {
      font-size: 16px;
      margin-top: 3px;
    }

    .alert-content {
      flex: 1;
    }

    .alert-title {
      font-size: 13px;
      font-weight: 700;
      color: var(--black);
      margin-bottom: 3px;
    }

    .alert-msg {
      font-size: 12px;
      color: var(--text-secondary);
      line-height: 1.4;
    }

    .alert-time {
      font-size: 10px;
      color: var(--text-muted);
      margin-top: 6px;
      font-family: var(--font-mono);
    }

    /* ── Notification Dropdown ── */
    .notif-dropdown {
      display: none;
      position: absolute;
      top: calc(var(--header-h) + 4px);
      right: 24px;
      background: var(--white);
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius-lg);
      width: 340px;
      z-index: 200;
      box-shadow: var(--shadow-lg);
      animation: slideUp 0.2s ease;
    }

    .notif-dropdown.open {
      display: block
    }

    /* ── Generic Dropdown ── */
    .dropdown {
      position: relative;
      display: inline-block;
    }

    .dropdown-content {
      display: none;
      position: absolute;
      right: 0;
      background-color: var(--white);
      min-width: 160px;
      box-shadow: var(--shadow-lg);
      z-index: 1000;
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius);
      margin-top: 4px;
      overflow: hidden;
    }

    .dropdown-content a {
      color: var(--text-primary);
      padding: 10px 14px;
      text-decoration: none;
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 13px;
      transition: background 0.2s;
    }

    .dropdown-content a:hover {
      background-color: var(--blue-50);
      color: var(--blue-700);
    }

    .dropdown.show .dropdown-content {
      display: block;
    }


    .notif-header {
      padding: 14px 16px;
      border-bottom: 1px solid var(--gray-100);
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: var(--gray-50);
    }

    .notif-title {
      font-size: 13px;
      font-weight: 700;
      color: var(--black)
    }

    .notif-list {
      max-height: 340px;
      overflow-y: auto
    }

    .notif-item {
      padding: 12px 16px;
      border-bottom: 1px solid var(--gray-50);
      display: flex;
      gap: 10px;
      cursor: pointer;
      transition: var(--transition);
    }

    .notif-item:hover {
      background: var(--blue-50)
    }

    .notif-item.unread {
      background: rgba(26, 101, 200, 0.03)
    }

    .notif-item-icon {
      width: 30px;
      height: 30px;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      flex-shrink: 0;
      background: var(--blue-50);
      color: var(--blue-500);
    }

    .notif-item-content {
      flex: 1;
      min-width: 0
    }

    .notif-item-title {
      font-size: 12px;
      font-weight: 600;
      color: var(--black);
      margin-bottom: 2px
    }

    .notif-item-msg {
      font-size: 11px;
      color: var(--text-muted);
      line-height: 1.4
    }

    .notif-item-time {
      font-size: 10px;
      color: var(--text-muted);
      font-family: var(--font-mono);
      margin-top: 3px
    }

    .notif-unread-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--blue-500);
      flex-shrink: 0;
      margin-top: 4px;
    }

    /* ── Charts / Progress ── */
    .donut-container {
      display: flex;
      align-items: center;
      gap: 20px
    }

    .donut-svg {
      flex-shrink: 0
    }

    .donut-legend {
      flex: 1
    }

    .legend-item {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 12px;
      color: var(--text-secondary);
      margin-bottom: 6px
    }

    .legend-dot {
      width: 8px;
      height: 8px;
      border-radius: 2px;
      flex-shrink: 0
    }

    .legend-label {
      flex: 1
    }

    .legend-val {
      font-family: var(--font-mono);
      font-weight: 600;
      color: var(--text-primary)
    }

    .bar-chart {
      display: flex;
      flex-direction: column;
      gap: 10px
    }


    .bar-label-row {
      display: flex;
      justify-content: space-between;
      font-size: 11px;
      color: var(--text-secondary);
      margin-bottom: 4px
    }

    .bar-track {
      height: 8px;
      background: var(--gray-100);
      border-radius: 4px;
      overflow: hidden
    }

    .bar-fill {
      height: 100%;
      border-radius: 4px;
      transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1)
    }

    /* ── Knowledge Base ── */
    .kb-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: 16px
    }

    .kb-card {
      background: var(--white);
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius-lg);
      padding: 20px;
      cursor: pointer;
      transition: var(--transition);
    }

    .kb-card:hover {
      border-color: var(--blue-300);
      transform: translateY(-2px);
      box-shadow: var(--shadow-md)
    }

    .kb-category {
      font-size: 10px;
      font-family: var(--font-mono);
      font-weight: 700;
      color: var(--blue-600);
      text-transform: uppercase;
      letter-spacing: 0.9px;
      margin-bottom: 8px;
    }

    .kb-title {
      font-family: var(--font-body);
      font-size: 15px;
      font-weight: 700;
      color: var(--black);
      margin-bottom: 8px;
    }

    .kb-excerpt {
      font-size: 12px;
      color: var(--text-secondary);
      line-height: 1.6;
      margin-bottom: 12px
    }

    .kb-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 11px;
      color: var(--text-muted)
    }

    /* ── Org Cards ── */
    .org-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
      gap: 16px
    }

    .org-card {
      background: var(--white);
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius-lg);
      padding: 20px;
      transition: var(--transition);
      cursor: pointer;
    }

    .org-card:hover {
      border-color: var(--blue-300);
      transform: translateY(-2px);
      box-shadow: var(--shadow-md)
    }

    .org-name {
      font-family: var(--font-body);
      font-size: 16px;
      font-weight: 700;
      color: var(--black);
      margin-bottom: 6px
    }

    .org-contract {
      display: inline-flex;
      padding: 2px 8px;
      border-radius: 4px;
      font-size: 10px;
      font-family: var(--font-mono);
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 12px;
    }

    .contract-enterprise {
      background: var(--blue-900);
      color: #fff
    }

    .contract-premium {
      background: var(--blue-600);
      color: #fff
    }

    .contract-basic {
      background: var(--gray-200);
      color: var(--gray-600)
    }

    .org-details {
      font-size: 12px;
      color: var(--text-secondary);
      line-height: 1.8
    }

    .org-details i {
      width: 14px;
      color: var(--blue-400);
      margin-right: 4px
    }

    /* ── Toast / Alerts ── */
    .toast-container {
      position: fixed;
      bottom: 24px;
      right: 24px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      z-index: 9999
    }

    .toast {
      background: var(--white);
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius);
      padding: 12px 16px;
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 13px;
      color: var(--text-primary);
      box-shadow: var(--shadow-md);
      animation: slideInRight 0.3s ease;
      min-width: 280px;
      font-weight: 500;
    }

    .toast.success {
      border-left: 4px solid #16a34a
    }

    .toast.error {
      border-left: 4px solid var(--red-500)
    }

    .toast.warning {
      border-left: 4px solid var(--amber)
    }

    @keyframes slideInRight {
      from {
        opacity: 0;
        transform: translateX(20px)
      }

      to {
        opacity: 1;
        transform: translateX(0)
      }
    }

    /* ── Pagination ── */
    .pagination {
      display: flex;
      align-items: center;
      gap: 4px
    }

    .page-btn {
      min-width: 30px;
      height: 30px;
      border-radius: 5px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      cursor: pointer;
      font-family: var(--font-mono);
      font-weight: 600;
      background: var(--white);
      border: 1.5px solid var(--gray-200);
      color: var(--gray-600);
      transition: var(--transition);
    }

    .page-btn:hover {
      border-color: var(--blue-300);
      color: var(--blue-600)
    }

    .page-btn.active {
      background: var(--blue-600);
      color: #fff;
      border-color: var(--blue-600)
    }

    /* ── Reports ── */
    .report-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 16px;
      margin-bottom: 20px
    }

    .report-card {
      background: var(--white);
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius-lg);
      padding: 20px;
    }
    .report-kpi-card {
      background: var(--white);
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius-lg);
      padding: 16px 18px;
      border-left: 4px solid var(--blue-500);
    }
    .report-kpi-card.kpi-card-ok { border-left-color: #16a34a; }
    .report-kpi-card.kpi-card-warn { border-left-color: #d97706; }
    .kpi-label { font-size:10px;text-transform:uppercase;letter-spacing:.8px;color:var(--gray-500);font-weight:600;margin-bottom:6px; }
    .kpi-value { font-size:26px;font-weight:700;color:var(--blue-900);line-height:1; }
    .kpi-sub { font-size:11px;color:var(--gray-400);margin-top:4px; }
    .mb-4 { margin-bottom: 16px; }
    .mb-3 { margin-bottom: 12px; }

    /* ── Escalation Level Indicator ── */
    .escalation-level {
      display: flex;
      gap: 3px;
      align-items: center
    }

    .level-dot {
      width: 8px;
      height: 8px;
      border-radius: 2px;
      background: var(--gray-200)
    }

    .level-dot.l1 {
      background: var(--blue-500)
    }

    .level-dot.l2 {
      background: var(--amber)
    }

    .level-dot.l3 {
      background: var(--red-500)
    }

    /* ── Empty State ── */
    .empty-state {
      text-align: center;
      padding: 60px 20px;
      color: var(--text-muted)
    }

    .empty-state i {
      font-size: 48px;
      margin-bottom: 16px;
      opacity: 0.2;
      display: block;
      color: var(--blue-400)
    }

    .empty-state h3 {
      font-size: 16px;
      color: var(--gray-400);
      margin-bottom: 6px;
      font-family: var(--font-display);
      letter-spacing: 1px;
      text-transform: uppercase
    }

    .empty-state p {
      font-size: 13px
    }

    /* ── Loading Skeleton ── */
    .skeleton {
      background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
      background-size: 400% 100%;
      animation: shimmer 1.5s infinite;
      border-radius: 4px;
    }

    @keyframes shimmer {
      0% {
        background-position: 100% 0
      }

      100% {
        background-position: -100% 0
      }
    }

    /* ── Tags & Custom Fields ── */
    .tag-pill {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 3px 10px;
      border-radius: var(--radius-lg);
      font-size: 11px;
      font-weight: 600;
      color: #fff;
      white-space: nowrap;
      transition: var(--transition);
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .tag-pill i.remove-tag {
      cursor: pointer;
      opacity: 0.6;
      transition: var(--transition);
      font-size: 10px;
      margin-left: 2px;
    }

    .tag-pill:hover i.remove-tag {
      opacity: 1;
    }

    .tag-pill:hover {
      transform: translateY(-1px);
      box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    }

    .tag-input-container {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      padding: 6px 10px;
      border: 1.5px solid var(--border-bright);
      border-radius: var(--radius);
      background: var(--surface-3);
      min-height: 44px;
      position: relative;
      transition: var(--transition);
    }

    .tag-input-container:focus-within {
      border-color: var(--blue-500);
      background: var(--white);
      box-shadow: 0 0 0 3px rgba(26, 101, 200, 0.12);
    }

    .tag-input-field {
      flex: 1;
      min-width: 120px;
      border: none;
      background: transparent;
      outline: none;
      font-size: 13px;
      color: var(--text-primary);
      padding: 4px 0;
    }

    .tag-autocomplete {
      position: absolute;
      top: calc(100% + 5px);
      left: 0;
      right: 0;
      background: var(--white);
      border: 1px solid var(--border-bright);
      border-radius: var(--radius);
      box-shadow: var(--shadow-lg);
      z-index: 1100;
      max-height: 220px;
      overflow-y: auto;
      display: none;
    }

    .tag-option {
      padding: 10px 14px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 13px;
      transition: background 0.15s;
    }

    .tag-option:hover {
      background: var(--gray-50);
    }

    .tag-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    .custom-field-row {
      margin-bottom: 12px;
    }

    body.dark-mode .tag-autocomplete {
      background: var(--gray-800);
      border-color: var(--gray-700);
    }

    body.dark-mode .tag-option:hover {
      background: var(--gray-700);
    }

    /* ── Upload Area ── */
    .upload-area {
      border: 2px dashed var(--gray-300);
      border-radius: var(--radius-lg);
      padding: 30px;
      text-align: center;
      cursor: pointer;
      transition: var(--transition);
      color: var(--text-muted);
      font-size: 13px;
    }

    .upload-area:hover,
    .upload-area.drag {
      border-color: var(--blue-400);
      background: var(--blue-50);
      color: var(--blue-600);
    }

    .upload-area i {
      font-size: 28px;
      margin-bottom: 8px;
      display: block;
      color: var(--blue-300)
    }

    /* ── SLA Breach Alert Banner ── */
    .sla-breach-banner {
      background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
      border: 1.5px solid rgba(220, 38, 38, 0.3);
      border-radius: var(--radius-lg);
      padding: 14px 18px;
      margin-bottom: 16px;
      display: flex;
      align-items: center;
      gap: 12px;
      animation: breachPulse 2s ease-in-out infinite;
    }

    .sla-breach-banner.warning {
      background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
      border-color: rgba(217, 119, 6, 0.3);
    }

    .sla-breach-banner .breach-icon {
      width: 36px;
      height: 36px;
      border-radius: 8px;
      background: rgba(220, 38, 38, 0.12);
      color: var(--red-500);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      flex-shrink: 0;
    }

    .sla-breach-banner.warning .breach-icon {
      background: rgba(217, 119, 6, 0.12);
      color: var(--amber);
    }

    .sla-breach-banner .breach-text {
      flex: 1
    }

    .sla-breach-banner .breach-title {
      font-size: 13px;
      font-weight: 700;
      color: var(--red-700);
      margin-bottom: 2px;
    }

    .sla-breach-banner.warning .breach-title {
      color: var(--amber)
    }

    .sla-breach-banner .breach-msg {
      font-size: 12px;
      color: var(--text-secondary);
      line-height: 1.4;
    }

    .sla-breach-banner .breach-timer {
      font-family: var(--font-mono);
      font-size: 14px;
      font-weight: 700;
      color: var(--red-600);
      flex-shrink: 0;
    }

    .sla-breach-banner.warning .breach-timer {
      color: var(--amber)
    }

    @keyframes breachPulse {

      0%,
      100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0)
      }

      50% {
        box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08)
      }
    }

    /* ── KB Article Detail Overlay ── */
    /* ── In-ticket chat bubbles ── */
    .chat-bubble-row { display:flex; gap:10px; align-items:flex-end; }
    .chat-bubble-row.mine { flex-direction:row-reverse; }
    .chat-bubble { max-width:72%; padding:10px 14px; border-radius:14px; font-size:13px; line-height:1.6; word-break:break-word; }
    .chat-bubble.theirs { background:var(--bg-secondary); color:var(--text-primary); border-bottom-left-radius:4px; }
    .chat-bubble.mine { background:var(--blue-500); color:#fff; border-bottom-right-radius:4px; }
    .chat-bubble-avatar { width:28px; height:28px; border-radius:50%; background:var(--blue-500); color:#fff; font-size:10px; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
    .chat-bubble-avatar.mine { background:var(--green-500); }
    .chat-bubble-meta { font-size:10px; color:var(--text-muted); margin-top:3px; }
    .chat-bubble-row.mine .chat-bubble-meta { text-align:right; }
    .ticket-chat-messages { display:flex; flex-direction:column; gap:14px; padding:16px; overflow-y:auto; background:var(--bg-secondary); border-radius:var(--radius-md); }
    .ticket-chat-input-area { display:flex; gap:8px; align-items:flex-end; margin-top:10px; }
    .ticket-chat-input { flex:1; resize:none; border:1px solid var(--border-color); border-radius:8px; padding:10px 12px; font-size:13px; background:var(--white); color:var(--text-primary); outline:none; }
    .ticket-chat-input:focus { border-color:var(--blue-500); }

    .kb-detail-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(17, 24, 39, 0.6);
      backdrop-filter: blur(3px);
      z-index: 210;
      align-items: flex-start;
      justify-content: center;
      padding: 40px 20px;
      overflow-y: auto;
    }

    .kb-detail-overlay.open {
      display: flex
    }

    .kb-detail-card {
      background: var(--white);
      border-radius: var(--radius-lg);
      width: 100%;
      max-width: 740px;
      box-shadow: var(--shadow-lg);
      animation: slideUp 0.25s ease;
    }

    .kb-detail-header {
      padding: 24px 28px 16px;
      border-bottom: 1.5px solid var(--gray-100);
    }

    .kb-detail-header .kb-category {
      margin-bottom: 6px
    }

    .kb-detail-header .kb-title {
      font-size: 20px;
      margin-bottom: 10px
    }

    .kb-detail-meta {
      display: flex;
      gap: 16px;
      font-size: 12px;
      color: var(--text-muted);
      flex-wrap: wrap
    }

    .kb-detail-body {
      padding: 28px;
      font-size: 14px;
      line-height: 1.8;
      color: var(--text-primary);
    }

    .kb-content-text {
      white-space: pre-wrap;
      margin-bottom: 30px;
    }

    .kb-attachments-section {
      margin-top: 40px;
      border-top: 1px solid var(--gray-200);
      padding-top: 20px;
    }

    .kb-attachments-section h4 {
      font-family: var(--font-display);
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-bottom: 15px;
      color: var(--text-secondary);
    }

    .kb-images-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 12px;
    }

    .kb-image-item {
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius);
      overflow: hidden;
      cursor: pointer;
      background: var(--gray-50);
      transition: var(--transition);
    }

    .kb-image-item:hover {
      border-color: var(--blue-400);
      transform: translateY(-2px);
      box-shadow: var(--shadow-md);
    }

    .kb-image-item img {
      width: 100%;
      height: 120px;
      object-fit: cover;
      display: block;
    }

    .kb-image-name {
      padding: 8px;
      font-size: 11px;
      color: var(--text-secondary);
      text-align: center;
      background: var(--white);
      border-top: 1px solid var(--gray-100);
    }

    .kb-detail-footer {
      padding: 16px 28px;
      border-top: 1.5px solid var(--gray-100);
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: var(--gray-50);
      border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }

    .kb-helpful-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 8px 16px;
      border-radius: var(--radius);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      border: 1.5px solid var(--gray-200);
      background: var(--white);
      color: var(--text-secondary);
      transition: var(--transition);
    }

    .kb-helpful-btn:hover {
      border-color: var(--blue-300);
      color: var(--blue-600);
      background: var(--blue-50)
    }

    .kb-helpful-btn.voted {
      border-color: var(--blue-400);
      color: var(--blue-600);
      background: var(--blue-50)
    }

    /* ── Admin Settings Page ── */
    .settings-grid {
      display: grid;
      grid-template-columns: 240px 1fr;
      gap: 20px;
      align-items: start
    }


    .settings-nav-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 14px;
      border-radius: var(--radius);
      cursor: pointer;
      font-size: 13px;
      color: var(--text-secondary);
      transition: var(--transition);
      font-weight: 500;
    }

    .settings-nav-item:hover {
      background: var(--gray-100);
      color: var(--text-primary)
    }

    .settings-nav-item.active {
      background: var(--blue-50);
      color: var(--blue-600);
      font-weight: 600
    }

    .settings-nav-item i {
      width: 16px;
      font-size: 13px;
      text-align: center
    }

    .settings-panel {
      display: none
    }

    .settings-panel.active {
      display: block
    }

    .settings-section {
      background: var(--white);
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius-lg);
      margin-bottom: 16px;
      overflow: hidden;
    }

    .settings-section-header {
      padding: 16px 20px;
      border-bottom: 1px solid var(--gray-100);
      background: var(--gray-50);
    }

    .settings-section-title {
      font-size: 14px;
      font-weight: 700;
      color: var(--black);
      margin-bottom: 2px;
    }

    .settings-section-desc {
      font-size: 12px;
      color: var(--text-muted)
    }

    .settings-section-body {
      padding: 20px
    }

    .setting-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 0;
      border-bottom: 1px solid var(--gray-100);
    }

    .setting-row:last-child {
      border-bottom: none
    }

    .setting-label {
      font-size: 13px;
      font-weight: 600;
      color: var(--text-primary)
    }

    .setting-desc {
      font-size: 11px;
      color: var(--text-muted);
      margin-top: 2px
    }

    .toggle-switch {
      position: relative;
      width: 44px;
      height: 24px;
      background: var(--gray-300);
      border-radius: 12px;
      cursor: pointer;
      transition: var(--transition);
      flex-shrink: 0;
    }

    .toggle-switch.on {
      background: var(--blue-500)
    }

    .toggle-switch::after {
      content: '';
      position: absolute;
      top: 2px;
      left: 2px;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: var(--white);
      transition: var(--transition);
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }

    .toggle-switch.on::after {
      left: 22px
    }

    .color-swatch {
      width: 32px;
      height: 32px;
      border-radius: 6px;
      border: 2px solid var(--gray-200);
      cursor: pointer;
      transition: var(--transition);
    }

    .color-swatch:hover {
      transform: scale(1.1)
    }

    .color-swatch.active {
      border-color: var(--blue-500);
      box-shadow: 0 0 0 3px rgba(26, 101, 200, 0.2)
    }

    /* ── Responsive ── */
    @media(max-width:1200px) {
      .settings-grid {
        grid-template-columns: 1fr
      }

      .settings-sidebar {
        display: flex;
        gap: 4px;
        flex-wrap: wrap;
        margin-bottom: 8px
      }

      .settings-nav-item {
        padding: 8px 12px;
        font-size: 12px
      }

      #charts-row {
        grid-template-columns: 1fr !important
      }
    }

    @media(max-width:768px) {
      :root {
        --sidebar-w: 0px
      }

      .sidebar {
        transform: translateX(-248px);
        width: 248px
      }

      .sidebar.open {
        transform: translateX(0)
      }

      .main-content {
        margin-left: 0
      }

      .mobile-toggle {
        display: flex
      }

      .topbar-search {
        display: none
      }

      .topbar {
        padding: 0 12px;
        gap: 8px
      }

      .topbar-title {
        font-size: 16px
      }

      .stats-grid {
        grid-template-columns: 1fr 1fr
      }

      .form-row {
        grid-template-columns: 1fr
      }

      .detail-grid {
        grid-template-columns: 1fr
      }

      .org-grid,
      .kb-grid {
        grid-template-columns: 1fr
      }

      .report-grid {
        grid-template-columns: 1fr
      }

      .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px
      }

      .table-toolbar {
        flex-direction: column;
        align-items: stretch
      }

      .table-toolbar .topbar-search {
        width: 100% !important
      }

      .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch
      }

      table {
        min-width: 600px
      }

      .modal {
        max-width: 100% !important;
        margin: 10px;
        max-height: calc(100vh - 20px)
      }

      .modal-overlay {
        padding: 10px
      }

      .ticket-detail-header {
        padding: 16px
      }

      .detail-panel-body {
        padding: 12px
      }

      .ticket-meta-grid {
        grid-template-columns: 1fr 1fr
      }

      .notif-dropdown {
        right: 10px;
        left: 10px;
        width: auto
      }

      .page-content {
        padding: 12px
      }

      .kb-detail-card {
        margin: 0
      }

      .kb-detail-overlay {
        padding: 10px
      }

      .sla-breach-banner {
        flex-direction: column;
        text-align: center
      }
    }

    @media(max-width:480px) {
      .stats-grid {
        grid-template-columns: 1fr
      }

      .page-content {
        padding: 10px
      }

      .ticket-meta-grid {
        grid-template-columns: 1fr
      }

      .stat-value {
        font-size: 28px
      }

      .topbar-title {
        font-size: 14px;
        letter-spacing: 1px
      }

      .btn-sm {
        padding: 5px 10px;
        font-size: 11px
      }
    }

    /* ── Sidebar overlay for mobile ── */
    .sidebar-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.4);
      z-index: 99;
    }

    .sidebar.open~.sidebar-overlay {
      display: block
    }

    /* ── Misc Utilities ── */
    .flex {
      display: flex
    }

    .flex-col {
      flex-direction: column
    }

    .items-center {
      align-items: center
    }

    .justify-between {
      justify-content: space-between
    }

    .gap-2 {
      gap: 8px
    }

    .gap-3 {
      gap: 12px
    }

    .mb-4 {
      margin-bottom: 16px
    }

    .mb-6 {
      margin-bottom: 24px
    }

    .mt-2 {
      margin-top: 8px
    }

    .mt-4 {
      margin-top: 16px
    }

    .text-muted {
      color: var(--text-muted)
    }

    .text-secondary {
      color: var(--text-secondary)
    }

    .text-acid {
      color: var(--blue-600)
    }

    .text-red {
      color: var(--red-500)
    }

    .text-amber {
      color: var(--amber)
    }

    .font-mono {
      font-family: var(--font-mono)
    }

    .font-display {
      font-family: var(--font-display)
    }

    .truncate {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap
    }

    .w-full {
      width: 100%
    }

    .hidden {
      display: none !important
    }

    .divider {
      border: none;
      border-top: 1px solid var(--gray-100);
      margin: 16px 0
    }

    /* ═══════════════════════════════════════
       UAT MODULE STYLES
    ═══════════════════════════════════════ */
    .uat-sub-nav {
      display: flex;
      gap: 4px;
      background: var(--gray-50);
      padding: 4px;
      border-radius: var(--radius-lg);
      border: 1.5px solid var(--gray-200);
      margin-bottom: 20px;
      flex-wrap: wrap
    }

    .uat-sub-nav-item {
      padding: 8px 16px;
      border-radius: var(--radius);
      font-size: 13px;
      font-weight: 600;
      color: var(--text-secondary);
      cursor: pointer;
      transition: var(--transition);
      display: flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap
    }

    .uat-sub-nav-item:hover {
      background: var(--white);
      color: var(--text-primary)
    }

    .uat-sub-nav-item.active {
      background: var(--blue-500);
      color: #fff;
      box-shadow: var(--shadow-sm)
    }

    .uat-sub-nav-item i {
      font-size: 12px
    }

    .uat-sub-nav-item .count-badge {
      background: rgba(255, 255, 255, 0.25);
      padding: 1px 7px;
      border-radius: 10px;
      font-size: 10px;
      font-weight: 700
    }

    .uat-sub-nav-item.active .count-badge {
      background: rgba(255, 255, 255, 0.3)
    }

    .uat-stats-row {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 12px;
      margin-bottom: 20px
    }

    .uat-stat-card {
      background: var(--white);
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius-lg);
      padding: 16px 18px;
      position: relative;
      overflow: hidden;
      transition: var(--transition)
    }

    .uat-stat-card:hover {
      border-color: var(--blue-300);
      transform: translateY(-1px);
      box-shadow: var(--shadow-sm)
    }

    .uat-stat-card .uat-stat-label {
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      color: var(--text-muted);
      margin-bottom: 6px
    }

    .uat-stat-card .uat-stat-value {
      font-family: var(--font-display);
      font-size: 28px;
      font-weight: 400;
      letter-spacing: 1px;
      color: var(--text-primary);
      line-height: 1
    }

    .uat-stat-card .uat-stat-sub {
      font-size: 11px;
      color: var(--text-muted);
      margin-top: 4px
    }

    .uat-stat-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 4px;
      height: 100%;
      border-radius: 2px 0 0 2px
    }

    .uat-stat-card.red::before {
      background: var(--red-500)
    }

    .uat-stat-card.amber::before {
      background: var(--amber)
    }

    .uat-stat-card.blue::before {
      background: var(--blue-500)
    }

    .uat-stat-card.green::before {
      background: #16a34a
    }

    .uat-stat-card.violet::before {
      background: #7c3aed
    }

    .uat-progress-bar {
      height: 8px;
      background: var(--gray-100);
      border-radius: 4px;
      overflow: hidden;
      margin-top: 8px
    }

    .uat-progress-fill {
      height: 100%;
      border-radius: 4px;
      transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1)
    }

    .workflow-stepper {
      display: flex;
      gap: 0;
      margin: 16px 0;
      flex-wrap: wrap
    }

    .workflow-step {
      flex: 1;
      min-width: 80px;
      text-align: center;
      position: relative;
      padding: 8px 4px
    }

    .workflow-step::before {
      content: '';
      position: absolute;
      top: 16px;
      left: 0;
      right: 0;
      height: 2px;
      background: var(--gray-200);
      z-index: 0
    }

    .workflow-step:first-child::before {
      left: 50%
    }

    .workflow-step:last-child::before {
      right: 50%
    }

    .workflow-dot {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      border: 2px solid var(--gray-300);
      background: var(--white);
      margin: 0 auto 6px;
      position: relative;
      z-index: 1;
      transition: var(--transition);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 9px;
      color: transparent
    }

    .workflow-step.completed .workflow-dot {
      background: #16a34a;
      border-color: #16a34a;
      color: #fff
    }

    .workflow-step.current .workflow-dot {
      background: var(--blue-500);
      border-color: var(--blue-500);
      color: #fff;
      box-shadow: 0 0 0 4px rgba(26, 101, 200, 0.15)
    }

    .workflow-step.completed::before {
      background: #16a34a
    }

    .workflow-step.current::before {
      background: linear-gradient(90deg, #16a34a 50%, var(--gray-200) 50%)
    }

    .workflow-step-label {
      font-size: 10px;
      font-weight: 600;
      color: var(--text-muted);
      line-height: 1.2
    }

    .workflow-step.completed .workflow-step-label {
      color: #16a34a
    }

    .workflow-step.current .workflow-step-label {
      color: var(--blue-600);
      font-weight: 700
    }

    .retest-panel {
      background: var(--gray-50);
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius-lg);
      padding: 16px;
      margin-top: 12px
    }

    .retest-checklist {
      list-style: none;
      padding: 0;
      margin: 0
    }

    .retest-checklist li {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 0;
      border-bottom: 1px solid var(--gray-100);
      font-size: 13px
    }

    .retest-checklist li:last-child {
      border-bottom: none
    }

    .retest-checklist input[type=checkbox] {
      accent-color: var(--blue-500)
    }

    .retest-result {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 14px;
      border-radius: var(--radius);
      font-size: 13px;
    }

    /* ═══════════════════════════════════════
       PROJECT CHECKLIST STYLES
    ═══════════════════════════════════════ */
    .checklist-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 16px;
      background: var(--surface-2);
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius-lg);
      margin-bottom: 8px;
      transition: all 0.2s ease;
    }

    .checklist-item:hover {
      border-color: var(--blue-300);
      background: var(--blue-50);
    }

    .checklist-item.satisfied {
      background: #f0fdf4;
      border-color: #bbf7d0;
    }

    body.dark-mode .checklist-item.satisfied {
      background: rgba(22, 163, 74, 0.1);
      border-color: rgba(22, 163, 74, 0.3);
    }

    .checklist-item .item-name {
      font-size: 14px;
      font-weight: 500;
      color: var(--text-primary);
    }

    .checklist-item.satisfied .item-name {
      text-decoration: line-through;
      color: var(--gray-500);
    }

    .checklist-item input[type="checkbox"] {
      width: 18px;
      height: 18px;
      cursor: pointer;
      accent-color: var(--blue-500);
    }

    /* Progress Bar */
    .progress-minimal {
      width: 100%;
      height: 6px;
      background: var(--gray-200);
      border-radius: 10px;
      overflow: hidden;
      margin-top: 4px;
    }

    .progress-minimal-bar {
      height: 100%;
      background: var(--blue-500);
      transition: width 0.3s ease;
    }

    .progress-minimal-bar.complete {
      background: var(--green-500);
    }

    .progress-minimal-bar.warning {
      background: var(--orange-500);
    }

    .progress-minimal-bar.danger {
      background: var(--red-500);
    }

    /* Member List Styles */
    .member-list {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .member-pill {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 4px 12px;
      background: var(--surface-2);
      border: 1px solid var(--gray-200);
      border-radius: 20px;
      font-size: 13px;
    }

    .member-pill .pill-remove {
      color: var(--gray-400);
      cursor: pointer;
      font-size: 10px;
      border: none;
      background: none;
      display: flex;
      align-items: center;
      padding: 0;
    }

    .member-pill .pill-remove:hover {
      color: var(--red-500);
    }

    .retest-result {
      font-weight: 700;
      cursor: pointer;
      border: 1.5px solid var(--gray-200);
      background: var(--white);
      transition: var(--transition)
    }

    .retest-result.pass {
      border-color: #16a34a;
      color: #16a34a;
      background: rgba(22, 163, 106, 0.05)
    }

    .retest-result.fail {
      border-color: var(--red-500);
      color: var(--red-500);
      background: rgba(220, 38, 38, 0.05)
    }

    /* ── Projects Responsive Grid ── */
    .projects-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
      gap: 20px;
    }

    .project-card {
      background: var(--white);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-lg);
      padding: 24px;
      display: flex;
      flex-direction: column;
      gap: 16px;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      cursor: pointer;
      position: relative;
      overflow: hidden;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    }

    .project-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
      border-color: var(--blue-200);
    }

    .project-card-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
    }

    .project-card-title {
      font-size: 18px;
      font-weight: 700;
      color: var(--gray-900);
      line-height: 1.2;
    }

    .project-card-org {
      font-size: 12px;
      color: var(--gray-500);
      font-weight: 500;
      margin-top: 4px;
    }

    .project-card-body {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      padding: 12px 0;
      border-top: 1px solid var(--gray-50);
      border-bottom: 1px solid var(--gray-50);
    }

    .project-card-info-item {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .project-card-info-label {
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--gray-400);
      font-weight: 600;
    }

    .project-card-info-value {
      font-size: 13px;
      font-weight: 500;
      color: var(--gray-700);
    }

    .project-card-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: auto;
    }

    .project-card-health {
      flex: 1;
      margin-right: 15px;
    }

    .project-card-health-label {
      display: flex;
      justify-content: space-between;
      font-size: 11px;
      font-weight: 600;
      margin-bottom: 6px;
    }

    .project-card-status-ribbon {
      position: absolute;
      top: 0;
      right: 0;
      background: var(--red-500);
      color: white;
      font-size: 10px;
      font-weight: 700;
      padding: 4px 12px;
      border-bottom-left-radius: 8px;
      text-transform: uppercase;
    }

    .release-card {
      background: var(--white);
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius-lg);
      padding: 20px;
      transition: var(--transition)
    }

    .release-card:hover {
      border-color: var(--blue-300);
      box-shadow: var(--shadow-sm)
    }

    .release-card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px
    }

    .release-version {
      font-family: var(--font-mono);
      font-size: 16px;
      font-weight: 700;
      color: var(--blue-600)
    }

    .release-stats {
      display: flex;
      gap: 12px;
      font-size: 12px;
      color: var(--text-muted)
    }

    .release-blocker {
      display: flex;
      align-items: center;
      gap: 4px;
      font-size: 12px;
      font-weight: 700;
      color: var(--red-500)
    }

    .uat-issue-type {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      padding: 3px 8px;
      border-radius: 4px;
      display: inline-flex;
      align-items: center;
      gap: 4px
    }

    .uat-issue-type.bug {
      background: #fef2f2;
      color: var(--red-600)
    }

    .uat-issue-type.ui {
      background: #eff6ff;
      color: var(--blue-600)
    }

    .uat-issue-type.perf {
      background: #fefce8;
      color: #a16207
    }

    .uat-issue-type.security {
      background: #fdf2f8;
      color: #be185d
    }

    .uat-issue-type.enhancement {
      background: #f0fdf4;
      color: #15803d
    }

    .uat-issue-type.clarification {
      background: #f5f3ff;
      color: #6d28d9
    }

    .staff-only,
    .admin-only {
      display: none !important;
    }

    body.is-staff .staff-only {
      display: inline-flex !important;
    }

    body.is-admin .admin-only,
    body.is-supervisor .admin-only {
      display: inline-flex !important;
    }

    /* For block elements */
    body.is-staff div.staff-only {
      display: block !important;
    }

    body.is-admin div.admin-only,
    body.is-supervisor div.admin-only {
      display: block !important;
    }

    /* View-only role: hide all write-action elements */
    body.is-viewer .viewer-write {
      display: none !important;
    }

    .severity-badge {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.7px;
      padding: 2px 6px;
      border-radius: 3px
    }

    .severity-badge.blocking {
      background: #dc2626;
      color: #fff
    }

    .severity-badge.major {
      background: #ea580c;
      color: #fff
    }

    .severity-badge.minor {
      background: #d97706;
      color: #fff
    }

    .severity-badge.cosmetic {
      background: var(--gray-300);
      color: var(--text-primary)
    }

    .uat-detail-section {
      background: var(--white);
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius-lg);
      margin-bottom: 16px;
      overflow: hidden
    }

    .uat-detail-section-header {
      padding: 12px 16px;
      border-bottom: 1px solid var(--gray-100);
      font-size: 13px;
      font-weight: 700;
      color: var(--text-primary);
      background: var(--gray-50);
      display: flex;
      align-items: center;
      gap: 8px
    }

    .uat-detail-section-body {
      padding: 16px
    }

    .steps-reproduce {
      counter-reset: step;
      list-style: none;
      padding: 0;
      margin: 0
    }

    .steps-reproduce li {
      counter-increment: step;
      padding: 8px 0 8px 32px;
      position: relative;
      font-size: 13px;
      border-bottom: 1px solid var(--gray-50)
    }

    .steps-reproduce li::before {
      content: counter(step);
      position: absolute;
      left: 0;
      width: 22px;
      height: 22px;
      border-radius: 50%;
      background: var(--blue-50);
      color: var(--blue-600);
      font-size: 11px;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: center
    }

    .steps-reproduce li:last-child {
      border-bottom: none
    }

    .env-badge {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.7px;
      padding: 2px 8px;
      border-radius: 3px
    }

    .env-badge.uat {
      background: #eff6ff;
      color: var(--blue-700);
      border: 1px solid var(--blue-200)
    }

    .env-badge.staging {
      background: #fefce8;
      color: #a16207;
      border: 1px solid #fde68a
    }

    .env-badge.production {
      background: #fef2f2;
      color: var(--red-700);
      border: 1px solid #fecaca
    }

    .uat-filters-bar {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      align-items: center;
      margin-bottom: 16px;
      padding: 12px 16px;
      background: var(--gray-50);
      border: 1.5px solid var(--gray-200);
      border-radius: var(--radius-lg)
    }

    .uat-filters-bar select,
    .uat-filters-bar input {
      font-size: 12px;
      padding: 6px 10px
    }

    @media(max-width:768px) {
      .uat-sub-nav {
        overflow-x: auto;
        flex-wrap: nowrap
      }

      .uat-stats-row {
        grid-template-columns: 1fr 1fr
      }

      .workflow-stepper {
        flex-wrap: wrap
      }

      .uat-filters-bar {
        flex-direction: column
      }
    }

    /* ============================================================
       CINEMATIC INTRO ANIMATION
       ============================================================ */
    #cinematic-intro {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: #030406;
      z-index: 99999;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      overflow: hidden;
      opacity: 1;
      visibility: visible;
      transition: opacity 1.5s cubic-bezier(0.25, 1, 0.5, 1), filter 1.5s cubic-bezier(0.25, 1, 0.5, 1), transform 1.5s cubic-bezier(0.25, 1, 0.5, 1);
    }

    #cinematic-intro.hidden {
      opacity: 0;
      pointer-events: none;
      filter: blur(10px);
      transform: translateY(-20px);
      visibility: hidden;
    }

    #cinematic-intro::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      opacity: 0.04;
      pointer-events: none;
      background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="n"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23n)"/%3E%3C/svg%3E');
      z-index: 10;
    }

    #cinematic-intro::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: radial-gradient(circle at center, transparent 30%, #030406 100%);
      pointer-events: none;
      z-index: 2;
    }

    .aurora-bg {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 150vw;
      height: 150vh;
      transform: translate(-50%, -50%);
      filter: blur(140px);
      z-index: 0;
      opacity: 0.85;
      mix-blend-mode: screen;
      animation: breathingAurora 25s infinite alternate ease-in-out;
    }

    .aurora-orb-1 {
      position: absolute;
      width: 75vmin;
      height: 75vmin;
      background: radial-gradient(circle, rgba(0, 67, 138, 1) 0%, rgba(0, 32, 66, 0.4) 70%, transparent 100%);
      border-radius: 50%;
      top: 5%;
      left: 10%;
      animation: orbOrbit 25s infinite cubic-bezier(0.4, 0, 0.2, 1);
      mix-blend-mode: screen;
    }

    .aurora-orb-2 {
      position: absolute;
      width: 85vmin;
      height: 85vmin;
      background: radial-gradient(circle, rgba(211, 32, 42, 0.8) 0%, rgba(100, 10, 20, 0.3) 60%, transparent 100%);
      border-radius: 50%;
      bottom: 5%;
      right: 5%;
      animation: orbOrbit 35s infinite cubic-bezier(0.4, 0, 0.2, 1) reverse;
      mix-blend-mode: color-dodge;
    }

    .aurora-orb-3 {
      position: absolute;
      width: 90vmin;
      height: 90vmin;
      background: radial-gradient(circle, rgba(46, 125, 233, 0.6) 0%, rgba(10, 31, 68, 0.6) 80%, transparent 100%);
      border-radius: 50%;
      top: 40%;
      left: 40%;
      animation: orbOrbit 20s infinite linear;
      transform-origin: center center;
    }

    @keyframes breathingAurora {
      0% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 0.7;
      }

      100% {
        transform: translate(-50%, -50%) scale(1.15) rotate(5deg);
        opacity: 0.95;
      }
    }

    @keyframes orbOrbit {
      0% {
        transform: rotate(0deg) translateX(100px) rotate(0deg);
      }

      100% {
        transform: rotate(360deg) translateX(100px) rotate(-360deg);
      }
    }

    .cinematic-content {
      position: relative;
      z-index: 3;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .cinematic-welcome {
      color: #9ca3af;
      font-family: var(--font-body);
      letter-spacing: 0.3em;
      font-size: 14px;
      font-weight: 500;
      text-transform: uppercase;
      clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
      opacity: 0;
      transform: translateY(20px);
    }

    #cinematic-intro.active .cinematic-welcome {
      animation: glideUpWelcome 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
      animation-delay: 0.5s;
    }

    @keyframes glideUpWelcome {
      0% {
        opacity: 0;
        transform: translateY(20px);
      }

      100% {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .cinematic-logo {
      font-family: var(--font-display);
      font-size: 96px;
      color: #FFFFFF;
      margin: 10px 0;
      letter-spacing: 4px;
      opacity: 0;
      transform: scale(0.95);
      filter: blur(10px) drop-shadow(0px 8px 16px rgba(0, 0, 0, 0.95));
      text-shadow: 0px 8px 16px rgba(0, 0, 0, 0.95);
    }

    #cinematic-intro.active .cinematic-logo {
      animation: revealLogo 1.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
      animation-delay: 0.8s;
    }

    .cinematic-logo .highlight {
      color: #4DA6FF;
      text-shadow: 0 0 25px #00438A, 0 0 50px #00438A;
    }

    @keyframes revealLogo {
      0% {
        opacity: 0;
        transform: scale(0.95);
        filter: blur(10px);
      }

      100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0px);
      }
    }

    .cinematic-subtitle {
      font-family: var(--font-mono);
      font-size: 13px;
      color: #FFFFFF;
      letter-spacing: 0.15em;
      display: flex;
      gap: 12px;
      clip-path: polygon(0 -50px, 100% -50px, 100% 150px, 0 150px);
    }

    .cinematic-subtitle span {
      opacity: 0;
      transform: translateY(15px);
    }

    #cinematic-intro.active .cinematic-subtitle span {
      animation: glideSubtitle 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    }

    #cinematic-intro.active .cinematic-subtitle span:nth-child(1) {
      animation-delay: 1.2s;
    }

    #cinematic-intro.active .cinematic-subtitle span:nth-child(2) {
      animation-delay: 1.35s;
    }

    #cinematic-intro.active .cinematic-subtitle span:nth-child(3) {
      animation-delay: 1.5s;
    }

    @keyframes glideSubtitle {
      0% {
        opacity: 0;
        transform: translateY(15px);
      }

      100% {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .cinematic-line {
      margin-top: 24px;
      height: 2px;
      background: linear-gradient(90deg, transparent, #00438A, #4DA6FF, #D3202A, transparent);
      width: 0%;
      opacity: 0;
    }

    #cinematic-intro.active .cinematic-line {
      animation: expandLine 1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
      animation-delay: 1.8s;
    }

    @keyframes expandLine {
      0% {
        width: 0%;
        opacity: 0;
      }

      100% {
        width: 90%;
        max-width: 400px;
        opacity: 1;
      }
    }

    /* ── Global Loader ── */
    #global-loader {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 3px;
      background: rgba(255, 255, 255, 0.1);
      z-index: 99999;
      display: none;
      overflow: hidden;
    }

    #global-loader::after {
      content: '';
      position: absolute;
      width: 40%;
      height: 100%;
      background: var(--blue-500);
      animation: loading-bar 1.2s infinite ease-in-out;
    }

    @keyframes loading-bar {
      0% {
        left: -40%;
      }

      100% {
        left: 100%;
      }
    }

    /* ============================================================
       MODERN LAYER — overrides for typography, shape, badges,
       navigation and accessibility. Keep at the end of this block.
       ============================================================ */
    html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
    body { font-variant-numeric: tabular-nums; }
    code, pre, kbd, samp, .mono { font-family: var(--font-code); }

    /* Headings: sentence case, semibold, tight tracking (was condensed all-caps) */
    .topbar-title, .section-title, .modal-title, .alerts-title,
    .empty-state h3, .kb-attachments-section h4 {
      text-transform: none;
      letter-spacing: -0.01em;
      font-weight: 600;
    }
    .topbar-title { font-size: 18px; }
    .section-title { font-size: 16px; }
    .modal-title { font-size: 17px; }
    .alerts-title { font-size: 18px; }
    .stat-value, .uat-stat-value { font-weight: 700; letter-spacing: -0.02em; }
    .stat-value { font-size: 30px; }
    .uat-stat-value { font-size: 24px; }
    .logo-text, .auth-brand-name { font-weight: 700; letter-spacing: 0.08em; font-size: 15px; }
    .cinematic-logo { font-weight: 800; letter-spacing: -0.02em; }

    /* Surfaces: hairline borders + soft elevation */
    .stat-card, .table-card, .topbar {
      border-width: 1px;
      border-color: var(--border);
    }
    .stat-card, .table-card { box-shadow: var(--shadow-sm); }
    .stat-card:hover { border-color: var(--border-bright); box-shadow: var(--shadow-md); }
    .stat-card::before { height: 2px; }
    .topbar { box-shadow: none; }
    .modal { border-radius: 16px; }
    .modal-overlay { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
    .form-control { border-width: 1px; }
    .form-control:focus { box-shadow: 0 0 0 4px rgba(26, 101, 200, 0.14); }

    /* Buttons */
    .btn { letter-spacing: 0; }
    .btn-primary:hover { transform: none; }

    /* Badges: soft pills in sentence case */
    .badge {
      border-radius: 999px;
      padding: 2px 10px;
      font-size: 11.5px;
      text-transform: none;
      letter-spacing: 0;
    }

    /* Table headers: quieter */
    thead th { font-size: 11.5px; letter-spacing: 0.04em; }

    /* Sidebar: flat, calm active state instead of glow */
    .nav-item { font-weight: 500; border-color: transparent; }
    .nav-item:hover { transform: none; box-shadow: none; border-color: transparent; }
    .nav-item.active {
      background: rgba(46, 125, 233, 0.18);
      border-color: transparent;
      box-shadow: none;
      text-shadow: none;
      font-weight: 600;
    }
    .nav-item.active::before {
      background: var(--blue-300);
      box-shadow: none;
    }

    /* Sidebar: solid surface instead of glass gradient */
    .sidebar {
      background: var(--sidebar-bg);
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
      box-shadow: none;
      border-right: 1px solid var(--sidebar-border);
      transition: width var(--transition), min-width var(--transition);
    }
    .main-content { transition: margin-left var(--transition); }
    .nav-section-label { letter-spacing: 0.08em; }

    /* Collapse button (desktop only) */
    .sidebar-collapse-btn {
      display: none;
      align-items: center;
      justify-content: center;
      width: 34px;
      height: 34px;
      flex-shrink: 0;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: transparent;
      color: var(--text-secondary);
      cursor: pointer;
      transition: var(--transition);
    }
    .sidebar-collapse-btn:hover { background: var(--surface-1); color: var(--text-primary); }
    .sidebar-collapse-btn i { font-size: 12px; transition: transform var(--transition); }
    body.sidebar-collapsed .sidebar-collapse-btn i { transform: rotate(180deg); }

    @media (min-width: 861px) {
      .sidebar-collapse-btn { display: inline-flex; }
      body.sidebar-collapsed { --sidebar-w: 72px; }
      body.sidebar-collapsed .sidebar { overflow-x: hidden; }
      body.sidebar-collapsed .sidebar-header { justify-content: center; padding-left: 0; padding-right: 0; }
      body.sidebar-collapsed .logo-text,
      body.sidebar-collapsed .user-info,
      body.sidebar-collapsed .user-card-action { display: none; }
      body.sidebar-collapsed .nav-section-label {
        font-size: 0;
        height: 1px;
        margin: 10px 14px;
        padding: 0;
        background: var(--sidebar-border);
      }
      body.sidebar-collapsed .nav-item {
        font-size: 0;
        gap: 0;
        justify-content: center;
        padding: 11px 0;
      }
      body.sidebar-collapsed .nav-item .nav-icon { font-size: 16px; margin: 0; }
      body.sidebar-collapsed .nav-item .nav-counter {
        position: absolute;
        top: 3px;
        right: 5px;
        font-size: 10px;
        margin: 0;
      }
      body.sidebar-collapsed .user-card { justify-content: center; padding-left: 0; padding-right: 0; }
    }

    /* Dashboard KPI cards */
    .stat-label {
      text-transform: none;
      letter-spacing: 0;
      font-size: 12.5px;
      font-weight: 500;
    }
    .stat-icon { width: 36px; height: 36px; border-radius: 10px; font-size: 14px; }
    .stat-card { padding: 18px 20px; }
    .stat-card:hover { transform: none; }
    .stat-trend { font-size: 12px; color: var(--text-muted); }

    /* Tables: roomier rows, calmer header */
    thead th {
      font-size: 12px;
      font-weight: 600;
      text-transform: none;
      letter-spacing: 0;
      padding: 11px 16px;
      border-bottom-width: 1px;
    }
    tbody td { padding: 13px 16px; }
    tbody tr { border-bottom-color: var(--border); }
    tbody tr:hover { background: var(--surface-1); }
    .table-footer { border-top-color: var(--border); }

    /* Accessibility: visible keyboard focus */
    :is(button, a, summary, [tabindex], .btn, .nav-item):focus-visible {
      outline: 2px solid var(--blue-400) !important;
      outline-offset: 2px;
    }

    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
      }
    }

/* ============================================================
   MODERN LAYER 2 — ticket list views, density, ticket detail
   ============================================================ */

/* Quick-view chips + density toggle */
.view-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px 0;
}
.view-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.view-chip {
  border: 1px solid var(--border-bright);
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
}
.view-chip:hover { background: var(--surface-1); color: var(--text-primary); }
.view-chip.active {
  background: var(--blue-500);
  border-color: var(--blue-500);
  color: #fff;
}
.density-toggle {
  display: inline-flex;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  overflow: hidden;
}
.density-btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  width: 32px;
  height: 30px;
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition);
}
.density-btn + .density-btn { border-left: 1px solid var(--border-bright); }
.density-btn:hover { color: var(--text-primary); }
.density-btn.active { background: var(--surface-1); color: var(--blue-500); }

/* Compact density applies to every table */
body.density-compact tbody td { padding: 6px 14px; font-size: 12.5px; }
body.density-compact thead th { padding: 8px 14px; }

/* Ticket detail: lighter header, calmer panels, sticky side column */
.ticket-detail-header {
  border-width: 1px;
  border-color: var(--border);
  border-top-width: 1px;
  box-shadow: var(--shadow-sm);
  padding: 24px 28px;
}
.ticket-detail-title { font-size: 22px; letter-spacing: -0.015em; }
.meta-item { background: var(--surface-1); border-color: transparent; }
.meta-item-label {
  text-transform: none;
  letter-spacing: 0;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
}
.detail-panel { border-width: 1px; border-color: var(--border); box-shadow: var(--shadow-sm); }
.detail-panel-header { background: transparent; border-bottom-color: var(--border); padding: 14px 20px; }
.detail-panel-title {
  text-transform: none;
  letter-spacing: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}
.detail-panel-body { padding: 20px; }
.chat-bubble { border-radius: 16px; }

@media (min-width: 1025px) {
  .detail-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; }
  .detail-grid > :last-child {
    position: sticky;
    top: calc(var(--header-h) + 16px);
    max-height: calc(100vh - var(--header-h) - 32px);
    overflow-y: auto;
    scrollbar-width: thin;
    padding-bottom: 4px;
  }
}

/* Dashboard: breathing room between sections */
.stats-grid { gap: 20px; }
