/* ============================================================
   apihost-cabinet — Design Tokens & Base Styles
   Версия: 1.0 | Используй этот файл как единственный источник стилей
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@700;800&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Фоны */
  --bg-root:      #0d0d0f;
  --bg-sidebar:   #111114;
  --bg-panel:     #161619;
  --bg-element:   #1a1a1f;
  --bg-hover:     #1e1e26;

  /* Границы */
  --border-subtle:  #1a1a20;
  --border-default: #1e1e26;
  --border-medium:  #222228;
  --border-strong:  #262630;
  --border-active:  #2a2a36;

  /* Текст */
  --text-primary:   #f0f0f6;
  --text-secondary: #e8e8ec;
  --text-body:      #c8c8d8;
  --text-muted:     #aaaaaa;
  --text-dim:       #888888;
  --text-subtle:    #666666;
  --text-ghost:     #555555;
  --text-phantom:   #444444;
  --text-disabled:  #3a3a48;

  /* Акцент фиолетовый */
  --accent:         oklch(0.55 0.25 280);
  --accent-2:       oklch(0.55 0.25 240);
  --accent-light:   oklch(0.75 0.18 280);
  --accent-dim:     oklch(0.55 0.25 280 / 0.18);
  --accent-border:  oklch(0.55 0.25 280 / 0.25);
  --accent-glow:    oklch(0.55 0.25 280 / 0.3);

  /* Статусы */
  --success: #059669;
  --error:   #dc2626;
  --warning: #d97706;

  /* Радиусы */
  --r-xs:  6px;
  --r-sm:  8px;
  --r-md:  10px;
  --r-lg:  12px;
  --r-xl:  14px;
  --r-2xl: 16px;
  --r-full: 9999px;

  /* Типографика */
  --font: 'Inter', sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--bg-root);
  color: var(--text-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  line-height: 1.5;
}

a { color: var(--accent-light); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, textarea, select {
  font-family: var(--font);
  font-size: inherit;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2a30; border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a42; }
* { scrollbar-width: thin; scrollbar-color: #2a2a30 transparent; }

/* ── Кнопки ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; border: none; cursor: pointer; font-weight: 600;
  border-radius: var(--r-md); transition: all 0.15s ease;
  white-space: nowrap; font-family: var(--font);
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; padding: 12px 28px; font-size: 14px;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px oklch(0.55 0.25 280 / 0.4);
}
.btn-secondary {
  background: none; border: 1px solid var(--border-strong);
  color: var(--text-dim); padding: 10px 20px; font-size: 13px;
}
.btn-secondary:hover { border-color: var(--border-active); color: var(--text-muted); }

.btn-outline-accent {
  background: var(--accent-dim); border: 1px solid var(--accent-border);
  color: var(--accent-light); padding: 10px 20px; font-size: 13px;
}
.btn-outline-accent:hover { background: oklch(0.55 0.25 280 / 0.28); }

.btn-sm { padding: 7px 16px; font-size: 12px; border-radius: var(--r-sm); }
.btn-lg { padding: 14px 32px; font-size: 15px; border-radius: var(--r-xl); }
.btn-full { width: 100%; }

/* ── Поля ввода ── */
.input {
  width: 100%; padding: 11px 14px; border-radius: var(--r-md);
  border: 1px solid var(--border-strong); background: var(--bg-element);
  color: var(--text-primary); font-size: 14px; outline: none;
  transition: border-color 0.15s;
}
.input:focus { border-color: var(--accent-border); }
.input::placeholder { color: var(--text-disabled); }

.input-label {
  display: block; font-size: 12px; font-weight: 500;
  color: var(--text-subtle); margin-bottom: 7px;
}
.input-group { margin-bottom: 18px; }

/* ── Карточка/Панель ── */
.card {
  background: var(--bg-panel); border: 1px solid var(--border-default);
  border-radius: var(--r-lg); padding: 24px;
}
.card:hover { border-color: var(--border-active); }

/* ── Логотип ── */
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 17px; font-weight: 700; color: var(--text-primary);
  text-decoration: none; letter-spacing: -0.02em;
}
.logo-icon {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ── Auth-обёртка ── */
.auth-wrap {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 24px;
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--bg-panel); border: 1px solid var(--border-default);
  border-radius: var(--r-2xl); padding: 36px 32px;
}
.auth-logo { display: flex; justify-content: center; margin-bottom: 32px; }
.auth-title {
  font-size: 22px; font-weight: 700; color: var(--text-primary);
  text-align: center; margin-bottom: 8px; letter-spacing: -0.02em;
}
.auth-subtitle { font-size: 14px; color: var(--text-dim); text-align: center; margin-bottom: 28px; line-height: 1.6; }
.auth-footer { text-align: center; margin-top: 22px; font-size: 13px; color: var(--text-ghost); }
.auth-footer a { color: var(--accent-light); }

/* ── Публичный navbar ── */
.pub-nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 0 48px; height: 64px;
  background: rgba(13,13,15,0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.pub-nav > .logo { position: absolute; left: 48px; }
.pub-nav-links { display: flex; gap: 56px; align-items: center; }
.pub-nav-links a { font-size: 14px; color: var(--text-dim); text-decoration: none; transition: color 0.15s; }
.pub-nav-links a:hover { color: var(--text-primary); text-decoration: none; }
.pub-nav-actions { position: absolute; right: 48px; display: flex; gap: 10px; align-items: center; }
.pub-nav-ava {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; text-decoration: none;
  cursor: pointer; transition: opacity .15s; flex-shrink: 0;
}
.pub-nav-ava:hover { opacity: .8; }

/* ── Публичный footer ── */
.pub-footer {
  border-top: 1px solid var(--border-subtle); padding: 40px 48px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.pub-footer-links { display: flex; gap: 20px; }
.pub-footer-links a { font-size: 13px; color: var(--text-ghost); transition: color 0.15s; text-decoration: none; }
.pub-footer-links a:hover { color: var(--text-muted); }
.pub-footer-copy { font-size: 12px; color: var(--text-disabled); }

/* ── Юридическая страница ── */
.legal-wrap { max-width: 740px; margin: 0 auto; padding: 48px 24px 80px; }
.legal-wrap h1 { font-size: 28px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; letter-spacing: -0.02em; }
.legal-wrap .updated { font-size: 12px; color: var(--text-disabled); margin-bottom: 40px; }
.legal-wrap h2 { font-size: 16px; font-weight: 600; color: var(--text-primary); margin: 32px 0 12px; }
.legal-wrap p { font-size: 14px; color: var(--text-body); line-height: 1.75; margin-bottom: 14px; }
.legal-wrap ul { padding-left: 20px; margin-bottom: 14px; }
.legal-wrap li { font-size: 14px; color: var(--text-body); line-height: 1.75; margin-bottom: 6px; }

/* ── Divider ── */
.divider {
  display: flex; align-items: center; gap: 12px; margin: 22px 0;
  font-size: 12px; color: var(--text-disabled);
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border-strong);
}

/* ── Badge ── */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: var(--r-full);
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
}
.badge-accent { background: var(--accent-dim); color: var(--accent-light); border: 1px solid var(--accent-border); }
.badge-success { background: #05966920; color: #34d399; border: 1px solid #05966940; }

/* ── Анимации ── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.3s ease forwards; }

/* ══════════════════════════════════════════
   Mobile — публичные страницы
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Navbar */
  .pub-nav { padding: 0 16px; height: 56px; }
  .pub-nav-links { display: none; }
  .pub-nav-actions { gap: 6px; }
  .pub-nav-actions .btn-secondary { display: none; }   /* скрыть «Войти» — только «Начать» */
  .pub-nav-actions .btn-sm { padding: 7px 14px; font-size: 12px; }

  /* Footer */
  .pub-footer { padding: 24px 16px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .pub-footer-links { flex-wrap: wrap; gap: 12px; }
}

