/* Kotha AI — shared styles for the marketing site + dashboard. Plain CSS, no build.
   Design: "AI-agency SaaS" — violet→blue gradient accent, glow orbs, glass cards,
   geometric-sans headings. Dark by default; light via :root[data-theme="light"]. */

/* ── Theme tokens ─────────────────────────────────────────────────────────── */
:root {
  /* dark (default) */
  --bg: #07070d;
  --bg-soft: #0e0e18;
  --card: #13131f;
  --card-hover: #1a1a2a;
  --line: rgba(255, 255, 255, .09);
  --fg: #f2f2f8;
  --muted: #9a9ab4;
  --accent: #4a55e8;
  --accent-2: #7c88ff;
  --accent-soft: rgba(74, 85, 232, .18);
  --grad: linear-gradient(135deg, #4a55e8, #7c88ff);
  /* Solid pill CTA (reference uses a near-black button on light, light on dark) */
  --cta-bg: #f2f2f8;
  --cta-fg: #0b0b12;
  --green: #35c48a;
  --amber: #f0a83b;
  --red: #ff5c6c;
  --glass: rgba(255, 255, 255, .04);
  --glass-brd: rgba(255, 255, 255, .09);
  --nav-bg: rgba(9, 9, 16, .72);
  --backdrop: rgba(4, 4, 10, .66);
  --glow-1: color-mix(in srgb, var(--accent) 26%, transparent);
  --glow-2: color-mix(in srgb, var(--accent-2) 22%, transparent);
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 18px 50px -14px rgba(0, 0, 0, .6);
  --shadow-glow: 0 12px 34px -10px color-mix(in srgb, var(--accent) 55%, transparent);
  --font-head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans Bengali", sans-serif;
}
:root[data-theme="light"] {
  --bg: #f7f8fc;
  --bg-soft: #eceef7;
  --card: #ffffff;
  --card-hover: #f3f4fb;
  --line: rgba(20, 20, 45, .10);
  --fg: #14141f;
  --muted: #5b6077;
  --accent: #3f4ce0;
  --accent-2: #7580ef;
  --accent-soft: rgba(63, 76, 224, .12);
  --grad: linear-gradient(135deg, #3f4ce0, #7580ef);
  --cta-bg: #0e0e16;
  --cta-fg: #ffffff;
  --green: #12a866;
  --amber: #d1860f;
  --red: #e5484d;
  --glass: rgba(255, 255, 255, .7);
  --glass-brd: rgba(20, 20, 45, .08);
  --nav-bg: rgba(247, 248, 252, .8);
  --backdrop: rgba(30, 30, 60, .3);
  --shadow: 0 18px 45px -16px rgba(30, 30, 70, .2);
  --shadow-glow: 0 14px 34px -12px color-mix(in srgb, var(--accent) 40%, transparent);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 15px/1.65 var(--font-body);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  position: relative;
  transition: background .25s ease, color .25s ease;
}
/* Smooth light/dark toggle — chrome elements ease their colors instead of
   snapping instantly. Interactive elements keep their own hover/focus
   transitions (defined later, which win on specificity) untouched. */
.app-shell, .sidebar, .card, dialog, table, th, td, input, select, textarea, .pill {
  transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}

/* Ambient glow orbs behind everything (the AI-agency signature). */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(700px 420px at 15% -8%, var(--glow-1), transparent 70%),
    radial-gradient(680px 420px at 92% 2%, var(--glow-2), transparent 72%);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.02em; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: inherit; font-weight: 600; border: 1px solid var(--line);
  background: var(--card); color: var(--fg); padding: 10px 18px; min-height: 44px;
  border-radius: 11px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, filter .18s ease;
  text-decoration: none; touch-action: manipulation;
}
.btn:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn.primary { background: var(--grad); border: none; color: #fff; box-shadow: var(--shadow-glow); }
.btn.primary:hover { filter: brightness(1.07); box-shadow: 0 16px 40px -8px color-mix(in srgb, var(--accent) 60%, transparent); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 11px; font-size: 13px; border-radius: 9px; min-height: 38px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
/* Solid pill CTA — near-black on light, near-white on dark (reference style). */
.btn.dark { background: var(--cta-bg); color: var(--cta-fg); border: none; border-radius: 999px; padding: 12px 22px; }
.btn.dark:hover { filter: brightness(1.12); }
:root[data-theme="light"] .btn.dark:hover { filter: none; background: #23233a; }
.btn.pill { border-radius: 999px; }

/* Theme toggle */
.theme-toggle {
  width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--card); color: var(--fg); cursor: pointer; font-size: 16px;
  display: inline-grid; place-items: center; transition: .18s ease; line-height: 1;
}
.theme-toggle:hover { border-color: var(--accent); transform: translateY(-1px); }
.theme-toggle svg { width: 16px; height: 16px; }
.only-light { display: none; }
:root[data-theme="light"] .only-light { display: inline-grid; place-items: center; }
:root[data-theme="light"] .only-dark { display: none; }
.only-dark { display: inline-grid; place-items: center; }

/* ── Marketing nav ── */
.nav {
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px);
  background: var(--nav-bg); border-bottom: 1px solid var(--line);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 66px; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 19px; color: var(--fg); }
.brand .logo {
  width: 32px; height: 32px; border-radius: 10px; background: var(--grad);
  display: grid; place-items: center; font-size: 16px; color: #fff; box-shadow: var(--shadow-glow);
}
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { color: var(--muted); font-weight: 500; position: relative; }
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -3px; height: 2px;
  background: var(--grad); border-radius: 2px; transition: right .22s ease;
}
.nav-links a:not(.btn):hover::after { right: 0; }
.nav-links a:hover { color: var(--fg); text-decoration: none; }

/* Mobile hamburger — hidden on desktop, toggles the nav-links panel below 720px. */
.nav-burger {
  display: none; width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; flex-direction: column; align-items: center;
  justify-content: center; gap: 5px; touch-action: manipulation;
}
.nav-burger span { display: block; width: 18px; height: 2px; background: var(--fg); border-radius: 2px; transition: transform .22s ease, opacity .22s ease; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero ── */
.hero { padding: 104px 0 78px; text-align: center; position: relative; overflow: hidden; }
.hero .badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px;
  border: 1px solid var(--glass-brd); background: var(--glass); backdrop-filter: blur(8px);
  border-radius: 999px; color: var(--muted); font-size: 13px; margin-bottom: 24px;
}
.hero h1 { font-size: clamp(32px, 5.4vw, 58px); }
.hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p.sub { font-size: 18px; color: var(--muted); max-width: 650px; margin: 0 auto 30px; }
.hero .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .note { margin-top: 16px; color: var(--muted); font-size: 13px; }

/* ── Sections ── */
section { padding: 70px 0; position: relative; }
.section-head { text-align: center; margin-bottom: 46px; }
.section-head h2 { font-size: clamp(26px, 3.6vw, 38px); }
.section-head p { color: var(--muted); max-width: 580px; margin: 0 auto; }

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.feature {
  background: var(--glass); border: 1px solid var(--glass-brd); border-radius: var(--radius-lg);
  padding: 24px; transition: .2s ease; backdrop-filter: blur(8px);
}
.feature:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-3px); box-shadow: var(--shadow); }
.feature .ico {
  font-size: 22px; margin-bottom: 14px; width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center; background: var(--accent-soft);
}
.feature h3 { font-size: 17px; }
.feature p { color: var(--muted); margin: 0; font-size: 14px; }

/* Pricing */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; max-width: 920px; margin: 0 auto; }
.plan {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px; display: flex; flex-direction: column;
}
.plan.featured { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: var(--shadow); position: relative; }
.plan.featured::after {
  content: "Most popular"; position: absolute; top: -11px; right: 22px;
  background: var(--grad); color: #fff; font-size: 12px; font-weight: 600;
  padding: 3px 11px; border-radius: 999px; box-shadow: var(--shadow-glow);
}
.plan h3 { font-size: 18px; }
.plan .price { font-family: var(--font-head); font-size: 36px; font-weight: 700; margin: 6px 0 2px; }
.plan .price span { font-size: 15px; font-weight: 500; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 18px 0; color: var(--muted); font-size: 14px; flex: 1; }
.plan li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.plan li::before { content: "✓ "; color: var(--green); font-weight: 700; }

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

/* ── Auth pages ── */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; }
.auth-topbar { position: fixed; top: 18px; right: 18px; }
.auth-card {
  width: 100%; max-width: 410px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 24px; }
.auth-card .sub { color: var(--muted); margin: 0 0 24px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 11px 13px; background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 10px; color: var(--fg); font: inherit;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.auth-card .btn { width: 100%; justify-content: center; margin-top: 6px; }
.auth-switch { text-align: center; margin-top: 18px; color: var(--muted); font-size: 14px; }
.err { color: var(--red); font-size: 13px; min-height: 18px; margin: 8px 0 0; }
.ok { color: var(--green); font-size: 13px; min-height: 18px; margin: 8px 0 0; }

/* Tabs shown/hidden helpers */
.hidden { display: none !important; }

/* ── Dashboard ── */
.app-shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { background: var(--bg-soft); border-right: 1px solid var(--line); padding: 20px 14px; }
.sidebar .brand { font-size: 17px; margin-bottom: 28px; padding: 0 6px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  color: var(--muted); font-weight: 500; cursor: pointer; transition: .15s ease;
}
.side-nav a:hover { background: var(--card); color: var(--fg); text-decoration: none; }
.side-nav a.active { background: var(--accent-soft); color: var(--fg); box-shadow: inset 2px 0 0 var(--accent); }
.sidebar .foot { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.sidebar .foot .theme-toggle { margin-top: 12px; }
.main { padding: 28px 32px; overflow: auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; gap: 12px; }
.topbar h1 { font-size: 24px; margin: 0; }

/* Stat cards (Admin panel; the Overview page uses .ov-ticker instead) */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; transition: .18s ease; }
.stat:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-family: var(--font-head); font-size: 30px; font-weight: 700; margin-top: 4px; }

/* ── Overview page ─────────────────────────────────────────────────────────
   Deliberately NOT a grid-of-icon-boxes + donut-chart layout (that's the
   generic template every storefront-builder dashboard converges on) — a single
   gradient ticker strip up top, then the existing .od-grid main+sidebar split
   (same pattern as the Order/Product detail pages) with a stacked status bar
   instead of a donut and one combined sidebar card instead of three. */
.ov-greet { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(120deg, var(--accent-soft), transparent 70%); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 16px 22px; margin-bottom: 16px; }
.ov-greet-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ov-greet-logo { width: 42px; height: 42px; border-radius: 11px; object-fit: cover; border: 1px solid var(--line); flex-shrink: 0; }
.ov-greet-logo.ph { background: var(--grad); display: grid; place-items: center; color: #fff; font-weight: 700; font-family: var(--font-head); font-size: 17px; }
.ov-greet-name { font-weight: 700; font-size: 16px; }
.ov-greet-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

.ov-banners { position: relative; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 20px; box-shadow: var(--shadow); }
.ov-banners img { width: 100%; height: 170px; object-fit: cover; display: block; background: var(--bg-soft); }
.ov-banner-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.ov-banner-dots span { width: 7px; height: 7px; border-radius: 999px; background: rgba(255,255,255,.5); cursor: pointer; transition: background .15s; }
.ov-banner-dots span.on { background: #fff; }

.ov-ticker { display: flex; align-items: stretch; background: linear-gradient(120deg, var(--accent-soft), transparent 70%);
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 26px; margin-bottom: 20px; overflow-x: auto; }
.ov-ticker-item { flex: 1; min-width: 130px; padding: 0 22px; border-left: 1px solid var(--line); }
.ov-ticker-item:first-child { border-left: none; padding-left: 0; }
.ov-t-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.ov-t-label svg { width: 14px; height: 14px; flex-shrink: 0; }
.ov-t-value { font-family: var(--font-head); font-size: 23px; font-weight: 700; margin-top: 5px; }
.ov-ticker-item.warn .ov-t-value { color: var(--red); }

.chart-stats { display: flex; gap: 28px; margin: -6px 0 14px; }
.chart-stats div span { display: block; color: var(--muted); font-size: 12px; }
.chart-stats div strong { font-family: var(--font-head); font-size: 16px; }

.ov-stackbar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--bg-soft); }
.ov-stackbar span { height: 100%; }
.chart-legend { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.chart-legend .row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.chart-legend .dot { width: 9px; height: 9px; border-radius: 999px; flex-shrink: 0; }
.chart-legend .row strong { margin-left: auto; }

.ov-side-section { padding: 16px 0; border-top: 1px solid var(--line); }
.ov-side-section:first-child { padding-top: 0; border-top: none; }
.ov-side-section h4 { margin: 0 0 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ov-list-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.ov-list-row .rank { width: 18px; color: var(--muted); font-size: 12px; flex-shrink: 0; }
.ov-list-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.ov-list-row .val { font-weight: 600; font-size: 13px; }
.ov-list-row .val.low { color: var(--red); }
.qa-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.qa-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--bg-soft); color: var(--fg); cursor: pointer; font: inherit; font-size: 12px; transition: .15s ease; }
.qa-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.qa-btn svg { width: 18px; height: 18px; }

/* Filters */
.filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filters button { font: inherit; cursor: pointer; border: 1px solid var(--line); background: var(--card);
  color: var(--muted); padding: 6px 15px; border-radius: 999px; font-size: 13px; transition: .15s ease; }
.filters button:hover { color: var(--fg); }
.filters button.on { background: var(--grad); border-color: transparent; color: #fff; }

/* Tables */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 15px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--card-hover); }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--line); background: var(--bg-soft); }
.s-captured { color: var(--muted); }
.s-confirmed { color: var(--accent); }
.s-shipped { color: var(--amber); }
.s-delivered { color: var(--green); }
.s-returned, .s-cancelled { color: var(--red); }
.risk-high { color: var(--red); } .risk-medium { color: var(--amber); }
.risk-low { color: var(--green); } .risk-unknown { color: var(--muted); }

select.mini { background: var(--bg-soft); border: 1px solid var(--line); color: var(--fg);
  border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 13px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .big { font-size: 40px; margin-bottom: 10px; }
.empty .big svg { width: 40px; height: 40px; }

/* Dialog */
dialog { background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px; max-width: 520px; width: 92%; box-shadow: var(--shadow); }
dialog::backdrop { background: var(--backdrop); backdrop-filter: blur(3px); }
dialog h3 { margin: 0 0 14px; }
dialog .actions { margin-top: 20px; display: flex; gap: 8px; justify-content: flex-end; }
.fraud-notes { margin: 12px 0 0; padding-left: 18px; } .fraud-notes li { margin: 4px 0; }
.big-risk { font-size: 20px; font-weight: 800; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--card); border: 1px solid var(--accent); padding: 12px 20px; border-radius: 11px;
  box-shadow: var(--shadow); z-index: 100; }

/* ══════════════════════════════════════════════════════════════════════════
   Marketing landing — "AI automation agency" layout (reference-matched)
   ══════════════════════════════════════════════════════════════════════════ */

/* Decorative gradient shapes (stand in for the reference's 3D renders). */
.shape { position: absolute; border-radius: 30px; background: var(--grad);
  filter: blur(2px); opacity: .9; pointer-events: none; z-index: 0; }
.shape.blur { filter: blur(60px); opacity: .5; border-radius: 999px; }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  color: var(--accent); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }

/* Hero — left-aligned copy with a gradient visual panel. */
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero-copy { text-align: left; }
.hero-copy .cta { justify-content: flex-start; }
.hero-visual { position: relative; height: 340px; border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 85%, #fff 0%), var(--accent-2));
  box-shadow: var(--shadow); }
.hero-visual svg.hv-illo { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-visual .hv-phone, .hero-visual .hv-card, .hero-visual .hv-panel { transform-box: fill-box; transform-origin: 50% 50%; }
.hero-visual .hv-panel { animation: floatP1 6s ease-in-out infinite; }
.hero-visual .hv-card { animation: floatP2 7s ease-in-out infinite .4s; }
.hero-visual .hv-phone { animation: floatP3 6.5s ease-in-out infinite .8s; }
@keyframes floatP1 { 0%, 100% { transform: rotate(4deg) translateY(0); } 50% { transform: rotate(4deg) translateY(-10px); } }
@keyframes floatP2 { 0%, 100% { transform: rotate(7deg) translateY(0); } 50% { transform: rotate(7deg) translateY(8px); } }
@keyframes floatP3 { 0%, 100% { transform: rotate(-9deg) translateY(0); } 50% { transform: rotate(-9deg) translateY(-9px); } }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } .hero-visual { height: 220px; } }

/* Scroll-reveal — cards/sections fade + rise into view once, skipped for reduced-motion. */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s cubic-bezier(.16,.84,.44,1), transform .6s cubic-bezier(.16,.84,.44,1); }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
  .hero-visual .hv-phone, .hero-visual .hv-card, .hero-visual .hv-panel { animation: none; }
  .btn, .svc, .scn, .feature { transition: none; }
}

/* Icon badges — inline SVG (not emoji) inside .ico containers across cards. */
.ico svg { width: 22px; height: 22px; }

/* Logo / works-with strip */
.logostrip { padding: 30px 0 8px; }
.logostrip .cap { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.logos { display: flex; flex-wrap: wrap; gap: 14px 30px; justify-content: center; align-items: center; }
.logos span { color: var(--muted); font-weight: 700; font-family: var(--font-head); font-size: 16px; opacity: .8; }

/* Service cards (one highlighted dark) */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.svc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px; transition: .2s ease; }
.svc:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.svc .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); font-size: 20px; margin-bottom: 14px; }
.svc h3 { font-size: 16px; margin-bottom: 6px; }
.svc p { color: var(--muted); font-size: 13.5px; margin: 0; }
.svc.dark { background: #14141f; color: #fff; border-color: transparent; }
.svc.dark p { color: #b9b9cf; }
.svc.dark .ico { background: rgba(255,255,255,.1); }

/* "See what's possible" scenario gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.scn { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.scn:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.scn .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 12px; }
.scn .ico svg { width: 18px; height: 18px; }
.scn .tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.scn h3 { font-size: 16px; margin: 8px 0 6px; }
.scn p { color: var(--muted); font-size: 13.5px; margin: 0 0 12px; }
.scn .chk { color: var(--green); font-size: 13px; font-weight: 600; }

/* Process steps */
.process { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.step { position: relative; padding: 4px 6px; }
.step .n { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; background: var(--grad); color: #fff; margin-bottom: 12px; }
.step h3 { font-size: 16px; }
.step p { color: var(--muted); font-size: 13.5px; margin: 0; }

/* Dark contrast band (fixed dark in both themes) */
.band-dark { background: #0b0b13; color: #f2f2f7; position: relative; overflow: hidden;
  --card: #16161f; --card-hover: #1c1c28; --line: rgba(255,255,255,.09); --muted: #9a9ab4; --bg-soft: #12121b; }
.band-dark .section-head h2, .band-dark h2 { color: #fff; }

/* Industry cards */
.ind-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.ind { border-radius: var(--radius-lg); padding: 22px 18px; min-height: 150px; display: flex;
  flex-direction: column; justify-content: flex-end; color: #fff; position: relative; overflow: hidden;
  border: 1px solid rgba(255,255,255,.08); }
.ind::before { content: ""; position: absolute; inset: 0; opacity: .85; z-index: 0; }
.ind.i1::before { background: linear-gradient(160deg, #6d78ff, #3a3f8f); }
.ind.i2::before { background: linear-gradient(160deg, #ff7eb3, #b0407a); }
.ind.i3::before { background: linear-gradient(160deg, #43c6ac, #1c7d68); }
.ind.i4::before { background: linear-gradient(160deg, #f6b756, #b5771f); }
.ind.i5::before { background: linear-gradient(160deg, #8b93ff, #4b4fae); }
.ind span { position: relative; z-index: 1; font-family: var(--font-head); font-weight: 600; font-size: 16px; }
.ind small { position: relative; z-index: 1; opacity: .85; font-size: 12px; }

/* Results / stat cards + chat mockup */
.results { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: stretch; }
@media (max-width: 820px) { .results { grid-template-columns: 1fr; } }
.result-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rc { border-radius: var(--radius-lg); padding: 20px; border: 1px solid var(--line); }
.rc.c1 { background: color-mix(in srgb, var(--accent) 14%, var(--card)); }
.rc.c2 { background: color-mix(in srgb, #43c6ac 12%, var(--card)); }
.rc.c3 { background: color-mix(in srgb, #ff7eb3 12%, var(--card)); }
.rc.c4 { background: var(--card); }
.rc .big { font-family: var(--font-head); font-size: 30px; font-weight: 700; }
.rc .lbl { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* Messenger-style chat mockup (showcases the option-buttons feature) */
.chatmock { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 16px; box-shadow: var(--shadow); }
.chatmock .cm-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.chatmock .cm-ava { width: 34px; height: 34px; border-radius: 999px; background: var(--grad); }
.chatmock .cm-name { font-weight: 700; font-size: 14px; }
.chatmock .cm-sub { color: var(--muted); font-size: 12px; }
.bubble { max-width: 78%; padding: 9px 13px; border-radius: 14px; font-size: 13.5px; margin-bottom: 8px; line-height: 1.5; }
.bubble.bot { background: var(--bg-soft); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.bubble.me { background: var(--grad); color: #fff; margin-left: auto; border-bottom-right-radius: 5px; }
.qr { display: flex; flex-wrap: wrap; gap: 7px; margin: 2px 0 12px; }
.qr button { font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 14px; border-radius: 999px;
  border: 1.5px solid var(--accent); color: var(--accent); background: transparent; cursor: default; }

/* Testimonials */
.tmt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.tmt { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; }
.tmt p { font-size: 14.5px; margin: 0 0 16px; }
.tmt .who { display: flex; align-items: center; gap: 10px; }
.tmt .who .ava { width: 36px; height: 36px; border-radius: 999px; background: var(--accent-soft); display: grid; place-items: center; font-weight: 700; color: var(--accent); }
.tmt .who b { font-size: 13.5px; display: block; }
.tmt .who small { color: var(--muted); }

/* FAQ accordion */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; margin-bottom: 10px; background: var(--card); }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 20px; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 0 0 14px; font-size: 14px; }

/* Articles / resources */
.art-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.art { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.art .cover { height: 120px; }
.art .cv1 { background: linear-gradient(140deg, #6d78ff, #9aa8ff); }
.art .cv2 { background: linear-gradient(140deg, #43c6ac, #6d78ff); }
.art .cv3 { background: linear-gradient(140deg, #ff7eb3, #8b93ff); }
.art .body { padding: 18px; }
.art .tag { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); font-weight: 700; }
.art h3 { font-size: 16px; margin: 8px 0 6px; }
.art p { color: var(--muted); font-size: 13.5px; margin: 0; }

/* Contact band */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

/* Manage Shop hub (sub-section navigation) */
.ms-hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 8px; }
.ms-card { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.ms-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.ms-ico { font-size: 24px; width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; flex-shrink: 0; }
.ms-title { font-weight: 600; }
.ms-arrow { margin-left: auto; color: var(--muted); font-size: 18px; }
.ms-back { display: inline-block; color: var(--muted); font-size: 14px; margin-bottom: 4px; cursor: pointer; }
.ms-back:hover { color: var(--fg); }

/* Product dialog: variant + spec builder sections */
.pv-section { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.variant-group input, .opt-row input, .spec-row input { padding: 8px 10px; }

@media (max-width: 720px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .result-cards { grid-template-columns: 1fr; }
  .ms-hub { grid-template-columns: 1fr; }

  .nav-burger { display: inline-flex; }
  .nav-links {
    position: absolute; top: 66px; left: 0; right: 0; z-index: 30;
    background: var(--bg); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 4px; padding: 10px 20px 18px;
    display: none; box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 10px 4px; }
  .nav-links a:not(.btn)::after { display: none; }
  .nav-links .btn { width: 100%; justify-content: center; }
  .nav-links .theme-toggle { align-self: center; margin-top: 8px; }
}

@media (max-width: 480px) {
  .hero { padding: 64px 0 46px; }
  .hero h1 { font-size: clamp(26px, 8vw, 32px); }
  .hero p.sub { font-size: 15.5px; }
  .hero .cta { flex-direction: column; align-items: stretch; }
  .hero .cta .btn { justify-content: center; }
  section { padding: 48px 0; }
  .section-head { margin-bottom: 32px; }
  .section-head h2 { font-size: 23px; }
  .svc-grid, .gallery, .tmt-grid, .art-grid, .process, .ind-grid, .pricing { grid-template-columns: 1fr; }
}

/* ── Product photo gallery (product dialog) ─────────────────────────────── */
.pg-gallery { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.pg-gallery:empty { display: none; }
.pg-thumb { position: relative; width: 88px; height: 88px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); cursor: grab; background: var(--bg-soft); }
.pg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* The main image gets a larger, prominent preview. */
.pg-thumb.main { width: 132px; height: 132px; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
/* Broken/unreachable image → clean placeholder instead of a tiny broken icon. */
.pg-thumb.pg-broken::before { content: "🖼"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; opacity: .5; }
.pg-thumb.pg-broken::after { content: "image unavailable"; position: absolute; left: 0; right: 0; bottom: 7px; text-align: center; font-size: 9px; color: var(--muted); }
.pg-thumb.dragging { opacity: .4; }
.pg-thumb.pick { cursor: pointer; width: 60px; height: 60px; }
.pg-thumb.pick.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.pg-badge { position: absolute; left: 4px; bottom: 4px; font-size: 10px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 5px; padding: 1px 5px; }
.pg-setmain, .pg-remove { position: absolute; top: 3px; width: 20px; height: 20px; border: none; border-radius: 6px; font-size: 12px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.pg-remove { right: 3px; background: rgba(0,0,0,.6); color: #fff; }
.pg-setmain { left: 3px; background: rgba(0,0,0,.55); color: #ffd24a; }
.pg-drop { margin-top: 8px; border: 1.5px dashed var(--line); border-radius: 12px; padding: 16px; text-align: center; color: var(--fg); cursor: pointer; transition: border-color .15s, background .15s; }
.pg-drop:hover, .pg-drop:focus { border-color: var(--accent); }
.pg-drop.over { border-color: var(--accent); background: var(--accent-soft); }

/* ── Order detail page (dashboard, ZatiqEasy-style two-column) ───────────── */
.od-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.od-header-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.od-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.od-card { padding: 20px 22px; margin-bottom: 20px; }
.od-side .od-card:last-child { margin-bottom: 0; }
@media (max-width: 900px) { .od-grid { grid-template-columns: 1fr; } }
.oe-icon-field { position: relative; }
.oe-icon-field input, .oe-icon-field textarea { padding-left: 34px !important; }
.oe-icon-field .oe-ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font-size: 14px; opacity: .55; pointer-events: none; }
.oe-icon-field textarea ~ .oe-ic, .oe-icon-field .oe-ic.top { top: 13px; transform: none; }

/* Add-product picker modal */
.ap-list { display: flex; flex-direction: column; gap: 8px; max-height: 380px; overflow-y: auto; }
.ap-row { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); flex-wrap: wrap; }
.ap-info { flex: 1 1 120px; min-width: 0; }
.ap-info strong { display: block; font-size: 13.5px; }
.ap-row select.ap-variant { padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); color: var(--fg); font: inherit; font-size: 12.5px; max-width: 150px; }
.ap-row input.ap-qty { width: 48px; padding: 7px 6px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); color: var(--fg); font: inherit; text-align: center; }

/* Item rows */
.oe-items-head { display: grid; grid-template-columns: 44px 1fr 96px 84px 30px; gap: 8px; padding: 0 10px; margin-bottom: 4px; }
.oe-items-head span { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.oe-item-row { display: grid; grid-template-columns: 44px 1fr 96px 84px 30px; gap: 8px; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); margin-bottom: 7px; transition: border-color .15s; }
.oe-item-row:focus-within { border-color: var(--accent); }
.oe-i-thumb { width: 40px; height: 40px; border-radius: 8px; overflow: hidden; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; flex-shrink: 0; }
.oe-i-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.oe-i-thumb span { font-size: 16px; opacity: .4; }
.oe-item-row input { min-width: 0; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--fg); font: inherit; font-size: 13.5px; }
.oe-item-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.oe-qty { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--card); overflow: hidden; }
.oe-qty input { border: none !important; text-align: center; padding: 7px 0 !important; -moz-appearance: textfield; }
.oe-qty input::-webkit-outer-spin-button, .oe-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.oe-qty-btn { width: 24px; align-self: stretch; border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; display: grid; place-items: center; flex-shrink: 0; }
.oe-qty-btn:hover { background: var(--accent-soft); color: var(--accent); }
.oe-i-del { width: 26px; height: 26px; padding: 0; border-radius: 7px; display: grid; place-items: center; font-size: 15px; line-height: 1; color: var(--muted); transition: color .15s, background .15s, border-color .15s; }
.oe-i-del:hover { color: #fff; background: var(--red); border-color: var(--red); }

/* ── Native app (Capacitor) safe-area insets ─────────────────────────────── */
/* Only applies inside the native shell (native.js adds .native-app). Keeps the
   status bar / notch and home-indicator from overlapping the UI. */
html.native-app body { box-sizing: border-box;
  padding-bottom: env(safe-area-inset-bottom); }

/* ── Bulk Import Wizard ──────────────────────────────────────────────────────── */

.bulk-import-modal {
  border: none;
  border-radius: 16px;
  background: var(--bg);
  color: var(--fg);
  padding: 0;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
  width: 90vw;
  max-width: 600px;
}
.bulk-import-modal::backdrop {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}
.bulk-modal-inner {
  padding: 24px 28px;
}
.bulk-modal-wide {
  max-width: 800px;
}

.bulk-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.bulk-header h2 {
  margin: 0;
  font-size: 20px;
}
.bulk-step-badge {
  background: var(--bg-soft);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.bulk-drop-zone {
  border: 2px dashed var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
  text-align: center;
  padding: 40px 20px;
  transition: all 0.2s ease;
  cursor: pointer;
}
.bulk-drop-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 15px var(--accent-soft);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}
.bulk-drop-content h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.bulk-drop-rules {
  text-align: left;
  max-width: 320px;
  margin: 16px auto 0;
  font-size: 13px;
  padding-left: 20px;
}
.bulk-drop-rules li {
  margin-bottom: 4px;
}

.bulk-toolbar {
  display: flex;
  justify-content: space-between;
  background: var(--bg-soft);
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  position: sticky;
  top: -24px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.bulk-product-list {
  max-height: 500px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bulk-row {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.bulk-row-check {
  padding-top: 4px;
}
.bulk-row-content {
  flex: 1;
  min-width: 0;
}
.bulk-row-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.bulk-thumbs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.bulk-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.bulk-thumb-more {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.bulk-ai-chip {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.1), rgba(var(--green-rgb), 0.1));
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.bulk-row-fields {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}
.bulk-row-fields .field {
  flex: 1;
  margin: 0;
}
.bulk-row-fields input, .bulk-row-fields select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  font: inherit;
  color: var(--fg);
}
.bulk-desc {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  font: inherit;
  color: var(--fg);
  resize: vertical;
}

.bulk-progress-wrap {
  height: 12px;
  background: var(--bg-soft);
  border-radius: 6px;
  overflow: hidden;
  margin: 16px 0 8px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}
.bulk-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #ff7e5f);
  border-radius: 6px;
  transition: width 0.3s ease;
}
.bulk-progress-text {
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.bulk-log {
  margin-top: 24px;
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 12px;
  max-height: 200px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 12px;
}
.bulk-log-line {
  margin-bottom: 4px;
  color: var(--fg);
}
.bulk-log-line.error {
  color: var(--red);
}
.bulk-spinner {
  display: inline-block;
  animation: spin 2s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* ── Customize Theme studio ─────────────────────────────────────────────────*/
.ct-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ct-actions { display: flex; align-items: center; gap: 8px; }
.ct-studio { display: grid; grid-template-columns: 380px 1fr; gap: 18px; align-items: start; }
.ct-controls { max-height: calc(100vh - 150px); overflow-y: auto; padding-right: 6px; display: flex; flex-direction: column; gap: 14px; }
.ct-controls::-webkit-scrollbar { width: 8px; }
.ct-controls::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.ct-group { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.ct-glabel { font-family: var(--font-head); font-weight: 700; font-size: 13px; letter-spacing: .01em; margin-bottom: 12px; }
.ct-field { margin-bottom: 12px; }
.ct-field:last-child { margin-bottom: 0; }
.ct-field > label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.ct-field input[type="text"], .ct-field textarea, .ct-select { width: 100%; padding: 9px 11px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 9px; color: var(--fg); font: inherit; font-size: 14px; }
.ct-field textarea { resize: vertical; min-height: 60px; }
.ct-field textarea.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12px; }
.ct-field input:focus, .ct-field textarea:focus, .ct-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ct-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ct-hint { font-size: 12px; color: var(--muted); margin: 8px 0 0; }

/* Preset swatches */
.ct-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ct-preset { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; background: var(--bg-soft); border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; color: var(--fg); font: inherit; font-size: 12px; font-weight: 600; transition: border-color .15s ease, transform .15s ease; }
.ct-preset:hover { transform: translateY(-1px); }
.ct-preset.on { border-color: var(--accent); }
.ct-sw { width: 100%; height: 26px; border-radius: 7px; }

/* Colour picker pair */
.ct-color { display: flex; align-items: center; gap: 8px; }
.ct-color input[type="color"] { width: 42px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-soft); cursor: pointer; }
.ct-color input[data-hex] { flex: 1; text-transform: lowercase; }

/* Segmented control */
.ct-seg { display: flex; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; }
.ct-seg button { flex: 1; padding: 7px 6px; border: none; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; border-radius: 7px; cursor: pointer; transition: all .15s ease; }
.ct-seg button:hover { color: var(--fg); }
.ct-seg button.on { background: var(--accent); color: #fff; }

/* Checkboxes */
.ct-check { display: flex; align-items: center; gap: 9px; font-size: 14px; margin: 8px 0; cursor: pointer; }
.ct-check input { width: 17px; height: 17px; accent-color: var(--accent); }

/* Banner editor */
.ct-banners { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.ct-banner { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.ct-banner-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 13px; }
.ct-x { border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.ct-x:hover { color: var(--red); background: var(--card); }

/* Sections manager */
.ct-secs { display: flex; flex-direction: column; gap: 6px; }
.ct-sec { display: flex; align-items: center; justify-content: space-between; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; }
.ct-sec .ct-check { margin: 0; }
.ct-move { display: flex; gap: 4px; }
.ct-move button { width: 28px; height: 28px; border: 1px solid var(--line); background: var(--card); color: var(--fg); border-radius: 7px; cursor: pointer; font-size: 13px; }
.ct-move button:hover:not(:disabled) { border-color: var(--accent); }
.ct-move button:disabled { opacity: .35; cursor: default; }

/* Preview pane */
.ct-preview { position: sticky; top: 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
.ct-frame-bar { display: flex; align-items: center; gap: 6px; padding: 9px 14px; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.ct-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.ct-url { flex: 1; margin-left: 8px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-vp button { border: none; background: transparent; cursor: pointer; font-size: 15px; opacity: .5; padding: 2px 5px; border-radius: 6px; }
.ct-vp button.on { opacity: 1; background: var(--card); }
.ct-frame-wrap { height: calc(100vh - 210px); min-height: 480px; display: flex; justify-content: center; background: var(--bg-soft); }
.ct-frame-wrap iframe { width: 100%; height: 100%; border: none; background: #fff; transition: width .25s ease; }
.ct-frame-wrap.mobile iframe { width: 390px; box-shadow: 0 0 0 1px var(--line); }
.ct-noframe { max-width: 420px; margin: auto; padding: 30px; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.7; }

@media (max-width: 1000px) {
  .ct-studio { grid-template-columns: 1fr; }
  .ct-controls { max-height: none; overflow: visible; }
  .ct-preview { position: static; }
  .ct-frame-wrap { height: 70vh; }
}
