:root {
  --ink: #0f1b2d;
  --ink-soft: #4a5568;
  --paper: #f2f4f7;
  --card: #ffffff;
  --line: #d9dee6;
  --accent: #2b50e6;
  --accent-dark: #1f3cb8;
  --accent-soft: #e8edff;
  --secondary: #16a6a1;
  --highlight: #a45b08;
  --ok: #0e7c59;
  --warn: #b54708;
  --sold: #c0392b;
  --wa: #14803c;
  --radius: 10px;
  --hero: #0f1b2d;
  --font-head: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0; font-family: var(--font-head); }
.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.92em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Buttons */
.btn-primary, .btn-dark, .ghost-btn, .wa-btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 700; font-size: 0.95rem;
  padding: 10px 16px; border-radius: 8px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; min-height: 44px;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #1d2d46; }
.ghost-btn { background: transparent; border-color: var(--line); color: var(--ink); }
.ghost-btn:hover { border-color: var(--ink); }
.wa-btn { background: var(--wa); color: #fff; padding: 8px 12px; min-height: 40px; font-size: 0.88rem; }
.wa-btn:hover { background: #0f6a31; }
.wa-btn-lg { padding: 12px 20px; font-size: 1rem; min-height: 48px; }

/* Shop header */
.shop-head { position: relative; overflow: hidden; background: radial-gradient(ellipse at 82% 0%, rgba(255, 255, 255, 0.1), transparent 42%), var(--hero); color: #fff; padding: 34px 0; }
.shop-head::after { content: ""; position: absolute; inset: auto 0 0; height: 4px; background: linear-gradient(90deg, var(--accent) 0 42%, var(--secondary) 42% 72%, var(--highlight) 72%); }
.shop-city { display: table; margin: 8px 0 0; padding: 4px 10px; border-left: 2px solid var(--secondary); border-radius: 0 6px 6px 0; background: rgba(255, 255, 255, 0.06); color: #d7deea; font-weight: 600; font-size: 0.88rem; }
.shop-head h1 { font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.08; font-weight: 800; letter-spacing: -0.03em; }
.shop-about { margin: 12px 0 0; max-width: 60ch; color: #d7deea; }
.shop-meta { display: table; margin: 16px 0 0; padding: 7px 12px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 999px; background: rgba(255, 255, 255, 0.07); color: #d7deea; font-size: 0.9rem; }
.shop-meta strong { color: #fff; font-size: 1.1rem; }
.shop-actions { display: flex; flex: none; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 8px; margin-left: auto; align-self: center; white-space: nowrap; }
.social-btn { gap: 8px; }
.shop-actions .social-btn { width: 48px; padding-inline: 8px; }
.social-icon { display: block; width: 20px; height: 20px; flex: none; }
.youtube-icon { object-fit: contain; border-radius: 4px; background: #fff; }
.shop-head .ghost-btn { background: rgba(255, 255, 255, 0.06); color: #fff; border-color: rgba(255, 255, 255, 0.2); }
.shop-head .ghost-btn:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }
.shop-address { margin: 14px 0 0; color: #aab6cc; font-size: 0.9rem; max-width: 60ch; }

/* Filters */
.filters { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; margin: 18px 0; }
.filters .btn-dark { align-self: center; }
.filters input[type="search"], .filters input[type="number"], .filters select {
  width: 100%; font: inherit; padding: 10px 12px; min-height: 44px;
  border: 1.5px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.f-search { grid-column: 1 / -1; }
.f-sort { display: grid; gap: 4px; }
.f-sort-hint { color: var(--ink-soft); font-size: 0.75rem; line-height: 1.3; }
.f-check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.92rem; min-height: 44px; }
.f-check input { width: 20px; height: 20px; accent-color: var(--accent); }

/* Phone grid */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding-bottom: 28px; }
.card { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card-media { position: relative; display: block; aspect-ratio: 1 / 1; background: #e8ecf2; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.no-photo { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-soft); font-size: 0.85rem; font-weight: 600; }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 0.98rem; font-weight: 700; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.chips li { font-size: 0.74rem; font-weight: 600; color: var(--accent-dark); background: var(--accent-soft); border-radius: 5px; padding: 2px 7px; }
.card-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.price { color: var(--highlight); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.price-lg { font-size: 1.9rem; margin: 6px 0 14px; }
.muted-note { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }

/* The memorable bit: sold phones get a stamped photo */
.is-sold .card-media img, .gallery-main.is-sold img { filter: grayscale(1); opacity: 0.55; }
.is-sold .price { color: var(--ink-soft); text-decoration: line-through; text-decoration-thickness: 2px; }
.stamp {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-14deg);
  border: 4px solid var(--sold); color: var(--sold); border-radius: 6px;
  padding: 2px 14px; font-weight: 800; font-size: 1.5rem; letter-spacing: 0.12em; text-transform: uppercase;
  background: rgba(255, 255, 255, 0.82); pointer-events: none;
}
.stamp-lg { font-size: 2.6rem; border-width: 6px; padding: 4px 24px; }
.flag { position: absolute; left: 0; top: 10px; background: var(--warn); color: #fff; font-weight: 700; font-size: 0.78rem; padding: 3px 10px 3px 8px; border-radius: 0 6px 6px 0; }
.empty-state { background: #fff; border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 28px 18px; text-align: center; color: var(--ink-soft); }

.site-foot { padding: 12px 0 40px; color: var(--ink-soft); font-size: 0.85rem; }

/* Phone detail */
.detail { padding-bottom: 40px; }
.crumb { margin: 16px 0; font-weight: 600; font-size: 0.92rem; }
.detail-grid { display: grid; gap: 22px; }
.gallery-main { position: relative; aspect-ratio: 1 / 1; background: #e8ecf2; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.thumbs { list-style: none; display: flex; gap: 8px; padding: 0; margin: 10px 0 0; overflow-x: auto; }
.thumb { border: 2px solid var(--line); border-radius: 8px; padding: 0; background: #fff; cursor: pointer; width: 64px; height: 64px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb[aria-current="true"] { border-color: var(--accent); }
.detail-info h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 800; letter-spacing: -0.02em; }
.status-note { background: #fff4e5; border: 1px solid #f3cf9b; color: #7a3d05; padding: 10px 12px; border-radius: 8px; font-weight: 600; font-size: 0.92rem; }
.specs { margin: 0 0 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.specs div { background: #fff; padding: 10px 12px; }
.specs dt { font-size: 0.78rem; color: var(--ink-soft); font-weight: 600; }
.specs dd { margin: 2px 0 0; font-weight: 700; }
.desc { max-width: 60ch; margin: 0 0 18px; }
.fine { color: var(--ink-soft); font-size: 0.85rem; max-width: 50ch; }

/* Home + not found */
.home-hero { background: var(--hero); color: #fff; padding: 48px 0 56px; }
.home-hero .brand { margin: 0 0 22px; font-weight: 800; color: #aab6cc; }
.home-hero h1 { font-size: clamp(1.9rem, 6vw, 3.2rem); font-weight: 800; letter-spacing: -0.03em; max-width: 20ch; }
.lead { max-width: 56ch; color: #d7deea; font-size: 1.08rem; margin: 18px 0 26px; }
.home-hero .ghost-btn { color: #fff; border-color: #43557a; margin-left: 6px; }
.how { padding: 36px 0 56px; }
.how h2 { font-size: 1.5rem; margin-bottom: 16px; }
.how-list { padding-left: 20px; display: grid; gap: 16px; max-width: 60ch; }
.how-list h3 { font-size: 1.05rem; margin-bottom: 2px; }
.how-list p { margin: 0; color: var(--ink-soft); }
.notfound { padding: 56px 0; }
.notfound h1 { margin-bottom: 10px; }

@media (min-width: 640px) {
  .filters { grid-template-columns: 2fr 1fr 1fr auto auto; align-items: center; }
  .f-search { grid-column: auto; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .card-foot { flex-direction: row; align-items: center; justify-content: space-between; }
}
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .detail-grid { grid-template-columns: 1.1fr 1fr; gap: 36px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* ---------- Dashboard (admin) ---------- */
.admin .wrap { width: min(920px, 100% - 24px); }
.auth { width: min(440px, 100% - 24px); margin: 32px auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.auth h1 { font-size: 1.5rem; margin-bottom: 4px; }
.auth .sub { margin: 0 0 16px; color: var(--ink-soft); }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.tab { flex: 1; font: inherit; font-weight: 700; padding: 10px; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; min-height: 44px; }
.tab[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; font-weight: 600; font-size: 0.9rem; }
.form input, .form select, .form textarea {
  font: inherit; font-weight: 400; padding: 10px 12px; min-height: 44px; width: 100%;
  border: 1.5px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.form textarea { min-height: 80px; resize: vertical; }
.hint { font-weight: 400; color: var(--ink-soft); font-size: 0.8rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { color: #a4231a; font-weight: 600; font-size: 0.9rem; min-height: 1.2em; margin: 0; }

.auth-page { min-height: 100vh; background: linear-gradient(135deg, #eaf2ff 0%, #d9e8ff 48%, #fff1e4 100%); }
.auth-shell { min-height: 100vh; display: flex; flex-direction: column; }
.auth-header { background: rgba(255, 255, 255, 0.92); border-bottom: 1px solid rgba(15, 27, 45, 0.1); }
.auth-shell > .auth-header > .wrap, .auth-shell > .auth-footer > .wrap { width: min(920px, calc(100% - 40px)); }
.auth-header-inner { min-height: 72px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; }
.auth-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.03em; }
.brand-icon { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(145deg, #2b50e6, #16a6a1); color: #fff; font-size: 1.05rem; font-weight: 800; line-height: 1; box-shadow: 0 3px 8px rgba(43, 80, 230, 0.22); }
.auth-nav { display: flex; justify-content: center; gap: 24px; }
.auth-nav a, .auth-footer a { color: var(--ink-soft); text-decoration: none; font-weight: 600; }
.auth-nav a:hover, .auth-footer a:hover { color: var(--accent-dark); text-decoration: underline; }
.auth-new-shop { white-space: nowrap; }
.auth-shell .auth { flex: 1; align-self: center; width: min(460px, calc(100% - 32px)); margin: 44px auto; padding: 30px; border: 1px solid rgba(255, 255, 255, 0.9); border-radius: 18px; box-shadow: 0 22px 60px rgba(29, 66, 119, 0.16); }
.auth-eyebrow { margin: 0 0 8px; color: var(--accent-dark); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.auth-shell .auth h1 { font-size: 1.8rem; letter-spacing: -0.03em; }
.auth-shell .tabs { margin-top: 22px; }
.auth-shell .tab[aria-selected="true"] { background: #2456a6; border-color: #2456a6; }
.auth-footer { background: rgba(255, 255, 255, 0.75); border-top: 1px solid rgba(15, 27, 45, 0.1); }
.auth-footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; padding-block: 18px; }
.auth-footer-brand { color: var(--ink); }
.auth-footer p { margin: 4px 0 0; color: var(--ink-soft); font-size: 0.88rem; overflow-wrap: anywhere; }
.auth-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px; }
.auth-footer nav a { font-size: 0.88rem; }
@media (max-width: 800px) {
  .auth-footer nav { flex-direction: column; align-items: flex-end; gap: 8px; }
}
@media (max-width: 640px) {
  .auth-shell > .auth-header > .wrap, .auth-shell > .auth-footer > .wrap { width: calc(100% - 32px); }
  .auth-header-inner { min-height: 64px; gap: 12px; }
  .auth-nav { display: none; }
  .auth-shell .auth { margin: 28px auto; padding: 24px 20px; }
  .auth-footer-inner { grid-template-columns: 1fr; gap: 14px; }
  .auth-footer nav { flex-direction: row; justify-content: flex-start; align-items: center; gap: 8px 16px; }
}

.topbar { background: var(--ink); color: #fff; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0; }
.topbar strong { font-size: 1.05rem; }
.topbar .ghost-btn { color: #fff; border-color: #43557a; padding: 6px 12px; min-height: 40px; }
.topbar-actions { display: flex; gap: 8px; }
.linkbar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 16px 0; display: grid; gap: 8px; }
.linkbar p { margin: 0; font-weight: 700; }
.linkrow { display: flex; gap: 8px; flex-wrap: wrap; }
.linkrow input { flex: 1; min-width: 200px; font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 8px; background: #f7f8fa; min-height: 44px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 22px 0 6px; }
.toolbar h2 { font-size: 1.25rem; }
#counts { color: var(--ink-soft); margin: 0 0 10px; font-size: 0.9rem; }
.plist { list-style: none; padding: 0; margin: 0 0 40px; display: grid; gap: 10px; }
.prow { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: grid; grid-template-columns: 64px 1fr; gap: 10px 12px; }
.prow img, .prow .thumb-empty { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: #e8ecf2; }
.prow h3 { font-size: 1rem; }
.prow .sub { color: var(--ink-soft); font-size: 0.85rem; margin: 2px 0 0; }
.prow-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { font: inherit; font-weight: 700; font-size: 0.85rem; padding: 8px 12px; background: #fff; border: 0; border-right: 1px solid var(--line); cursor: pointer; min-height: 40px; }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"][data-status="available"] { background: var(--ok); color: #fff; }
.seg button[aria-pressed="true"][data-status="reserved"] { background: var(--warn); color: #fff; }
.seg button[aria-pressed="true"][data-status="sold"] { background: var(--sold); color: #fff; }
.link-btn { font: inherit; font-weight: 600; background: none; border: 0; color: var(--accent-dark); cursor: pointer; padding: 8px; min-height: 40px; }
.link-btn.danger { color: #a4231a; }
.empty { background: #fff; border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 26px 16px; text-align: center; color: var(--ink-soft); }

dialog { border: 0; border-radius: 14px; padding: 0; width: min(560px, 100% - 16px); max-height: 92vh; }
dialog::backdrop { background: rgba(15, 27, 45, 0.55); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.dlg-head h2 { font-size: 1.15rem; }
.dlg-body { padding: 16px 18px 20px; }
.existing { display: flex; flex-wrap: wrap; gap: 8px; }
.existing label { display: grid; gap: 2px; justify-items: center; font-size: 0.75rem; font-weight: 600; }
.existing img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; }
.form .check { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; }
.form .check input { width: 16px; min-height: 16px; height: 16px; }
.dlg-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 50; max-width: calc(100% - 24px); }
#toast.show { opacity: 1; }
#toast.error { background: #a4231a; }
@media (min-width: 640px) {
  .prow { grid-template-columns: 72px 1fr auto; }
  .prow img, .prow .thumb-empty { width: 72px; height: 72px; }
  .prow-actions { grid-column: auto; flex-direction: column; align-items: flex-end; }
}

/* ---------- Plans, reminders and owner panel ---------- */
.banner { border-radius: var(--radius); padding: 12px 14px; margin: 0 0 14px; font-weight: 500; }
.banner-danger { background: #fdecea; border: 1.5px solid #e4a09a; color: #7a1a12; }
.blocked-card { background: #fff; border: 2px solid var(--sold); border-radius: var(--radius); padding: 20px 18px; margin: 16px 0; }
.blocked-card h2 { font-size: 1.25rem; margin-bottom: 8px; color: #7a1a12; }
.blocked-card p { margin: 0; max-width: 60ch; }
.usage { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 14px; }
.usage-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-bottom: 8px; }
#meter { width: 100%; height: 12px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 6px; overflow: hidden; background: #e3e8ef; }
#meter::-webkit-progress-bar { background: #e3e8ef; }
#meter::-webkit-progress-value { background: var(--ok); }
#meter::-moz-progress-bar { background: var(--ok); }
#meter.is-full::-webkit-progress-value { background: var(--sold); }
#meter.is-full::-moz-progress-bar { background: var(--sold); }
#limitNote { margin: 8px 0 0; }
.btn-primary:disabled { background: #9aa6c9; cursor: not-allowed; }

.sa-summary { margin: 18px 0 10px; font-weight: 600; }
.shop-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 12px; }
.shop-card h3 { font-size: 1.05rem; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.shop-card .sub { color: var(--ink-soft); font-size: 0.85rem; margin: 2px 0 0; word-break: break-word; }
.badge { font-size: 0.72rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; }
.badge-active { background: #dcf3e9; color: #0b5d43; }
.badge-grace { background: #fff1d6; color: #8a4b05; }
.badge-blocked { background: #fbe0dd; color: #8a1b12; }
.sa-facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.sa-facts dt { font-size: 0.75rem; color: var(--ink-soft); font-weight: 600; }
.sa-facts dd { margin: 0; font-weight: 700; }
.sa-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sa-actions select { font: inherit; padding: 8px 10px; min-height: 44px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; }
@media (min-width: 640px) { .sa-facts { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Themes (chosen by each shop) ---------- */
.theme-classic { --hero: #0f1b2d; --accent: #2b50e6; --accent-dark: #1f3cb8; --accent-soft: #e8edff; --secondary: #16a6a1; --highlight: #a45b08; --paper: #f2f4f7; }
.theme-fresh { --hero: #123b2c; --accent: #16865b; --accent-dark: #0b6844; --accent-soft: #e2f4e9; --secondary: #55a630; --highlight: #8a5b00; --paper: #f1f7f1; }
.theme-warm { --hero: #6e2a0d; --accent: #d9480f; --accent-dark: #b03a0c; --accent-soft: #fff0e5; --secondary: #e97924; --highlight: #805500; --paper: #fbf5ef; }
.theme-boutique { --hero: #3b1f3a; --accent: #a8326e; --accent-dark: #862658; --accent-soft: #f8e8f0; --secondary: #8762a8; --highlight: #8b6200; --paper: #faf5f8; --font-head: "Playfair Display", Georgia, "Times New Roman", serif; }
.theme-mono { --hero: #171b24; --accent: #e83e8c; --accent-dark: #c72c73; --accent-soft: #fde8f1; --secondary: #f16aa8; --highlight: #806000; --paper: #f9f3f6; }

/* ---------- Shop header, categories ---------- */
.shop-head-inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "logo details actions"; gap: 20px; align-items: center; position: relative; z-index: 1; }
.shop-logo { grid-area: logo; align-self: start; width: 80px; height: 80px; border-radius: 18px; object-fit: cover; background: #fff; border: 2px solid rgba(255, 255, 255, 0.3); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24); }
.shop-head-text { grid-area: details; min-width: 0; }
.shop-head-inner:not(.has-shop-logo) { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "details actions"; }
.shop-actions { grid-area: actions; margin: 0; justify-content: flex-end; }
@media (max-width: 800px) {
  .shop-head-inner { grid-template-columns: 72px minmax(0, 1fr); grid-template-areas: "logo details" "actions actions"; gap: 18px 16px; }
  .shop-logo { width: 72px; height: 72px; border-radius: 16px; }
  .shop-head-inner:not(.has-shop-logo) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "details" "actions"; }
  .shop-actions { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .shop-head { padding: 24px 0; }
  .shop-head-inner { grid-template-columns: 64px minmax(0, 1fr); gap: 14px; }
  .shop-logo { width: 64px; height: 64px; border-radius: 15px; }
  .shop-head h1 { font-size: clamp(1.65rem, 7vw, 2.1rem); }
  .shop-city { margin-top: 6px; padding: 4px 8px; font-size: 0.84rem; }
  .shop-head-inner.has-shop-logo .shop-meta,
  .shop-head-inner.has-shop-logo .shop-address { width: calc(100% + 78px); margin-left: -78px; }
  .shop-meta { margin-top: 12px; }
  .shop-address { margin-top: 10px; }
  .shop-actions { gap: 5px; }
  .shop-actions .wa-btn-lg { padding-inline: 10px; font-size: 0.9rem; }
  .shop-actions .social-btn { width: 38px; padding-inline: 6px; }
  .filters { gap: 8px; }
  .filters input[type="search"],
  .filters input[type="number"],
  .filters select { min-width: 0; font-size: 0.92rem; padding-inline: 9px; }
  .f-sort-hint { font-size: 0.72rem; }
  .f-check { font-size: 0.86rem; }
}
.cats { display: flex; gap: 8px; overflow-x: auto; padding: 16px 0 2px; scrollbar-width: thin; }
.cat { flex: none; font: inherit; font-weight: 600; font-size: 0.9rem; padding: 8px 14px; min-height: 40px; display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 99px; background: #fff; color: var(--ink); text-decoration: none; cursor: pointer; }
.cat:hover { border-color: var(--ink); }
.cat.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
@media (min-width: 640px) and (max-width: 800px) {
  .filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .f-search { grid-column: 1 / -1; }
  .filters .btn-dark { justify-self: end; }
}
@media (min-width: 801px) {
  .filters { grid-template-columns: minmax(0, 2fr) minmax(120px, 1fr) minmax(180px, 1.5fr) auto auto; }
}
.fine { color: var(--ink-soft); font-size: 0.85rem; }

/* ---------- Marketing homepage ---------- */
.home-nav { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.home-nav-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "brand login" "cta cta";
  align-items: center; gap: 10px 12px; padding: 10px 0;
}
.brand-mark {
  grid-area: brand; display: inline-flex; align-items: center; gap: 9px; min-width: 0; overflow: hidden; white-space: nowrap;
  font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; margin: 0;
}
.home-links { display: none; grid-area: links; gap: 22px; }
.home-links a { color: var(--ink-soft); font-weight: 600; text-decoration: none; font-size: 0.95rem; }
.home-links a:hover { color: var(--ink); }
.home-nav .btn-primary { grid-area: cta; width: 100%; white-space: nowrap; }
.home-nav .ghost-btn { grid-area: login; white-space: nowrap; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
.eyebrow { margin: 0 0 12px; color: #aab6cc; font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.home-hero h1 { font-size: clamp(2rem, 6vw, 3.1rem); font-weight: 800; letter-spacing: -0.03em; max-width: 18ch; }
.home-hero .lead { margin: 16px 0 24px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
.hero-note { margin: 0; color: #aab6cc; font-size: 0.9rem; }
.btn-lg { padding: 13px 22px; font-size: 1rem; min-height: 50px; }
.home-hero .btn-primary { background: #fff; color: var(--hero); }
.home-hero .btn-primary:hover { background: #e6ebf5; }
.home-hero .ghost-btn { margin-left: 0; }

.mock { background: #fff; color: var(--ink); border-radius: 16px; padding: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35); max-width: 440px; width: 100%; justify-self: center; }
.mock-bar { display: flex; justify-content: space-between; align-items: center; font-weight: 800; padding: 4px 4px 12px; }
.mock-wa { background: var(--wa); color: #fff; font-size: 0.72rem; padding: 4px 10px; border-radius: 99px; }
.mock-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mock-card { border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: grid; gap: 2px; font-size: 0.85rem; }
.mock-card > span { font-weight: 800; }
.mock-price-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.mock-wa-icon { flex: none; width: 18px; height: 18px; fill: #14803c; }
.mock-media { aspect-ratio: 1 / 1; border-radius: 8px; margin-bottom: 6px; position: relative; display: grid; place-items: center; overflow: hidden; }
.mock-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mock-media i { font-style: normal; font-weight: 800; color: var(--sold); border: 3px solid var(--sold); border-radius: 5px; padding: 0 8px; transform: rotate(-14deg); background: rgba(255, 255, 255, 0.85); font-size: 0.85rem; }

.band { padding: 44px 0; }
.band-alt { background: #fff; border-block: 1px solid var(--line); }
.band h2 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 18px; }
.section-sub { margin: -8px 0 18px; color: var(--ink-soft); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.steps h3 { margin: 8px 0 4px; font-size: 1.1rem; }
.steps p, .features p, .swatch p { margin: 0; color: var(--ink-soft); }
.step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--hero); color: #fff; font-weight: 800; }
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.features li { padding: 4px 0; border-top: 3px solid var(--accent); padding-top: 12px; }
.features h3 { font-size: 1.05rem; margin-bottom: 4px; }
.swatches { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.swatch { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.swatch-top { display: flex; align-items: center; justify-content: space-between; background: linear-gradient(90deg, var(--accent) 0 42%, var(--secondary) 42% 72%, var(--highlight) 72%) bottom / 100% 5px no-repeat, var(--hero); padding: 22px 12px; }
.swatch-top::before { content: ""; width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--accent) 0 34%, var(--secondary) 34% 67%, var(--highlight) 67%); }
.swatch-btn { background: var(--accent); color: #fff; font-weight: 700; font-size: 0.78rem; padding: 6px 10px; border-radius: 6px; display: inline-block; outline: 2px solid rgba(255, 255, 255, 0.6); }
.swatch h3 { padding: 12px 12px 2px; font-size: 1rem; }
.swatch p { padding: 0 12px 14px; font-size: 0.85rem; }
.pricing { text-align: center; }
.price-card { background: #fff; border: 2px solid var(--hero); border-radius: 16px; padding: 28px 22px; max-width: 420px; margin: 0 auto; text-align: left; }
.price-name { margin: 0; font-weight: 700; color: var(--ink-soft); }
.price-big { margin: 6px 0 0; font-size: 2.8rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.price-big span { font-size: 1rem; font-weight: 600; color: var(--ink-soft); letter-spacing: 0; }
.price-day { margin: 2px 0 16px; font-weight: 700; color: var(--ok); }
.ticks { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; }
.ticks li { padding-left: 26px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 0.45em; width: 6px; height: 11px; border: solid var(--ok); border-width: 0 3px 3px 0; transform: rotate(40deg) translateY(-3px); }
.price-card .btn-primary { width: 100%; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 16px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; min-height: 44px; }
.faq details p { margin: 0 0 14px; color: var(--ink-soft); max-width: 62ch; }
.home-foot { background: var(--hero); color: #d7deea; padding: 32px 0; }
.home-foot a { color: #fff; }
.home-foot .brand-mark { color: #fff; margin-bottom: 8px; }
.home-foot p { margin: 4px 0; }
.home-foot-inner { display: grid; gap: 18px; }
@media (min-width: 900px) {
  .home-nav-inner {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas: "brand links cta login";
    gap: 20px;
  }
  .home-links { display: flex; justify-content: center; gap: 18px; }
  .home-links a { white-space: nowrap; }
  .home-nav .btn-primary { width: auto; }
}
@media (min-width: 760px) {
  .hero-grid { grid-template-columns: 1.15fr 1fr; }
  .steps, .features { grid-template-columns: repeat(3, 1fr); }
  .swatches { grid-template-columns: repeat(5, 1fr); }
  .home-foot-inner { grid-template-columns: 1fr auto; align-items: end; }
}

/* ---------- Legal pages ---------- */
.legal { max-width: 760px; padding-bottom: 48px; }
.legal h1 { font-size: 2rem; margin-bottom: 4px; }
.legal h2 { font-size: 1.1rem; margin: 26px 0 6px; }
.legal p { margin: 0 0 10px; }
.updated { color: var(--ink-soft); font-size: 0.9rem; }

/* ---------- Dashboard additions ---------- */
.admin .cat.is-on { background: var(--ink); border-color: var(--ink); }
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
#catFilter { padding-top: 6px; }
.cat-list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.cat-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.cat-list .cat-name { font-weight: 600; word-break: break-word; }
.cat-list .cat-count { color: var(--ink-soft); font-size: 0.82rem; font-weight: 400; }
.add-cat { display: flex; gap: 8px; }
.add-cat input { flex: 1; }
.detail-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.theme-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border: 0; padding: 0; margin: 0; }
.theme-picker legend { font-weight: 600; font-size: 0.9rem; padding: 0; margin-bottom: 6px; }
.theme-opt { border: 2px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; display: grid; background: #fff; }
.theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
.theme-opt:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.theme-opt:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.sw-top { background: linear-gradient(90deg, var(--accent) 0 42%, var(--secondary) 42% 72%, var(--highlight) 72%) bottom / 100% 4px no-repeat, var(--hero); height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px; }
.sw-top i { display: block; width: 44px; height: 14px; border-radius: 4px; background: var(--accent); outline: 1px solid rgba(255, 255, 255, 0.5); }
.sw-top::after { content: ""; display: block; width: 24px; height: 14px; border-radius: 4px; background: linear-gradient(90deg, var(--secondary) 0 50%, var(--highlight) 50%); }
.theme-opt strong { font-size: 0.85rem; padding: 6px 8px 8px; }
.logo-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.logo-row img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); }
.sa-note { font-size: 0.85rem; background: #fff8e1; border: 1px solid #f0e0a0; border-radius: 6px; padding: 6px 10px; margin: 0; }
@media (min-width: 640px) { .theme-picker { grid-template-columns: repeat(3, 1fr); } }
.detail-fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.detail-fieldset legend { font-weight: 600; font-size: 0.9rem; padding: 0; margin-bottom: 6px; }
.detail-fieldset .form { gap: 8px; }
.sa-search { width: 100%; font: inherit; padding: 10px 12px; min-height: 44px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; margin-bottom: 12px; }

/* ---------- Demo banner and codes ---------- */
.banner-info { background: #e8f0ff; border: 1.5px solid #aebffa; color: #1b2f7a; }
.price-trial { margin: 0 0 16px; background: #e8f6ee; color: #0b5d43; font-weight: 600; padding: 8px 12px; border-radius: 8px; font-size: 0.92rem; }
.badge-trial { background: #e3ecff; color: #1f3cb8; }
.sa-heading { font-size: 1.25rem; margin: 22px 0 0; }
.codes-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 14px 14px; margin: 18px 0 8px; }
.codes-card .toolbar { margin-top: 12px; }
.codes-card .plist { margin: 10px 0 0; }
.code-row { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: grid; gap: 8px; background: #f9fafc; }
.code-row p { margin: 0; }
.code-text { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1.15rem; font-weight: 700; letter-spacing: 0.06em; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.code-row .sub { color: var(--ink-soft); font-size: 0.85rem; }
.badge-code-unused { background: #dcf3e9; color: #0b5d43; }
.badge-code-used { background: #e3e8ef; color: #3b4658; }
.badge-code-expired { background: #fbe0dd; color: #8a1b12; }
@media (min-width: 640px) { .code-row { grid-template-columns: 1fr auto; align-items: center; } }
