:root {
  --bg: #0a0e12;
  --surface: rgba(16, 22, 30, 0.9);
  --surface-border: rgba(100, 160, 255, 0.08);
  --text: #e8edf4;
  --text-muted: #7a8ea4;
  --accent: #5b9df9;
  --accent-2: #a78bfa;
  --ok-bg: rgba(52, 211, 153, 0.1);
  --warn-bg: rgba(251, 191, 36, 0.1);
  --danger-bg: rgba(239, 68, 68, 0.1);
  --radius-card: 20px;
  --radius-control: 12px;
  --radius-pill: 999px;
  --sp-1: 6px; --sp-2: 10px; --sp-3: 14px; --sp-4: 20px; --sp-5: 28px;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 8px 24px rgba(0, 0, 0, 0.25), 0 16px 48px rgba(0, 0, 0, 0.15);
  --shadow-focus: 0 0 0 3px rgba(91, 157, 249, 0.25), 0 0 12px rgba(91, 157, 249, 0.1);
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

[data-theme="light"] {
  --bg: #f3f1ee;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-border: rgba(0, 0, 0, 0.06);
  --text: #1a1a2e;
  --text-muted: #5f6775;
  --accent: #3b82f6;
  --accent-2: #8b5cf6;
  --ok-bg: rgba(16, 185, 129, 0.1);
  --warn-bg: rgba(245, 158, 11, 0.1);
  --danger-bg: rgba(239, 68, 68, 0.1);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.04);
  --shadow-focus: 0 0 0 3px rgba(59, 130, 246, 0.2), 0 0 12px rgba(59, 130, 246, 0.08);
}

[data-theme="light"] .field__input,
[data-theme="light"] .field__select,
[data-theme="light"] .field__textarea {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] body {
  background: var(--bg);
}

[data-theme="light"] .modal__dialog {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .modal__backdrop {
  background: rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .button-secondary,
[data-theme="light"] .button-ghost,
[data-theme="light"] .page-link {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .button-secondary:hover,
[data-theme="light"] .button-ghost:hover,
[data-theme="light"] .page-link:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .user-menu__trigger {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .user-menu__trigger:hover {
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .modal__close {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .modal__close:hover {
  background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .user-menu__dropdown {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .user-menu__dropdown button:hover,
[data-theme="light"] .user-menu__dropdown a:hover {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .tabs {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .table tbody tr:hover td {
  background: rgba(59, 130, 246, 0.04);
}

[data-theme="light"] .table th,
[data-theme="light"] .table td {
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .badge--muted {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .tab-button {
  color: var(--text-muted);
}

[data-theme="light"] .tab-button:hover:not(.active) {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .tab-button.active {
  color: #fff;
}

[data-theme="light"] .auth-card, [data-theme="light"] .table-card, [data-theme="light"] .form-card {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .stat {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .table tbody tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.015);
}

[data-theme="light"] .table tbody tr:hover td {
  background: rgba(59, 130, 246, 0.05);
}

[data-theme="light"] .page-link.active {
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: linear-gradient(170deg, #0a0e12 0%, #0d1420 40%, #0a0e14 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.hidden { display: none !important; }
.mono { font-family: "SF Mono", "Fira Code", monospace; font-size: 12px; letter-spacing: -0.02em; }
.text-muted { color: var(--text-muted); }
.nowrap { white-space: nowrap; }

/* ── Auth ── */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
}

.auth-card, .table-card, .form-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  min-width: 0;
}

/* Dark mode: subtle inner glow on cards */
:root:not([data-theme="light"]) .auth-card,
:root:not([data-theme="light"]) .table-card,
:root:not([data-theme="light"]) .form-card,
html:not([data-theme="light"]) .auth-card,
html:not([data-theme="light"]) .table-card,
html:not([data-theme="light"]) .form-card {
  background: linear-gradient(180deg, rgba(20, 28, 40, 0.95) 0%, rgba(14, 20, 28, 0.92) 100%);
}

.auth-card { width: 100%; max-width: 400px; }
.auth-card__content { padding: var(--sp-5); }
.auth-header { text-align: center; margin-bottom: var(--sp-4); }

.auth-logo {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-view { display: none; }
.auth-view.active { display: block; }

.auth-title, .section-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 var(--sp-3);
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-form, .form-grid { display: flex; flex-direction: column; gap: var(--sp-2); }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }

.auth-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }

.auth-link { background: none; border: none; padding: 0; cursor: pointer; color: var(--accent-2); transition: opacity 0.2s ease-out; }
.auth-link:hover { opacity: 0.8; }

.auth-back { background: none; border: none; padding: 0; cursor: pointer; color: var(--text-muted); font-size: 14px; margin-bottom: var(--sp-2); transition: color 0.2s ease-out; }
.auth-back:hover { color: var(--text); }

/* ── Fields ── */

.field { display: flex; flex-direction: column; gap: 5px; }
.field__label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.field__input, .field__select, .field__textarea {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: var(--radius-control);
  border: 1px solid rgba(100, 120, 160, 0.15);
  background: rgba(8, 12, 20, 0.7);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s ease-out, box-shadow 0.2s ease-out, background 0.2s ease-out;
}

.field__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 5 5-5' stroke='%237a8ea4' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.field__textarea { height: auto; min-height: 76px; padding: 12px 14px; resize: vertical; }

.field__input::placeholder, .field__textarea::placeholder {
  color: rgba(122, 142, 164, 0.4);
  transition: opacity 0.2s ease-out;
}

.field__input:focus::placeholder, .field__textarea:focus::placeholder {
  opacity: 0.3;
}

.field__input:focus, .field__select:focus, .field__textarea:focus {
  outline: none;
  border-color: rgba(91, 157, 249, 0.5);
  box-shadow: var(--shadow-focus);
}

/* ── Buttons ── */

.auth-button, .button, .button-secondary, .button-ghost, .button-accent, .tab-button, .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease-out;
  white-space: nowrap;
  text-decoration: none;
}

.auth-button, .button {
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: 0 2px 8px rgba(91, 157, 249, 0.2), 0 1px 2px rgba(0, 0, 0, 0.1);
}
.auth-button:hover, .button:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 16px rgba(91, 157, 249, 0.3), 0 2px 4px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}
.auth-button:active, .button:active {
  transform: translateY(0);
  filter: brightness(0.97);
}
.auth-button:disabled, .button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: saturate(0.5);
  transform: none;
  box-shadow: none;
}

.button-secondary, .button-ghost, .page-link {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(100, 120, 160, 0.15);
}
.button-secondary:hover, .button-ghost:hover, .page-link:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(100, 120, 160, 0.25);
}

.button-accent {
  color: var(--accent);
  background: rgba(91, 157, 249, 0.1);
  border: 1px solid rgba(91, 157, 249, 0.2);
}
.button-accent:hover { background: rgba(91, 157, 249, 0.18); border-color: rgba(91, 157, 249, 0.3); }

.button-sm { height: 34px; padding: 0 12px; font-size: 12px; border-radius: 8px; cursor: pointer; }

.btn-on {
  color: #6ee7b7; background: var(--ok-bg); border: 1px solid rgba(52, 211, 153, 0.2);
  min-width: 56px;
}
.btn-on:hover { background: rgba(52, 211, 153, 0.18); border-color: rgba(52, 211, 153, 0.35); }

.btn-off {
  color: #fca5a5; background: var(--danger-bg); border: 1px solid rgba(239, 68, 68, 0.2);
  min-width: 56px;
}
.btn-off:hover { background: rgba(239, 68, 68, 0.18); border-color: rgba(239, 68, 68, 0.35); }

.inline-row { display: flex; align-items: center; gap: var(--sp-1); }

/* ── Layout ── */

.app-shell { min-height: 100vh; padding: var(--sp-4); display: flex; flex-direction: column; }

.app-container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  flex: 1;
  overflow-x: hidden;
}

.page-header { display: flex; flex-direction: column; gap: 2px; margin-bottom: var(--sp-3); }
.page-header__top { display: flex; justify-content: space-between; align-items: center; }
.page-header__title { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.04em; }

.page-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); }
.page-grid--2 { grid-template-columns: 340px minmax(0, 1fr); }

.table-card, .form-card { padding: var(--sp-4); }

/* ── Stats ── */

.stats-bar { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-3); }

.stat {
  display: flex; align-items: baseline; gap: 8px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-control);
  transition: border-color 0.2s ease-out, box-shadow 0.2s ease-out;
}

.stat:hover {
  border-color: rgba(91, 157, 249, 0.15);
}

.stat__value {
  font-size: 20px; font-weight: 800; line-height: 1;
  color: var(--accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat__label { font-size: 12px; color: var(--text-muted); font-weight: 500; }

/* ── Tabs ── */

.tabs {
  display: inline-flex; gap: 4px; padding: 4px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--surface-border);
  margin-bottom: var(--sp-3);
  flex-wrap: wrap;
}

.tab-button {
  height: 38px; padding: 0 18px; border-radius: var(--radius-pill);
  color: var(--text-muted); background: transparent; border: 1px solid transparent;
  transition: all 0.2s ease-out;
}

.tab-button:hover:not(.active) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.tab-button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 2px 8px rgba(91, 157, 249, 0.25);
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── Filters ── */

.filters { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-3); }
.filters .field { min-width: 180px; flex: 1; }

/* ── Table ── */

.table-card--stretch { display: flex; flex-direction: column; min-height: 100%; }
.table-card__body { flex: 1; }
.table-card__footer { margin-top: auto; padding-top: var(--sp-3); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.table { width: 100%; min-width: 520px; border-collapse: collapse; }

.table th, .table td {
  text-align: left; padding: 12px 10px;
  border-bottom: 1px solid rgba(100, 120, 160, 0.08);
  vertical-align: middle;
}

.table th {
  color: var(--text-muted); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
}

.table td { font-size: 13px; }
.table tr:last-child td { border-bottom: none; }

.table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.015);
}

.table tbody tr {
  transition: background 0.15s ease-out;
}

.table tbody tr:hover td {
  background: rgba(91, 157, 249, 0.06);
}

.status-cell, th.status-cell { width: 100px; }

.cell-title { font-weight: 700; margin-bottom: 1px; }
.cell-link { font-weight: 700; color: var(--accent); text-decoration: none; transition: color 0.15s ease-out; }
.cell-link:hover { text-decoration: underline; color: var(--accent-2); }
.cell-subtitle { color: var(--text-muted); font-size: 11px; }

.flag { font-size: 1.2em; vertical-align: -0.05em; }
.latency-empty { opacity: 0.2; }

/* ── Badges ── */

.badge {
  display: inline-flex; align-items: center; justify-content: center;
  height: 26px; padding: 0 10px;
  border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700; white-space: nowrap;
  letter-spacing: 0.01em;
}

.badge--great { color: #34d399; background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.2); text-shadow: 0 0 12px rgba(52, 211, 153, 0.15); }
.badge--ok { color: #6ee7b7; background: var(--ok-bg); border: 1px solid rgba(52, 211, 153, 0.15); text-shadow: 0 0 12px rgba(52, 211, 153, 0.12); }
.badge--warn { color: #fbbf24; background: var(--warn-bg); border: 1px solid rgba(251, 191, 36, 0.15); text-shadow: 0 0 12px rgba(251, 191, 36, 0.1); }
.badge--danger { color: #fb923c; background: rgba(251, 146, 60, 0.1); border: 1px solid rgba(251, 146, 60, 0.15); text-shadow: 0 0 12px rgba(251, 146, 60, 0.1); }
.badge--crit { color: #f87171; background: var(--danger-bg); border: 1px solid rgba(239, 68, 68, 0.2); text-shadow: 0 0 12px rgba(239, 68, 68, 0.12); }
.badge--muted { color: var(--text-muted); background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(100, 130, 170, 0.1); }

/* ── Alerts ── */

.alert { padding: 12px 16px; border-radius: 12px; font-size: 13px; margin-bottom: var(--sp-3); font-weight: 500; }
.alert--ok { color: #6ee7b7; background: var(--ok-bg); border: 1px solid rgba(52, 211, 153, 0.15); }
.alert--warn { color: #fbbf24; background: var(--warn-bg); border: 1px solid rgba(251, 191, 36, 0.15); }
.alert--danger { color: #fca5a5; background: var(--danger-bg); border: 1px solid rgba(239, 68, 68, 0.15); }

/* ── Pagination ── */

.pagination { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap; }
.pagination__info { color: var(--text-muted); font-size: 12px; }
.pagination__controls { display: flex; gap: 4px; }

.page-link {
  height: 32px; min-width: 32px; padding: 0 10px; font-size: 12px;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease-out;
}
.page-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(91, 157, 249, 0.25);
}
.page-link:disabled { opacity: 0.25; cursor: default; }

/* ── Modal ── */

.modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: flex-start; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease-out, visibility 0.25s ease-out;
}
.modal.active { opacity: 1; visibility: visible; }

.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
}

.modal__dialog {
  position: relative; z-index: 1;
  width: min(480px, calc(100vw - 24px));
  margin-top: 48px;
  padding: var(--sp-4);
  border-radius: var(--radius-card);
  background: rgba(12, 16, 24, 0.97);
  border: 1px solid rgba(91, 157, 249, 0.08);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.2),
    0 20px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(91, 157, 249, 0.05),
    0 0 40px rgba(91, 157, 249, 0.03);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal.active .modal__dialog {
  transform: translateY(0) scale(1);
}

.modal__close {
  position: absolute; top: var(--sp-4); right: var(--sp-4);
  width: 32px; height: 32px; border-radius: 10px;
  border: 1px solid rgba(100, 120, 160, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted); font-size: 18px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease-out;
}
.modal__close:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); transform: scale(1.05); }

/* ── User menu dropdown ── */

.user-menu { position: relative; }
.user-menu__trigger {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(100, 120, 160, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease-out;
  white-space: nowrap;
}
.user-menu__trigger:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(100, 120, 160, 0.25);
}

.user-menu__dropdown {
  display: none;
  position: absolute;
  right: 0; top: 100%;
  margin-top: 6px;
  min-width: 190px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  z-index: 100;
  padding: 6px;
  animation: dropdown-enter 0.2s ease-out;
}

@keyframes dropdown-enter {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.user-menu__dropdown.active { display: block; }
.user-menu__dropdown button,
.user-menu__dropdown a {
  display: block; width: 100%;
  padding: 10px 14px;
  text-align: left;
  border: none; background: none;
  color: var(--text);
  font: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s ease-out;
}
.user-menu__dropdown button:hover,
.user-menu__dropdown a:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Divider between dropdown items */
.user-menu__dropdown button + a,
.user-menu__dropdown a + button,
.user-menu__dropdown button + button:last-child,
.user-menu__dropdown a:last-child {
  position: relative;
}
.user-menu__dropdown a:last-child::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 10px;
  right: 10px;
  height: 1px;
  background: var(--surface-border);
}

/* ── Footer ── */

.app-footer {
  margin-top: var(--sp-5);
  padding: var(--sp-3) 0 var(--sp-2);
  color: var(--text-muted);
  font-size: 11px;
  text-align: center;
  opacity: 0.5;
}

/* ── Responsive ── */

@media (max-width: 1080px) {
  .page-grid--2 { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .app-shell { padding: 10px; }
  .table-card, .form-card { padding: 14px; }
  .modal__dialog { padding: 14px; margin-top: 16px; }

  .page-header__title { font-size: 22px; }
  .auth-logo { font-size: 26px; }
  .section-title { font-size: 17px; }

  .tabs { width: 100%; }
  .tab-button { flex: 1 1 calc(50% - 2px); text-align: center; min-height: 44px; }

  .stats-bar { gap: 6px; }
  .stat {
    flex: 1 1 calc(33.3% - 4px); min-width: 0;
    justify-content: center; flex-direction: column; align-items: center;
    padding: 8px; gap: 2px; text-align: center;
  }
  .stat__value { font-size: 18px; }
  .stat__label { font-size: 10px; }

  .form-row-2 { grid-template-columns: 1fr; }
  .filters { flex-direction: column; }
  .filters .field { min-width: 0; }
  .field__textarea { min-height: 56px; }

  .table th, .table td { padding: 10px 8px; font-size: 12px; }
  .badge { font-size: 10px; height: 24px; padding: 0 8px; }
  .button-sm { height: 30px; padding: 0 10px; font-size: 11px; }
  .btn-on, .btn-off { min-width: 44px; min-height: 44px; }

  .field__input, .field__select, .field__textarea, .button, .auth-button { width: 100%; min-height: 46px; }

  /* Touch-friendly tap targets */
  .page-link { min-width: 44px; min-height: 44px; }
  .user-menu__trigger { min-height: 44px; }
  .button-ghost { min-height: 44px; min-width: 44px; }
  .modal__close { width: 44px; height: 44px; }

  .user-menu__dropdown button,
  .user-menu__dropdown a {
    padding: 12px 14px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}
