/* ============ Shopifly — платформа ============ */
:root {
  --bg: #f7f6fb;
  --surface: #ffffff;
  --ink: #1d1a2e;
  --ink-2: #4a4560;
  --muted: #8a85a0;
  --line: #e7e4f0;
  --soft: #f0edf9;
  --accent: #5b3cc4;
  --accent-2: #7c5cf0;
  --accent-ink: #ffffff;
  --accent-soft: #ece7fd;
  --ok: #1f8a5b;
  --ok-soft: #e3f5ec;
  --warn: #b7791f;
  --warn-soft: #fdf3e1;
  --danger: #c4314b;
  --danger-soft: #fde8ec;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(29, 26, 46, .04), 0 10px 30px rgba(29, 26, 46, .07);
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.02em; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- кнопки, поля ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: 600 15px var(--sans); cursor: pointer;
  transition: transform .15s, background .15s, box-shadow .15s; white-space: nowrap;
}
.btn:hover { background: var(--soft); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px rgba(91, 60, 196, .28); }
.btn-primary:hover { background: #4e31b0; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-lg { height: 54px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-danger { color: var(--danger); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input {
  height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); font: 15px var(--sans); color: var(--ink); width: 100%; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hint { font-size: 12.5px; color: var(--muted); }
.slug-field { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.slug-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.slug-field .input { border: 0; box-shadow: none !important; min-width: 0; }
.slug-field span { display: flex; align-items: center; padding: 0 12px; background: var(--soft); color: var(--muted); font-size: 14px; white-space: nowrap; }
.err { background: var(--danger-soft); color: var(--danger); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; margin-bottom: 14px; }
.okmsg { color: var(--ok); }
.badmsg { color: var(--danger); }

/* ---------- шапка ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(247, 246, 251, .85); backdrop-filter: blur(14px); border-bottom: 1px solid transparent; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav-in { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--ink); letter-spacing: -.03em; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; color: #fff; }
.brand-mark svg { width: 20px; height: 20px; }
.nav-links { display: flex; gap: 6px; margin-left: 16px; }
.nav-links a { color: var(--ink-2); font-weight: 600; padding: 8px 12px; border-radius: 999px; }
.nav-links a:hover { background: var(--soft); }
.nav-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* ---------- лендинг ---------- */
.hero { padding: 64px 0 40px; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -40% -10% auto auto; width: 720px; height: 720px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 92, 240, .18), transparent 65%); pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; position: relative; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; padding: 6px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; }
.hero h1 { font-size: clamp(36px, 5.4vw, 60px); margin: 18px 0; font-weight: 800; letter-spacing: -.035em; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), #c04bd8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 18px; color: var(--ink-2); max-width: 520px; margin: 0 0 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-start { display: flex; gap: 8px; max-width: 520px; background: var(--surface); padding: 6px; border-radius: 999px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.hero-start .input { border: 0; height: 48px; border-radius: 999px; box-shadow: none !important; }
.hero-start .btn { height: 48px; }
.hero-note { margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.mock { position: relative; }
.mock-win { background: var(--surface); border-radius: 22px; box-shadow: 0 30px 80px rgba(29, 26, 46, .16); border: 1px solid var(--line); overflow: hidden; }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fbfaff; }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: #e2dff0; }
.mock-url { margin-left: 10px; flex: 1; background: var(--soft); border-radius: 8px; padding: 5px 10px; font-size: 12.5px; color: var(--ink-2); }
.mock-body { padding: 18px; }
.mock-hero { border-radius: 14px; padding: 22px; background: linear-gradient(135deg, #f3e7ee, #ece7fd); margin-bottom: 14px; }
.mock-hero b { display: block; font-size: 19px; margin-bottom: 6px; }
.mock-hero span { font-size: 13px; color: var(--ink-2); }
.mock-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mock-card { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.mock-card img { aspect-ratio: 1; object-fit: cover; width: 100%; background: var(--soft); }
.mock-card div { padding: 8px 10px; font-size: 12px; }
.mock-card b { display: block; font-size: 12.5px; }
.mock-float {
  position: absolute; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 12px 16px;
  display: flex; gap: 10px; align-items: center; font-size: 13.5px; border: 1px solid var(--line); animation: floaty 5s ease-in-out infinite;
}
.mock-float .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); font-size: 18px; }
.mock-float.f1 { left: -28px; bottom: -22px; }
.mock-float.f2 { right: -18px; top: 70px; animation-delay: -2.5s; }
.mock-float.f2 .ic { background: var(--accent-soft); color: var(--accent); }
@keyframes floaty { 50% { transform: translateY(-8px); } }

.logos { display: flex; gap: 28px; flex-wrap: wrap; align-items: center; justify-content: center; padding: 26px 0; color: var(--muted); font-weight: 700; }
.logos span { display: inline-flex; align-items: center; gap: 8px; }

.section { padding: 72px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); margin-bottom: 12px; font-weight: 800; }
.section-head p { color: var(--ink-2); font-size: 17px; margin: 0; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 16px; }
.feature .ic svg { width: 24px; height: 24px; }
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { margin: 0; color: var(--ink-2); font-size: 14.5px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.step { position: relative; padding: 24px; border-radius: var(--radius); background: linear-gradient(180deg, var(--surface), var(--soft)); border: 1px solid var(--line); }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; margin-bottom: 14px; }
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { margin: 0; color: var(--ink-2); font-size: 14.5px; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px; display: flex; flex-direction: column; }
.plan.best { border: 2px solid var(--accent); box-shadow: 0 20px 50px rgba(91, 60, 196, .16); position: relative; }
.plan.best::after { content: 'Популярный'; position: absolute; top: -13px; left: 28px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.plan h3 { font-size: 20px; }
.plan .price { font-size: 34px; font-weight: 800; letter-spacing: -.03em; margin: 12px 0 2px; }
.plan .price small { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 10px; flex: 1; }
.plan li { display: flex; gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.plan li::before { content: '✓'; color: var(--ok); font-weight: 800; }

.cta-band { background: linear-gradient(135deg, #2a1d63, var(--accent)); color: #fff; border-radius: 28px; padding: 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(26px, 3.2vw, 36px); font-weight: 800; }
.cta-band p { margin: 8px 0 0; opacity: .85; }
.cta-band .btn { background: #fff; color: var(--accent); border-color: #fff; }

.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 20px; }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq p { margin: 10px 0 0; color: var(--ink-2); }

.footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.footer-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }

/* ---------- страницы входа ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.auth-box { width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 32px; box-shadow: var(--shadow); }
.auth-box .brand { justify-content: center; margin-bottom: 20px; }
.auth-box h1 { font-size: 26px; text-align: center; margin-bottom: 6px; font-weight: 800; }
.auth-box > p { text-align: center; color: var(--muted); margin: 0 0 22px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- кабинет ---------- */
.app-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.page { padding-top: 28px; padding-bottom: 60px; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-title h1 { font-size: 28px; font-weight: 800; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 22px; }
.shops { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.shop-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.shop-top { display: flex; gap: 14px; align-items: center; }
.shop-ava { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 20px; color: #fff; background: linear-gradient(135deg, var(--accent), #c04bd8); flex: none; }
.shop-top h3 { font-size: 17px; }
.shop-top a.url { font-size: 13.5px; word-break: break-all; }
.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--soft); color: var(--ink-2); white-space: nowrap; }
.pill.free { background: var(--soft); }
.pill.pro { background: var(--accent-soft); color: var(--accent); }
.pill.business { background: #fdecf7; color: #a3247a; }
.pill.blocked { background: var(--danger-soft); color: var(--danger); }
.pill.active { background: var(--ok-soft); color: var(--ok); }
.pill.pending { background: var(--warn-soft); color: var(--warn); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi { background: var(--soft); border-radius: var(--radius-sm); padding: 10px 12px; }
.kpi b { display: block; font-size: 17px; }
.kpi span { font-size: 12px; color: var(--muted); }
.shop-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.shop-actions .btn { flex: 1; }
.new-shop { border: 2px dashed var(--line); background: transparent; display: grid; place-items: center; text-align: center; min-height: 220px; cursor: pointer; color: var(--ink-2); font: 600 15px var(--sans); }
.new-shop:hover { border-color: var(--accent); color: var(--accent); }
.new-shop b { display: block; font-size: 34px; line-height: 1; margin-bottom: 8px; }
.tabs { display: flex; gap: 6px; margin-bottom: 20px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 9px 16px; border-radius: 999px; font: 600 14.5px var(--sans); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.tabs button.on { background: var(--ink); color: #fff; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat { padding: 18px; }
.stat span { font-size: 13px; color: var(--muted); }
.stat b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl select { height: 34px; border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; font: 14px var(--sans); background: #fff; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }

.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal-bg { position: absolute; inset: 0; background: rgba(20, 16, 40, .45); }
.modal-box { position: relative; background: var(--surface); border-radius: 22px; padding: 26px; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; box-shadow: 0 30px 80px rgba(0, 0, 0, .25); }
.modal-box h3 { font-size: 20px; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.plan-pick { display: grid; gap: 10px; margin-bottom: 16px; }
.plan-opt { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; cursor: pointer; }
.plan-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.plan-opt b { display: block; }
.plan-opt span { font-size: 13px; color: var(--muted); }
.plan-opt .pp { margin-left: auto; font-weight: 800; white-space: nowrap; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 14px; transition: .25s; z-index: 60; pointer-events: none; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .mock { max-width: 560px; margin: 0 auto; width: 100%; }
  .features, .steps, .plans { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .hero { padding-top: 36px; }
  .hero-start { flex-direction: column; border-radius: 20px; }
  .hero-start .btn { width: 100%; }
  .mock-float { display: none; }
  .mock-grid { grid-template-columns: repeat(2, 1fr); }
  .mock-grid .mock-card:nth-child(3) { display: none; }
  .section { padding: 52px 0; }
  .cta-band { padding: 30px 22px; }
  .auth-box { padding: 24px 18px; }
  .row2 { grid-template-columns: 1fr; gap: 0; }
  .nav-actions { gap: 4px; }
  .nav-actions .btn-ghost { padding: 0 10px; }
  .nav-actions .btn-sm { padding: 0 12px; }
  .shops { grid-template-columns: 1fr; }
  .page-title h1 { font-size: 23px; }
}
