/* ============================================================
   SALES PULSE CRM — LIGHT THEME
   Font: Poppins throughout
   Inspired by: soft blue-white dashboard aesthetic
   ============================================================ */

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

/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Design Tokens ── */
:root {
  /* Palette */
  --page-bg:        #EEF4FF;       /* soft blue page wash */
  --surface:        #FFFFFF;       /* card / panel white  */
  --surface-raised: #F8FAFF;       /* slightly tinted surface */
  --sidebar-bg:     #FFFFFF;
  --header-bg:      #FFFFFF;

  /* Brand accent */
  --accent:         #0891b2;       /* cyan-700 — readable on white */
  --accent-light:   #06b6d4;       /* cyan-500 */
  --accent-glow:    rgba(8, 145, 178, 0.18);
  --accent-subtle:  rgba(8, 145, 178, 0.08);

  /* Text */
  --text-primary:   #0f172a;       /* slate-900 */
  --text-secondary: #64748b;       /* slate-500 */
  --text-muted:     #94a3b8;       /* slate-400 */
  --text-on-accent: #ffffff;

  /* Borders */
  --border:         rgba(0, 0, 0, 0.08);
  --border-strong:  rgba(0, 0, 0, 0.14);

  /* Semantic */
  --success:        #10b981;
  --warning:        #f59e0b;
  --error:          #ef4444;
  --info:           #0891b2;

  /* Shadows */
  --shadow-xs:  0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.10);
  --shadow-xl:  0 20px 60px rgba(0,0,0,0.12);

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;

  /* Radius */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --radius-full: 9999px;

  /* Font */
  --font: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Legacy compat tokens (used by generated JS) */
  --primary-bg:        var(--page-bg);
  --secondary-bg:      var(--surface);
  --tertiary-bg:       var(--surface-raised);
  --accent-teal:       var(--accent);
  --accent-teal-dark:  #0e7490;
  --color-background:  var(--page-bg);
  --color-surface:     var(--surface);
  --color-text:        var(--text-primary);
  --color-text-secondary: var(--text-secondary);
  --color-primary:     var(--accent);
  --color-border:      var(--border);
}

/* ── Base ── */
html {
  font-size: 14px;
  font-family: var(--font);
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  background: var(--page-bg);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0 0 16px; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 150ms;
}
a:hover { color: var(--accent-light); }

/* ── Login Screen ── */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 50%, #ecfeff 100%);
  padding: var(--spacing-lg);
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  animation: scaleUp 0.4s ease;
}

.login-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.login-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--spacing-md);
  display: block;
  filter: drop-shadow(0 4px 12px rgba(8,145,178,0.3));
  transition: all 0.3s ease;
}
.login-logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 6px 16px rgba(8,145,178,0.5));
}

.login-header h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.login-header p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.login-error {
  padding: var(--spacing-md);
  background: rgba(239,68,68,0.06);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-md);
  color: var(--error);
  font-size: 13px;
  display: none;
  animation: slideInFromTop 0.3s ease;
}
.login-error.active { display: block; }

.btn-full-width {
  width: 100%;
  justify-content: center;
  margin-top: var(--spacing-md);
}

/* ── App Shell ── */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ── Sidebar ── */
.sidebar {
  width: 240px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 1000;
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.sidebar-header {
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.logo-container:hover .logo { color: var(--accent); }

.company-logo {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(8,145,178,0.3));
  transition: all 0.3s ease;
}
.company-logo:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 4px 12px rgba(8,145,178,0.5));
}

.logo {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
  line-height: 1.2;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}
.sidebar-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  transition: 0.3s;
}

.sidebar-nav {
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
  height: 46px;
}
.nav-item:hover {
  background: var(--accent-subtle);
  color: var(--accent);
}
.nav-item.active {
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid rgba(8,145,178,0.2);
  font-weight: 600;
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── Main Content ── */
.main-content {
  flex: 1;
  margin-left: 240px;
  width: calc(100vw - 240px);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
  background: var(--page-bg);
}

/* ── Header ── */
.header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 68px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-xs);
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.rep-filter { display: flex; align-items: center; }

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
}

.page-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0;
}

.header h1 {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font);
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-primary);
  margin: 0;
}

.header-right {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
}

/* ── Buttons ── */
.btn-primary,
.btn-secondary {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  height: 42px;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border: 2px solid var(--accent);
  box-shadow: 0 2px 8px rgba(8,145,178,0.25);
}
.btn-primary:hover {
  background: #0e7490;
  border-color: #0e7490;
  box-shadow: 0 4px 16px rgba(8,145,178,0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 2px solid var(--border-strong);
}
.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
  color: var(--accent);
  transform: translateY(-1px);
}

/* ── View Containers ── */
.view-container {
  display: none;
  padding: 28px 32px;
  animation: fadeIn 0.3s ease;
  width: 100%;
  max-width: 100%;
}
.view-container.active { display: block; }

/* ── Animations ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slideInFromTop {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInFromRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}
@keyframes bellRing {
  0%,100% { transform: rotate(0deg); }
  10%,30%,50%,70%,90% { transform: rotate(-10deg); }
  20%,40%,60%,80%      { transform: rotate(10deg); }
}
@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(-24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes toastSlideOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-16px); }
}

/* ── Metrics Grid ── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
  width: 100%;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  height: 130px;
  display: flex;
  gap: 18px;
  align-items: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.5s ease;
}
.metric-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.metric-icon {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.metric-icon svg { width: 28px; height: 28px; }

.metric-content { flex: 1; }

.metric-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
}

.metric-value {
  font-size: 40px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

/* ── Section Header ── */
.section-header {
  margin: 32px 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 20px;
  width: 100%;
  min-height: 100px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease;
}
.card:hover { box-shadow: var(--shadow-md); }

/* ── Alerts ── */
.alerts-container {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.alert {
  padding: 18px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 14px;
  border-left: 4px solid;
  animation: slideInFromTop 0.4s ease;
  min-height: 72px;
}
.alert-error {
  background: rgba(239,68,68,0.06);
  border-color: var(--error);
  animation: pulse 2s infinite;
}
.alert-warning {
  background: rgba(245,158,11,0.08);
  border-color: var(--warning);
}
.alert svg { width: 22px; height: 22px; flex-shrink: 0; }
.alert-content { flex: 1; }
.alert-title { font-weight: 600; margin-bottom: 6px; font-size: 15px; }
.alert-text { font-size: 13px; color: var(--text-secondary); }

.empty-state {
  padding: var(--spacing-xl);
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

/* ── Pipeline Stats ── */
.pipeline-stats {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 16px;
  width: 100%;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.2s, transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-value {
  font-size: 30px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

/* ── Pipeline Board ── */
.pipeline-board {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 20px;
  width: 100%;
}

.pipeline-column {
  width: 310px;
  min-width: 290px;
  max-width: 340px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: 580px;
  box-shadow: var(--shadow-xs);
}

.column-header {
  background: var(--surface);
  padding: 14px 16px;
  border-bottom: 3px solid var(--accent);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  height: 58px;
}

.column-title {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font);
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  line-height: 1.2;
}
.column-count {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-top: 2px;
}

.column-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 520px;
  padding: 14px;
  overflow-y: auto;
}
.column-content.drag-over {
  background: var(--accent-subtle);
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 2px rgba(8,145,178,0.25);
  transition: all 0.25s ease;
}
.column-content:empty::after {
  content: 'No leads';
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px;
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
}

/* Stage tints (light) */
.pipeline-column[data-stage="new"]        { background: linear-gradient(to bottom, rgba(59,130,246,0.03), var(--surface-raised)); }
.pipeline-column[data-stage="attempting"] { background: linear-gradient(to bottom, rgba(245,158,11,0.04), var(--surface-raised)); }
.pipeline-column[data-stage="connected"]  { background: linear-gradient(to bottom, rgba(16,185,129,0.04), var(--surface-raised)); }
.pipeline-column[data-stage="qualified"]  { background: linear-gradient(to bottom, rgba(147,51,234,0.03), var(--surface-raised)); }
.pipeline-column[data-stage="offer_sent"] { background: linear-gradient(to bottom, rgba(245,158,11,0.04), var(--surface-raised)); }
.pipeline-column[data-stage="booked"]     { background: linear-gradient(to bottom, rgba(16,185,129,0.05), var(--surface-raised)); }
.pipeline-column[data-stage="nurture"]    { background: linear-gradient(to bottom, rgba(100,116,139,0.04), var(--surface-raised)); }

/* ── Lead Card ── */
.lead-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  min-height: 150px;
  cursor: pointer;
  transition: all 0.2s ease;
  animation: fadeIn 0.3s ease-out, slideUp 0.3s ease-out;
  box-shadow: var(--shadow-xs);
}
.lead-card:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(8,145,178,0.18);
  transform: translateY(-3px) scale(1.01);
}
.lead-card.dragging {
  opacity: 0.7;
  transform: scale(0.95);
  box-shadow: var(--shadow-lg);
  transition: none;
}
.lead-card.sla-violation  { border-left: 4px solid var(--error) !important; }
.lead-card.sla-warning    { border-left: 4px solid var(--warning) !important; }
.lead-card.sla-compliant  { border-left: 4px solid var(--success) !important; }

/* lead-type border helpers */
.lead-card-border-abandon-cart    { border-left: 3px solid #17A2B8 !important; }
.lead-card-border-payment-failure { border-left: 3px solid #ef4444 !important; }
.lead-card-border-call            { border-left: 3px solid #3B82F6 !important; }
.lead-card-border-email           { border-left: 3px solid #9333EA !important; }
.lead-card-border-campaign        { border-left: 3px solid #f59e0b !important; }
.lead-card-border-website         { border-left: 3px solid #10b981 !important; }

.lead-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 10px;
}
.lead-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.4;
  flex: 1;
}

/* Lead type badges */
.lead-type-badge {
  font-size: 11px;
  padding: 2px 8px;
  height: 20px;
  border-radius: var(--radius-full);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.lead-type-abandon-cart    { background: #17A2B8; color: #fff; }
.lead-type-payment-failure { background: #ef4444; color: #fff; }
.lead-type-call            { background: #3B82F6; color: #fff; }
.lead-type-email           { background: #9333EA; color: #fff; }
.lead-type-campaign        { background: #f59e0b; color: #fff; }
.lead-type-website         { background: #10b981; color: #fff; }

.lead-card-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.lead-info-item {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.lead-info-item svg { width: 14px; height: 14px; flex-shrink: 0; }

.lead-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* Conversion badges */
.conversion-badge-card {
  background: var(--success);
  color: #fff;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}
.conversion-badge-table {
  background: var(--success);
  color: #fff;
  padding: 5px 11px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.time-indicator { font-size: 12px; font-weight: 600; }
.time-indicator.overdue { color: var(--error); }
.time-indicator.warning { color: var(--warning); }
.time-indicator.good    { color: var(--success); }

/* ── Leads Table ── */
.leads-table-container { overflow-x: auto; width: 100%; }

.leads-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1100px;
}
.leads-table th {
  background: var(--surface-raised);
  padding: 13px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 2px solid var(--border-strong);
  height: 46px;
}
.leads-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-primary);
  height: 56px;
}
.leads-table tbody tr { transition: background 0.15s ease; }
.leads-table tbody tr:hover { background: var(--surface-raised); }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}
.badge-success { background: rgba(16,185,129,0.12); color: #059669; }
.badge-error   { background: rgba(239,68,68,0.12);  color: #dc2626; }
.badge-warning { background: rgba(245,158,11,0.12); color: #d97706; }
.badge-info    { background: rgba(8,145,178,0.12);  color: var(--accent); }

.table-action-btn {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s ease;
}
.table-action-btn:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
  color: var(--accent);
}

/* ── Analytics ── */
.analytics-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  text-align: center;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}
.analytics-card h4 {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.analytics-value {
  font-size: 44px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.analytics-subtext { font-size: 13px; color: var(--text-secondary); }

/* ── Funnel Chart ── */
.funnel-container { padding: 28px; width: 100%; }
.funnel-stage { margin-bottom: 28px; }
.funnel-header { display: flex; justify-content: space-between; margin-bottom: 8px; }
.funnel-label { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.funnel-value { font-size: 15px; color: var(--accent); font-weight: 600; }
.funnel-bar {
  height: 46px;
  background: var(--surface-raised);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}
.funnel-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  display: flex;
  align-items: center;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  transition: width 0.5s ease;
}

/* ── Modals ── */
.modal {
  display: none !important;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw; height: 100vh;
  background: rgba(15, 23, 42, 0.55) !important;
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  animation: fadeIn 0.25s ease;
}
.modal.active { display: flex !important; }

#addLeadModal,
#leadDetailModal,
#notificationModal,
#addUserModal,
.modal-overlay {
  display: none !important;
}
#addLeadModal.active,
#leadDetailModal.active,
#notificationModal.active,
#addUserModal.active,
.modal-overlay.active {
  display: flex !important;
}

.modal-content {
  background: var(--surface) !important;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalSlideIn 0.3s ease;
  margin: auto;
}
.modal-content.modal-large { max-width: 860px; }

.modal-header {
  background: var(--surface-raised) !important;
  border-bottom: 2px solid var(--border-strong) !important;
  padding: 22px 28px !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  position: sticky; top: 0; z-index: 10;
  flex-wrap: wrap;
  gap: 10px;
}
.modal-header h3 {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  font-family: var(--font) !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.modal-close {
  background: transparent;
  border: 1px solid var(--border-strong) !important;
  color: var(--text-secondary) !important;
  font-size: 22px;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex: 0 0 auto;
}
.modal-close:hover {
  background: rgba(239,68,68,0.08);
  border-color: var(--error) !important;
  color: var(--error) !important;
}

.modal-footer {
  background: var(--surface-raised);
  border-top: 1px solid var(--border-strong);
  padding: 18px 28px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  position: sticky; bottom: 0; z-index: 10;
}
.modal-footer .btn-primary,
.modal-footer .btn-secondary {
  padding: 10px 28px;
  height: 44px;
  min-width: 110px;
  justify-content: center;
}
.modal-footer .btn-secondary:hover {
  border-color: var(--error);
  background: rgba(239,68,68,0.06);
  color: var(--error);
}

/* Modal form area */
.modal form { padding: 0; margin: 0; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  padding: 28px;
  background: var(--surface);
}

/* Scrollbar — modal */
.modal-content::-webkit-scrollbar { width: 6px; }
.modal-content::-webkit-scrollbar-track { background: var(--surface-raised); border-radius: 0 var(--radius-xl) var(--radius-xl) 0; }
.modal-content::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
.modal-content::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Form Elements ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  align-items: start;
}
.form-group.full-width { grid-column: 1 / -1; }

.form-label,
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 12px;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control,
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface-raised) !important;
  border: 1.5px solid var(--border-strong) !important;
  border-radius: var(--radius-md);
  color: var(--text-primary) !important;
  font-size: 14px;
  font-family: var(--font);
  transition: all 0.2s ease;
  outline: none;
}
.form-control:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(8,145,178,0.15) !important;
  background: var(--surface) !important;
}
.form-control::placeholder { color: var(--text-muted); }

select.form-control,
.form-group select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 16px !important;
  padding-right: 36px !important;
}

textarea.form-control,
.form-group textarea {
  resize: vertical;
  min-height: 80px;
  font-family: var(--font);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
  padding: 8px 0;
}
.checkbox-label input[type="checkbox"] {
  width: 18px; height: 18px;
  cursor: pointer;
  accent-color: var(--accent);
}

.form-help-text {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* Discount fields container */
#discountFieldsContainer {
  grid-column: 1 / -1;
  background: rgba(8,145,178,0.04);
  border: 1px solid rgba(8,145,178,0.2);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-top: 6px;
}
#discountFieldsContainer h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
#discountFieldsContainer .form-grid { padding: 0; gap: 14px; }

/* ── User Profile ── */
.user-profile {
  position: relative;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s ease;
}
.user-profile:hover { background: var(--surface-raised); }

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.user-role {
  font-size: 11px;
  color: var(--text-secondary);
}

.user-dropdown {
  position: absolute;
  top: 100%; right: 0;
  margin-top: 6px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  min-width: 190px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 1001;
}
.user-dropdown.active { display: block; animation: fadeIn 0.2s ease; }

.user-dropdown-item {
  padding: 11px 15px;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s ease;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: 13px;
  font-family: var(--font);
}
.user-dropdown-item:hover { background: var(--accent-subtle); color: var(--accent); }
.user-dropdown-item:first-child { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.user-dropdown-item:last-child  { border-radius: 0 0 var(--radius-md) var(--radius-md); border-top: 1px solid var(--border); }

/* ── Notification Bell ── */
.notification-bell {
  position: relative;
  background: transparent;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 9px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
}
.notification-bell:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
  transform: scale(1.05);
}
.notification-bell svg {
  width: 18px; height: 18px;
  stroke: var(--text-secondary);
}
.notification-bell:hover svg { stroke: var(--accent); animation: bellRing 0.5s ease; }

.notification-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--error);
  color: #fff;
  border-radius: var(--radius-full);
  padding: 2px 5px;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  text-align: center;
  display: none;
  box-shadow: 0 2px 6px rgba(239,68,68,0.4);
}
.notification-badge.active { display: block; animation: pulse 2s infinite; }

/* ── Action Buttons (Lead Detail) ── */
.action-btn {
  background: var(--surface-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
}
.action-btn:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
  transform: scale(1.04);
}
.action-btn svg { width: 22px; height: 22px; color: var(--accent); }

/* ── Timeline ── */
.timeline { display: flex; flex-direction: column; gap: var(--spacing-md); }
.timeline-item {
  display: flex;
  gap: var(--spacing-md);
  position: relative;
  padding-left: var(--spacing-lg);
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 6px; top: 22px; bottom: -14px;
  width: 2px;
  background: var(--border-strong);
}
.timeline-item:last-child::before { display: none; }

.timeline-marker {
  position: absolute;
  left: 0;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--surface);
}

.timeline-content {
  flex: 1;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  transition: box-shadow 0.2s;
}
.timeline-content:hover { box-shadow: var(--shadow-sm); }

.timeline-header { display: flex; justify-content: space-between; margin-bottom: 6px; }
.timeline-type  { font-weight: 600; font-size: 13px; color: var(--accent); text-transform: uppercase; }
.timeline-time  { font-size: 11px; color: var(--text-muted); }
.timeline-notes { font-size: 13px; color: var(--text-secondary); }

/* ── Toast ── */
.toast-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  pointer-events: none;
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: var(--spacing-md) var(--spacing-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  animation: toastSlideIn 0.3s ease;
  pointer-events: all;
  min-width: 300px;
  max-width: 480px;
}
.toast.removing { animation: toastSlideOut 0.3s ease; }
.toast.success { border-left: 4px solid var(--success); }
.toast.error   { border-left: 4px solid var(--error); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.info    { border-left: 4px solid var(--accent); }
.toast-title   { font-weight: 600; font-size: 13px; margin-bottom: 3px; color: var(--text-primary); }
.toast-message { font-size: 12px; color: var(--text-secondary); }

/* ── Discount / Revenue Badges ── */
.discount-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  background: rgba(245,158,11,0.12);
  color: #d97706;
  border: 1px solid rgba(245,158,11,0.3);
}
.no-discount    { color: var(--text-muted); font-size: 12px; }
.price-display  { font-weight: 600; color: var(--text-primary); }
.revenue-display { font-weight: 700; color: var(--success); }
.booked-badge   { display: inline-flex; align-items: center; gap: 4px; color: var(--success); font-weight: 600; }

/* Payment badges */
.payment-pending { background: rgba(245,158,11,0.12); color: #d97706; border: 1px solid rgba(245,158,11,0.3); }
.payment-paid    { background: rgba(16,185,129,0.12); color: #059669; border: 1px solid rgba(16,185,129,0.3); }
.payment-partial { background: rgba(8,145,178,0.12);  color: var(--accent); border: 1px solid rgba(8,145,178,0.3); }
.payment-failed  { background: rgba(239,68,68,0.12);  color: #dc2626; border: 1px solid rgba(239,68,68,0.3); }

/* ── Lead Detail Modal ── */
#leadDetailModal .btn-edit {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 9px 20px !important;
  border-radius: var(--radius-md) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  border: 2px solid var(--accent) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  height: 40px !important;
  box-shadow: 0 2px 8px rgba(8,145,178,0.25) !important;
  transition: all 0.2s ease !important;
}
#leadDetailModal .btn-edit:hover {
  background: #0e7490 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px rgba(8,145,178,0.35) !important;
}

#leadDetailModal .lead-detail-content {
  padding: 24px !important;
  background: var(--surface) !important;
}

#leadDetailModal .lead-detail-info,
#leadDetailModal .lead-detail-actions,
#leadDetailModal .lead-detail-timeline,
#leadDetailModal #pricingDiscountSection,
#leadDetailModal #bookingRevenueSection {
  background: var(--surface-raised) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  padding: 22px !important;
  margin-bottom: 18px !important;
  box-shadow: var(--shadow-xs) !important;
}

#leadDetailModal .lead-detail-info h4,
#leadDetailModal .lead-detail-actions h4,
#leadDetailModal .lead-detail-timeline h4,
#leadDetailModal #pricingDiscountSection h4,
#leadDetailModal #bookingRevenueSection h4 {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--accent) !important;
  margin-bottom: 16px !important;
  padding-bottom: 10px !important;
  border-bottom: 2px solid rgba(8,145,178,0.2) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

#leadDetailModal .detail-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 12px !important;
}
#leadDetailModal .detail-item {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  padding: 12px !important;
  background: var(--surface) !important;
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--border) !important;
  transition: all 0.2s ease !important;
}
#leadDetailModal .detail-item:hover {
  border-color: rgba(8,145,178,0.3) !important;
  box-shadow: var(--shadow-xs) !important;
}
#leadDetailModal .detail-label {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: var(--text-muted) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}
#leadDetailModal .detail-value {
  font-size: 14px !important;
  color: var(--text-primary) !important;
  font-weight: 600 !important;
}

#leadDetailModal .action-buttons {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 12px !important;
  margin-top: 10px !important;
}
#leadDetailModal .action-btn {
  background: var(--surface) !important;
  border: 1.5px solid var(--border-strong) !important;
  border-radius: var(--radius-md) !important;
  padding: 18px 14px !important;
}
#leadDetailModal .action-btn:hover {
  border-color: var(--accent) !important;
  background: var(--accent-subtle) !important;
  box-shadow: 0 4px 14px rgba(8,145,178,0.15) !important;
}
#leadDetailModal .action-btn svg { color: var(--accent) !important; }

/* Conversion badges */
#leadDetailModal .conversion-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 8px 16px !important;
  border-radius: var(--radius-full) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  width: fit-content !important;
  border: 2px solid !important;
}
#leadDetailModal .conversion-low    { background: rgba(239,68,68,0.1) !important; color: #dc2626 !important; border-color: rgba(239,68,68,0.3) !important; }
#leadDetailModal .conversion-medium { background: rgba(245,158,11,0.1) !important; color: #d97706 !important; border-color: rgba(245,158,11,0.3) !important; }
#leadDetailModal .conversion-high   { background: rgba(16,185,129,0.1) !important; color: #059669 !important; border-color: rgba(16,185,129,0.3) !important; }

/* Timeline in lead detail */
#leadDetailModal .timeline { padding-left: 30px !important; }
#leadDetailModal .timeline-marker {
  background: var(--accent) !important;
  border: 3px solid var(--surface-raised) !important;
  box-shadow: 0 0 0 2px rgba(8,145,178,0.2) !important;
}
#leadDetailModal .timeline-content {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
}
#leadDetailModal .timeline-type { color: var(--accent) !important; }
#leadDetailModal .timeline-time { color: var(--text-muted) !important; }
#leadDetailModal .timeline-notes { color: var(--text-secondary) !important; }

/* Edit mode inputs in lead detail */
#leadDetailModal .detail-value input,
#leadDetailModal .detail-value select,
#leadDetailModal .detail-value textarea {
  width: 100% !important;
  padding: 9px 12px !important;
  background: var(--surface-raised) !important;
  border: 1.5px solid var(--border-strong) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-primary) !important;
  font-size: 13px !important;
  font-family: var(--font) !important;
}
#leadDetailModal .detail-value input:focus,
#leadDetailModal .detail-value select:focus,
#leadDetailModal .detail-value textarea:focus {
  outline: none !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(8,145,178,0.12) !important;
}

/* ── Lead Detail Section helpers ── */
.lead-detail-section {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}
.lead-detail-section h4 {
  font-size: 14px;
  color: var(--accent);
  margin-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--spacing-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}
.section-row.full { grid-template-columns: 1fr; }

/* ── Discount Metrics ── */
.discount-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
  padding: var(--spacing-lg);
}
.discount-metric-card {
  text-align: center;
  padding: var(--spacing-lg);
  background: var(--surface-raised);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.discount-metric-card h5 {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.discount-metric-card .value {
  font-size: 30px;
  font-weight: 700;
  color: #d97706;
}
.discount-metric-card .subtext {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: var(--spacing-xs);
}

/* ── Booking Modal ── */
.booking-summary {
  background: var(--surface-raised);
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: var(--spacing-md);
}
.booking-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.booking-summary-row:last-child {
  border-bottom: none;
  font-weight: 700;
  font-size: 17px;
  color: var(--success);
  padding-top: var(--spacing-md);
}
.booking-summary-label { color: var(--text-secondary); }
.booking-summary-value { color: var(--text-primary); font-weight: 600; }

/* ── Notification Modal ── */
#notificationModal .modal-content { width: min(92vw, 680px); }
.notification-list .notification-item,
#notificationList .notification-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  margin-bottom: 10px;
}
.notification-list .notification-actions,
#notificationList .notification-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.notification-list button,
#notificationList button {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-primary);
  cursor: pointer;
  white-space: nowrap;
}
.notification-list button:hover,
#notificationList button:hover {
  background: var(--accent-subtle);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Modal Header Actions ── */
.modal-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Settings Fixes ── */
.form-grid .form-group > button.btn-primary,
.form-grid .form-group > button.btn-secondary,
.form-grid .form-group > button {
  width: fit-content;
  max-width: 100%;
  justify-self: start;
  display: inline-flex;
}

/* ── Misc helpers ── */
.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.form-check input[type="checkbox"] {
  width: 17px; height: 17px;
  cursor: pointer;
  accent-color: var(--accent);
}
.form-check label {
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  margin: 0;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .pipeline-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-xl);
  }
  .sidebar.active { transform: translateX(0); }

  .main-content { margin-left: 0; width: 100vw; }

  .mobile-menu-btn { display: flex; }

  .metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .metric-card  { height: 110px; padding: 14px; }
  .metric-value { font-size: 30px; }

  .pipeline-stats { grid-template-columns: 1fr; }
  .stat-card { height: 90px; }
  .stat-value { font-size: 26px; }

  .pipeline-column { width: 280px; min-width: 260px; }
  .lead-card { min-height: 130px; padding: 14px; }

  .form-grid { grid-template-columns: 1fr; padding: 20px; }
  .section-row { grid-template-columns: 1fr; }
  .discount-metrics { grid-template-columns: 1fr; }

  .header-right { gap: var(--spacing-xs); }
  .btn-primary, .btn-secondary { padding: 8px 14px; font-size: 13px; height: 38px; }
  .page-title { font-size: 15px; }
  .rep-filter { display: none !important; }

  .modal-content { width: 95vw !important; max-width: 95vw !important; }
  .modal-header  { padding: 16px 18px !important; }
  .modal-header h3 { font-size: 17px !important; }
  .modal-close { width: 34px !important; height: 34px !important; font-size: 20px !important; }

  #leadDetailModal .detail-grid { grid-template-columns: 1fr !important; }
  #leadDetailModal .action-buttons { grid-template-columns: 1fr !important; }
  #leadDetailModal #pricingDiscountSection .section-row,
  #leadDetailModal #bookingRevenueSection .section-row { grid-template-columns: 1fr !important; }
}