/* ============================================================
   auth-banner.css
   Free-trial banner component + all responsive / media queries
   ============================================================ */

/* ===== FREE TRIAL BANNER ===== */
.trial-banner {
    --trial-card-height: 220px;
    --trial-doctor-height: calc(var(--trial-card-height) * 1.14);
    --trial-doctor-space: calc(var(--trial-card-height) * 0.76);
    --trial-doctor-right: -26px;
    --trial-doctor-bottom: -2px;
    display: block;
    overflow: visible;
    margin-bottom: 20px;
    text-decoration: none;
    position: relative;
    transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-height: var(--trial-card-height);
}

.trial-banner:hover {
    transform: translateY(-3px) scale(1.005);
}

.trial-banner-card {
    background: linear-gradient(135deg, #0a2e42 0%, #1D4E63 45%, #1a6b8a 100%);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    min-height: var(--trial-card-height);
    box-shadow:
        0 8px 32px rgba(29, 78, 99, 0.40),
        0 2px 8px rgba(29, 78, 99, 0.20),
        inset 0 1px 0 rgba(255,255,255,0.10);
    border: 1px solid rgba(255, 255, 255, 0.10);
    transition: box-shadow 0.24s ease;
}

.trial-banner:hover .trial-banner-card {
    box-shadow:
        0 16px 44px rgba(29, 78, 99, 0.50),
        0 4px 12px rgba(29, 78, 99, 0.28),
        inset 0 1px 0 rgba(255,255,255,0.12);
}

/* Animated gradient mesh background */
.trial-bg-mesh {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        radial-gradient(ellipse 60% 80% at 20% 30%, rgba(77, 216, 240, 0.10) 0%, transparent 70%),
        radial-gradient(ellipse 40% 60% at 85% 70%, rgba(224, 48, 48, 0.08) 0%, transparent 60%);
    animation: meshDrift 8s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

.trial-bg-pulse {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(77, 216, 240, 0.04) 0%, transparent 70%);
    animation: bgPulse 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes meshDrift {
    0%   { opacity: 0.7; transform: scale(1) translateX(0); }
    100% { opacity: 1;   transform: scale(1.06) translateX(5px); }
}
@keyframes bgPulse {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 1;   }
}

/* Top section */
.trial-banner-top {
    display: block;
    position: relative;
    width: 100%;
    min-height: inherit;
    z-index: 1;
}

/* Text column */
.trial-banner-text {
    padding: 16px 16px 16px 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 6px;
    width: calc(100% - var(--trial-doctor-space));
    position: relative;
    z-index: 2;
}

/* Badge pill */
.trial-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e03030;
    color: #fff;
    font-size: 0.50rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding: 3px 8px 3px 6px;
    border-radius: 20px;
    width: fit-content;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(224, 48, 48, 0.45);
    margin-bottom: 1px;
    align-self: flex-start;
}

/* Headline */
.trial-headline {
    font-family: 'Sora', 'Inter', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin: 0;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.trial-headline strong {
    font-family: 'Sora', 'Inter', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: #4dd8f0;
    display: inline;
    line-height: 0.85;
    vertical-align: middle;
    text-shadow: 0 0 20px rgba(77, 216, 240, 0.40);
}

/* Subtitle */
.trial-subtitle {
    font-size: 0.61rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.45;
    margin: 0;
}

/* Trust row */
.trial-trust {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 3px;
    width: min(100%, 270px);
    max-width: 270px;
    overflow: hidden;
    animation: trustFadeIn 0.6s ease 0.2s both;
    white-space: nowrap;
    mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
    align-self: flex-start;
}

.trial-trust-track {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    min-width: max-content;
    animation: trialTrustMarquee 14s linear infinite;
}

@keyframes trustFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.trial-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.trial-trust-icon {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    color: rgba(77, 216, 240, 0.90);
}

.trial-trust-item span {
    font-size: 0.50rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.78);
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.trial-trust-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255,255,255,0.30);
    flex-shrink: 0;
    display: inline-block;
}

@keyframes trialTrustMarquee {
    from { transform: translateX(0); }
    to   { transform: translateX(calc(-100% - 14px)); }
}

/* CTA wrap */
.trial-cta-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    margin-top: 6px;
}

.trial-trust-line {
    font-size: 0.50rem;
    color: rgba(255,255,255,0.45);
    font-weight: 500;
    letter-spacing: 0.02em;
    padding-left: 2px;
}

/* =======================================================
   FANCY CTA BUTTON – adapted from uiverse.io marcelodolza
   Colours: red/coral theme (no purple)
   ======================================================= */
.trial-cta-btn {
    --w:  #fff5f5;
    --r1: #ffb3b3;
    --r2: #ff6b6b;
    --r3: #f05050;
    --r4: #d93535;
    --r5: #a82828;
    --radius: 14px;

    border-radius: var(--radius);
    outline: none;
    cursor: pointer;
    font-size: 13px;
    font-family: 'Sora', 'Inter', sans-serif;
    background: transparent;
    letter-spacing: -0.5px;
    border: 0;
    position: relative;
    width: 190px;
    height: 46px;
    transform: none;
    flex-shrink: 0;
}

.tcta-bg {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    filter: blur(1px);
}
.tcta-bg::before,
.tcta-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: calc(var(--radius) * 1.1);
    background: var(--r5);
}
.tcta-bg::before {
    filter: blur(4px);
    transition: all 0.3s ease;
    box-shadow:
        -5px 5px 0 0 rgba(169, 40, 40, 0.40),
        -10px 10px 0 0 rgba(169, 40, 40, 0.28),
        -16px 15px 4px 0 rgba(169, 40, 40, 0.18),
        -22px 20px 8px 0 rgba(169, 40, 40, 0.10),
        -28px 25px 12px 0 rgba(169, 40, 40, 0.06);
}

.tcta-wrap {
    border-radius: inherit;
    overflow: hidden;
    height: 100%;
    transform: translate(4px, -4px);
    padding: 2px;
    background: linear-gradient(to bottom, var(--r1) 0%, var(--r4) 100%);
    position: relative;
    transition: all 0.3s ease;
}

.tcta-outline {
    position: absolute;
    overflow: hidden;
    inset: 0;
    opacity: 0;
    outline: none;
    border-radius: inherit;
    transition: all 0.4s ease;
}
.tcta-outline::before {
    content: "";
    position: absolute;
    inset: 2px;
    width: 100px;
    height: 260px;
    margin: auto;
    background: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.85) 50%, transparent 100%);
    animation: tctaSpin 3s linear infinite;
    animation-play-state: paused;
}

.tcta-content {
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    position: relative;
    height: 100%;
    gap: 12px;
    padding: 0 18px;
    border-radius: calc(var(--radius) * 0.85);
    font-weight: 700;
    transition: all 0.3s ease;
    background: linear-gradient(to bottom, var(--r3) 0%, var(--r4) 100%);
    box-shadow:
        inset -2px 10px 10px -5px var(--r2),
        inset 1px -3px 10px 0px rgba(0, 0, 0, 0.30);
}
.tcta-content::before {
    content: "";
    inset: 0;
    position: absolute;
    z-index: 10;
    width: 75%;
    top: 45%;
    bottom: 30%;
    opacity: 0.6;
    margin: auto;
    background: linear-gradient(to bottom, transparent, var(--r4));
    filter: brightness(1.3) blur(5px);
}

/* SVG path border */
.tcta-path {
    position: absolute;
    z-index: 12;
    bottom: 0;
    left: 0;
    right: 0;
    stroke-dasharray: 150 480;
    stroke-dashoffset: 150;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

/* Splash SVG */
.tcta-splash {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    stroke-dasharray: 60 60;
    stroke-dashoffset: 60;
    transform: translate(-17%, -31%);
    stroke: var(--r2);
    width: 342px;
    height: 208px;
}

/* Animated characters */
.tcta-char {
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    letter-spacing: 0;
    white-space: nowrap;
}
.tcta-char span {
    display: block;
    color: transparent;
    position: relative;
}
.tcta-char.state-1 span { animation: tctaCharAppear 1.2s ease backwards calc(var(--i) * 0.03s); }
.tcta-char.state-1 span::before,
.tcta-char span::after {
    content: attr(data-label);
    position: absolute;
    color: var(--w);
    text-shadow: -1px 1px 2px var(--r5);
    left: 0;
}
.tcta-char span::before { opacity: 0; transform: translateY(-100%); }
/* Arrow icon */
.tcta-icon {
    animation: tctaResetArrow 0.8s cubic-bezier(0.7, -0.5, 0.3, 1.2) forwards;
    z-index: 10;
}
.tcta-icon div,
.tcta-icon div::before,
.tcta-icon div::after {
    height: 2px;
    border-radius: 1px;
    background-color: var(--w);
}
.tcta-icon div::before,
.tcta-icon div::after {
    content: "";
    position: absolute;
    right: 0;
    transform-origin: center right;
    width: 10px;
    border-radius: 15px;
    transition: all 0.3s ease;
}
.tcta-icon div {
    position: relative;
    width: 18px;
    box-shadow: -2px 2px 4px var(--r4);
    transform: scale(0.9);
    background: linear-gradient(to bottom, var(--w), var(--r1));
    animation: tctaSwingArrow 1s ease-in-out infinite;
    animation-play-state: paused;
}
.tcta-icon div::before {
    transform: rotate(44deg);
    top: 1px;
    box-shadow: 1px -2px 2px -1px var(--r4);
    animation: tctaRotateLine1 1s linear infinite;
    animation-play-state: paused;
}
.tcta-icon div::after {
    bottom: 1px;
    transform: rotate(316deg);
    box-shadow: -2px 2px 2px 0 var(--r4);
    background: linear-gradient(200deg, var(--w), var(--r1));
    animation: tctaRotateLine2 1s linear infinite;
    animation-play-state: paused;
}

/* Hover states */
.trial-banner:hover .trial-cta-btn .tcta-wrap,
.trial-cta-btn:hover .tcta-wrap {
    transform: translate(6px, -6px);
}
.trial-banner:hover .trial-cta-btn .tcta-outline,
.trial-cta-btn:hover .tcta-outline {
    opacity: 1;
}
.trial-banner:hover .trial-cta-btn .tcta-outline::before,
.trial-cta-btn:hover .tcta-outline::before,
.trial-banner:hover .trial-cta-btn .tcta-icon div,
.trial-cta-btn:hover .tcta-icon div,
.trial-banner:hover .trial-cta-btn .tcta-icon div::before,
.trial-cta-btn:hover .tcta-icon div::before,
.trial-banner:hover .trial-cta-btn .tcta-icon div::after,
.trial-cta-btn:hover .tcta-icon div::after {
    animation-play-state: running;
}
.trial-banner:hover .tcta-char.state-1 span::before { animation: tctaCharAppear 0.7s ease calc(var(--i) * 0.03s); }
.trial-banner:hover .tcta-char.state-1 span::after  { opacity: 1; animation: tctaCharDisappear 0.7s ease calc(var(--i) * 0.03s); }

/* Doctor image */
.trial-doctor-img {
    position: absolute;
    right: var(--trial-doctor-right);
    bottom: var(--trial-doctor-bottom);
    width: auto;
    height: var(--trial-doctor-height);
    object-fit: contain;
    object-position: bottom right;
    filter: drop-shadow(0 4px 18px rgba(0,0,0,0.28));
    pointer-events: none;
    z-index: 5;
}

@keyframes doctorFloat {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-4px); }
}

/* =========================
   KEYFRAMES (button)
   ========================= */
@keyframes tctaSpin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes tctaCharAppear {
    0%   { transform: translateY(50%);  opacity: 0; filter: blur(12px); }
    20%  { transform: translateY(70%);  opacity: 1; }
    50%  { transform: translateY(-10%); opacity: 1; filter: blur(0); }
    100% { transform: translateY(0);    opacity: 1; }
}
@keyframes tctaCharDisappear {
    0%   { transform: translateY(0);    opacity: 1; }
    100% { transform: translateY(-70%); opacity: 0; filter: blur(3px); }
}
@keyframes tctaSwingArrow  { 50% { transform: translateX(4px) scale(0.9); } }
@keyframes tctaRotateLine1 { 50% { transform: rotate(30deg); } 80% { transform: rotate(55deg); } }
@keyframes tctaRotateLine2 { 50% { transform: rotate(330deg); } 80% { transform: rotate(300deg); } }
@keyframes tctaResetArrow  { 0% { transform: translateX(-100px); } 100% { transform: translateX(0); } }

/* ============================================================
   RESPONSIVE QUERIES
   ============================================================ */

/* Tall desktop, short viewport (< 760px tall) */
@media (min-width: 1025px) and (max-height: 760px) {
    .auth-form-panel  { padding: 20px 40px; }
    .auth-form-header { margin-bottom: 14px; }
    .form-group       { margin-bottom: 8px; }
    .form-input       { height: 36px; }
    .btn-signin       { height: 36px; }
    .btn-social       { height: 36px; }
    .auth-divider     { margin: 10px 0; }
    .auth-footer      { margin-top: 10px; }
    .trial-banner     { --trial-card-height: 195px; margin-bottom: 14px; }
    .trial-cta-btn    { width: 161px; height: 42px; font-size: 12px; }
}

/* Medium desktop / short viewport */
@media (min-width: 1025px) and (max-height: 680px) {
    .trial-banner       { --trial-card-height: 162px; }
    .trial-banner-text  { padding: 10px 10px 10px 14px; gap: 4px; }
    .trial-headline     { font-size: 0.92rem; white-space: nowrap; }
    .trial-headline strong { font-size: 1.85rem; }
    .trial-subtitle     { display: none; }
    .trial-cta-btn      { width: 154px; height: 38px; font-size: 11px; }
    .trial-cta-wrap     { gap: 3px; }
    .trial-trust-line   { display: none; }
    .form-group         { margin-bottom: 6px; }
    .auth-footer        { margin-top: 8px; }
}

/* Tablet portrait: 768-1024px */
@media (min-width: 768px) and (max-width: 1024px) {
    html, body { height: 100vh; overflow: hidden; background: var(--bg-color); }

    .auth-container { flex-direction: column; height: 100vh; min-height: 100vh; overflow: hidden; }

    .auth-brand-panel {
        width: 100%;
        flex-shrink: 0;
        min-height: 0;
        padding: 14px 48px 40px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        border-radius: 0 0 40px 40px;
        position: relative;
        z-index: 2;
    }

    .wave-layer { display: none; }

    .brand-content {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 18px;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    .brand-welcome { display: none; }
    .brand-logo-wrap { padding: 4px 20px; margin-bottom: 0; flex-shrink: 0; }
    .brand-logo { height: 80px; width: auto; object-fit: contain; }
    .brand-name-block { display: flex; flex-direction: column; align-items: flex-start; }
    .brand-name {
        display: block;
        font-size: 1.5rem; font-weight: 800;
        color: white; letter-spacing: 0.04em; text-transform: uppercase;
    }
    .brand-description { display: none; }
    .brand-footer { display: none; }

    .auth-form-panel {
        width: 100%;
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 16px 40px 10px;
        margin-top: -20px;
        background: var(--bg-color);
        position: relative;
        z-index: 1;
        overflow: hidden;
    }
    .auth-form-wrapper {
        width: 100%;
        max-width: 520px;
        overflow: hidden;
        background: var(--card-bg);
        border-radius: 20px;
        padding: 18px 24px 12px;
        box-shadow: 0 4px 24px rgba(0,0,0,0.07);
        margin-top: 4px;
    }
    .auth-form-header { margin-bottom: 16px; }
    .mobile-footer-links { display: none !important; }

    .trial-banner {
        --trial-card-height: 168px;
        --trial-doctor-height: calc(var(--trial-card-height) * 1.14);
        --trial-doctor-space: calc(var(--trial-card-height) * 0.76);
        --trial-doctor-right: -18px;
        --trial-doctor-bottom: -2px;
        overflow: visible;
    }
    .trial-banner-card { border-radius: 18px; }
    .trial-banner-text { width: calc(100% - var(--trial-doctor-space)); padding: 14px 12px 12px 16px; }
    .trial-headline    { font-size: 0.92rem; white-space: nowrap; }
    .trial-headline strong { font-size: 1.82rem; }
    .trial-subtitle    { font-size: 0.57rem; max-width: 30ch; }
    .trial-trust       { row-gap: 4px; }
    .trial-cta-wrap    { width: 100%; }
    .trial-cta-btn     { width: min(72%, 230px); height: 38px; font-size: 10px; }
    .tcta-content      { gap: 8px; padding: 0 12px; }
    .tcta-char         { font-size: 10px; }
    .trial-doctor-img  { z-index: 5; }
}

/* Tablet short viewport */
@media (min-width: 768px) and (max-width: 1024px) and (max-height: 700px) {
    .auth-brand-panel  { padding: 8px 48px 24px; }
    .brand-logo        { height: 56px; }
    .auth-form-panel   { padding: 10px 40px 6px; margin-top: -20px; }
    .auth-form-wrapper { padding: 12px 22px 8px; margin-top: 2px; }
    .auth-form-header  { margin-bottom: 12px; }
    .form-group        { margin-bottom: 6px; }
    .form-input        { height: 34px; font-size: 0.83rem; }
    .btn-signin        { height: 34px; font-size: 0.83rem; }
    .btn-social        { height: 34px; font-size: 0.83rem; }
    .auth-divider      { margin: 6px 0; }
    .social-buttons    { gap: 6px; }
    .auth-footer       { margin-top: 6px; font-size: 0.75rem; }
    .trial-banner      { --trial-card-height: 148px; --trial-doctor-right: -12px; margin-bottom: 10px; }
    .trial-subtitle    { display: none; }
    .trial-cta-btn     { width: min(68%, 210px); height: 34px; font-size: 9px; }
}

/* Mobile: <= 767px */
@media (max-width: 767px) {
    html, body { height: auto; min-height: 100vh; overflow-x: hidden; overflow-y: auto; background: var(--bg-color); }

    .auth-container { flex-direction: column; height: auto; min-height: 100vh; overflow-x: hidden; overflow-y: visible; }

    .auth-brand-panel {
        width: 100%;
        flex-shrink: 0;
        min-height: 0;
        padding: 8px 24px 24px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        border-radius: 0 0 40px 40px;
        position: relative;
        z-index: 2;
    }
    .wave-layer { display: none; }

    .brand-content {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 14px;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
    .brand-welcome  { display: none; }
    .brand-logo-wrap {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        padding: 4px 16px;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    .brand-logo       { height: 72px; width: auto; min-width: 0; object-fit: contain; display: block; }
    .brand-name-block { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
    .brand-name {
        display: block;
        font-size: 1.35rem; font-weight: 800; margin-bottom: 0;
        line-height: 1; color: white; letter-spacing: 0.04em;
        text-transform: uppercase; opacity: 0.95;
    }
    .brand-description { display: none; }
    .brand-footer      { display: none; }

    .auth-form-panel {
        width: 100%;
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 16px 14px 10px;
        margin-top: -20px;
        background: var(--bg-color);
        position: relative;
        z-index: 1;
        overflow: visible;
    }
    .auth-form-wrapper {
        width: 100%;
        max-width: 100%;
        overflow: visible;
        background: var(--card-bg);
        border-radius: 20px;
        padding: 18px 18px 14px;
        box-shadow: 0 4px 24px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
        margin-top: 8px;
    }
    .auth-form-header  { margin-bottom: 14px; }
    .auth-form-header h2 { font-size: 1.1rem; font-weight: 700; }

    .mobile-footer-links {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 14px;
        margin-top: 14px;
        padding-bottom: 8px;
    }
    .mobile-footer-links a {
        font-size: 0.6rem; font-weight: 700; color: var(--text-muted);
        text-decoration: none; letter-spacing: 0.1em;
        transition: var(--transition); padding: 8px 4px;
    }
    .mobile-footer-links a:hover { color: var(--primary-color); }
    .mobile-footer-links .footer-dot { width: 3px; height: 3px; background: var(--border-color); border-radius: 50%; }

    .form-group    { margin-bottom: 8px; }
    .form-input    { height: 38px; font-size: 0.85rem; }
    .iti__selected-flag { height: 38px !important; }
    .btn-signin    { height: 38px; font-size: 0.85rem; border-radius: 10px; margin-top: 2px; }
    .auth-divider  { margin: 9px 0; }
    .social-buttons{ gap: 8px; }
    .btn-social    { width: 100%; height: 38px; }
    .auth-footer   { margin-top: 10px; font-size: 0.75rem; }

    .trial-banner      {
        --trial-card-height: 150px;
        --trial-doctor-height: calc(var(--trial-card-height) * 1.14);
        --trial-doctor-space: calc(var(--trial-card-height) * 0.76);
        --trial-doctor-right: -16px;
        --trial-doctor-bottom: -2px;
        margin-bottom: 14px;
        overflow: visible;
    }
    .trial-banner-card { border-radius: 14px; }
    .trial-banner-text { width: calc(100% - var(--trial-doctor-space)); padding: 12px 12px 10px 14px; gap: 5px; }
    .trial-headline    { font-size: 0.82rem; white-space: nowrap; line-height: 1.1; }
    .trial-headline strong { font-size: 1.65rem; }
    .trial-subtitle    { font-size: 0.5rem; line-height: 1.3; max-width: 18ch; }
    .trial-trust       { row-gap: 2px; }
    .trial-cta-wrap    { width: 100%; }
    .trial-cta-btn     { width: 100%; height: 38px; font-size: 9px; }
    .tcta-content      { gap: 6px; padding: 0 8px; }
    .tcta-char         { font-size: 9px; }
    .tcta-wrap         { transform: translate(3px, -3px); }
    .trial-doctor-img  { z-index: 5; }
}

/* Mobile short height */
@media (max-width: 767px) and (max-height: 650px) {
    .auth-form-header  { margin-bottom: 10px; }
    .form-group        { margin-bottom: 6px; }
    .form-options      { margin-bottom: 8px; }
    .auth-divider      { margin: 6px 0; }
    .social-buttons    { gap: 6px; }
    .auth-footer       { margin-top: 6px; }
    .mobile-footer-links { margin-top: 8px; padding-bottom: 4px; }
    .trial-banner      {
        --trial-card-height: 132px;
        --trial-doctor-height: calc(var(--trial-card-height) * 1.14);
        --trial-doctor-space: calc(var(--trial-card-height) * 0.76);
        --trial-doctor-right: -12px;
    }
    .trial-banner-text { width: calc(100% - var(--trial-doctor-space)); padding: 8px 8px 8px 12px; gap: 2px; }
    .trial-subtitle    { display: none; }
    .trial-cta-btn     { height: 34px; font-size: 9px; }
    .tcta-content      { padding: 0 8px; gap: 6px; }
    .tcta-char         { font-size: 9px; }
}

/* Mid-size mobile (500-767px) */
@media (min-width: 500px) and (max-width: 767px) {
    .auth-form-panel   { align-items: center; }
    .auth-form-wrapper { max-width: 460px; }
}

/* Extra-small mobile */
@media (max-width: 500px) {
    .auth-brand-panel  { min-height: 100px; padding: 8px 20px 28px; }
    .brand-logo        { height: 70px; width: auto; }
    .brand-name        { font-size: 1.2rem; }
    .auth-form-panel   { padding: 24px 16px 16px; }
    .auth-form-wrapper { padding: 18px 16px 14px; }
    .trial-headline    { font-size: 0.88rem; }
    .trial-cta-btn     { width: 100%; }
}

/* Phone landscape */
@media (orientation: landscape) and (max-height: 500px) {
    html, body { height: auto; min-height: 100%; overflow-x: hidden; overflow-y: auto; }
    .auth-container { flex-direction: row !important; height: auto; min-height: 100vh; overflow-x: hidden; overflow-y: visible; }

    .auth-brand-panel {
        width: 36% !important; flex-shrink: 0;
        padding: 16px 24px !important;
        border-radius: 0 !important; min-height: 0 !important;
        justify-content: center; align-items: center;
    }
    .wave-layer { display: block !important; }

    .brand-content {
        flex-direction: column !important;
        align-items: center !important;
        gap: 6px; width: auto; max-width: 180px; text-align: center;
    }
    .brand-welcome   { display: none; }
    .brand-logo-wrap { padding: 6px 12px; margin-bottom: 0; }
    .brand-logo      { height: 85px !important; }
    .brand-name-block{ display: flex; flex-direction: column; align-items: center; }
    .brand-description { display: none; }
    .brand-footer    { display: none; }

    .auth-form-panel {
        flex: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 10px 24px !important;
        margin-top: 0 !important;
        background: var(--bg-color);
        overflow: visible;
    }
    .auth-form-wrapper {
        width: 100%; max-width: 400px;
        overflow: visible;
        background: var(--card-bg);
        border-radius: 16px;
        padding: 14px 20px 10px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.08);
        margin-top: 0 !important;
    }
    .auth-form-header  { margin-bottom: 8px; }
    .auth-form-header h2 { font-size: 1rem; }
    .form-group        { margin-bottom: 5px; }
    .form-label        { font-size: 0.7rem; margin-bottom: 3px; }
    .form-input        { height: 32px !important; font-size: 0.8rem; }
    .iti__selected-flag{ height: 32px !important; }
    .btn-signin        { height: 32px !important; font-size: 0.8rem; margin-top: 2px; }
    .btn-social        { height: 32px !important; font-size: 0.8rem; }
    .form-options      { margin-bottom: 8px; }
    .custom-checkbox   { font-size: 0.7rem; }
    .auth-divider      { margin: 5px 0; }
    .social-buttons    { gap: 5px; }
    .auth-footer       { margin-top: 6px; font-size: 0.7rem; }
    .powered-badge     { font-size: 0.65rem; bottom: 10px; }
    .powered-badge strong { font-size: 0.68rem; }
    .mobile-footer-links { display: none !important; }

    .trial-banner      {
        --trial-card-height: 122px;
        --trial-doctor-height: calc(var(--trial-card-height) * 1.14);
        --trial-doctor-space: calc(var(--trial-card-height) * 0.76);
        --trial-doctor-right: -10px;
        margin-bottom: 8px;
        overflow: visible;
    }
    .trial-banner-text { width: calc(100% - var(--trial-doctor-space)); padding: 10px 10px 10px 14px; }
    .trial-subtitle    { display: none; }
    .trial-trust       { display: none !important; }
    .trial-cta-btn     { height: 32px; font-size: 9px; width: 100%; }
    .tcta-content      { padding: 0 8px; gap: 6px; }
    .tcta-char         { font-size: 9px; }
    .trial-doctor-img  { z-index: 5; }
    .trial-trust-line  { display: none; }
}

/* Desktop overrides to prevent CTA from being clipped on wide screens */
@media (min-width: 1025px) {
    .trial-banner-card {
        max-width: 520px;
        margin: 0 auto;
        box-sizing: border-box;
        padding-right: 12px; /* give some breathing room for the doctor image */
    }

    .trial-cta-wrap {
        width: 100%;
        display: flex;
        justify-content: flex-start;
    }

    .trial-cta-btn {
        width: 100%;
        max-width: 280px; /* allow CTA to scale but not overflow */
        margin: 12px 0 0 0;
        display: block;
        box-sizing: border-box;
    }

    /* Reduce left offset of splash SVG so it doesn't overflow container edge */
    .tcta-splash {
        transform: translate(-5%, -25%);
    }
}
