/* ===================================================================
   Portal del Cliente — estilo SaaS profesional (app shell)
   Independiente de estilos.css (el portal carga solo este archivo)
   =================================================================== */

:root {
  --bg:        #F6F8FB;
  --bg-2:      #FBFCFE;
  --panel:     #FFFFFF;
  --sidebar:   #0B1C2D;
  --sidebar-2: #14304A;
  --ink:       #0E1B2A;
  --ink-2:     #5A6B80;
  --ink-3:     #93A2B5;
  --line:      #EAEEF3;
  --line-2:    #F1F4F8;
  --brand:     #0B3D6B;
  --brand-600: #0D4A82;
  --accent:    #0E9BC4;
  --accent-d:  #0B7FA3;
  --ok:        #16A34A;
  --warn:      #E08600;
  --danger:    #DC2626;
  --violet:    #7C3AED;
  --r:         12px;
  --r-sm:      9px;
  --ring:      rgba(14,155,196,.35);

  /* Sistema de sombras */
  --sh-xs:    0 1px 2px rgba(16,30,54,.04);
  --sh-sm:    0 1px 2px rgba(16,30,54,.04),0 2px 4px rgba(16,30,54,.04);
  --sh-md:    0 2px 4px rgba(16,30,54,.04),0 6px 16px rgba(16,30,54,.06);
  --sh-lg:    0 8px 24px rgba(16,30,54,.08),0 2px 6px rgba(16,30,54,.04);
  --sh-modal: 0 24px 60px rgba(11,28,45,.22),0 4px 12px rgba(11,28,45,.10);
}

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

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--ink);
  font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1, "cv05" 1;
  letter-spacing: -.006em;
}
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ---------- Foco accesible ---------- */
:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); border-radius: var(--r-sm); }
.btn:focus-visible, .nav-item:focus-visible, .icon-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
svg.ic { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.side {
  background: linear-gradient(180deg, var(--sidebar) 0%, #0A1622 100%);
  color: #C7D4E2; padding: 18px 14px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
}
.side .brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 18px; }
.side .brand .mark {
  width: 38px; height: 38px; border-radius: 10px; flex: 0 0 38px;
  background: linear-gradient(135deg, var(--accent), var(--brand));
  display: grid; place-items: center; color: #fff; box-shadow: 0 4px 14px rgba(14,155,196,.35);
}
.side .brand b { color: #fff; font-size: 14px; display: block; line-height: 1.2; }
.side .brand span { font-size: 11px; color: #6E8198; }

.side .label { font-size: 10.5px; letter-spacing: .06em; font-weight: 600; text-transform: uppercase; color: #56708A; padding: 16px 10px 7px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 10px 11px; border-radius: var(--r-sm); color: #B4C3D4; font-size: 13.5px;
  background: none; border: none; cursor: pointer; font-family: inherit; transition: .18s cubic-bezier(.4,0,.2,1); position: relative;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.activo { background: rgba(14,155,196,.16); color: #fff; }
.nav-item.activo::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav-item .badge-n { margin-left: auto; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; font-variant-numeric: tabular-nums; }

.side .foot { margin-top: auto; padding: 12px 8px 4px; border-top: 1px solid rgba(255,255,255,.08); }
.side .foot .u { display: flex; align-items: center; gap: 10px; }
.side .foot .av { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.side .foot b { color: #fff; font-size: 13px; display: block; }
.side .foot span { font-size: 11px; color: #6E8198; }

/* ---------- Main ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 62px; background: var(--panel); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; padding: 0 26px; position: sticky; top: 0; z-index: 20;
}
.topbar .crumb { font-size: 13px; color: var(--ink-2); }
.topbar .crumb b { color: var(--ink); }
.search { margin-left: auto; display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; color: var(--ink-3); width: 260px; }
.search input { border: none; background: none; outline: none; font: inherit; color: var(--ink); width: 100%; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); display: grid; place-items: center; color: var(--ink-2); cursor: pointer; position: relative; }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); border: 2px solid #fff; }

.content { padding: 26px; max-width: 1180px; width: 100%; }
.view { display: none; } .view.activo { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.h-page { font-size: 22px; font-weight: 680; letter-spacing: -.02em; }
.sub { color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.row-between { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; border: none; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 13.5px; padding: 10px 16px; border-radius: var(--r-sm); transition: .18s cubic-bezier(.4,0,.2,1); }
.btn-pri { background: var(--brand); color: #fff; box-shadow: var(--sh-sm); } .btn-pri:hover { background: var(--brand-600); }
.btn-acc { background: var(--accent); color: #fff; } .btn-acc:hover { background: var(--accent-d); }
.btn-ghost { background: var(--panel); border: 1px solid var(--line); color: var(--ink-2); } .btn-ghost:hover { border-color: var(--ink-3); color: var(--ink); }
.btn-pri:active, .btn-acc:active { transform: translateY(.5px); filter: brightness(.97); }
/* Deshabilitado: claramente apagado para que no parezca clickeable. */
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; filter: saturate(.6); }
.btn:disabled:hover, .btn[disabled]:hover { background: var(--brand); }
.btn-ghost:disabled:hover, .btn-ghost[disabled]:hover { background: var(--panel); border-color: var(--line); color: var(--ink-2); }
.btn:disabled:active, .btn[disabled]:active { transform: none; filter: saturate(.6); }

/* ---------- KPIs ---------- */
/* Tarjetas de cifra acotadas (~225px): una cifra no necesita media página */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 225px)); gap: 14px; margin: 22px 0; justify-content: start; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--sh-xs); transition: box-shadow .18s cubic-bezier(.4,0,.2,1), transform .18s cubic-bezier(.4,0,.2,1); }
.kpi:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }
.kpi .top { display: flex; align-items: center; justify-content: space-between; color: var(--ink-2); font-size: 12.5px; }
/* Chip del KPI: bancario y sobrio — cuadro neutro con borde fino; el color solo
   vive en el ÍCONO (matiz semántico contenido), no en un fondo pastel. */
.kpi .chip { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: #F1F5FA; border: 1px solid #E2E8F0; }
.kpi .n { font-size: 26px; font-weight: 680; margin-top: 10px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .delta { font-size: 12px; margin-top: 2px; color: var(--ink-3); }
.tint-acc { color: var(--brand); }
.tint-ok  { color: #15803D; }
.tint-warn{ color: #B45309; }
.tint-vio { color: var(--brand); }

/* ---------- Utilidades del estilo BANCARIO (Fase 3) ----------
   La paleta de franjas/bordes estaba pegada a mano en 10 archivos (#F6F8FB,
   #D9E1EB, #C9D4E2 x19). UNA definición; regla: estilo repetido 3+ veces → clase. */
.bk-box   { background: #fff; border: 1px solid #C9D4E2; border-radius: 10px; overflow: hidden; box-shadow: var(--sh-sm); }
.bk-strip { padding: 9px 14px; background: #F6F8FB; border-bottom: 1px solid #E2E8F0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--brand); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bk-body  { padding: 12px 14px; }
.bk-gris  { background: #EDF1F6; }
.bk-tag       { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #fff; background: var(--brand); border-radius: 4px; padding: 2px 8px; white-space: nowrap; }
.bk-tag-line  { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); background: #fff; border: 1px solid #C9D4E2; border-radius: 4px; padding: 2px 8px; white-space: nowrap; }

/* ---------- Card / panel ----------
   Estilo bancario: borde definido, sombra presente y ENCABEZADO en franja gris
   con título navy en mayúsculas — cada bloque se lee como una sección propia,
   no como texto flotando sobre la página. */
.card { background: var(--panel); border: 1px solid #D9E1EB; border-radius: var(--r); box-shadow: var(--sh-sm); }
.card .hd { padding: 13px 18px; background: #F6F8FB; border-bottom: 1px solid #E2E8F0; border-radius: var(--r) var(--r) 0 0; display: flex; align-items: center; justify-content: space-between; }
.card .hd h3 { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .055em; color: var(--brand); }
.card .bd { padding: 18px; }

/* ---------- Tabla de despachos ---------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11.5px; letter-spacing: .06em; font-weight: 600; text-transform: uppercase; color: var(--ink-3); padding: 11px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 62px; background: var(--panel); box-shadow: 0 1px 0 var(--line); z-index: 1; }
.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.tbl tbody tr { cursor: pointer; transition: .18s cubic-bezier(.4,0,.2,1); }
.tbl tbody tr:hover { background: var(--bg-2); box-shadow: inset 2px 0 0 var(--accent); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .codigo { font-weight: 700; color: var(--brand); }
.tbl .muted { color: var(--ink-2); font-size: 12.5px; }
/* El overflow del envoltorio SOLO se activa en angosto: el th usa position:sticky
   (top:62px) y el sticky se rompe dentro de un contenedor con scroll propio;
   en desktop la tabla cabe completa y el encabezado sigue pegado al hacer scroll. */
.tbl-wrap {}
@media (max-width: 880px) { .tbl-wrap { overflow-x: auto; } }

/* ---------- Pills de estado ---------- */
/* Chips rectos (radius 6), no píldoras 999px — identidad bancaria */
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill .d { width: 7px; height: 7px; border-radius: 50%; }
.pill.s-ok       { background: #E7F6EC; color: #15803D; box-shadow: inset 0 0 0 1px #C4E8CF; } .pill.s-ok .d       { background: #16A34A; }
.pill.s-proceso  { background: #E5F0FB; color: #1D4ED8; box-shadow: inset 0 0 0 1px #C9DEF6; } .pill.s-proceso .d  { background: #2563EB; }
.pill.s-atencion { background: #FCF1DF; color: #B45309; box-shadow: inset 0 0 0 1px #F2DFB0; } .pill.s-atencion .d { background: #E08600; }
.pill.s-critica  { background: #FCE9E9; color: #B91C1C; box-shadow: inset 0 0 0 1px #F3C9C9; } .pill.s-critica .d  { background: #DC2626; }

/* mini barra de progreso */
.mini { display: flex; align-items: center; gap: 9px; }
.mini .track { width: 92px; height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.mini .fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--brand)); border-radius: 999px; }
.mini span { font-size: 12px; color: var(--ink-2); font-weight: 600; }

/* ---------- Detalle: cabecera ---------- */
.det-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin: 6px 0 18px; }
.ring { --p: 0; width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 78px;
  background: conic-gradient(var(--accent) calc(var(--p)*1%), var(--line) 0); }
.ring::before { content: ""; position: absolute; width: 60px; height: 60px; border-radius: 50%; background: var(--panel); }
.ring b { position: relative; font-size: 17px; font-weight: 680; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.det-head .meta h2 { font-size: 19px; font-weight: 700; }
.det-head .meta .id { color: var(--ink-2); font-size: 13px; margin-top: 1px; }
.det-head .meta .tags { display: flex; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.tag { font-size: 12px; color: var(--ink-2); background: var(--bg); border: 1px solid var(--line); padding: 4px 10px; border-radius: 7px; display: inline-flex; gap: 6px; align-items: center; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tab { padding: 11px 15px; border: none; background: none; font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; display: flex; align-items: center; gap: 7px; }
.tab:hover { color: var(--ink); }
.tab.activo { color: var(--brand); border-bottom-color: var(--accent); }
.tab .n { background: var(--bg); color: var(--ink-2); font-size: 11px; font-weight: 700; padding: 0 7px; border-radius: 999px; }
.tab.alerta .n { background: #FCE9E9; color: var(--danger); }
.panel { display: none; } .panel.activo { display: block; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }

/* lista clave-valor */
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 0; }
.kv > div { padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.kv .k { color: var(--ink-2); font-size: 13px; }
.kv .v { font-weight: 600; text-align: right; }

/* ---------- Timeline de etapas ---------- */
.tl { position: relative; padding-left: 8px; }
.tl-item { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding-bottom: 22px; position: relative; }
.tl-item:not(:last-child)::before { content: ""; position: absolute; left: 16px; top: 30px; bottom: -4px; width: 2px; background: var(--line); }
.tl-item.done::before { background: var(--ok); }
.tl-node { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); border: 2px solid var(--line); color: var(--ink-3); z-index: 1; }
.tl-item.done .tl-node { background: var(--ok); border-color: var(--ok); color: #fff; }
.tl-item.now  .tl-node { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 5px rgba(14,155,196,.18); }
@keyframes pulseNode { 0%,100% { box-shadow: 0 0 0 4px rgba(14,155,196,.18); } 50% { box-shadow: 0 0 0 7px rgba(14,155,196,.07); } }
.tl-item.now .tl-node { animation: pulseNode 2.4s ease-in-out infinite; }
.tl-body .t { font-weight: 700; font-size: 14px; }
.tl-body .now .t { color: var(--brand); }
.tl-body .d { color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.tl-body .st { font-size: 12px; color: var(--accent-d); font-weight: 600; margin-top: 4px; }
.tl-opc { font-size: 11px; color: var(--ink-3); border: 1px dashed var(--line); padding: 1px 7px; border-radius: 6px; margin-left: 8px; }

/* ---------- Documentos ---------- */
.doc-row { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line-2); }
.doc-row:last-child { border-bottom: none; }
.doc-ico { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 40px; }
.t-factura { background: #E5F0FB; color: #1D4ED8; } .t-packing { background: #F0EAFE; color: var(--violet); }
.t-bl { background: #E5F5FA; color: var(--accent-d); } .t-awb { background: #E7F6EC; color: var(--ok); } .t-otro { background: var(--bg); color: var(--ink-2); }
.doc-row .info { flex: 1; min-width: 0; } .doc-row .info b { font-size: 13.5px; display: block; }
.doc-row .info span { font-size: 12px; color: var(--ink-2); }
/* Badge "Leído por IA": chip rectangular blanco con borde fino (no pastilla pastel);
   la confianza da solo un matiz de borde/texto. */
.conf { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: #fff; border: 1px solid #D9E1EB; color: var(--ink-2); }
.conf.ALTA { color: #15803D; border-color: #C4E8CF; } .conf.MEDIA { color: #B45309; border-color: #F2DFB0; } .conf.BAJA { color: #B91C1C; border-color: #F3C9C9; }

/* ---------- Análisis IA ---------- */
.data-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-tbl th { text-align: left; background: var(--bg); color: var(--ink-2); font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 12px; }
.data-tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.data-tbl .part { font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.vc-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.vc-row:last-child { border-bottom: none; }
.vc-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 28px; }
.vc-ok { background: #E7F6EC; color: var(--ok); } .vc-disc { background: #FCF1DF; color: var(--warn); } .vc-falt { background: #FCE9E9; color: var(--danger); }
.vc-row .info { flex: 1; } .vc-row .info b { font-size: 13.5px; } .vc-row .info span { display: block; font-size: 12px; color: var(--ink-2); }
.vc-row .val { font-weight: 700; font-size: 13px; }

/* ---------- Alertas ---------- */
.alert { display: flex; gap: 13px; padding: 15px; border-radius: var(--r); border: 1px solid var(--line); margin-bottom: 12px; background: var(--panel); }
.alert .bar { width: 4px; border-radius: 4px; flex: 0 0 4px; }
.alert.critica   .bar { background: var(--danger); } .alert.importante .bar { background: var(--warn); } .alert.info .bar { background: var(--accent); }
.alert .ai { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 34px; }
.alert.critica .ai { background: #FCE9E9; color: var(--danger); } .alert.importante .ai { background: #FCF1DF; color: var(--warn); } .alert.info .ai { background: #E5F5FA; color: var(--accent-d); }
.alert b { font-size: 13.5px; } .alert p { font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.alert .accion { font-size: 12.5px; margin-top: 7px; background: var(--bg); border-left: 3px solid var(--accent); padding: 8px 11px; border-radius: 6px; color: var(--ink); }

/* ---------- Fondos ---------- */
.fbar { height: 12px; border-radius: 999px; background: var(--line); overflow: hidden; display: flex; margin: 10px 0 6px; }
.fbar .ab { background: var(--ok); } .fbar .sa { background: #F1B24A; }
.fleg { display: flex; gap: 18px; font-size: 12.5px; color: var(--ink-2); }
.fleg b { color: var(--ink); }

.empty { text-align: center; padding: 38px 16px; color: var(--ink-3); }
.empty svg { width: 40px; height: 40px; margin-bottom: 10px; opacity: .5; background: var(--bg); border-radius: 50%; padding: 12px; box-sizing: content-box; }

.banner { display: flex; align-items: center; gap: 12px; background: #E7F6EC; border: 1px solid #BBE6C8; color: #15803D; border-radius: var(--r); padding: 14px 16px; margin-bottom: 20px; font-size: 13.5px; }

/* ---------- Cuenta corriente ---------- */
.saldo-card { background: linear-gradient(135deg, var(--brand) 0%, #0A2E52 100%); color: #fff; border-radius: var(--r); padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.saldo-card .lbl { font-size: 13px; opacity: .8; }
.saldo-card .big { font-size: 32px; font-weight: 680; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.saldo-card .sub2 { font-size: 12.5px; opacity: .75; margin-top: 4px; }
.mov-monto.pos { color: var(--ok); font-weight: 700; }
.mov-monto.neg { color: var(--ink); font-weight: 700; }
.mov-tipo { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.mov-tipo.abono { color: var(--ok); } .mov-tipo.cargo { color: var(--ink-2); }

/* ---------- Bloques de subida (nueva solicitud) ---------- */
.bloque { border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 14px; overflow: hidden; }
.bloque .bh { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--bg); border-bottom: 1px solid var(--line); font-weight: 700; font-size: 13.5px; }
.bloque .bh .bn { margin-left: auto; font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.dropzone { display: flex; align-items: center; gap: 13px; padding: 13px 16px; border-bottom: 1px dashed var(--line-2); cursor: pointer; transition: .18s cubic-bezier(.4,0,.2,1); }
.dropzone:last-child { border-bottom: none; }
.dropzone:hover { border-color: var(--accent); border-style: solid; background: rgba(14,155,196,.04); }
.dropzone.ok { background: #F1FBF4; }
.dropzone .dz-ico { width: 38px; height: 38px; border-radius: 9px; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); flex: 0 0 38px; }
.dropzone.ok .dz-ico { background: #E7F6EC; color: var(--ok); border-color: #BBE6C8; }
/* min-width:0 + overflow-wrap: los nombres de archivo larguísimos sin espacios
   no encuentran dónde cortar y reventaban la dropzone (Nueva Solicitud y Mi Empresa). */
.dropzone .dz-info { flex: 1; min-width: 0; } .dropzone .dz-info b { font-size: 13.5px; overflow-wrap: anywhere; } .dropzone .dz-info span { display: block; font-size: 12px; color: var(--ink-2); }
.dropzone .dz-act { font-size: 12.5px; font-weight: 600; color: var(--accent-d); }
.dropzone.ok .dz-act { color: var(--ok); }
.req-x { color: var(--danger); }

/* asistente: tarjetas de servicio dentro del panel */
.serv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.serv-card { text-align: left; background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); padding: 16px; cursor: pointer; transition: .18s cubic-bezier(.4,0,.2,1); }
.serv-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.serv-card.sel { border-color: var(--brand); background: #F2F8FC; }
.serv-card .si { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--accent), var(--brand)); margin-bottom: 10px; }
.serv-card b { font-size: 14px; } .serv-card p { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }
.wz-steps { display: flex; gap: 6px; margin-bottom: 22px; }
.wz-steps .s { flex: 1; height: 5px; border-radius: 999px; background: var(--line); }
.wz-steps .s.on { background: var(--accent); }
.field { margin-bottom: 14px; } .field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 5px; }
.field input, .field select { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--r-sm); font: inherit; transition: .18s cubic-bezier(.4,0,.2,1); }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14,155,196,.12); }

/* ---------- Modal ---------- */
.modal-ov { position: fixed; inset: 0; background: rgba(11,28,45,.55); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; z-index: 60; padding: 20px; }
.modal-ov.open { display: flex; }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.modal { background: var(--panel); border-radius: 16px; width: 100%; max-width: 480px; box-shadow: var(--sh-modal); animation: modalIn .2s cubic-bezier(.4,0,.2,1); max-height: 92vh; overflow: auto; }
.modal .mh { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal .mh h3 { font-size: 16px; } .modal .mb { padding: 20px; } .modal .mf { padding: 16px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }
.bank { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin-bottom: 16px; }
.bank .kv { grid-template-columns: 120px 1fr; }
.bank .kv .v { text-align: right; font-size: 13px; }

/* ---------- Botón de menú móvil + overlay drawer ---------- */
.menu-btn { display: none; width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); align-items: center; justify-content: center; color: var(--ink-2); cursor: pointer; }
.side-ov { display: none; position: fixed; inset: 0; background: rgba(11,28,45,.45); z-index: 39; }

@media (max-width: 880px) {
  .app { grid-template-columns: 1fr; }
  .menu-btn { display: inline-flex; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 248px; transform: translateX(-100%); transition: transform .22s cubic-bezier(.4,0,.2,1); z-index: 40; display: flex; }
  .side.open { transform: none; box-shadow: var(--sh-lg); }
  .side-ov.show { display: block; }
  .kpis, .grid-2, .grid-3, .serv-grid { grid-template-columns: 1fr; }
  .search { display: none; }
}

/* ---------- Toasts ---------- */
#toastRoot { position: fixed; right: 20px; bottom: 20px; z-index: 70; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--r-sm); box-shadow: var(--sh-lg); font-size: 13.5px; display: flex; align-items: center; gap: 10px; opacity: 0; transform: translateY(8px); transition: .22s cubic-bezier(.4,0,.2,1); max-width: 340px; }
.toast.show { opacity: 1; transform: none; }
.toast svg { stroke: #5EE0A0; }
