/* Portal de colaboradores · Colibrí Finances — v3
   Una familia (Manrope), un acento (naranja Colibrí), radios 18/12, claro y oscuro.
   Movimiento con intención: entrada escalonada, barras que se llenan, tarjetas que
   responden al dedo. Solo transform/opacity; todo se apaga con prefers-reduced-motion. */
:root {
  --acento: #E67E22; --acento-fuerte: #c9660f; --acento-suave: #fdebd9; --acento-tinta: #8a4a0f;
  --fondo: #f6f2ea; --papel: #ffffff; --papel-2: #faf7f1; --linea: #e6ded1; --linea-2: #efe9df;
  --texto: #1c1e22; --texto-2: #5a5f68; --texto-3: #8c929b;
  --ok: #1f8a5b; --ok-suave: #e3f4ec; --aviso: #b26b00; --aviso-suave: #fff1d6;
  --malo: #b3372c; --malo-suave: #fbe6e2; --pausa: #6b7280; --pausa-suave: #eef0f3;
  --proceso: #2b6cb0; --proceso-suave: #e6f0fb;
  --sombra: 0 24px 60px -28px rgba(80, 52, 20, .35), 0 2px 6px -2px rgba(80, 52, 20, .08);
  --sombra-2: 0 8px 24px -14px rgba(80, 52, 20, .25);
  --r: 18px; --r2: 12px; --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #141517; --papel: #1d1f23; --papel-2: #23262b; --linea: #31353c; --linea-2: #2a2e34;
    --texto: #eef0f3; --texto-2: #b3b9c3; --texto-3: #7d8591; --acento-suave: #3a2a1a; --acento-tinta: #f2b47a;
    --ok-suave: #143324; --aviso-suave: #3a2c10; --malo-suave: #3b1d1a; --pausa-suave: #2a2e35; --proceso-suave: #17283d;
    --sombra: 0 24px 60px -28px rgba(0,0,0,.85); --sombra-2: 0 8px 24px -14px rgba(0,0,0,.6);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--fondo); color: var(--texto); font-family: Manrope, "Segoe UI", system-ui, -apple-system, sans-serif; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100dvh; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
a { color: var(--acento-fuerte); }
.oculto { display: none !important; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }

/* ── Movimiento reutilizable ─────────────────────────────────────────── */
@keyframes sube { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes aparece { from { opacity: 0; } to { opacity: 1; } }
@keyframes kenburns { from { transform: scale(1.04); } to { transform: scale(1.12); } }
@keyframes brillo { to { background-position: -200% 0; } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes gira { to { transform: rotate(360deg); } }
.sube { animation: sube .7s var(--ease) both; }
.d1 { animation-delay: .08s; } .d2 { animation-delay: .16s; } .d3 { animation-delay: .24s; } .d4 { animation-delay: .32s; } .d5 { animation-delay: .4s; }
.revela { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.revela.in { opacity: 1; transform: none; }

/* ── Cabecera ─────────────────────────────────────────────────────────── */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); background: color-mix(in srgb, var(--fondo) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--linea-2); }
.topbar.sobre-foto { position: absolute; left: 0; right: 0; background: transparent; border-bottom: 0; backdrop-filter: none; -webkit-backdrop-filter: none; justify-content: flex-end; z-index: 5; }
.topbar.sobre-foto .brand { display: none; }
.topbar.sobre-foto .btn-install { background: rgba(255,255,255,.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: var(--sombra-2); }
.brand img { height: 42px; width: auto; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.menu { position: absolute; right: 12px; top: calc(100% + 6px); width: min(300px, calc(100vw - 24px)); background: var(--papel); border: 1px solid var(--linea); border-radius: var(--r); box-shadow: var(--sombra); padding: 6px; z-index: 30; animation: sube .25s var(--ease) both; }
.menu-head { padding: 10px 12px 8px; border-bottom: 1px solid var(--linea); margin-bottom: 4px; }
.menu-nombre { font-weight: 700; }
.menu-usuario { font-size: 13px; color: var(--texto-3); }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 0; background: transparent; border-radius: var(--r2); text-align: left; cursor: pointer; }
.menu-item:hover { background: var(--papel-2); }
.menu-item i { font-size: 18px; color: var(--texto-2); }

/* ── Botones ──────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: var(--r2); border: 1px solid var(--linea); background: var(--papel); cursor: pointer; font-weight: 700; min-height: 44px; transition: transform .12s var(--ease), background .15s, box-shadow .2s, border-color .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--sombra-2); }
.btn:active { transform: translateY(0) scale(.98); box-shadow: none; }
.btn:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }
.btn-primario { background: var(--acento); border-color: var(--acento); color: #fff; box-shadow: 0 10px 24px -12px rgba(230, 126, 34, .7); }
.btn-primario:hover { background: var(--acento-fuerte); box-shadow: 0 14px 28px -12px rgba(230, 126, 34, .8); }
.btn-bloque { width: 100%; }
.btn-icon { padding: 0; width: 44px; height: 44px; border-radius: 50%; }
.btn-icon i { font-size: 22px; }
.btn-install { background: var(--acento-suave); border-color: transparent; color: var(--acento-tinta); }
.btn-enlace { border: 0; background: transparent; color: var(--acento-fuerte); padding: 4px 6px; min-height: 0; }
.btn i { font-size: 18px; }
.btn.cargando { color: transparent !important; pointer-events: none; }
.btn.cargando::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: gira .7s linear infinite; }
.btn { position: relative; }

/* ── Login ────────────────────────────────────────────────────────────── */
.login { min-height: 100dvh; display: grid; grid-template-columns: 1fr; background: var(--fondo); }
.login-foto { position: relative; min-height: 46dvh; overflow: hidden; background: #d9c3a5; }
.login-foto img.hero { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; animation: kenburns 24s ease-out both; will-change: transform; }
.login-foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(246,242,234,0) 55%, var(--fondo) 100%); pointer-events: none; }
.login-foto .marca { position: absolute; left: 22px; right: 22px; top: 22px; z-index: 2; color: #1c1e22; }
.login-foto .marca img { height: 54px; width: auto; }
.login-foto .marca h2 { margin-top: 18px; font-size: clamp(24px, 5.4vw, 40px); font-weight: 800; line-height: 1.06; letter-spacing: -0.03em; color: #1c1e22; max-width: 14ch; }
.login-foto .marca p { margin: 10px 0 0; font-size: 15px; color: #4b4f57; max-width: 30ch; font-weight: 600; }
.login-panel { display: grid; place-items: center; padding: 8px 20px 44px; }
.login-form { width: min(440px, 100%); background: var(--papel); border: 1px solid var(--linea); border-radius: 22px; padding: 28px 24px; box-shadow: var(--sombra); display: grid; gap: 14px; margin-top: -56px; position: relative; z-index: 3; }
.login-form h1 { font-size: 24px; font-weight: 800; line-height: 1.15; }
.login-texto { margin: 0; color: var(--texto-2); font-size: 15px; }
.login-ayuda { margin: 4px 0 0; color: var(--texto-3); font-size: 13px; }
.campo { display: grid; gap: 6px; font-size: 14px; font-weight: 700; color: var(--texto-2); }
.campo input, .campo textarea, .campo-pass { width: 100%; font: inherit; font-weight: 500; color: var(--texto); background: var(--papel-2); border: 1px solid var(--linea); border-radius: var(--r2); padding: 13px 14px; outline: none; transition: border-color .15s, box-shadow .15s, background .15s; }
.campo input:focus, .campo textarea:focus, .campo-pass:focus-within { border-color: var(--acento); background: var(--papel); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acento) 18%, transparent); }
.campo-pass { display: flex; align-items: center; padding: 0 4px 0 0; }
.campo-pass input { border: 0; background: transparent; box-shadow: none !important; }
.btn-ver { border: 0; background: transparent; padding: 8px; color: var(--texto-3); cursor: pointer; }
.form-error { margin: 0; color: var(--malo); background: var(--malo-suave); border-radius: var(--r2); padding: 10px 12px; font-size: 14px; animation: sube .3s var(--ease) both; }
@media (min-width: 900px) {
  .login { grid-template-columns: 1.15fr 1fr; }
  .login-foto { min-height: 100dvh; }
  .login-foto::after { background: none; }
  .login-foto .marca { left: 56px; right: 56px; top: 56px; }
  .login-foto .marca img { height: 72px; }
  .login-foto .marca h2 { font-size: clamp(34px, 3.4vw, 46px); max-width: 16ch; }
  .login-foto .marca p { font-size: 17px; }
  .login-panel { padding: 40px; }
  .login-form { margin-top: 0; padding: 36px 32px; }
  .login-form h1 { font-size: 28px; }
}

/* ── App ──────────────────────────────────────────────────────────────── */
.app { max-width: 900px; margin: 0 auto; padding: 22px 16px calc(44px + var(--safe-b)); }
.saludo { display: grid; gap: 4px; margin-bottom: 18px; }
.saludo h1 { font-size: clamp(26px, 6vw, 34px); font-weight: 800; }
.saludo p { margin: 0; color: var(--texto-2); }
.resumen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.dato { background: var(--papel); border: 1px solid var(--linea-2); border-radius: var(--r); padding: 14px 16px; position: relative; overflow: hidden; }
.dato::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--acento); opacity: .9; }
.dato:nth-child(2)::before { background: var(--proceso); } .dato:nth-child(3)::before { background: var(--ok); }
.dato b { display: block; font-size: 30px; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.dato span { font-size: 12px; color: var(--texto-3); font-weight: 700; }
.comercial { display: flex; align-items: center; gap: 12px; background: var(--papel); border: 1px solid var(--linea-2); border-radius: var(--r); padding: 12px 14px; margin-bottom: 20px; flex-wrap: wrap; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--acento), #f2a35a); color: #fff; display: grid; place-items: center; font-weight: 800; flex: 0 0 auto; box-shadow: 0 8px 18px -10px rgba(230,126,34,.8); }
.comercial .quien { flex: 1; min-width: 160px; }
.comercial .quien small { display: block; color: var(--texto-3); font-size: 12px; font-weight: 700; }
.comercial .quien b { font-size: 15px; }
.contacto { display: flex; gap: 8px; }
.contacto a { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--linea); background: var(--papel-2); color: var(--texto); text-decoration: none; transition: transform .12s var(--ease), background .15s, color .15s; }
.contacto a:hover { transform: translateY(-2px); background: var(--acento-suave); color: var(--acento-tinta); }
.contacto a:active { transform: scale(.94); }
.contacto a i { font-size: 20px; }

.buscador { position: relative; margin-bottom: 10px; }
.buscador input { width: 100%; padding: 13px 14px 13px 42px; border-radius: var(--r2); border: 1px solid var(--linea); background: var(--papel); font: inherit; color: var(--texto); }
.buscador i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--texto-3); font-size: 18px; }
.filtros { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; scrollbar-width: none; }
.filtros::-webkit-scrollbar { display: none; }
.pill { flex: 0 0 auto; border: 1px solid var(--linea); background: var(--papel); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--texto-2); transition: transform .12s var(--ease), background .15s; }
.pill:active { transform: scale(.96); }
.pill.activa { background: var(--texto); color: var(--fondo); border-color: var(--texto); }
.pill .n { opacity: .6; margin-left: 4px; }

.lista { display: grid; gap: 12px; }
.tarjeta { display: grid; gap: 10px; background: var(--papel); border: 1px solid var(--linea-2); border-radius: var(--r); padding: 16px 18px; text-align: left; cursor: pointer; width: 100%; transition: transform .18s var(--ease), box-shadow .25s var(--ease), border-color .15s; }
.tarjeta:hover { transform: translateY(-2px); box-shadow: var(--sombra-2); border-color: color-mix(in srgb, var(--acento) 45%, var(--linea)); }
.tarjeta:active { transform: scale(.992); box-shadow: none; }
.tarjeta-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.tarjeta-top b { font-size: 18px; font-weight: 800; line-height: 1.25; }
.tarjeta-top .fecha { color: var(--texto-3); font-size: 12px; white-space: nowrap; font-weight: 700; }
.estado { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; padding: 6px 11px; border-radius: 999px; width: fit-content; }
.estado.proceso { background: var(--proceso-suave); color: var(--proceso); }
.estado.ok { background: var(--ok-suave); color: var(--ok); }
.estado.aviso { background: var(--aviso-suave); color: var(--aviso); }
.estado.malo { background: var(--malo-suave); color: var(--malo); }
.estado.pausa { background: var(--pausa-suave); color: var(--pausa); }
.estado.neutro { background: var(--papel-2); color: var(--texto-2); border: 1px solid var(--linea); }
.pasos { display: grid; grid-auto-flow: column; gap: 3px; height: 6px; }
.pasos i { display: block; border-radius: 3px; background: var(--linea); position: relative; overflow: hidden; }
.pasos i::after { content: ""; position: absolute; inset: 0; background: var(--acento); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.pasos i.hecho::after { transform: scaleX(1); }
.pasos i.actual::after { transform: scaleX(1); opacity: .5; }
.pasos.ok i::after { background: var(--ok); } .pasos.malo i::after { background: var(--malo); }
.tarjeta-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--texto-2); font-size: 13px; font-weight: 600; }
.tarjeta-meta span i { margin-right: 4px; vertical-align: -2px; }
.estrellitas { color: var(--acento); font-size: 13px; letter-spacing: 1px; }

.vacio { text-align: center; color: var(--texto-3); padding: 48px 16px; background: var(--papel); border: 1px dashed var(--linea); border-radius: var(--r); }
.vacio i { font-size: 36px; display: block; margin-bottom: 8px; color: var(--acento); }
.vacio b { display: block; color: var(--texto); margin-bottom: 4px; }
.skeleton { display: grid; gap: 12px; }
.skeleton div { height: 104px; border-radius: var(--r); background: linear-gradient(90deg, var(--papel) 25%, var(--papel-2) 50%, var(--papel) 75%); background-size: 200% 100%; animation: brillo 1.4s infinite; }

/* ── Detalle ──────────────────────────────────────────────────────────── */
.volver { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--texto-2); font-weight: 700; padding: 6px 0; margin-bottom: 8px; cursor: pointer; }
.volver:hover { color: var(--acento-fuerte); }
.detalle { display: grid; gap: 14px; }
.cab { background: var(--papel); border: 1px solid var(--linea-2); border-radius: var(--r); padding: 20px 20px 18px; display: grid; gap: 12px; box-shadow: var(--sombra-2); }
.cab h1 { font-size: clamp(24px, 6vw, 30px); font-weight: 800; line-height: 1.15; }
.cab .desc { margin: 0; color: var(--texto-2); font-size: 15px; }
.recorrido ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.recorrido li { display: grid; gap: 6px; justify-items: center; font-size: 10px; text-align: center; color: var(--texto-3); font-weight: 700; line-height: 1.15; }
.recorrido li i.barra { display: block; width: 100%; height: 7px; border-radius: 4px; background: var(--linea); position: relative; overflow: hidden; }
.recorrido li i.barra::after { content: ""; position: absolute; inset: 0; background: var(--acento); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.recorrido li.hecho i.barra::after { transform: scaleX(1); }
.recorrido li.actual i.barra::after { transform: scaleX(1); opacity: .5; }
.recorrido li.hecho, .recorrido li.actual { color: var(--texto); }
.recorrido li.actual { color: var(--acento-tinta); }
.recorrido.ok li i.barra::after { background: var(--ok); } .recorrido.malo li i.barra::after { background: var(--malo); }
@media (max-width: 420px) { .recorrido li span { display: none; } .recorrido li.actual span, .recorrido li:first-child span, .recorrido li:last-child span { display: block; } }

.bloque { background: var(--papel); border: 1px solid var(--linea-2); border-radius: var(--r); padding: 18px 20px; display: grid; gap: 12px; }
.bloque h2 { font-size: 13px; color: var(--texto-3); font-weight: 800; letter-spacing: 0; }
.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.cifra { background: var(--papel-2); border-radius: var(--r2); padding: 12px 14px; }
.cifra b { display: block; font-size: 26px; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.cifra span { font-size: 12px; color: var(--texto-3); font-weight: 700; }
.cifra.ok b { color: var(--ok); } .cifra.malo b { color: var(--malo); } .cifra.espera b { color: var(--proceso); }
.nota-bancos { margin: 0; font-size: 13px; color: var(--texto-3); }
.importes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.importe { display: grid; gap: 2px; }
.importe span { font-size: 12px; color: var(--texto-3); font-weight: 700; }
.importe b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { position: relative; padding: 0 0 16px 22px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--acento); }
.timeline li::after { content: ""; position: absolute; left: 9.5px; top: 20px; bottom: -2px; width: 1px; background: var(--linea); }
.timeline li:last-child::after { display: none; }
.timeline .cuando { font-size: 12px; color: var(--texto-3); font-weight: 700; }
.timeline .que { margin: 2px 0 0; white-space: pre-wrap; }

.valorar { display: grid; gap: 10px; }
.estrellas { display: flex; gap: 6px; }
.estrellas button { border: 0; background: transparent; padding: 4px; cursor: pointer; color: var(--linea); font-size: 36px; line-height: 1; transition: color .15s, transform .15s var(--ease); }
.estrellas button.on { color: var(--acento); }
.estrellas button.pop { animation: pop .35s var(--ease); }
.estrellas button:hover { transform: scale(1.1); }
.valorar textarea { min-height: 84px; resize: vertical; }
.valorar .acciones { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.valorar .hecho { color: var(--ok); font-size: 13px; font-weight: 700; }

.sugerencias { display: grid; gap: 14px; }
.sug-lista { display: grid; gap: 8px; }
.sug { background: var(--papel); border: 1px solid var(--linea-2); border-radius: var(--r); padding: 12px 14px; }
.sug .meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--texto-3); font-weight: 700; margin-bottom: 4px; }
.sug .meta .est { color: var(--acento-fuerte); }
.sug p { margin: 0; white-space: pre-wrap; }

.aviso-offline { background: var(--aviso-suave); color: var(--aviso); border-radius: var(--r2); padding: 8px 12px; font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.pie { margin-top: 28px; text-align: center; color: var(--texto-3); font-size: 12px; }

/* ── Toast y modal ────────────────────────────────────────────────────── */
.toast { position: fixed; left: 50%; bottom: calc(22px + var(--safe-b)); transform: translateX(-50%); background: var(--texto); color: var(--fondo); padding: 11px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; z-index: 50; box-shadow: var(--sombra); max-width: calc(100vw - 32px); animation: sube .3s var(--ease) both; }
.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: end center; }
@media (min-width: 640px) { .modal { place-items: center; } }
.modal-fondo { position: absolute; inset: 0; background: rgba(20, 16, 10, .45); animation: aparece .2s both; }
.modal-caja { position: relative; width: min(520px, 100%); max-height: 92dvh; overflow: auto; background: var(--papel); border-radius: var(--r) var(--r) 0 0; padding: 22px 20px calc(20px + var(--safe-b)); box-shadow: var(--sombra); animation: sube .3s var(--ease) both; }
@media (min-width: 640px) { .modal-caja { border-radius: var(--r); } }
.modal-cerrar { position: absolute; right: 10px; top: 10px; }
.modal h2 { font-size: 20px; font-weight: 800; margin-bottom: 8px; padding-right: 40px; }
.modal p { color: var(--texto-2); }
.modal form { display: grid; gap: 12px; margin-top: 8px; }
.modal ul { margin: 8px 0 0; padding-left: 18px; color: var(--texto-2); }

/* Transición entre pantallas (View Transitions API, si el navegador la tiene) */
::view-transition-old(root) { animation: aparece .18s ease-in reverse; }
::view-transition-new(root) { animation: sube .32s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .revela { opacity: 1; transform: none; }
}

/* ── Fases: un color por etapa para leer el estado de un vistazo ────────── */
:root {
  --f-recibido: #6b7280; --f-recibido-s: #eef0f3;
  --f-docs: #c2410c;     --f-docs-s: #ffe8d6;      /* falta algo del cliente: naranja tostado */
  --f-estudio: #2b6cb0;  --f-estudio-s: #e6f0fb;
  --f-bancos: #1d4ed8;   --f-bancos-s: #e0e9ff;
  --f-preaprobada: #0f766e; --f-preaprobada-s: #d9f2ef;
  --f-tasando: #6d28d9;  --f-tasando-s: #ede7fb;
  --f-fein: #047857;     --f-fein-s: #d8f3e6;
  --f-firmada: #15803d;  --f-firmada-s: #dcf5e3;
  --f-cerrada: #b3372c;  --f-cerrada-s: #fbe6e2;
  --f-pausa: #8a6d3b;    --f-pausa-s: #f3ebdc;
}
@media (prefers-color-scheme: dark) {
  :root {
    --f-recibido-s: #2a2e35; --f-docs-s: #3d2416; --f-estudio-s: #17283d; --f-bancos-s: #172246;
    --f-preaprobada-s: #113330; --f-tasando-s: #2a1f47; --f-fein-s: #103326; --f-firmada-s: #12331d;
    --f-cerrada-s: #3b1d1a; --f-pausa-s: #33291a;
    --f-recibido: #9aa1ab; --f-docs: #f59e5b; --f-estudio: #7fb0ea; --f-bancos: #93a8ff; --f-preaprobada: #5fc8bd;
    --f-tasando: #b79cf5; --f-fein: #5fd0a0; --f-firmada: #6fd691; --f-cerrada: #f08a7e; --f-pausa: #d3b282;
  }
}
[class*="fase-"] { --fase: var(--f-recibido); --fase-s: var(--f-recibido-s); }
.fase-docs { --fase: var(--f-docs); --fase-s: var(--f-docs-s); }
.fase-estudio { --fase: var(--f-estudio); --fase-s: var(--f-estudio-s); }
.fase-bancos { --fase: var(--f-bancos); --fase-s: var(--f-bancos-s); }
.fase-preaprobada { --fase: var(--f-preaprobada); --fase-s: var(--f-preaprobada-s); }
.fase-tasando { --fase: var(--f-tasando); --fase-s: var(--f-tasando-s); }
.fase-fein { --fase: var(--f-fein); --fase-s: var(--f-fein-s); }
.fase-firmada { --fase: var(--f-firmada); --fase-s: var(--f-firmada-s); }
.fase-cerrada { --fase: var(--f-cerrada); --fase-s: var(--f-cerrada-s); }
.fase-pausa { --fase: var(--f-pausa); --fase-s: var(--f-pausa-s); }

.tarjeta[class*="fase-"] { border-left: 6px solid var(--fase); padding-left: 16px; }
.tarjeta[class*="fase-"]:hover { border-color: var(--linea-2); border-left-color: var(--fase); }
.estado.fase { background: var(--fase-s); color: var(--fase); }
.estado.fase i { font-size: 16px; }
.tarjeta[class*="fase-"] .pasos i::after, .cab[class*="fase-"] .recorrido li i.barra::after { background: var(--fase); }
.cab[class*="fase-"] { border-top: 6px solid var(--fase); }
.cab[class*="fase-"] .recorrido li.actual { color: var(--fase); }
.tarjeta.fase-firmada .tarjeta-top b::after { content: " ✓"; color: var(--f-firmada); }

.leyenda { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 2px 0 14px; font-size: 12px; color: var(--texto-3); font-weight: 700; }
.leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.leyenda span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--fase); }
.pill[class*="fase-"] { border-color: color-mix(in srgb, var(--fase) 40%, var(--linea)); color: var(--fase); background: var(--fase-s); }
.pill[class*="fase-"].activa { background: var(--fase); color: #fff; border-color: var(--fase); }
