/*
 * GovScout AI — Dashboard CSS
 * Diseño: Dark mode glassmorphism con acentos de color por módulo
 */

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

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

:root {
  --bg-base:       #060d1a;
  --bg-surface:    #0f1829;
  --bg-card:       #111e30;
  --bg-card-hover: #162540;
  --border:        rgba(99, 179, 237, 0.10);
  --border-accent: rgba(16, 185, 129, 0.30);

  --green:   #10b981;
  --green-l: #34d399;
  --red:     #ef4444;
  --red-l:   #f87171;
  --amber:   #f59e0b;
  --amber-l: #fbbf24;
  --blue:    #3b82f6;
  --blue-l:  #60a5fa;
  --purple:  #8b5cf6;
  --cyan:    #06b6d4;

  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #475569;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-card: 0 4px 32px rgba(0,0,0,0.45);
  --shadow-glow: 0 0 24px rgba(16,185,129,0.15);

  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* ─── Scrollbar ──────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: rgba(99,179,237,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--green); }

/* ─── Top accent bar ─────────────────────────────────────────────────────────── */
.accent-bar {
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--purple), var(--green));
  background-size: 300% 100%;
  animation: gradientShift 4s ease infinite;
  position: fixed;
  top: 0;
  z-index: 999;
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ─── Header ─────────────────────────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 3px;
  z-index: 100;
  background: rgba(9, 15, 26, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--green), var(--blue));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 16px rgba(16,185,129,0.4);
}
.logo-text {
  font-size: 1.15rem;
  font-weight: 800;
  background: linear-gradient(135deg, #e2e8f0, var(--green-l));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}
.logo-sub {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-left: 4px;
  align-self: flex-end;
  margin-bottom: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green-l);
  letter-spacing: 0.3px;
}
.status-dot {
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
  50%       { opacity: 0.8; box-shadow: 0 0 0 6px rgba(16,185,129,0); }
}

.last-update {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
#update-time { color: var(--text-secondary); font-family: var(--mono); }

.refresh-btn {
  width: 34px; height: 34px;
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: var(--radius-sm);
  color: var(--blue-l);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  transition: var(--transition);
}
.refresh-btn:hover { background: rgba(59,130,246,0.25); transform: rotate(180deg); }
.refresh-btn.spinning { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Layout ─────────────────────────────────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  grid-template-rows: auto;
  gap: 0;
  min-height: calc(100vh - 67px);
}

.main-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.sidebar {
  border-left: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  height: calc(100vh - 67px);
  position: sticky;
  top: 67px;
}

/* ─── Sección header ─────────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}

/* ─── KPI Cards ──────────────────────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  cursor: default;
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--kpi-color, var(--green));
}
.kpi-card:hover {
  border-color: var(--kpi-color, var(--green));
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.kpi-card .glow-bg {
  position: absolute;
  bottom: -30px; right: -20px;
  width: 90px; height: 90px;
  border-radius: 50%;
  background: var(--kpi-color, var(--green));
  opacity: 0.05;
  filter: blur(20px);
}
.kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.kpi-value {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -1px;
  font-feature-settings: 'tnum';
}
.kpi-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.kpi-icon {
  position: absolute;
  top: 16px; right: 16px;
  font-size: 22px;
  opacity: 0.5;
}
.kpi-change {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}
.kpi-change.up   { color: var(--green-l); background: rgba(16,185,129,0.12); }
.kpi-change.down { color: var(--red-l);   background: rgba(239,68,68,0.12); }

/* ─── Tabla de contratos ─────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Filtros */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.filter-btn:hover { border-color: var(--green); color: var(--green-l); }
.filter-btn.active { background: rgba(16,185,129,0.15); border-color: var(--green); color: var(--green-l); }

.search-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  color: var(--text-primary);
  font-size: 0.8rem;
  font-family: var(--font);
  outline: none;
  width: 200px;
  transition: var(--transition);
}
.search-input:focus { border-color: var(--blue); background: rgba(59,130,246,0.05); }
.search-input::placeholder { color: var(--text-muted); }

/* Tabla */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
}
thead tr {
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
}
th {
  padding: 12px 16px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  text-align: left;
  white-space: nowrap;
}
td {
  padding: 13px 16px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: middle;
}
tbody tr {
  transition: var(--transition);
  cursor: pointer;
}
tbody tr:hover { background: rgba(255,255,255,0.025); }
tbody tr:last-child td { border-bottom: none; }

.ocid-cell {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--blue-l);
}
.entity-cell {
  color: var(--text-primary);
  font-weight: 500;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.budget-cell {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--green-l);
  font-weight: 600;
  white-space: nowrap;
}
.actions-cell {
  display: flex;
  gap: 6px;
}

/* Badges de nicho */
.niche-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}
.niche-cafeteria   { background: rgba(245,158,11,0.15);  color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.niche-aseo        { background: rgba(6,182,212,0.15);   color: #22d3ee; border: 1px solid rgba(6,182,212,0.3); }
.niche-papeleria   { background: rgba(139,92,246,0.15);  color: #a78bfa; border: 1px solid rgba(139,92,246,0.3); }
.niche-computo     { background: rgba(59,130,246,0.15);  color: #93c5fd; border: 1px solid rgba(59,130,246,0.3); }
.niche-mobiliario  { background: rgba(236,72,153,0.15);  color: #f9a8d4; border: 1px solid rgba(236,72,153,0.3); }
.niche-veterinaria { background: rgba(34,197,94,0.15);   color: #86efac; border: 1px solid rgba(34,197,94,0.3); }
.niche-herramientas{ background: rgba(249,115,22,0.15);  color: #fdba74; border: 1px solid rgba(249,115,22,0.3); }
.niche-vehiculos   { background: rgba(99,102,241,0.15);  color: #c4b5fd; border: 1px solid rgba(99,102,241,0.3); }

/* P_viciado barra */
.pviciado-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 110px;
}
.pviciado-bar-bg {
  flex: 1;
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}
.pviciado-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}
.pviciado-score {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}
.risk-low      { color: var(--green);  }
.risk-medium   { color: var(--amber);  }
.risk-high     { color: #fb923c;       }
.risk-critical { color: var(--red);    }
.fill-low      { background: var(--green);  }
.fill-medium   { background: var(--amber);  }
.fill-high     { background: #fb923c;       }
.fill-critical { background: var(--red);    }

/* Margen badge */
.margin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--mono);
}
.margin-viable     { background: rgba(16,185,129,0.15); color: var(--green-l); border: 1px solid rgba(16,185,129,0.3); }
.margin-not-viable { background: rgba(239,68,68,0.10);  color: var(--red-l);   border: 1px solid rgba(239,68,68,0.2); }
.margin-na         { background: rgba(255,255,255,0.04); color: var(--text-muted); border: 1px solid var(--border); }

/* Status badges */
.status-open       { color: var(--green-l); }
.status-awarded    { color: var(--blue-l);  }
.status-cancelled  { color: var(--text-muted); }
.status-dot-open   { background: var(--green); }
.status-dot-awarded{ background: var(--blue); }

/* Action buttons */
.btn-icon {
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  transition: var(--transition);
}
.btn-icon:hover { border-color: var(--blue); color: var(--blue-l); background: rgba(59,130,246,0.1); }

/* Paginación */
.table-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.page-info { font-size: 0.75rem; color: var(--text-muted); }
.pagination { display: flex; gap: 6px; }
.page-btn {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
}
.page-btn:hover  { border-color: var(--green); color: var(--green-l); }
.page-btn.active { background: rgba(16,185,129,0.15); border-color: var(--green); color: var(--green-l); }

/* ─── Oportunidades de Dropshipping ──────────────────────────────────────────── */
.opps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 20px;
}

.opp-card {
  background: rgba(16,185,129,0.04);
  border: 1px solid rgba(16,185,129,0.15);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.opp-card::after {
  content: '💰';
  position: absolute;
  bottom: -5px; right: 6px;
  font-size: 36px;
  opacity: 0.07;
}
.opp-card:hover {
  border-color: rgba(16,185,129,0.40);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 16px rgba(16,185,129,0.1);
}
.opp-entity {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.opp-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.opp-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.opp-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.opp-stat-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.opp-stat-value {
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--mono);
}
.opp-margin { color: var(--green-l); }
.opp-budget { color: var(--cyan); }
.opp-wholesaler {
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  border: 1px solid var(--border);
  align-self: flex-end;
  margin-left: auto;
}

/* ─── Sidebar: Alertas ───────────────────────────────────────────────────────── */
.sidebar-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-badge {
  background: rgba(239,68,68,0.2);
  color: var(--red-l);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 0.65rem;
  font-weight: 700;
}
.sidebar-badge.amber { background: rgba(245,158,11,0.2); color: var(--amber-l); }
.sidebar-badge.blue  { background: rgba(59,130,246,0.2); color: var(--blue-l); }

.alert-item {
  background: rgba(239,68,68,0.05);
  border: 1px solid rgba(239,68,68,0.15);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 8px;
  transition: var(--transition);
  cursor: pointer;
}
.alert-item:hover { background: rgba(239,68,68,0.10); }
.alert-item.high  { border-color: rgba(245,158,11,0.2); background: rgba(245,158,11,0.05); }
.alert-item.high:hover { background: rgba(245,158,11,0.10); }

.alert-entity {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.alert-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.alert-score {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
}
.alert-mini-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  margin: 0 10px;
  overflow: hidden;
}
.alert-mini-fill {
  height: 100%;
  border-radius: 2px;
}
.alert-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Inteligencia sidebar items */
.intel-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  margin-bottom: 8px;
  transition: var(--transition);
  background: rgba(255,255,255,0.02);
}
.intel-item:hover { background: rgba(255,255,255,0.04); }
.intel-company {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.intel-contract {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--mono);
  margin-bottom: 6px;
}
.intel-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.intel-tag {
  font-size: 0.6rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.tag-fraud    { background: rgba(239,68,68,0.15);   color: var(--red-l);   }
.tag-ok       { background: rgba(16,185,129,0.12);  color: var(--green-l); }
.tag-mipyme   { background: rgba(245,158,11,0.15);  color: var(--amber-l); }
.tag-colusion { background: rgba(139,92,246,0.15);  color: #c4b5fd; }

/* Gráfico sidebar */
.chart-container { position: relative; height: 160px; width: 100%; }

/* ─── Skeleton loading ───────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.skeleton-row td { padding: 14px 16px; }
.sk-text {
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

/* ─── Toast notifications ────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  font-size: 0.82rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 340px;
}
.toast.success { border-color: rgba(16,185,129,0.4); }
.toast.error   { border-color: rgba(239,68,68,0.4); }
@keyframes slideIn { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }

/* ─── Modal detalle contrato ─────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.96) translateY(16px); } }
.modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.modal-title { font-size: 1rem; font-weight: 700; }
.modal-close {
  width: 30px; height: 30px;
  border: none;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { background: rgba(239,68,68,0.15); color: var(--red-l); }
.modal-body { padding: 24px; }
.modal-section { margin-bottom: 20px; }
.modal-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.modal-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.modal-field-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.modal-field-value {
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 500;
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.btn {
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  font-family: var(--font);
  text-decoration: none;
}
.btn-primary  { background: var(--green); color: #000; }
.btn-primary:hover { background: var(--green-l); transform: translateY(-1px); }
.btn-secondary { background: rgba(255,255,255,0.07); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover { background: rgba(255,255,255,0.12); }
.btn-danger   { background: rgba(239,68,68,0.15); color: var(--red-l); border: 1px solid rgba(239,68,68,0.3); }
.btn-danger:hover { background: rgba(239,68,68,0.25); }

/* ─── Empty state ────────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 40px; margin-bottom: 12px; opacity: 0.4; }
.empty-state p { font-size: 0.85rem; }

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .layout { grid-template-columns: 1fr; }
  .sidebar { height: auto; position: static; border-left: none; border-top: 1px solid var(--border); }
}
@media (max-width: 768px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .opps-grid { grid-template-columns: 1fr; }
  .main-content { padding: 14px; }
  .header { padding: 0 1rem; }
  .logo-sub { display: none; }
  .search-input { width: 140px; }
  .modal-grid { grid-template-columns: 1fr; }
}
