/**
 * AIVOC Platform — Tema Claro Corporativo
 * brand-light.css · Compartido por todas las verticales
 *
 * Paleta de marca:
 *   Naranja principal : #FF6600
 *   Naranja oscuro    : #CC5200
 *   Naranja suave     : #FFF0E6
 *   Gris principal    : #5C5C5C
 *   Gris claro        : #F4F4F4
 *   Blanco            : #FFFFFF
 *
 * El color de acento (--accent) lo define cada vertical.
 * Las demás variables de marca son constantes aquí.
 */

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

/* ── TOKENS GLOBALES ─────────────────────────────────────── */
:root {
  /* Marca */
  --brand-orange:      #FF6600;
  --brand-orange-dark: #CC5200;
  --brand-orange-mid:  #FF8533;
  --brand-orange-soft: #FFF0E6;
  --brand-orange-glow: rgba(255,102,0,.12);
  --brand-gray:        #5C5C5C;
  --brand-gray-mid:    #8A8A8A;
  --brand-gray-light:  #D1D1D1;

  /* Fondo — blanco a gris suave con toque naranja */
  --bg-base:     #FFFFFF;
  --bg-soft:     #FAF8F6;      /* blanco cálido */
  --bg-mid:      #F4F1EE;      /* gris-cálido sutil */
  --bg-sidebar:  #FFFFFF;
  --bg-card:     #FFFFFF;
  --bg-card-alt: #FAF8F6;
  --bg-input:    #F7F5F3;

  /* Bordes */
  --border:       rgba(92,92,92,.14);
  --border-mid:   rgba(92,92,92,.22);
  --border-brand: rgba(255,102,0,.28);

  /* Textos */
  --text-1: #1A1A1A;
  --text-2: #5C5C5C;
  --text-3: #9A9A9A;

  /* Estados */
  --green:  #16A34A;
  --green-bg: rgba(22,163,74,.08);
  --yellow: #CA8A04;
  --yellow-bg: rgba(202,138,4,.08);
  --red:    #DC2626;
  --red-bg: rgba(220,38,38,.08);
  --orange: #EA580C;

  /* Sombras */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,.09), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.05);
  --shadow-brand: 0 4px 20px rgba(255,102,0,.18);

  /* Radios */
  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px;

  /* Tipografía */
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Layout */
  --sidebar-w: 228px;
  --topbar-h:  72px;

  /* Accent por defecto (sobreescrito por cada vertical) */
  --accent:      #FF6600;
  --accent-dark: #CC5200;
  --accent-soft: #FFF0E6;
  --accent-glow: rgba(255,102,0,.12);
  --accent-text: #FF6600;
}

/* ── BASE ────────────────────────────────────────────────── */
body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-1);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── FONDO GLOBAL — degradado diagonal blanco→naranja muy suave ── */
.app-bg {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(255,102,0,.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(255,102,0,.04) 0%, transparent 50%),
    linear-gradient(160deg, #FFFFFF 0%, #FAF8F6 55%, #F4F0EB 100%);
}

/* ── LOGO ────────────────────────────────────────────────── */
.aivoc-logo-img {
  height: 36px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
.aivoc-logo-img-sm {
  height: 26px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
/* Logo variante oscura para sidebars blancos */
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-vertical-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-brand);
  background: var(--accent-soft);
  color: var(--accent);
  line-height: 1.4;
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
.sidebar-header {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border);
}
.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 10px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all .18s;
  font-family: var(--font);
}
.nav-item:hover {
  background: var(--bg-soft);
  color: var(--text-1);
}
.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.nav-icon { font-size: 15px; flex-shrink: 0; }
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.sidebar-user-name { font-size: 13px; font-weight: 600; color: var(--text-1); }
.sidebar-user-role { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.sidebar-logout {
  font-size: 11px; color: var(--text-3); margin-top: 10px;
  background: none; border: none; cursor: pointer; padding: 0;
  transition: color .18s; font-family: var(--font);
}
.sidebar-logout:hover { color: var(--red); }

/* ── MAIN ────────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  padding: 0 32px 56px;
  overflow-y: auto;
}

/* ── TOPBAR ──────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  position: sticky;
  top: 0;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  z-index: 40;
}
.topbar-left { display: flex; align-items: baseline; gap: 12px; }
.page-title { font-size: 20px; font-weight: 800; color: var(--text-1); letter-spacing: -.02em; }
.page-subtitle { font-size: 13px; color: var(--text-3); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.date-badge {
  font-size: 12px; color: var(--text-2);
  background: var(--bg-soft); border: 1px solid var(--border);
  padding: 6px 12px; border-radius: var(--r-sm);
}
.btn-upload-top {
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-orange-dark));
  color: #fff; font-size: 12px; font-weight: 700;
  padding: 8px 18px; border: none; border-radius: var(--r-sm);
  cursor: pointer; font-family: var(--font);
  transition: opacity .2s, transform .2s, box-shadow .2s;
  box-shadow: var(--shadow-brand);
}
.btn-upload-top:hover { opacity: .9; transform: translateY(-1px); }
.alert-bell { position: relative; font-size: 20px; cursor: pointer; padding: 6px; }
.bell-count {
  position: absolute; top: 0; right: 0;
  background: var(--red); color: white;
  font-size: 10px; font-weight: 700;
  width: 17px; height: 17px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ── KPI CARDS ───────────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 28px; }
@media(max-width:1100px) { .kpi-grid { grid-template-columns: repeat(2,1fr); } }
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
  position: relative;
  overflow: hidden;
}
.kpi-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.kpi-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--kpi-color, var(--accent));
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.kpi-label {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .07em; margin-bottom: 10px;
}
.kpi-value {
  font-size: 34px; font-weight: 800; color: var(--text-1);
  letter-spacing: -.03em; line-height: 1; margin-bottom: 8px;
}
.kpi-value span { font-size: 17px; font-weight: 500; color: var(--text-3); }
.kpi-delta { font-size: 12px; font-weight: 500; }
.kpi-delta.up   { color: var(--green); }
.kpi-delta.down { color: var(--red); }
.kpi-delta.neutral { color: var(--text-3); }
.kpi-icon { position: absolute; top: 18px; right: 18px; font-size: 24px; opacity: .13; }

/* ── PANEL GENÉRICO ──────────────────────────────────────── */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}
.panel-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
}
.panel-icon { font-size: 16px; }
.panel-header h2 { font-size: 14px; font-weight: 700; color: var(--text-1); flex: 1; }
.panel-badge {
  font-size: 11px; color: var(--text-3);
  background: var(--bg-soft); border: 1px solid var(--border);
  padding: 3px 10px; border-radius: 12px;
}

/* ── CHART ───────────────────────────────────────────────── */
.chart-tab {
  font-size: 12px; font-weight: 500; padding: 5px 12px;
  border-radius: var(--r-sm); border: 1px solid var(--border);
  background: none; color: var(--text-2); cursor: pointer;
  font-family: var(--font); transition: all .18s;
}
.chart-tab.active {
  background: var(--accent-soft); color: var(--accent);
  border-color: var(--border-brand); font-weight: 600;
}
.chart-container { position: relative; width: 100%; }

/* ── ALERTAS ─────────────────────────────────────────────── */
.alert-count-badge {
  font-size: 11px; font-weight: 700;
  background: var(--red-bg); color: var(--red);
  border: 1px solid rgba(220,38,38,.2);
  padding: 2px 10px; border-radius: 12px;
}
.alerts-list {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 290px; overflow-y: auto;
}
.alerts-list::-webkit-scrollbar { width: 3px; }
.alerts-list::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 3px; }
.alert-item {
  padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--red-bg); border: 1px solid rgba(220,38,38,.15);
  border-left: 3px solid var(--red); cursor: pointer; transition: background .18s;
}
.alert-item:hover { background: rgba(220,38,38,.12); }
.alert-item-agent { font-size: 12px; font-weight: 700; color: var(--red); margin-bottom: 3px; display: flex; align-items: center; gap: 8px; }
.alert-item-desc { font-size: 11px; color: var(--text-2); line-height: 1.4; }
.alert-item-time { font-size: 10px; color: var(--text-3); margin-top: 4px; font-family: var(--mono); }
.no-alerts { text-align: center; padding: 32px; color: var(--green); font-size: 13px; }

/* ── TABLA ───────────────────────────────────────────────── */
.table-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-select {
  background: var(--bg-input); border: 1px solid var(--border);
  color: var(--text-2); font-size: 12px; padding: 7px 10px;
  border-radius: var(--r-sm); font-family: var(--font); cursor: pointer;
  transition: border-color .18s;
}
.filter-select:focus { border-color: var(--brand-orange); outline: none; }
.filter-search {
  background: var(--bg-input); border: 1px solid var(--border);
  color: var(--text-1); font-size: 12px; padding: 7px 12px;
  border-radius: var(--r-sm); font-family: var(--font); outline: none; width: 200px;
  transition: border-color .18s;
}
.filter-search:focus { border-color: var(--brand-orange); }
.filter-search::placeholder { color: var(--text-3); }
.table-wrapper { overflow-x: auto; }
.calls-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.calls-table th {
  text-align: left; font-size: 10.5px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .07em;
  padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap;
  background: var(--bg-soft);
}
.calls-table th:first-child { border-radius: var(--r-xs) 0 0 var(--r-xs); }
.calls-table th:last-child  { border-radius: 0 var(--r-xs) var(--r-xs) 0; }
.calls-table td { padding: 11px 14px; border-bottom: 1px solid rgba(0,0,0,.04); color: var(--text-2); vertical-align: middle; }
.calls-table tr:hover td { background: var(--bg-soft); }
.calls-table tr:last-child td { border-bottom: none; }
.cell-time { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.cell-agent { font-weight: 600; color: var(--text-1); }
.cell-duration { font-family: var(--mono); font-size: 12px; }

/* Pills / badges */
.vertical-tag {
  font-size: 10px; font-weight: 700; padding: 2px 9px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid rgba(255,102,0,.2); white-space: nowrap;
}
.tipo-badge {
  font-size: 11px; padding: 3px 8px; border-radius: 8px;
  background: var(--bg-soft); color: var(--text-2);
  border: 1px solid var(--border);
}
.score-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 48px; padding: 3px 10px; border-radius: 20px; font-weight: 700; font-size: 12px;
}
.score-pill.high { background: var(--green-bg); color: var(--green); border: 1px solid rgba(22,163,74,.25); }
.score-pill.mid  { background: var(--yellow-bg); color: var(--yellow); border: 1px solid rgba(202,138,4,.25); }
.score-pill.low  { background: var(--red-bg);    color: var(--red);   border: 1px solid rgba(220,38,38,.25); }

.status-badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 20px; white-space: nowrap;
}
.status-badge.APROBADO { background: var(--green-bg);  color: var(--green);  border: 1px solid rgba(22,163,74,.2); }
.status-badge.ALERTA   { background: var(--yellow-bg); color: var(--yellow); border: 1px solid rgba(202,138,4,.2); }
.status-badge.CRITICO  { background: var(--red-bg);    color: var(--red);    border: 1px solid rgba(220,38,38,.2); }

.btn-ver {
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid rgba(255,102,0,.25); font-size: 11px; font-weight: 700;
  padding: 5px 13px; border-radius: var(--r-sm); cursor: pointer;
  font-family: var(--font); transition: all .18s; white-space: nowrap;
}
.btn-ver:hover { background: rgba(255,102,0,.15); transform: translateX(2px); }
.infraction-cell { font-weight: 700; }
.infraction-cell.zero { color: var(--green); }
.infraction-cell.low  { color: var(--yellow); }
.infraction-cell.high { color: var(--red); }
.table-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; font-size: 12px; color: var(--text-3); }

/* ── LOGIN ───────────────────────────────────────────────── */
#viewLogin {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%,   rgba(255,102,0,.10) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 0%   100%,  rgba(255,102,0,.07) 0%, transparent 55%),
    linear-gradient(160deg, #FFFFFF 0%, #FAF8F5 60%, #F5EFE8 100%);
}
.login-container { max-width: 560px; width: 100%; padding: 0 24px; text-align: center; position: relative; z-index: 1; }
.login-logo-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 32px; }
.login-logo-img { height: 56px; width: auto; }
.login-vertical-badge {
  font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  padding: 4px 14px; border-radius: var(--r-sm);
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--border-brand);
}
.login-title {
  font-size: clamp(24px,4vw,38px); font-weight: 800; letter-spacing: -.03em;
  line-height: 1.15; margin-bottom: 10px; color: var(--text-1);
}
.login-title .accent-word { color: var(--brand-orange); }
.login-subtitle { font-size: 14px; color: var(--text-2); margin-bottom: 6px; }
.login-tagline {
  font-size: 10px; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 28px;
}
.login-tagline span { color: var(--brand-orange); }
.role-cards { display: flex; flex-direction: column; gap: 12px; }
.role-card {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 22px; background: var(--bg-card);
  border: 1.5px solid var(--border); border-radius: var(--r-lg);
  cursor: pointer; transition: all .22s; text-align: left; width: 100%;
  box-shadow: var(--shadow-sm);
  font-family: var(--font);
}
.role-card:hover {
  border-color: var(--brand-orange); box-shadow: var(--shadow-brand);
  transform: translateY(-2px);
}
.role-icon { font-size: 26px; flex-shrink: 0; }
.role-info { flex: 1; }
.role-name { font-size: 14px; font-weight: 700; color: var(--text-1); margin-bottom: 1px; }
.role-persona { font-size: 13px; font-weight: 500; color: var(--brand-orange); margin-bottom: 2px; }
.role-desc { font-size: 12px; color: var(--text-3); line-height: 1.4; }
.role-arrow { font-size: 18px; color: var(--brand-gray-light); transition: transform .2s, color .2s; }
.role-card:hover .role-arrow { transform: translateX(4px); color: var(--brand-orange); }
.login-footer { font-size: 11px; color: var(--text-3); margin-top: 20px; }
.login-legal-badges { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 16px 0; }
.legal-badge {
  font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px;
  background: var(--bg-soft); color: var(--text-2);
  border: 1px solid var(--border);
}

/* ── DETALLE ─────────────────────────────────────────────── */
.detail-topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 32px; border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.95); backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 50; flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.btn-back-dash {
  background: var(--bg-soft); border: 1px solid var(--border);
  color: var(--text-2); font-size: 13px; padding: 8px 16px;
  border-radius: var(--r-sm); cursor: pointer; font-family: var(--font);
  transition: all .18s;
}
.btn-back-dash:hover { border-color: var(--brand-orange); color: var(--text-1); }
.detail-breadcrumb { flex: 1; font-size: 13px; color: var(--text-3); }
.btn-notify {
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--border-brand); font-size: 12px; font-weight: 600;
  padding: 8px 16px; border-radius: var(--r-sm); cursor: pointer;
  font-family: var(--font); transition: all .18s;
}
.btn-notify:hover { background: rgba(255,102,0,.15); }
.btn-export-detail {
  background: linear-gradient(135deg, var(--brand-orange), var(--brand-orange-dark));
  color: white; font-size: 12px; font-weight: 700;
  padding: 8px 16px; border: none; border-radius: var(--r-sm);
  cursor: pointer; font-family: var(--font); transition: opacity .2s;
  box-shadow: var(--shadow-brand);
}
.btn-export-detail:hover { opacity: .9; }

/* Transcripción */
.panel-transcript { position: sticky; top: 68px; max-height: calc(100vh - 100px); overflow: hidden; display: flex; flex-direction: column; }
.transcript-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-right: 6px; }
.transcript-body::-webkit-scrollbar { width: 3px; }
.transcript-body::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 3px; }
.transcript-line { display: flex; gap: 10px; align-items: flex-start; animation: fadeIn .28s ease forwards; }
@keyframes fadeIn { from{opacity:0;transform:translateY(4px)} to{opacity:1;transform:translateY(0)} }
.transcript-speaker {
  font-size: 9px; font-weight: 700; letter-spacing: .08em;
  padding: 3px 7px; border-radius: 5px; flex-shrink: 0; margin-top: 2px;
  font-family: var(--mono);
}
.speaker-agent  { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--border-brand); }
.speaker-client { background: var(--bg-soft); color: var(--brand-gray); border: 1px solid var(--border); }
.transcript-time { font-size: 10px; color: var(--text-3); font-family: var(--mono); margin-bottom: 1px; }
.transcript-text { font-size: 13.5px; color: var(--text-1); line-height: 1.55; }

/* Score ring */
.compliance-score-container { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.score-ring-wrapper { position: relative; width: 96px; height: 96px; flex-shrink: 0; }
.score-ring { width: 96px; height: 96px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--border-mid); stroke-width: 9; }
.ring-fill { fill: none; stroke-width: 9; stroke-linecap: round; stroke-dasharray: 301.6; stroke-dashoffset: 301.6; transition: stroke-dashoffset 1.2s ease, stroke .5s; }
.score-number { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; color: var(--text-1); }
.score-details { flex: 1; }
.score-status { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.score-status.critical { color: var(--red); }
.score-status.warning  { color: var(--yellow); }
.score-status.approved { color: var(--green); }
.score-label { font-size: 11px; color: var(--text-3); }

/* Checklist */
.checklist { display: flex; flex-direction: column; gap: 6px; }
.check-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 11px; border-radius: var(--r-sm);
  background: var(--bg-soft); font-size: 12.5px; color: var(--text-2);
  border: 1px solid var(--border);
}
.check-icon { font-size: 13px; flex-shrink: 0; }

/* Infracciones */
.infraction-count {
  font-size: 11px; font-weight: 700;
  background: var(--red-bg); color: var(--red);
  border: 1px solid rgba(220,38,38,.25); padding: 2px 10px; border-radius: 12px;
}
.infraction-count.empty { background: var(--green-bg); color: var(--green); border-color: rgba(22,163,74,.3); }
.infractions-list { display: flex; flex-direction: column; gap: 10px; }
.infraction-card { padding: 13px; border-radius: var(--r-sm); border-left: 3px solid; }
.infraction-card.CRITICO { border-color: var(--red);    background: var(--red-bg); }
.infraction-card.ALERTA  { border-color: var(--yellow); background: var(--yellow-bg); }
.infraction-header { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.infraction-badge { font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 5px; text-transform: uppercase; letter-spacing: .06em; }
.badge-CRITICO { background: var(--red-bg);    color: var(--red); }
.badge-ALERTA  { background: var(--yellow-bg); color: var(--yellow); }
.infraction-codigo { font-size: 10px; color: var(--text-3); font-family: var(--mono); }
.infraction-desc { font-size: 12.5px; color: var(--text-1); line-height: 1.5; margin-bottom: 5px; }
.infraction-ley  { font-size: 10px; color: var(--text-3); font-family: var(--mono); }
.no-infractions  { text-align: center; padding: 20px; color: var(--green); font-size: 13px; }
.summary-text { font-size: 13.5px; color: var(--text-2); line-height: 1.75; }

/* Sentimiento */
.sentiment-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sentiment-card { padding: 14px; border-radius: var(--r-sm); background: var(--bg-soft); border: 1px solid var(--border); text-align: center; }
.sentiment-label { font-size: 10px; color: var(--text-3); margin-bottom: 7px; text-transform: uppercase; letter-spacing: .08em; }
.sentiment-emoji { font-size: 26px; margin-bottom: 7px; }
.sentiment-value { font-size: 12px; font-weight: 600; margin-bottom: 9px; }
.sentiment-bar-wrap { height: 3px; background: var(--border-mid); border-radius: 3px; overflow: hidden; }
.sentiment-bar { height: 100%; border-radius: 3px; transition: width 1s ease; }

/* ── MODALES ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.35); backdrop-filter: blur(6px);
  z-index: 200; display: flex; align-items: center; justify-content: center;
}
.processing-card, .notify-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--shadow-lg); overflow: hidden;
}
.processing-card { padding: 44px 52px; max-width: 440px; width: 90%; text-align: center; }
.processing-logo-img { height: 40px; width: auto; margin: 0 auto 20px; display: block; }
.processing-title { font-size: 20px; font-weight: 700; color: var(--text-1); margin-bottom: 8px; }
.processing-subtitle { font-size: 13px; color: var(--text-3); margin-bottom: 24px; }
.processing-steps { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; text-align: left; }
.step {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--bg-soft); border: 1px solid var(--border);
  opacity: .35; transition: all .4s;
}
.step.active { opacity: 1; border-color: var(--brand-orange); background: var(--brand-orange-soft); }
.step.done   { opacity: 1; border-color: rgba(22,163,74,.3); background: var(--green-bg); }
.step-icon { font-size: 16px; }
.step span:nth-child(2) { flex: 1; font-size: 13px; color: var(--text-2); }
.step-check { color: var(--green); font-weight: 700; opacity: 0; transition: opacity .3s; }
.step.done .step-check { opacity: 1; }
.progress-container { height: 4px; background: var(--border-mid); border-radius: 4px; overflow: hidden; }
.progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--brand-orange), var(--brand-orange-dark)); border-radius: 4px; transition: width .5s ease; }

/* Notify modal */
.notify-card { max-width: 560px; width: 90%; }
.notify-header { display: flex; align-items: center; gap: 12px; padding: 22px 26px; border-bottom: 1px solid var(--border); }
.notify-icon { font-size: 22px; }
.notify-header h2 { font-size: 16px; font-weight: 700; color: var(--text-1); flex: 1; }
.notify-close { background: none; border: none; color: var(--text-3); font-size: 18px; cursor: pointer; padding: 4px; transition: color .18s; }
.notify-close:hover { color: var(--text-1); }
.notify-agent-info { padding: 14px 26px; background: var(--brand-orange-soft); border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.notify-agent-info strong { color: var(--brand-orange); }
.notify-message-box { padding: 22px 26px; }
.notify-message-label { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.notify-message { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; font-size: 13.5px; color: var(--text-1); line-height: 1.7; white-space: pre-wrap; }
.notify-footer { padding: 18px 26px; border-top: 1px solid var(--border); }
.notify-channels { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
.channel-btn { font-size: 11px; padding: 5px 12px; border-radius: 20px; border: 1px solid var(--border); background: none; color: var(--text-2); cursor: pointer; font-family: var(--font); transition: all .18s; }
.channel-btn.active { background: var(--brand-orange-soft); color: var(--brand-orange); border-color: var(--border-brand); }
.notify-actions { display: flex; justify-content: flex-end; gap: 10px; }
.btn-cancel { background: none; border: 1px solid var(--border); color: var(--text-2); font-size: 13px; padding: 9px 20px; border-radius: var(--r-sm); cursor: pointer; font-family: var(--font); transition: all .18s; }
.btn-cancel:hover { border-color: var(--text-1); color: var(--text-1); }
.btn-send { background: linear-gradient(135deg, var(--brand-orange), var(--brand-orange-dark)); color: white; font-size: 13px; font-weight: 700; padding: 9px 22px; border: none; border-radius: var(--r-sm); cursor: pointer; font-family: var(--font); box-shadow: var(--shadow-brand); }
.btn-send:hover { opacity: .9; }

/* Toast */
.toast { position: fixed; bottom: 32px; right: 32px; background: var(--green); color: white; font-size: 13px; font-weight: 700; padding: 12px 22px; border-radius: var(--r-md); z-index: 300; box-shadow: var(--shadow-lg); animation: slideUp .3s ease; }
@keyframes slideUp { from{transform:translateY(16px);opacity:0} to{transform:translateY(0);opacity:1} }

[hidden] { display: none !important; }
