/* Design tokens: shadcn/ui "zinc" style */
:root {
  --brand: #16a34a;
  --brand-fg: #ffffff;
  --bg: #fafafa;
  --card: #ffffff;
  --fg: #09090b;
  --muted: #71717a;
  --muted-bg: #f4f4f5;
  --border: #e4e4e7;
  --ring: color-mix(in srgb, var(--brand) 35%, transparent);
  --star: #f59e0b;
  --danger: #dc2626;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px -4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 40px -10px rgba(0,0,0,.18);
  --radius: 14px;
}
/* dark theme: follows the system unless the user picked light/dark with the toggle */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09090b; --card: #111113; --fg: #fafafa; --muted: #a1a1aa;
    --muted-bg: #18181b; --border: #27272a;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 10px 40px -10px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #09090b; --card: #111113; --fg: #fafafa; --muted: #a1a1aa;
  --muted-bg: #18181b; --border: #27272a;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 10px 40px -10px rgba(0,0,0,.7);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }
body { transition: background-color .25s, color .25s; }

/* theme toggle button */
.theme-toggle {
  width: 38px; height: 38px; display: inline-grid; place-items: center; flex: none;
  border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--fg);
  cursor: pointer; box-shadow: var(--shadow); transition: background .15s, transform .1s;
}
.theme-toggle:hover { background: var(--muted-bg); }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle.floating { position: fixed; top: 14px; right: 14px; z-index: 40; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 15px/1.55 "Inter", "Noto Sans Gujarati", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.icon { width: 18px; height: 18px; flex: none; }

/* ---------- layout ---------- */
.wrap { position: relative; max-width: 480px; margin: 0 auto; padding: 0 16px 96px; }
.wide { max-width: 1080px; }

/* soft brand glow behind the header */
.glow {
  position: absolute; inset: -120px 0 auto; height: 360px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 60% at 30% 40%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%),
    radial-gradient(35% 50% at 75% 30%, color-mix(in srgb, var(--star) 14%, transparent), transparent 70%);
  filter: blur(10px);
}

/* ---------- header ---------- */
.biz { text-align: center; padding: 36px 0 22px; }
.avatar {
  width: 68px; height: 68px; margin: 0 auto 14px; border-radius: 20px;
  display: grid; place-items: center; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
  font-weight: 700; font-size: 1.6rem; color: var(--brand);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
/* full logo (wide). White panel so logos made for white backgrounds also work in dark mode */
.logo-wide {
  display: inline-flex; align-items: center; justify-content: center;
  max-width: 100%; padding: 14px 22px; margin-bottom: 14px;
  background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow);
}
.logo-wide img { display: block; max-width: 240px; max-height: 110px; width: auto; height: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.biz h1 { font-size: 1.55rem; letter-spacing: -.02em; margin: 0 0 4px; font-weight: 700; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 500; color: var(--muted);
  background: var(--card); border: 1px solid var(--border);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--ring); }

/* language picker at the top */
.lang-top { margin: 0 0 14px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); }
.lang-top button.on { background: var(--fg); color: var(--bg); box-shadow: none; }

/* ---------- stepper ---------- */
.steps { display: flex; gap: 6px; margin: 0 0 14px; }
.steps span { flex: 1; height: 4px; border-radius: 4px; background: var(--border); transition: background .4s; }
.steps span.on { background: var(--brand); }

/* ---------- card ---------- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.card h2 { font-size: 1rem; font-weight: 600; letter-spacing: -.01em; margin: 0 0 4px; }
.card .sub { color: var(--muted); font-size: .88rem; margin: 0 0 14px; }
.reveal { animation: reveal .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes reveal { from { opacity: 0; transform: translateY(10px) scale(.99); } }

/* ---------- stars ---------- */
.stars { display: flex; justify-content: center; gap: 4px; }
.stars button {
  background: none; border: 0; padding: 4px; cursor: pointer; line-height: 0;
  color: var(--border); transition: transform .15s, color .15s;
}
.stars svg { width: 42px; height: 42px; }
.stars button.on, .stars button.hover { color: var(--star); }
.stars button.on svg { filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--star) 45%, transparent)); }
.stars button:hover { transform: scale(1.12); }
.stars button.pop { animation: pop .35s; }
@keyframes pop { 50% { transform: scale(1.3); } }
.star-label { text-align: center; height: 22px; margin-top: 8px; font-weight: 600; font-size: .92rem; }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); background: var(--card); border-radius: 999px;
  padding: 7px 13px; font-size: .88rem; font-weight: 500; cursor: pointer;
  transition: all .15s;
}
.chip:hover { background: var(--muted-bg); }
.chip svg { width: 14px; height: 14px; display: none; }
.chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip.on svg { display: block; }
span.chip { cursor: default; }

/* ---------- form ---------- */
.lbl { display: block; font-weight: 500; font-size: .85rem; margin: 18px 0 8px; }
select, input, textarea {
  width: 100%; font: inherit; color: var(--fg); background: var(--card);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px;
  transition: border-color .15s, box-shadow .15s;
}
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
textarea { resize: vertical; min-height: 90px; }

.seg { display: flex; padding: 4px; gap: 4px; background: var(--muted-bg); border-radius: 12px; }
.seg button {
  flex: 1; border: 0; background: transparent; border-radius: 9px; padding: 8px 6px;
  font-size: .86rem; font-weight: 500; color: var(--muted); cursor: pointer; transition: all .15s;
}
.seg button.on { background: var(--card); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* ---------- buttons ---------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; border: 0; border-radius: 12px; padding: 12px 16px; margin-top: 10px;
  font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer;
  background: var(--brand); color: var(--brand-fg);
  box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 6px 18px -6px color-mix(in srgb, var(--brand) 70%, transparent);
  transition: transform .1s, filter .15s, opacity .15s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .7; cursor: progress; }
.btn.big { padding: 15px 16px; font-size: 1rem; }
.btn.shimmer::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%);
  transform: translateX(-100%); animation: shimmer 2.6s infinite;
}
@keyframes shimmer { 60%, 100% { transform: translateX(100%); } }
.btn.ghost { background: var(--card); color: var(--fg); border: 1px solid var(--border); box-shadow: none; }
.btn.ghost:hover { background: var(--muted-bg); filter: none; }
.btn.inline { width: auto; margin-top: 0; padding: 8px 14px; font-size: .86rem; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- review options ---------- */
.option {
  display: flex; gap: 12px; width: 100%; text-align: left; background: var(--card);
  border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 8px; cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.option:hover { background: var(--muted-bg); }
.option .radio { width: 18px; height: 18px; margin-top: 2px; flex: none; border-radius: 50%; border: 1.5px solid var(--border); transition: all .15s; }
.option.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); background: var(--card); }
.option.on .radio { border: 5px solid var(--brand); }
.skeleton { height: 66px; border-radius: 12px; margin-bottom: 8px; background: linear-gradient(90deg, var(--muted-bg) 25%, var(--border) 50%, var(--muted-bg) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

.hint { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--muted-bg); color: var(--muted); font-size: .84rem; margin-top: 12px; }
.err { color: var(--danger); font-size: .88rem; margin: 10px 0 0; }
.ok { display: flex; gap: 8px; align-items: center; color: var(--brand); font-weight: 600; font-size: .9rem; margin: 10px 0 0; }
.footer { text-align: center; color: var(--muted); font-size: .78rem; margin-top: 28px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50;
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px;
  background: var(--fg); color: var(--bg); font-weight: 500; font-size: .9rem;
  box-shadow: var(--shadow-lg); max-width: calc(100% - 32px);
  animation: toast .35s cubic-bezier(.2,.8,.2,1) both; transform: translateX(-50%);
}
.toast .check { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; flex: none; }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 16px) scale(.96); } }

/* ---------- dashboard ---------- */
.nav {
  position: sticky; top: 0; z-index: 10; backdrop-filter: saturate(180%) blur(12px);
  background: color-mix(in srgb, var(--bg) 80%, transparent); border-bottom: 1px solid var(--border);
}
.nav .inner { max-width: 1080px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; }
.brand .logo-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--fg); color: var(--bg); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 28px 0 18px; }
.page-head h1 { font-size: 1.6rem; letter-spacing: -.02em; margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
.stat { padding: 18px; }
.stat .top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .84rem; font-weight: 500; }
.stat .top svg { width: 16px; height: 16px; }
.stat b { display: block; font-size: 1.9rem; letter-spacing: -.03em; margin-top: 8px; font-weight: 700; }
.biz-card { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.qr { width: 120px; height: 120px; background: #fff; border-radius: 12px; padding: 6px; border: 1px solid var(--border); }
.url { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; color: var(--muted); word-break: break-all; padding: 6px 10px; background: var(--muted-bg); border-radius: 8px; display: inline-block; margin: 6px 0 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: .88rem; }
.bar .name { width: 40%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .track { flex: 1; height: 8px; border-radius: 8px; background: var(--muted-bg); overflow: hidden; }
.bar .fill { height: 100%; border-radius: 8px; background: var(--brand); }
.bar .n { width: 28px; text-align: right; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: .8rem; padding: 0 8px 10px; border-bottom: 1px solid var(--border); }
td { padding: 12px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.scroll { overflow-x: auto; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: .76rem; font-weight: 600; background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.empty svg { width: 28px; height: 28px; margin-bottom: 6px; opacity: .6; }

/* ---------- login ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth .card { width: 100%; max-width: 380px; padding: 28px; }
.auth h1 { font-size: 1.35rem; letter-spacing: -.02em; margin: 14px 0 4px; }
