/* Inicio: la zona para subir archivos, montada sobre la franja oscura.
   ─────────────────────────────────────────────────────────────────── */
.franja .inicio-titulo { font-size: 2.5rem; letter-spacing: -0.03em; line-height: 1.12; margin-top: 0.875rem; max-width: 18ch; }

.subida { padding: 0.625rem; }

/* ── Zona de soltar ───────────────────────────────────────────────── */
.zona {
    position: relative;
    border: 1.5px dashed var(--linea-fuerte);
    border-radius: 12px;
    background: var(--superficie-2);
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}
.zona:hover, .zona.drag-over { border-color: var(--verde); background: var(--verde-suave); }
/* El input va invisible encima, así que no puede enseñar su propio foco:
   lo enseña la zona que lo cubre. */
.zona:focus-within { outline: 3px solid var(--verde-hondo); outline-offset: 2px; border-color: var(--verde); }
.zona.has-file { border-style: solid; border-color: var(--verde); background: var(--verde-suave); }
.zona input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

.zona-icono {
    width: 3.25rem; height: 3.25rem; border-radius: 14px; margin: 0 auto;
    background: var(--tinta); color: var(--verde-claro);
    display: grid; place-items: center;
}
.zona-icono svg.i { width: 1.5rem; height: 1.5rem; grid-area: 1 / 1; }
.zona-icono .icono-listo { display: none; }
.zona.has-file .zona-icono .icono-subir { display: none; }
.zona.has-file .zona-icono .icono-listo { display: block; }
.zona h2 { font-size: 1.125rem; margin-top: 1rem; }
.zona h2 label { cursor: pointer; }
.zona > p { color: var(--tenue); margin-top: 0.25rem; }
.zona-boton { margin-top: 1.125rem; pointer-events: none; }

/* ── Archivos elegidos ────────────────────────────────────────────── */
/* Aparece sólo con varios: el cierre de mes son diez o doce reportes y
   antes había que repetir el flujo entero con cada uno. */
.cola { list-style: none; margin: 0.625rem 0 0; display: flex; flex-direction: column; gap: 0.25rem; }
.cola li {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.625rem 0.75rem; border-radius: 8px;
    background: var(--superficie-2); border-left: 3px solid var(--linea-fuerte);
    font-size: 0.8438rem;
}
.cola .nombre { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cola .marca { font-size: 0.8125rem; color: var(--tenue); white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.cola li.en-curso { border-left-color: var(--verde); }
.cola li.hecho    { border-left-color: var(--verde); }
.cola li.fallo    { border-left-color: var(--rojo); background: var(--rojo-suave); }
.cola li.hecho .marca a { color: var(--verde-hondo); font-weight: 600; }
.cola li.fallo .marca   { color: var(--rojo); font-weight: 600; white-space: normal; }

/* ── Acciones y estado ────────────────────────────────────────────── */
.subida-pie { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.875rem 0.625rem 0.375rem; flex-wrap: wrap; }
.file-name { color: var(--tenue); font-size: 0.8438rem; min-width: 0; overflow-wrap: anywhere; }
.file-name.visible { color: var(--tinta); font-weight: 500; }

.status {
    display: none;
    margin: 0.375rem 0.625rem; padding: 0.625rem 0.75rem;
    border-radius: 8px; border-left: 3px solid var(--linea-fuerte);
    background: var(--superficie-2); font-size: 0.8438rem;
}
.status.error { border-left-color: var(--rojo); background: var(--rojo-suave); color: var(--rojo); }
.status a { color: var(--tinta); font-weight: 600; margin-left: 0.25rem; }

/* ── Cómo leer el resultado ───────────────────────────────────────── */
.guia { margin-top: 2.5rem; }
.guia > h2 { font-size: 0.8438rem; font-weight: 500; color: var(--tenue); margin-bottom: 0.75rem; letter-spacing: 0; }
.guia-tres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.guia-color { background: var(--superficie); border: 1px solid var(--linea); border-top: 3px solid; border-radius: var(--radio); padding: 1rem 1.125rem; }
.guia-color h3 { font-size: 0.9375rem; }
.guia-color p { color: var(--texto); margin-top: 0.375rem; font-size: 0.875rem; }
.guia-color.es-verde    { border-top-color: var(--verde); }
.guia-color.es-amarillo { border-top-color: var(--ambar); }
.guia-color.es-rojo     { border-top-color: var(--rojo); }

.nota { margin-top: 1.5rem; color: var(--tenue); font-size: 0.8438rem; display: flex; gap: 0.5rem; align-items: flex-start; max-width: 70ch; }
.nota svg.i { margin-top: 2px; }

/* ── Mientras procesa ─────────────────────────────────────────────── */
.overlay {
    display: none; position: fixed; inset: 0; z-index: 1000;
    background: rgba(10, 13, 9, .78); backdrop-filter: blur(3px);
    align-items: center; justify-content: center; padding: 1rem;
}
.overlay.active { display: flex; }
.overlay-caja {
    background: var(--superficie); border-radius: var(--radio);
    padding: 1.75rem; text-align: center; max-width: 26rem; width: 100%;
    box-shadow: var(--sombra-flotante);
}
/* Tres puntos que laten: no prometen un avance que nadie conoce. */
.overlay-pulso { display: flex; gap: 0.375rem; justify-content: center; margin-bottom: 1rem; }
.overlay-pulso span { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--verde); animation: pulso 1.1s ease-in-out infinite; }
.overlay-pulso span:nth-child(2) { animation-delay: .15s; }
.overlay-pulso span:nth-child(3) { animation-delay: .30s; }
@keyframes pulso { 0%, 80%, 100% { opacity: .25; transform: scale(.85); } 40% { opacity: 1; transform: scale(1); } }
.overlay-text { font-size: 0.9375rem; font-weight: 600; overflow-wrap: anywhere; }
.overlay-subtext { font-size: 0.8438rem; color: var(--tenue); margin-top: 0.25rem; }
.overlay-barra { height: 0.3125rem; border-radius: 3px; background: var(--linea); overflow: hidden; margin-top: 1rem; }
.overlay-barra-parte { height: 100%; width: 0; background: var(--verde); transition: width .15s linear; }
.btn-cancelar { margin-top: 1.125rem; }

@media (max-width: 860px) {
    .guia-tres { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .franja .inicio-titulo { font-size: 1.875rem; }
    .zona { padding: 2rem 1rem; }
    .subida-pie .boton { width: 100%; }
}
