/* ============================================================
   Spotitap App — Design System
   Themes: light | dim | dark
   Brand:  #0B7E8A (teal)
   ============================================================ */

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body { min-height: 100vh; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
input, button, select, textarea { font: inherit; }
a { text-decoration: none; }
.is-hidden { display: none !important; }

/* ── Typography ────────────────────────────────────────────── */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  font-size: 0.9375rem;
}

/* ── Brand tokens ──────────────────────────────────────────── */
:root {
  --accent:        #0B7E8A;
  --accent-hover:  #096873;
  --accent-dim:    rgba(11, 126, 138, 0.12);
  --accent-text:   #0B7E8A;

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.07);
  --shadow-md: 0 4px 16px rgba(0,0,0,.12);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.18);

  --sidebar-w: 240px;
  --topbar-h:  60px;

  --transition: .18s ease;
}

/* ── Light theme ───────────────────────────────────────────── */
[data-theme="light"] {
  --bg:            #eef1f5;
  --bg-secondary:  #e2e6ec;
  --surface:       #ffffff;
  --surface-2:     #f4f6f9;
  --surface-hover: #edf0f4;
  --border:        #d4d9e2;
  --border-strong: #b8bfcc;
  --card-bg:       #f0f3f8;

  --text:          #0f172a;
  --text-sub:      #4b5563;
  --text-muted:    #6b7280;
  --text-inverse:  #ffffff;

  --sidebar-bg:    #f7f9fc;
  --sidebar-nav:   #374151;
  --sidebar-nav-active-bg: rgba(11, 126, 138, 0.12);
  --sidebar-nav-active:    #0B7E8A;

  --input-bg:      #f8fafc;
  --input-border:  #b8bfcc;
  --input-focus:   var(--accent);

  --badge-done-bg:     #dcfce7;
  --badge-done-text:   #16a34a;
  --badge-warn-bg:     #fef9c3;
  --badge-warn-text:   #a16207;
  --badge-info-bg:     #dbeafe;
  --badge-info-text:   #1d4ed8;
  --badge-muted-bg:    #f3f4f6;
  --badge-muted-text:  #6b7280;

  color-scheme: light;
}

/* ── Light theme refinements ───────────────────────────────── */
[data-theme="light"] .sidebar {
  border-right-color: #c8cdd8;   /* stronger sidebar/content separator */
}

[data-theme="light"] .topbar {
  border-bottom-color: #c8cdd8;
  background: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .field__input,
[data-theme="light"] .topbar__search input,
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="password"],
[data-theme="light"] input[type="search"],
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: #f8fafc;
  border-color: #b8bfcc;
}

[data-theme="light"] .field__input:focus,
[data-theme="light"] input:focus {
  background: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 126, 138, 0.15);
}

[data-theme="light"] .card,
[data-theme="light"] .product-card,
[data-theme="light"] .next-action-card,
[data-theme="light"] .activation-checklist,
[data-theme="light"] .auth-card {
  border-color: #d0d5df;
}

[data-theme="light"] .nav-section {
  border-top-color: #d0d5df;
}

[data-theme="light"] .sidebar__footer {
  border-top-color: #d0d5df;
}

[data-theme="light"] .sidebar__logo {
  border-bottom-color: #d0d5df;
}

/* ── Dim theme ─────────────────────────────────────────────── */
[data-theme="dim"] {
  --bg:            #0d1117;
  --bg-secondary:  #090d12;
  --surface:       #161b22;
  --surface-2:     #1c2128;
  --surface-hover: #21282f;
  --border:        #30363d;
  --border-strong: #3d444d;

  --text:          #c9d1d9;
  --text-sub:      #8b949e;
  --text-muted:    #6e7681;
  --text-inverse:  #0d1117;

  --sidebar-bg:    #161b22;
  --sidebar-nav:   #8b949e;
  --sidebar-nav-active-bg: rgba(11, 126, 138, 0.15);
  --sidebar-nav-active:    #3dcfdb;

  --input-bg:      #0d1117;
  --input-border:  #30363d;
  --input-focus:   #3dcfdb;

  --badge-done-bg:     rgba(22, 163, 74, 0.15);
  --badge-done-text:   #4ade80;
  --badge-warn-bg:     rgba(234, 179, 8, 0.15);
  --badge-warn-text:   #facc15;
  --badge-info-bg:     rgba(59, 130, 246, 0.15);
  --badge-info-text:   #60a5fa;
  --badge-muted-bg:    rgba(255,255,255,.06);
  --badge-muted-text:  #8b949e;

  color-scheme: dark;
}

/* ── Dark theme ────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:            #000000;
  --bg-secondary:  #050505;
  --surface:       #111111;
  --surface-2:     #1a1a1a;
  --surface-hover: #1f1f1f;
  --border:        #1f1f1f;
  --border-strong: #2a2a2a;

  --text:          #f5f5f5;
  --text-sub:      #a0a0a0;
  --text-muted:    #555555;
  --text-inverse:  #000000;

  --sidebar-bg:    #0a0a0a;
  --sidebar-nav:   #888888;
  --sidebar-nav-active-bg: rgba(11, 126, 138, 0.18);
  --sidebar-nav-active:    #3dcfdb;

  --input-bg:      #111111;
  --input-border:  #2a2a2a;
  --input-focus:   #3dcfdb;

  --badge-done-bg:     rgba(74, 222, 128, 0.1);
  --badge-done-text:   #4ade80;
  --badge-warn-bg:     rgba(250, 204, 21, 0.1);
  --badge-warn-text:   #facc15;
  --badge-info-bg:     rgba(96, 165, 250, 0.1);
  --badge-info-text:   #60a5fa;
  --badge-muted-bg:    rgba(255,255,255,.05);
  --badge-muted-text:  #666666;

  color-scheme: dark;
}

/* ── Base ──────────────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--text);
  transition: background var(--transition), color var(--transition);
}

/* ── Auth layout ───────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}
.auth-logo__mark {
  width: 36px; height: 36px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  flex-shrink: 0;
  letter-spacing: -1px;
}
.auth-logo__name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-2);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 28px;
}
.auth-tab {
  flex: 1;
  padding: 8px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  transition: all var(--transition);
}
.auth-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.field__input {
  width: 100%;
  padding: 10px 14px;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 0.9375rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.field__input:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.field__input::placeholder { color: var(--text-muted); }

.auth-error {
  display: none;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #ef4444;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.875rem;
  line-height: 1.5;
}
.auth-error.visible { display: block; }
@keyframes sp-shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}
.auth-error--shake { animation: sp-shake 0.4s ease; }

.auth-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}
.auth-footer__link {
  font-size: 0.8rem;
  color: var(--accent-text);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.auth-footer__link:hover { text-decoration: underline; }

.auth-success {
  display: none;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #059669;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.875rem;
  line-height: 1.5;
}
.auth-success.visible { display: block; }
[data-theme="dim"] .auth-success,
[data-theme="dark"] .auth-success { color: #34d399; }

.auth-first-time {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.auth-first-time__toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0;
  width: 100%;
}
.auth-first-time__toggle:hover { color: var(--text-sub); }
.auth-first-time__toggle svg { transition: transform var(--transition); margin-left: auto; }
.auth-first-time__body {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-first-time__hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ── App layout ────────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--transition), background var(--transition);
}

.sidebar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 60px 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar__logo-img {
  height: 28px;
  width: auto;
  display: block;
}
[data-theme="dim"] .sidebar__logo-img,
[data-theme="dark"] .sidebar__logo-img {
  filter: brightness(0) invert(1);
}

.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.nav-section:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.nav-section__label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding: 0 10px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-md);
  color: var(--sidebar-nav);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}
.nav-item:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.nav-item.active {
  background: var(--sidebar-nav-active-bg);
  color: var(--sidebar-nav-active);
  font-weight: 600;
}
.nav-item__icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.8;
}
.nav-item.active .nav-item__icon { opacity: 1; }
.nav-item__badge {
  margin-left: auto;
  background: var(--accent-dim);
  color: var(--accent-text);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
}

.sidebar__footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}
.sidebar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
}
.sidebar__user:hover { background: var(--surface-hover); }
.sidebar__avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent-dim);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-text);
  overflow: hidden;
}
.sidebar__avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar__user-info { flex: 1; min-width: 0; }
.sidebar__user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar__user-plan {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: capitalize;
}

/* ── Main content ──────────────────────────────────────────── */
.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

/* ── Topbar ────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar__left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.topbar__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.topbar__logo {
  height: 22px;
  width: auto;
  display: block;
}
[data-theme="dim"] .topbar__logo,
[data-theme="dark"] .topbar__logo {
  filter: brightness(0) invert(1);
}
.topbar__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}
.topbar__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}
.topbar__btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-sub);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 15px;
  flex-shrink: 0;
}
.topbar__btn:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--border-strong);
}

.theme-picker-row {
  display: inline-grid;
  grid-template-columns: repeat(3, 32px);
  gap: 3px;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--surface-2) 88%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px;
  height: 38px;
  flex-shrink: 0;
}

.theme-picker-row .theme-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 30px;
  padding: 0;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.theme-picker-row .theme-pill span:not(.theme-pill__icon) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.theme-picker-row .theme-pill svg,
.theme-picker-row .theme-pill .sp-icon {
  width: 15px !important;
  height: 15px !important;
}
.theme-picker-row .theme-pill:hover {
  color: var(--text);
  transform: none;
}
.theme-picker-row .theme-pill.active {
  background: var(--surface);
  color: var(--accent-text);
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}

/* ── Page content ──────────────────────────────────────────── */
.page-content {
  flex: 1;
  padding: 28px;
  max-width: 1280px;
  width: 100%;
}

.page-header { margin-bottom: 24px; }
.page-header__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.4px;
  margin-bottom: 4px;
}
.page-header__sub { font-size: 0.9rem; color: var(--text-sub); }

.dashboard-mobile-search {
  display: none;
  position: relative;
  margin: 16px 0 22px;
}

/* ── Next actions ──────────────────────────────────────────── */
.next-actions {
  display: none;
  margin-bottom: 24px;
}
.next-actions.is-visible { display: block; }
.next-actions__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.next-actions__title {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
}
.next-actions__sub {
  margin: 4px 0 0;
  color: var(--text-sub);
  font-size: .86rem;
  line-height: 1.45;
}
.next-actions__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.next-action-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.next-action-card__icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--accent-dim);
  color: var(--accent-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
}
.next-action-card--warn .next-action-card__icon {
  background: var(--badge-warn-bg);
  color: var(--badge-warn-text);
}
.next-action-card--done .next-action-card__icon {
  background: var(--badge-done-bg);
  color: var(--badge-done-text);
}
.next-action-card__label {
  color: var(--text-muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.next-action-card__title {
  margin: 0;
  color: var(--text);
  font-size: .95rem;
  font-weight: 800;
  line-height: 1.3;
}
.next-action-card__copy {
  margin: 5px 0 12px;
  color: var(--text-sub);
  font-size: .8rem;
  line-height: 1.45;
}
.next-action-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Activation checklist ──────────────────────────────────── */
.activation-checklist {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--badge-warn-text) 30%, var(--border));
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.activation-checklist--complete {
  border-color: color-mix(in srgb, var(--badge-done-text) 28%, var(--border));
}
.activation-checklist__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
}
.activation-checklist__sub {
  margin: 3px 0 0;
  color: var(--text-sub);
  font-size: .84rem;
  line-height: 1.4;
}
.activation-checklist__progress {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-sub);
  font-size: .8rem;
  font-weight: 800;
  flex-shrink: 0;
}
.activation-checklist__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}
.activation-checklist__toggle:hover { background: var(--surface-2); }
.activation-checklist__toggle-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.activation-checklist__toggle-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--badge-warn-bg);
  color: var(--badge-warn-text);
  font-size: .78rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.activation-checklist__title {
  font-size: .92rem;
  font-weight: 800;
  color: var(--text);
  display: block;
}
.activation-checklist__toggle-meta {
  font-size: .75rem;
  color: var(--text-muted);
  display: block;
  margin-top: 1px;
}
.activation-checklist__toggle-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.activation-checklist__bar-mini {
  width: 80px;
  height: 5px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.activation-checklist__bar-mini-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width .4s ease;
}
.activation-checklist__chevron {
  color: var(--text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}
.activation-checklist--collapsed .activation-checklist__chevron {
  transform: rotate(-90deg);
}
.activation-checklist__body {
  padding: 0 18px 16px;
  border-top: 1px solid var(--border);
}
.activation-checklist--collapsed .activation-checklist__body {
  display: none;
}
.activation-checklist__bar {
  width: 120px;
  height: 6px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.activation-checklist__bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width .4s ease;
}
.activation-checklist__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.activation-checklist__summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: .8rem;
  color: var(--text-sub);
}
.activation-checklist__summary-main {
  color: var(--text);
  font-weight: 800;
}
.activation-tasks {
  display: grid;
  gap: 10px;
}
.activation-task {
  display: grid;
  grid-template-columns: 30px 38px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.activation-task__step {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--badge-warn-bg);
  color: var(--badge-warn-text);
  font-size: .78rem;
  font-weight: 900;
}
.activation-task__icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-text);
  background: var(--accent-dim);
}
.activation-task__body {
  min-width: 0;
}
.activation-task__title {
  color: var(--text);
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activation-task__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 3px;
  color: var(--text-sub);
  font-size: .75rem;
}
.activation-task__meta span {
  min-width: 0;
}
.activation-task__meta span:not(:last-child)::after {
  content: '·';
  margin-left: 6px;
  color: var(--text-muted);
}
.activation-task__status {
  white-space: nowrap;
}
.activation-task__action {
  display: flex;
  justify-content: flex-end;
}
.activation-checklist__more {
  display: flex;
  justify-content: flex-end;
}
@media (max-width: 820px) {
  .activation-task {
    grid-template-columns: 28px 36px minmax(0, 1fr);
  }
  .activation-task__status,
  .activation-task__action {
    grid-column: 3 / -1;
    justify-content: flex-start;
  }
}
@media (max-width: 520px) {
  .activation-checklist {
    padding: 14px;
  }
  .activation-checklist__progress {
    width: 100%;
    justify-content: space-between;
  }
  .activation-checklist__bar {
    flex: 1;
    width: auto;
  }
  .activation-task {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
  }
  .activation-task__step {
    grid-row: span 2;
  }
  .activation-task__icon {
    display: none;
  }
  .activation-task__body,
  .activation-task__status,
  .activation-task__action {
    grid-column: 2 / -1;
  }
  .activation-task__action .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── Onboarding modal ──────────────────────────────────────── */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.onboarding-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.onboarding-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: translateY(12px);
  transition: transform .3s ease;
}
.onboarding-overlay.open .onboarding-modal {
  transform: translateY(0);
}
.onboarding-modal__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.onboarding-modal__title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
}
.onboarding-modal__body {
  font-size: .9rem;
  color: var(--text-sub);
  margin: 0 0 24px;
  line-height: 1.5;
}
.onboarding-modal__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Stats row ─────────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.stat-card__icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  background: var(--accent-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  margin-bottom: 12px;
}
.stat-card__value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-card__label { font-size: 0.8rem; color: var(--text-sub); font-weight: 500; }

/* ── Section header ────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.section-header__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.section-header__count {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}
.status-filter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}
.status-filter__btn {
  min-height: 28px;
  padding: 4px 10px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-sub);
  cursor: pointer;
  font-size: .78rem;
  font-weight: 700;
  transition: background var(--transition), color var(--transition);
}
.status-filter__btn:hover {
  color: var(--text);
  background: var(--surface-2);
}
.status-filter__btn.active {
  background: var(--accent-dim);
  color: var(--accent-text);
}

/* ── Products toolbar ──────────────────────────────────────── */
.products-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.products-toolbar__search {
  position: relative;
  flex: 1 1 200px;
  min-width: 0;
}
.products-toolbar__search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.products-toolbar__search-input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: .85rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.products-toolbar__search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}
.products-toolbar__search-input::placeholder { color: var(--text-muted); }
.products-toolbar__filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.toolbar-select {
  height: 36px;
  padding: 0 28px 0 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color var(--transition);
}
.toolbar-select:hover { border-color: var(--border-strong); }
.toolbar-select:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-dim); }
.products-toolbar__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  margin-left: auto;
}
@media (max-width: 700px) {
  .products-toolbar { gap: 8px; }
  .products-toolbar__search { flex: 1 1 100%; }
  .products-toolbar__filters { width: 100%; }
  .products-toolbar__filters .toolbar-select { flex: 1 1 0; }
  .products-toolbar__meta { margin-left: 0; }
}

/* ── Product cards grid ────────────────────────────────────── */
.cards-grid {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.product-group {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.product-group.collapsed > :not(.product-group__header) {
  display: none;
}
.product-group__header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 12px;
  padding: 2px 0 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  transition: border-color var(--transition);
}
.product-group__header:hover {
  border-color: var(--border-strong);
}
.product-group__chevron {
  color: var(--text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}
.product-group.collapsed .product-group__chevron {
  transform: rotate(-90deg);
}
.product-group.collapsed .product-group__header {
  padding-bottom: 2px;
  border-bottom-color: transparent;
}
.product-group__icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-dim);
  font-size: 20px;
}
.product-group__title { min-width: 0; }
.product-group__title h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-text);
  line-height: 1.25;
}
.product-group__title p {
  font-size: 0.8rem;
  color: var(--text-sub);
  margin-top: 2px;
}
.product-group__summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.product-group__summary span,
.product-group__summary button {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-sub);
  font-size: 0.72rem;
  font-weight: 650;
  font-family: inherit;
}
.product-group__summary button {
  cursor: pointer;
}
.product-group__summary button:hover,
.product-group__summary button:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  color: var(--accent-text);
}
.product-group__summary .product-group__summary-warn {
  background: var(--badge-warn-bg);
  border-color: color-mix(in srgb, var(--badge-warn-text) 28%, var(--border));
  color: var(--badge-warn-text);
}
.product-group__summary .product-group__summary-done {
  background: var(--badge-done-bg);
  border-color: color-mix(in srgb, var(--badge-done-text) 28%, var(--border));
  color: var(--badge-done-text);
}
.product-group__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}
@media (min-width: 1180px) {
  .product-group__grid:not(.product-group__grid--profiles) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.product-group__grid--profiles {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.product-group__overflow {
  display: contents;
}
.product-group__overflow > * {
  display: none !important;
}
.product-group__overflow.open > * {
  display: flex !important;
}
.product-group__show-more {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding-top: 2px;
}
.product-group__show-more .btn {
  gap: 6px;
  color: var(--text-sub);
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.product-group__show-more .btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* ── Profile preview card ───────────────────────────────────────────────────── */

.profile-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}
.profile-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.profile-card--empty {
  opacity: 1;
  background: color-mix(in srgb, var(--surface) 82%, var(--surface-2));
  border-style: dashed;
}
.profile-card--empty .profile-card__cover {
  background: linear-gradient(135deg, var(--surface-2), var(--accent-dim)) !important;
}
.profile-card--empty .profile-card__avatar {
  background: var(--accent-dim);
  color: var(--accent-text);
}
.profile-card--empty .profile-card__pname {
  color: var(--text);
  font-style: normal;
  font-weight: 700;
}
.profile-card--empty .profile-card__ptitle {
  color: var(--text-sub);
}

.profile-card__preview {
  position: relative;
  padding: 0 0 16px;
}
.profile-card__completion {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 42px;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.88);
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15,23,42,.12);
  backdrop-filter: blur(10px);
}
.profile-card__completion--done {
  background: var(--badge-done-bg);
  color: var(--badge-done-text);
}
.profile-card__cover {
  height: 64px;
  background: linear-gradient(135deg, var(--accent-dim), var(--accent-dim));
  background-size: cover;
  background-position: center;
}
.profile-card__avatar-wrap {
  position: absolute;
  top: 28px;
  left: 16px;
}
.profile-card__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
}
.profile-card__identity {
  margin-top: 44px;
  padding: 0 16px;
}
.profile-card__pname {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  min-height: 18px;
  min-width: 80px;
  border-radius: 4px;
}
.profile-card__ptitle {
  font-size: 0.75rem;
  color: var(--text-sub);
  margin-top: 2px;
  min-height: 14px;
  min-width: 60px;
  border-radius: 4px;
}
.profile-card__links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.profile-card__link-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.profile-card__link-icon svg {
  width: 14px;
  height: 14px;
}
.profile-card__link-more {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-sub);
  padding: 0 6px;
}
.profile-card__body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px 0;
  border-top: 1px solid var(--border);
  margin: 0 0 0;
}
.profile-card__meta {
  min-width: 0;
}
.profile-card__name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-card__type {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.profile-card__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.profile-card__scans {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.profile-card__actions {
  padding: 12px 16px 16px;
}

.skeleton-pulse {
  background: var(--surface-2);
  animation: skeleton-pulse 1.4s ease-in-out infinite;
  border-radius: 4px;
}
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.product-card {
  background: var(--card-bg, var(--surface));
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
  cursor: default;
}
.product-card--social {
  padding: 18px;
}
.product-card:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 24px rgba(11,126,138,.12);
  transform: translateY(-1px);
}

.product-card__top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.product-card__icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  background: var(--accent-dim);
}
.product-card__icon--brand {
  background: color-mix(in srgb, var(--platform-color) 14%, var(--surface));
  color: var(--platform-color);
}
.product-card__icon svg {
  width: 22px;
  height: 22px;
}
.product-card__meta { flex: 1; min-width: 0; }
.product-card__name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.product-card__type {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: capitalize;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.product-card__type .tag-badge {
  font-size: 0.65rem;
  padding: 1px 6px;
}
.product-card__badge { flex-shrink: 0; }

.qty-badge {
  display: inline-flex;
  align-items: center;
  background: var(--accent-dim);
  color: var(--accent-text);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.02em;
}

.product-card__stats {
  display: flex;
  gap: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}
.stat-pill { flex: 1; }
.stat-pill__val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.stat-pill__label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.product-card__details {
  display: grid;
  gap: 8px;
  padding: 11px 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.detail-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  font-size: 0.78rem;
}
.detail-line span {
  color: var(--text-muted);
  white-space: nowrap;
}
.detail-line strong {
  color: var(--text);
  font-weight: 650;
  text-align: right;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: capitalize;
}
.detail-line--stacked {
  display: grid;
  align-items: start;
  gap: 2px;
}
.detail-line--stacked strong {
  text-align: left;
  text-transform: none;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.74rem;
  color: var(--text-sub);
}
.product-card[data-type="google-review"] .detail-line--stacked strong {
  font-family: inherit;
  font-size: 0.78rem;
  color: var(--text);
}

.product-card__url {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  word-break: break-all;
  cursor: pointer;
  transition: background var(--transition);
}
.product-card__url span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-card__url:hover { background: var(--surface-hover); }
.product-card__url svg { flex-shrink: 0; color: var(--text-muted); }

.product-card__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}
.product-card__actions .btn:not(.btn--icon) {
  flex: 1 1 112px;
  min-width: 0;
}
.product-card__actions .btn--icon {
  flex: 0 0 34px;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none !important;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(11,126,138,.3);
}

.btn--secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn--secondary:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.btn--ghost {
  background: transparent;
  color: var(--text-sub);
  border: 1.5px solid var(--border);
}
.btn--ghost:hover:not(:disabled) {
  background: var(--surface-hover);
  color: var(--text);
}

.btn--sm { padding: 6px 12px; font-size: 0.8125rem; }
.btn--full { width: 100%; }
.btn--icon {
  width: 34px;
  min-width: 34px;
  padding-left: 0;
  padding-right: 0;
}

.btn--loading .btn-text { opacity: 0; }
.btn--loading::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn { position: relative; }
.btn--success {
  background: #16a34a !important;
  border-color: #16a34a !important;
}
.btn--error {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
}

/* ── Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge--done    { background: var(--badge-done-bg);  color: var(--badge-done-text);  }
.badge--warn    { background: var(--badge-warn-bg);  color: var(--badge-warn-text);  }
.badge--info    { background: var(--badge-info-bg);  color: var(--badge-info-text);  }
.badge--muted   { background: var(--badge-muted-bg); color: var(--badge-muted-text); }
.badge--premium {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
}

/* ── Empty state ───────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 64px 24px;
  gap: 12px;
  background: var(--surface);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-xl);
}
.empty-state__icon { font-size: 48px; }
.empty-state__title { font-size: 1rem; font-weight: 700; color: var(--text); }
.empty-state__sub { font-size: 0.875rem; color: var(--text-sub); max-width: 340px; line-height: 1.6; }
.empty-state__actions {
  margin-top: 4px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Skeleton loader ───────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-hover) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-md);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes spin    { to { transform: rotate(360deg); } }

.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Dropdown ──────────────────────────────────────────────── */
.dropdown { position: relative; }
.dropdown__menu {
  position: absolute;
  left: 0; right: 0; bottom: calc(100% + 6px);
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  overflow: hidden;
  display: none;
}
.dropdown__menu.open { display: block; }
.dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 0.875rem;
  color: var(--text);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: background var(--transition);
}
.dropdown__item:hover { background: var(--surface-hover); }
.dropdown__item--danger { color: #ef4444; }
.dropdown__divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ── Toast ─────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  color: var(--text);
  max-width: 320px;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toast-in .25s ease;
}
.toast--success { border-left: 3px solid #22c55e; }
.toast--error   { border-left: 3px solid #ef4444; }
.toast--info    { border-left: 3px solid var(--accent); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Theme/Lang picker ─────────────────────────────────────── */
.theme-picker {
  display: flex;
  gap: 6px;
}
.theme-btn {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.theme-btn:hover { transform: none; }
.theme-btn.active { border-color: var(--accent); }

.lang-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 750;
  padding: 0 26px 0 11px;
  height: 38px;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

/* ── Top controls (auth page) ──────────────────────────────── */
.top-controls {
  position: fixed;
  top: 16px; right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 50;
}

/* ── Sidebar mobile toggle ─────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 90;
  backdrop-filter: blur(2px);
}
.menu-btn {
  display: none;
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-md);
  align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-sub);
}

/* ── Filter bar ────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-btn {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-sub);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover { border-color: var(--border-strong); color: var(--text); }
.filter-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent-text);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  .sidebar {
    transform: translateX(-240px);
    width: 240px;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .menu-btn { display: flex; }
  .main { margin-left: 0; overflow-x: hidden; }
  .page-content { padding: 20px 16px; }
  .topbar { padding: 0 16px; gap: 10px; }

  .auth-card { padding: 28px 20px; }
  .auth-form__row { grid-template-columns: 1fr; }

  .product-group__header {
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: start;
  }
  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .status-filter {
    width: 100%;
    overflow-x: auto;
  }
  .status-filter__btn {
    flex: 1 0 auto;
    white-space: nowrap;
  }
  .product-group__icon { width: 36px; height: 36px; font-size: 18px; }
  .product-group__summary {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .product-group__grid { grid-template-columns: 1fr; }
  .next-actions__grid { grid-template-columns: 1fr; }
  .next-actions__head { align-items: flex-start; flex-direction: column; }
  .stats-row  { grid-template-columns: repeat(2, 1fr); }
  .product-card { padding: 16px; }
  .product-card__top { gap: 12px; }
  .product-card__stats { gap: 10px; padding: 10px 12px; }

  /* Product card actions — wrap on small screens */
  .product-card__actions {
    flex-wrap: wrap;
  }

  /* Group editor modal — full screen on mobile */
  .ge-overlay { padding: 0; align-items: flex-end; }
  .ge-modal { max-height: 92vh; border-radius: 14px 14px 0 0; }
  .ge-batch { flex-wrap: wrap; }
  .ge-batch__input { min-width: 0; }
  .ge-unit-row__inputs { flex-wrap: wrap; }
  .ge-unit-row__inputs .ge-modal__input { min-width: 0; }

  .toast-container { bottom: 16px; right: 16px; left: 16px; }
  .toast { max-width: 100%; }
}

@media (max-width: 600px) {
  .dashboard-mobile-search { display: block; }

  /* Product card actions — row layout, Edit+Test grow equally, icons stay compact */
  .product-card__actions {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
  }
  .product-card__actions .btn:not(.btn--icon) {
    flex: 1 1 0;
    min-width: 0;
    height: 40px;
    min-height: 40px;
    padding: 0 10px;
    justify-content: center;
  }
  .product-card__actions .btn--icon {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    padding: 0;
  }

  /* Topbar: hide non-essential items on small phones */
  .topbar .theme-picker-row { display: none; }

  /* Page content tighter on small phones */
  .page-content { padding: 16px 12px; }
}

/* ── Editor Drawer ─────────────────────────────────────────── */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
  backdrop-filter: blur(3px);
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; right: 0;
  width: 480px;
  max-width: 100vw;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 301;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -16px 0 48px rgba(0,0,0,.18);
}
.drawer.open { transform: translateX(0); }

.drawer__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.drawer__icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--accent-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.drawer__icon svg {
  width: 20px;
  height: 20px;
}
.drawer__icon--brand {
  color: var(--accent-text);
}
.drawer__title {
  flex: 1;
  min-width: 0;
}
.drawer__title-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drawer__title-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
  font-family: inherit;
}
.drawer__close {
  width: 34px; height: 34px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-sub);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 18px;
  flex-shrink: 0;
  transition: all var(--transition);
  line-height: 1;
}
.drawer__close:hover { background: var(--surface-hover); color: var(--text); }

.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.drawer__footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  background: var(--surface);
}

/* Editor sections */
.editor-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.editor-section__title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.editor-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.editor-row--full { grid-template-columns: 1fr; }

/* Social link row */
.social-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition);
}
.social-row:focus-within { border-color: var(--accent); }
.social-row__icon {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
}
.social-row__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-sub);
  width: 72px;
  flex-shrink: 0;
}
.social-row__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.875rem;
}
.social-row__input::placeholder { color: var(--text-muted); }

/* Accent color picker */
.accent-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.accent-swatch {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform .15s, border-color .15s;
  outline: none;
}
.accent-swatch:hover { transform: scale(1.15); }
.accent-swatch.active { border-color: var(--text); }

/* Theme mode picker */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.mode-btn {
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition);
}
.mode-btn:hover { border-color: var(--border-strong); }
.mode-btn.active {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.mode-btn__icon { font-size: 20px; margin-bottom: 4px; }
.mode-btn__label { font-size: 0.72rem; font-weight: 600; color: var(--text-sub); }
.mode-btn.active .mode-btn__label { color: var(--accent-text); }

/* Info row (read-only display) */
.info-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.info-row__label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  width: 80px;
  flex-shrink: 0;
  padding-top: 2px;
}
.info-row__value {
  flex: 1;
  font-size: 0.875rem;
  color: var(--text);
  word-break: break-all;
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.info-row__copy {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: color var(--transition);
}
.info-row__copy:hover { color: var(--accent-text); }

/* QR preview */
.qr-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.qr-preview img {
  width: 140px; height: 140px;
  border-radius: var(--radius-md);
  background: #fff;
  padding: 8px;
}
.qr-preview__label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* Editor loading */
.drawer-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 1;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@media (max-width: 600px) {
  .drawer { width: 100vw; border-left: none; border-top: 1px solid var(--border); }
  .editor-row { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .product-card__stats { flex-direction: row; }
}

/* ── Grouped unit card ──────────────────────────────────────── */
/* Progress bar */
.gu-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 10px;
}
.gu-progress__bar {
  flex: 1;
  height: 5px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.gu-progress__fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width .4s ease;
}
.gu-progress__label {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Unit list */
.gu-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.gu-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  transition: border-color .15s;
}
.gu-row:hover { border-color: var(--accent); }
.gu-row--done { opacity: .7; }

/* Status dot */
.gu-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.gu-dot--done { background: var(--badge-done-text, #0f5132); }
.gu-dot--todo { background: var(--badge-warn-text, #664d03); }

/* Label */
.gu-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

/* Action button in each row */
.gu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
  transition: opacity .15s;
}
.gu-btn:hover { opacity: .85; }
.gu-btn--go   { background: var(--accent); color: #fff; }
.gu-btn--edit { background: var(--surface); border: 1px solid var(--border); color: var(--text); }

/* Overflow link — never show a wall of 100 rows, send to orders page */
.gu-overflow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s, color .15s;
}
.gu-overflow:hover { border-color: var(--accent); color: var(--accent-text); }
.grouped-unit-row__btn {
  padding: 4px 10px;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* ── Icon system ───────────────────────────────────────────── */
.sp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}
.nav-item__icon .sp-icon {
  opacity: 0.85;
}
.nav-item.active .nav-item__icon .sp-icon {
  opacity: 1;
  color: var(--accent);
}
.theme-pill__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0;
}
.dropdown__icon {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  opacity: 0.7;
}
.stat-card__icon .sp-icon {
  color: var(--accent);
  opacity: 0.9;
}
.empty-state__icon .sp-icon {
  color: var(--text-muted);
  opacity: 0.5;
}

/* ── Form validation ───────────────────────────────────────── */
.field--error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}
.field-error-msg {
  display: block;
  color: #ef4444;
  font-size: 0.78rem;
  margin-top: 6px;
  font-weight: 600;
}
.url-hint {
  display: block;
  font-size: 0.78rem;
  margin-top: 6px;
  font-weight: 500;
  min-height: 1.2em;
  transition: color .2s;
}
.url-hint--warn {
  color: #d97706;
}
.url-hint--error {
  color: #ef4444;
}
.url-hint--ok {
  color: #16a34a;
}
.phone-hint {
  display: block;
  font-size: 0.78rem;
  margin-top: 6px;
  font-weight: 500;
  min-height: 1.2em;
  transition: color .2s;
}
.phone-hint--warn {
  color: #d97706;
}
.phone-hint--error {
  color: #ef4444;
}
.phone-hint--ok {
  color: #16a34a;
}
.username-hint {
  display: block;
  font-size: 0.78rem;
  margin-top: 6px;
  font-weight: 500;
  min-height: 1.2em;
  transition: color .2s;
}
.username-hint--ok {
  color: #16a34a;
}
.username-hint--checking {
  color: var(--text-muted);
}
.username-hint--error {
  color: #ef4444;
}

/* ── Setup success state ───────────────────────────────────── */
.setup-card--success {
  text-align: center;
  padding: 40px 28px;
}
.setup-success__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--badge-done-bg);
  color: var(--badge-done-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.setup-success__title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}
.setup-success__body {
  color: var(--text-sub);
  font-size: 0.9rem;
  margin-bottom: 24px;
}
.setup-success__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.setup-success__actions .setup-btn {
  min-width: 160px;
}

/* ── Menu URL/PDF toggle ───────────────────────────────────── */
.setup-menu-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.setup-menu-tab {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.setup-menu-tab--active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

/* ── Onboarding checklist ──────────────────────────────────── */
.onboarding {
  margin-bottom: 28px;
}
.onboarding__card {
  background: var(--surface);
  border: 1.5px solid var(--accent-dim);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
}
.onboarding__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.onboarding__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 4px;
}
.onboarding__progress {
  font-size: 0.82rem;
  color: var(--text-sub);
  margin: 0;
}
.onboarding__dismiss {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background .15s;
}
.onboarding__dismiss:hover {
  background: var(--surface-2);
  color: var(--text);
}
.onboarding__steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.onboarding__step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: background .15s, border-color .15s;
}
.onboarding__step--done {
  background: var(--badge-done-bg);
  border-color: transparent;
}
.onboarding__step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}
.onboarding__step--done .onboarding__step-num {
  background: var(--badge-done-bg);
  color: var(--badge-done-text);
}
.onboarding__step-label {
  font-size: 0.87rem;
  color: var(--text);
  font-weight: 600;
}
.onboarding__step--done .onboarding__step-label {
  color: var(--badge-done-text);
  text-decoration: line-through;
  opacity: 0.85;
}

/* ── CTA editor ── */
.sced-cta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.sced-cta-row .sced-cta-type {
  width: 140px;
  flex-shrink: 0;
}
.sced-cta-row .sced-cta-value {
  flex: 1;
}
.sced-cta-remove {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
}
.sced-cta-remove:hover {
  background: var(--badge-danger-bg);
  color: var(--badge-danger-text);
  border-color: var(--badge-danger-text);
}

/* ── Opening hours editor ── */
.sced-hours-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.sced-hours-preset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--text);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.sced-hours-preset:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--accent-text);
}
.sced-hours-table {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.sced-hours-table__header,
.sced-hours-table__row {
  display: grid;
  grid-template-columns: 48px 1fr 1fr 56px;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: var(--surface);
}
.sced-hours-table__header {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  padding: 6px 10px;
}
.sced-hours-table__day {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
}
.sced-hours-table .sced-hours-open,
.sced-hours-table .sced-hours-close {
  width: 100%;
  min-width: 0;
  font-size: .82rem;
  padding: 5px 8px;
  height: 32px;
}
.sced-hours-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 20px;
  cursor: pointer;
}
.sced-hours-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.sced-hours-toggle__slider {
  position: absolute;
  inset: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: background .2s, border-color .2s;
}
.sced-hours-toggle__slider::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 14px;
  height: 14px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform .2s, background .2s;
}
.sced-hours-toggle input:checked + .sced-hours-toggle__slider {
  background: var(--badge-danger-bg);
  border-color: var(--badge-danger-text);
}
.sced-hours-toggle input:checked + .sced-hours-toggle__slider::before {
  transform: translateX(16px);
  background: var(--badge-danger-text);
}
.sced-hours-toggle input:focus-visible + .sced-hours-toggle__slider {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@media (max-width: 520px) {
  .sced-hours-table__header,
  .sced-hours-table__row {
    grid-template-columns: 36px 1fr 1fr 48px;
    gap: 6px;
    padding: 6px 8px;
  }
  .sced-hours-preset {
    padding: 5px 9px;
    font-size: .72rem;
  }
}

/* ── Textarea in editor ── */
textarea.field__input {
  resize: vertical;
  min-height: 72px;
}

/* ── Google place card (used in setup + drawer editor) ── */
.google-place-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  overflow: hidden;
  display: grid;
  gap: 0;
}
.google-place-card__copy {
  padding: 13px;
}
.google-place-card__copy strong {
  display: block;
  color: var(--text);
  font-size: .96rem;
  line-height: 1.35;
}
.google-place-card__copy p {
  margin: 5px 0 0;
  color: var(--text-sub);
  font-size: .84rem;
  line-height: 1.45;
}
.google-place-card__map {
  height: 170px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.google-place-card__map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  filter: saturate(.9);
}
[data-theme="dim"] .google-place-card__map iframe,
[data-theme="dark"] .google-place-card__map iframe {
  filter: saturate(.85) brightness(.82) contrast(1.05);
}
@media (max-width: 700px) {
  .google-place-card__map { height: 155px; }
}

/* ── Tag badge ─────────────────────────────────────────────────────────────── */
.tag-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  font-family: monospace;
  background: var(--badge-info-bg);
  color: var(--badge-info-text);
  vertical-align: middle;
}

/* ── Group editor modal ────────────────────────────────────────────────────── */
.ge-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn .15s ease;
}
.ge-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0,0,0,.22);
  overflow: hidden;
}
.ge-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}
.ge-modal__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ge-modal__close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-sub);
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.ge-modal__close:hover { background: var(--surface-hover); color: var(--text); }
.ge-modal__body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ge-modal__sub {
  margin: 0;
  font-size: .85rem;
  color: var(--text-sub);
  line-height: 1.5;
}
.ge-modal__label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.ge-modal__input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  background: var(--input-bg, var(--surface));
  color: var(--text);
  font-size: .9rem;
  outline: none;
  transition: border-color .15s;
}
.ge-modal__input:focus { border-color: var(--accent); }
.ge-modal__error {
  font-size: .82rem;
  color: var(--badge-error-text, #c00);
  background: var(--badge-error-bg, #fff0f0);
  border-radius: 6px;
  padding: 6px 10px;
}
/* Batch fill strip */
.ge-batch {
  display: flex;
  gap: 8px;
  align-items: center;
}
.ge-batch__input { flex: 1; }
.ge-batch__btn { flex-shrink: 0; white-space: nowrap; }

/* Unit list */
.ge-unit-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
}
.ge-unit-row {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ge-unit-row:last-child { border-bottom: none; }
.ge-unit-row__head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ge-unit-row__inputs {
  display: flex;
  gap: 8px;
  align-items: center;
}
.ge-unit-row__inputs .ge-modal__input { flex: 1; }
.ge-unit-save { flex-shrink: 0; }
.ge-unit-status {
  font-size: .82rem;
  flex-shrink: 0;
  margin-left: auto;
}
.ge-unit-status--done { color: var(--badge-done-text, #166534); font-weight: 700; }
.ge-unit-status--todo { color: var(--text-sub); }
.ge-unit-msg {
  font-size: .78rem;
  padding: 3px 0;
}
.ge-unit-msg--ok  { color: #059669; }
.ge-unit-msg--error { color: var(--badge-error-text, #c00); }
.ge-modal__footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
@media (max-width: 540px) {
  .ge-modal { max-height: 100vh; border-radius: 0; }
  .ge-overlay { padding: 0; align-items: flex-end; }
}
