/* ELX-ShellHub — dark cyberpunk theme with glow + subtle motion */

:root {
  --bg: #060912;
  --bg-2: #0a0f1a;
  --surface: rgba(17, 23, 38, 0.72);
  --surface-solid: #11172a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(0, 240, 255, 0.35);
  --text: #e6ecf5;
  --muted: #7a849a;
  --cyan: #00f0ff;
  --cyan-soft: rgba(0, 240, 255, 0.14);
  --pink: #ff4d8d;
  --pink-soft: rgba(255, 77, 141, 0.14);
  --mint: #00ff9f;
  --mint-soft: rgba(0, 255, 159, 0.14);
  --amber: #ffb347;
  --amber-soft: rgba(255, 179, 71, 0.14);
  --danger: #ff5366;
  --shadow-glow: 0 0 20px rgba(0, 240, 255, 0.25), 0 0 40px rgba(0, 240, 255, 0.06);
  --shadow-glow-pink: 0 0 18px rgba(255, 77, 141, 0.3);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, "Segoe UI", "Inter", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(ellipse 70% 50% at 18% 0%,  rgba(0, 240, 255, 0.10), transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 12%, rgba(255, 77, 141, 0.08), transparent 60%),
    radial-gradient(ellipse 100% 60% at 50% 110%, rgba(0, 255, 159, 0.06), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  animation: bg-shift 28s ease-in-out infinite alternate;
}

@keyframes bg-shift {
  0%   { background-position: 0% 0%, 100% 0%, 50% 100%; }
  100% { background-position: 5% 5%, 90% 8%, 55% 95%; }
}

a { color: var(--cyan); text-decoration: none; transition: color 0.15s, text-shadow 0.2s; }
a:hover { color: #5ff7ff; text-shadow: 0 0 10px rgba(0, 240, 255, 0.6); }

h1, h2, h3 { margin: 0 0 0.6rem; font-weight: 600; letter-spacing: 0.2px; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.15rem; color: #cfd6e2; }

.muted { color: var(--muted); }
.mono { font-family: ui-monospace, "JetBrains Mono", "Cascadia Code", Consolas, monospace; }

@keyframes brand-flicker {
  0%, 100% { opacity: 1; text-shadow: 0 0 12px rgba(0, 240, 255, 0.55); }
  47%      { opacity: 0.92; text-shadow: 0 0 6px rgba(0, 240, 255, 0.35); }
  51%      { opacity: 1;    text-shadow: 0 0 18px rgba(0, 240, 255, 0.7); }
}

form.inline { margin: 0; display: inline; }

/* ───── sidebar layout ───── */
.app-shell { display: flex; min-height: 100vh; align-items: stretch; }
.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: rgba(8, 12, 22, 0.7);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(10px);
  padding: 1.2rem 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand {
  font-weight: 700;
  letter-spacing: 1.6px;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(0,240,255,0.55);
  padding: 0.4rem 0.7rem 1.4rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  text-decoration: none;
  display: block;
  animation: brand-flicker 6s ease-in-out infinite;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.8rem;
  border-radius: 7px;
  color: #99a2b6;
  text-decoration: none;
  border: 1px solid transparent;
  font-size: 0.92rem;
  transition: all 0.18s ease;
}
.sidebar-nav a:hover {
  color: var(--text);
  background: rgba(0,240,255,0.05);
  border-color: var(--border);
}
.sidebar-nav a.active {
  color: var(--cyan);
  background: var(--cyan-soft);
  border-color: var(--border-strong);
  box-shadow: inset 0 0 14px rgba(0,240,255,0.10);
  text-shadow: 0 0 8px rgba(0,240,255,0.35);
}
.sidebar-nav .ic { width: 18px; opacity: 0.85; font-size: 1rem; text-align: center; }
.sidebar-bottom {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}
.sidebar-user { color: var(--muted); font-size: 11px; text-align: center; }

.main {
  flex: 1;
  min-width: 0;
  padding: 1.4rem 1.8rem 3rem;
  animation: fade-in 0.4s ease;
}
.page-header {
  display: flex;
  align-items: center;
  /* layout: title on the left, the rest stays right; the live indicator
     uses margin-left:auto so it always sits next to the profile chip on
     the right edge regardless of title length. Was space-between, which
     made the indicator drift toward the centre on long titles. */
  justify-content: flex-start;
  margin: 0 0 1.2rem;
  gap: 0.6rem;
}
.page-title  { margin: 0; font-size: 1.6rem; letter-spacing: 0.3px; }

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  background: rgba(255,255,255,0.02);
  color: var(--muted);
  transition: all 0.25s ease;
  /* Anchor on the right next to .profile-chip. */
  margin-left: auto;
}
.live-indicator[data-state="live"] {
  color: var(--mint);
  background: var(--mint-soft);
  border-color: rgba(0,255,159,0.3);
  box-shadow: 0 0 12px rgba(0,255,159,0.18);
}
.live-indicator[data-state="connecting"],
.live-indicator[data-state="stale"] {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: rgba(255,179,71,0.35);
}

/* Narrow auth pages (setup/login) — keep centered */
.container.narrow {
  max-width: 480px;
  margin: 8vh auto 4rem;
  padding: 0 1.4rem;
  animation: fade-in 0.45s ease;
}

/* ───── home stats ───── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem 1.6rem;
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
}
.stat-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-glow); }
.stat-num { font-size: 2.6rem; font-weight: 700; color: var(--text); line-height: 1; }
.stat-label { color: var(--muted); font-size: 0.78rem; letter-spacing: 1.4px; text-transform: uppercase; margin-top: 0.5rem; }
.stat-card.stat-online  .stat-num { color: var(--mint);  text-shadow: 0 0 16px rgba(0,255,159,0.5); }
.stat-card.stat-pending .stat-num { color: var(--amber); text-shadow: 0 0 16px rgba(255,179,71,0.5); }

.quicklist { padding-left: 1.2rem; line-height: 1.9; }
.quicklist code { background: rgba(0,0,0,0.3); padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.82rem; }

/* Settings: language picker */
.lang-list { display: flex; flex-direction: column; gap: 0.55rem; margin-bottom: 1.2rem; }
.lang-option {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 1rem;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.18);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.lang-option:hover { border-color: var(--border-strong); background: rgba(0,240,255,0.05); }
.lang-option.selected {
  border-color: var(--cyan);
  background: var(--cyan-soft);
  box-shadow: 0 0 14px rgba(0,240,255,0.18);
}
.lang-option input[type="radio"] {
  accent-color: var(--cyan);
  transform: scale(1.1);
  margin: 0;
}
.lang-flag {
  display: inline-flex;
  flex-shrink: 0;
  width: 28px;
  height: 21px;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  background: #0A1020;
}
.lang-flag svg, .lang-flag img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.proxy-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0.6rem;
}
.proxy-grid > div { display: flex; flex-direction: column; }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.92rem;
  padding: 0.2rem 0;
  text-align: center;
  line-height: 22px;
}
.toggle-row .toggle-label {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 22px;
  margin-right: 1.5rem; /* belt-and-suspenders: explicit margin in addition to flex gap */
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.18);
  border-radius: 22px;
  transition: background 0.18s ease;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.18s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.toggle-switch input:checked + .toggle-slider { background: var(--cyan); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle-switch input:focus-visible + .toggle-slider {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

/* ─── row context menu (right-click on a device row) ─── */
.ctx-menu {
  position: fixed;
  display: none;
  flex-direction: column;
  min-width: 220px;
  background: rgba(14, 20, 34, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 0.35rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.55);
  z-index: 95;
}
.ctx-menu.open { display: flex; }
.ctx-item {
  background: transparent;
  border: none;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  text-align: left;
  transition: background 0.12s;
}
.ctx-item:hover { background: rgba(0,240,255,0.08); }
.ctx-ic {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  font-size: 14px;
}
.ctx-color-swatch {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.25);
  background: transparent;
  display: inline-block;
}
.ctx-label { flex: 1; }
.ctx-check {
  color: var(--cyan);
  font-weight: 700;
  width: 16px;
  text-align: right;
}

/* small bell next to device name when Telegram notify is enabled */
.notify-mark {
  display: inline-flex;
  align-items: center;
  margin-left: 0.4rem;
  font-size: 0.85rem;
  filter: drop-shadow(0 0 6px rgba(0,240,255,0.4));
  cursor: help;
}

/* ─── reveal-modal (Address / SSH cmd) ─── */
.reveal-modal {
  position: fixed; inset: 0; display: none;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
  z-index: 90;
}
.reveal-modal.open { display: flex; }
.reveal-modal-card {
  background: var(--panel, #0E1422);
  border: 1px solid var(--border, rgba(255,255,255,0.16));
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  min-width: 320px;
  max-width: 90vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.reveal-modal-card h3 {
  margin: 0 0 0.7rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
}
.reveal-modal-card .reveal-value {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 6px;
  padding: 0.7rem 0.9rem;
  margin: 0 0 1rem;
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 13.5px;
  color: var(--text);
  user-select: all;
}
.reveal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }

.reveal-btn {
  background: rgba(0,240,255,0.06);
  border: 1px solid rgba(0,240,255,0.18);
  color: var(--cyan);
  padding: 0.18rem 0.5rem;
  border-radius: 5px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.reveal-btn:hover { background: rgba(0,240,255,0.14); }
.reveal-btn:active { transform: scale(0.95); }

/* ─── auth pages (login/register/forgot/reset) ─── */
.auth-links {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  font-size: 0.88rem;
}
.auth-links a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}
.auth-links a:hover { border-bottom-color: var(--cyan); }

/* ─── badge (verified/unverified) ─── */
.badge {
  display: inline-block;
  padding: 0.08em 0.5em;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 0.4rem;
  border: 1px solid transparent;
}
.badge.ok { background: rgba(52,211,153,0.12); color: #34D399; border-color: rgba(52,211,153,0.3); }
.badge.warn { background: rgba(251,191,36,0.12); color: #FBBF24; border-color: rgba(251,191,36,0.3); }

/* ─── support page ─── */
.support-page {
  max-width: 1080px;
}

.support-hero {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.4rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0,240,255,0.08), rgba(124,196,255,0.03));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  position: relative;
  overflow: hidden;
}
.support-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 30%, rgba(0,240,255,0.08), transparent 60%);
  pointer-events: none;
}
.support-hero h2 { margin: 0 0 0.3rem; font-size: 1.45rem; }
.support-hero p { margin: 0; color: var(--muted); }
.support-hero-icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(0,240,255,0.10);
  border: 1px solid rgba(0,240,255,0.25);
  color: var(--cyan);
  font-size: 28px;
  box-shadow: 0 0 24px rgba(0,240,255,0.15);
}
.idea-hero .support-hero-icon { color: #FBBF24; background: rgba(251,191,36,0.10); border-color: rgba(251,191,36,0.30); box-shadow: 0 0 24px rgba(251,191,36,0.15); }

.support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 1.2rem;
}
@media (max-width: 880px) {
  .support-grid { grid-template-columns: 1fr; }
}

.support-card {
  background: var(--panel, #0E1422);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 12px;
  padding: 1.4rem 1.6rem;
}
.support-card-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
}
.support-card-head h3 { margin: 0; font-size: 1.05rem; }
.support-card-head .support-card-ic,
.support-card > .support-card-ic {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: rgba(0,240,255,0.10);
  border-radius: 8px;
  color: var(--cyan);
  font-size: 18px;
  flex-shrink: 0;
  border: 1px solid rgba(0,240,255,0.20);
}

.support-form { gap: 1rem; }
.support-form textarea { min-height: 140px; }

/* ─── /profile two-column layout ─── */
.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
  gap: 1.2rem;
  align-items: start;
  max-width: 1180px;
}
@media (max-width: 980px) {
  .profile-grid { grid-template-columns: 1fr; }
}
.profile-col-left, .profile-col-right { min-width: 0; display: flex; flex-direction: column; gap: 1rem; }
.profile-col-right { position: sticky; top: 1rem; }

/* ─── /profile hero ─── */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.5rem 1.6rem;
  border-radius: 14px;
  background:
    radial-gradient(circle at 0% 0%, rgba(0,240,255,0.12), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(124,196,255,0.07), transparent 60%),
    rgba(14, 20, 34, 0.85);
  border: 1px solid rgba(0,240,255,0.18);
  position: relative;
  overflow: hidden;
}
.profile-avatar {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), #7CC4FF);
  display: grid;
  place-items: center;
  color: #051018;
  font: 700 26px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-transform: uppercase;
  box-shadow: 0 0 30px rgba(0,240,255,0.25), inset 0 0 0 2px rgba(255,255,255,0.15);
}
.profile-avatar::before { content: attr(data-initial); }
.profile-hero-info { min-width: 0; flex: 1; }
.profile-hero-name {
  font-size: 1.45rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}
.profile-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}
.profile-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.profile-meta-item .ic { color: var(--cyan); opacity: 0.85; }

.role-pill {
  display: inline-flex;
  padding: 0.18em 0.7em;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  border: 1px solid var(--border);
}
.role-pill.admin {
  background: rgba(0,240,255,0.10);
  color: var(--cyan);
  border-color: rgba(0,240,255,0.30);
  box-shadow: 0 0 14px rgba(0,240,255,0.10);
}

/* ─── Profile cards: icon-headed, consistent gap ─── */
.profile-card { padding: 1.2rem 1.4rem; }
.profile-card-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 0.9rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
}
.profile-card-head h3 { margin: 0; font-size: 1rem; }
.profile-card-head .profile-card-ic {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: rgba(0,240,255,0.10);
  color: var(--cyan);
  border: 1px solid rgba(0,240,255,0.20);
  font-size: 16px;
  flex-shrink: 0;
}
.profile-card-head .profile-card-ic.danger {
  background: rgba(248,113,113,0.10);
  color: #F87171;
  border-color: rgba(248,113,113,0.30);
}

/* ─── Login log: cleaner timeline-style markers ─── */
.login-log-item {
  display: grid;
  grid-template-columns: 12px minmax(110px, auto) 1fr;
  gap: 0.9rem;
  align-items: center;
  padding: 0.55rem 0.5rem;
  border-radius: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  position: relative;
  transition: background 0.15s, border-color 0.15s;
  cursor: default;
  min-width: 0;
}
.login-log-item:last-child { border-bottom: none; }
.login-log-item:hover {
  background: rgba(0, 240, 255, 0.06);
  border-color: rgba(0, 240, 255, 0.18);
}
.login-log-item:hover .login-log-marker {
  box-shadow: 0 0 0 4px rgba(0,240,255,0.30);
}
.login-log-marker {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,240,255,0.15);
  flex-shrink: 0;
  justify-self: center;
  transition: box-shadow 0.18s;
}

.login-log-card { padding: 1.2rem 1.4rem; }
.login-log-head {
  margin-bottom: 0.9rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
}
.login-log-head h3 { margin: 0 0 0.2rem; font-size: 1rem; }
.login-log-head .muted { font-size: 0.78rem; }

.login-log {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: hidden;
}
.login-log-when {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 0;
}
.login-log-date { color: var(--text); font-size: 0.85rem; white-space: nowrap; }
.login-log-time { color: var(--muted); font-size: 0.78rem; white-space: nowrap; }
.login-log-where { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.login-log-loc { font-size: 0.92rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.login-log-ip { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.login-log-empty { padding: 1.5rem 0; text-align: center; }

/* ─── 6-digit verify code input ─── */
.code-input {
  text-align: center;
  font: 700 28px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.55em;
  padding-left: 0.55em !important; /* recenter, since letter-spacing pushes right */
  -webkit-text-security: none;
}

/* ─── verified / not-verified pill on /profile ─── */
.email-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22em 0.7em;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
}
.status-pill.ok {
  background: rgba(52,211,153,0.15);
  color: #34D399;
  border-color: rgba(52,211,153,0.4);
}
.status-pill.bad {
  background: rgba(248,113,113,0.15);
  color: #F87171;
  border-color: rgba(248,113,113,0.4);
}

/* ─── disabled card (when email not verified) ─── */
.card-disabled {
  opacity: 0.55;
  position: relative;
}
.card-disabled .toggle-row,
.card-disabled .btn { pointer-events: none; }

/* ─── /settings column-toggles grid ─── */
.col-toggles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem 1rem;
  margin-top: 0.6rem;
}
.col-toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  cursor: pointer;
  user-select: none;
  padding: 0.3rem 0.4rem;
  border-radius: 6px;
  transition: background 0.12s;
}
.col-toggle:hover { background: rgba(255,255,255,0.03); }
.col-toggle input[type="checkbox"] {
  accent-color: var(--cyan);
  width: 16px;
  height: 16px;
  cursor: pointer;
  margin: 0;
}

/* ─── /admin page ─── */
.admin-page {
  max-width: 1180px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.admin-hero {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.4rem 1.6rem;
  border-radius: 14px;
  background:
    radial-gradient(circle at 0% 0%, rgba(0,240,255,0.12), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(124,196,255,0.07), transparent 60%),
    rgba(14, 20, 34, 0.85);
  border: 1px solid rgba(0,240,255,0.18);
  position: relative;
  overflow: hidden;
}
.admin-hero h2 { margin: 0 0 0.3rem; font-size: 1.45rem; }
.admin-hero p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.admin-hero-icon {
  flex-shrink: 0;
  width: 56px; height: 56px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: rgba(0,240,255,0.10);
  border: 1px solid rgba(0,240,255,0.30);
  color: var(--cyan);
  font-size: 26px;
  box-shadow: 0 0 24px rgba(0,240,255,0.15);
}
.admin-stats {
  display: flex;
  gap: 1.2rem;
  margin-left: auto;
  flex-shrink: 0;
}
.admin-stat {
  text-align: center;
  padding: 0.4rem 1rem;
  border-left: 1px solid rgba(255,255,255,0.06);
}
.admin-stat-num {
  display: block;
  font: 700 1.6rem/1 ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(0,240,255,0.30);
}
.admin-stat-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* users table inside /admin card */
.users-table-wrap { overflow-x: auto; margin-top: 0.4rem; }
.users-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.users-table th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.users-table td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.users-table tr:last-child td { border-bottom: none; }
.users-table tr:hover { background: rgba(0, 240, 255, 0.04); }
.users-table .user-row-blocked {
  opacity: 0.55;
  text-decoration: line-through;
  text-decoration-color: rgba(248,113,113,0.35);
  text-decoration-thickness: 1px;
}
.user-cell { display: flex; align-items: center; gap: 0.6rem; }
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), #7CC4FF);
  color: #051018;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(0,240,255,0.18);
}
.user-avatar::before { content: attr(data-initial); }
.user-name { font-weight: 500; }
.user-email-cell { display: inline-flex; align-items: center; gap: 0.4rem; }
.user-email-addr { color: var(--text); }
.user-last-login { display: flex; flex-direction: column; gap: 0.15rem; }
.user-last-time { color: var(--cyan); font-size: 0.85rem; }
.user-last-where { color: var(--muted); font-size: 0.8rem; }

.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.78rem; }

/* /devices: install-command card */
.install-card { padding: 1.2rem 1.4rem; margin-bottom: 1rem; }

/* Collapsible card pattern: header is a click target, chevron rotates,
   body is hidden when .collapsed. State persists via localStorage. */
.collapsible .collapsible-toggle {
  cursor: pointer;
  user-select: none;
  position: relative;
}
.collapsible .collapsible-toggle:hover h3 { color: var(--cyan); }
.collapsible-chevron {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.95rem;
  transition: transform 0.2s ease;
  display: inline-block;
}
.collapsible.collapsed .collapsible-chevron { transform: rotate(-90deg); }
.collapsible.collapsed .collapsible-body { display: none; }
.collapsible.collapsed .profile-card-head {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.collapsible.collapsed { padding-bottom: 1.0rem; }
.install-cmd-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(0,0,0,0.45);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  margin-top: 0.7rem;
}
.install-cmd {
  flex: 1;
  color: #BCE8FF;
  font-size: 0.82rem;
  background: transparent;
  border: none;
  padding: 0;
  white-space: pre-wrap;
  word-break: break-all;
  user-select: all;
}
.install-copy { flex-shrink: 0; }

/* Linux / Windows tab switcher inside the install card. */
.install-tabs { margin-top: 0.7rem; }
.install-tab-labels {
  display: flex;
  gap: 0.4rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.6rem;
}
.install-tab-label {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}
.install-tab-label:hover { color: var(--text); }
.install-tab-label.active {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

/* Delete-device confirmation: extends .reveal-modal styling. */
.del-confirm-card { min-width: 380px; max-width: 460px; }
.del-confirm-title {
  margin: 0 0 0.6rem !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  color: var(--text) !important;
  font-size: 1.05rem !important;
}
.del-confirm-text {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 1rem;
  line-height: 1.5;
}
.del-confirm-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  background: rgba(248,113,113,0.06);
  border: 1px solid rgba(248,113,113,0.20);
  border-radius: 8px;
  margin-bottom: 1rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.88rem;
  line-height: 1.45;
}
.del-confirm-check input[type="checkbox"] {
  accent-color: #F87171;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}
.del-confirm-ok:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.del-confirm-wipe {
  background: rgba(0, 240, 255, 0.05);
  border-color: rgba(0, 240, 255, 0.18);
}
.del-confirm-wipe input[type="checkbox"] { accent-color: var(--cyan); }

.install-uninstall-hint {
  font-size: 12px;
  margin: 1.2rem 0 0.4rem;
  color: var(--muted);
  border-top: 1px dashed rgba(255,255,255,0.06);
  padding-top: 0.9rem;
}

/* Plain <select> styled to match the dark theme. */
.form select {
  width: 100%;
  padding: 0.65rem 0.8rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s ease;
}
.form select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.15);
}
.form select option {
  background: var(--panel, #0E1422);
  color: var(--text);
}

/* ─── danger zone (delete account) ─── */
.card-danger {
  border-color: rgba(248,113,113,0.30) !important;
  background: linear-gradient(180deg, rgba(248,113,113,0.04), transparent 60%);
}

.support-row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}
@media (max-width: 540px) {
  .support-row.two { grid-template-columns: 1fr; }
}

/* drag-and-drop file zone */
.dropzone {
  position: relative;
  border: 1.5px dashed rgba(0,240,255,0.25);
  border-radius: 10px;
  background: rgba(0,240,255,0.02);
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover { border-color: rgba(0,240,255,0.45); background: rgba(0,240,255,0.04); }
.dropzone.has-file { border-style: solid; border-color: rgba(52,211,153,0.45); background: rgba(52,211,153,0.04); }
.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.dropzone-inner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  pointer-events: none;
}
.dropzone-ic {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: rgba(0,240,255,0.08);
  color: var(--cyan);
  font-size: 20px;
  border: 1px solid rgba(0,240,255,0.20);
  flex-shrink: 0;
}
.dropzone.has-file .dropzone-ic {
  background: rgba(52,211,153,0.08);
  color: #34D399;
  border-color: rgba(52,211,153,0.25);
}
.dropzone-text { display: flex; flex-direction: column; gap: 0.15rem; }
.dropzone-title { font-size: 0.95rem; color: var(--text); }
.dropzone-text .muted { font-size: 0.78rem; }

.support-submit {
  align-self: flex-start;
  padding-left: 1.4rem;
  padding-right: 1.4rem;
}

/* idea-CTA card on the right */
.support-idea-cta {
  background: linear-gradient(160deg, rgba(251,191,36,0.05), rgba(0,240,255,0.03));
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.support-idea-cta h3 { margin: 0; font-size: 1.1rem; }
.support-idea-cta > p { color: var(--muted); margin: 0 0 0.4rem; }
.support-idea-cta .support-card-ic {
  color: #FBBF24;
  background: rgba(251,191,36,0.10);
  border-color: rgba(251,191,36,0.25);
  margin-bottom: 0.3rem;
}
.support-idea-btn { align-self: flex-start; }

.support-divider {
  border: none;
  border-top: 1px solid var(--border, rgba(255,255,255,0.08));
  margin: 1.1rem 0 0.5rem;
}
.support-idea-cta h4 {
  margin: 0.2rem 0 0.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
}
.support-tips {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}
.support-tips li { margin: 0.2rem 0; }
.lang-name { font-weight: 500; letter-spacing: 0.2px; flex: 1; }
.lang-code {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-family: ui-monospace, monospace;
}

/* ── per-row color tint (color-mix lets one CSS rule handle any hex) ── */
table.devices tr[style*="--row-color"] td {
  background: color-mix(in srgb, var(--row-color) 14%, transparent);
}
table.devices tr[style*="--row-color"]:hover td {
  background: color-mix(in srgb, var(--row-color) 22%, transparent);
}
table.devices tr[style*="--row-color"] td:first-child {
  box-shadow: inset 4px 0 0 var(--row-color);
}

/* ── color picker button + popover ── */
.color-cell { width: 36px; }
.color-btn {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--btn-color, transparent);
  cursor: pointer;
  padding: 0;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.color-btn:hover { transform: scale(1.1); box-shadow: 0 0 8px var(--btn-color, rgba(0,240,255,0.4)); }
.color-btn::before {
  /* diagonal slash for empty/transparent state */
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(45deg, transparent 47%, var(--muted) 47% 53%, transparent 53%);
  opacity: 0;
}
.color-btn[data-color=""]::before, .color-btn[data-color="0"]::before { opacity: 0.5; }

.color-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(3px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fade-in 0.15s ease;
}
.color-modal.open { display: flex; }
.color-modal-card {
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 1.4rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  min-width: 280px;
  max-width: 360px;
}
.color-modal-card h3 { margin: 0 0 1rem; font-size: 0.95rem; letter-spacing: 0.5px; }
.color-palette {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}
.color-palette button {
  width: 100%; aspect-ratio: 1 / 1;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.color-palette button:hover { transform: scale(1.08); }
.color-palette button.selected { border-color: #fff; box-shadow: 0 0 14px currentColor; }
.color-palette .swatch-clear {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
  font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
}
.color-modal-actions { display: flex; justify-content: flex-end; }

/* ── notify toggle (iOS-style) ── */
.notify-cell { width: 56px; }
.notify-switch {
  position: relative;
  display: inline-block;
  width: 38px; height: 22px;
  cursor: pointer;
}
.notify-switch input {
  opacity: 0;
  width: 0; height: 0;
}
.notify-switch .slider {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: 0.18s ease;
}
.notify-switch .slider::before {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  left: 3px; top: 3px;
  background: var(--muted);
  border-radius: 50%;
  transition: 0.18s ease;
}
.notify-switch input:checked + .slider {
  background: var(--cyan-soft);
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(0,240,255,0.35);
}
.notify-switch input:checked + .slider::before {
  transform: translateX(16px);
  background: var(--cyan);
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.2rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.35);
  transition: border-color 0.25s, box-shadow 0.25s;
  overflow-x: auto;
}
/* No hover glow on cards — distracting when scanning rows. */

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  border: 1px solid var(--border);
}
.section-tag.online  { color: var(--mint);  background: var(--mint-soft);  border-color: rgba(0,255,159,0.3); }
.section-tag.pending { color: var(--amber); background: var(--amber-soft); border-color: rgba(255,179,71,0.35); }
.section-tag.offline { color: var(--muted); background: rgba(255,255,255,0.04); }

/* ───── tables ───── */
table.devices {
  width: auto;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}
table.devices th,
table.devices td {
  white-space: nowrap;        /* never wrap — column grows instead */
  vertical-align: middle;
}
table.devices th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 0.4rem 0.8rem;
  border-bottom: 1px solid var(--border);
}
table.devices td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* Extra horizontal breathing room between the wide System cell and Version. */
table.devices th[data-col="system"],
table.devices td[data-col="system"] { padding-right: 1.6rem; }
table.devices th[data-col="version"],
table.devices td[data-col="version"] { padding-left: 1.2rem; }
table.devices tbody tr {
  transition: background 0.18s;
}
table.devices tbody tr:hover { background: rgba(0, 240, 255, 0.045); }

td.actions { text-align: right; white-space: nowrap; }
td.actions form { display: inline; }
td.actions .btn { margin-left: 0.4rem; }

/* online dot */
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.dot.green {
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(0, 255, 159, 0.6);
  animation: pulse-green 1.6s ease-in-out infinite;
}
.dot.amber {
  background: var(--amber);
  box-shadow: 0 0 8px rgba(255, 179, 71, 0.8);
}
.dot.gray { background: #45506a; }

@keyframes pulse-green {
  0%   { box-shadow: 0 0 0 0 rgba(0, 255, 159, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(0, 255, 159, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 255, 159, 0); }
}

.empty { color: var(--muted); font-style: italic; padding: 1rem 0; }

/* ───── buttons ───── */
.btn {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.btn:hover { border-color: var(--border-strong); background: rgba(0,240,255,0.06); }

.btn-primary {
  background: linear-gradient(180deg, rgba(0,240,255,0.18), rgba(0,240,255,0.08));
  border-color: rgba(0,240,255,0.45);
  color: #d6fbff;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.18);
}
.btn-primary:hover {
  background: linear-gradient(180deg, rgba(0,240,255,0.32), rgba(0,240,255,0.16));
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.45);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); box-shadow: 0 0 14px rgba(0, 240, 255, 0.3); }

.btn-success {
  background: linear-gradient(180deg, rgba(0,255,159,0.18), rgba(0,255,159,0.08));
  border-color: rgba(0,255,159,0.45);
  color: #c8ffe6;
  box-shadow: 0 0 12px rgba(0, 255, 159, 0.18);
}
.btn-success:hover {
  background: linear-gradient(180deg, rgba(0,255,159,0.3), rgba(0,255,159,0.14));
  box-shadow: 0 0 24px rgba(0, 255, 159, 0.45);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(180deg, rgba(255,77,141,0.18), rgba(255,77,141,0.08));
  border-color: rgba(255,77,141,0.45);
  color: #ffd7e5;
}
.btn-danger:hover {
  background: linear-gradient(180deg, rgba(255,77,141,0.3), rgba(255,77,141,0.14));
  box-shadow: var(--shadow-glow-pink);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); }

/* ───── forms ───── */
.form { display: flex; flex-direction: column; gap: 0.9rem; }
.form label { display: block; font-size: 0.78rem; letter-spacing: 0.6px; color: var(--muted); margin-bottom: 0.3rem; text-transform: uppercase; }
.form input[type=text],
.form input[type=password],
.form input[type=email],
.form input[type=tel],
.form input[type=url],
.form input[type=search],
.form input[type=number],
.form textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.18s ease;
}
.form textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}
.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.15), 0 0 20px rgba(0, 240, 255, 0.18);
}
.form input::placeholder,
.form textarea::placeholder {
  color: rgba(138, 151, 174, 0.55);
}

/* Kill Chrome / Edge autofill yellow/blue overlay everywhere. Without this
   the OS suggests a saved password and the field flashes bright on focus,
   wrecking the dark theme. The 99999s transition is the standard hack to
   defer Chrome's own background-color override forever. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgba(10, 15, 30, 0.95) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text);
  transition: background-color 99999s ease-in-out 0s;
}

.auth-card {
  max-width: 400px;
  width: 100%;
  margin: 0;
  padding: 2.4rem 2.2rem 2rem;
  background: rgba(14, 20, 34, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 240, 255, 0.05) inset,
    0 0 60px rgba(0, 240, 255, 0.08);
  animation: fade-in 0.45s ease;
}
.auth-card h1 {
  text-align: center;
  letter-spacing: 1.2px;
  margin: 0 0 1.6rem;
  font-size: 1.7rem;
  color: var(--cyan);
  text-shadow: 0 0 18px rgba(0, 240, 255, 0.45);
}

/* Full-bleed flex centering for auth pages (login/register/forgot/reset/setup).
   Keeps the form glued to the middle of the viewport regardless of height. */
body.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    /* warm pink glow, top-right */
    radial-gradient(ellipse 60% 50% at 100% 0%,    rgba(255, 77, 141, 0.18), transparent 60%),
    /* bright cyan glow, top-left */
    radial-gradient(ellipse 70% 55% at 0% 0%,      rgba(0, 240, 255, 0.20), transparent 60%),
    /* subtle violet glow bottom-left */
    radial-gradient(ellipse 60% 60% at 0% 100%,    rgba(124, 92, 255, 0.16), transparent 65%),
    /* deep teal glow bottom-right */
    radial-gradient(ellipse 70% 60% at 100% 100%,  rgba(0, 200, 200, 0.14), transparent 65%),
    linear-gradient(180deg, #050810 0%, #0A0F1E 50%, #050810 100%);
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
}
body.auth-page::before {
  /* gentle moving sheen — cuts the flat darkness near the form */
  content: '';
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 50% 50%, rgba(0,240,255,0.06) 0%, transparent 40%);
  filter: blur(40px);
  animation: auth-glow 14s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
@keyframes auth-glow {
  0%   { transform: translate(-3%, -2%) scale(1); }
  100% { transform: translate( 3%,  2%) scale(1.05); }
}
.auth-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
}

/* tiny RU|EN switch above the auth card */
.auth-lang {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.7rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}
.auth-lang-link {
  color: var(--muted);
  text-decoration: none;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  font-weight: 600;
}
.auth-lang-link:hover { color: var(--text); }
.auth-lang-link.active {
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.10);
  border-color: rgba(0, 240, 255, 0.25);
}
.auth-lang-sep { color: rgba(138, 151, 174, 0.4); font-size: 0.85rem; }


/* ───── flash ───── */
.flash {
  padding: 0.8rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  animation: fade-in 0.3s ease;
  transition: opacity 0.5s ease, max-height 0.5s ease, padding 0.5s ease, margin 0.5s ease;
  overflow: hidden;
}
.flash.flash-fadeout {
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin: 0;
  border-color: transparent;
}
.flash.error   { color: #ffd7e5; background: var(--pink-soft); border-color: rgba(255,77,141,0.35); }
.flash.success { color: #c8ffe6; background: var(--mint-soft); border-color: rgba(0,255,159,0.3); }
.flash.info    { color: #d6fbff; background: var(--cyan-soft); border-color: var(--border-strong); }

/* ───── toast (live SSE notifications) ───── */
#toasts { position: fixed; right: 1.2rem; bottom: 1.2rem; display: flex; flex-direction: column; gap: 0.6rem; z-index: 50; pointer-events: none; }
.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 360px;
  padding: 0.9rem 1.1rem;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: var(--shadow-glow);
  animation: slide-in-right 0.32s ease, glow-pulse 2.6s ease-in-out infinite;
}
.toast strong { color: var(--cyan); }
.toast .toast-meta { color: var(--muted); font-size: 0.78rem; margin-top: 0.3rem; }
.toast.toast-error   { border-color: rgba(255,93,108,0.5); }
.toast.toast-error   > div:first-child { color: #ff5d6c; }
.toast.toast-success { border-color: rgba(0,255,159,0.45); }
.toast.toast-success > div:first-child { color: var(--mint); }

@keyframes slide-in-right {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 18px rgba(0, 240, 255, 0.18), 0 0 0 1px rgba(0, 240, 255, 0.25); }
  50%      { box-shadow: 0 0 28px rgba(0, 240, 255, 0.45), 0 0 0 1px rgba(0, 240, 255, 0.55); }
}

/* tag attached for newly-arrived rows */
.row-flash {
  animation: row-pop 1.2s ease;
}
@keyframes row-pop {
  0%   { background: rgba(0, 240, 255, 0.18); }
  100% { background: transparent; }
}

/* Live SSE-driven row enter/leave animations */
tr.row-enter  { animation: row-fade-in  0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }
tr.row-leave  { animation: row-fade-out 0.35s ease both; pointer-events: none; }
@keyframes row-fade-in {
  0%   { opacity: 0; transform: translateY(-8px); background: rgba(0, 240, 255, 0.22); }
  60%  { background: rgba(0, 240, 255, 0.10); }
  100% { opacity: 1; transform: translateY(0); background: transparent; }
}
@keyframes row-fade-out {
  0%   { opacity: 1; transform: translateY(0);   background: rgba(255, 77, 141, 0.10); }
  100% { opacity: 0; transform: translateX(12px); background: transparent; }
}

/* ───── inline rename + tiny icon buttons ───── */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  padding: 0;
  margin-left: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  vertical-align: middle;
  font-family: inherit;
}
.btn-icon:hover { color: var(--cyan); border-color: var(--border-strong); box-shadow: 0 0 8px rgba(0,240,255,0.25); }
.btn-icon.copy-ok { color: var(--mint); border-color: rgba(0,255,159,0.5); }

.editable { display: inline-flex; align-items: center; gap: 0.2rem; }
.editable .display { white-space: nowrap; }

td.name-cell { white-space: nowrap; min-width: 140px; vertical-align: middle; }
.name-row { display: inline-flex; align-items: center; gap: 0.7rem; white-space: nowrap; }
.name-row .dot { margin: 0; }

input.inline-input {
  padding: 0.25rem 0.5rem;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  color: var(--text);
  font: inherit;
}
input.inline-input:focus { outline: none; box-shadow: 0 0 0 2px rgba(0,240,255,0.2); }
input.inline-input.rename-input { width: 160px; font-weight: 600; }
input.inline-input.notes-input  { width: 220px; }
input.inline-input.tags-input   { width: 180px; }

.notes-cell .display,
.tags-cell  .display { display: inline-block; white-space: nowrap; vertical-align: middle; }

/* OS column: distro on top, arch + cpu + ram below in muted small line */
.os-cell .os-name { font-size: 0.92rem; }
.os-cell .os-meta {
  display: flex; flex-wrap: wrap; gap: 0.4rem 0.7rem;
  margin-top: 0.2rem;
  font-size: 0.72rem; letter-spacing: 0.4px;
}
.os-cell .metric { white-space: nowrap; }
.os-cell .metric-cpu { color: var(--cyan); }
.os-cell .metric-ram { color: var(--mint); }

/* Filter input above each table */
input.table-filter {
  width: 100%;
  max-width: 360px;
  padding: 0.5rem 0.85rem;
  margin-bottom: 0.7rem;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  transition: all 0.18s ease;
}
input.table-filter::placeholder { color: var(--muted); }
input.table-filter:focus { outline: none; border-color: var(--border-strong); box-shadow: 0 0 0 2px rgba(0,240,255,0.12); }

/* Sortable column headers */
table.devices th[data-sortable] {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
}
table.devices th[data-sortable]:hover { color: var(--cyan); }
table.devices th[data-sortable]::after {
  content: ' ⇅';
  opacity: 0.35;
  font-size: 0.85em;
}
table.devices th[data-sorted="asc"]::after  { content: ' ↑'; opacity: 1; color: var(--cyan); }
table.devices th[data-sorted="desc"]::after { content: ' ↓'; opacity: 1; color: var(--cyan); }

.ssh-cmd { white-space: nowrap; }

.ssh-line { display: inline-flex; align-items: center; gap: 0.4rem; }
.ssh-cmd { font-size: 12px; color: var(--text); opacity: 0.85; }
.last-seen { white-space: nowrap; }
.last-seen.stale { color: var(--amber); }
.uptime { white-space: nowrap; color: var(--muted); }

/* ─── /help page layout ─── */
.help-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  /* Always span the available width of .main — the previous max-width:1100px
     left a big empty gutter on wide monitors. min-width:0 on the right
     column lets long <pre> blocks wrap instead of stretching the grid. */
  width: 100%;
  max-width: none;
  gap: 1.4rem;
  align-items: start;
}
.help-toc {
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  font-size: 0.88rem;
  padding: 0.6rem 0.4rem;
  background: var(--panel-2, rgba(255,255,255,0.02));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 10px;
}
.help-toc a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.32rem 0.6rem;
  border-radius: 5px;
  border-left: 2px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.help-toc a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.help-toc-group {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan);
  margin: 0.7rem 0.6rem 0.2rem;
  font-weight: 600;
}
.help-content {
  background: var(--panel, rgba(255,255,255,0.02));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 12px;
  padding: 1.6rem 1.8rem;
  min-width: 0;
}
.help-content section { padding-top: 0.5rem; scroll-margin-top: 1rem; }
.help-content h2 {
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
  padding-bottom: 0.45rem;
  margin: 1.8rem 0 0.9rem;
  font-size: 1.4rem;
}
.help-content section:first-of-type h2 { margin-top: 0.4rem; }
.help-content h3 { color: var(--cyan); font-size: 1.05rem; margin: 1.3rem 0 0.5rem; font-weight: 600; }
.help-content p { line-height: 1.65; margin: 0.5rem 0 0.8rem; }
.help-content ul, .help-content ol { padding-left: 1.4rem; line-height: 1.65; }
.help-content code {
  background: rgba(0,0,0,0.4);
  padding: 0.12em 0.42em;
  border-radius: 4px;
  font-size: 0.88em;
  color: #BCE8FF;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
}
.help-content pre {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 8px;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  margin: 0.6rem 0 1rem;
  position: relative;
}
.help-content pre code { background: transparent; border: none; padding: 0; white-space: pre; color: var(--text); }

.help-hero {
  background: linear-gradient(135deg, rgba(0,240,255,0.06), rgba(124,196,255,0.03));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 10px;
  padding: 1.3rem 1.5rem;
  margin-bottom: 1.4rem;
}
.help-hero h2 { border: none; padding: 0; margin: 0 0 0.5rem; font-size: 1.45rem; }
.help-hero p { color: var(--muted); margin: 0; }

.help-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1.1rem;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.92rem;
}
.help-table th, .help-table td {
  padding: 0.55rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
  vertical-align: top;
}
.help-table th { background: rgba(255,255,255,0.04); color: var(--cyan); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
.help-table tr:last-child td { border-bottom: none; }

.help-callout {
  border-left: 3px solid var(--cyan);
  background: rgba(0,240,255,0.06);
  padding: 0.7rem 1rem;
  border-radius: 5px;
  margin: 0.9rem 0;
}
.help-callout.warn { border-left-color: var(--amber, #FBBF24); background: rgba(251,191,36,0.06); }
.help-callout strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cyan);
}
.help-callout.warn strong { color: var(--amber, #FBBF24); }

ol.help-steps { padding-left: 0; counter-reset: step; list-style: none; }
ol.help-steps > li {
  counter-increment: step;
  padding: 0.32rem 0 0.32rem 2.4rem;
  position: relative;
  margin-bottom: 0.25rem;
}
ol.help-steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 1.7rem;
  height: 1.7rem;
  line-height: 1.65rem;
  text-align: center;
  background: rgba(0,240,255,0.10);
  color: var(--cyan);
  border: 1px solid rgba(0,240,255,0.18);
  border-radius: 50%;
  font-weight: 600;
  font-size: 0.82rem;
}

.help-login-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  margin: 0.7rem 0 0.9rem;
}
.help-login-pattern {
  font: 15px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: var(--cyan);
  background: rgba(0,0,0,0.4);
  padding: 0.55rem 0.85rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
}

@media (max-width: 880px) {
  .help-layout { grid-template-columns: 1fr; }
  .help-toc { position: static; }
  .help-content { padding: 1.1rem 1rem; }
}

/* compact RAM/CPU bars in the Online "System" column */
.sysinfo-cell { min-width: 180px; }
.sysinfo { display: flex; flex-direction: column; gap: 0.18rem; font-size: 11.5px; }
.sysinfo-os { color: var(--text); font-size: 12px; opacity: 0.95; margin-bottom: 0.1rem; }
.sysinfo-row { display: grid; grid-template-columns: 26px 1fr auto; gap: 0.4rem; align-items: center; color: var(--muted); }
.sysinfo-label { font-size: 10px; letter-spacing: 0.05em; color: var(--muted); text-transform: uppercase; }
.sysinfo-val { font-size: 11px; color: var(--muted); white-space: nowrap; }
.bar { height: 5px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; min-width: 60px; }
.bar-fill {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--cyan), #7CC4FF);
  border-radius: 3px;
  transition: width 0.4s ease;
}


/* ── header profile widget (right of the live indicator) ─────────────── */
.profile-chip {
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 0.45rem 0.95rem 0.45rem 0.5rem;
  margin-left: 0.7rem;
  text-decoration: none;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  transition: background 120ms ease, border-color 120ms ease;
}
.profile-chip:hover { background: rgba(0,240,255,0.06); border-color: rgba(0,240,255,0.35); }
.profile-chip-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan-soft), var(--pink-soft));
  color: var(--cyan);
  border: 1px solid rgba(0,240,255,0.35);
  font-weight: 700; font-size: 1.05rem;
  text-transform: uppercase;
}
.profile-chip-info { display: flex; flex-direction: column; line-height: 1.2; max-width: 280px; }
.profile-chip-name { font-size: 0.98rem; color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-chip-email { font-size: 0.8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-chip-badge {
  display: inline-block; padding: 0.05rem 0.5rem; margin-left: 0.3rem;
  font-size: 0.66rem; font-weight: 700; text-transform: uppercase;
  background: var(--pink-soft); color: var(--pink);
  border: 1px solid rgba(255,77,141,0.35); border-radius: 999px;
  vertical-align: middle;
}
@media (max-width: 720px) {
  .profile-chip-info { display: none; }
}

/* ── home welcome block (#8) ─────────────────────────────────────────── */
.welcome-card {
  margin-top: 1.2rem;
  padding: 1.25rem 1.4rem;
  background: linear-gradient(135deg, rgba(0,240,255,0.05), rgba(255,77,141,0.04));
  border: 1px solid var(--border);
  border-radius: 14px;
}
.welcome-card h2 { margin: 0 0 0.6rem 0; font-size: 1.2rem; }
.welcome-card p { margin: 0 0 0.6rem 0; color: var(--text); }
.welcome-cmd-tabs { display: flex; gap: 0.4rem; margin-top: 0.8rem; }
.welcome-cmd-tab {
  padding: 0.35rem 0.85rem; border-radius: 8px 8px 0 0;
  background: rgba(255,255,255,0.04); color: var(--muted);
  border: 1px solid var(--border); border-bottom: none;
  font-size: 0.82rem; cursor: pointer;
}
.welcome-cmd-tab.active { background: rgba(0,240,255,0.08); color: var(--cyan); }
.welcome-cmd-box {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: 0 8px 8px 8px;
  font: 13px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: var(--cyan);
  overflow-x: auto;
}
.welcome-cmd-box code { flex: 1; white-space: pre; }

/* ── admin dashboard widgets ─────────────────────────────────────────── */
.adm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 1rem 0; }
.adm-stat-card { padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.adm-stat-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.adm-stat-value { font-size: 1.6rem; font-weight: 700; color: var(--cyan); margin-top: 0.4rem; font-variant-numeric: tabular-nums; }
.adm-stat-sub { font-size: 0.78rem; color: var(--muted); margin-top: 0.3rem; }
.adm-bar-wrap { margin-top: 0.55rem; height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.adm-bar-fill { height: 100%; background: linear-gradient(90deg, var(--cyan), var(--pink)); border-radius: 3px; transition: width 0.4s ease; }
.adm-bar-fill.warn { background: linear-gradient(90deg, var(--amber), var(--danger)); }

/* ── login-page disclaimer (under the auth card) ─────────────────────── */
.auth-disclaimer {
  max-width: 520px;
  margin: 1.4rem auto 0 auto;
  padding: 0 1rem;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
}

/* ── browser SSH terminal modal ─────────────────────────────────────── */
body.no-scroll { overflow: hidden; }

.term-modal {
  position: fixed; inset: 5vh 5vw; z-index: 9999;
  display: flex; flex-direction: column;
  background: #0b0f19;
  border: 1px solid var(--border-strong, rgba(0,240,255,0.35));
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), var(--shadow-glow);
  overflow: hidden;
}
.term-modal[hidden] { display: none; }
.term-modal.term-modal-fs { inset: 0; border-radius: 0; }

.term-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 1rem;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem; color: var(--text);
}
.term-modal-title { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.term-modal-status { color: var(--muted); font-size: 0.8rem; margin-left: 0.4rem; }
.term-modal-actions { display: inline-flex; gap: 0.4rem; }

.term-modal-body { flex: 1; padding: 0.5rem; overflow: hidden; }
.term-modal-body .xterm { height: 100%; }
.term-modal-body .xterm-viewport { background: #0b0f19 !important; }

.terminal-cell { white-space: nowrap; }

@media (max-width: 720px) {
  .term-modal { inset: 0; border-radius: 0; }
}

/* ── newsletter schedule: summary chip + modal ──────────────────────── */
.news-window-summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 0.2rem 0 0.4rem 0;
}
.news-window-summary-text {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px; color: var(--cyan);
  letter-spacing: 0.02em;
}

.news-modal {
  position: fixed; inset: 0; z-index: 9998;
  display: flex; align-items: center; justify-content: center;
  background: rgba(2,5,12,0.72);
  backdrop-filter: blur(3px);
}
.news-modal[hidden] { display: none; }
.news-modal-card {
  width: min(440px, 92vw);
  background: var(--surface-solid, #11172a);
  border: 1px solid var(--border-strong, rgba(0,240,255,0.35));
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), var(--shadow-glow);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.news-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
}
.news-modal-head h3 { margin: 0; font-size: 1rem; color: var(--text); }
.news-modal-body { padding: 1rem 1.1rem 0.4rem; }
.news-modal-foot {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.1rem;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
}
.news-modal-label {
  display: block;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.news-days-row {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.35rem;
  margin-bottom: 0.6rem;
}
.news-day-chip {
  appearance: none;
  padding: 0.55rem 0.2rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-weight: 600; font-size: 12px;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.news-day-chip:hover { background: rgba(0,240,255,0.06); }
.news-day-chip.on {
  background: rgba(0,240,255,0.14);
  border-color: rgba(0,240,255,0.45);
  color: var(--cyan);
}

.news-days-presets {
  display: flex; gap: 0.4rem; flex-wrap: wrap;
  margin: 0 0 1rem 0;
}
.news-day-preset {
  appearance: none;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--muted);
  font-size: 11px; cursor: pointer;
}
.news-day-preset:hover {
  border-color: rgba(0,240,255,0.45);
  color: var(--cyan);
}

.news-time-grid {
  display: flex; align-items: end; gap: 0.6rem;
  margin-top: 0.5rem;
}
.news-time-grid label { display: flex; flex-direction: column; flex: 1; }
.news-time-grid input[type="time"] {
  width: 100%;
}
.news-time-dash { color: var(--muted); padding-bottom: 0.55rem; }

/* ── unnamed (not-yet-renamed) device name highlight ─────────────────── */
/* A freshly approved device keeps its raw hostname shown in red until the
   admin gives it an alias — makes new arrivals easy to spot in the list. */
.devices .display.unnamed,
.devices .name-row strong.unnamed {
  color: #ff5d6c;
}

/* ── reusable confirm modal (reboot / token-rotate) ─────────────────── */
.confirm-modal {
  position: fixed; inset: 0; z-index: 10000;
  display: none; align-items: center; justify-content: center;
  background: rgba(2,5,12,0.72);
  backdrop-filter: blur(3px);
}
.confirm-modal.open { display: flex; }
.confirm-modal-card {
  width: min(420px, 92vw);
  background: var(--surface-solid, #11172a);
  border: 1px solid var(--border-strong, rgba(0,240,255,0.35));
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), var(--shadow-glow);
  padding: 1.5rem 1.4rem 1.2rem;
  text-align: center;
}
.confirm-modal-icon {
  font-size: 2rem; line-height: 1;
  margin-bottom: 0.6rem;
  color: var(--cyan);
}
.confirm-modal-title { margin: 0 0 0.5rem; font-size: 1.15rem; color: var(--text); }
.confirm-modal-text { margin: 0 0 1.2rem; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.confirm-modal-actions { display: flex; gap: 0.6rem; justify-content: center; }
.confirm-modal-actions .btn { min-width: 110px; }
