/* MEMOVERSE — light, warm, calm. One accent colour, lots of air. */
:root {
  --bg: #ffffff;
  --bg2: #f5f2ee;
  --card: #ffffff;
  --card-solid: #ffffff;
  --line: #ece7e0;
  --line-strong: #ddd5ca;
  --text: #1c1917;
  --muted: #6e655c;
  --accent: #1f1b18;
  --accent-hover: #000000;
  --accent-soft: #f3efe9;
  --gold: #9c7a45;
  --gold-soft: #f6efe3;
  --ok: #1f8a5b;
  --ok-soft: #e4f4ec;
  --warn: #a8670f;
  --warn-soft: #fbf0dc;
  --err: #c93636;
  --err-soft: #fbe6e4;
  --kaspi: #f14635;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.06), 0 1px 1px rgba(28, 25, 23, 0.04);
  --shadow: 0 12px 32px -12px rgba(28, 25, 23, 0.18), 0 2px 6px rgba(28, 25, 23, 0.05);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Lora', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.015em; font-weight: 700; }
h1, h2 { font-family: var(--serif); font-weight: 600; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.grad-text { color: var(--gold); font-style: italic; }
.ic { flex: none; vertical-align: -0.2em; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.9); backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.logo { font-weight: 800; letter-spacing: 0.14em; text-decoration: none; display: flex; align-items: center; gap: 10px; font-size: 0.98rem; color: var(--text); }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--text); color: #f0c2b0; display: grid; place-items: center; font-size: 15px; letter-spacing: 0; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.92rem; padding: 8px 12px; border-radius: 10px; display: inline-flex; align-items: center; gap: 6px; }
.nav-links a:hover { color: var(--text); background: var(--bg2); }
.nav-links a.cta { background: var(--text); color: #fff; }
.nav-links a.cta:hover { background: #000; color: #fff; }

/* ---------- buttons & forms ---------- */
.btn {
  appearance: none; border: 1px solid transparent; cursor: pointer; font: inherit; font-weight: 700; font-size: 0.95rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px; text-decoration: none; color: #fff;
  background: var(--accent); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  transition: background 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;
  min-height: 46px; -webkit-tap-highlight-color: transparent; white-space: nowrap;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn.dark { background: var(--text); box-shadow: none; }
.btn.dark:hover { background: #000; }
.btn.ghost { background: var(--card); color: var(--text); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn.ghost:hover { background: var(--bg2); }
.btn.small { padding: 8px 13px; min-height: 38px; font-size: 0.86rem; border-radius: 10px; }
.btn.icon-only { padding: 8px; min-width: 38px; }
.btn.ok { background: var(--ok); box-shadow: none; }
.btn.ok:hover { background: #18734b; }
.btn.danger { background: var(--err); box-shadow: none; }
.btn.danger:hover { background: #ab2c2c; }
.btn.kaspi { background: var(--kaspi); box-shadow: none; }
.btn.kaspi:hover { background: #d9382a; }
.btn.block { width: 100%; }
.btn.big { padding: 15px 26px; font-size: 1.02rem; border-radius: 14px; min-height: 54px; }

label { display: block; font-weight: 600; font-size: 0.9rem; margin: 0 0 6px; color: var(--text); }
.field { margin-bottom: 16px; }
.hint { font-size: 0.82rem; color: var(--muted); margin-top: 6px; }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search], textarea, select {
  width: 100%; font: inherit; color: var(--text); background: #fff;
  border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s; font-size: 16px;
}
input:focus, textarea:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
input[type=file] { font: inherit; font-size: 0.9rem; }
textarea { min-height: 120px; resize: vertical; }
textarea.letter { font-family: var(--serif); font-size: 1.05rem; line-height: 1.75; min-height: 220px; background: #fffdf8; }

.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; font-weight: 600; }
.switch input { appearance: none; width: 44px; height: 26px; background: var(--line-strong); border-radius: 99px; position: relative; flex: none; cursor: pointer; transition: background 0.2s; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: transform 0.2s; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:disabled { opacity: 0.4; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 16px; }
.card h3 { display: flex; align-items: center; gap: 8px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 0.74rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--bg2); color: var(--muted); white-space: nowrap; letter-spacing: 0.01em; }
.badge.pro { background: #f6ecd9; color: #80602b; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err { background: var(--err-soft); color: var(--err); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }

.alert { padding: 12px 14px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); font-size: 0.92rem; display: flex; gap: 10px; align-items: flex-start; }
.alert > .ic { margin-top: 2px; }
.alert.warn { border-color: #f0d9b0; background: var(--warn-soft); }
.alert.ok { border-color: #bfe3d0; background: var(--ok-soft); }
.alert.err { border-color: #f1c4c0; background: var(--err-soft); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--text); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow); opacity: 0; transition: 0.25s; z-index: 1000; max-width: calc(100% - 32px); font-weight: 600; pointer-events: none; font-size: 0.92rem; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--err); }

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
.icon-circle { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); flex: none; }

/* ---------- landing ---------- */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; gap: 40px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.05fr 1fr; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); background: var(--gold-soft); padding: 6px 12px; border-radius: 99px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.2rem, 5.6vw, 3.7rem); margin-bottom: 18px; }
.hero p.lead { font-size: clamp(1.02rem, 2.2vw, 1.18rem); color: var(--muted); max-width: 540px; margin-bottom: 28px; }
.trust { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 26px; color: var(--muted); font-size: 0.88rem; font-weight: 600; }
.trust span { display: inline-flex; align-items: center; gap: 7px; }
.trust .ic { color: var(--ok); }
.hero-stage { position: relative; aspect-ratio: 4 / 3.4; border-radius: 22px; overflow: hidden; background: #efebe5; box-shadow: var(--shadow); border: 1px solid var(--line); }
.hero-stage canvas { width: 100% !important; height: 100% !important; display: block; }
.stage-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; justify-content: center; }
.stage-tabs button { font: inherit; font-size: 0.84rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line-strong); background: #fff; padding: 7px 12px; border-radius: 99px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.stage-tabs button.active { background: var(--text); color: #fff; border-color: var(--text); }
.stage-cta { position: absolute; top: 14px; right: 14px; }
.stage-cta.btn { background: rgba(255, 255, 255, 0.95); color: var(--text); box-shadow: var(--shadow-sm); }

.section { padding: 72px 0; }
.section.alt { background: #faf8f5; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); text-align: center; }
.section .sub { text-align: center; color: var(--muted); max-width: 620px; margin: 0 auto 40px; font-size: 1.05rem; }

.step .num { width: 34px; height: 34px; border-radius: 10px; background: var(--text); color: #fff; display: grid; place-items: center; font-weight: 800; margin-bottom: 14px; font-size: 0.9rem; }
.feature h3 { font-size: 1.08rem; margin: 14px 0 6px; }
.feature p { color: var(--muted); margin: 0; font-size: 0.95rem; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.cat {
  position: relative; display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: pointer;
  padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-sm);
  color: var(--text); font: inherit; text-decoration: none; transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; min-height: 150px;
}
.cat:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.cat.selected { border-color: var(--c, var(--accent)); box-shadow: 0 0 0 2px var(--c, var(--accent)); }
.cat .emoji { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 12%, #fff); margin-bottom: 6px; }
.cat b { font-size: 1.02rem; }
.cat span:not(.emoji) { font-size: 0.82rem; color: var(--muted); line-height: 1.4; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.plan { padding: 24px; border-radius: 18px; border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; gap: 6px; position: relative; box-shadow: var(--shadow-sm); }
.plan.hot { border: 2px solid var(--gold); box-shadow: var(--shadow); }
.plan .price { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
.plan ul { list-style: none; padding: 0; margin: 10px 0 18px; display: grid; gap: 8px; font-size: 0.92rem; color: var(--muted); }
.plan li { display: flex; gap: 8px; align-items: flex-start; }
.plan li::before { content: ''; flex: none; width: 16px; height: 16px; margin-top: 3px; border-radius: 50%; background: var(--ok-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f8a5b' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat; }
.plan .tag { position: absolute; top: -12px; left: 22px; background: var(--gold); color: #fff; }
.plan .spacer { flex: 1; }
.pay-note { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 22px; color: var(--muted); font-size: 0.92rem; flex-wrap: wrap; text-align: center; }
.kaspi-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--kaspi); color: #fff; font-weight: 800; padding: 4px 10px; border-radius: 8px; font-size: 0.82rem; letter-spacing: 0.01em; }

.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-weight: 400; font-size: 1.4rem; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--muted); margin: 0 0 16px; }

.footer { border-top: 1px solid var(--line); padding: 30px 0 40px; color: var(--muted); font-size: 0.88rem; margin-top: 40px; background: #faf8f5; }
.footer .row { justify-content: space-between; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }

/* ---------- creator ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin: 8px 0 4px; }
.page-head h1, .page-head h2 { margin: 4px 0 0; }
.stepper { display: flex; gap: 6px; margin: 20px 0 22px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.stepper::-webkit-scrollbar { display: none; }
.stepper button { flex: none; font: inherit; font-size: 0.84rem; font-weight: 700; color: var(--muted); background: #fff; border: 1px solid var(--line); padding: 8px 13px; border-radius: 99px; cursor: pointer; white-space: nowrap; }
.stepper button.active { color: #fff; background: var(--text); border-color: var(--text); }
.stepper button.done { color: var(--text); border-color: var(--line-strong); }
.panel { animation: fadeUp 0.3s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.wizard-nav { position: sticky; bottom: 0; padding: 14px 0 16px; background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--bg) 35%); display: flex; gap: 10px; z-index: 5; }
.wizard-nav .btn { flex: 1; }

.dropzone { border: 2px dashed var(--line-strong); border-radius: 16px; padding: 30px 16px; text-align: center; cursor: pointer; transition: 0.15s; display: block; background: #faf8f5; }
.dropzone:hover, .dropzone.over { border-color: var(--gold); background: var(--gold-soft); }
.dropzone input { display: none; }
.dropzone .big { color: var(--gold); margin-bottom: 6px; }

.photo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.photo-item { position: relative; border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; }
.photo-item .thumb { aspect-ratio: 1; background-size: cover; background-position: center; position: relative; background-color: var(--bg2); }
.photo-item .thumb .n { position: absolute; left: 6px; top: 6px; background: rgba(28, 25, 23, 0.7); color: #fff; font-size: 0.72rem; font-weight: 700; padding: 2px 7px; border-radius: 99px; }
.photo-item.locked .thumb { filter: grayscale(0.8) opacity(0.6); }
.photo-item textarea { min-height: 58px; border: 0; border-radius: 0; font-size: 14px; padding: 8px 10px; box-shadow: none; border-top: 1px solid var(--line); }
.photo-item .tools { display: flex; gap: 4px; padding: 6px; border-top: 1px solid var(--line); }
.photo-item .tools button { flex: 1; display: grid; place-items: center; font: inherit; background: #faf8f5; border: 0; color: var(--muted); padding: 7px 4px; border-radius: 8px; cursor: pointer; }
.photo-item .tools button:hover { background: var(--bg2); color: var(--text); }
.photo-item .tools button.on { background: var(--ok-soft); color: var(--ok); }

.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 10px; }
.design { border-radius: 14px; border: 2px solid var(--line); overflow: hidden; cursor: pointer; background: #fff; font: inherit; color: var(--text); padding: 0; text-align: left; position: relative; }
.design.selected { border-color: var(--accent); }
.design .sw { height: 90px; position: relative; }
.design .sw i { position: absolute; display: block; }
.design .meta { padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; gap: 6px; font-weight: 700; font-size: 0.88rem; }

.audio-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.audio-row audio { height: 40px; max-width: 100%; }
.rec-dot { width: 10px; height: 10px; background: var(--err); border-radius: 50%; display: inline-block; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.2; } }

.room-list { display: grid; gap: 8px; }
.room-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #faf8f5; }
.room-row .ic-wrap { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #fff; color: var(--gold); flex: none; border: 1px solid var(--line); }
.room-row.locked .ic-wrap { color: var(--muted); }

/* ---------- share ---------- */
.share-box { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .share-box { grid-template-columns: 300px 1fr; align-items: start; } }
.qr-img { width: 100%; max-width: 300px; margin: 0 auto; border-radius: 22px; box-shadow: var(--shadow); background: #fff; }
.copy-line { display: flex; gap: 8px; }
.copy-line input { flex: 1; min-width: 0; }

/* ---------- dashboard ---------- */
.world-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.world-card { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: box-shadow 0.15s; }
.world-card:hover { box-shadow: var(--shadow); }
.world-card .cover { height: 150px; background-size: cover; background-position: center; position: relative; display: grid; place-items: center; color: #fff; }
.world-card .cover .badge { position: absolute; left: 12px; top: 12px; background: rgba(255, 255, 255, 0.95); color: var(--text); box-shadow: var(--shadow-sm); }
.world-card .cover .state { left: auto; right: 12px; }
.world-card .body { padding: 16px 16px 10px; display: grid; gap: 6px; flex: 1; }
.world-card .body b { font-size: 1.05rem; }
.world-card .meta { display: flex; gap: 14px; color: var(--muted); font-size: 0.85rem; }
.world-card .meta span { display: inline-flex; align-items: center; gap: 5px; }
.world-card .actions { display: flex; gap: 6px; padding: 0 16px 16px; }
.world-card .actions .btn:first-child { flex: 1; }

/* ---------- payment ---------- */
.order-summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.pay-amount { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.timeline { display: flex; gap: 0; margin: 22px 0 6px; }
.timeline div { flex: 1; text-align: center; font-size: 0.76rem; font-weight: 700; color: var(--muted); position: relative; padding-top: 30px; }
.timeline div::before { content: ''; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--line-strong); z-index: 1; }
.timeline div::after { content: ''; position: absolute; top: 13px; left: 0; right: 0; height: 2px; background: var(--line); }
.timeline div:first-child::after { left: 50%; }
.timeline div:last-child::after { right: 50%; }
.timeline div.done { color: var(--text); }
.timeline div.done::before { background: var(--ok); border-color: var(--ok); }
.timeline div.now { color: var(--gold); }
.timeline div.now::before { border-color: var(--gold); background: var(--gold-soft); }
.pay-steps { counter-reset: p; list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.pay-steps > li { counter-increment: p; display: grid; grid-template-columns: 32px 1fr; gap: 14px; align-items: start; }
.pay-steps > li::before { content: counter(p); width: 32px; height: 32px; border-radius: 10px; background: var(--text); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 0.9rem; }
.pay-steps h4 { margin: 4px 0 6px; font-size: 1rem; }
.kaspi { background: var(--kaspi); color: #fff; border-radius: 16px; padding: 18px; }
.kaspi .num { font-size: 1.35rem; font-weight: 800; letter-spacing: 0.02em; }
.kaspi-qr { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.kaspi-qr img { width: 150px; height: 150px; background: #fff; border-radius: 14px; padding: 8px; border: 1px solid var(--line); }
.copy-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #faf8f5; margin-top: 8px; }
.copy-row b { font-size: 1.05rem; letter-spacing: 0.02em; }
.copy-row .k { color: var(--muted); font-size: 0.8rem; }

/* ---------- admin ---------- */
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 18px 0; }
.admin-tabs button { font: inherit; font-weight: 700; font-size: 0.88rem; color: var(--muted); background: #fff; border: 1px solid var(--line); padding: 9px 14px; border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.admin-tabs button.active { color: #fff; background: var(--text); border-color: var(--text); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.stat { padding: 18px; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.stat .v { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.stat .k { font-size: 0.82rem; color: var(--muted); }
.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 700; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; background: #faf8f5; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 10px; }
.bars div { flex: 1; background: var(--gold); border-radius: 4px 4px 0 0; min-height: 2px; opacity: 0.85; }

.modal { position: fixed; inset: 0; z-index: 200; background: rgba(28, 25, 23, 0.45); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fadeIn 0.2s; }
.modal .box { background: #fff; border-radius: 20px; width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; padding: 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25); }
.modal .box.wide { max-width: 900px; }
@keyframes fadeIn { from { opacity: 0; } }

.auth-box { max-width: 420px; margin: 48px auto; }
.tabs2 { display: flex; background: var(--bg2); border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.tabs2 button { flex: 1; font: inherit; font-weight: 700; background: none; border: 0; color: var(--muted); padding: 9px; border-radius: 9px; cursor: pointer; }
.tabs2 button.active { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }

.empty { text-align: center; padding: 48px 20px; }
.empty .icon-circle { margin: 0 auto 14px; width: 56px; height: 56px; border-radius: 16px; }

@media (max-width: 600px) {
  .nav-links a.hide-sm { display: none; }
  .section { padding: 52px 0; }
  .card { padding: 18px; }
  .hero { padding-top: 32px; }
}
.pay-steps > li > div { min-width: 0; }
@media (max-width: 600px) {
  .footer .row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .order-summary .pay-amount { font-size: 1.8rem; }
}

/* single-page editor */
.ed-sec { margin: 28px 0 8px; scroll-margin-top: 80px; }
.sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sec-head .num { width: 30px; height: 30px; border-radius: 9px; background: var(--text); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 0.85rem; flex: none; }
.sec-head h2 { margin: 0; font-size: 1.35rem; }
.plan.current { border-color: var(--ok); }
.action-bar { position: sticky; bottom: 0; z-index: 20; display: flex; gap: 10px; align-items: center; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); margin-top: 24px; background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--bg) 30%); }
.action-bar .btn { min-height: 50px; }
@media (max-width: 600px) { .action-bar #saveState { display: none; } .action-bar .btn:last-child { flex: 1; } }
