@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
    --ink: #17243a;
    --muted: #718096;
    --line: #e5eaf1;
    --blue: #2457d6;
    --blue-dark: #1944b4;
    --bg: #f4f7fb
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 15px/1.55 'DM Sans', Arial, sans-serif
}

a {
    color: var(--blue);
    text-decoration: none
}

a:hover {
    text-decoration: underline
}

.topbar {
    min-height: 72px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px max(5vw, 24px);
    gap: 20px
}

.brand {
    font: 800 18px Manrope, sans-serif;
    color: var(--ink)
}

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

.topbar nav a,
.link-button {
    font-weight: 600;
    color: #536176
}

.logout-form {
    margin: 0
}

.link-button {
    border: 0;
    background: none;
    font: inherit;
    cursor: pointer
}

.container {
    width: min(960px, calc(100% - 36px));
    margin: 48px auto 80px;
    min-height: 65vh
}

.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 34px;
    box-shadow: 0 10px 35px rgba(27, 48, 80, .045)
}

.panel.wide {
    max-width: 760px;
    margin: auto
}

.panel.auth {
    max-width: 460px;
    margin: 35px auto
}

h1,
h2 {
    font-family: Manrope, sans-serif;
    letter-spacing: -.8px;
    line-height: 1.2
}

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

h2 {
    font-size: 19px;
    margin: 0 0 8px
}

.eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--blue)
}

.muted {
    color: var(--muted)
}

.small {
    font-size: 12px
}

.center {
    text-align: center
}

.right {
    text-align: right
}

.brand {
    color: #d1d5db;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand img {
    height: 60px;
    width: auto;
    object-fit: contain;
}


.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 26px
}

.full {
    grid-column: 1/-1
}

.stack {
    display: grid;
    gap: 18px;
    margin-top: 25px
}

label {
    display: grid;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    color: #35445b
}

input,
select {
    width: 100%;
    border: 1px solid #dce3ed;
    border-radius: 9px;
    padding: 12px 13px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    outline: none
}

input:focus,
select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(36, 87, 214, .1)
}

input[type=file] {
    font-size: 12px;
    padding: 9px;
    background: #f9fbfe
}

.file-field {
    border: 1px dashed #cbd6e5;
    border-radius: 10px;
    padding: 13px;
    background: #fbfcfe
}

.btn {
    border: 0;
    border-radius: 9px;
    padding: 12px 18px;
    font: 700 13px 'DM Sans', sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center
}

.btn:hover {
    text-decoration: none;
    filter: brightness(.97)
}

.primary {
    background: var(--blue);
    color: white
}

.primary:hover {
    background: var(--blue-dark)
}

.secondary {
    background: #eef3ff;
    color: #244da9
}

.small-btn {
    padding: 8px 12px;
    font-size: 12px
}

.separator {
    border-top: 1px solid var(--line);
    padding-top: 22px;
    margin-top: 10px
}

.alert {
    padding: 12px 15px;
    border-radius: 9px;
    margin-bottom: 16px;
    font-size: 13px
}

.alert.success {
    background: #e9f8ef;
    color: #17643a
}

.alert.danger {
    background: #fff0f0;
    color: #a52c2c
}

.alert.warning {
    background: #fff7e7;
    color: #885b10
}

.status {
    display: inline-flex;
    padding: 6px 11px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    background: #fff4d8;
    color: #95620a
}

.status.aprobado {
    background: #e7f7ed;
    color: #187342
}

.status.rechazado {
    background: #ffeded;
    color: #b32e36
}

.status.pendiente {
    background: #fff4d8;
    color: #95620a
}

.status-row {
    margin: 22px 0
}

.status-row .status {
    font-size: 16px;
    padding: 10px 18px
}

.summary {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin: 24px 0;
    font-size: 14px
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px
}

.page-heading h1 {
    margin-bottom: 4px
}

.counter {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 18px;
    font: 800 23px Manrope
}

.counter small {
    font: 500 11px 'DM Sans';
    color: var(--muted)
}

.table-panel {
    padding: 8px 22px
}

.table-wrap {
    overflow-x: auto
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left
}

th,
td {
    padding: 17px 12px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap
}

th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--muted)
}

td {
    font-size: 13px
}

tbody tr:last-child td {
    border-bottom: 0
}

.empty {
    text-align: center;
    padding: 45px 10px
}

.documents {
    margin: 25px 0
}

.document-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--line)
}

.document-item>div:nth-child(2) {
    flex: 1
}

.document-item p {
    margin: 3px 0 0
}

.pdf-icon {
    width: 42px;
    height: 46px;
    border-radius: 8px;
    background: #fff0f0;
    color: #c13c43;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 800
}

.review-form {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap
}

.review-form label {
    min-width: 160px
}

.review-form select {
    min-width: 190px
}

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

footer {
    text-align: center;
    color: #9aa5b5;
    font-size: 11px;
    padding: 25px;
    border-top: 1px solid var(--line)
}

@media(max-width:650px) {
    .topbar {
        height: auto;
        padding: 16px 18px;
        align-items: flex-start;
        flex-direction: column
    }

    .topbar nav {
        gap: 15px;
        flex-wrap: wrap
    }

    .container {
        margin: 25px auto 50px
    }

    .panel {
        padding: 23px 19px
    }

    .form-grid {
        grid-template-columns: 1fr
    }

    .page-heading {
        align-items: flex-start
    }

    .review-form {
        align-items: stretch;
        flex-direction: column
    }

    .review-form>* {
        width: 100%
    }

    .document-item {
        gap: 9px
    }

    .document-item .btn {
        padding: 8px
    }
}

/* Datos del candidato: distribución en dos columnas */
.candidate-data {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 35px;
    margin-top: 22px;
}

.data-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.data-item strong {
    color: #e2e5e9;
    font-size: 13px;
    font-weight: 600;
}

.data-item span {
    color: #aeb6c2;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* Adaptación para teléfonos */
@media (max-width: 600px) {
    .candidate-data {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

.action-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.action-group form {
    margin: 0;
}