/**
 * Hozina Internal CRM - Master Design System
 * Sleek Top Navigation Bar, Dynamic Font Sizing (Compact / Normal / Comfortable),
 * Lead Warmth Indicators, Smart Proposal Generator & Print-Ready Invoicing.
 */

:root {
  --crm-navy: #0b2d5b;
  --crm-navy-dark: #071d3c;
  --crm-navy-light: #133d75;
  --crm-blue: #007bff;
  --crm-blue-hover: #0056b3;
  --crm-cyan: #00c6ff;
  --crm-teal: #0d9488;
  --crm-green: #10b981;
  --crm-green-dark: #059669;
  --crm-whatsapp: #25d366;
  --crm-whatsapp-dark: #1ebc59;
  --crm-amber: #f59e0b;
  --crm-orange: #ea580c;
  --crm-rose: #ef4444;
  --crm-purple: #8b5cf6;
  
  --crm-bg: #f8fafc;
  --crm-card-bg: #ffffff;
  --crm-border: #e2e8f0;
  --crm-border-subtle: #f1f5f9;
  
  --crm-text-main: #0f172a;
  --crm-text-muted: #64748b;
  --crm-text-light: #94a3b8;
  
  --crm-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --crm-shadow: 0 4px 6px -1px rgba(11, 45, 91, 0.06), 0 2px 4px -2px rgba(11, 45, 91, 0.04);
  --crm-shadow-lg: 0 10px 25px -5px rgba(11, 45, 91, 0.1), 0 8px 10px -6px rgba(11, 45, 91, 0.04);
  --crm-radius: 10px;
  --crm-radius-sm: 6px;
  --crm-radius-lg: 14px;
  --crm-transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);

  /* Default Typography: Small, crisp, executive density (13.5px base) */
  --crm-font-base: 13.5px;
  --crm-body-size: 0.84rem;
  --crm-h1-size: 1.45rem;
  --crm-h2-size: 1.25rem;
  --crm-h3-size: 1.05rem;
  --crm-card-title-size: 0.95rem;
  --crm-table-font-size: 0.82rem;
  --crm-table-pad: 0.65rem 0.85rem;
  --crm-kpi-val-size: 1.5rem;
}

/* Typography Scales: Compact, Normal, Comfortable */
body.crm-font-compact {
  --crm-font-base: 12px;
  --crm-body-size: 0.78rem;
  --crm-h1-size: 1.3rem;
  --crm-h2-size: 1.15rem;
  --crm-h3-size: 0.95rem;
  --crm-card-title-size: 0.88rem;
  --crm-table-font-size: 0.76rem;
  --crm-table-pad: 0.5rem 0.75rem;
  --crm-kpi-val-size: 1.35rem;
}

body.crm-font-normal {
  --crm-font-base: 13.5px;
  --crm-body-size: 0.84rem;
  --crm-h1-size: 1.45rem;
  --crm-h2-size: 1.25rem;
  --crm-h3-size: 1.05rem;
  --crm-card-title-size: 0.95rem;
  --crm-table-font-size: 0.82rem;
  --crm-table-pad: 0.65rem 0.85rem;
  --crm-kpi-val-size: 1.5rem;
}

body.crm-font-comfortable {
  --crm-font-base: 15px;
  --crm-body-size: 0.92rem;
  --crm-h1-size: 1.65rem;
  --crm-h2-size: 1.35rem;
  --crm-h3-size: 1.15rem;
  --crm-card-title-size: 1.05rem;
  --crm-table-font-size: 0.88rem;
  --crm-table-pad: 0.85rem 1rem;
  --crm-kpi-val-size: 1.7rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: var(--crm-font-base);
  background-color: var(--crm-bg);
  color: var(--crm-text-main);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* TOP NAVIGATION BAR */
.crm-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, #0b2d5b 0%, #071d3c 100%);
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 18px rgba(11, 45, 91, 0.25);
  overflow: visible !important;
}

.crm-nav-container {
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  overflow: visible !important;
}

/* Brand Section in Top Nav */
.crm-nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  padding: 0.15rem 0;
}

.crm-topbar-logo {
  height: 38px;
  width: auto;
  max-width: 185px;
  object-fit: contain;
  display: block;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.crm-nav-brand:hover .crm-topbar-logo {
  opacity: 0.92;
  transform: scale(1.02);
}

/* Horizontal Nav Menu */
.crm-nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  overflow: visible !important;
  margin: 0 0.5rem;
}

.crm-nav-menu::-webkit-scrollbar {
  display: none;
}

.crm-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.65rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  border-radius: var(--crm-radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  transition: var(--crm-transition);
}

.crm-nav-item i {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
  transition: var(--crm-transition);
}

.crm-nav-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.crm-nav-item:hover i {
  color: var(--crm-cyan);
}

.crm-nav-item.active {
  background: rgba(0, 198, 255, 0.18);
  color: #ffffff;
  font-weight: 700;
  border-bottom: 2px solid var(--crm-cyan);
}

.crm-nav-item.active i {
  color: var(--crm-cyan);
}

.crm-nav-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.68rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-weight: 700;
  line-height: 1;
}

.crm-nav-badge.badge-new {
  background: var(--crm-blue);
}

/* CRM Top Navigation Dropdown Menu */
.crm-nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
}

.crm-nav-dropdown-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.65rem;
  color: rgba(255, 255, 255, 0.85);
  border-radius: var(--crm-radius-sm);
  transition: all 0.2s ease;
  user-select: none;
}

.crm-nav-dropdown-btn:hover,
.crm-nav-dropdown:hover .crm-nav-dropdown-btn,
.crm-nav-dropdown.is-open .crm-nav-dropdown-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.crm-nav-dropdown-btn.active {
  background: rgba(0, 198, 255, 0.18);
  color: #ffffff;
  font-weight: 700;
  border-bottom: 2px solid var(--crm-cyan);
}

.crm-nav-dropdown-btn.active i {
  color: var(--crm-cyan);
}

.crm-nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  min-width: 270px;
  background: #ffffff;
  color: #1e293b;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 16px 36px rgba(11, 45, 91, 0.25);
  padding: 0.5rem;
  z-index: 99999 !important;
}

/* Hover bridge so moving from button into menu never breaks hover */
.crm-nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 14px;
  background: transparent;
}

.crm-nav-dropdown:hover > .crm-nav-dropdown-menu,
.crm-nav-dropdown:focus-within > .crm-nav-dropdown-menu,
.crm-nav-dropdown.is-open > .crm-nav-dropdown-menu,
.crm-nav-dropdown-menu.is-open {
  display: flex !important;
  flex-direction: column !important;
  animation: qmFadeIn 0.15s ease;
}

.crm-nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.8rem;
  color: #1e293b;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  border-radius: var(--crm-radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
}

.crm-nav-dropdown-item:hover {
  background: #f1f5f9;
  color: var(--crm-blue);
}

.crm-nav-dropdown-item.active {
  background: #e0f2fe;
  color: #0284c7;
  font-weight: 600;
}

.crm-nav-dropdown-item i {
  font-size: 1rem;
  color: #64748b;
  width: 18px;
  text-align: center;
}

.crm-nav-dropdown-item:hover i,
.crm-nav-dropdown-item.active i {
  color: #0284c7;
}

.crm-dropdown-caret {
  transition: transform 0.2s ease;
}

.crm-nav-dropdown:hover .crm-dropdown-caret,
.crm-nav-dropdown.is-open .crm-dropdown-caret {
  transform: rotate(180deg);
}

.crm-nav-dropdown-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 0.35rem 0.5rem;
}

.crm-nav-dropdown-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  padding: 0.4rem 0.8rem 0.2rem;
}

/* Right Nav Actions */
.crm-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

/* Font Size Quick Switcher Pills */
.crm-font-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 2px;
}

.crm-font-pill {
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.7);
  padding: 0.18rem 0.45rem;
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--crm-transition);
}

.crm-font-pill:hover {
  color: #ffffff;
}

.crm-font-pill.is-active {
  background: var(--crm-blue);
  color: #ffffff;
}

.crm-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--crm-radius-sm);
  text-decoration: none;
  transition: var(--crm-transition);
}

.crm-top-btn.btn-lead {
  background: var(--crm-blue);
  color: #ffffff;
}

.crm-top-btn.btn-lead:hover {
  background: var(--crm-blue-hover);
}

.crm-top-btn.btn-site {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.crm-top-btn.btn-site:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* User Avatar & Dropdown */
.crm-user-menu {
  position: relative;
}

.crm-avatar-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #ffffff;
  padding: 0.2rem;
}

.crm-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--crm-blue), var(--crm-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  color: #ffffff;
}

.crm-user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  background: #ffffff;
  border-radius: var(--crm-radius);
  box-shadow: var(--crm-shadow-lg);
  border: 1px solid var(--crm-border);
  display: none;
  flex-direction: column;
  padding: 0.5rem;
  z-index: 1000;
  animation: qmFadeIn 0.15s ease;
}

.crm-user-dropdown.is-open {
  display: flex;
}

.crm-dropdown-header {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--crm-border);
  margin-bottom: 0.35rem;
}

.crm-dropdown-header strong {
  display: block;
  font-size: 0.85rem;
  color: var(--crm-navy);
}

.crm-dropdown-header span {
  font-size: 0.72rem;
  color: var(--crm-text-muted);
}

.crm-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: var(--crm-text-main);
  text-decoration: none;
  font-size: 0.82rem;
  border-radius: var(--crm-radius-sm);
  transition: var(--crm-transition);
}

.crm-dropdown-item:hover {
  background: #f1f5f9;
  color: var(--crm-blue);
}

.crm-dropdown-item.text-danger:hover {
  background: #fee2e2;
  color: var(--crm-rose);
}

/* Mobile Toggle */
.crm-mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #ffffff;
  cursor: pointer;
}

/* Mobile Dropdown Menu */
.crm-mobile-menu {
  display: none;
  background: #071d3c;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1.25rem 1.25rem;
  flex-direction: column;
  gap: 0.4rem;
}

.crm-mobile-menu.is-open {
  display: flex;
}

/* MAIN CONTENT CONTAINER */
.crm-main-container {
  max-width: 1680px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
  flex: 1;
}

/* PAGE HEADER */
.crm-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.35rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.crm-page-titles h1 {
  font-size: var(--crm-h1-size);
  font-weight: 800;
  color: var(--crm-navy);
  letter-spacing: -0.02em;
  margin-bottom: 0.15rem;
}

.crm-page-titles p {
  color: var(--crm-text-muted);
  font-size: var(--crm-body-size);
}

.crm-page-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* BUTTONS */
.crm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 0.95rem;
  font-size: var(--crm-body-size);
  font-weight: 600;
  border-radius: var(--crm-radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: var(--crm-transition);
  line-height: 1.2;
}

.crm-btn-primary {
  background: var(--crm-blue);
  color: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 123, 255, 0.25);
}

.crm-btn-primary:hover {
  background: var(--crm-blue-hover);
  transform: translateY(-1px);
}

.crm-btn-whatsapp {
  background: var(--crm-whatsapp);
  color: #ffffff;
  font-weight: 700;
}

.crm-btn-whatsapp:hover {
  background: var(--crm-whatsapp-dark);
  color: #ffffff;
  transform: translateY(-1px);
}

.crm-btn-secondary {
  background: #ffffff;
  color: var(--crm-text-main);
  border-color: var(--crm-border);
}

.crm-btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.crm-btn-danger {
  background: #fee2e2;
  color: var(--crm-rose);
  border-color: #fca5a5;
}

.crm-btn-danger:hover {
  background: var(--crm-rose);
  color: #ffffff;
}

.crm-btn-sm {
  padding: 0.32rem 0.6rem;
  font-size: 0.78rem;
  border-radius: 5px;
}

/* KPI CARDS GRID */
.crm-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.crm-kpi-card {
  background: var(--crm-card-bg);
  border-radius: var(--crm-radius);
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--crm-border);
  box-shadow: var(--crm-shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--crm-transition);
}

.crm-kpi-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--crm-shadow);
  border-color: #cbd5e1;
}

.crm-kpi-info {
  display: flex;
  flex-direction: column;
}

.crm-kpi-label {
  font-size: 0.74rem;
  color: var(--crm-text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.crm-kpi-value {
  font-size: var(--crm-kpi-val-size);
  font-weight: 800;
  color: var(--crm-navy);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.crm-kpi-sub {
  font-size: 0.74rem;
  color: var(--crm-text-muted);
  margin-top: 0.25rem;
}

.crm-kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--crm-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.crm-kpi-icon.blue { background: rgba(0, 123, 255, 0.1); color: var(--crm-blue); }
.crm-kpi-icon.teal { background: rgba(13, 148, 136, 0.1); color: var(--crm-teal); }
.crm-kpi-icon.green { background: rgba(16, 185, 129, 0.1); color: var(--crm-green); }
.crm-kpi-icon.amber { background: rgba(245, 158, 11, 0.1); color: var(--crm-amber); }
.crm-kpi-icon.purple { background: rgba(139, 92, 246, 0.1); color: var(--crm-purple); }

/* DASHBOARD 2-COLUMN SPLIT */
.crm-dash-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.35rem;
}

@media (max-width: 1080px) {
  .crm-dash-grid {
    grid-template-columns: 1fr;
  }
}

/* CARDS */
.crm-card {
  background: var(--crm-card-bg);
  border-radius: var(--crm-radius);
  border: 1px solid var(--crm-border);
  box-shadow: var(--crm-shadow-sm);
  margin-bottom: 1.35rem;
  overflow: hidden;
}

.crm-card-header {
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid var(--crm-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.crm-card-title {
  font-size: var(--crm-card-title-size);
  font-weight: 700;
  color: var(--crm-navy);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.crm-card-body {
  padding: 1.25rem;
}

.crm-card-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--crm-border);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* TODAY'S AUTOMATED AGENDA WIDGET */
.crm-agenda-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  background: #f8fafc;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-sm);
  margin-bottom: 0.5rem;
  transition: var(--crm-transition);
}

.crm-agenda-item:hover {
  background: #ffffff;
  border-color: var(--crm-blue);
  box-shadow: var(--crm-shadow-sm);
}

.crm-agenda-lead {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.crm-agenda-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.crm-agenda-icon.amber { background: #fef3c7; color: #d97706; }
.crm-agenda-icon.blue { background: #dbeafe; color: #2563eb; }
.crm-agenda-icon.green { background: #dcfce7; color: #16a34a; }

/* TABLES */
.crm-table-wrap {
  overflow-x: auto;
}

.crm-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: var(--crm-table-font-size);
}

.crm-table th {
  padding: 0.7rem 0.85rem;
  background: #f8fafc;
  font-weight: 700;
  color: var(--crm-text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--crm-border);
}

.crm-table td {
  padding: var(--crm-table-pad);
  border-bottom: 1px solid var(--crm-border-subtle);
  vertical-align: middle;
}

.crm-table tr:last-child td {
  border-bottom: none;
}

.crm-table tr:hover td {
  background: #fbfcfe;
}

/* ATTRIBUTION TAGS & BADGES */
.crm-attr-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.crm-attr-static { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.crm-attr-dynamic { background: #f3e8ff; color: #7e22ce; border: 1px solid #e9d5ff; }
.crm-attr-hero { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }
.crm-attr-crm { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }
.crm-attr-auto { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.crm-attr-default { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

/* LEAD WARMTH INDICATORS */
.crm-warmth-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.crm-warmth-hot {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.2);
}

.crm-warmth-warm {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.crm-warmth-normal {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* STATUS BADGES */
.crm-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
}

.crm-badge-new { background: #e0f2fe; color: #0284c7; }
.crm-badge-contacted { background: #dbeafe; color: #2563eb; }
.crm-badge-qualifying { background: #f3e8ff; color: #7c3aed; }
.crm-badge-proposal { background: #fef3c7; color: #d97706; }
.crm-badge-won { background: #dcfce7; color: #16a34a; }
.crm-badge-lost { background: #f1f5f9; color: #64748b; }
.crm-badge-paid { background: #dcfce7; color: #16a34a; }
.crm-badge-sent { background: #e0f2fe; color: #0284c7; }
.crm-badge-draft { background: #f1f5f9; color: #64748b; }
.crm-badge-overdue { background: #fee2e2; color: #dc2626; }

/* SEARCH & FILTERS */
.crm-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.crm-search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.crm-search-wrap i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--crm-text-light);
  font-size: 0.9rem;
}

.crm-search-input {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2.2rem;
  border: 1.5px solid var(--crm-border);
  border-radius: var(--crm-radius-sm);
  background: #ffffff;
  font-size: var(--crm-body-size);
  outline: none;
  transition: var(--crm-transition);
}

.crm-search-input:focus {
  border-color: var(--crm-blue);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.12);
}

.crm-select-filter {
  padding: 0.5rem 1.8rem 0.5rem 0.75rem;
  border: 1.5px solid var(--crm-border);
  border-radius: var(--crm-radius-sm);
  background: #ffffff;
  font-size: var(--crm-body-size);
  font-weight: 500;
  color: var(--crm-text-main);
  outline: none;
  cursor: pointer;
}

/* ACTIVITY FEED */
.crm-activity-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.crm-activity-item {
  display: flex;
  gap: 0.75rem;
}

.crm-activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  background: #f1f5f9;
  color: var(--crm-navy);
}

.crm-activity-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.crm-activity-text {
  font-size: var(--crm-body-size);
  color: var(--crm-text-main);
}

.crm-activity-meta {
  font-size: 0.74rem;
  color: var(--crm-text-muted);
  margin-top: 0.15rem;
}

/* TASKS */
.crm-task-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--crm-border-subtle);
}

.crm-task-item:last-child {
  border-bottom: none;
}

.crm-task-checkbox {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 4px;
  margin-top: 0.15rem;
  cursor: pointer;
  accent-color: var(--crm-blue);
}

.crm-task-content {
  flex: 1;
}

.crm-task-title {
  font-size: var(--crm-body-size);
  font-weight: 600;
  color: var(--crm-text-main);
}

.crm-task-item.completed .crm-task-title {
  text-decoration: line-through;
  color: var(--crm-text-muted);
}

.crm-task-due {
  font-size: 0.74rem;
  color: var(--crm-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.15rem;
}

.crm-task-due.overdue {
  color: var(--crm-rose);
  font-weight: 700;
}

/* FORMS */
.crm-form-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.crm-form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e293b;
}

.crm-form-control {
  width: 100%;
  padding: 0.55rem 0.8rem;
  border: 1.5px solid var(--crm-border);
  border-radius: var(--crm-radius-sm);
  background: #ffffff;
  font-size: var(--crm-body-size);
  color: var(--crm-text-main);
  outline: none;
  font-family: inherit;
  transition: var(--crm-transition);
}

.crm-form-control:focus {
  border-color: var(--crm-blue);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.12);
}

.crm-grid-form-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 680px) {
  .crm-grid-form-2 {
    grid-template-columns: 1fr;
  }
}

/* TOAST */
.crm-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--crm-navy);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--crm-radius);
  box-shadow: var(--crm-shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 99999;
  transform: translateY(140%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.crm-toast.is-show {
  transform: translateY(0);
}

/* INVOICE PAPER */
.crm-invoice-paper {
  background: #ffffff;
  padding: 2.25rem;
  border-radius: var(--crm-radius);
  border: 1px solid var(--crm-border);
  box-shadow: var(--crm-shadow);
  max-width: 820px;
  margin: 0 auto;
}

.crm-invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #f1f5f9;
  margin-bottom: 1.5rem;
}

.crm-invoice-meta {
  text-align: right;
}

.crm-invoice-num {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--crm-navy);
}

@media print {
  body {
    background: #ffffff !important;
  }
  .crm-navbar, .crm-page-header, .crm-btn, .no-print {
    display: none !important;
  }
  .crm-main-container {
    padding: 0 !important;
    max-width: 100% !important;
  }
  .crm-invoice-paper {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
}

/* RESPONSIVE TOP NAV */
@media (max-width: 1024px) {
  .crm-nav-menu {
    display: none;
  }
  .crm-mobile-toggle {
    display: inline-flex;
  }
}

/* ==========================================================================
   AUTOMATION, LEAD WARMTH & TODAY'S FOCUS AGENDA STYLES
   ========================================================================== */
.crm-warmth-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.crm-warmth-hot {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.1);
}

.crm-warmth-warm {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.1);
}

.crm-warmth-normal {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* TODAY'S AUTOMATED FOCUS AGENDA */
.crm-agenda-card {
  background: linear-gradient(135deg, #071d3c 0%, #0c2b55 100%);
  border-radius: var(--crm-radius);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(7, 29, 60, 0.25);
}

.crm-agenda-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.crm-agenda-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
}

.crm-agenda-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
}

.crm-agenda-item {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  padding: 0.95rem 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
  transition: transform 0.2s ease, background 0.2s ease;
}

.crm-agenda-item:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.crm-agenda-item-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.crm-agenda-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.crm-agenda-badge.badge-amber {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.crm-agenda-badge.badge-blue {
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.crm-agenda-badge.badge-green {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.crm-agenda-item-body strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.15rem;
}

.crm-agenda-item-body span {
  font-size: 0.8rem;
  color: #94a3b8;
}

.crm-agenda-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
  background: #ffffff;
  color: #071d3c;
  transition: all 0.15s ease;
  align-self: flex-start;
}

.crm-agenda-btn:hover {
  background: #38bdf8;
  color: #ffffff;
}

/* SMART PROPOSAL CARD & MODAL */
.crm-smart-proposal-card {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: var(--crm-radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.crm-smart-proposal-scope {
  background: #ffffff;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 0.85rem;
  font-family: monospace;
  font-size: 0.82rem;
  color: #1e293b;
  white-space: pre-wrap;
  margin: 0.75rem 0;
  max-height: 180px;
  overflow-y: auto;
}

/* ==========================================================================
   SETTINGS TABS & AUDIT TRAIL PAGINATION
   ========================================================================== */
.crm-tab-bar {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.crm-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #64748b;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.crm-tab-btn:hover {
  color: var(--crm-blue);
  background: rgba(0, 123, 255, 0.04);
  border-radius: 6px 6px 0 0;
}

.crm-tab-btn.is-active {
  color: var(--crm-blue);
  border-bottom-color: var(--crm-blue);
}

.crm-tab-content {
  display: none;
}

.crm-tab-content.is-active {
  display: block;
}

/* PAGINATION CONTROLS */
.crm-pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--crm-border);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.crm-pagination-info {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 500;
}

.crm-pagination-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.crm-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--crm-radius-sm);
  text-decoration: none;
  transition: all 0.15s ease;
}

.crm-page-link:hover:not(.disabled) {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: var(--crm-blue);
}

.crm-page-link.is-active {
  background: var(--crm-blue);
  border-color: var(--crm-blue);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.25);
}

.crm-page-link.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ==========================================================================
   MASTER POPUP / MODAL DESIGN SYSTEM (Pixel-matched with modern design)
   ========================================================================== */
.crm-modal-backdrop,
div[id$="Modal"] {
  background: rgba(15, 23, 42, 0.45) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 99999 !important;
}

.crm-modal,
div[id$="Modal"] > div {
  background: #ffffff !important;
  border-radius: 20px !important;
  border: 1px solid rgba(226, 232, 240, 0.85) !important;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(226, 232, 240, 0.8) !important;
  padding: 34px 36px 30px !important;
  position: relative !important;
  font-family: inherit !important;
  animation: crmModalFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes crmModalFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

div[id$="Modal"] > div > div:first-child,
.crm-modal-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 22px !important;
  padding-bottom: 0 !important;
  border-bottom: none !important;
}

div[id$="Modal"] h3,
.crm-modal-title {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  font-size: 1.45rem !important;
  font-weight: 800 !important;
  color: #0b1d3a !important;
  margin: 0 !important;
  letter-spacing: -0.02em !important;
}

div[id$="Modal"] h3 i,
.crm-modal-title i {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  border-radius: 50% !important;
  background: #e0edff !important;
  color: #0066f5 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 22px !important;
}

/* Close button */
div[id$="Modal"] button[onclick*="style.display='none'"],
.crm-modal-close {
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
  color: #64748b !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  padding: 0 !important;
}

div[id$="Modal"] button[onclick*="style.display='none'"]:hover,
.crm-modal-close:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  transform: scale(1.08) !important;
}

/* Form Controls */
.crm-form-group {
  margin-bottom: 16px !important;
  display: flex !important;
  flex-direction: column !important;
}

.crm-form-label {
  font-size: 13.5px !important;
  font-weight: 650 !important;
  color: #0f172a !important;
  margin-bottom: 7px !important;
  line-height: 1.3 !important;
}

.crm-form-control {
  width: 100% !important;
  height: 48px !important;
  border-radius: 12px !important;
  border: 1.5px solid #dce4ee !important;
  background: #f8fafc !important;
  font-size: 14px !important;
  color: #0f172a !important;
  padding: 0 16px !important;
  outline: none !important;
  transition: all 0.15s ease !important;
  font-family: inherit !important;
  box-sizing: border-box !important;
}

.crm-form-control::placeholder {
  color: #94a3b8 !important;
  font-size: 14px !important;
}

.crm-form-control:focus {
  background: #ffffff !important;
  border-color: #0066f5 !important;
  box-shadow: 0 0 0 3.5px rgba(0, 102, 245, 0.12) !important;
}

textarea.crm-form-control {
  height: auto !important;
  min-height: 96px !important;
  padding: 13px 16px !important;
  resize: vertical !important;
  line-height: 1.5 !important;
}

select.crm-form-control {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: calc(100% - 16px) center !important;
  padding-right: 40px !important;
  cursor: pointer !important;
}

.crm-grid-form-2 {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 16px !important;
}

/* Modal Buttons */
div[id$="Modal"] .crm-btn-secondary,
.crm-modal-footer .crm-btn-secondary {
  background: #edf2f7 !important;
  color: #334155 !important;
  font-weight: 650 !important;
  font-size: 14px !important;
  border-radius: 12px !important;
  padding: 11px 22px !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

div[id$="Modal"] .crm-btn-secondary:hover,
.crm-modal-footer .crm-btn-secondary:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

div[id$="Modal"] .crm-btn-primary,
.crm-modal-footer .crm-btn-primary {
  background: #0066f5 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  border-radius: 12px !important;
  padding: 11px 24px !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(0, 102, 245, 0.28) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

div[id$="Modal"] .crm-btn-primary:hover,
.crm-modal-footer .crm-btn-primary:hover {
  background: #0052cc !important;
  box-shadow: 0 6px 18px rgba(0, 102, 245, 0.38) !important;
  transform: translateY(-1px) !important;
}

/* ==========================================================================
   GLOBAL COMMAND PALETTE (CTRL + K) & EXECUTIVE SEARCH ENGINE
   ========================================================================== */

.crm-top-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  padding: 0.42rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.crm-top-search-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.crm-search-kbd {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #e2e8f0;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  line-height: 1.2;
}

.crm-palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 45, 91, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 1.25rem 2rem;
  animation: crmFadeIn 0.15s ease-out;
}

.crm-palette-dialog {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 660px;
  box-shadow: 0 25px 60px -15px rgba(11, 45, 91, 0.35), 0 0 0 1px rgba(11, 45, 91, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: crmSlideDown 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.crm-palette-input-wrap {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  gap: 0.75rem;
  background: #ffffff;
}

.crm-palette-search-icon {
  font-size: 1.25rem;
  color: #64748b;
  flex-shrink: 0;
}

.crm-palette-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--crm-navy);
  background: transparent;
  font-family: inherit;
}

.crm-palette-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.crm-palette-close-btn {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 6px;
  transition: all 0.12s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crm-palette-close-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.crm-palette-body {
  max-height: 440px;
  overflow-y: auto;
  padding: 0.75rem;
}

.crm-palette-section-title {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #94a3b8;
  padding: 0.5rem 0.75rem 0.35rem;
  text-transform: uppercase;
}

.crm-palette-items {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.crm-palette-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.12s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.crm-palette-item:hover,
.crm-palette-item.is-selected {
  background: #f1f5f9;
  transform: translateX(3px);
}

.crm-palette-item.is-selected {
  outline: 2px solid var(--crm-blue);
  background: #e0f2fe;
}

.crm-palette-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.crm-palette-item-icon.blue { background: #e0f2fe; color: #0284c7; }
.crm-palette-item-icon.green { background: #dcfce7; color: #16a34a; }
.crm-palette-item-icon.amber { background: #fef3c7; color: #d97706; }
.crm-palette-item-icon.whatsapp { background: #dcfce7; color: #15803d; }
.crm-palette-item-icon.purple { background: #ede9fe; color: #7c3aed; }
.crm-palette-item-icon.slate { background: #f1f5f9; color: #475569; }
.crm-palette-item-icon.rose { background: #fee2e2; color: #dc2626; }

.crm-palette-item-content {
  flex: 1;
  min-width: 0;
}

.crm-palette-item-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--crm-navy);
  margin-bottom: 0.15rem;
}

.crm-palette-item-sub {
  font-size: 0.76rem;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-palette-kbd {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.crm-palette-footer {
  border-top: 1px solid #e2e8f0;
  padding: 0.65rem 1.25rem;
  background: #f8fafc;
  display: flex;
  gap: 1.25rem;
  font-size: 0.74rem;
  color: #64748b;
}

.crm-palette-footer kbd {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-weight: 600;
}

@keyframes crmFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes crmSlideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   EXECUTIVE COMMAND CENTRE (DASHBOARD) WIDGETS
   ========================================================================== */

.crm-command-hero {
  background: linear-gradient(135deg, var(--crm-navy) 0%, #1e3a8a 100%);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  color: #ffffff;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: 0 10px 25px -5px rgba(11, 45, 91, 0.2);
}

.crm-command-hero h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
  color: #ffffff;
}

.crm-command-hero p {
  font-size: 0.88rem;
  color: #93c5fd;
  margin: 0;
}

.crm-nba-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.crm-nba-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--crm-blue);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  box-shadow: var(--crm-shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  transition: all 0.18s;
}

.crm-nba-card.urgency-critical {
  border-left-color: #ef4444;
  background: #fffdfd;
}

.crm-nba-card.urgency-urgent {
  border-left-color: #f59e0b;
}

.crm-nba-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--crm-shadow);
}

.crm-nba-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.crm-nba-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--crm-navy);
  margin-top: 0.25rem;
}

.crm-nba-reason {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.45;
  background: #f8fafc;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  border: 1px solid #f1f5f9;
}

.crm-nba-bottom {
  display: flex;
  justify-content: flex-end;
}

.crm-risk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.crm-risk-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
}

.crm-risk-card:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  transform: translateY(-1px);
}

.crm-risk-card-icon {
  font-size: 1.4rem;
  padding: 0.4rem;
  border-radius: 8px;
  line-height: 1;
}

.crm-risk-card-icon.danger { background: #fee2e2; color: #dc2626; }
.crm-risk-card-icon.warning { background: #fef3c7; color: #d97706; }

.crm-risk-card-content strong {
  display: block;
  font-size: 0.88rem;
  color: var(--crm-navy);
  margin-bottom: 0.15rem;
}

.crm-risk-card-content span {
  font-size: 0.76rem;
  color: #64748b;
  line-height: 1.35;
  display: block;
}

.crm-filter-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.5rem;
  overflow-x: auto;
}

.crm-filter-pill {
  padding: 0.38rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 650;
  background: #f1f5f9;
  color: #475569;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.crm-filter-pill:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.crm-filter-pill.active {
  background: var(--crm-navy);
  color: #ffffff;
}

/* ========================================================
   Phase 4: Project Delivery Manager & Workspace Styles
   ======================================================== */
.crm-health-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.crm-health-ontrack { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.crm-health-atrisk { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.crm-health-delayed { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.crm-health-completed { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }

.crm-blocker-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 5px solid #ef4444;
  border-radius: 8px;
  padding: 0.85rem 1.15rem;
  margin-bottom: 1.25rem;
  animation: pulseGlow 3s infinite alternate;
}
@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.1); }
  100% { box-shadow: 0 0 12px 2px rgba(239, 68, 68, 0.18); }
}
.crm-blocker-info { display: flex; align-items: flex-start; gap: 0.75rem; }
.crm-blocker-info i { font-size: 1.4rem; color: #dc2626; margin-top: 0.1rem; }
.crm-blocker-title { font-weight: 700; color: #991b1b; font-size: 0.92rem; }
.crm-blocker-sub { font-size: 0.82rem; color: #b91c1c; margin-top: 0.15rem; }

.crm-blocker-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #fee2e2;
  color: #b91c1c;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 650;
}

.crm-prj-progress-wrap {
  width: 100%;
  height: 7px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 0.35rem;
}
.crm-prj-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  border-radius: 9999px;
  transition: width 0.4s ease;
}

.crm-template-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.crm-template-card {
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #f8fafc;
}
.crm-template-card:hover {
  border-color: #93c5fd;
  background: #ffffff;
}
.crm-template-card.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 1px #2563eb;
}
.crm-template-icon {
  font-size: 1.25rem;
  color: #2563eb;
  margin-bottom: 0.35rem;
}
.crm-template-title { font-weight: 700; font-size: 0.85rem; color: #0f172a; }
.crm-template-desc { font-size: 0.75rem; color: #64748b; margin-top: 0.2rem; }

/* Milestone timeline list */
.crm-milestone-step {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.crm-milestone-step:last-child { border-bottom: none; }
.crm-milestone-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.crm-milestone-circle.completed { background: #10b981; color: #ffffff; }
.crm-milestone-circle.in_progress { background: #3b82f6; color: #ffffff; }
.crm-milestone-circle.blocked { background: #ef4444; color: #ffffff; }
.crm-milestone-circle.pending { background: #e2e8f0; color: #64748b; }

.crm-handover-gate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}
.crm-handover-gate.is-done {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

/* ==========================================================================
   Phase 5: Customer Workspace & Communication Timeline
   ========================================================================== */

/* Next-Best-Action (NBA) Hero Card */
.crm-nba-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}
.crm-nba-banner::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
}
.crm-nba-critical {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
  border: 1px solid #fecdd3;
}
.crm-nba-critical::before { background: #e11d48; }

.crm-nba-urgent {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
}
.crm-nba-urgent::before { background: #d97706; }

.crm-nba-normal {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
}
.crm-nba-normal::before { background: #2563eb; }

.crm-nba-content {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex: 1;
}
.crm-nba-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}
.crm-nba-critical .crm-nba-icon { background: #ffe4e6; color: #e11d48; }
.crm-nba-urgent .crm-nba-icon { background: #fef3c7; color: #d97706; }
.crm-nba-normal .crm-nba-icon { background: #dbeafe; color: #2563eb; }

.crm-nba-title {
  font-weight: 750;
  font-size: 1.05rem;
  color: #0f172a;
  margin-bottom: 0.2rem;
}
.crm-nba-reason {
  font-size: 0.88rem;
  color: #475569;
}

/* Missing Client Inputs Alert Card */
.crm-inputs-alert {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.crm-inputs-alert-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
}
.crm-inputs-alert-list {
  margin: 0;
  padding-left: 1.25rem;
  color: #78350f;
  font-size: 0.85rem;
}

/* Customer Financial Metrics Strip */
.crm-fin-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 900px) {
  .crm-fin-metrics { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .crm-fin-metrics { grid-template-columns: 1fr; }
}
.crm-fin-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.crm-fin-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.crm-fin-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}
.crm-fin-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
}

/* Context-Aware Communication Drafts */
.crm-drafts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
.crm-draft-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.crm-draft-card:hover {
  background: #ffffff;
  border-color: #cbd5e1;
}
.crm-draft-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.crm-draft-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.crm-draft-text {
  font-size: 0.84rem;
  color: #334155;
  line-height: 1.45;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 0.65rem;
  font-family: inherit;
}
.crm-draft-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

/* Unified Chronological Timeline */
.crm-timeline-wrap {
  position: relative;
  padding-left: 2.25rem;
}
.crm-timeline-wrap::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 17px;
  width: 2px;
  background: #e2e8f0;
}
.crm-timeline-entry {
  position: relative;
  margin-bottom: 1.25rem;
}
.crm-timeline-entry:last-child {
  margin-bottom: 0;
}
.crm-timeline-node {
  position: absolute;
  left: -2.25rem;
  top: 2px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #475569;
  z-index: 2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.crm-timeline-node.success { border-color: #10b981; color: #10b981; }
.crm-timeline-node.primary { border-color: #3b82f6; color: #3b82f6; }
.crm-timeline-node.purple { border-color: #8b5cf6; color: #8b5cf6; }
.crm-timeline-node.warning { border-color: #f59e0b; color: #f59e0b; }
.crm-timeline-node.info { border-color: #06b6d4; color: #06b6d4; }
.crm-timeline-node.secondary { border-color: #94a3b8; color: #64748b; }

.crm-timeline-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.85rem 1.1rem;
  transition: all 0.15s ease;
}
.crm-timeline-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.crm-timeline-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.crm-timeline-header-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #0f172a;
}
.crm-timeline-time {
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
}
.crm-timeline-desc {
  font-size: 0.84rem;
  color: #334155;
  line-height: 1.45;
  word-break: break-word;
}

/* Timeline Filter Tabs */
.crm-filter-tabs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}
.crm-filter-tab {
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.crm-filter-tab:hover {
  background: #e2e8f0;
}
.crm-filter-tab.is-active {
  background: #0066f5;
  color: #ffffff;
}

/* Update Generator Preview Box */
.crm-update-preview {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 1rem;
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: pre-wrap;
  margin-bottom: 1rem;
  color: #1e293b;
}

/* ==========================================================================
   Phase 6: Proposals, Scope, Documents & Digital Approvals
   ========================================================================== */

/* Proposal Document Container */
.crm-proposal-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}

/* Founder Preview Top Bar */
.crm-preview-bar {
  background: #0f172a;
  color: #f8fafc;
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
}
.crm-preview-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
}

/* Proposal Header / Hero */
.crm-proposal-hero {
  background: linear-gradient(135deg, #0b1528 0%, #172554 100%);
  color: #ffffff;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25);
}
.crm-proposal-hero::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(0, 102, 245, 0.3) 0%, rgba(0, 102, 245, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}
.crm-proposal-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
@media (max-width: 768px) {
  .crm-proposal-meta-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Proposal Quick Sticky Navigation */
.crm-prop-nav {
  position: sticky;
  top: 12px;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid #e2e8f0;
  border-radius: 30px;
  padding: 0.4rem 0.6rem;
  margin-bottom: 2rem;
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.crm-prop-nav-item {
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 650;
  color: #475569;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.crm-prop-nav-item:hover {
  background: #f1f5f9;
  color: #0066f5;
}

/* Proposal Content Sections */
.crm-prop-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}
.crm-prop-section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Deliverable Item */
.crm-deliverable-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #0066f5;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.crm-deliverable-card:last-child { margin-bottom: 0; }
.crm-deliverable-title {
  font-weight: 750;
  font-size: 0.96rem;
  color: #0f172a;
  margin-bottom: 0.35rem;
}
.crm-deliverable-desc {
  font-size: 0.86rem;
  color: #334155;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}
.crm-deliverable-criteria {
  font-size: 0.8rem;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  padding: 0.4rem 0.65rem;
  color: #0369a1;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Milestones & Pricing Breakdown */
.crm-milestone-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1rem 0;
}
.crm-milestone-table th {
  background: #f8fafc;
  padding: 0.75rem 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid #e2e8f0;
}
.crm-milestone-table td {
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

/* Exclusions & Scope Boundaries */
.crm-exclusions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
@media (max-width: 650px) {
  .crm-exclusions-grid { grid-template-columns: 1fr; }
}
.crm-exclusion-item {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.84rem;
  color: #9f1239;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

/* Fixed Bottom Action Dock for Clients */
.crm-prop-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-top: 1px solid #cbd5e1;
  padding: 0.85rem 1.5rem;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}
@media (max-width: 650px) {
  .crm-prop-dock {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }
}

/* Print / PDF Styles (Section 11.3) */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt !important;
  }
  .crm-navbar,
  .crm-preview-bar,
  .crm-prop-nav,
  .crm-prop-dock,
  .crm-modal,
  .no-print {
    display: none !important;
  }
  .crm-proposal-container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .crm-proposal-hero {
    background: #0f172a !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    padding: 1.5rem !important;
    border-radius: 8px !important;
    box-shadow: none !important;
  }
  .crm-prop-section {
    border: 1px solid #cccccc !important;
    box-shadow: none !important;
    break-inside: avoid;
    padding: 1.25rem !important;
    margin-bottom: 1rem !important;
  }
}
