@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@500;600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #0F2530;
  --ink-soft: #4A6470;
  --paper: #F5F9FA;
  --card: #FFFFFF;
  --teal: #0D9488;
  --teal-dark: #0F5A54;
  --teal-soft: #E3F5F2;
  --blue: #2563EB;
  --blue-soft: #E8EFFE;
  --coral: #F76B4C;
  --coral-dark: #C64A30;
  --coral-soft: #FEEAE4;
  --amber: #F5A623;
  --amber-soft: #FDF0DC;
  --green: #16A34A;
  --green-soft: #E4F6EA;
  --red: #DC2626;
  --red-soft: #FDECEC;
  --line: rgba(15, 37, 48, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Manrope', Arial, sans-serif;
}

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px 40px; position: relative; }

/* ===== Шапка ===== */
header.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
  z-index: 5;
}
header.site-header .brand { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
header.site-header img.logo { width: auto; }
.logo-divider { width: 1px; height: 48px; background: var(--line); margin: 0 4px; }
header.site-header .brand-name { font-family: 'Unbounded', sans-serif; font-weight: 600; font-size: 15px; line-height: 1.3; color: var(--ink); overflow-wrap: break-word; word-break: break-word; }
header.site-header .brand-sub { font-size: 12px; color: var(--ink-soft); font-weight: 500; }

nav.site-nav { display: flex; gap: 4px; background: var(--card); padding: 6px; border-radius: 999px; box-shadow: 0 1px 4px rgba(15,37,48,0.08); }
nav.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 999px;
}
nav.site-nav a:hover { background: var(--teal-soft); color: var(--teal-dark); }

.site-subnav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 24px;
  flex-wrap: wrap;
  position: relative;
  z-index: 5;
}
.site-subnav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
}
.site-subnav a:hover { background: var(--card); }
.site-subnav a.active { background: var(--coral-soft); color: var(--coral-dark); }

/* ===== Карточки ===== */
.card {
  background: var(--card);
  border: none;
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(15,37,48,0.06);
}
.card-narrow { max-width: 420px; margin: 40px auto 0; }

h1, h2, h3 { font-family: 'Unbounded', sans-serif; font-weight: 600; margin-top: 0; color: var(--ink); }
h1 { font-size: 32px; } h2 { font-size: 24px; } h3 { font-size: 17px; }

label { display: block; font-size: 12px; color: var(--ink-soft); font-weight: 700; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 14px;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--coral), var(--coral-dark));
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 13px 24px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(247,107,76,0.3);
  font-family: 'Manrope', sans-serif;
}
.btn:hover { opacity: 0.94; }
.btn.green { background: linear-gradient(135deg, var(--teal), var(--teal-dark)); box-shadow: 0 6px 16px rgba(13,148,136,0.3); }
.btn.red { background: linear-gradient(135deg, var(--red), #B91C1C); box-shadow: 0 6px 16px rgba(220,38,38,0.25); }
.btn.ghost { background: var(--card); color: var(--ink); box-shadow: none; border: 1.5px solid var(--line); }
.btn.ghost:hover { background: var(--paper); }

/* ===== Плашки-статусы ===== */
.stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.stamp.blue { color: var(--blue); background: var(--blue-soft); }
.stamp.green { color: var(--teal-dark); background: var(--teal-soft); }
.stamp.red { color: var(--red); background: var(--red-soft); }
.stamp.amber { color: #92400E; background: var(--amber-soft); }
.stamp.gray { color: var(--ink-soft); background: var(--paper); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 12px 14px; background: var(--paper); color: var(--ink-soft); font-weight: 700; }
td { padding: 12px 14px; border-top: 1px solid var(--line); }
tr:hover td { background: rgba(13,148,136,0.03); }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.alert { padding: 12px 16px; border-radius: 14px; font-size: 13px; margin-bottom: 14px; font-weight: 500; }
.alert.error { background: var(--red-soft); color: var(--red); }
.alert.success { background: var(--teal-soft); color: var(--teal-dark); }
.alert.warn { background: var(--amber-soft); color: #92400E; }

/* ===== Hero / декоративный фон ===== */
.hero {
  text-align: center;
  padding: 48px 32px;
  position: relative;
  overflow: hidden;
}
.hero::before, .hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  z-index: 0;
}
.hero::before { width: 320px; height: 320px; background: var(--teal-soft); top: -140px; right: -100px; }
.hero::after { width: 260px; height: 260px; background: var(--blue-soft); bottom: -120px; left: -80px; }
.hero > * { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--teal-soft); color: var(--teal-dark);
  font-size: 12px; font-weight: 700; padding: 7px 16px; border-radius: 999px; margin-bottom: 18px;
}
.hero-title { font-family: 'Unbounded', sans-serif; font-size: 30px; font-weight: 700; color: var(--ink); margin-bottom: 14px; line-height: 1.2; overflow-wrap: break-word; word-break: break-word; }
.hero-text { font-size: 15px; color: var(--ink-soft); max-width: 520px; margin: 0 auto 26px; line-height: 1.6; }

/* ===== Шаги / статистика ===== */
.step-card { display: flex; gap: 14px; align-items: flex-start; }
.step-icon {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-family: 'Unbounded'; font-size: 14px; flex-shrink: 0;
}
.step-title { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.step-text { font-size: 13px; color: var(--ink-soft); line-height: 1.6; }

.stat-box { display: flex; align-items: center; gap: 12px; }
.stat-box .value { font-family: 'Unbounded', sans-serif; font-size: 24px; font-weight: 700; color: var(--teal-dark); }
.stat-box .label { font-size: 12px; color: var(--ink-soft); font-weight: 600; }

/* ===== Админка ===== */
.admin-layout { display: flex; gap: 24px; }
.admin-sidebar { width: 190px; flex-shrink: 0; display: flex; flex-direction: column; gap: 4px; }
.admin-sidebar a {
  display: block;
  padding: 11px 14px;
  border-radius: 14px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}
.admin-sidebar a:hover { background: var(--paper); }
.admin-sidebar a.active { background: var(--teal-soft); color: var(--teal-dark); }
.admin-content { flex: 1; min-width: 0; }

.option-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.option-row input[type=text] { margin-bottom: 0; flex: 1; }

.timer-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  padding: 10px 18px;
  font-family: 'Manrope', monospace;
  font-size: 18px;
  font-weight: 700;
}

#violation-banner {
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--red-soft);
  color: var(--red);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 600;
}

.filters-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters-bar select, .filters-bar input[type=text] { margin-bottom: 0; width: auto; min-width: 140px; }

/* ===== Подвал ===== */
.site-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1.5px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy { font-size: 12px; color: var(--ink-soft); font-weight: 500; }
.footer-copy a { color: var(--teal-dark); text-decoration: none; font-weight: 700; margin-left: 6px; }
.footer-social { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-soft); font-weight: 500; }
.social-badge {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 12px;
  text-decoration: none; font-size: 11px; font-weight: 700;
}
.social-vk { background: var(--blue-soft); color: var(--blue); }
.social-max { background: var(--teal-soft); color: var(--teal-dark); }

/* ===== FAQ-аккордeon ===== */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: none; }
.faq-question {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 4px; background: none; border: none; cursor: pointer; text-align: left;
  font-size: 14px; font-weight: 700; color: var(--ink); font-family: inherit;
}
.faq-answer { padding: 0 4px 16px; font-size: 13px; color: var(--ink-soft); line-height: 1.6; display: none; }
.faq-item.open .faq-answer { display: block; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-arrow { transition: transform 0.15s; flex-shrink: 0; }

/* ===== Согласие в регистрации ===== */
.consent-row { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 14px; cursor: pointer; }
.consent-row input { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; }
.consent-row span { font-size: 12px; color: var(--ink-soft); line-height: 1.5; }
.consent-row a { color: var(--teal-dark); text-decoration: underline; }

@media (max-width: 680px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar {
    width: 100%; flex-direction: row; overflow-x: auto; gap: 6px;
    padding-bottom: 6px; -webkit-overflow-scrolling: touch;
  }
  .admin-sidebar a { white-space: nowrap; flex-shrink: 0; }

  .wrap { padding: 0 16px 32px; }
  .hero { padding: 32px 20px; }
  .hero-title { font-size: 22px; }
  .hero-text { font-size: 14px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
  header.site-header .brand-name { font-size: 14px; }
  header.site-header img.logo:nth-of-type(1) { height: 36px !important; }
  header.site-header img.logo:nth-of-type(2) { height: 48px !important; }
}
