:root {
    --blue-950: #031b3c;
    --blue-900: #06275f;
    --blue-800: #0a3c82;
    --blue-700: #1456a0;
    --gold: #e9b323;
    --gold-soft: #fff7d8;
    --bg: #eef3f8;
    --panel: #ffffff;
    --ink: #122033;
    --muted: #637083;
    --line: #d8e1eb;
    --danger: #b42318;
    --danger-bg: #fff1f0;
    --success: #117a42;
    --success-bg: #edfdf3;
    --warning: #9a6700;
    --warning-bg: #fff8df;
    --shadow: 0 22px 60px rgba(3, 27, 60, .10);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 0%, rgba(20, 86, 160, .10), transparent 30%),
        var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: var(--blue-800);
}

.site-header,
.admin-topbar {
    background: linear-gradient(110deg, var(--blue-950), var(--blue-800));
    color: #fff;
    box-shadow: 0 8px 24px rgba(3, 27, 60, .22);
}

.site-header__inner,
.admin-topbar {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header__inner {
    min-height: 86px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-header__inner strong,
.admin-topbar strong {
    display: block;
    font-size: 18px;
}

.site-header__inner span,
.admin-topbar span {
    display: block;
    margin-top: 3px;
    color: #d9e8ff;
    font-size: 13px;
}

.brand-mark {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255,255,255,.65);
    border-radius: 16px;
    background: rgba(255,255,255,.11);
    color: var(--gold);
    font-weight: 900;
    letter-spacing: .05em;
}

.brand-mark.large {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    font-size: 20px;
    background: var(--blue-900);
}

.page-shell,
.admin-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 56px;
}

.hero-card,
.form-panel,
.information-card,
.filter-card,
.table-wrap,
.login-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    gap: 28px;
    align-items: center;
    padding: 34px;
    margin-bottom: 22px;
    overflow: hidden;
    position: relative;
}

.hero-card::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -100px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(233, 179, 35, .15);
}

.hero-card h1,
.admin-heading h1,
.login-card h1 {
    margin: 0 0 12px;
    color: var(--blue-950);
    font-size: clamp(30px, 5vw, 50px);
    line-height: 1.02;
}

.hero-card p,
.admin-heading p,
.login-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.eyebrow {
    margin: 0 0 9px !important;
    color: var(--blue-700) !important;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .10em;
    text-transform: uppercase;
}

.event-summary {
    position: relative;
    z-index: 1;
    padding: 22px;
    border-radius: 18px;
    background: linear-gradient(145deg, var(--blue-950), var(--blue-800));
    color: #fff;
}

.event-summary span,
.event-summary small {
    display: block;
}

.event-summary span {
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.event-summary strong {
    display: block;
    margin: 10px 0;
    font-size: 18px;
    line-height: 1.35;
}

.event-summary small {
    color: #dbeafe;
    line-height: 1.5;
}

.form-panel,
.information-card,
.filter-card {
    padding: 30px;
    margin-bottom: 22px;
}

.section-heading,
.admin-heading,
.batch-actions,
.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.section-heading {
    margin-bottom: 24px;
}

.section-heading h2,
.information-card h2 {
    margin: 0;
    color: var(--blue-950);
}

.required-note {
    color: var(--muted);
    font-size: 12px;
}

.request-form {
    display: grid;
    gap: 20px;
}

.grid {
    display: grid;
    gap: 18px;
}

.grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
    display: grid;
    gap: 8px;
    color: #26364c;
    font-size: 14px;
    font-weight: 750;
}

label small,
td small {
    display: block;
    color: var(--muted);
    font-weight: 500;
    line-height: 1.45;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #c7d2df;
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    padding: 12px 14px;
    transition: border-color .18s, box-shadow .18s;
}

input,
select {
    min-height: 48px;
}

textarea {
    resize: vertical;
    min-height: 112px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--blue-700);
    box-shadow: 0 0 0 4px rgba(20, 86, 160, .14);
}

.field-error {
    color: var(--danger);
    font-size: 12px;
    font-weight: 700;
}

.field-error.standalone {
    margin-top: -12px;
}

.check-field {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    font-weight: 600;
    line-height: 1.5;
}

.check-field input {
    flex: 0 0 auto;
    width: 20px;
    min-height: 20px;
    margin-top: 2px;
}

.check-field.compact {
    align-items: center;
    font-size: 13px;
}

.honeypot {
    position: absolute !important;
    left: -99999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

button,
.primary-button,
.secondary-button,
.table-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 0;
    border-radius: 12px;
    padding: 11px 18px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
}

.primary-button,
button {
    background: linear-gradient(135deg, var(--blue-800), var(--blue-700));
    color: #fff;
    box-shadow: 0 10px 24px rgba(10, 60, 130, .20);
}

.primary-button:hover,
button:hover {
    background: var(--blue-900);
}

.secondary-button {
    background: #e8eef5;
    color: var(--blue-900);
}

.table-link {
    min-height: 36px;
    padding: 7px 12px;
    background: #edf4ff;
    color: var(--blue-800);
}

.alert {
    margin-bottom: 22px;
    border-radius: 16px;
    padding: 17px 20px;
    border: 1px solid transparent;
}

.alert p {
    margin: 6px 0 0;
}

.alert.success {
    color: var(--success);
    background: var(--success-bg);
    border-color: #b7ebca;
}

.alert.error {
    color: var(--danger);
    background: var(--danger-bg);
    border-color: #ffc9c4;
}

.information-card ol {
    margin: 14px 0 0;
    padding-left: 22px;
    color: var(--muted);
    line-height: 1.75;
}

.site-footer {
    padding: 24px 16px 34px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.login-body {
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-shell {
    width: min(470px, 100%);
}

.login-card {
    padding: 36px;
    text-align: center;
}

.login-card .request-form {
    margin: 26px 0 20px;
    text-align: left;
}

.text-link {
    font-size: 13px;
    font-weight: 700;
}

.admin-topbar {
    min-height: 76px;
    padding: 0;
}

.admin-topbar nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.admin-topbar a {
    color: #fff;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
}

.admin-heading {
    margin-bottom: 24px;
}

.admin-heading h1 {
    font-size: clamp(30px, 4vw, 44px);
}

.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    gap: 13px;
    margin-bottom: 20px;
}

.metrics article {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
}

.metrics span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.metrics strong {
    display: block;
    margin-top: 8px;
    color: var(--blue-900);
    font-size: 28px;
}

.filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.filter-actions {
    display: flex;
    gap: 10px;
}

.batch-actions {
    margin: 0 0 14px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
}

.batch-actions > div {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 18px;
}

.admin-table {
    width: 100%;
    min-width: 1180px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    font-size: 13px;
}

.admin-table th {
    background: #f4f7fb;
    color: #435269;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.admin-table tr:hover td {
    background: #fbfdff;
}

.checkbox-column {
    width: 46px;
}

.status-pill {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: #e8eef5;
    color: #3b4a5f;
    font-size: 11px;
    font-weight: 850;
    white-space: nowrap;
}

.status-nueva {
    background: #eef4ff;
    color: #1d4f91;
}

.status-en_revision {
    background: var(--warning-bg);
    color: var(--warning);
}

.status-aprobada {
    background: var(--success-bg);
    color: var(--success);
}

.status-rechazada {
    background: var(--danger-bg);
    color: var(--danger);
}

.status-exportada {
    background: #f0eaff;
    color: #673ab7;
}

.status-atendida {
    background: #e8fbfb;
    color: #087b7b;
}

.empty {
    padding: 34px !important;
    text-align: center !important;
    color: var(--muted);
}

.narrow-admin {
    width: min(980px, calc(100% - 32px));
}

.history-list {
    display: grid;
    gap: 10px;
    padding: 0;
    list-style: none;
}

.history-list li {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.history-list span {
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 900px) {
    .hero-card,
    .grid.three,
    .filters {
        grid-template-columns: 1fr 1fr;
    }

    .hero-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .page-shell,
    .admin-shell,
    .site-header__inner,
    .admin-topbar {
        width: min(100% - 20px, 1180px);
    }

    .site-header__inner {
        min-height: 76px;
    }

    .hero-card,
    .form-panel,
    .information-card,
    .filter-card,
    .login-card {
        padding: 22px;
        border-radius: 17px;
    }

    .grid.two,
    .grid.three,
    .filters {
        grid-template-columns: 1fr;
    }

    .section-heading,
    .admin-heading,
    .batch-actions,
    .admin-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-topbar {
        padding: 16px 0;
    }

    .filter-actions,
    .batch-actions > div {
        width: 100%;
        flex-direction: column;
    }

    .primary-button,
    .secondary-button,
    button {
        width: 100%;
    }
}
