/* ═══════════════════════════════════════════════════════════════
   MAX VPN — Admin Console
   Card-based control panel · equally tuned for web + mobile
   Class names & CSS-variable names preserved from original markup.
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Surfaces — layered cool slate so the brand orange reads as a deliberate accent */
  --bg:      #0a0e17;
  --sb-bg:   #0e1320;
  --card:    #121826;
  --card2:   #161d2e;
  --card3:   #1c2436;
  --border:  #212b40;
  --border2: #2c3950;

  /* Text */
  --text:    #eef2fb;
  --text2:   #9aabc9;
  --text3:   #5a6886;

  /* Brand + semantic accents */
  --orange:  #f97316;
  --olo:     rgba(249,115,22,.12);
  --blue:    #38bdf8;
  --blo:     rgba(56,189,248,.10);
  --green:   #22c55e;
  --glo:     rgba(34,197,94,.10);
  --red:     #f43f5e;
  --rlo:     rgba(244,63,94,.10);
  --purple:  #a78bfa;
  --plo:     rgba(167,139,250,.10);

  --grad: linear-gradient(135deg, #f97316, #ef4444);

  /* Geometry */
  --r:   10px;
  --rl:  14px;
  --rs:  7px;
  --sh:  0 1px 2px rgba(0,0,0,.4), 0 18px 40px -20px rgba(0,0,0,.8);
  --ring: 0 0 0 3px rgba(249,115,22,.22);
  --sbw: 248px;
  --tbh: 56px;

  --font-ui:  ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, monospace;
}

html { font-size: 15px; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-ui);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(249,115,22,.06), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(56,189,248,.05), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Icons — crisp, identical on every platform (replaces emoji) */
.ic {
  width: 1.1em; height: 1.1em; display: inline-block; vertical-align: -0.16em; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.ic-svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

a { color: inherit; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--rs); }

/* ── Ambient background canvas ───────────────────────── */
#dots-canvas {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  width: 100%; height: 100%;
  opacity: .9;
}

/* ══════════════════════════════════════════════════════
   APP SHELL
   ══════════════════════════════════════════════════════ */
.app { position: relative; z-index: 1; display: flex; min-height: 100vh; }

/* ── SIDEBAR ─────────────────────────────────────────── */
.sidebar {
  width: var(--sbw);
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(14,19,32,.98), rgba(11,15,26,.98));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 300;
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}

.sb-brand {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 11px; flex-shrink: 0;
}
.sb-logo {
  width: 38px; height: 38px; flex-shrink: 0;
  background: var(--grad);
  border-radius: 11px; display: grid; place-items: center;
  color: #fff; box-shadow: 0 6px 18px -4px rgba(249,115,22,.55);
}
.sb-logo .ic { width: 21px; height: 21px; }
.sb-name { font-weight: 800; font-size: .95rem; letter-spacing: 2.5px; }
.sb-name em { color: var(--orange); font-style: normal; }
.sb-sub  { font-size: .58rem; color: var(--text3); letter-spacing: 1.6px; text-transform: uppercase; margin-top: 2px; }

.sb-nav { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; }
.sb-sec {
  font-size: .6rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.4px; color: var(--text3); padding: 14px 10px 6px;
}
.nav-link {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: var(--r);
  color: var(--text2); font-size: .87rem; font-weight: 500;
  cursor: pointer; border: 1px solid transparent;
  transition: background .15s, color .15s; text-decoration: none;
}
.nav-link:hover { background: var(--card3); color: var(--text); }
.nav-link.active {
  background: var(--olo); color: var(--orange);
  border-color: rgba(249,115,22,.22); font-weight: 600;
}
.nav-link.active::before {
  content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--orange);
}
.nav-ic { width: 18px; height: 18px; display: grid; place-items: center; flex-shrink: 0; opacity: .9; }
.nav-ic .ic { width: 18px; height: 18px; }
.nav-cnt {
  margin-left: auto; font-size: .68rem; font-weight: 700;
  background: var(--card3); color: var(--text2);
  padding: 1px 8px; border-radius: 999px; min-width: 22px; text-align: center;
}
.nav-link.active .nav-cnt { background: rgba(249,115,22,.16); color: var(--orange); }

.sb-foot { padding: 12px; border-top: 1px solid var(--border); flex-shrink: 0; }
.sb-user {
  display: flex; align-items: center; gap: 10px;
  background: var(--card2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 10px 12px; margin-bottom: 8px;
}
.sb-av {
  width: 32px; height: 32px; flex-shrink: 0;
  background: var(--grad); border-radius: 50%;
  display: grid; place-items: center; font-size: .8rem; font-weight: 800; color: #fff;
}
.sb-uname { font-size: .84rem; font-weight: 600; }
.sb-urole { font-size: .66rem; color: var(--text3); }
.btn-so {
  width: 100%; padding: 9px; border-radius: var(--r);
  background: var(--card2); border: 1px solid var(--border2);
  color: var(--text2); font-size: .82rem; font-weight: 600;
  font-family: inherit; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  text-decoration: none; transition: background .15s, color .15s;
}
.btn-so:hover { background: var(--card3); color: var(--text); }

/* ── TOPBAR (mobile) ─────────────────────────────────── */
.topbar {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--tbh);
  padding: 0 14px;
  padding-top: env(safe-area-inset-top);
  height: calc(var(--tbh) + env(safe-area-inset-top));
  background: rgba(10,14,23,.92);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  align-items: center; justify-content: space-between;
}
.tb-brand { font-size: .98rem; font-weight: 800; letter-spacing: 2px; color: var(--text); display: flex; align-items: center; gap: 9px; }
.tb-brand em { color: var(--orange); font-style: normal; }
.tb-logo { width: 28px; height: 28px; border-radius: 8px; background: var(--grad); display: grid; place-items: center; color: #fff; }
.tb-logo .ic { width: 16px; height: 16px; }
.tb-hamburger {
  background: var(--card2); border: 1px solid var(--border2);
  border-radius: var(--r); color: var(--text);
  cursor: pointer; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.tb-hamburger .ic { width: 20px; height: 20px; }
.tb-hamburger:hover { background: var(--card3); }

/* ── OVERLAY ─────────────────────────────────────────── */
.overlay {
  display: none; position: fixed; inset: 0; z-index: 290;
  background: rgba(0,0,0,.55); backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .26s;
}
.overlay.show { display: block; opacity: 1; }

/* ── MAIN ────────────────────────────────────────────── */
.main { flex: 1; margin-left: var(--sbw); min-height: 100vh; display: flex; flex-direction: column; }
.page { display: none; padding: 30px 32px 90px; max-width: 1120px; width: 100%; margin: 0 auto; }
.page.active { display: block; animation: pageIn .3s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ══════════════════════════════════════════════════════
   PAGE HEADER
   ══════════════════════════════════════════════════════ */
.page-hd { margin-bottom: 24px; }
.page-hd h1 { font-size: 1.55rem; font-weight: 800; letter-spacing: -.4px; }
.page-hd p  { font-size: .85rem; color: var(--text3); margin-top: 4px; }

/* ── STATS ───────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat-card {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--rl); padding: 18px 16px;
  display: flex; align-items: center; gap: 14px;
  transition: transform .16s, border-color .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--border2); box-shadow: var(--sh); }
.stat-icon { width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; }
.stat-icon .ic { width: 22px; height: 22px; }
.si-o { background: var(--olo); color: var(--orange); }
.si-g { background: var(--glo); color: var(--green); }
.si-b { background: var(--blo); color: var(--blue); }
.si-p { background: var(--plo); color: var(--purple); }
.stat-val   { font-size: 1.75rem; font-weight: 800; line-height: 1; letter-spacing: -.5px; }
.stat-label { font-size: .73rem; color: var(--text3); margin-top: 4px; font-weight: 500; }

/* ── CARD ────────────────────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--rl); margin-bottom: 18px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.card-title { display: flex; align-items: center; gap: 9px; font-size: .95rem; font-weight: 700; }
.card-title .ic { width: 18px; height: 18px; color: var(--text2); }
.card-body  { padding: 20px; }
.np { padding: 0 !important; }

/* ── BADGE ───────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; font-size: .67rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.bo { background: var(--olo); color: var(--orange); border: 1px solid rgba(249,115,22,.25); }
.bb { background: var(--blo); color: var(--blue);   border: 1px solid rgba(56,189,248,.25); }
.bg { background: var(--glo); color: var(--green);  border: 1px solid rgba(34,197,94,.25);  }
.br { background: var(--rlo); color: #fb7185;        border: 1px solid rgba(244,63,94,.3);   }

/* Rows whose .ovpn is missing on disk (won't load in the app) */
tbody tr.row-bad { background: rgba(244,63,94,.05); }
tbody tr.row-bad:hover { background: rgba(244,63,94,.08); }
@media (max-width: 820px) {
  tbody tr.row-bad { border-color: rgba(244,63,94,.35); }
}

/* ── BUTTONS ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 17px; border-radius: var(--r);
  font-size: .85rem; font-weight: 600; font-family: inherit;
  cursor: pointer; border: 1px solid transparent;
  transition: transform .12s, opacity .15s, background .15s, color .15s;
  white-space: nowrap; appearance: none; text-decoration: none;
}
.btn .ic { width: 16px; height: 16px; }
.btn:active { transform: translateY(1px); }
.btn-p { background: var(--grad); color: #fff; box-shadow: 0 4px 14px -2px rgba(249,115,22,.45); }
.btn-p:hover { opacity: .9; }
.btn-g { background: var(--card2); color: var(--text2); border-color: var(--border2); }
.btn-g:hover { background: var(--card3); color: var(--text); }
.btn-d { background: var(--rlo); color: #fb7185; border-color: rgba(244,63,94,.22); }
.btn-d:hover { background: rgba(244,63,94,.18); }
.btn-sm   { padding: 5px 11px; font-size: .77rem; border-radius: var(--rs); }
.btn-sm .ic { width: 14px; height: 14px; }
.btn-full { width: 100%; }

/* ── FORMS ───────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 14px; }
.fgroup { display: flex; flex-direction: column; gap: 6px; }
.flabel { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--text3); }
.finput {
  width: 100%; padding: 11px 13px;
  background: var(--card3); border: 1px solid var(--border2);
  color: var(--text); border-radius: var(--r);
  font-size: .9rem; font-family: inherit;
  transition: border-color .15s, box-shadow .15s; min-height: 44px;
}
.finput:focus { outline: none; border-color: var(--orange); box-shadow: var(--ring); }
.finput::placeholder { color: var(--text3); }

/* ── TABLE (desktop) ─────────────────────────────────── */
.tscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
thead th {
  text-align: left; padding: 11px 16px;
  font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  color: var(--text3); background: rgba(0,0,0,.22);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: rgba(255,255,255,.025); }
.td-b { font-weight: 600; }
.mono {
  font-family: var(--font-mono); font-size: .78rem;
  color: var(--blue); background: var(--card2); padding: 2px 7px;
  border-radius: 6px; border: 1px solid var(--border2); word-break: break-all;
}
.pill   { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; padding: 3px 9px; border-radius: 999px; }
.pill .ic { width: 13px; height: 13px; }
.pill-g { background: var(--glo); color: var(--green); border: 1px solid rgba(34,197,94,.2); }
.pill-x { background: var(--card2); color: var(--text3); border: 1px solid var(--border2); }
.pill-r { background: var(--rlo); color: #fb7185; border: 1px solid rgba(244,63,94,.25); }
.pill-c { background: var(--card3); color: var(--text2); border: 1px solid var(--border2); font-weight: 700; font-size: .74rem; padding: 2px 8px; border-radius: 6px; }
.more-row td { padding: 12px 16px !important; font-size: .8rem; color: var(--text3); }

/* ── EMPTY ───────────────────────────────────────────── */
.empty { text-align: center; padding: 46px 20px; color: var(--text3); }
.empty-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--card2); border: 1px solid var(--border); margin-bottom: 12px; }
.empty-icon .ic { width: 24px; height: 24px; color: var(--text3); }
.empty p { font-size: .85rem; }

/* ── ALERT ───────────────────────────────────────────── */
.alert { display: flex; align-items: center; gap: 10px; padding: 12px 15px; border-radius: var(--r); font-size: .85rem; margin-bottom: 16px; }
.alert .ic { width: 17px; height: 17px; flex-shrink: 0; }
.a-ok  { background: rgba(34,197,94,.09); color: #86efac; border: 1px solid rgba(34,197,94,.2); }
.a-err { background: rgba(244,63,94,.09); color: #fda4af; border: 1px solid rgba(244,63,94,.2); }
.a-warn{ background: rgba(251,146,60,.1); color: #fdba74; border: 1px solid rgba(251,146,60,.28); }

/* Upload limits note + over-limit banner */
.limits-note {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--card2); border: 1px solid var(--border2);
  border-left: 3px solid var(--blue);
  border-radius: var(--r); padding: 12px 15px; margin-bottom: 16px;
  font-size: .8rem; color: var(--text2); line-height: 1.5;
}
.limits-note .ic { width: 16px; height: 16px; color: var(--blue); flex-shrink: 0; margin-top: 2px; }
.limits-note b { color: var(--text); font-weight: 700; }
.limits-note code { font-family: var(--font-mono); font-size: .76rem; background: var(--card3); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--border2); }
.over-limit-warn {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(251,146,60,.1); border: 1px solid rgba(251,146,60,.28);
  color: #fdba74; border-radius: var(--r); padding: 12px 15px; margin-bottom: 16px;
  font-size: .82rem; line-height: 1.5;
}
.over-limit-warn .ic { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }

/* ── SOURCE BLOCK (upload) ───────────────────────────── */
.src-block { background: var(--card2); border: 1px solid var(--border2); border-radius: var(--rl); padding: 18px 20px; margin-bottom: 14px; }
.src-head  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.src-tag   { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--orange); background: var(--olo); border: 1px solid rgba(249,115,22,.2); border-radius: 999px; padding: 3px 11px; }
.cred-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 15px; }
.sec-div   { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text3); display: flex; align-items: center; gap: 9px; margin-bottom: 11px; }
.sec-div::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── DROP ZONE ───────────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--border2); border-radius: var(--rl);
  padding: 26px 18px; text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s; background: rgba(0,0,0,.18); position: relative;
}
.drop-zone:hover, .drop-zone.over { border-color: var(--orange); background: rgba(249,115,22,.05); }
.drop-zone input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: none; background: none; }
.dz-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--card3); border: 1px solid var(--border2); margin-bottom: 8px; }
.dz-icon .ic { width: 22px; height: 22px; color: var(--text2); }
.dz-t { font-size: .87rem; font-weight: 600; color: var(--text2); }
.dz-s { font-size: .73rem; color: var(--text3); margin-top: 3px; }
.fchips { display: flex; flex-direction: column; gap: 5px; margin-top: 9px; }
.fchip  { display: flex; align-items: center; gap: 9px; background: var(--card3); border: 1px solid var(--border2); border-radius: var(--r); padding: 7px 11px; font-size: .78rem; }
.fchip .ic { width: 15px; height: 15px; color: var(--blue); flex-shrink: 0; }
.fn { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text2); }
.fs { color: var(--text3); font-size: .72rem; }
.fc { font-size: .73rem; color: var(--text3); margin-top: 5px; }

/* ── AUTH / LOGIN ────────────────────────────────────── */
.auth-shell { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; position: relative; z-index: 1; }
.auth-box {
  width: 100%; max-width: 400px;
  background: rgba(18,24,38,.94);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--border2); border-radius: 18px;
  padding: 34px 30px; box-shadow: var(--sh);
}
.auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 26px; }
.auth-logo  { width: 40px; height: 40px; flex-shrink: 0; background: var(--grad); border-radius: 12px; display: grid; place-items: center; color: #fff; box-shadow: 0 6px 18px -4px rgba(249,115,22,.55); }
.auth-logo .ic { width: 22px; height: 22px; }
.auth-bname { font-weight: 800; font-size: .95rem; letter-spacing: 2.5px; }
.auth-bname em { color: var(--orange); font-style: normal; }
.auth-bsub  { font-size: .58rem; color: var(--text3); letter-spacing: 1.6px; text-transform: uppercase; margin-top: 2px; }
.auth-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 4px; letter-spacing: -.3px; }
.auth-desc  { font-size: .84rem; color: var(--text3); margin-bottom: 22px; }
.auth-hint  { text-align: center; margin-top: 16px; font-size: .74rem; color: var(--text3); }
.auth-hint code { font-family: var(--font-mono); font-size: .74rem; background: var(--card2); padding: 2px 6px; border-radius: 5px; color: var(--text2); border: 1px solid var(--border2); }

/* ── UTILITIES ───────────────────────────────────────── */
.flex  { display: flex; align-items: center; }
.gap-8 { gap: 8px; }
.mt-14 { margin-top: 14px; }
.mt-20 { margin-top: 20px; }
.muted { color: var(--text3); }
.small { font-size: .8rem; }

/* ══════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════ */

/* Tablet — drop stats to 2 cols a bit earlier for breathing room */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Mobile ≤ 820px : drawer sidebar + topbar ────────── */
@media (max-width: 820px) {
  .topbar { display: flex; }
  .sidebar { transform: translateX(-100%); width: 280px; box-shadow: 0 0 60px rgba(0,0,0,.6); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; padding-top: calc(var(--tbh) + env(safe-area-inset-top)); }
  .page { padding: 18px 14px 90px; }

  .stats-grid { gap: 10px; margin-bottom: 16px; }
  .stat-card  { padding: 14px 13px; gap: 11px; }
  .stat-icon  { width: 40px; height: 40px; border-radius: 11px; }
  .stat-icon .ic { width: 19px; height: 19px; }
  .stat-val   { font-size: 1.45rem; }

  .page-hd h1 { font-size: 1.35rem; }
  .card-head { padding: 14px 16px; }
  .card-body { padding: 16px; }

  .cred-row, .form-grid { grid-template-columns: 1fr !important; }

  /* ── Tables morph into labelled cards ── */
  .tscroll { overflow: visible; }
  table, thead, tbody, tr, td { display: block; width: 100%; }
  thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  tbody { padding: 10px; display: flex; flex-direction: column; gap: 10px; }
  tbody tr {
    background: var(--card2); border: 1px solid var(--border);
    border-radius: var(--r); padding: 4px 2px;
  }
  tbody tr:hover { background: var(--card2); }
  tbody td {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 9px 14px; border-bottom: 1px solid var(--border);
    text-align: right; min-height: 0;
  }
  tbody tr td:last-child { border-bottom: none; }
  tbody td::before {
    content: attr(data-label);
    font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
    color: var(--text3); text-align: left; flex-shrink: 0;
  }
  /* action cell (delete buttons) spans full width, no label */
  tbody td.cell-action { justify-content: stretch; padding-top: 11px; padding-bottom: 11px; }
  tbody td.cell-action::before { display: none; }
  tbody td.cell-action form, tbody td.cell-action .btn { width: 100%; }
  tbody td.cell-action .btn { min-height: 40px; }
  .more-row, .more-row td { display: block; text-align: center; }
  .more-row td::before { display: none; }
}

/* ── Small phones ────────────────────────────────────── */
@media (max-width: 420px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .auth-box { padding: 28px 22px; }
}

/* ── Edit modal ──────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(7,10,17,.78);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.show { display: flex; animation: mfade .15s ease both; }
@keyframes mfade { from { opacity: 0 } to { opacity: 1 } }
.modal {
  width: 100%; max-width: 440px; background: var(--card);
  border: 1px solid var(--border2); border-radius: var(--rl);
  box-shadow: var(--sh); max-height: 90vh; overflow: auto;
  animation: mpop .16s cubic-bezier(.4,0,.2,1) both;
}
@keyframes mpop { from { transform: translateY(8px) scale(.98); opacity: 0 } to { transform: none; opacity: 1 } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.modal-head .card-title { font-size: .98rem; }
.modal-x { background: var(--card2); border: 1px solid var(--border2); color: var(--text2); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; transition: background .15s, color .15s; }
.modal-x .ic { width: 16px; height: 16px; }
.modal-x:hover { background: var(--card3); color: var(--text); }
.modal-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--border); }
.flabel .opt { text-transform: none; letter-spacing: 0; color: var(--text3); font-weight: 500; }

/* ── Bulk select (servers) ───────────────────────────── */
.ck { width:17px; height:17px; accent-color: var(--orange); cursor:pointer; vertical-align:middle; margin:0; }
.bulk-bar { display:none; align-items:center; gap:12px; padding:10px 18px; border-bottom:1px solid var(--border); background:var(--olo); }
.bulk-bar.show { display:flex; }
.bulk-count { font-size:.82rem; color:var(--text2); }
.bulk-count b { color:var(--orange); }
