:root {
    --navy: #0E2A6B;
    --orange: #F26522;
    --gris-claro: #F5F6FA;
    --gris-borde: #DCE0EA;
    --verde: #1E8E5A;
    --rojo: #C4392B;
}

* { box-sizing: border-box; }

body {
    font-family: Calibri, Arial, sans-serif;
    background: var(--gris-claro);
    color: #1B1F2A;
    margin: 0;
}

.pantalla-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--navy), #17398f);
}

.caja-login {
    background: #fff;
    padding: 32px 36px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
    width: 320px;
    text-align: center;
}
.caja-login h1 { margin: 0 0 4px; color: var(--navy); }
.caja-login .subtitulo { color: #667; font-size: 13px; margin-bottom: 18px; }
.caja-login input {
    width: 100%; padding: 10px 12px; margin-bottom: 12px;
    border: 1px solid var(--gris-borde); border-radius: 8px; font-size: 15px;
}
.caja-login button {
    width: 100%; padding: 11px; background: var(--orange); color: #fff;
    border: none; border-radius: 8px; font-weight: bold; cursor: pointer; font-size: 15px;
}
.caja-login .error { color: var(--rojo); font-size: 13px; margin: -4px 0 10px; }

header.cabecera {
    background: var(--navy);
    color: #fff;
    padding: 18px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
header.cabecera h1 { margin: 0; font-size: 22px; }
header.cabecera .subtitulo { margin: 2px 0 0; font-size: 13px; opacity: .85; }

main { max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px; }

.cabecera-seccion {
    display: flex; justify-content: space-between; align-items: center;
    margin: 8px 0 14px;
}
.cabecera-seccion h2 { margin: 0; color: var(--navy); font-size: 19px; }

.tarjetas-resumen {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 26px;
}
.tarjeta {
    background: #fff; border: 1px solid var(--gris-borde); border-radius: 10px;
    padding: 14px 16px;
}
.tarjeta .valor { font-size: 24px; font-weight: bold; color: var(--navy); }
.tarjeta .etiqueta { font-size: 12px; color: #667; text-transform: uppercase; letter-spacing: .03em; }
.tarjeta.destaque .valor { color: var(--orange); }

button { font-family: inherit; }
.btn-primario {
    background: var(--orange); color: #fff; border: none; border-radius: 8px;
    padding: 10px 16px; font-weight: bold; cursor: pointer;
}
.btn-secundario {
    background: #fff; color: var(--navy); border: 1px solid var(--gris-borde); border-radius: 8px;
    padding: 10px 16px; font-weight: bold; cursor: pointer; text-decoration: none; display: inline-block;
}
.btn-exportar {
    background: var(--navy); color: #fff; border: none; border-radius: 8px;
    padding: 10px 16px; font-weight: bold; cursor: pointer;
}
.btn-icono {
    background: none; border: none; cursor: pointer; font-size: 15px; padding: 4px 6px;
}

table.tabla {
    width: 100%; border-collapse: collapse; background: #fff;
    border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
table.tabla th, table.tabla td {
    padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--gris-borde); font-size: 13.5px;
}
table.tabla th { background: var(--navy); color: #fff; font-weight: 600; }
table.tabla tr:hover td { background: #FAFBFF; }

.pill {
    display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.pill.pendiente { background: #FDECEA; color: var(--rojo); }
.pill.devuelto { background: #FFF3E0; color: #9C5B00; }
.pill.pagado_completo { background: #E7F6EE; color: var(--verde); }
.pill.liquidado { background: #E6ECFB; color: var(--navy); }

.cargando { color: #889; padding: 20px 0; }

.modal-fondo {
    position: fixed; inset: 0; background: rgba(10,20,50,.45);
    display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal-fondo.oculto { display: none; }
.modal-caja {
    background: #fff; border-radius: 14px; padding: 24px 26px; width: 380px; max-width: 92vw;
    max-height: 88vh; overflow-y: auto;
}
.modal-caja h3 { margin: 0 0 16px; color: var(--navy); }
.modal-caja label {
    display: block; font-size: 12.5px; font-weight: 600; color: #445; margin-bottom: 12px;
}
.modal-caja input, .modal-caja select, .modal-caja textarea {
    width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--gris-borde);
    border-radius: 7px; font-size: 14px; font-family: inherit;
}
.fila-doble { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-botones { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

.aviso-incompletos {
    background: #fff; border: 1px solid var(--gris-borde); border-radius: 10px; padding: 4px 0;
}
