/* ═══════════════════════════════════════════════════════════════════════════
   GoodMarket — дизайн-система
   Світла тема за замовчуванням, темна через [data-theme="dark"].
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --bg: #f4f5fa;
  --bg-elev: #ffffff;
  --bg-sunken: #eceef5;
  --bg-hover: #f0f1f8;
  --border: #e3e5ee;
  --border-strong: #cdd0de;
  --text: #15172b;
  --text-2: #5b5f78;
  --text-3: #8b8fa8;

  --brand: #7c5cff;
  --brand-2: #a78bfa;
  --brand-ink: #ffffff;
  --brand-soft: #efeaff;
  --brand-soft-ink: #5a3fd6;
  --gradient: linear-gradient(135deg, #7c5cff 0%, #b06bff 55%, #ff7ad9 100%);

  --ok: #14a06a;      --ok-soft: #e3f7ee;    --ok-ink: #0b7a4f;
  --warn: #e0a100;    --warn-soft: #fff5d6;  --warn-ink: #8a6200;
  --danger: #e5484d;  --danger-soft: #ffe8e9; --danger-ink: #c1282e;
  --info: #3b82f6;    --info-soft: #e6efff;  --info-ink: #1d5fcc;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --shadow-sm: 0 1px 2px rgb(20 23 43 / .05), 0 1px 6px rgb(20 23 43 / .04);
  --shadow: 0 4px 14px rgb(20 23 43 / .06), 0 1px 3px rgb(20 23 43 / .05);
  --shadow-lg: 0 20px 50px rgb(20 23 43 / .16), 0 4px 12px rgb(20 23 43 / .08);
  --ring: 0 0 0 4px rgb(124 92 255 / .22);

  --sidebar-w: 264px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0e0f1a;
  --bg-elev: #171929;
  --bg-sunken: #0a0b14;
  --bg-hover: #1e2135;
  --border: #262a40;
  --border-strong: #363b58;
  --text: #eef0fa;
  --text-2: #a6aac4;
  --text-3: #6f7391;

  --brand: #8f74ff;
  --brand-2: #b79dff;
  --brand-soft: #251f45;
  --brand-soft-ink: #c3b1ff;

  --ok: #2ecc8a;      --ok-soft: #12302a;    --ok-ink: #6ee7b7;
  --warn: #f5b921;    --warn-soft: #33290f;  --warn-ink: #fcd34d;
  --danger: #ff6b70;  --danger-soft: #3a1a1e; --danger-ink: #fca5a5;
  --info: #60a5fa;    --info-soft: #172a4a;  --info-ink: #93c5fd;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
  --shadow: 0 4px 16px rgb(0 0 0 / .45);
  --shadow-lg: 0 24px 60px rgb(0 0 0 / .6);
  --ring: 0 0 0 4px rgb(143 116 255 / .3);
  color-scheme: dark;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.5;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background .25s, color .25s;
}
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; }
h1 { font-size: 26px; } h2 { font-size: 20px; } h3 { font-size: 16px; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 13px; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pre { white-space: pre-wrap; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--text);
  font-weight: 600; font-size: 14px; white-space: nowrap; user-select: none;
  transition: background .15s, border-color .15s, transform .08s, box-shadow .15s, opacity .15s;
  box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand); border-color: transparent; color: var(--brand-ink); box-shadow: 0 6px 18px rgb(124 92 255 / .32); }
.btn-primary:hover { background: var(--brand-2); border-color: transparent; }
.btn-gradient { background: var(--gradient); border-color: transparent; color: #fff; box-shadow: 0 8px 22px rgb(124 92 255 / .35); }
.btn-gradient:hover { filter: brightness(1.06); border-color: transparent; }
.btn-danger { color: var(--danger-ink); background: var(--danger-soft); border-color: transparent; box-shadow: none; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--bg-hover); border-color: transparent; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: var(--radius-xs); }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-xs); }
.btn-block { width: 100%; }
.btn .spinner { width: 16px; height: 16px; }

.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; opacity: .8; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Forms ─────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12.5px; color: var(--text-3); }
.input, .select, .textarea {
  width: 100%; height: 42px; padding: 0 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--text);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.textarea { height: auto; min-height: 110px; padding: 10px 13px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.input:disabled { background: var(--bg-sunken); color: var(--text-3); }
.select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b8fa8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 44px; }
.input-wrap .eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.error-text { color: var(--danger-ink); font-size: 13px; }
.form-error { padding: 10px 13px; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger-ink); font-size: 13.5px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 42px; height: 24px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background .2s; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgb(0 0 0 / .3); }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(18px); }

/* ── Cards, badges ─────────────────────────────────────────────────────── */
.card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 15px; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-ok { background: var(--ok-soft); color: var(--ok-ink); }
.badge-warn { background: var(--warn-soft); color: var(--warn-ink); }
.badge-danger { background: var(--danger-soft); color: var(--danger-ink); }
.badge-info { background: var(--info-soft); color: var(--info-ink); }
.badge-neutral { background: var(--bg-sunken); color: var(--text-2); }
.badge-brand { background: var(--brand-soft); color: var(--brand-soft-ink); }
.pill-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; }

.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: #fff; background: var(--gradient); flex: none; letter-spacing: .02em; }
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-lg { width: 64px; height: 64px; font-size: 22px; }

/* ── Stat tiles ────────────────────────────────────────────────────────── */
.stat { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; }
.stat .label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.stat .value { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.stat .icon { position: absolute; right: 16px; top: 16px; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-soft-ink); }
.stat .icon svg { width: 20px; height: 20px; }
.stat .icon.ok { background: var(--ok-soft); color: var(--ok-ink); }
.stat .icon.warn { background: var(--warn-soft); color: var(--warn-ink); }
.stat .icon.info { background: var(--info-soft); color: var(--info-ink); }

/* ── Tables ────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--bg-hover); }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ── Layout: auth ──────────────────────────────────────────────────────── */
.auth { min-height: 100dvh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-brand {
  position: relative; overflow: hidden; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: var(--gradient); color: #fff;
}
.auth-brand::before, .auth-brand::after { content: ''; position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; pointer-events: none; }
.auth-brand::before { width: 420px; height: 420px; background: #fff; right: -120px; top: -140px; opacity: .22; }
.auth-brand::after { width: 360px; height: 360px; background: #4c1d95; left: -120px; bottom: -160px; opacity: .45; }
.auth-brand > * { position: relative; z-index: 1; }
.brand-logo { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand-logo .mark { width: 40px; height: 40px; border-radius: 12px; background: rgb(255 255 255 / .18); backdrop-filter: blur(6px); display: grid; place-items: center; border: 1px solid rgb(255 255 255 / .35); }
.brand-logo .mark svg { width: 22px; height: 22px; stroke: #fff; }
.auth-hero h1 { font-size: 40px; line-height: 1.12; font-weight: 800; letter-spacing: -.03em; max-width: 520px; }
.auth-hero p { margin-top: 16px; font-size: 16px; opacity: .92; max-width: 460px; line-height: 1.55; }
.auth-steps { display: flex; flex-direction: column; gap: 12px; margin-top: 34px; }
.auth-step { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: rgb(255 255 255 / .14); border: 1px solid rgb(255 255 255 / .22); backdrop-filter: blur(8px); font-weight: 500; max-width: 480px; }
.auth-step .n { width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #6b46ff; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.auth-foot { opacity: .8; font-size: 13px; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; position: relative; }
.auth-box { width: 100%; max-width: 420px; }
.auth-box h2 { font-size: 26px; letter-spacing: -.02em; }
.auth-box .sub { color: var(--text-2); margin-top: 6px; margin-bottom: 26px; }
.auth-tabs { display: inline-flex; padding: 4px; background: var(--bg-sunken); border-radius: 12px; margin-bottom: 26px; }
.auth-tabs a { padding: 8px 16px; border-radius: 9px; font-weight: 600; color: var(--text-2); font-size: 14px; }
.auth-tabs a:hover { text-decoration: none; color: var(--text); }
.auth-tabs a.active { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-sm); }
.auth-theme { position: absolute; top: 20px; right: 20px; }
.pending-icon { width: 76px; height: 76px; border-radius: 22px; background: var(--warn-soft); color: var(--warn-ink); display: grid; place-items: center; margin-bottom: 22px; }
.pending-icon svg { width: 36px; height: 36px; }

/* ── Layout: shell ─────────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg-elev); border-right: 1px solid var(--border); padding: 20px 14px;
}
.sidebar .brand-logo { padding: 4px 8px 18px; color: var(--text); }
.sidebar .brand-logo .mark { background: var(--gradient); border: none; box-shadow: 0 6px 16px rgb(124 92 255 / .35); }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-section { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 700; padding: 16px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px;
  color: var(--text-2); font-weight: 500; transition: background .12s, color .12s;
}
.nav a:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--brand-soft); color: var(--brand-soft-ink); font-weight: 600; }
.nav a .i { width: 19px; height: 19px; }
.nav a .pill-count { margin-left: auto; }
.nav a .soon { margin-left: auto; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); background: var(--bg-sunken); padding: 2px 7px; border-radius: 999px; }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.user-chip .name { font-weight: 600; font-size: 13.5px; }
.user-chip .role { font-size: 12px; color: var(--text-3); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 32px 0;
}
.topbar .burger { display: none; }
.page { padding: 20px 32px 48px; max-width: 1240px; width: 100%; animation: fade .25s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .sub { color: var(--text-2); margin-top: 4px; }

/* ── Shop card ─────────────────────────────────────────────────────────── */
.shop-card { display: flex; flex-direction: column; gap: 14px; padding: 20px; transition: box-shadow .18s, transform .18s, border-color .18s; }
.shop-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--border-strong); }
.shop-card .top { display: flex; align-items: flex-start; gap: 12px; }
.shop-logo { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 17px; flex: none; }
.shop-card .name { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.shop-card .meta { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-2); }
.shop-card .meta .kv { display: flex; justify-content: space-between; gap: 10px; }
.shop-card .meta .kv b { font-weight: 600; color: var(--text); }
.shop-card .foot { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.shop-card .foot .btn { flex: 1; }
.shop-card .err { font-size: 12.5px; color: var(--danger-ink); background: var(--danger-soft); padding: 8px 10px; border-radius: 8px; }

.empty { text-align: center; padding: 56px 24px; }
.empty .art { width: 88px; height: 88px; margin: 0 auto 18px; border-radius: 26px; background: var(--brand-soft); color: var(--brand-soft-ink); display: grid; place-items: center; }
.empty .art svg { width: 40px; height: 40px; }
.empty h3 { font-size: 18px; }
.empty p { color: var(--text-2); margin: 8px auto 20px; max-width: 420px; }

.add-card { border: 2px dashed var(--border-strong); background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 220px; color: var(--text-2); cursor: pointer; transition: border-color .15s, color .15s, background .15s; box-shadow: none; }
.add-card:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.add-card .plus { width: 48px; height: 48px; border-radius: 50%; border: 2px solid currentColor; display: grid; place-items: center; }

/* ── Modal ─────────────────────────────────────────────────────────────── */
.modal-back { position: fixed; inset: 0; background: rgb(10 11 20 / .5); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; animation: fade .18s; }
.modal { width: 100%; max-width: 560px; max-height: calc(100dvh - 40px); overflow: auto; background: var(--bg-elev); border-radius: 18px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); animation: pop .2s ease-out; }
.modal-lg { max-width: 680px; }
.modal-sm { max-width: 440px; }
@keyframes pop { from { transform: scale(.97) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 0; }
.modal-head h3 { font-size: 18px; }
.modal-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 24px 22px; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); font-weight: 700; padding-top: 6px; display: flex; align-items: center; gap: 8px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--info-soft); color: var(--info-ink); font-size: 13px; line-height: 1.5; }
.callout svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.callout.warn { background: var(--warn-soft); color: var(--warn-ink); }
.callout.brand { background: var(--brand-soft); color: var(--brand-soft-ink); }

/* ── Toasts ────────────────────────────────────────────────────────────── */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 100; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: var(--text); color: var(--bg-elev); box-shadow: var(--shadow-lg); font-weight: 500; font-size: 14px; max-width: 380px; animation: toast-in .25s ease-out; pointer-events: auto; }
.toast svg { width: 18px; height: 18px; flex: none; }
.toast.ok svg { color: var(--ok); }
.toast.err svg { color: var(--danger); }
.toast.leaving { animation: toast-out .25s forwards; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(12px); opacity: 0; } }

/* ── Skeleton ──────────────────────────────────────────────────────────── */
.skel { border-radius: 8px; background: linear-gradient(90deg, var(--bg-sunken) 25%, var(--bg-hover) 50%, var(--bg-sunken) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── Segmented filter ──────────────────────────────────────────────────── */
.seg { display: inline-flex; padding: 3px; background: var(--bg-sunken); border-radius: 10px; gap: 2px; }
.seg button { border: none; background: transparent; padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--text-2); display: inline-flex; gap: 6px; align-items: center; }
.seg button.active { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-sm); }
.seg button .n { font-size: 11px; background: var(--border); padding: 1px 6px; border-radius: 999px; color: var(--text-2); }
.seg button.active .n { background: var(--brand-soft); color: var(--brand-soft-ink); }

/* ── Review cards ──────────────────────────────────────────────────────── */
.starrow { display: inline-flex; gap: 2px; }
.starrow .st { color: #d7d9e6; line-height: 0; }
.starrow .st svg { width: var(--sz, 15px); height: var(--sz, 15px); fill: currentColor; stroke: none; }
.starrow .st.on { color: #ffb020; }
.badge svg.i { width: 13px; height: 13px; }
.review-card { padding: 16px 18px; border-left: 3px solid transparent; }
.review-card.positive { border-left-color: var(--ok); }
.review-card.negative { border-left-color: var(--danger); }
.review-card .rc-head { display: flex; align-items: flex-start; gap: 12px; }
.review-card .rc-text { margin-top: 12px; padding-left: 40px; color: var(--text); line-height: 1.55; white-space: pre-wrap; word-break: break-word; }

/* ── Viber message preview ─────────────────────────────────────────────── */
.viber-preview { max-width: 320px; border-radius: 16px; overflow: hidden; background: var(--bg-sunken); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.viber-preview .vp-img { display: block; width: 100%; max-height: 240px; object-fit: cover; background: var(--bg-hover); }
.viber-preview .vp-text { padding: 12px 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.viber-preview .vp-btn { margin: 0 12px 12px; padding: 10px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 600; font-size: 14px; text-align: center; display: flex; align-items: center; justify-content: center; gap: 7px; }
.viber-preview .vp-btn svg { width: 16px; height: 16px; fill: #fff; stroke: none; }

/* ── Analytics: gauge + chart ──────────────────────────────────────────── */
.gauge-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 210px; }
.gauge { width: 100%; max-width: 260px; height: auto; }
.gauge-legend { display: flex; gap: 18px; font-size: 13px; color: var(--text-2); }
.gauge-legend .dot, .chart-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.gauge-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 30px 0; }
.gauge-empty svg { width: 34px; height: 34px; fill: var(--star, #d7d9e6); stroke: none; opacity: .5; }
.chart-legend { display: flex; gap: 18px; font-size: 13px; color: var(--text-2); margin-bottom: 8px; flex-wrap: wrap; }
.linechart { width: 100%; min-width: 420px; height: auto; display: block; }

/* ── Drawer / mobile ───────────────────────────────────────────────────── */
.drawer-back { display: none; }
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; width: min(300px, 86vw); transform: translateX(-105%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .drawer-back { display: block; position: fixed; inset: 0; background: rgb(10 11 20 / .45); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .drawer-back.open { opacity: 1; pointer-events: auto; }
  .topbar { padding: 14px 18px 0; }
  .topbar .burger { display: inline-flex; }
  .page { padding: 16px 18px 40px; }
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-panel { align-items: flex-start; padding-top: 72px; }
}
@media (max-width: 560px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .page-head .btn { width: 100%; }
  .modal-foot { flex-direction: column-reverse; }
  .modal-foot .btn { width: 100%; }
  .toasts { left: 14px; right: 14px; bottom: 14px; }
  .toast { max-width: none; }
}
