@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Inter:wght@400;500;600;700&display=swap');

:root,
body[data-theme="dark"] {
  --bg: #0a0f1a;
  --panel: #0f1626;
  --panel-2: #131c30;
  --border: #22304a;
  --text: #dce4f2;
  --text-dim: #7c8aa8;
  --accent: #22d3ee;
  --shadow: rgba(0,0,0,0.3);
}
body[data-theme="light"] {
  --bg: #eef2f9;
  --panel: #ffffff;
  --panel-2: #f4f7fc;
  --border: #dbe3f0;
  --text: #1c2537;
  --text-dim: #647089;
  --accent: #0891a8;
  --shadow: rgba(30,41,59,0.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(ellipse at top left, color-mix(in srgb, var(--accent) 6%, var(--bg)) 0%, var(--bg) 55%);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background 0.2s ease, color 0.2s ease;
}

/* Animasi latar belakang lembut ("aurora"), otomatis ikut warna aksen tema aktif */
body::before, body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  z-index: 0;
}
body::before {
  width: 480px; height: 480px;
  top: -140px; left: -120px;
  background: var(--accent);
  opacity: 0.16;
  animation: aurora-float-a 20s ease-in-out infinite;
}
body::after {
  width: 420px; height: 420px;
  bottom: -160px; right: -100px;
  background: var(--accent);
  opacity: 0.12;
  animation: aurora-float-b 24s ease-in-out infinite;
}

/* Kilau cahaya yang menyapu pelan melintasi topbar — efek "cahaya bergerak" */
.topbar { position: relative; overflow: hidden; }
.topbar::before {
  content: "";
  position: absolute;
  top: -120px; right: -60px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.12;
  filter: blur(90px);
  pointer-events: none;
  animation: aurora-float-c 14s ease-in-out infinite;
}
.topbar::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, color-mix(in srgb, var(--accent) 30%, transparent) 45%, transparent 90%);
  pointer-events: none;
  animation: light-sweep 7s ease-in-out infinite;
}
body[data-theme="light"]::before { opacity: 0.08; }
body[data-theme="light"]::after { opacity: 0.06; }

@keyframes aurora-float-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(70px, 50px) scale(1.08); }
}
@keyframes aurora-float-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-60px, -40px) scale(1.05); }
}
@keyframes aurora-float-c {
  0%, 100% { transform: translate(-50%, 0) scale(1); }
  50% { transform: translate(-50%, 60px) scale(1.15); }
}
@keyframes light-sweep {
  0% { left: -60%; }
  55%, 100% { left: 110%; }
}
@media (prefers-reduced-motion: reduce) {
  body::before, body::after, .topbar::before, .topbar::after { animation: none; }
}

/* ---------- Efek "spotlight" — cahaya mengikuti kursor saat hover ---------- */
.spotlight-card {
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 24%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}
.spotlight-card:hover::before { opacity: 1; }
.spotlight-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateY(-1px); }
.spotlight-card > * { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) {
  .spotlight-card, .spotlight-card::before { transition: none; }
}

/* ---------- Efek "beam" — garis cahaya hijau berputar mengelilingi bingkai kotak ---------- */
@property --beam-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
.beam-card {
  position: relative;
  --beam-color: #9dff3e;
}
.beam-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(
    from var(--beam-angle),
    transparent 0deg,
    transparent 290deg,
    color-mix(in srgb, var(--beam-color) 60%, transparent) 325deg,
    #ffffff 340deg,
    var(--beam-color) 350deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: beam-rotate 3.2s linear infinite;
  pointer-events: none;
  z-index: 2;
}
@keyframes beam-rotate {
  to { --beam-angle: 360deg; }
}
@media (prefers-reduced-motion: reduce) {
  .beam-card::after { animation: none; }
}

#app, .login-screen, .goodbye-screen { position: relative; z-index: 1; }
.mono { font-family: 'Space Mono', monospace; }
a { color: inherit; }

/* ---------- Login ---------- */
.login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--border); border-radius: 14px; padding: 36px 32px; width: 100%; max-width: 380px; box-shadow: 0 20px 60px var(--shadow); }
.eyebrow { font-family: 'Space Mono', monospace; font-size: 11px; letter-spacing: 0.16em; color: var(--accent); text-transform: uppercase; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(34,211,238,0.6); animation: pulse 1.8s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,211,238,0.55);} 70% { box-shadow: 0 0 0 7px rgba(34,211,238,0);} 100% {box-shadow: 0 0 0 0 rgba(34,211,238,0);} }

.logo-container { margin-bottom: 16px; background: transparent; }
.logo-container img { max-width: 150px; width: 100%; height: auto; display: block; filter: drop-shadow(0 2px 8px var(--shadow)); }

.login-card h1 { font-size: 20px; margin: 0 0 4px; }
.login-card p.sub { font-size: 12.5px; color: var(--text-dim); margin: 0 0 22px; }
.login-card label { font-size: 11px; color: var(--text-dim); display: block; margin-bottom: 6px; }
.login-card input { width: 100%; background: color-mix(in srgb, var(--panel) 60%, var(--bg)); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 10px 12px; font-size: 13px; outline: none; margin-bottom: 14px; }
.login-card input:focus { border-color: var(--accent); }
.login-card button { width: 100%; background: var(--accent); border: none; color: #06222b; border-radius: 8px; padding: 11px; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.login-card button:hover { filter: brightness(1.08); }
.error { color: #fb3d5c; font-size: 12px; margin: -6px 0 14px; min-height: 16px; }

.footer-credits { font-family: 'Space Mono', monospace; font-size: 10.5px; color: var(--text-dim); text-align: center; margin-top: 24px; letter-spacing: 0.05em; opacity: 0.85; }

/* ---------- App shell ---------- */
#app { padding: 24px 28px 40px; max-width: 1320px; margin: 0 auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.topbar-left .eyebrow { margin-bottom: 6px; }
.title { font-size: 24px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.01em; }
.subtitle { font-size: 13px; color: var(--text-dim); }

.topbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.user-chip { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--border); border-radius: 20px; padding: 6px 14px 6px 6px; font-size: 12.5px; }
.user-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #06222b; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; }
.role-tag { font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); font-family: 'Space Mono', monospace; }

.icon-link, .theme-toggle, .logout-link { background: transparent; border: 1px solid var(--border); color: var(--text-dim); border-radius: 8px; padding: 8px 14px; font-size: 12.5px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.icon-link:hover, .theme-toggle:hover, .logout-link:hover { color: var(--text); border-color: var(--accent); }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.kpi-card { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.kpi-card.alert { border-color: rgba(251,61,92,0.4); }
.kpi-label { font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); font-family: 'Space Mono', monospace; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-value { font-size: 24px; font-weight: 700; font-family: 'Space Mono', monospace; line-height: 1; }
.kpi-card.alert .kpi-value { color: #fb3d5c; }

.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }
.panel-title { font-size: 12.5px; font-weight: 600; margin-bottom: 12px; }
.chart-row { display: flex; align-items: center; gap: 16px; }
.chart-box {
  width: 150px; height: 150px; flex: none; position: relative;
  perspective: 700px;
}
.chart-box canvas {
  transform: rotateX(35deg) rotateZ(-4deg);
  transform-origin: center center;
  filter: drop-shadow(0 14px 10px rgba(0,0,0,0.35));
  transition: transform 0.35s ease;
}
.chart-box:hover canvas {
  transform: rotateX(24deg) rotateZ(-4deg) scale(1.04);
}
/* Bayangan elips di bawah donut untuk kesan "melayang" di atas permukaan */
.chart-box::before {
  content: "";
  position: absolute;
  left: 50%; bottom: 2px;
  width: 92px; height: 22px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(0,0,0,0.38), transparent 70%);
  border-radius: 50%;
  z-index: -1;
  filter: blur(2px);
}
/* Lapisan kilau/glossy di permukaan donut */
.chart-box::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: rotateX(35deg) rotateZ(-4deg);
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,0.35), transparent 45%);
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: overlay;
}
@media (prefers-reduced-motion: reduce) {
  .chart-box canvas { transition: none; }
}
.legend { display: flex; flex-direction: column; gap: 7px; font-size: 12px; flex: 1; }
.legend-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.legend-left { display: flex; align-items: center; gap: 7px; color: var(--text-dim); }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.legend-num { font-family: 'Space Mono', monospace; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; flex: 1; min-width: 180px; }
.search input { background: transparent; border: none; outline: none; color: var(--text); font-size: 13px; width: 100%; }
select { background: var(--panel); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; outline: none; }
.btn-add, .btn-export { display: flex; align-items: center; gap: 6px; border: none; border-radius: 8px; padding: 9px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-add { background: var(--accent); color: #06222b; }
.btn-add:hover { filter: brightness(1.08); }
.btn-export { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-export:hover { border-color: var(--accent); color: var(--accent); }
.btn-add:disabled, .btn-export:disabled { opacity: .4; cursor: not-allowed; }

.table-wrap { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 0; table-layout: auto; }
thead th { text-align: left; font-family: 'Space Mono', monospace; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); padding: 9px 10px; border-bottom: 1px solid var(--border); background: var(--panel-2); white-space: nowrap; cursor: pointer; user-select: none; }
thead th:hover { color: var(--accent); }
thead th .arrow { margin-left: 4px; opacity: 0.7; }
tbody td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.sev-cell { border-left: 3px solid var(--sc); }
.desc-cell { min-width: 220px; max-width: 420px; }
.desc-title { font-weight: 600; color: var(--text); }
.desc-remark { color: var(--text-dim); font-size: 11.5px; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.due-badge { padding: 2px 6px; border-radius: 5px; font-size: 12px; }
.due-badge.due-soon {
  background: rgba(251,191,36,0.16); color: #d99a06; font-weight: 700;
  animation: due-blink-amber 1.6s ease-in-out infinite;
}
.due-badge.due-overdue {
  background: rgba(251,61,92,0.16); color: #fb3d5c; font-weight: 700;
  animation: due-blink-red 1.3s ease-in-out infinite;
}
body[data-theme="dark"] .due-badge.due-soon { color: #fbbf24; }
body[data-theme="dark"] .due-badge.due-overdue { color: #fb3d5c; }

@keyframes due-blink-amber {
  0%, 100% { background: rgba(251,191,36,0.16); box-shadow: 0 0 0 0 rgba(251,191,36,0); }
  50% { background: rgba(251,191,36,0.4); box-shadow: 0 0 0 3px rgba(251,191,36,0.12); }
}
@keyframes due-blink-red {
  0%, 100% { background: rgba(251,61,92,0.16); box-shadow: 0 0 0 0 rgba(251,61,92,0); }
  50% { background: rgba(251,61,92,0.42); box-shadow: 0 0 0 3px rgba(251,61,92,0.14); }
}
@media (prefers-reduced-motion: reduce) {
  .due-badge.due-soon, .due-badge.due-overdue { animation: none; }
}
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 20px; white-space: nowrap; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.row-actions { display: flex; gap: 6px; }
.icon-btn { background: transparent; border: 1px solid var(--border); color: var(--text-dim); border-radius: 6px; padding: 5px 7px; cursor: pointer; }
.icon-btn:hover { color: var(--text); border-color: var(--accent); }
.empty { padding: 40px; text-align: center; color: var(--text-dim); font-size: 13px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; flex-wrap: wrap; border-top: 1px solid var(--border); }
.pagination-info { font-size: 12px; color: var(--text-dim); }
.pagination-controls { display: flex; align-items: center; gap: 6px; }
.page-btn { background: var(--panel-2); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 6px 11px; font-size: 12px; cursor: pointer; font-family: 'Space Mono', monospace; }
.page-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); color: #06222b; border-color: var(--accent); }
.page-btn:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(4,8,16,0.6); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; width: min(100%, 980px); max-width: 980px; max-height: 92vh; overflow-y: auto; padding: 28px; box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-title { font-size: 15px; font-weight: 700; }
.close-btn { background: transparent; border: none; color: var(--text-dim); cursor: pointer; padding: 4px; font-size: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 11px; color: var(--text-dim); letter-spacing: 0.03em; }
.field input, .field select, .field textarea { width: 100%; box-sizing: border-box; background: color-mix(in srgb, var(--panel) 60%, var(--bg)); border: 1px solid var(--border); color: var(--text); border-radius: 7px; padding: 8px 10px; font-size: 13px; font-family: 'Inter', sans-serif; outline: none; }
.field textarea { resize: vertical; min-height: 60px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }

.team-field { grid-column: 1 / -1; }
.team-select-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.team-choice { display:flex; align-items:center; gap:8px; padding:10px 12px; border:1px solid var(--border); border-radius:9px; background: color-mix(in srgb, var(--panel) 70%, var(--bg)); cursor:pointer; font-size:12px; color:var(--text); transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.team-choice:hover { border-color:var(--accent); transform:translateY(-1px); }
.team-choice input { width:auto !important; margin:0; accent-color:var(--accent); }
.team-choice.team-all { border-style:dashed; }
.team-choice.team-all span { font-weight:700; color:var(--accent); }
@media (max-width: 700px) { .team-select-grid { grid-template-columns:1fr 1fr; } }

.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.btn-secondary { background: transparent; border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 9px 16px; font-size: 13px; cursor: pointer; }
.btn-primary { background: var(--accent); border: none; color: #06222b; border-radius: 8px; padding: 9px 16px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-danger { background: #fb3d5c; border: none; color: #fff; border-radius: 8px; padding: 9px 16px; font-size: 13px; font-weight: 600; cursor: pointer; }

/* ---------- Users page ---------- */
.users-table-wrap { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; overflow: auto; margin-bottom: 20px; }
.card-form { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 22px 24px; max-width: 720px; }
.status-pill { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 20px; }
.status-pill.active { background: rgba(52,211,153,.16); color: #34d399; }
.status-pill.inactive { background: rgba(124,138,168,.16); color: var(--text-dim); }

.app-footer { text-align: center; font-family: 'Space Mono', monospace; font-size: 11px; color: var(--text-dim); opacity: .8; letter-spacing: .05em; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--border); }

@media (max-width: 800px) {
  .panels { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .kpis { grid-template-columns: 1fr 1fr; }
}

/* =========================================================
   SNORT V6 — Executive 3D / Infographic Visualization
   ========================================================= */
.chart-3d-wrap { width: 100%; height: 190px; perspective: 900px; }
.chart-3d-stage { position: relative; height: 100%; width: 100%; padding: 8px 2px 0; overflow: hidden; }
.chart-3d-floor { position:absolute; left:5%; right:5%; bottom:23px; height:52px; transform:skewX(-22deg) rotateX(62deg); transform-origin:center bottom; background:linear-gradient(180deg, color-mix(in srgb,var(--accent) 10%,transparent), transparent); border-bottom:1px solid color-mix(in srgb,var(--accent) 25%,transparent); opacity:.65; }
.chart-3d-bars { position:relative; z-index:2; height:100%; display:flex; align-items:flex-end; justify-content:space-around; gap:8px; padding:0 4px 8px; }
.bar3d-item { flex:1; min-width:0; max-width:105px; height:100%; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; position:relative; cursor:default; }
.bar3d-value { font-family:'Space Mono',monospace; font-size:12px; font-weight:700; margin-bottom:4px; }
.bar3d-column { position:relative; width:44px; height:var(--bar-h); min-height:3px; max-height:125px; transform:skewY(0deg); filter:drop-shadow(8px 10px 5px rgba(0,0,0,.28)); transition:height .45s ease, transform .25s ease, filter .25s ease; }
.bar3d-column:hover { transform:translateY(-5px) scale(1.04); filter:drop-shadow(11px 15px 7px rgba(0,0,0,.34)); }
.bar3d-column .front { position:absolute; inset:0; background:linear-gradient(90deg,color-mix(in srgb,var(--bar-color) 84%,#000),var(--bar-color) 48%,color-mix(in srgb,var(--bar-color) 78%,#fff)); border-radius:3px 3px 1px 1px; box-shadow:inset 1px 0 rgba(255,255,255,.25), inset -2px 0 rgba(0,0,0,.15); }
.bar3d-column .side { position:absolute; top:0; right:-12px; width:12px; height:100%; transform:skewY(-30deg); transform-origin:left top; background:color-mix(in srgb,var(--bar-color) 62%,#000); border-radius:0 3px 2px 0; }
.bar3d-column .top { position:absolute; left:0; top:-8px; width:100%; height:16px; transform:skewX(-42deg); transform-origin:left center; background:linear-gradient(135deg,color-mix(in srgb,var(--bar-color) 75%,#fff),var(--bar-color)); border-radius:3px; }
.bar3d-label { margin-top:9px; font-size:10px; color:var(--text-dim); text-align:center; white-space:nowrap; max-width:100%; overflow:hidden; text-overflow:ellipsis; }
.bar3d-pct { font-family:'Space Mono',monospace; font-size:9px; color:var(--text-dim); margin-top:2px; }

/* Reports */
.report-hero { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; padding:20px 22px; margin-bottom:14px; border:1px solid var(--border); border-radius:14px; background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 9%,var(--panel)),var(--panel)); box-shadow:0 12px 35px var(--shadow); }
.report-eyebrow,.report-kicker { font-family:'Space Mono',monospace; font-size:9px; letter-spacing:.13em; color:var(--accent); text-transform:uppercase; }
.report-hero h1 { margin:5px 0 4px; font-size:24px; letter-spacing:-.02em; }
.report-hero p { margin:0; color:var(--text-dim); font-size:12px; }
.report-live { display:flex; align-items:center; gap:7px; font:700 10px 'Space Mono',monospace; color:var(--text-dim); white-space:nowrap; }
.report-live span { width:7px;height:7px;border-radius:50%;background:#34d399;box-shadow:0 0 0 4px color-mix(in srgb,#34d399 14%,transparent); }
.report-kpis { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:14px; }
.report-kpi { padding:13px 15px; border:1px solid var(--border); border-radius:11px; background:var(--panel); box-shadow:0 7px 20px var(--shadow); }
.report-kpi span { display:block; font:9px 'Space Mono',monospace; letter-spacing:.08em; text-transform:uppercase; color:var(--text-dim); }
.report-kpi strong { display:block; margin-top:6px; font:700 22px 'Space Mono',monospace; }
.report-kpi.accent { border-color:color-mix(in srgb,var(--accent) 45%,var(--border)); }
.report-kpi.accent strong { color:var(--accent); }
.report-kpi.not-started { border-color:rgba(245,158,11,.45); }
.report-kpi.not-started strong { color:#f59e0b; }
.report-grid { display:grid; gap:14px; margin-bottom:14px; }
.report-grid-top,.report-grid-bottom { grid-template-columns:minmax(0,1.65fr) minmax(300px,1fr); }
.report-card,.report-table-card { background:var(--panel); border:1px solid var(--border); border-radius:13px; padding:15px 17px; box-shadow:0 9px 28px var(--shadow); }
.report-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:10px; }
.report-card h2 { font-size:14px; margin:3px 0 0; letter-spacing:-.01em; }
.report-count { color:var(--text-dim); font:10px 'Space Mono',monospace; padding-top:4px; }
.report-chart { height:245px; position:relative; }
.report-chart.horizontal { height:250px; overflow:auto; }
.report-3d-stage { position:relative; height:100%; overflow:hidden; }
.report-3d-floor { position:absolute; left:6%; right:6%; bottom:18px; height:45px; transform:skewX(-22deg) rotateX(60deg); background:linear-gradient(180deg,color-mix(in srgb,var(--accent) 9%,transparent),transparent); border-bottom:1px solid color-mix(in srgb,var(--accent) 20%,transparent); }
.report-3d-bars { position:relative; z-index:2; height:100%; display:flex; align-items:flex-end; justify-content:space-evenly; gap:12px; padding:8px 6px 12px; }
.report-bar3d-item { flex:1; max-width:110px; height:100%; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; }
.report-bar3d-value { font:700 11px 'Space Mono',monospace; margin-bottom:3px; }
.report-bar3d-column { position:relative; width:38px; height:var(--bar-h); max-height:175px; filter:drop-shadow(7px 9px 5px rgba(0,0,0,.27)); transition:.3s ease; }
.report-bar3d-column:hover { transform:translateY(-5px) scale(1.04); }
.report-bar3d-column .front,.report-hbar .front { position:absolute; inset:0; background:linear-gradient(90deg,color-mix(in srgb,var(--bar-color) 84%,#000),var(--bar-color) 48%,color-mix(in srgb,var(--bar-color) 78%,#fff)); border-radius:3px; }
.report-bar3d-column .side,.report-hbar .side { position:absolute; top:0; right:-10px; width:10px; height:100%; transform:skewY(-30deg); transform-origin:left top; background:color-mix(in srgb,var(--bar-color) 58%,#000); border-radius:0 3px 2px 0; }
.report-bar3d-column .top,.report-hbar .top { position:absolute; left:0; top:-7px; width:100%; height:14px; transform:skewX(-42deg); transform-origin:left center; background:linear-gradient(135deg,color-mix(in srgb,var(--bar-color) 72%,#fff),var(--bar-color)); border-radius:3px; }
.report-bar3d-label { margin-top:8px; font-size:9px; color:var(--text-dim); max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.report-hbars { display:flex; flex-direction:column; gap:9px; padding:4px 2px 12px; }
.report-hrow { display:grid; grid-template-columns:minmax(100px,180px) 1fr 34px; align-items:center; gap:9px; min-height:27px; }
.report-hlabel { font-size:10.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--text-dim); }
.report-htrack { height:18px; position:relative; background:color-mix(in srgb,var(--border) 55%,transparent); border-radius:4px; }
.report-hbar { position:relative; width:var(--bar-w); height:13px; top:2px; filter:drop-shadow(5px 5px 3px rgba(0,0,0,.22)); transition:width .45s ease; }
.report-hvalue { font:700 10px 'Space Mono',monospace; text-align:right; }
.report-insight { min-height:305px; }
.insight-list { display:flex; flex-direction:column; gap:9px; }
.insight-row { display:grid; grid-template-columns:1fr auto; gap:4px 8px; padding:11px 12px; border:1px solid var(--border); border-radius:9px; background:var(--panel-2); }
.insight-row span { grid-column:1 / -1; color:var(--text-dim); font-size:9.5px; }
.insight-row strong { font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.insight-row b { font:700 12px 'Space Mono',monospace; color:var(--accent); }
.report-table-card { margin-bottom:14px; }
.report-table-wrap { box-shadow:none; border:none; }
.report-table-wrap table { min-width:700px; }
.report-table-wrap thead th { font-size:9px; padding:9px 10px; }
.report-table-wrap tbody td { padding:9px 10px; font-size:11px; }
.risk-number { color:#fb3d5c !important; font-weight:700; }
.report-error { padding:12px; border:1px solid rgba(251,61,92,.4); color:#fb3d5c; border-radius:8px; font-size:11px; }
@media (max-width: 900px) {
  .report-kpis { grid-template-columns:repeat(2,1fr); }
  .report-grid-top,.report-grid-bottom { grid-template-columns:1fr; }
}
@media (max-width: 620px) {
  .report-hero { flex-direction:column; }
  .report-kpis { grid-template-columns:1fr 1fr; }
  .report-hrow { grid-template-columns:95px 1fr 28px; }
  .chart-3d-wrap { height:180px; }
  .bar3d-column { width:34px; }
}


/* V7 3D infographic hardening */
.bar3d-column {
  --bar-color: var(--accent);
  transform-style: preserve-3d;
  overflow: visible;
}
.bar3d-column .front {
  position:absolute; inset:0;
  background:linear-gradient(90deg,color-mix(in srgb,var(--bar-color) 82%,#000),var(--bar-color) 48%,color-mix(in srgb,var(--bar-color) 78%,#fff));
  border-radius:4px 4px 1px 1px;
  box-shadow:inset 1px 0 rgba(255,255,255,.22), inset -2px 0 rgba(0,0,0,.16);
}
.bar3d-column .side {
  position:absolute; top:0; right:-12px; width:12px; height:100%;
  transform:skewY(-30deg); transform-origin:left top;
  background:color-mix(in srgb,var(--bar-color) 58%,#000);
  border-radius:0 3px 2px 0;
}
.bar3d-column .top {
  position:absolute; left:0; top:-8px; width:100%; height:16px;
  transform:skewX(-42deg); transform-origin:left center;
  background:linear-gradient(135deg,color-mix(in srgb,var(--bar-color) 72%,#fff),var(--bar-color));
  border-radius:4px;
}

/* =========================================================
   V8 — Robust 3D infographic renderer
   Replaces the earlier canvas-like layout with explicit
   responsive geometry so bars cannot collapse into a column.
   ========================================================= */
.chart-box.chart-3d-wrap {
  flex: 1 1 58%;
  width: auto;
  min-width: 320px;
  height: 190px;
  position: relative;
  perspective: 1000px;
  overflow: hidden;
}
.chart-box.chart-3d-wrap::before,
.chart-box.chart-3d-wrap::after { display:none; }
.chart-3d-stage {
  width:100%; height:100%; position:relative; overflow:visible;
  padding:4px 8px 6px; box-sizing:border-box;
}
.chart-3d-floor {
  position:absolute; left:5%; right:5%; bottom:17px; height:38px;
  transform:skewX(-24deg) rotateX(58deg); transform-origin:center bottom;
  background:linear-gradient(180deg, rgba(34,211,238,.13), transparent);
  border-bottom:1px solid rgba(34,211,238,.25);
  opacity:.8; pointer-events:none;
}
.chart-3d-bars {
  position:absolute; inset:0 6px 4px;
  display:flex !important; flex-direction:row !important;
  align-items:flex-end !important; justify-content:space-around !important;
  gap:12px; padding:8px 4px 25px; box-sizing:border-box;
  z-index:2;
}
.bar3d-item {
  flex:1 1 0 !important; width:auto !important; max-width:95px;
  min-width:48px; height:100% !important;
  display:flex !important; flex-direction:column !important;
  align-items:center !important; justify-content:flex-end !important;
  position:relative;
}
.bar3d-value {
  height:18px; margin:0 0 4px; line-height:18px;
  font-size:12px; color:var(--text); white-space:nowrap;
}
.bar3d-column {
  position:relative !important; width:34px !important;
  height:var(--bar-h) !important; min-height:4px; max-height:118px;
  flex:0 0 auto; transform:none;
  filter:drop-shadow(7px 9px 5px rgba(0,0,0,.32));
  transform-style:preserve-3d;
  transition:transform .25s ease, filter .25s ease;
}
.bar3d-column:hover { transform:translateY(-5px) scale(1.04); }
.bar3d-column .front {
  position:absolute; inset:0; display:block;
  background:linear-gradient(90deg,
    color-mix(in srgb,var(--bar-color) 72%,#000),
    var(--bar-color) 50%,
    color-mix(in srgb,var(--bar-color) 78%,#fff));
  border-radius:3px 3px 1px 1px;
  box-shadow:inset 1px 0 rgba(255,255,255,.25), inset -2px 0 rgba(0,0,0,.18);
}
.bar3d-column .side {
  position:absolute; display:block; top:0; right:-9px; width:9px; height:100%;
  transform:skewY(-30deg); transform-origin:left top;
  background:color-mix(in srgb,var(--bar-color) 52%,#000);
  border-radius:0 3px 2px 0;
}
.bar3d-column .top {
  position:absolute; display:block; left:0; top:-7px; width:100%; height:14px;
  transform:skewX(-42deg); transform-origin:left center;
  background:linear-gradient(135deg,color-mix(in srgb,var(--bar-color) 78%,#fff),var(--bar-color));
  border-radius:3px;
}
.bar3d-label { margin-top:8px; font-size:9px; line-height:12px; color:var(--text-dim); text-align:center; white-space:nowrap; }
.bar3d-pct { font:9px/12px 'Space Mono',monospace; color:var(--text-dim); margin-top:1px; }

/* V8 reports: fixed, predictable 3D geometry */
.report-chart { height:245px; position:relative; overflow:hidden; }
.report-chart.horizontal { height:250px; overflow:auto; padding-right:4px; box-sizing:border-box; }
.report-3d-stage { position:relative; width:100%; height:100%; overflow:visible; }
.report-3d-floor { position:absolute; left:6%; right:6%; bottom:18px; height:38px; transform:skewX(-22deg) rotateX(60deg); background:linear-gradient(180deg,rgba(34,211,238,.10),transparent); border-bottom:1px solid rgba(34,211,238,.20); pointer-events:none; }
.report-3d-bars { position:absolute; inset:0 4px 8px; display:flex !important; flex-direction:row !important; align-items:flex-end !important; justify-content:space-evenly !important; gap:12px; padding:8px 6px 28px; box-sizing:border-box; }
.report-bar3d-item { flex:1 1 0 !important; max-width:100px; min-width:48px; height:100% !important; display:flex !important; flex-direction:column !important; justify-content:flex-end !important; align-items:center !important; }
.report-bar3d-column { position:relative !important; width:30px !important; height:var(--bar-h) !important; max-height:165px; flex:0 0 auto; filter:drop-shadow(6px 8px 4px rgba(0,0,0,.28)); transform-style:preserve-3d; }
.report-bar3d-column .front,.report-hbar .front { position:absolute; inset:0; display:block; background:linear-gradient(90deg,color-mix(in srgb,var(--bar-color) 72%,#000),var(--bar-color) 50%,color-mix(in srgb,var(--bar-color) 78%,#fff)); border-radius:3px; }
.report-bar3d-column .side,.report-hbar .side { position:absolute; display:block; top:0; right:-8px; width:8px; height:100%; transform:skewY(-30deg); transform-origin:left top; background:color-mix(in srgb,var(--bar-color) 52%,#000); border-radius:0 3px 2px 0; }
.report-bar3d-column .top,.report-hbar .top { position:absolute; display:block; left:0; top:-6px; width:100%; height:12px; transform:skewX(-42deg); transform-origin:left center; background:linear-gradient(135deg,color-mix(in srgb,var(--bar-color) 78%,#fff),var(--bar-color)); border-radius:3px; }
.report-bar3d-label { margin-top:7px; font-size:9px; line-height:12px; color:var(--text-dim); max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.report-hbars { display:flex; flex-direction:column; gap:10px; padding:6px 4px 12px; min-width:100%; box-sizing:border-box; }
.report-hrow { display:grid !important; grid-template-columns:minmax(115px,185px) minmax(120px,1fr) 32px !important; align-items:center; gap:9px; min-height:28px; }
.report-hlabel { font-size:10.5px; line-height:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--text-dim); }
.report-htrack { height:18px; position:relative; background:color-mix(in srgb,var(--border) 55%,transparent); border-radius:4px; overflow:visible; }
.report-hbar { position:relative; width:var(--bar-w); height:13px; top:2px; filter:drop-shadow(5px 5px 3px rgba(0,0,0,.24)); }
.report-hvalue { font:700 10px 'Space Mono',monospace; text-align:right; }
@media (max-width: 900px) {
  .chart-box.chart-3d-wrap { min-width:0; width:100%; flex-basis:100%; }
  .chart-row { flex-direction:column; align-items:stretch; }
  .legend { width:100%; }
}
@media (max-width: 620px) {
  .chart-box.chart-3d-wrap { height:185px; }
  .bar3d-column { width:28px !important; }
  .bar3d-item { min-width:42px; }
  .report-hrow { grid-template-columns:90px minmax(100px,1fr) 28px !important; }
}


/* =========================================================
   V9 — Dashboard legend refinement
   Clean typography, fixed numeric columns, and balanced
   chart/legend proportions for desktop and mobile.
   ========================================================= */
.chart-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: center;
  column-gap: 24px;
}
.chart-box.chart-3d-wrap {
  width: 100%;
  min-width: 0;
  height: 205px;
}
.legend {
  width: 236px;
  min-width: 236px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  line-height: 1.25;
}
.legend-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  align-items: center;
  column-gap: 10px;
  min-height: 25px;
}
.legend-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-dim);
  font-weight: 500;
}
.legend-label {
  min-width: 0;
  overflow-wrap: anywhere;
}
.legend-dot {
  width: 9px;
  height: 9px;
  min-width: 9px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 5%, transparent);
}
.legend-num {
  display: grid;
  grid-template-columns: 36px 64px;
  justify-content: end;
  align-items: baseline;
  column-gap: 8px;
  white-space: nowrap;
  min-width: 108px;
  font-family: 'Inter', sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.1px;
  color: var(--text);
}
.legend-count {
  text-align: right;
  font-size: 12.5px;
  font-weight: 600;
}
.legend-pct {
  text-align: right;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
}
@media (max-width: 900px) {
  .chart-row {
    grid-template-columns: 1fr;
    row-gap: 14px;
  }
  .chart-box.chart-3d-wrap {
    width: 100%;
    height: 195px;
  }
  .legend {
    width: 100%;
    min-width: 0;
    max-width: 420px;
    margin: 0 auto;
  }
}
@media (max-width: 620px) {
  .legend {
    gap: 8px;
    font-size: 12px;
  }
  .legend-item {
    grid-template-columns: minmax(0, 1fr) 100px;
    min-height: 23px;
  }
  .legend-num {
    grid-template-columns: 34px 58px;
    column-gap: 4px;
  }
  .chart-box.chart-3d-wrap { height: 180px; }
}


/* =========================================================
   V10 — Legend numeric alignment & percentage readability
   ========================================================= */
.legend {
  width: 236px;
  min-width: 236px;
}
.legend-item {
  grid-template-columns: minmax(0, 1fr) 108px;
  column-gap: 12px;
}
.legend-num {
  width: 108px;
  min-width: 108px;
  display: grid;
  grid-template-columns: 36px 64px;
  column-gap: 8px;
  align-items: center;
  justify-content: end;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  font-variant-numeric: tabular-nums;
}
.legend-count,
.legend-pct {
  display: block;
  white-space: nowrap;
  line-height: 1.2;
}
.legend-count { text-align: right; font-size: 13px; font-weight: 600; }
.legend-pct { text-align: right; font-size: 12.5px; font-weight: 500; }

@media (max-width: 900px) {
  .legend {
    width: 100%;
    min-width: 0;
    max-width: 430px;
  }
  .legend-item { grid-template-columns: minmax(0, 1fr) 108px; }
}
@media (max-width: 620px) {
  .legend-item { grid-template-columns: minmax(0, 1fr) 96px; column-gap: 8px; }
  .legend-num { width: 96px; min-width: 96px; grid-template-columns: 32px 56px; column-gap: 8px; }
  .legend-count { font-size: 12.5px; }
  .legend-pct { font-size: 12px; }
}

/* =========================================================
   SNORT CLEAN LIGHT UI — final visual polish
   Light-only dashboard, differentiated top navigation,
   compact breakdown charts, clearer legends.
   ========================================================= */
:root,
body[data-theme="light"],
body.snort-clean-light {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --border: #dce5ef;
  --text: #1e293b;
  --text-dim: #64748b;
  --accent: #0891a8;
  --shadow: rgba(15,23,42,.07);
}

body.snort-clean-light {
  background: #f4f7fb;
  color: var(--text);
}
body.snort-clean-light::before,
body.snort-clean-light::after {
  opacity: .025;
  animation: none;
}

#app {
  max-width: 1440px;
  padding: 22px 28px 38px;
}

/* Clean differentiated header / navigation area */
.topbar {
  margin: -22px -28px 22px;
  padding: 20px 28px 18px;
  background: linear-gradient(135deg, #e8f4f8 0%, #eef5fb 52%, #f7fafc 100%);
  border-bottom: 1px solid #d5e5ef;
  box-shadow: 0 4px 18px rgba(15,23,42,.05);
  align-items: center;
}
.topbar::before,
.topbar::after { opacity: 0 !important; animation: none !important; }
.title { color: #17263b; font-size: 25px; }
.subtitle { color: #647b91; }
.topbar-right { gap: 8px; }
.icon-link, .logout-link {
  background: rgba(255,255,255,.78);
  border-color: #cbdce8;
  color: #52677d;
  box-shadow: 0 1px 2px rgba(15,23,42,.03);
}
.icon-link:hover, .logout-link:hover {
  background: #fff;
  color: #087f96;
  border-color: #7dc8d8;
}
.user-chip {
  background: #fff;
  border-color: #cbdce8;
  box-shadow: 0 1px 3px rgba(15,23,42,.04);
}

/* Cleaner cards */
.kpi-card, .panel, .table-wrap {
  box-shadow: 0 2px 10px rgba(15,23,42,.035);
}
.panel {
  padding: 16px 18px 14px;
}
.panel-title {
  font-size: 13px;
  color: #243247;
  margin-bottom: 8px;
}

/* Compact breakdown area: more breathing room inside each panel */
.chart-row {
  grid-template-columns: minmax(0, 1fr) 214px;
  column-gap: 16px;
  min-height: 175px;
}
.chart-box.chart-3d-wrap {
  height: 175px;
  min-height: 175px;
}
.chart-3d-stage {
  padding: 5px 0 0;
}
.chart-3d-floor {
  left: 8%; right: 8%; bottom: 20px; height: 34px;
  opacity: .35;
}
.chart-3d-bars {
  gap: 4px;
  padding: 0 2px 5px;
}
.bar3d-item {
  min-width: 40px;
  max-width: 78px;
}
.bar3d-value {
  height: 15px;
  margin-bottom: 2px;
  line-height: 15px;
  font-size: 10.5px;
  font-weight: 700;
}
.bar3d-column {
  width: 25px !important;
  max-height: 88px;
  filter: drop-shadow(4px 5px 3px rgba(15,23,42,.18));
}
.bar3d-column .side { right: -6px; width: 6px; }
.bar3d-column .top { top: -5px; height: 10px; }
.bar3d-label {
  margin-top: 6px;
  font-size: 8.5px;
  line-height: 11px;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar3d-pct {
  font-size: 8px;
  line-height: 10px;
  margin-top: 0;
}

/* Legend: explicit label / count / percentage columns */
.legend {
  width: 214px;
  min-width: 214px;
  gap: 8px;
  font-size: 12px;
}
.legend-item {
  grid-template-columns: minmax(0, 1fr) 82px;
  column-gap: 8px;
  min-height: 24px;
  padding: 2px 0;
}
.legend-left {
  gap: 8px;
  color: #596b82;
  font-weight: 500;
}
.legend-label {
  white-space: normal;
  line-height: 15px;
}
.legend-dot {
  width: 8px;
  min-width: 8px;
  height: 8px;
  box-shadow: none;
}
.legend-num {
  width: 82px;
  min-width: 82px;
  grid-template-columns: 28px 46px;
  column-gap: 8px;
  font-variant-numeric: tabular-nums;
}
.legend-count {
  font-size: 12px;
  font-weight: 700;
  color: #263449;
}
.legend-pct {
  font-size: 11px;
  color: #7a8ba0;
}

/* Slightly more restrained toolbar */
.toolbar { gap: 8px; }
.toolbar select, .toolbar input, .btn-export, .btn-add {
  box-shadow: none;
}

@media (max-width: 1100px) {
  .chart-row { grid-template-columns: minmax(0,1fr) 190px; }
  .legend { width: 190px; min-width: 190px; }
  .legend-item { grid-template-columns: minmax(0,1fr) 76px; }
  .legend-num { width: 76px; min-width: 76px; grid-template-columns: 25px 43px; column-gap: 8px; }
}
@media (max-width: 900px) {
  #app { padding: 18px 18px 32px; }
  .topbar { margin: -18px -18px 18px; padding: 18px; }
  .chart-row {
    grid-template-columns: 1fr;
    row-gap: 8px;
  }
  .chart-box.chart-3d-wrap {
    height: 165px;
    min-height: 165px;
  }
  .legend {
    width: 100%; min-width: 0; max-width: 430px;
    margin: 0 auto;
  }
}

/* Single-template policy: clean light UI only (no theme switch). */
body:not(.login-body)[data-theme="dark"] {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --border: #dce5ef;
  --text: #1e293b;
  --text-dim: #64748b;
  --accent: #0891a8;
  --shadow: rgba(15,23,42,.07);
  background: #f4f7fb;
  color: var(--text);
}
.theme-toggle { display: none !important; }

/* Legend headings make the numeric columns self-explanatory. */
.legend-head {
  display: grid;
  grid-template-columns: minmax(0,1fr) 82px;
  column-gap: 8px;
  align-items: center;
  min-height: 18px;
  padding: 0 0 2px;
  border-bottom: 1px solid #edf1f5;
  color: #94a3b8;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.legend-head-num {
  display: grid;
  grid-template-columns: 28px 46px;
  column-gap: 8px;
  text-align: right;
}
.legend-head-num span { text-align: right; }

/* Header/menu remains visually distinct from the white workspace. */
body:not(.login-body) .topbar {
  background: linear-gradient(135deg, #e7f4f8 0%, #eef6fb 58%, #f8fbfd 100%);
  border-bottom-color: #d2e3ec;
}

@media (max-width: 1100px) {
  .legend-head { grid-template-columns: minmax(0,1fr) 76px; }
  .legend-head-num { grid-template-columns: 25px 43px; column-gap: 8px; }
}
@media (max-width: 900px) {
  .legend-head { grid-template-columns: minmax(0,1fr) 82px; }
  .legend-head-num { grid-template-columns: 28px 46px; }
}

/* =========================================================
   SNORT Clean Light — Breakdown Chart Precision Fix
   Keep chart + legend inside their card without overlap.
   ========================================================= */
.panels .panel {
  min-width: 0;
  overflow: hidden;
}

.panels .chart-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(225px, 245px) !important;
  align-items: center;
  column-gap: 18px;
  min-height: 184px;
}

.panels .chart-box.chart-3d-wrap {
  width: 100%;
  min-width: 0;
  height: 168px;
  min-height: 168px;
  overflow: visible;
}

.panels .chart-3d-stage {
  width: 100%;
  height: 168px;
  padding: 4px 0 0;
  overflow: visible;
}

.panels .chart-3d-bars {
  gap: 3px;
  padding: 0 2px 4px;
  width: 100%;
}

.panels .bar3d-item {
  min-width: 0;
  width: 18%;
  max-width: 72px;
  overflow: visible;
}

.panels .bar3d-value {
  height: 15px;
  line-height: 15px;
  margin-bottom: 1px;
  font-size: 10px;
  font-weight: 700;
}

.panels .bar3d-column {
  width: 22px !important;
  max-height: 92px;
  filter: drop-shadow(3px 4px 3px rgba(15,23,42,.14));
}

.panels .bar3d-column .side {
  right: -5px;
  width: 5px;
}

.panels .bar3d-column .top {
  top: -4px;
  height: 8px;
}

.panels .bar3d-label {
  width: 100%;
  max-width: 82px;
  min-height: 22px;
  margin-top: 5px;
  font-size: 8.5px;
  line-height: 11px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  text-align: center;
}

.panels .bar3d-pct {
  font-size: 8px;
  line-height: 10px;
  margin-top: 1px;
}

/* Legend uses three fixed semantic columns:
   description | count | percentage */
.panels .legend {
  width: 100%;
  min-width: 0;
  max-width: none;
  gap: 0;
  font-size: 12px;
  align-self: stretch;
  justify-content: center;
}

.panels .legend-head,
.panels .legend-item {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 48px 66px !important;
  column-gap: 10px;
  align-items: center;
}

.panels .legend-head {
  min-height: 24px;
  padding: 0 0 5px;
  margin-bottom: 3px;
  border-bottom: 1px solid #e8edf3;
  font-size: 8.5px;
  letter-spacing: .045em;
  color: #94a3b8;
}

.panels .legend-head > span:first-child {
  text-align: left;
}

.panels .legend-head-num {
  display: contents !important;
}

.panels .legend-head-num span {
  text-align: right;
  white-space: nowrap;
}

.panels .legend-item {
  min-height: 34px;
  padding: 4px 0;
  border-bottom: 1px solid #f1f4f7;
}

.panels .legend-item:last-child {
  border-bottom: 0;
}

.panels .legend-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #5d6f85;
  font-size: 12px;
  font-weight: 500;
}

.panels .legend-label {
  min-width: 0;
  line-height: 16px;
  white-space: normal;
}

.panels .legend-num {
  display: contents !important;
  width: auto;
  min-width: 0;
  font-family: 'Space Mono', monospace;
  font-variant-numeric: tabular-nums;
}

.panels .legend-count,
.panels .legend-pct {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.panels .legend-count {
  font-size: 12px;
  font-weight: 700;
  color: #263449;
}

.panels .legend-pct {
  font-size: 11px;
  font-weight: 500;
  color: #7b8da3;
}

@media (max-width: 1180px) {
  .panels .chart-row {
    grid-template-columns: minmax(0, 1fr) minmax(205px, 220px) !important;
    column-gap: 12px;
  }
  .panels .legend-head,
  .panels .legend-item {
    grid-template-columns: minmax(0, 1fr) 44px 60px !important;
    column-gap: 7px;
  }
}

@media (max-width: 900px) {
  .panels .chart-row {
    grid-template-columns: 1fr !important;
    row-gap: 8px;
  }
  .panels .chart-box.chart-3d-wrap,
  .panels .chart-3d-stage {
    height: 160px;
    min-height: 160px;
  }
  .panels .legend {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
  }
}

/* =========================================================
   SNORT Clean Light — Subtle Matrix Header
   Decorative only: no impact on controls or content.
   ========================================================= */
.topbar {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 14% 18%, rgba(8,145,168,.16), transparent 30%),
    radial-gradient(circle at 86% 82%, rgba(34,211,238,.10), transparent 34%),
    linear-gradient(135deg, #dceef5 0%, #e8f4f8 34%, #eef6fb 68%, #f8fbfd 100%);
  border-bottom: 1px solid #c9dfe9;
}

.topbar > *:not(.matrix-overlay) {
  position: relative;
  z-index: 2;
}

.matrix-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .42;
  background-image:
    linear-gradient(rgba(8,145,168,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8,145,168,.055) 1px, transparent 1px),
    repeating-linear-gradient(90deg,
      transparent 0,
      transparent 34px,
      rgba(8,145,168,.045) 35px,
      transparent 36px),
    repeating-linear-gradient(0deg,
      transparent 0,
      transparent 22px,
      rgba(8,145,168,.035) 23px,
      transparent 24px);
  background-size: 18px 18px, 18px 18px, 180px 100%, 100% 120px;
  mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
  animation: matrixDrift 20s linear infinite;
}

.matrix-overlay::before {
  content: "";
  position: absolute;
  inset: -40% -10%;
  background:
    repeating-linear-gradient(90deg,
      transparent 0,
      transparent 13px,
      rgba(34,211,238,.10) 14px,
      transparent 16px,
      transparent 42px),
    linear-gradient(180deg, transparent 0%, rgba(34,211,238,.08) 48%, transparent 100%);
  filter: blur(.2px);
  transform: translateX(-8%);
  animation: matrixColumns 14s linear infinite;
}

.matrix-overlay::after {
  content: "";
  position: absolute;
  top: -45%;
  left: -12%;
  width: 34%;
  height: 190%;
  transform: rotate(12deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.30), transparent);
  filter: blur(7px);
  animation: matrixSweep 9s ease-in-out infinite;
}

@keyframes matrixDrift {
  from { background-position: 0 0, 0 0, 0 0, 0 0; }
  to   { background-position: 18px 18px, -18px 18px, 180px 0, 0 120px; }
}

@keyframes matrixColumns {
  from { transform: translate3d(-8%, -3%, 0); }
  to   { transform: translate3d(8%, 8%, 0); }
}

@keyframes matrixSweep {
  0%, 18% { left: -35%; opacity: 0; }
  30% { opacity: .55; }
  65% { opacity: .20; }
  82%, 100% { left: 110%; opacity: 0; }
}

/* Keep the Matrix treatment calm and professional. */
@media (prefers-reduced-motion: reduce) {
  .matrix-overlay,
  .matrix-overlay::before,
  .matrix-overlay::after {
    animation: none;
  }
}

@media (max-width: 700px) {
  .matrix-overlay { opacity: .28; }
}


/* =========================================================
   SNORT Chart Refresh — Clean Enterprise 2D
   Chart-only override: preserves dashboard/card/legend layout.
   Status = rounded 2D columns; Severity = horizontal bars.
   ========================================================= */
.panels .chart-box.chart-3d-wrap.modern-chart-host {
  perspective: none;
  height: 168px;
  min-height: 168px;
  overflow: visible;
}

.panels .modern-status-chart,
.panels .modern-severity-chart {
  position: relative;
  width: 100%;
  height: 168px;
}

.panels .modern-status-chart {
  padding: 4px 0 0;
}

.panels .modern-status-gridline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 37px;
  border-bottom: 1px solid #e9eef4;
}

.panels .modern-status-gridline::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 62px;
  border-top: 1px dashed #edf1f5;
}

.panels .modern-status-bars {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 7px;
  padding: 0 4px;
}

.panels .modern-status-item {
  flex: 1 1 0;
  min-width: 0;
  max-width: 72px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.panels .modern-status-value {
  height: 15px;
  line-height: 15px;
  margin-bottom: 3px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.panels .modern-status-column-wrap {
  height: 122px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
}

.panels .modern-status-column {
  width: 28px;
  height: var(--bar-h);
  min-height: 3px;
  max-height: 118px;
  border-radius: 9px 9px 3px 3px;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--bar-color) 78%, #fff),
    var(--bar-color));
  box-shadow: 0 4px 9px rgba(15, 23, 42, .10);
  transition: height .35s ease, transform .2s ease, box-shadow .2s ease;
}

.panels .modern-status-item:hover .modern-status-column {
  transform: translateY(-3px);
  box-shadow: 0 7px 13px rgba(15, 23, 42, .14);
}

.panels .modern-status-label {
  width: 100%;
  min-height: 25px;
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 8.5px;
  line-height: 11px;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.panels .modern-status-pct {
  margin-top: 2px;
  color: var(--text-dim);
  font-family: 'Space Mono', monospace;
  font-size: 8px;
  line-height: 10px;
  font-variant-numeric: tabular-nums;
}

/* Severity: clean horizontal comparison. */
.panels .modern-severity-chart {
  height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 15px;
  padding: 4px 5px 4px 2px;
}

.panels .modern-severity-row {
  width: 100%;
}

.panels .modern-severity-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--text-dim);
  font-size: 10px;
  line-height: 13px;
}

.panels .modern-severity-meta span {
  font-weight: 600;
}

.panels .modern-severity-meta strong {
  color: var(--text);
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.panels .modern-severity-track {
  height: 12px;
  width: 100%;
  background: #edf2f6;
  border-radius: 999px;
  overflow: hidden;
}

.panels .modern-severity-fill {
  width: var(--bar-w);
  height: 100%;
  min-width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--bar-color) 82%, #fff),
    var(--bar-color));
  box-shadow: 0 2px 6px rgba(15, 23, 42, .08);
  transition: width .4s ease;
}

@media (max-width: 1180px) {
  .panels .modern-status-column { width: 24px; }
  .panels .modern-status-bars { gap: 4px; }
}

@media (max-width: 900px) {
  .panels .chart-box.chart-3d-wrap.modern-chart-host,
  .panels .modern-status-chart,
  .panels .modern-severity-chart {
    height: 160px;
    min-height: 160px;
  }

  .panels .modern-status-column-wrap { height: 114px; }
  .panels .modern-status-column { max-height: 110px; }
  .panels .modern-severity-chart { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .panels .modern-status-column,
  .panels .modern-severity-fill { transition: none; }
}

/* Chart-only 2D refinement for reports.php — preserves the existing report layout. */
.report-2d-stage { position:relative; width:100%; height:100%; overflow:hidden; }
.report-2d-grid {
  position:absolute; left:6%; right:4%; top:18px; bottom:42px;
  background:repeating-linear-gradient(to bottom, transparent 0, transparent 54px, color-mix(in srgb,var(--line) 75%,transparent) 55px);
  border-bottom:1px solid color-mix(in srgb,var(--line) 90%,transparent);
  pointer-events:none;
}
.report-2d-bars {
  position:relative; z-index:1; height:100%; display:flex; align-items:flex-end;
  justify-content:space-evenly; gap:12px; padding:8px 6px 10px;
}
.report-bar2d-item {
  flex:1 1 0; max-width:100px; min-width:48px; height:100%;
  display:flex; flex-direction:column; justify-content:flex-end; align-items:center;
}
.report-bar2d-value { font:700 11px 'Space Mono',monospace; margin-bottom:5px; color:var(--text); }
.report-bar2d-column {
  position:relative; width:34px; height:var(--bar-h); max-height:170px;
  background:linear-gradient(180deg,color-mix(in srgb,var(--bar-color) 84%,#fff),var(--bar-color));
  border-radius:9px 9px 4px 4px;
  box-shadow:0 5px 12px color-mix(in srgb,var(--bar-color) 18%,transparent);
  transition:transform .25s ease,filter .25s ease;
}
.report-bar2d-column::after {
  content:""; position:absolute; left:5px; right:5px; top:5px; height:3px;
  border-radius:999px; background:rgba(255,255,255,.28);
}
.report-bar2d-column:hover { transform:translateY(-4px); filter:saturate(1.05); }
.report-bar2d-label {
  margin-top:8px; font-size:9px; line-height:12px; color:var(--text-dim);
  max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:center;
}

.report-hbars2d { display:flex; flex-direction:column; gap:11px; padding:6px 4px 12px; min-width:100%; box-sizing:border-box; }
.report-hrow2d {
  display:grid; grid-template-columns:minmax(115px,185px) minmax(120px,1fr) 32px;
  align-items:center; gap:9px; min-height:28px;
}
.report-hlabel2d {
  color:var(--text-dim); font-size:10px; line-height:13px; overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap;
}
.report-htrack2d { height:12px; background:color-mix(in srgb,var(--line) 72%,transparent); border-radius:999px; overflow:hidden; }
.report-hbar2d {
  width:var(--bar-w); height:100%; border-radius:999px;
  background:linear-gradient(90deg,color-mix(in srgb,var(--bar-color) 88%,#fff),var(--bar-color));
  box-shadow:0 3px 8px color-mix(in srgb,var(--bar-color) 16%,transparent);
  transition:width .45s ease;
}
.report-hvalue2d { font:700 11px 'Space Mono',monospace; text-align:right; color:var(--text); }

@media(max-width:700px){
  .report-bar2d-column { width:28px; }
  .report-hrow2d { grid-template-columns:90px minmax(100px,1fr) 28px; }
}

/* V15 — UI-only Archive & historical report views */
.archive-hero { margin-bottom: 14px; }
.archive-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.archive-toolbar { margin-bottom: 10px; }
.archive-note { margin: 0 0 10px; padding: 10px 13px; border: 1px solid color-mix(in srgb,var(--accent) 24%,var(--border)); border-radius: 9px; background: color-mix(in srgb,var(--accent) 5%,var(--panel)); color: var(--text-dim); font-size: 12px; }
.archive-error { margin: 10px 0; padding: 12px 14px; border: 1px solid rgba(251,61,92,.35); border-radius: 9px; background: rgba(251,61,92,.06); color: #a22; font-size: 12px; }
.archive-table-wrap { overflow:auto; }
.archive-table-wrap table { min-width: 1100px; }
.archive-table-wrap th { font-size: 9px; }
.archive-table-wrap td { font-size: 11px; }
.archive-table-wrap .badge { display:inline-flex; align-items:center; gap:5px; padding:4px 8px; border-radius:999px; background:color-mix(in srgb,var(--badge) 13%,transparent); color:var(--badge); font-size:10px; font-weight:700; white-space:nowrap; }
.archive-table-wrap .badge::before { content:""; width:6px; height:6px; border-radius:50%; background:var(--badge); }
.report-segment-card { margin-bottom: 14px; }
.report-tabs { display:flex; gap:7px; border-bottom:1px solid var(--border); margin:-2px 0 12px; padding-bottom:8px; }
.report-tab { border:1px solid var(--border); background:var(--panel); color:var(--text-dim); border-radius:8px; padding:7px 11px; font-size:11px; font-weight:700; cursor:pointer; }
.report-tab:hover { border-color:var(--accent); color:var(--text); }
.report-tab.active { background:color-mix(in srgb,var(--accent) 10%,var(--panel)); color:var(--accent); border-color:color-mix(in srgb,var(--accent) 38%,var(--border)); }
.report-tab-panel { display:none; }
.report-tab-panel.active { display:block; }
.report-segment-card .report-table-wrap { box-shadow:none; border:none; }
.report-segment-card table { min-width: 900px; }
.report-segment-card th { white-space:nowrap; }
@media(max-width:760px){ .archive-kpis { grid-template-columns:1fr; } .archive-toolbar .field { width:100%; } .report-tabs { overflow:auto; } }

/* ---------- Case Type & Layanan metadata ---------- */
.case-meta-line{display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin-top:6px}
.case-meta-badge{display:inline-flex;align-items:center;min-height:20px;padding:3px 7px;border-radius:999px;border:1px solid var(--border);font-size:10px;line-height:1.1;font-weight:600;white-space:nowrap;background:var(--panel-2);color:var(--text-dim)}
.case-meta-badge.case-service{color:#0f766e;background:rgba(20,184,166,.08);border-color:rgba(20,184,166,.24)}
.case-meta-badge.case-type-issue{color:#b91c1c;background:rgba(239,68,68,.08);border-color:rgba(239,68,68,.22)}
.case-meta-badge.case-type-request{color:#1d4ed8;background:rgba(59,130,246,.08);border-color:rgba(59,130,246,.22)}
.case-meta-badge.case-type-improvement{color:#15803d;background:rgba(34,197,94,.08);border-color:rgba(34,197,94,.22)}
.case-meta-badge.case-type-follow-up{color:#7c3aed;background:rgba(139,92,246,.08);border-color:rgba(139,92,246,.22)}
.case-meta-badge.case-meta-unclassified{color:var(--text-dim);border-style:dashed;background:transparent}
.required-mark{color:#ef4444;font-weight:700}
.field-help{display:block;margin-top:5px;font-size:10.5px;line-height:1.35;color:var(--text-dim)}
.archive-meta-line{display:flex;gap:4px;flex-wrap:wrap;margin-top:4px}

/* V16.1 — compact Case Type & Layanan reporting */
.report-classification-card { margin-top: 18px; }
.report-section-note { margin: -6px 0 16px; color: #64748b; font-size: 13px; line-height: 1.55; }
.classification-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.classification-panel { border:1px solid #e2e8f0; border-radius:14px; background:#fbfdff; padding:14px; min-width:0; }
.classification-panel-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; color:#334155; font-size:13px; }
.classification-panel-head span { color:#94a3b8; font-size:11px; text-transform:uppercase; letter-spacing:.08em; }
.report-chart.compact { min-height:190px; }
.report-chart.compact .report-hrow2d { grid-template-columns:minmax(120px, 1fr) minmax(90px, 2fr) 38px; }
.classification-tables { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:16px; }
.classification-tables .report-table-wrap { margin:0; }
@media (max-width: 900px) {
  .classification-grid, .classification-tables { grid-template-columns:1fr; }
}

/* V16.2 — lightweight 2D donut charts */
.donut-chart-host { display:flex; align-items:center; justify-content:center; min-height:220px; }
.donut2d { width:100%; height:100%; min-height:210px; display:flex; align-items:center; justify-content:center; }
.donut2d-ring { width:190px; height:190px; border-radius:50%; background:var(--donut-bg); display:grid; place-items:center; box-shadow:0 10px 28px rgba(15,23,42,.08); position:relative; }
.donut2d-hole { width:112px; height:112px; border-radius:50%; background:#fff; display:flex; flex-direction:column; align-items:center; justify-content:center; box-shadow:inset 0 0 0 1px rgba(226,232,240,.9); }
.donut2d-hole strong { font-size:30px; line-height:1; color:#17233a; letter-spacing:-.04em; }
.donut2d-hole span { margin-top:6px; font-size:10px; color:#64748b; text-transform:uppercase; letter-spacing:.09em; font-weight:700; }
@media (max-width: 760px) { .donut2d-ring { width:160px; height:160px; } .donut2d-hole { width:96px; height:96px; } .donut2d-hole strong { font-size:25px; } }

/* V16.2 report donut cards */
.report-donut-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-bottom:14px; }
.report-donut-card { min-width:0; }
.report-donut-body { display:grid; grid-template-columns:170px minmax(0,1fr); align-items:center; gap:10px; min-height:220px; }
.report-donut-body .donut2d { min-height:190px; }
.report-donut-body .donut2d-ring { width:150px; height:150px; }
.report-donut-body .donut2d-hole { width:88px; height:88px; }
.report-donut-body .donut2d-hole strong { font-size:24px; }
.donut-legend { display:flex; flex-direction:column; gap:9px; padding-right:4px; }
.donut-legend-row { display:grid; grid-template-columns:10px minmax(0,1fr) auto auto; gap:8px; align-items:center; font-size:12px; color:#475569; }
.donut-legend-dot { width:9px; height:9px; border-radius:50%; }
.donut-legend-label { min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.donut-legend-value { font-weight:800; color:#1e293b; }
.donut-legend-pct { color:#94a3b8; min-width:42px; text-align:right; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }
.report-active-note { margin:-2px 0 14px; color:#64748b; font-size:12px; }
@media (max-width: 1100px) { .report-donut-grid { grid-template-columns:1fr; } .report-donut-body { grid-template-columns:190px minmax(0,1fr); } }
@media (max-width: 560px) { .report-donut-body { grid-template-columns:1fr; } }

/* V16.2 — simplified reports */
.report-kpis-five { grid-template-columns:repeat(5,minmax(0,1fr)); }
.report-collapsible { margin:14px 0 20px; border:1px solid #dbe5ef; border-radius:14px; background:#fff; overflow:hidden; }
.report-collapsible summary { list-style:none; cursor:pointer; padding:16px 18px; font-weight:800; color:#334155; display:flex; align-items:center; justify-content:space-between; gap:14px; }
.report-collapsible summary::-webkit-details-marker { display:none; }
.report-collapsible summary span { color:#94a3b8; font-size:11px; font-weight:600; }
.report-history-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; padding:0 14px 14px; }
.report-history-grid .report-table-wrap { margin:0; }
@media (max-width:1100px) { .report-kpis-five { grid-template-columns:repeat(3,minmax(0,1fr)); } .report-history-grid { grid-template-columns:1fr; } }
@media (max-width:700px) { .report-kpis-five { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* V16.2+ Dashboard — interactive flat 2D donuts */
.chart-box.chart-3d-wrap {
  perspective: none;
  width: 170px;
  height: 170px;
  overflow: visible;
}
.chart-box.chart-3d-wrap::before,
.chart-box.chart-3d-wrap::after { display:none; }
.dashboard-donut {
  width:170px;
  height:170px;
  position:relative;
  display:grid;
  place-items:center;
}
.dashboard-donut-svg {
  width:170px;
  height:170px;
  overflow:visible;
  filter:drop-shadow(0 8px 14px rgba(15,23,42,.08));
}
.dashboard-donut-segment {
  cursor:pointer;
  transition:opacity .18s ease, stroke-width .18s ease, filter .18s ease;
  outline:none;
}
.dashboard-donut-segment:hover,
.dashboard-donut-segment:focus,
.dashboard-donut-segment.is-active {
  stroke-width:28px;
  filter:drop-shadow(0 4px 5px rgba(15,23,42,.12));
}
.dashboard-donut-segment.is-dimmed { opacity:.28; }
.dashboard-donut-hole {
  position:absolute;
  width:82px;
  height:82px;
  border-radius:50%;
  background:#fff;
  border:1px solid #edf2f7;
  box-shadow:inset 0 0 0 1px rgba(226,232,240,.65);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  pointer-events:none;
}
.dashboard-donut-hole strong {
  font-size:25px;
  line-height:1;
  color:#17233a;
  letter-spacing:-.04em;
  font-family:'Space Mono',monospace;
}
.dashboard-donut-hole span {
  margin-top:5px;
  font-size:9px;
  color:#64748b;
  text-transform:uppercase;
  letter-spacing:.09em;
  font-weight:700;
}
.dashboard-donut-tooltip-wrap {
  position:absolute;
  left:50%;
  top:-7px;
  transform:translate(-50%,-100%);
  z-index:20;
  pointer-events:none;
}
.dashboard-donut-tooltip {
  display:flex;
  align-items:center;
  gap:8px;
  min-width:145px;
  padding:8px 10px;
  border:1px solid rgba(203,213,225,.9);
  border-radius:9px;
  background:rgba(255,255,255,.98);
  box-shadow:0 10px 25px rgba(15,23,42,.14);
  color:#334155;
  font-size:10px;
  white-space:nowrap;
}
.dashboard-donut-tooltip-dot { width:8px; height:8px; border-radius:50%; flex:none; }
.dashboard-donut-tooltip div { display:flex; flex-direction:column; gap:2px; }
.dashboard-donut-tooltip strong { font-size:10.5px; color:#17233a; }
.dashboard-donut-tooltip span { color:#64748b; font-family:'Space Mono',monospace; font-size:9px; }
@media (max-width:760px) {
  .chart-box.chart-3d-wrap,.dashboard-donut,.dashboard-donut-svg { width:155px; height:155px; }
}

/* V16.4 — Dashboard now uses three equal chart cards on desktop.
   Service Distribution follows the same flat 2D donut + legend interaction. */
@media (min-width: 1181px) {
  .panels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .panels .chart-row { gap: 10px; }
  .panels .legend { min-width: 0; width: 100%; }
  .panels .legend-item { grid-template-columns: minmax(0, 1fr) 76px; }
  .panels .legend-num { width: 76px; min-width: 76px; grid-template-columns: 25px 43px; column-gap: 8px; }
}
@media (min-width: 761px) and (max-width: 1180px) {
  .panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* SNORT V17.0 — Word-like light rich-text editor for Remark / Action Taken */
.remark-editor { border:1px solid var(--border); border-radius:9px; overflow:hidden; background:var(--panel); box-shadow:0 1px 2px rgba(15,23,42,.025); }
.remark-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:5px; padding:8px 10px; border-bottom:1px solid var(--border); background:color-mix(in srgb, var(--panel) 88%, var(--bg)); }
.remark-toolbar select { width:auto; min-width:88px; max-width:150px; padding:6px 8px; border:1px solid var(--border); border-radius:6px; color:var(--text); background:var(--panel); font:inherit; font-size:12px; }
.remark-tool { min-width:31px; height:30px; padding:4px 8px; display:inline-flex; align-items:center; justify-content:center; border:1px solid transparent; border-radius:6px; background:transparent; color:var(--text); cursor:pointer; font:inherit; font-size:12px; }
.remark-tool:hover { background:var(--bg); border-color:var(--border); }
.remark-tool:disabled,.remark-toolbar select:disabled { opacity:.5; cursor:not-allowed; }
.remark-tool-divider { width:1px; height:22px; background:var(--border); margin:0 3px; }
.remark-editor-content { min-height:190px; max-height:440px; overflow:auto; padding:16px 18px; color:var(--text); background:var(--panel); font-family:Arial,sans-serif; font-size:13px; line-height:1.65; outline:none; overflow-wrap:anywhere; }
.remark-editor-content:focus { box-shadow:inset 0 0 0 1px var(--accent); }
.remark-editor-content:empty:before { content:attr(data-placeholder); color:var(--text-dim); pointer-events:none; }
.remark-editor-content ul,.remark-editor-content ol { padding-left:28px; margin:6px 0; }
.remark-editor-content p { margin:0 0 7px; }
.remark-editor-footer { display:flex; justify-content:space-between; gap:8px; flex-wrap:wrap; padding:6px 11px; border-top:1px solid var(--border); color:var(--text-dim); font-size:10px; background:color-mix(in srgb, var(--panel) 88%, var(--bg)); }
.remark-editor.is-disabled .remark-editor-content { background:var(--bg); }
.desc-remark { white-space:normal; }
@media(max-width:640px){.remark-editor-content{min-height:150px;padding:12px}.remark-toolbar{gap:3px}.remark-toolbar select{min-width:72px}}


/* V17.4.1 — Dashboard table fit after redundant columns were removed */
.table-wrap > table { width: 100%; min-width: 0; table-layout: auto; }
.table-wrap > table th:first-child,
.table-wrap > table td:first-child { width: 42px; }
.table-wrap > table th:nth-child(2),
.table-wrap > table td:nth-child(2) {
  width: 112px;
  min-width: 112px;
  white-space: nowrap;
}
.table-wrap > table th:nth-child(3),
.table-wrap > table td:nth-child(3) { width: 138px; }
.table-wrap > table th:nth-child(5),
.table-wrap > table td:nth-child(5) { width: 118px; }
.table-wrap > table th:nth-child(6),
.table-wrap > table td:nth-child(6) { width: 145px; }
.table-wrap > table th:nth-child(7),
.table-wrap > table td:nth-child(7) { width: 150px; }
.table-wrap > table th:nth-child(8),
.table-wrap > table td:nth-child(8) { width: 120px; }
.table-wrap > table th:last-child,
.table-wrap > table td:last-child { width: 82px; white-space: nowrap; }
@media (max-width: 1100px) {
  .table-wrap > table { min-width: 820px; }
  .table-wrap > table th, .table-wrap > table td { padding: 8px 7px; }
  .desc-cell { min-width: 180px; max-width: 280px; }
}


/* V17.4.3: balanced two-chart Dashboard after removing Severity */
.panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .panels { grid-template-columns: minmax(0, 1fr); }
}


/* V17.4.5 layout recovery: use all available desktop space without orphaned chart cards. */
@media (min-width: 1200px) {
  .panels { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .report-donut-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
@media (min-width: 761px) and (max-width: 1199px) {
  .panels { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .report-donut-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 760px) {
  .panels, .report-donut-grid { grid-template-columns: minmax(0, 1fr) !important; }
}



/* ===== SNORT SIDEBAR V2.1 ===== */
body.snort-clean-light {
  --snort-sidebar-width: 264px;
  --snort-sidebar-bg: #101827;
  --snort-sidebar-panel: #172338;
  --snort-sidebar-text: #dce6f4;
  --snort-sidebar-muted: #8494ad;
  --snort-sidebar-accent: #55c7e8;
  --snort-sidebar-border: rgba(255,255,255,.08);
}

/* Main content layout */
body.snort-clean-light #app {
  box-sizing: border-box;
  width: calc(100% - var(--snort-sidebar-width) - 44px);
  max-width: none;
  margin: 0 22px 0 calc(var(--snort-sidebar-width) + 22px);
  padding-left: 6px;
  padding-right: 6px;
}

/* Fixed left navigation */
body.snort-clean-light .snort-sidebar {
  position: fixed;
  z-index: 1000;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: var(--snort-sidebar-width);
  min-height: 100vh;
  padding: 25px 17px 16px;
  box-sizing: border-box;
  overflow-y: auto;
  color: var(--snort-sidebar-text);
  background:
    radial-gradient(ellipse at 10% 0%, rgba(43,126,169,.20), transparent 42%),
    linear-gradient(165deg, #142238 0%, #101827 55%, #0c1422 100%);
  border-right: 1px solid rgba(105,170,205,.16);
  box-shadow: 12px 0 36px rgba(15,31,52,.10);
}

body.snort-clean-light .sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 3px 7px 27px;
  border-bottom: 1px solid var(--snort-sidebar-border);
}

body.snort-clean-light .sidebar-logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 13px;
  color: #071827;
  font-size: 23px;
  font-weight: 900;
  background: linear-gradient(135deg, #6ee7f9, #69a9ef);
  box-shadow: 0 5px 22px rgba(85,199,232,.24);
}

body.snort-clean-light .sidebar-name {
  color: #f4f8ff;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 2px;
}

body.snort-clean-light .sidebar-caption {
  margin-top: 3px;
  color: #91a6bf;
  font-size: 10px;
  letter-spacing: .35px;
}

body.snort-clean-light .sidebar-nav {
  flex: 1;
  padding-top: 19px;
}

body.snort-clean-light .sidebar-section {
  margin: 19px 9px 8px;
  color: #71849e;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

body.snort-clean-light .sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 43px;
  margin: 3px 0;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #c3d0e1;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, transform .18s ease,
              border-color .18s ease;
}

body.snort-clean-light .sidebar-link .nav-icon {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  border-radius: 8px;
  background: rgba(255,255,255,.065);
  font-size: 14px;
  transition: transform .18s ease, background .18s ease;
}

body.snort-clean-light .sidebar-link:hover {
  color: #fff;
  background: rgba(91,190,225,.12);
  border-color: rgba(91,190,225,.17);
  transform: translateX(3px);
}

body.snort-clean-light .sidebar-link:hover .nav-icon {
  transform: scale(1.13);
  background: rgba(91,190,225,.20);
}

body.snort-clean-light .sidebar-link:focus-visible,
body.snort-clean-light .sidebar-logout:focus-visible {
  outline: 2px solid var(--snort-sidebar-accent);
  outline-offset: 3px;
}

body.snort-clean-light .sidebar-bottom {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--snort-sidebar-border);
}

body.snort-clean-light .sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 7px 3px 13px;
}

body.snort-clean-light .sidebar-user .user-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  color: #102235;
  background: linear-gradient(135deg, #9be7ed, #9dbcf5);
  font-size: 13px;
  font-weight: 800;
}

body.snort-clean-light .sidebar-user-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  gap: 3px;
}

body.snort-clean-light .sidebar-user-copy strong {
  overflow: hidden;
  color: #edf4ff;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.snort-clean-light .sidebar-user-copy span {
  color: #8da1bb;
  font-size: 9px;
  letter-spacing: .8px;
}

body.snort-clean-light .sidebar-logout {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 8px;
  color: #f5a5a5;
  background: rgba(255,255,255,.06);
  font-size: 19px;
  text-decoration: none;
}

body.snort-clean-light .sidebar-logout:hover {
  color: #fff;
  background: rgba(220,75,85,.25);
}

body.snort-clean-light .sidebar-credit {
  padding: 7px 2px 0;
  color: #71849c;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .55px;
  text-align: center;
  white-space: nowrap;
}

body.snort-clean-light .snort-current-date {
  color: #52647a;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}

body.snort-clean-light .main-quote {
  margin: 25px auto 8px;
  color: #8291a3;
  font-size: 11px;
  font-style: italic;
  letter-spacing: .15px;
  line-height: 1.6;
  text-align: center;
}

body.snort-clean-light .sidebar-mobile-toggle,
body.snort-clean-light .sidebar-scrim {
  display: none;
}

/* Tablet */
@media (min-width: 761px) and (max-width: 1100px) {
  body.snort-clean-light {
    --snort-sidebar-width: 238px;
  }

  body.snort-clean-light #app {
    width: calc(100% - var(--snort-sidebar-width) - 32px);
    margin-left: calc(var(--snort-sidebar-width) + 16px);
    margin-right: 16px;
  }

  body.snort-clean-light .snort-sidebar {
    padding-left: 13px;
    padding-right: 13px;
  }
}

/* Mobile drawer */
@media (max-width: 760px) {
  body.snort-clean-light #app {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 66px 14px 28px;
  }

  body.snort-clean-light .snort-sidebar {
    width: min(285px, 84vw);
    transform: translateX(-105%);
    transition: transform .25s ease;
    box-shadow: 16px 0 45px rgba(0,0,0,.22);
  }

  body.snort-clean-light .snort-sidebar.open {
    transform: translateX(0);
  }

  body.snort-clean-light .sidebar-mobile-toggle {
    position: fixed;
    z-index: 1002;
    top: 13px;
    left: 13px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(40,70,100,.12);
    border-radius: 11px;
    color: #17314b;
    background: rgba(255,255,255,.94);
    box-shadow: 0 4px 16px rgba(20,40,65,.12);
    font-size: 19px;
    cursor: pointer;
  }

  body.snort-clean-light .sidebar-scrim {
    position: fixed;
    z-index: 999;
    inset: 0;
    display: block;
    visibility: hidden;
    background: rgba(7,17,30,.42);
    opacity: 0;
    transition: opacity .2s ease, visibility .2s ease;
  }

  body.snort-clean-light .sidebar-scrim.show {
    visibility: visible;
    opacity: 1;
  }

  body.snort-clean-light .topbar {
    gap: 10px;
    flex-wrap: wrap;
  }

  body.snort-clean-light .snort-current-date {
    font-size: 10px;
  }

  body.snort-clean-light .main-quote {
    margin-top: 20px;
    padding: 0 8px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.snort-clean-light .sidebar-link,
  body.snort-clean-light .sidebar-link .nav-icon,
  body.snort-clean-light .snort-sidebar,
  body.snort-clean-light .sidebar-scrim {
    transition: none !important;
  }
}



/* ===== SNORT SIDEBAR V2.2 ===== */
body.snort-clean-light.snort-sidebar-collapsed {
  --snort-sidebar-width: 80px;
}

body.snort-clean-light .snort-sidebar {
  transition: width .25s ease;
}

body.snort-clean-light .snort-desktop-toggle {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid #e2e9f3;
  border-radius: 11px;
  color: #314767;
  background: #fff;
  box-shadow: 0 3px 9px rgba(29,53,87,.07);
  font-size: 18px;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

body.snort-clean-light .snort-desktop-toggle:hover {
  background: #edf5ff;
  transform: translateY(-1px);
}

body.snort-clean-light .sidebar-brand {
  height: 105px;
  min-height: 105px;
  padding-left: 21px;
  padding-right: 14px;
}

body.snort-clean-light .sidebar-logo {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(145deg,#ff485a,#d71936);
  box-shadow: 0 5px 17px rgba(237,48,79,.35);
}

body.snort-clean-light .sidebar-nav {
  position: relative;
  z-index: 2;
  padding: 20px 13px 10px;
}

body.snort-clean-light .sidebar-section {
  padding: 8px 13px;
  letter-spacing: 1.7px;
}

body.snort-clean-light .sidebar-link {
  height: 47px;
  min-height: 47px;
  margin: 5px 0;
  padding: 0 12px;
  gap: 13px;
  border-radius: 13px;
  font-size: 13px;
  transition: background .18s ease, transform .18s ease;
}

body.snort-clean-light .sidebar-link .nav-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  flex-basis: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 19px;
  box-shadow: 0 4px 12px rgba(0,0,0,.20);
  transition: transform .2s ease, box-shadow .2s ease;
}

body.snort-clean-light .nav-blue {
  background: linear-gradient(145deg,#269dff,#1761df);
}
body.snort-clean-light .nav-orange {
  background: linear-gradient(145deg,#ffb342,#e66c08);
}
body.snort-clean-light .nav-purple {
  background: linear-gradient(145deg,#b64fff,#7928e7);
}
body.snort-clean-light .nav-cyan {
  background: linear-gradient(145deg,#25d9e9,#008eaf);
}
body.snort-clean-light .nav-green {
  background: linear-gradient(145deg,#43dc75,#079e4a);
}
body.snort-clean-light .nav-pink {
  background: linear-gradient(145deg,#ff68ad,#d91c72);
}

@media (hover:hover) and (pointer:fine) {
  body.snort-clean-light .sidebar-nav .sidebar-link:hover {
    z-index: 8;
    transform: translateX(2px);
  }
  body.snort-clean-light .sidebar-nav .sidebar-link:hover .nav-icon {
    transform: scale(1.2);
    box-shadow: 0 7px 17px rgba(0,0,0,.28);
  }
  body.snort-clean-light.snort-sidebar-collapsed .sidebar-nav .sidebar-link:hover .nav-icon {
    transform: scale(1.3);
  }
}

body.snort-clean-light .sidebar-cyber-art {
  position: absolute;
  z-index: 0;
  inset: 105px 0 62px;
  overflow: hidden;
  pointer-events: none;
  opacity: .85;
}

body.snort-clean-light .cyber-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(76,131,197,.10) 1px,transparent 1px),
    linear-gradient(90deg,rgba(76,131,197,.10) 1px,transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom,transparent 4%,#000 45%,#000 100%);
}

body.snort-clean-light .cyber-scan {
  position: absolute;
  top: 0;
  left: -15%;
  right: -15%;
  height: 2px;
  background: linear-gradient(90deg,transparent,#16d9ff,#8d6cff,#16d9ff,transparent);
  box-shadow: 0 0 10px rgba(32,207,255,.55),0 0 24px rgba(117,76,255,.35);
  animation: snortScanSweep 9s linear infinite;
}

body.snort-clean-light .sidebar-cyber-art svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

body.snort-clean-light .sidebar-cyber-art path {
  fill: none;
  stroke: #36b9ee;
  stroke-width: 1.1;
  stroke-opacity: .30;
  stroke-dasharray: 5 9;
  animation: snortTraceFlow 18s linear infinite;
}

body.snort-clean-light .sidebar-cyber-art circle {
  fill: #35d9ff;
  filter: drop-shadow(0 0 4px #23cfff);
  animation: snortNodePulse 3.8s ease-in-out infinite;
}

body.snort-clean-light .cyber-shield {
  position: absolute;
  right: -62px;
  bottom: 8px;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(74,174,255,.18);
  border-radius: 50%;
  box-shadow: inset 0 0 35px rgba(40,90,255,.08),0 0 28px rgba(52,125,255,.06);
  animation: snortShieldBreath 6s ease-in-out infinite;
}

body.snort-clean-light .cyber-shield::before,
body.snort-clean-light .cyber-shield::after {
  content: "";
  position: absolute;
  inset: 17px;
  border: 1px solid rgba(74,174,255,.22);
  border-radius: 50%;
}

body.snort-clean-light .cyber-shield::after {
  inset: 36px;
  border-color: rgba(162,122,255,.25);
}

@keyframes snortScanSweep {
  0% { transform: translateY(0); opacity: 0; }
  12% { opacity: .9; }
  88% { opacity: .65; }
  100% { transform: translateY(430px); opacity: 0; }
}
@keyframes snortTraceFlow {
  to { stroke-dashoffset: -112; }
}
@keyframes snortNodePulse {
  0%,100% { opacity: .35; }
  50% { opacity: 1; }
}
@keyframes snortShieldBreath {
  0%,100% { transform: scale(.96); }
  50% { transform: scale(1.04); }
}

/* Collapsed desktop state */
body.snort-clean-light.snort-sidebar-collapsed #app {
  width: calc(100% - 80px - 44px);
  margin-left: 102px;
  margin-right: 22px;
}

body.snort-clean-light.snort-sidebar-collapsed .snort-sidebar {
  width: 80px;
  padding-left: 9px;
  padding-right: 9px;
}

body.snort-clean-light.snort-sidebar-collapsed .sidebar-brand {
  justify-content: center;
  padding: 0;
}

body.snort-clean-light.snort-sidebar-collapsed .sidebar-name,
body.snort-clean-light.snort-sidebar-collapsed .sidebar-caption,
body.snort-clean-light.snort-sidebar-collapsed .sidebar-section,
body.snort-clean-light.snort-sidebar-collapsed .sidebar-link > span:not(.nav-icon),
body.snort-clean-light.snort-sidebar-collapsed .sidebar-user-copy {
  display: none;
}

body.snort-clean-light.snort-sidebar-collapsed .sidebar-nav {
  padding-left: 11px;
  padding-right: 11px;
}

body.snort-clean-light.snort-sidebar-collapsed .sidebar-link {
  justify-content: center;
  padding: 0;
  overflow: visible;
}

body.snort-clean-light.snort-sidebar-collapsed .sidebar-link[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  left: 62px;
  top: 9px;
  z-index: 20;
  padding: 8px 11px;
  border-radius: 8px;
  color: #fff;
  background: #08152d;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  font-size: 10px;
  white-space: nowrap;
}

body.snort-clean-light.snort-sidebar-collapsed .sidebar-user {
  justify-content: center;
}

body.snort-clean-light.snort-sidebar-collapsed .sidebar-credit {
  overflow: hidden;
  font-size: 0;
}

body.snort-clean-light.snort-sidebar-collapsed .sidebar-credit::after {
  content: "JSO · 26";
  color: #9aafd0;
  font-size: 8px;
}

@media (min-width:761px) and (max-width:1100px) {
  body.snort-clean-light.snort-sidebar-collapsed #app {
    width: calc(100% - 80px - 32px);
    margin-left: 96px;
    margin-right: 16px;
  }
}

@media (max-width:760px) {
  body.snort-clean-light .snort-desktop-toggle {
    display: none;
  }
  body.snort-clean-light.snort-sidebar-collapsed {
    --snort-sidebar-width: 264px;
  }
  body.snort-clean-light.snort-sidebar-collapsed #app {
    width: auto;
    margin: 0;
  }
  body.snort-clean-light.snort-sidebar-collapsed .snort-sidebar {
    width: min(285px,84vw);
    padding: 25px 17px 16px;
  }
  body.snort-clean-light.snort-sidebar-collapsed .sidebar-name,
  body.snort-clean-light.snort-sidebar-collapsed .sidebar-caption,
  body.snort-clean-light.snort-sidebar-collapsed .sidebar-section,
  body.snort-clean-light.snort-sidebar-collapsed .sidebar-link > span:not(.nav-icon),
  body.snort-clean-light.snort-sidebar-collapsed .sidebar-user-copy {
    display: initial;
  }
  body.snort-clean-light.snort-sidebar-collapsed .sidebar-section {
    display: block;
  }
  body.snort-clean-light.snort-sidebar-collapsed .sidebar-link {
    justify-content: flex-start;
    padding: 0 11px;
  }
}

@media (prefers-reduced-motion:reduce) {
  body.snort-clean-light .cyber-scan,
  body.snort-clean-light .sidebar-cyber-art path,
  body.snort-clean-light .sidebar-cyber-art circle,
  body.snort-clean-light .cyber-shield {
    animation: none !important;
  }
}


/* V2.2.1 - Sidebar footer layering correction */
body.snort-clean-light .sidebar-bottom {
  position: relative;
  z-index: 2;
}

/* =====================================================
   SNORT SIDEBAR V2.2.2 - COMPACT NAVIGATION
   UI ONLY - NO BUSINESS LOGIC CHANGE
   ===================================================== */

@media (min-width:761px) {

  body.snort-clean-light .sidebar-nav {
    padding: 10px 13px 8px;
  }

  body.snort-clean-light .sidebar-section {
    padding: 4px 13px;
    line-height: 1.3;
    font-size: 9px;
  }

  body.snort-clean-light .sidebar-link {
    height: 38px;
    min-height: 38px;
    margin: 2px 0;
    padding: 0 10px;
    gap: 11px;
    border-radius: 11px;
  }

  body.snort-clean-light .sidebar-link .nav-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    flex-basis: 32px;
    border-radius: 10px;
    font-size: 17px;
  }

  body.snort-clean-light .sidebar-bottom {
    flex-shrink: 0;
  }

}



/* =====================================================
   SNORT SIDEBAR V2.2.3 - PAGE LAYOUT & CHART FIT
   Scoped layout only. No business logic changes.
   ===================================================== */

/* Reports, Archives, Analytics: full page without sidebar offset */
body.snort-clean-light.snort-full-page #app {
  box-sizing: border-box;
  width: calc(100% - 44px);
  max-width: none;
  margin: 0 22px;
  padding-left: 6px;
  padding-right: 6px;
}

/* Dashboard: two chart columns while sidebar is expanded */
@media (min-width: 1200px) and (max-width: 1699px) {
  body.snort-clean-light:not(.snort-full-page) .panels {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Dashboard: three chart columns on wider screens */
@media (min-width: 1700px) {
  body.snort-clean-light:not(.snort-full-page) .panels {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Keep donut and legend in separate, predictable columns */
@media (min-width: 1200px) {
  body.snort-clean-light:not(.snort-full-page) .panels .chart-row {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr) !important;
    align-items: center;
    column-gap: 12px;
  }

  body.snort-clean-light:not(.snort-full-page) .panels .chart-box.chart-3d-wrap {
    width: 170px;
    min-width: 170px;
    max-width: 170px;
    height: 170px;
    display: grid;
    place-items: center;
  }

  body.snort-clean-light:not(.snort-full-page) .panels .legend {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  body.snort-clean-light:not(.snort-full-page) .panels .legend-head,
  body.snort-clean-light:not(.snort-full-page) .panels .legend-item {
    grid-template-columns: minmax(0, 1fr) 42px 52px !important;
    column-gap: 6px;
  }
}

/* Preserve mobile page layout */
@media (max-width: 760px) {
  body.snort-clean-light.snort-full-page #app {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 66px 14px 28px;
  }
}


/* =====================================================
   SNORT V2.2.4 - BALANCED THREE CHART DASHBOARD
   Expanded and collapsed sidebar use same grid.
   ===================================================== */

/* Wide desktop: all three charts on one row */
@media (min-width: 1500px) {
  body.snort-clean-light:not(.snort-full-page) .panels {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: stretch;
  }

  body.snort-clean-light:not(.snort-full-page) .panels > .panel {
    min-width: 0;
    height: 100%;
    box-sizing: border-box;
  }

  body.snort-clean-light:not(.snort-full-page) .panels .chart-row {
    grid-template-columns: 150px minmax(0, 1fr) !important;
    column-gap: 8px;
  }

  body.snort-clean-light:not(.snort-full-page) .panels .chart-box.chart-3d-wrap {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
    height: 160px;
  }

  body.snort-clean-light:not(.snort-full-page) .panels .legend-head,
  body.snort-clean-light:not(.snort-full-page) .panels .legend-item {
    grid-template-columns: minmax(0, 1fr) 34px 46px !important;
    column-gap: 5px;
  }

  body.snort-clean-light:not(.snort-full-page) .panels .legend-left {
    gap: 5px;
    font-size: 11px;
  }
}

/* Medium desktop: two columns */
@media (min-width: 901px) and (max-width: 1499px) {
  body.snort-clean-light:not(.snort-full-page) .panels {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Small screens: one column */
@media (max-width: 900px) {
  body.snort-clean-light:not(.snort-full-page) .panels {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}


/* =====================================================
   SNORT V2.2.5 - FORCE THREE CHARTS IN ONE DESKTOP ROW
   Overrides V2.2.3 and V2.2.4 grid breakpoints.
   ===================================================== */

@media (min-width: 1200px) {

  body.snort-clean-light:not(.snort-full-page) .panels {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: stretch;
  }

  body.snort-clean-light:not(.snort-full-page) .panels > .panel {
    min-width: 0;
    height: 100%;
    box-sizing: border-box;
    padding: 14px 12px;
  }

  body.snort-clean-light:not(.snort-full-page) .panels .chart-row {
    display: grid;
    grid-template-columns: 124px minmax(0, 1fr) !important;
    column-gap: 7px;
    align-items: center;
  }

  body.snort-clean-light:not(.snort-full-page) .panels .chart-box.chart-3d-wrap {
    width: 124px;
    min-width: 124px;
    max-width: 124px;
    height: 140px;
    min-height: 140px;
    display: grid;
    place-items: center;
  }

  body.snort-clean-light:not(.snort-full-page) .panels .dashboard-donut,
  body.snort-clean-light:not(.snort-full-page) .panels .dashboard-donut-svg {
    width: 124px;
    height: 124px;
  }

  body.snort-clean-light:not(.snort-full-page) .panels .dashboard-donut-hole {
    width: 68px;
    height: 68px;
  }

  body.snort-clean-light:not(.snort-full-page) .panels .dashboard-donut-hole strong {
    font-size: 21px;
  }

  body.snort-clean-light:not(.snort-full-page) .panels .legend {
    min-width: 0;
    width: 100%;
    max-width: none;
    font-size: 10.5px;
  }

  body.snort-clean-light:not(.snort-full-page) .panels .legend-head,
  body.snort-clean-light:not(.snort-full-page) .panels .legend-item {
    grid-template-columns: minmax(0, 1fr) 30px 42px !important;
    column-gap: 4px;
  }

  body.snort-clean-light:not(.snort-full-page) .panels .legend-left {
    min-width: 0;
    gap: 5px;
    font-size: 10.5px;
  }

  body.snort-clean-light:not(.snort-full-page) .panels .legend-label {
    overflow-wrap: anywhere;
    line-height: 14px;
  }

  body.snort-clean-light:not(.snort-full-page) .panels .legend-count,
  body.snort-clean-light:not(.snort-full-page) .panels .legend-pct {
    font-size: 10px;
  }
}

/* Tablet and smaller: retain responsive two/one-column layout */
@media (min-width: 901px) and (max-width: 1199px) {
  body.snort-clean-light:not(.snort-full-page) .panels {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  body.snort-clean-light:not(.snort-full-page) .panels {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}


/* =====================================================
   SNORT V2.2.6 - DASHBOARD LEGEND ALIGNMENT
   ===================================================== */

@media (min-width: 1200px) {

  body.snort-clean-light:not(.snort-full-page) .panels .legend {
    padding-right: 8px;
    box-sizing: border-box;
  }

  body.snort-clean-light:not(.snort-full-page) .panels .legend-head,
  body.snort-clean-light:not(.snort-full-page) .panels .legend-item {
    grid-template-columns: minmax(0, 1fr) 34px 48px !important;
    column-gap: 8px;
    box-sizing: border-box;
  }

  body.snort-clean-light:not(.snort-full-page) .panels .legend-head-num span {
    text-align: right;
    white-space: nowrap;
    font-size: 8px;
    letter-spacing: 0;
  }

  body.snort-clean-light:not(.snort-full-page) .panels .legend-count,
  body.snort-clean-light:not(.snort-full-page) .panels .legend-pct {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }

  body.snort-clean-light:not(.snort-full-page) .panels .legend-pct {
    padding-right: 2px;
  }
}


/* ===== SNORT BRAND LOGO V2.3 ===== */
body.snort-clean-light .sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 105px;
    min-height: 105px;
    padding: 8px 12px;
    overflow: hidden;
}

body.snort-clean-light .sidebar-brand-image {
    display: block;
    width: 100%;
    max-width: 225px;
    max-height: 78px;
    height: auto;
    object-fit: contain;
    object-position: left center;
}

/* Collapsed: tampilkan simbol S dari sisi kiri gambar */
body.snort-clean-light.snort-sidebar-collapsed .sidebar-brand {
    width: 80px;
    padding: 0;
    justify-content: flex-start;
    overflow: hidden;
}

body.snort-clean-light.snort-sidebar-collapsed .sidebar-brand-image {
    width: 190px;
    max-width: none;
    max-height: none;
    height: auto;
    flex: 0 0 190px;
}
/* ===== END SNORT BRAND LOGO V2.3 ===== */

/* ===== SNORT LOGO BLENDING V2.3.1 ===== */

body.snort-clean-light .sidebar-brand {
    background: transparent !important;
}

body.snort-clean-light .sidebar-brand-image {
    mix-blend-mode: screen;
    filter: brightness(1.08) contrast(1.04);
    background: transparent;
}

/* ===== END SNORT LOGO BLENDING V2.3.1 ===== */

