:root {
  --bg: #07060b;
  --bg-soft: #0b0911;
  --surface: #100d18;
  --surface-2: #151020;
  --surface-3: #1b1528;
  --border: rgba(183, 148, 255, .12);
  --border-hover: rgba(183, 148, 255, .24);
  --text: #f7f4fb;
  --text-dim: #a69caf;
  --hint: #71687c;
  --purple: #8b5cf6;
  --purple-2: #a78bfa;
  --purple-dark: #6d28d9;
  --gradient: linear-gradient(135deg, #b08cff 0%, #8b5cf6 48%, #6d28d9 100%);
  --success: #34d399;
  --destructive: #fb7185;
  --warning: #fbbf24;
  --radius: 18px;
  --radius-sm: 11px;
  --shadow: 0 20px 60px rgba(0,0,0,.28);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(800px 420px at 50% -10%, rgba(124,58,237,.18), transparent 70%),
    radial-gradient(600px 500px at 0% 35%, rgba(91,33,182,.07), transparent 70%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .28;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

a { color: var(--purple-2); text-decoration: none; }
a:hover { color: #c4b5fd; }
button, input, textarea { font-family: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

/* ---------- Shared ---------- */

.logo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 8px 28px rgba(124,58,237,.25);
  font-weight: 800;
  overflow: hidden;
}
.logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.btn-primary, .btn-secondary, .btn-link, .btn-danger {
  border-radius: var(--radius-sm);
  padding: 10px 17px;
  font-size: 14px;
  font-weight: 650;
  transition: .18s ease;
}

.btn-primary {
  border: 1px solid rgba(255,255,255,.08);
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 8px 24px rgba(124,58,237,.18);
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(124,58,237,.28);
  text-decoration: none;
}

.btn-secondary {
  color: var(--text);
  background: rgba(255,255,255,.035);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: rgba(255,255,255,.06);
  border-color: var(--border-hover);
  text-decoration: none;
}

.btn-danger {
  color: var(--destructive);
  background: rgba(251,113,133,.07);
  border: 1px solid rgba(251,113,133,.2);
}
.btn-link {
  padding: 4px 0;
  color: var(--text-dim);
  background: transparent;
  border: 0;
}
.btn-link:hover { color: var(--text); }
.btn-small { padding: 8px 13px; font-size: 13px; }
button:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Landing ---------- */

.topbar {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -.02em;
}
.topbar .brand .logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.topbar .actions { display: flex; gap: 9px; }

.hero {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 105px 24px 90px;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 220px;
  left: 50%;
  top: 80px;
  transform: translateX(-50%);
  background: rgba(124,58,237,.16);
  filter: blur(100px);
  pointer-events: none;
}

.hero h1 {
  position: relative;
  margin: 0 auto 22px;
  max-width: 820px;
  font-size: clamp(42px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -.055em;
}
.hero h1 span {
  background: linear-gradient(135deg, #d8b4fe, #a78bfa 42%, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  position: relative;
  max-width: 650px;
  margin: 0 auto 32px;
  color: var(--text-dim);
  font-size: 17px;
  line-height: 1.7;
}
.hero .actions {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.section {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 52px 28px;
}
.section h2 {
  margin: 0 0 22px;
  font-size: 25px;
  letter-spacing: -.025em;
}

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.feature-card {
  min-height: 190px;
  padding: 24px;
  background: linear-gradient(145deg, rgba(22,16,32,.95), rgba(12,10,18,.95));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(0,0,0,.12);
  transition: transform .2s, border-color .2s, background .2s;
}
.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  background: linear-gradient(145deg, rgba(28,20,42,.98), rgba(14,11,21,.98));
}
.feature-card .icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border-radius: 11px;
  color: var(--purple-2);
  background: rgba(139,92,246,.1);
  border: 1px solid rgba(139,92,246,.13);
  font-size: 19px;
}
.feature-card .icon svg { width: 19px; height: 19px; }
.feature-card h3 { margin: 0 0 9px; font-size: 15px; }
.feature-card p { margin: 0; color: var(--text-dim); font-size: 13px; line-height: 1.6; }

.models-table-head {
  display: grid;
  grid-template-columns: 1.7fr 1.3fr .7fr;
  gap: 12px;
  padding: 0 17px 9px;
  color: var(--hint);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.models-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.model-card {
  display: grid;
  grid-template-columns: 1.7fr 1.3fr .7fr;
  align-items: center;
  gap: 12px;
  padding: 15px 17px;
  background: rgba(16,13,24,.82);
  border: 1px solid var(--border);
  border-radius: 13px;
  transition: .18s ease;
}
.model-card:hover { border-color: var(--border-hover); transform: translateY(-1px); }
.model-card .name { font-size: 14px; font-weight: 650; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.model-card .brand { margin-top: 3px; color: var(--hint); font-size: 12px; }
.model-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.model-badge.text { color: var(--purple-2); background: rgba(139,92,246,.12); border: 1px solid rgba(139,92,246,.18); }
.model-badge.image { color: #6ee7d8; background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.2); }
.model-card .model-id {
  padding: 6px 10px;
  color: #cfc6dc;
  background: rgba(255,255,255,.035);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  width: fit-content;
  max-width: 100%;
  word-break: break-all;
}
.model-price {
  justify-self: start;
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 999px;
  color: #c4b5fd;
  background: rgba(139,92,246,.09);
  border: 1px solid rgba(139,92,246,.12);
  font-size: 12px;
  white-space: nowrap;
}

.footer {
  padding: 50px 24px 36px;
  text-align: center;
  color: var(--hint);
  font-size: 12px;
}

/* ---------- Auth ---------- */

.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 390px;
  padding: 38px;
  background: rgba(16,13,24,.9);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.auth-card .logo {
  width: 54px;
  height: 54px;
  margin: 0 auto 20px;
  border-radius: 50%;
  font-size: 23px;
}
.auth-card h1 {
  margin: 0 0 7px;
  text-align: center;
  font-size: 22px;
  letter-spacing: -.025em;
}
.auth-card .sub {
  margin: 0 0 27px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  margin-bottom: 7px;
  color: #c1b8cd;
  font-size: 12px;
  font-weight: 550;
}
.field input {
  width: 100%;
  padding: 12px 13px;
  color: var(--text);
  background: rgba(255,255,255,.035);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  font-size: 14px;
  transition: .18s;
}
.field input:hover { border-color: rgba(183,148,255,.2); }
.field input:focus {
  border-color: rgba(139,92,246,.65);
  box-shadow: 0 0 0 3px rgba(139,92,246,.1);
}
.auth-card .btn-primary { width: 100%; padding: 12px; margin-top: 3px; }
.auth-error {
  margin: 14px 0 0;
  color: var(--destructive);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}
.auth-switch {
  margin: 22px 0 0;
  color: var(--text-dim);
  font-size: 13px;
  text-align: center;
}

/* ---------- Dashboard ---------- */

.app { display: flex; min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  width: 248px;
  height: 100vh;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 22px 14px;
  background: rgba(9,7,13,.88);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(20px);
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 10px 25px;
  font-weight: 750;
  letter-spacing: -.02em;
}
.sidebar .brand .logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.nav-item {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 11px;
  text-align: left;
  font-size: 13.5px;
  transition: .18s;
}
.nav-item:hover {
  color: var(--text);
  background: rgba(255,255,255,.035);
}
.nav-item.active {
  color: #eee8ff;
  background: linear-gradient(90deg, rgba(139,92,246,.14), rgba(139,92,246,.04));
  border-color: rgba(139,92,246,.1);
  font-weight: 650;
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 9px;
  bottom: 9px;
  width: 2px;
  border-radius: 2px;
  background: var(--purple);
  box-shadow: 0 0 14px rgba(139,92,246,.7);
}

/* ---------- Inline icons on buttons ---------- */

.btn-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: inline-block;
  vertical-align: -3px;
  margin-right: 7px;
}
.nav-item .btn-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin-right: 0;
  vertical-align: middle;
  color: var(--purple-2);
  opacity: .85;
}
.nav-item.active .btn-icon { color: var(--purple-2); opacity: 1; }
.btn-link .btn-icon { margin-right: 5px; }

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 15px 10px 4px;
  color: var(--text-dim);
  font-size: 13px;
}

.main {
  width: 100%;
  max-width: 1180px;
  padding: 42px 48px 70px;
}
.tab h2 {
  margin: 0 0 24px;
  font-size: 26px;
  letter-spacing: -.03em;
}
.tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card {
  margin-bottom: 15px;
  padding: 22px;
  background: linear-gradient(145deg, rgba(18,14,27,.96), rgba(12,10,18,.96));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 36px rgba(0,0,0,.12);
}
.card-title {
  margin-bottom: 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}
.row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.row:first-of-type { border-top: none; padding-top: 0; }
.row-label {
  flex: 0 0 auto;
  min-width: 20px;
  color: var(--purple-2);
  font-weight: 650;
}
.row-value { color: var(--text-dim); line-height: 1.5; }
.row-value code, .card p code {
  padding: 1px 6px;
  color: #d8c8ff;
  background: rgba(139,92,246,.1);
  border-radius: 5px;
  font-size: 12px;
}
.hint {
  color: var(--hint);
  font-size: 12.5px;
  line-height: 1.5;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.tool-btn {
  padding: 10px 12px;
  color: var(--text-dim);
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 550;
  text-align: center;
  transition: .15s;
}
.tool-btn:hover { border-color: var(--border-hover); color: var(--text); }
.tool-btn.active {
  color: #eee8ff;
  background: linear-gradient(90deg, rgba(139,92,246,.16), rgba(139,92,246,.05));
  border-color: rgba(139,92,246,.35);
}
.balance-card {
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}
.balance-card::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 180px;
  right: -90px;
  top: -70px;
  background: rgba(139,92,246,.14);
  filter: blur(65px);
  pointer-events: none;
}
.balance-card .amount {
  position: relative;
  z-index: 1;
  font-size: 34px;
  font-weight: 750;
  letter-spacing: -.04em;
}
.balance-card .label {
  margin-bottom: 6px;
  color: var(--text-dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.balance-card .btn-secondary { position: relative; z-index: 1; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.table-wrap {
  overflow: hidden auto;
  background: rgba(12,10,18,.55);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  padding: 12px 13px;
  color: var(--hint);
  background: rgba(255,255,255,.018);
  border-bottom: 1px solid var(--border);
  font-weight: 550;
  text-align: left;
}
td { padding: 13px; border-bottom: 1px solid rgba(183,148,255,.07); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.015); }
thead:first-child tr:first-child th:first-child { border-top-left-radius: calc(var(--radius) - 1px); }
thead:first-child tr:first-child th:last-child { border-top-right-radius: calc(var(--radius) - 1px); }
tbody:last-child tr:last-child td:first-child { border-bottom-left-radius: calc(var(--radius) - 1px); }
tbody:last-child tr:last-child td:last-child { border-bottom-right-radius: calc(var(--radius) - 1px); }

.tabs-inline {
  display: flex;
  gap: 6px;
  margin-bottom: 15px;
}
.tabs-inline button {
  padding: 8px 13px;
  color: var(--text-dim);
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
}
.tabs-inline button:hover { color: var(--text); }
.tabs-inline button.active {
  color: #fff;
  background: var(--gradient);
  border-color: transparent;
  box-shadow: 0 5px 18px rgba(124,58,237,.18);
}

.key-value {
  padding: 9px 11px;
  color: #cfc6dc;
  background: rgba(255,255,255,.035);
  border: 1px solid var(--border);
  border-radius: 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  word-break: break-all;
}

.empty-state {
  padding: 30px 0;
  color: var(--hint);
  font-size: 13px;
  text-align: center;
}

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  padding: 12px 18px;
  color: var(--text);
  background: rgba(22,17,31,.94);
  border: 1px solid var(--border-hover);
  border-radius: 12px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  font-size: 13px;
}
.toast.success { color: var(--success); border-color: rgba(52,211,153,.25); }
.toast.error { color: var(--destructive); border-color: rgba(251,113,133,.25); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5,4,9,.6);
  backdrop-filter: blur(6px);
  animation: modal-fade .15s ease;
}
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  width: 100%;
  max-width: 380px;
  padding: 26px;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: modal-pop .16s ease;
}
@keyframes modal-pop {
  from { opacity: 0; transform: translateY(6px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-card h3 { margin: 0 0 8px; font-size: 18px; }
.modal-message { margin: 0 0 18px; color: var(--text-dim); font-size: 13.5px; line-height: 1.5; }
.modal-field { margin: 18px 0 4px; }
.modal-hint { margin-top: 7px; }
.modal-error {
  margin-top: 8px;
  color: var(--destructive);
  font-size: 12.5px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}
.modal-actions .btn-secondary,
.modal-actions .btn-primary,
.modal-actions .btn-danger { padding: 10px 18px; }

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
}
pre {
  padding: 16px;
  overflow-x: auto;
  color: #d8d0e2;
  background: rgba(8,7,12,.8);
  border: 1px solid var(--border);
  border-radius: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .main { padding: 34px 28px 60px; }
}

@media (max-width: 720px) {
  .topbar { padding: 17px 18px; }
  .topbar .actions .btn-secondary { display: none; }
  .hero { padding: 78px 20px 65px; }
  .hero h1 { font-size: 43px; }
  .hero p { font-size: 15px; }
  .section { padding: 38px 18px; }
  .features { grid-template-columns: 1fr; }
  .feature-card { min-height: auto; }
  .auth-card { padding: 30px 24px; }

  .app { flex-direction: column; }
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 12px;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
  }
  .sidebar .brand { padding: 0 12px 0 2px; }
  .nav { flex-direction: row; flex: 0 0 auto; }
  .nav-item { white-space: nowrap; width: auto; }
  .nav-item.active::before { display: none; }
  .sidebar-footer {
    flex-direction: row;
    align-items: center;
    margin-left: 5px;
    padding: 0 0 0 12px;
    white-space: nowrap;
  }
  .sidebar-footer .lang-switch { width: auto; min-width: 132px; }
  .main { padding: 24px 18px 45px; }
  .grid-2 { grid-template-columns: 1fr; }
  .balance-card { align-items: flex-start; flex-direction: column; gap: 18px; }

  .models-table-head { display: none; }
  .model-card { grid-template-columns: 1fr; justify-items: start; gap: 8px; }
  .model-price { justify-self: start; }
}
/* ---------- Theme ---------- */
:root { color-scheme: dark; }

/* ---------- Language switcher ---------- */
.lang-switch {
  position: relative;
  width: 100%;
}
.lang-switch-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  color: var(--text-dim);
  background: rgba(255,255,255,.025);
  border: 1px solid var(--border);
  border-radius: 11px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: .18s ease;
  text-align: left;
}
.lang-switch-btn:hover,
.lang-switch.open .lang-switch-btn {
  color: var(--text);
  border-color: var(--border-hover);
  background-color: rgba(139,92,246,.08);
}
.lang-switch-btn .lang-switch-flag { font-size: 15px; line-height: 1; flex: 0 0 auto; }
.lang-switch-btn .lang-switch-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-switch-caret {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: var(--hint);
  transition: transform .18s ease;
}
.lang-switch.open .lang-switch-caret { transform: rotate(180deg); }

.lang-switch-menu {
  position: fixed;
  z-index: 60;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.lang-switch-menu li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  transition: .12s ease;
}
.lang-switch-menu li:hover {
  color: var(--text);
  background: rgba(139,92,246,.12);
}
.lang-switch-menu li[aria-selected="true"] {
  color: var(--text);
  background: linear-gradient(90deg, rgba(124,58,237,.22), rgba(124,58,237,.06));
}
.lang-switch-menu .lang-switch-flag { font-size: 15px; line-height: 1; }

.topbar .lang-switch {
  width: auto;
  min-width: 150px;
}
.topbar .lang-switch-btn {
  padding: 8px 12px;
}

.lang-switch-auth {
  position: absolute;
  top: 20px;
  right: 20px;
  width: auto;
  min-width: 132px;
}
.lang-switch-auth .lang-switch-btn {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;
}
.auth-card { position: relative; }

/* ---------- API documentation ---------- */
.docs-intro {
  margin: -8px 0 24px;
  max-width: 760px;
  color: var(--text-dim);
  line-height: 1.65;
  font-size: 14px;
}
.docs-hero {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 14px;
  margin-bottom: 18px;
}
.docs-callout {
  margin: 0;
  padding: 20px 22px;
  border: 1px solid rgba(139,92,246,.2);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(139,92,246,.13), rgba(109,40,217,.035));
}
.docs-callout .eyebrow {
  margin-bottom: 7px;
  color: var(--purple-2);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
}
.docs-callout h3 { margin: 0 0 7px; font-size: 17px; }
.docs-callout p { margin: 0; color: var(--text-dim); line-height: 1.55; font-size: 13px; }
.docs-endpoint {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 18px 20px;
}
.docs-endpoint .endpoint-label { color: var(--hint); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.docs-endpoint code {
  display: block;
  padding: 10px 12px;
  overflow-x: auto;
  color: var(--purple-2);
  background: rgba(139,92,246,.08);
  border-radius: 9px;
  font-size: 12px;
}
.docs-section-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 28px 2px 11px;
}
.docs-section-title h3 { margin: 0; font-size: 16px; }
.docs-section-title span { color: var(--hint); font-size: 12px; }
.docs-steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.docs-step {
  position: relative;
  padding: 17px;
  min-height: 116px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.docs-step-num {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  margin-bottom: 11px;
  border-radius: 8px;
  color: #fff;
  background: var(--gradient);
  font-size: 12px; font-weight: 750;
}
.docs-step strong { display:block; margin-bottom: 5px; font-size: 13px; }
.docs-step p { margin:0; color:var(--text-dim); font-size:12px; line-height:1.5; }
.docs-definition-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.docs-definition {
  padding: 16px;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--surface);
}
.docs-definition code { color:var(--purple-2); font-size:12px; }
.docs-definition p { margin:7px 0 0; color:var(--text-dim); font-size:12px; line-height:1.5; }
.docs-code-card { padding: 18px; }
.docs-code-card .card-title { margin-bottom:9px; }
.docs-code-card .hint { margin-top:8px; }
.docs-errors { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.docs-error {
  display:flex; align-items:flex-start; gap:12px;
  padding:14px 16px; border:1px solid var(--border); border-radius:13px;
  background:var(--surface);
}
.docs-error-code { font-weight:750; color:var(--purple-2); font-size:13px; }
.docs-error p { margin:2px 0 0; color:var(--text-dim); font-size:12px; line-height:1.45; }
.docs-selector-card { margin-top: 18px; }
.docs-selector-card .card-title { margin-bottom: 10px; }
@media (max-width: 800px) {
  .docs-hero, .docs-steps, .docs-definition-grid, .docs-errors { grid-template-columns:1fr; }
}