/* InsightForge POC — Modern 2026 hero UI. Vanilla CSS, no framework. */
:root {
  --bg: #080b12;
  --bg-2: #0d121c;
  --panel: #11161f;
  --panel-2: #1a2230;
  --border: rgba(255,255,255,.09);
  --border-strong: rgba(255,255,255,.16);
  --text: #e9eef6;
  --muted: #8a97a9;
  --accent: #5b9dff;
  --accent-2: #9b6bff;
  --accent-3: #2fd4c4;
  --good: #38d39f;
  --warn: #ffb454;
  --bad: #ff6b6b;
  --radius: 16px;
  --grad: linear-gradient(100deg, var(--accent), var(--accent-2));
  --surface: linear-gradient(160deg, rgba(32,40,56,.78), rgba(20,26,38,.62));
  --shadow: 0 10px 34px rgba(0,0,0,.40), inset 0 1px 0 rgba(255,255,255,.05);
  --shadow-hover: 0 18px 50px rgba(0,0,0,.5), 0 0 0 1px var(--border-strong), inset 0 1px 0 rgba(255,255,255,.07);
  --glow: 0 8px 24px rgba(91,157,255,.35);
}
[data-theme="light"] {
  --bg: #eef1f7; --bg-2: #f6f8fc; --panel: #ffffff; --panel-2: #eef2f8;
  --border: rgba(20,30,50,.10); --border-strong: rgba(20,30,50,.18);
  --text: #16203a; --muted: #65718a;
  --surface: linear-gradient(160deg, rgba(255,255,255,.94), rgba(244,247,252,.82));
  --shadow: 0 10px 30px rgba(20,30,50,.10), inset 0 1px 0 rgba(255,255,255,.6);
  --shadow-hover: 0 18px 44px rgba(20,30,50,.16), 0 0 0 1px var(--border-strong);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text); font-size: 14px; letter-spacing: .1px;
  background:
    radial-gradient(1100px 600px at 100% -8%, rgba(155,107,255,.14), transparent 60%),
    radial-gradient(900px 600px at -8% 108%, rgba(91,157,255,.12), transparent 60%),
    radial-gradient(700px 500px at 50% 120%, rgba(47,212,196,.06), transparent 60%),
    var(--bg);
  background-repeat: no-repeat;
}
::selection { background: rgba(91,157,255,.32); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--panel-2); border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); background-clip: content-box; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* gradient text helper */
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Login (hero) ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; position: relative; overflow: hidden; }
.login-wrap::before, .login-wrap::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; z-index: 0;
}
.login-wrap::before { width: 460px; height: 460px; background: radial-gradient(circle, var(--accent-2), transparent 70%); top: -120px; right: -80px; animation: float 9s ease-in-out infinite; }
.login-wrap::after  { width: 420px; height: 420px; background: radial-gradient(circle, var(--accent), transparent 70%); bottom: -120px; left: -80px; animation: float 11s ease-in-out infinite reverse; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(26px); } }
.login-card {
  position: relative; z-index: 1; background: var(--surface);
  border: 1px solid var(--border); border-radius: 22px; padding: 38px 34px; width: 372px;
  box-shadow: var(--shadow); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  animation: rise .6s cubic-bezier(.2,.8,.2,1);
}
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.login-card .brand { font-size: 26px; }
.login-card label { display: block; margin: 22px 0 7px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.login-card select { width: 100%; }
.login-card .btn { width: 100%; margin-top: 22px; padding: 12px; font-size: 14px; }
.hint { margin-top: 16px; font-size: 12px; color: var(--muted); text-align: center; }
.brand { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 9px; letter-spacing: -.2px; }
.logo { color: var(--accent); filter: drop-shadow(0 0 10px rgba(91,157,255,.7)); }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 246px 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, rgba(17,22,31,.97), rgba(10,13,20,.97));
  border-right: 1px solid var(--border); padding: 20px 16px; display: flex; flex-direction: column; gap: 8px;
  position: sticky; top: 0; height: 100vh;
}
[data-theme="light"] .sidebar { background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(246,248,252,.8)); }
.sidebar .brand { margin: 4px 6px 18px; }
nav { display: flex; flex-direction: column; gap: 5px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 12px;
  cursor: pointer; color: var(--muted); font-weight: 500; transition: all .18s ease;
}
.nav-item:hover { background: rgba(255,255,255,.05); color: var(--text); transform: translateX(2px); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(91,157,255,.20), rgba(155,107,255,.10));
  color: var(--text); box-shadow: inset 0 0 0 1px var(--border);
}
.nav-item.active::before {
  content: ""; position: absolute; left: -16px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 22px; border-radius: 0 4px 4px 0; background: var(--grad); box-shadow: var(--glow);
}
.nav-item .ico { width: 20px; text-align: center; font-size: 15px; }
.recents { margin-top: auto; border-top: 1px solid var(--border); padding-top: 14px; }
.recents-title { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 8px; }
.recents-list-item { padding: 5px 6px; border-radius: 8px; cursor: pointer; transition: all .15s; }
.recents-list-item:hover { color: var(--accent); background: rgba(255,255,255,.04); }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; padding: 16px 26px;
  border-bottom: 1px solid var(--border); background: rgba(13,18,28,.92);
  position: sticky; top: 0; z-index: 20;
}
[data-theme="light"] .topbar { background: rgba(255,255,255,.6); }
.page-title { font-size: 19px; font-weight: 700; letter-spacing: -.2px; }
.topbar-right { display: flex; align-items: center; gap: 11px; }
.chip { background: var(--panel-2); border: 1px solid var(--border); padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.up { background: var(--good); box-shadow: 0 0 0 3px rgba(56,211,159,.18), 0 0 10px var(--good); }
.dot.down { background: var(--bad); box-shadow: 0 0 10px var(--bad); }
.view { padding: 26px; overflow: auto; animation: fadeUp .35s ease; }

/* ---------- Buttons / inputs ---------- */
.btn {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  padding: 10px 15px; border-radius: 11px; cursor: pointer; font-size: 13px; font-weight: 600;
  transition: all .18s ease;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--grad); border: none; color: #fff; box-shadow: var(--glow); }
.btn.primary:hover { box-shadow: 0 12px 30px rgba(91,157,255,.5); filter: brightness(1.05); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: rgba(255,255,255,.05); }
.btn.sm { padding: 6px 11px; font-size: 12px; border-radius: 9px; }
select, input {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  padding: 10px 13px; border-radius: 11px; font-size: 13px; transition: all .15s;
}
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91,157,255,.18); }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 18px; }
.cards { grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); }
.card, .glass, .kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card { padding: 20px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; position: relative; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--border-strong); }
.card h3 { margin: 0 0 5px; font-size: 15px; font-weight: 700; }
.card .tag, .tag { display: inline-block; font-size: 11px; padding: 3px 10px; border-radius: 999px;
  background: rgba(91,157,255,.12); color: var(--accent); border: 1px solid rgba(91,157,255,.22);
  margin-bottom: 10px; font-weight: 600; }
.card-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.section-head h2 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.2px; }

/* ---------- Reports toolbar + full-width table ---------- */
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar select { min-width: 170px; }
.search-box { position: relative; flex: 1; min-width: 220px; }
.search-box .search-ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  font-size: 13px; opacity: .6; pointer-events: none; }
.search-box input { width: 100%; padding-left: 36px; }

.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  overflow-x: auto; }
.report-table { width: 100%; border-collapse: collapse; }
.report-table th { white-space: nowrap; }
.report-table td { vertical-align: middle; }
.report-table tbody tr:last-child td { border-bottom: none; }
.report-table .report-name { font-weight: 700; font-size: 14px; }
.report-table .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.report-table .actions-col { text-align: right; }
.report-table .tag { margin-bottom: 0; }
.row-actions { display: flex; gap: 7px; justify-content: flex-end; flex-wrap: wrap; }
.empty-row { text-align: center !important; padding: 34px 14px; }

/* KPI */
.kpi { padding: 20px; transition: transform .2s, box-shadow .2s; }
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.kpi .label { color: var(--muted); font-size: 12px; font-weight: 500; }
.kpi .value { font-size: 28px; font-weight: 800; margin-top: 7px; letter-spacing: -.5px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Bar chart (pure CSS) */
.bars { display: flex; align-items: flex-end; gap: 12px; height: 170px; padding-top: 10px; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 7px; flex: 1; }
.bar { width: 64%; border-radius: 8px 8px 2px 2px; background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px rgba(91,157,255,.3); transition: height .5s cubic-bezier(.2,.8,.2,1); }
.bar-label { font-size: 11px; color: var(--muted); }

/* Table */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
tbody tr { transition: background .15s; }
tr:hover td { background: rgba(255,255,255,.035); }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; transition: color .15s; }
th.sortable:hover { color: var(--text); }
th .sort-ind { color: var(--accent); font-size: 9px; margin-left: 2px; }

/* ===================== Live System Health (modern 2026) ===================== */
.sys-wrap { display: flex; flex-direction: column; gap: 18px; animation: fadeUp .4s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.glass { border-radius: 18px; }

.live-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700;
  letter-spacing: .08em; color: var(--good); background: rgba(56,211,159,.12);
  border: 1px solid rgba(56,211,159,.35); padding: 5px 11px; border-radius: 999px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(56,211,159,.6); } 70% { box-shadow: 0 0 0 8px rgba(56,211,159,0); } 100% { box-shadow: 0 0 0 0 rgba(56,211,159,0); } }

/* stat strip */
.sys-stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stat-card { display: flex; align-items: center; gap: 14px; padding: 18px 20px; transition: transform .2s, box-shadow .2s; }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.stat-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 19px;
  background: linear-gradient(135deg, rgba(91,157,255,.25), rgba(155,107,255,.2)); color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--border); }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-val { font-size: 23px; font-weight: 800; margin-top: 2px; letter-spacing: -.3px; }

/* circular gauges */
.sys-gauges { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.gauge-card { padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; transition: transform .2s, box-shadow .2s; }
.gauge-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.gauge {
  --pct: 0; --gc: var(--accent);
  width: 154px; height: 154px; border-radius: 50%; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: conic-gradient(var(--gc) calc(var(--pct) * 1%), var(--panel-2) 0);
  transition: background .7s cubic-bezier(.4,0,.2,1);
  filter: drop-shadow(0 0 14px rgba(91,157,255,.22));
}
.gauge::before { content: ""; position: absolute; inset: 14px; border-radius: 50%;
  background: var(--panel); box-shadow: inset 0 2px 8px rgba(0,0,0,.4); }
.gauge .g-val { position: relative; font-size: 29px; font-weight: 800; line-height: 1; letter-spacing: -.5px; }
.gauge .g-label { position: relative; font-size: 11px; color: var(--muted); margin-top: 6px; text-align: center; }
.gauge-sub { text-align: center; }

/* trend charts */
.sys-charts { grid-template-columns: 1fr 1fr; }
.chart-card { padding: 20px 22px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.chart-head h3 { margin: 0; font-size: 14px; font-weight: 700; }
.chart-now { font-size: 21px; font-weight: 800; letter-spacing: -.3px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.spark-box { height: 100px; }
.spark-svg { width: 100%; height: 100%; display: block; }

@media (max-width: 760px) { .sys-charts { grid-template-columns: 1fr; } }

/* clickable connector link */
.link { color: var(--accent); cursor: pointer; font-weight: 600; text-decoration: none; border-bottom: 1px dashed transparent; transition: border-color .15s; }
.link:hover { border-bottom-color: var(--accent); }

/* status pills */
.pill { padding: 3px 11px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.pill.ok { background: rgba(56,211,159,.15); color: var(--good); border: 1px solid rgba(56,211,159,.3); }
.pill.idle { background: rgba(139,152,169,.15); color: var(--muted); border: 1px solid var(--border); }
.pill.warn { background: rgba(255,180,84,.15); color: var(--warn); border: 1px solid rgba(255,180,84,.3); }

/* ---------- Admin: Users & Roles + Runtime ---------- */
.admin-split { grid-template-columns: 1.15fr .85fr; align-items: start; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h3 { margin: 0; }
.count-chip { background: var(--panel-2); border: 1px solid var(--border); padding: 4px 11px;
  border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }

/* add-user form */
.adduser-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding-bottom: 18px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.adduser-form .field { gap: 6px; }
.adduser-form .field input, .adduser-form .field select { width: 100%; }
.adduser-btn { align-self: end; height: 40px; }

/* per-role accent (drives avatar + badge color) */
.role-admin   { --rc: #ffb454; }
.role-analyst { --rc: #5b9dff; }
.role-viewer  { --rc: #8a97a9; }

.user-list { display: flex; flex-direction: column; gap: 3px; }
.user-item { display: flex; align-items: center; gap: 13px; padding: 9px 10px; border-radius: 13px;
  transition: background .15s ease; }
.user-item:hover { background: rgba(255,255,255,.045); }
[data-theme="light"] .user-item:hover { background: rgba(20,30,50,.04); }
.avatar { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px; display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: #fff; letter-spacing: .3px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--rc) 70%, #000), var(--rc));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 4px 12px color-mix(in srgb, var(--rc) 40%, transparent); }
.user-meta { flex: 1; min-width: 0; }
.user-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-handle { line-height: 1.3; }
.role-badge { padding: 4px 11px; border-radius: 999px; font-size: 11px; font-weight: 700;
  text-transform: capitalize; white-space: nowrap; color: var(--rc);
  background: color-mix(in srgb, var(--rc) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--rc) 35%, transparent); }
/* inline role editor — looks like the badge, behaves like a select */
.role-select { -webkit-appearance: none; -moz-appearance: none; appearance: none; cursor: pointer;
  flex: 0 0 auto; width: auto; min-width: 0;
  padding: 5px 27px 5px 12px; border-radius: 999px; font-size: 11px; font-weight: 700;
  text-transform: capitalize; white-space: nowrap; letter-spacing: .2px; color: var(--rc);
  background-color: color-mix(in srgb, var(--rc) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--rc) 35%, transparent);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6" fill="none"><path d="M1 1l4 4 4-4" stroke="%238a97a9" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  background-repeat: no-repeat; background-position: right 10px center;
  transition: border-color .15s, box-shadow .15s, background-color .15s; }
.role-select:hover { border-color: var(--rc);
  background-color: color-mix(in srgb, var(--rc) 20%, transparent); }
.role-select:focus { outline: none; border-color: var(--rc);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rc) 22%, transparent); }
.role-select option { color: var(--text); background: var(--panel); font-weight: 600; }
.icon-btn { width: 32px; height: 32px; flex: 0 0 32px; padding: 0; display: grid; place-items: center;
  color: var(--muted); border-radius: 10px; }
.icon-btn:hover { border-color: var(--bad); color: var(--bad); transform: none;
  box-shadow: 0 4px 14px rgba(255,107,107,.22); }

/* runtime card */
.rt-mem { margin-bottom: 18px; }
.rt-mem-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.rt-mem-pct { font-size: 22px; font-weight: 800; letter-spacing: -.4px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rt-bar { height: 10px; border-radius: 999px; background: var(--panel-2); overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.4); }
.rt-bar-fill { height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(91,157,255,.5); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.rt-metrics { display: flex; flex-direction: column; gap: 9px; }
.rt-metric { display: flex; align-items: center; gap: 13px; padding: 10px 12px; border-radius: 13px;
  background: rgba(255,255,255,.025); border: 1px solid var(--border); }
[data-theme="light"] .rt-metric { background: rgba(20,30,50,.025); }
.rt-ic { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; display: grid; place-items: center;
  font-size: 16px; background: linear-gradient(135deg, rgba(91,157,255,.22), rgba(155,107,255,.18));
  box-shadow: inset 0 0 0 1px var(--border); }
.rt-metric-main { flex: 1; min-width: 0; }
.rt-metric-k { font-size: 13px; color: var(--muted); }
.rt-metric-v { font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.2px; }

@media (max-width: 860px) { .admin-split { grid-template-columns: 1fr; } }

/* form rows */
.form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); }

/* toast */
.toast { position: fixed; bottom: 26px; right: 26px; background: var(--surface); border: 1px solid var(--border-strong);
  padding: 14px 20px; border-radius: 14px; box-shadow: var(--shadow); z-index: 50; max-width: 360px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-weight: 500;
  animation: toastIn .3s cubic-bezier(.2,.8,.2,1); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.toast.ok { border-color: rgba(56,211,159,.5); }
.toast.err { border-color: rgba(255,107,107,.5); }

/* live alert notifications — stacked top-right while the user is in the app */
.notif-host { position: fixed; top: 74px; right: 22px; z-index: 60; display: flex; flex-direction: column;
  gap: 12px; width: 360px; max-width: calc(100vw - 44px); pointer-events: none; }
.notif { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid rgba(255,107,107,.45); border-left: 3px solid var(--bad);
  border-radius: 14px; padding: 13px 14px; box-shadow: var(--shadow);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  animation: notifIn .32s cubic-bezier(.2,.8,.2,1); }
.notif.leaving { animation: notifOut .25s ease forwards; }
@keyframes notifIn  { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes notifOut { to { opacity: 0; transform: translateX(26px); height: 0; padding: 0; margin: 0; } }
.notif-ico { font-size: 18px; line-height: 1.3; color: var(--warn); filter: drop-shadow(0 0 8px rgba(255,180,84,.5)); }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-weight: 700; font-size: 13px; margin-bottom: 3px; }
.notif-ch { color: var(--accent); text-transform: uppercase; font-size: 11px; letter-spacing: .04em; }
.notif-msg { font-size: 12.5px; color: var(--muted); word-break: break-word; }
.notif-x { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px;
  padding: 2px 5px; border-radius: 6px; line-height: 1; }
.notif-x:hover { color: var(--text); background: rgba(255,255,255,.06); }

/* responsive */
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .recents { display: none; }
  nav { flex-direction: row; flex-wrap: wrap; }
  .nav-item.active::before { display: none; }
}
