/* Tzada VPN — interface
   Design pass guiado pela skill "unslop" by Damir Sokolovsky (@heydamir), CC BY 4.0.
   Marca real da Tzada mantida: near-black, acento âmbar, o pato, Inter. */

:root {
  --bg: #0a0a0b;
  --surface: #141416;
  --surface-2: #1b1b1f;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #ededec;
  --text-2: #a2a2a8;
  --text-3: #6e6e76;
  --accent: #f8a51c;
  --accent-ink: #1b1403;
  --good: #46b277;
  --bad: #d8695f;
  --r-control: 10px;
  --r-card: 14px;
  --r-panel: 16px;
}

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

.shell { max-width: 1080px; margin: 0 auto; padding: 20px 24px 64px; }

/* ---- Navegação ---- */
.nav { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-brand .mark { width: 32px; height: 32px; border-radius: 50%; display: block; }
.nav-brand .word { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 18px; }
.app-state { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.app-state .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.app-state.on .dot { background: var(--good); }
.app-state.off .dot { background: var(--bad); }
.link { color: var(--text-2); font-size: 13px; text-decoration: none; cursor: pointer; }
.link:hover { color: var(--text); }

/* ---- Base ---- */
.hidden { display: none !important; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-panel);
  padding: 24px;
}
.muted { color: var(--text-2); }
.mono { font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", monospace; font-variant-numeric: tabular-nums; }

/* ---- Tela de key (split) ---- */
.enter { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; margin-top: 44px; }
.enter-left .duck { width: 150px; height: 150px; border-radius: 50%; display: block; margin-bottom: 24px; }
.enter-left h1 { font-size: 30px; font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 10px; }
.enter-left p { color: var(--text-2); font-size: 15px; margin: 0; max-width: 360px; }

.field-label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.key-input {
  width: 100%; background: var(--bg); border: 1px solid var(--border-strong);
  color: var(--text); border-radius: var(--r-control); padding: 12px 14px;
  font-family: ui-monospace, monospace; font-size: 14px; letter-spacing: 0.04em;
}
.key-input::placeholder { color: var(--text-3); letter-spacing: 0.04em; }
.key-input:focus { outline: none; border-color: var(--accent); }

.btn {
  border: 1px solid transparent; border-radius: var(--r-control); padding: 11px 18px;
  font-size: 14px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn:active { transform: translateY(0.5px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #ffb53a; }
.btn-primary:disabled { background: var(--surface-2); color: var(--text-3); cursor: not-allowed; }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--border-strong); }
.btn-quiet { background: transparent; color: var(--bad); border-color: var(--border); }
.btn-quiet:hover { border-color: var(--border-strong); }
.btn-full { width: 100%; }
.btn .ic { width: 16px; height: 16px; }

.enter-form { margin-top: 18px; }
.note { margin-top: 12px; font-size: 13px; min-height: 18px; }
.note.err { color: var(--bad); }
.note.ok { color: var(--good); }
.note.info { color: var(--text-2); }

/* ---- Faixa de instalação (quieta) ---- */
.install-bar {
  display: flex; align-items: center; gap: 14px; margin-top: 28px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 14px 16px;
}
.install-bar .ic { width: 18px; height: 18px; color: var(--text-2); flex-shrink: 0; }
.install-bar .t { flex: 1; font-size: 13px; color: var(--text-2); }
.install-bar .t b { color: var(--text); font-weight: 500; }

/* ---- Dashboard ---- */
.dash { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.section-head h2 { font-size: 16px; font-weight: 600; margin: 0; }
.section-head .meta { font-size: 13px; color: var(--text-3); }

.servers { display: flex; flex-direction: column; gap: 6px; }
.server {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer;
  background: transparent; border: 1px solid var(--border); border-radius: var(--r-control);
  transition: border-color 0.15s, background-color 0.15s;
}
.server:hover { border-color: var(--border-strong); }
.server.sel { border-color: var(--accent); background: var(--surface); }
.server .pin { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex-shrink: 0; }
.server.sel .pin { background: var(--accent); }
.server .info { flex: 1; min-width: 0; }
.server .info .n { font-size: 14px; color: var(--text); }
.server .info .e { font-size: 12px; color: var(--text-3); }

/* ---- Momento: status da conexão ---- */
.status { display: flex; flex-direction: column; }
.status-head { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.status-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); }
.status-head.on .dot { background: var(--good); }
.status-head .label { font-size: 15px; font-weight: 500; }
.status-head .sub { margin-left: auto; font-size: 13px; color: var(--text-3); }

.rows { display: flex; flex-direction: column; }
.kv { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--text-2); }
.kv .v { color: var(--text); }
.kv .v.dim { color: var(--text-3); }

.status-actions { margin-top: 20px; }

/* ---- Admin ---- */
.admin-wrap { max-width: 860px; margin: 0 auto; padding: 24px; }
.admin-login { max-width: 360px; margin: 80px auto 0; }
.gen-row { display: flex; gap: 10px; margin-bottom: 24px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 500; color: var(--text-3); padding: 8px 10px; border-bottom: 1px solid var(--border); }
.table td { padding: 10px; border-bottom: 1px solid var(--border); color: var(--text); }
.table tr:hover td { background: var(--surface); }
.tag { font-size: 12px; color: var(--text-2); }
.tag.live { color: var(--good); }
.tag.dead { color: var(--text-3); }
.copy { cursor: pointer; color: var(--text-2); }
.copy:hover { color: var(--accent); }

/* ---- Responsivo ---- */
@media (max-width: 760px) {
  .enter, .dash { grid-template-columns: 1fr; }
  .enter { gap: 28px; margin-top: 28px; }
  .enter-left .duck { width: 96px; height: 96px; }
  .enter-left h1 { font-size: 24px; }
}
