/* ── TOKENS ── */
:root {
  --bg:            #e8e3da;
  --bg2:           #ddd8cf;
  --card:          rgba(255,253,250,0.45);
  --card-solid:    rgba(255,253,248,0.62);
  --ink:           #2a2420;
  --ink2:          #4a3f38;
  --muted:         #9c9088;
  --faint:         #c4bdb5;
  --border:        rgba(255,255,255,0.38);
  --border-hard:   rgba(255,255,255,0.58);
  --accent:        #10b981;
  --accent-light:  rgba(16,185,129,0.10);
  --accent-glow:   rgba(16,185,129,0.22);
  --glass-shine:   rgba(255,255,255,0.70);
  --glass-inner:   rgba(255,255,255,0.18);
  --neu-out:       0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  --neu-in:        inset 0 1px 0 rgba(255,255,255,0.55), inset 0 -1px 0 rgba(0,0,0,0.04);
  --grid-line:     rgba(40,30,20,0.08);
  --success:       #3eb97a;
  --warning:       #d4920a;
  --error:         #c0392b;
  --nav-h:         56px;
  --sidebar-w:     262px;
  --radius:        16px;
  --radius-sm:     10px;
  --f-display:     'DM Serif Display', Georgia, serif;
  --f-body:        'Syne', system-ui, sans-serif;
  --f-mono:        'DM Mono', 'Fira Mono', monospace;
}

/* ── DARK MODE ── */
body.dark {
  --bg:            #1a1d24;
  --bg2:           #21252e;
  --card:          rgba(30,34,44,0.52);
  --card-solid:    rgba(36,40,52,0.68);
  --ink:           #f0ece6;
  --ink2:          #cec8bf;
  --muted:         #8c877f;
  --faint:         #4a4540;
  --border:        rgba(255,255,255,0.08);
  --border-hard:   rgba(255,255,255,0.14);
  --accent:        #34d399;
  --accent-light:  rgba(52,211,153,0.13);
  --accent-glow:   rgba(52,211,153,0.28);
  --glass-shine:   rgba(255,255,255,0.06);
  --glass-inner:   rgba(255,255,255,0.04);
  --neu-out:       0 8px 32px rgba(0,0,0,0.30), 0 2px 8px rgba(0,0,0,0.20);
  --neu-in:        inset 0 1px 0 rgba(255,255,255,0.08), inset 0 -1px 0 rgba(0,0,0,0.18);
  --grid-line:     rgba(240,236,230,0.05);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-body);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background .35s, color .35s;
  line-height: 1.6;
}

/* ── AMBIENT BACKGROUND GRADIENTS (makes glass pop) ── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 15% 20%, rgba(16,185,129,0.12) 0%, transparent 65%),
    radial-gradient(ellipse 50% 60% at 85% 75%, rgba(62,185,122,0.09) 0%, transparent 65%),
    radial-gradient(ellipse 40% 40% at 55% 45%, rgba(58,143,191,0.07) 0%, transparent 60%);
}
body.dark::before {
  background:
    radial-gradient(ellipse 60% 50% at 15% 20%, rgba(52,211,153,0.18) 0%, transparent 65%),
    radial-gradient(ellipse 50% 60% at 85% 75%, rgba(62,185,122,0.12) 0%, transparent 65%),
    radial-gradient(ellipse 40% 40% at 55% 45%, rgba(58,143,191,0.10) 0%, transparent 60%);
}

/* ── GRAIN OVERLAY ── */
.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: .032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 180px;
}

/* ── ANIMATED GRID ── */
.grid-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.grid-line-v, .grid-line-h { position: absolute; background: var(--grid-line); overflow: hidden; }
.grid-line-v { width: 1px; top: 0; bottom: 0; }
.grid-line-h { height: 1px; left: 0; right: 0; }
.grid-comet-v { position: absolute; left: -1px; right: -1px; border-radius: 999px; animation: cometV linear infinite; }
.grid-comet-h { position: absolute; top: -1px; bottom: -1px; border-radius: 999px; animation: cometH linear infinite; }
@keyframes cometV { 0% { top: -20%; } 100% { top: 110%; } }
@keyframes cometH { 0% { left: -20%; } 100% { left: 110%; } }

/* ── GLASS MIXIN (reused via shared props) ── */
.glass {
  background: var(--card);
  backdrop-filter: blur(24px) saturate(1.8) brightness(1.04);
  -webkit-backdrop-filter: blur(24px) saturate(1.8) brightness(1.04);
  border: 1px solid var(--border);
  box-shadow: var(--neu-out), inset 0 1px 0 var(--glass-shine);
}

/* ── TOPNAV ── */
nav.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  background: var(--card);
  backdrop-filter: blur(28px) saturate(2.0) brightness(1.05);
  -webkit-backdrop-filter: blur(28px) saturate(2.0) brightness(1.05);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--glass-shine), 0 4px 24px rgba(0,0,0,0.06);
  transition: background .35s;
}
.topnav-left { display: flex; align-items: center; gap: 11px; }
.topnav-right { display: flex; align-items: center; gap: 10px; }

.hamburger {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--glass-inner);
  border: 1px solid var(--border-hard);
  color: var(--muted); font-size: .88rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06), inset 0 1px 0 var(--glass-shine);
  transition: all .2s; flex-shrink: 0;
}
.hamburger:hover { color: var(--accent); border-color: rgba(16,185,129,0.4); background: var(--accent-light); }

.topnav-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.topnav-brand-icon {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--accent); display: flex; align-items: center;
  justify-content: center; color: #fff; font-size: .75rem;
  box-shadow: 0 3px 12px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.25);
  flex-shrink: 0;
}
.topnav-brand span {
  font-family: var(--f-mono); font-weight: 600; font-size: .74rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink);
}
.topnav-title {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-family: var(--f-display); font-size: 1.12rem; color: var(--ink);
  pointer-events: none; white-space: nowrap;
}

/* Live indicator */
.live-indicator {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: .62rem; color: var(--success);
  opacity: 0; transition: opacity .4s;
}
.live-indicator.visible { opacity: 1; }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(62,185,122,.22);
  animation: livePulse 2s ease infinite; flex-shrink: 0;
}
@keyframes livePulse {
  0%,100% { box-shadow: 0 0 0 3px rgba(62,185,122,.22); }
  50%      { box-shadow: 0 0 0 6px rgba(62,185,122,0); }
}

.theme-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border-hard);
  background: var(--glass-inner);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: .78rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06), inset 0 1px 0 var(--glass-shine);
  transition: all .2s;
}
.theme-btn:hover { color: var(--accent); border-color: rgba(16,185,129,0.4); }

/* ── SIDEBAR OVERLAY ── */
.sb-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.20); z-index: 140; backdrop-filter: blur(4px); }
.sb-overlay.visible { display: block; }

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--card);
  backdrop-filter: blur(32px) saturate(2.0) brightness(1.04);
  -webkit-backdrop-filter: blur(32px) saturate(2.0) brightness(1.04);
  border-right: 1px solid var(--border);
  box-shadow: 1px 0 0 var(--glass-shine), 4px 0 32px rgba(0,0,0,0.08);
  position: fixed; top: 0; left: 0; bottom: 0;
  overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.22,1,.36,1), background .35s;
  z-index: 150;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
.sidebar.open { transform: translateX(0); }

.sb-header {
  padding: 0 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h); flex-shrink: 0;
}
.sb-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.sb-brand-icon {
  width: 26px; height: 26px; border-radius: 6px;
  background: var(--accent); display: flex; align-items: center;
  justify-content: center; color: #fff; font-size: .68rem;
  box-shadow: 0 3px 10px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.25);
}
.sb-brand-name { font-family: var(--f-mono); font-weight: 600; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.sb-close {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--glass-inner); border: 1px solid var(--border-hard);
  color: var(--muted); font-size: .76rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.sb-close:hover { color: var(--accent); border-color: rgba(16,185,129,0.4); }

.sb-user { padding: 14px 14px 12px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.sb-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--ink); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display); font-size: 1.05rem; font-style: italic;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.15);
  overflow: hidden;
}
.sb-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.sb-user-info { flex: 1; min-width: 0; }
.sb-username { font-family: var(--f-body); font-weight: 700; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.sb-role { font-family: var(--f-mono); font-size: .62rem; color: var(--accent); margin-top: 1px; letter-spacing: .04em; text-transform: capitalize; }
.sb-status { font-family: var(--f-mono); font-size: .62rem; color: var(--success); display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.sb-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(62,185,122,.2); animation: livePulse 2s ease infinite; display: block; }

.sb-section { padding: 12px 10px 4px; }
.sb-section-label { font-family: var(--f-mono); font-size: .58rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); padding: 0 8px; margin-bottom: 4px; }
.sb-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: 10px; color: var(--muted);
  font-family: var(--f-body); font-weight: 600; font-size: .82rem;
  cursor: pointer; transition: all .18s;
  border: 1px solid transparent; background: none;
  width: 100%; text-align: left; position: relative; text-decoration: none;
}
.sb-item:hover {
  color: var(--ink);
  background: var(--glass-inner);
  border-color: var(--border);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 var(--glass-shine);
}
.sb-item.active {
  color: var(--accent);
  background: var(--accent-light);
  border-color: rgba(16,185,129,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 2px 8px rgba(16,185,129,0.08);
}
.sb-item.active::before { content: ''; position: absolute; left: 0; top: 22%; bottom: 22%; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.sb-item i { width: 18px; text-align: center; font-size: .82rem; flex-shrink: 0; }
.sb-badge {
  margin-left: auto; font-family: var(--f-mono); font-size: .58rem; font-weight: 500;
  background: var(--glass-inner); color: var(--accent);
  padding: 2px 7px; border-radius: 99px;
  border: 1px solid rgba(16,185,129,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
.sb-divider { height: 1px; background: var(--border); margin: 8px 12px; }
.sb-bottom { margin-top: auto; padding: 12px 10px 20px; border-top: 1px solid var(--border); }
.sb-item.danger { color: var(--error); }
.sb-item.danger:hover { background: rgba(192,57,43,.08); border-color: rgba(192,57,43,.18); }

/* ── MAIN ── */
.main { position: relative; z-index: 1; padding-top: var(--nav-h); }

/* ── SECTIONS ── */
.ov-section, .cat-section, .stats-section { display: none; animation: fadeUp .35s cubic-bezier(.22,1,.36,1) both; padding: 28px 32px 60px; }
.ov-section.visible, .cat-section.visible, .stats-section.visible { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ── PAGE HEADER ── */
.page-hdr { margin-bottom: 24px; }
.page-hdr-top { display: flex; align-items: center; gap: 14px; margin-bottom: 5px; }
.page-cat-icon {
  width: 46px; height: 46px; border-radius: var(--radius); background: var(--card);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0;
  backdrop-filter: blur(16px) saturate(1.6); -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border: 1px solid var(--border-hard);
  box-shadow: var(--neu-out), inset 0 1px 0 var(--glass-shine);
}
.page-hdr h1 { font-family: var(--f-display); font-size: 1.85rem; font-weight: normal; letter-spacing: -.01em; color: var(--ink); }
.page-hdr p  { font-size: .84rem; color: var(--muted); margin-top: 2px; }
.page-hdr-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.meta-pill {
  display: flex; align-items: center; gap: 5px; padding: 4px 12px;
  border-radius: 999px; font-family: var(--f-mono); font-size: .63rem; font-weight: 500;
  background: var(--glass-inner);
  color: var(--accent); border: 1px solid rgba(16,185,129,0.18);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 var(--glass-shine);
  letter-spacing: .04em;
}

/* ── STAT CARDS ── */
.stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 20px; }
.stat-card {
  background: var(--card);
  backdrop-filter: blur(24px) saturate(1.8) brightness(1.04);
  -webkit-backdrop-filter: blur(24px) saturate(1.8) brightness(1.04);
  border-radius: var(--radius); padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--neu-out), inset 0 1px 0 var(--glass-shine);
  transition: all .28s cubic-bezier(.22,1,.36,1);
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-shine), transparent);
  pointer-events: none;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px var(--accent-glow), var(--neu-out), inset 0 1px 0 var(--glass-shine);
  border-color: var(--border-hard);
}
.stat-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: .9rem;
  margin-bottom: 12px;
  background: var(--glass-inner) !important;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06), inset 0 1px 0 var(--glass-shine);
}
.si-purple { color: var(--accent); }
.si-green  { color: var(--success); }
.si-orange { color: #c07830; }
.si-blue   { color: #3a8fbf; }
.stat-label { font-family: var(--f-mono); font-size: .63rem; font-weight: 500; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.stat-value { font-family: var(--f-display); font-size: 1.55rem; font-weight: normal; color: var(--ink); transition: color .3s; }
.stat-value.flash { animation: flashVal .6s ease; }
@keyframes flashVal { 0% { color: var(--accent); } 100% { color: var(--ink); } }

/* ── CARD ── */
.card {
  background: var(--card);
  backdrop-filter: blur(24px) saturate(1.8) brightness(1.04);
  -webkit-backdrop-filter: blur(24px) saturate(1.8) brightness(1.04);
  border-radius: var(--radius); padding: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--neu-out), inset 0 1px 0 var(--glass-shine);
  transition: background .35s;
  position: relative; overflow: hidden;
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-shine), transparent);
  pointer-events: none;
}
.card-title { font-family: var(--f-display); font-size: 1.05rem; font-weight: normal; margin-bottom: 16px; display: flex; align-items: center; gap: 9px; color: var(--ink); }
.card-title i { color: var(--accent); }
.card-title-right { margin-left: auto; font-family: var(--f-mono); font-size: .62rem; color: var(--faint); }

/* ── GRID LAYOUTS ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; margin-bottom: 18px; }

/* ── QUOTA ── */
.quota-meta { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: 9px; }
.quota-pct  { font-family: var(--f-mono); font-weight: 500; color: var(--accent); }
.quota-bar  {
  height: 9px;
  background: var(--glass-inner);
  border-radius: 99px; overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.08), inset 0 -1px 0 rgba(255,255,255,0.15);
}
.quota-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), #34d399);
  box-shadow: 0 0 8px var(--accent-glow);
  transition: width .6s;
}
.quota-fill.warn { background: linear-gradient(90deg, var(--warning), var(--error)); box-shadow: 0 0 8px rgba(212,146,10,0.35); }
.quota-note { font-family: var(--f-mono); font-size: .72rem; color: var(--faint); margin-top: 8px; letter-spacing: .03em; }

/* ── API KEY ── */
.key-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--glass-inner);
  border: 1px solid var(--border-hard);
  border-radius: var(--radius); padding: 11px 15px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 var(--glass-shine), inset 0 -1px 0 rgba(0,0,0,0.04);
}
.key-row code { flex: 1; font-family: var(--f-mono); font-size: .86rem; color: var(--accent); word-break: break-all; }
.icon-btn { background: none; border: none; color: var(--muted); cursor: pointer; padding: 5px; border-radius: 7px; font-size: .88rem; transition: all .18s; }
.icon-btn:hover { color: var(--accent); background: var(--accent-light); }
.key-hint { font-size: .78rem; color: var(--muted); margin-top: 10px; line-height: 1.7; }
.key-hint code {
  font-family: var(--f-mono);
  background: var(--glass-inner);
  padding: 1px 6px; border-radius: 5px; color: var(--accent); font-size: .76rem;
  border: 1px solid var(--border);
}
.key-change-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-family: var(--f-mono); font-size: .76rem; font-weight: 500; color: var(--accent); text-decoration: none; opacity: .75; transition: opacity .2s; letter-spacing: .04em; }
.key-change-link:hover { opacity: 1; text-decoration: underline; }

/* ── LOG TABLE ── */
.log-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.log-table th { text-align: left; padding: 7px 10px; font-family: var(--f-mono); font-size: .6rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--border); }
.log-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); color: var(--ink2); }
.log-table tr:last-child td { border-bottom: none; }
.log-table tr:hover td { background: var(--glass-inner); }
.log-table tr.new-entry td { animation: newRow .7s ease; }
@keyframes newRow { from { background: var(--accent-light); } to { background: transparent; } }
.status-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-family: var(--f-mono); font-size: .63rem; font-weight: 500; }
.s200 { background: rgba(62,185,122,.12); color: var(--success); border: 1px solid rgba(62,185,122,0.2); }
.s4xx,.s5xx { background: rgba(192,57,43,.10); color: var(--error); border: 1px solid rgba(192,57,43,0.2); }
.empty-state { text-align: center; padding: 26px; color: var(--muted); }
.empty-state i { font-size: 1.6rem; margin-bottom: 8px; opacity: .2; display: block; }

/* ── ENDPOINT COLUMNS ── */
.ep-columns { display: grid; grid-template-columns: repeat(auto-fill, minmax(288px,1fr)); gap: 16px; }
.ep-col {
  background: var(--card);
  backdrop-filter: blur(24px) saturate(1.8) brightness(1.04);
  -webkit-backdrop-filter: blur(24px) saturate(1.8) brightness(1.04);
  border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: var(--neu-out), inset 0 1px 0 var(--glass-shine);
  overflow: hidden; display: flex; flex-direction: column;
  transition: all .28s cubic-bezier(.22,1,.36,1); position: relative;
}
.ep-col::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-shine), transparent);
  pointer-events: none;
}
.ep-col::before {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent-light) 0%, transparent 60%);
  opacity: 0; transition: opacity .3s; pointer-events: none;
}
.ep-col:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 48px var(--accent-glow), var(--neu-out), inset 0 1px 0 var(--glass-shine);
  border-color: var(--border-hard);
}
.ep-col:hover::before { opacity: 1; }
.ep-col-header { padding: 18px 18px 14px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 9px; }
.ep-col-top { display: flex; align-items: flex-start; gap: 11px; }
.ep-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--glass-inner) !important;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
  flex-shrink: 0;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06), inset 0 1px 0 var(--glass-shine);
}
.ep-title-block { flex: 1; min-width: 0; }
.ep-name { font-family: var(--f-display); font-weight: normal; font-size: .95rem; margin-bottom: 3px; color: var(--ink); }
.ep-desc { font-size: .78rem; color: var(--muted); line-height: 1.5; }
.ep-path-row {
  display: flex; align-items: center; gap: 7px;
  background: var(--glass-inner);
  border-radius: 9px; padding: 7px 11px;
  border: 1px solid var(--border);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 var(--glass-shine), inset 0 -1px 0 rgba(0,0,0,0.04);
}
.method-badge {
  font-family: var(--f-mono); font-size: .56rem; font-weight: 500;
  letter-spacing: .07em; padding: 2px 7px; border-radius: 5px;
  background: rgba(62,185,122,.14); color: var(--success); flex-shrink: 0;
  border: 1px solid rgba(62,185,122,0.2);
}
.ep-path { font-family: var(--f-mono); font-size: .74rem; color: var(--accent); font-weight: 500; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-path-btn { background: none; border: none; color: var(--faint); cursor: pointer; padding: 3px 5px; border-radius: 5px; font-size: .74rem; transition: all .15s; flex-shrink: 0; }
.copy-path-btn:hover { color: var(--accent); background: var(--accent-light); }
.ep-col-body { padding: 14px 18px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.params-title { font-family: var(--f-mono); font-size: .58rem; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); margin-bottom: 6px; }
.param-row {
  display: flex; align-items: center; gap: 6px; padding: 6px 9px;
  background: var(--glass-inner);
  border-radius: 8px; border: 1px solid var(--border); margin-bottom: 4px;
  font-size: .76rem; flex-wrap: wrap;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 var(--glass-shine);
}
.param-name { font-family: var(--f-mono); font-weight: 500; color: var(--accent); min-width: 56px; }
.param-type { font-family: var(--f-mono); font-size: .58rem; padding: 1px 5px; border-radius: 4px; background: rgba(58,143,191,.12); color: #3a8fbf; flex-shrink: 0; border: 1px solid rgba(58,143,191,0.18); }
.param-req  { font-family: var(--f-mono); font-size: .58rem; padding: 1px 5px; border-radius: 4px; background: rgba(192,57,43,.10); color: var(--error); flex-shrink: 0; border: 1px solid rgba(192,57,43,0.18); }
.param-desc { color: var(--muted); font-size: .73rem; flex: 1; }
.no-params  { font-size: .78rem; color: var(--faint); font-style: italic; }
.ep-col-footer { padding: 13px 18px; border-top: 1px solid var(--border); }
.btn-get-started {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 9px;
  background: rgba(42,36,32,0.75);
  color: rgba(255,253,248,0.92);
  font-family: var(--f-mono); font-weight: 500; font-size: .76rem; letter-spacing: .06em;
  border: 1px solid rgba(255,255,255,0.12); cursor: pointer; text-decoration: none;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--neu-out), inset 0 1px 0 rgba(255,255,255,0.12);
  transition: all .22s cubic-bezier(.34,1.56,.64,1);
}
body.dark .btn-get-started {
  background: rgba(255,253,248,0.10);
  color: var(--ink);
  border-color: rgba(255,255,255,0.12);
}
.btn-get-started:hover {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.2);
}

/* ── STATS SECTION ── */
.stat-group { margin-bottom: 20px; }
.stat-group-title { font-family: var(--f-mono); font-size: .64rem; font-weight: 500; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.stats-grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 13px; margin-bottom: 13px; }
.stat-big-card {
  background: var(--card);
  backdrop-filter: blur(24px) saturate(1.8) brightness(1.04);
  -webkit-backdrop-filter: blur(24px) saturate(1.8) brightness(1.04);
  border-radius: var(--radius); border: 1px solid var(--border); padding: 20px;
  box-shadow: var(--neu-out), inset 0 1px 0 var(--glass-shine);
  transition: all .28s cubic-bezier(.22,1,.36,1); position: relative; overflow: hidden;
}
.stat-big-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-shine), transparent);
  pointer-events: none;
}
.stat-big-card:hover {
  transform: translateY(-4px); border-color: var(--border-hard);
  box-shadow: 0 16px 36px var(--accent-glow), var(--neu-out), inset 0 1px 0 var(--glass-shine);
}
.stat-big-label { font-family: var(--f-mono); font-size: .63rem; color: var(--muted); font-weight: 500; margin-bottom: 7px; letter-spacing: .06em; }
.stat-big-value { font-family: var(--f-display); font-size: 1.9rem; font-weight: normal; color: var(--ink); }
.stat-big-sub   { font-family: var(--f-mono); font-size: .66rem; color: var(--faint); margin-top: 4px; }
.stat-big-bar   { margin-top: 10px; height: 5px; background: var(--glass-inner); border-radius: 99px; overflow: hidden; border: 1px solid var(--border); box-shadow: inset 0 1px 2px rgba(0,0,0,0.06); }
.stat-big-bar-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), #34d399); box-shadow: 0 0 6px var(--accent-glow); transition: width .6s; }
.stat-big-bar-fill.warn { background: linear-gradient(90deg, var(--warning), var(--error)); }

.sysinfo-card {
  background: var(--card);
  backdrop-filter: blur(24px) saturate(1.8) brightness(1.04);
  -webkit-backdrop-filter: blur(24px) saturate(1.8) brightness(1.04);
  border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden;
  box-shadow: var(--neu-out), inset 0 1px 0 var(--glass-shine);
  position: relative;
}
.sysinfo-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-shine), transparent);
  pointer-events: none; z-index: 1;
}
.sysinfo-row { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); }
.sysinfo-row:last-child { border-bottom: none; }
.sysinfo-cell { padding: 13px 17px; font-size: .82rem; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--border); }
.sysinfo-cell:last-child { border-right: none; }
.sysinfo-key { font-family: var(--f-mono); font-size: .62rem; font-weight: 500; letter-spacing: .07em; color: var(--faint); }
.sysinfo-val { font-family: var(--f-body); font-weight: 600; color: var(--ink); }

.stats-refresh-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.stats-refresh-time { font-family: var(--f-mono); font-size: .67rem; color: var(--faint); }
.btn-refresh {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
  border-radius: 9px; border: 1px solid var(--border-hard);
  background: var(--glass-inner); color: var(--muted);
  font-family: var(--f-mono); font-weight: 500; font-size: .7rem; cursor: pointer;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--neu-out), inset 0 1px 0 var(--glass-shine);
  transition: all .2s;
}
.btn-refresh:hover { color: var(--accent); border-color: rgba(16,185,129,0.35); }
.btn-refresh.spinning i { animation: spin360 .7s linear infinite; }
@keyframes spin360 { to { transform: rotate(360deg); } }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9998;
  background: var(--card);
  backdrop-filter: blur(24px) saturate(1.8); -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border: 1px solid var(--border-hard); border-radius: var(--radius);
  padding: 11px 17px; display: flex; align-items: center; gap: 9px;
  font-family: var(--f-mono); font-size: .77rem; font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,.10), inset 0 1px 0 var(--glass-shine);
  transform: translateY(80px); opacity: 0;
  transition: all .3s cubic-bezier(.34,1.56,.64,1); pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast .toast-icon { color: var(--success); }
.toast.err .toast-icon { color: var(--error); }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .ov-section, .cat-section, .stats-section { padding: 20px 16px 48px; }
  .stats-row { grid-template-columns: repeat(2,1fr); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .ep-columns { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2,1fr); gap: 10px; }
  nav.topnav { padding: 0 14px; }
  .topnav-title { display: none; }
  .live-indicator span { display: none; }
}

.ep-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .62rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 6px;
}
.ep-maintenance {
  background: rgba(184, 141, 42, .15);
  color: #B88D2A;
  border: 0.5px solid rgba(184, 141, 42, .3);
}
.ep-deprecated {
  background: rgba(194, 59, 34, .12);
  color: #C23B22;
  border: 0.5px solid rgba(194, 59, 34, .25);
}
.btn-get-started:disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── NOTIFICATION BELL ── */
.notif-bell-wrap {
  position: relative;
}
.notif-bell-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border-hard);
  background: var(--glass-inner);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: .84rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06), inset 0 1px 0 var(--glass-shine);
  transition: all .2s;
}
.notif-bell-btn:hover { color: var(--accent); border-color: rgba(16,185,129,0.4); }
.notif-dot {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--error);
  border: 1.5px solid var(--bg);
  box-shadow: 0 0 0 2px rgba(192,57,43,.25);
  animation: livePulse 2s ease infinite;
  pointer-events: none;
  display: none;
}
.notif-dot.visible { display: block; }

/* ── NOTIFICATION MODAL ── */
.notif-modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.18);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  align-items: flex-start; justify-content: flex-end;
  padding-top: calc(var(--nav-h) + 8px); padding-right: 16px;
}
.notif-modal-overlay.open { display: flex; }
.notif-modal {
  width: 340px; max-height: 480px;
  background: var(--card);
  backdrop-filter: blur(28px) saturate(2.0) brightness(1.04);
  -webkit-backdrop-filter: blur(28px) saturate(2.0) brightness(1.04);
  border: 1px solid var(--border-hard);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0,0,0,0.14), inset 0 1px 0 var(--glass-shine);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: notifSlideIn .25s cubic-bezier(.22,1,.36,1) both;
}
@keyframes notifSlideIn {
  from { opacity: 0; transform: translateY(-10px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
.notif-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.notif-modal-title {
  font-family: var(--f-display); font-size: .98rem; color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
.notif-modal-title i { color: var(--accent); font-size: .85rem; }
.notif-modal-close {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--glass-inner); border: 1px solid var(--border-hard);
  color: var(--muted); font-size: .72rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.notif-modal-close:hover { color: var(--accent); border-color: rgba(16,185,129,0.4); }
.notif-modal-body {
  flex: 1; overflow-y: auto; padding: 10px 10px;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.notif-modal-body::-webkit-scrollbar { width: 4px; }
.notif-modal-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
.notif-empty {
  text-align: center; padding: 36px 16px; color: var(--muted);
}
.notif-empty i { font-size: 1.8rem; opacity: .18; display: block; margin-bottom: 10px; }
.notif-empty span { font-family: var(--f-mono); font-size: .72rem; }

/* ── NOTIFICATION ITEM ── */
.notif-item {
  display: flex; gap: 11px; padding: 11px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all .18s; cursor: default;
  margin-bottom: 4px;
  position: relative;
}
.notif-item.unread {
  background: var(--accent-light);
  border-color: rgba(16,185,129,0.14);
}
.notif-item.unread::before {
  content: ''; position: absolute;
  left: 0; top: 22%; bottom: 22%;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--accent);
}
.notif-item:hover { background: var(--glass-inner); border-color: var(--border); }
.notif-item-icon {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: .78rem;
  background: var(--glass-inner); border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 var(--glass-shine);
}
.notif-type-info    .notif-item-icon { color: #3a8fbf; }
.notif-type-success .notif-item-icon { color: var(--success); }
.notif-type-warning .notif-item-icon { color: var(--warning); }
.notif-type-danger  .notif-item-icon { color: var(--error); }
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title {
  font-family: var(--f-body); font-weight: 600; font-size: .82rem;
  color: var(--ink); margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notif-item-msg { font-size: .76rem; color: var(--muted); line-height: 1.5; }
.notif-item-meta {
  font-family: var(--f-mono); font-size: .6rem; color: var(--faint);
  margin-top: 4px;
}
.notif-modal-footer {
  padding: 10px 14px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.notif-count-label {
  font-family: var(--f-mono); font-size: .63rem; color: var(--faint);
}
.notif-clear-btn {
  font-family: var(--f-mono); font-size: .63rem; font-weight: 500;
  color: var(--accent); background: none; border: none; cursor: pointer;
  opacity: .75; transition: opacity .2s; padding: 0;
}
.notif-clear-btn:hover { opacity: 1; text-decoration: underline; }