/* ═══════════════════════════════════════════════════════════════════════
   MATRÍCULAS — estilos (paleta azul del tema · Outfit)
   Todo bajo .mat-* para no colisionar con el resto del tema.
   Misma línea visual que /inscripciones/ (tarjetas, pasos en píldora, hero).
═══════════════════════════════════════════════════════════════════════ */

.mat-wrap {
    max-width: 980px;
    margin: 0 auto 80px;
    padding: 0 40px;
    font-family: 'Outfit', sans-serif;
    color: var(--color-texto-principal);
}

.mat-wrap [hidden] { display: none !important; }

/* ── Botones ── */
.mat-btn {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: .3px;
    border: none;
    border-radius: 10px;
    padding: 12px 26px;
    cursor: pointer;
    transition: background .18s, box-shadow .18s, transform .05s;
    text-transform: uppercase;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}
.mat-btn:active { transform: translateY(1px); }
.mat-btn:focus-visible { outline: 3px solid var(--color-azul-300); outline-offset: 2px; }
.mat-btn--primary { background: var(--color-azul-700); color: #fff; box-shadow: var(--shadow-btn); }
.mat-btn--primary:hover { background: var(--color-azul-900); color: #fff; }
.mat-btn--accent { background: var(--color-azul-500); color: #fff; }
.mat-btn--accent:hover { background: var(--color-azul-700); color: #fff; }
.mat-btn--ghost { background: var(--color-azul-100); color: var(--color-azul-900); }
.mat-btn--ghost:hover { background: var(--color-azul-300); color: #fff; }
/* Saltar salud: visible y claro, pero sin competir con "Siguiente". */
.mat-btn--outline {
    background: #fff; color: var(--color-azul-700);
    border: 1.5px solid var(--color-azul-300);
    text-transform: none; font-weight: 600;
}
.mat-btn--outline:hover { border-color: var(--color-azul-700); background: var(--color-azul-50); }
.mat-btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

/* ── Inputs / selects ── */
.mat-input, .mat-select {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    color: var(--color-texto-principal);
    border: 1.5px solid var(--color-azul-100);
    border-radius: 10px;
    padding: 13px 18px;
    outline: none;
    background: #fff;
    width: 100%;
    transition: border-color .18s, box-shadow .18s;
}
.mat-textarea { resize: vertical; min-height: 84px; line-height: 1.45; }
.mat-input:focus, .mat-select:focus { border-color: var(--color-azul-500); box-shadow: 0 0 0 3px rgba(21, 101, 192, .15); }
.mat-select:disabled { background: var(--color-azul-50); color: var(--color-disabled); cursor: not-allowed; }
.mat-input.is-invalid, .mat-select.is-invalid { border-color: #c0392b; background: #fdf4f4; }

/* ── Campos ── */
.mat-field { display: block; margin-top: 16px; min-width: 0; }
.mat-field > label, .mat-label-like {
    display: block; font-size: 15px; font-weight: 700;
    color: var(--color-texto-secundario); margin-bottom: 6px;
}
.mat-opt { font-weight: 400; color: var(--color-texto-secundario); }
.mat-err { display: block; margin-top: 6px; font-size: 14px; font-weight: 600; color: #a30000; }
.mat-count { display: block; text-align: right; font-size: 13px; color: var(--color-texto-secundario); margin-top: 4px; }
.mat-hint { font-size: 15px; color: var(--color-texto-secundario); margin: 12px 0 0; line-height: 1.5; }
.mat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.mat-field--wide { grid-column: 1 / -1; }
.mat-age { margin: 0; padding: 13px 0; font-size: 16px; font-weight: 700; color: var(--color-azul-900); }

.mat-list { margin: 8px 0 0; padding-left: 20px; font-size: 15px; line-height: 1.6; color: var(--color-texto-secundario); }
.mat-list li { margin-bottom: 4px; }
.mat-link { color: var(--color-azul-700); font-weight: 600; text-decoration: underline; }
.mat-link:hover { color: var(--color-azul-900); }

/* Campo trampa: fuera de pantalla, no display:none (algunos bots lo detectan). */
.mat-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── Cards ── */
.mat-card {
    border: 1px solid var(--color-azul-100);
    border-radius: 16px;
    padding: 24px 28px;
    margin-top: 22px;
    box-shadow: 0 2px 14px rgba(11, 42, 74, .05);
    background: #fff;
}
.mat-card--center { text-align: center; }
.mat-panel-title {
    font-size: 22px; font-weight: 800; color: var(--color-azul-900);
    margin: 0 0 4px; outline: none;
}

/* Nota destacada (firmante, contacto de emergencia, salud). */
.mat-note {
    margin: 14px 0 0; padding: 14px 18px; border-radius: 12px;
    background: var(--color-azul-50); border-left: 4px solid var(--color-azul-700);
    font-size: 15px; line-height: 1.55; color: var(--color-texto-principal);
}
.mat-note strong { color: var(--color-azul-900); }

/* Banner de versión de prueba. */
.mat-banner {
    margin-top: 18px; padding: 14px 18px; border-radius: 12px;
    background: #fff7e0; border: 1px solid #f0d58a; color: #6b4e00;
    font-size: 15px; line-height: 1.5;
}
.mat-prov {
    display: inline-block; margin: 18px 0 0; padding: 4px 10px; border-radius: 999px;
    background: #fff7e0; border: 1px solid #f0d58a; color: #6b4e00; font-size: 13px; font-weight: 700;
}

/* ═══════════════════ HERO ═══════════════════ */
.mat-hero {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    min-height: 200px;
    align-items: center;
    background: linear-gradient(120deg, var(--color-azul-900) 0%, var(--color-azul-700) 55%, var(--color-azul-500) 100%);
    box-shadow: var(--shadow-azul);
}
.mat-hero-body { padding: 40px 44px; }
.mat-hero-title { font-size: 42px; font-weight: 900; line-height: 1; color: #fff; margin: 0; letter-spacing: -1px; }
.mat-hero-sub { font-size: 18px; font-weight: 400; color: var(--color-azul-100); margin: 14px 0 0; max-width: 640px; }

/* ═══════════════════ PASOS ═══════════════════ */
.mat-steps {
    display: flex; gap: 8px; list-style: none; margin: 22px 0 0; padding: 0;
    justify-content: center; flex-wrap: wrap;
}
.mat-step {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 700; color: var(--color-texto-secundario);
    border: 1.5px solid var(--color-azul-100); border-radius: 999px; padding: 6px 14px 6px 8px; background: #fff;
}
.mat-step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--color-azul-100); color: var(--color-azul-900); font-size: 13px;
}
.mat-step.is-active { border-color: var(--color-azul-700); color: var(--color-azul-900); box-shadow: 0 0 0 2px rgba(21,101,192,.18); }
.mat-step.is-active .mat-step-num { background: var(--color-azul-700); color: #fff; }
.mat-step.is-done .mat-step-num { background: #16a34a; color: #fff; }
.mat-progress { display: none; text-align: center; margin: 10px 0 0; font-size: 15px; font-weight: 700; color: var(--color-azul-900); }

.mat-panel { display: none; }
.mat-panel.is-current { display: block; }

/* Valor de referencia */
.mat-value {
    margin-top: 18px; padding: 14px 18px; border-radius: 12px;
    background: var(--color-azul-50); border: 1px solid var(--color-azul-100);
    font-size: 16px; color: var(--color-texto-secundario);
}
.mat-value strong { color: var(--color-azul-900); font-size: 20px; font-weight: 800; }
.mat-value small { display: block; margin-top: 4px; font-size: 14px; }

/* ═══════════════════ TEXTOS LEGALES ═══════════════════ */
.mat-legal {
    margin-top: 18px; padding: 16px 18px; border-radius: 12px;
    border: 1px solid var(--color-azul-100); background: #fff;
}
.mat-legal-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 8px;
}
.mat-legal-title { margin: 0; font-size: 16px; font-weight: 800; color: var(--color-azul-900); }
.mat-legal-full {
    flex-shrink: 0; padding: 6px 12px; font-size: 13px;
    text-transform: none; letter-spacing: 0;
}
.mat-legal-body { font-size: 14.5px; line-height: 1.55; color: var(--color-texto-secundario); }
.mat-legal-body p { margin: 0 0 8px; }
.mat-legal-body--scroll {
    max-height: 220px; overflow-y: auto; padding-right: 8px;
    border-bottom: 1px solid var(--color-azul-100);
}
.mat-legal-body--scroll:focus-visible { outline: 2px solid var(--color-azul-300); outline-offset: 4px; }

.mat-check {
    display: flex; align-items: flex-start; gap: 10px; margin-top: 12px;
    font-size: 15px; font-weight: 600; color: var(--color-texto-principal); cursor: pointer; line-height: 1.5;
}
.mat-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--color-azul-700); cursor: pointer; flex-shrink: 0; }
.mat-check.is-invalid span { color: #a30000; }

/* Roles del contacto (paso 4, mayor de edad): dos casillas con explicación. */
.mat-roles {
    margin: 18px 0 0; padding: 14px 18px 16px; border-radius: 12px;
    border: 1px solid var(--color-azul-100); background: #fff; min-width: 0;
}
.mat-roles:focus { outline: none; }
.mat-roles.is-invalid { border-color: #c0392b; background: #fdf4f4; }
.mat-roles-title { padding: 0 6px; font-size: 15px; font-weight: 700; color: var(--color-texto-secundario); }
.mat-check--rol { margin-top: 10px; }
.mat-check--rol strong { display: block; color: var(--color-azul-900); }
.mat-check--rol small { display: block; font-size: 14px; font-weight: 400; color: var(--color-texto-secundario); line-height: 1.45; }

/* ═══════════════════ DOCUMENTOS ═══════════════════ */
.mat-tips {
    margin-top: 14px; padding: 14px 18px; border-radius: 12px;
    background: var(--color-azul-50); border: 1px solid var(--color-azul-100);
}
.mat-tips-title { margin: 0; font-size: 15px; font-weight: 700; color: var(--color-azul-900); }
.mat-tips .mat-list { color: var(--color-texto-principal); }

.mat-upload { margin-top: 18px; }
.mat-upload-label { display: block; font-size: 15px; font-weight: 700; color: var(--color-texto-secundario); margin-bottom: 6px; }
.mat-upload-box input[type="file"] {
    font-family: 'Outfit', sans-serif; font-size: 15px; width: 100%;
    border: 1.5px dashed var(--color-azul-300); border-radius: 10px;
    padding: 12px; background: var(--color-azul-50); cursor: pointer;
}
.mat-upload.is-ok .mat-upload-box input[type="file"] { border-style: solid; border-color: #16a34a; background: #f1faf4; }
.mat-upload.is-invalid .mat-upload-box input[type="file"] { border-color: #c0392b; background: #fdf4f4; }
.mat-upload-status { display: block; margin-top: 6px; font-size: 14px; color: var(--color-texto-secundario); }
.mat-upload-status.is-ok { color: #16794a; font-weight: 600; }
.mat-upload-status.is-err { color: #a30000; font-weight: 600; }
.mat-upload-status.is-busy { color: var(--color-azul-700); font-weight: 600; }

/* ═══════════════════ RESUMEN ═══════════════════ */
.mat-summary { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mat-summary-item {
    padding: 12px 16px; border-radius: 12px; background: var(--color-azul-50);
    border: 1px solid var(--color-azul-100); font-size: 15px; line-height: 1.45; min-width: 0;
}
.mat-summary-item dt { font-size: 13px; font-weight: 700; color: var(--color-texto-secundario); text-transform: uppercase; letter-spacing: .3px; }
.mat-summary-item dd { margin: 4px 0 0; color: var(--color-azul-900); font-weight: 600; overflow-wrap: anywhere; }
.mat-summary-item--firma { grid-column: 1 / -1; background: #fff; border-left: 4px solid var(--color-azul-700); }

/* ═══════════════════ ACCIONES ═══════════════════ */
.mat-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.mat-actions .mat-btn { flex: 1; }
.mat-actions--end { justify-content: flex-end; }
.mat-actions--end .mat-btn { flex: 0 0 auto; min-width: 200px; }
.mat-actions--three .mat-btn--outline { flex: 1.4; }

/* ═══════════════════ ALERTAS ═══════════════════ */
.mat-alert { margin-top: 18px; border-radius: 10px; padding: 12px 16px; font-size: 15px; font-weight: 600; line-height: 1.5; }
.mat-alert--error { background: #fdecec; border: 1px solid #f5c2c2; color: #a30000; }
.mat-alert--warn { background: #fff7e0; border: 1px solid #f0d58a; color: #6b4e00; }

/* ═══════════════════ RESULTADO ═══════════════════ */
.mat-done-title { font-size: 30px; font-weight: 800; color: var(--color-azul-700); margin: 0 0 10px; line-height: 1.15; outline: none; }
.mat-done-num { font-size: 18px; color: var(--color-texto-secundario); margin: 0 0 18px; }
.mat-done-num strong { color: var(--color-azul-900); font-size: 22px; letter-spacing: .5px; }
.mat-done-note {
    text-align: left; margin: 0 0 22px;
    background: var(--color-azul-50); border: 1px solid var(--color-azul-100);
    border-radius: 12px; padding: 16px 20px;
}
.mat-done-note .mat-hint:first-child { margin-top: 0; }
.mat-debug { text-align: left; margin: 0 0 22px; font-size: 14px; }
.mat-debug summary { cursor: pointer; font-weight: 700; color: var(--color-azul-700); }
.mat-debug pre {
    max-height: 420px; overflow: auto; padding: 14px; border-radius: 10px;
    background: #0b2a4a; color: #e6f0fb; font-size: 12.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word;
}

/* ═══════════════════ SPINNER ═══════════════════ */
.mat-spinner {
    position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .7);
}
.mat-spinner-ring {
    width: 54px; height: 54px; border-radius: 50%;
    border: 5px solid var(--color-azul-100); border-top-color: var(--color-azul-700);
    animation: matSpin 1s linear infinite;
}
@keyframes matSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mat-spinner-ring { animation-duration: 3s; } }

/* ═══════════════════ RESPONSIVE ═══════════════════ */
@media (max-width: 900px) {
    /* Ocho píldoras no caben: solo números y el paso actual en texto. */
    .mat-step { padding: 4px; }
    .mat-step-label { display: none; }
    .mat-progress { display: block; }
}
@media (max-width: 780px) {
    .mat-wrap { padding: 0 16px; }
    .mat-hero-body { padding: 30px 24px; }
    .mat-hero-title { font-size: 32px; }
    .mat-hero-sub { font-size: 16px; }
    .mat-grid, .mat-summary { grid-template-columns: 1fr; }
    .mat-actions { flex-direction: column-reverse; }
    .mat-actions--end .mat-btn { min-width: 0; width: 100%; }
    .mat-card { padding: 20px 18px; }
    .mat-btn { white-space: normal; }
}

/* ═══════════════════ CÓDIGO DE MATRÍCULA (modo prueba) ═══════════════════ */
.mat-codigo {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; align-items: end;
    margin-top: 18px; padding: 16px 20px; border-radius: 14px;
    background: #fff; border: 1px dashed var(--color-azul-300);
}
.mat-codigo-label { display: block; font-size: 13px; font-weight: 700; color: var(--color-texto-secundario); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 6px; }
.mat-codigo-valor { font-size: 24px; font-weight: 800; color: var(--color-azul-900); letter-spacing: 1.5px; font-variant-numeric: tabular-nums; }
.mat-codigo-copiar {
    margin-left: 10px; padding: 4px 12px; border-radius: 999px; cursor: pointer;
    font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 700;
    border: 1.5px solid var(--color-azul-300); background: var(--color-azul-50); color: var(--color-azul-700);
    vertical-align: middle;
}
.mat-codigo-copiar:hover { border-color: var(--color-azul-700); }
.mat-codigo-estado { display: block; margin-top: 4px; font-size: 13px; color: var(--color-texto-secundario); }
.mat-codigo-estado.is-ok { color: #16794a; }
.mat-codigo-estado.is-err { color: #a30000; }
.mat-codigo-fila { display: flex; gap: 10px; }
.mat-codigo-fila .mat-input { text-transform: uppercase; letter-spacing: 1px; padding: 10px 14px; }
.mat-codigo-fila .mat-btn { padding: 10px 18px; flex-shrink: 0; }

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

/* ═══════════════════ DOCUMENTOS POR SUB-PASOS (celular primero) ═══════════════════ */
.mat-subprog { margin-top: 10px; }
.mat-subprog-txt { margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--color-azul-700); }
.mat-subprog-bar { height: 6px; border-radius: 999px; background: var(--color-azul-100); overflow: hidden; }
.mat-subprog-bar span { display: block; height: 100%; width: 25%; background: var(--color-azul-700); border-radius: inherit; transition: width .25s; }

.mat-sub { margin-top: 18px; }
.mat-sub-title { margin: 0 0 12px; font-size: 19px; font-weight: 800; color: var(--color-azul-900); outline: none; }

.mat-linkbtn {
    background: none; border: none; padding: 4px 2px; cursor: pointer;
    font-family: 'Outfit', sans-serif; font-size: 15px; font-weight: 700;
    color: var(--color-azul-700); text-decoration: underline;
}

/* Confirmación del documento registrado */
.mat-confirm {
    padding: 16px 18px; border-radius: 14px; outline: none;
    background: var(--color-azul-50); border: 1.5px solid var(--color-azul-100);
}
.mat-confirm.is-invalid { border-color: #c0392b; background: #fdf4f4; }
.mat-confirm-label { margin: 0; font-size: 14px; color: var(--color-texto-secundario); }
.mat-confirm-doc { margin: 4px 0 0; font-size: 18px; color: var(--color-azul-900); overflow-wrap: anywhere; }
.mat-confirm-doc--sm { font-size: 16px; margin: 0 0 4px; }
.mat-confirm-q { margin: 14px 0 0; font-size: 16px; font-weight: 700; color: var(--color-texto-principal); }
.mat-confirm-acciones { display: flex; gap: 10px; margin-top: 10px; }
.mat-confirm-acciones .mat-btn { flex: 1; }
.mat-confirm-ok { margin: 10px 0 0; font-size: 15px; font-weight: 700; color: #16794a; }

/* ¿Cómo tienes las caras? — tarjetas grandes, fáciles de tocar */
.mat-modo { margin: 18px 0 0; padding: 0; border: none; min-width: 0; outline: none; }
.mat-modo-title { padding: 0; margin-bottom: 8px; font-size: 16px; font-weight: 700; color: var(--color-texto-principal); }
.mat-modo.is-invalid .mat-opcion { border-color: #c0392b; }
.mat-opcion {
    display: flex; align-items: flex-start; gap: 12px; min-height: 56px; margin-top: 8px;
    padding: 14px 16px; border-radius: 12px; cursor: pointer;
    border: 1.5px solid var(--color-azul-100); background: #fff; transition: border-color .15s, background .15s;
}
.mat-opcion input { width: 22px; height: 22px; margin-top: 1px; flex-shrink: 0; accent-color: var(--color-azul-700); }
.mat-opcion strong { display: block; font-size: 16px; color: var(--color-azul-900); }
.mat-opcion small { display: block; font-size: 14px; color: var(--color-texto-secundario); line-height: 1.4; }
.mat-opcion:has(input:checked) { border-color: var(--color-azul-700); background: var(--color-azul-50); }
.mat-opcion:focus-within { box-shadow: 0 0 0 3px rgba(21, 101, 192, .2); }

/* Caja de carga */
.mat-slot {
    margin-top: 16px; padding: 16px; border-radius: 14px; outline: none;
    border: 1.5px dashed var(--color-azul-300); background: #fff;
}
.mat-slot.is-ok { border-style: solid; border-color: #16a34a; background: #f6fcf8; }
.mat-slot.is-invalid { border-color: #c0392b; background: #fdf4f4; }
.mat-slot-title { margin: 0; font-size: 17px; font-weight: 800; color: var(--color-azul-900); }
.mat-slot-hint { margin: 2px 0 0; font-size: 14px; color: var(--color-texto-secundario); }
.mat-slot-preview {
    margin-top: 12px; border-radius: 10px; overflow: hidden; background: var(--color-azul-50);
    display: flex; align-items: center; justify-content: center; min-height: 80px;
}
.mat-slot-preview img { display: block; max-width: 100%; max-height: 260px; object-fit: contain; }
.mat-slot-pdf {
    padding: 18px 26px; border-radius: 8px; background: #fff; border: 1px solid var(--color-azul-100);
    font-weight: 800; color: #a30000; letter-spacing: 1px;
}
.mat-slot-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.mat-slot-btn { position: relative; display: flex; align-items: center; justify-content: center; min-height: 52px; text-transform: none; }
/* El input ocupa el botón pero no se ve: el foco se muestra en la etiqueta. */
.mat-slot-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.mat-slot-btn:focus-within { outline: 3px solid var(--color-azul-300); outline-offset: 2px; }
/* En computador (mouse) no hay cámara que abrir: solo "Elegir archivo". */
@media (hover: hover) and (pointer: fine) {
    .mat-slot-btn--camara { display: none; }
    .mat-slot-actions { flex-direction: row; }
    .mat-slot-actions .mat-slot-btn { flex: 0 0 auto; min-width: 220px; }
}

.mat-tips-mini { margin: 14px 0 0; padding-left: 20px; font-size: 14px; line-height: 1.6; color: var(--color-texto-secundario); }

@media (max-width: 480px) {
    .mat-confirm-acciones { flex-direction: column; }
    .mat-sub-title { font-size: 18px; }
}
/* Con el archivo listo, "Tomar otra" baja de jerarquía: lo principal ahora es "Siguiente". */
.mat-slot.is-ok .mat-slot-btn--camara {
    background: #fff; color: var(--color-azul-700); box-shadow: none;
    border: 1.5px solid var(--color-azul-300); text-transform: none; font-weight: 600;
}

/* ═══════════════════ PAGO EN LÍNEA (misma línea que /pago-de-mensualidad/) ═══════════════════ */
.mat-alert--ok { background: #eefaf2; border: 1px solid #b7e4c7; color: #16794a; }
.mat-btn--block { display: block; width: 100%; }
.mat-pagar { margin-top: 14px; }
.mat-pay-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 14px; }
.mat-pay {
    display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 64px;
    text-align: left; border: 1.5px solid var(--color-azul-100); border-radius: 14px;
    padding: 14px 16px; background: #fff; cursor: pointer; width: 100%;
    font-family: 'Outfit', sans-serif; transition: border-color .18s, box-shadow .18s;
}
.mat-pay:hover { border-color: var(--color-azul-500); box-shadow: 0 4px 16px rgba(11, 42, 74, .08); }
.mat-pay:focus-visible { outline: 3px solid var(--color-azul-300); outline-offset: 2px; }
.mat-pay[aria-expanded="true"] { border-color: var(--color-azul-700); background: var(--color-azul-50); }
.mat-pay-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mat-pay-body > strong { font-size: 16px; color: var(--color-azul-900); }
.mat-pay-body > span { font-size: 14px; color: var(--color-texto-secundario); line-height: 1.45; }
.mat-pay-logo { flex-shrink: 0; height: auto; max-height: 32px; max-width: 90px; object-fit: contain; }
.mat-pse { padding: 14px 16px; border-radius: 12px; background: var(--color-azul-50); border: 1px solid var(--color-azul-100); }
.mat-pse .mat-list { margin: 0 0 12px; color: var(--color-texto-principal); }

@media (min-width: 900px) and (hover: hover) {
    .mat-pay-grid { grid-template-columns: repeat(3, 1fr); }
    .mat-pay-grid .mat-pse { grid-column: 1 / -1; order: 4; }
}

/* Solicitud a medias en este dispositivo: un botón para seguir */
.mat-pendiente {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
    margin-top: 18px; padding: 16px 20px; border-radius: 14px;
    background: var(--color-azul-50); border: 1.5px solid var(--color-azul-500);
}
.mat-pendiente-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mat-pendiente-titulo { font-size: 17px; font-weight: 800; color: var(--color-azul-900); outline: none; }
.mat-pendiente-detalle { font-size: 14px; color: var(--color-texto-secundario); }
.mat-pendiente-acciones { display: flex; align-items: center; gap: 14px; }
.mat-pendiente .mat-err { flex-basis: 100%; }

/* Caja del código: el código pasa a segundo plano; el enlace del correo es el camino principal */
.mat-codigo { align-items: start; }
.mat-codigo-ref { display: block; margin-top: 8px; font-size: 13px; color: var(--color-texto-secundario); }
.mat-codigo-ref .mat-codigo-valor { font-size: 14px; letter-spacing: .5px; }
.mat-codigo-retomar .mat-linkbtn { margin-top: 6px; font-size: 14px; text-align: left; }
.mat-retomar-caja { margin-top: 10px; }
.mat-retomar-caja .mat-codigo-nota { margin: 0 0 6px; }
.mat-codigo-fila { align-items: center; }
.mat-codigo-prefijo { font-weight: 800; color: var(--color-azul-900); letter-spacing: 1px; flex-shrink: 0; }
.mat-codigo-fila .mat-input { min-width: 0; }

@media (max-width: 480px) {
    .mat-pendiente-acciones { width: 100%; flex-direction: column; align-items: stretch; }
}

/* Verificación para retomar en otro dispositivo */
.mat-codigo-nota { display: block; margin-top: 6px; font-size: 13px; color: var(--color-texto-secundario); line-height: 1.4; }
.mat-otp { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--color-azul-100); }
.mat-otp .mat-codigo-label { text-transform: none; letter-spacing: 0; font-size: 14px; }
.mat-otp .mat-input { letter-spacing: 6px; font-size: 20px; text-align: center; }

/* ═══════════════════ v2 (/solicitud-de-matricula/v2/) ═══════════════════
   Auditoría de UX: menos "administración" antes del primer campo. */

/* Encabezado: cuánto toma. */
.mat-v2 .mat-hero-tiempo { color: #fff; font-weight: 700; }

/* Corregir: enlace discreto, no un botón antes del paso 1. */
.mat-v2 .mat-corregir-entrada--discreta { gap: 4px; margin-bottom: 10px; font-size: 14px; color: var(--color-texto-secundario); }
.mat-v2 .mat-corregir-entrada--discreta span { font-weight: 400; }
.mat-v2 .mat-corregir-entrada--discreta .mat-linkbtn { font-size: 14px; }

/* Pasos en una sola fila: número en todos, nombre solo en el actual. */
.mat-v2 .mat-steps { flex-wrap: nowrap; gap: 6px; }
.mat-v2 .mat-step:not(.is-active) { padding: 4px; }
.mat-v2 .mat-step:not(.is-active) .mat-step-label { display: none; }

/* Ayuda por WhatsApp. */
.mat-v2 .mat-ayuda { margin: 10px 0 0; text-align: center; font-size: 14px; color: var(--color-texto-secundario); }
.mat-v2 .mat-ayuda a { font-weight: 700; color: var(--color-azul-700); }

/* Caja del código: una línea, borde sólido; el código aparece tras el primer guardado. */
.mat-v2 .mat-codigo--v2 { display: block; padding: 12px 18px; border: 1px solid var(--color-azul-100); }
.mat-v2 .mat-guardado { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; font-size: 14px; color: var(--color-texto-secundario); }
.mat-v2 .mat-guardado-check { color: #16794a; font-weight: 800; }
.mat-v2 .mat-guardado .mat-codigo-estado { display: inline; margin: 0; font-size: 14px; }
.mat-v2 .mat-guardado-codigo .mat-codigo-valor { font-size: 14px; letter-spacing: .5px; }
/* ✓ pegado al mensaje aunque este ocupe dos líneas. */
.mat-v2 .mat-guardado-estado { display: flex; align-items: baseline; gap: 8px; }
/* Copiar va centrado debajo del código, no debajo de la etiqueta. */
.mat-v2 .mat-guardado-codigo { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 6px; flex-basis: 100%; }
.mat-v2 .mat-guardado-codigo[hidden] { display: none; }
.mat-v2 .mat-codigo-grupo { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; }
.mat-v2 .mat-codigo-grupo .mat-codigo-copiar { margin: 0; }
.mat-v2 .mat-guardado-otro { margin-left: auto; padding: 4px 0; font-size: 14px; }
.mat-v2 .mat-codigo--v2 .mat-retomar-caja { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--color-azul-100); }

/* Horario deshabilitado: el texto de ayuda debe leerse (contraste AA). */
.mat-v2 .mat-select:disabled { color: var(--color-texto-secundario); }
.mat-v2 .mat-hint--campo { margin-top: 8px; }

@media (max-width: 900px) {
    .mat-v2 .mat-step.is-active .mat-step-label { display: none; }
    .mat-v2 .mat-step.is-active { padding: 4px; }
}
@media (max-width: 600px) {
    .mat-v2 .mat-guardado-otro { margin-left: 0; }
}
