  :root{
    --bg:#0a0f1a;
    --bg-2:#0d1420;
    --panel:#121a29;
    --panel-2:#182236;
    --panel-hover:#1c2740;
    --border:#232f47;
    --border-soft:#1a2436;
    --text:#e8edf7;
    --text-dim:#8b96b0;
    --text-faint:#5a6480;
    --accent:#2dd4d0;
    --accent-dim:#1a9c99;
    --accent-glow:rgba(45,212,208,0.18);
    --indigo:#6d7cf9;
    --critical:#f2495c;
    --critical-bg:rgba(242,73,92,0.13);
    --high:#f5a524;
    --high-bg:rgba(245,165,36,0.13);
    --medium:#3b82f6;
    --medium-bg:rgba(59,130,246,0.13);
    --low:#2ecf7a;
    --low-bg:rgba(46,207,122,0.13);
    --radius:12px;
    --radius-sm:8px;
    --font-display:'Space Grotesk', sans-serif;
    --font-body:'Inter', sans-serif;
    --font-mono:'JetBrains Mono', monospace;

    --shadow-sm:0 1px 2px rgba(0,0,0,0.35);
  }

  html[data-theme="light"]{
    --bg:#f4f6fb;
    --bg-2:#ffffff;
    --panel:#ffffff;
    --panel-2:#f0f3f9;
    --panel-hover:#e7ebf5;
    --border:#dde3f0;
    --border-soft:#e6eaf3;
    --text:#131a2b;
    --text-dim:#5b6579;
    --text-faint:#8890a3;
    --accent:#0e9e9a;
    --accent-dim:#0b7f7c;
    --accent-glow:rgba(14,158,154,0.14);
    --indigo:#5361e0;
    --critical:#d92d47;
    --critical-bg:rgba(217,45,71,0.09);
    --high:#c47a05;
    --high-bg:rgba(196,122,5,0.12);
    --medium:#2563eb;
    --medium-bg:rgba(37,99,235,0.09);
    --low:#1a9e5c;
    --low-bg:rgba(26,158,92,0.1);
    --shadow-sm:0 1px 3px rgba(20,30,60,0.08);
  }

  html[data-theme="light"] body{
    background:
      radial-gradient(1200px 600px at 100% -10%, rgba(83,97,224,0.05), transparent),
      radial-gradient(900px 500px at -10% 20%, rgba(14,158,154,0.05), transparent),
      var(--bg);
  }

  html[data-theme="light"] .brand-mark, html[data-theme="light"] .avatar{ color:#ffffff; }
  html[data-theme="light"] .toast, html[data-theme="light"] .dropdown-panel, html[data-theme="light"] .modal-box{
    box-shadow:0 16px 40px rgba(20,30,60,0.12);
  }

  html, body{ transition:background 0.25s ease, color 0.25s ease; }
  *{ margin:0; padding:0; box-sizing:border-box; }

  @media (prefers-reduced-motion: reduce){
    *{ animation-duration:0.01ms !important; transition-duration:0.01ms !important; }
  }

  body{
    font-family:var(--font-body);
    background:
      radial-gradient(1200px 600px at 100% -10%, rgba(109,124,249,0.08), transparent),
      radial-gradient(900px 500px at -10% 20%, rgba(45,212,208,0.06), transparent),
      var(--bg);
    color:var(--text);
    min-height:100vh;
    display:flex;
  }

  a{ color:inherit; }

  /* ---------- Scrollbar ---------- */
  ::-webkit-scrollbar{ width:8px; height:8px; }
  ::-webkit-scrollbar-track{ background:transparent; }
  ::-webkit-scrollbar-thumb{ background:#2a3550; border-radius:8px; }
  ::-webkit-scrollbar-thumb:hover{ background:#354065; }

  /* ---------- Sidebar ---------- */
  .sidebar{
    width:250px;
    flex-shrink:0;
    background:var(--bg-2);
    border-right:1px solid var(--border-soft);
    height:100vh;
    position:sticky;
    top:0;
    display:flex;
    flex-direction:column;
    padding:22px 14px;
  }

  .brand{
    display:flex;
    align-items:center;
    gap:10px;
    padding:0 10px 22px 10px;
    margin-bottom:14px;
    border-bottom:1px solid var(--border-soft);
  }

  .brand-mark{
    width:34px; height:34px;
    border-radius:9px;
    background:linear-gradient(135deg, var(--accent), var(--indigo));
    display:flex; align-items:center; justify-content:center;
    font-family:var(--font-display);
    font-weight:700;
    color:#06110f;
    font-size:15px;
    flex-shrink:0;
  }

  .brand-text .name{ font-family:var(--font-display); font-weight:700; font-size:16px; letter-spacing:0.2px; }
  .brand-text .sub{ font-size:11px; color:var(--text-faint); font-family:var(--font-mono); }

  .nav-group-label{
    font-size:10.5px;
    text-transform:uppercase;
    letter-spacing:1.2px;
    color:var(--text-faint);
    padding:16px 12px 6px 12px;
    font-weight:600;
  }

  .nav-item{
    display:flex;
    align-items:center;
    gap:11px;
    padding:9px 12px;
    border-radius:var(--radius-sm);
    color:var(--text-dim);
    cursor:pointer;
    font-size:13.5px;
    font-weight:500;
    transition:background 0.15s, color 0.15s;
    position:relative;
    border:none;
    background:none;
    width:100%;
    text-align:left;
  }

  .nav-item svg{ width:17px; height:17px; flex-shrink:0; }

  .nav-item:hover{ background:var(--panel-hover); color:var(--text); }

  .nav-item.active{
    background:linear-gradient(90deg, var(--accent-glow), transparent);
    color:var(--accent);
  }

  .nav-item.active::before{
    content:'';
    position:absolute;
    left:-14px; top:6px; bottom:6px;
    width:3px;
    border-radius:3px;
    background:var(--accent);
  }

  .nav-badge{
    margin-left:auto;
    background:var(--panel-2);
    color:var(--text-dim);
    font-size:10.5px;
    font-family:var(--font-mono);
    padding:1px 7px;
    border-radius:20px;
  }

  .nav-item.active .nav-badge{ background:rgba(45,212,208,0.16); color:var(--accent); }

  .sidebar-footer{
    margin-top:auto;
    padding:12px;
    border-top:1px solid var(--border-soft);
    font-size:11px;
    color:var(--text-faint);
    font-family:var(--font-mono);
  }

  /* ---------- Main ---------- */
  .main{
    flex:1;
    min-width:0;
    display:flex;
    flex-direction:column;
  }

  .topbar{
    display:flex;
    align-items:center;
    gap:16px;
    padding:16px 28px;
    border-bottom:1px solid var(--border-soft);
    position:sticky;
    top:0;
    background:rgba(10,15,26,0.85);
    backdrop-filter:blur(10px);
    z-index:50;
  }

  .search-box{
    flex:1;
    max-width:420px;
    position:relative;
  }

  .search-box input{
    width:100%;
    background:var(--panel);
    border:1px solid var(--border);
    color:var(--text);
    padding:9px 14px 9px 36px;
    border-radius:9px;
    font-size:13px;
    font-family:var(--font-body);
    outline:none;
    transition:border-color 0.15s, box-shadow 0.15s;
  }

  .search-box input:focus{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-glow); }
  .search-box .icon{ position:absolute; left:12px; top:50%; transform:translateY(-50%); color:var(--text-faint); font-size:14px; pointer-events:none; }
  .search-box kbd{
    position:absolute; right:10px; top:50%; transform:translateY(-50%);
    font-family:var(--font-mono); font-size:10px; color:var(--text-faint);
    background:var(--panel-2); border:1px solid var(--border); border-radius:5px; padding:2px 6px;
  }

  #searchResultsDropdown{
    position:absolute;
    top:calc(100% + 8px);
    left:0; right:0;
    background:var(--panel-2);
    border:1px solid var(--border);
    border-radius:10px;
    max-height:360px;
    overflow-y:auto;
    display:none;
    box-shadow:0 20px 40px rgba(0,0,0,0.4);
    z-index:60;
  }
  #searchResultsDropdown.show{ display:block; }
  .sr-item{ padding:10px 14px; border-bottom:1px solid var(--border-soft); cursor:pointer; }
  .sr-item:last-child{ border-bottom:none; }
  .sr-item:hover{ background:var(--panel-hover); }
  .sr-item .sr-top{ display:flex; justify-content:space-between; font-size:12.5px; color:var(--text); font-weight:600;}
  .sr-item .sr-meta{ font-size:11px; color:var(--text-faint); margin-top:3px; font-family:var(--font-mono); }
  .sr-empty{ padding:16px; text-align:center; color:var(--text-faint); font-size:12.5px; }

  .topbar-spacer{ flex:1; }

  .topbar-actions{ display:flex; align-items:center; gap:10px; }

  .icon-btn{
    width:38px; height:38px;
    border-radius:9px;
    background:var(--panel);
    border:1px solid var(--border);
    color:var(--text-dim);
    display:flex; align-items:center; justify-content:center;
    cursor:pointer;
    position:relative;
    font-size:16px;
    transition:background 0.15s, color 0.15s;
  }
  .icon-btn:hover{ background:var(--panel-hover); color:var(--text); }

  .dot-flag{
    position:absolute; top:-3px; right:-3px;
    width:9px; height:9px; border-radius:50%;
    background:var(--critical);
    border:2px solid var(--bg-2);
  }

  .dropdown-panel{
    position:absolute;
    top:48px; right:0;
    width:320px;
    background:var(--panel-2);
    border:1px solid var(--border);
    border-radius:12px;
    box-shadow:0 24px 48px rgba(0,0,0,0.45);
    display:none;
    z-index:70;
    overflow:hidden;
  }
  .dropdown-panel.show{ display:block; }
  .dropdown-header{ padding:14px 16px; border-bottom:1px solid var(--border-soft); font-weight:600; font-size:13.5px; display:flex; justify-content:space-between; align-items:center;}
  .dropdown-header span.mark-all{ font-size:11.5px; color:var(--accent); cursor:pointer; font-weight:500; }
  .notif-item{ padding:12px 16px; border-bottom:1px solid var(--border-soft); display:flex; gap:10px; cursor:pointer; }
  .notif-item:hover{ background:var(--panel-hover); }
  .notif-item .n-dot{ width:8px; height:8px; border-radius:50%; margin-top:5px; flex-shrink:0; }
  .notif-item .n-text{ font-size:12.5px; color:var(--text); line-height:1.4; }
  .notif-item .n-time{ font-size:11px; color:var(--text-faint); margin-top:3px; }
  .user-chip{
    display:flex; align-items:center; gap:9px;
    padding:6px 10px 6px 6px;
    border-radius:9px;
    background:var(--panel);
    border:1px solid var(--border);
    cursor:pointer;
    position:relative;
  }
  .user-chip:hover{ background:var(--panel-hover); }
  .avatar{
    width:28px; height:28px; border-radius:8px;
    background:linear-gradient(135deg, var(--indigo), var(--accent));
    display:flex; align-items:center; justify-content:center;
    font-size:12px; font-weight:700; color:#0a0f1a;
    flex-shrink:0;
  }
  .user-chip .u-name{ font-size:12.5px; font-weight:600; }
  .user-chip .u-role{ font-size:10.5px; color:var(--text-faint); }
  .menu-item{ padding:10px 16px; font-size:12.5px; color:var(--text-dim); cursor:pointer; display:flex; align-items:center; gap:9px; }
  .menu-item:hover{ background:var(--panel-hover); color:var(--text); }
  .menu-item.danger:hover{ color:var(--critical); }
  .menu-divider{ height:1px; background:var(--border-soft); margin:4px 0; }

  /* ---------- Status pulse strip (signature element) ---------- */
  .pulse-strip{
    margin:18px 28px 0 28px;
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:12px;
    padding:12px 18px;
    display:flex;
    align-items:center;
    gap:18px;
  }
  .pulse-dot-wrap{ display:flex; align-items:center; gap:9px; flex-shrink:0; }
  .pulse-dot{
    width:9px; height:9px; border-radius:50%;
    background:var(--low);
    box-shadow:0 0 0 0 rgba(46,207,122,0.6);
    animation:pulseDot 2s infinite;
  }
  @keyframes pulseDot{
    0%{ box-shadow:0 0 0 0 rgba(46,207,122,0.5); }
    70%{ box-shadow:0 0 0 8px rgba(46,207,122,0); }
    100%{ box-shadow:0 0 0 0 rgba(46,207,122,0); }
  }
  .pulse-strip .status-text{ font-size:13px; font-weight:600; white-space:nowrap; }
  .pulse-strip .status-sub{ font-size:11.5px; color:var(--text-faint); white-space:nowrap; font-family:var(--font-mono); }
  .sparkline{ flex:1; display:flex; align-items:flex-end; gap:3px; height:28px; }
  .sparkline .bar{ flex:1; background:linear-gradient(180deg, var(--accent), var(--accent-dim)); border-radius:2px 2px 0 0; min-height:3px; opacity:0.85; }
  .pulse-strip .last-updated{ font-size:11px; color:var(--text-faint); font-family:var(--font-mono); white-space:nowrap; }

  /* ---------- Toasts ---------- */
#toastContainer {
    position: fixed; top: 25px; right: 25px; display: flex; flex-direction: column; gap: 14px; z-index: 9999;
}
.toast-alert {
    width: 360px; background: #fff; border-radius: 20px; padding: 18px 20px; display: flex; align-items: center; gap: 16px; position: relative; overflow: hidden; box-shadow: 0 18px 45px rgba(0,0,0,0.10), 0 5px 15px rgba(0,0,0,0.05);
    transform: translateX(420px);opacity: 0;transition: 0.45s cubic-bezier(.17,.89,.32,1.15);}
  .toast{
    background:var(--panel-2); border:1px solid var(--border);  border-left:3px solid var(--accent);  padding:13px 18px;  border-radius:9px;  font-size:13px; color:var(--text);  min-width:260px;  box-shadow:0 16px 40px rgba(0,0,0,0.5); animation:toastIn 0.25s ease;
  }
.toast-alert.active { transform: translateX(0); opacity: 1;}
  .toast.error{ border-left-color:var(--critical); }
  .toast.warn{ border-left-color:var(--high); }
.toast-alert::before { content: ""; position: absolute; top: 0; left: 0; width: 5px; height: 100%; background: linear-gradient(180deg, #06b6d4, #3b82f6);
}
.toast-alert.error::before {
    background: linear-gradient(180deg, #f87171, #dc2626);
}
.toast-alert.warn::before {
    background: linear-gradient(180deg, #fbbf24, #d97706);
}
.toast-alert.success::before {
    background: linear-gradient(180deg, #34d399, #059669);
}
.toast-icon {
    min-width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    background: #ecfeff;
    color: #0891b2;
}
.toast-alert.error .toast-icon {
    background: #fef2f2;
    color: #dc2626;
}
.toast-alert.success .toast-icon {
    background: #ecfdf5;
    color: #059669;
}

.toast-content h3 {
    font-size: 15px;
    color: #111827;
    margin-bottom: 3px;
    font-weight: 700;
}

.toast-content p {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
    word-break: break-word;
}
.toast-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: 0.35s ease;
    color: #666;
    font-size: 11px;
}

    .toast-close-btn:hover {
        transform: rotate(90deg);
        background: #111827;
        color: #fff;
    }
  @keyframes toastIn{ from{ opacity:0; transform:translateX(20px);} to{ opacity:1; transform:translateX(0);} }

  /* ---------- Content area ---------- */
  .content{ padding:22px 28px 60px 28px; }

  .section{ display:none; }
  .section.active{ display:block; animation:fadeUp 0.35s ease; }
  @keyframes fadeUp{ from{ opacity:0; transform:translateY(8px);} to{ opacity:1; transform:translateY(0);} }

  .page-head{ display:flex; justify-content:space-between; align-items:flex-end; margin-bottom:20px; flex-wrap:wrap; gap:12px; }
  .page-head h1{ font-family:var(--font-display); font-size:23px; font-weight:700; }
  .page-head p{ color:var(--text-faint); font-size:13px; margin-top:4px; }

  .btn{
    padding:10px 18px;
    border-radius:9px;
    border:1px solid var(--border);
    background:var(--panel);
    color:var(--text);
    font-size:13px;
    font-weight:600;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    gap:8px;
    transition:all 0.15s;
    font-family:var(--font-body);
  }
  .btn:hover{ background:var(--panel-hover); }
  .btn-primary{ background:linear-gradient(135deg, var(--accent), var(--accent-dim)); color:#062120; border:none; }
  .btn-primary:hover{ filter:brightness(1.08); transform:translateY(-1px); box-shadow:0 8px 20px var(--accent-glow); }
  .btn-ghost{ background:transparent; }
  .btn-sm{ padding:6px 12px; font-size:12px; }

  /* ---------- Stat cards ---------- */
  .stats-grid{ display:grid; grid-template-columns:repeat(auto-fit, minmax(210px, 1fr)); gap:16px; margin-bottom:22px; }
  .stat-card{
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:var(--radius);
    padding:18px 20px;
    position:relative;
    overflow:hidden;
    transition:transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  }
  .stat-card::before{
    content:'';
    position:absolute; top:0; left:0; right:0; height:3px;
    background:var(--border);
  }
  .stat-card.critical::before{ background:linear-gradient(90deg, var(--critical), transparent); }
  .stat-card.warning::before{ background:linear-gradient(90deg, var(--high), transparent); }
  .stat-card.success::before{ background:linear-gradient(90deg, var(--low), transparent); }
  .stat-card.info::before{ background:linear-gradient(90deg, var(--medium), transparent); }
  .stat-card:hover{ transform:translateY(-3px); border-color:#2c3a5a; box-shadow:0 12px 28px rgba(0,0,0,0.25); }
  .stat-card .top-row{ display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:14px; }
  .stat-card h3{ color:var(--text-dim); font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:0.5px; }
  .stat-icon{ width:32px; height:32px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:15px; flex-shrink:0; }
  .stat-card.critical .stat-icon{ background:var(--critical-bg); color:var(--critical); }
  .stat-card.warning .stat-icon{ background:var(--high-bg); color:var(--high); }
  .stat-card.success .stat-icon{ background:var(--low-bg); color:var(--low); }
  .stat-card.info .stat-icon{ background:var(--medium-bg); color:var(--medium); }
  .stat-card .number{ font-family:var(--font-display); font-size:30px; font-weight:700; margin-bottom:6px; }
  .stat-card .label{ color:var(--text-faint); font-size:12px; }
  .stat-card .trend{ font-size:11.5px; font-weight:600; margin-left:8px; }
  .trend.up{ color:var(--critical); }
  .trend.down{ color:var(--low); }
.notif-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--critical);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-2);
    font-family: var(--font-mono);
    display: none;
}
  /* ---------- Grid layout ---------- */
  .content-grid{ display:grid; grid-template-columns:2fr 1fr; gap:18px; margin-bottom:22px; align-items:start; }

  .card{ background:var(--panel); border:1px solid var(--border); border-radius:var(--radius); padding:22px; }
  .card + .card{ margin-top:0px; }
  .card-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:18px; padding-bottom:14px; border-bottom:1px solid var(--border-soft); }
  .card-head h2{ font-family:var(--font-display); font-size:16px; font-weight:600; }
  .card-head .muted-link{ font-size:12px; color:var(--accent); cursor:pointer; font-weight:500; }

  /* ---------- Charts (pure CSS) ---------- */
  .bar-chart-row{ display:flex; align-items:center; gap:12px; margin-bottom:14px; }
  .bar-chart-row .bc-label{ width:80px; font-size:12px; color:var(--text-dim); flex-shrink:0; }
  .bar-chart-row .bc-track{ flex:1; height:9px; background:var(--panel-2); border-radius:6px; overflow:hidden; }
  .bar-chart-row .bc-fill{ height:100%; border-radius:6px; transition:width 0.6s ease; }
  .bar-chart-row .bc-val{ width:34px; text-align:right; font-family:var(--font-mono); font-size:12px; color:var(--text-dim); flex-shrink:0; }

  .donut-wrap{ display:flex; align-items:center; gap:22px; }
  .donut{ width:130px; height:130px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center; position:relative; }
  .donut::after{ content:''; position:absolute; width:82px; height:82px; border-radius:50%; background:var(--panel); }
  .donut-center{ position:relative; z-index:2; text-align:center; }
  .donut-center .dc-num{ font-family:var(--font-display); font-size:22px; font-weight:700; }
  .donut-center .dc-label{ font-size:10px; color:var(--text-faint); text-transform:uppercase; }
  .legend{ display:flex; flex-direction:column; gap:9px; }
  .legend-item{ display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--text-dim); }
  .legend-swatch{ width:9px; height:9px; border-radius:3px; flex-shrink:0; }

  /* ---------- Quick actions ---------- */
  .quick-actions{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
  .quick-action-btn{
    padding:16px 12px;
    border:1px dashed var(--border);
    background:var(--panel-2);
    border-radius:10px;
    cursor:pointer;
    text-align:center;
    font-size:12.5px;
    color:var(--text-dim);
    font-weight:600;
    transition:all 0.2s;
    display:flex; flex-direction:column; align-items:center; gap:8px;
  }
  .quick-action-btn svg{ width:20px; height:20px; }
  .quick-action-btn:hover{ background:var(--accent-glow); border-color:var(--accent); color:var(--accent); border-style:solid; }

  /* ---------- Activity feed ---------- */
  .activity-item{ padding:12px 0; border-bottom:1px solid var(--border-soft); display:flex; gap:11px; }
  .activity-item:last-child{ border-bottom:none; padding-bottom:0; }
  .activity-dot{ width:7px; height:7px; border-radius:50%; background:var(--accent); margin-top:6px; flex-shrink:0; }
  .activity-item .time{ color:var(--text-faint); font-size:11px; margin-bottom:3px; font-family:var(--font-mono); }
  .activity-item .description{ color:var(--text); font-size:12.5px; line-height:1.4; }
  .activity-item .description b{ color:var(--accent); font-weight:600; }

  /* ---------- Table toolbar ---------- */
  .table-toolbar{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom:16px; align-items:center; }
  .table-toolbar input[type="text"], .table-toolbar select{
    background:var(--panel-2);
    border:1px solid var(--border);
    color:var(--text);
    padding:8px 12px;
    border-radius:8px;
    font-size:12.5px;
    font-family:var(--font-body);
    outline:none;
  }
  .table-toolbar input[type="text"]{ flex:1; min-width:160px; }
  .table-toolbar select:focus, .table-toolbar input:focus{ border-color:var(--accent); }
  .toolbar-spacer{ flex:1; }
  .result-count{ font-size:11.5px; color:var(--text-faint); font-family:var(--font-mono); }

  /* ---------- Tables ---------- */
  .table-wrap{ overflow-x:auto; }
  table{ width:100%; border-collapse:collapse; min-width:600px; }
  table th{
    background:var(--panel-2);
    padding:11px 14px;
    text-align:left;
    font-size:10.5px;
    text-transform:uppercase;
    letter-spacing:0.5px;
    color:var(--text-faint);
    font-weight:600;
    cursor:pointer;
    user-select:none;
    white-space:nowrap;
  }
  table th.sortable:hover{ color:var(--accent); }
  table th .sort-arrow{ font-size:9px; margin-left:4px; opacity:0.6; }
  table td{ padding:12px 14px; border-bottom:1px solid var(--border-soft); font-size:13px; color:var(--text); }
  table td.id-cell{ font-family:var(--font-mono); color:var(--text-dim); font-size:12px; }
  table tr:hover td{ background:var(--panel-hover); }
  table tbody tr:last-child td{ border-bottom:none; }
  .empty-row td{ text-align:center; padding:36px; color:var(--text-faint); }

  .badge{ display:inline-block; padding:4px 11px; border-radius:20px; font-size:11px; font-weight:600; white-space:nowrap; }
  .badge.critical{ background:var(--critical-bg); color:var(--critical); }
  .badge.high{ background:var(--high-bg); color:var(--high); }
  .badge.medium{ background:var(--medium-bg); color:var(--medium); }
  .badge.low{ background:var(--low-bg); color:var(--low); }
  .badge.new{ background:var(--medium-bg); color:var(--medium); }
  .badge.in-progress{ background:var(--high-bg); color:var(--high); }
  .badge.on-hold{ background:rgba(139,150,176,0.15); color:var(--text-dim); }
  .badge.resolved, .badge.completed, .badge.approved, .badge.closed{ background:var(--low-bg); color:var(--low); }
  .badge.rejected{ background:var(--critical-bg); color:var(--critical); }
  .badge.draft{ background:rgba(139,150,176,0.15); color:var(--text-dim); }
  .badge.pending-approval, .badge.scheduled{ background:var(--high-bg); color:var(--high); }
  .badge.investigating{ background:var(--medium-bg); color:var(--medium); }
  .badge.known-error{ background:var(--high-bg); color:var(--high); }
  .badge.available{ background:var(--low-bg); color:var(--low); }
  .badge.in-use{ background:var(--medium-bg); color:var(--medium); }
  .badge.maintenance{ background:var(--high-bg); color:var(--high); }
  .badge.retired{ background:rgba(139,150,176,0.15); color:var(--text-dim); }
  .badge.active{ background:var(--low-bg); color:var(--low); }
  .badge.on-leave{ background:var(--high-bg); color:var(--high); }
  .badge.inactive{ background:rgba(139,150,176,0.15); color:var(--text-dim); }

  .action-btn{ padding:6px 10px; border:1px solid var(--border); border-radius:6px; cursor:pointer; font-size:11.5px; margin-right:5px; background:var(--panel-2); color:var(--text-dim); transition:all 0.15s; }
  .action-btn:hover{ transform:translateY(-1px); }
  .action-btn.view:hover{ border-color:var(--medium); color:var(--medium); }
  .action-btn.edit:hover{ border-color:var(--high); color:var(--high); }
  .action-btn.delete:hover{ border-color:var(--critical); color:var(--critical); }

  .pagination{ display:flex; align-items:center; justify-content:flex-end; gap:10px; margin-top:14px; }
  .pagination button{ background:var(--panel-2); border:1px solid var(--border); color:var(--text-dim); padding:6px 12px; border-radius:7px; font-size:12px; cursor:pointer; }
  .pagination button:disabled{ opacity:0.4; cursor:not-allowed; }
  .pagination button:not(:disabled):hover{ border-color:var(--accent); color:var(--accent); }
  .pagination span{ font-size:12px; color:var(--text-faint); font-family:var(--font-mono); }

  /* ---------- KB & Catalog grid ---------- */
  .kb-grid, .catalog-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:16px; }
  .kb-card, .catalog-card{
    background:var(--panel-2);
    border:1px solid var(--border);
    border-radius:11px;
    padding:18px;
    cursor:pointer;
    transition:all 0.2s;
  }
  .kb-card:hover, .catalog-card:hover{ border-color:var(--accent); transform:translateY(-2px); }
  .kb-card .kb-cat, .catalog-card .cat-cat{ font-size:10.5px; text-transform:uppercase; letter-spacing:0.5px; color:var(--accent); font-weight:700; margin-bottom:8px; }
  .kb-card h3, .catalog-card h3{ font-size:14.5px; margin-bottom:8px; font-weight:600; }
  .kb-card p, .catalog-card p{ font-size:12.5px; color:var(--text-dim); line-height:1.5; margin-bottom:12px; }
  .kb-meta, .cat-meta{ display:flex; justify-content:space-between; font-size:11px; color:var(--text-faint); font-family:var(--font-mono); }
  .catalog-card .cat-icon{ width:38px; height:38px; border-radius:9px; background:var(--accent-glow); color:var(--accent); display:flex; align-items:center; justify-content:center; font-size:18px; margin-bottom:12px; }
  .catalog-card .btn{ width:100%; justify-content:center; margin-top:6px; }

  /* ---------- Team ---------- */
  .team-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr)); gap:16px; }
  .team-card{ background:var(--panel); border:1px solid var(--border); border-radius:12px; padding:20px; text-align:center; }
  .team-card .avatar{ width:52px; height:52px; margin:0 auto 12px auto; border-radius:14px; font-size:18px; }
  .team-card .t-name{ font-weight:600; font-size:14.5px; margin-bottom:2px; }
  .team-card .t-role{ font-size:11.5px; color:var(--text-faint); margin-bottom:14px; }
  .team-stats{ display:flex; justify-content:space-around; border-top:1px solid var(--border-soft); padding-top:14px; }
  .team-stats div{ display:flex; flex-direction:column; }
  .team-stats .t-num{ font-family:var(--font-display); font-weight:700; font-size:17px; }
  .team-stats .t-label{ font-size:10px; color:var(--text-faint); text-transform:uppercase; }

  /* ---------- Modal ---------- */
  .modal{ display:none; position:fixed; inset:0; background:rgba(4,7,14,0.7); backdrop-filter:blur(3px); justify-content:center; align-items:center; z-index:1000; padding:20px; }
  .modal.active{ display:flex; }
.modal-content {
    background: var(--panel-2);
    border: 1px solid var(--border);
    padding: 26px;
    border-radius: 14px;
    max-width: 1285px !important;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    animation: slideIn 0.25s ease;
}
  @keyframes slideIn{ from{ transform:translateY(-30px); opacity:0; } to{ transform:translateY(0); opacity:1; } }
  .modal-header{ display:flex; justify-content:space-between; align-items:center; margin-bottom:20px; padding-bottom:15px; border-bottom:1px solid var(--border-soft); }
  .modal-header h2{ font-family:var(--font-display); font-size:17px; font-weight:600; }
  .close-btn{ background:var(--panel); color:var(--text-dim); border:1px solid var(--border); padding:7px 13px; border-radius:8px; cursor:pointer; font-size:12.5px; }
  .close-btn:hover{ color:var(--critical); border-color:var(--critical); }

  .form-row{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
  .form-group{ margin-bottom:16px; }
  .form-group label{ display:block; margin-bottom:7px; color:var(--text-dim); font-weight:600; font-size:12.5px; }
  .form-group input, .form-group select, .form-group textarea{
    width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:8px; font-size:13px;
    font-family:inherit; background:var(--panel); color:var(--text); outline:none; transition:border-color 0.15s, box-shadow 0.15s;
  }
  .form-group textarea{ resize:vertical; min-height:90px; }
  .form-group input:focus, .form-group select:focus, .form-group textarea:focus{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-glow); }
  .submit-btn{ background:linear-gradient(135deg, var(--accent), var(--accent-dim)); color:#062120; border:none; padding:12px 30px; border-radius:9px; cursor:pointer; font-size:14.5px; font-weight:700; width:100%; transition:all 0.2s; }
  .submit-btn:hover{ filter:brightness(1.08); transform:translateY(-1px); }

  /* ---------- View detail modal ---------- */
  .detail-grid{ display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:18px; }
  .detail-field{ background:var(--panel); border:1px solid var(--border-soft); border-radius:9px; padding:12px 14px; }
  .detail-field .df-label{ font-size:10.5px; text-transform:uppercase; color:var(--text-faint); letter-spacing:0.5px; margin-bottom:6px; }
  .detail-field .df-value{ font-size:13.5px; color:var(--text); }
  .detail-desc{ background:var(--panel); border:1px solid var(--border-soft); border-radius:9px; padding:14px; font-size:13px; color:var(--text-dim); line-height:1.6; margin-bottom:18px; }
  .timeline-item{ display:flex; gap:12px; padding-bottom:16px; position:relative; }
  .timeline-item::before{ content:''; position:absolute; left:5px; top:16px; bottom:0; width:1px; background:var(--border); }
  .timeline-item:last-child::before{ display:none; }
  .timeline-dot{ width:11px; height:11px; border-radius:50%; background:var(--accent); margin-top:3px; flex-shrink:0; z-index:1; }
  .timeline-time{ font-size:11px; color:var(--text-faint); font-family:var(--font-mono); }
  .timeline-text{ font-size:12.5px; color:var(--text); margin-top:2px; }

  /* ---------- Empty states ---------- */
  .empty-state{ text-align:center; padding:50px 20px; color:var(--text-faint); }
  .empty-state .es-icon{ font-size:34px; margin-bottom:10px; }
  .empty-state .es-title{ font-size:14px; color:var(--text-dim); font-weight:600; margin-bottom:4px; }
  .empty-state .es-sub{ font-size:12.5px; }

  /* ---------- Theme toggle ---------- */
  .theme-toggle{
    width:38px; height:38px;
    border-radius:9px;
    background:var(--panel);
    border:1px solid var(--border);
    color:var(--text-dim);
    display:flex; align-items:center; justify-content:center;
    cursor:pointer;
    font-size:16px;
    transition:background 0.15s, color 0.15s;
  }
  .theme-toggle:hover{ background:var(--panel-hover); color:var(--accent); }
  .theme-toggle .sun-ico{ display:none; }
  .theme-toggle .moon-ico{ display:flex; }
  html[data-theme="light"] .theme-toggle .sun-ico{ display:flex; }
  html[data-theme="light"] .theme-toggle .moon-ico{ display:none; }

  /* ---------- Mini list widgets (dashboard) ---------- */
  .workload-row{ display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--border-soft); }
  .workload-row:last-child{ border-bottom:none; }
  .workload-avatar{
    width:32px; height:32px; border-radius:8px;
    background:linear-gradient(135deg, var(--indigo), var(--accent));
    display:flex; align-items:center; justify-content:center;
    font-size:11.5px; font-weight:700; color:#0a0f1a; flex-shrink:0;
  }
  .workload-info{ flex:1; min-width:0; }
  .workload-info .w-name{ font-size:12.5px; font-weight:600; color:var(--text); }
  .workload-info .w-track{ height:6px; background:var(--panel-2); border-radius:6px; margin-top:6px; overflow:hidden; }
  .workload-info .w-fill{ height:100%; border-radius:6px; background:linear-gradient(90deg, var(--accent), var(--indigo)); }
  .workload-count{ font-family:var(--font-mono); font-size:12px; color:var(--text-faint); flex-shrink:0; }

  .mini-list-item{ display:flex; align-items:center; gap:12px; padding:11px 0; border-bottom:1px solid var(--border-soft); }
  .mini-list-item:last-child{ border-bottom:none; }
  .mini-list-icon{ width:30px; height:30px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:14px; flex-shrink:0; }
  .mini-list-body{ flex:1; min-width:0; }
  .mini-list-body .m-title{ font-size:12.5px; font-weight:600; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .mini-list-body .m-sub{ font-size:11px; color:var(--text-faint); margin-top:2px; }

  .field-error{ color:var(--critical); font-size:11.5px; margin-top:4px; display:none; }
  .form-field.invalid input, .form-field.invalid select, .form-field.invalid textarea{ border-color:var(--critical) !important; box-shadow:0 0 0 3px var(--critical-bg); }
  .form-field.invalid .field-error{ display:block; }

  /* ---------- Login screen ---------- */
  #loginScreen{
    position:fixed; inset:0; z-index:1000;
    display:flex; align-items:center; justify-content:center;
    background:
      radial-gradient(1200px 700px at 100% -10%, rgba(109,124,249,0.16), transparent),
      radial-gradient(1000px 600px at -10% 110%, rgba(45,212,208,0.12), transparent),
      var(--bg);
    padding:20px;
  }
  html[data-theme="light"] #loginScreen{
    background:
      radial-gradient(1200px 700px at 100% -10%, rgba(83,97,224,0.08), transparent),
      radial-gradient(1000px 600px at -10% 110%, rgba(14,158,154,0.07), transparent),
      var(--bg);
  }
  .login-card{
    width:100%; max-width:400px;
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:16px;
    padding:36px 34px 30px 34px;
    box-shadow:0 30px 70px rgba(0,0,0,0.35);
    animation:fadeUp 0.4s ease;
  }
  .login-brand{ display:flex; align-items:center; gap:11px; margin-bottom:26px; }
  .login-brand .brand-mark{ width:40px; height:40px; font-size:17px; }
  .login-brand .name{ font-family:var(--font-display); font-weight:700; font-size:19px; }
  .login-brand .sub{ font-size:11px; color:var(--text-faint); font-family:var(--font-mono); }
  .login-card h1{ font-family:var(--font-display); font-size:20px; font-weight:700; margin-bottom:6px; }
  .login-card .login-sub{ font-size:13px; color:var(--text-faint); margin-bottom:24px; }
  .login-field{ margin-bottom:16px; }
  .login-field label{ display:block; font-size:12px; font-weight:600; color:var(--text-dim); margin-bottom:7px; }
  .login-field .input-wrap{ position:relative; }
  .login-field .input-wrap .li-icon{ position:absolute; left:13px; top:50%; transform:translateY(-50%); font-size:14px; color:var(--text-faint); pointer-events:none; }
  .login-field input{
    width:100%;
    background:var(--panel-2);
    border:1px solid var(--border);
    color:var(--text);
    padding:11px 14px 11px 38px;
    border-radius:9px;
    font-size:13.5px;
    font-family:var(--font-body);
    outline:none;
    transition:border-color 0.15s, box-shadow 0.15s;
  }
  .login-field input:focus{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-glow); }
  .login-row-between{ display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; font-size:12px; }
  .login-remember{ display:flex; align-items:center; gap:7px; color:var(--text-dim); cursor:pointer; }
  .login-remember input{ accent-color:var(--accent); width:14px; height:14px; }
  .login-forgot{ color:var(--accent); cursor:pointer; font-weight:500; }
  .login-submit{
    width:100%;
    padding:12px 18px;
    border-radius:9px;
    border:none;
    background:linear-gradient(135deg, var(--accent), var(--accent-dim));
    color:#062120;
    font-size:13.5px;
    font-weight:700;
    cursor:pointer;
    font-family:var(--font-body);
    transition:all 0.15s;
  }
  .login-submit:hover{ filter:brightness(1.08); transform:translateY(-1px); box-shadow:0 8px 24px var(--accent-glow); }
  .login-demo-hint{
    margin-top:18px;
    padding:11px 13px;
    background:var(--panel-2);
    border:1px solid var(--border-soft);
    border-radius:9px;
    font-size:11.5px;
    color:var(--text-faint);
    font-family:var(--font-mono);
    line-height:1.6;
  }
  .login-error{
    display:none;
    background:var(--critical-bg);
    color:var(--critical);
    border:1px solid rgba(242,73,92,0.35);
    padding:10px 13px;
    border-radius:9px;
    font-size:12.5px;
    margin-bottom:16px;
  }
  .login-error.show{ display:block; }
  .login-footer-note{ text-align:center; margin-top:22px; font-size:11.5px; color:var(--text-faint); }
  #appShell{ display:flex; width:100%; }
  #appShell.hidden{ display:none; }

  /* ---------- Modern Analytics Charts ---------- */
  .analytics-card{
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:16px;
    padding:22px 24px;
    position:relative;
    overflow:hidden;
  }
  .analytics-card::before{
    content:'';
    position:absolute; top:0; left:0; right:0; height:1px;
    background:linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity:0.5;
  }
  .analytics-head{ display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:20px; flex-wrap:wrap; gap:10px; }
  .analytics-head h2{ font-family:var(--font-display); font-size:16px; font-weight:600; margin-bottom:3px; }
  .analytics-head .sub{ font-size:12px; color:var(--text-faint); }
  .analytics-chip{
    display:flex; align-items:center; gap:6px;
    background:var(--panel-2);
    border:1px solid var(--border-soft);
    border-radius:20px;
    padding:5px 12px 5px 10px;
    font-size:12px; font-weight:600;
  }
  .analytics-chip.trend-up{ color:var(--critical); }
  .analytics-chip.trend-down{ color:var(--low); }

  /* Trend area/line chart */
  .trend-chart-wrap{ width:100%; }
  .trend-chart-wrap svg{ width:100%; height:auto; display:block; overflow:visible; }
  .trend-point{ cursor:pointer; }
  .trend-point circle{ transition:r 0.15s; }
  .trend-point:hover circle{ r:5.5; }
  .trend-day-labels{ display:flex; justify-content:space-between; margin-top:8px; padding:0 2px; }
  .trend-day-labels span{ font-size:10.5px; color:var(--text-faint); font-family:var(--font-mono); }

  /* Modern vertical/horizontal SVG bar chart */
  .modern-bar-list{ display:flex; flex-direction:column; gap:16px; }
  .modern-bar-row{ display:grid; grid-template-columns:88px 1fr 40px; align-items:center; gap:12px; }
  .modern-bar-row .mb-label{ font-size:12.5px; color:var(--text-dim); font-weight:600; display:flex; align-items:center; gap:7px; }
  .modern-bar-row .mb-dot{ width:8px; height:8px; border-radius:3px; flex-shrink:0; }
  .modern-bar-row .mb-track{ height:12px; background:var(--panel-2); border-radius:7px; overflow:hidden; position:relative; }
  .modern-bar-row .mb-fill{
    height:100%; border-radius:7px;
    display:flex; align-items:center; justify-content:flex-end;
    transition:width 0.8s cubic-bezier(0.16,1,0.3,1);
    box-shadow:0 0 12px 0 var(--accent-glow);
  }
  .modern-bar-row .mb-val{ font-family:var(--font-mono); font-size:12.5px; color:var(--text); font-weight:600; text-align:right; }

  /* Ring / donut via SVG */
  .ring-chart-wrap{ display:flex; align-items:center; gap:26px; flex-wrap:wrap; }
  .ring-chart-wrap svg{ flex-shrink:0; }
  .ring-center-num{ font-family:var(--font-display); font-size:24px; font-weight:700; fill:var(--text); }
  .ring-center-label{ font-size:10px; fill:var(--text-faint); text-transform:uppercase; letter-spacing:0.5px; }
  .ring-legend{ flex:1; min-width:150px; display:flex; flex-direction:column; gap:11px; }
  .ring-legend-item{ display:flex; align-items:center; gap:9px; font-size:12.5px; color:var(--text-dim); }
  .ring-legend-item .rl-swatch{ width:10px; height:10px; border-radius:3px; flex-shrink:0; }
  .ring-legend-item .rl-name{ flex:1; }
  .ring-legend-item .rl-count{ font-family:var(--font-mono); color:var(--text); font-weight:600; }
  .ring-legend-item .rl-pct{ font-size:11px; color:var(--text-faint); width:34px; text-align:right; }

  .analytics-grid-3{ display:grid; grid-template-columns:1.3fr 1fr; gap:18px; margin-bottom:22px; align-items:stretch; }
  @media (max-width:1100px){ .analytics-grid-3{ grid-template-columns:1fr; } }

  /* =========================================================================
     MODERN DASHBOARD (v3) — colorful SaaS-style layout
     ========================================================================= */
  .ndash-breadcrumb{ font-size:12px; color:var(--text-faint); margin-bottom:6px; }
  .ndash-breadcrumb span{ color:var(--accent); cursor:pointer; }

  .ndash-quick-row{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom:20px; }
  .ndash-quick-chip{
    display:flex; align-items:center; gap:8px;
    background:var(--panel); border:1px solid var(--border);
    padding:9px 16px; border-radius:10px; cursor:pointer;
    font-size:12.5px; font-weight:600; color:var(--text-dim);
    transition:all 0.15s;
  }
  .ndash-quick-chip:hover{ border-color:var(--accent); color:var(--accent); transform:translateY(-1px); }
  .ndash-quick-chip .qc-ico{ width:22px; height:22px; border-radius:6px; display:flex; align-items:center; justify-content:center; font-size:12px; flex-shrink:0; }

  .ndash-stats-row{
    display:grid;
    grid-template-columns:repeat(4, 1fr);
    gap:14px;
    margin-bottom:20px;
  }
  @media (max-width:1300px){ .ndash-stats-row{ grid-template-columns:repeat(2, 1fr); } }
  @media (max-width:560px){ .ndash-stats-row{ grid-template-columns:1fr; } }

  .ndash-stat-card{
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:13px;
    padding:16px 17px;
    transition:transform 0.2s, box-shadow 0.2s;
    cursor:pointer;
  }
  .ndash-stat-card:hover{ transform:translateY(-3px); box-shadow:0 12px 26px rgba(0,0,0,0.22); }
  .ndash-stat-top{ display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:14px; }
  .ndash-stat-ico{ width:36px; height:36px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:16px; flex-shrink:0; }
  .ndash-stat-trend{ font-size:11px; font-weight:700; padding:3px 8px; border-radius:20px; white-space:nowrap; }
  .ndash-stat-trend.up{ color:var(--low); background:var(--low-bg); }
  .ndash-stat-trend.down{ color:var(--critical); background:var(--critical-bg); }
  .ndash-stat-num{ font-family:var(--font-display); font-size:24px; font-weight:700; line-height:1; margin-bottom:5px; }
  .ndash-stat-label{ font-size:12px; color:var(--text-dim); font-weight:600; margin-bottom:10px; }
  .ndash-stat-foot{ display:flex; justify-content:space-between; align-items:center; font-size:11px; padding-top:10px; border-top:1px solid var(--border-soft); }
  .ndash-stat-foot .sf-note{ color:var(--text-faint); }
  .ndash-stat-foot .sf-link{ color:var(--accent); font-weight:600; }

  .ndash-row-2{ display:grid; grid-template-columns:2fr 1fr; gap:16px; margin-bottom:16px; align-items:stretch; }
  .ndash-row-3{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:16px; margin-bottom:16px; align-items:stretch; }
  @media (max-width:1150px){ .ndash-row-2{ grid-template-columns:1fr; } .ndash-row-3{ grid-template-columns:1fr; } }

  .ndash-toggle-group{ display:flex; gap:4px; background:var(--panel-2); border:1px solid var(--border-soft); border-radius:8px; padding:3px; }
  .ndash-toggle-btn{ border:none; background:none; padding:5px 13px; border-radius:6px; font-size:11.5px; font-weight:600; color:var(--text-faint); cursor:pointer; }
  .ndash-toggle-btn.active{ background:var(--accent); color:#062120; }

  /* Funnel / lifecycle list */
  .ndash-funnel-list{ display:flex; flex-direction:column; gap:10px; }
  .ndash-funnel-row{
    display:flex; align-items:center; justify-content:space-between;
    padding:13px 16px; border-radius:9px; color:#fff; font-size:13px; font-weight:600;
    transition:transform 0.15s;
  }
  .ndash-funnel-row:hover{ transform:translateX(3px); }
  .ndash-funnel-row .fr-count{ font-family:var(--font-mono); font-size:13.5px; font-weight:700; }

  /* Performance list (agents) */
  .ndash-perf-list{ display:flex; flex-direction:column; gap:16px; }
  .ndash-perf-row{ display:flex; flex-direction:column; gap:7px; }
  .ndash-perf-top{ display:flex; align-items:center; gap:10px; }
  .ndash-perf-avatar{ width:28px; height:28px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:#fff; flex-shrink:0; }
  .ndash-perf-name{ flex:1; font-size:12.5px; font-weight:600; color:var(--text); }
  .ndash-perf-count{ font-size:12px; font-weight:700; color:var(--text-dim); font-family:var(--font-mono); }
  .ndash-perf-track{ height:7px; background:var(--panel-2); border-radius:6px; overflow:hidden; }
  .ndash-perf-fill{ height:100%; border-radius:6px; transition:width 0.8s cubic-bezier(0.16,1,0.3,1); }

  /* Priority table card */
  .ndash-table-head{ display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:16px; }
  .ndash-badge-pill{ display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:600; padding:3px 10px; border-radius:20px; }

  /* Activity feed v2 */
  .ndash-activity-item{ display:flex; gap:12px; padding:13px 0; border-bottom:1px solid var(--border-soft); position:relative; }
  .ndash-activity-item:last-child{ border-bottom:none; padding-bottom:0; }
  .ndash-activity-dot{ width:9px; height:9px; border-radius:50%; margin-top:5px; flex-shrink:0; box-shadow:0 0 0 3px var(--panel-2); }
  .ndash-activity-title{ font-size:12.5px; font-weight:700; color:var(--text); margin-bottom:2px; }
  .ndash-activity-desc{ font-size:12px; color:var(--text-dim); line-height:1.4; }
  .ndash-activity-time{ font-size:10.5px; color:var(--text-faint); margin-top:4px; font-family:var(--font-mono); }

  /* ---------- Custom chart tooltips ---------- */
  [data-tooltip]{ position:relative; }
  [data-tooltip]::after{
    content:attr(data-tooltip);
    position:absolute;
    bottom:calc(100% + 9px);
    left:50%;
    transform:translateX(-50%) translateY(4px);
    background:#12141c;
    color:#fff;
    font-size:11.5px;
    font-weight:600;
    font-family:var(--font-body);
    padding:7px 11px;
    border-radius:7px;
    white-space:nowrap;
    box-shadow:0 8px 20px rgba(0,0,0,0.35);
    opacity:0;
    pointer-events:none;
    transition:opacity 0.15s, transform 0.15s;
    z-index:50;
  }
  [data-tooltip]::before{
    content:'';
    position:absolute;
    bottom:calc(100% + 4px);
    left:50%;
    transform:translateX(-50%) translateY(4px);
    border:5px solid transparent;
    border-top-color:#12141c;
    opacity:0;
    pointer-events:none;
    transition:opacity 0.15s, transform 0.15s;
    z-index:50;
  }
  [data-tooltip]:hover::after, [data-tooltip]:hover::before{ opacity:1; transform:translateX(-50%) translateY(0); }

  /* ---------- Responsive ---------- */
  @media (max-width:1000px){
    .content-grid{ grid-template-columns:1fr; }
    .form-row{ grid-template-columns:1fr; }
  }
  @media (max-width:820px){
    .sidebar{ position:fixed; left:0; z-index:900; transform:translateX(-100%); transition:transform 0.25s; }
    .sidebar.open{ transform:translateX(0); }
    .search-box{ max-width:none; }
    .user-chip .u-name, .user-chip .u-role{ display:none; }
  }
.category-assign-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    padding: 16px;
}

.cat-assign-card {
    background: var(--bg-2);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 16px;
    transition: box-shadow 0.2s ease;
}

    .cat-assign-card:hover {
        box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    }

.cat-assign-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-soft);
}

.cat-assign-badge {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
}

.cat-assign-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cat-assign-count {
    font-size: 11px;
    color: var(--text-faint);
    background: var(--medium-bg);
    padding: 2px 8px;
    border-radius: 999px;
}

.cat-assign-edit-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    color: var(--accent);
    padding: 2px 4px;
}

.cat-assign-emp-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cat-assign-emp-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--medium-bg);
    color: var(--medium);
    font-size: 12.5px;
    font-weight: 500;
    padding: 5px 6px 5px 12px;
    border-radius: 999px;
}

    .cat-assign-emp-chip .remove-x {
        cursor: pointer;
        font-weight: 700;
        opacity: 0.6;
        padding: 2px 5px;
        border-radius: 50%;
    }

        .cat-assign-emp-chip .remove-x:hover {
            opacity: 1;
            background: var(--critical-bg);
            color: var(--critical);
        }

.category-assignment-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

    .category-assignment-table thead th {
        background: var(--medium-bg);
        color: var(--text-faint);
        font-size: 11px;
        font-weight: 600;
        text-align: left;
        padding: 11px 14px;
        text-transform: uppercase;
        letter-spacing: .3px;
    }

    .category-assignment-table tbody td {
        padding: 12px 14px;
        font-size: 13px;
        color: var(--text);
        border-bottom: 1px solid var(--border-soft);
        vertical-align: middle;
    }

    .category-assignment-table tbody tr:hover {
        background: var(--medium-bg);
    }

    /* Column widths */

    .category-assignment-table th:nth-child(1),
    .category-assignment-table td:nth-child(1) {
        width: 32%;
    }

    .category-assignment-table th:nth-child(2),
    .category-assignment-table td:nth-child(2) {
        width: 30%;
    }

    .category-assignment-table th:nth-child(3),
    .category-assignment-table td:nth-child(3) {
        width: 23%;
    }

    .category-assignment-table th:nth-child(4),
    .category-assignment-table td:nth-child(4) {
        width: 10%;
    }

    .category-assignment-table th:nth-child(5),
    .category-assignment-table td:nth-child(5) {
        width: 5%;
        text-align: center;
    }

    .category-assignment-table .category-name {
        font-weight: 700;
        color: var(--text);
    }

    .category-assignment-table .remove-x {
        cursor: pointer;
        color: var(--critical);
        font-size: 17px;
        font-weight: bold;
        display: inline-flex;
        width: 24px;
        height: 24px;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }

        .category-assignment-table .remove-x:hover {
            background: var(--critical-bg);
        }

@media (max-width: 900px) {

    .table-wrap {
        overflow-x: auto;
    }

    .category-assignment-table {
        min-width: 800px;
    }
}
/* ================================
   Dashboard Agent Performance
   ================================ */

.agent-performance-row:hover {
    background: #f5f8fc;
}

.agent-performance-modal {
    width: 900px;
    max-width: 95%;
    max-height: 90vh;
    overflow: hidden;
}

    .agent-performance-modal .modal-body {
        max-height: calc(90vh - 100px);
        overflow-y: auto;
    }

.agent-detail-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.agent-detail-card {
    border: 1px solid #dfe5ef;
    border-radius: 10px;
    padding: 18px;
    background: #fff;
}

    .agent-detail-card span {
        display: block;
        font-size: 12px;
        color: #7b8799;
        text-transform: uppercase;
        margin-bottom: 8px;
    }

    .agent-detail-card strong {
        font-size: 26px;
        color: #172033;
    }

.agent-ticket-section {
    border: 1px solid #dfe5ef;
    border-radius: 10px;
    padding: 18px;
}

.agent-ticket-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

    .agent-ticket-head h3 {
        margin: 0;
    }

#agentModalTicketCount {
    font-size: 13px;
    color: #68758a;
}

@media (max-width: 700px) {
    .agent-detail-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ================================
   ASSET TYPE MODAL
   Same style as Designation Modal
   ================================ */

/*#assetTypeModal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    padding: 20px;
}

    #assetTypeModal.show {
        display: flex;
    }

    #assetTypeModal .modal-content {
        width: 100%;
        max-width: 520px;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
        background: var(--card, #ffffff);
        border-radius: 14px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.20);
        padding: 0;
    }

    #assetTypeModal .modal-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 18px 22px;
        border-bottom: 1px solid var(--border, #e2e8f0);
    }

        #assetTypeModal .modal-header h2 {
            margin: 0;
            font-size: 18px;
            font-weight: 700;
        }

    #assetTypeModal form {
        padding: 22px;
    }

    #assetTypeModal .form-group {
        margin-bottom: 18px;
    }

        #assetTypeModal .form-group label {
            display: block;
            margin-bottom: 7px;
            font-size: 13px;
            font-weight: 600;
        }

        #assetTypeModal .form-group input,
        #assetTypeModal .form-group select {
            width: 100%;
            box-sizing: border-box;
        }

    #assetTypeModal .form-actions {
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        margin-top: 24px;
        padding-top: 16px;
        border-top: 1px solid var(--border, #e2e8f0);
    }*/


/* =========================
   SIDEBAR GROUP
========================= */

.sidebar-menu-group {
    width: 100%;
    margin-bottom: 4px;
}

.nav-group-toggle {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--text-faint);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px 7px;
    cursor: pointer;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    text-align: left;
}

.nav-group-label-text {
    white-space: nowrap;
}

.group-arrow {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.nav-group-toggle.open .group-arrow {
    transform: rotate(180deg);
}

.nav-group-content {
    display: none;
    overflow: hidden;
}

    .nav-group-content.open {
        display: block;
    }

/* =========================
   NAV ITEM
========================= */

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    margin: 2px 0;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    position: relative;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

    .nav-item svg {
        width: 17px;
        height: 17px;
        flex-shrink: 0;
    }

    .nav-item:hover {
        background: var(--panel-hover);
        color: var(--text);
    }

    .nav-item.active {
        background: linear-gradient( 90deg, var(--accent-glow), transparent );
        color: var(--accent);
    }

        .nav-item.active::before {
            content: '';
            position: absolute;
            left: -14px;
            top: 6px;
            bottom: 6px;
            width: 3px;
            border-radius: 3px;
            background: var(--accent);
        }

.nav-badge {
    margin-left: auto;
    background: var(--panel-2);
    color: var(--text-dim);
    font-size: 10.5px;
    font-family: var(--font-mono);
    padding: 1px 7px;
    border-radius: 20px;
}

.nav-item.active .nav-badge {
    background: rgba(45, 212, 208, 0.16);
    color: var(--accent);
}

/* =========================
   INVENTORY SUB MENU
========================= */

.nav-item-parent {
    position: relative;
}

.nav-chevron {
    width: 14px !important;
    height: 14px !important;
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.nav-item-parent.open .nav-chevron {
    transform: rotate(90deg);
}

.nav-subgroup {
    display: none;
    padding-left: 17px;
    margin-top: 2px;
}

    .nav-subgroup.open {
        display: block;
    }

.nav-subitem {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--text-faint);
    padding: 7px 10px 7px 28px;
    border-radius: var(--radius-sm);
    text-align: left;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
}

    .nav-subitem:hover {
        background: var(--panel-hover);
        color: var(--text);
    }

    .nav-subitem.active {
        background: var(--accent-glow);
        color: var(--accent);
    }

/* Footer */

.sidebar-footer {
    margin-top: auto;
    padding: 12px;
    border-top: 1px solid var(--border-soft);
    font-size: 11px;
    color: var(--text-faint);
    font-family: var(--font-mono);
}
/* Inventory / Sidebar Group */

.nav-group-content {
    display: none;
}

    .nav-group-content.open {
        display: block;
    }


/* Inventory group items */

#inventoryGroup .nav-item {
    padding-left: 28px;
}


    /* Active inventory item */

    #inventoryGroup .nav-item.active {
        background: linear-gradient( 90deg, var(--accent-glow), transparent );
        color: var(--accent);
    }


/* Group arrow */

.nav-group-toggle .group-arrow {
    margin-left: auto;
    width: 15px;
    height: 15px;
    transition: transform 0.2s ease;
}


/* Arrow open */

.nav-group-toggle.open .group-arrow {
    transform: rotate(180deg);
}
.nav-group-content {
    display: none;
}

    .nav-group-content.open {
        display: block;
    }

.nav-group-toggle .group-arrow {
    margin-left: auto;
    width: 15px;
    height: 15px;
    transition: transform .2s ease;
}

.nav-group-toggle.open .group-arrow {
    transform: rotate(180deg);
}

#inventoryGroup .nav-item {
    padding-left: 28px;
}
/* =====================================================================
   REPORTS MODULE — visuals ported from the  reference design
   (date filter bar, KPI stat-cards already reuse .stat-card above,
   pipeline/bar graphs, donut charts + legends). Additive only — nothing
   above this point is modified.
   ===================================================================== */

  /* ---- Modern report visuals: donut charts, legends, KPI ribbons ---- */
  .report-kicker{
    display:inline-flex; align-items:center; gap:7px; padding:5px 12px 5px 10px;
    background:var(--accent-glow); border:1px solid rgba(45,212,208,0.3); border-radius:999px;
    font-family:var(--font-mono); font-size:11px; font-weight:600; letter-spacing:0.05em;
    color:var(--accent); text-transform:uppercase; margin-bottom:10px;
  }
  .report-kicker::before{ content:''; width:6px; height:6px; border-radius:50%; background:var(--accent); box-shadow:0 0 8px var(--accent); animation:pulseDot 1.6s ease-in-out infinite; }
  @keyframes pulseDot{ 0%,100%{ opacity:1; } 50%{ opacity:0.35; } }

  .report-grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-bottom:18px; align-items:stretch; }
  @media (max-width:900px){ .report-grid-2{ grid-template-columns:1fr; } }

  .card.report-card{ position:relative; overflow:hidden; }
  .card.report-card::before{
    content:''; position:absolute; top:0; left:0; right:0; height:2px;
    background:linear-gradient(90deg, var(--accent), var(--indigo), transparent);
  }
  .card-head .card-head-icon{
    width:30px; height:30px; border-radius:9px; display:flex; align-items:center; justify-content:center;
    background:var(--accent-glow); color:var(--accent); flex-shrink:0; font-size:14px;
  }
  .card-head-title{ display:flex; align-items:center; gap:10px; }
  .card-head-sub{ font-size:11.5px; color:var(--text-faint); margin-top:2px; font-weight:500; }

  .donut-wrap{ display:flex; align-items:center; gap:26px; flex-wrap:wrap; }
  .donut-chart{ position:relative; flex-shrink:0; width:150px; height:150px; }
  .donut-chart svg{ display:block; transform:rotate(0deg); filter:drop-shadow(0 4px 14px rgba(0,0,0,0.25)); }
  .donut-chart svg circle.donut-seg{ transition:stroke-dasharray 0.7s cubic-bezier(.4,0,.2,1); cursor:pointer; }
  .donut-chart svg circle.donut-seg:hover{ opacity:0.82; }
  .donut-center{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; pointer-events:none; }
  .donut-center-value{ font-family:var(--font-display); font-size:24px; font-weight:700; color:var(--text); line-height:1; }
  .donut-center-label{ font-size:10px; color:var(--text-dim); text-transform:uppercase; letter-spacing:0.07em; margin-top:5px; font-weight:600; }

  .donut-legend{ display:flex; flex-direction:column; gap:11px; flex:1; min-width:150px; }
  .legend-item{ display:flex; align-items:center; gap:10px; }
  .legend-swatch{ width:10px; height:10px; border-radius:3px; flex-shrink:0; box-shadow:0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
  .legend-label{ flex:1; font-size:12.5px; color:var(--text-dim); font-weight:500; }
  .legend-val{ font-family:var(--font-mono); font-size:12.5px; font-weight:700; color:var(--text); }
  .legend-val em{ color:var(--text-faint); font-style:normal; font-weight:500; margin-left:3px; font-size:11px; }
  .legend-empty{ color:var(--text-faint); font-size:12.5px; padding:20px 0; text-align:center; width:100%; }

  .mini-kpi-row{ display:flex; gap:14px; flex-wrap:wrap; margin-top:4px; }
  .mini-kpi{ flex:1; min-width:110px; background:var(--panel-2); border:1px solid var(--border-soft); border-radius:var(--radius-sm); padding:12px 14px; }
  .mini-kpi .mk-val{ font-family:var(--font-display); font-size:19px; font-weight:700; color:var(--text); }
  .mini-kpi .mk-label{ font-size:10.5px; color:var(--text-faint); text-transform:uppercase; letter-spacing:0.04em; margin-top:3px; font-weight:600; }

  .report-table-card .card-head{ margin-bottom:0; padding-bottom:16px; }

  /* ---- Report date filter bar ---- */
  .report-filter-bar{
    display:flex; align-items:center; gap:14px; flex-wrap:wrap;
    background:var(--panel); border:1px solid var(--border); border-radius:var(--radius);
    padding:12px 16px; margin-bottom:18px;
  }
  .rf-presets{ display:flex; gap:6px; flex-wrap:wrap; }
  .rf-chip{
    padding:7px 13px; border-radius:999px; border:1px solid var(--border-soft); background:var(--panel-2);
    color:var(--text-dim); font-size:12px; font-weight:600; cursor:pointer; font-family:inherit;
    transition:all 0.15s ease; white-space:nowrap;
  }
  .rf-chip:hover{ color:var(--text); border-color:var(--border); }
  .rf-chip.active{ background:var(--accent-glow); border-color:rgba(45,212,208,0.4); color:var(--accent); }
  .rf-divider{ width:1px; align-self:stretch; background:var(--border-soft); margin:0 2px; }
  .rf-custom{ display:flex; align-items:center; gap:8px; }
  .rf-cal-icon{ font-size:14px; color:var(--text-faint); }
  .rf-custom input[type="date"]{
    background:var(--panel-2); border:1px solid var(--border-soft); color:var(--text);
    border-radius:var(--radius-sm); padding:6px 9px; font-size:12px; font-family:var(--font-mono);
    color-scheme:dark;
  }
  [data-theme="light"] .rf-custom input[type="date"]{ color-scheme:light; }
  .rf-to{ color:var(--text-faint); font-size:11.5px; }
  .rf-spacer{ flex:1; }
  .rf-download{ display:flex; align-items:center; gap:7px; white-space:nowrap; }
  .rf-scope-note{ font-size:11px; color:var(--text-faint); font-style:italic; }

  /* ---- Clickable report table rows (open a detail dialog, like elsewhere) ---- */
  .report-table-card table tbody tr{ cursor:pointer; }
  .report-table-card table tbody tr:hover td{ background:var(--panel-hover); }
  .report-table-card table tbody tr td:first-child{ position:relative; }

  .donut-wrap{ display:flex; align-items:center; gap:22px; }
  .donut{ width:130px; height:130px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center; position:relative; }
  .donut::after{ content:''; position:absolute; width:82px; height:82px; border-radius:50%; background:var(--panel); }
  .donut-center{ position:relative; z-index:2; text-align:center; }
  .donut-center .dc-num{ font-family:var(--font-display); font-size:22px; font-weight:700; }
  .donut-center .dc-label{ font-size:10px; color:var(--text-faint); text-transform:uppercase; }
  .legend{ display:flex; flex-direction:column; gap:9px; }
  .legend-item{ display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--text-dim); }
  .report-theme .legend-item{cursor:pointer;border-radius:8px;padding:7px 8px;margin:-2px -8px;transition:background .18s,transform .18s,color .18s;}
  .report-theme .legend-item:hover{background:var(--report-soft);color:var(--text);transform:translateX(2px);}
  .report-theme .legend-item:focus{outline:2px solid var(--report-accent);outline-offset:2px;}
  .report-theme .report-graph-col{cursor:pointer;}
  .report-theme .report-graph-col:hover .report-graph-label,.report-theme .report-graph-col:hover .report-graph-value{color:var(--report-accent);}

  .legend-swatch{ width:9px; height:9px; border-radius:3px; flex-shrink:0; }

  /* ---------- Report interaction + per-report visual themes ---------- */
  .report-theme{
    --report-accent:var(--accent);
    --report-accent-2:var(--indigo);
    --report-soft:var(--accent-glow);
  }
  .report-theme-inventory{--report-accent:#2dd4d0;--report-accent-2:#8b5cf6;--report-soft:rgba(45,212,208,.10);--accent:#2dd4d0;--accent-glow:rgba(45,212,208,.10);--indigo:#8b5cf6;--medium:#60a5fa;--high:#f59e0b;--low:#34d399;--critical:#f43f5e;}
  .report-theme-stock{--report-accent:#38bdf8;--report-accent-2:#0ea5e9;--report-soft:rgba(56,189,248,.10);--accent:#38bdf8;--accent-glow:rgba(56,189,248,.10);--indigo:#0ea5e9;--medium:#22d3ee;--high:#f59e0b;--low:#34d399;--critical:#ef4444;}
  .report-theme-vendor{--report-accent:#a78bfa;--report-accent-2:#7c3aed;--report-soft:rgba(167,139,250,.10);--accent:#a78bfa;--accent-glow:rgba(167,139,250,.10);--indigo:#7c3aed;--medium:#60a5fa;--high:#f59e0b;--low:#34d399;--critical:#f43f5e;}
  .report-theme-kb{--report-accent:#f59e0b;--report-accent-2:#f97316;--report-soft:rgba(245,158,11,.10);--accent:#f59e0b;--accent-glow:rgba(245,158,11,.10);--indigo:#f97316;--medium:#fbbf24;--high:#fb923c;--low:#34d399;--critical:#ef4444;}
  .report-theme-assets{--report-accent:#34d399;--report-accent-2:#059669;--report-soft:rgba(52,211,153,.10);--accent:#34d399;--accent-glow:rgba(52,211,153,.10);--indigo:#059669;--medium:#60a5fa;--high:#f59e0b;--low:#22c55e;--critical:#ef4444;}
  .report-theme-incidents{--report-accent:#f43f5e;--report-accent-2:#fb7185;--report-soft:rgba(244,63,94,.10);--accent:#f43f5e;--accent-glow:rgba(244,63,94,.10);--indigo:#fb7185;--medium:#60a5fa;--high:#f59e0b;--low:#34d399;--critical:#e11d48;}
  .report-theme-problems{--report-accent:#fb7185;--report-accent-2:#e11d48;--report-soft:rgba(251,113,133,.10);--accent:#fb7185;--accent-glow:rgba(251,113,133,.10);--indigo:#e11d48;--medium:#60a5fa;--high:#f59e0b;--low:#34d399;--critical:#f43f5e;}
  .report-theme-changes{--report-accent:#60a5fa;--report-accent-2:#2563eb;--report-soft:rgba(96,165,250,.10);--accent:#60a5fa;--accent-glow:rgba(96,165,250,.10);--indigo:#2563eb;--medium:#38bdf8;--high:#f59e0b;--low:#34d399;--critical:#f43f5e;}
  .report-theme-team{--report-accent:#22c55e;--report-accent-2:#16a34a;--report-soft:rgba(34,197,94,.10);--accent:#22c55e;--accent-glow:rgba(34,197,94,.10);--indigo:#16a34a;--medium:#60a5fa;--high:#f59e0b;--low:#34d399;--critical:#f43f5e;}
  .report-theme-catalog{--report-accent:#c084fc;--report-accent-2:#9333ea;--report-soft:rgba(192,132,252,.10);--accent:#c084fc;--accent-glow:rgba(192,132,252,.10);--indigo:#9333ea;--medium:#60a5fa;--high:#f59e0b;--low:#34d399;--critical:#f43f5e;}
  .report-theme .report-card{ border-color:color-mix(in srgb, var(--report-accent) 24%, var(--border)); box-shadow:0 10px 28px rgba(0,0,0,.10); }
  .report-theme .report-card::before{ background:linear-gradient(90deg,var(--report-accent),var(--report-accent-2),transparent); }
  .report-theme .card-head-icon{ background:var(--report-soft); color:var(--report-accent); }
  .report-theme .rf-chip.active{ background:var(--report-soft); border-color:color-mix(in srgb,var(--report-accent) 42%,transparent); color:var(--report-accent); }
  .report-stat-card{ cursor:pointer; user-select:none; }
  .report-stat-card:focus{ outline:2px solid var(--report-accent); outline-offset:2px; }
  .report-stat-card:hover{ border-color:color-mix(in srgb,var(--report-accent) 55%,var(--border)); box-shadow:0 10px 24px rgba(0,0,0,.16); }
  .report-stat-card .stat-icon{ background:var(--report-soft); color:var(--report-accent); }
  .report-stat-card::after{ content:'VIEW DETAILS'; position:absolute; right:14px; bottom:11px; font-family:var(--font-mono); font-size:8px; letter-spacing:.08em; color:var(--report-accent); opacity:0; transition:opacity .18s; }
  .report-stat-card:hover::after{ opacity:.75; }
  .report-graph-card{ margin-bottom:18px; }
  .report-graph-badge{ font-family:var(--font-mono); font-size:9px; letter-spacing:.1em; padding:5px 8px; border-radius:999px; color:var(--report-accent); background:var(--report-soft); border:1px solid color-mix(in srgb,var(--report-accent) 30%,transparent); }
  .report-graph{ height:220px; display:flex; align-items:flex-end; gap:12px; padding:18px 8px 0; overflow-x:auto; }
  .report-graph-col{ flex:1 0 58px; min-width:58px; max-width:120px; height:100%; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; cursor:default; }
  .report-graph-value{ font-family:var(--font-mono); font-size:10px; color:var(--text); margin-bottom:6px; min-height:14px; text-align:center; }
  .report-graph-track{ width:100%; height:155px; display:flex; align-items:flex-end; justify-content:center; background:linear-gradient(to top,rgba(255,255,255,.025),transparent); border-bottom:1px solid var(--border-soft); }
  .report-graph-bar{ width:min(42px,72%); min-height:8px; border-radius:8px 8px 2px 2px; background:linear-gradient(180deg,var(--report-accent),var(--report-accent-2)); box-shadow:0 8px 18px color-mix(in srgb,var(--report-accent) 18%,transparent); transition:height .45s ease, transform .18s; }
  .report-graph-col:hover .report-graph-bar{ transform:translateY(-3px); }
  .report-graph-label{ width:100%; margin-top:8px; color:var(--text-dim); font-size:10px; text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .report-alert-summary{ margin-bottom:18px; padding:13px 15px; border:1px solid color-mix(in srgb,var(--report-accent) 28%,var(--border)); background:var(--report-soft); border-radius:10px; color:var(--text); font-size:12.5px; line-height:1.5; }
  .report-alert-table{ min-width:520px; }
  .report-alert-table th{ color:var(--report-accent); }
  .report-alert-empty{ padding:28px 10px; color:var(--text-faint); text-align:center; font-size:12px; width:100%; }
  .report-theme .report-table-card tbody tr:hover td{ box-shadow:inset 3px 0 0 var(--report-accent); }

.report-filter-context{ margin:-4px 0 14px; color:var(--text-faint); font-size:12px; }
.rf-refresh.is-refreshing{ opacity:0.6; cursor:progress; }
.report-grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-bottom:18px; align-items:stretch; }
@media (max-width:900px){ .report-grid-2{ grid-template-columns:1fr; } }
.report-table-card .card-head{ margin-bottom:0; padding-bottom:16px; }
