/* suudukworks hub — hand-written, no build step, no external assets. */

:root {
  --bg: #070b13;
  --panel: #0d1422;
  --panel-2: #101a2c;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.26);
  --text: #e8eef9;
  --muted: #96a5bb;
  --muted-2: #64748b;
  --accent: #38bdf8;
  --accent-2: #818cf8;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #f87171;
  --radius: 18px;
  --shadow: 0 24px 60px -30px rgba(2, 6, 23, 0.9);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(900px 480px at 12% -8%, rgba(56, 189, 248, 0.13), transparent 65%),
    radial-gradient(760px 420px at 92% -12%, rgba(129, 140, 248, 0.13), transparent 62%),
    radial-gradient(600px 380px at 50% 110%, rgba(52, 211, 153, 0.05), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

button, input { font: inherit; }

:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.75);
  outline-offset: 2px;
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(7, 11, 19, 0.94), rgba(7, 11, 19, 0.7));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.topbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 13px 28px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
  flex: none;
}

.brand-mark {
  width: 37px;
  height: 37px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #0ea5e9, #6366f1);
  box-shadow: 0 10px 26px -10px rgba(56, 189, 248, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.brand-mark svg { width: 19px; height: 19px; display: block; }

.brand-name {
  display: block;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.brand-sub {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.search {
  position: relative;
  margin-left: auto;
  width: min(300px, 36vw);
}

.search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--muted-2);
  pointer-events: none;
}

.search input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-size: 13.5px;
  transition: border-color 0.15s, background 0.15s;
}

.search input::placeholder { color: var(--muted-2); }

.search input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.06);
}

.user { display: flex; align-items: center; gap: 8px; flex: none; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  color: var(--muted);
}

.avatar {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 11.5px;
  font-weight: 700;
  color: #06121f;
  text-transform: uppercase;
  background: linear-gradient(140deg, #7dd3fc, #a5b4fc);
}

/* ---------- page ---------- */

.page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 26px 28px 48px;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.hero h1 {
  margin: 0 0 4px;
  font-size: clamp(22px, 2.4vw, 29px);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.hero p { margin: 0; color: var(--muted); font-size: 13.5px; }

.stats { display: flex; gap: 8px; flex-wrap: wrap; }

.stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12.5px;
  color: var(--muted);
}

.stat b { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 650; }

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-2);
  flex: none;
}

.dot.green { background: var(--green); box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.14); }
.dot.amber { background: var(--amber); box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.14); }
.dot.grey { background: var(--muted-2); }

.banner {
  margin: 0 0 18px;
  padding: 12px 15px;
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.09);
  color: #fecaca;
  font-size: 13px;
}

/* ---------- toolbar ---------- */

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

.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.seg button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 550;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background 0.15s, color 0.15s;
}

.seg button:hover { color: var(--text); }

.seg button.active {
  background: rgba(56, 189, 248, 0.14);
  color: #dff4ff;
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.25);
}

.seg .count {
  font-size: 11px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.seg button.active .count { color: rgba(223, 244, 255, 0.7); }

.toolbar-hint {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

/* ---------- grid & cards ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
  gap: 15px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 17px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--card-accent, var(--accent)), transparent);
  opacity: 0.4;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(148, 163, 184, 0.3);
  box-shadow: 0 30px 60px -32px rgba(56, 189, 248, 0.35), var(--shadow);
}

.card.is-disabled { opacity: 0.58; }
.card.is-disabled:hover { opacity: 0.85; }

.card-head { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }

.tile {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 13px;
  font-size: 22px;
  line-height: 1;
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--tile-accent, #38bdf8) 32%, transparent),
                             color-mix(in srgb, var(--tile-accent, #38bdf8) 8%, transparent));
  border: 1px solid color-mix(in srgb, var(--tile-accent, #38bdf8) 30%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.card-text { min-width: 0; flex: 1; }

.card-title {
  margin: 1px 0 0;
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -0.012em;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-desc {
  margin: 3px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 22px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip.host { color: #bae6fd; border-color: rgba(56, 189, 248, 0.2); background: rgba(56, 189, 248, 0.07); }
.chip.port { color: #c7d2fe; border-color: rgba(129, 140, 248, 0.22); background: rgba(129, 140, 248, 0.08); }
.chip.local { color: #a7f3d0; border-color: rgba(52, 211, 153, 0.2); background: rgba(52, 211, 153, 0.07); }
.chip.more { color: var(--muted-2); }

.card-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding-top: 2px;
}

.card-foot .spacer { flex: 1; }

/* ---------- pills ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  white-space: nowrap;
}

.pill .dot { width: 6px; height: 6px; box-shadow: none; }

.pill.running { color: #6ee7b7; background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.22); }
.pill.running .dot { background: var(--green); animation: breathe 2.4s ease-in-out infinite; }
.pill.partial { color: #fcd34d; background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.24); }
.pill.partial .dot { background: var(--amber); }
.pill.stopped, .pill.neutral { color: #a3b1c6; background: rgba(148, 163, 184, 0.09); border-color: rgba(148, 163, 184, 0.2); }
.pill.disabled { color: #93a3b8; background: rgba(100, 116, 139, 0.12); border-color: rgba(100, 116, 139, 0.28); }
.pill.disabled .dot { background: #64748b; }

@keyframes breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ---------- controls ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 32px;
  padding: 0 13px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  white-space: nowrap;
}

.btn:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(148, 163, 184, 0.4); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  color: #04121f;
  border-color: transparent;
  background: linear-gradient(140deg, #7dd3fc, #60a5fa);
  box-shadow: 0 10px 24px -14px rgba(56, 189, 248, 0.9);
}

.btn-primary:hover { background: linear-gradient(140deg, #bae6fd, #93c5fd); border-color: transparent; }

.btn-ghost { background: transparent; }
.btn-danger { color: #fecaca; border-color: rgba(248, 113, 113, 0.3); background: rgba(248, 113, 113, 0.08); }
.btn-danger:hover { background: rgba(248, 113, 113, 0.16); }

.btn[disabled], .btn.is-busy { opacity: 0.55; pointer-events: none; }

.btn.is-off { opacity: 0.45; border-color: var(--line); background: transparent; color: var(--muted); }

.toggle-label { font-size: 11.5px; font-weight: 600; color: var(--muted-2); letter-spacing: 0.04em; text-transform: uppercase; }

.icon-btn {
  width: 32px;
  height: 32px;
  flex: none;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.icon-btn:hover { color: var(--text); border-color: rgba(56, 189, 248, 0.45); background: rgba(56, 189, 248, 0.08); }

.info-btn { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 700; font-size: 15px; line-height: 1; }

.toggle {
  position: relative;
  width: 44px;
  height: 25px;
  flex: none;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(148, 163, 184, 0.16);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}

.toggle .knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.3, 1), background 0.2s;
}

.toggle[aria-checked="true"] { background: rgba(52, 211, 153, 0.24); border-color: rgba(52, 211, 153, 0.5); }
.toggle[aria-checked="true"] .knob { transform: translateX(19px); background: #34d399; }
.toggle[disabled] { cursor: progress; opacity: 0.6; }
.toggle.is-busy .knob { animation: pulse 0.9s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { transform: scale(1) translateX(var(--tx, 0)); opacity: 1; }
  50% { transform: scale(0.8) translateX(var(--tx, 0)); opacity: 0.6; }
}

.toggle[aria-checked="true"].is-busy .knob { --tx: 19px; }

/* ---------- empty ---------- */

.empty {
  padding: 56px 24px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
}

.empty strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

.foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 34px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 11.5px;
}

/* ---------- modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 15, 0.68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  width: min(760px, 100%);
  max-height: min(86vh, 900px);
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(180deg, #0f1727, #0b1220);
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  animation: modal-in 0.18s ease-out;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-heading { min-width: 0; flex: 1; }
.modal-heading h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-heading .pill { transform: translateY(1px); }

.modal-body {
  padding: 4px 22px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-foot {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
  flex-wrap: wrap;
}

.modal-foot .spacer { flex: 1; }

.section { margin-top: 20px; }

.section h3 {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.section p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.kv {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px 14px;
  font-size: 13px;
}

.kv dt { color: var(--muted-2); }
.kv dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }

.links { display: flex; flex-direction: column; gap: 6px; }

.link-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  transition: border-color 0.15s, background 0.15s;
}

.link-row:hover { border-color: rgba(56, 189, 248, 0.4); background: rgba(56, 189, 248, 0.06); }
.link-row .kind {
  flex: none;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  width: 48px;
}
.link-row .url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.link-row .arrow { margin-left: auto; color: var(--muted-2); flex: none; }

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

table { width: 100%; border-collapse: collapse; font-size: 12.5px; }

th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  background: rgba(255, 255, 255, 0.025);
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  color: var(--muted);
  vertical-align: middle;
}

tr:last-child td { border-bottom: 0; }

td.mono, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
td.name { color: var(--text); font-weight: 550; }
td .mini { display: block; color: var(--muted-2); font-size: 11px; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.09);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--muted);
  white-space: nowrap;
}

.tag.ok { color: #6ee7b7; background: rgba(52, 211, 153, 0.08); border-color: rgba(52, 211, 153, 0.2); }
.tag.warn { color: #fcd34d; background: rgba(251, 191, 36, 0.08); border-color: rgba(251, 191, 36, 0.2); }
.tag.off { color: var(--muted-2); }

.note {
  margin-top: 9px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.18);
  background: rgba(56, 189, 248, 0.06);
  color: #bae6fd;
  font-size: 12.5px;
  line-height: 1.55;
}

.drift {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.08);
  color: #fde68a;
  font-size: 12px;
}

/* ---------- toasts ---------- */

.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(380px, calc(100vw - 40px));
}

.toast {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(15, 23, 39, 0.96);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.9);
  font-size: 13px;
  color: var(--text);
  animation: toast-in 0.2s ease-out;
}

.toast .bar { width: 3px; align-self: stretch; border-radius: 3px; background: var(--green); flex: none; }
.toast.error .bar { background: var(--red); }
.toast.warn .bar { background: var(--amber); }
.toast .msg { flex: 1; line-height: 1.45; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- login ---------- */

.auth {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-card {
  width: min(400px, 100%);
  padding: 32px 30px 28px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(17, 26, 44, 0.92), rgba(10, 16, 28, 0.94));
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.95);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.9), rgba(129, 140, 248, 0.9), transparent);
}

.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.auth-brand .brand-mark { width: 42px; height: 42px; border-radius: 13px; }
.auth-brand .brand-mark svg { width: 22px; height: 22px; }

.auth h1 { margin: 0 0 5px; font-size: 22px; letter-spacing: -0.02em; }
.auth .sub { margin: 0 0 22px; color: var(--muted); font-size: 13px; }

.field { margin-bottom: 14px; }

.field label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: rgba(7, 11, 19, 0.6);
  color: var(--text);
  font-size: 14.5px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.auth .btn { width: 100%; height: 42px; font-size: 14px; margin-top: 6px; }

.auth-error {
  display: none;
  margin: 0 0 14px;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.1);
  color: #fecaca;
  font-size: 12.5px;
}

.auth-error.show { display: block; }

.auth .foot-note {
  margin: 18px 0 0;
  text-align: center;
  color: var(--muted-2);
  font-size: 11.5px;
}

.shake { animation: shake 0.3s ease-in-out; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(4, 18, 31, 0.25); border-top-color: #04121f; animation: spin 0.7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .topbar-inner { padding: 11px 16px; gap: 10px; flex-wrap: wrap; }
  .search { order: 3; width: 100%; margin-left: 0; }
  .page { padding: 20px 16px 40px; }
  .user-chip { display: none; }
  .grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 96px minmax(0, 1fr); }
  .modal { padding: 10px; }
  .modal-head, .modal-body, .modal-foot { padding-left: 16px; padding-right: 16px; }
  .toasts { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
