﻿/* SkyCRM SaaS ÃÂÃÂ¢ÃÂÃÂÃÂÃÂ semantic tokens + marketing/panel components */

:root,
[data-theme="light"] {
  color-scheme: light;
  --bg-primary: #f1f5f9;
  --bg-secondary: #ffffff;
  --bg-elevated: #ffffff;
  --bg-muted: #e8eef6;
  --sidebar: #0f172a;
  --sidebar-text: #e2e8f0;
  --sidebar-muted: #94a3b8;
  --sidebar-hover: rgba(255, 255, 255, 0.08);
  --sidebar-active: rgba(37, 99, 235, 0.18);
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #60a5fa;
  --sky: #60a5fa;
  --cyan: #38bdf8;
  --accent: #0284c7;
  --text-primary: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --glow: rgba(37, 99, 235, 0.22);
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --success: #10b981;
  --success-bg: #f0fdf4;
  --error: #ef4444;
  --error-bg: #fef2f2;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --radius: 10px;
  --radius-sm: 8px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --focus-ring: var(--primary);
  --icon-stroke: 1.5;
  --topbar-action-size: 44px;
  --kpi-height: 120px;
  --chart-height: 240px;
  --font: "Vazirmatn", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --hero-glow: none;
  --nav-bg: rgba(255, 255, 255, 0.92);
  --nav-border: rgba(226, 232, 240, 0.95);
  --footer-bg: #0f172a;
  --footer-text: #e2e8f0;
  --footer-muted: #94a3b8;
  --illo-bg: #eef3f9;
  --illo-blob: #d7e4f5;
  --illo-surface: #ffffff;
  --illo-stroke: #c5d0de;
  --illo-line: #94a3b8;
  --illo-line-soft: #dbe3ef;
  --illo-card-a: #2563eb;
  --illo-card-b: #0ea5e9;
  --illo-card-c: #64748b;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg-primary: #070b16;
  --bg-secondary: #0c1020;
  --bg-elevated: #111827;
  --bg-muted: #151b31;
  --sidebar: #080c18;
  --sidebar-text: #e5e7eb;
  --sidebar-muted: #9ca3af;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: rgba(37, 99, 235, 0.22);
  --primary: #2563eb;
  --primary-hover: #3b82f6;
  --primary-light: #60a5fa;
  --sky: #60a5fa;
  --cyan: #38bdf8;
  --accent: #38bdf8;
  --text-primary: #e5e7eb;
  --text-muted: #9ca3af;
  --border: #1f2937;
  --glow: rgba(56, 189, 248, 0.28);
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.28);
  --success: #34d399;
  --success-bg: color-mix(in srgb, #10b981 16%, var(--bg-elevated));
  --error: #f87171;
  --error-bg: color-mix(in srgb, #ef4444 16%, var(--bg-elevated));
  --warning: #fbbf24;
  --warning-bg: color-mix(in srgb, #f59e0b 16%, var(--bg-elevated));
  --radius: 10px;
  --radius-sm: 8px;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --focus-ring: var(--primary);
  --icon-stroke: 1.5;
  --topbar-action-size: 44px;
  --kpi-height: 120px;
  --chart-height: 240px;
  --hero-glow: none;
  --nav-bg: rgba(8, 12, 24, 0.88);
  --nav-border: rgba(31, 41, 55, 0.9);
  --footer-bg: #050814;
  --footer-text: #e5e7eb;
  --footer-muted: #94a3b8;
  --illo-bg: #0c1322;
  --illo-blob: #152238;
  --illo-surface: #121a2b;
  --illo-stroke: #2a364a;
  --illo-line: #7c8aa0;
  --illo-line-soft: #2f3b50;
  --illo-card-a: #2563eb;
  --illo-card-b: #0284c7;
  --illo-card-c: #475569;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100dvh;
  direction: rtl;
  line-height: 1.6;
  overflow-x: clip;
}
body.nav-open,
body.public-nav-open {
  overflow: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { text-decoration: underline; }

.container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-wrap {
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.site-main { flex: 1; width: 100%; }

/* ÃÂÃÂ¢ÃÂÃÂÃÂÃÂÃÂÃÂ¢ÃÂÃÂÃÂÃÂ Buttons ÃÂÃÂ¢ÃÂÃÂÃÂÃÂÃÂÃÂ¢ÃÂÃÂÃÂÃÂ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.15rem;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition: background 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}
.btn:hover {
  background: var(--primary-hover);
  text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

.btn-ghost {
  background: color-mix(in srgb, var(--bg-elevated) 42%, transparent);
  border: 1px solid color-mix(in srgb, #fff 22%, var(--border));
  color: var(--text-primary);
  backdrop-filter: blur(14px) saturate(1.35);
  -webkit-backdrop-filter: blur(14px) saturate(1.35);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 22%, transparent),
    0 1px 2px color-mix(in srgb, #000 8%, transparent);
}
.btn-ghost:hover {
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
  color: var(--primary);
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 28%, transparent),
    0 4px 14px color-mix(in srgb, var(--primary) 16%, transparent);
}
.btn-ghost:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

.btn-secondary {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 45%, var(--border));
  color: var(--primary);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 16%, transparent);
}
.btn-secondary:hover {
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  color: var(--primary);
  text-decoration: none;
  border-color: var(--primary);
}

.btn-formset-add {
  width: 100%;
  background: color-mix(in srgb, var(--primary) 8%, var(--bg-elevated));
  color: var(--primary);
  border: 2px dashed color-mix(in srgb, var(--primary) 55%, var(--border));
  box-shadow: none;
}
.btn-formset-add:hover {
  background: color-mix(in srgb, var(--primary) 14%, var(--bg-elevated));
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}
.btn-formset-add .icon {
  width: 1.1rem;
  height: 1.1rem;
  stroke: currentColor;
  stroke-width: 2.25;
  fill: none;
}
.formset-add-wrap {
  margin: 0.35rem 0 1rem;
}
.formset-add-hint {
  margin: 0.45rem 0 0;
  font-size: 0.85rem;
}
.formset-row.is-removed,
.formset-row[hidden] {
  display: none !important;
}
.formset-row label.field-check:has(input[name$="-DELETE"]),
.formset-row .field-check:has(input[name$="-DELETE"]) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
}
.formset-row-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border);
}
.btn-formset-remove {
  background: transparent;
  color: var(--error);
  border: 1px solid color-mix(in srgb, var(--error) 45%, var(--border));
  padding: 0.45rem 0.85rem;
  font-size: 0.875rem;
  box-shadow: none;
}
.btn-formset-remove:hover {
  background: color-mix(in srgb, var(--error) 10%, transparent);
  color: var(--error);
  text-decoration: none;
}

.btn-danger {
  background: var(--error);
  color: #fff;
  border: 0;
}
.btn-danger:hover {
  background: color-mix(in srgb, var(--error) 85%, #000);
  text-decoration: none;
}

.btn:disabled,
.btn[disabled],
.btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

.btn-icon {
  width: 2.75rem;
  height: 2.75rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.btn-icon::after { display: none; }
.btn-icon:hover {
  background: var(--bg-muted);
  filter: none;
  transform: none;
  text-decoration: none;
}
.btn-icon:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}
.btn-icon svg { width: 1.25rem; height: 1.25rem; stroke: currentColor; fill: none; stroke-width: var(--icon-stroke, 1.5); stroke-linecap: round; stroke-linejoin: round; }

.money {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
  fill: none;
  stroke-width: var(--icon-stroke, 1.5);
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icon-lg { width: 1.5rem; height: 1.5rem; }

/* ÃÂÃÂ¢ÃÂÃÂÃÂÃÂÃÂÃÂ¢ÃÂÃÂÃÂÃÂ Cards ÃÂÃÂ¢ÃÂÃÂÃÂÃÂÃÂÃÂ¢ÃÂÃÂÃÂÃÂ */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.card > h2,
.card > h3,
.card > .section-title {
  margin: 0 0 var(--space-3);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
}
.card > h2:last-child,
.card > h3:last-child {
  margin-bottom: 0;
}
.card .card {
  margin: 0 0 var(--space-2);
  padding: var(--space-3);
  box-shadow: none;
  background: var(--bg-secondary);
}
.card .card:last-child {
  margin-bottom: 0;
}

.glow-card,
.feature-tile {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
}
.feature-tile:hover {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
}

.kpi-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  min-height: var(--kpi-height, 120px);
  box-sizing: border-box;
  justify-content: space-between;
  overflow: hidden;
}
.kpi-card:hover {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
}
.kpi-card .kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.kpi-card .kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary);
  flex-shrink: 0;
}
.kpi-card .kpi-icon .icon {
  width: 20px;
  height: 20px;
  stroke-width: var(--icon-stroke);
}
.kpi-card .muted { font-size: 0.8125rem; }

/* ——— Public nav (capsule mockup) ——— */
.public-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: calc(1rem + env(safe-area-inset-top, 0px)) 1rem 0;
  background: transparent;
  border-bottom: 0;
}
.public-nav-shell {
  width: min(72rem, 100%);
  margin-inline: auto;
  position: relative;
}
.public-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.public-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  height: 3.5rem;
  padding-inline: 0.5rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--nav-border);
  background: var(--nav-bg);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-decoration: none;
  flex-shrink: 0;
}
.public-nav-brand:hover {
  text-decoration: none;
  color: var(--text-primary);
}
.public-nav-brand-mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}
.public-nav-brand-mark img {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
}
.public-nav-brand-text {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.public-nav-brand-text span {
  color: var(--primary);
}
[data-theme="dark"] .public-nav-brand-text span {
  color: #60a5fa;
}

.public-nav-links {
  position: relative;
  display: none;
  align-items: center;
  height: 3.5rem;
  padding: 0.375rem;
  border-radius: 999px;
  border: 1px solid var(--nav-border);
  background: var(--nav-bg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.public-nav-indicator {
  position: absolute;
  top: 0.375rem;
  left: 0;
  width: 0;
  height: calc(100% - 0.75rem);
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 0;
}
@media (prefers-reduced-motion: reduce) {
  .public-nav-indicator { transition: none; }
}
.public-nav-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.public-nav-link:hover {
  color: var(--text-primary);
  text-decoration: none;
}
.public-nav-link.is-on,
.public-nav-link.is-on:hover {
  color: #fff;
  font-weight: 600;
}

.public-nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  height: 3.5rem;
  padding: 0.375rem;
  border-radius: 999px;
  border: 1px solid var(--nav-border);
  background: var(--nav-bg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-shrink: 0;
}
.public-nav-icon-btn,
.public-nav-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
  padding: 0;
  flex-shrink: 0;
}
.public-nav-icon-btn:hover {
  background: color-mix(in srgb, var(--text-primary) 6%, transparent);
  color: var(--text-primary);
}
.public-nav-icon-btn:focus-visible,
.public-nav-burger:focus-visible,
.public-nav-cta:focus-visible,
.public-nav-text-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.public-nav-theme-sun { display: none; }
[data-theme="dark"] .public-nav-theme-moon { display: none; }
[data-theme="dark"] .public-nav-theme-sun { display: block; }

.public-nav-text-btn {
  display: none;
  border-radius: 999px;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
}
.public-nav-text-btn:hover {
  background: color-mix(in srgb, var(--text-primary) 6%, transparent);
  text-decoration: none;
}
.public-nav-cta {
  display: none;
  align-items: center;
  justify-content: center;
  height: 2.75rem;
  border: 0;
  border-radius: 999px;
  padding: 0 1.25rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  background: #0f172a;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.public-nav-cta:hover {
  background: #334155;
  text-decoration: none;
}
[data-theme="dark"] .public-nav-cta {
  background: #fff;
  color: #0f172a;
}
[data-theme="dark"] .public-nav-cta:hover {
  background: #e2e8f0;
}
.public-nav-logout {
  display: none;
  margin: 0;
}
.public-nav-burger {
  background: var(--primary);
  color: #fff;
}
.public-nav-burger:hover {
  background: var(--primary-hover);
}

@media (min-width: 640px) {
  .public-nav-text-btn--desktop {
    display: inline-flex;
  }
  .public-nav-cta--desktop,
  .public-nav-logout--desktop {
    display: inline-flex;
  }
  .public-nav-logout--desktop .public-nav-cta {
    display: inline-flex;
  }
}

@media (min-width: 768px) {
  .public-nav-links {
    display: flex;
  }
  .public-nav-burger {
    display: none;
  }
}

.public-nav-drawer {
  display: none;
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 2rem;
  border: 1px solid var(--nav-border);
  background: color-mix(in srgb, var(--bg-elevated) 95%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  flex-direction: column;
  gap: 0.15rem;
}
@media (max-width: 767px) {
  .public-nav.is-open .public-nav-drawer {
    display: flex;
  }
}
.public-nav-drawer-link {
  display: block;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
}
.public-nav-drawer-link:hover {
  background: color-mix(in srgb, var(--text-primary) 6%, transparent);
  text-decoration: none;
}
.public-nav-drawer-link.is-active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
.public-nav-drawer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.public-nav-drawer-actions form {
  margin: 0;
  display: contents;
}
.public-nav-drawer-secondary,
.public-nav-drawer-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  width: 100%;
}
.public-nav-drawer-secondary:hover,
.public-nav-drawer-primary:hover {
  text-decoration: none;
}
.public-nav-drawer-primary {
  border-color: transparent;
  background: #0f172a;
  color: #fff;
}
[data-theme="dark"] .public-nav-drawer-primary {
  background: #fff;
  color: #0f172a;
}

/* Footer / legacy brand helpers (shared) */
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-lockup:hover { text-decoration: none; color: inherit; }
.brand-text { white-space: nowrap; }
.brand-cloud {
  font-weight: 600;
  color: #94a3b8;
}
.brand-logo {
  display: block;
  height: 2.5rem;
  width: auto;
  object-fit: contain;
}
.brand-logo--footer {
  height: 2.25rem;
}
.brand-logo--sm {
  height: 1.75rem;
  width: 1.75rem;
}
.brand-mark-img {
  display: block;
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  flex-shrink: 0;
}
.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
}
.brand-mark svg {
  display: block;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  gap: 1rem;
}
.nav .brand {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.1rem;
}

/* ÃÂÃÂ¢ÃÂÃÂÃÂÃÂÃÂÃÂ¢ÃÂÃÂÃÂÃÂ Typography helpers ÃÂÃÂ¢ÃÂÃÂÃÂÃÂÃÂÃÂ¢ÃÂÃÂÃÂÃÂ */
.muted { color: var(--text-muted); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}
.stat {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.stat.money,
.kpi-card .stat.money {
  font-size: clamp(0.95rem, 2.4vw, 1.5rem);
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}
.page-title {
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
}
.section-title {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.grid { display: grid; gap: 1rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* ÃÂÃÂ¢ÃÂÃÂÃÂÃÂÃÂÃÂ¢ÃÂÃÂÃÂÃÂ Forms ÃÂÃÂ¢ÃÂÃÂÃÂÃÂÃÂÃÂ¢ÃÂÃÂÃÂÃÂ */
label {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--text-muted);
  font-size: 0.9rem;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
select,
textarea {
  width: 100%;
  background: color-mix(in srgb, var(--bg-secondary) 78%, transparent);
  border: 1px solid color-mix(in srgb, #fff 10%, var(--border));
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  font: inherit;
  margin-bottom: var(--space-3);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 8%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):hover,
select:hover,
textarea:hover {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  box-shadow: 0 0 0 3px var(--glow);
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
}
form p { margin: 0 0 var(--space-1); }
form p:last-of-type { margin-bottom: 0; }

.field-label {
  display: block;
  margin-bottom: var(--space-1);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.panel-form .field-stack {
  display: block;
  margin-bottom: var(--space-3);
  font-size: 0.9rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.panel-form .field-stack:focus-within {
  background: color-mix(in srgb, var(--primary) 7%, transparent);
  border-color: color-mix(in srgb, var(--primary) 22%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 8%, transparent);
}
.panel-form .field-stack:focus-within > .field-label {
  color: var(--primary);
}
.panel-form .field-stack input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
.panel-form .field-stack select,
.panel-form .field-stack textarea {
  margin-bottom: 0;
}

/* Form cards: glass tint so create/edit screens feel less flat */
.card--form,
.card:has(> .panel-form):not(.reports-filter):not(.reports-chart-card),
.card:has(> form.panel-form):not(.reports-filter):not(.reports-chart-card) {
  background:
    linear-gradient(
      160deg,
      color-mix(in srgb, var(--primary) 9%, var(--bg-elevated)),
      color-mix(in srgb, var(--cyan) 4%, var(--bg-elevated)) 42%,
      var(--bg-elevated) 78%
    );
  border-color: color-mix(in srgb, var(--primary) 22%, var(--border));
  box-shadow:
    var(--shadow-sm),
    inset 0 1px 0 color-mix(in srgb, #fff 14%, transparent);
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
}
.card--form .page-title,
.card:has(> .panel-form):not(.reports-filter) > .section-title {
  color: color-mix(in srgb, var(--primary) 35%, var(--text-primary));
}
.form-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid color-mix(in srgb, var(--primary) 12%, var(--border));
}

@media (min-width: 860px) {
  .card--form > .panel-form,
  .card:has(> .panel-form):not(.reports-filter) > .panel-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 14px;
    align-items: start;
  }
  .card--form > .panel-form > .field-stack:has(textarea),
  .card:has(> .panel-form):not(.reports-filter) > .panel-form > .field-stack:has(textarea),
  .card--form > .panel-form > .field-check,
  .card:has(> .panel-form):not(.reports-filter) > .panel-form > .field-check,
  .card--form > .panel-form > .switch-field,
  .card:has(> .panel-form):not(.reports-filter) > .panel-form > .switch-field,
  .card--form > .panel-form > .form-actions,
  .card:has(> .panel-form):not(.reports-filter) > .panel-form > .form-actions,
  .card--form > .panel-form > .formset,
  .card:has(> .panel-form):not(.reports-filter) > .panel-form > .formset,
  .card--form > .panel-form > .formset-add-wrap,
  .card:has(> .panel-form):not(.reports-filter) > .panel-form > .formset-add-wrap,
  .card--form > .panel-form > [class*="formset"],
  .card:has(> .panel-form):not(.reports-filter) > .panel-form > [class*="formset"] {
    grid-column: 1 / -1;
  }
}

/* Custom checkbox / radio */
input[type="checkbox"],
input[type="radio"] {
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
  vertical-align: middle;
  border: 1.5px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
}
input[type="checkbox"] {
  border-radius: 4px;
}
input[type="radio"] {
  border-radius: 9999px;
}
input[type="checkbox"]:hover,
input[type="radio"]:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
}
input[type="checkbox"]:checked,
input[type="radio"]:checked {
  border-color: var(--primary);
  background: var(--primary);
}
input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset-inline-start: 0.3rem;
  top: 0.1rem;
  width: 0.28rem;
  height: 0.55rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background: #fff;
}
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--glow);
  border-color: var(--primary);
}
input[type="checkbox"]:disabled,
input[type="radio"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.field-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
  font-size: 0.9rem;
}
.field-check .field-label {
  margin: 0;
  color: var(--text-primary);
  font-weight: 500;
}
.field-check-group {
  margin-top: var(--space-1);
  margin-bottom: var(--space-3);
}
.field-check-group ul,
.panel-form ul:not(.errorlist) {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.field-check-group li label,
.panel-form ul:not(.errorlist) li label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  cursor: pointer;
  color: var(--text-primary);
}

/* File dropzone */
.file-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  min-height: 8.5rem;
  margin-top: var(--space-1);
  margin-bottom: var(--space-3);
  padding: 1.25rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px dashed var(--border);
  background: var(--bg-muted);
  color: var(--text-muted);
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.file-dropzone:hover,
.file-dropzone.is-dragging {
  border-color: color-mix(in srgb, var(--primary) 50%, var(--border));
  background: color-mix(in srgb, var(--primary) 6%, var(--bg-muted));
}
.file-dropzone:focus-within {
  border-style: solid;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--glow);
}
.file-dropzone.has-file {
  border-style: solid;
  border-color: color-mix(in srgb, var(--success) 45%, var(--border));
  background: color-mix(in srgb, var(--success) 10%, var(--bg-secondary));
  color: var(--success);
}
.file-dropzone__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
  font-size: 1.1rem;
  font-weight: 700;
}
.file-dropzone__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}
.file-dropzone.has-file .file-dropzone__title {
  color: var(--success);
}
.file-dropzone__hint {
  font-size: 0.75rem;
}
.file-dropzone__name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success);
}
.file-dropzone__name.hidden {
  display: none;
}
.file-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  margin: 0;
}

/* Filter / toolbar row — یک baseline مشترک برای جستجو و فیلدها */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}
.filter-bar--panel {
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, #fff 14%, var(--border));
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--primary) 8%, transparent),
      color-mix(in srgb, var(--bg-elevated) 72%, transparent)
    );
  box-shadow:
    var(--shadow-sm),
    inset 0 1px 0 color-mix(in srgb, #fff 14%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  width: 100%;
  box-sizing: border-box;
}
.filter-bar--bulk {
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--primary) 12%, transparent),
      color-mix(in srgb, var(--warning) 6%, transparent)
    );
  border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
}
.filter-bar .filter-field {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  flex: 1 1 0;
  min-width: 9.5rem;
  max-width: none;
}
.filter-bar .filter-field label {
  margin: 0;
  line-height: 1.25;
  min-height: 1.25em;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}
.filter-bar .filter-field input,
.filter-bar .filter-field select,
.filter-bar .filter-field textarea {
  margin: 0 !important;
  width: 100%;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  box-sizing: border-box;
  padding: 0 12px;
  line-height: 1.25;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.875rem;
  vertical-align: middle;
}
.filter-bar .filter-field textarea {
  height: auto;
  min-height: 40px;
  max-height: none;
  padding-block: 8px;
  line-height: 1.45;
}
.filter-bar .filter-field input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
}
.filter-bar .filter-field input[type="search"]::-webkit-search-decoration,
.filter-bar .filter-field input[type="search"]::-webkit-search-cancel-button,
.filter-bar .filter-field input[type="search"]::-webkit-search-results-button,
.filter-bar .filter-field input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
.filter-bar .filter-field select {
  padding-inline-end: 28px;
}
.filter-bar .filter-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  min-height: calc(1.25em + 4px + 40px);
}
.filter-bar .filter-actions .btn,
.filter-bar > .btn {
  margin: 0;
  height: 40px;
  min-height: 40px;
  padding-block: 0;
  box-sizing: border-box;
}

/* ÃÂÃÂ¢ÃÂÃÂÃÂÃÂÃÂÃÂ¢ÃÂÃÂÃÂÃÂ Tables ÃÂÃÂ¢ÃÂÃÂÃÂÃÂÃÂÃÂ¢ÃÂÃÂÃÂÃÂ */
table, .data-table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  text-align: right;
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  padding-block: 0.7rem 0.85rem;
}
.data-table tbody tr { transition: background 0.15s ease; }
.data-table tbody tr:hover {
  background: color-mix(in srgb, var(--primary) 5%, transparent);
}
.data-table tbody tr:last-child td { border-bottom: 0; }

.table-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.table-actions .btn-icon {
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem;
  min-height: 2.25rem;
}
.table-actions form.inline {
  display: inline-flex;
  margin: 0;
}

.messages {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.messages li {
  padding: 0.8rem 1.05rem;
  border-radius: var(--radius-sm);
  margin: 0;
  background: color-mix(in srgb, var(--primary) 12%, var(--bg-elevated));
  border: 1px solid color-mix(in srgb, var(--primary) 25%, var(--border));
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--bg-muted);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.badge-primary {
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
}
.badge-success {
  background: color-mix(in srgb, var(--success) 14%, transparent);
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 30%, var(--border));
}
.badge-warning {
  background: color-mix(in srgb, var(--warning) 14%, transparent);
  color: var(--warning);
  border-color: color-mix(in srgb, var(--warning) 30%, var(--border));
}
.badge-error,
.badge-danger {
  background: color-mix(in srgb, var(--error) 12%, transparent);
  color: var(--error);
  border-color: color-mix(in srgb, var(--error) 28%, var(--border));
}
.badge-muted,
.badge-inactive {
  background: var(--bg-muted);
  color: var(--text-muted);
  border-color: var(--border);
}
.badge-new {
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
}
.badge-active {
  background: var(--success-bg);
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 30%, var(--border));
}
.badge-discount {
  background: color-mix(in srgb, var(--error) 12%, transparent);
  color: var(--error);
  border-color: color-mix(in srgb, var(--error) 28%, var(--border));
}
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--bg-muted);
  color: var(--text-muted);
}
.status-pill--new {
  background: color-mix(in srgb, #2563eb 16%, transparent);
  color: #2563eb;
}
.status-pill--contacted {
  background: color-mix(in srgb, #0ea5e9 16%, transparent);
  color: #0284c7;
}
.status-pill--qualified {
  background: color-mix(in srgb, var(--warning) 18%, transparent);
  color: color-mix(in srgb, var(--warning) 80%, #92400e);
}
.status-pill--won {
  background: color-mix(in srgb, var(--success) 16%, transparent);
  color: var(--success);
}
.status-pill--lost {
  background: color-mix(in srgb, var(--error) 14%, transparent);
  color: var(--error);
}

/* Lead list rows: status gradient */
.lead-row {
  --row-tone: var(--primary);
  background: linear-gradient(
    to left,
    color-mix(in srgb, var(--row-tone) 20%, transparent),
    color-mix(in srgb, var(--row-tone) 7%, transparent) 45%,
    transparent 78%
  );
  box-shadow: inset -3px 0 0 var(--row-tone);
  transition: background 0.15s ease, filter 0.15s ease;
}
[dir="rtl"] .lead-row {
  background: linear-gradient(
    to right,
    color-mix(in srgb, var(--row-tone) 20%, transparent),
    color-mix(in srgb, var(--row-tone) 7%, transparent) 45%,
    transparent 78%
  );
  box-shadow: inset 3px 0 0 var(--row-tone);
}
.lead-row--new { --row-tone: #2563eb; }
.lead-row--contacted { --row-tone: #0ea5e9; }
.lead-row--qualified { --row-tone: #f59e0b; }
.lead-row--won { --row-tone: var(--success); }
.lead-row--lost { --row-tone: var(--error); }
.data-table tbody tr.lead-row:hover {
  background: linear-gradient(
    to left,
    color-mix(in srgb, var(--row-tone) 30%, transparent),
    color-mix(in srgb, var(--row-tone) 12%, transparent) 50%,
    color-mix(in srgb, var(--row-tone) 4%, transparent) 85%
  );
  filter: saturate(1.08);
}
[dir="rtl"] .data-table tbody tr.lead-row:hover {
  background: linear-gradient(
    to right,
    color-mix(in srgb, var(--row-tone) 30%, transparent),
    color-mix(in srgb, var(--row-tone) 12%, transparent) 50%,
    color-mix(in srgb, var(--row-tone) 4%, transparent) 85%
  );
}

/* ÃÂÃÂ¢ÃÂÃÂÃÂÃÂÃÂÃÂ¢ÃÂÃÂÃÂÃÂ Marketing hero ÃÂÃÂ¢ÃÂÃÂÃÂÃÂÃÂÃÂ¢ÃÂÃÂÃÂÃÂ */
.hero {
  padding: clamp(1.75rem, 4vw, 3.25rem) 0 2rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.25rem, 4vw, 2.75rem);
  align-items: center;
}
.hero h1 {
  font-size: clamp(1.85rem, 4.2vw, 2.85rem);
  line-height: 1.2;
  letter-spacing: -0.035em;
  margin: 0.5rem 0 0.85rem;
  max-width: 16ch;
  font-weight: 800;
}
.hero-lead {
  max-width: 36rem;
  font-size: 1.02rem;
  color: var(--text-muted);
  margin: 0;
}
.hero-cta {
  margin-top: 1.35rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.hero-visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--illo-bg);
  aspect-ratio: 16 / 10;
}
.hero-illo {
  display: block;
  width: 100%;
  height: 100%;
}
.feature-bento .feature-main {
  grid-row: 1 / span 2;
  padding: 1.6rem;
  background: var(--bg-elevated);
}

.section {
  padding: 2.5rem 0 1rem;
}
.section-head { margin-bottom: 1.25rem; max-width: 40rem; }

.feature-bento {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  grid-template-rows: auto auto;
  gap: 1rem;
}
.feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 0.85rem;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}

.stats-band {
  margin: 2rem 0;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
.stat-item { text-align: center; }

.pricing-hero {
  padding: 2.5rem 0 0.75rem;
}
.pricing-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}
.pricing-lead {
  max-width: 38rem;
  margin-top: 0.55rem;
}
.pricing-points {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.pricing-points li {
  padding: 0.28rem 0;
  border-bottom: 1px solid var(--border);
}
.pricing-points li:last-child { border-bottom: 0; }

.jalali-date-input,
.jalali-datetime-input {
  direction: ltr;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

/* jdp overlay slightly aligned with panel tokens */
.jdp-container {
  font-family: var(--font) !important;
}
.pricing-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 100%;
}
.pricing-card.is-featured {
  border-color: color-mix(in srgb, var(--primary) 50%, var(--border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 20%, transparent), var(--shadow);
}
.pricing-card .btn { margin-top: auto; width: 100%; }

.faq { display: grid; gap: 0.65rem; }
.faq details {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-sm);
}
.faq summary {
  cursor: pointer;
  font-weight: 650;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1;
}
.faq details[open] summary::after { content: "ÃÂÃÂ¢ÃÂÃÂÃÂÃÂ"; }
.faq details p {
  margin: 0.65rem 0 0;
  color: var(--text-muted);
}

.cta-band {
  margin: 2.5rem 0 1rem;
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.cta-band h2 { margin: 0 0 0.35rem; font-size: 1.35rem; }

/* ——— Footer (mockup: 4-col + social, no language) ——— */
.site-footer {
  margin-top: 0;
  background: #050b1a;
  color: #e5e7eb;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.footer-inner {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
  padding: 3rem 0 1.35rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(2, minmax(0, 1fr));
  gap: 2rem 2.5rem;
  align-items: start;
}
.footer-brand .brand-lockup {
  color: #fff;
  margin-bottom: 0.85rem;
}
.footer-brand .brand-mark {
  background: #2563eb;
  color: #fff;
  border-radius: 10px;
}
.footer-brand p {
  margin: 0;
  color: #94a3b8;
  max-width: 18rem;
  font-size: 0.92rem;
  line-height: 1.7;
}
.footer-col h4 {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}
.footer-col a:not(.footer-social-link) {
  display: block;
  color: #94a3b8;
  padding: 0.3rem 0;
  font-size: 0.9rem;
}
.footer-col a:not(.footer-social-link):hover { color: #fff; text-decoration: none; }
.footer-social {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 0.35rem;
}
.footer-col .footer-social-link {
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  max-width: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  padding: 0;
  margin: 0;
  line-height: 0;
  flex: 0 0 40px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.footer-col .footer-social-link svg {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin: 0;
}
.footer-col .footer-social-link:hover {
  color: #fff;
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(37, 99, 235, 0.45);
  text-decoration: none;
}
.footer-bottom {
  margin-top: 2.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
  align-items: center;
  color: #64748b;
  font-size: 0.85rem;
}
.footer-powered {
  color: #2563eb;
  font-weight: 700;
}

.auth-card {
  max-width: 440px;
  margin: 2.5rem auto;
  padding: 1.6rem;
}
.auth-brand {
  display: flex;
  justify-content: center;
  margin: 0 0 1.15rem;
}
.auth-brand img {
  display: block;
  width: min(11rem, 70%);
  height: auto;
}

/* ÃÂÃÂ¢ÃÂÃÂÃÂÃÂÃÂÃÂ¢ÃÂÃÂÃÂÃÂ Error pages ÃÂÃÂ¢ÃÂÃÂÃÂÃÂÃÂÃÂ¢ÃÂÃÂÃÂÃÂ */
.error-panel {
  max-width: 560px;
  margin: 3rem auto;
  text-align: center;
  padding: 2rem 1.25rem;
}
.error-code {
  font-size: clamp(3.5rem, 10vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  color: color-mix(in srgb, var(--primary) 70%, var(--text-primary));
  margin: 0 0 0.5rem;
}
.error-panel h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}
.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 1.35rem;
}

/* ÃÂÃÂ¢ÃÂÃÂÃÂÃÂÃÂÃÂ¢ÃÂÃÂÃÂÃÂ Panel shell ÃÂÃÂ¢ÃÂÃÂÃÂÃÂÃÂÃÂ¢ÃÂÃÂÃÂÃÂ */
.shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100dvh;
  background: var(--bg-primary);
  background-image: none;
  transition: grid-template-columns 0.2s ease;
}
@media (min-width: 1024px) {
  html.sidebar-collapsed-pending .shell,
  .shell.sidebar-collapsed {
    grid-template-columns: 76px minmax(0, 1fr);
  }
  html.sidebar-collapsed-pending .sidebar,
  .shell.sidebar-collapsed .sidebar {
    padding-inline: 8px;
    align-items: center;
  }
  html.sidebar-collapsed-pending .sidebar-brand,
  .shell.sidebar-collapsed .sidebar-brand {
    justify-content: center;
    padding-inline: 0;
  }
  html.sidebar-collapsed-pending .sidebar-brand-text,
  html.sidebar-collapsed-pending .sidebar-org-switch,
  html.sidebar-collapsed-pending .sidebar-collapse-btn,
  html.sidebar-collapsed-pending .sidebar-group-toggle,
  html.sidebar-collapsed-pending .sidebar-pack-label,
  html.sidebar-collapsed-pending .sidebar-status,
  html.sidebar-collapsed-pending .sidebar-footer-sep,
  .shell.sidebar-collapsed .sidebar-brand-text,
  .shell.sidebar-collapsed .sidebar-org-switch,
  .shell.sidebar-collapsed .sidebar-collapse-btn,
  .shell.sidebar-collapsed .sidebar-group-toggle,
  .shell.sidebar-collapsed .sidebar-pack-label,
  .shell.sidebar-collapsed .sidebar-status,
  .shell.sidebar-collapsed .sidebar-footer-sep {
    display: none !important;
  }
  html.sidebar-collapsed-pending .sidebar-group-body,
  .shell.sidebar-collapsed .sidebar-group-body {
    display: flex !important;
    flex-direction: column;
    gap: 4px;
  }
  html.sidebar-collapsed-pending .sidebar-link,
  html.sidebar-collapsed-pending .sidebar-logout,
  .shell.sidebar-collapsed .sidebar-link,
  .shell.sidebar-collapsed .sidebar-logout {
    justify-content: center;
    padding: 0.7rem;
    font-size: 0;
    line-height: 0;
    gap: 0;
  }
  html.sidebar-collapsed-pending .sidebar-link .icon,
  html.sidebar-collapsed-pending .sidebar-logout .icon,
  .shell.sidebar-collapsed .sidebar-link .icon,
  .shell.sidebar-collapsed .sidebar-logout .icon {
    width: 20px;
    height: 20px;
    margin: 0;
  }
  html.sidebar-collapsed-pending .sidebar-link-nested,
  .shell.sidebar-collapsed .sidebar-link-nested {
    display: none !important;
  }
  html.sidebar-collapsed-pending .sidebar-link.sidebar-pack-home,
  .shell.sidebar-collapsed .sidebar-link.sidebar-pack-home {
    display: flex !important;
  }
  html.sidebar-collapsed-pending .sidebar-pack-icon,
  .shell.sidebar-collapsed .sidebar-pack-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 0.8rem;
    line-height: 1;
    font-weight: 700;
    background: color-mix(in srgb, var(--primary) 28%, transparent);
    color: #fff;
  }
  html.sidebar-collapsed-pending .sidebar-pack-home-label,
  .shell.sidebar-collapsed .sidebar-pack-home-label {
    display: none;
  }
  html.sidebar-collapsed-pending .sidebar-pack,
  .shell.sidebar-collapsed .sidebar-pack {
    border: 0;
    padding: 0;
    margin: 0;
  }
}
.sidebar {
  background: var(--sidebar);
  color: var(--sidebar-text);
  padding: 16px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-left: 1px solid color-mix(in srgb, #fff 8%, transparent);
}
.sidebar-brand {
  font-weight: 800;
  font-size: 1.05rem;
  padding: 4px 8px 12px;
  color: #fff;
  letter-spacing: -0.02em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  position: relative;
}
.sidebar-logo {
  display: inline-flex;
  width: 32px;
  height: 32px;
  color: var(--primary-light);
  flex-shrink: 0;
}
.sidebar-logo svg,
.sidebar-logo img {
  width: 32px;
  height: 32px;
  display: block;
  object-fit: contain;
}
.sidebar-brand-text {
  min-width: 0;
  flex: 1;
}
.sidebar-brand-name {
  font-weight: 800;
  font-size: 1.125rem;
  line-height: 1.2;
}
.sidebar-org {
  font-size: 0.8rem;
  color: var(--sidebar-muted);
  font-weight: 500;
  margin-top: 2px;
}
.sidebar-org-switch {
  flex: 1 1 100%;
  margin-top: 8px;
}
.sidebar-close {
  display: none;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  margin-inline-start: auto;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, #fff 14%, transparent);
  background: transparent;
  color: var(--sidebar-text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.sidebar-close:hover {
  background: var(--sidebar-hover);
  color: #fff;
}
.sidebar-collapse-btn {
  display: none;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  margin-inline-start: auto;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, #fff 14%, transparent);
  background: transparent;
  color: var(--sidebar-text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}
.sidebar-collapse-btn:hover {
  background: var(--sidebar-hover);
  color: #fff;
}
.panel-sidebar-expand {
  display: none;
}
@media (min-width: 1024px) {
  .sidebar-collapse-btn {
    display: inline-flex;
  }
  .shell.sidebar-collapsed .panel-sidebar-expand {
    display: inline-flex;
  }
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  overflow-y: auto;
  padding: 4px 0 8px;
}
.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--sidebar-muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  cursor: pointer;
  text-align: inherit;
}
.sidebar-group-toggle:hover {
  color: #fff;
  background: var(--sidebar-hover);
}
.sidebar-group-chevron {
  transition: transform 0.15s ease;
  flex-shrink: 0;
  opacity: 0.8;
}
.sidebar-group.is-collapsed .sidebar-group-chevron {
  transform: rotate(90deg);
}
.sidebar-group.is-collapsed .sidebar-group-body {
  display: none;
}
.sidebar-group-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-pack {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid color-mix(in srgb, #fff 10%, transparent);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-pack:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.sidebar-pack-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: color-mix(in srgb, #fff 55%, transparent);
  padding: 4px 12px;
}
.sidebar-link.sidebar-pack-home {
  display: none !important;
}
.sidebar-pack-icon {
  display: none;
}
.sidebar-pack-home-label {
  display: none;
}
.sidebar-link-nested {
  padding-inline-start: 20px;
  font-size: 0.9rem;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.15s ease, color 0.15s ease;
  position: relative;
  box-sizing: border-box;
}
.sidebar-link .icon {
  width: 20px;
  height: 20px;
  stroke-width: var(--icon-stroke);
}
.sidebar-link:hover {
  background: var(--sidebar-hover);
  text-decoration: none;
  color: #fff;
}
.sidebar-link.is-active {
  background: var(--sidebar-active);
  color: #fff;
}
.sidebar-link.is-active::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--primary);
}
.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, #fff 10%, transparent);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-footer-sep {
  height: 1px;
  background: color-mix(in srgb, #fff 10%, transparent);
  margin-inline: 8px;
}
.sidebar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--sidebar-muted);
  padding: 0 12px;
}
.sidebar-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 25%, transparent);
}
.sidebar-version {
  margin-inline-start: auto;
  opacity: 0.8;
}
.sidebar-logout {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: inherit;
  font: inherit;
  color: inherit;
}

.panel-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-primary);
}
.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 56px;
}
.topbar-start {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  justify-self: start;
}
.topbar-search-slot {
  justify-self: stretch;
  display: flex;
  align-items: center;
  min-width: 0;
  position: relative;
}
.topbar-search-toggle {
  display: none;
  flex-shrink: 0;
}
.topbar-search {
  position: relative;
  width: 100%;
  max-width: 32rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
  height: 40px;
  padding-inline: 12px;
  border: 1px solid var(--border);
  background: var(--bg-muted);
  border-radius: var(--radius-sm);
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.topbar-search:focus-within {
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 2px var(--bg-elevated), 0 0 0 4px var(--focus-ring);
  background: var(--bg-elevated);
  outline: none;
}
.topbar-search-affix {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  pointer-events: none;
}
.topbar-search-affix svg {
  display: block;
  width: 20px;
  height: 20px;
  overflow: visible;
  stroke-width: var(--icon-stroke);
}
.topbar-search input[type="search"],
.topbar-search input {
  grid-column: 2;
  width: 100% !important;
  min-width: 0;
  height: 24px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--text-primary);
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.5;
  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
}
.topbar-search input:focus {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  outline: none !important;
}
.topbar-search input::placeholder {
  color: var(--text-muted);
  opacity: 0.9;
}
.topbar-search input::-webkit-search-decoration,
.topbar-search input::-webkit-search-cancel-button,
.topbar-search input::-webkit-search-results-button,
.topbar-search input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.topbar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  justify-self: end;
}
.topbar .btn-icon,
.topbar-actions .btn-icon {
  width: var(--topbar-action-size);
  height: var(--topbar-action-size);
  min-width: var(--topbar-action-size);
  min-height: var(--topbar-action-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
}
.topbar .panel-burger {
  display: none;
}
.topbar .btn-icon:focus-visible,
.topbar-actions .btn-icon:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
.topbar .btn-icon svg,
.topbar-actions .btn-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
  stroke-width: var(--icon-stroke);
}
.topbar-actions .theme-toggle-icon {
  color: var(--text-primary);
}
.topbar-actions .theme-toggle-icon path[fill] {
  /* نیم‌دایره پر — تنها fill مجاز برای آیکون تم */
  fill: currentColor;
}
.topbar-notify {
  position: relative;
}
.topbar-badge {
  position: absolute;
  top: 4px;
  inset-inline-end: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--error);
  color: #fff;
  border: 2px solid var(--bg-elevated);
  font-size: 0.65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-sizing: border-box;
}
.topbar-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: 0;
  padding-inline-start: 8px;
  border-inline-start: 1px solid var(--border);
  min-height: var(--topbar-action-size);
}
.topbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 22%, var(--bg-muted));
  color: var(--primary);
  font-weight: 700;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  flex-shrink: 0;
}
.topbar-profile-text {
  display: none;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}
.topbar-profile-name {
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 10rem;
}
.topbar-profile-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}
@media (min-width: 1024px) {
  .topbar-profile-text {
    display: flex;
  }
}
@media (max-width: 1023px) {
  .topbar-search-toggle {
    display: inline-flex;
  }
  .topbar-search {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: 50%;
    transform: translateY(-50%);
    max-width: none;
    margin: 0;
    z-index: 5;
    background: var(--bg-elevated);
  }
  .topbar-search.is-open {
    display: grid;
  }
  .topbar-search-slot.is-search-open .topbar-search-toggle {
    visibility: hidden;
    pointer-events: none;
  }
}
.main {
  padding: var(--space-5) var(--space-5) var(--space-6);
  width: 100%;
  min-width: 0;
  max-width: none;
}

.panel-content {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.panel-content--wide {
  max-width: none;
}
/* One vertical rhythm: gap owns spacing; kill stray margins (incl. inline). */
.panel-content > * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.panel-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  width: 100%;
  min-width: 0;
}
.panel-stack--split {
  display: grid;
  grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
}
@media (max-width: 900px) {
  .panel-stack--split {
    grid-template-columns: 1fr;
  }
}

.card--narrow {
  /* Full width of the main panel; no side-biased leftover gap. */
  max-width: none;
  width: 100%;
}

.section-title--spaced {
  margin-top: var(--space-4) !important;
}

.stack-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.stack-list > li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.stack-list > li:last-child { border-bottom: 0; }
.stack-list > li.is-unread strong {
  font-weight: 800;
}
.stack-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.inline-form {
  display: inline-flex;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.btn-sm {
  padding: 0.28rem 0.65rem;
  font-size: 0.82rem;
  min-height: 2rem;
}

.table-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.detail-body {
  margin-top: var(--space-3);
  white-space: pre-wrap;
  line-height: 1.7;
}

.card > .section-title {
  font-size: 1.05rem;
}

.dash-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
}

@media (min-width: 1100px) {
  .dash-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: start;
  }
  .dash-layout .dash-primary {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
  }
  .dash-layout .dash-activity {
    min-height: 100%;
  }
}

.dash-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.grid-kpi {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}
.grid-kpi--4 > .kpi-card {
  grid-column: span 12;
}

@media (min-width: 768px) {
  .grid-kpi--4 > .kpi-card {
    grid-column: span 6;
  }
}

@media (min-width: 1024px) {
  .grid-kpi--4 > .kpi-card {
    grid-column: span 3;
  }
}

.kpi-card--rich .stat {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.stat-unit {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}
.kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  width: fit-content;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}
.kpi-trend svg {
  flex-shrink: 0;
}
.kpi-trend.is-up {
  color: var(--success);
  background: color-mix(in srgb, var(--success) 12%, transparent);
}
.kpi-trend.is-down {
  color: var(--error);
  background: color-mix(in srgb, var(--error) 12%, transparent);
}
.kpi-icon--green {
  background: color-mix(in srgb, var(--success) 14%, transparent) !important;
  color: var(--success) !important;
}
.kpi-icon--blue {
  background: color-mix(in srgb, var(--primary) 14%, transparent) !important;
  color: var(--primary) !important;
}
.kpi-icon--orange {
  background: color-mix(in srgb, var(--warning) 14%, transparent) !important;
  color: var(--warning) !important;
}
.kpi-icon--purple {
  background: color-mix(in srgb, #7c3aed 14%, transparent) !important;
  color: #7c3aed !important;
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.card-head .section-title {
  margin: 0;
  font-size: 1.05rem;
}
.dash-subhead {
  margin: 16px 0 8px;
  font-size: 0.92rem;
}

.dash-charts {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.dash-chart-card {
  grid-column: span 12;
  box-shadow: var(--shadow-sm);
}
.dash-donut-card {
  grid-column: span 12;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 1024px) {
  .dash-chart-card { grid-column: span 7; }
  .dash-donut-card { grid-column: span 5; }
}
.chart-wrap {
  position: relative;
  height: var(--chart-height, 240px);
}
.chart-wrap.is-hidden,
.is-hidden {
  display: none !important;
}
.donut-layout {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-height: var(--chart-height, 240px);
}
.donut-chart-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  flex-shrink: 0;
}
.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  line-height: 1.2;
}
.donut-center strong {
  font-size: 1.55rem;
  font-weight: 800;
}
.donut-center span {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.donut-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 9rem;
}
.donut-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
}
.donut-legend strong {
  margin-inline-start: auto;
}
.donut-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

.reports-filter {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--primary) 8%, var(--bg-elevated)),
      var(--bg-elevated) 42%
    );
  box-shadow: var(--shadow-sm);
}
.reports-filter__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 12px;
}
.reports-filter__head .section-title {
  margin: 0;
  color: var(--primary);
}
.reports-filter__form .field-stack input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
.reports-filter__form .field-stack select {
  border-color: color-mix(in srgb, var(--primary) 22%, var(--border));
  background: color-mix(in srgb, var(--primary) 4%, var(--bg-elevated));
}
.reports-filter__form .field-stack input:focus,
.reports-filter__form .field-stack select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}

.kpi-tone {
  position: relative;
  border-color: color-mix(in srgb, var(--kpi-tone, var(--primary)) 28%, var(--border));
  background:
    linear-gradient(
      160deg,
      color-mix(in srgb, var(--kpi-tone, var(--primary)) 12%, var(--bg-elevated)),
      var(--bg-elevated) 55%
    );
}
.kpi-tone::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 4px;
  background: var(--kpi-tone, var(--primary));
  border-radius: var(--radius) 0 0 var(--radius);
}
.kpi-tone .stat {
  color: var(--kpi-tone, var(--primary));
}
.kpi-tone .muted {
  color: color-mix(in srgb, var(--kpi-tone, var(--primary)) 45%, var(--text-muted));
}
.kpi-tone:hover {
  border-color: color-mix(in srgb, var(--kpi-tone, var(--primary)) 45%, var(--border));
}
.kpi-tone--leads { --kpi-tone: #2563eb; }
.kpi-tone--customers { --kpi-tone: #0d9488; }
.kpi-tone--deals { --kpi-tone: #7c3aed; }
.kpi-tone--won { --kpi-tone: var(--success); }
.kpi-tone--amount { --kpi-tone: #d97706; }
.kpi-tone--amount .stat.money {
  color: var(--kpi-tone);
}

.reports-charts {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  margin-top: 16px;
}
.reports-chart-card {
  grid-column: span 12;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  border-top: 3px solid color-mix(in srgb, var(--chart-accent, var(--primary)) 80%, var(--border));
}
.reports-chart-card--wide,
.reports-chart-card--full {
  grid-column: span 12;
}
.reports-chart-card--accent-leads { --chart-accent: #2563eb; }
.reports-chart-card--accent-deals { --chart-accent: #7c3aed; }
.reports-chart-card--accent-owner { --chart-accent: #0284c7; }
.reports-chart-card--accent-source { --chart-accent: #ea580c; }
.reports-chart-card--accent-customers { --chart-accent: #0d9488; }
.reports-chart-card--accent-amount { --chart-accent: #d97706; }
.reports-donut {
  width: min(200px, 42vw);
  height: min(200px, 42vw);
  max-width: 200px;
  max-height: 200px;
}
.reports-donut canvas {
  width: 100% !important;
  height: 100% !important;
}
.reports-top-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  min-width: 0;
}
.reports-top-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 768px) {
  .reports-chart-card {
    grid-column: span 6;
  }
  .reports-chart-card--wide,
  .reports-chart-card--full {
    grid-column: span 12;
  }
}
@media (min-width: 1024px) {
  .reports-top-split {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: start;
  }
  .reports-chart-card--wide {
    grid-column: span 12;
  }
}

.dash-mid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.dash-activity-feed {
  grid-column: span 12;
  box-shadow: var(--shadow-sm);
}
.dash-mid-col {
  grid-column: span 12;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.dash-mid-col > .card {
  box-shadow: var(--shadow-sm);
}
@media (min-width: 1024px) {
  .dash-activity-feed { grid-column: span 5; }
  .dash-mid-col { grid-column: span 7; }
}

.activity-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.activity-timeline::before {
  content: "";
  position: absolute;
  inset-inline-start: 5px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--border);
}
.activity-timeline li {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 12px;
  align-items: start;
  padding: 0 0 16px;
  position: relative;
}
.activity-timeline li:last-child { padding-bottom: 0; }
.activity-timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-elevated);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 40%, transparent);
  margin-top: 4px;
  z-index: 1;
}
.activity-timeline li:nth-child(3n+2) .activity-timeline-dot {
  background: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent);
}
.activity-timeline li:nth-child(3n+3) .activity-timeline-dot {
  background: var(--warning);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--warning) 40%, transparent);
}
.activity-timeline-body {
  min-width: 0;
}
.activity-timeline .activity-time {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
}
.activity-feed-title {
  font-weight: 700;
  font-size: 0.9rem;
}

.activity-board {
  display: grid;
  grid-template-columns: minmax(0, 18.5rem) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.activity-people {
  position: sticky;
  top: 4.5rem;
  max-height: calc(100vh - 6rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.activity-people > .card-head {
  padding: 14px 16px 8px;
}
.activity-people-search {
  padding: 0 12px 10px;
}
.activity-people-search input {
  margin: 0;
  height: 38px;
  min-height: 38px;
}
.activity-people-list {
  list-style: none;
  margin: 0;
  padding: 0 8px 12px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.activity-person {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  margin: 0 8px 6px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.activity-people-list .activity-person {
  margin: 0 0 6px;
}
.activity-person:hover {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  text-decoration: none;
}
.activity-person.is-active {
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
  box-shadow: inset 3px 0 0 var(--primary);
}
.activity-person__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.activity-person__main strong {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.activity-person__counts {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.activity-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.activity-person-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--primary) 10%, var(--bg-elevated)),
      var(--bg-elevated)
    );
  border-color: color-mix(in srgb, var(--primary) 22%, var(--border));
}
.activity-row--open {
  background: linear-gradient(
    to left,
    color-mix(in srgb, var(--warning) 12%, transparent),
    transparent 70%
  );
}
[dir="rtl"] .activity-row--open {
  background: linear-gradient(
    to right,
    color-mix(in srgb, var(--warning) 12%, transparent),
    transparent 70%
  );
}
.activity-row--done {
  opacity: 0.82;
}
.status-pill--activity-call {
  background: color-mix(in srgb, #2563eb 16%, transparent);
  color: #2563eb;
}
.status-pill--activity-note {
  background: color-mix(in srgb, #64748b 16%, transparent);
  color: #475569;
}
.status-pill--activity-followup {
  background: color-mix(in srgb, var(--warning) 18%, transparent);
  color: #b45309;
}
.status-pill--activity-comment {
  background: color-mix(in srgb, #8b5cf6 16%, transparent);
  color: #7c3aed;
}
.btn-ghost.is-active {
  background: color-mix(in srgb, var(--primary) 16%, transparent);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
  color: var(--primary);
}
@media (max-width: 960px) {
  .activity-board {
    grid-template-columns: 1fr;
  }
  .activity-people {
    position: static;
    max-height: none;
  }
  .activity-people-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
  }
  .activity-people-list li {
    flex: 0 0 auto;
  }
  .activity-people-list .activity-person {
    min-width: 11rem;
    margin-bottom: 0;
  }
}

.avatar-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  font-weight: 600;
}
.avatar-chip {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: #64748b;
  flex-shrink: 0;
}
.avatar-chip[data-i="0"] { background: #0ea5e9; }
.avatar-chip[data-i="1"] { background: #2563eb; }
.avatar-chip[data-i="2"] { background: #d97706; }
.avatar-chip[data-i="3"] { background: #7c3aed; }
.avatar-chip[data-i="4"] { background: #db2777; }
.avatar-chip[data-i="5"] { background: #0891b2; }

.deal-feed {
  list-style: none;
  margin: 0;
  padding: 0;
}
.deal-feed li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.deal-feed li:last-child { border-bottom: 0; }
.deal-feed-title {
  font-weight: 700;
  color: var(--text-primary);
}
.deal-feed-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: end;
}
.badge-stage {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
}
.badge-priority-high {
  background: color-mix(in srgb, var(--error) 14%, transparent);
  color: var(--error);
  border-color: color-mix(in srgb, var(--error) 30%, var(--border));
}
.badge-priority-medium {
  background: color-mix(in srgb, var(--warning) 14%, transparent);
  color: var(--warning);
  border-color: color-mix(in srgb, var(--warning) 30%, var(--border));
}
.badge-priority-low {
  background: color-mix(in srgb, #3b82f6 14%, transparent);
  color: #3b82f6;
  border-color: color-mix(in srgb, #3b82f6 30%, var(--border));
}
.badge-status-open {
  background: color-mix(in srgb, var(--success) 14%, transparent);
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 30%, var(--border));
}
.badge-status-in_review {
  background: color-mix(in srgb, #3b82f6 14%, transparent);
  color: #3b82f6;
  border-color: color-mix(in srgb, #3b82f6 30%, var(--border));
}
.badge-status-closed {
  background: var(--bg-muted);
  color: var(--text-muted);
}
.badge-status-won {
  background: color-mix(in srgb, var(--success) 14%, transparent);
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 30%, var(--border));
}
.badge-status-lost {
  background: color-mix(in srgb, var(--error) 14%, transparent);
  color: var(--error);
  border-color: color-mix(in srgb, var(--error) 30%, var(--border));
}

.dash-bottom {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.dash-bottom > .card {
  grid-column: span 12;
  box-shadow: var(--shadow-sm);
}
.dash-aside {
  grid-column: span 12;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (min-width: 1024px) {
  .dash-bottom > .card { grid-column: span 8; }
  .dash-aside { grid-column: span 4; }
}
.dash-quick {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.dash-quick .section-title {
  margin: 0 0 12px;
}
.plan-strip--stack {
  flex-direction: column;
  align-items: stretch;
  box-shadow: var(--shadow-sm);
}
.quick-actions--stack {
  flex-direction: column;
}
.quick-actions--stack .btn {
  width: 100%;
  justify-content: center;
}
.data-table--compact th,
.data-table--compact td {
  padding: 10px 12px;
  font-size: 0.875rem;
}
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 320px;
}
.table-wrap--sticky thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-elevated);
  box-shadow: 0 1px 0 var(--border);
}
.search-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 1023px) {
  .search-results {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 8px;
    padding-inline: 12px;
  }
  .deal-feed-meta { align-items: flex-start; text-align: start; }
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  flex-wrap: wrap;
  margin: 0;
  padding-bottom: 0;
  min-height: 2.75rem;
}
.page-header .page-sub {
  margin: var(--space-1) 0 0;
  color: var(--text-muted);
  line-height: 1.5;
  font-size: 0.92rem;
}
.page-header .page-title {
  line-height: 1.25;
}
.page-header .detail-actions {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.plan-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) 0.85rem;
  padding: var(--space-3) 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  margin: 0;
}
.quick-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin: 0;
}

.activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.activity-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.9rem 0.2rem;
  border-bottom: 1px solid var(--border);
}
.activity-list li:last-child { border-bottom: 0; }
.activity-list li:hover {
  background: color-mix(in srgb, var(--primary) 5%, transparent);
}
.activity-type {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
}
.activity-time {
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.empty-state {
  text-align: center;
  padding: var(--space-5) var(--space-3);
  color: var(--text-muted);
}
.empty-state--inline {
  text-align: start;
  padding: 24px 8px;
}
.empty-state--inline p {
  margin: 0;
  line-height: 1.6;
}
.empty-state .icon {
  width: 2rem;
  height: 2rem;
  margin: 0 auto var(--space-3);
  opacity: 0.7;
}
.empty-state p {
  margin: 0 0 var(--space-3);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-2) 0 0;
}
.detail-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin: 0;
}
.meta-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4) 1.25rem;
  margin: 0;
  box-shadow: var(--shadow-sm);
}
.stack-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.stack-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.stack-list li:last-child { border-bottom: 0; }

.card > .page-header {
  margin-bottom: var(--space-3);
  padding-bottom: 0;
}

[data-theme="light"] .icon-when-dark { display: none !important; }
[data-theme="dark"] .icon-when-light { display: none !important; }
html:not([data-theme]) .icon-when-light { display: none !important; }

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-scroll .data-table,
.table-scroll table,
.card .data-table,
.card table {
  min-width: 480px;
}

.nav-burger,
.panel-burger,
.sidebar-backdrop {
  display: none;
}

@media (prefers-reduced-transparency: reduce) {
  .topbar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--bg-elevated);
  }
  .btn-ghost,
  .btn-secondary,
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
  select,
  textarea,
  .card--form,
  .card:has(> .panel-form):not(.reports-filter):not(.reports-chart-card),
  .card:has(> form.panel-form):not(.reports-filter):not(.reports-chart-card),
  .filter-bar--panel {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .btn-ghost {
    background: var(--bg-muted);
    border-color: var(--border);
    box-shadow: none;
  }
  .btn-secondary {
    background: color-mix(in srgb, var(--primary) 10%, var(--bg-elevated));
    box-shadow: none;
  }
  .card--form,
  .card:has(> .panel-form):not(.reports-filter):not(.reports-chart-card),
  .card:has(> form.panel-form):not(.reports-filter):not(.reports-chart-card),
  .filter-bar--panel {
    background: var(--bg-elevated);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .sidebar {
    transition: none !important;
  }
  .btn:active { transform: none; }
}

/* Tablet / panel drawer */
@media (max-width: 1023px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
  .hero-visual { order: -1; max-width: 560px; margin-inline: auto; width: 100%; }
  .feature-bento {
    grid-template-columns: 1fr;
  }
  .feature-bento .feature-main { grid-row: auto; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(280px, 86vw);
    z-index: 50;
    transform: translateX(105%);
    transition: transform 0.22s ease;
    border-left: 0;
    box-shadow: var(--shadow);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.55);
    z-index: 45;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  body.nav-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .panel-burger { display: inline-flex; }
  .topbar .panel-burger { display: inline-flex; }
  .sidebar-close { display: inline-flex; }
  .topbar, .main { padding-inline: 1rem; }
  .topbar-meta .badge:nth-child(n+3) { display: none; }
  .activity-list li { grid-template-columns: 1fr; gap: 0.35rem; }
  .auth-card {
    margin: 1.25rem auto;
    max-width: none;
    width: 100%;
  }
}

/* Public mobile nav extras < 768 */
@media (max-width: 767px) {
  .public-nav {
    padding: calc(0.75rem + env(safe-area-inset-top, 0px)) 0.75rem 0;
  }
  .hero-cta .btn,
  .hero-cta .btn-ghost {
    width: 100%;
    justify-content: center;
  }
  .cta-band { text-align: center; justify-content: center; }
  .cta-band .btn { width: 100%; }
  .page-header .btn { width: 100%; justify-content: center; }
  .quick-actions .btn,
  .quick-actions .btn-ghost {
    flex: 1 1 100%;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .container,
  .footer-inner {
    width: calc(100% - 1.5rem);
  }
  .footer-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .stats-band { padding: 1.1rem; }
  .stat { font-size: 1.45rem; }
  .main { padding: var(--space-3) 0.85rem var(--space-5); }
  .topbar-actions .muted { display: none; }
  .detail-actions .btn,
  .detail-actions .btn-ghost,
  .detail-actions form { width: 100%; }
  .detail-actions form .btn { width: 100%; }
}

@media (max-width: 400px) {
  .topbar-meta .badge { font-size: 0.72rem; padding: 0.2rem 0.5rem; }
  .brand-lockup span { font-size: 0.95rem; }
}

/* ÃÂÃÂÃÂÃÂ Toast stack (fixed; never shifts layout) ÃÂÃÂÃÂÃÂ */
.toast-stack {
  position: fixed;
  z-index: 10050;
  top: max(1rem, env(safe-area-inset-top));
  inset-inline-end: max(1rem, env(safe-area-inset-right));
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: min(22rem, calc(100vw - 2rem));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 4px 1fr auto;
  align-items: stretch;
  gap: 0;
  border-radius: 14px;
  overflow: hidden;
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px color-mix(in srgb, #000 28%, transparent), var(--shadow-sm);
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(-0.6rem) scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.toast.is-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.toast.is-leaving {
  opacity: 0;
  transform: translateY(-0.4rem) scale(0.98);
}
.toast__accent { background: var(--primary); }
.toast--success .toast__accent { background: var(--success); }
.toast--error .toast__accent { background: var(--error); }
.toast--warning .toast__accent { background: var(--warning, #f59e0b); }
.toast--info .toast__accent { background: var(--accent, var(--primary)); }
.toast__body {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.85rem 0.75rem 0.85rem 0.9rem;
  min-width: 0;
}
.toast__icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  margin-top: 0.1rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.toast--success { color: var(--success); }
.toast--error { color: var(--error); }
.toast--warning { color: var(--warning, #f59e0b); }
.toast--info { color: var(--accent, var(--primary)); }
.toast__text {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-primary);
  word-break: break-word;
}
.toast__close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  width: 2.4rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.toast__close:hover { color: var(--text-primary); background: color-mix(in srgb, var(--text-muted) 12%, transparent); }
.toast__close svg {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.field-help {
  display: block;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}
.field-error {
  display: block;
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.file-dropzone--image {
  min-height: 10rem;
}
.file-dropzone__preview {
  max-width: 7rem;
  max-height: 5rem;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.file-dropzone__preview.hidden { display: none; }
.file-dropzone__icon svg {
  display: block;
}

@media (max-width: 640px) {
  .toast-stack {
    inset-inline: 0.75rem;
    width: auto;
    top: max(0.75rem, env(safe-area-inset-top));
  }
}

/* ========== Landing page (mockup-faithful) ========== */
.lp-page .site-main { overflow-x: clip; }
.lp-page .site-footer { margin-top: 0; }

.lp-hero {
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(37, 99, 235, 0.35), transparent 55%),
    linear-gradient(180deg, #050b1a 0%, #0f1a33 45%, #0a1020 100%);
  color: #e5e7eb;
  padding: 3.25rem 0 2.5rem;
  position: relative;
}
.lp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.lp-eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #93c5fd;
  letter-spacing: 0.02em;
}
.lp-hero-copy h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.9rem, 4.2vw, 2.85rem);
  line-height: 1.25;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: #fff;
  max-width: 18ch;
  text-wrap: balance;
}
.lp-hero-lead {
  margin: 0;
  max-width: 34rem;
  font-size: 1.05rem;
  line-height: 1.75;
  color: #94a3b8;
}
.lp-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}
.lp-btn-primary {
  background: #2563eb;
  color: #fff;
  border-radius: 10px;
  min-height: 48px;
  padding-inline: 1.25rem;
  gap: 0.45rem;
}
.lp-btn-primary:hover { background: #1d4ed8; text-decoration: none; }
.lp-btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  border-radius: 10px;
  min-height: 48px;
  padding-inline: 1.15rem;
  gap: 0.45rem;
}
.lp-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}
.lp-btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 10px;
  min-height: 48px;
  padding-inline: 1.15rem;
}
.lp-btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}
.lp-section .lp-btn-primary { color: #fff; }

.lp-hero-visual {
  position: relative;
  min-height: 280px;
}
.lp-device-desktop {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.lp-device-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: #0b1220;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.lp-device-chrome span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #334155;
}
.lp-device-chrome span:first-child { background: #f87171; }
.lp-device-chrome span:nth-child(2) { background: #fbbf24; }
.lp-device-chrome span:nth-child(3) { background: #34d399; }
.lp-mock-title {
  margin-inline-start: auto;
  font-size: 0.72rem;
  font-style: normal;
  color: #94a3b8;
  font-family: var(--font-mono);
}
.lp-device-screen {
  padding: 12px;
  background: #0f172a;
}
.lp-mock-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.lp-mock-search {
  flex: 1;
  min-height: 28px;
  border-radius: 8px;
  background: #1e293b;
  color: #64748b;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  padding-inline: 10px;
}
.lp-mock-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2563eb;
  flex-shrink: 0;
}
.lp-mock-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.lp-mock-kpi {
  background: #1e293b;
  border-radius: 10px;
  padding: 10px;
  min-height: 56px;
}
.lp-mock-kpi-label {
  display: block;
  font-size: 0.65rem;
  color: #94a3b8;
  margin-bottom: 6px;
}
.lp-mock-kpi-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: #e2e8f0;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}
.lp-mock-pipeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: #1e293b;
  border-radius: 10px;
  padding: 10px;
  min-height: 90px;
}
.lp-mock-pipe-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lp-mock-pipe-col > span {
  font-size: 0.65rem;
  color: #94a3b8;
  font-weight: 600;
}
.lp-mock-pipe-col i {
  display: block;
  height: 22px;
  border-radius: 6px;
  background: #334155;
}
.lp-mock-pipe-col.is-win i { background: color-mix(in srgb, #2563eb 55%, #1e293b); }

.lp-device-phone {
  position: absolute;
  inset-inline-start: -8px;
  bottom: -18px;
  width: 128px;
  background: #0b1220;
  border: 2px solid #334155;
  border-radius: 18px;
  padding: 10px 8px 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}
.lp-phone-notch {
  width: 36px;
  height: 4px;
  border-radius: 4px;
  background: #475569;
  margin: 0 auto 10px;
}
.lp-phone-bar {
  min-height: 18px;
  border-radius: 6px;
  background: #1e293b;
  margin-bottom: 8px;
  font-size: 0.62rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  padding-inline: 6px;
  font-weight: 600;
}
.lp-phone-card {
  min-height: 32px;
  border-radius: 8px;
  background: #1e293b;
  margin-bottom: 6px;
  font-size: 0.58rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  padding-inline: 6px;
  line-height: 1.3;
}
.lp-phone-card--sm { min-height: 24px; width: 70%; }

.lp-hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.lp-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #cbd5e1;
  font-size: 0.9rem;
  font-weight: 500;
}
.lp-trust-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
  flex-shrink: 0;
}

.lp-section {
  padding: clamp(3.5rem, 7vw, 5.5rem) 0;
  background: var(--bg-primary);
}
.lp-section--muted { background: var(--bg-muted); }
.lp-section--soft {
  background: color-mix(in srgb, var(--primary) 4%, var(--bg-primary));
}
.lp-section-head {
  margin-bottom: 2rem;
  max-width: 40rem;
}
.lp-section-head--center {
  text-align: center;
  margin-inline: auto;
}
.lp-section-head h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}
.lp-section-head p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 1.02rem;
}

/* Problem → solution: sales pipeline */
.lp-problem-grid {
  display: grid;
  gap: 2rem;
  max-width: 52rem;
  margin-inline: auto;
}
.lp-pipeline {
  list-style: none;
  margin: 0 auto;
  padding: 0.85rem 1rem;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: fit-content;
  max-width: 100%;
  background: color-mix(in srgb, var(--bg-muted) 70%, var(--bg-elevated));
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.lp-pipeline-step {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0;
}
.lp-pipeline-step > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.15rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
}
.lp-pipeline-step:not(:last-child)::after {
  content: "";
  width: 1.1rem;
  height: 1.1rem;
  margin-inline: 0.1rem;
  flex-shrink: 0;
  background: no-repeat center / contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M10 3L5 8l5 5' stroke='%2394a3b8' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  opacity: 0.85;
}
[dir="ltr"] .lp-pipeline-step:not(:last-child)::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M6 3l5 5-5 5' stroke='%2394a3b8' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.lp-pipeline-step.is-end > span {
  background: color-mix(in srgb, var(--primary) 16%, var(--bg-elevated));
  color: var(--primary);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 35%, transparent);
}
.lp-problem-copy {
  text-align: center;
}
.lp-problem-solution {
  margin: 0 0 1.25rem;
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--text-primary);
}
.lp-problem-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem 1.25rem;
}
.lp-problem-points li {
  position: relative;
  padding-inline-start: 1.1rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.lp-problem-points li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

/* Sales journey */
.lp-journey {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 2rem;
  align-items: stretch;
}
.lp-journey-visual {
  min-height: 100%;
}
.lp-journey-sticky {
  position: sticky;
  top: 5.5rem;
  align-self: start;
  width: 100%;
}
.lp-journey-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.lp-journey-panel-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--bg-muted) 80%, var(--bg-elevated));
  border-bottom: 1px solid var(--border);
}
.lp-journey-panel-chrome span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}
.lp-journey-panel-chrome em {
  margin-inline-start: auto;
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}
.lp-journey-panel-body {
  padding: 1.25rem 1.15rem 1.35rem;
  min-height: 168px;
}
.lp-journey-state {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.lp-journey-state[hidden] {
  display: none;
}
.lp-j-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: var(--bg-muted);
}
.lp-j-row b {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}
.lp-j-row i {
  font-style: normal;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}
.lp-j-row i.is-new { color: var(--primary); }
.lp-j-row i.is-win { color: var(--success, #16a34a); }
.lp-j-row i.is-money { font-family: var(--font-mono); }
.lp-journey-progress {
  height: 3px;
  background: var(--bg-muted);
}
.lp-journey-progress span {
  display: block;
  height: 100%;
  width: var(--lp-progress, 16%);
  background: var(--primary);
  transition: width 0.35s ease;
}
.lp-journey-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.lp-journey-step {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.lp-journey-step.is-active {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  background: color-mix(in srgb, var(--primary) 6%, var(--bg-elevated));
  box-shadow: var(--shadow-sm);
}
.lp-journey-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary);
  flex-shrink: 0;
  line-height: 1.4;
}
.lp-journey-step strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1rem;
  color: var(--text-primary);
}
.lp-journey-step p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* CRM core */
.lp-core-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1.5rem;
  align-items: stretch;
}
.lp-core-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 1.15rem;
  height: 100%;
}
.lp-core-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.lp-core-panel-label {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-primary);
}
.lp-core-panel-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.lp-core-kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.lp-core-col {
  background: var(--bg-muted);
  border-radius: 10px;
  padding: 0.65rem;
  min-height: 160px;
}
.lp-core-col em {
  display: block;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
}
.lp-core-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  line-height: 1.35;
}
.lp-core-col.is-win {
  background: color-mix(in srgb, var(--primary) 10%, var(--bg-muted));
}
.lp-core-modules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.lp-core-mod {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.05rem;
  box-shadow: var(--shadow-sm);
}
.lp-core-mod.is-primary {
  grid-column: 1 / -1;
  background: color-mix(in srgb, var(--primary) 6%, var(--bg-elevated));
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
}
.lp-core-mod h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}
.lp-core-mod p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Industry packs */
.lp-packs-formula {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}
.lp-formula-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.15rem 1.35rem;
  min-width: min(240px, 100%);
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.lp-formula-block.is-pack {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
  background: color-mix(in srgb, var(--primary) 6%, var(--bg-elevated));
}
.lp-formula-block strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}
.lp-formula-block span {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.lp-formula-plus {
  align-self: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  font-family: var(--font-mono);
}
.lp-packs-examples {
  text-align: center;
  margin-bottom: 1.75rem;
}
.lp-packs-examples-label {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}
.lp-packs-examples ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}
.lp-packs-examples li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}
.lp-packs-examples li span { color: var(--text-muted); font-weight: 600; }
.lp-packs-examples li em {
  font-style: normal;
  color: var(--primary);
  font-weight: 800;
  font-family: var(--font-mono);
}
.lp-packs-examples li strong { color: var(--text-primary); }

.lp-packs-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.lp-pack-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.15rem 0.75rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.lp-pack-card:hover {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  transform: translateY(-2px);
}
.lp-pack-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.65rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
}
.lp-pack-card h3 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}
.lp-pack-tier {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  margin-bottom: 0.45rem;
}
.lp-pack-price {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}
.lp-pack-price span {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font);
  margin-top: 0.1rem;
}
.lp-pack-bands {
  margin: 0.4rem 0 0;
  font-size: 0.68rem;
  line-height: 1.45;
}
.lp-packs-note {
  text-align: center;
  margin: 1.25rem auto 0;
  max-width: 36rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.lp-packs-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* MVP plan cards */
.pp-plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.75rem;
}
.pp-plans-grid--home {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.pp-plan-card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.pp-plan-card.is-recommended {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), var(--shadow-sm);
}
.pp-plan-badge {
  position: absolute;
  top: 0.65rem;
  inset-inline-end: 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}
.pp-plan-card h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
}
.pp-plan-price {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
}
.pp-plan-price strong {
  font-size: 1.25rem;
  font-family: var(--font-mono);
}
.pp-plan-price span,
.pp-plan-seats,
.pp-plan-positioning,
.pp-plan-note,
.pp-plan-vat {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.pp-plan-card .pricing-points {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.3rem;
  flex: 1;
}
.pp-plan-card .pricing-points li {
  font-size: 0.86rem;
  color: var(--text-muted);
  padding-inline-start: 0.9rem;
  position: relative;
}
.pp-plan-card .pricing-points li::before {
  content: "•";
  position: absolute;
  inset-inline-start: 0;
  color: var(--primary);
}
.pp-plan-card--enterprise {
  border-style: dashed;
}
.pp-calc-plan {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
}
.pp-examples-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Pricing overview */
.lp-pricing-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}
.lp-pricing-layer {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  max-width: 280px;
  flex: 1 1 220px;
  box-shadow: var(--shadow-sm);
}
.lp-pricing-layer.is-optional {
  border-style: dashed;
}
.lp-pricing-kicker {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.4rem;
  font-family: var(--font-mono);
}
.lp-pricing-layer strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}
.lp-pricing-layer p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.lp-pricing-plus {
  align-self: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  font-family: var(--font-mono);
}
.lp-pricing-subhead {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  text-align: center;
}
.lp-pricing-terms {
  max-width: 40rem;
  margin: 0 auto 1.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.15rem 1.35rem;
}
.lp-pricing-terms ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.lp-pricing-terms li {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.lp-pricing-terms strong {
  color: var(--text-primary);
}
.lp-pricing-examples {
  margin-bottom: 1.5rem;
}
.lp-pricing-example-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}
.lp-pricing-example {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow-sm);
}
.lp-pricing-example h3,
.lp-pricing-example h4 {
  margin: 0 0 0.55rem;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-primary);
}
.lp-pricing-example-net {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.lp-pricing-example-total {
  margin: 0.45rem 0 0;
  font-size: 0.95rem;
  color: var(--text-primary);
}
.lp-pricing-example-total strong {
  font-family: var(--font-mono);
}
.lp-pricing-bonus {
  text-align: center;
  margin: 0 auto 0.5rem;
  max-width: 40rem;
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.7;
}
.lp-pricing-bonus span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Public pricing calculator */
.pp-calc {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1.25rem;
  margin-top: 1.25rem;
  align-items: start;
}
.pp-calc-controls {
  display: grid;
  gap: 0.85rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem 1.25rem;
  box-shadow: var(--shadow-sm);
}
.pp-field {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}
.pp-field input[type="number"],
.pp-field select {
  min-height: 44px;
  margin-bottom: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 0.55rem 0.75rem;
  font: inherit;
  color-scheme: inherit;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.pp-field select option,
.pp-field select optgroup {
  background-color: var(--bg-elevated);
  color: var(--text-primary);
}
[data-theme="dark"] .pp-field input[type="number"],
[data-theme="dark"] .pp-field select {
  background: var(--bg-muted);
  border-color: color-mix(in srgb, #fff 12%, var(--border));
  color: var(--text-primary);
}
[data-theme="dark"] .pp-field select option,
[data-theme="dark"] .pp-field select optgroup {
  background-color: #151b31;
  color: #e5e7eb;
}
.pp-field--check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  grid-template-columns: none;
}
.pp-field--check input {
  width: 1.1rem;
  height: 1.1rem;
}
.pp-calc-result {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem 1.25rem;
  box-shadow: var(--shadow-sm);
}
.pp-calc-lines {
  display: grid;
  gap: 0.55rem;
}
.pp-calc-lines > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border);
}
.pp-calc-lines strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 700;
  text-align: start;
}
.pp-calc-lines .is-total {
  border-bottom: 0;
  padding-top: 0.35rem;
  font-size: 1.05rem;
  color: var(--text-primary);
  font-weight: 700;
}
.pp-calc-meta,
.pp-calc-quote {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.pp-packs-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Cloud vs On-Prem */
.lp-compare {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 1.25rem;
}
.lp-compare-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem 1.35rem;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.lp-compare-card.is-cloud {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
  background: color-mix(in srgb, var(--primary) 6%, var(--bg-elevated));
}
.lp-compare-card.is-onprem {
  opacity: 0.92;
}
.lp-compare-badge {
  position: absolute;
  inset-inline-end: 1rem;
  top: 1rem;
  font-size: 0.7rem;
  font-weight: 800;
  color: #fff;
  background: var(--primary);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
}
.lp-compare-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 0.85rem;
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary);
}
.lp-compare-card.is-onprem .lp-compare-icon {
  background: var(--bg-muted);
  color: var(--text-muted);
}
.lp-compare-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 800;
}
.lp-compare-card p {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 0.95rem;
}
.lp-compare-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.lp-compare-card li {
  position: relative;
  padding: 0.4rem 0;
  padding-inline-start: 1.15rem;
  color: var(--text-primary);
  font-size: 0.9rem;
}
.lp-compare-card li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.75rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}
.lp-compare-card.is-onprem li::before { background: var(--text-muted); }

/* Onboarding steps */
.lp-onboard {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 40rem;
  display: grid;
  gap: 0.85rem;
}
.lp-onboard-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1.1rem 1.2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.lp-onboard-num {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  font-family: var(--font-mono);
  flex-shrink: 0;
}
.lp-onboard-body {
  min-width: 0;
  text-align: start;
}
.lp-onboard-body strong {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 1.05rem;
  color: var(--text-primary);
}
.lp-onboard-body p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-muted);
}
.lp-onboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.75rem;
}
.lp-onboard-note {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Legacy steps track (unused on home; kept for safety) */
.lp-steps-track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.lp-steps-track.lp-steps-track--5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.lp-steps-track li {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.35rem 1.1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}
.lp-step-num {
  min-width: 2rem;
  height: 28px;
  padding-inline: 0.45rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
}
.lp-steps-track strong {
  font-size: 1rem;
  color: var(--text-primary);
}
.lp-steps-track span:last-child {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.lp-cta-band {
  background:
    radial-gradient(ellipse 70% 80% at 80% 50%, rgba(37, 99, 235, 0.28), transparent 55%),
    #0b1224;
  color: #e5e7eb;
  padding: 3rem 0;
}
.lp-cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.lp-cta-inner h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  color: #fff;
  max-width: 22ch;
}
.lp-cta-inner p {
  margin: 0;
  color: #94a3b8;
  max-width: 36rem;
  line-height: 1.65;
}
.lp-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 1023px) {
  .lp-hero-grid,
  .lp-journey,
  .lp-core-layout,
  .lp-compare {
    grid-template-columns: 1fr;
  }
  .lp-hero-copy h1 { max-width: none; }
  .lp-hero-visual { order: -1; max-width: 520px; margin-inline: auto; width: 100%; }
  .lp-packs-grid,
  .pp-packs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pp-plans-grid,
  .pp-plans-grid--home { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-pricing-example-grid,
  .pp-examples-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-steps-track,
  .lp-steps-track--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-core-kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-calc { grid-template-columns: 1fr; }

  /* Journey: sticky preview stays visible while steps scroll */
  .lp-journey {
    gap: 0.85rem;
  }
  .lp-journey-visual {
    display: contents;
  }
  .lp-journey-sticky {
    position: sticky;
    top: calc(4.75rem + env(safe-area-inset-top, 0px));
    z-index: 4;
    margin-bottom: 0.15rem;
  }
  .lp-journey-panel {
    background: color-mix(in srgb, var(--bg-elevated) 92%, var(--bg-muted));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  }
  .lp-journey-panel-chrome {
    padding: 8px 10px;
  }
  .lp-journey-panel-chrome em {
    font-size: 0.74rem;
  }
  .lp-journey-panel-body {
    min-height: 0;
    padding: 0.7rem 0.7rem 0.85rem;
  }
  .lp-journey-state {
    gap: 0.45rem;
  }
  .lp-j-row {
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
  }
  .lp-j-row b {
    font-size: 0.7rem;
  }
  .lp-j-row i {
    font-size: 0.8rem;
  }
  .lp-journey-steps {
    gap: 0.55rem;
  }
  .lp-journey-step {
    padding: 0.8rem 0.9rem;
    cursor: pointer;
  }
  .lp-journey-step strong {
    font-size: 0.95rem;
  }
  .lp-journey-step p {
    font-size: 0.82rem;
  }
}
@media (max-width: 767px) {
  .lp-hero { padding-top: 2.5rem; }
  .lp-packs-grid,
  .pp-packs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-steps-track,
  .lp-steps-track--5 { grid-template-columns: 1fr; }
  .lp-device-phone { display: none; }
  .lp-cta-inner { text-align: center; justify-content: center; }
  .lp-cta-inner h2 { max-width: none; }
  .lp-cta-actions { width: 100%; justify-content: center; }
  .lp-cta-actions .btn { flex: 1 1 140px; }
  .lp-pricing-example-grid,
  .pp-examples-grid,
  .pp-plans-grid,
  .pp-plans-grid--home { grid-template-columns: 1fr; }
  .lp-core-modules { grid-template-columns: 1fr; }
  .lp-core-mod.is-primary { grid-column: auto; }
  .lp-pipeline {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    padding: 0.65rem 0.75rem;
    border-radius: 16px;
  }
  .lp-pipeline-step > span {
    font-size: 0.82rem;
    padding: 0.3rem 0.7rem;
    min-height: 1.95rem;
  }
  .lp-pipeline-step:not(:last-child)::after {
    width: 0.85rem;
    height: 0.85rem;
  }
  .lp-onboard-step {
    padding: 1rem 1.05rem;
    gap: 0.85rem;
  }

  .lp-journey-sticky {
    top: calc(4.35rem + env(safe-area-inset-top, 0px));
  }
  .lp-journey-panel-chrome span {
    display: none;
  }
}

/* Landing motion (Lenis + reveals) */
html.lenis {
  scroll-behavior: auto;
}

html.lp-has-motion .lp-page .lp-hero-anim {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition:
    opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--lp-i, 0) * 0.08s);
}
html.lp-has-motion body.lp-motion-ready .lp-hero-anim {
  opacity: 1;
  transform: none;
}

html.lp-has-motion .lp-page .lp-reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--lp-reveal-delay, 0s);
  will-change: opacity, transform;
}
html.lp-has-motion .lp-page .lp-reveal.is-in {
  opacity: 1;
  transform: none;
  will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
  html.lp-has-motion .lp-page .lp-hero-anim,
  html.lp-has-motion .lp-page .lp-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .lp-journey-progress span,
  .lp-journey-step,
  .lp-pack-card {
    transition: none;
  }
}

/* ========== UI Kit: switch, progress, modal, kanban, chips, record header ========== */

.switch-field {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
}
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.switch__track {
  display: block;
  width: 2.75rem;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--border);
  border: 1px solid var(--border);
  transition: background 0.15s ease, border-color 0.15s ease;
  position: relative;
}
.switch__thumb {
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease;
}
.switch input:checked + .switch__track {
  background: var(--primary);
  border-color: var(--primary);
}
.switch input:checked + .switch__track .switch__thumb {
  transform: translateX(1.2rem);
}
[dir="rtl"] .switch input:checked + .switch__track .switch__thumb {
  transform: translateX(-1.2rem);
}
.switch input:focus-visible + .switch__track {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}
.switch input:disabled + .switch__track {
  opacity: 0.5;
  cursor: not-allowed;
}
.field-check.switch-field {
  gap: 0.65rem;
}
.field-check.switch-field input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  appearance: none;
  pointer-events: none;
}
.field-check.switch-field input[type="checkbox"]::after {
  display: none !important;
  content: none !important;
}
.field-check.switch-field .switch__track {
  flex-shrink: 0;
}
.field-check.switch-field:has(input:checked) .switch__track {
  background: var(--primary);
  border-color: var(--primary);
}
.field-check.switch-field:has(input:checked) .switch__thumb {
  transform: translateX(1.2rem);
}
[dir="rtl"] .field-check.switch-field:has(input:checked) .switch__thumb {
  transform: translateX(-1.2rem);
}

.progress-block {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.progress-block__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.85rem;
}
.progress-block__value {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-muted);
}
.progress {
  width: 100%;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--bg-muted);
  overflow: hidden;
  border: 1px solid var(--border);
}
.progress__bar {
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 0.25s ease;
  min-width: 0;
}
.progress__bar--success { background: var(--success); }
.progress__bar--warning { background: var(--warning); }
.progress__bar--error { background: var(--error); }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--bg-muted);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.chip--tag {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
}
.chip--tag.has-color {
  background: color-mix(in srgb, var(--tag-color) 14%, transparent);
  color: var(--tag-color);
  border-color: color-mix(in srgb, var(--tag-color) 32%, var(--border));
}
.chip--tag.has-color::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 9999px;
  background: var(--tag-color);
  flex-shrink: 0;
}
.chip--owner {
  background: color-mix(in srgb, var(--cyan) 12%, transparent);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--cyan) 30%, var(--border));
}

.record-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.record-header__main {
  min-width: 0;
  flex: 1;
}
.record-header__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.record-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.record-header__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.locked-module {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  padding: var(--space-4);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-muted) 60%, var(--bg-elevated));
}
.locked-module__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
}
.locked-module__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}
.locked-module__text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.kanban {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  align-items: flex-start;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}
.kanban__column {
  min-width: 240px;
  flex: 1 1 240px;
  max-width: 320px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
}
.kanban__column-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.kanban__count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-muted);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}
.kanban__card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
  background: var(--bg-secondary);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.kanban__card:hover {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  box-shadow: var(--shadow-sm);
}
.kanban__card:last-child { margin-bottom: 0; }
.kanban__card a {
  color: var(--text-primary);
  font-weight: 700;
}
.kanban__card a:hover { color: var(--primary); text-decoration: none; }
.kanban__card .money {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.kanban__card .panel-form {
  margin-top: 0.45rem;
}
.kanban__card select {
  width: 100%;
  font-size: 0.82rem;
  padding: 0.35rem 0.5rem;
  min-height: 2rem;
}
.kanban__empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0.5rem 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}
.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.modal {
  width: min(440px, 100%);
  max-height: min(90dvh, 640px);
  overflow: auto;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0;
  transform: translateY(8px) scale(0.98);
  transition: transform 0.18s ease;
}
.modal-backdrop.is-open .modal {
  transform: none;
}
.modal--sm { width: min(380px, 100%); }
.modal--lg { width: min(560px, 100%); }
.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 1.2rem 0.35rem;
}
.modal__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.modal__close {
  flex-shrink: 0;
}
.modal__body {
  padding: 0.5rem 1.2rem 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.modal__body p { margin: 0 0 0.75rem; }
.modal__body p:last-child { margin-bottom: 0; }
.modal__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 0 1.2rem 1.2rem;
}
.modal--success {
  text-align: center;
}
.modal--success .modal__header {
  justify-content: center;
  padding-top: 1.5rem;
}
.modal--success .modal__body {
  text-align: center;
}
.modal--success .modal__footer {
  justify-content: center;
}
.modal__success-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid color-mix(in srgb, var(--success) 30%, var(--border));
}
.modal__success-icon svg {
  width: 1.75rem;
  height: 1.75rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.modal-form-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: right;
}
body.modal-open {
  overflow: hidden;
}

.auth-card {
  max-width: 440px;
  margin: 2.5rem auto;
  padding: 1.75rem 1.6rem;
  border-radius: var(--radius);
}
.auth-card .page-title {
  text-align: center;
}
.auth-card .auth-brand {
  margin-bottom: 1.25rem;
}
.auth-card > .muted,
.auth-card .auth-lead {
  text-align: center;
  margin: 0.35rem 0 1.15rem;
  line-height: 1.65;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.auth-field {
  display: block;
}
.auth-field .field-label {
  margin-bottom: 0.35rem;
}
.auth-field input {
  width: 100%;
}
.auth-name-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.auth-card .form-actions {
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  border-top: none;
  padding-top: 0.35rem;
}
.auth-card .form-actions .btn {
  width: 100%;
}
.auth-card label {
  display: block;
  margin: 0;
  font-weight: 600;
  font-size: 0.9rem;
}
@media (max-width: 420px) {
  .auth-name-row {
    grid-template-columns: 1fr;
  }
}
.auth-status-icon {
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
}
.auth-status-icon svg {
  width: 1.6rem;
  height: 1.6rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pricing-card.is-featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 35%, transparent), var(--shadow-sm);
}
.pricing-card .stat {
  color: var(--primary);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.pagination .muted {
  font-family: var(--font-mono);
}

.data-table td[dir="ltr"],
.data-table th[dir="ltr"],
.muted[dir="ltr"] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Custom color picker (tags, etc.) */
.color-picker {
  --picker-color: #2563eb;
  display: grid;
  gap: 0.65rem;
}
.color-picker__swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.color-picker__swatch {
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border-radius: 9999px;
  border: 2px solid color-mix(in srgb, var(--swatch) 35%, var(--border));
  background: var(--swatch);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.color-picker__swatch:hover {
  transform: scale(1.08);
}
.color-picker__swatch.is-active {
  box-shadow:
    0 0 0 2px var(--bg-elevated),
    0 0 0 4px var(--swatch);
}
.color-picker__row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.color-picker__preview {
  position: relative;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background:
    linear-gradient(var(--picker-color), var(--picker-color)),
    repeating-conic-gradient(#cbd5e1 0% 25%, #fff 0% 50%) 0 0 / 10px 10px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #000 8%, transparent);
}
.color-picker__preview.is-empty {
  background:
    linear-gradient(
      135deg,
      transparent 46%,
      var(--error) 46%,
      var(--error) 54%,
      transparent 54%
    ),
    repeating-conic-gradient(#cbd5e1 0% 25%, #fff 0% 50%) 0 0 / 10px 10px;
}
.color-picker__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
.panel-form .field-stack .color-picker__hex,
.color-picker__hex {
  flex: 1;
  min-width: 0;
  margin: 0 !important;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.color-picker__clear {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--bg-muted);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.color-picker__clear:hover {
  color: var(--text-primary);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
}

.tag-manage-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.tag-manage-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--bg-muted) 45%, var(--bg-elevated));
}
.tag-manage-item__main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.tag-manage-hex {
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.tag-manage-item__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.tag-manage-item__actions form {
  display: inline;
  margin: 0;
}

/* �� Solo workbench �� */
.workbench-onboarding .workbench-steps {
  margin: 0.5rem 0 0;
  padding-inline-start: 1.25rem;
  display: grid;
  gap: 0.45rem;
}
.workbench-queue .workbench-section-label {
  margin: 1rem 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
}
.workbench-queue .workbench-section-label.is-overdue {
  color: var(--danger, #dc2626);
}
.workbench-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.workbench-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--bg-muted) 35%, var(--bg-elevated));
}
.workbench-row__main {
  min-width: 0;
  flex: 1 1 220px;
  display: grid;
  gap: 0.25rem;
}
.workbench-row__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
}
.workbench-phone {
  display: inline-flex;
  width: fit-content;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}
.workbench-row__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  flex: 1 1 240px;
}
.quick-call {
  display: grid;
  gap: 0.35rem;
}
.quick-call__label {
  font-size: 0.75rem;
}
.quick-call__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.quick-call__form {
  margin: 0;
  display: inline;
}
.quick-call__btn {
  min-height: 2.25rem;
  padding-inline: 0.65rem;
}
.workbench-stats {
  margin-top: 0.25rem;
}
.workbench-stats__summary {
  cursor: pointer;
  font-weight: 700;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  list-style: none;
}
.workbench-stats__summary::-webkit-details-marker {
  display: none;
}
.page-header__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
@media (max-width: 767px) {
  .workbench-row {
    padding: 0.85rem;
  }
  .workbench-row__actions {
    flex: 1 1 100%;
  }
  .quick-call__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quick-call__btn {
    width: 100%;
    justify-content: center;
  }
  .page-header__actions {
    width: 100%;
  }
  .page-header__actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}

/* Panel quick-action FAB (speed dial) */
.panel-fab {
  --fab-size: 3.25rem;
  --fab-gap: 0.65rem;
  position: fixed;
  left: 1.25rem;
  right: auto;
  bottom: 1.25rem;
  z-index: 60;
  width: var(--fab-size);
  height: var(--fab-size);
  pointer-events: none;
}
.panel-fab__btn {
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--fab-size);
  height: var(--fab-size);
  border: none;
  border-radius: 999px;
  background: var(--primary, #2563eb);
  color: #fff;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--primary, #2563eb) 35%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 180ms ease-out, filter 120ms ease-out;
}
.panel-fab__btn:hover {
  filter: brightness(1.06);
}
.panel-fab__btn:active {
  transform: scale(0.96);
}
.panel-fab.is-open .panel-fab__btn {
  box-shadow: 0 10px 28px color-mix(in srgb, var(--primary, #2563eb) 42%, transparent);
}
.panel-fab__btn:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: 3px;
}
.panel-fab__icon {
  display: block;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
}
.panel-fab.is-open .panel-fab__icon {
  transform: rotate(45deg);
}
.panel-fab__menu {
  position: absolute;
  left: 0;
  bottom: calc(var(--fab-size) + var(--fab-gap));
  display: grid;
  gap: 0.35rem;
  min-width: 11.75rem;
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 12px);
  background: var(--bg-elevated, #fff);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.16);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 10px, 0) scale(0.96);
  transform-origin: bottom left;
  transition:
    opacity 180ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 220ms cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 220ms;
}
.panel-fab.is-open .panel-fab__menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
  transition:
    opacity 180ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 220ms cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s linear 0s;
}
.panel-fab__item {
  display: block;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius-sm, 8px);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  transition:
    opacity 160ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 200ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 120ms ease-out;
  transition-delay: 0ms;
}
.panel-fab.is-open .panel-fab__item {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: calc(40ms + (var(--fab-i, 0) * 35ms));
}
.panel-fab__item:hover,
.panel-fab__item:focus-visible {
  background: color-mix(in srgb, var(--bg-muted) 70%, var(--bg-elevated));
  outline: none;
}
.panel-fab__item:active {
  transform: scale(0.98);
}
@media (max-width: 767px) {
  .panel-fab {
    --fab-size: 3.5rem;
    left: 1rem;
    bottom: 1rem;
  }
  .panel-fab__menu {
    min-width: min(70vw, 14rem);
  }
}
@media (prefers-reduced-motion: reduce) {
  .panel-fab__btn,
  .panel-fab__icon,
  .panel-fab__menu,
  .panel-fab__item {
    transition: none !important;
  }
  .panel-fab__menu {
    transform: none;
  }
  .panel-fab__item {
    opacity: 1;
    transform: none;
  }
}

/* Support ticket thread */
.support-thread {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.support-thread-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  padding: 0.75rem 0.9rem;
  background: var(--bg-elevated, var(--surface));
}
.support-thread-item--staff {
  border-color: color-mix(in srgb, var(--primary) 32%, var(--border));
  background: color-mix(in srgb, var(--primary) 7%, var(--bg-elevated, var(--surface)));
}
.support-thread-item--customer {
  border-color: var(--border);
}
.support-thread-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.4rem;
  font-size: 0.8125rem;
}
.support-thread-body {
  line-height: 1.65;
  word-break: break-word;
}

/* Platform control plane shell */
.platform-body {
  min-height: 100dvh;
  background: var(--bg);
}
.platform-shell {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
  padding-bottom: 2.5rem;
}
.platform-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.7rem 0;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.platform-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.platform-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}
.platform-brand-name {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}
.platform-brand-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}
.platform-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  overflow-x: auto;
  scrollbar-width: thin;
  min-width: 0;
  padding-block: 0.15rem;
}
.platform-nav__link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm, 8px);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 650;
  font-size: 0.875rem;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}
.platform-nav__link:hover {
  color: var(--text-primary);
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}
.platform-nav__link.is-active,
.platform-nav__link[aria-current="page"] {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
}
.platform-topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.platform-user {
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8125rem;
  font-weight: 600;
}
.platform-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.platform-main > .filter-bar {
  margin: 0;
}
.platform-kpi-row {
  margin: 0;
}
.platform-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}
.platform-split--forms {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.section-title--sm {
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
}
.platform-pager {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.stat-cell {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-variant-numeric: tabular-nums;
}
.platform-code {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.78rem;
  direction: ltr;
  unicode-bidi: isolate;
  background: color-mix(in srgb, var(--primary) 8%, var(--bg-elevated, var(--surface)));
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
}
.platform-meta-cell {
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8rem;
  direction: ltr;
  unicode-bidi: isolate;
}
.status-pill--trial {
  color: color-mix(in srgb, var(--warning, #f59e0b) 90%, var(--text-primary));
  background: color-mix(in srgb, var(--warning, #f59e0b) 14%, transparent);
}
.status-pill--active {
  color: color-mix(in srgb, var(--success, #22c55e) 90%, var(--text-primary));
  background: color-mix(in srgb, var(--success, #22c55e) 14%, transparent);
}
.status-pill--suspended {
  color: color-mix(in srgb, var(--danger, #ef4444) 90%, var(--text-primary));
  background: color-mix(in srgb, var(--danger, #ef4444) 12%, transparent);
}
.data-table--dense th,
.data-table--dense td {
  padding-block: 0.55rem;
}

@media (prefers-reduced-transparency: reduce) {
  .platform-topbar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--bg);
  }
}
@media (max-width: 900px) {
  .platform-topbar {
    grid-template-columns: 1fr auto;
  }
  .platform-nav {
    grid-column: 1 / -1;
    order: 3;
  }
  .platform-split,
  .platform-split--forms {
    grid-template-columns: 1fr;
  }
  .platform-user { display: none; }
}
@media (max-width: 640px) {
  .platform-shell {
    width: min(100% - 1.25rem, 1180px);
  }
}

/* Catalog invoice print */
@media print {
  .sidebar,
  .sidebar-backdrop,
  .topbar,
  .no-print,
  .quick-fab,
  [data-sidebar-backdrop] {
    display: none !important;
  }
  .shell,
  .panel-main,
  .panel-content {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }
  .invoice-print__sheet {
    box-shadow: none !important;
    border: none !important;
  }
}
