/* LibraChat — общие CSS-переменные (из шаблона) */
:root {
  --bg-primary: #040408;
  --bg-secondary: #080810;
  --bg-card: rgba(13, 13, 26, 0.9);
  --text-primary: #f0eeff;
  --text-secondary: #9ca3b8;
  --text-muted: #6b7280;
  --brand-start: #7b2fbe;
  --brand-mid: #a78bfa;
  --brand-end: #f472b6;
  --border-light: rgba(255,255,255,0.07);
  --border-glow: rgba(167,139,250,0.35);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-full: 9999px;
  --shadow-glow: 0 4px 24px rgba(167,139,250,0.4);
  --sidebar-w: 260px;
  --header-h: 68px;
  --success: #34d399;
  --danger: #f87171;
  --warning: #fbbf24;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; }
img { max-width: 100%; }

.container-site {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-gradient {
  background: linear-gradient(135deg, var(--brand-start), var(--brand-mid), var(--brand-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 16px 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(167,139,250,0.08);
  border: 1px solid rgba(167,139,250,0.18);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  text-transform: uppercase;
}
.badge-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand-mid);
}

.btn-primary-glow {
  background: linear-gradient(135deg, var(--brand-start), var(--brand-mid), var(--brand-end));
  color: white;
  border: none;
  box-shadow: var(--shadow-glow);
  transition: transform 150ms, box-shadow 150ms;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
}
.btn-primary-glow:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 32px rgba(167,139,250,0.5);
}
.btn-primary-glow:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.14);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 150ms, background 150ms;
}
.btn-outline:hover {
  border-color: rgba(167,139,250,0.4);
  background: rgba(167,139,250,0.08);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: var(--radius-full);
}

.facet-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 200ms, transform 200ms, box-shadow 200ms;
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-decoration: none;
  color: inherit;
}
.facet-card:hover {
  border-color: rgba(167,139,250,0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  background: rgba(13,13,26,0.9);
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 150ms;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: rgba(167,139,250,0.5);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-select option { background: #0d0d1a; }

.alert {
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid;
}
.alert-success { background: rgba(52,211,153,0.1); border-color: rgba(52,211,153,0.3); color: #6ee7b7; }
.alert-error { background: rgba(248,113,113,0.1); border-color: rgba(248,113,113,0.3); color: #fca5a5; }
.alert-info { background: rgba(167,139,250,0.1); border-color: rgba(167,139,250,0.3); color: #c4b5fd; }
.alert-warning { background: rgba(251,191,36,0.1); border-color: rgba(251,191,36,0.3); color: #fcd34d; }

.site-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 48px;
}

.desktop-only { display: block; }
.mobile-only { display: none; }

@media (max-width: 768px) {
  .container-site { padding: 0 16px; }
  .site-footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .desktop-only { display: none !important; }
  .mobile-only { display: block !important; }
  .desktop-nav { display: none !important; }
}

/* Public header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 16px 0;
  background: rgba(4,4,8,0.4);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo-img {
  height: 34px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}
/* Прямоугольный логотип с названием внутри */
.logo-img--brand {
  height: 40px;
  max-width: min(280px, 58vw);
  width: auto;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}
.logo:has(.logo-img--brand):not(:has(.logo-text)) {
  gap: 0;
}
@media (max-width: 768px) {
  .logo-img--brand {
    height: 34px;
    max-width: min(220px, 62vw);
  }
}
.logo-mark {
  width: 34px; height: 34px;
  background: var(--brand-mid);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 18px;
}
.logo-text {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: white;
  font-size: 18px;
}
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 150ms;
}
.nav-link:hover { color: var(--text-primary); }

.mobile-menu-btn {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
@media (max-width: 768px) {
  .mobile-menu-btn { display: flex; }
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(4,4,8,0.97);
  padding: 24px;
  flex-direction: column;
  gap: 20px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
