:root {
    --azul: #073b70;
    --azul2: #0f5ea8;
    --dorado: #d8a634;
    --verde: #0b7a5a;
    --rojo: #b42318;
    --gris: #64748b;
    --bg: #f4f7fb;
    --card: #fff;
    --line: #dbe3ef;
    --ink: #0f172a;
    --muted: #667085;
    --shadow: 0 18px 45px rgba(15, 23, 42, .10)
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink)
}

a {
    color: inherit;
    text-decoration: none
}

.container {
    width: min(1180px, 92%);
    margin: auto
}

.topbar {
    background: linear-gradient(135deg, var(--azul), #0b5394);
    color: #fff;
    padding: 18px 0;
    box-shadow: var(--shadow)
}

.topbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px
}

.seal {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff, #e8f2ff);
    color: var(--azul);
    display: grid;
    place-items: center;
    font-weight: 900;
    letter-spacing: -1px
}

.logo h1 {
    font-size: 20px;
    margin: 0
}

.logo p {
    margin: 2px 0 0;
    color: #cfe4ff;
    font-size: 13px
}

.nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap
}

.nav a,
.btn {
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 14px;
    padding: 10px 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--azul);
    cursor: pointer
}

.nav a {
    background: rgba(255, 255, 255, .12);
    color: #fff
}

.btn.primary {
    background: linear-gradient(135deg, var(--azul2), var(--azul));
    color: #fff;
    border: 0
}

.btn.gold {
    background: linear-gradient(135deg, #f4c95d, var(--dorado));
    color: #16213a;
    border: 0
}

.btn.dark {
    background: #111827;
    color: #fff;
    border: 0
}

.btn.danger {
    background: var(--rojo);
    color: #fff;
    border: 0
}

.btn.ghost {
    background: #fff;
    color: var(--azul);
    border: 1px solid var(--line)
}

.hero {
    padding: 42px 0 26px
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 24px;
    align-items: stretch
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 24px
}

.hero h2 {
    font-size: 42px;
    line-height: 1.05;
    margin: 0 0 12px;
    color: var(--azul)
}

.lead {
    font-size: 18px;
    color: var(--muted);
    line-height: 1.55
}

.badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px
}

.badge {
    background: #eaf2ff;
    color: var(--azul);
    border: 1px solid #cfe1ff;
    padding: 8px 11px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800
}

.badge.green {
    background: #e8fff6;
    color: var(--verde);
    border-color: #bff3df
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px
}

.stat {
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, #f8fbff);
    border: 1px solid var(--line)
}

.stat b {
    font-size: 28px;
    color: var(--azul)
}

.stat span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px
}

.section {
    padding: 20px 0
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 14px
}

.section-title h3 {
    margin: 0;
    color: var(--azul);
    font-size: 24px
}

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

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

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

.field label {
    font-weight: 800;
    font-size: 13px;
    color: #344054;
    margin-bottom: 7px;
    display: block
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid #ccd6e3;
    border-radius: 14px;
    padding: 12px 13px;
    font-size: 15px;
    background: #fff;
    outline: none
}

.field textarea {
    min-height: 130px;
    resize: vertical
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--azul2);
    box-shadow: 0 0 0 4px rgba(15, 94, 168, .12)
}

.hint {
    color: var(--muted);
    font-size: 12px;
    margin-top: 5px
}

.form-block {
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 20px;
    margin: 18px 0;
    background: #fff
}

.form-block h4 {
    margin: 0 0 14px;
    color: var(--azul);
    font-size: 18px
}

.check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: #344054
}

.check input {
    margin-top: 3px
}

.alert {
    border-radius: 16px;
    padding: 14px 16px;
    margin: 14px 0;
    border: 1px solid
}

.alert.success {
    background: #ecfdf3;
    border-color: #abefc6;
    color: #067647
}

.alert.danger {
    background: #fef3f2;
    border-color: #fecdca;
    color: #b42318
}

.alert.info {
    background: #eff8ff;
    border-color: #b2ddff;
    color: #175cd3
}

.footer {
    padding: 28px 0;
    color: var(--muted);
    text-align: center
}

.login-page,
.install-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at top left, #dcecff, transparent 35%), linear-gradient(135deg, #f7fbff, #eef3f9)
}

.login-card,
.install-card {
    width: min(460px, 92%);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 30px
}

.brand-mark {
    width: 68px;
    height: 68px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--azul), var(--azul2));
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 900;
    margin-bottom: 18px
}

.login-card h1,
.install-card h1 {
    margin: 0 0 8px;
    color: var(--azul)
}

.admin-layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    min-height: 100vh
}

.sidebar {
    background: #071d35;
    color: #fff;
    padding: 22px;
    position: sticky;
    top: 0;
    height: 100vh
}

.sidebar .seal {
    margin-bottom: 12px
}

.sidebar h2 {
    font-size: 18px;
    margin: 0 0 3px
}

.sidebar p {
    color: #bcd2ea;
    margin: 0 0 20px
}

.side-nav {
    display: grid;
    gap: 8px;
    margin-top: 24px
}

.side-nav a {
    padding: 12px 14px;
    border-radius: 14px;
    color: #dcecff;
    font-weight: 700
}

.side-nav a:hover,
.side-nav a.active {
    background: rgba(255, 255, 255, .12);
    color: #fff
}

.main {
    padding: 26px
}

.admin-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px
}

.admin-head h1 {
    margin: 0;
    color: var(--azul);
    font-size: 28px
}

.table-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    overflow: hidden
}

.table-tools {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    align-items: center
}

.table-tools input,
.table-tools select {
    border: 1px solid #ccd6e3;
    border-radius: 12px;
    padding: 10px 12px
}

table {
    width: 100%;
    border-collapse: collapse
}

th,
td {
    text-align: left;
    padding: 13px 15px;
    border-bottom: 1px solid #edf1f7;
    font-size: 14px
}

th {
    background: #f8fafc;
    color: #475467;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em
}

.pill {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    background: #eaf2ff;
    color: var(--azul)
}

.pill.ADMITIDO,
.pill.GANADOR {
    background: #ecfdf3;
    color: #067647
}

.pill.OBSERVADO {
    background: #fffaeb;
    color: #b54708
}

.pill.NO {
    background: #fef3f2;
    color: #b42318
}

.pill.EVALUADO {
    background: #f4f3ff;
    color: #5925dc
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px
}

.metric {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 18px;
    box-shadow: var(--shadow)
}

.metric b {
    font-size: 32px;
    color: var(--azul)
}

.metric span {
    display: block;
    color: var(--muted);
    font-size: 13px
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 850px) 360px;
    gap: 18px;
    max-width: 1230px;
}

.kv {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed #e5e7eb
}

.kv b {
    color: #475467
}

.file-list {
    display: grid;
    gap: 10px
}

.file-item {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    border: 1px solid var(--line);
    padding: 11px;
    border-radius: 14px;
    background: #f8fafc
}

.score {
    font-weight: 900;
    color: var(--azul)
}

.print-only {
    display: none
}

@media(max-width:900px) {

    .hero-grid,
    .grid.two,
    .grid.three,
    .detail-grid,
    .metrics {
        grid-template-columns: 1fr
    }

    .admin-layout {
        grid-template-columns: 1fr
    }

    .sidebar {
        height: auto;
        position: relative
    }

    .topbar .container {
        align-items: flex-start;
        flex-direction: column
    }

    .hero h2 {
        font-size: 32px
    }

    table {
        display: block;
        overflow: auto
    }
}

@media print {

    .sidebar,
    .admin-head,
    .no-print,
    .btn,
    .nav,
    .topbar {
        display: none !important
    }

    .main {
        padding: 0
    }

    .card,
    .table-card {
        box-shadow: none;
        border: 0
    }

    .print-only {
        display: block
    }

    body {
        background: #fff
    }

    .admin-layout {
        display: block
    }
}