/* ==========================================================================
   Hyperviso Dashboard — Design Tokens
   Paleta: grafite quase-preto + violeta "hypervisor" + sinais de estado
   Tipografia: Space Grotesk (display) / Inter (corpo) / JetBrains Mono (dados)
   ========================================================================== */

:root {
  --bg: #0D0F16;
  --bg-elevated: #12141D;
  --panel: #171A24;
  --panel-2: #1C2030;
  --border: #262A3A;
  --border-soft: #1F2330;

  --text: #E8EAF2;
  --text-dim: #8B90A8;
  --text-faint: #565C74;

  --accent: #8B7CFF;
  --accent-strong: #A594FF;
  --accent-soft: rgba(139, 124, 255, 0.14);
  --accent-border: rgba(139, 124, 255, 0.35);

  --ok: #38D99A;
  --ok-soft: rgba(56, 217, 154, 0.14);
  --off: #FF6B6B;
  --off-soft: rgba(255, 107, 107, 0.14);
  --warn: #F7C948;
  --warn-soft: rgba(247, 201, 72, 0.14);

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

  --radius: 10px;
  --radius-lg: 16px;
}

/* Tema claro: aplicado manualmente via [data-theme="light"] (clique no botão),
   ou automaticamente quando o sistema operacional está em modo claro e o
   usuário ainda não escolheu um tema manualmente (sem o atributo data-theme). */
:root[data-theme="light"] {
  --bg: #F3F4F9;
  --bg-elevated: #FFFFFF;
  --panel: #FFFFFF;
  --panel-2: #EEF0F6;
  --border: #E1E3EE;
  --border-soft: #EAECF4;

  --text: #1B1E2C;
  --text-dim: #5B5F76;
  --text-faint: #8A8FA5;

  --accent: #6C5CE0;
  --accent-strong: #5B4FD1;
  --accent-soft: rgba(108, 92, 224, 0.10);
  --accent-border: rgba(108, 92, 224, 0.35);

  --ok: #1FA97A;
  --ok-soft: rgba(31, 169, 122, 0.12);
  --off: #E14840;
  --off-soft: rgba(225, 72, 64, 0.12);
  --warn: #B9840D;
  --warn-soft: rgba(185, 132, 13, 0.12);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #F3F4F9;
    --bg-elevated: #FFFFFF;
    --panel: #FFFFFF;
    --panel-2: #EEF0F6;
    --border: #E1E3EE;
    --border-soft: #EAECF4;

    --text: #1B1E2C;
    --text-dim: #5B5F76;
    --text-faint: #8A8FA5;

    --accent: #6C5CE0;
    --accent-strong: #5B4FD1;
    --accent-soft: rgba(108, 92, 224, 0.10);
    --accent-border: rgba(108, 92, 224, 0.35);

    --ok: #1FA97A;
    --ok-soft: rgba(31, 169, 122, 0.12);
    --off: #E14840;
    --off-soft: rgba(225, 72, 64, 0.12);
    --warn: #B9840D;
    --warn-soft: rgba(185, 132, 13, 0.12);
  }
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  margin: 0;
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Textura sutil de fundo: grade fina evocando "camadas" de virtualização */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, black 40%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.scan-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.3;
  background: linear-gradient(180deg, transparent 0%, var(--accent-soft) 50%, transparent 100%);
  background-size: 100% 240px;
  animation: scan-move 9s linear infinite;
}
@keyframes scan-move {
  0% { background-position-y: -240px; }
  100% { background-position-y: 100vh; }
}
@media (prefers-reduced-motion: reduce) {
  .scan-overlay { animation: none; }
}

/* ============================== HEADER ============================== */

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--accent), #5B4FE0);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 1px var(--accent-border), 0 8px 20px -8px rgba(139,124,255,0.6);
  position: relative;
  overflow: hidden;
}
.brand-mark img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 4px;
}
.brand-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px 2px rgba(255,255,255,0.7);
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.1;
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
  margin: 2px 0 0;
  letter-spacing: 0.01em;
}

.header-status {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 7px 12px;
  border-radius: 999px;
}
.header-sep { color: var(--text-faint); }

.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
}
.status-dot--ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.status-dot--bad { background: var(--off); box-shadow: 0 0 0 3px var(--off-soft); }

/* ============================== MAIN ============================== */

.main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px;
  position: relative;
  z-index: 2;
}

/* ============================== STAT CARDS ============================== */

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
@media (max-width: 900px) {
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: var(--text-faint);
  opacity: 0.4;
}
.stat-card--running::after { background: var(--ok); opacity: 1; }
.stat-card--off::after { background: var(--off); opacity: 1; }
.stat-card--ram::after { background: var(--accent); opacity: 1; }

.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin: 0 0 10px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}
.stat-foot {
  font-size: 12px;
  color: var(--text-faint);
  margin: 6px 0 0;
}

/* ============================== TOOLBAR ============================== */

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.search-wrap {
  position: relative;
  flex: 1 1 260px;
  min-width: 220px;
}
.search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-faint);
}
#search-input {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px 10px 36px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s;
}
#search-input:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
#search-input::placeholder { color: var(--text-faint); }

.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--accent-border); color: var(--text); }
.chip--active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-strong);
}

.toolbar-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  margin-left: auto;
}

/* ============================== BANNER ============================== */

.banner {
  background: var(--warn-soft);
  border: 1px solid rgba(247, 201, 72, 0.4);
  color: var(--warn);
  font-size: 13px;
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
}
.banner.hidden { display: none; }

/* ============================== TABLE ============================== */

.table-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.vm-table { width: 100%; border-collapse: collapse; }

.vm-table thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.th-actions { text-align: right; }

.vm-table tbody tr {
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.12s;
}
.vm-table tbody tr:last-child { border-bottom: none; }
.vm-table tbody tr:hover { background: var(--panel-2); }

.vm-table td {
  padding: 14px 18px;
  font-size: 13.5px;
  vertical-align: middle;
}

.vm-name-cell { display: flex; flex-direction: column; gap: 2px; }
.vm-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
}
.vm-desc { font-size: 11.5px; color: var(--text-faint); font-family: var(--font-mono); }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.tag-dot { width: 6px; height: 6px; border-radius: 50%; }

.tag--running { background: var(--ok-soft); color: var(--ok); border-color: rgba(56,217,154,0.35); }
.tag--running .tag-dot { background: var(--ok); animation: pulse-dot 1.8s ease-in-out infinite; }

.tag--off { background: var(--off-soft); color: var(--off); border-color: rgba(255,107,107,0.35); }
.tag--off .tag-dot { background: var(--off); }

.tag--other { background: var(--warn-soft); color: var(--warn); border-color: rgba(247,201,72,0.35); }
.tag--other .tag-dot { background: var(--warn); }

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(56,217,154,0.5); }
  50% { box-shadow: 0 0 0 4px rgba(56,217,154,0); }
}

.metric-cell { font-family: var(--font-mono); font-size: 12.5px; color: var(--text); }
.metric-bar-wrap {
  width: 64px; height: 5px; border-radius: 999px;
  background: var(--border-soft);
  margin-top: 5px; overflow: hidden;
}
.metric-bar { height: 100%; background: var(--accent); border-radius: 999px; }

.uptime-cell { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-dim); }
.system-filter-wrap { position: relative; }

.system-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 13px;
  cursor: pointer;
  transition: all 0.15s;
  max-width: 220px;
}
.system-filter-btn:hover { border-color: var(--accent-border); color: var(--text); }
.system-filter-btn.active { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent-strong); }
.system-filter-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.system-filter-btn svg { width: 9px; height: 6px; flex-shrink: 0; transition: transform 0.15s; }
.system-filter-btn.open svg { transform: rotate(180deg); }

.system-filter-menu {
  position: absolute;
  left: 0; top: calc(100% + 6px);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 220px;
  max-height: 280px;
  overflow-y: auto;
  padding: 8px;
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.5);
  z-index: 30;
  display: none;
}
.system-filter-menu.open { display: block; }

.system-filter-menu-actions {
  display: flex;
  gap: 6px;
  padding: 2px 2px 8px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border-soft);
}
.system-filter-menu-actions button {
  flex: 1;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 5px 6px;
  cursor: pointer;
}
.system-filter-menu-actions button:hover { color: var(--text); border-color: var(--accent-border); }

.system-filter-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
}
.system-filter-option:hover { background: var(--border-soft); }
.system-filter-option input {
  width: 15px; height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}
.system-filter-option .count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}

.system-filter-empty {
  padding: 10px 8px;
  font-size: 12px;
  color: var(--text-faint);
  font-family: var(--font-mono);
}
.sistema-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.actions-cell { display: flex; justify-content: flex-end; gap: 8px; }

.btn {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
  padding: 8px 13px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn--anydesk {
  background: linear-gradient(145deg, var(--accent), #5B4FE0);
  color: #fff;
  box-shadow: 0 4px 14px -6px rgba(139,124,255,0.6);
}
.btn--anydesk:hover:not(:disabled) { filter: brightness(1.08); }

.btn--secondary {
  background: var(--panel-2);
  border-color: var(--border);
  color: var(--text-dim);
}
.btn--secondary:hover { color: var(--text); border-color: var(--accent-border); }

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

.btn--danger {
  background: var(--off);
  color: #1a0d0d;
}
.btn--danger:hover { filter: brightness(1.08); }

/* Dropdown de ações */
.actions-menu-wrap { position: relative; }
.actions-menu {
  position: absolute;
  right: 0; top: calc(100% + 6px);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 168px;
  padding: 6px;
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.5);
  z-index: 30;
  display: none;
}
.actions-menu.open { display: block; }
.actions-menu button {
  width: 100%; text-align: left;
  background: transparent; border: none;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.actions-menu button:hover { background: var(--border-soft); color: var(--text); }
.actions-menu button.danger:hover { color: var(--off); }

/* ============================== EMPTY / LOADING ============================== */

.empty-state {
  padding: 48px 20px;
  text-align: center;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 13px;
}
.empty-state.hidden { display: none; }

.footer-note {
  text-align: center;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 11.5px;
  margin-top: 22px;
}

/* ============================== MODAL ============================== */

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(6, 7, 12, 0.72);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-backdrop.hidden { display: none; }

.modal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 400px;
  width: 100%;
  padding: 26px;
  box-shadow: 0 24px 60px -12px rgba(0,0,0,0.6);
}
.modal-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--off);
  margin: 0 0 8px;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 10px;
}
.modal-body {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0 0 22px;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

.admin-modal { max-width: 900px; max-height: calc(100vh - 40px); overflow-y: auto; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.admin-section-title { font-family: var(--font-display); font-size: 15px; margin: 0 0 10px; }
.admin-grid .login-input { margin-top: 8px; }
.admin-grid form > .btn { width: 100%; margin-top: 10px; }
.admin-textarea { min-height: 68px; resize: vertical; }
.admin-form-actions { margin-top: 10px; }
.admin-form-actions > .btn { width: auto !important; margin-top: 0 !important; }
.admin-list { margin-top: 14px; border-top: 1px solid var(--border); }
.admin-list-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--border-soft); font-size: 12px; }
.admin-list-item strong { display: block; font-size: 12.5px; }
.admin-list-item span { color: var(--text-faint); }
.admin-list-item button { padding: 5px 8px; font-size: 11px; }
.admin-list-empty { color: var(--text-faint); font-size: 12px; padding: 10px 0; }

@media (max-width: 720px) {
  .admin-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ============================== SCREENSHOT MODAL ============================== */

.screenshot-modal {
  max-width: 640px;
}

.screenshot-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.screenshot-status {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
  text-align: center;
  padding: 0 20px;
}

.screenshot-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.screenshot-img.hidden { display: none; }

.screenshot-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  margin: 10px 0 0;
  text-align: center;
}

/* ============================== TOAST ============================== */

.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.5);
  z-index: 200;
  opacity: 0;
  transition: all 0.25s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.toast--success { border-color: rgba(56,217,154,0.4); }
.toast.toast--error { border-color: rgba(255,107,107,0.4); }
.toast.hidden { display: none; }

/* ============================== LOGIN ============================== */

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-overlay.hidden { display: none; }

.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: 0 24px 60px -12px rgba(0,0,0,0.6);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.login-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  margin: 16px 0 6px;
}

.login-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}
.login-input:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.login-error {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--off);
  font-family: var(--font-mono);
}
.login-error.hidden { display: none; }

.login-submit {
  width: 100%;
  margin-top: 22px;
  padding: 11px;
  font-size: 13.5px;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
}
.theme-toggle-btn:hover { color: var(--text); border-color: var(--accent-border); }
.theme-toggle-btn svg { width: 15px; height: 15px; }

.theme-icon-sun { display: none; }
.theme-icon-moon { display: inline; }

:root[data-theme="light"] .theme-icon-sun { display: inline; }
:root[data-theme="light"] .theme-icon-moon { display: none; }

:root[data-theme="dark"] .theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-icon-moon { display: inline; }

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme-icon-sun { display: inline; }
  :root:not([data-theme]) .theme-icon-moon { display: none; }
}

.theme-reset-btn {
  background: transparent;
  border: none;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 10.5px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.theme-reset-btn:hover { color: var(--text-dim); }
.theme-reset-btn.hidden { display: none; }

.logout-btn {
  background: transparent;
  border: none;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}
.logout-btn:hover { color: var(--off); }

@media (max-width: 640px) {
  .header-inner { padding: 14px 16px; }
  .main { padding: 16px; }
  .table-wrap { overflow-x: auto; }
  .vm-table { min-width: 720px; }
}
