/* ═══════════════════════════════════════════════════════════════════════════
   DOOH Forecasting Platform — LG Electronics B2B
   Branding: Rojo #A50034 · Negro #000000 · Gris #58595B
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --lg-red:        #A50034;
  --lg-red-dark:   #7A0026;
  --lg-red-light:  #D4004A;
  --lg-black:      #000000;
  --lg-gray:       #58595B;
  --lg-gray-light: #F5F5F5;
  --lg-gray-mid:   #E0E0E0;
  --sidebar-w:     260px;
  --sidebar-collapsed: 64px;
  --header-h:      56px;
  --radius:        8px;
  --shadow:        0 1px 4px rgba(0,0,0,.12);
  --shadow-md:     0 4px 16px rgba(0,0,0,.16);
}

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

body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 14px;
  color: #1a1a1a;
  background: var(--lg-gray-light);
  line-height: 1.5;
}

/* ─── SCROLLBAR ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--lg-gray); }

/* ─── SIDEBAR ────────────────────────────────────────────────────────────── */
#sidebar {
  position: fixed; top: 0; left: 0; height: 100vh;
  width: var(--sidebar-w);
  background: var(--lg-black);
  display: flex; flex-direction: column;
  transition: width .25s ease;
  z-index: 100;
  overflow: hidden;
}
#sidebar.collapsed { width: var(--sidebar-collapsed); }

.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  height: var(--header-h); padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.sidebar-logo .logo-icon {
  width: 32px; height: 32px; border-radius: 6px;
  background: var(--lg-red);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-logo .logo-icon svg { width: 18px; height: 18px; fill: #fff; }
.sidebar-logo .logo-text { overflow: hidden; }
.sidebar-logo .logo-text .brand { color: #fff; font-weight: 700; font-size: 15px; line-height: 1.2; white-space: nowrap; }
.sidebar-logo .logo-text .sub   { color: #888; font-size: 10px; white-space: nowrap; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px; }
.nav-section-title {
  color: #555; font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  padding: 12px 8px 4px; white-space: nowrap; overflow: hidden;
}
#sidebar.collapsed .nav-section-title { opacity: 0; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 6px;
  color: #aaa; text-decoration: none;
  transition: background .15s, color .15s;
  white-space: nowrap; overflow: hidden;
  margin-bottom: 2px; position: relative;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: var(--lg-red); color: #fff; }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item .nav-label { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.nav-item .nav-badge {
  margin-left: auto; background: #ef4444; color: #fff;
  font-size: 10px; font-weight: 700; border-radius: 10px;
  padding: 1px 6px; flex-shrink: 0;
}
#sidebar.collapsed .nav-label,
#sidebar.collapsed .nav-badge,
#sidebar.collapsed .nav-section-title { display: none; }
#sidebar.collapsed .nav-item { justify-content: center; padding: 10px; }

/* Tooltip para collapsed */
#sidebar.collapsed .nav-item::after {
  content: attr(data-tooltip);
  position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%);
  background: #1a1a1a; color: #fff; font-size: 12px; padding: 4px 8px;
  border-radius: 4px; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .15s; z-index: 200;
}
#sidebar.collapsed .nav-item:hover::after { opacity: 1; }

.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 10px;
}
.sidebar-user {
  display: flex; align-items: center; gap: 8px;
  padding: 8px; border-radius: 6px;
  background: rgba(255,255,255,.05);
}
.sidebar-user .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--lg-red);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.sidebar-user .user-info { flex: 1; overflow: hidden; }
.sidebar-user .user-name { color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .user-role { color: #666; font-size: 10px; }
.sidebar-user .logout-btn { color: #666; text-decoration: none; flex-shrink: 0; }
.sidebar-user .logout-btn:hover { color: #ef4444; }
#sidebar.collapsed .sidebar-user .user-info,
#sidebar.collapsed .sidebar-user .logout-btn { display: none; }
#sidebar.collapsed .sidebar-user { justify-content: center; }

/* ─── HEADER ─────────────────────────────────────────────────────────────── */
#main-header {
  position: fixed; top: 0; right: 0;
  left: var(--sidebar-w);
  height: var(--header-h);
  background: var(--lg-black);
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
  z-index: 90;
  transition: left .25s ease;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
body.sidebar-collapsed #main-header { left: var(--sidebar-collapsed); }

.header-title { color: #fff; font-size: 14px; font-weight: 600; flex: 1; }
.header-breadcrumb { color: #666; font-size: 12px; }

.header-actions { display: flex; align-items: center; gap: 8px; }

.btn-f1 {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 5px;
  border: 1px solid rgba(255,255,255,.2);
  background: transparent; color: #aaa;
  font-size: 12px; cursor: pointer;
  transition: all .15s;
}
.btn-f1:hover { border-color: rgba(255,255,255,.4); color: #fff; }

.header-alerts-btn {
  position: relative; background: none; border: none;
  color: #aaa; cursor: pointer; padding: 6px;
  border-radius: 5px; transition: color .15s;
}
.header-alerts-btn:hover { color: #fff; }
.header-alerts-btn .badge-dot {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444; border: 2px solid var(--lg-black);
}

.header-lg-brand { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.header-lg-brand .lg-letters { color: var(--lg-red); font-size: 20px; font-weight: 900; letter-spacing: -1px; }
.header-lg-brand .lg-sub { color: #555; font-size: 9px; line-height: 1.2; }

.toggle-sidebar-btn {
  background: none; border: none; color: #aaa;
  cursor: pointer; padding: 6px; border-radius: 5px;
  transition: color .15s;
}
.toggle-sidebar-btn:hover { color: #fff; }

/* ─── MAIN CONTENT ───────────────────────────────────────────────────────── */
#main-content {
  margin-left: var(--sidebar-w);
  margin-top: var(--header-h);
  padding: 24px;
  min-height: calc(100vh - var(--header-h));
  transition: margin-left .25s ease;
}
body.sidebar-collapsed #main-content { margin-left: var(--sidebar-collapsed); }

/* ─── PAGE HEADER ────────────────────────────────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.page-header-left h1 { font-size: 20px; font-weight: 700; color: #111; }
.page-header-left p  { font-size: 13px; color: #666; margin-top: 2px; }
.page-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ─── CARDS ──────────────────────────────────────────────────────────────── */
.card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid #f0f0f0;
}
.card-header h3 { font-size: 14px; font-weight: 600; color: #111; }
.card-body { padding: 18px; }
.card-footer { padding: 12px 18px; border-top: 1px solid #f0f0f0; background: #fafafa; }

/* KPI Cards */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi-card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
  border-left: 4px solid var(--lg-red);
  position: relative; overflow: hidden;
}
.kpi-card.green  { border-left-color: #16a34a; }
.kpi-card.blue   { border-left-color: #2563eb; }
.kpi-card.orange { border-left-color: #d97706; }
.kpi-card.purple { border-left-color: #7c3aed; }
.kpi-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: #888; display: flex; align-items: center; gap: 5px;
}
.kpi-value { font-size: 26px; font-weight: 700; color: #111; margin: 6px 0 4px; line-height: 1; }
.kpi-sub   { font-size: 12px; color: #888; }
.kpi-trend { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; margin-top: 6px; }
.kpi-trend.up   { color: #16a34a; }
.kpi-trend.down { color: #dc2626; }
.kpi-icon {
  position: absolute; right: 14px; top: 14px;
  width: 40px; height: 40px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(165,0,52,.1); color: var(--lg-red);
}
.kpi-card.green  .kpi-icon { background: rgba(22,163,74,.1);  color: #16a34a; }
.kpi-card.blue   .kpi-icon { background: rgba(37,99,235,.1);  color: #2563eb; }
.kpi-card.orange .kpi-icon { background: rgba(217,119,6,.1);  color: #d97706; }
.kpi-card.purple .kpi-icon { background: rgba(124,58,237,.1); color: #7c3aed; }

/* ─── BUTTONS ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 6px; font-size: 13px;
  font-weight: 500; cursor: pointer; border: none;
  text-decoration: none; transition: all .15s; line-height: 1.4;
}
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 10px 20px; font-size: 15px; }
.btn-primary   { background: var(--lg-red); color: #fff; }
.btn-primary:hover { background: var(--lg-red-dark); }
.btn-secondary { background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; }
.btn-secondary:hover { background: #e5e7eb; }
.btn-success   { background: #16a34a; color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-warning   { background: #d97706; color: #fff; }
.btn-warning:hover { background: #b45309; }
.btn-danger    { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-outline   { background: transparent; border: 1px solid #d1d5db; color: #374151; }
.btn-outline:hover { background: #f9fafb; }
.btn-icon { padding: 6px; border-radius: 6px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ─── FORMS ──────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: #374151; margin-bottom: 5px; }
.form-label .required { color: var(--lg-red); margin-left: 2px; }
.form-control {
  width: 100%; padding: 8px 12px; border-radius: 6px;
  border: 1px solid #d1d5db; font-size: 13px; color: #111;
  background: #fff; transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-control:focus { border-color: var(--lg-red); box-shadow: 0 0 0 3px rgba(165,0,52,.1); }
.form-control::placeholder { color: #9ca3af; }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-hint { font-size: 11px; color: #9ca3af; margin-top: 3px; }
.form-error { font-size: 11px; color: #dc2626; margin-top: 3px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ─── TABLES ─────────────────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
  color: #6b7280; padding: 10px 14px;
  border-bottom: 2px solid #f0f0f0; white-space: nowrap;
}
td { padding: 11px 14px; border-bottom: 1px solid #f5f5f5; font-size: 13px; color: #374151; }
tr:hover td { background: #fafafa; }
tr:last-child td { border-bottom: none; }

/* ─── BADGES ─────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 12px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.badge-primary   { background: rgba(165,0,52,.1);  color: var(--lg-red); }
.badge-success   { background: rgba(22,163,74,.1);  color: #15803d; }
.badge-warning   { background: rgba(217,119,6,.1);  color: #b45309; }
.badge-danger    { background: rgba(220,38,38,.1);  color: #b91c1c; }
.badge-info      { background: rgba(37,99,235,.1);  color: #1d4ed8; }
.badge-secondary { background: #f3f4f6; color: #6b7280; }
.badge-orange    { background: rgba(234,88,12,.1);  color: #c2410c; }

/* ─── ALERTS ─────────────────────────────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-radius: 6px; margin-bottom: 16px;
  font-size: 13px;
}
.alert-danger  { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* ─── PROGRESS BARS ──────────────────────────────────────────────────────── */
.progress { height: 8px; background: #f0f0f0; border-radius: 4px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 4px; transition: width .3s ease; }
.progress-bar.red    { background: var(--lg-red); }
.progress-bar.green  { background: #16a34a; }
.progress-bar.orange { background: #d97706; }
.progress-bar.blue   { background: #2563eb; }

/* ─── TABS ───────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 2px; border-bottom: 2px solid #f0f0f0; margin-bottom: 20px; }
.tab-btn {
  padding: 8px 16px; font-size: 13px; font-weight: 500;
  color: #6b7280; background: none; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  cursor: pointer; transition: all .15s;
}
.tab-btn:hover { color: #111; }
.tab-btn.active { color: var(--lg-red); border-bottom-color: var(--lg-red); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ─── MODAL ──────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: #fff; border-radius: 10px; box-shadow: var(--shadow-md);
  width: 100%; max-width: 600px; max-height: 90vh;
  display: flex; flex-direction: column;
  transform: translateY(10px); transition: transform .2s;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-lg { max-width: 900px; }
.modal-xl { max-width: 1100px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid #f0f0f0; flex-shrink: 0;
}
.modal-header h3 { font-size: 16px; font-weight: 700; color: #111; }
.modal-close { background: none; border: none; cursor: pointer; color: #9ca3af; font-size: 20px; line-height: 1; }
.modal-close:hover { color: #374151; }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 14px 20px; border-top: 1px solid #f0f0f0;
  display: flex; justify-content: flex-end; gap: 8px; flex-shrink: 0;
}

/* ─── KANBAN ─────────────────────────────────────────────────────────────── */
.kanban-board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kanban-col {
  min-width: 240px; max-width: 260px; flex-shrink: 0;
  background: #f8f9fa; border-radius: 8px; padding: 12px;
}
.kanban-col-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.kanban-col-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.kanban-col-count { font-size: 11px; color: #888; background: #e5e7eb; padding: 1px 7px; border-radius: 10px; }
.kanban-card {
  background: #fff; border-radius: 6px; padding: 12px;
  box-shadow: var(--shadow); margin-bottom: 8px;
  border-left: 3px solid var(--lg-red); cursor: pointer;
  transition: box-shadow .15s, transform .1s;
}
.kanban-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kanban-card-title { font-size: 13px; font-weight: 600; color: #111; margin-bottom: 4px; }
.kanban-card-client { font-size: 11px; color: #888; margin-bottom: 6px; }
.kanban-card-footer { display: flex; align-items: center; justify-content: space-between; }
.kanban-card-value { font-size: 12px; font-weight: 700; color: var(--lg-red); }
.kanban-card-prob  { font-size: 11px; color: #888; }

/* ─── TOOLTIP ────────────────────────────────────────────────────────────── */
.tooltip-wrap { position: relative; display: inline-flex; align-items: center; }
.tooltip-icon {
  width: 16px; height: 16px; border-radius: 50%;
  background: #dbeafe; color: #2563eb;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; cursor: help;
  margin-left: 5px; flex-shrink: 0; border: 1px solid #bfdbfe;
}
.tooltip-box {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  left: calc(100% + 10px);
  background: #1e293b; color: #f1f5f9;
  font-size: 12px; font-weight: 400; line-height: 1.6;
  padding: 10px 14px; border-radius: 8px;
  width: 260px; max-width: 280px;
  white-space: normal; word-break: normal;
  pointer-events: none; opacity: 0; transition: opacity .2s;
  z-index: 9999; box-shadow: 0 8px 24px rgba(0,0,0,.35);
  text-align: left;
}
.tooltip-box::after {
  content: ''; position: absolute;
  top: 50%; transform: translateY(-50%);
  right: 100%;
  border: 6px solid transparent; border-right-color: #1e293b;
}
/* Variante para tooltips al final de fila (aparece a la izquierda) */
.tooltip-left .tooltip-box {
  left: auto; right: calc(100% + 10px);
}
.tooltip-left .tooltip-box::after {
  right: auto; left: 100%;
  border-right-color: transparent; border-left-color: #1e293b;
}
.tooltip-wrap:hover .tooltip-box { opacity: 1; }

/* ─── CHARTS ─────────────────────────────────────────────────────────────── */
.chart-container { position: relative; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #6b7280; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ─── FORECAST SELECTOR ──────────────────────────────────────────────────── */
.forecast-controls {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 20px;
}
.forecast-controls label { font-size: 12px; font-weight: 600; color: #374151; }
.horizon-slider { width: 200px; accent-color: var(--lg-red); }
.horizon-display {
  background: var(--lg-red); color: #fff;
  padding: 4px 12px; border-radius: 20px;
  font-size: 13px; font-weight: 700; min-width: 80px; text-align: center;
}

/* ─── SCREEN GRID ────────────────────────────────────────────────────────── */
.screens-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.screen-card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: box-shadow .15s;
}
.screen-card:hover { box-shadow: var(--shadow-md); }
.screen-card-header {
  background: var(--lg-black); color: #fff;
  padding: 12px 16px; display: flex; align-items: center; justify-content: space-between;
}
.screen-code { font-size: 16px; font-weight: 700; }
.screen-status { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.screen-status.active { background: rgba(22,163,74,.2); color: #4ade80; }
.screen-status.maintenance { background: rgba(217,119,6,.2); color: #fbbf24; }
.screen-card-body { padding: 14px 16px; }
.screen-location { font-size: 13px; font-weight: 600; color: #111; margin-bottom: 4px; }
.screen-address { font-size: 11px; color: #888; margin-bottom: 12px; }
.screen-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.screen-metric { text-align: center; }
.screen-metric-val { font-size: 18px; font-weight: 700; }
.screen-metric-lbl { font-size: 10px; color: #888; text-transform: uppercase; }

/* ─── HELP MODAL ─────────────────────────────────────────────────────────── */
.help-modal { max-width: 800px; }
.help-section { margin-bottom: 20px; }
.help-section h4 { font-size: 14px; font-weight: 700; color: #111; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 2px solid var(--lg-red); }
.help-section p  { font-size: 13px; color: #555; line-height: 1.6; margin-bottom: 6px; }
.help-shortcut { display: inline-flex; align-items: center; gap: 6px; margin: 2px 4px; }
.help-key { background: #f3f4f6; border: 1px solid #d1d5db; border-radius: 4px; padding: 2px 7px; font-size: 12px; font-family: monospace; font-weight: 600; }

/* ─── INSIGHTS ───────────────────────────────────────────────────────────── */
.insight-card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
  border-top: 3px solid var(--lg-red);
}
.insight-tag {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  background: rgba(165,0,52,.1); color: var(--lg-red); margin-bottom: 8px;
}
.insight-title { font-size: 15px; font-weight: 700; color: #111; margin-bottom: 6px; }
.insight-body  { font-size: 13px; color: #555; line-height: 1.6; }

/* ─── YIELD RULES ────────────────────────────────────────────────────────── */
.yield-rule-card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px;
  display: flex; align-items: center; gap: 14px;
}
.yield-rule-icon {
  width: 44px; height: 44px; border-radius: 8px;
  background: rgba(165,0,52,.1); color: var(--lg-red);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  #sidebar { transform: translateX(-100%); }
  #sidebar.mobile-open { transform: translateX(0); width: var(--sidebar-w); }
  #main-header { left: 0; }
  #main-content { margin-left: 0; padding: 16px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kanban-board { flex-direction: column; }
  .kanban-col { min-width: unset; max-width: unset; }
}

/* ─── UTILITIES ──────────────────────────────────────────────────────────── */
.text-red    { color: var(--lg-red); }
.text-success{ color: #16a34a; }
.text-warning{ color: #d97706; }
.text-danger { color: #dc2626; }
.text-muted  { color: #9ca3af; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.fw-bold     { font-weight: 700; }
.fw-600      { font-weight: 600; }
.d-flex      { display: flex; }
.align-center{ align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.p-0   { padding: 0; }
.w-100 { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid #f0f0f0; border-top-color: var(--lg-red); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 48px 20px; color: #9ca3af; }
.empty-state svg { width: 48px; height: 48px; margin: 0 auto 12px; opacity: .4; }
.empty-state p { font-size: 14px; }
