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

/* ── TOKENS ── */
:root {
  --bg:          #080D14;
  --surface:     #0D1420;
  --surface-2:   #131E2E;
  --surface-3:   #2A323F;
  --gold:        #E09F4F;
  --gold-dark:   #C47E2E;
  --gold-light:  #F4C98E;
  --gold-grad:   linear-gradient(90deg, #E09F4F 0%, #FFE0A3 50%, #C47E2E 100%);
  --gold-glow:   rgba(224,159,79,0.18);
  --gold-glow-sm:rgba(224,159,79,0.10);
  --grey:        #434C5E;
  --border:      rgba(255,255,255,0.08);
  --border-md:   rgba(255,255,255,0.13);
  --text:        #FFFFFF;
  --text-muted:  rgba(255,255,255,0.55);
  --text-dim:    rgba(255,255,255,0.25);
  --font-h:      'Montserrat', sans-serif;
  --font-b:      'Inter', sans-serif;
  --font-mono:   'JetBrains Mono', monospace;
  --sidebar-w:   240px;
  --radius:      8px;
  --radius-lg:   14px;
  --shadow-sm:   0 2px 12px rgba(0,0,0,0.4);
  --shadow-md:   0 8px 32px rgba(0,0,0,0.55);
  --shadow-deep: 0 20px 60px -20px rgba(0,0,0,0.8);
  --shadow-glow: 0 0 24px rgba(224,159,79,0.28);

  /* Emily status */
  --c-pendiente: #6366F1;
  --c-contactando:#F59E0B;
  --c-cita:      #E09F4F;
  --c-no-contest:#6B7280;
  --c-sin-interes:#EF4444;
  --c-cerrado:   #22C55E;
  --c-cliente:   #10B981;

  /* Temperatura */
  --c-hot:  #EF4444;
  --c-warm: #F59E0B;
  --c-cold: #6366F1;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-b);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(224,159,79,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(224,159,79,0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  z-index: 0;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
img { display: block; max-width: 100%; }

/* ── UTILS ── */
.hidden { display: none !important; }
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── LAYOUT ── */
.app-shell {
  display: flex;
  height: 100vh;
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.main-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
}
.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
}
.app-header { display: none; }

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  background: rgba(10,16,32,0.92);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 10;
}
.sidebar-logo {
  padding: 22px 20px 18px;
  font-family: var(--font-h);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  line-height: 1;
}
.sidebar-logo span { color: var(--gold); }
.sidebar-logo small {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}
.sidebar-nav {
  flex: 1;
  padding: 16px 10px;
  overflow-y: auto;
}
.nav-section-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 10px 10px 4px;
}
.nav-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  transition: background .15s, color .15s;
  text-align: left;
  border-left: 3px solid transparent;
}
.nav-btn:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text);
}
.nav-btn.active {
  background: var(--gold-glow);
  color: var(--gold);
  border-left-color: var(--gold);
  font-weight: 600;
}
.nav-btn svg { flex-shrink: 0; opacity: .8; }
.sidebar-footer {
  padding: 16px 18px;
  border-top: 1px solid var(--border);
}
.sidebar-user { font-size: 11px; color: var(--text-dim); margin-bottom: 2px; }
.sidebar-user-name {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold-light);
  margin-bottom: 8px;
  font-weight: 700;
}
.header-logout {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  padding: 0;
  transition: color .15s;
}
.header-logout:hover { color: var(--gold); }

/* ── KPI BAR ── */
.kpi-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.kpi-card {
  background: var(--surface);
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}
.kpi-card:first-child::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--gold-grad);
}
.kpi-value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
}
.kpi-value.gold { color: var(--gold); }
.kpi-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.kpi-chart-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
}
.kpi-card--chart {
  flex-direction: row;
  align-items: center;
  gap: 14px;
}

/* ── VIEW PANELS ── */
[data-view-panel] { min-height: 100%; }
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.view-title {
  font-family: var(--font-h);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.search-input {
  flex: 1;
  min-width: 180px;
  max-width: 280px;
  padding: 8px 12px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
}
.search-input:focus { border-color: var(--gold); }
.search-input::placeholder { color: var(--text-dim); }

/* ── FILTER TABS ── */
.filter-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-tab {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  transition: all .15s;
}
.filter-tab:hover { border-color: var(--gold); color: var(--gold); }
.filter-tab.active {
  background: var(--gold-glow);
  border-color: var(--gold);
  color: var(--gold);
  font-weight: 600;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius);
  border: none;
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font-b);
  transition: background .15s, box-shadow .15s, opacity .15s;
  cursor: pointer;
  white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: var(--gold);
  color: #0D1420;
}
.btn-primary:hover:not(:disabled) {
  background: var(--gold-dark);
  box-shadow: var(--shadow-glow);
}
.btn-secondary {
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--border-md);
}
.btn-secondary:hover:not(:disabled) { border-color: var(--gold); color: var(--gold); }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover:not(:disabled) { color: var(--text); border-color: var(--border-md); }
.btn-danger {
  background: rgba(239,68,68,0.15);
  color: #EF4444;
  border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover:not(:disabled) { background: rgba(239,68,68,0.25); }
.btn-sm { padding: 6px 14px; font-size: 12.5px; }
.btn-full { width: 100%; justify-content: center; }

/* ── FORM FIELDS ── */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.field input,
.field select,
.field textarea {
  padding: 9px 12px;
  background: var(--surface-3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: border-color .15s;
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--gold); }
.field select { cursor: pointer; }
.field textarea { resize: vertical; min-height: 72px; }
.field input::placeholder,
.field textarea::placeholder { color: var(--text-dim); }

/* Services checkboxes */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.service-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12.5px;
  color: var(--text-muted);
  transition: border-color .15s, color .15s;
}
.service-check:has(input:checked) {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-glow-sm);
}
.service-check input { width: 14px; height: 14px; accent-color: var(--gold); }

/* ── BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-pendiente { background: rgba(99,102,241,.18); color: #A5B4FC; }
.badge-contactando { background: rgba(245,158,11,.18); color: #FCD34D; }
.badge-cita-agendada { background: rgba(224,159,79,.18); color: var(--gold-light); }
.badge-no-contestado { background: rgba(107,114,128,.18); color: #9CA3AF; }
.badge-sin-interes { background: rgba(239,68,68,.18); color: #FCA5A5; }
.badge-cerrado { background: rgba(34,197,94,.18); color: #86EFAC; }
.badge-cliente { background: rgba(16,185,129,.22); color: #6EE7B7; }
.badge-hot { background: rgba(239,68,68,.18); color: #FCA5A5; }
.badge-warm { background: rgba(245,158,11,.18); color: #FCD34D; }
.badge-cold { background: rgba(99,102,241,.18); color: #A5B4FC; }
.badge-activo { background: rgba(16,185,129,.18); color: #6EE7B7; }
.badge-pausado { background: rgba(245,158,11,.18); color: #FCD34D; }
.badge-cancelado { background: rgba(239,68,68,.18); color: #FCA5A5; }
.badge-outbound { background: rgba(224,159,79,.15); color: var(--gold-light); }
.badge-inbound { background: rgba(99,102,241,.15); color: #A5B4FC; }

/* ── DATA TABLE ── */
.data-table-wrap {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.data-table-wrap table {
  width: 100%;
  border-collapse: collapse;
}
.data-table-wrap thead {
  background: var(--surface-3);
}
.data-table-wrap th {
  padding: 11px 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table-wrap td {
  padding: 12px 16px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-muted);
}
.data-table-wrap td:first-child { color: var(--text); font-weight: 500; }
.data-table-wrap tbody tr:hover { background: rgba(255,255,255,0.03); cursor: pointer; }
.data-table-wrap tbody tr:last-child td { border-bottom: none; }
.table-empty { text-align: center; padding: 40px; color: var(--text-dim); font-size: 13px; }

/* ── DETAIL PANEL ── */
.panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 100;
  display: flex;
  justify-content: flex-end;
}
.panel-overlay.hidden { display: none !important; }
.panel {
  width: 420px;
  max-width: 100vw;
  background: var(--surface-2);
  border-left: 1px solid var(--border);
  height: 100%;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: var(--shadow-deep);
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.panel-name {
  font-family: var(--font-h);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.panel-company { font-size: 13px; color: var(--text-muted); }
.panel-close {
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color .15s, background .15s;
}
.panel-close:hover { color: var(--text); background: rgba(255,255,255,0.08); }
.panel-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.panel-section-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.info-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13.5px;
}
.info-label {
  min-width: 80px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-family: var(--font-mono);
  flex-shrink: 0;
}
.mrr-preview {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -0.03em;
  text-align: center;
  padding: 10px 0 4px;
}
.call-item {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.call-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.call-item-date { font-size: 11px; color: var(--text-dim); font-family: var(--font-mono); }
.call-item-resumen {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  cursor: pointer;
}
.call-item-resumen.expanded {
  -webkit-line-clamp: unset;
}

/* ── PIPELINE KANBAN ── */
.pipeline-wrap {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
  min-height: 70vh;
  align-items: flex-start;
}
.pipeline-col {
  min-width: 200px;
  width: 200px;
  flex-shrink: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}
.pipeline-col-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pipeline-col-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.pipeline-col-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
}
.pipeline-col-count {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
}
.pipeline-col-mrr { font-family: var(--font-mono); }
.pipeline-cards {
  padding: 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 80px;
  transition: background .15s;
}
.pipeline-cards.drag-over { background: var(--gold-glow-sm); }
.pipeline-card {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  cursor: grab;
  transition: border-color .15s, box-shadow .15s;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pipeline-card:hover { border-color: var(--border-md); box-shadow: var(--shadow-sm); }
.pipeline-card:active { cursor: grabbing; }
.pipeline-card.dragging { opacity: .4; }
.pipeline-card-name { font-size: 13px; font-weight: 600; color: var(--text); }
.pipeline-card-empresa { font-size: 11px; color: var(--text-muted); }
.pipeline-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}
.temp-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pipeline-card-mrr {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold-light);
  font-weight: 700;
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.hidden { display: none !important; }
.modal {
  background: var(--surface-2);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-deep);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-family: var(--font-h);
  font-size: 16px;
  font-weight: 700;
}
.modal-close {
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 4px;
}
.modal-close:hover { color: var(--text); }
.modal-form {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 6px;
}

/* ── CHART LEGEND ── */
.chart-legend {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.chart-legend-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 18px;
  background: var(--surface-3);
  border: 1px solid var(--border-md);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  z-index: 9999;
  box-shadow: var(--shadow-md);
  animation: slideUp .25s ease;
  max-width: 320px;
}
.toast.success { border-color: rgba(16,185,129,.4); background: rgba(16,185,129,.12); color: #6EE7B7; }
.toast.error   { border-color: rgba(239,68,68,.4); background: rgba(239,68,68,.12); color: #FCA5A5; }
@keyframes slideUp { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── SETTINGS ── */
.settings-section {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}
.settings-section-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.settings-webhook-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.settings-webhook-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.settings-webhook-url {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  word-break: break-all;
  padding: 6px 10px;
  background: var(--surface-3);
  border-radius: var(--radius);
}
.outbound-trigger-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.outbound-last-run {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

/* ── SERVICES PILLS ── */
.services-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.service-pill {
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--gold-glow-sm);
  border: 1px solid rgba(224,159,79,.2);
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 500;
}

/* ── LOGIN PAGE ── */
body.login-page {
  display: flex;
  align-items: stretch;
  height: 100vh;
}
body.login-page::before { z-index: 0; }
.login-split {
  display: flex;
  width: 100%;
  position: relative;
  z-index: 1;
}
.login-brand {
  flex: 0 0 42%;
  background: linear-gradient(145deg, #080D14 0%, #0F1C2E 60%, #1A2333 100%);
  padding: 60px 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.login-brand::before {
  content: '';
  position: absolute;
  top: -80px; left: -80px;
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(224,159,79,0.22) 0%, transparent 65%);
  pointer-events: none;
}
.login-brand-logo {
  font-family: var(--font-h);
  font-weight: 900;
  font-size: 32px;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
  margin-bottom: 18px;
  position: relative;
}
.login-brand-logo span { color: var(--gold); }
.login-brand-divider {
  width: 48px; height: 2px;
  background: var(--gold-grad);
  border-radius: 2px;
  margin-bottom: 18px;
}
.login-brand-tagline {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 14px;
}
.login-brand-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 320px;
}
.login-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 40px;
}
.login-card-title {
  font-family: var(--font-h);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 28px;
  letter-spacing: -0.02em;
  text-align: center;
}
.login-form {
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login-error {
  color: #FCA5A5;
  font-size: 13px;
  text-align: center;
  padding: 9px 14px;
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.25);
  border-radius: var(--radius);
}

/* ── RESPONSIVE ── */
@media (max-width: 780px) {
  .app-shell { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    flex-direction: row;
    overflow-x: auto;
  }
  .sidebar-logo { display: none; }
  .sidebar-nav {
    display: flex;
    flex-direction: row;
    padding: 8px;
    gap: 4px;
    overflow-x: auto;
  }
  .nav-section-label { display: none; }
  .nav-btn { white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; border-radius: 6px 6px 0 0; }
  .nav-btn.active { border-left-color: transparent; border-bottom-color: var(--gold); }
  .sidebar-footer { display: none; }
  .kpi-bar { grid-template-columns: 1fr 1fr; }
  .app-content { padding: 16px; }
  .login-brand { display: none; }
  .login-card { padding: 40px 24px; }
  .pipeline-wrap { min-height: 50vh; }
  .panel { width: 100vw; }
}
