/* ════════════════════════════════════════════════════════════
   HOMELAB DASHBOARD v3 — Estilos
   ════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:   #0f172a; --bg2: #1e293b; --bg3: #334155; --bg4: #475569;
  --text: #f1f5f9; --muted: #94a3b8; --faint: #475569;
  --em: #10b981; --am: #f59e0b; --re: #ef4444;
  --bl: #3b82f6; --vi: #8b5cf6; --cy: #06b6d4; --or: #f97316;
}

body {
  background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 14px; min-height: 100vh;
}

/* ── ANIMAÇÕES ─────────────────────────────────────────── */
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.45} }
@keyframes spin  { to{transform:rotate(360deg)} }

/* ── NAV ───────────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 50;
  background: #0f172af8; border-bottom: 1px solid var(--bg2);
  backdrop-filter: blur(8px);
}
.nav-i {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  height: 56px; display: flex; align-items: center; justify-content: space-between;
}
.logo {
  display: flex; align-items: center; gap: 9px;
  cursor: pointer; background: none; border: none;
}
.logo-box {
  width: 30px; height: 30px; background: var(--em); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.logo b  { font-size: 14px; color: var(--text); }
.logo small { color: var(--faint); font-size: 12px; }
.nav-r  { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.nav-node {
  display: flex; align-items: center; gap: 5px; font-size: 12px;
  color: var(--muted); cursor: pointer; padding: 5px 9px; border-radius: 8px;
  transition: .15s; border: none; background: none;
}
.nav-node:hover { color: var(--text); background: var(--bg2); }
.ndot   { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.vdiv   { width: 1px; height: 16px; background: var(--bg3); margin: 0 2px; }
.bell-btn {
  position: relative; display: flex; align-items: center; gap: 5px;
  background: none; border: 1px solid var(--bg3); border-radius: 10px;
  padding: 5px 10px; cursor: pointer; color: var(--muted); font-size: 12px; transition: .15s;
}
.bell-btn:hover { color: var(--am); border-color: var(--am); }
.bell-b {
  position: absolute; top: -7px; right: -7px; background: var(--re);
  color: #fff; font-size: 9px; font-weight: 700; padding: 1px 5px;
  border-radius: 99px; min-width: 17px; text-align: center; line-height: 1.6;
}
.refresh-btn {
  display: flex; align-items: center; gap: 4px; font-size: 12px;
  color: var(--faint); cursor: pointer; background: none; border: none;
  padding: 5px 8px; border-radius: 8px; transition: .15s;
}
.refresh-btn:hover { color: var(--em); }

/* ── LAYOUT ────────────────────────────────────────────── */
main {
  max-width: 1200px; margin: 0 auto;
  padding: 24px 20px; display: flex; flex-direction: column; gap: 28px;
}

/* ── PILLS ─────────────────────────────────────────────── */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill  {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg2); border: 1px solid var(--bg3);
  border-radius: 12px; padding: 8px 14px; font-size: 12px;
}

/* ── CORES UTILITÁRIAS ─────────────────────────────────── */
.c-em { color: var(--em); } .c-am { color: var(--am); }
.c-re { color: var(--re); } .c-cy { color: var(--cy); }
.c-vi { color: var(--vi); } .c-bl { color: var(--bl); }

/* ── ALERT BANNER ──────────────────────────────────────── */
.alert-banner {
  background: #f59e0b0d; border: 1px solid #f59e0b33;
  border-radius: 14px; padding: 14px 18px; display: flex; gap: 12px;
}

/* ── SECTION HEADERS ───────────────────────────────────── */
.sh {
  font-size: 11px; font-weight: 600; color: var(--faint);
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px;
}
.shr {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; flex-wrap: wrap; gap: 8px;
}

/* ── STATUS PILL ───────────────────────────────────────── */
.sp {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px;
  font-weight: 500; padding: 3px 9px; border-radius: 99px;
  white-space: nowrap; flex-shrink: 0;
}
.sp.running, .sp.online  { background: #10b98118; color: var(--em); }
.sp.exited,  .sp.offline { background: #ef444418; color: var(--re); }
.sdot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.sdot.running, .sdot.online  { background: var(--em); animation: pulse 2s infinite; }
.sdot.exited,  .sdot.offline { background: var(--re); }

/* ── NODE CARDS ────────────────────────────────────────── */
.node-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(340px,1fr));
  gap: 16px; margin-bottom: 16px;
}
.node-card {
  background: var(--bg2); border: 1px solid; border-radius: 20px;
  padding: 20px; cursor: pointer; transition: background .2s;
}
.node-card:hover { background: #253347; }
.nc-blue   { border-color: #3b82f640; } .nc-violet { border-color: #8b5cf640; }
.nc-orange { border-color: #f9731640; } .nc-green  { border-color: #10b98140; }
.nc-cyan   { border-color: #06b6d440; }

.ni {
  width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.ni.blue   { background: #3b82f618; } .ni.violet { background: #8b5cf618; }
.ni.orange { background: #f9731618; } .ni.green  { background: #10b98118; }
.ni.cyan   { background: #06b6d418; }

/* ── GAUGES ────────────────────────────────────────────── */
.gauges { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; margin: 14px 0; }
.gw     { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.gi     { position: relative; display: flex; align-items: center; justify-content: center; }
.gsv    { transform: rotate(-90deg); }
.gt     { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.gp     { font-size: 11px; font-weight: 700; line-height: 1; }
.go     { font-size: 9px; line-height: 1; }
.gl     { font-size: 10px; color: var(--faint); }

/* ── NODE FOOTER ───────────────────────────────────────── */
.nf {
  display: flex; gap: 12px; font-size: 11px; color: var(--faint);
  padding-top: 12px; border-top: 1px solid var(--bg3); flex-wrap: wrap;
}

/* ── PROGRESS BAR ──────────────────────────────────────── */
.pbr { margin-bottom: 12px; }
.pbr:last-child { margin-bottom: 0; }
.pbh { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 5px; }
.pbt { height: 6px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.pbf { height: 100%; border-radius: 99px; transition: width .5s; }
.f-em { background: var(--em); } .f-am { background: var(--am); } .f-re { background: var(--re); }

/* ── FILTER BAR ────────────────────────────────────────── */
.filter-bar {
  display: flex; gap: 4px; background: var(--bg2);
  border: 1px solid var(--bg3); border-radius: 14px;
  padding: 4px; flex-wrap: wrap;
}
.filter-btn {
  font-size: 12px; padding: 5px 14px; border-radius: 10px;
  border: none; cursor: pointer; color: var(--muted);
  background: transparent; transition: .15s;
}
.filter-btn.active { background: var(--bg3); color: var(--text); }
.filter-btn:hover:not(.active) { color: var(--text); }

/* ── CONTAINER CARDS ───────────────────────────────────── */
.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px,1fr)); gap: 10px; }
.ct-wrap { position: relative; }
.ct-nb {
  position: absolute; top: -6px; right: -6px; background: var(--re);
  color: #fff; font-size: 9px; font-weight: 700; padding: 1px 5px;
  border-radius: 99px; min-width: 18px; text-align: center; line-height: 1.6;
  border: 2px solid var(--bg); z-index: 2; pointer-events: none;
}
.ct-nb.warn { background: var(--am); }
.ct-card {
  background: var(--bg2); border-radius: 14px; border-left: 4px solid;
  padding: 12px; cursor: pointer; transition: background .15s, transform .12s; height: 100%;
}
.ct-card:hover { background: #253347; transform: translateY(-2px); }
.ct-card.running { border-color: var(--em); }
.ct-card.exited  { border-color: var(--re); }
.ct-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; margin-bottom: 5px; }
.ct-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-img  { font-size: 10px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px; }
.ct-badge { font-size: 10px; padding: 2px 7px; border-radius: 5px; display: inline-block; margin-bottom: 6px; }
.ct-badge.blue   { background: #3b82f618; color: var(--bl); }
.ct-badge.violet { background: #8b5cf618; color: var(--vi); }
.ct-badge.green  { background: #10b98118; color: var(--em); }
.ct-badge.cyan   { background: #06b6d418; color: var(--cy); }
.ct-badge.orange { background: #f9731618; color: var(--or); }
.ct-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; font-size: 11px; }
.ct-ml   { color: var(--faint); } .ct-mv { font-weight: 500; }
.ct-hint { font-size: 10px; color: var(--bg4); text-align: right; margin-top: 6px; }

/* ── MODAL ─────────────────────────────────────────────── */
.modal-ov {
  position: fixed; inset: 0; background: #000000cc; z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-ov.open { display: flex; }
.modal-box {
  background: var(--bg2); border: 1px solid var(--bg3); border-radius: 22px;
  width: min(700px,100%); max-height: 92vh; overflow: hidden;
  display: flex; flex-direction: column; position: relative;
}
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 28px; height: 28px;
  border-radius: 8px; background: var(--bg3); border: none; color: var(--muted);
  cursor: pointer; font-size: 16px; display: flex; align-items: center;
  justify-content: center; z-index: 10; transition: .15s;
}
.modal-close:hover { color: var(--text); }
.modal-head  { padding: 20px 20px 0; flex-shrink: 0; }
.modal-name  { font-size: 17px; font-weight: 700; margin-bottom: 3px; padding-right: 36px; }
.modal-itag  { font-size: 11px; color: var(--faint); font-family: monospace; margin-bottom: 8px; }
.modal-meta  { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; }
.modal-id {
  font-size: 11px; color: var(--faint); font-family: monospace;
  background: var(--bg); padding: 2px 8px; border-radius: 6px;
  cursor: pointer; border: 1px solid var(--bg3); transition: .15s;
}
.modal-id:hover { color: var(--text); }
.modal-tabs {
  display: flex; border-bottom: 1px solid var(--bg3);
  flex-shrink: 0; background: var(--bg2); overflow-x: auto;
}
.modal-tab {
  padding: 10px 16px; font-size: 12px; font-weight: 500; color: var(--muted);
  background: none; border: none; border-bottom: 2px solid transparent;
  cursor: pointer; transition: .15s; display: flex; align-items: center;
  gap: 5px; white-space: nowrap; flex-shrink: 0;
}
.modal-tab:hover   { color: var(--text); }
.modal-tab.active  { color: var(--em); border-bottom-color: var(--em); }
.tab-nb {
  background: var(--re); color: #fff; font-size: 9px; font-weight: 700;
  padding: 1px 5px; border-radius: 99px; min-width: 16px;
  text-align: center; line-height: 1.5;
}
.tab-nb.warn { background: var(--am); }
.modal-body { flex: 1; overflow-y: auto; padding: 16px 20px 20px; }

/* ── MÉTRICAS (modal) ──────────────────────────────────── */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(112px,1fr)); gap: 8px; margin-bottom: 14px; }
.mi   { background: var(--bg); border: 1px solid var(--bg3); border-radius: 11px; padding: 10px 12px; }
.mi-l { font-size: 10px; color: var(--faint); margin-bottom: 3px; }
.mi-v { font-size: 13px; font-weight: 700; }
.mi-s { font-size: 10px; color: var(--faint); margin-top: 1px; }

/* ── PORTAS ────────────────────────────────────────────── */
.ports-wrap { margin: 10px 0; }
.ports-l    { font-size: 11px; color: var(--faint); margin-bottom: 5px; }
.ports-row  { display: flex; flex-wrap: wrap; gap: 5px; }
.port-tag   { font-size: 11px; background: var(--bg); border: 1px solid var(--bg3); border-radius: 5px; padding: 2px 8px; color: var(--cy); font-family: monospace; }

/* ── MINI CHARTS ───────────────────────────────────────── */
.mini-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.mc   { background: var(--bg); border-radius: 11px; padding: 10px 12px; }
.mc-h { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 6px; }

/* ── BOTÕES DE AÇÃO ────────────────────────────────────── */
.action-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--bg3); }
.abtn   { display: inline-flex; align-items: center; gap: 5px; padding: 8px 14px; border-radius: 9px; font-size: 12px; font-weight: 500; border: none; cursor: pointer; transition: .15s; }
.abtn-bl  { background: var(--bl);       color: #fff;        } .abtn-bl:hover  { background: #2563eb; }
.abtn-re  { background: #ef444420;       color: var(--re); border: 1px solid #ef444440; } .abtn-re:hover { background: #ef444430; }
.abtn-g   { background: var(--bg3);      color: var(--muted); } .abtn-g:hover   { color: var(--text);  }
.ct-stopped-modal { background: var(--bg); border-radius: 12px; padding: 24px; text-align: center; margin: 8px 0; }

/* ── LOG VIEWER ────────────────────────────────────────── */
.log-wrap     { display: flex; flex-direction: column; gap: 10px; }
.log-bar      { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.log-bar-info { font-size: 11px; color: var(--faint); }
.log-btns     { display: flex; gap: 6px; }
.log-btn      { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 7px; font-size: 11px; font-weight: 500; border: none; cursor: pointer; background: var(--bg3); color: var(--muted); transition: .15s; }
.log-btn:hover { color: var(--text); }
.log-viewer   { background: #060f1e; border-radius: 12px; font-family: 'Courier New', monospace; font-size: 11px; line-height: 1.75; height: 340px; overflow-y: auto; border: 1px solid var(--bg3); scroll-behavior: smooth; }
.log-line     { display: flex; gap: 10px; padding: 0 14px; transition: background .08s; }
.log-line:hover { background: #0d1b2e; }
.log-num  { color: #1e293b; user-select: none; flex-shrink: 0; min-width: 26px; text-align: right; font-size: 10px; padding-top: 2px; }
.log-ts   { color: #334155; flex-shrink: 0; white-space: nowrap; font-size: 10px; }
.log-msg  { flex: 1; white-space: pre-wrap; word-break: break-all; }
.l-err    { color: #f87171; } .l-warn  { color: #fbbf24; }
.l-info   { color: #94a3b8; } .l-debug { color: #475569; } .l-def { color: #e2e8f0; }

/* ── NOTIFICAÇÕES (modal) ──────────────────────────────── */
.notif-wrap   { display: flex; flex-direction: column; gap: 6px; }
.notif-empty  { text-align: center; padding: 32px; color: var(--faint); font-size: 13px; }
.mrb-row      { display: flex; justify-content: flex-end; margin-bottom: 4px; }
.mrb          { background: none; border: 1px solid var(--bg3); border-radius: 7px; padding: 4px 11px; font-size: 11px; color: var(--faint); cursor: pointer; transition: .15s; }
.mrb:hover    { color: var(--text); }
.ni-card      { border-radius: 11px; padding: 11px 13px; border: 1px solid; transition: opacity .3s; cursor: pointer; }
.ni-card.high    { background: #ef444408; border-color: #ef444430; }
.ni-card.warning { background: #f59e0b08; border-color: #f59e0b30; }
.ni-card.info    { background: #10b98108; border-color: #10b98130; }
.ni-card.read    { opacity: .45; }
.ni-top   { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.ni-udot  { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.ni-udot.high { background: var(--re); } .ni-udot.warning { background: var(--am); } .ni-udot.info { background: var(--em); }
.ni-title { font-size: 12px; font-weight: 600; }
.ni-card.high .ni-title    { color: var(--re); }
.ni-card.warning .ni-title { color: var(--am); }
.ni-card.info .ni-title    { color: var(--em); }
.ni-msg  { font-size: 11px; color: var(--muted); margin-bottom: 3px; line-height: 1.5; }
.ni-time { font-size: 10px; color: var(--faint); }

/* ── DETAIL PAGE ───────────────────────────────────────── */
.back-btn {
  display: flex; align-items: center; gap: 8px; background: var(--bg2);
  border: 1px solid var(--bg3); border-radius: 11px; padding: 7px 13px;
  cursor: pointer; font-size: 13px; color: var(--muted);
  margin-bottom: 20px; width: fit-content; transition: .15s;
}
.back-btn:hover { color: var(--text); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px,1fr)); gap: 10px; margin-bottom: 20px; }
.sc   { background: var(--bg2); border: 1px solid var(--bg3); border-radius: 13px; padding: 13px; }
.sc-l { font-size: 11px; color: var(--faint); margin-bottom: 5px; }
.sc-v { font-size: 15px; font-weight: 700; }
.charts-3  { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 12px; margin-bottom: 18px; }
.cc   { background: var(--bg2); border: 1px solid var(--bg3); border-radius: 17px; padding: 16px; }
.cc-h { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 10px; }
.disk-sec, .ct-tbl { background: var(--bg2); border: 1px solid var(--bg3); border-radius: 17px; padding: 18px; margin-bottom: 16px; }
.blk-title { font-size: 13px; font-weight: 600; color: #cbd5e1; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; }
.ct-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 11px; border: 1px solid var(--bg3); margin-bottom: 6px;
  cursor: pointer; transition: .15s;
}
.ct-row:hover   { background: var(--bg3); }
.ct-row.running { background: #0f172a; }
.ct-row.exited  { background: #ef444408; border-color: #ef444430; }
.crd { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.crd.running { background: var(--em); animation: pulse 2s infinite; }
.crd.exited  { background: var(--re); }
.cri    { flex: 1; min-width: 0; }
.cr-name { font-size: 13px; font-weight: 500; }
.cr-img  { font-size: 10px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-stats { display: flex; gap: 12px; font-size: 11px; flex-shrink: 0; }
.cr-l { color: var(--faint); } .cr-v { font-weight: 600; }

/* ── NTFY PANEL ────────────────────────────────────────── */
.ntfy-ov    { position: fixed; inset: 0; background: #000000aa; z-index: 300; display: none; }
.ntfy-ov.open { display: block; }
.ntfy-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 340px;
  background: var(--bg2); border-left: 1px solid var(--bg3); z-index: 301;
  transform: translateX(100%); transition: transform .3s ease;
  display: flex; flex-direction: column; overflow: hidden;
}
.ntfy-panel.open { transform: translateX(0); }
.ntfy-head  { padding: 17px 18px; border-bottom: 1px solid var(--bg3); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.ntfy-title { font-size: 14px; font-weight: 700; }
.ntfy-close { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 18px; padding: 2px; line-height: 1; transition: .15s; }
.ntfy-close:hover { color: var(--text); }
.ntfy-body  { flex: 1; overflow-y: auto; }
.ntfy-s     { padding: 14px 16px; }
.ntfy-st    { font-size: 11px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.ntfy-item  { border-radius: 11px; padding: 11px 13px; margin-bottom: 8px; border: 1px solid; }
.ntfy-item.high    { background: #ef444410; border-color: #ef444430; }
.ntfy-item.warning { background: #f59e0b10; border-color: #f59e0b30; }
.ntfy-item.info    { background: #10b98110; border-color: #10b98130; }
.ntfy-t    { font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.ntfy-item.high .ntfy-t    { color: var(--re); }
.ntfy-item.warning .ntfy-t { color: var(--am); }
.ntfy-item.info .ntfy-t    { color: var(--em); }
.ntfy-m    { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.ntfy-time { font-size: 10px; color: var(--faint); }
.ntfy-div  { height: 1px; background: var(--bg3); margin: 0 16px; }
.ntfy-row  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ntfy-label { font-size: 12px; color: #cbd5e1; }
.ntfy-ci   { width: 68px; background: var(--bg); border: 1px solid var(--bg3); border-radius: 7px; padding: 4px 8px; color: var(--text); font-size: 12px; text-align: right; outline: none; }
.ntfy-ci:focus { border-color: var(--bl); }
.tgl       { width: 36px; height: 20px; background: var(--bg3); border-radius: 99px; position: relative; border: none; cursor: pointer; transition: .2s; flex-shrink: 0; }
.tgl.on    { background: var(--em); }
.tgl::after { content:""; position: absolute; width: 14px; height: 14px; background: #fff; border-radius: 50%; top: 3px; left: 3px; transition: .2s; }
.tgl.on::after { left: 19px; }
.ntfy-footer { padding: 12px 16px 20px; flex-shrink: 0; border-top: 1px solid var(--bg3); }
.ntfy-test   { width: 100%; padding: 10px; background: var(--bl); color: #fff; border: none; border-radius: 11px; font-size: 13px; font-weight: 500; cursor: pointer; transition: .15s; margin-bottom: 8px; }
.ntfy-test:hover { background: #2563eb; }
.ntfy-link   { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--bl); text-decoration: none; padding: 8px; border: 1px solid #3b82f628; border-radius: 10px; transition: .15s; }
.ntfy-link:hover { background: #3b82f610; }
.srv-in      { width: 100%; background: var(--bg); border: 1px solid var(--bg3); border-radius: 8px; padding: 6px 10px; color: var(--text); font-size: 12px; outline: none; font-family: monospace; margin-top: 5px; }
.srv-in:focus { border-color: var(--bl); }

/* ── TOAST ─────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(60px);
  background: var(--bg2); border: 1px solid var(--bg3); border-radius: 12px;
  padding: 10px 18px; font-size: 12px; color: var(--text); z-index: 999;
  transition: transform .3s, opacity .3s; opacity: 0; pointer-events: none; white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ── LOADING OVERLAY ───────────────────────────────────── */
#loading-overlay {
  position: fixed; inset: 0; background: #0f172af5; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 16px; transition: opacity .4s;
}
#loading-overlay.hidden { opacity: 0; pointer-events: none; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--bg3); border-top-color: var(--em); border-radius: 50%; animation: spin 1s linear infinite; }

/* ── FOOTER ────────────────────────────────────────────── */
footer  { border-top: 1px solid var(--bg2); margin-top: 10px; }
.foot-i { max-width: 1200px; margin: 0 auto; padding: 12px 20px; display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); }
