/*
 * Medicuan · Handlebars front
 * Estilos del nuevo front SSR. Se monta encima de:
 *  - /assets/index-BcyMYVZG.css  (Tailwind+custom heredado del antiguo SPA)
 *  - /public/css/style.css        (look-and-feel base de Medicuan)
 * Todos los estilos viven bajo el namespace .hbs- / .auth- / .dpanel- / .dcal-
 * etc. para no chocar con clases legacy de CodeIgniter.
 */

:root {
    --hbs-primary: #105ea6;
    --hbs-primary-dark: #0b457f;
    --hbs-secondary: #2eb8cb;
    --hbs-accent: #42d2e3;
    --hbs-bg: #f1f5f9;
    --hbs-surface: #ffffff;
    --hbs-text: #1e293b;
    --hbs-muted: #64748b;
    --hbs-border: #e2e8f0;
    --hbs-success: #10b981;
    --hbs-warning: #f59e0b;
    --hbs-danger: #ef4444;
    --hbs-shadow-sm: 0 4px 6px -1px rgba(15, 23, 42, .06);
    --hbs-shadow-md: 0 12px 24px -8px rgba(16, 94, 166, .18);
    --hbs-shadow-lg: 0 24px 48px -12px rgba(16, 94, 166, .28);
    --hbs-radius: 16px;
    --hbs-radius-lg: 24px;
}

.medicuan-body {
    background: var(--hbs-bg);
    color: var(--hbs-text);
    font-family: 'Poppins', system-ui, sans-serif;
    min-height: 100vh;
}

.medicuan-main {
    min-height: calc(100vh - 540px);
}

.hbs-container {
    width: min(1200px, 92vw);
    margin: 0 auto;
}

/* ───────────── Botones ───────────── */
.hbs-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem 1.1rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
    line-height: 1;
    background: transparent;
    color: var(--hbs-text);
}
.hbs-btn:hover { transform: translateY(-1px); }
.hbs-btn:active { transform: translateY(0); }
.hbs-btn--primary {
    background: linear-gradient(135deg, var(--hbs-primary) 0%, var(--hbs-secondary) 100%);
    color: #fff;
    box-shadow: var(--hbs-shadow-md);
}
.hbs-btn--primary:hover { box-shadow: var(--hbs-shadow-lg); }
.hbs-btn--ghost {
    background: rgba(16, 94, 166, .06);
    color: var(--hbs-primary-dark);
    border-color: rgba(16, 94, 166, .12);
}
.hbs-btn--ghost:hover { background: rgba(16, 94, 166, .12); }
.hbs-btn--lg { padding: .9rem 1.6rem; font-size: 1rem; }
.hbs-btn--block { width: 100%; justify-content: center; }
.hbs-btn:disabled { opacity: .55; pointer-events: none; }

/* ───────────── Navbar ───────────── */
.hbs-navbar {
    position: sticky;
    top: env(safe-area-inset-top, 0);
    z-index: 50;
    backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, .82);
    border-bottom: 1px solid rgba(15, 23, 42, .06);
}
.hbs-navbar__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 0;
    gap: 1rem;
}
.hbs-navbar__brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    text-decoration: none;
    color: var(--hbs-primary-dark);
}
.hbs-navbar__logo { width: 38px; height: 38px; object-fit: contain; }
.hbs-navbar__brandText { font-weight: 800; font-size: 1.18rem; letter-spacing: -.01em; }
.hbs-navbar__links { display: flex; gap: 1.4rem; align-items: center; }
.hbs-navbar__link {
    color: var(--hbs-muted);
    text-decoration: none;
    font-weight: 500;
    padding: .35rem .25rem;
    border-bottom: 2px solid transparent;
    transition: color .15s ease, border-color .15s ease;
}
.hbs-navbar__link:hover, .hbs-navbar__link.is-active {
    color: var(--hbs-primary-dark);
    border-bottom-color: var(--hbs-secondary);
}
.hbs-navbar__link--ghost { color: var(--hbs-primary); }
.hbs-navbar__actions { display: flex; gap: .5rem; align-items: center; }
.hbs-navbar__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    border: none;
    background: transparent;
    cursor: pointer;
}
.hbs-navbar__hamburger span {
    width: 26px; height: 2px; background: var(--hbs-primary-dark); border-radius: 2px;
    transition: transform .2s ease;
}
.hbs-navbar__mobile {
    padding: 1rem 1.5rem 1.5rem;
    background: #fff;
    border-top: 1px solid var(--hbs-border);
    display: flex;
    flex-direction: column;
    gap: .25rem;
    animation: hbs-fade-in .25s ease;
}
.hbs-navbar__mobileLink { padding: .8rem .25rem; text-decoration: none; color: var(--hbs-text); border-bottom: 1px solid var(--hbs-border); }
.hbs-navbar__mobileActions { display: flex; flex-direction: column; gap: .5rem; margin-top: 1rem; }

@media (max-width: 880px) {
    .hbs-navbar__links, .hbs-navbar__actions { display: none; }
    .hbs-navbar__hamburger { display: inline-flex; }
}

/* ───────────── Hero ───────────── */
.hero { padding: 4.5rem 0 3rem; }
.hero__row {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    grid-template-rows: auto auto auto;
    column-gap: 4rem;
    row-gap: 0;
    align-items: start;
}
.hero__eyebrow {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    margin-bottom: 1rem;
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .4rem .85rem; border-radius: 999px;
    background: rgba(46, 184, 203, .15); color: var(--hbs-primary-dark);
    font-weight: 600; font-size: .85rem;
}
.hero__copyBlock {
    grid-column: 1;
    grid-row: 2;
}
.hero__copyBlock h1 {
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    margin: 0 0 1.2rem;
    letter-spacing: -.02em;
    line-height: 1.05;
}
.hero__copyBlock p { color: var(--hbs-muted); font-size: 1.1rem; max-width: 540px; margin: 0; }
.hero__cta {
    grid-column: 1;
    grid-row: 3;
    display: flex;
    gap: .8rem;
    margin-top: 1.8rem;
    flex-wrap: wrap;
    align-self: start;
}
.hero__stats { display: flex; gap: 2rem; margin-top: 2.5rem; flex-wrap: wrap; }
.hero__stats > div { display: flex; flex-direction: column; }
.hero__stats strong { font-size: 1.6rem; color: var(--hbs-primary-dark); }
.hero__stats span { color: var(--hbs-muted); font-size: .9rem; }

.hero__art {
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: center;
    position: relative;
    justify-self: stretch;
}
.hero__phone {
    border-radius: var(--hbs-radius-lg); overflow: hidden;
    box-shadow: var(--hbs-shadow-lg);
    transform: rotate(-2deg);
    background: #fff;
    animation: hbs-float 6s ease-in-out infinite;
}
.hero__phone img { display: block; width: 100%; }
.hero__floatCard {
    position: absolute;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--hbs-radius);
    padding: .85rem 1.1rem;
    display: flex;
    align-items: center;
    gap: .8rem;
    box-shadow: var(--hbs-shadow-md);
    border: 1px solid rgba(255, 255, 255, .85);
    animation: hbs-float 5s ease-in-out infinite;
}
.hero__floatCard i {
    width: 38px; height: 38px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(46, 184, 203, .15); color: var(--hbs-secondary);
}
.hero__floatCard strong { display: block; font-size: .95rem; }
.hero__floatCard small { color: var(--hbs-muted); }
.hero__floatCard--top { top: 8%; left: -6%; animation-delay: -1s; }
.hero__floatCard--bottom { bottom: 6%; right: -4%; animation-delay: -3s; }

@media (max-width: 900px) {
    .hero__row {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        row-gap: 1.25rem;
    }
    .hero__eyebrow {
        grid-column: 1;
        grid-row: 1;
        justify-self: center;
        text-align: center;
        margin-bottom: 0;
        align-self: start;
    }
    .hero__copyBlock { display: none; }
    .hero__art {
        grid-column: 1;
        grid-row: 2;
        grid-row-end: auto;
        max-width: min(340px, 94vw);
        margin: 0 auto;
        width: 100%;
    }
    .hero__cta {
        grid-column: 1;
        grid-row: 3;
        justify-content: center;
        margin-top: 0;
    }
    .hero__floatCard {
        padding: .65rem .85rem;
        gap: .55rem;
        font-size: .88rem;
    }
    .hero__floatCard i {
        width: 32px;
        height: 32px;
        font-size: .95rem;
    }
    .hero__floatCard--top { top: 6%; left: 2%; animation-delay: -1s; }
    .hero__floatCard--bottom { bottom: 5%; right: 2%; animation-delay: -3s; }
    .hero__phone {
        animation: hbs-float 6s ease-in-out infinite;
        transform: rotate(-2deg);
    }
}

@keyframes hbs-float {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-12px) rotate(-2deg); }
}
@keyframes hbs-fade-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes hbs-pop-in {
    0% { opacity: 0; transform: translateY(8px) scale(.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ───────────── Sections ───────────── */
.section__header { text-align: center; max-width: 720px; margin: 0 auto 2.5rem; }
.section__header--left { text-align: left; margin-left: 0; max-width: 720px; }
.section__eyebrow {
    display: inline-block; color: var(--hbs-secondary);
    font-weight: 600; text-transform: uppercase; letter-spacing: .12em; font-size: .8rem;
    margin-bottom: .5rem;
}
.section__header h1, .section__header h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem); letter-spacing: -.01em;
}
.section__header p { color: var(--hbs-muted); margin-top: .6rem; }

.features { padding: 4rem 0; background: #fff; }
.features__grid {
    display: grid; gap: 1.4rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.feature-card {
    padding: 1.75rem 1.35rem 1.6rem;
    border-radius: var(--hbs-radius-lg);
    background: linear-gradient(165deg, #fff 0%, #f8fafc 100%);
    border: 1px solid var(--hbs-border);
    text-align: center;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    animation: hbs-pop-in .35s ease both;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hbs-shadow-md);
    border-color: rgba(46, 184, 203, .35);
}
.feature-card__icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    margin: 0 auto 1.1rem;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    color: var(--hbs-primary-dark);
    background: rgba(255, 255, 255, .42);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, .75);
    box-shadow:
        0 10px 28px rgba(16, 94, 166, .1),
        inset 0 1px 0 rgba(255, 255, 255, .65);
}
.feature-card h3 { font-size: 1.1rem; margin-bottom: .35rem; }
.feature-card p { color: var(--hbs-muted); font-size: .95rem; }

/* ───────────── Cómo funciona (teléfono animado + pasos interactivos) ───────────── */
.section-spacing { padding: clamp(3rem, 6vw, 5rem) 0; }

.process-layout {
    display: flex;
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
}

.phone-wrapper {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    perspective: 1000px;
}

.phone-device {
    width: 300px;
    height: 600px;
    background: #1e293b;
    border-radius: 45px;
    border: 5px solid #334155;
    position: relative;
    box-shadow: 0 40px 80px rgba(0, 0, 0, .2);
    z-index: 2;
    transform: rotateY(-10deg);
    transition: transform .5s ease;
}

.phone-device:hover { transform: rotateY(0deg); }

.phone-notch {
    width: 140px;
    height: 28px;
    background: #1e293b;
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0 0 16px 16px;
    z-index: 10;
}

.phone-screen-content {
    width: 100%;
    height: 100%;
    border-radius: 38px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(to bottom, #eff6ff, #fff);
}

.app-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.25rem;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .5s ease, transform .5s ease;
}

.app-slide.active {
    opacity: 1;
    transform: translateY(0);
}

.app-slide h4 {
    margin: 0 0 .35rem;
    font-size: 1rem;
    color: var(--hbs-text);
}

.app-slide p {
    margin: 0;
    font-size: .9rem;
    color: var(--hbs-muted);
}

.app-icon {
    width: 88px;
    height: 88px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.35rem;
    color: var(--hbs-primary);
    box-shadow: 0 10px 20px rgba(16, 94, 166, .12);
    margin-bottom: 18px;
}

.steps-wrapper { flex: 1; }

.title-lg {
    font-size: clamp(1.85rem, 3vw, 2.45rem);
    color: var(--hbs-primary-dark);
    margin: 0 0 .5rem;
    font-weight: 700;
    letter-spacing: -.02em;
}

.subtitle-left {
    font-size: 1.05rem;
    color: var(--hbs-muted);
    margin: 0 0 2rem;
    line-height: 1.55;
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.step-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.35rem 1.25rem;
    background: var(--hbs-surface);
    border-radius: 20px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background .3s ease, transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.step-card:hover {
    background: rgba(255, 255, 255, .95);
    transform: translateX(8px);
}

.step-card.active {
    border-color: var(--hbs-accent);
    box-shadow: var(--hbs-shadow-md);
}

.step-number {
    font-size: 2.15rem;
    font-weight: 800;
    color: #e2e8f0;
    line-height: 1;
    flex-shrink: 0;
}

.step-card.active .step-number { color: var(--hbs-secondary); }

.step-info h3 {
    font-size: 1.05rem;
    margin: 0 0 .4rem;
    color: var(--hbs-text);
}

.step-info p {
    margin: 0;
    font-size: .92rem;
    color: var(--hbs-muted);
    line-height: 1.55;
}

.how__panel-link { margin: 1.75rem 0 0; }

.mobile-step-nav { display: none; }

@keyframes hbs-fade-step-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ───────────── Inscripción por pestañas (card unificada + tabs) ───────────── */
.cta.signup-tabs {
    background: transparent;
}

.services-unified-card {
    background: #fff;
    border-radius: var(--hbs-radius-lg);
    padding: 0;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .04);
    box-shadow: var(--hbs-shadow-md);
    max-width: 950px;
    margin: 0 auto;
}

.signup-unified-card .unified-backdrop-icon {
    position: absolute;
    top: -28px;
    right: -36px;
    font-size: 12rem;
    color: var(--hbs-primary);
    opacity: .04;
    transform: rotate(12deg);
    pointer-events: none;
    transition: opacity .4s ease, transform .4s ease;
}

.signup-unified-card:hover .unified-backdrop-icon {
    opacity: .07;
    transform: rotate(0deg) scale(1.04);
}

.services-tabs {
    display: flex;
    position: relative;
    border-bottom: 2px solid #f1f5f9;
}

.service-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: 1.15rem 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: .98rem;
    font-weight: 600;
    color: var(--hbs-muted);
    transition: color .25s ease, background .25s ease;
    position: relative;
    z-index: 1;
}

.service-tab:hover {
    color: var(--hbs-primary);
    background: rgba(16, 94, 166, .04);
}

.service-tab.active { color: var(--hbs-primary); }

.service-tab i {
    font-size: .95rem;
    transition: transform .3s ease;
}

.service-tab.active i { transform: scale(1.12); }

.tab-indicator {
    position: absolute;
    bottom: -2px;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--hbs-primary), var(--hbs-secondary));
    border-radius: 3px 3px 0 0;
    transition: transform .4s cubic-bezier(.4, 0, .2, 1), width .4s cubic-bezier(.4, 0, .2, 1);
    z-index: 2;
}

.tab-indicator--three {
    width: calc(100% / 3);
}

.tab-indicator--three.pos-0 { transform: translateX(0); }
.tab-indicator--three.pos-1 { transform: translateX(100%); }
.tab-indicator--three.pos-2 { transform: translateX(200%); }

.services-tab-contents {
    position: relative;
    min-height: 320px;
}

.tab-content {
    display: none;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    animation: hbs-fade-tab-in .45s ease forwards;
}

.tab-content.active { display: block; }

@keyframes hbs-fade-tab-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-content-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: clamp(1.25rem, 3vw, 2.5rem);
    align-items: start;
}

.tab-content-info {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.tab-badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .45rem 1rem;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 700;
    width: fit-content;
}

.premium-badge {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.premium-badge i { color: #f59e0b; }

.free-badge {
    background: linear-gradient(135deg, #ccfbf1, #a7f3d0);
    color: #065f46;
}

.free-badge i { color: #10b981; }

.tab-content-info h3 {
    font-size: 1.45rem;
    color: var(--hbs-text);
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
}

.tab-content-info p {
    color: var(--hbs-muted);
    font-size: .96rem;
    line-height: 1.65;
    margin: 0;
}

.tab-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    background: linear-gradient(135deg, var(--hbs-primary), var(--hbs-primary-dark));
    color: #fff;
    padding: .85rem 1.6rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: .94rem;
    box-shadow: var(--hbs-shadow-md);
    transition: transform .25s ease, box-shadow .25s ease;
    width: fit-content;
    margin-top: .35rem;
}

.tab-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--hbs-shadow-lg);
}

.tab-cta-free {
    background: linear-gradient(135deg, var(--hbs-secondary), var(--hbs-accent));
}

.tab-content-features {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.tab-content .feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .95rem 1.1rem;
    background: #f8fafc;
    border-radius: 16px;
    transition: background .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s ease;
    border: 1px solid transparent;
}

.tab-content .feature-item:hover {
    background: #fff;
    border-color: rgba(16, 94, 166, .08);
    box-shadow: var(--hbs-shadow-sm);
    transform: translateX(4px);
}

.tab-content .feature-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.tab-content .feature-icon.color-blue {
    background: #e0f2fe;
    color: var(--hbs-primary);
}

.tab-content .feature-icon.color-cyan {
    background: #ccfbf1;
    color: var(--hbs-secondary);
}

.tab-content .feature-text h4 {
    font-size: .92rem;
    color: var(--hbs-text);
    font-weight: 600;
    margin: 0 0 .15rem;
}

.tab-content .feature-text p {
    font-size: .82rem;
    color: var(--hbs-muted);
    margin: 0;
    line-height: 1.4;
}

@media (max-width: 900px) {
    .process-layout {
        flex-direction: column;
        gap: 2rem;
    }

    .phone-wrapper { justify-content: center; }

    .phone-device {
        width: 248px;
        height: 496px;
        transform: rotateY(0deg);
        border-radius: 38px;
    }

    .phone-screen-content { border-radius: 32px; }

    .phone-notch {
        width: 112px;
        height: 22px;
    }

    .steps-wrapper { text-align: center; }

    .subtitle-left { text-align: center; }

    .steps-list {
        position: relative;
        gap: 0;
    }

    .step-card {
        display: none;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: .65rem;
        padding: 1.25rem;
        border: 2px solid var(--hbs-accent);
        box-shadow: var(--hbs-shadow-md);
        animation: hbs-fade-step-in .4s ease forwards;
    }

    .step-card.active { display: flex; }

    .step-card .step-number {
        font-size: 1.85rem;
        color: var(--hbs-secondary);
    }

    .mobile-step-nav {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        margin-top: 1.15rem;
    }

    .mobile-step-arrow {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: 2px solid var(--hbs-primary);
        background: #fff;
        color: var(--hbs-primary);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        cursor: pointer;
        transition: background .2s ease, color .2s ease;
    }

    .mobile-step-arrow:hover {
        background: var(--hbs-primary);
        color: #fff;
    }

    .mobile-step-dots {
        display: flex;
        gap: 8px;
        align-items: center;
    }

.mobile-step-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: #e2e8f0;
        transition: background .25s ease, width .25s ease;
        cursor: pointer;
        border: none;
        padding: 0;
        display: block;
    }

    .mobile-step-dot.active {
        background: var(--hbs-secondary);
        width: 26px;
        border-radius: 10px;
    }

    .how__panel-link { text-align: center; }

    .tab-content-grid { grid-template-columns: 1fr; }

    .service-tab {
        flex-direction: column;
        gap: .25rem;
        padding: .85rem .5rem;
        font-size: .82rem;
    }

    .service-tab span { line-height: 1.2; }

    .services-tab-contents { min-height: 0; }
}

@media (max-width: 480px) {
    .service-tab i { font-size: .9rem; }
}

/* ───────────── Footer ───────────── */
.hbs-footer { background: #0f172a; color: #cbd5e1; padding: 3.5rem 0 max(1.5rem, env(safe-area-inset-bottom)); margin-top: 4rem; }
.hbs-footer__grid {
    display: grid; gap: 2rem;
    grid-template-columns: 1.4fr repeat(3, 1fr);
}
.hbs-footer__brand img { width: 46px; margin-bottom: 1rem; }
.hbs-footer__brand p { font-size: .95rem; line-height: 1.6; }
.hbs-footer h4 { color: #fff; margin-bottom: .8rem; font-size: 1rem; letter-spacing: .04em; }
.hbs-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .45rem; }
.hbs-footer a { color: #cbd5e1; text-decoration: none; transition: color .15s ease; }
.hbs-footer a:hover { color: var(--hbs-accent); }
.hbs-footer__bottom {
    margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid rgba(255, 255, 255, .1);
    display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    font-size: .85rem; color: #94a3b8;
}
@media (max-width: 880px) {
    .hbs-footer__grid { grid-template-columns: 1fr 1fr; }
}

/* ───────────── Auth (login/registro/doctor login) ───────────── */
.auth-screen { background: #f1f5f9; }
.auth-grid {
    min-height: 100vh; display: grid;
    grid-template-columns: 1.1fr 1fr;
}
.auth-grid--register { grid-template-columns: 1fr 1.15fr; }
.auth-aside {
    position: relative; padding: 2.5rem; color: #fff;
    background-size: cover; background-position: center; background-color: var(--hbs-primary-dark);
    display: flex; flex-direction: column; justify-content: space-between;
    overflow: hidden;
}
.auth-aside::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(11, 69, 127, .85), rgba(46, 184, 203, .55));
}
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside__brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.auth-aside__brand img { width: 42px; }
.auth-aside__copy h2 { font-size: clamp(1.6rem, 2.5vw, 2.4rem); letter-spacing: -.01em; }
.auth-aside__copy p { opacity: .92; margin-top: .6rem; }
.auth-aside__bullets { list-style: none; padding: 0; margin-top: 1.5rem; display: flex; flex-direction: column; gap: .7rem; }
.auth-aside__bullets i { color: var(--hbs-accent); margin-right: .4rem; }

.auth-panel {
    padding: 2.5rem clamp(1.5rem, 4vw, 3rem);
    display: flex; flex-direction: column; justify-content: center;
    background: #fff; min-height: 100vh;
}
.auth-panel--wide { padding: 2rem clamp(1.5rem, 4vw, 4rem); }
.auth-panel--doctor { background: #fff; }
.auth-panel__back {
    align-self: flex-start; color: var(--hbs-muted);
    text-decoration: none; margin-bottom: 1.5rem; font-size: .9rem;
}
.auth-panel__back i { margin-right: .3rem; }
.auth-panel__header { margin-bottom: 1.5rem; }
.auth-panel__header h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -.01em; }
.auth-panel__header p { color: var(--hbs-muted); margin-top: .3rem; }
.auth-panel__alt { margin-top: 1.2rem; color: var(--hbs-muted); font-size: .9rem; }
.auth-panel__alt a { color: var(--hbs-primary); font-weight: 600; }

.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-form--two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem; }
.auth-form__field { display: flex; flex-direction: column; gap: .35rem; }
.auth-form__field--full { grid-column: 1 / -1; }
.auth-form__label { font-weight: 600; font-size: .9rem; color: var(--hbs-text); display: flex; align-items: center; gap: .4rem; }
.auth-form__field input,
.auth-form__field select,
.auth-form__field textarea {
    border: 1px solid var(--hbs-border); padding: .85rem 1rem; border-radius: 12px;
    font: inherit; transition: border-color .15s ease, box-shadow .15s ease;
    background: #fff; color: var(--hbs-text);
}
.auth-form__field input:focus,
.auth-form__field select:focus,
.auth-form__field textarea:focus {
    outline: none; border-color: var(--hbs-primary);
    box-shadow: 0 0 0 4px rgba(16, 94, 166, .12);
}
.auth-form__phone { display: flex; align-items: stretch; border: 1px solid var(--hbs-border); border-radius: 12px; overflow: hidden; }
.auth-form__phone input { border: none; flex: 1; }
.auth-form__phonePrefix {
    padding: .85rem 1rem; background: rgba(16, 94, 166, .08);
    color: var(--hbs-primary-dark); font-weight: 600;
}
.auth-form__password { position: relative; }
.auth-form__password input { width: 100%; padding-right: 3rem; }
.auth-form__toggle {
    position: absolute; right: .4rem; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: var(--hbs-muted);
    padding: .4rem .6rem;
}
.auth-form__hint { padding: .8rem 1rem; border-radius: 12px; font-size: .9rem; }
.auth-form__hint.is-error { background: rgba(239, 68, 68, .1); color: var(--hbs-danger); }
.auth-form__hint.is-info { background: rgba(46, 184, 203, .12); color: var(--hbs-primary-dark); }
.auth-form__hint.is-ok { background: rgba(16, 185, 129, .12); color: var(--hbs-success); }
.auth-form__resend { background: none; border: none; color: var(--hbs-primary); cursor: pointer; font-weight: 600; }
.auth-form__step h2 { font-size: 1.2rem; margin-bottom: .25rem; }
.auth-form__step p { color: var(--hbs-muted); font-size: .9rem; }

.auth-otp { display: flex; gap: .55rem; justify-content: space-between; }
.auth-otp__cell {
    width: 48px; height: 56px; text-align: center; font-size: 1.4rem;
    border: 1px solid var(--hbs-border); border-radius: 12px; background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}
.auth-otp__cell:focus {
    outline: none; border-color: var(--hbs-primary);
    box-shadow: 0 0 0 4px rgba(16, 94, 166, .15);
    transform: translateY(-1px);
}

.auth-otp--modal4 {
    gap: .65rem;
    justify-content: center;
    max-width: 280px;
    margin: 0 auto 1rem;
}
.auth-otp--modal4 .auth-otp__cell {
    width: 56px;
    height: 60px;
    font-size: 1.55rem;
    font-weight: 700;
}

body.auth-otp-open {
    overflow: hidden;
}

.auth-otp-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}
.auth-otp-modal.is-open {
    display: flex;
}
.auth-otp-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .52);
    backdrop-filter: blur(4px);
}
.auth-otp-modal__card {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    background: #fff;
    border-radius: 18px;
    padding: 1.65rem 1.35rem 1.35rem;
    box-shadow: 0 24px 48px rgba(15, 23, 42, .18);
    text-align: center;
}
.auth-otp-modal__x {
    position: absolute;
    top: .65rem;
    right: .65rem;
    border: none;
    background: rgba(15, 23, 42, .06);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    color: var(--hbs-muted);
    display: grid;
    place-items: center;
    transition: background .15s ease, color .15s ease;
}
.auth-otp-modal__x:hover {
    background: rgba(15, 23, 42, .1);
    color: var(--hbs-text);
}
.auth-otp-modal__title {
    font-size: 1.22rem;
    margin: 0 0 .35rem;
    letter-spacing: -.02em;
}
.auth-otp-modal__text {
    color: var(--hbs-muted);
    font-size: .9rem;
    margin: 0 0 1.15rem;
    line-height: 1.45;
}
.auth-otp-modal__form {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}
.auth-otp-modal__hint {
    margin: 0;
}

@media (max-width: 880px) {
    .auth-grid, .auth-grid--register { grid-template-columns: 1fr; }
    .auth-aside { min-height: 220px; }
    .auth-form--two { grid-template-columns: 1fr; }
}

/* ───────────── Alta institucional /registro (glassmorphism iOS) ───────────── */
.dr-register-shell {
    position: relative;
    min-height: 100vh;
    padding: clamp(1.25rem, 4vw, 3.5rem) 0 clamp(2rem, 6vw, 4rem);
    background: linear-gradient(135deg, #eff6ff 0%, #f1f5f9 50%, #ecfeff 100%);
    overflow: hidden;
    color: var(--hbs-text);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Poppins', system-ui, sans-serif;
}
.dr-register-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.dr-register-bg__blob {
    position: absolute; border-radius: 50%;
    filter: blur(80px); opacity: .55; mix-blend-mode: lighten;
    animation: dr-blob 14s ease-in-out infinite;
}
.dr-register-bg__blob--a { top: -120px; left: -80px; width: 380px; height: 380px;
    background: radial-gradient(circle at 30% 30%, #66a8ff, transparent 60%);
}
.dr-register-bg__blob--b { bottom: -120px; right: -100px; width: 460px; height: 460px;
    background: radial-gradient(circle at 70% 70%, #5be0d4, transparent 65%);
    animation-delay: -5s;
}
.dr-register-bg__blob--c { top: 40%; left: 55%; width: 280px; height: 280px;
    background: radial-gradient(circle, #f3a7ff, transparent 60%);
    animation-delay: -9s;
}
@keyframes dr-blob {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(20px, -30px, 0) scale(1.07); }
}

.dr-register {
    position: relative;
    width: min(960px, 92vw);
    margin: 0 auto;
    z-index: 1;
}

.dr-register__head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; margin-bottom: 1.4rem;
}
.dr-register__back, .dr-register__alt {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .55rem .85rem; border-radius: 999px;
    background: rgba(255, 255, 255, .55);
    border: 1px solid rgba(255, 255, 255, .65);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    color: var(--hbs-primary-dark); font-weight: 600; text-decoration: none;
    font-size: .88rem; transition: transform .2s ease, background .2s ease;
}
.dr-register__back:hover, .dr-register__alt:hover { transform: translateY(-1px); background: rgba(255, 255, 255, .8); }
.dr-register__brand {
    display: inline-flex; align-items: center; gap: .55rem;
    color: var(--hbs-primary-dark); text-decoration: none; font-weight: 700;
}
.dr-register__brand img { width: 32px; height: 32px; border-radius: 8px; }

.dr-register__intro {
    text-align: center; margin: 0 auto 1.75rem; max-width: 620px;
    padding: 0 .5rem;
}
.dr-register__eyebrow {
    display: inline-block; padding: .35rem .85rem; border-radius: 999px;
    background: rgba(16, 94, 166, .12); color: var(--hbs-primary-dark);
    font-size: .78rem; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; margin-bottom: .6rem;
}
.dr-register__intro h1 {
    font-size: clamp(1.7rem, 3.2vw, 2.4rem);
    letter-spacing: -.025em; margin-bottom: .5rem;
}
.dr-register__intro p { color: var(--hbs-muted); font-size: 1rem; line-height: 1.55; }

.dr-register__intro--compact { margin-bottom: 1rem; }
.dr-register__intro--compact h1 {
    font-size: clamp(1.35rem, 4vw, 1.85rem);
    margin-bottom: .35rem;
}
.dr-register__intro--compact p { font-size: .9rem; line-height: 1.45; }

.dr-register__hint--stepper { margin: .5rem 0 0; width: 100%; text-align: center; }

.dr-stepper {
    background: rgba(255, 255, 255, .48);
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: 28px;
    padding: clamp(1rem, 3vw, 1.75rem);
    backdrop-filter: blur(28px) saturate(165%);
    -webkit-backdrop-filter: blur(28px) saturate(165%);
    box-shadow:
        0 22px 55px rgba(15, 23, 42, .11),
        inset 0 1px 0 rgba(255, 255, 255, .92);
}
.dr-stepper__top { text-align: center; margin-bottom: 1.15rem; }
.dr-stepper__step-label {
    font-size: .72rem; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--hbs-muted); margin: 0 0 .35rem;
}
.dr-stepper__title {
    font-size: clamp(1.12rem, 2.8vw, 1.42rem); margin: 0 0 1rem;
    letter-spacing: -.02em; color: var(--hbs-primary-dark);
}
.dr-stepper__track {
    height: 6px; border-radius: 999px;
    background: rgba(15, 23, 42, .08);
    overflow: hidden; margin-bottom: .85rem;
}
.dr-stepper__fill {
    height: 100%; width: 20%; border-radius: inherit;
    background: linear-gradient(90deg, var(--hbs-primary), var(--hbs-secondary));
    transition: width .48s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 0 14px rgba(46, 184, 203, .4);
}
.dr-stepper__dots {
    display: flex; justify-content: center; gap: .45rem; flex-wrap: wrap;
}
.dr-stepper__dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(15, 23, 42, .18);
    transition: transform .28s ease, background .28s ease, box-shadow .28s ease;
}
.dr-stepper__dot.is-active {
    background: var(--hbs-primary); transform: scale(1.12);
    box-shadow: 0 0 0 4px rgba(16, 94, 166, .18);
}
.dr-stepper__dot.is-done { background: rgba(46, 184, 203, .85); }

.dr-stepper__viewport {
    overflow: hidden;
    border-radius: 22px;
    margin-bottom: .85rem;
    touch-action: pan-y pinch-zoom;
}
.dr-stepper__slides {
    display: flex;
    align-items: flex-start;
    transition: transform .52s cubic-bezier(0.32, 0.72, 0, 1);
    will-change: transform;
}
.dr-step-slide {
    flex: 0 0 100%; min-width: 100%;
    padding: .15rem .35rem .85rem;
    box-sizing: border-box;
}
.dr-step-slide .dr-card { margin-bottom: 0; }

.dr-stepper__footer { padding-top: .15rem; }
.dr-stepper__actions {
    display: flex; gap: .65rem; align-items: stretch;
    flex-wrap: wrap;
}
.dr-stepper__actions .dr-btn { flex: 1; min-width: 128px; }
.dr-stepper__skip-login {
    display: block; text-align: center; margin-top: .85rem;
    font-size: .88rem; color: var(--hbs-muted); text-decoration: none;
}
.dr-stepper__skip-login:hover { color: var(--hbs-primary-dark); text-decoration: underline; }

.dr-upload.is-busy { opacity: .55; pointer-events: none; }

.dr-register__form {
    display: flex; flex-direction: column; gap: 1.1rem;
}

.dr-card {
    background: rgba(255, 255, 255, .58);
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 24px;
    padding: clamp(1rem, 2.5vw, 1.6rem);
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    box-shadow:
        0 16px 40px rgba(15, 23, 42, .08),
        inset 0 1px 0 rgba(255, 255, 255, .85);
    transition: transform .2s ease, box-shadow .2s ease;
}
.dr-card:hover { transform: translateY(-1px); box-shadow: 0 20px 50px rgba(15, 23, 42, .1); }
.dr-card--terms { padding: 1rem 1.2rem; }

.dr-card__head {
    display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem;
}
.dr-card__head > i {
    width: 42px; height: 42px; border-radius: 14px;
    display: grid; place-items: center; flex-shrink: 0;
    background: linear-gradient(135deg, rgba(102, 168, 255, .25), rgba(91, 224, 212, .25));
    color: var(--hbs-primary-dark); font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, .85);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}
.dr-card__head h2 { font-size: 1.05rem; margin: 0 0 .15rem; letter-spacing: -.01em; }
.dr-card__head p { color: var(--hbs-muted); margin: 0; font-size: .85rem; }

.dr-badge {
    display: inline-block; padding: .15rem .55rem;
    font-size: .7rem; font-weight: 700; border-radius: 999px;
    letter-spacing: .04em; text-transform: uppercase;
    margin-left: .4rem; vertical-align: middle;
}
.dr-badge--soft { background: rgba(46, 184, 203, .15); color: var(--hbs-primary-dark); }

.dr-card__grid {
    display: grid; gap: .9rem 1rem;
    grid-template-columns: 1fr 1fr;
}
.dr-card__grid--two { grid-template-columns: 1fr 1fr; }

.dr-field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.dr-field--full { grid-column: 1 / -1; }
.dr-field > span,
.dr-field__label {
    font-size: .85rem; font-weight: 600; color: var(--hbs-text); letter-spacing: -.005em;
}
.dr-field > span small,
.dr-field__label small { color: var(--hbs-muted); font-weight: 500; margin-left: .25rem; }
.dr-field input,
.dr-field select,
.dr-field textarea {
    width: 100%; min-height: 44px; padding: .65rem .9rem;
    border-radius: 14px; border: 1px solid rgba(15, 23, 42, .08);
    background: rgba(255, 255, 255, .85);
    font: inherit; font-size: .95rem; color: var(--hbs-text);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
    appearance: none; -webkit-appearance: none;
}
.dr-field select { padding-right: 2.4rem; background-image:
    linear-gradient(45deg, transparent 50%, var(--hbs-muted) 50%),
    linear-gradient(135deg, var(--hbs-muted) 50%, transparent 50%);
    background-position: calc(100% - 18px) 56%, calc(100% - 12px) 56%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}
.dr-field select[multiple] {
    background-image: none; min-height: 110px; padding: .55rem .8rem;
}
.dr-field input:focus,
.dr-field select:focus,
.dr-field textarea:focus {
    outline: none; border-color: rgba(16, 94, 166, .55);
    box-shadow: 0 0 0 4px rgba(102, 168, 255, .25);
    background: #fff;
}
.dr-field input::placeholder { color: rgba(15, 23, 42, .35); }
.dr-field__hint { color: var(--hbs-muted); font-size: .78rem; line-height: 1.45; }
.dr-field__hint kbd {
    background: rgba(15, 23, 42, .08); border-radius: 6px;
    padding: .05rem .35rem; font-size: .72rem;
}

.dr-phone {
    display: flex; align-items: stretch; min-height: 44px;
    border-radius: 14px; border: 1px solid rgba(15, 23, 42, .08);
    background: rgba(255, 255, 255, .85);
    overflow: hidden;
}
.dr-phone__cc {
    display: grid; place-items: center; padding: 0 .85rem;
    background: rgba(16, 94, 166, .1); color: var(--hbs-primary-dark);
    font-weight: 700; font-size: .9rem;
}
.dr-phone input { border: none; padding: .65rem .85rem; flex: 1; background: transparent; }

.dr-date-input {
    display: flex;
    align-items: stretch;
    min-height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, .08);
    background: rgba(255, 255, 255, .85);
    overflow: hidden;
}
.dr-date-input i {
    display: grid;
    place-items: center;
    padding: 0 .85rem;
    background: rgba(16, 94, 166, .08);
    color: var(--hbs-primary-dark);
    font-size: 1rem;
}
.dr-date-input input[type="date"] {
    flex: 1;
    min-height: 44px;
    border: none;
    padding: .65rem .85rem;
    background: transparent;
    font: inherit;
    font-size: .95rem;
    color: var(--hbs-text);
}
.dr-date-input input[type="date"]:focus {
    outline: none;
}
.dr-field--dob .dr-date-input:focus-within {
    border-color: rgba(16, 94, 166, .55);
    box-shadow: 0 0 0 4px rgba(102, 168, 255, .25);
    background: #fff;
}

.dr-subspec__empty {
    margin: .25rem 0 0;
    font-size: .84rem;
    color: var(--hbs-muted);
    line-height: 1.45;
}
.dr-subspec__chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .45rem;
}
.dr-subspec-chip {
    border: 1px solid rgba(15, 23, 42, .12);
    background: rgba(255, 255, 255, .82);
    border-radius: 999px;
    padding: .42rem .95rem;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: -.01em;
    color: var(--hbs-muted);
    cursor: pointer;
    transition:
        background .18s ease,
        border-color .18s ease,
        color .18s ease,
        box-shadow .18s ease,
        transform .12s ease;
}
.dr-subspec-chip:hover {
    border-color: rgba(16, 94, 166, .35);
    color: var(--hbs-text);
    transform: translateY(-1px);
}
.dr-subspec-chip.is-on {
    background: linear-gradient(135deg, rgba(16, 94, 166, .14), rgba(46, 184, 203, .18));
    border-color: rgba(16, 94, 166, .42);
    color: var(--hbs-primary-dark);
    box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
}

.dr-segment__group {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem;
    padding: .3rem; background: rgba(15, 23, 42, .05); border-radius: 14px;
    margin-top: .35rem;
}
.dr-segment__group label {
    position: relative; cursor: pointer;
}
.dr-segment__group input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dr-segment__group label > span {
    display: flex; align-items: center; justify-content: center; gap: .35rem;
    padding: .55rem .65rem; border-radius: 11px;
    font-size: .85rem; font-weight: 600; color: var(--hbs-muted);
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.dr-segment__group label > span i { font-size: .75rem; }
.dr-segment__group input:checked + span {
    background: #fff; color: var(--hbs-primary-dark);
    box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
}
.dr-segment__group input:focus-visible + span { outline: 2px solid rgba(102, 168, 255, .55); outline-offset: 1px; }

.dr-note {
    display: flex; align-items: flex-start; gap: .7rem;
    padding: .85rem 1rem; border-radius: 16px;
    background: rgba(46, 184, 203, .12);
    border: 1px solid rgba(46, 184, 203, .25);
    color: var(--hbs-primary-dark);
}
.dr-note i { margin-top: .2rem; }
.dr-note p { margin: 0; font-size: .85rem; line-height: 1.5; color: inherit; }
.dr-note strong { color: var(--hbs-primary-dark); }

.dr-upload {
    position: relative; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: .5rem; padding: 1.4rem 1rem;
    border-radius: 18px; border: 1.5px dashed rgba(15, 23, 42, .15);
    background: rgba(255, 255, 255, .55);
    text-align: center; cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .15s ease;
}
.dr-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dr-upload__icon {
    width: 44px; height: 44px; border-radius: 50%;
    display: grid; place-items: center; background: rgba(16, 94, 166, .1);
    color: var(--hbs-primary-dark); font-size: 1rem;
}
.dr-upload strong { font-size: .9rem; }
.dr-upload__hint { font-size: .78rem; color: var(--hbs-muted); }
.dr-upload.is-drop, .dr-upload.is-filled {
    border-color: rgba(46, 184, 203, .55);
    background: rgba(46, 184, 203, .12);
}

.dr-check {
    display: flex; align-items: flex-start; gap: .7rem;
    font-size: .9rem; line-height: 1.5; color: var(--hbs-text); cursor: pointer;
}
.dr-check input {
    width: 22px; height: 22px; border-radius: 7px;
    border: 1.5px solid rgba(15, 23, 42, .25); appearance: none;
    -webkit-appearance: none; cursor: pointer; flex-shrink: 0; margin-top: .15rem;
    transition: border-color .15s ease, background .15s ease;
    background: #fff;
}
.dr-check input:checked {
    background:
        linear-gradient(135deg, var(--hbs-primary), var(--hbs-secondary)) padding-box,
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center / 14px no-repeat;
    border-color: transparent;
}
.dr-check a { color: var(--hbs-primary); font-weight: 600; }

.dr-register__hint {
    padding: .85rem 1rem; border-radius: 14px; font-size: .9rem;
    border: 1px solid transparent; backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.dr-register__hint.is-error { background: rgba(239, 68, 68, .12); color: #b91c1c; border-color: rgba(239, 68, 68, .25); }
.dr-register__hint.is-info { background: rgba(46, 184, 203, .12); color: var(--hbs-primary-dark); border-color: rgba(46, 184, 203, .25); }
.dr-register__hint.is-ok { background: rgba(16, 185, 129, .14); color: #047857; border-color: rgba(16, 185, 129, .3); }

.dr-register__actions {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap; margin-top: .25rem;
}
.dr-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .85rem 1.4rem; border-radius: 999px; font-weight: 600;
    cursor: pointer; text-decoration: none; font-size: .95rem;
    border: none; transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
    min-height: 44px;
}
.dr-btn--primary {
    background: linear-gradient(135deg, var(--hbs-primary) 0%, var(--hbs-secondary) 100%);
    color: #fff;
    box-shadow: 0 14px 30px rgba(16, 94, 166, .35);
}
.dr-btn--primary:hover { transform: translateY(-1px); box-shadow: 0 18px 36px rgba(16, 94, 166, .42); }
.dr-btn--primary.is-loading { opacity: .65; pointer-events: none; }
.dr-btn--ghost {
    background: rgba(255, 255, 255, .65);
    color: var(--hbs-primary-dark);
    border: 1px solid rgba(255, 255, 255, .85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.dr-btn--ghost:hover { background: rgba(255, 255, 255, .9); }

@media (max-width: 720px) {
    .dr-register__head { flex-wrap: wrap; }
    .dr-card__grid,
    .dr-card__grid--two { grid-template-columns: 1fr; }
    .dr-segment__group { grid-template-columns: 1fr; }
    .dr-segment__group label > span { padding: .65rem .8rem; justify-content: flex-start; }
    .dr-register__actions { flex-direction: column-reverse; align-items: stretch; }
    .dr-btn { width: 100%; }
    .dr-stepper__actions { flex-direction: column; }
    .dr-stepper__actions .dr-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .dr-register-bg__blob { animation: none; }
    .dr-stepper__slides,
    .dr-stepper__fill { transition-duration: 0.01ms !important; }
}

/* ───────────── Buscar (público) ───────────── */
.search { padding: 3rem 0 5rem; }
.search__filters {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .8rem; align-items: end; padding: 1.2rem; border-radius: var(--hbs-radius);
    background: #fff; border: 1px solid var(--hbs-border); margin-bottom: 1.5rem;
}
.search__field { display: flex; flex-direction: column; gap: .35rem; }
.search__field label { font-weight: 600; font-size: .85rem; color: var(--hbs-text); }
.search__field input,
.search__field select {
    padding: .65rem .8rem; border-radius: 10px; border: 1px solid var(--hbs-border);
    background: #fff; font: inherit;
}
.search__results {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}
.search__empty {
    padding: 3rem 1.5rem; text-align: center;
    background: #fff; border-radius: var(--hbs-radius); border: 1px dashed var(--hbs-border);
    grid-column: 1 / -1;
    color: var(--hbs-muted);
}
.search__empty i { font-size: 1.8rem; display: block; margin-bottom: .6rem; color: var(--hbs-secondary); }

.doctor-card {
    background: #fff; border: 1px solid var(--hbs-border); border-radius: var(--hbs-radius);
    padding: 1.2rem; display: grid;
    grid-template-columns: 64px 1fr; grid-template-rows: auto auto;
    gap: 1rem; align-items: center;
    transition: transform .18s ease, box-shadow .18s ease;
    animation: hbs-pop-in .25s ease both;
}
.doctor-card:hover { transform: translateY(-3px); box-shadow: var(--hbs-shadow-md); }
.doctor-card__avatar {
    width: 64px; height: 64px; border-radius: 50%;
    background: linear-gradient(135deg, var(--hbs-primary), var(--hbs-secondary)); color: #fff;
    display: grid; place-items: center; font-weight: 700;
}
.doctor-card__name { font-size: 1.05rem; }
.doctor-card__specialty { color: var(--hbs-secondary); font-weight: 600; font-size: .9rem; }
.doctor-card__institution { color: var(--hbs-muted); font-size: .85rem; }
.doctor-card__meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; font-size: .8rem; color: var(--hbs-muted); }
.doctor-card__actions { grid-column: 1 / -1; display: flex; gap: .5rem; justify-content: flex-end; }

/* ───────────── Clinicas ───────────── */
.clinics { padding: 3rem 0 5rem; }
.clinics__grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}
.clinics__loading { color: var(--hbs-muted); }
.clinic-card {
    background: #fff; border: 1px solid var(--hbs-border); border-radius: var(--hbs-radius);
    padding: 1.4rem; display: flex; flex-direction: column; gap: .6rem;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    animation: hbs-pop-in .25s ease both;
}
.clinic-card:hover { transform: translateY(-3px); box-shadow: var(--hbs-shadow-md); border-color: rgba(46, 184, 203, .35); }
.clinic-card__icon {
    width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
    background: linear-gradient(135deg, rgba(16, 94, 166, .12), rgba(46, 184, 203, .14));
    color: var(--hbs-primary-dark);
}
.clinic-card__cta { align-self: flex-start; margin-top: .4rem; }

/* ───────────── Especialista ───────────── */
.doctor-profile { padding: 3rem 0 5rem; }
.doctor-profile__row { display: grid; grid-template-columns: 320px 1fr; gap: 2rem; }
.doctor-profile__card {
    background: #fff; border-radius: var(--hbs-radius); padding: 1.6rem;
    border: 1px solid var(--hbs-border); text-align: center;
    box-shadow: var(--hbs-shadow-sm);
}
.doctor-profile__avatar {
    width: 110px; height: 110px; border-radius: 50%;
    background: linear-gradient(135deg, var(--hbs-primary), var(--hbs-secondary)); color: #fff;
    display: grid; place-items: center; font-size: 2.2rem; margin: 0 auto 1rem;
}
.doctor-profile__info { list-style: none; padding: 0; margin-top: 1rem; display: flex; flex-direction: column; gap: .4rem; color: var(--hbs-muted); font-size: .9rem; }
.doctor-profile__main { background: #fff; border-radius: var(--hbs-radius); padding: 1.6rem; border: 1px solid var(--hbs-border); }
.doctor-profile__days { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.doctor-profile__day {
    padding: .55rem .9rem; border-radius: 999px; border: 1px solid var(--hbs-border);
    background: #fff; cursor: pointer; font-size: .9rem;
    transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.doctor-profile__day:hover { transform: translateY(-1px); }
.doctor-profile__day.is-active {
    background: var(--hbs-primary); color: #fff; border-color: var(--hbs-primary);
}
.doctor-profile__slots {
    display: grid; gap: .5rem;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    margin-bottom: 1.2rem;
}
.doctor-profile__slot {
    padding: .65rem; border-radius: 10px; border: 1px solid var(--hbs-border);
    background: #fff; cursor: pointer; text-align: center;
    transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.doctor-profile__slot:hover { transform: translateY(-1px); border-color: var(--hbs-secondary); }
.doctor-profile__slot.is-active { background: var(--hbs-primary); color: #fff; border-color: var(--hbs-primary); }
.doctor-profile__slot:disabled { opacity: .4; cursor: not-allowed; }
.doctor-profile__empty { color: var(--hbs-muted); padding: 2rem 1rem; text-align: center; }

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

/* ───────────── 404 ───────────── */
.not-found { padding: 5rem 0; }
.not-found__inner { text-align: center; max-width: 560px; margin: 0 auto; }
.not-found__code {
    display: inline-block; font-size: 6rem; font-weight: 800; line-height: 1;
    background: linear-gradient(135deg, var(--hbs-primary), var(--hbs-secondary));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.not-found__actions { display: flex; gap: .8rem; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════════════════════════════════
   Responsive global — mobile-first polish (safe areas, overflow, touch targets)
   ═══════════════════════════════════════════════════════════════════════════ */

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.medicuan-body {
    overflow-x: hidden;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.hbs-navbar.is-scrolled {
    box-shadow: 0 8px 24px -12px rgba(15, 23, 42, .12);
}

.hbs-navbar__hamburger {
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: .6rem;
}

.hbs-navbar__mobile {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

html.hbs-nav-open,
html.hbs-nav-open body {
    overflow: hidden;
}

.hbs-container {
    width: min(1200px, calc(100vw - max(1rem, env(safe-area-inset-left)) - max(1rem, env(safe-area-inset-right))));
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
}

.medicuan-main {
    min-height: calc(100vh - min(520px, 70vh));
}

/* Hero / secciones — menos padding en pantallas chicas */
@media (max-width: 640px) {
    .hero { padding: 2.25rem 0 2rem; }
    .hero__row { gap: 2rem; }
    .hero__copyBlock p { font-size: 1rem; }
    .features { padding: 2.5rem 0; }
    .cta.signup-tabs { padding: 0; }
    .section__header h1, .section__header h2 {
        font-size: clamp(1.45rem, 6vw, 2rem);
    }
    .search { padding: 2rem 0 3rem; }
    .clinics { padding: 2rem 0 3rem; }
    .doctor-profile { padding: 2rem 0 3rem; }
    .not-found { padding: 3rem 0; }
    .not-found__code { font-size: clamp(3rem, 18vw, 6rem); }
}

@media (max-width: 480px) {
    .hbs-navbar__row { padding: .65rem 0; gap: .6rem; }
    .hbs-navbar__brandText { font-size: 1.05rem; }
}

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

/* Footer — una columna en móvil estrecho */
@media (max-width: 600px) {
    .hbs-footer__grid {
        grid-template-columns: 1fr;
    }
    .hbs-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
}

/* Auth — panel usable en teclado virtual / pantallas cortas */
@media (max-width: 880px) {
    .auth-panel {
        min-height: auto;
        padding-top: max(1.25rem, env(safe-area-inset-top));
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }
    .auth-aside {
        min-height: min(40vh, 280px);
        padding: 1.25rem max(1rem, env(safe-area-inset-left)) 1.25rem max(1rem, env(safe-area-inset-right));
    }
}

@media (max-width: 480px) {
    .auth-otp {
        flex-wrap: wrap;
        justify-content: center;
        gap: .4rem;
    }
    .auth-otp__cell {
        width: 42px;
        height: 50px;
        font-size: 1.15rem;
        flex: 0 0 calc((100% - 5 * 0.4rem) / 6);
        max-width: 52px;
    }
}

/* Buscar — filtros en columna y botón ancho completo */
@media (max-width: 520px) {
    .search__filters {
        grid-template-columns: 1fr;
    }
    .search__filters .hbs-btn {
        width: 100%;
        justify-content: center;
    }
}

.search__results {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

/* Tarjetas doctor — acciones apiladas en XS */
@media (max-width: 400px) {
    .doctor-card {
        grid-template-columns: 56px 1fr;
    }
    .doctor-card__avatar {
        width: 56px;
        height: 56px;
        font-size: .95rem;
    }
    .doctor-card__actions {
        flex-direction: column;
        align-items: stretch;
    }
    .doctor-card__actions .hbs-btn {
        width: 100%;
        justify-content: center;
    }
}

.doctor-profile__slots {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 76px), 1fr));
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    .hero__phone { animation: none; transform: none; }
}
