:root {
    --bg: #f4f8fb;
    --surface: #ffffff;
    --text: #17212b;
    --muted: #667684;
    --line: #dce6ed;
    --primary: #087ea4;
    --primary-dark: #066887;
    --primary-soft: #eaf6fa;
    --radius-lg: 28px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background:
        radial-gradient(circle at top right, #e7f5f8 0, transparent 38%),
        var(--bg);

    color: var(--text);
}

a {
    color: inherit;
}

.access-shell {
    min-height: 100vh;
    min-height: 100dvh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;
}

.access-card {
    width: min(100%, 440px);

    background: var(--surface);

    border: 1px solid rgba(214, 226, 234, .9);
    border-radius: var(--radius-lg);

    padding: 34px;

    box-shadow:
        0 24px 70px rgba(39, 71, 89, .10);
}

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

    margin-bottom: 54px;
}

.brand-mark {
    width: 46px;
    height: 46px;

    display: grid;
    place-items: center;

    border-radius: 14px;

    background: var(--primary);
    color: #fff;

    font-size: 30px;
    font-weight: 300;
    line-height: 1;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-kicker {
    color: var(--muted);

    font-size: 10px;
    font-weight: 650;
    letter-spacing: .16em;
}

.brand h1 {
    margin: 1px 0 0;

    font-size: 21px;
    font-weight: 570;
    letter-spacing: -.02em;
}

.welcome {
    margin-bottom: 34px;
}

.eyebrow {
    display: inline-block;

    margin-bottom: 12px;

    color: var(--primary);

    font-size: 11px;
    font-weight: 650;
    letter-spacing: .13em;
}

.welcome h2 {
    margin: 0 0 14px;

    max-width: 360px;

    font-size: clamp(29px, 7vw, 38px);
    line-height: 1.08;
    font-weight: 520;
    letter-spacing: -.045em;
}

.welcome p {
    margin: 0;

    color: var(--muted);

    font-size: 15px;
    line-height: 1.6;
}

.access-actions {
    display: grid;
    gap: 12px;
}

.button {
    min-height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    padding: 0 20px;

    border-radius: var(--radius-md);

    text-decoration: none;

    font-size: 15px;
    font-weight: 550;

    transition:
        transform .15s ease,
        background .15s ease,
        border-color .15s ease;
}

.button:active {
    transform: scale(.985);
}

.button-primary {
    background: var(--primary);
    color: #fff;
}

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

.button-secondary {
    border: 1px solid var(--line);
    background: #fff;
}

.button-secondary:hover {
    border-color: #c5d5df;
    background: #f9fbfc;
}

.access-help {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    margin-top: 28px;
    padding-top: 22px;

    border-top: 1px solid #edf2f5;
}

.help-icon {
    flex: 0 0 20px;

    width: 20px;
    height: 20px;

    display: grid;
    place-items: center;

    margin-top: 1px;

    border-radius: 50%;

    background: var(--primary-soft);
    color: var(--primary);

    font-size: 12px;
    font-weight: 650;
}

.access-help p {
    margin: 0;

    color: var(--muted);

    font-size: 12.5px;
    line-height: 1.5;
}

@media (max-width: 520px) {

    .access-shell {
        align-items: stretch;
        padding: 0;
    }

    .access-card {
        width: 100%;
        min-height: 100dvh;

        display: flex;
        flex-direction: column;

        border: 0;
        border-radius: 0;

        padding:
            max(28px, env(safe-area-inset-top))
            24px
            max(26px, env(safe-area-inset-bottom));

        box-shadow: none;
    }

    .brand {
        margin-bottom: 64px;
    }

    .access-actions {
        margin-top: auto;
        padding-top: 38px;
    }

    .access-help {
        margin-top: 24px;
    }
}

/* =========================================================
   FORMULARIOS
   ========================================================= */

.form-card {
    width: min(100%, 480px);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    margin-bottom: 38px;

    color: var(--muted);

    text-decoration: none;

    font-size: 13px;
    font-weight: 500;
}

.back-link:hover {
    color: var(--text);
}

.form-heading {
    margin-bottom: 30px;
}

.form-heading h1 {
    margin: 0 0 11px;

    font-size: 34px;
    line-height: 1.08;
    font-weight: 520;
    letter-spacing: -.04em;
}

.form-heading p {
    margin: 0;

    color: var(--muted);

    font-size: 14px;
    line-height: 1.55;
}

.form-stack {
    display: grid;
    gap: 19px;
}

.field {
    display: grid;
    gap: 7px;
}

.field label {
    color: #344552;

    font-size: 13px;
    font-weight: 550;
}

.field input {
    width: 100%;
    min-height: 51px;

    padding: 0 15px;

    border: 1px solid var(--line);
    border-radius: 13px;

    outline: none;

    background: #fff;
    color: var(--text);

    font: inherit;
    font-size: 15px;

    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}

.field input::placeholder {
    color: #9aa8b2;
}

.field input:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(8, 126, 164, .10);
}

.field small {
    color: var(--muted);

    font-size: 11.5px;
    line-height: 1.4;
}

.phone-field {
    display: flex;
    align-items: center;

    border: 1px solid var(--line);
    border-radius: 13px;

    overflow: hidden;

    background: #fff;

    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}

.phone-field:focus-within {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(8, 126, 164, .10);
}

.phone-prefix {
    padding: 0 13px;

    color: var(--muted);

    font-size: 14px;

    border-right: 1px solid var(--line);
}

.phone-field input {
    border: 0;
    border-radius: 0;
    box-shadow: none !important;
}

.form-submit {
    width: 100%;

    border: 0;
    cursor: pointer;

    margin-top: 5px;
}

@media (max-width: 520px) {

    .form-card {
        min-height: 100dvh;
    }

    .form-heading h1 {
        font-size: 31px;
    }

    .back-link {
        margin-bottom: 34px;
    }
}

/* =========================================================
   AJUSTES MOBILE - ETAPA INICIAL
   ========================================================= */

@media (max-width: 520px) {

    /* PORTADA:
       evitamos que los botones queden pegados al fondo
       en teléfonos altos */
    .access-card:not(.form-card) .brand {
        margin-bottom: 54px;
    }

    .access-card:not(.form-card) .welcome {
        margin-bottom: 42px;
    }

    .access-card:not(.form-card) .access-actions {
        margin-top: 0;
        padding-top: 0;
    }

    .access-card:not(.form-card) .access-help {
        margin-top: 28px;
    }

    /* REGISTRO:
       un poco más compacto para uso real desde celular */
    .form-card {
        padding-top: max(26px, env(safe-area-inset-top));
    }

    .form-card .back-link {
        margin-bottom: 30px;
    }

    .form-card .form-heading {
        margin-bottom: 26px;
    }

    .form-card .form-stack {
        gap: 17px;
    }

    /* En iPhone el input date puede parecer vacío.
       Le damos presencia visual consistente. */
    .field input[type="date"] {
        min-height: 51px;
        color: var(--text);
        background-color: #fff;
        appearance: auto;
        -webkit-appearance: auto;
    }

    .field input[type="date"]::-webkit-date-and-time-value {
        text-align: left;
        min-height: 1.2em;
    }
}

/* =========================================================
   REGISTRO MOBILE COMPACTO
   ========================================================= */

@media (max-width: 520px) {

    .form-card {
        padding:
            22px
            24px
            max(26px, env(safe-area-inset-bottom));
    }

    .form-card .back-link {
        margin-bottom: 24px;
    }

    .form-card .form-heading {
        margin-bottom: 22px;
    }

    .form-card .form-heading .eyebrow {
        margin-bottom: 8px;
    }

    .form-card .form-heading h1 {
        margin-bottom: 8px;
        font-size: 30px;
    }

    .form-card .form-heading p {
        font-size: 13.5px;
        line-height: 1.45;
    }

    .form-card .form-stack {
        gap: 14px;
    }

    .form-card .field {
        gap: 5px;
    }

    .form-card .field label {
        font-size: 12.5px;
    }

    .form-card .field input {
        min-height: 48px;
        padding: 0 14px;
    }

    .form-card .phone-field {
        min-height: 48px;
    }

    .form-card .phone-field input {
        min-height: 46px;
    }

    .form-card .field small {
        font-size: 11px;
    }

    .form-card .form-submit {
        min-height: 52px;
        margin-top: 2px;
    }

    .date-field {
        width: 100%;
    }

    .date-field input[type="date"] {
        display: block;
        width: 100%;
        min-height: 48px;

        color: var(--text);
        background: #fff;

        font-size: 15px;
    }

    .date-field input[type="date"]::-webkit-date-and-time-value {
        text-align: left;
    }
}

/* Fecha compatible visualmente con Safari/iPhone */

.date-field {
    position: relative;
}

.date-field .date-placeholder {
    position: absolute;
    z-index: 1;

    left: 14px;
    top: 50%;
    transform: translateY(-50%);

    color: #9aa8b2;
    font-size: 15px;

    pointer-events: none;
}

.date-field input[type="date"] {
    position: relative;
    z-index: 2;

    background: transparent;
}

.date-field:focus-within .date-placeholder {
    opacity: 0;
}

.date-field:has(input:valid) .date-placeholder {
    opacity: 0;
}

/* =========================================================
   AJUSTE MOBILE FORMULARIO - IPHONE
   ========================================================= */

@media (max-width: 520px) {

    /*
     * Mantener el formulario estable.
     * No usamos alturas basadas en el teclado.
     */
    .form-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }

    .form-card .form-stack,
    .form-card .field,
    .form-card .date-field,
    .form-card .phone-field {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    /*
     * Títulos de campos más claros.
     */
    .form-card .field label {
        font-size: 15px;
        line-height: 1.25;
        font-weight: 560;
    }

    /*
     * 16px evita el zoom automático de Safari
     * cuando se toca un campo.
     */
    .form-card .field input,
    .form-card .phone-field input,
    .form-card .date-field input[type="date"] {
        width: 100%;
        max-width: 100%;
        min-width: 0;

        height: 52px;
        min-height: 52px;

        font-size: 16px;
        line-height: 1.2;
    }

    /*
     * Corregir específicamente el date de Safari.
     */
    .form-card .date-field {
        position: relative;
        height: 52px;

        border: 1px solid var(--line);
        border-radius: 13px;

        background: #fff;
        overflow: hidden;
    }

    .form-card .date-field input[type="date"] {
        position: absolute;
        inset: 0;

        display: block;

        margin: 0;
        padding: 0 14px;

        border: 0;
        border-radius: 13px;

        background: transparent;
        box-shadow: none;

        -webkit-appearance: none;
        appearance: none;
    }

    .form-card .date-field .date-placeholder {
        left: 14px;

        font-size: 16px;
        line-height: 1;

        white-space: nowrap;
    }

    /*
     * Celular con exactamente la misma altura.
     */
    .form-card .phone-field {
        height: 52px;
        min-height: 52px;
    }

    .form-card .phone-prefix {
        display: flex;
        align-items: center;

        height: 100%;

        font-size: 16px;
    }

    /*
     * Texto auxiliar un poco más legible.
     */
    .form-card .field small {
        font-size: 12px;
        line-height: 1.4;
    }
}

/* Centrado vertical de fecha seleccionada en Safari/iPhone */
@media (max-width: 520px) {

    .form-card .date-field input[type="date"] {
        height: 52px;
        min-height: 52px;
        padding-top: 0;
        padding-bottom: 0;
        line-height: 52px;
    }

    .form-card .date-field input[type="date"]::-webkit-date-and-time-value {
        display: flex;
        align-items: center;

        height: 52px;
        min-height: 52px;

        margin: 0;
        padding: 0;

        line-height: 52px;
        text-align: left;
    }
}

/* =========================================================
   FECHA - COMPATIBILIDAD IOS / ANDROID
   ========================================================= */

/* Android/Chrome ya muestra su propia indicación de fecha.
   Ocultamos nuestro placeholder cuando el navegador
   expone contenido nativo visible. */
@supports selector(input::-webkit-datetime-edit) {

    .date-field .date-placeholder {
        display: none;
    }

    .date-field input[type="date"]::-webkit-datetime-edit {
        display: flex;
        align-items: center;
        height: 100%;
    }

    .date-field input[type="date"]::-webkit-datetime-edit-fields-wrapper {
        display: flex;
        align-items: center;
    }
}

/* Safari iOS: mantenemos el campo centrado verticalmente */
@supports (-webkit-touch-callout: none) {

    .date-field .date-placeholder {
        display: block;
    }

    .date-field:focus-within .date-placeholder {
        display: none;
    }

    .date-field:has(input:valid) .date-placeholder {
        display: none;
    }
}

/* =========================================================
   Verificación de celular
   ========================================================= */

.phone-confirmation {
    margin: 8px 0 18px;
    padding: 16px 18px;
    border: 1px solid #e4e9ef;
    border-radius: 16px;
    background: #f8fafc;
    text-align: center;
}

.phone-confirmation-label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    color: #687386;
}

.phone-confirmation strong {
    display: block;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: .3px;
    color: #172033;
}

.verification-help {
    margin: 16px 0 0;
    text-align: center;
    font-size: 14px;
    line-height: 1.45;
    color: #687386;
}

.verification-help a {
    color: #1769e0;
    text-decoration: none;
    font-weight: 500;
}

/* =========================================================
   Creación de PIN
   ========================================================= */

#pin,
#pin_confirmacion {
    text-align: center;
    font-size: 24px;
    letter-spacing: 10px;
    font-weight: 500;
}

.pin-help {
    display: block;
    margin-top: -4px;
    color: #687386;
    font-size: 13px;
    line-height: 1.4;
}

.pin-error {
    padding: 11px 14px;
    border-radius: 12px;
    background: #fff4f4;
    border: 1px solid #f1cccc;
    color: #a72c2c;
    font-size: 14px;
    line-height: 1.4;
}

/* =========================================================
   Cuenta creada
   ========================================================= */

.success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin: 8px 0 22px;
    border-radius: 50%;
    background: #eaf7f1;
    color: #17865f;
    font-size: 28px;
    font-weight: 600;
}

.success-heading {
    margin-bottom: 20px;
}

.identity-status {
    display: flex;
    gap: 12px;
    margin: 4px 0 20px;
    padding: 15px 16px;
    border: 1px solid #dce7ef;
    border-radius: 16px;
    background: #f7fafc;
}

.identity-status-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 25px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #e4f2f8;
    color: #26799e;
    font-size: 14px;
    font-weight: 600;
}

.identity-status strong {
    display: block;
    margin-bottom: 4px;
    color: #253247;
    font-size: 15px;
    font-weight: 600;
}

.identity-status p {
    margin: 0;
    color: #687386;
    font-size: 14px;
    line-height: 1.45;
}

.account-ready-text {
    margin: 0 0 20px;
    color: #687386;
    font-size: 14px;
    line-height: 1.5;
}

/* =========================================================
   Inicio paciente
   ========================================================= */

.patient-body {
    margin: 0;
    min-height: 100vh;
    background: #ffffff;
    color: #182231;
}

.patient-home {
    width: min(100% - 40px, 560px);
    margin: 0 auto;
    padding: 48px 0 120px;
}

.patient-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 38px;
}

.patient-brand {
    display: block;
    margin-bottom: 10px;
    color: #3184a8;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2.2px;
}

.patient-header h1 {
    margin: 0;
    color: #17202c;
    font-size: clamp(32px, 9vw, 42px);
    line-height: 1.05;
    font-weight: 600;
    letter-spacing: -1.2px;
}

.patient-header p {
    margin: 8px 0 0;
    color: #748093;
    font-size: 17px;
}

.account-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    margin-top: 3px;
    border-radius: 50%;
    background: #eef6f9;
    color: #287da2;
    text-decoration: none;
    font-size: 17px;
    font-weight: 600;
}

.patient-actions {
    display: grid;
    gap: 12px;
}

.request-appointment {
    display: flex;
    align-items: center;
    min-height: 94px;
    padding: 18px 20px;
    border-radius: 22px;
    background: #3988ab;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 12px 30px rgba(42, 113, 145, .14);
}

.request-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    margin-right: 15px;
    border-radius: 15px;
    background: rgba(255,255,255,.16);
    font-size: 30px;
    font-weight: 300;
    line-height: 1;
}

.request-copy,
.patient-option-copy {
    min-width: 0;
    flex: 1;
}

.request-copy strong,
.patient-option-copy strong {
    display: block;
    font-size: 18px;
    font-weight: 600;
}

.request-copy small {
    display: block;
    margin-top: 4px;
    color: rgba(255,255,255,.78);
    font-size: 14px;
}

.request-arrow {
    margin-left: 12px;
    font-size: 24px;
    font-weight: 300;
}

.patient-option {
    display: flex;
    align-items: center;
    min-height: 78px;
    padding: 14px 17px;
    border: 1px solid #e5ebf0;
    border-radius: 19px;
    background: #ffffff;
    color: #1e2938;
    text-decoration: none;
}

.patient-option-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 43px;
    width: 43px;
    height: 43px;
    margin-right: 14px;
    border-radius: 13px;
    background: #f0f6f9;
    color: #3583a5;
    font-size: 23px;
}

.patient-option-copy small {
    display: block;
    margin-top: 3px;
    color: #7a8596;
    font-size: 13px;
}

.patient-option-arrow {
    margin-left: 10px;
    color: #9aa5b2;
    font-size: 27px;
    font-weight: 300;
}

.identity-mini {
    display: flex;
    align-items: center;
    width: 100%;
    margin-top: 22px;
    padding: 13px 4px;
    border: 0;
    background: transparent;
    text-align: left;
    color: #526073;
}

.identity-mini-dot {
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    margin: 0 13px 0 4px;
    border-radius: 50%;
    background: #e0a23c;
}

.identity-mini span:nth-child(2) {
    flex: 1;
}

.identity-mini strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
}

.identity-mini small {
    display: block;
    margin-top: 2px;
    color: #8993a1;
    font-size: 12px;
}

.identity-mini-arrow {
    color: #a3acb8;
    font-size: 22px;
}

.patient-nav {
    position: fixed;
    z-index: 20;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: min(100%, 600px);
    padding: 9px 18px calc(9px + env(safe-area-inset-bottom));
    border-top: 1px solid #edf0f3;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.patient-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: #929ca9;
    text-decoration: none;
}

.patient-nav a > span {
    font-size: 23px;
    line-height: 1;
}

.patient-nav small {
    font-size: 11px;
}

.patient-nav a.active {
    color: #3283a6;
}

@media (max-width: 480px) {
    .patient-home {
        width: calc(100% - 32px);
        padding-top: 34px;
    }

    .patient-header {
        margin-bottom: 30px;
    }
}

/* =========================================================
   Flujo solicitar turno
   ========================================================= */

.turn-flow {
    width: min(100% - 40px, 560px);
    margin: 0 auto;
    padding: 34px 0 60px;
}

.turn-flow-header {
    margin-bottom: 30px;
}

.turn-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 38px;
    color: #718094;
    text-decoration: none;
    font-size: 15px;
}

.turn-back span {
    font-size: 20px;
    font-weight: 300;
}

.turn-step {
    display: block;
    margin-bottom: 11px;
    color: #3484a7;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
}

.turn-flow-header h1 {
    margin: 0;
    max-width: 460px;
    color: #17202c;
    font-size: clamp(30px, 8vw, 40px);
    line-height: 1.08;
    font-weight: 600;
    letter-spacing: -1px;
}

.turn-flow-header p {
    margin: 10px 0 0;
    color: #7b8696;
    font-size: 16px;
    line-height: 1.45;
}

.patient-selector {
    display: grid;
    gap: 12px;
}

.patient-select-card,
.add-patient-card {
    display: flex;
    align-items: center;
    min-height: 82px;
    padding: 15px 17px;
    border: 1px solid #e3e9ee;
    border-radius: 20px;
    background: #ffffff;
    color: #1c2736;
    text-decoration: none;
}

.patient-select-avatar,
.add-patient-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    margin-right: 14px;
    border-radius: 15px;
}

.patient-select-avatar {
    background: #eaf4f8;
    color: #3282a5;
    font-size: 18px;
    font-weight: 600;
}

.add-patient-icon {
    border: 1px dashed #a9c8d6;
    background: #f7fbfc;
    color: #3282a5;
    font-size: 27px;
    font-weight: 300;
}

.patient-select-copy,
.add-patient-card > span:nth-child(2) {
    min-width: 0;
    flex: 1;
}

.patient-select-copy strong,
.add-patient-card strong {
    display: block;
    color: #1d2735;
    font-size: 17px;
    font-weight: 600;
}

.patient-select-copy small,
.add-patient-card small {
    display: block;
    margin-top: 4px;
    color: #7c8797;
    font-size: 13px;
    line-height: 1.35;
}

.patient-select-arrow {
    margin-left: 10px;
    color: #9ca7b4;
    font-size: 28px;
    font-weight: 300;
}

.add-patient-card {
    margin-top: 4px;
    border-style: dashed;
}

@media (max-width: 480px) {
    .turn-flow {
        width: calc(100% - 32px);
        padding-top: 28px;
    }

    .turn-back {
        margin-bottom: 32px;
    }
}


/* =========================================================
   PASO TURNO · ESPECIALIDAD
   ========================================================= */

.specialty-search{
    display:flex;
    align-items:center;
    gap:10px;
    height:54px;
    margin:24px 0 14px;
    padding:0 16px;
    background:#fff;
    border:1px solid #e4e9f0;
    border-radius:16px;
    box-shadow:0 4px 18px rgba(24,39,75,.045);
}

.specialty-search__icon{
    flex:0 0 auto;
    color:#718096;
    font-size:24px;
    line-height:1;
}

.specialty-search input{
    width:100%;
    min-width:0;
    height:100%;
    padding:0;
    border:0;
    outline:0;
    background:transparent;
    color:#172033;
    font:inherit;
    font-size:16px;
}

.specialty-search input::placeholder{
    color:#98a2b3;
}

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

.specialty-card{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    min-height:78px;
    padding:16px 17px;
    background:#fff;
    border:1px solid #e5eaf1;
    border-radius:18px;
    text-decoration:none;
    color:#172033;
    box-shadow:0 5px 20px rgba(24,39,75,.045);
    transition:
        transform .15s ease,
        border-color .15s ease,
        box-shadow .15s ease;
}

.specialty-card:active{
    transform:scale(.985);
}

.specialty-card__main{
    min-width:0;
}

.specialty-card__name{
    font-size:16px;
    line-height:1.3;
    font-weight:600;
    letter-spacing:-.01em;
}

.specialty-card__meta{
    margin-top:5px;
    color:#7a8495;
    font-size:13px;
    line-height:1.35;
}

.specialty-card__arrow{
    flex:0 0 auto;
    color:#2563eb;
    font-size:28px;
    font-weight:300;
    line-height:1;
}

.specialty-empty{
    margin-top:22px;
    padding:22px 18px;
    text-align:center;
    color:#7a8495;
    background:#fff;
    border:1px solid #e5eaf1;
    border-radius:18px;
}

.specialty-empty--visible{
    display:block;
}

@media (min-width:700px){
    .specialty-card:hover{
        border-color:#cfd9ea;
        box-shadow:0 8px 26px rgba(24,39,75,.075);
        transform:translateY(-1px);
    }
}

/* =========================================================
   AJUSTE MOBILE · PANTALLA ESPECIALIDAD
   Más aire lateral y botón volver
   ========================================================= */

.turno-step{
    width:100%;
    max-width:680px;
    margin:0 auto;
    padding-left:20px;
    padding-right:20px;
    padding-bottom:32px;
    box-sizing:border-box;
}

.turno-step__header{
    position:relative;
    padding-top:12px;
}

.turno-step__back{
    display:flex;
    align-items:center;
    justify-content:center;
    width:38px;
    height:38px;
    margin-left:-7px;
    margin-bottom:6px;
    border-radius:12px;
    color:#172033;
    text-decoration:none;
    font-size:31px;
    font-weight:300;
    line-height:1;
}

.turno-step__heading{
    min-width:0;
}

.turno-step__heading h1{
    margin-top:12px;
    max-width:100%;
}

.specialty-search{
    width:100%;
    box-sizing:border-box;
}

.specialty-list{
    width:100%;
}

.specialty-card{
    width:100%;
    box-sizing:border-box;
}

@media (max-width:380px){
    .turno-step{
        padding-left:16px;
        padding-right:16px;
    }
}



/* =========================================================
   PASO TURNO · SEDE
   ========================================================= */

.location-list{
    margin-top:26px;
}

.location-card{
    min-height:88px;
}

.location-card .specialty-card__name{
    font-size:17px;
}



/* =========================================================
   PASO TURNO · PROFESIONAL
   ========================================================= */

.professional-context{
    margin-bottom:5px;
}

.professional-context span{
    color:#9aa5b5;
    padding:0 3px;
}

.professional-patient{
    margin-top:0;
    color:#697586;
    font-size:15px;
}

.professional-list{
    margin-top:25px;
}

.professional-card{
    min-height:88px;
}

.professional-card .specialty-card__name{
    font-size:17px;
}



/* =========================================================
   PASO TURNO · DISPONIBILIDAD
   ========================================================= */

.availability-list{
    display:flex;
    flex-direction:column;
    gap:14px;
    margin-top:25px;
    padding-bottom:30px;
}

.availability-day{
    background:#fff;
    border:1px solid #e8edf3;
    border-radius:18px;
    padding:17px;
    box-shadow:0 5px 18px rgba(31,45,61,.045);
}

.availability-day__header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:14px;
}

.availability-day__date{
    display:flex;
    align-items:baseline;
    gap:6px;
    color:#172033;
}

.availability-day__date strong{
    font-size:17px;
    font-weight:600;
}

.availability-day__date span{
    font-size:15px;
    color:#7a8797;
}

.availability-service + .availability-service{
    margin-top:17px;
    padding-top:15px;
    border-top:1px solid #eef2f6;
}

.availability-service__name{
    margin-bottom:11px;
    font-size:13px;
    font-weight:600;
    color:#687789;
}

.availability-times{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:9px;
}

.availability-time{
    min-height:42px;
    border:1px solid #dce5ee;
    border-radius:11px;
    background:#f8fbfd;
    color:#183149;
    font:inherit;
    font-size:14px;
    font-weight:500;
    cursor:pointer;
}

.availability-time:active{
    transform:scale(.97);
}

@media (max-width:380px){
    .availability-times{
        grid-template-columns:repeat(3,1fr);
    }
}



/* =========================================================
   PASO TURNO · REVISION
   ========================================================= */

.review-card{
    margin-top:25px;
    overflow:hidden;
    background:#fff;
    border:1px solid #e7edf3;
    border-radius:20px;
    box-shadow:0 5px 18px rgba(31,45,61,.045);
}

.review-row{
    display:flex;
    flex-direction:column;
    gap:4px;
    padding:15px 18px;
    border-bottom:1px solid #edf1f5;
}

.review-row:last-child{
    border-bottom:0;
}

.review-row span{
    font-size:13px;
    color:#7a8797;
}

.review-row strong{
    font-size:16px;
    font-weight:550;
    color:#172033;
}

.review-row--appointment{
    background:#f7fbff;
}

.review-row--appointment strong{
    color:#1264d8;
}

.review-alert{
    margin-top:16px;
    padding:15px 17px;
    border-radius:14px;
    background:#fff3f1;
    color:#9c3328;
    font-size:14px;
    line-height:1.45;
}

.review-actions{
    margin-top:20px;
}

.review-submit,
.review-back-button{
    display:flex;
    width:100%;
    min-height:54px;
    align-items:center;
    justify-content:center;
    box-sizing:border-box;
    border:0;
    border-radius:15px;
    background:#1264d8;
    color:#fff;
    font:inherit;
    font-size:16px;
    font-weight:550;
    text-decoration:none;
}

.review-submit:disabled{
    opacity:.55;
}

.review-note{
    margin:12px 10px 0;
    text-align:center;
    color:#7b8795;
    font-size:13px;
    line-height:1.4;
}


/* Horarios seleccionables */
a.availability-time{
    display:flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    text-align:center;
    line-height:1;
    -webkit-tap-highlight-color:transparent;
}

a.availability-time:link,
a.availability-time:visited,
a.availability-time:hover,
a.availability-time:active{
    text-decoration:none;
    color:#183149;
}



/* =========================================================
   CONFIRMACION DE SOLICITUD
   ========================================================= */

.confirmation-step{
    padding-top:34px;
}

.confirmation-card{
    padding:28px 20px 24px;
    background:#fff;
    border:1px solid #e7edf3;
    border-radius:22px;
    box-shadow:0 8px 26px rgba(31,45,61,.06);
    text-align:center;
}

.confirmation-icon{
    width:62px;
    height:62px;
    margin:0 auto 18px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:#eaf8f0;
    color:#16834b;
    font-size:31px;
    font-weight:600;
}

.confirmation-card h1{
    margin:7px 0 9px;
    font-size:24px;
    line-height:1.15;
    color:#172033;
}

.confirmation-intro{
    margin:0 auto 23px;
    max-width:330px;
    color:#718093;
    font-size:14px;
    line-height:1.5;
}

.confirmation-data{
    overflow:hidden;
    margin-top:18px;
    border:1px solid #e7edf3;
    border-radius:16px;
    text-align:left;
}

.confirmation-data > div{
    display:flex;
    flex-direction:column;
    gap:3px;
    padding:12px 14px;
    border-bottom:1px solid #edf1f5;
}

.confirmation-data > div:last-child{
    border-bottom:0;
}

.confirmation-data span,
.confirmation-code span{
    font-size:12px;
    color:#7b8795;
}

.confirmation-data strong{
    font-size:15px;
    font-weight:550;
    color:#172033;
}

.confirmation-code{
    margin-top:15px;
    padding:14px;
    border-radius:14px;
    background:#f5f9fd;
}

.confirmation-code strong{
    display:block;
    margin-top:4px;
    font-size:16px;
    letter-spacing:.7px;
    color:#1264d8;
}

.confirmation-home{
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:52px;
    margin-top:18px;
    border-radius:14px;
    background:#1264d8;
    color:#fff;
    text-decoration:none;
    font-size:16px;
    font-weight:550;
}



/* =========================================================
   PORTADA 2026 · TURNOS HOSPITAL
   ========================================================= */

.home-landing-body{
    margin:0;
    min-height:100vh;
    background:#edf7fb;
    color:#17212b;
}

.home-landing{
    width:min(100%, 520px);
    min-height:100vh;
    margin:0 auto;
    overflow:hidden;
    background:#fff;
    box-shadow:0 0 50px rgba(35,78,100,.08);
}

.home-topbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    min-height:82px;
    padding:
        max(18px, env(safe-area-inset-top))
        22px
        15px;
    background:#eef8fc;
}

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

.home-brand-mark{
    display:grid;
    place-items:center;
    width:38px;
    height:38px;
    border-radius:12px;
    background:#2388b2;
    color:#fff;
    font-size:26px;
    font-weight:300;
    line-height:1;
    box-shadow:0 6px 16px rgba(35,136,178,.18);
}

.home-brand > div:last-child{
    display:flex;
    flex-direction:column;
}

.home-brand span{
    color:#6c7d88;
    font-size:9px;
    font-weight:650;
    letter-spacing:.17em;
}

.home-brand strong{
    margin-top:1px;
    color:#17212b;
    font-size:19px;
    line-height:1;
    font-weight:570;
    letter-spacing:-.02em;
}

.home-tagline{
    color:#68818e;
    font-size:11px;
    font-weight:500;
}

.home-hero{
    position:relative;
    height:300px;
    overflow:hidden;
    background:#d7e7ed;
}

.home-hero-image{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center 53%;
}

.home-hero-shade{
    position:absolute;
    inset:0;
    background:
        linear-gradient(
            90deg,
            rgba(7,40,55,.54) 0%,
            rgba(7,40,55,.25) 45%,
            rgba(7,40,55,.03) 78%
        );
}

.home-hero-copy{
    position:absolute;
    z-index:2;
    left:25px;
    top:60px;
    color:#fff;
    text-shadow:0 2px 12px rgba(0,0,0,.18);
}

.home-hero-copy span{
    display:block;
    margin-bottom:9px;
    font-size:10px;
    font-weight:650;
    letter-spacing:.17em;
    opacity:.9;
}

.home-hero-copy strong{
    display:block;
    max-width:260px;
    font-size:29px;
    line-height:1.08;
    font-weight:520;
    letter-spacing:-.035em;
}

/*
 * La onda es HTML/CSS, no forma parte de la fotografía.
 * Así se adapta correctamente a cualquier teléfono.
 */
.home-wave{
    position:absolute;
    z-index:3;
    left:-5%;
    bottom:-62px;
    width:110%;
    height:105px;
    border-radius:50% 50% 0 0 / 65% 65% 0 0;
    background:#fff;
    transform:rotate(-2deg);
}

.home-content{
    position:relative;
    z-index:4;
    padding:8px 24px max(30px, env(safe-area-inset-bottom));
    background:#fff;
}

.home-intro{
    text-align:center;
}

.home-eyebrow{
    display:inline-block;
    margin-bottom:8px;
    color:#2388b2;
    font-size:10px;
    font-weight:700;
    letter-spacing:.16em;
}

.home-intro h1{
    max-width:390px;
    margin:0 auto 9px;
    color:#17212b;
    font-size:27px;
    line-height:1.1;
    font-weight:570;
    letter-spacing:-.035em;
}

.home-intro p{
    max-width:370px;
    margin:0 auto;
    color:#70808b;
    font-size:13.5px;
    line-height:1.45;
}

.home-steps{
    display:grid;
    gap:9px;
    margin-top:22px;
}

.home-step{
    display:flex;
    align-items:center;
    min-height:66px;
    padding:10px 13px;
    border:1px solid #e4edf2;
    border-radius:17px;
    background:#fff;
    box-shadow:0 5px 16px rgba(35,74,94,.035);
}

.home-step-icon{
    display:grid;
    place-items:center;
    flex:0 0 42px;
    width:42px;
    height:42px;
    margin-right:12px;
    border-radius:13px;
    background:#eaf7fb;
    color:#2586ae;
    font-size:24px;
    font-weight:400;
}

.home-step-calendar{
    font-size:20px;
}

.home-step-check{
    background:#e9f7f2;
    color:#258a67;
    font-size:20px;
    font-weight:650;
}

.home-step strong{
    display:block;
    margin-bottom:3px;
    color:#263440;
    font-size:14px;
    font-weight:600;
}

.home-step span{
    display:block;
    color:#7a8994;
    font-size:11.5px;
    line-height:1.35;
}

.home-actions{
    display:grid;
    gap:9px;
    margin-top:19px;
}

.home-button{
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:50px;
    padding:0 18px;
    border-radius:15px;
    text-decoration:none;
    font-size:14px;
    font-weight:570;
    -webkit-tap-highlight-color:transparent;
}

.home-button-primary{
    justify-content:space-between;
    background:#2588b1;
    color:#fff;
    box-shadow:0 8px 20px rgba(37,136,177,.15);
}

.home-button-primary > span:first-child{
    flex:1;
    text-align:center;
    padding-left:20px;
}

.home-button-primary > span:last-child{
    font-size:20px;
    font-weight:300;
}

.home-button-secondary{
    border:1px solid #d9e5eb;
    background:#fff;
    color:#273540;
}

.home-button:active{
    transform:scale(.987);
}

.home-info{
    display:flex;
    align-items:flex-start;
    gap:12px;
    margin-top:18px;
    padding:14px 15px;
    border:1px solid #d8ebf3;
    border-radius:17px;
    background:#f0f9fc;
}

.home-info-icon{
    display:grid;
    place-items:center;
    flex:0 0 27px;
    width:27px;
    height:27px;
    border-radius:50%;
    background:#d9f0f7;
    color:#2783a7;
    font-size:14px;
    font-weight:700;
}

.home-info strong{
    display:block;
    margin:1px 0 3px;
    color:#2b596d;
    font-size:12.5px;
    font-weight:650;
}

.home-info p{
    margin:0;
    color:#708690;
    font-size:11.5px;
    line-height:1.4;
}

@media (min-width:521px){
    .home-landing-body{
        padding:28px 0;
    }

    .home-landing{
        min-height:calc(100vh - 56px);
        border-radius:28px;
    }
}

@media (max-width:390px){
    .home-topbar{
        min-height:76px;
        padding-left:19px;
        padding-right:19px;
    }

    .home-hero{
        height:275px;
    }

    .home-hero-copy{
        left:21px;
        top:54px;
    }

    .home-hero-copy strong{
        font-size:27px;
    }

    .home-content{
        padding-left:20px;
        padding-right:20px;
    }

    .home-intro h1{
        font-size:25px;
    }
}


/* =========================================================
   PORTADA · MODELO APROBADO
   ========================================================= */

.home-model{
    background:#fff;
}

.home-model-hero{
    position:relative;
    height:325px;
    overflow:hidden;
    background:#dcecf4;
}

.home-model-photo{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center 53%;
}

.home-model-hero::after{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(
        180deg,
        rgba(237,248,253,.28) 0%,
        rgba(255,255,255,0) 38%
    );
}

.home-model-brand{
    position:absolute;
    z-index:4;
    top:max(25px, env(safe-area-inset-top));
    left:24px;

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

.home-model-cross{
    position:relative;
    width:49px;
    height:49px;
}

.home-model-cross::before,
.home-model-cross::after{
    content:"";
    position:absolute;
    border-radius:7px;
    background:rgba(25,145,195,.93);
}

.home-model-cross::before{
    width:49px;
    height:20px;
    left:0;
    top:14px;
}

.home-model-cross::after{
    width:20px;
    height:49px;
    left:14px;
    top:0;
}

.home-model-brand-copy{
    display:flex;
    flex-direction:column;
    text-shadow:0 1px 7px rgba(255,255,255,.55);
}

.home-model-brand-copy span{
    color:#18304c;
    font-size:10px;
    font-weight:650;
    letter-spacing:.22em;
}

.home-model-brand-copy strong{
    margin-top:2px;
    color:#102548;
    font-size:27px;
    line-height:.95;
    font-weight:650;
    letter-spacing:-.035em;
}

.home-model-wave{
    position:absolute;
    z-index:5;
    pointer-events:none;
}

.home-model-wave-blue{
    left:-11%;
    bottom:-38px;
    width:125%;
    height:105px;

    border-radius:
        47% 53% 0 0 /
        58% 72% 0 0;

    background:#e3f4fc;
    transform:rotate(5deg);
}

.home-model-wave-white{
    left:-9%;
    bottom:-57px;
    width:123%;
    height:104px;

    border-radius:
        46% 54% 0 0 /
        67% 52% 0 0;

    background:#fff;
    transform:rotate(-2deg);
}

.home-model-content{
    position:relative;
    z-index:7;
    padding:12px 24px max(30px, env(safe-area-inset-bottom));
    background:#fff;
}

.home-model-intro{
    text-align:left;
}

.home-model-intro h1{
    margin:0;
    color:#10264c;

    font-size:clamp(31px, 8.8vw, 40px);
    line-height:1.04;
    font-weight:700;
    letter-spacing:-.045em;
}

.home-model-intro h1 span{
    color:#1387d3;
}

.home-model-intro p{
    margin:14px 0 0;
    max-width:430px;

    color:#77869e;

    font-size:15px;
    line-height:1.42;
    font-weight:400;
}

.home-model-steps{
    display:grid;
    grid-template-columns:1fr 1px 1fr 1px 1fr;
    align-items:center;

    margin-top:24px;
}

.home-model-step{
    min-width:0;
    text-align:center;
}

.home-model-step-icon{
    display:grid;
    place-items:center;

    width:56px;
    height:56px;
    margin:0 auto 7px;

    border-radius:50%;

    background:#eaf6fc;
    color:#2189bd;
}

.home-model-step-icon svg{
    width:30px;
    height:30px;

    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.home-model-step strong{
    display:block;

    color:#405170;

    font-size:12.5px;
    line-height:1.12;
    font-weight:620;
}

.home-model-divider{
    width:1px;
    height:62px;

    background:#cce6f3;
}

.home-model-actions{
    display:grid;
    gap:9px;

    margin-top:23px;
}

.home-model-primary,
.home-model-secondary{
    display:flex;
    align-items:center;
    justify-content:center;

    min-height:54px;

    border-radius:16px;

    text-decoration:none;

    font-size:15px;
    font-weight:600;
}

.home-model-primary{
    position:relative;

    background:linear-gradient(100deg,#248bc0,#2988b2);
    color:#fff;

    box-shadow:0 8px 22px rgba(29,133,181,.15);
}

.home-model-primary span:first-child{
    padding:0 34px;
}

.home-model-primary span:last-child{
    position:absolute;
    right:20px;

    font-size:25px;
    line-height:1;
    font-weight:300;
}

.home-model-secondary{
    border:1px solid #bcdff0;
    background:#fff;
    color:#14294d;
}

.home-model-info{
    display:flex;
    align-items:center;
    gap:13px;

    margin-top:13px;
    padding:14px 15px;

    border-radius:17px;

    background:linear-gradient(105deg,#eef8fd,#e8f5fb);
}

.home-model-info-icon{
    display:grid;
    place-items:center;

    flex:0 0 37px;
    width:37px;
    height:37px;

    border-radius:50%;

    background:#278fbd;
    color:#fff;

    font-size:20px;
    font-family:Georgia,serif;
    font-weight:700;
}

.home-model-info strong{
    display:block;

    color:#183458;

    font-size:12.5px;
    font-weight:650;
}

.home-model-info p{
    margin:3px 0 0;

    color:#71849c;

    font-size:11.5px;
    line-height:1.35;
}

@media (max-width:390px){

    .home-model-hero{
        height:295px;
    }

    .home-model-brand{
        left:20px;
    }

    .home-model-content{
        padding-left:20px;
        padding-right:20px;
    }

    .home-model-intro h1{
        font-size:30px;
    }

    .home-model-intro p{
        font-size:14px;
    }

    .home-model-step-icon{
        width:52px;
        height:52px;
    }

    .home-model-step strong{
        font-size:11.5px;
    }
}

@media (min-width:521px){

    .home-model-hero{
        height:340px;
    }
}


/* =========================================================
   PORTADA · AJUSTES 07/10
   ========================================================= */

/* Menos fotografía: la curva sube y elimina parte del piso */
.home-model-hero{
    height:295px;
}

/* Marca Hospital Distrital Puerto Deseado */
.home-model-brand-copy span{
    font-size:9px;
    letter-spacing:.19em;
}

.home-model-brand-copy strong{
    margin-top:3px;
    font-size:22px;
    line-height:1;
    white-space:nowrap;
}

/* Curva doble más arriba */
.home-model-wave-blue{
    bottom:-17px;
    height:100px;
}

.home-model-wave-white{
    bottom:-38px;
    height:100px;
}

/* Acercamos el título a la curva */
.home-model-content{
    padding-top:0;
}

.home-model-intro{
    margin-top:-5px;
}

/* Más separación entre Ingresar y Crear cuenta */
.home-model-actions{
    gap:14px;
}

/* Ajustes específicos para teléfonos angostos */
@media (max-width:390px){

    .home-model-hero{
        height:275px;
    }

    .home-model-wave-blue{
        bottom:-14px;
    }

    .home-model-wave-white{
        bottom:-35px;
    }

    .home-model-brand-copy strong{
        font-size:20px;
    }
}


/* =========================================================
   PORTADA · JERARQUIA Y ESPACIADO
   Foto y curvas NO se modifican
   ========================================================= */

/* Subimos el contenido hacia la curva */
.home-model-content{
    padding-top:0;
}

.home-model-intro{
    margin-top:-18px;
}

/* Reducimos el espacio antes de los tres pasos */
.home-model-steps{
    margin-top:17px;
}

/* Marca superior con mucha más presencia */
.home-model-brand{
    gap:14px;
}

.home-model-cross{
    width:55px;
    height:55px;
}

.home-model-cross::before{
    width:55px;
    height:22px;
    top:16px;
}

.home-model-cross::after{
    width:22px;
    height:55px;
    left:16px;
}

.home-model-brand-copy span{
    font-size:10.5px;
    font-weight:700;
    letter-spacing:.20em;
}

.home-model-brand-copy strong{
    margin-top:4px;
    font-size:25px;
    font-weight:680;
    letter-spacing:-.035em;
}

/* iPhone angosto */
@media (max-width:390px){

    .home-model-intro{
        margin-top:-16px;
    }

    .home-model-steps{
        margin-top:16px;
    }

    .home-model-brand-copy span{
        font-size:10px;
    }

    .home-model-brand-copy strong{
        font-size:23px;
    }
}


/* =========================================================
   PORTADA · LOGO OFICIAL HPD
   ========================================================= */

.home-model-official-brand{
    position:absolute;
    z-index:10;
    top:max(24px, env(safe-area-inset-top));
    left:22px;

    display:flex;
    align-items:center;
    gap:12px;

    padding:7px 14px 7px 7px;

    border:1px solid rgba(255,255,255,.42);
    border-radius:15px;

    background:rgba(255,255,255,.86);
    box-shadow:0 5px 18px rgba(20,42,70,.10);

    backdrop-filter:blur(7px);
    -webkit-backdrop-filter:blur(7px);
}

.home-model-official-brand img{
    display:block;

    width:48px;
    height:48px;

    border-radius:10px;

    object-fit:cover;
}

.home-model-official-name{
    display:flex;
    flex-direction:column;
}

.home-model-official-name span{
    color:#34405b;

    font-size:10.5px;
    line-height:1;
    font-weight:700;
    letter-spacing:.16em;
}

.home-model-official-name strong{
    margin-top:5px;

    color:#10264c;

    font-size:23px;
    line-height:1;
    font-weight:680;
    letter-spacing:-.035em;

    white-space:nowrap;
}

@media(max-width:390px){

    .home-model-official-brand{
        left:18px;
    }

    .home-model-official-brand img{
        width:45px;
        height:45px;
    }

    .home-model-official-name span{
        font-size:9.5px;
    }

    .home-model-official-name strong{
        font-size:21px;
    }
}


/* =========================================================
   LOGO OFICIAL · SIN TARJETA
   ========================================================= */

.home-model-official-brand{
    top:max(25px, env(safe-area-inset-top));
    left:25px;

    gap:13px;

    /* eliminamos completamente la tarjeta */
    padding:0;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
}

.home-model-official-brand img{
    width:58px;
    height:58px;

    border-radius:10px;
    object-fit:cover;

    box-shadow:0 3px 10px rgba(13,31,64,.12);
}

.home-model-official-name{
    width:224px;
}

/* Esta línea debe tener casi el mismo ancho visual que Puerto Deseado */
.home-model-official-name span{
    display:block;

    color:#10264c;

    font-size:13px;
    line-height:1;
    font-weight:750;
    letter-spacing:.165em;

    white-space:nowrap;

    text-shadow:
        0 1px 3px rgba(255,255,255,.75),
        0 0 8px rgba(255,255,255,.45);
}

.home-model-official-name strong{
    display:block;

    margin-top:6px;

    color:#10264c;

    font-size:25px;
    line-height:1;
    font-weight:720;
    letter-spacing:-.035em;

    white-space:nowrap;

    text-shadow:
        0 1px 3px rgba(255,255,255,.75),
        0 0 8px rgba(255,255,255,.45);
}

@media(max-width:390px){

    .home-model-official-brand{
        left:20px;
        gap:11px;
    }

    .home-model-official-brand img{
        width:54px;
        height:54px;
    }

    .home-model-official-name{
        width:208px;
    }

    .home-model-official-name span{
        font-size:12px;
        letter-spacing:.16em;
    }

    .home-model-official-name strong{
        font-size:23px;
    }
}


/* =========================================================
   INGRESO · NUEVA IDENTIDAD VISUAL
   ========================================================= */

.login-page{
    margin:0;
    min-height:100vh;
    background:#f5f9fc;
    color:#10264c;
}

.login-shell{
    width:min(100%,520px);
    min-height:100vh;
    margin:0 auto;
    background:#fff;
}

.login-card{
    padding:
        max(25px,env(safe-area-inset-top))
        24px
        max(32px,env(safe-area-inset-bottom));
}

.login-back{
    display:inline-flex;
    align-items:center;
    gap:7px;

    margin-bottom:27px;

    color:#718198;
    text-decoration:none;

    font-size:14px;
    font-weight:450;
}

.login-back span{
    font-size:20px;
    line-height:1;
    font-weight:300;
}

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

    margin-bottom:39px;
}

.login-brand-logo{
    display:block;

    width:52px;
    height:52px;

    border-radius:11px;

    object-fit:cover;

    box-shadow:0 4px 12px rgba(15,38,76,.10);
}

.login-brand-name{
    display:flex;
    flex-direction:column;
}

.login-brand-name span{
    color:#31405d;

    font-size:11px;
    line-height:1;
    font-weight:700;
    letter-spacing:.17em;
}

.login-brand-name strong{
    margin-top:5px;

    color:#10264c;

    font-size:24px;
    line-height:1;
    font-weight:700;
    letter-spacing:-.035em;
}

.login-welcome{
    margin-bottom:28px;
}

.login-welcome h1{
    margin:0;

    color:#10264c;

    font-size:32px;
    line-height:1.08;
    font-weight:700;
    letter-spacing:-.04em;
}

.login-welcome p{
    margin:11px 0 0;

    max-width:410px;

    color:#718198;

    font-size:15px;
    line-height:1.5;
    font-weight:400;
}

.login-error{
    margin:-7px 0 21px;
    padding:13px 15px;

    border:1px solid #fecdd3;
    border-radius:14px;

    background:#fff1f2;
    color:#be123c;

    font-size:13px;
    line-height:1.4;
}

.login-form{
    margin:0;
}

.login-field{
    margin-bottom:18px;
}

.login-field label{
    display:block;

    margin:0 0 8px;

    color:#40516d;

    font-size:13.5px;
    font-weight:570;
}

.login-input-wrap{
    position:relative;
}

.login-input-icon{
    position:absolute;
    z-index:2;
    left:16px;
    top:50%;

    display:grid;
    place-items:center;

    width:24px;
    height:24px;

    color:#3091bc;

    transform:translateY(-50%);
    pointer-events:none;
}

.login-input-icon svg{
    width:22px;
    height:22px;

    fill:none;
    stroke:currentColor;
    stroke-width:1.7;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.login-input-wrap input{
    display:block;

    box-sizing:border-box;
    width:100%;
    min-height:58px;

    padding:0 17px 0 51px;

    border:1px solid #d9e5ed;
    border-radius:16px;

    outline:none;

    background:#fbfdfe;
    color:#183149;

    font:inherit;
    font-size:16px;

    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        background .18s ease;
}

.login-input-wrap input:focus{
    border-color:#69b8d8;
    background:#fff;

    box-shadow:0 0 0 4px rgba(45,145,187,.09);
}

.login-input-wrap input::placeholder{
    color:#a6b1ba;
}

.login-input-wrap .login-pin{
    font-size:21px;
    letter-spacing:8px;
}

.login-submit{
    position:relative;

    display:flex;
    align-items:center;
    justify-content:center;

    box-sizing:border-box;
    width:100%;
    min-height:56px;

    margin-top:7px;
    padding:0 20px;

    border:0;
    border-radius:16px;

    background:linear-gradient(100deg,#258fc0,#2c89b2);
    color:#fff;

    box-shadow:0 8px 22px rgba(37,137,178,.15);

    font:inherit;
    font-size:15px;
    font-weight:600;

    cursor:pointer;
}

.login-submit-arrow{
    position:absolute;
    right:21px;

    font-size:25px;
    line-height:1;
    font-weight:300;
}

.login-submit:active{
    transform:scale(.988);
}

.login-register{
    display:flex;
    align-items:center;
    justify-content:center;
    flex-wrap:wrap;
    gap:4px 6px;

    margin-top:25px;

    text-align:center;

    color:#718198;

    font-size:13.5px;
}

.login-register a{
    color:#1687c4;
    text-decoration:none;
    font-weight:600;
}

@media(max-width:390px){

    .login-card{
        padding-left:20px;
        padding-right:20px;
    }

    .login-brand{
        margin-bottom:34px;
    }

    .login-brand-logo{
        width:49px;
        height:49px;
    }

    .login-brand-name span{
        font-size:10px;
    }

    .login-brand-name strong{
        font-size:22px;
    }

    .login-welcome h1{
        font-size:29px;
    }
}

@media(min-width:521px){

    .login-page{
        padding:28px 0;
    }

    .login-shell{
        min-height:calc(100vh - 56px);
        border-radius:28px;
        box-shadow:0 0 50px rgba(35,78,100,.08);
    }
}


/* =========================================================
   INGRESO · PRUEBA CON TARJETA
   ========================================================= */

.login-page{
    background:
        linear-gradient(180deg,#eef8fc 0,#f7fafc 230px,#f5f9fc 100%);
}

.login-shell{
    background:transparent;
}

.login-card{
    position:relative;
    padding-top:max(26px,env(safe-area-inset-top));
}

/* Volver queda fuera visualmente de la tarjeta */
.login-back{
    margin-bottom:22px;
}

/*
 * La tarjeta visual se genera detrás del contenido.
 * Dejamos todo el formulario agrupado y más contenido.
 */
.login-brand{
    position:relative;
    z-index:2;

    margin:0;
    padding:25px 24px 0;

    border:1px solid #e1ebf1;
    border-bottom:0;
    border-radius:24px 24px 0 0;

    background:#fff;

    box-shadow:
        0 -1px 0 rgba(255,255,255,.8),
        0 12px 35px rgba(31,72,96,.07);
}

.login-welcome{
    position:relative;
    z-index:2;

    margin:0;
    padding:31px 24px 25px;

    border-left:1px solid #e1ebf1;
    border-right:1px solid #e1ebf1;

    background:#fff;
}

.login-welcome h1{
    font-size:30px;
}

.login-error{
    position:relative;
    z-index:3;

    margin:0 24px 20px;
}

.login-form{
    position:relative;
    z-index:2;

    margin:0;
    padding:0 24px 27px;

    border:1px solid #e1ebf1;
    border-top:0;
    border-radius:0 0 24px 24px;

    background:#fff;

    box-shadow:0 15px 35px rgba(31,72,96,.07);
}

.login-register{
    margin-top:24px;
}

/* Campos ligeramente más suaves dentro de la tarjeta */
.login-input-wrap input{
    background:#f9fcfd;
}

.login-input-wrap input:focus{
    background:#fff;
}

@media(max-width:390px){

    .login-card{
        padding-left:17px;
        padding-right:17px;
    }

    .login-brand{
        padding-left:20px;
        padding-right:20px;
    }

    .login-welcome{
        padding-left:20px;
        padding-right:20px;
    }

    .login-form{
        padding-left:20px;
        padding-right:20px;
    }
}


/* =========================================================
   INGRESO · TARJETA MÁS ANCHA + VOLVER INTEGRADO
   ========================================================= */

/* Más ancho útil, pero sin llegar al borde */
.login-card{
    padding-left:12px;
    padding-right:12px;
}

/* Volver pasa a sentirse parte del bloque */
.login-back{
    position:relative;
    z-index:5;

    margin:0;
    padding:18px 22px 14px;

    width:auto;

    border:1px solid #e1ebf1;
    border-bottom:0;
    border-radius:24px 24px 0 0;

    background:#fff;

    color:#526782;

    font-size:15px;
    font-weight:570;

    box-shadow:0 -5px 25px rgba(31,72,96,.045);
}

.login-back span{
    color:#278fbd;
    font-size:22px;
}

/* La marca continúa inmediatamente debajo de Volver */
.login-brand{
    margin:0;

    padding:14px 22px 0;

    border-radius:0;
    border-top:0;

    box-shadow:none;
}

.login-welcome{
    padding-left:22px;
    padding-right:22px;
}

.login-form{
    padding-left:22px;
    padding-right:22px;
}

/* La sombra pertenece visualmente a toda la tarjeta */
.login-form{
    box-shadow:0 15px 35px rgba(31,72,96,.075);
}

/* Registro alineado con el ancho nuevo */
.login-register{
    margin-left:8px;
    margin-right:8px;
}

@media(max-width:390px){

    .login-card{
        padding-left:10px;
        padding-right:10px;
    }

    .login-back{
        padding-left:19px;
        padding-right:19px;
    }

    .login-brand,
    .login-welcome,
    .login-form{
        padding-left:19px;
        padding-right:19px;
    }
}

/* Corrección esquinas superiores tarjeta de ingreso */
.login-back{
    box-sizing:border-box;
    display:flex;
    width:100%;
    border-radius:24px 24px 0 0;
}

.login-brand{
    border-radius:0;
}

/* Revertir último ajuste: Volver vuelve a la posición anterior */
.login-back{
    display:inline-flex;
    width:auto;
    box-sizing:content-box;
    border-radius:24px 24px 0 0;
}

/* =========================================================
   LOGIN · PESTAÑA VOLVER + TARJETA REDONDEADA
   ========================================================= */

/* Conservamos Volver como pestaña superior izquierda */
.login-back{
    display:inline-flex;
    width:auto;
    box-sizing:border-box;

    border-radius:24px 24px 0 0;
}

/* La tarjeta principal comienza en la marca:
   redondeamos especialmente la esquina superior derecha */
.login-brand{
    border-top:1px solid #e1ebf1;
    border-radius:0 24px 0 0;
}

/* aseguramos que nada tape la curva derecha */
.login-brand::before,
.login-brand::after{
    display:none;
}


/* =========================================================
   REGISTRO · ESTILO VISUAL APROBADO
   ========================================================= */

body.register-page{
    background:
        linear-gradient(180deg,#edf8fc 0,#f7fafc 240px,#f5f9fc 100%);
}

.register-page .access-shell{
    background:transparent;
    padding-top:max(22px,env(safe-area-inset-top));
    padding-bottom:38px;
}

.register-page .form-card{
    width:calc(100% - 20px);
    max-width:500px;
    margin:0 auto;
    padding:0;
    background:transparent;
}

/* Volver como pestaña */
.register-page .back-link{
    display:inline-flex;
    align-items:center;
    gap:8px;

    box-sizing:border-box;
    margin:0;
    padding:17px 20px 15px;

    border:1px solid #e1ebf1;
    border-bottom:0;
    border-radius:24px 24px 0 0;

    background:#fff;
    color:#526782;

    font-size:15px;
    font-weight:570;
    text-decoration:none;
}

.register-page .back-link span{
    color:#278fbd;
    font-size:21px;
}

/* Identidad hospital */
.register-page .register-brand{
    display:flex;
    align-items:center;
    gap:13px;

    padding:18px 21px 13px;

    border:1px solid #e1ebf1;
    border-bottom:0;
    border-radius:0 24px 0 0;

    background:#fff;
}

.register-page .register-logo{
    display:block;
    flex:0 0 54px;

    width:54px;
    height:54px;

    border-radius:12px;
    object-fit:cover;

    box-shadow:0 4px 12px rgba(15,38,76,.10);
}

.register-page .register-hospital{
    display:flex;
    flex-direction:column;
}

.register-page .register-hospital-small{
    color:#31405d;

    font-size:10.5px;
    line-height:1;
    font-weight:700;
    letter-spacing:.16em;
}

.register-page .register-hospital-name{
    margin-top:5px;

    color:#10264c;

    font-size:23px;
    line-height:1;
    font-weight:700;
    letter-spacing:-.035em;
}

/* Encabezado */
.register-page .form-heading{
    margin:0;
    padding:19px 21px 19px;

    border-left:1px solid #e1ebf1;
    border-right:1px solid #e1ebf1;

    background:#fff;
}

.register-page .form-heading .eyebrow{
    display:none;
}

.register-page .form-heading h1{
    margin:0;

    color:#10264c;

    font-size:29px;
    line-height:1.08;
    font-weight:700;
    letter-spacing:-.04em;
}

.register-page .form-heading p{
    margin:9px 0 0;

    color:#718198;

    font-size:14px;
    line-height:1.45;
}

/* Formulario */
.register-page .form-stack{
    margin:0;
    padding:0 21px 25px;

    border:1px solid #e1ebf1;
    border-top:0;
    border-radius:0 0 24px 24px;

    background:#fff;

    box-shadow:0 15px 35px rgba(31,72,96,.07);
}

.register-page .field{
    margin-bottom:14px;
}

.register-page .field label{
    display:block;
    margin-bottom:6px;

    color:#40516d;

    font-size:13.5px;
    font-weight:570;
}

.register-page .field input{
    box-sizing:border-box;
    width:100%;
    min-height:52px;

    border:1px solid #d9e5ed;
    border-radius:14px;

    background:#fafdfe;
    color:#183149;

    font-size:16px;
    outline:none;
}

.register-page .field input:focus{
    border-color:#69b8d8;
    background:#fff;
    box-shadow:0 0 0 4px rgba(45,145,187,.09);
}

.register-page .phone-field{
    border-radius:14px;
    background:#fafdfe;
}

.register-page .phone-field input{
    background:transparent;
}

.register-page .field small{
    display:block;
    margin-top:7px;

    color:#718198;

    font-size:12px;
    line-height:1.4;
}

.register-page .form-submit{
    width:100%;
    min-height:56px;
    margin-top:5px;

    border:0;
    border-radius:16px;

    cursor:pointer;
}

/* Mensajes de validación */
.register-page .form-message{
    margin:0;
    padding:18px 21px 23px;

    border-left:1px solid #e1ebf1;
    border-right:1px solid #e1ebf1;

    background:#fff;
}

/* Móviles angostos */
@media(max-width:390px){

    .register-page .form-card{
        width:calc(100% - 16px);
    }

    .register-page .register-brand,
    .register-page .form-heading,
    .register-page .form-stack{
        padding-left:18px;
        padding-right:18px;
    }

    .register-page .register-hospital-name{
        font-size:21px;
    }
}


/* REGISTRO · CORRECCION CABECERA IGUAL A INGRESO */
.register-page .back-link{
    display:inline-flex !important;
    width:auto !important;
    max-width:max-content !important;
    padding:17px 20px 15px !important;
    border-radius:24px 24px 0 0 !important;
}

.register-page .register-brand{
    margin-top:0 !important;
    border-top:1px solid #e1ebf1 !important;
    border-radius:0 24px 0 0 !important;
}

/* Evita adornos heredados de la tarjeta anterior */
.register-page .register-brand::before,
.register-page .register-brand::after{
    display:none !important;
}

/* Prevent automatic mobile focus zoom while preserving manual zoom. */
@media (max-width: 900px) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]),
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Inicio: stronger action icons and comfortable bottom navigation. */
.patient-home .patient-option {
    min-height: 96px;
    padding: 16px 18px;
    border-color: #dbe6ed;
    border-radius: 22px;
    box-shadow: 0 4px 16px rgba(25, 62, 85, .035);
    transition: border-color .18s ease, box-shadow .18s ease;
}
.patient-home .patient-option-icon {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    margin-right: 17px;
    border: 1px solid #22799b;
    border-radius: 18px;
    background: #287f9f;
    color: #fff;
    box-shadow: 0 5px 12px rgba(28, 102, 132, .16);
}
.patient-home .patient-option-icon.family-icon {
    background: #176e80;
    border-color: #146475;
    box-shadow: 0 5px 12px rgba(23, 110, 128, .16);
}
.patient-home .patient-option-icon svg {
    display: block;
    width: 32px;
    height: 32px;
}
.patient-home .patient-option-copy strong {
    font-size: 17px;
    font-weight: 600;
    color: #20364a;
}
.patient-home .patient-option-copy small {
    margin-top: 5px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.4;
}
.patient-home .patient-option-arrow { color: #587589; }
.patient-home .patient-option:hover {
    border-color: #9bbdce;
    box-shadow: 0 6px 20px rgba(25, 62, 85, .07);
}
.patient-nav {
    box-sizing: border-box;
    width: min(calc(100% - 28px), 560px);
    bottom: max(12px, env(safe-area-inset-bottom));
    padding: 8px;
    gap: 6px;
    border: 1px solid #dce7ee;
    border-radius: 26px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 8px 32px rgba(29, 65, 90, .13);
}
.patient-nav a {
    box-sizing: border-box;
    min-width: 0;
    min-height: 76px;
    justify-content: center;
    gap: 7px;
    padding: 10px 6px;
    border: 1px solid transparent;
    border-radius: 19px;
    color: #526b80;
    transition: background .18s ease, color .18s ease;
}
.patient-nav a > .patient-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    line-height: 1;
}
.patient-nav-icon svg { display: block; width: 28px; height: 28px; }
.patient-nav small { font-size: 13px; font-weight: 600; line-height: 1.2; }
.patient-nav a.active {
    color: #fff;
    background: #247e9e;
    border-color: #207493;
    box-shadow: 0 3px 9px rgba(36, 126, 158, .18);
}
.patient-nav a:not(.active):hover { color: #176681; background: #edf5f8; }
.patient-nav a:focus-visible,
.patient-home .patient-option:focus-visible {
    outline: 3px solid #338bad;
    outline-offset: 3px;
}
.patient-home { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
@media (max-width: 360px) {
    .patient-home .patient-option { padding: 14px; }
    .patient-home .patient-option-icon { flex-basis: 54px; width: 54px; height: 54px; margin-right: 13px; }
    .patient-home .patient-option-copy strong { font-size: 16px; }
    .patient-home .patient-option-copy small { font-size: 13px; }
}

/* Compact bottom navigation, close to the bottom edge. */
.patient-nav {
    width: min(calc(100% - 24px), 440px);
    bottom: max(8px, env(safe-area-inset-bottom));
    padding: 5px;
    gap: 4px;
    border-radius: 20px;
}
.patient-nav a {
    min-height: 54px;
    padding: 6px 4px;
    gap: 3px;
    border-radius: 15px;
}
.patient-nav a > .patient-nav-icon { width: 24px; height: 24px; }
.patient-nav-icon svg { width: 22px; height: 22px; }
.patient-nav small { font-size: 12px; }

/* Keep compact height with narrower navigation buttons. */
.patient-nav { justify-items: center; }
.patient-nav a { width: 76px; max-width: 100%; }

/* Mi familia: same white card and back tab as the access screens. */
body.family-page {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #edf8fc 0, #f7fafc 240px, #f5f9fc 100%);
    color: #20364a;
}
.family-page *, .family-page *::before, .family-page *::after { box-sizing: border-box; }
.family-shell { width: min(calc(100% - 32px), 500px); margin: 0 auto; padding: max(24px, env(safe-area-inset-top)) 0 max(32px, env(safe-area-inset-bottom)); }
.family-back { display: inline-flex; align-items: center; gap: 9px; padding: 16px 21px 14px; border: 1px solid #e1ebf1; border-bottom: 0; border-radius: 24px 24px 0 0; background: #fff; color: #526782; font-size: 15px; font-weight: 500; text-decoration: none; }
.family-back > span { color: #278fbd; font-size: 21px; }
.family-panel { padding: 24px; border: 1px solid #e1ebf1; border-radius: 0 24px 24px 24px; background: #fff; box-shadow: 0 15px 35px rgba(31,72,96,.075); }
.family-brand { display: flex; align-items: center; gap: 12px; padding-bottom: 24px; border-bottom: 1px solid #edf1f5; }
.family-brand img { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; }
.family-brand div { display: flex; flex-direction: column; gap: 3px; }
.family-brand span { color: #526782; font-size: 10px; letter-spacing: 1.5px; font-weight: 600; }
.family-brand strong { color: #253d55; font-size: 19px; font-weight: 500; }
.family-heading { padding: 26px 0 22px; }
.family-kicker { color: #287f9f; font-size: 10px; letter-spacing: 1.8px; font-weight: 600; }
.family-heading h1 { margin: 8px 0 10px; color: #20364a; font-size: 33px; line-height: 1.15; font-weight: 500; letter-spacing: -.8px; }
.family-heading > p { margin: 0; color: #64748b; font-size: 15px; line-height: 1.6; }
.family-capacity { display: flex; align-items: center; gap: 9px; margin-top: 17px; padding: 11px 13px; border-radius: 12px; background: #edf6fa; color: #45667b; font-size: 12px; line-height: 1.5; }
.family-capacity svg { display: block; width: 20px; height: 20px; color: #287f9f; }
.family-capacity strong { color: #246e8b; font-weight: 600; }
.family-list { display: grid; gap: 12px; }
.family-person { padding: 17px; border: 1px solid #dfe9ef; border-radius: 18px; background: #fff; }
.family-person-top { display: flex; align-items: center; gap: 13px; }
.family-avatar { display: flex; align-items: center; justify-content: center; flex: 0 0 48px; height: 48px; border-radius: 15px; background: #176e80; color: #fff; font-size: 21px; font-weight: 500; }
.family-avatar-holder { background: #287f9f; }
.family-person-copy { min-width: 0; }
.family-relation { display: block; margin-bottom: 4px; color: #64748b; font-size: 11px; font-weight: 500; }
.family-person h2 { margin: 0; color: #20364a; font-size: 16px; line-height: 1.35; font-weight: 600; overflow-wrap: anywhere; }
.family-person-copy p { margin: 5px 0 0; color: #687c8d; font-size: 12px; }
.family-status { display: flex; align-items: center; gap: 7px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #eef2f5; color: #176e80; font-size: 12px; line-height: 1.45; }
.family-status > span { display: inline-flex; justify-content: center; align-items: center; flex: 0 0 19px; height: 19px; border-radius: 50%; background: #e7f4f2; font-size: 12px; }
.family-status-pending { color: #8b641f; }
.family-status-pending > span { background: #fff2d8; }
.family-review-help { margin: 7px 0 0; color: #7c6d55; font-size: 12px; line-height: 1.5; }
.family-actions { margin-top: 22px; }
.family-add, .family-request { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 15px; font-size: 15px; font-weight: 500; text-decoration: none; }
.family-add { border: 1px solid #bdd7e3; background: #f0f7fa; color: #226f8e; }
.family-add-icon { font-size: 24px; line-height: 1; }
.family-action-arrow { margin-left: auto; }
.family-hint { margin: 9px 4px 20px; color: #738595; font-size: 12px; line-height: 1.6; }
.family-request { justify-content: space-between; margin-top: 16px; border: 1px solid #207493; background: #247e9e; color: #fff; box-shadow: 0 4px 10px rgba(36,126,158,.12); }
.family-notice { margin: 0 0 16px; padding: 13px 15px; border: 1px solid #dbe8ef; border-radius: 12px; background: #f2f7fa; color: #46647b; font-size: 13px; line-height: 1.6; }
.family-back:focus-visible, .family-add:focus-visible, .family-request:focus-visible { outline: 3px solid #338bad; outline-offset: 3px; }
.family-add:hover { background: #e5f1f7; }
.family-request:hover { background: #1e6e8b; }
@media (max-width: 360px) {
    .family-shell { width: calc(100% - 24px); }
    .family-panel { padding: 19px; }
    .family-person { padding: 14px; }
    .family-heading h1 { font-size: 30px; }
    .family-capacity { padding: 10px; font-size: 11px; }
}


/* Active navigation uses icon and label color without a filled tile. */
.patient-nav a.active {
    color: #247e9e;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

/* Recipient selection follows the family card layout. */
.recipient-page .family-heading { padding-bottom: 24px; }
.recipient-page .family-heading h1 { font-size: 32px; line-height: 1.18; }
.recipient-list { display: grid; gap: 12px; }
.recipient-card { display: flex; align-items: center; gap: 13px; min-height: 94px; padding: 16px; border: 1px solid #dfe9ef; border-radius: 18px; background: #fff; color: #20364a; text-decoration: none; transition: background .18s ease, border-color .18s ease; }
.recipient-avatar { display: flex; align-items: center; justify-content: center; flex: 0 0 48px; height: 48px; border-radius: 15px; color: #fff; background: #176e80; font-size: 21px; font-weight: 500; }
.recipient-avatar-holder { background: #287f9f; }
.recipient-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 5px; }
.recipient-copy strong { font-size: 16px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.recipient-copy small { color: #687c8d; font-size: 12px; line-height: 1.4; }
.recipient-copy .recipient-relation { color: #28758d; font-size: 11px; font-weight: 500; }
.recipient-arrow { color: #4e829a; font-size: 25px; line-height: 1; }
.recipient-card:hover { background: #f6fafc; border-color: #9fbdcc; }
.recipient-card:focus-visible { outline: 3px solid #338bad; outline-offset: 3px; }
.recipient-pending .recipient-avatar { background: #fff2d8; color: #8b641f; }
.recipient-pending .recipient-copy strong { font-size: 14px; font-weight: 500; }
.recipient-add { margin-top: 20px; }
.recipient-quota { display: flex; align-items: flex-start; gap: 11px; margin-top: 22px; padding-top: 19px; border-top: 1px solid #edf1f5; color: #64748b; }
.recipient-quota-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 34px; height: 34px; border-radius: 10px; background: #edf6fa; color: #287f9f; }
.recipient-quota-icon svg { width: 20px; height: 20px; }
.recipient-quota p { margin: 0 0 5px; font-size: 13px; line-height: 1.4; }
.recipient-quota strong { color: #246e8b; font-weight: 600; }
.recipient-quota small { display: block; font-size: 12px; line-height: 1.6; }
.recipient-quota .recipient-quota-full { margin: 10px 0 0; color: #8b641f; font-size: 12px; line-height: 1.6; }
@media (max-width: 360px) {
    .recipient-page .family-heading h1 { font-size: 29px; }
    .recipient-card { gap: 11px; padding: 14px; }
    .recipient-avatar { flex-basis: 43px; height: 43px; border-radius: 13px; }
    .recipient-copy strong { font-size: 15px; }
}

/* Family and recipient typography matches the home screen's readable scale. */
.family-page .family-heading h1 {
    font-size: clamp(32px, 9vw, 42px);
    line-height: 1.18;
}
.family-heading > p { font-size: 17px; }
.family-person h2,
.recipient-copy strong,
.recipient-pending .recipient-copy strong { font-size: 18px; }
.family-person-copy p,
.family-relation,
.family-status,
.family-review-help,
.family-capacity,
.family-hint,
.family-notice,
.recipient-copy small,
.recipient-copy .recipient-relation,
.recipient-quota p,
.recipient-quota small,
.recipient-quota .recipient-quota-full { font-size: 14px; }
.family-add,
.family-request { font-size: 18px; }
.family-status { align-items: flex-start; line-height: 1.5; }
.family-status > span { margin-top: 1px; }
.family-capacity > span:last-child { min-width: 0; }
.recipient-quota { line-height: 1.5; }

/* Add family form: consistent spacing and native mobile input appearance. */
.family-form { display: grid; gap: 20px; margin: 0; }
.family-field { min-width: 0; margin: 0; }
.family-field label { display: block; margin: 0 0 9px; color: #314b61; font-size: 16px; line-height: 1.4; font-weight: 500; }
.family-field-optional { color: #738595; font-size: 14px; font-weight: 400; }
.family-field input,
.family-field select {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 54px;
    margin: 0;
    padding: 13px 15px;
    border: 1px solid #cedee8;
    border-radius: 13px;
    background: #fff;
    color: #20364a;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
    color-scheme: light;
}
.family-field input::placeholder { color: #8899a8; opacity: 1; }
.family-field input:focus,
.family-field select:focus { outline: 2px solid #287f9f; outline-offset: 2px; border-color: #287f9f; background: #fff; }
.family-field input[type="date"] { background-color: #fff; text-align: left; overflow: hidden; }
.family-field input[type="date"]::-webkit-date-and-time-value { min-height: 24px; text-align: left; }
.family-field input[type="date"]::-webkit-datetime-edit { padding: 0; }
.family-select-wrap { position: relative; min-width: 0; }
.family-select-wrap select { padding-right: 44px; }
.family-select-wrap > svg { position: absolute; width: 20px; height: 20px; right: 15px; top: 17px; color: #287f9f; pointer-events: none; }
.family-form-note { margin: 2px 0 0; padding: 14px; border-radius: 12px; background: #edf6fa; color: #536f83; font-size: 14px; line-height: 1.6; }
.family-form .family-save { margin: 0; min-height: 54px; cursor: pointer; font-family: inherit; font-size: 18px; }
.family-form .family-save:focus-visible { outline: 3px solid #338bad; outline-offset: 3px; }
.family-form-page .family-heading h1 { font-size: clamp(30px, 8vw, 38px); }

/* Specialty selection: shared card style and home typography. */
.specialty-page .family-heading h1 { font-size: clamp(32px, 9vw, 42px); line-height: 1.18; }
.specialty-page .family-heading > p { font-size: 17px; }
.specialty-patient { display: flex; align-items: flex-start; gap: 11px; margin-top: 17px; padding: 13px 14px; border-radius: 13px; background: #edf6fa; color: #42667b; }
.specialty-patient svg { flex: 0 0 21px; width: 21px; height: 21px; color: #287f9f; margin-top: 2px; }
.specialty-patient small { display: block; font-size: 14px; line-height: 1.5; }
.specialty-patient strong { display: block; font-size: 18px; line-height: 1.4; font-weight: 600; color: #20364a; overflow-wrap: anywhere; }
.specialty-page .specialty-search { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 0 14px; min-height: 54px; border: 1px solid #cedee8; border-radius: 13px; background: #fff; box-shadow: none; }
.specialty-page .specialty-search__icon { display: flex; align-items: center; flex: 0 0 22px; color: #287f9f; }
.specialty-search__icon svg { width: 22px; height: 22px; }
.specialty-page .specialty-search input { width: 100%; min-width: 0; padding: 13px 0; border: 0; border-radius: 0; background: transparent; color: #20364a; font: inherit; font-size: 16px; outline: none; box-shadow: none; }
.specialty-page .specialty-search:focus-within { outline: 2px solid #287f9f; outline-offset: 2px; }
.specialty-page .specialty-search input::placeholder { color: #7b8d9d; opacity: 1; }
.specialty-page .specialty-list { display: grid; gap: 12px; margin: 0; }
.specialty-page .specialty-card { display: flex; align-items: center; gap: 13px; min-height: 88px; padding: 15px; border: 1px solid #dfe9ef; border-radius: 18px; background: #fff; color: #20364a; box-shadow: none; text-decoration: none; }
.specialty-page .specialty-card[hidden], .specialty-page .specialty-empty[hidden] { display: none; }
.specialty-page .specialty-card__main { min-width: 0; flex: 1; }
.specialty-page .specialty-card__name { font-size: 18px; font-weight: 600; line-height: 1.35; color: #20364a; overflow-wrap: anywhere; }
.specialty-page .specialty-card__meta { margin-top: 5px; font-size: 14px; color: #687c8d; line-height: 1.5; }
.specialty-symbol { display: flex; justify-content: center; align-items: center; flex: 0 0 44px; height: 44px; border-radius: 14px; background: #287f9f; color: #fff; }
.specialty-symbol svg { width: 25px; height: 25px; }
.specialty-page .specialty-card__arrow { font-size: 25px; color: #4e829a; }
.specialty-page .specialty-card:hover { border-color: #9fbdcc; background: #f6fafc; }
.specialty-page .specialty-card:focus-visible { outline: 3px solid #338bad; outline-offset: 3px; }
.specialty-page .specialty-empty { margin-top: 18px; padding: 16px; border-radius: 13px; background: #edf6fa; color: #536f83; font-size: 17px; line-height: 1.6; }

/* Location selection shares the specialty screen's typography and cards. */
.location-specialty { display: block; margin-top: 5px; color: #42667b; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.location-page .location-symbol { background: #176e80; }

/* Professional selection uses the same readable scale as home. */
.professional-selection-context { display: block; margin-top: 5px; color: #42667b; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.professional-page .professional-symbol { background: #287f9f; }
.professional-page .professional-card { align-items: center; }
.professional-page .specialty-card__name { font-size: 18px; }
.professional-page .specialty-card__meta { font-size: 14px; }

/* Availability follows the shared white card and home text sizes. */
.schedule-page .family-heading h1 { font-size: clamp(32px, 9vw, 42px); line-height: 1.18; }
.schedule-page .family-heading > p { font-size: 17px; }
.schedule-summary { margin-top: 17px; padding: 15px; border-radius: 14px; background: #edf6fa; }
.schedule-summary-row { display: flex; align-items: flex-start; gap: 11px; }
.schedule-summary-row + .schedule-summary-row { margin-top: 13px; padding-top: 13px; border-top: 1px solid #dbe9f0; }
.schedule-summary-row svg { flex: 0 0 21px; width: 21px; height: 21px; margin-top: 3px; color: #287f9f; }
.schedule-summary-row > div { min-width: 0; }
.schedule-summary-row small { display: block; color: #536f83; font-size: 14px; line-height: 1.5; }
.schedule-summary-row strong { display: block; color: #20364a; font-size: 18px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.schedule-context { display: block; margin-top: 5px; color: #536f83; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.schedule-page .availability-list { display: grid; gap: 16px; margin: 0; }
.schedule-page .availability-day { padding: 17px; border: 1px solid #dfe9ef; border-radius: 18px; background: #fff; box-shadow: none; }
.schedule-page .availability-day__header { margin: 0 0 16px; padding: 0 0 13px; border-bottom: 1px solid #edf1f5; }
.schedule-page .availability-day__date { display: flex; align-items: baseline; gap: 7px; }
.schedule-page .availability-day__date strong { font-size: 18px; font-weight: 600; color: #20364a; }
.schedule-page .availability-day__date span { color: #64748b; font-size: 14px; }
.schedule-page .availability-service { margin: 0; }
.schedule-page .availability-service + .availability-service { margin-top: 18px; padding-top: 16px; border-top: 1px solid #edf1f5; }
.schedule-page .availability-service__name { margin: 0 0 11px; font-size: 17px; line-height: 1.4; font-weight: 500; color: #42667b; }
.schedule-page .availability-times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.schedule-page .availability-time { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 48px; padding: 11px 4px; border: 1px solid #bdd7e3; border-radius: 12px; background: #f0f7fa; color: #226f8e; font-size: 18px; font-weight: 500; line-height: 1.3; text-decoration: none; box-shadow: none; }
.schedule-page .availability-time:hover { border-color: #207493; background: #247e9e; color: #fff; }
.schedule-page .availability-time:focus-visible { outline: 3px solid #338bad; outline-offset: 3px; }
.schedule-week-note { margin: 0 0 17px; color: #64748b; font-size: 14px; line-height: 1.6; }
.schedule-page .specialty-empty { margin: 0; padding: 17px; border-radius: 13px; background: #edf6fa; color: #536f83; font-size: 17px; line-height: 1.6; }
@media (max-width: 360px) {
    .schedule-page .availability-day { padding: 14px; }
    .schedule-page .availability-times { gap: 7px; }
}

/* Review page: clear patient details and a highlighted appointment. */
.request-review-page .family-heading h1 { font-size: clamp(32px, 9vw, 42px); line-height: 1.18; }
.request-review-page .family-heading > p { font-size: 17px; }
.request-review-page .review-card { padding: 0 17px; margin: 0; border: 1px solid #dfe9ef; border-radius: 18px; background: #fff; box-shadow: none; overflow: hidden; }
.request-review-page .review-row { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; margin: 0; padding: 15px 0; border: 0; border-bottom: 1px solid #edf1f5; }
.request-review-page .review-row > span { font-size: 14px; line-height: 1.5; color: #64748b; }
.request-review-page .review-row > strong { max-width: 100%; font-size: 18px; line-height: 1.4; font-weight: 600; color: #20364a; text-align: left; overflow-wrap: anywhere; }
.request-review-page .review-row--appointment { margin: 0 -17px; padding: 17px; border-bottom: 0; background: #edf6fa; }
.request-review-page .review-row--appointment > span { color: #42667b; }
.request-review-page .review-row--appointment > strong { color: #226f8e; }
.request-review-page .review-actions { display: block; margin: 22px 0 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.request-review-page .review-submit,
.request-review-page .review-back-button { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 54px; padding: 13px 16px; border: 1px solid #207493; border-radius: 15px; background: #247e9e; color: #fff; font-family: inherit; font-size: 18px; font-weight: 500; line-height: 1.4; text-decoration: none; cursor: pointer; box-shadow: 0 4px 10px rgba(36,126,158,.12); }
.request-review-page .review-note { margin: 13px 2px 0; color: #64748b; font-size: 14px; line-height: 1.6; text-align: center; }
.request-review-page .review-alert { margin: 18px 0; padding: 14px; border: 1px solid #ecdcba; border-radius: 13px; background: #fff8eb; color: #805b21; font-size: 17px; line-height: 1.5; }
.request-review-page .review-back-button { margin-top: 18px; }
.request-review-page .review-submit:hover,
.request-review-page .review-back-button:hover { background: #1e6e8b; }
.request-review-page .review-submit:focus-visible,
.request-review-page .review-back-button:focus-visible { outline: 3px solid #338bad; outline-offset: 3px; }

/* Success screen: calm celebration and clear pending status. */
.success-panel { border-radius: 24px; }
.success-heading { padding: 22px 0 25px; text-align: center; }
.success-heading h1 { margin: 11px 0 13px; color: #20364a; font-size: clamp(32px, 9vw, 42px); line-height: 1.17; font-weight: 500; letter-spacing: -.8px; }
.success-heading > p { margin: 0; color: #64748b; font-size: 17px; line-height: 1.6; }
.success-art { position: relative; width: 150px; height: 124px; margin: 0 auto 13px; }
.success-ring { position: absolute; width: 104px; height: 104px; top: 10px; left: 23px; border: 1px solid #c9e8e6; border-radius: 50%; background: #eff9f7; }
.success-check { position: absolute; display: flex; align-items: center; justify-content: center; width: 78px; height: 78px; left: 36px; top: 23px; border-radius: 50%; background: linear-gradient(145deg,#278ba0,#176e80); color: #fff; box-shadow: 0 8px 20px rgba(23,110,128,.22); animation: success-arrive .45s ease-out both; }
.success-check svg { width: 48px; height: 48px; }
.success-spark { position: absolute; z-index: 1; width: 8px; height: 8px; border-radius: 3px; background: #66b4c6; transform: rotate(25deg); }
.success-spark-one { left: 12px; top: 32px; }
.success-spark-two { right: 12px; top: 23px; width: 6px; height: 14px; background: #d5b578; }
.success-spark-three { right: 18px; bottom: 18px; width: 7px; height: 7px; border-radius: 50%; background: #70b5a9; }
.success-date { display: flex; gap: 13px; padding: 18px; border: 1px solid #d5e8ef; border-radius: 17px; background: linear-gradient(125deg,#edf8fc,#edf7f5); }
.success-date > svg { flex: 0 0 26px; width: 26px; height: 26px; margin-top: 4px; color: #287f9f; }
.success-date > div { min-width: 0; }
.success-date span { display: block; margin-bottom: 6px; color: #536f83; font-size: 14px; line-height: 1.5; }
.success-date strong { display: block; color: #20364a; font-size: 18px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.success-date b { display: block; margin-top: 4px; font-size: 24px; line-height: 1.3; color: #176e80; font-weight: 600; }
.success-pending { display: flex; align-items: flex-start; gap: 9px; margin: 17px 0 22px; padding: 14px; border-radius: 12px; background: #fff8eb; color: #805b21; }
.success-pending-dot { flex: 0 0 7px; height: 7px; margin-top: 7px; border-radius: 50%; background: #c69748; }
.success-pending strong { display: block; font-size: 14px; line-height: 1.5; font-weight: 600; }
.success-pending p { margin: 4px 0 0; font-size: 14px; line-height: 1.6; }
.success-details { padding: 0 16px; border: 1px solid #dfe9ef; border-radius: 17px; }
.success-details > div { display: flex; flex-direction: column; gap: 5px; padding: 14px 0; border-bottom: 1px solid #edf1f5; }
.success-details > div:last-child { border-bottom: 0; }
.success-details span { color: #64748b; font-size: 14px; line-height: 1.5; }
.success-details strong { color: #20364a; font-size: 18px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.success-code { margin-top: 22px; padding: 20px 14px; border: 1px dashed #a7c8d7; border-radius: 15px; background: #f5fafc; text-align: center; }
.success-code > span { display: block; color: #536f83; font-size: 14px; line-height: 1.5; }
.success-code > strong { display: block; margin: 8px 0; color: #226f8e; font-size: 18px; line-height: 1.5; font-weight: 600; letter-spacing: .6px; overflow-wrap: anywhere; }
.success-code p { margin: 0; color: #64748b; font-size: 14px; line-height: 1.6; }
.success-home { margin-top: 22px; }
@keyframes success-arrive { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .success-check { animation: none; } }

/* Final screen: one dark check icon without decorative elements. */
.success-art { width: 78px; height: 78px; margin: 6px auto 21px; }
.success-check { position: relative; left: auto; top: auto; background: #176e80; box-shadow: none; }

/* My appointments: shared typography and explicit cancellation confirmation. */
.my-turns-page .family-heading h1 { font-size: clamp(32px, 9vw, 42px); }
.my-section-title { display: flex; align-items: center; gap: 9px; margin: 0 0 15px; color: #20364a; font-size: 18px; font-weight: 600; line-height: 1.4; }
.my-section-title > span { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 7px; background: #edf6fa; color: #226f8e; border-radius: 9px; font-size: 14px; }
.my-turn-list { display: grid; gap: 15px; }
.my-appointment { padding: 17px; border: 1px solid #dfe9ef; border-radius: 18px; background: #fff; }
.my-appointment-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.my-turn-status { padding: 5px 9px; border-radius: 8px; background: #eaf5f3; color: #176e80; font-size: 14px; line-height: 1.4; }
.my-turn-cancelled { background: #f0f2f5; color: #64748b; }
.my-turn-time { color: #226f8e; font-size: 18px; font-weight: 600; }
.my-turn-date { margin: 12px 0 8px; color: #536f83; font-size: 14px; line-height: 1.5; }
.my-appointment h3 { margin: 0 0 14px; color: #20364a; font-size: 18px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.my-appointment dl { display: grid; gap: 11px; margin: 0; }
.my-appointment dl > div { min-width: 0; }
.my-appointment dt { color: #738595; font-size: 14px; line-height: 1.5; }
.my-appointment dd { margin: 2px 0 0; color: #314b61; font-size: 17px; line-height: 1.45; overflow-wrap: anywhere; }
.my-turn-code { margin: 15px 0 0; padding-top: 13px; border-top: 1px solid #edf1f5; color: #64748b; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.my-turn-code strong { color: #42667b; font-weight: 500; }
.my-turn-cancel { display: flex; align-items: center; justify-content: center; min-height: 46px; margin-top: 14px; padding: 10px; border: 1px solid #ddc4c3; border-radius: 12px; background: #fff; color: #9b4542; font-size: 16px; line-height: 1.4; text-decoration: none; }
.my-turn-cancel:hover { background: #fff4f3; }
.my-turn-help { margin: 12px 0 0; color: #64748b; font-size: 14px; line-height: 1.6; }
.my-turn-empty { margin: 0; padding: 17px; border: 1px solid #dfe9ef; border-radius: 15px; background: #f5fafc; color: #536f83; font-size: 17px; line-height: 1.6; }
.my-cancel-confirm { margin: 0 0 24px; padding: 17px; border: 1px solid #ecdcba; border-radius: 16px; background: #fff8eb; color: #805b21; font-size: 17px; line-height: 1.6; scroll-margin-top: 20px; }
.my-cancel-confirm h2 { margin: 0 0 12px; color: #714e1c; font-size: 18px; font-weight: 600; }
.my-cancel-confirm p { margin: 10px 0; font-size: 17px; }
.my-cancel-submit, .my-keep-turn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; padding: 12px; border-radius: 13px; font-family: inherit; font-size: 18px; line-height: 1.4; text-decoration: none; }
.my-cancel-submit { margin-top: 16px; border: 1px solid #994842; background: #994842; color: #fff; cursor: pointer; }
.my-keep-turn { margin-top: 9px; border: 1px solid #dfd5c2; background: #fff; color: #536f83; }
.my-turn-history { margin-top: 26px; padding-top: 21px; border-top: 1px solid #edf1f5; }
.my-turn-history > summary { padding: 6px 0 16px; color: #314b61; font-size: 18px; font-weight: 500; cursor: pointer; }
.my-turn-pagination { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 16px; }
.my-turn-pagination a { padding: 8px 0; color: #226f8e; text-decoration: none; }
.my-turn-cancel:focus-visible,.my-cancel-submit:focus-visible,.my-keep-turn:focus-visible,.my-turn-history > summary:focus-visible { outline: 3px solid #338bad; outline-offset: 3px; }

/* Direct route home from every patient flow step. */
.flow-navigation { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flow-navigation .family-back { align-self: flex-end; }
.flow-home-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; margin: 0 4px 5px 0; padding: 9px 13px; border: 1px solid #c9e0eb; border-radius: 13px; background: rgba(255,255,255,.85); color: #226f8e; text-decoration: none; font-size: 16px; line-height: 1.4; }
.flow-home-link svg { width: 20px; height: 20px; }
.flow-home-link:hover { background: #fff; }
.flow-home-link:focus-visible { outline: 3px solid #338bad; outline-offset: 3px; }
