* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f4f6f8;
    color: #1f2933;
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

h1 {
    font-size: 22px;
    margin: 0 0 8px;
}

p.subtitle {
    color: #6b7280;
    margin: 0 0 28px;
    font-size: 14px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
}

input[type="text"],
input[type="password"],
input[type="date"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 20px;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

button {
    width: 100%;
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 13px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

button:hover { background: #1d4ed8; }

.error {
    background: #fef2f2;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
}

.success {
    background: #f0fdf4;
    color: #15803d;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
}

.footer-note {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 20px;
}

a { color: #2563eb; }

.icon-check {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #dcfce7;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
}

/* ---------- Panel de informes ---------- */
.panel-wide {
    max-width: 1100px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.panel-header h1 { margin: 0; }

.btn-secondary {
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.btn-secondary:hover { background: #f9fafb; }

.filtros {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.filtros .campo { flex: 1; min-width: 140px; }
.filtros label { margin-bottom: 6px; }
.filtros input { margin-bottom: 0; }
.filtros button { width: auto; padding: 12px 20px; white-space: nowrap; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin: 28px 0;
}
.stat-box {
    background: #f9fafb;
    border: 1px solid #eef0f2;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}
.stat-box .valor {
    font-size: 26px;
    font-weight: 700;
    color: #1f2933;
}
.stat-box .etiqueta {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

.tabla-wrap {
    overflow-x: auto;
    border: 1px solid #eef0f2;
    border-radius: 10px;
    margin-bottom: 32px;
}

table.informe {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
table.informe th {
    background: #f9fafb;
    text-align: left;
    padding: 10px 14px;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #eef0f2;
    white-space: nowrap;
}
table.informe td {
    padding: 10px 14px;
    border-bottom: 1px solid #f3f4f6;
    white-space: nowrap;
}
table.informe tr:last-child td { border-bottom: none; }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}
.badge-exito { background: #dcfce7; color: #15803d; }
.badge-fallo { background: #fef2f2; color: #b91c1c; }

.section-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 12px;
}

.empty-state {
    padding: 30px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}

/* ---------- Menú de documentos ---------- */
.menu-documentos {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.opcion-documento {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    text-decoration: none;
    color: #1f2933;
    font-weight: 600;
    font-size: 15px;
    transition: border-color 0.15s, background 0.15s;
}

.opcion-documento:hover {
    border-color: #2563eb;
    background: #f5f8ff;
}

.opcion-documento::after {
    content: "→";
    color: #2563eb;
    font-weight: 700;
}