/* ==========================================================================
   WIRAUSAHA ENTERPRISE SAAS WORKSPACE — DESIGN SYSTEM
   Modern B2B SaaS aesthetic: neutral surfaces, precise spacing, functional
   components. Light + dark mode driven entirely by CSS custom properties.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;

  /* Layout */
  --sidebar-expanded: 248px;
  --sidebar-collapsed: 72px;
  --topbar-height: 62px;
  --content-max: 1600px;

  /* Radii */
  --radius-card: 10px;
  --radius-btn: 7px;
  --radius-input: 7px;
  --radius-badge: 6px;
  --radius-pill: 999px;

  /* Light surface scale */
  --bg-app: #F8FAFC;
  --bg-sidebar: #FFFFFF;
  --bg-surface: #FFFFFF;
  --bg-elevated: #F1F5F9;
  --bg-hover: #F8FAFC;
  --bg-active: #EFF6FF;
  --bg-input: #FFFFFF;
  --overlay: rgba(15, 23, 42, .48);

  /* Text */
  --text-primary: #0F172A;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --text-inverse: #FFFFFF;

  /* Borders */
  --border-color: #E2E8F0;
  --border-strong: #CBD5E1;
  --border-subtle: #F1F5F9;

  /* Brand */
  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --accent-active: #1E40AF;
  --accent-soft: #EFF6FF;
  --accent-soft-border: #BFDBFE;
  --accent-contrast: #FFFFFF;

  /* Semantic */
  --success: #16A34A;
  --success-soft: #F0FDF4;
  --success-border: #BBF7D0;
  --warning: #D97706;
  --warning-soft: #FFFBEB;
  --warning-border: #FDE68A;
  --danger: #DC2626;
  --danger-soft: #FEF2F2;
  --danger-border: #FECACA;
  --info: #0891B2;
  --info-soft: #ECFEFF;
  --info-border: #A5F3FC;
  --purple: #7C3AED;
  --purple-soft: #F5F3FF;
  --purple-border: #DDD6FE;

  /* Elevation */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, .05);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, .07), 0 1px 2px -1px rgba(15, 23, 42, .05);
  --shadow-md: 0 4px 8px -2px rgba(15, 23, 42, .08), 0 2px 4px -2px rgba(15, 23, 42, .04);
  --shadow-lg: 0 12px 24px -6px rgba(15, 23, 42, .12), 0 4px 8px -4px rgba(15, 23, 42, .05);
  --shadow-xl: 0 24px 48px -12px rgba(15, 23, 42, .18);

  --focus-ring: 0 0 0 3px rgba(37, 99, 235, .18);

  /* Chart palette (JS reads these) */
  --chart-1: #2563EB;
  --chart-2: #0891B2;
  --chart-3: #16A34A;
  --chart-4: #D97706;
  --chart-5: #7C3AED;
  --chart-grid: #E2E8F0;
  --chart-text: #64748B;
}

html.dark {
  --bg-app: #090D16;
  --bg-sidebar: #111827;
  --bg-surface: #151D2C;
  --bg-elevated: #1E293B;
  --bg-hover: #1B2436;
  --bg-active: #1E293B;
  --bg-input: #1A2334;
  --overlay: rgba(0, 0, 0, .62);

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-inverse: #0F172A;

  --border-color: #2A3648;
  --border-strong: #3B4A61;
  --border-subtle: #1E293B;

  --accent: #3B82F6;
  --accent-hover: #60A5FA;
  --accent-active: #2563EB;
  --accent-soft: rgba(59, 130, 246, .14);
  --accent-soft-border: rgba(59, 130, 246, .32);
  --accent-contrast: #FFFFFF;

  --success: #4ADE80;
  --success-soft: rgba(74, 222, 128, .13);
  --success-border: rgba(74, 222, 128, .28);
  --warning: #FBBF24;
  --warning-soft: rgba(251, 191, 36, .13);
  --warning-border: rgba(251, 191, 36, .28);
  --danger: #F87171;
  --danger-soft: rgba(248, 113, 113, .13);
  --danger-border: rgba(248, 113, 113, .28);
  --info: #22D3EE;
  --info-soft: rgba(34, 211, 238, .13);
  --info-border: rgba(34, 211, 238, .28);
  --purple: #A78BFA;
  --purple-soft: rgba(167, 139, 250, .13);
  --purple-border: rgba(167, 139, 250, .28);

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, .35);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, .45), 0 1px 2px -1px rgba(0, 0, 0, .4);
  --shadow-md: 0 4px 8px -2px rgba(0, 0, 0, .5), 0 2px 4px -2px rgba(0, 0, 0, .4);
  --shadow-lg: 0 12px 24px -6px rgba(0, 0, 0, .6), 0 4px 8px -4px rgba(0, 0, 0, .45);
  --shadow-xl: 0 24px 48px -12px rgba(0, 0, 0, .7);

  --focus-ring: 0 0 0 3px rgba(59, 130, 246, .3);

  --chart-1: #60A5FA;
  --chart-2: #22D3EE;
  --chart-3: #4ADE80;
  --chart-4: #FBBF24;
  --chart-5: #A78BFA;
  --chart-grid: #2A3648;
  --chart-text: #94A3B8;
}

/* --------------------------------------------------------------------------
   2. BASE / RESET
   Scoped to the workspace shell so the public marketplace keeps its own
   Tailwind styling untouched. Only a box-sizing reset is global.
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body.workspace-body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-primary);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.scroll-locked { overflow: hidden; }

/* Element resets apply ONLY inside the dashboard workspace. */
body.workspace-body h1,
body.workspace-body h2,
body.workspace-body h3,
body.workspace-body h4,
body.workspace-body h5,
body.workspace-body h6 { margin: 0; font-weight: 600; letter-spacing: -0.011em; color: var(--text-primary); }
body.workspace-body p { margin: 0; }
body.workspace-body a { color: inherit; text-decoration: none; }
body.workspace-body button { font-family: inherit; }
body.workspace-body img,
body.workspace-body svg,
body.workspace-body video,
body.workspace-body canvas { max-width: 100%; height: auto; }

/* Public marketplace: reset only the box model, never override typography. */
body.site-body h1,
body.site-body h2,
body.site-body h3,
body.site-body h4,
body.site-body h5,
body.site-body h6 { margin: 0; }

::selection { background: var(--accent); color: var(--accent-contrast); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; border: 2px solid var(--bg-app); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Utility: tabular numbers for all financial figures */
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }

[x-cloak] { display: none !important; }

/* --------------------------------------------------------------------------
   3. APP SHELL
   -------------------------------------------------------------------------- */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-expanded) minmax(0, 1fr);
  grid-template-rows: var(--topbar-height) 1fr;
  min-height: 100vh;
  transition: grid-template-columns .22s cubic-bezier(.4, 0, .2, 1);
}
.app-shell.is-collapsed { grid-template-columns: var(--sidebar-collapsed) minmax(0, 1fr); }

/* Direct children are explicitly placed so overlays/modals never shift the
   sidebar or main column into the wrong grid track. */
.app-shell > .sidebar { grid-column: 1; grid-row: 1 / -1; }
.app-shell > .topbar { grid-column: 2; grid-row: 1; }
.app-shell > .main-area { grid-column: 2; grid-row: 2; }

/* --- Sidebar --- */
.sidebar {
  display: flex;
  flex-direction: column;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 100vh;
  min-width: 0;
  overflow: hidden;
  z-index: 40;
}

.sidebar-head {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--topbar-height);
  padding: 0 16px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-contrast);
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px;
  flex-shrink: 0;
}
.brand-text { min-width: 0; }
.brand-name { font-size: 14px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 11px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-shell.is-collapsed .brand-text { display: none; }

.sidebar-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 12px 10px 16px; min-height: 0; }

.nav-group { margin-bottom: 18px; }
.nav-group-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 10px;
  margin-bottom: 6px;
  white-space: nowrap;
}
.app-shell.is-collapsed .nav-group-label { text-align: center; padding: 0; font-size: 10px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-btn);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  position: relative;
  cursor: pointer;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: background .13s, color .13s;
  white-space: nowrap;
}
.nav-item:hover { background: var(--bg-elevated); color: var(--text-primary); }
.nav-item > i:first-child { font-size: 16px; flex-shrink: 0; width: 18px; text-align: center; }
.nav-item .nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav-item .nav-caret { font-size: 11px; transition: transform .18s; color: var(--text-muted); }
.nav-item.is-open .nav-caret { transform: rotate(90deg); }
.nav-item.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.nav-item.is-active::before {
  content: '';
  position: absolute;
  left: -10px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}
.app-shell.is-collapsed .nav-item { justify-content: center; padding: 9px 0; }
.app-shell.is-collapsed .nav-item .nav-label,
.app-shell.is-collapsed .nav-item .nav-caret,
.app-shell.is-collapsed .nav-badge { display: none; }

.nav-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: var(--danger-soft);
  color: var(--danger);
  flex-shrink: 0;
}
.nav-badge.neutral { background: var(--bg-elevated); color: var(--text-secondary); }

.nav-submenu {
  margin: 2px 0 4px 0;
  padding-left: 0;
  display: none;
  overflow: hidden;
}
.nav-item.is-open + .nav-submenu { display: block; }
.nav-submenu a {
  display: block;
  padding: 6px 10px 6px 38px;
  font-size: 13px;
  color: var(--text-secondary);
  border-radius: var(--radius-btn);
  position: relative;
  transition: background .12s, color .12s;
}
.nav-submenu a:hover { background: var(--bg-elevated); color: var(--text-primary); }
.nav-submenu a.is-active { color: var(--accent); font-weight: 600; background: var(--accent-soft); }
.nav-submenu a::before {
  content: '';
  position: absolute;
  left: 22px; top: 50%;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: .4;
  transform: translateY(-50%);
}
.app-shell.is-collapsed .nav-submenu { display: none !important; }

.sidebar-foot {
  border-top: 1px solid var(--border-color);
  padding: 10px;
  flex-shrink: 0;
}

/* Collapsed tooltips */
.app-shell.is-collapsed .nav-item { overflow: visible; }
.app-shell.is-collapsed .nav-item[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--text-primary);
  color: var(--bg-surface);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
}

/* --- Topbar --- */
.topbar {
  grid-column: 2;
  height: var(--topbar-height);
  background: color-mix(in srgb, var(--bg-surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  min-width: 0;
}
@supports not (backdrop-filter: blur(1px)) { .topbar { background: var(--bg-surface); } }

.icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-btn);
  display: inline-grid; place-items: center;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
  position: relative;
  flex-shrink: 0;
  transition: background .13s, color .13s;
}
.icon-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }
.icon-btn .dot-indicator {
  position: absolute;
  top: 7px; right: 7px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--danger);
  border: 1.5px solid var(--bg-surface);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  min-width: 0;
}
.breadcrumb a:hover { color: var(--text-primary); }
.breadcrumb .sep { color: var(--text-muted); }
.breadcrumb .current { color: var(--text-primary); font-weight: 600; }

.search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-btn);
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  min-width: 200px;
  max-width: 320px;
  flex: 1;
  transition: border-color .13s, box-shadow .13s;
}
.search-trigger:hover { border-color: var(--border-strong); }
.search-trigger kbd {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.topbar-spacer { flex: 1; min-width: 0; }

/* --- Main content --- */
.main-area {
  grid-column: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.content {
  padding: 24px;
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
  min-width: 0;
  flex: 1;
}
.content.is-wide { max-width: none; }

/* --------------------------------------------------------------------------
   4. PAGE HEADER
   -------------------------------------------------------------------------- */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}
.page-head-text { min-width: 0; flex: 1 1 260px; }
.page-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.page-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 3px;
  max-width: 78ch;
}
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* --------------------------------------------------------------------------
   5. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-btn);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background .14s, border-color .14s, color .14s, box-shadow .14s;
  user-select: none;
  line-height: 1;
}
.btn i { font-size: 15px; }
.btn:disabled, .btn.is-loading { opacity: .6; pointer-events: none; }
.btn.is-loading i:first-child { animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn-primary { background: var(--accent); color: var(--accent-contrast); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg-surface); color: var(--text-primary); border-color: var(--border-color); }
.btn-secondary:hover { background: var(--bg-elevated); border-color: var(--border-strong); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-elevated); color: var(--text-primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.92); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(.92); }
.btn-outline-danger { background: transparent; color: var(--danger); border-color: var(--danger-border); }
.btn-outline-danger:hover { background: var(--danger-soft); }
.btn-sm { height: 32px; padding: 0 10px; font-size: 12.5px; }
.btn-sm i { font-size: 14px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; border-right-width: 0; }
.btn-group .btn:first-child { border-radius: var(--radius-btn) 0 0 var(--radius-btn); }
.btn-group .btn:last-child { border-radius: 0 var(--radius-btn) var(--radius-btn) 0; border-right-width: 1px; }

/* --------------------------------------------------------------------------
   6. CARDS & SURFACES
   -------------------------------------------------------------------------- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-xs);
  min-width: 0;
}
.card-pad { padding: 20px; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}
.card-title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.card-subtitle { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.card-body { padding: 18px; min-width: 0; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--border-color); }

/* --------------------------------------------------------------------------
   7. METRIC CARDS
   -------------------------------------------------------------------------- */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}
.metric {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.metric-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex; align-items: center; gap: 6px;
}
.metric-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 15px;
  flex-shrink: 0;
  background: var(--accent-soft);
  color: var(--accent);
}
.metric-icon.green { background: var(--success-soft); color: var(--success); }
.metric-icon.amber { background: var(--warning-soft); color: var(--warning); }
.metric-icon.red { background: var(--danger-soft); color: var(--danger); }
.metric-icon.blue { background: var(--info-soft); color: var(--info); }
.metric-icon.purple { background: var(--purple-soft); color: var(--purple); }
.metric-value {
  font-size: 27px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}
.metric-value.sm { font-size: 22px; }
.metric-foot { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }

.trend { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 12px; }
.trend.up { color: var(--success); }
.trend.down { color: var(--danger); }
.trend.flat { color: var(--text-muted); }

/* --------------------------------------------------------------------------
   8. GRID HELPERS
   -------------------------------------------------------------------------- */
body.workspace-body .grid { display: grid; gap: 16px; min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main-side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid-side-main { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.span-2 { grid-column: span 2; }

.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; flex-wrap: wrap; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.grow { flex: 1; min-width: 0; }
.ml-auto { margin-left: auto; }

/* --------------------------------------------------------------------------
   9. BADGES & STATUS
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 2.5px 9px;
  border-radius: var(--radius-pill, 999px);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  white-space: nowrap;
  line-height: 1.5;
  border: 1px solid var(--border-color);
  letter-spacing: 0.01em;
  transition: all .16s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.badge .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  box-shadow: 0 0 3px currentColor;
}
.badge.green { background: rgba(16, 185, 129, 0.1); color: #059669; border-color: rgba(16, 185, 129, 0.28); }
.badge.amber { background: rgba(245, 158, 11, 0.1); color: #d97706; border-color: rgba(245, 158, 11, 0.3); }
.badge.red { background: rgba(239, 68, 68, 0.1); color: #dc2626; border-color: rgba(239, 68, 68, 0.28); }
.badge.blue { background: rgba(37, 99, 235, 0.1); color: #2563eb; border-color: rgba(37, 99, 235, 0.28); }
.badge.cyan { background: rgba(6, 182, 212, 0.1); color: #0891b2; border-color: rgba(6, 182, 212, 0.28); }
.badge.purple { background: rgba(147, 51, 234, 0.1); color: #9333ea; border-color: rgba(147, 51, 234, 0.28); }
.badge.slate { background: rgba(100, 116, 139, 0.08); color: #475569; border-color: rgba(148, 163, 184, 0.25); }
.badge.lg { font-size: 12.5px; padding: 4px 12px; }

html.dark .badge.green { background: rgba(16, 185, 129, 0.16); color: #34d399; border-color: rgba(52, 211, 153, 0.3); }
html.dark .badge.amber { background: rgba(245, 158, 11, 0.16); color: #fbbf24; border-color: rgba(251, 191, 36, 0.3); }
html.dark .badge.red { background: rgba(239, 68, 68, 0.18); color: #f87171; border-color: rgba(248, 113, 113, 0.3); }
html.dark .badge.blue { background: rgba(59, 130, 246, 0.16); color: #60a5fa; border-color: rgba(96, 165, 250, 0.3); }
html.dark .badge.cyan { background: rgba(6, 182, 212, 0.16); color: #22d3ee; border-color: rgba(34, 211, 238, 0.3); }
html.dark .badge.purple { background: rgba(168, 85, 247, 0.18); color: #c084fc; border-color: rgba(192, 132, 252, 0.35); }
html.dark .badge.slate { background: rgba(148, 163, 184, 0.12); color: #cbd5e1; border-color: rgba(148, 163, 184, 0.2); }

/* ==========================================================================
   PREMIUM SELLER BADGE SUITE (Elite Agency, Certified Specialist, etc.)
   ========================================================================== */
.badge-seller {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4.5px;
  border-radius: 9999px;
  font-family: inherit;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
  vertical-align: middle;
  text-decoration: none !important;
  cursor: default;
  overflow: hidden;
  user-select: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.badge-seller:hover {
  transform: translateY(-1px);
}
.badge-seller .badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}
.badge-seller .badge-text {
  display: inline-block;
  line-height: 1;
}

/* Badge Sizes */
.badge-seller-xs {
  font-size: 9.5px;
  padding: 2.5px 7px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  gap: 3.5px;
}
.badge-seller-xs .badge-icon {
  font-size: 9px;
}
.badge-seller-sm {
  font-size: 10.5px;
  padding: 3.5px 9px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  gap: 4.5px;
}
.badge-seller-sm .badge-icon {
  font-size: 10px;
}
.badge-seller-md {
  font-size: 12px;
  padding: 4.5px 12px;
  font-weight: 700;
  gap: 5px;
}
.badge-seller-md .badge-icon {
  font-size: 11.5px;
}
.badge-seller-lg {
  font-size: 13px;
  padding: 6px 15px;
  font-weight: 700;
  gap: 6px;
}
.badge-seller-lg .badge-icon {
  font-size: 13.5px;
}

/* Light glint sweep animation on hover for elite tiers */
.badge-seller-elite::before,
.badge-seller-certified::before,
.badge-seller-toprated::before,
.badge-seller-rising::before,
.badge-seller-pro::before,
.badge-seller-official::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-20deg);
  transition: left 0.65s ease;
  pointer-events: none;
}
.badge-seller:hover::before {
  left: 140%;
}

/* 1. ELITE AGENCY (Royal Violet & Radiant Gold Champagne Rim) */
.badge-seller-elite {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 52%, #9333ea 100%);
  color: #ffffff !important;
  border: 1px solid rgba(251, 191, 36, 0.65);
  box-shadow: 0 2px 8px -1px rgba(124, 58, 237, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.badge-seller-elite .badge-icon {
  color: #fbbf24;
  filter: drop-shadow(0 0 3px rgba(251, 191, 36, 0.7));
}
.badge-seller-elite:hover {
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

/* 2. CERTIFIED SPECIALIST (Electric Cobalt / Sapphire / Ocean Azure) */
.badge-seller-certified {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 40%, #1d4ed8 100%);
  color: #ffffff !important;
  border: 1px solid rgba(56, 189, 248, 0.6);
  box-shadow: 0 2px 8px -1px rgba(2, 132, 199, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.badge-seller-certified .badge-icon {
  color: #38bdf8;
  filter: drop-shadow(0 0 3px rgba(56, 189, 248, 0.7));
}
.badge-seller-certified:hover {
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* 3. TOP RATED (Forest Jade & Emerald with Radiant Gold Star) */
.badge-seller-toprated {
  background: linear-gradient(135deg, #047857 0%, #059669 45%, #0d9488 100%);
  color: #ffffff !important;
  border: 1px solid rgba(52, 211, 153, 0.6);
  box-shadow: 0 2px 8px -1px rgba(5, 150, 105, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.badge-seller-toprated .badge-icon {
  color: #fbbf24;
  filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.75));
}
.badge-seller-toprated:hover {
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* 4. RISING TALENT (Sunset Amber & Radiant Sunburst Lightning) */
.badge-seller-rising {
  background: linear-gradient(135deg, #c2410c 0%, #d97706 45%, #f59e0b 100%);
  color: #ffffff !important;
  border: 1px solid rgba(251, 191, 36, 0.6);
  box-shadow: 0 2px 8px -1px rgba(217, 119, 6, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.badge-seller-rising .badge-icon {
  color: #fef08a;
  filter: drop-shadow(0 0 3px rgba(254, 240, 138, 0.8));
}
.badge-seller-rising:hover {
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* 5. PRO VERIFIED (Midnight Obsidian with Neon Cyan Ring) */
.badge-seller-pro {
  background: linear-gradient(135deg, #090d16 0%, #0f172a 55%, #1e293b 100%);
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.7);
  box-shadow: 0 2px 8px -1px rgba(15, 23, 42, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.badge-seller-pro .badge-icon {
  color: #38bdf8;
  filter: drop-shadow(0 0 3px rgba(56, 189, 248, 0.7));
}
.badge-seller-pro:hover {
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
  border-color: #38bdf8;
}

/* 6. OFFICIAL PLATFORM (Deep Navy Obsidian with Solid Golden Rim) */
.badge-seller-official {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #1e293b 100%);
  color: #fef08a !important;
  border: 1px solid rgba(245, 158, 11, 0.8);
  box-shadow: 0 2px 8px -1px rgba(30, 27, 75, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.badge-seller-official .badge-icon {
  color: #fbbf24;
  filter: drop-shadow(0 0 3px rgba(251, 191, 36, 0.7));
}

/* 7. LEVEL 2 (Cyan Lagoon & Teal) */
.badge-seller-level2 {
  background: linear-gradient(135deg, #0e7490 0%, #0891b2 50%, #06b6d4 100%);
  color: #ffffff !important;
  border: 1px solid rgba(34, 211, 238, 0.5);
  box-shadow: 0 2px 7px -1px rgba(8, 145, 178, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.badge-seller-level2 .badge-icon {
  color: #a5f3fc;
}

/* 8. LEVEL 1 (Sleek Slate Navy) */
.badge-seller-level1 {
  background: linear-gradient(135deg, #334155 0%, #475569 100%);
  color: #ffffff !important;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 2px 6px -1px rgba(51, 65, 85, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.badge-seller-level1 .badge-icon {
  color: #cbd5e1;
}

/* 9. GENERAL FALLBACK (Modern Slate) */
.badge-seller-slate {
  background: linear-gradient(135deg, #475569 0%, #64748b 100%);
  color: #ffffff !important;
  border: 1px solid rgba(148, 163, 184, 0.4);
}
.badge-seller-slate .badge-icon {
  color: #e2e8f0;
}

/* --------------------------------------------------------------------------
   TRUST & CREDENTIAL PILLS
   -------------------------------------------------------------------------- */
.badge-trust-verified {
  display: inline-flex;
  align-items: center;
  gap: 4.5px;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.badge-trust-verified.badge-trust-xs {
  font-size: 9.5px;
  padding: 2px 7px;
}
.badge-trust-verified.badge-trust-md {
  font-size: 12px;
  padding: 4px 11px;
}
html.dark .badge-trust-verified {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.35);
}

.badge-escrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 4.5px;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.25);
  transition: all 0.2s ease;
  white-space: nowrap;
}
html.dark .badge-escrow-pill {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.3);
}

/* --------------------------------------------------------------------------
   10. FORMS
   -------------------------------------------------------------------------- */
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-group.full { grid-column: 1 / -1; }
.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.form-label .req { color: var(--danger); }
.form-hint { font-size: 12px; color: var(--text-secondary); }
.form-error { font-size: 12px; color: var(--danger); display: flex; align-items: center; gap: 4px; }

.input, .select, .textarea {
  width: 100%;
  min-height: 39px;
  padding: 8px 12px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-input);
  transition: border-color .14s, box-shadow .14s;
  min-width: 0;
}
.input::placeholder, .textarea::placeholder { color: var(--text-muted); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}
.input:disabled, .select:disabled { background: var(--bg-elevated); color: var(--text-muted); cursor: not-allowed; }
.input.has-error, .select.has-error, .textarea.has-error { border-color: var(--danger); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.55; }

.select {
  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='%2364748B' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 32px;
  cursor: pointer;
}

.input-icon { position: relative; display: flex; align-items: center; min-width: 0; }
.input-icon > i {
  position: absolute;
  left: 12px;
  font-size: 15px;
  color: var(--text-muted);
  pointer-events: none;
}
.input-icon .input { padding-left: 36px; }
.input-icon .input-action {
  position: absolute;
  right: 6px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  font-size: 15px;
}
.input-icon .input-action:hover { background: var(--bg-elevated); color: var(--text-primary); }

.checkbox, .radio { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; user-select: none; }
.checkbox input, .radio input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  width: 38px; height: 22px;
  border-radius: 999px;
  background: var(--border-strong);
  position: relative;
  transition: background .18s;
  flex-shrink: 0;
}
.switch-track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: transform .18s;
}
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  padding-top: 16px;
  margin-top: 4px;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   11. TABLES
   -------------------------------------------------------------------------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-card);
  min-width: 0;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 620px;
}
.table thead th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .035em;
  color: var(--text-secondary);
  padding: 10px 14px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
.table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--bg-hover); }
.table tbody tr.is-selected { background: var(--accent-soft); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }
.table .col-check { width: 40px; }
.table .col-check input { accent-color: var(--accent); }
.table.compact tbody td { padding: 9px 14px; }

.cell-strong { font-weight: 600; color: var(--text-primary); }
.cell-muted { color: var(--text-secondary); font-size: 12px; }
.cell-stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.user-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--border-color);
}
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 48px; height: 48px; font-size: 17px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.green { background: var(--success-soft); color: var(--success); }
.avatar.amber { background: var(--warning-soft); color: var(--warning); }
.avatar.purple { background: var(--purple-soft); color: var(--purple); }

/* Bulk action bar */
.bulk-bar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-border);
  border-radius: var(--radius-btn);
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  flex-wrap: wrap;
}
.bulk-bar.is-active { display: flex; }

/* --------------------------------------------------------------------------
   12. TABS / FILTER BARS / PAGINATION
   -------------------------------------------------------------------------- */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 9px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 0;
  background: transparent;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color .13s, border-color .13s;
}
.tab:hover { color: var(--text-primary); }
.tab.is-active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tab .count {
  font-size: 11px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  color: var(--text-secondary);
}
.tab.is-active .count { background: var(--accent); color: var(--accent-contrast); }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  min-width: 0;
}
.filter-bar .input-icon { flex: 1 1 220px; min-width: 0; }
.filter-bar .select, .filter-bar .input { min-width: 0; }
.filter-bar .filter-select { flex: 0 1 auto; width: auto; min-width: 130px; max-width: 100%; }

.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-secondary);
}
.page-links { display: flex; gap: 3px; flex-wrap: wrap; }
.page-link {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background .13s, border-color .13s, color .13s;
}
.page-link:hover { background: var(--bg-elevated); color: var(--text-primary); border-color: var(--border-strong); }
.page-link.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); font-weight: 600; }
.page-link.is-disabled { opacity: .45; pointer-events: none; }

/* --------------------------------------------------------------------------
   13. DROPDOWNS / MODALS / DRAWERS
   -------------------------------------------------------------------------- */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 24px));
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
  padding: 5px;
  z-index: 60;
  max-height: min(70vh, 480px);
  overflow-y: auto;
}
.dropdown-menu.left { right: auto; left: 0; }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: background .12s, color .12s;
}
.dropdown-item:hover { background: var(--bg-elevated); color: var(--text-primary); }
.dropdown-item i { font-size: 15px; width: 16px; text-align: center; flex-shrink: 0; }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: var(--danger-soft); }
.dropdown-head { padding: 10px 10px 8px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 5px; }
.dropdown-sep { height: 1px; background: var(--border-subtle); margin: 5px 0; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(3px);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  grid-column: 1 / -1;
  grid-row: 1 / -1;
}
.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: auto;
}
.modal.lg { max-width: 760px; }
.modal.sm { max-width: 400px; }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}
.modal-title { font-size: 15px; font-weight: 600; }
.modal-body { padding: 20px; overflow-y: auto; min-width: 0; }
.modal-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   14. EMPTY & LOADING STATES
   -------------------------------------------------------------------------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  gap: 10px;
}
.empty-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  display: grid; place-items: center;
  font-size: 24px;
  margin-bottom: 4px;
}
.empty-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.empty-text { font-size: 13px; color: var(--text-secondary); max-width: 44ch; }
.empty-state .btn { margin-top: 6px; }

.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--border-subtle) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-line { height: 12px; margin-bottom: 8px; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-80 { width: 80%; }

/* --------------------------------------------------------------------------
   15. ALERTS / TOASTS
   -------------------------------------------------------------------------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 14px;
  border-radius: var(--radius-btn);
  font-size: 13px;
  border: 1px solid;
  line-height: 1.5;
}
.alert i { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.alert.success { background: var(--success-soft); border-color: var(--success-border); color: var(--success); }
.alert.error { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger); }
.alert.warning { background: var(--warning-soft); border-color: var(--warning-border); color: var(--warning); }
.alert.info { background: var(--accent-soft); border-color: var(--accent-soft-border); color: var(--accent); }

.toast-region {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-btn);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  color: var(--text-primary);
  opacity: 0;
  transform: translateX(16px);
  transition: opacity .22s, transform .22s;
  pointer-events: auto;
  min-width: 0;
}
.toast.is-visible { opacity: 1; transform: translateX(0); }
.toast > i { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.toast span { flex: 1; min-width: 0; line-height: 1.5; }
.toast-success { border-left-color: var(--success); }
.toast-success > i { color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-error > i { color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast-warning > i { color: var(--warning); }
.toast-info { border-left-color: var(--accent); }
.toast-info > i { color: var(--accent); }
.toast-close {
  border: 0; background: transparent; color: var(--text-muted);
  font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; flex-shrink: 0;
}
.toast-close:hover { color: var(--text-primary); }

/* --------------------------------------------------------------------------
   16. CHARTS
   -------------------------------------------------------------------------- */
.chart-box { position: relative; width: 100%; min-width: 0; }
.chart-box canvas { max-width: 100%; display: block; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--text-secondary); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend .swatch { width: 10px; height: 10px; border-radius: 3px; }

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--text-primary);
  color: var(--bg-surface);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
  z-index: 20;
  opacity: 0;
  transition: opacity .12s;
  font-variant-numeric: tabular-nums;
}
.chart-tooltip.is-visible { opacity: 1; }

/* --------------------------------------------------------------------------
   17. ACTIVITY / LIST ITEMS
   -------------------------------------------------------------------------- */
.list { display: flex; flex-direction: column; }
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
  min-width: 0;
  transition: background .12s;
}
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--bg-hover); }
.list-item .li-main { flex: 1; min-width: 0; }
.list-item .li-title { font-size: 13.5px; font-weight: 500; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .li-meta { font-size: 12px; color: var(--text-secondary); margin-top: 1px; }
.list-item .li-side { text-align: right; flex-shrink: 0; }

/* Timeline */
.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 5px; top: 4px; bottom: 4px;
  width: 2px;
  background: var(--border-color);
}
.timeline-item { position: relative; padding-bottom: 16px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -21px; top: 4px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--border-strong);
}
.timeline-item.is-done::before { border-color: var(--success); background: var(--success); }
.timeline-item.is-active::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.timeline-title { font-size: 13px; font-weight: 600; }
.timeline-meta { font-size: 12px; color: var(--text-secondary); }

/* --------------------------------------------------------------------------
   18. PROGRESS
   -------------------------------------------------------------------------- */
.progress { height: 6px; border-radius: 999px; background: var(--bg-elevated); overflow: hidden; }
.progress-bar { height: 100%; border-radius: 999px; background: var(--accent); transition: width .3s; }
.progress-bar.green { background: var(--success); }
.progress-bar.amber { background: var(--warning); }
.progress-bar.red { background: var(--danger); }

/* --------------------------------------------------------------------------
   19. UTILITIES
   Scoped to `body.workspace-body` where the class name collides with a
   Tailwind utility, so the design system can never override Tailwind's
   responsive variants (e.g. `lg:flex`) on the public marketplace.
   -------------------------------------------------------------------------- */
body.workspace-body .text-xs { font-size: 12px; }
body.workspace-body .text-sm { font-size: 13px; }
body.workspace-body .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
body.workspace-body .mt-0 { margin-top: 0; }
body.workspace-body .mt-1 { margin-top: 6px; }
body.workspace-body .mt-2 { margin-top: 12px; }
body.workspace-body .mt-3 { margin-top: 18px; }
body.workspace-body .mb-1 { margin-bottom: 6px; }
body.workspace-body .mb-2 { margin-bottom: 12px; }
body.workspace-body .mb-3 { margin-bottom: 18px; }

/* Non-colliding helpers (unique names, safe to remain global). */
.text-sec { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-accent { color: var(--accent); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mono { font-family: var(--font-mono); font-size: .92em; }
.clamp-2 {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.divider { height: 1px; background: var(--border-color); margin: 16px 0; }
.link { color: var(--accent); font-weight: 500; }
.link:hover { text-decoration: underline; }

/* Kbd — scoped to the workspace so it cannot clash with page-level markup. */
body.workspace-body kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

/* Detail rows (key/value) */
.kv { display: grid; grid-template-columns: minmax(100px, auto) minmax(0, 1fr); gap: 10px 16px; font-size: 13px; }
.kv dt { color: var(--text-secondary); }
.kv dd { margin: 0; color: var(--text-primary); font-weight: 500; text-align: right; word-break: break-word; }

/* Section title */
.section-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  display: flex;
  align-items: center;
  gap: 9px;
}
.section-title i { color: var(--text-muted); font-size: 17px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }

/* --------------------------------------------------------------------------
   20. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1280px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main-side, .grid-side-main { grid-template-columns: minmax(0, 1fr); }
  .content { padding: 20px; }
  .metric-value { font-size: 24px; }
  .metric-value.sm { font-size: 20px; }
}
@media (max-width: 900px) {
  .app-shell, .app-shell.is-collapsed {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: var(--topbar-height) 1fr;
  }
  .app-shell > .sidebar {
    grid-column: 1;
    grid-row: 1 / -1;
    grid-row: 1;
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-expanded);
    height: 100vh;
    max-height: 100vh;
    transform: translateX(-100%);
    transition: transform .24s cubic-bezier(.4, 0, .2, 1);
    box-shadow: var(--shadow-xl);
    z-index: 80;
  }
  .app-shell.drawer-open .sidebar { transform: translateX(0); }
  .app-shell.drawer-open .sidebar-overlay { opacity: 1; visibility: visible; }
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    z-index: 70;
    opacity: 0;
    visibility: hidden;
    transition: opacity .24s, visibility .24s;
  }
  .app-shell > .topbar { grid-column: 1; grid-row: 1; }
  .app-shell > .main-area { grid-column: 1; grid-row: 2; }
  .app-shell.is-collapsed .brand-text { display: block; }
  .app-shell.is-collapsed .nav-group-label { text-align: left; padding: 0 10px; font-size: 11px; }
  .app-shell.is-collapsed .nav-item { justify-content: flex-start; padding: 8px 10px; }
  .app-shell.is-collapsed .nav-item .nav-label,
  .app-shell.is-collapsed .nav-item .nav-caret,
  .app-shell.is-collapsed .nav-badge { display: inline-flex; }
}
@media (min-width: 901px) {
  .sidebar-overlay { display: none; }
}
@media (max-width: 768px) {
  .content { padding: 16px; }
  .page-title { font-size: 20px; }
  .metric-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
  .metric { padding: 14px; }
  .metric-value { font-size: 22px; }
  .metric-value.sm { font-size: 19px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .search-trigger { min-width: 0; max-width: none; }
  .search-trigger .search-label { display: none; }
  .search-trigger kbd { display: none; }
  .modal { max-width: 100%; }
  .card-pad { padding: 16px; }
  .card-body { padding: 16px; }
  .toast-region { top: 12px; right: 12px; left: 12px; max-width: none; }
}
@media (max-width: 560px) {
  .topbar { padding: 0 10px; gap: 6px; }
  .breadcrumb { display: none; }
  .page-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .page-head-text { flex: 0 1 auto; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .metric-grid { grid-template-columns: minmax(0, 1fr); }
  .filter-bar { padding: 10px 12px; }
  .filter-bar .input-icon { flex: 1 1 100%; }
  .table { min-width: 540px; }
  .tabs { margin: 0 -16px; padding: 0 16px; }
}
@media (max-width: 380px) {
  .content { padding: 12px; }
  .card-body, .card-pad { padding: 13px; }
  .metric-value { font-size: 20px; }
}

/* --------------------------------------------------------------------------
   21. PRINT
   -------------------------------------------------------------------------- */
@media print {
  .sidebar, .topbar, .page-actions, .filter-bar, .bulk-bar, .toast-region { display: none !important; }
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .content { padding: 0; }
  .card { box-shadow: none; border-color: #ddd; }
  body { background: #fff; }
}

/* --------------------------------------------------------------------------
   22. REDUCED MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   23. LEGACY COMPAT BRIDGE
   Keeps older views (public site + not-yet-migrated partials) rendering while
   the redesign rolls out. Safe to remove once all views are migrated.
   -------------------------------------------------------------------------- */
.commerce-card { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-card); box-shadow: var(--shadow-xs); }
.commerce-btn-primary {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px;
  border-radius: var(--radius-btn); font-size: 13px; font-weight: 600; cursor: pointer;
  background: var(--accent); color: var(--accent-contrast); border: 1px solid transparent; white-space: nowrap;
}
.commerce-btn-primary:hover { background: var(--accent-hover); }
.commerce-btn-secondary {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px;
  border-radius: var(--radius-btn); font-size: 13px; font-weight: 600; cursor: pointer;
  background: var(--bg-surface); color: var(--text-primary); border: 1px solid var(--border-color); white-space: nowrap;
}
.commerce-btn-secondary:hover { background: var(--bg-elevated); border-color: var(--border-strong); }
.commerce-badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600;
  padding: 2px 8px; border-radius: var(--radius-badge); background: var(--bg-elevated); color: var(--text-secondary);
  border: 1px solid transparent; white-space: nowrap;
}
.commerce-badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.commerce-badge.emerald, .commerce-badge.green { background: var(--success-soft); color: var(--success); border-color: var(--success-border); }
.commerce-badge.amber { background: var(--warning-soft); color: var(--warning); border-color: var(--warning-border); }
.commerce-badge.red { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-border); }
.commerce-badge.blue { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft-border); }
.commerce-badge.neutral, .commerce-badge.slate { background: var(--bg-elevated); color: var(--text-secondary); border-color: var(--border-color); }
.metric-box { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-card); padding: 16px 18px; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-badge); background: var(--bg-elevated); color: var(--text-secondary); white-space: nowrap; }
.status-badge .dot { width: 5px; height: 5px; border-radius: 50%; }
.status-badge.green { background: var(--success-soft); color: var(--success); } .status-badge.green .dot { background: var(--success); }
.status-badge.blue { background: var(--accent-soft); color: var(--accent); } .status-badge.blue .dot { background: var(--accent); }
.status-badge.amber { background: var(--warning-soft); color: var(--warning); } .status-badge.amber .dot { background: var(--warning); }
.status-badge.red { background: var(--danger-soft); color: var(--danger); } .status-badge.red .dot { background: var(--danger); }
.status-badge.slate { background: var(--bg-elevated); color: var(--text-secondary); } .status-badge.slate .dot { background: var(--text-muted); }

/* ==========================================================================
   24. SERVICE BUILDER (multi-step wizard)
   Unique, non-colliding class names so nothing overrides Tailwind utilities.
   ========================================================================== */
.builder-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: start;
}
@media (max-width: 1280px) {
  .builder-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .builder-aside { display: none; }
}
@media (max-width: 900px) {
  .builder-shell { grid-template-columns: minmax(0, 1fr); }
}

/* Step navigation */
.builder-steps {
  position: sticky;
  top: calc(var(--topbar-height) + 16px);
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 10px;
}
.builder-progress-top {
  padding: 6px 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 6px;
}
.builder-step {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  border-radius: var(--radius-btn);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: background .13s, color .13s;
}
.builder-step:hover { background: var(--bg-elevated); color: var(--text-primary); }
.builder-step.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.builder-step.is-done { color: var(--success); }
.builder-step-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}
.builder-step.is-active .builder-step-num { background: var(--accent); color: #fff; border-color: var(--accent); }
.builder-step.is-done .builder-step-num { background: var(--success); color: #fff; border-color: var(--success); }
.builder-step-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Mobile step pills */
.builder-mobile-steps {
  display: none;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
  scrollbar-width: none;
}
.builder-mobile-steps::-webkit-scrollbar { display: none; }
.builder-mobile-steps .builder-step {
  flex-shrink: 0;
  width: auto;
  border: 1px solid var(--border-color);
  padding: 7px 12px;
}
@media (max-width: 900px) {
  .builder-steps { display: none; }
  .builder-mobile-steps { display: flex; }
}

/* Step panels */
.builder-panel { display: none; }
.builder-panel.is-active { display: block; animation: builderFade .22s ease; }
@keyframes builderFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Sticky action bar */
.builder-actions {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin: 20px -4px 0;
  background: color-mix(in srgb, var(--bg-surface) 92%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
}
@supports not (backdrop-filter: blur(1px)) { .builder-actions { background: var(--bg-surface); } }
.builder-actions .builder-save-status { font-size: 12px; color: var(--text-secondary); margin-right: auto; }
@media (max-width: 560px) {
  .builder-actions { padding: 10px; gap: 8px; }
  .builder-actions .btn { flex: 1 1 44%; }
  .builder-actions .builder-save-status { flex: 1 1 100%; margin: 0 0 2px; }
  /* Reserve space so the sticky bar never covers the final form fields. */
  .builder-main { padding-bottom: 84px; }
}

/* Repeatable rows (packages, extras, faqs, requirements) */
.repeat-row {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 14px;
  background: var(--bg-hover);
  position: relative;
}
.repeat-row + .repeat-row { margin-top: 12px; }
.repeat-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.repeat-handle { cursor: grab; color: var(--text-muted); }
.repeat-remove {
  border: 0; background: transparent; color: var(--danger);
  cursor: pointer; font-size: 15px; padding: 4px 6px; border-radius: 6px;
}
.repeat-remove:hover { background: var(--danger-soft); }

/* Package tier editor */
.pkg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .pkg-grid { grid-template-columns: minmax(0, 1fr); } }
.pkg-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 16px;
  background: var(--bg-surface);
  min-width: 0;
}
.pkg-card.tier-basic { border-top: 3px solid var(--text-muted); }
.pkg-card.tier-standard { border-top: 3px solid var(--accent); }
.pkg-card.tier-premium { border-top: 3px solid var(--purple); }
.pkg-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pkg-tier-name { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }

/* Comparison table (editable) */
.cmp-table { width: 100%; border-collapse: collapse; min-width: 520px; font-size: 13px; }
.cmp-table th, .cmp-table td { border: 1px solid var(--border-color); padding: 6px 8px; }
.cmp-table th { background: var(--bg-elevated); font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-secondary); }
.cmp-table input { width: 100%; border: 0; background: transparent; font-size: 13px; color: var(--text-primary); padding: 4px; }
.cmp-table input:focus { outline: 2px solid var(--accent); border-radius: 4px; }

/* Media dropzone */
.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-card);
  padding: 28px 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  background: var(--bg-hover);
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone i { font-size: 26px; color: var(--text-muted); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.media-tile {
  position: relative;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-btn);
  overflow: hidden;
  background: var(--bg-elevated);
  aspect-ratio: 16 / 10;
}
.media-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-tile .media-badge {
  position: absolute; top: 6px; left: 6px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  background: var(--accent); color: #fff; padding: 2px 6px; border-radius: 4px;
}
.media-tile .media-actions {
  position: absolute; inset: auto 0 0 0;
  display: flex; gap: 4px; justify-content: flex-end;
  padding: 6px; background: linear-gradient(transparent, rgba(0,0,0,.65));
}
.media-tile .media-actions button {
  border: 0; background: rgba(255,255,255,.92); color: #111;
  width: 26px; height: 26px; border-radius: 6px; cursor: pointer; font-size: 12px;
}
.media-tile .media-actions button:hover { background: #fff; }
.media-progress { height: 4px; background: var(--bg-elevated); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.media-progress span { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }

/* Rich text editor */
.rte-toolbar {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 6px; border: 1px solid var(--border-color); border-bottom: 0;
  border-radius: var(--radius-input) var(--radius-input) 0 0; background: var(--bg-elevated);
}
.rte-toolbar button {
  border: 1px solid transparent; background: transparent; color: var(--text-secondary);
  width: 30px; height: 30px; border-radius: 6px; cursor: pointer; font-size: 13px;
}
.rte-toolbar button:hover { background: var(--bg-surface); color: var(--text-primary); border-color: var(--border-color); }
.rte-editor {
  min-height: 220px; max-height: 460px; overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius-input) var(--radius-input);
  padding: 14px; font-size: 13.5px; line-height: 1.65;
  background: var(--bg-input); color: var(--text-primary);
}
.rte-editor:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.rte-editor h3, .rte-editor h4 { margin: 12px 0 6px; }
.rte-editor ul, .rte-editor ol { margin: 8px 0 8px 20px; }
.rte-editor p { margin: 0 0 8px; }

/* Checklist */
.checklist { display: flex; flex-direction: column; gap: 8px; }
.checklist-item { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.checklist-item .ci-icon { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; flex-shrink: 0; }
.checklist-item.done .ci-icon { background: var(--success-soft); color: var(--success); }
.checklist-item.todo .ci-icon { background: var(--bg-elevated); color: var(--text-muted); }
.checklist-item.optional { opacity: .7; }

/* Preview frame */
.preview-frame {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--bg-surface);
}
.preview-banner { background: var(--bg-elevated); padding: 10px 16px; font-size: 12px; color: var(--text-secondary); border-bottom: 1px solid var(--border-color); }

/* Tags input */
.tag-input-wrap {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  border: 1px solid var(--border-color); border-radius: var(--radius-input);
  padding: 6px 8px; background: var(--bg-input); min-height: 40px;
}
.tag-input-wrap:focus-within { border-color: var(--accent); box-shadow: var(--focus-ring); }
.tag-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent-soft-border);
  font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
}
.tag-chip button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 13px; line-height: 1; }
.tag-input-wrap input { border: 0; background: transparent; flex: 1; min-width: 120px; font-size: 13.5px; color: var(--text-primary); }
.tag-input-wrap input:focus { outline: none; }

/* Template cards */
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.template-card {
  border: 1px solid var(--border-color); border-radius: var(--radius-card);
  padding: 16px; background: var(--bg-surface); cursor: pointer; text-align: left;
  transition: border-color .14s, box-shadow .14s;
}
.template-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.template-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ==========================================================================
   25. PUBLIC CTA (Seller Acquisition) — self-contained, no Tailwind reliance
   ========================================================================== */
.cta-seller {
  position: relative;
  overflow: hidden;
  background: #0B1220;
  border-top: 1px solid #1E293B;
  color: #fff;
}
html:not(.dark) .cta-seller { background: #0F172A; }

.cta-seller::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .07) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  z-index: 0;
}
.cta-seller::after {
  content: "";
  position: absolute;
  top: -160px; right: -80px;
  width: 520px; height: 520px;
  border-radius: 50%;
  background: rgba(37, 99, 235, .18);
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.cta-seller__inner {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 72px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  min-width: 0;
}
@media (max-width: 1024px) {
  .cta-seller__inner { grid-template-columns: minmax(0, 1fr); gap: 40px; padding: 56px 20px; }
}
@media (max-width: 560px) {
  .cta-seller__inner { padding: 44px 16px; }
}

.cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(59, 130, 246, .12);
  border: 1px solid rgba(59, 130, 246, .32);
  color: #93C5FD;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.cta-title {
  margin: 22px 0 0;
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: #fff;
}
.cta-title span { color: #60A5FA; }
.cta-desc {
  margin: 18px 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: #94A3B8;
  max-width: 34rem;
}

.cta-features { margin-top: 30px; display: flex; flex-direction: column; gap: 18px; max-width: 34rem; }
.cta-feature { display: flex; align-items: flex-start; gap: 14px; }
.cta-feature__icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 17px;
  flex-shrink: 0;
}
.cta-feature__icon.green { background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.28); color: #34D399; }
.cta-feature__icon.blue  { background: rgba(59,130,246,.12); border: 1px solid rgba(59,130,246,.28); color: #60A5FA; }
.cta-feature__icon.indigo{ background: rgba(99,102,241,.12); border: 1px solid rgba(99,102,241,.28); color: #A5B4FC; }
.cta-feature__title { font-size: 14px; font-weight: 700; color: #fff; }
.cta-feature__sub { font-size: 12.5px; color: #94A3B8; margin-top: 2px; line-height: 1.5; }

.cta-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }
.cta-btn-primary {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 15px 26px;
  border-radius: 12px;
  background: #2563EB;
  color: #fff;
  font-size: 14px; font-weight: 700;
  border: 0;
  box-shadow: 0 14px 28px -10px rgba(37, 99, 235, .6);
  transition: background .16s, transform .16s;
}
.cta-btn-primary:hover { background: #1D4ED8; transform: translateY(-1px); }
.cta-btn-secondary {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 15px 26px;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  color: #fff;
  font-size: 14px; font-weight: 600;
  border: 1px solid #334155;
  transition: background .16s, border-color .16s;
}
.cta-btn-secondary:hover { background: rgba(255,255,255,.11); border-color: #475569; }

.cta-note {
  margin-top: 18px;
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: #64748B;
}
.cta-note i { color: #34D399; }

/* Right panel */
.cta-panel {
  border: 1px solid rgba(51,65,85,.8);
  border-radius: 16px;
  background: rgba(30,41,59,.45);
  overflow: hidden;
  min-width: 0;
}
.cta-panel__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(51,65,85,.8);
}
.cta-panel__head span:first-child { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #94A3B8; }
.cta-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: #34D399; }
.cta-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #34D399; animation: ctaPulse 2s infinite; }
@keyframes ctaPulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.cta-stats { display: grid; grid-template-columns: 1fr 1fr; }
.cta-stat { padding: 22px; border-right: 1px solid rgba(51,65,85,.8); border-bottom: 1px solid rgba(51,65,85,.8); }
.cta-stat:nth-child(2n) { border-right: 0; }
.cta-stat:nth-last-child(-n+2) { border-bottom: 0; }
.cta-stat__value { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.1; }
.cta-stat__value.accent { color: #34D399; }
.cta-stat__label { font-size: 12px; color: #94A3B8; margin-top: 4px; }

.cta-steps { padding: 18px 22px; background: rgba(15,23,42,.55); border-top: 1px solid rgba(51,65,85,.8); }
.cta-steps__title { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #64748B; margin-bottom: 12px; }
.cta-step { display: flex; align-items: center; gap: 11px; font-size: 12.5px; color: #CBD5E1; }
.cta-step + .cta-step { margin-top: 10px; }
.cta-step__num {
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(59,130,246,.15); color: #60A5FA;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
}

/* ==========================================================================
   26. BUYER REQUESTS BOARD (self-contained, fully responsive)
   ========================================================================== */
.brp {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 56px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}
/* When rendered inside the dashboard shell, the .content wrapper already pads. */
.workspace-body .brp { max-width: none; padding: 0; }
@media (max-width: 900px) { .brp { padding: 24px 18px 44px; } }
@media (max-width: 560px) { .brp { padding: 20px 14px 36px; gap: 16px; } }

/* Header */
.brp-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.brp-head__text { min-width: 0; flex: 1 1 320px; }
/* In the mobile column layout, flex-basis becomes HEIGHT — reset it. */
@media (max-width: 640px) {
  .brp-head__text { flex: 0 1 auto; }
}
.brp-eyebrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.brp-eyebrow__meta { font-size: 11.5px; color: var(--text-muted); }
.brp-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid var(--success-border);
}
.brp-title {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text-primary);
}
.brp-desc {
  margin: 6px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 62ch;
}
.brp-head__actions { display: flex; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }
@media (max-width: 640px) {
  .brp-head { flex-direction: column; align-items: stretch; }
  .brp-head__actions .brp-btn { width: 100%; justify-content: center; }
}

/* Buttons */
.brp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 16px;
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background .14s, border-color .14s, color .14s;
}
.brp-btn i { font-size: 14px; }
.brp-btn--sm { height: 34px; padding: 0 12px; font-size: 12.5px; }
.brp-btn--block { width: 100%; }
.brp-btn--primary { background: var(--accent); color: #fff; }
.brp-btn--primary:hover { background: var(--accent-hover); }
.brp-btn--secondary { background: var(--bg-surface); color: var(--text-primary); border-color: var(--border-color); }
.brp-btn--secondary:hover { background: var(--bg-elevated); border-color: var(--border-strong); }
.brp-btn--ghost { background: transparent; color: var(--text-secondary); border-color: var(--border-color); }
.brp-btn--ghost:hover { background: var(--bg-elevated); color: var(--text-primary); }

/* Stats */
.brp-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 900px) { .brp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .brp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

.brp-stat {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 15px 16px;
  min-width: 0;
}
.brp-stat__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.brp-stat__label {
  font-size: 12px; font-weight: 500; color: var(--text-secondary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.brp-stat__icon {
  width: 28px; height: 28px; border-radius: 7px;
  display: grid; place-items: center; font-size: 13px; flex-shrink: 0;
}
.brp-stat__icon.blue { background: var(--accent-soft); color: var(--accent); }
.brp-stat__icon.green { background: var(--success-soft); color: var(--success); }
.brp-stat__icon.purple { background: var(--purple-soft); color: var(--purple); }
.brp-stat__icon.amber { background: var(--warning-soft); color: var(--warning); }
.brp-stat__value {
  margin-top: 10px;
  font-size: 26px; font-weight: 700; line-height: 1.1;
  letter-spacing: -0.02em; color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.brp-stat__value--sm { font-size: 19px; }
.brp-stat__foot { margin-top: 4px; font-size: 11.5px; color: var(--text-muted); }
@media (max-width: 460px) {
  .brp-stat { padding: 12px; }
  .brp-stat__value { font-size: 20px; }
  .brp-stat__value--sm { font-size: 15px; }
  .brp-stat__label { font-size: 11px; }
  .brp-stat__foot { font-size: 10.5px; }
}

/* Category chips */
.brp-chips {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.brp-chips::-webkit-scrollbar { display: none; }
.brp-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12.5px; font-weight: 500;
  white-space: nowrap;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  text-decoration: none;
  flex-shrink: 0;
  transition: background .13s, color .13s, border-color .13s;
}
.brp-chip:hover { background: var(--bg-elevated); color: var(--text-primary); }
.brp-chip.is-active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.brp-chip__count {
  font-size: 10.5px; font-weight: 700;
  padding: 0 5px; border-radius: 999px;
  background: var(--bg-elevated); color: var(--text-secondary);
}
.brp-chip.is-active .brp-chip__count { background: rgba(255,255,255,.22); color: #fff; }

/* Filters */
.brp-filters {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.brp-search { position: relative; display: flex; align-items: center; }
.brp-search i { position: absolute; left: 12px; font-size: 14px; color: var(--text-muted); pointer-events: none; }
.brp-search input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 13.5px;
  min-width: 0;
}
.brp-search input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.brp-filters__row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.brp-select {
  height: 34px;
  padding: 0 30px 0 11px;
  border: 1px solid var(--border-color);
  border-radius: 7px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 12.5px;
  cursor: pointer;
  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='%2364748B' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  min-width: 0;
  flex: 0 1 auto;
  max-width: 100%;
}
.brp-select:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.brp-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--text-secondary);
  cursor: pointer; user-select: none;
  padding: 0 4px;
}
.brp-toggle input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
@media (max-width: 560px) {
  .brp-filters { padding: 10px; }
  .brp-filters__row { gap: 6px; }
  .brp-select { flex: 1 1 calc(50% - 3px); min-width: 0; }
  .brp-toggle { flex: 1 1 100%; }
  .brp-filters__row .brp-btn { flex: 1 1 auto; }
}

/* Result meta */
.brp-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--text-secondary);
}
.brp-meta strong { color: var(--text-primary); }
.brp-meta__active {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-border);
  padding: 2px 9px; border-radius: 999px;
}

/* List + cards */
.brp-list { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.brp-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 18px 20px;
  min-width: 0;
  transition: border-color .15s, box-shadow .15s;
}
.brp-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
@media (max-width: 820px) {
  .brp-card { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px; }
}
.brp-card__main { min-width: 0; }
.brp-card__top {
  display: flex; align-items: center; gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 9px;
}
.brp-tag {
  font-size: 11px; font-weight: 700;
  padding: 2px 9px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent-soft-border);
  white-space: nowrap;
}
.brp-code { font-size: 11.5px; font-family: var(--font-mono); color: var(--text-muted); }
.brp-dot { color: var(--text-muted); font-size: 11px; }
.brp-time { font-size: 11.5px; color: var(--text-muted); }

.brp-card__title {
  margin: 0 0 6px;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}
.brp-card__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
@media (max-width: 560px) {
  .brp-card__title { font-size: 14.5px; }
  .brp-card__desc { -webkit-line-clamp: 3; font-size: 12.5px; }
}

.brp-card__facts {
  display: flex; flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 12px;
  min-width: 0;
}
.brp-fact {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 0;
}
.brp-fact i { font-size: 13px; color: var(--text-muted); flex-shrink: 0; }
.brp-fact span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brp-fact--budget { color: var(--success); font-weight: 600; }
.brp-fact--budget i { color: var(--success); }
.brp-fact--urgent { color: var(--danger); font-weight: 600; }
.brp-fact--urgent i { color: var(--danger); }
.brp-fact__muted { color: var(--text-muted); font-weight: 400; }
@media (max-width: 560px) {
  .brp-card__facts { gap: 7px 14px; }
  .brp-fact { font-size: 11.5px; }
}

/* Card side */
.brp-card__side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  justify-content: center;
  border-left: 1px solid var(--border-subtle);
  padding-left: 20px;
  min-width: 0;
}
@media (max-width: 820px) {
  .brp-card__side {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-left: 0;
    border-top: 1px solid var(--border-subtle);
    padding-left: 0;
    padding-top: 14px;
    gap: 14px;
  }
  .brp-card__side .brp-btn, .brp-card__side .brp-badge { flex: 1 1 auto; }
}
.brp-offers { text-align: center; }
@media (max-width: 820px) { .brp-offers { text-align: left; display: flex; align-items: baseline; gap: 6px; flex-shrink: 0; } }
.brp-offers__num {
  display: block;
  font-size: 26px; font-weight: 700; line-height: 1;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 820px) { .brp-offers__num { font-size: 20px; } }
.brp-offers__label { display: block; font-size: 11px; color: var(--text-muted); margin-top: 3px; }
@media (max-width: 820px) { .brp-offers__label { margin-top: 0; } }

.brp-badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 34px; padding: 0 12px;
  border-radius: 7px;
  font-size: 12px; font-weight: 600;
  white-space: nowrap;
}
.brp-badge--green { background: var(--success-soft); color: var(--success); border: 1px solid var(--success-border); }

/* Empty state */
.brp-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 8px;
  padding: 56px 24px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
}
.brp-empty__icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--bg-elevated); color: var(--text-muted);
  font-size: 22px; margin-bottom: 4px;
}
.brp-empty__title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.brp-empty__text { font-size: 13px; color: var(--text-secondary); max-width: 44ch; margin: 0; }
.brp-empty .brp-btn { margin-top: 6px; }

/* Pagination */
.brp-pager { display: flex; justify-content: center; gap: 5px; flex-wrap: wrap; padding-top: 4px; }
.brp-pager__link {
  min-width: 34px; height: 34px;
  padding: 0 9px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 7px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 13px; font-weight: 500;
  text-decoration: none;
}
.brp-pager__link:hover { background: var(--bg-elevated); color: var(--text-primary); border-color: var(--border-strong); }
.brp-pager__link.is-active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.brp-pager__link.is-disabled { opacity: .4; pointer-events: none; }
.brp-pager__gap { display: inline-flex; align-items: center; padding: 0 4px; color: var(--text-muted); font-size: 13px; }

/* Promo */
.brp-promo {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-border);
  border-radius: 10px;
  padding: 18px 20px;
}
.brp-promo__text { min-width: 0; flex: 1 1 300px; }
.brp-promo__title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.brp-promo__sub { margin: 3px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--text-secondary); }
.brp-promo__actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 560px) {
  .brp-promo { flex-direction: column; align-items: stretch; padding: 16px; }
  .brp-promo__actions .brp-btn { flex: 1 1 auto; }
}

/* ==========================================================================
   27. THEME ENFORCEMENT
   The pre-compiled Tailwind bundle gates `dark:` utilities on the OS
   `prefers-color-scheme`, ignoring our `html.dark` toggle. These rules make the
   site honour the explicit class instead, so the theme switch works everywhere.
   ========================================================================== */
html:not(.dark) body.site-body,
html[data-theme="light"] body.site-body {
  background-color: #F8FAFC !important;
  color: #0F172A !important;
}
html:not(.dark) body.site-body .site-bg-surface,
html:not(.dark) body.site-body main { background-color: transparent; }

html.dark body.site-body,
html[data-theme="dark"] body.site-body {
  background-color: #090D16 !important;
  color: #E2E8F0 !important;
}

html:not(.dark) .site-body header,
html[data-theme="light"] .site-body header {
  background-color: rgba(255, 255, 255, 0.95);
  border-color: #E2E8F0;
}

html.dark .site-body header,
html[data-theme="dark"] .site-body header {
  background-color: rgba(15, 23, 42, 0.95);
  border-color: #1E293B;
}

html[data-theme="light"] .site-body footer,
html.dark .site-body footer {
  background-color: #0F172A;
  color: #94A3B8;
}
html .site-body footer a { color: #94A3B8; }
html .site-body footer a:hover { color: #fff; }
html .site-body footer h4 { color: #fff; }

/* Buyer-requests board typography follows the resolved theme. */
html:not(.dark) .brp-title { color: #0F172A; }
html.dark .brp-title { color: #F8FAFC; }
html:not(.dark) .brp-desc,
html:not(.dark) .brp-meta { color: #475569; }
html.dark .brp-desc,
html.dark .brp-meta { color: #94A3B8; }

/* Give the board a subtle page canvas in light mode. */
html:not(.dark) .brp { background: transparent; }

/* ==========================================================================
   28. SITE FOOTER (self-contained, responsive)
   ========================================================================== */
.site-footer {
  background: #0B1220;
  border-top: 1px solid #1E293B;
  color: #94A3B8;
  margin-top: auto;
  margin-bottom: 0 !important;
}
.site-footer__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 24px 24px;
}
@media (max-width: 640px) { .site-footer__inner { padding: 40px 18px 20px; } }

.site-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 2.2fr);
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid #1E293B;
}
@media (max-width: 900px) {
  .site-footer__top { grid-template-columns: minmax(0, 1fr); gap: 34px; }
}

/* Brand */
.site-footer__brand { min-width: 0; }
.site-footer__logo {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; margin-bottom: 16px;
}
.site-footer__mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: #2563EB; color: #fff;
  display: grid; place-items: center; font-size: 17px;
  flex-shrink: 0;
}
.site-footer__wordmark { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.site-footer__wordmark span { color: #60A5FA; }
.site-footer__tagline {
  font-size: 13px; line-height: 1.7; color: #94A3B8;
  max-width: 34ch; margin: 0 0 18px;
}
.site-footer__trust { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.site-footer__trust-item {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600;
  color: #CBD5E1;
  background: rgba(148,163,184,.08);
  border: 1px solid rgba(148,163,184,.16);
  padding: 4px 10px; border-radius: 999px;
}
.site-footer__trust-item i { color: #34D399; font-size: 12px; }
.site-footer__social { display: flex; gap: 10px; }
.site-footer__social a {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: rgba(148,163,184,.08);
  border: 1px solid rgba(148,163,184,.16);
  color: #94A3B8;
  font-size: 15px;
  transition: background .15s, color .15s, border-color .15s;
}
.site-footer__social a:hover { background: #2563EB; border-color: #2563EB; color: #fff; }

/* Link columns */
.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  min-width: 0;
}
@media (max-width: 768px) { .site-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; } }
.site-footer__col { min-width: 0; }
.site-footer__col h3 {
  margin: 0 0 13px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: #E2E8F0;
}
.site-footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.site-footer__col a {
  font-size: 12.5px;
  color: #94A3B8;
  text-decoration: none;
  line-height: 1.5;
  transition: color .14s;
}
.site-footer__col a:hover { color: #fff; }

/* Bottom bar */
.site-footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding-top: 22px;
}
@media (max-width: 640px) { .site-footer__bottom { flex-direction: column; align-items: flex-start; gap: 12px; } }
.site-footer__copy { margin: 0; font-size: 12px; color: #64748B; }
.site-footer__legal { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.site-footer__legal a { font-size: 12px; color: #94A3B8; text-decoration: none; transition: color .14s; }
.site-footer__legal a:hover { color: #fff; }
.site-footer__status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: #34D399; font-weight: 600;
}
.site-footer__status .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 0 3px rgba(52,211,153,.18);
}

/* ==========================================================================
   26. BUILDER OPTIMIZATIONS (Scope Guard, Dynamic Intake, Live Preview, Micro-copy)
   ========================================================================== */

/* Live Mini-Card Preview */
.live-preview-card {
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.live-preview-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  animation: pulse-dot 2s infinite;
  margin-right: 4px;
  vertical-align: middle;
}
@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.lp-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-btn);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(124, 58, 237, 0.12));
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lp-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}
.live-preview-card:hover .lp-thumbnail img {
  transform: scale(1.03);
}
.lp-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-align: center;
  padding: 12px;
}
.lp-badge-scope {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(6px);
  color: #F8FAFC;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  z-index: 2;
}
.lp-badge-scope i {
  color: #38BDF8;
}

.lp-content {
  display: flex;
  flex-direction: column;
}
.lp-seller-row {
  display: flex;
  align-items: center;
  gap: 7px;
}
.lp-seller-row .avatar-xs {
  width: 22px;
  height: 22px;
  font-size: 10px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.lp-rating {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.lp-title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lp-summary {
  line-height: 1.4;
  color: var(--text-secondary);
}
.lp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}
.lp-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
}

/* Micro-Copywriting Tips */
.micro-tip-box {
  background: color-mix(in srgb, var(--accent-soft) 40%, var(--bg-surface));
  border: 1px solid var(--accent-soft-border);
  border-radius: var(--radius-btn);
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
}
.micro-tip-title {
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}
.micro-tip-desc {
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.micro-tip-compare {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.micro-tip-bad {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--danger);
  font-size: 11.5px;
}
.micro-tip-bad i { flex-shrink: 0; margin-top: 2px; }
.micro-tip-good {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--success);
  font-size: 11.5px;
}
.micro-tip-good i { flex-shrink: 0; margin-top: 2px; }

/* Scope Guard deliverable chips & buttons */
.deliverable-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.chip-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .12s ease;
}
.chip-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}

/* Category Preset Buttons in Step 5 */
.intake-preset-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px;
  background: var(--bg-hover);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
}
.intake-preset-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-btn);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  transition: all .14s ease;
}
.intake-preset-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.intake-preset-btn.is-active-cat {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

/* ==========================================================================
   PWA INSTALL BANNER & STANDALONE LOCK SYSTEM
   ========================================================================== */

/* In PWA Standalone Mode: eliminate logout elements to keep user permanently logged in */
.is-pwa-standalone [data-pwa-logout],
.is-pwa-standalone form[action*="/logout"],
.is-pwa-standalone a[href*="/logout"],
.is-pwa-standalone .nav-logout,
.is-pwa-standalone .btn-logout,
.is-pwa-standalone .pwa-hide-on-standalone {
  display: none !important;
}

/* Floating PWA Install Card / Banner */
.pwa-install-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: auto;
  max-width: 420px;
  width: calc(100% - 48px);
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(37, 99, 235, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 999999;
  animation: pwaSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
html.dark .pwa-install-banner, body.dark .pwa-install-banner {
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 12px 35px -5px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(59, 130, 246, 0.25);
}
html.dark .pwa-install-title, body.dark .pwa-install-title {
  color: #ffffff !important;
}
html.dark .pwa-install-desc, body.dark .pwa-install-desc {
  color: #94a3b8 !important;
}
html.dark .pwa-btn-dismiss, body.dark .pwa-btn-dismiss {
  color: #94a3b8 !important;
}
html.dark .pwa-btn-dismiss:hover, body.dark .pwa-btn-dismiss:hover {
  color: #ffffff !important;
}
@keyframes pwaSlideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.pwa-install-content {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.pwa-install-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.25);
}
.pwa-install-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pwa-install-text {
  min-width: 0;
  flex: 1;
}
.pwa-install-title {
  font-size: 13px;
  font-weight: 750;
  color: var(--text-primary, #0f172a);
  line-height: 1.3;
}
.pwa-install-desc {
  font-size: 11px;
  color: var(--text-secondary, #64748b);
  line-height: 1.35;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pwa-install-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.pwa-btn-install {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
  transition: all 0.16s ease;
}
.pwa-btn-install:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.45);
}
.pwa-btn-dismiss {
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  font-size: 20px;
  line-height: 1;
  padding: 6px;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.16s ease;
}
.pwa-btn-dismiss:hover {
  color: var(--text-primary, #0f172a);
}

@media (max-width: 480px) {
  .pwa-install-banner {
    bottom: 84px !important;
    right: 14px !important;
    left: 14px !important;
    width: auto !important;
    max-width: calc(100vw - 28px) !important;
    padding: 12px 14px !important;
  }
}

/* ==========================================================================
   29. POSITIONING UTILITIES & FLOATING WIDGET FIXES
   Eliminates unwanted bottom spacing under the footer.
   ========================================================================== */
html {
  background-color: #0B1220; /* Prevents white strip on rubber-band overscroll */
}

body.site-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

body.site-body > main {
  flex: 1 0 auto;
}

.fixed { position: fixed !important; }
.absolute { position: absolute !important; }
.relative { position: relative !important; }
.bottom-5 { bottom: 1.25rem !important; }
.right-5 { right: 1.25rem !important; }
.z-50 { z-index: 50 !important; }

/* Contact Us Speed Dial Widget Floating Fix */
#wira-contact-corner,
.wira-contact-corner {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  z-index: 99999 !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  display: block !important;
}
.wira-contact-menu {
  position: absolute !important;
  bottom: 70px !important;
  right: 0 !important;
  z-index: 100000 !important;
}



