:root {
    --azul: #003f7f;
    --azul-boton: #00346e;
    --azul-hover: #002a57;
    --fondo: #ececec;
    --texto: #333333;
    --borde: #cccccc;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: var(--texto);
    background: var(--fondo);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.barra {
    background: var(--azul);
    height: 50px;
    display: flex;
    align-items: center;
    padding: 0 16px;
}
.logo { height: 30px; }

.contenido {
    flex: 1;
    width: 100%;
    padding: 16px;
}

.panel {
    background: #fff;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
    overflow: hidden;
}
.panel + .panel { margin-top: 16px; }

.panel-titulo {
    margin: 0;
    background: var(--azul);
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    padding: 10px 15px;
}
.panel-cuerpo { padding: 16px 15px 18px; }

.campo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 4px;
}
.campo label {
    width: 170px;
    text-align: right;
    font-size: 10px;
    text-transform: uppercase;
    color: #444;
}
.campo input {
    width: 206px;
    height: 29px;
    padding: 4px 8px;
    font-size: 14px;
    border: 1px solid var(--borde);
    border-radius: 3px;
}
.campo input:focus {
    outline: none;
    border-color: var(--azul);
    box-shadow: 0 0 0 2px rgba(0, 63, 127, .2);
}

.acciones {
    text-align: center;
    margin-top: 10px;
}
.boton {
    background: var(--azul-boton);
    color: #fff;
    border: 0;
    border-radius: 3px;
    padding: 9px 22px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
}
.boton:hover { background: var(--azul-hover); }
.boton:focus-visible,
.boton-secundario:focus-visible,
.tabla a:focus-visible { outline: 2px solid #4a90d9; outline-offset: 2px; }

.aviso {
    margin: 0 auto 12px;
    max-width: 420px;
    padding: 8px 10px;
    background: #fdecea;
    color: #8a1f11;
    border: 1px solid #f5c2bd;
    border-radius: 3px;
    text-align: center;
}
.aviso[hidden] { display: none; }

.barra-acciones {
    display: flex;
    gap: 8px;
    padding: 15px;
}
.boton-secundario {
    display: inline-block;
    padding: 8px 16px;
    font-size: 13px;
    color: var(--azul);
    background: #fff;
    border: 1px solid var(--azul);
    border-radius: 3px;
    text-decoration: none;
}
.boton-secundario:hover { background: #eef3f9; }

.tabla-scroll { overflow-x: auto; }
.tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.tabla th {
    text-align: left;
    font-weight: bold;
    color: #222;
    padding: 10px 12px;
    border-bottom: 3px solid var(--azul);
    white-space: nowrap;
}
.tabla td {
    padding: 9px 12px;
    border-bottom: 1px solid #e5e5e5;
}
.tabla tbody tr:hover { background: #f6f8fb; }
.tabla .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.tabla a {
    color: var(--azul);
    font-weight: bold;
    text-decoration: none;
}
.tabla a:hover { text-decoration: underline; }
.tabla .centro, .tabla th.centro { text-align: center; }
.tabla .fecha { white-space: nowrap; }
.sin-dato { color: #888; }

.circulo {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    vertical-align: middle;
}
.circulo-verde { background: #22a61d; }
.circulo-amarillo { background: #e1e600; }
.circulo-rojo { background: #e8231b; }
.estado-vencido { color: #e8231b; }

.mensaje {
    margin: 0;
    padding: 24px 15px;
    text-align: center;
    color: #555;
}

.pie {
    margin: 0 16px;
    padding: 12px 0 16px;
    border-top: 1px solid #666;
    text-align: right;
    font-size: 12px;
    color: #444;
}

@media (max-width: 600px) {
    .contenido { padding: 10px; }
    .campo {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        margin-bottom: 10px;
    }
    .campo label { width: auto; text-align: left; font-size: 11px; }
    .campo input { width: 100%; height: 42px; font-size: 16px; }
    .boton { width: 100%; padding: 12px; font-size: 15px; }
    .tabla th, .tabla td { padding: 8px; }
    .pie { text-align: center; }
}
