/* ============================================================
   SinalM3U — design tokens (v2)
   Palette: graphite/near-black control-room background, cyan
   "signal" accent, semaphore trio (green/amber/red) reserved
   strictly for channel status — never used decoratively.
   Type: Space Grotesk (display) / Inter (UI) / JetBrains Mono (data)
   ============================================================ */
:root{
  --bg:            #090D12;
  --bg-grid:       #0B0F15;
  --surface:       #12181F;
  --surface-2:     #171F28;
  --surface-3:     #1E2733;
  --border:        #26313E;
  --border-soft:   #1B2430;

  --text:          #EDF2F7;
  --text-dim:      #98A6B5;
  --text-faint:    #5C6975;

  --accent:        #46D3C6;
  --accent-strong: #7FEEE2;
  --accent-ink:    #04211E;
  --accent-dim:    rgba(70,211,198,0.13);
  --accent-line:   rgba(70,211,198,0.38);

  --online:        #34D399;
  --online-dim:    rgba(52,211,153,0.13);
  --slow:          #F5C244;
  --slow-dim:      rgba(245,194,68,0.13);
  --offline:       #F0665F;
  --offline-dim:   rgba(240,102,95,0.13);

  --radius-sm: 7px;
  --radius-md: 11px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-7: 32px; --sp-8: 48px;

  --ease: cubic-bezier(.4,0,.2,1);
  --ease-out: cubic-bezier(.16,1,.3,1);

  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.35);
  --shadow-card: 0 1px 0 rgba(255,255,255,0.03) inset, 0 10px 28px -14px rgba(0,0,0,0.65);
  --shadow-card-hover: 0 1px 0 rgba(255,255,255,0.04) inset, 0 18px 40px -16px rgba(0,0,0,0.75);
  --shadow-pop: 0 30px 70px -24px rgba(0,0,0,0.8), 0 2px 0 rgba(255,255,255,0.02) inset;
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
html{ scrollbar-gutter: stable; }
body{
  margin:0;
  background:
    radial-gradient(1100px 560px at 12% -12%, rgba(70,211,198,0.055), transparent 58%),
    radial-gradient(900px 500px at 100% 0%, rgba(70,211,198,0.03), transparent 55%),
    repeating-linear-gradient(180deg, rgba(255,255,255,0.011) 0px, rgba(255,255,255,0.011) 1px, transparent 1px, transparent 3px),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,h2,h3,h4{ font-family: var(--font-display); margin:0; letter-spacing:-0.012em; font-weight:600; }
p{ margin:0; }
button{ font-family: inherit; }
a{ color: var(--accent); text-underline-offset:2px; }
a:hover{ color: var(--accent-strong); }
::selection{ background: var(--accent-dim); color: var(--accent-strong); }
:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* custom scrollbars — subtle, on-theme */
*{ scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
*::-webkit-scrollbar{ width:9px; height:9px; }
*::-webkit-scrollbar-track{ background:transparent; }
*::-webkit-scrollbar-thumb{ background: var(--surface-3); border-radius:99px; border:2px solid transparent; background-clip:content-box; }
*::-webkit-scrollbar-thumb:hover{ background: var(--border); background-clip:content-box; }

.hidden{ display:none !important; }

/* ---------- view transition ---------- */
main.view{ animation: view-in .28s var(--ease-out); }
@keyframes view-in{ from{ opacity:0; transform: translateY(6px); } to{ opacity:1; transform:none; } }

/* ---------- layout shell ---------- */
#app{ min-height:100%; display:flex; flex-direction:column; }
main.view{ flex:1; width:100%; max-width:1180px; margin:0 auto; padding: var(--sp-7) var(--sp-6) 64px; }
@media (max-width: 640px){
  main.view{ padding: var(--sp-5) var(--sp-4) 48px; }
}

/* ---------- topbar ---------- */
.topbar{
  display:flex; align-items:center; gap:var(--sp-6);
  padding: 13px var(--sp-6);
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0));
  position: sticky; top:0; z-index: 40;
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
}
@media (max-width: 640px){ .topbar{ padding: 12px var(--sp-4); gap: var(--sp-3); flex-wrap:wrap; } }

.brand{ display:flex; align-items:center; gap:10px; }
.brand-mark{ position:relative; width:22px; height:22px; display:grid; place-items:center; flex:0 0 auto; }
.brand-ring{
  position:absolute; inset:0; border-radius:50%;
  border: 1.5px solid var(--accent-line);
  animation: pulse-ring 2.4s ease-out infinite;
}
.brand-dot{ width:8px; height:8px; border-radius:50%; background: var(--accent); box-shadow: 0 0 10px 1px var(--accent); }
@keyframes pulse-ring{
  0%{ transform: scale(0.5); opacity: 0.9; }
  80%{ transform: scale(1.7); opacity: 0; }
  100%{ transform: scale(1.7); opacity: 0; }
}
.brand-text{ display:flex; flex-direction:column; line-height:1.15; }
.brand-name{ font-family: var(--font-display); font-weight:600; font-size:16px; color: var(--text); }
.brand-name b{ color: var(--accent); font-weight:700; }
.brand-sub{ font-size:10.5px; color: var(--text-faint); text-transform:uppercase; letter-spacing:.09em; }
@media (max-width: 480px){ .brand-sub{ display:none; } }

.tabs{ display:flex; gap:4px; margin-left: 8px; background: var(--surface); border:1px solid var(--border-soft); padding:3px; border-radius:999px; }
@media (max-width: 640px){ .tabs{ margin-left:0; order:3; width:100%; } }
.tab{
  display:flex; align-items:center; gap:8px;
  background:transparent; border:1px solid transparent; color: var(--text-dim);
  padding: 7px 14px; border-radius: 999px; font-size:13.5px; font-weight:500; cursor:pointer;
  transition: color .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease);
}
.tab-index{ font-family: var(--font-mono); font-size:10.5px; color: var(--text-faint); transition: color .15s; }
.tab:hover{ color: var(--text); background: var(--surface-2); }
.tab.active{ color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight:600; }
.tab.active .tab-index{ color: rgba(4,33,30,0.55); }
@media (max-width: 480px){ .tab{ flex:1; justify-content:center; padding:8px 6px; } .tab-index{ display:none; } }

.topbar-status{ margin-left:auto; font-family: var(--font-mono); font-size:12px; color: var(--text-faint); white-space:nowrap; letter-spacing:.02em; }
@media (max-width: 640px){ .topbar-status{ margin-left:auto; order:2; } }

.app-footer{
  text-align:center; font-size:11.5px; color: var(--text-faint); line-height:1.6;
  padding: var(--sp-5) var(--sp-6) 28px; border-top:1px solid var(--border-soft); max-width:1180px; margin:0 auto; width:100%;
}

/* ---------- section headers ---------- */
.section-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:var(--sp-4); margin-bottom:var(--sp-6); flex-wrap:wrap; }
.section-eyebrow{
  font-family: var(--font-mono); font-size:11px; letter-spacing:.14em; text-transform:uppercase; color: var(--accent);
  margin-bottom:8px; display:inline-flex; align-items:center; gap:7px;
}
.section-eyebrow::before{ content:''; width:14px; height:1px; background: var(--accent-line); }
.section-head h1{ font-size:27px; font-weight:600; }
.section-head p.section-desc{ color: var(--text-dim); font-size:13.5px; margin-top:7px; max-width:56ch; line-height:1.6; }

/* ---------- summary strip ---------- */
.summary-strip{ display:flex; gap:10px; margin-bottom:var(--sp-7); flex-wrap:wrap; }
.summary-chip{
  display:flex; align-items:center; gap:10px;
  background: var(--surface); border:1px solid var(--border-soft); border-radius: var(--radius-md);
  padding: 11px 17px; font-size:12.5px; color: var(--text-dim);
  transition: border-color .15s var(--ease), transform .15s var(--ease);
}
.summary-chip b{ font-family: var(--font-mono); color: var(--text); font-size:16.5px; font-weight:600; }
.summary-dot{ width:8px; height:8px; border-radius:50%; flex:0 0 auto; }
.summary-dot.on{ background: var(--online); box-shadow:0 0 7px var(--online); }
.summary-dot.off{ background: var(--offline); box-shadow:0 0 7px var(--offline); }
.summary-dot.warn{ background: var(--slow); box-shadow:0 0 7px var(--slow); }

/* ---------- cards grid ---------- */
.cards-grid{ display:grid; grid-template-columns: repeat(auto-fill, minmax(252px, 1fr)); gap:var(--sp-4); }
@media (max-width: 460px){ .cards-grid{ grid-template-columns: 1fr; } }

.empty-state{
  border:1px dashed var(--border); border-radius: var(--radius-lg); padding: 56px 28px; text-align:center;
  color: var(--text-dim); background: var(--surface);
  display:flex; flex-direction:column; align-items:center;
}
.empty-state .empty-icon{
  width:52px; height:52px; border-radius:50%; display:grid; place-items:center; margin-bottom:18px;
  background: var(--accent-dim); color: var(--accent);
}
.empty-state h3{ color: var(--text); font-size:16.5px; margin-bottom:8px; }
.empty-state p{ font-size:13.5px; max-width:44ch; margin: 0 auto 20px; line-height:1.6; }

.list-card{
  background: var(--surface); border:1px solid var(--border-soft); border-radius: var(--radius-lg);
  padding: var(--sp-5); box-shadow: var(--shadow-card); cursor:pointer;
  transition: transform .18s var(--ease-out), border-color .18s var(--ease), box-shadow .18s var(--ease);
  display:flex; flex-direction:column; gap:var(--sp-4); position:relative; overflow:hidden;
}
.list-card::before{
  content:''; position:absolute; inset:0 0 auto 0; height:2px;
  background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
  opacity:0; transition: opacity .2s;
}
.list-card::after{
  content:''; position:absolute; left:0; top:0; bottom:0; width:3px;
  background: var(--text-faint); opacity:.4; transition: background .2s, opacity .2s;
}
.list-card.status-online::after{ background: var(--online); opacity:1; }
.list-card.status-offline::after{ background: var(--offline); opacity:1; }
.list-card:hover{ transform: translateY(-3px); border-color: var(--border); box-shadow: var(--shadow-card-hover); }
.list-card:hover::before{ opacity:1; }
.list-card:active{ transform: translateY(-1px); }

.list-card-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.list-name{ font-family: var(--font-display); font-weight:600; font-size:16px; color: var(--text); line-height:1.3; }
.bell{ flex:0 0 auto; opacity:.32; color: var(--text-dim); transition: opacity .15s, color .15s, transform .15s; }
.bell.active{ opacity:1; color: var(--accent); }
.list-card:hover .bell{ transform: rotate(-8deg); }

.status-row{ display:flex; align-items:center; gap:10px; }
.status-pill{
  display:inline-flex; align-items:center; gap:8px; padding:5px 13px 5px 10px; border-radius:999px;
  font-family: var(--font-mono); font-size:11.5px; letter-spacing:.06em; font-weight:600;
}
.status-pill.online{ background: var(--online-dim); color: var(--online); }
.status-pill.offline{ background: var(--offline-dim); color: var(--offline); }
.status-pill.unknown{ background: var(--surface-3); color: var(--text-faint); }

.status-dot{ width:8px; height:8px; border-radius:50%; position:relative; flex:0 0 auto; }
.status-dot.online{ background: var(--online); box-shadow: 0 0 0 0 var(--online); animation: dot-pulse 1.8s ease-out infinite; }
.status-dot.offline{ background: var(--offline); }
.status-dot.unknown{ background: var(--text-faint); }
@keyframes dot-pulse{
  0%{ box-shadow: 0 0 0 0 rgba(52,211,153,.55); }
  70%{ box-shadow: 0 0 0 7px rgba(52,211,153,0); }
  100%{ box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}

.list-meta{ font-size:12px; color: var(--text-faint); font-family: var(--font-mono); }
.list-meta b{ color: var(--text-dim); font-weight:500; }

.card-actions{ display:flex; gap:8px; margin-top:auto; padding-top:2px; }

/* ---------- buttons ---------- */
.btn{
  position:relative;
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  border-radius: var(--radius-sm); font-size:13px; font-weight:500; padding: 9px 16px;
  border:1px solid var(--border); background: var(--surface-2); color: var(--text);
  cursor:pointer; transition: background .15s var(--ease), border-color .15s var(--ease), opacity .15s var(--ease), color .15s var(--ease), transform .1s var(--ease);
  white-space: nowrap;
}
.btn:hover{ background: var(--surface-3); border-color: #303C4A; }
.btn:active{ transform: translateY(1px); }
.btn:disabled{ opacity:.5; cursor:not-allowed; transform:none; }
.btn-sm{ padding:6.5px 12px; font-size:12px; }
.btn-full{ width:100%; }
.btn-accent{ background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight:600; }
.btn-accent:hover{ background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-ghost{ background:transparent; }
.btn-ghost:hover{ background: var(--surface-2); }
.btn-danger{ color: var(--offline); border-color: var(--offline-dim); background: transparent; }
.btn-danger:hover{ background: var(--offline-dim); border-color: var(--offline); }
.btn-icon{ padding:8px; }

/* loading state: text hides, spinner shows centered */
.btn.is-loading{ color:transparent !important; pointer-events:none; }
.btn.is-loading::after{
  content:''; position:absolute; width:15px; height:15px; border-radius:50%;
  border:2px solid rgba(255,255,255,0.35); border-top-color: currentColor; color:#fff;
  animation: btn-spin .6s linear infinite;
}
.btn-accent.is-loading::after{ border-color: rgba(4,33,30,0.3); border-top-color: var(--accent-ink); }
@keyframes btn-spin{ to{ transform: rotate(360deg); } }

/* ---------- admin layout ---------- */
.admin-grid{ display:grid; grid-template-columns: 1.1fr 1fr; gap:var(--sp-5); align-items:start; }
@media (max-width: 920px){ .admin-grid{ grid-template-columns: 1fr; } }

.panel{
  background: var(--surface); border:1px solid var(--border-soft); border-radius: var(--radius-lg);
  padding: var(--sp-6); box-shadow: var(--shadow-card);
  transition: border-color .15s var(--ease);
}
.panel + .panel{ margin-top:var(--sp-5); }
.panel-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:var(--sp-4); gap:10px; }
.panel-head h2{ font-size:15.5px; font-weight:600; }
.panel-head .tag{
  font-family: var(--font-mono); font-size:10.5px; color: var(--text-faint); border:1px solid var(--border);
  border-radius:999px; padding:3px 10px; background: var(--bg-grid);
}

.field{ margin-bottom:var(--sp-4); }
.field label{ display:block; font-size:12.5px; color: var(--text-dim); margin-bottom:7px; font-weight:500; }
.field .hint{ font-size:11.5px; color: var(--text-faint); margin-top:6px; line-height:1.6; }
.input, .textarea, select.input{
  width:100%; background: var(--bg-grid); border:1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: 10px 13px; font-size:13.5px; font-family: var(--font-body);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease);
}
.textarea{ font-family: var(--font-mono); font-size:12.5px; resize:vertical; min-height:96px; line-height:1.6; }
.input:hover, .textarea:hover{ border-color: #34404E; }
.input:focus, .textarea:focus{ border-color: var(--accent); outline:none; box-shadow: 0 0 0 3px var(--accent-dim); background: var(--surface); }
.input::placeholder, .textarea::placeholder{ color: var(--text-faint); }
.input:disabled{ opacity:.5; cursor:not-allowed; }

.source-toggle{ display:flex; gap:6px; margin-bottom:var(--sp-4); background: var(--bg-grid); padding:3px; border-radius: var(--radius-md); border:1px solid var(--border-soft); }
.source-toggle button{
  flex:1; padding:8px; border-radius: var(--radius-sm); border:1px solid transparent; background: transparent;
  color: var(--text-dim); font-size:12.5px; cursor:pointer; transition: all .15s var(--ease); font-weight:500;
}
.source-toggle button:hover{ color: var(--text); }
.source-toggle button.active{ border-color: var(--accent-line); color: var(--accent-ink); background: var(--accent); font-weight:600; }

.form-row-2{ display:grid; grid-template-columns:1fr 1fr; gap:var(--sp-3); }
@media (max-width:520px){ .form-row-2{ grid-template-columns:1fr; } }

.checkbox-field{ display:flex; align-items:flex-start; gap:10px; margin-bottom:var(--sp-4); }
.checkbox-field input[type="checkbox"]{ width:17px; height:17px; margin-top:1px; accent-color: var(--accent); flex:0 0 auto; cursor:pointer; }
.checkbox-field label{ margin:0; font-size:13px; color: var(--text-dim); line-height:1.5; cursor:pointer; }

/* ---------- table ---------- */
.table-wrap{ overflow-x:auto; border:1px solid var(--border-soft); border-radius: var(--radius-md); }
table{ width:100%; border-collapse: collapse; font-size:13px; }
thead th{
  text-align:left; font-family: var(--font-mono); font-size:10.5px; text-transform:uppercase; letter-spacing:.07em;
  color: var(--text-faint); padding:11px 13px; background: var(--surface-2); border-bottom:1px solid var(--border-soft);
  position: sticky; top:0; z-index:1;
}
tbody td{ padding:11px 13px; border-bottom:1px solid var(--border-soft); color: var(--text-dim); vertical-align:middle; }
tbody tr{ transition: background .1s var(--ease); }
tbody tr:last-child td{ border-bottom:none; }
tbody tr:hover{ background: rgba(255,255,255,0.02); }
td.mono, th.mono{ font-family: var(--font-mono); }
.list-empty-row td{ text-align:center; padding:30px; color: var(--text-faint); }

.mini-status{ display:inline-flex; align-items:center; gap:6px; font-family: var(--font-mono); font-size:11.5px; font-weight:600; }
.mini-status .dot{ width:7px; height:7px; border-radius:50%; flex:0 0 auto; }
.mini-status.online .dot{ background: var(--online); } .mini-status.online{ color: var(--online); }
.mini-status.slow .dot{ background: var(--slow); } .mini-status.slow{ color: var(--slow); }
.mini-status.offline .dot{ background: var(--offline); } .mini-status.offline{ color: var(--offline); }
.mini-status.pending .dot{ background: var(--text-faint); } .mini-status.pending{ color: var(--text-faint); }

/* ---------- modal ---------- */
.modal-overlay{
  position:fixed; inset:0; background: rgba(4,7,10,0.78); backdrop-filter: blur(4px);
  display:flex; align-items:flex-start; justify-content:center; padding: 4vh 16px; z-index:100; overflow-y:auto;
  animation: overlay-in .18s var(--ease-out);
}
@keyframes overlay-in{ from{opacity:0} to{opacity:1} }
.modal{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-lg);
  width:100%; max-width: 880px; box-shadow: var(--shadow-pop); overflow:hidden;
  animation: modal-in .22s var(--ease-out);
}
@keyframes modal-in{ from{ opacity:0; transform: translateY(10px) scale(.98); } to{ opacity:1; transform:none; } }
@media (max-width: 640px){ .modal-overlay{ padding: 0; align-items:stretch; } .modal{ border-radius:0; max-width:none; min-height:100%; } }

.modal-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding: var(--sp-5) var(--sp-6); border-bottom:1px solid var(--border-soft); }
.modal-head h2{ font-size:18px; font-weight:600; }
.modal-head .list-meta{ margin-top:5px; }
.modal-close{
  background: var(--surface-2); border:1px solid var(--border-soft); color: var(--text-dim); font-size:18px; cursor:pointer;
  line-height:1; width:30px; height:30px; border-radius:50%; display:grid; place-items:center; flex:0 0 auto;
  transition: all .15s var(--ease);
}
.modal-close:hover{ color: var(--text); background: var(--surface-3); border-color: var(--border); transform: rotate(90deg); }
.modal-body{ padding: var(--sp-5) var(--sp-6) var(--sp-6); }
@media (max-width: 640px){ .modal-head{ padding: var(--sp-4) var(--sp-4); } .modal-body{ padding: var(--sp-4) var(--sp-4) var(--sp-5); } }

.progress-track{ height:8px; border-radius:999px; background: var(--bg-grid); overflow:hidden; border:1px solid var(--border-soft); }
.progress-fill{
  height:100%; width:0%; border-radius:999px;
  background: linear-gradient(90deg, var(--accent), var(--online));
  background-size: 200% 100%;
  transition: width .25s var(--ease-out);
  animation: progress-shimmer 1.4s linear infinite;
}
@keyframes progress-shimmer{ 0%{ background-position: 0% 0; } 100%{ background-position: -200% 0; } }
.progress-label{ display:flex; justify-content:space-between; font-family: var(--font-mono); font-size:11.5px; color: var(--text-faint); margin-top:9px; }

.counters{ display:grid; grid-template-columns: repeat(3,1fr); gap:10px; margin: var(--sp-4) 0; }
.counter{ border:1px solid var(--border-soft); border-radius: var(--radius-md); padding:13px 15px; background: var(--bg-grid); transition: border-color .2s; }
.counter .n{ font-family: var(--font-mono); font-size:23px; font-weight:600; line-height:1.2; }
.counter .l{ font-size:11px; color: var(--text-faint); text-transform:uppercase; letter-spacing:.06em; margin-top:3px; }
.counter.online .n{ color: var(--online); } .counter.slow .n{ color: var(--slow); } .counter.offline .n{ color: var(--offline); }

.modal-toolbar{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:var(--sp-4); flex-wrap:wrap; }
.filter-group{ display:flex; gap:6px; }
.filter-chip{
  padding:6.5px 13px; border-radius:999px; border:1px solid var(--border); background: var(--bg-grid); color: var(--text-dim);
  font-size:12px; cursor:pointer; transition: all .15s var(--ease); font-weight:500;
}
.filter-chip:hover{ color: var(--text); border-color: #34404E; }
.filter-chip.active{ border-color: var(--accent); color: var(--accent-ink); background: var(--accent); font-weight:600; }

.channels-scroll{ max-height: 360px; overflow-y:auto; border:1px solid var(--border-soft); border-radius: var(--radius-md); }

/* ---------- toasts ---------- */
#toast-root{ position:fixed; right:18px; bottom:18px; display:flex; flex-direction:column-reverse; gap:9px; z-index:200; max-width: calc(100vw - 36px); }
.toast{
  position:relative; overflow:hidden;
  display:flex; align-items:flex-start; gap:10px;
  background: var(--surface-2); border:1px solid var(--border); border-left:3px solid var(--accent);
  color: var(--text); padding:13px 16px; border-radius: var(--radius-md); font-size:13px; min-width:250px; max-width:360px;
  box-shadow: 0 16px 32px -12px rgba(0,0,0,0.7); animation: toast-in .22s var(--ease-out);
  line-height:1.5;
}
.toast.ok{ border-left-color: var(--online); }
.toast.error{ border-left-color: var(--offline); }
.toast .toast-icon{ flex:0 0 auto; width:18px; height:18px; margin-top:1px; }
.toast.ok .toast-icon{ color: var(--online); }
.toast.error .toast-icon{ color: var(--offline); }
.toast:not(.ok):not(.error) .toast-icon{ color: var(--accent); }
.toast .toast-bar{ position:absolute; left:0; bottom:0; height:2px; background: currentColor; opacity:.35; animation: toast-shrink 3.8s linear forwards; }
.toast.ok .toast-bar{ background: var(--online); }
.toast.error .toast-bar{ background: var(--offline); }
@keyframes toast-shrink{ from{ width:100%; } to{ width:0%; } }
@keyframes toast-in{ from{ opacity:0; transform: translateY(8px) scale(.98); } to{ opacity:1; transform:none; } }

/* ---------- misc ---------- */
.subtle-divider{ height:1px; background: var(--border-soft); margin: var(--sp-5) 0; }
.inline-actions{ display:flex; gap:8px; flex-wrap:wrap; }
code.k{ font-family: var(--font-mono); background: var(--surface-3); padding:2px 6px; border-radius:4px; font-size:11.5px; color: var(--accent-strong); }

/* ---------- password strength checklist ---------- */
.pw-checklist{ list-style:none; margin:8px 0 0; padding:0; display:flex; flex-direction:column; gap:4px; }
.pw-checklist li{ font-size:11.5px; color: var(--text-faint); display:flex; align-items:center; gap:6px; transition: color .15s; }
.pw-checklist li.ok{ color: var(--online); }

/* ---------- lock banner (login lockout) ---------- */
.lock-banner{
  margin-bottom: var(--sp-4); padding:12px 14px; border:1px solid var(--offline-dim); background: var(--offline-dim);
  border-radius: var(--radius-md); color: var(--offline); font-size:13px; display:flex; align-items:center; gap:9px;
  line-height:1.5;
}

/* ---------- generic inline loading state ---------- */
.admin-loading{
  display:flex; align-items:center; gap:10px; color: var(--text-faint); font-size:13.5px;
  padding: 64px 0; justify-content:center;
}
.spinner{
  width:16px; height:16px; border-radius:50%; flex:0 0 auto;
  border:2px solid var(--border); border-top-color: var(--accent);
  animation: btn-spin .6s linear infinite;
}
