/* visionOS / Liquid Glass control plane — glass windows, white type, nested radii
   Fonts load via <link rel="stylesheet"> in the HTML head (preconnect + display=swap),
   never @import — @import blocks the whole sheet on slow font CDN and paints unstyled white. */

:root {
  --bg0: #07080c;
  --bg1: #0b0d14;
  --bg2: rgba(22, 26, 38, 0.55);
  --bg3: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.10);
  --line2: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --faint: rgba(255, 255, 255, 0.48);
  --accent: #dcecff;
  --accent-dim: rgba(180, 214, 255, 0.14);
  --accent2: #9ad8ff;
  --good: #7dffc4;
  --good-dim: rgba(125, 255, 196, 0.12);
  --warn: #ffd58a;
  --bad: #ff9aa8;
  --bad-dim: rgba(255, 154, 168, 0.12);
  --radius: 26px;
  --radius-sm: 16px;
  --shadow:
    0 0 0 1px rgba(255, 255, 255, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 28px 64px rgba(0, 0, 0, 0.38);
  --font: "DM Sans", "SF Pro Display", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --side: 268px;
  --glass: linear-gradient(165deg, rgba(255,255,255,0.14), rgba(255,255,255,0.04) 42%, rgba(8,10,18,0.28));
  --glass-blur: 28px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: #07080c;
  background-image:
    radial-gradient(900px 520px at 8% -8%, rgba(120, 180, 255, 0.16), transparent 58%),
    radial-gradient(720px 460px at 96% 4%, rgba(170, 130, 255, 0.12), transparent 52%),
    radial-gradient(640px 400px at 70% 110%, rgba(80, 200, 255, 0.08), transparent 50%),
    linear-gradient(180deg, #0a0d16 0%, #07080c 100%);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: -12%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 30%, rgba(255,255,255,0.08), transparent 26%),
    radial-gradient(circle at 78% 62%, rgba(140,190,255,0.10), transparent 32%);
  animation: spaceDrift 40s ease-in-out infinite alternate;
}
@keyframes spaceDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(2%, -2%, 0) scale(1.06); }
}
a { color: var(--accent2); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--side) 1fr;
  min-height: 100vh;
}

/* —— Sidebar as a visionOS window —— */
.sidebar {
  position: sticky;
  top: 12px;
  height: calc(100vh - 24px);
  margin: 12px 0 12px 12px;
  padding: 18px 12px;
  background: var(--glass);
  backdrop-filter: blur(36px) saturate(140%);
  -webkit-backdrop-filter: blur(36px) saturate(140%);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 10px 20px;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 24%, #fff, #cfe8ff 34%, #5b7cff 72%, #10162a 100%);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #10162a;
  box-shadow: 0 8px 24px rgba(90, 160, 255, 0.28), inset 0 1px 0 rgba(255,255,255,0.7);
  font-size: 14px;
}
.brand h1 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
}
.brand p {
  margin: 3px 0 0;
  color: var(--faint);
  font-size: 11px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.nav button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 12px 14px;
  min-height: 44px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.nav button:hover {
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}
.nav button.active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), 0 0 0 1px rgba(255,255,255,0.08);
}
.side-foot {
  padding: 14px 12px 8px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 11px;
  line-height: 1.5;
}

/* —— Main —— */
.main { padding: 28px 32px 56px; max-width: 1180px; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}
.topbar h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.03em;
}
.topbar .sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  font-size: 11px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg2);
  color: var(--muted);
  letter-spacing: 0.02em;
}
.pill.live {
  color: var(--good);
  background: var(--good-dim);
  border-color: rgba(52, 211, 153, 0.25);
}
.pill.bad {
  color: var(--bad);
  background: var(--bad-dim);
  border-color: rgba(251, 113, 133, 0.3);
}

.grid { display: grid; gap: 14px; }
.grid.stats { grid-template-columns: repeat(4, 1fr); }
.grid.two { grid-template-columns: 1.15fr 0.85fr; }

.card {
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 20px 18px;
}
.card h3 {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.stat-val {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.stat-label {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
  font-weight: 500;
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
  flex: 1;
}
.field label {
  font-size: 11px;
  font-weight: 600;
  color: var(--faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.field input,
.field select,
.field textarea {
  background: rgba(8, 10, 16, 0.45);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  min-height: 44px;
  outline: none;
  transition: 0.18s border, 0.18s box-shadow, 0.18s background;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(180, 220, 255, 0.55);
  background: rgba(16, 20, 32, 0.55);
  box-shadow: 0 0 0 4px var(--accent-dim);
}
.field textarea {
  min-height: 84px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 12px;
}

.btn {
  border: 1px solid var(--line2);
  border-radius: 999px;
  padding: 11px 16px;
  min-height: 42px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  transition: 0.18s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
}
.btn:hover { background: rgba(255, 255, 255, 0.14); transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(180deg, #f4f8ff 0%, #d5e6ff 100%);
  color: #10162a;
  border: 0;
  box-shadow: 0 8px 22px rgba(160, 200, 255, 0.22), inset 0 1px 0 #fff;
}
.btn.danger {
  background: var(--bad-dim);
  color: #fda4af;
  border-color: rgba(251, 113, 133, 0.3);
}
.btn.good {
  background: var(--good-dim);
  color: var(--good);
  border-color: rgba(52, 211, 153, 0.3);
}
.btn.ghost { background: transparent; }
.btn:active { transform: none; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td {
  text-align: left;
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  color: var(--faint);
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
td.mono, .mono { font-family: var(--mono); font-size: 12px; }
.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}
.tag.active { color: var(--good); background: var(--good-dim); }
.tag.banned { color: #fda4af; background: var(--bad-dim); }
.tag.vip { color: #c4b5fd; background: rgba(167, 139, 250, 0.12); }
.tag.owner { color: var(--accent); background: var(--accent-dim); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.actions .btn { padding: 5px 9px; font-size: 11px; }

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: 12px;
  padding: 12px 16px;
  min-width: 240px;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 500;
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: 0.22s ease;
}
.toast.show { transform: none; opacity: 1; }

.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}
.switch input { accent-color: var(--accent); width: 16px; height: 16px; }
.hidden { display: none !important; }
.help { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 0 0 12px; }
.created-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  background: #050507;
  border: 1px dashed rgba(232, 197, 71, 0.3);
  font-family: var(--mono);
  font-size: 12px;
  max-height: 200px;
  overflow: auto;
  white-space: pre-wrap;
  color: #e4e4e7;
}

/* login — full-screen, always interactive */
.login-wrap {
  position: fixed;
  inset: 0;
  z-index: 1000;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(800px 480px at 20% 0%, rgba(120,180,255,0.16), transparent 55%),
    radial-gradient(700px 420px at 90% 80%, rgba(160,120,255,0.12), transparent 50%),
    #07080c;
  pointer-events: auto;
}
.login-wrap.hidden {
  display: none !important;
  pointer-events: none !important;
}
.login-card {
  width: min(400px, 100%);
  background: var(--glass);
  backdrop-filter: blur(40px) saturate(150%);
  -webkit-backdrop-filter: blur(40px) saturate(150%);
  border: 1px solid var(--line2);
  border-radius: 32px;
  padding: 34px 30px 28px;
  box-shadow: var(--shadow);
  pointer-events: auto;
  position: relative;
  z-index: 1001;
}
.login-mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 30% 24%, #fff, #cfe8ff 34%, #5b7cff 72%, #10162a 100%);
  display: grid;
  place-items: center;
  color: #10162a;
  font-weight: 800;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(90, 160, 255, 0.28), inset 0 1px 0 rgba(255,255,255,0.7);
}
.login-card h1 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: #f4f4f5;
}
.login-sub,
.login-hint {
  color: #a1a1aa;
  font-size: 13px;
  line-height: 1.5;
}
.login-sub { margin: 0 0 22px; }
.login-hint { margin-top: 18px; font-size: 12px; }
.login-hint a { color: #e8c547; }
.login-err {
  color: #fb7185;
  font-size: 13px;
  margin-top: 12px;
  pointer-events: none;
}
.login-card .field label {
  color: #a1a1aa;
  margin-bottom: 8px;
  display: block;
}
/* password field + Show button */
.pw-wrap {
  position: relative;
  display: block;
  width: 100%;
}
.pw-wrap input {
  width: 100%;
  padding-right: 72px !important;
}
.pw-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #e8c547;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  line-height: 1;
  z-index: 2;
}
.pw-toggle:hover {
  background: rgba(232, 197, 71, 0.12);
  color: #f5d76e;
}
.pw-toggle:focus-visible {
  outline: 1px solid rgba(232, 197, 71, 0.55);
  outline-offset: 1px;
}

.login-card input#loginPw,
.login-card input#pass,
.login-card input[type="password"],
.login-card input[type="text"] {
  width: 100%;
  display: block;
  box-sizing: border-box;
  background: #0a0a0c !important;
  color: #f4f4f5 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.4;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto !important;
  user-select: text !important;
  -webkit-user-select: text !important;
  caret-color: #e8c547;
  opacity: 1 !important;
  position: relative;
  z-index: 2;
}
.login-card input#loginPw:focus {
  border-color: rgba(232, 197, 71, 0.65) !important;
  box-shadow: 0 0 0 3px rgba(232, 197, 71, 0.15);
}
.login-card #btnLogin {
  pointer-events: auto !important;
  cursor: pointer;
  position: relative;
  z-index: 2;
}
/* never let toast steal clicks on login */
.login-wrap ~ .toast {
  z-index: 900;
}

@media (max-width: 1100px) {
  .app { grid-template-columns: 1fr; }
  .grid.stats, .grid.two { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .main { padding: 18px 14px 40px; }
  .grid.stats, .grid.two { grid-template-columns: 1fr; }
}

/* Live license timers */
.countdown { font-variant-numeric: tabular-nums; font-weight: 600; }
.countdown.live { color: var(--good, #3dd68c); }
.countdown.pending { color: var(--accent, #8b9cff); }
.countdown.expired, .countdown.banned { color: var(--bad, #f31260); }
.countdown.life { color: var(--muted, #8b93a7); }
.timer-cell { min-width: 110px; }
code { font-size: 12px; background: rgba(255,255,255,.06); padding: 1px 5px; border-radius: 4px; }


/* === FANCY MOBILE v2 === */

/* Status tags — color coded */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: var(--bg3);
  color: var(--muted);
}
.tag.active, .tag.std {
  color: var(--good);
  background: var(--good-dim);
  border-color: rgba(52, 211, 153, 0.28);
}
.tag.vip {
  color: #c4b5fd;
  background: rgba(167, 139, 250, 0.14);
  border-color: rgba(167, 139, 250, 0.35);
}
.tag.owner {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: rgba(232, 197, 71, 0.35);
}
.tag.banned, .tag.expired {
  color: var(--bad);
  background: var(--bad-dim);
  border-color: rgba(251, 113, 133, 0.35);
}
.tag.pending, .tag.inactive {
  color: var(--warn);
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.3);
}

/* Fancy timer chips */
.countdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
}
.countdown::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  flex-shrink: 0;
}
.countdown.live { color: var(--good); background: var(--good-dim); border-color: rgba(52,211,153,.3); }
.countdown.live.urgent { color: var(--warn); background: rgba(251,191,36,.12); border-color: rgba(251,191,36,.35); animation: pulse-soft 1.2s ease infinite; }
.countdown.live.critical { color: var(--bad); background: var(--bad-dim); border-color: rgba(251,113,133,.4); animation: pulse-soft 0.7s ease infinite; }
.countdown.pending { color: #93c5fd; background: rgba(59,130,246,.12); border-color: rgba(96,165,250,.35); }
.countdown.expired, .countdown.banned { color: var(--bad); background: var(--bad-dim); border-color: rgba(251,113,133,.35); }
.countdown.life { color: var(--accent); background: var(--accent-dim); border-color: rgba(232,197,71,.3); }
.countdown.life::before { box-shadow: 0 0 10px var(--accent); }

@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}

.timer-cell { min-width: 128px; white-space: nowrap; }

/* Table polish */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--faint);
  padding: 10px 10px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(12,12,15,0.95);
  z-index: 1;
}
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
tr:hover td { background: rgba(255,255,255,0.02); }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.actions .btn { padding: 6px 10px; font-size: 11.5px; }

/* Stat cards glow */
.card .stat-val { background: linear-gradient(90deg, var(--text), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Mobile bar */
.mobile-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 50;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(12, 16, 26, 0.55);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.mobile-bar-title {
  flex: 1;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.nav-toggle {
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 18px;
  border-radius: 12px;
}
.nav-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 80;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
}
.nav-scrim[hidden] { display: none !important; }

/* Mobile / tablet */
@media (max-width: 1100px) {
  .app {
    grid-template-columns: 1fr;
  }
  .mobile-bar { display: flex; }
  .sidebar {
    position: fixed;
    top: 10px;
    left: 10px;
    bottom: 10px;
    margin: 0;
    width: min(84vw, 300px);
    z-index: 90;
    height: auto;
    transform: translateX(-110%);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow);
  }
  .app.nav-open .sidebar {
    transform: translateX(0);
  }
  .main {
    padding: 16px 14px 88px;
    max-width: 100%;
  }
  .topbar {
    flex-direction: column;
    gap: 12px;
  }
  .topbar h2 { font-size: 20px; }
  .grid.stats { grid-template-columns: 1fr 1fr; }
  .grid.two { grid-template-columns: 1fr; }
  .pills { width: 100%; }
}

@media (max-width: 700px) {
  .grid.stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-val { font-size: 24px; }
  .card { padding: 14px; border-radius: 14px; }
  .field { min-width: 100%; }
  .row { flex-direction: column; align-items: stretch; }
  .row .btn { width: 100%; }

  /* Card-like tables on phones */
  .card > div[style*="overflow"] { overflow: visible !important; }
  table, thead, tbody, th, td, tr { display: block; }
  thead { display: none; }
  table tr {
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.02);
  }
  table td {
    border: 0;
    padding: 6px 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
  }
  table td::before {
    content: attr(data-label);
    color: var(--faint);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    flex-shrink: 0;
  }
  table td.actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding-top: 10px;
    margin-top: 4px;
    border-top: 1px solid var(--line);
  }
  table td.actions::before { display: none; }
  .timer-cell { min-width: 0; }
  .login-card { margin: 16px; width: auto; max-width: none; }
  .btn:hover { transform: none; }
}

@media (max-width: 400px) {
  .grid.stats { grid-template-columns: 1fr; }
}

/* Safe area for notched phones */
@supports (padding: max(0px)) {
  .mobile-bar {
    padding-top: max(12px, env(safe-area-inset-top));
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }
  .main {
    padding-bottom: max(88px, calc(48px + env(safe-area-inset-bottom)));
  }
}

.stat-card.good { box-shadow: inset 0 0 0 1px rgba(52,211,153,.15), var(--shadow); }
.stat-card.live { box-shadow: inset 0 0 0 1px rgba(103,232,249,.18), var(--shadow); }
.stat-card.bad { box-shadow: inset 0 0 0 1px rgba(251,113,133,.2), var(--shadow); }

.cover-thumb {
  width: 42px;
  height: 64px;
  object-fit: cover;
  object-position: center center;
  border-radius: 8px;
  border: 1px solid var(--line2);
  background: var(--bg3);
  display: block;
}

/* Ethereal appearance system */
html[data-glass="soft"] { --glass-blur: 16px; }
html[data-glass="balanced"] { --glass-blur: 28px; }
html[data-glass="crystal"] { --glass-blur: 42px; }
.card, .sidebar, .login-card, .mobile-bar, .appearance-panel {
  backdrop-filter: blur(var(--glass-blur)) saturate(145%) !important;
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(145%) !important;
}
html[data-density="compact"] .card { padding: 14px; border-radius: 18px; }
html[data-density="compact"] .nav button { min-height: 38px; padding: 9px 12px; }
html[data-density="compact"] td { padding: 8px 9px; }
html[data-density="compact"] .main { padding-top: 20px; }

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 16px;
}
.section-heading h3 { margin-bottom: 7px; }
.section-heading .help { margin: 0; max-width: 720px; }
.embedded-cover-card { margin-bottom: 14px; overflow: hidden; }
.cover-manager-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.managed-cover {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(5, 8, 17, .46);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.13), 0 14px 34px rgba(0,0,0,.18);
  transition: transform .28s cubic-bezier(.2,.8,.2,1), border-color .2s ease, box-shadow .2s ease;
}
.managed-cover:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 48%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 20px 44px rgba(0,0,0,.28);
}
.managed-cover-visual {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: radial-gradient(circle at 25% 15%, rgba(130,180,255,.42), transparent 40%), linear-gradient(145deg,#19233d,#090d18);
}
.managed-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.managed-cover:hover img { transform: scale(1.035); }
.managed-cover img.is-missing { opacity: 0; }
.managed-cover-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; letter-spacing: .15em; color: rgba(255,255,255,.72);
}
.managed-cover-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 11px 12px; }
.managed-cover-meta b { font-size: 12px; letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; }
.managed-cover-meta .btn { flex: 0 0 auto; padding: 7px 10px; }

.appearance-trigger {
  position: fixed; right: 18px; bottom: 18px; z-index: 120;
  min-height: 42px; padding: 0 15px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18); color: #fff; cursor: pointer;
  background: linear-gradient(145deg, rgba(255,255,255,.18), rgba(20,27,45,.72));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 14px 34px rgba(0,0,0,.35);
  font-size: 12px; font-weight: 700; letter-spacing: .03em;
}
.appearance-trigger:hover { transform: translateY(-2px); border-color: var(--accent); }
.appearance-panel {
  position: fixed; right: 18px; bottom: 72px; z-index: 121; width: min(330px, calc(100vw - 28px));
  padding: 16px; border: 1px solid var(--line2); border-radius: 24px;
  background: linear-gradient(155deg, rgba(37,45,67,.88), rgba(8,11,20,.82));
  box-shadow: var(--shadow); transform-origin: bottom right; animation: appearanceIn .28s cubic-bezier(.2,.85,.2,1);
}
.appearance-panel[hidden] { display: none; }
.appearance-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.appearance-head b { display: block; font-size: 15px; }
.appearance-head span { display: block; color: var(--faint); font-size: 11px; margin-top: 3px; }
.appearance-head button { border: 0; background: transparent; color: var(--muted); font-size: 24px; cursor: pointer; line-height: 1; }
.appearance-panel label { display: grid; grid-template-columns: 1fr 145px; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin-top: 9px; }
.appearance-panel select, .appearance-panel input { width: 100%; min-height: 38px; border-radius: 12px; border: 1px solid var(--line); background: rgba(5,8,16,.56); padding: 6px 9px; }
.appearance-panel input[type="color"] { padding: 4px; }
.appearance-reset { width: 100%; margin-top: 14px; }
@keyframes appearanceIn { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }

html[data-motion="reduced"] *, html[data-motion="reduced"] *::before, html[data-motion="reduced"] *::after {
  animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  html[data-motion="system"] *, html[data-motion="system"] *::before, html[data-motion="system"] *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important;
  }
}
@media (max-width: 900px) { .cover-manager-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .cover-manager-grid { grid-template-columns: 1fr; }
  .section-heading { flex-direction: column; }
  .appearance-trigger { right: 12px; bottom: 12px; }
  .appearance-panel { right: 12px; bottom: 64px; }
}


/* Hide merged Active users tab (still reachable if needed) */
.nav button.nav-hidden { display: none !important; }

.tag.online {
  color: var(--good);
  background: var(--good-dim);
  border-color: rgba(52, 211, 153, 0.35);
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
}
.tag.offline {
  color: var(--faint);
  background: rgba(255,255,255,0.03);
  border-color: var(--line);
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
}
