/* Portal de empleo de T-Formamos. Mismos tokens que la guía del CRM
   (static/estilos.html del CRM): letra Inter, grises de Apple, azul #0A84FF. */

@font-face {
    font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap;
    src: url('fuentes/inter/inter-latin-400.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap;
    src: url('fuentes/inter/inter-latin-500.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter'; font-style: normal; font-weight: 600 700; font-display: swap;
    src: url('fuentes/inter/inter-latin-600.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap;
    src: url('fuentes/inter/inter-latin-ext-400.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap;
    src: url('fuentes/inter/inter-latin-ext-500.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter'; font-style: normal; font-weight: 600 700; font-display: swap;
    src: url('fuentes/inter/inter-latin-ext-600.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --primary-color: #0A84FF;
    --primary-hover: #0071E3;
    --success-color: #34C759;
    --warning-color: #FF9500;
    --danger-color: #FF3B30;
    --gray-50: #FAFAFC;
    --gray-100: #F5F5F7;
    --gray-200: #E8E8ED;
    --gray-300: #D2D2D7;
    --gray-400: #AEAEB2;
    --gray-500: #6E6E73;
    --gray-600: #515154;
    --gray-700: #3A3A3C;
    --gray-800: #2C2C2E;
    --gray-900: #1D1D1F;
    --white: #FFFFFF;
    --hairline: rgba(0, 0, 0, 0.08);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius: 10px;
    --radius-md: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-synthesis: none;
    letter-spacing: -0.006em;
    -webkit-font-smoothing: antialiased;
    background: var(--gray-100);
    color: var(--gray-900);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
button, input, select, textarea { font-family: inherit; }
a { color: var(--primary-color); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Cabecera y pie ---- */
.cabecera { background: rgba(255, 255, 255, 0.86); border-bottom: 1px solid var(--hairline); }
.cabecera-dentro, .pie-dentro { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.cabecera-dentro { height: 56px; display: flex; align-items: center; justify-content: space-between; }
.marca { display: flex; align-items: center; gap: 10px; color: var(--gray-900); font-weight: 600; }
.marca:hover { text-decoration: none; }
.marca span { color: var(--gray-500); font-weight: 500; }
.menu { display: flex; align-items: center; gap: 8px; }
.menu a { color: var(--gray-700); font-size: 14px; padding: 6px 10px; border-radius: var(--radius-sm); }
.form-salir { display: inline; }
.texto-legal h2 { font-size: 20px; margin-bottom: 12px; }
.texto-legal h3 { font-size: 16px; margin: 16px 0 8px; }
.texto-legal p { margin-bottom: 10px; }
.menu a:hover { background: rgba(118, 118, 128, 0.12); text-decoration: none; }
/* En el móvil el menú del alumno (4 entradas) no cabe al lado de la marca: va debajo y puede partirse. */
@media (max-width: 640px) {
    .cabecera-dentro { height: auto; flex-wrap: wrap; row-gap: 4px; padding: 10px 16px 8px; }
    .menu { width: 100%; flex-wrap: wrap; gap: 2px; margin-left: -8px; }
    .menu a { padding: 6px 8px; }
}

.contenedor { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 32px 20px 48px; }
.contenedor-estrecho { max-width: 440px; margin: 0 auto; }

.pie { border-top: 1px solid var(--hairline); padding: 20px 0; font-size: 13px; color: var(--gray-500); }
.pie-dentro { display: flex; flex-wrap: wrap; gap: 18px; }
.pie a { color: var(--gray-500); }

/* ---- Títulos ---- */
.page-title { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
.subtitulo-pagina { color: var(--gray-500); font-size: 15px; margin-bottom: 24px; }
.cabecera-pagina { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
h2 { font-size: 18px; font-weight: 600; margin-bottom: 12px; }

/* ---- Tarjetas ---- */
.tarjeta { background: var(--white); border: 1px solid var(--hairline); border-radius: var(--radius-md);
           box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.tarjeta-titulo { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.tarjeta-meta { color: var(--gray-500); font-size: 13px; }

/* ---- Formularios ---- */
.campo { margin-bottom: 16px; }
.campo label, .etiqueta { display: block; font-size: 13px; font-weight: 500; color: var(--gray-700); margin-bottom: 6px; }
.ayuda { font-size: 12.5px; color: var(--gray-500); margin-top: 4px; }
.error-campo { font-size: 12.5px; color: #C22F26; margin-top: 4px; }
.form-control {
    width: 100%; height: 38px; padding: 0 12px; font-size: 14px; color: var(--gray-900);
    border: 1px solid var(--gray-300); border-radius: var(--radius); background: var(--white);
    transition: border-color .15s ease, box-shadow .15s ease;
}
textarea.form-control { height: auto; padding: 10px 12px; resize: vertical; max-width: 100%; }
select.form-control { padding-right: 32px; }
.form-control:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.18); }
.form-control::placeholder { color: var(--gray-400); }
.casilla { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; margin-bottom: 10px; }
.casilla input { margin-top: 4px; }
.acciones { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* ---- Botones (los de la guía del CRM) ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 36px; padding: 0 16px; font-size: 13.5px; font-weight: 590;
    border: none; border-radius: var(--radius); cursor: pointer; white-space: nowrap;
    text-decoration: none; transition: background .15s ease, transform .05s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn-primary { background: #0A84FF; color: var(--white); }
.btn-primary:hover { background: #0071E3; }
.btn-secondary { background: rgba(118, 118, 128, 0.12); color: #1D1D1F; }
.btn-secondary:hover { background: rgba(118, 118, 128, 0.18); }
.btn-danger { background: #FFECEB; color: #C22F26; }
.btn-danger:hover { background: #FFD9D6; }
.btn-danger-solid { background: #FF3B30; color: var(--white); }
.btn-danger-solid:hover { background: #E0342A; }
.btn-ghost { background: transparent; color: #0A84FF; }
.btn-ancho { width: 100%; }

/* ---- Chips (tonales, nunca macizos) ---- */
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px;
        font-size: 12px; font-weight: 500; background: rgba(118, 118, 128, 0.12); color: var(--gray-700); }
.chip-ok { background: #E9F7F0; color: #1C7A50; }
.chip-aviso { background: #FFF4E5; color: #A35A00; }
.chip-error { background: #FFECEB; color: #C22F26; }
.chip-azul { background: rgba(10, 132, 255, 0.12); color: #0A6CD6; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---- Avisos de página ---- */
.aviso { border-radius: var(--radius); padding: 10px 14px; font-size: 14px; margin-bottom: 16px;
         background: rgba(10, 132, 255, 0.10); color: #0A4F9C; }
.aviso-ok { background: #E9F7F0; color: #1C7A50; }
.aviso-error { background: #FFECEB; color: #C22F26; }

/* ---- Tablas ---- */
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th { text-align: left; font-weight: 500; color: var(--gray-500); font-size: 12.5px; padding: 8px 10px;
            border-bottom: 1px solid var(--hairline); }
.tabla td { padding: 10px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.tabla .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabla .col-acciones { text-align: right; white-space: nowrap; }
.tabla .fecha { white-space: nowrap; }
/* En el móvil una tabla ancha se desliza dentro de su tarjeta en vez de salirse de ella. */
@media (max-width: 640px) { .tabla { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; } }

.vacio { color: var(--gray-500); text-align: center; padding: 32px 0; }

@media (max-width: 640px) {
    .cabecera-pagina { flex-direction: column; }
    .page-title { font-size: 24px; }
}

/* ---- Formulario de oferta ---- */
.rejilla-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.sin-borde { border: 0; padding: 0; margin: 0; min-width: 0; }
.cabecera-pagina .acciones { margin-top: 0; }
@media (max-width: 640px) { .rejilla-2 { grid-template-columns: 1fr; } }

/* ---- Ofertas, perfil e inscritos ---- */
.barra-filtros { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.barra-filtros .form-control { width: auto; min-width: 180px; }
.tarjeta-enlace { display: block; color: inherit; }
.tarjeta-enlace:hover { text-decoration: none; border-color: var(--gray-300); }
.separado { margin-top: 10px; }
.texto-libre { white-space: pre-wrap; overflow-wrap: anywhere; }
.datos { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin-bottom: 16px; font-size: 14px; }
.datos dt { color: var(--gray-500); }
.datos dd { margin: 0; }
select.form-control.alto { height: auto; padding: 6px 12px; }
.fila-estado { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fila-estado .form-control { width: auto; min-width: 180px; }
.fila-estado .ayuda { flex-basis: 100%; margin: 0; }
@media (max-width: 640px) { .datos { grid-template-columns: 1fr; } }
.acciones-izquierda { justify-content: flex-start; margin-top: 12px; }
