/* ==========================================================================
   Commercial CRM & Lead Intelligence System — Editorial Warm Ivory, Electric Black & High-Utility Semantic System
   ========================================================================== */

:root {
  /* Warm Ivory Surfaces — Rich & Grounded */
  --bg: #EFE6D8;
  --surface: #F9F5EE;
  --surface-2: #E8DCCB;
  --surface-3: #DBC8B2;
  
  /* Hairline Borders with Warmth */
  --border: #D5C2AC;
  --border-2: #C4AD93;
  --border-strong: #292929;
  
  /* Electric Black Typography */
  --text: #292929;
  --text-2: #48433C;
  --muted: #7E7569;
  
  /* Terracotta Accent (#E78260) — Rich & Vibrant */
  --accent: #E78260;
  --accent-terracotta: #E78260;
  --accent-hover: #D76F4B;
  --accent-soft: rgba(231, 130, 96, 0.18);
  
  --danger: #D94841;
  --danger-bg: rgba(217, 72, 65, 0.12);
  --warning: #D97706;
  --warning-bg: rgba(217, 119, 6, 0.12);
  --success: #2E7D32;
  --success-bg: rgba(46, 125, 50, 0.12);
  --info: #2563EB;
  --info-bg: rgba(37, 99, 235, 0.12);
  
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-pill: 9999px;
  --shadow: 0 4px 20px -2px rgba(41, 41, 41, 0.08);
  --shadow-sm: 0 1px 4px rgba(41, 41, 41, 0.05);
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background-color: var(--bg);
  /* Organic Tactile Paper Fiber & Grain Texture */
  background-image: 
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.4) 0%, transparent 80%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='paperNoise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paperNoise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.15s ease, color 0.15s ease;
}

a:hover {
  text-decoration: underline;
}

/* ── App Shell Layout ─────────────────────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 248px;
  background: #EAE0D0;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.brand {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  background: #DFD2BF;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #E78260 0%, #C95A34 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(41, 41, 41, 0.15);
}

.brand-name {
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.nav {
  padding: 14px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 14px 10px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-weight: 600;
  font-size: 12.5px;
  transition: all 0.12s ease;
  border: 1px solid transparent;
  text-decoration: none !important;
}

.nav-link svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  stroke: currentColor;
}

.nav-link:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-link.active {
  background: #292929;
  color: #F3EFE6;
  font-weight: 700;
  border-left: 3px solid #E78260;
  box-shadow: 0 2px 8px rgba(41, 41, 41, 0.15);
}

.nav-link.active svg {
  stroke: #E78260;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: #DFD2BF;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #292929;
  color: #E78260;
  border: 1px solid rgba(231, 130, 96, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

.user-name {
  font-weight: 700;
  font-size: 12px;
  color: var(--text);
}

.user-role {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

/* ── Main Content & Topbar ────────────────────────────────────────────────── */
.main-content {
  margin-left: 248px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg);
}

.topbar {
  height: 60px;
  background: rgba(239, 230, 216, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 520px;
}

.search-bar input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  color: var(--text);
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.search-bar input:focus {
  border-color: #E78260;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(231, 130, 96, 0.25);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-body {
  padding: 24px 28px 48px;
  flex: 1;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.page-header h1 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-sub {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid #292929;
  background: #292929;
  color: #FFFFFF;
  transition: all 0.12s ease;
  white-space: nowrap;
  text-decoration: none !important;
  line-height: 1.2;
}

.btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.btn:hover {
  background: #1F1F1F;
  border-color: #1F1F1F;
  color: #FFFFFF;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: #E78260;
  color: #FFFFFF !important;
  border-color: #E78260;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(231, 130, 96, 0.25);
}

.btn-primary:hover {
  background: #D76F4B;
  border-color: #D76F4B;
  color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(231, 130, 96, 0.4);
  transform: translateY(-1px);
}

.btn-ghost, .btn-secondary {
  background: #FFFFFF;
  color: #292929;
  border: 1px solid var(--border-2);
}

.btn-ghost:hover, .btn-secondary:hover {
  background: var(--surface-2);
  border-color: #292929;
  color: #292929;
}

.btn-danger {
  background: #FFFFFF;
  color: #000000;
  border: 1px solid #292929;
}

.btn-danger:hover {
  background: #000000;
  color: #FFFFFF;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 11.5px;
}

.btn-xs {
  padding: 3px 8px;
  font-size: 11px;
}

.btn-block {
  width: 100%;
}

/* ── Cards, Grids & KPI Blocks ────────────────────────────────────────────── */
.card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.card h2, .card h3 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.kpi-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: border-color 0.15s ease;
}

.kpi-card:hover {
  border-color: #E78260;
  box-shadow: 0 6px 20px -2px rgba(41, 41, 41, 0.08), 0 0 12px rgba(231, 130, 96, 0.15);
}

.kpi-card.kpi-dark {
  background: #292929;
  color: #F3EFE6;
  border-color: #292929;
}

.kpi-card.kpi-dark .kpi-label,
.kpi-card.kpi-dark .kpi-sub {
  color: #A1A1AA;
}

.kpi-card.kpi-dark .kpi-value {
  color: #FFFFFF;
}

.kpi-label {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.kpi-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.lead-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1100px) {
  .grid-2, .grid-3, .lead-layout {
    grid-template-columns: 1fr;
  }
}

/* ── Tables ───────────────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table th {
  background: #E4D5C1;
  color: var(--text);
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-2);
  white-space: nowrap;
}

.table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
  font-size: 12.5px;
}

.table tbody tr:hover {
  background: rgba(231, 130, 96, 0.05);
}

.lead-title {
  font-weight: 700;
  color: var(--text);
  font-size: 13px;
  display: inline-block;
}

.lead-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* ── Monochrome Badges & Pills ────────────────────────────────────────────── */
.badge, .pill, .stage-pill, .temp-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--border-2);
  background: #EFE6D8;
  color: #292929;
  white-space: nowrap;
  line-height: 1.35;
}

/* Priority & Temperature Signals (Instant Visual Triage) */
.temp-Hot {
  background: #FEECE5;
  color: #C24A24;
  border: 1px solid #F6B8A2;
  font-weight: 800;
}
.temp-Hot::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #E78260;
  box-shadow: 0 0 6px rgba(231, 130, 96, 0.8);
}

.temp-Warm {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
  font-weight: 700;
}
.temp-Warm::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #D97706;
}

.temp-Cold {
  background: #E2E8F0;
  color: #475569;
  border: 1px solid #CBD5E1;
  font-weight: 600;
}

/* Deal & Lifecycle Stages */
.stage-WON {
  background: #E8F5E9;
  color: #1B5E20;
  border: 1px solid #A5D6A7;
  font-weight: 800;
}
.stage-MEETING-BOOKED, .stage-QUALIFIED {
  background: #EFF6FF;
  color: #1E40AF;
  border: 1px solid #BFDBFE;
  font-weight: 700;
}
.stage-PROPOSAL-SENT, .stage-AUDIT-REQUESTED {
  background: #FAF5FF;
  color: #6B21A8;
  border: 1px solid #E9D5FF;
  font-weight: 700;
}
.stage-CONTACTED, .stage-ATTEMPTING-CONTACT {
  background: #FFFBEB;
  color: #78350F;
  border: 1px solid #FDE68A;
}
.stage-NEW {
  background: #F1F5F9;
  color: #334155;
  border: 1px solid #CBD5E1;
}
.stage-LOST {
  background: #F3F4F6;
  color: #9CA3AF;
  border: 1px dashed #D1D5DB;
  text-decoration: line-through;
}

/* Status Badges */
.badge-solid {
  background: #FEECE5;
  color: #C24A24;
  border: 1px solid #F6B8A2;
  font-weight: 800;
}
.badge-outline {
  background: #FFFFFF;
  color: #292929;
  border: 1px solid var(--border-2);
}
.badge-subtle {
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border-2);
}

/* ── Forms & Inputs ───────────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-group, .filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group.full {
  grid-column: 1 / -1;
}

label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="url"],
input[type="tel"],
select,
textarea {
  width: 100%;
  background: #FFFFFF;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--text);
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #E78260;
  box-shadow: 0 0 0 3px rgba(231, 130, 96, 0.2);
  background: #FFFFFF;
}

textarea {
  resize: vertical;
}

.filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Alerts & Callout Banners ─────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--border-2);
  background: #FFFFFF;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.alert-success {
  background: #292929;
  color: #FFFFFF;
  border-color: #292929;
}

.alert-danger {
  background: #FFFFFF;
  color: #000000;
  border: 2px solid #000000;
}

/* ── Timeline & Activity Feed ─────────────────────────────────────────────── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timeline-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #E78260;
  box-shadow: 0 0 6px rgba(231, 130, 96, 0.5);
  margin-top: 6px;
  flex-shrink: 0;
}

.timeline-body {
  flex: 1;
  min-width: 0;
}

.timeline-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.timeline-text {
  color: var(--text-2);
  font-size: 12.5px;
  white-space: pre-line;
}

/* ── Stage Bars & Funnel Visualization ────────────────────────────────────── */
.stage-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stage-bar-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stage-bar-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
}

.stage-bar-track {
  height: 6px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
}

.stage-bar-fill {
  height: 100%;
  background: #E78260;
  border-radius: 999px;
}

/* ── Info List & Key/Value Rows ───────────────────────────────────────────── */
.info-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}

.info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-row span {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}

/* ── Modals ───────────────────────────────────────────────────────────────── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-box {
  background: #FFFFFF;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* ── Auth / Login Page ────────────────────────────────────────────────────── */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: #FFFFFF;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

.auth-hint {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
}

/* ── Pagination ───────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.page-info {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}

/* ── Utility Classes ──────────────────────────────────────────────────────── */
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.flex-wrap { flex-wrap: wrap; }

.code-block, pre.script-box {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-left: 3px solid #292929;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.55;
}

.score-box {
  border: 1px solid var(--border-2);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}

.score-box.score-high {
  background: #292929;
  color: #FFFFFF;
  border-color: #292929;
}

/* ── Toast Notifications ─────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #000000;
  color: #FFFFFF;
  border: 1px solid #292929;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  animation: toastSlideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Mobile Sidebar Drawer & Overlay ──────────────────────────────────────── */
.mobile-sidebar-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  cursor: pointer;
  color: var(--text);
  line-height: 0;
}

.mobile-sidebar-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 95;
}

@media (max-width: 1024px) {
  .mobile-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-overlay.active {
    display: block;
  }

  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .topbar {
    padding: 12px 16px;
    gap: 12px;
  }

  .topbar-actions {
    flex-wrap: wrap;
  }
}

/* ── Step-by-Step Settings Wizard ─────────────────────────────────────────── */
.wizard-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 4px 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.wizard-step-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s ease;
  font-family: inherit;
}

.wizard-step-btn:hover {
  background: var(--surface-2);
  border-color: #000000;
  color: #000000;
}

.wizard-step-btn.active {
  background: #292929;
  color: #F3EFE6;
  border-color: #E78260;
  box-shadow: 0 2px 10px rgba(231, 130, 96, 0.25);
}

.wizard-step-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
}

.wizard-step-btn.active .wizard-step-num {
  background: #FFFFFF;
  color: #000000;
}

.wizard-step-pill {
  font-size: 9.5px;
  padding: 2px 5px;
  border-radius: 2px;
  background: var(--surface-3);
  color: var(--text-2);
  font-weight: 700;
  text-transform: uppercase;
}

.wizard-step-btn.active .wizard-step-pill {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

.wizard-step-pane {
  display: none;
}

.wizard-step-pane.active {
  display: block;
  animation: paneFadeIn 0.18s ease-out;
}

@keyframes paneFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.wizard-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.guide-callout {
  background: #FFFFFF;
  border: 1px solid var(--border-2);
  border-left: 3px solid #E78260;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
}

.guide-callout-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #292929;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.guide-callout-text {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.55;
}

.guide-callout-steps {
  margin-top: 8px;
  padding-left: 18px;
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 1.6;
}

/* ── Locked Add-On Navigation Badges ──────────────────────────────────────── */
.nav-link.nav-link-locked {
  opacity: 0.65;
}

.nav-link.nav-link-locked:hover {
  opacity: 1;
}

.nav-badge-locked {
  margin-left: auto;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 2px;
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.score-box.score-high .muted {
  color: #A1A1AA;
}


/* â”€â”€ Interactive Drag & Drop Kanban Board â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.kanban-view-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(240px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 16px;
  align-items: start;
}

.kanban-col {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  min-height: 480px;
  max-height: 80vh;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.kanban-col.drag-over {
  border-color: #E78260;
  background: rgba(231, 130, 96, 0.08);
}

.kanban-col-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  position: sticky;
  top: 0;
  z-index: 5;
}

.kanban-col-title {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kanban-col-count {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border-2);
}

.kanban-col-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  flex: 1;
}

.kanban-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: grab;
  user-select: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
  box-shadow: 0 1px 3px rgba(41, 41, 41, 0.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kanban-card:active {
  cursor: grabbing;
}

.kanban-card:hover {
  border-color: var(--border-2);
  box-shadow: 0 4px 14px rgba(41, 41, 41, 0.09);
  transform: translateY(-2px);
}

.kanban-card.is-dragging {
  opacity: 0.35;
  transform: scale(0.98);
  border: 1px dashed #E78260;
}

.kanban-card-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  word-break: break-word;
}

.kanban-card-contact {
  font-size: 11px;
  color: var(--muted);
}

.kanban-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.kanban-card-value {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text);
  font-family: var(--font-mono);
}

.kanban-card-phone {
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--text-2);
}