:root {
  --accent: #7b2ff7;
  --accent-dark: #5b1fc4;
  --text: #1b1b1f;
  --muted: #6b6b76;
  --line: #e6e6ef;
  --bg: #ffffff;
  --soft: #f7f5ff;
  --danger: #c62828;
  --ok: #1b7f4b;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

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

.container { width: min(1080px, 92vw); margin: 0 auto; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}
.logo {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.logo span { color: var(--accent); }
.site-nav { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.site-nav a { color: var(--muted); font-size: 15px; }
.site-nav a:hover { color: var(--text); text-decoration: none; }
.site-nav a.btn, .site-nav a.btn:hover { color: #fff; }
.site-nav a.btn.ghost, .site-nav a.btn.ghost:hover { color: var(--accent); }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-align: center;
}
.btn:hover { background: var(--accent-dark); text-decoration: none; color: #fff; }
.btn.ghost { background: #fff; color: var(--accent); border-color: var(--accent); }
.btn.ghost:hover { background: var(--soft); }
.btn.small { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #9c1f1f; }

.hero { padding: 72px 0 48px; background: linear-gradient(180deg, var(--soft), #fff); }
.hero h1 {
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  max-width: 760px;
}
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 640px; margin: 0 0 28px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero .note { color: var(--muted); font-size: 14px; }

.section { padding: 56px 0; }
.section.alt { background: var(--soft); }
.section h2 { font-size: 30px; letter-spacing: -0.02em; margin: 0 0 28px; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.step {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  background: #fff;
}
.step .num {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; margin-bottom: 12px;
}
.step h3 { margin: 0 0 8px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.plan {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.plan.featured { border-color: var(--accent); box-shadow: 0 12px 30px rgba(123, 47, 247, 0.12); }
.plan h3 { margin: 0 0 4px; font-size: 18px; }
.plan .price { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; margin: 8px 0 2px; }
.plan .price small { font-size: 15px; font-weight: 500; color: var(--muted); }
.plan .short { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.plan ul { margin: 0 0 20px; padding-left: 18px; color: var(--muted); font-size: 14px; }
.plan ul li { margin-bottom: 6px; }
.plan .btn { margin-top: auto; }

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--muted); margin: 10px 0 0; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  color: var(--muted);
  font-size: 14px;
}
.site-footer .links { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; }

/* Юридические страницы */
.legal { padding: 48px 0 80px; }
.legal h1 { font-size: 32px; letter-spacing: -0.02em; margin: 0 0 8px; }
.legal .updated { color: var(--muted); font-size: 14px; margin-bottom: 32px; }
.legal h2 { font-size: 21px; margin: 32px 0 10px; }
.legal p, .legal li { color: #33333a; }
.legal ul, .legal ol { padding-left: 22px; }
.legal .placeholder {
  background: #fff4e5;
  border: 1px dashed #e0a458;
  border-radius: 8px;
  padding: 2px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.95em;
}

/* Админка */
.admin { padding: 28px 0 64px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.admin-head h1 { font-size: 26px; margin: 0; letter-spacing: -0.02em; }
.admin-nav { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.admin-nav a { color: var(--muted); font-size: 15px; }
.admin-nav a.active { color: var(--accent); font-weight: 600; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 28px; }
.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  background: #fff;
}
.card .label { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.card .value { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.03em; }
table.data tr:hover td { background: #faf9ff; }
table.data td.num { white-space: nowrap; }

.form { display: grid; gap: 12px; max-width: 760px; }
.form label { font-size: 14px; color: var(--muted); }
.form input[type="text"], .form input[type="password"], .form input[type="number"], .form textarea, .form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  color: var(--text);
}
.form textarea { min-height: 90px; resize: vertical; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }

.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.flash.ok { background: #e8f5ee; color: var(--ok); }
.flash.err { background: #fdeaea; color: var(--danger); }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--soft); padding: 20px; }
.login-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 30px; width: min(380px, 100%); }
.login-card h1 { font-size: 22px; margin: 0 0 18px; }

.muted { color: var(--muted); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: var(--soft); color: var(--accent); }
.tag.danger { background: #fdeaea; color: var(--danger); }
.tag.ok { background: #e8f5ee; color: var(--ok); }

@media (max-width: 640px) {
  .site-header .container { height: auto; padding: 12px 0; flex-direction: column; align-items: flex-start; }
  .form .row { grid-template-columns: 1fr; }
}
