/* ============================================================
   NexusSales Design System — nexus.css
   Premium dark-sidebar admin UI
   ============================================================ */

/* ---------- Custom Properties ---------- */
:root {
  /* Brand */
  --brand-50:  #eff6ff;
  --brand-100: #dbeafe;
  --brand-200: #bfdbfe;
  --brand-300: #93c5fd;
  --brand-400: #60a5fa;
  --brand-500: #3b82f6;
  --brand-600: #2563eb;
  --brand-700: #1d4ed8;
  --brand-800: #1e40af;
  --brand-900: #1e3a8a;

  /* Neutral */
  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --slate-950: #020617;

  /* Semantic */
  --emerald-50:  #ecfdf5; --emerald-100: #d1fae5; --emerald-500: #10b981; --emerald-600: #059669; --emerald-700: #047857;
  --amber-50:  #fffbeb; --amber-100: #fef3c7; --amber-500: #f59e0b; --amber-600: #d97706; --amber-700: #b45309;
  --red-50:    #fef2f2; --red-100: #fee2e2; --red-500: #ef4444; --red-600: #dc2626; --red-700: #b91c1c;
  --purple-50: #faf5ff; --purple-100: #f3e8ff; --purple-500: #8b5cf6; --purple-600: #7c3aed; --purple-700: #6d28d9;
  --orange-50: #fff7ed; --orange-500: #f97316; --orange-600: #ea580c;
  --blue-50:   #eff6ff; --blue-100: #dbeafe; --blue-500: #3b82f6; --blue-600: #2563eb; --blue-700: #1d4ed8;
  --cyan-50:   #ecfeff; --cyan-100: #cffafe; --cyan-700: #0e7490;

  /* Layout */
  --sidebar-w: 260px;
  --header-h: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.08);
  --shadow-xl: 0 12px 40px rgba(0,0,0,.12);
  --shadow-card: 0 1px 3px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.02);
  --shadow-card-hover: 0 8px 24px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.04);

  /* Transitions */
  --ease: cubic-bezier(.4,0,.2,1);
  --dur: .2s;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--slate-50);
  color: var(--slate-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
table { border-collapse: collapse; width: 100%; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* ---------- Typography ---------- */
.font-mono { font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace; }
.text-xs { font-size: 0.75rem; line-height: 1.4; }
.text-sm { font-size: 0.875rem; line-height: 1.5; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leading-tight { line-height: 1.25; }

/* Colors */
.text-white { color: #fff; }
.text-slate-300 { color: var(--slate-300); }
.text-slate-400 { color: var(--slate-400); }
.text-slate-500 { color: var(--slate-500); }
.text-slate-600 { color: var(--slate-600); }
.text-slate-700 { color: var(--slate-700); }
.text-slate-800 { color: var(--slate-800); }
.text-brand { color: var(--brand-500); }
.text-emerald { color: var(--emerald-600); }
.text-emerald-600 { color: var(--emerald-600); }
.text-emerald-700 { color: var(--emerald-700); }
.text-amber { color: var(--amber-600); }
.text-amber-600 { color: var(--amber-600); }
.text-amber-700 { color: var(--amber-700); }
.text-red { color: var(--red-600); }
.text-red-500 { color: var(--red-500); }
.text-red-600 { color: var(--red-600); }
.text-red-700 { color: var(--red-700); }
.text-purple-600 { color: var(--purple-600); }
.text-blue-600 { color: var(--blue-600); }
.text-blue-700 { color: var(--blue-700); }
.text-orange-600 { color: var(--orange-600); }
.text-cyan-700 { color: var(--cyan-700); }

.text-right { text-align: right; }
.text-center { text-align: center; }
.text-left { text-align: left; }

/* ---------- Layout ---------- */
.app-layout { display: flex; min-height: 100vh; }
.main-content { flex: 1; margin-left: var(--sidebar-w); min-height: 100vh; }
.page-body { padding: 24px 32px; }

/* Grid system */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }

/* Flex */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }

/* Spacing */
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.ml-2 { margin-left: 8px; }
.ml-auto { margin-left: auto; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.p-6 { padding: 24px; }
.p-8 { padding: 32px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-5 { padding-left: 20px; padding-right: 20px; }
.px-6 { padding-left: 24px; padding-right: 24px; }
.px-8 { padding-left: 32px; padding-right: 32px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-5 { padding-top: 20px; padding-bottom: 20px; }
.py-6 { padding-top: 24px; padding-bottom: 24px; }
.min-w-0 { min-width: 0; }
.w-full { width: 100%; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-2xl { max-width: 42rem; }

.hidden { display: none; }
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; align-items: center; }
.relative { position: relative; }
.sticky { position: sticky; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }

/* ---------- SIDEBAR ---------- */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: linear-gradient(180deg, var(--slate-900) 0%, #0d1526 100%);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 40;
  border-right: 1px solid rgba(255,255,255,.06);
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.sidebar-logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(59,130,246,.3);
}
.sidebar-logo-icon svg { width: 20px; height: 20px; color: #fff; }
.sidebar-logo-text { font-weight: 700; font-size: 0.9rem; color: #fff; line-height: 1.2; }
.sidebar-logo-sub { font-size: 0.7rem; color: var(--slate-400); margin-top: 1px; }

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}
.sidebar-section {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-500);
  padding: 0 16px;
  margin-bottom: 8px;
}
.sidebar-section:not(:first-child) { margin-top: 24px; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  color: var(--slate-400);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--dur) var(--ease);
  margin-bottom: 2px;
}
.sidebar-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: .7;
  transition: opacity var(--dur) var(--ease);
}
.sidebar-link:hover {
  color: #fff;
  background: rgba(255,255,255,.07);
}
.sidebar-link:hover svg { opacity: 1; }

.sidebar-link.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(59,130,246,.25), rgba(59,130,246,.12));
  box-shadow: inset 0 0 0 1px rgba(59,130,246,.2);
}
.sidebar-link.active svg { opacity: 1; color: var(--brand-400); }

.sidebar-user {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.sidebar-user-avatar {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, rgba(59,130,246,.25), rgba(59,130,246,.1));
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--brand-300);
}
.sidebar-user-name { color: #fff; font-size: 0.85rem; font-weight: 500; }
.sidebar-user-role { color: var(--slate-500); font-size: 0.7rem; }
.sidebar-user-logout {
  color: var(--slate-500);
  transition: color var(--dur) var(--ease);
  display: flex;
  align-items: center;
}
.sidebar-user-logout:hover { color: #fff; }
.sidebar-user-logout svg { width: 18px; height: 18px; }

/* ---------- HEADER ---------- */
.app-header {
  background: #fff;
  border-bottom: 1px solid var(--slate-100);
  padding: 0 32px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 1px 3px rgba(0,0,0,.02);
}
.app-header h1 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--slate-800);
}
.app-header .subtitle {
  font-size: 0.75rem;
  color: var(--slate-400);
  margin-top: 1px;
}

/* ---------- CARDS ---------- */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-100);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.card:hover {
  box-shadow: var(--shadow-card-hover);
}
.card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--slate-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-700);
}
.card-body { padding: 24px; }
.card-link { color: var(--brand-500); font-size: 0.75rem; font-weight: 500; }
.card-link:hover { text-decoration: underline; }

/* KPI Card */
.kpi-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-100);
  box-shadow: var(--shadow-card);
  padding: 20px;
  transition: all .25s var(--ease);
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-400), var(--brand-600));
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.kpi-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
.kpi-card:hover::before { opacity: 1; }
.kpi-card .kpi-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-500);
}
.kpi-card .kpi-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--slate-800);
  margin-top: 8px;
}
.kpi-card .kpi-sub {
  font-size: 0.75rem;
  color: var(--slate-400);
  margin-top: 4px;
}
.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
.kpi-icon svg { width: 24px; height: 24px; }
.kpi-icon.blue   { background: var(--blue-50);   color: var(--blue-600); }
.kpi-icon.green  { background: var(--emerald-50); color: var(--emerald-600); }
.kpi-icon.amber  { background: var(--amber-50);   color: var(--amber-600); }
.kpi-icon.red    { background: var(--red-50);     color: var(--red-600); }
.kpi-icon.purple { background: var(--purple-50);  color: var(--purple-600); }
.kpi-icon svg { color: inherit; }

/* Master card (clickable) */
.master-card {
  display: block;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-100);
  box-shadow: var(--shadow-card);
  padding: 24px;
  transition: all .25s var(--ease);
}
.master-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
  border-color: var(--brand-200);
}

/* Dark banner card */
.banner-card {
  background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
  border-radius: var(--radius-lg);
  padding: 24px;
  color: #fff;
}

/* Section colored header */
.section-header-blue { background: linear-gradient(135deg, var(--brand-600), var(--brand-700)); padding: 12px 20px; color: #fff; font-weight: 600; font-size: .85rem; }
.section-header-green { background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600)); padding: 12px 20px; color: #fff; font-weight: 600; font-size: .85rem; }

/* Info box */
.info-box {
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.info-box h4 { font-size: .85rem; font-weight: 600; color: var(--blue-700); margin-bottom: 12px; }
.info-box li { font-size: .75rem; color: var(--blue-700); padding: 3px 0; }

/* ---------- BUTTONS ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  box-shadow: 0 2px 8px rgba(59,130,246,.25);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  box-shadow: 0 4px 16px rgba(59,130,246,.35);
  transform: translateY(-1px);
}
.btn-primary svg { width: 16px; height: 16px; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--slate-100);
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.btn-secondary:hover {
  background: var(--slate-200);
  border-color: var(--slate-300);
}
.btn-secondary svg { width: 16px; height: 16px; }

.btn-small {
  padding: 5px 12px;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--red-50);
  color: var(--red-600);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.btn-danger:hover { background: var(--red-100); }

/* ---------- TABLES ---------- */
.data-table { width: 100%; font-size: 0.8rem; }
.data-table thead th {
  background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 16px;
  white-space: nowrap;
}
.data-table tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--slate-50);
  vertical-align: middle;
}
.data-table tbody tr { transition: background var(--dur) var(--ease); }
.data-table tbody tr:nth-child(even) { background: var(--slate-50); }
.data-table tbody tr:nth-child(odd) { background: #fff; }
.data-table tbody tr:hover { background: rgba(59,130,246,.04); }

.data-table tfoot td {
  background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
  color: #fff;
  font-weight: 700;
  padding: 12px 16px;
  font-size: 0.75rem;
}
.data-table .empty-row td {
  text-align: center;
  padding: 48px 16px;
  color: var(--slate-400);
  font-size: 0.85rem;
}

/* Compact table */
.data-table.compact thead th { padding: 10px 12px; }
.data-table.compact tbody td { padding: 8px 12px; font-size: .75rem; }
.data-table.compact tfoot td { padding: 10px 12px; }

/* ---------- FORM INPUTS ---------- */
.input-field {
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--slate-800);
  background: #fff;
  transition: all var(--dur) var(--ease);
  outline: none;
  width: 100%;
}
.input-field:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.input-field::placeholder { color: var(--slate-400); }

select.input-field {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--slate-700);
  margin-bottom: 6px;
}
.form-hint {
  font-size: 0.7rem;
  color: var(--slate-400);
  margin-top: 4px;
}
.form-group { margin-bottom: 16px; }

/* Dark input (for login) */
.input-dark {
  background: var(--slate-800);
  border: 1px solid var(--slate-700);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.875rem;
  color: #fff;
  outline: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  width: 100%;
}
.input-dark:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.input-dark::placeholder { color: var(--slate-500); }

/* File upload zone */
.upload-zone {
  border: 2px dashed var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.upload-zone:hover {
  border-color: var(--brand-400);
  background: var(--blue-50);
}
.upload-zone svg { color: var(--slate-300); margin: 0 auto 8px; width: 32px; height: 32px; }
.upload-zone p { color: var(--slate-500); font-size: .85rem; }
.upload-zone .hint { color: var(--slate-400); font-size: .75rem; margin-top: 4px; }

/* ---------- BADGES ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.badge-pp  { background: var(--red-100);    color: var(--red-700); }
.badge-p   { background: var(--amber-100);  color: var(--amber-700); }
.badge-llp { background: var(--purple-100); color: var(--purple-700); }
.badge-oo  { background: var(--blue-100);   color: var(--blue-700); }
.badge-o   { background: var(--cyan-100);   color: var(--cyan-700); }

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
}
.status-success { background: var(--emerald-50); color: var(--emerald-700); }
.status-error   { background: var(--red-50);     color: var(--red-700); }
.status-warning { background: var(--amber-50);   color: var(--amber-700); }
.status-info    { background: var(--blue-50);     color: var(--blue-700); }
.status-neutral { background: var(--slate-100);   color: var(--slate-600); }

/* ---------- PROGRESS BARS ---------- */
.pct-bar {
  height: 7px;
  border-radius: 4px;
  background: var(--slate-200);
  overflow: hidden;
}
.pct-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .8s cubic-bezier(.4,0,.2,1);
}
.pct-fill.green  { background: linear-gradient(90deg, #34d399, var(--emerald-500)); }
.pct-fill.amber  { background: linear-gradient(90deg, #fbbf24, var(--amber-500)); }
.pct-fill.red    { background: linear-gradient(90deg, #f87171, var(--red-500)); }
.pct-fill.blue   { background: linear-gradient(90deg, #60a5fa, var(--brand-600)); }

/* ---------- ALERTS ---------- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; }
.alert-success { background: var(--emerald-50); border: 1px solid var(--emerald-100); color: var(--emerald-700); }
.alert-error   { background: var(--red-50);     border: 1px solid var(--red-100);     color: var(--red-700); }
.alert-info    { background: var(--blue-50);    border: 1px solid var(--blue-100);    color: var(--blue-700); }
.alert-warning { background: var(--amber-50);   border: 1px solid var(--amber-100);   color: var(--amber-700); }

/* ---------- SECTION TITLE ---------- */
.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--slate-800);
  margin-bottom: 16px;
}

/* ---------- DIVIDER LIST ---------- */
.divide-list > * + * { border-top: 1px solid var(--slate-50); }

/* ---------- LOGIN PAGE ---------- */
.login-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--slate-950);
  position: relative;
  overflow: hidden;
}
.login-bg::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59,130,246,.12), transparent 70%);
  border-radius: 50%;
}
.login-bg::after {
  content: '';
  position: absolute;
  bottom: -200px;
  left: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59,130,246,.08), transparent 70%);
  border-radius: 50%;
}
.login-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.03) 1px, transparent 0);
  background-size: 32px 32px;
}
.login-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 0 16px;
  z-index: 1;
}
.login-panel {
  background: rgba(30,41,59,.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: 0 24px 48px rgba(0,0,0,.2);
}
.login-panel h2 { color: #fff; font-size: 1.1rem; font-weight: 600; margin-bottom: 24px; }
.login-error {
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.15);
  color: #f87171;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: .85rem;
  margin-bottom: 20px;
}
.login-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  box-shadow: 0 4px 16px rgba(59,130,246,.25);
  margin-top: 8px;
}
.login-btn:hover {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  box-shadow: 0 6px 24px rgba(59,130,246,.35);
  transform: translateY(-1px);
}

/* ---------- SALESMAN DASHBOARD (standalone) ---------- */
.sm-nav {
  background: linear-gradient(135deg, var(--slate-900), #0d1526);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.sm-nav-logo {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sm-nav-logo svg { width: 16px; height: 16px; color: #fff; }
.sm-nav-btn {
  font-size: .75rem;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  border: none;
  color: #fff;
}
.sm-nav-btn.primary { background: var(--brand-600); }
.sm-nav-btn.primary:hover { background: var(--brand-700); }
.sm-nav-btn.ghost { background: rgba(255,255,255,.08); }
.sm-nav-btn.ghost:hover { background: rgba(255,255,255,.14); }
.sm-container { max-width: 80rem; margin: 0 auto; padding: 24px 16px; }

/* Salesman filter pills */
.filter-btn {
  font-size: .75rem;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--slate-200);
  background: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.filter-btn:hover { border-color: var(--brand-300); background: var(--blue-50); }
.filter-btn.active {
  background: var(--slate-800);
  color: #fff;
  border-color: var(--slate-800);
}

/* SM select dark */
.sm-select {
  background: var(--slate-800);
  border: 1px solid var(--slate-700);
  color: var(--slate-300);
  font-size: .75rem;
  border-radius: var(--radius-md);
  padding: 6px 10px;
  outline: none;
}

/* ---------- Shortfall / highlight boxes ---------- */
.stat-box {
  border-radius: var(--radius-md);
  padding: 12px;
}
.stat-box.red   { background: var(--red-50); }
.stat-box.blue  { background: var(--blue-50); }
.stat-box.green { background: var(--emerald-50); }
.stat-box .stat-box-label { font-size: .7rem; font-weight: 500; }
.stat-box .stat-box-value { font-size: .85rem; font-weight: 700; font-family: 'JetBrains Mono', monospace; margin-top: 2px; }
.stat-box.red .stat-box-label { color: var(--red-600); }
.stat-box.red .stat-box-value { color: var(--red-700); }
.stat-box.blue .stat-box-label { color: var(--blue-600); }
.stat-box.blue .stat-box-value { color: var(--blue-700); }
.stat-box.green .stat-box-label { color: var(--emerald-600); }
.stat-box.green .stat-box-value { color: var(--emerald-700); }

/* ---------- Salesman picker card ---------- */
.picker-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  transition: all .2s var(--ease);
}
.picker-card:hover {
  border-color: var(--brand-300);
  background: var(--blue-50);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.picker-avatar {
  width: 40px;
  height: 40px;
  background: var(--slate-100);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  color: var(--slate-600);
  transition: all .2s var(--ease);
}
.picker-card:hover .picker-avatar {
  background: var(--blue-100);
  color: var(--blue-700);
}

/* ---------- Checklist ---------- */
.checklist li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: .75rem;
}
.checklist-num {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-sm);
  background: rgba(59,130,246,.15);
  color: var(--blue-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .lg-col-span-2 { grid-column: span 1; }
}
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  .page-body { padding: 16px; }
  .app-header { padding: 0 16px; }
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .col-span-2, .col-span-3 { grid-column: span 1; }
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.page-body { animation: fadeIn .3s var(--ease); }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}
