/* ===================================================================
   Saved & Sent Apparel Co. — Executive E-Commerce & Printful CRM
   Light Theme: Crisp Editorial Luxury Streetwear & Frosted Glass
   =================================================================== */

:root {
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --border-subtle: #e2e8f0;
  --border-light: #cbd5e1;
  --border-focus: rgba(217, 119, 6, 0.45);
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  
  --gold-primary: #d97706;
  --gold-hover: #b45309;
  --gold-glow: rgba(217, 119, 6, 0.15);
  
  --status-emerald: #059669;
  --status-emerald-bg: #ecfdf5;
  --status-emerald-border: #a7f3d0;
  
  --status-blue: #0284c7;
  --status-blue-bg: #f0f9ff;
  --status-blue-border: #bae6fd;
  
  --status-amber: #d97706;
  --status-amber-bg: #fffbeb;
  --status-amber-border: #fde68a;
  
  --status-purple: #7c3aed;
  --status-purple-bg: #faf5ff;
  --status-purple-border: #e9d5ff;
  
  --status-rose: #e11d48;
  --status-rose-bg: #fff1f2;
  --status-rose-border: #fecdd3;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', var(--font-sans);
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  
  --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 0 0 1px var(--border-subtle);
  --shadow-card-hover: 0 12px 28px -4px rgba(15, 23, 42, 0.09), 0 0 0 1px var(--border-light);
  --shadow-glow: 0 0 25px -5px var(--gold-glow);
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  display: flex;
  overflow-x: hidden;
  background-image: 
    radial-gradient(at 0% 0%, rgba(217, 119, 6, 0.06) 0px, transparent 45%),
    radial-gradient(at 100% 0%, rgba(14, 165, 233, 0.06) 0px, transparent 40%),
    radial-gradient(at 50% 100%, rgba(124, 58, 237, 0.04) 0px, transparent 45%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.04) 0px, transparent 40%);
  background-attachment: fixed;
}

/* ===================================================================
   Sidebar Navigation (Light Theme)
   =================================================================== */

.crm-sidebar {
  width: 270px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform var(--transition-normal);
  box-shadow: 2px 0 16px rgba(15, 23, 42, 0.03);
}

.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.brand-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.brand-info h1 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-main);
  line-height: 1.2;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-primary);
  background: var(--status-amber-bg);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 2px;
  border: 1px solid var(--status-amber-border);
}

.sidebar-nav {
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 12px 10px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-item:hover {
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.04);
}

.nav-item.active {
  color: var(--text-main);
  background: rgba(217, 119, 6, 0.1);
  border-color: rgba(217, 119, 6, 0.25);
  font-weight: 600;
}

.nav-item.active .nav-icon {
  color: var(--gold-primary);
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--text-dim);
  transition: color var(--transition-fast);
}

.nav-item:hover .nav-icon {
  color: var(--text-main);
}

.nav-badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text-muted);
}

.nav-badge.gold {
  background: var(--status-amber-bg);
  color: var(--gold-primary);
  border: 1px solid var(--status-amber-border);
}

.nav-badge.blue {
  background: var(--status-blue-bg);
  color: var(--status-blue);
  border: 1px solid var(--status-blue-border);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-subtle);
  background: #f8fafc;
}

.printful-status-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-emerald);
  box-shadow: 0 0 6px var(--status-emerald);
  animation: pulseSync 2s infinite ease-in-out;
}

@keyframes pulseSync {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.store-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  padding: 9px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  transition: all var(--transition-fast);
}

.store-link-btn:hover {
  color: var(--gold-primary);
  border-color: rgba(217, 119, 6, 0.35);
  background: var(--status-amber-bg);
}

/* ===================================================================
   Main Content Layout
   =================================================================== */

.crm-main {
  margin-left: 270px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

.crm-topbar {
  height: 70px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 6px;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.topbar-breadcrumb span.current {
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.05rem;
  font-family: var(--font-display);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-clock-pill {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

.btn-primary:hover {
  background: #1e293b;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: var(--border-light);
}

.btn-outline-gold {
  background: var(--status-amber-bg);
  color: var(--gold-primary);
  border: 1px solid var(--status-amber-border);
}

.btn-outline-gold:hover {
  background: #fde68a;
  color: var(--gold-hover);
  border-color: #f59e0b;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.78rem;
  border-radius: 6px;
}

/* ===================================================================
   CRM Content & Views
   =================================================================== */

.crm-content {
  padding: 32px;
  flex: 1;
}

.view-section {
  display: none;
  animation: fadeIn 0.2s ease forwards;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.view-title-group h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.view-title-group p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 4px;
}

.view-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ===================================================================
   KPI Metrics Grid
   =================================================================== */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.kpi-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-card);
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  background: var(--bg-card-hover);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-primary), var(--status-emerald));
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.kpi-card:hover::before {
  opacity: 1;
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kpi-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.kpi-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-icon-wrap.gold { color: var(--gold-primary); background: var(--status-amber-bg); border: 1px solid var(--status-amber-border); }
.kpi-icon-wrap.emerald { color: var(--status-emerald); background: var(--status-emerald-bg); border: 1px solid var(--status-emerald-border); }
.kpi-icon-wrap.blue { color: var(--status-blue); background: var(--status-blue-bg); border: 1px solid var(--status-blue-border); }
.kpi-icon-wrap.purple { color: var(--status-purple); background: var(--status-purple-bg); border: 1px solid var(--status-purple-border); }

.kpi-value {
  font-family: var(--font-display);
  font-size: 1.95rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.kpi-subtext {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  margin-top: 8px;
  color: var(--text-dim);
}

.trend-up {
  color: var(--status-emerald);
  font-weight: 700;
}

/* ===================================================================
   Glass Panels & Cards (Light Theme)
   =================================================================== */

.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 28px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Split layout (2 columns) */
.dashboard-split-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr;
  gap: 24px;
  margin-bottom: 28px;
}

@media (max-width: 1100px) {
  .dashboard-split-grid {
    grid-template-columns: 1fr;
  }
}

/* ===================================================================
   Custom Tables (Light Theme)
   =================================================================== */

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  min-width: 260px;
  flex: 1;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 9px 12px 9px 38px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.85rem;
  outline: none;
  transition: all var(--transition-fast);
}

.search-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.filter-select {
  padding: 9px 14px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
}

.crm-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.crm-table th {
  background: #f8fafc;
  color: var(--text-dim);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.crm-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-muted);
  vertical-align: middle;
}

.crm-table tr:hover td {
  background: #f8fafc;
  color: var(--text-main);
}

.table-customer-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid var(--border-subtle);
  color: var(--gold-primary);
  font-weight: 700;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.customer-name {
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.88rem;
}

.customer-meta {
  color: var(--text-dim);
  font-size: 0.75rem;
}

/* ===================================================================
   Status Badges (Light Theme)
   =================================================================== */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-badge.emerald {
  background: var(--status-emerald-bg);
  color: var(--status-emerald);
  border: 1px solid var(--status-emerald-border);
}

.status-badge.blue {
  background: var(--status-blue-bg);
  color: var(--status-blue);
  border: 1px solid var(--status-blue-border);
}

.status-badge.amber, .status-badge.gold {
  background: var(--status-amber-bg);
  color: var(--gold-primary);
  border: 1px solid var(--status-amber-border);
}

.status-badge.purple {
  background: var(--status-purple-bg);
  color: var(--status-purple);
  border: 1px solid var(--status-purple-border);
}

.status-badge.rose {
  background: var(--status-rose-bg);
  color: var(--status-rose);
  border: 1px solid var(--status-rose-border);
}

/* ===================================================================
   Kanban Pipeline for Orders (Light Theme)
   =================================================================== */

.kanban-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  align-items: flex-start;
  margin-top: 14px;
}

.kanban-col {
  background: #f1f5f9;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 480px;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.kanban-col-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.kanban-count {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--text-dim);
  border: 1px solid var(--border-subtle);
}

.kanban-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.order-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  transition: all var(--transition-fast);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.order-card:hover {
  border-color: var(--gold-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.1);
}

.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.order-id {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-primary);
}

.order-customer {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.order-items-snippet {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 10px;
  line-height: 1.35;
}

.order-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  font-size: 0.78rem;
}

.order-financials {
  display: flex;
  flex-direction: column;
}

.order-total {
  font-weight: 800;
  color: var(--text-main);
}

.order-profit {
  font-size: 0.7rem;
  color: var(--status-emerald);
  font-weight: 700;
}

.printful-ref-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--status-blue-bg);
  color: var(--status-blue);
  border: 1px solid var(--status-blue-border);
}

/* ===================================================================
   Product Margin Calculator Grid (Light Theme)
   =================================================================== */

.margin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.margin-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  gap: 16px;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-card);
}

.margin-card:hover {
  border-color: rgba(217, 119, 6, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.margin-card-img {
  width: 84px;
  height: 84px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-subtle);
  background: #f8fafc;
}

.margin-card-body {
  flex: 1;
}

.margin-card-title {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.margin-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  padding: 10px;
  border-radius: var(--radius-sm);
  margin-top: 10px;
  font-size: 0.75rem;
}

.margin-stat-label {
  color: var(--text-dim);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
}

.margin-stat-val {
  font-weight: 800;
  color: var(--text-main);
  margin-top: 2px;
}

.margin-stat-val.profit {
  color: var(--status-emerald);
}

/* ===================================================================
   Printful API Console & Settings (High-Contrast Dark Terminal)
   =================================================================== */

.console-card {
  background: #090d16;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.console-header {
  background: #0e1424;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1e293b;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #94a3b8;
}

.console-body {
  padding: 18px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #38bdf8;
  max-height: 340px;
  overflow-y: auto;
  line-height: 1.6;
  white-space: pre-wrap;
  background: #090d16;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.88rem;
  font-family: var(--font-sans);
  outline: none;
  transition: all var(--transition-fast);
}

.form-control:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

/* ===================================================================
   Modals (Light Theme)
   =================================================================== */

.crm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.crm-modal-backdrop.active {
  display: flex;
}

.crm-modal-content {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  overflow: hidden;
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--text-main);
  background: #e2e8f0;
}

.modal-body {
  padding: 24px;
  max-height: 75vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* ===================================================================
   Toast Notification
   =================================================================== */

.crm-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  border: 1px solid #334155;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--transition-normal);
  pointer-events: none;
}

.crm-toast.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ===================================================================
   Responsive Mobile
   =================================================================== */

@media (max-width: 900px) {
  .crm-sidebar {
    transform: translateX(-100%);
  }

  .crm-sidebar.open {
    transform: translateX(0);
  }

  .crm-main {
    margin-left: 0;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .crm-topbar {
    padding: 0 16px;
  }

  .crm-content {
    padding: 20px 16px;
  }
}
