/* =========================================================
   Solicitud de Reclutamiento — hoja de estilos corporativa
   Sin dependencias de build (Tailwind/Vite); CSS plano + variables.
   ========================================================= */

:root {
    --navy: #15324B;
    --navy-soft: #1c3f5e;
    --blue: #1F6E8C;
    --blue-soft: #e8f1f5;
    --bg: #EEF2F6;
    --card: #ffffff;
    --text: #1f2d3a;
    --muted: #5b7083;
    --border: #d9e2ea;
    --danger: #c0392b;
    --danger-bg: #fdecea;
    --success: #1e7e4f;
    --success-bg: #e7f6ee;
    --radius: 12px;
    --shadow: 0 10px 30px rgba(21, 50, 75, 0.10), 0 2px 6px rgba(21, 50, 75, 0.06);
    font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

[x-cloak] { display: none !important; }

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

button { font-family: inherit; cursor: pointer; }

/* ---------- Topbar ---------- */

.topbar {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
    color: #fff;
    padding: 18px 24px;
}

.topbar-inner {
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo-chip {
    background: #fff;
    border-radius: 8px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    flex-shrink: 0;
}

.brand-logo {
    display: block;
    height: 46px;
    width: auto;
}

@media (max-width: 560px) {
    .brand-logo { height: 34px; }
}

.brand-text h1 {
    font-size: 17px;
    margin: 0;
    font-weight: 700;
}

.brand-text p {
    margin: 0;
    font-size: 12.5px;
    color: #b8c9d6;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.22);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #f5c451;
}

.status-pill.is-sent .status-dot { background: #5ad0a0; }

/* ---------- Progress ---------- */

.progress-wrap {
    max-width: 980px;
    margin: 0 auto;
    padding: 14px 24px 0;
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 6px;
}

.progress-track {
    height: 8px;
    background: #dbe6ee;
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blue), #2f92b8);
    border-radius: 999px;
    transition: width .35s ease;
}

/* ---------- Layout / Card ---------- */

.page {
    max-width: 980px;
    margin: 0 auto;
    padding: 20px 24px 64px;
}

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

.card-header {
    padding: 20px 24px 0;
}

.card-title {
    font-size: 19px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--navy);
}

.card-subtitle {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 13.5px;
}

.card-body {
    padding: 4px 24px 24px;
}

/* ---------- Section blocks ---------- */

.section-title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin: 28px 0 4px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--blue-soft);
}

.section-title:first-child { margin-top: 0; }

.section-hint {
    color: var(--muted);
    font-size: 13px;
    margin: 0 0 14px;
}

/* ---------- Field grid ---------- */

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

.grid .span-2 { grid-column: 1 / -1; }

@media (max-width: 680px) {
    .grid { grid-template-columns: 1fr; }
}

.field { display: flex; flex-direction: column; gap: 6px; }

.field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
}

.req {
    color: var(--danger);
    margin-left: 2px;
}

.field input[type="text"],
.field input[type="date"],
.field input[type="number"],
.field input[type="email"],
.field select,
.field textarea {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    width: 100%;
}

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

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(31, 110, 140, 0.15);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
    border-color: var(--danger);
    background: var(--danger-bg);
}

.error-text {
    color: var(--danger);
    font-size: 12.5px;
    font-weight: 500;
}

.help-text {
    color: var(--muted);
    font-size: 12px;
}

/* ---------- Tabs (vacantes) ---------- */

.vacantes-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 24px 0 14px;
}

.tabs {
    display: flex;
    gap: 6px;
    background: var(--bg);
    padding: 5px;
    border-radius: 10px;
    flex-wrap: wrap;
}

.tab-btn {
    border: none;
    background: transparent;
    padding: 9px 16px;
    border-radius: 7px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.tab-btn.is-active {
    background: #fff;
    color: var(--navy);
    box-shadow: 0 1px 4px rgba(21,50,75,0.15);
}

.tab-btn .tab-flag {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--danger);
}

.tab-btn.is-complete .tab-flag { background: var(--success); }

.vacante-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13.5px;
    font-weight: 600;
    border: 1px solid transparent;
    transition: background .15s, border-color .15s, opacity .15s;
    white-space: nowrap;
}

.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover:not(:disabled) { background: #195b76; }

.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover:not(:disabled) { background: #0f2436; }

.btn-outline {
    background: #fff;
    border-color: var(--border);
    color: var(--navy);
}
.btn-outline:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border-color: transparent;
}
.btn-ghost:hover:not(:disabled) { background: var(--bg); color: var(--navy); }

.btn-danger-ghost {
    background: transparent;
    color: var(--danger);
    border-color: transparent;
}
.btn-danger-ghost:hover:not(:disabled) { background: var(--danger-bg); }

.btn-sm { padding: 7px 11px; font-size: 12.5px; }
.btn-block { width: 100%; }

/* ---------- Footer action bar ---------- */

.action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 24px;
    background: #fafcfd;
    border-top: 1px solid var(--border);
}

.action-bar-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Services matrix ---------- */

.matrix-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }

.matrix {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
    font-size: 13.5px;
}

.matrix th, .matrix td {
    padding: 11px 14px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.matrix th { background: var(--navy); color: #fff; font-weight: 600; font-size: 12.5px; }

.matrix td:first-child, .matrix th:first-child {
    text-align: left;
    position: sticky;
    left: 0;
    background: #fff;
    font-weight: 600;
    color: var(--text);
    min-width: 220px;
}

.matrix th:first-child { background: var(--navy); color: #fff; }

.matrix tr:last-child td { border-bottom: none; }
.matrix tr:nth-child(even) td:first-child { background: #fbfdfe; }

.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    vertical-align: middle;
}

.switch input { opacity: 0; width: 0; height: 0; }

.switch-track {
    position: absolute;
    inset: 0;
    background: #cdd8e1;
    border-radius: 999px;
    transition: background .15s;
}

.switch-track::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .15s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.switch input:checked + .switch-track { background: var(--success); }
.switch input:checked + .switch-track::before { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px rgba(31,110,140,0.3); }

/* ---------- Checkbox / privacy ---------- */

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    background: var(--blue-soft);
    border-radius: 10px;
    border: 1px solid #d3e6ee;
}

.check-row input[type="checkbox"] {
    margin-top: 3px;
    width: 17px;
    height: 17px;
    accent-color: var(--blue);
    flex-shrink: 0;
}

.check-row label { font-size: 13.5px; color: var(--text); line-height: 1.5; }
.check-row a { font-weight: 600; }

/* ---------- Summary screen ---------- */

.summary-block {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 14px;
}

.summary-block h3 {
    margin: 0 0 10px;
    font-size: 14px;
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 18px;
    font-size: 13px;
}

@media (max-width: 680px) { .summary-grid { grid-template-columns: 1fr; } }

.summary-grid dt { color: var(--muted); font-weight: 600; margin: 0; }
.summary-grid dd { margin: 0 0 8px; }

.summary-services { font-size: 12.5px; color: var(--muted); }
.summary-services strong { color: var(--text); }

.chip {
    display: inline-block;
    background: var(--blue-soft);
    color: var(--blue);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11.5px;
    font-weight: 600;
    margin: 2px 4px 2px 0;
}

/* ---------- Modal ---------- */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 30, 45, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 50;
}

.modal {
    background: #fff;
    border-radius: 14px;
    max-width: 440px;
    width: 100%;
    padding: 26px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.modal h3 { margin: 0 0 8px; color: var(--navy); font-size: 17px; }
.modal p { margin: 0 0 20px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- Toast ---------- */

.toast {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--navy);
    color: #fff;
    padding: 11px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast .dot { width: 7px; height: 7px; border-radius: 50%; background: #5ad0a0; }

/* ---------- Success screen ---------- */

.success-wrap { text-align: center; padding: 40px 24px; }

.success-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--success-bg);
    color: var(--success);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px;
    font-size: 30px;
}

.folio-badge {
    display: inline-block;
    background: var(--navy);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 10px 20px;
    border-radius: 8px;
    margin: 14px 0 22px;
    font-size: 16px;
}

.success-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 18px;
}

.email-copy-row {
    display: flex;
    gap: 8px;
    max-width: 380px;
    margin: 22px auto 0;
    flex-wrap: wrap;
    justify-content: center;
}

.email-copy-row input {
    flex: 1;
    min-width: 200px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13.5px;
}

/* ---------- Utility ---------- */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.small-muted { color: var(--muted); font-size: 12.5px; }

.alert-banner {
    background: var(--danger-bg);
    border: 1px solid #f2c6c0;
    color: var(--danger);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
