:root {
  --bg: #F5F1E8;
  --surface: #FFFFFF;
  --text: #0F172A;
  --accent: #F59E0B;
  --accent-dark: #B45309;
  --neutral: #E2E8F0;
  --muted: rgba(15, 23, 42, 0.66);
  --radius: 14px;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 2px 8px rgba(15, 23, 42, 0.06);
  --font: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-hover: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 300ms;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { margin: 0 0 0.5em; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 44px; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 32px; font-weight: 700; }
h3 { font-size: 20px; font-weight: 600; }
p { margin: 0 0 1em; }
code { background: var(--neutral); padding: 1px 6px; border-radius: 6px; font-size: 0.9em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-dark); margin-bottom: 10px;
}
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; }

/* ---------- header ---------- */
.demo-banner {
  background: var(--accent); color: var(--text); padding: 10px 16px; text-align: center;
  font-size: 14px; border-bottom: 2px solid var(--accent-dark);
}
.site-header {
  position: sticky; top: 0; z-index: 40; background: rgba(245, 241, 232, 0.96);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--neutral);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; }
.brand img { border-radius: 10px; }
.main-nav { display: flex; gap: 22px; margin-left: auto; }
.main-nav a { font-size: 15px; font-weight: 500; color: var(--muted); }
.main-nav a:hover { color: var(--text); }
.header-actions { display: flex; gap: 10px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 12px; border: 2px solid transparent;
  font: inherit; font-weight: 600; font-size: 16px; cursor: pointer;
  transition: transform 150ms var(--ease-hover), background 150ms var(--ease-hover),
    color 150ms var(--ease-hover), box-shadow 150ms var(--ease-hover);
}
.btn:active { transform: scale(0.98); }
.btn-accent { background: var(--accent); color: var(--text); }
.btn-accent:hover { background: var(--accent-dark); color: var(--surface); text-decoration: none; }
.btn-ghost { background: transparent; border-color: var(--neutral); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); background: var(--surface); text-decoration: none; }
.btn-sm { min-height: 38px; padding: 7px 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 64px 0 56px; overflow: hidden; }
.hero .pattern {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0.45; z-index: 0; pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.hero-copy h1 { max-width: 14ch; }
.lead { font-size: 18px; color: var(--muted); max-width: 52ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; gap: 18px; flex-wrap: wrap; }
.hero-points li { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.hero-media img { width: 100%; height: auto; border-radius: 20px; box-shadow: var(--shadow); aspect-ratio: 16 / 9; object-fit: cover; }

/* ---------- sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--neutral); }
.section-head { max-width: 720px; margin-bottom: 32px; }
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--neutral); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-soft);
  transition: transform 150ms var(--ease-hover), box-shadow 150ms var(--ease-hover);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-icon { margin-bottom: 14px; }
.media-row { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; margin-top: 40px; }
.media-row.reverse { margin-top: 0; }
.media-row > img { width: 100%; height: auto; border-radius: 18px; box-shadow: var(--shadow); object-fit: cover; }
.check-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.check-list li { display: flex; align-items: center; gap: 10px; font-weight: 500; }

/* ---------- steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step { position: relative; background: var(--bg); border: 1px solid var(--neutral); border-radius: var(--radius); padding: 22px; }
.step-num {
  position: absolute; top: 14px; right: 16px; font-size: 13px; font-weight: 700;
  color: var(--accent-dark); background: var(--surface); border: 1px solid var(--neutral);
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
}
.step img { margin-bottom: 12px; }

/* ---------- prices ---------- */
.price-list { display: grid; gap: 10px; margin: 20px 0 24px; }
.price-item {
  display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--neutral); border-radius: 12px; padding: 12px 14px;
}
.price-item strong { font-variant-numeric: tabular-nums; }
.benefit-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 18px; }
.benefit-list li { display: flex; gap: 14px; align-items: flex-start; }
.benefit-list h3 { margin-bottom: 4px; font-size: 18px; }
.benefit-list p { margin: 0; color: var(--muted); }

/* ---------- faq ---------- */
.faq-item { background: var(--surface); border: 1px solid var(--neutral); border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; }
.faq-item summary { cursor: pointer; font-weight: 600; }
.faq-item p { margin: 10px 0 0; color: var(--muted); }

/* ---------- form ---------- */
.section-form { background: var(--surface); border-top: 1px solid var(--neutral); }
.form-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: start; }
.form-card { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { font-weight: 600; font-size: 14px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 2px solid var(--neutral); border-radius: 10px; padding: 11px 12px; min-height: 44px;
  transition: border-color 150ms var(--ease-hover), box-shadow 150ms var(--ease-hover);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25); }
textarea { min-height: 90px; resize: vertical; }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--accent-dark); }
.field-error { min-height: 16px; margin: 0; font-size: 13px; font-weight: 600; color: var(--accent-dark); }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; }
.checkbox input { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); margin-top: 2px; }
.form-note { font-size: 12px; color: var(--muted); margin: 0; }
.form-general-error { background: rgba(180, 83, 9, 0.1); border: 1px solid var(--accent-dark); color: var(--accent-dark); padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.form-success { background: rgba(245, 158, 11, 0.14); border: 1px solid var(--accent); padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.success-card { text-align: center; place-items: center; padding: 36px 24px; }
.success-card h3 { font-size: 24px; }

/* ---------- footer ---------- */
.site-footer { background: var(--text); color: var(--surface); padding: 48px 0 32px; }
.site-footer .brand, .site-footer a { color: var(--surface); }
.site-footer a:hover { color: var(--accent); }
.site-footer .muted { color: rgba(255, 255, 255, 0.7); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.footer-grid h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.footer-grid a { display: block; margin-bottom: 8px; color: rgba(255, 255, 255, 0.85); }

/* ---------- auth ---------- */
.auth-wrap { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 420px; display: grid; gap: 14px; }
.auth-card .brand { margin-bottom: 6px; }
.auth-card h1 { font-size: 28px; }
.demo-hint { font-size: 13px; color: var(--muted); line-height: 1.6; }
.back-link { font-size: 14px; color: var(--muted); }

/* ---------- admin ---------- */
.admin-shell { display: flex; min-height: calc(100vh - 0px); align-items: stretch; }
.admin-sidebar {
  width: 240px; flex: 0 0 240px; background: var(--text); color: var(--surface);
  padding: 20px 16px; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 0; height: 100vh;
}
.admin-sidebar .brand { color: var(--surface); }
.admin-nav { display: grid; gap: 4px; }
.nav-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px;
  background: transparent; color: rgba(255, 255, 255, 0.82); border: 2px solid transparent;
  border-radius: 10px; font: inherit; font-weight: 500; font-size: 15px; cursor: pointer; text-align: left;
  transition: background 150ms var(--ease-hover), color 150ms var(--ease-hover);
}
.nav-btn img { filter: brightness(0) invert(1); opacity: 0.85; }
.nav-btn:hover { background: rgba(255, 255, 255, 0.08); color: var(--surface); }
.nav-btn.is-active { background: var(--accent); color: var(--text); }
.nav-btn.is-active img { filter: none; opacity: 1; }
.admin-side-foot { margin-top: auto; display: grid; gap: 10px; }
.admin-side-foot .back-link { color: rgba(255, 255, 255, 0.75); }
.admin-side-foot .btn-ghost { border-color: rgba(255, 255, 255, 0.3); color: var(--surface); }
.admin-main { flex: 1; min-width: 0; padding: 24px 28px 48px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.admin-topbar h1 { font-size: 28px; margin: 0; }
.admin-user { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.admin-user img { border-radius: 50%; }
.badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--neutral);
  color: var(--text); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.badge.status-new { background: var(--accent); }
.badge.status-work { background: var(--neutral); }
.badge.status-result { background: rgba(180, 83, 9, 0.16); color: var(--accent-dark); }
.badge.status-paid { background: var(--accent-dark); color: var(--surface); }
.badge.status-cancelled { background: var(--neutral); color: var(--muted); text-decoration: line-through; }

.tab-panel { display: grid; gap: 20px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--neutral); border-radius: var(--radius); padding: 18px; }
.kpi span { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi strong { font-size: 30px; font-variant-numeric: tabular-nums; }
.two-col { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 20px; align-items: start; }
.chart { width: 100%; height: auto; }
.avatar-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.avatar-strip img { border-radius: 50%; border: 2px solid var(--surface); margin-left: -8px; }
.avatar-strip img:first-child { margin-left: 0; }
.mini-list { display: grid; gap: 10px; }
.mini-item { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 12px; background: var(--bg); border-radius: 10px; font-size: 14px; }
.list { display: grid; gap: 12px; }
.list-grid { grid-template-columns: repeat(2, 1fr); }
.row-card {
  background: var(--surface); border: 1px solid var(--neutral); border-radius: 12px;
  padding: 14px 16px; display: grid; gap: 6px; cursor: pointer;
  transition: transform 150ms var(--ease-hover), box-shadow 150ms var(--ease-hover);
}
.row-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.row-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.row-card-head strong { font-variant-numeric: tabular-nums; }
.row-card p { margin: 0; font-size: 14px; color: var(--muted); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search-wrap, .filter-wrap {
  display: flex; align-items: center; gap: 8px; background: var(--surface);
  border: 2px solid var(--neutral); border-radius: 10px; padding: 0 10px; min-height: 44px;
}
.search-wrap input, .filter-wrap select { border: 0; background: transparent; min-height: 40px; padding: 6px; box-shadow: none; }
.search-wrap input:focus, .filter-wrap select:focus { box-shadow: none; border: 0; }
.search-wrap { flex: 1; min-width: 220px; }
.input-date {
  min-height: 44px; width: auto; padding: 8px 10px; background: var(--surface);
  border: 2px solid var(--neutral); border-radius: 10px; font: inherit; font-size: 14px;
}
.empty-state { text-align: center; padding: 40px 20px; background: var(--surface); border: 1px dashed var(--neutral); border-radius: var(--radius); }
.empty-state img { margin: 0 auto 12px; }

/* ---------- drawer / modal ---------- */
.drawer-backdrop, .modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); z-index: 80;
  display: flex; justify-content: flex-end;
}
.modal-backdrop { justify-content: center; align-items: center; padding: 20px; }
.drawer {
  width: min(520px, 100%); height: 100%; background: var(--surface); padding: 26px;
  overflow-y: auto; animation: slideIn 240ms var(--ease-hover); position: relative;
}
.drawer-close { position: absolute; top: 12px; right: 14px; border: 0; background: var(--neutral); width: 36px; height: 36px; border-radius: 50%; font-size: 22px; cursor: pointer; }
.modal { width: min(460px, 100%); display: grid; gap: 12px; animation: fadeUp 200ms var(--ease); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.detail-grid div { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.detail-grid span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.history { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.history li { border-left: 3px solid var(--accent); padding-left: 10px; font-size: 13px; }
.status-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.channel-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--neutral); }
.channel-row span:nth-child(2) { flex: 1; font-weight: 600; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--neutral); font-weight: 600; }
.switch-row input { width: 46px; height: 26px; min-height: 0; accent-color: var(--accent); }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--text); color: var(--surface); padding: 12px 18px; border-radius: 12px;
  box-shadow: var(--shadow); z-index: 100; font-size: 14px; font-weight: 600; animation: fadeUp 200ms var(--ease);
}
.is-demo #demo-banner { display: block !important; }

/* ---------- animation ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { transform: translateX(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.reveal { animation: fadeUp var(--dur) var(--ease) both; }
.reveal:nth-child(2) { animation-delay: 40ms; }
.reveal:nth-child(3) { animation-delay: 80ms; }
.reveal:nth-child(4) { animation-delay: 120ms; }
.cards-grid .reveal:nth-child(4) { animation-delay: 120ms; }
.steps .reveal:nth-child(4) { animation-delay: 120ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { animation: none !important; opacity: 1 !important; transform: none !important; }
  .card:hover, .row-card:hover { transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  h1 { font-size: 36px; }
  .hero-grid, .media-row, .form-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .main-nav { display: none; }
  .header-inner { flex-wrap: wrap; gap: 10px; padding: 8px 0; }
  .header-actions { margin-left: auto; }
  .hero { padding: 40px 0; }
  h1 { font-size: 32px; }
  h2 { font-size: 26px; }
  .container { padding: 0 16px; }
  .cards-grid, .steps, .list-grid, .kpi-grid, .footer-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .admin-shell { display: block; }
  .admin-sidebar {
    width: 100%; flex: none; height: auto; position: static; padding: 14px;
  }
  .admin-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-btn { font-size: 14px; padding: 9px 10px; }
  .admin-main { padding: 18px 16px 40px; }
  .admin-user span:not(.badge) { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .drawer { width: 100%; }
}
@media (max-width: 420px) {
  h1 { font-size: 28px; }
  .btn { font-size: 15px; padding: 10px 14px; }
  .header-actions .btn-ghost { display: none; }
  .admin-nav { grid-template-columns: 1fr; }
}
