/* LeadYa authentication shell — public website character with NEW_LEADYA tokens. */

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

body {
    background: var(--ld-ink, #14122b);
}

.main-content.auth-page {
    position: relative;
    isolation: isolate;
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: clamp(6rem, 10vh, 8rem) clamp(1.25rem, 5vw, 5rem) clamp(2rem, 5vh, 4rem);
    color: var(--ld-text, #1a1d2e);
    background:
        linear-gradient(135deg, var(--ld-ink, #14122b) 0%, var(--ld-brand, #6c4cf1) 70%, var(--ld-brand-hover, #5a3bd8) 100%);
}

.auth-page__glow {
    position: absolute;
    z-index: -1;
    width: min(42rem, 72vw);
    aspect-ratio: 1;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(2px);
    opacity: 0.34;
}

.auth-page__glow--top {
    top: -24rem;
    right: -12rem;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0));
}

.auth-page__glow--bottom {
    bottom: -30rem;
    left: -12rem;
    background: radial-gradient(circle, var(--ld-accent, #ffc24b), rgba(255, 194, 75, 0));
}

.auth-brand {
    position: absolute;
    top: 1.5rem;
    left: clamp(1.25rem, 5vw, 5rem);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 24px rgba(20, 18, 43, 0.14);
}

.auth-brand img {
    display: block;
    width: clamp(7.5rem, 12vw, 9.5rem);
    height: auto;
}

.auth-brand:focus-visible,
.language-dropdown-toggle:focus-visible,
.tab-item:focus-visible,
.promotion-btn:focus-visible,
.auth-primary-button:focus-visible,
.auth-form a:focus-visible {
    outline: none;
    box-shadow: var(--ld-focus-ring, 0 0 0 3px rgba(108, 76, 241, 0.28));
}

.auth-layout {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(70rem, 100%);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 28rem), 1fr));
    align-items: start;
    gap: clamp(1.25rem, 3vw, 2rem);
}

.auth-form-panel,
.auth-tutorial-panel {
    width: 100%;
    max-width: 32rem;
    justify-self: center;
}

.auth-card,
.tutorial-item {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.64);
    border-radius: 20px;
    background: var(--ld-surface, #ffffff);
    box-shadow: 0 20px 50px rgba(20, 18, 43, 0.2);
}

.tab-navigation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    padding: 0.45rem;
    border-bottom: 1px solid var(--ld-border, #e6e8f0);
    background: var(--ld-bg, #f6f7fb);
}

.tab-item {
    min-height: 2.75rem;
    padding: 0.65rem 0.75rem;
    border: 0;
    border-radius: 9px;
    color: var(--ld-text-muted, #667085);
    background: transparent;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.tab-active {
    color: #ffffff;
    background: var(--ld-brand, #6c4cf1);
}

.tab-clickable {
    cursor: pointer;
}

.tab-clickable:hover {
    color: var(--ld-brand, #6c4cf1);
    background: var(--ld-brand-soft, #f1edfe);
}

.tab-clickable:active {
    transform: translateY(1px);
}

.auth-form {
    margin: 0;
}

.auth-card__body {
    padding: clamp(1.5rem, 4vw, 2.25rem);
}

.auth-card__title {
    margin: 0 0 1.25rem;
    color: var(--ld-text, #1a1d2e);
    font-size: clamp(1.45rem, 3vw, 1.8rem);
    font-weight: 760;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.registration-flow-help {
    margin: -0.25rem 0 1.5rem;
    padding: 0.8rem 0.9rem;
    border-left: 3px solid var(--ld-brand, #6c4cf1);
    border-radius: 0 9px 9px 0;
    color: var(--ld-text-muted, #667085);
    background: var(--ld-brand-soft, #f1edfe);
    font-size: 0.9rem;
    line-height: 1.5;
}

.registration-field-help {
    display: block;
    margin-top: 0.4rem;
    color: var(--ld-text-muted, #667085);
    font-size: 0.78rem;
    line-height: 1.4;
}

.auth-card .form-group {
    margin-bottom: 1.05rem;
}

.auth-card label {
    margin-bottom: 0.4rem;
    color: var(--ld-text, #1a1d2e);
    font-size: 0.88rem;
    font-weight: 650;
}

.auth-card .form-control {
    min-height: 3rem;
    border: 1px solid var(--ld-border, #e6e8f0);
    border-radius: 10px;
    color: var(--ld-text, #1a1d2e);
    background: var(--ld-surface, #ffffff);
    box-shadow: none;
    font-size: 1rem;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.auth-card .form-control:hover {
    border-color: var(--ld-text-muted, #667085);
}

.auth-card .form-control:focus {
    border-color: var(--ld-brand, #6c4cf1);
    box-shadow: var(--ld-focus-ring, 0 0 0 3px rgba(108, 76, 241, 0.28));
}

.auth-card .iti {
    width: 100%;
}

.auth-card__actions {
    margin-top: 1.35rem;
}

.auth-primary-button {
    width: 100%;
    min-height: 3.15rem;
    border: 1px solid var(--ld-brand, #6c4cf1);
    border-radius: 10px;
    color: #ffffff;
    background: var(--ld-brand, #6c4cf1);
    font-size: 1rem;
    font-weight: 750;
    box-shadow: 0 8px 18px rgba(108, 76, 241, 0.2);
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.auth-primary-button:hover,
.auth-primary-button:active {
    border-color: var(--ld-brand-hover, #5a3bd8);
    color: #ffffff;
    background: var(--ld-brand-hover, #5a3bd8);
}

.auth-primary-button:hover {
    transform: translateY(-1px);
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.auth-checkbox input,
.privacy-policy-checkbox input[type="checkbox"] {
    flex: 0 0 auto;
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
    accent-color: var(--ld-brand, #6c4cf1);
    cursor: pointer;
}

.auth-checkbox label {
    margin: 0;
    cursor: pointer;
}

.auth-form__error {
    display: block;
    padding: 0.75rem 0.85rem;
    border: 1px solid #fecaca;
    border-radius: 9px;
    color: #b42318;
    background: #fef3f2;
    font-size: 0.88rem;
}

.auth-form a,
.policy-link,
.promotion-btn {
    color: var(--ld-brand, #6c4cf1);
    font-weight: 650;
}

.auth-form a:hover,
.policy-link:hover,
.promotion-btn:hover {
    color: var(--ld-brand-hover, #5a3bd8);
}

.promotion-btn {
    display: inline-flex;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 0.88rem;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.privacy-policy-container {
    margin: 0.2rem 0;
    padding: 0.85rem;
    border: 1px solid var(--ld-border, #e6e8f0);
    border-radius: 10px;
    background: var(--ld-bg, #f6f7fb);
}

.privacy-policy-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
}

.privacy-policy-checkbox .form-check-input {
    position: static;
    margin-top: 0.15rem;
    margin-left: 0;
}

.privacy-policy-checkbox .form-check-label {
    margin: 0;
}

.policy-text {
    display: block;
    color: var(--ld-text-muted, #667085);
    font-size: 0.86rem;
    font-weight: 450;
    line-height: 1.45;
}

.g-recaptcha {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.auth-card .alert {
    margin: 1rem 1rem 0;
    border-radius: 10px;
    font-size: 0.88rem;
}

.auth-card__body > .alert {
    margin: 0 0 1rem;
}

.simple-tutorial-container,
.tutorial-column-wrapper {
    display: grid;
    gap: 1rem;
    width: 100%;
}

.tutorial-item {
    padding: clamp(1.35rem, 3vw, 2rem);
}

.tutorial-title {
    margin: 0 0 1rem;
    color: var(--ld-text, #1a1d2e);
    font-size: 1.1rem;
    font-weight: 720;
    line-height: 1.35;
}

.tutorial-video {
    margin-bottom: 1rem;
}

.video-wrapper {
    position: relative;
    height: 0;
    overflow: hidden;
    padding-bottom: 56.25%;
    border-radius: 10px;
    background: var(--ld-ink, #14122b);
}

.video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.tutorial-description {
    color: var(--ld-text-muted, #667085);
    font-size: 0.92rem;
    line-height: 1.6;
}

.tutorial-description > :last-child {
    margin-bottom: 0;
}

.language-selector-container {
    position: fixed;
    top: 1.5rem;
    right: clamp(1.25rem, 5vw, 5rem);
    z-index: 1050;
}

.language-selector {
    position: relative;
}

.language-dropdown-toggle {
    display: flex;
    min-height: 2.75rem;
    align-items: center;
    padding: 0.55rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 12px;
    color: var(--ld-text, #1a1d2e);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 24px rgba(20, 18, 43, 0.14);
    cursor: pointer;
    text-decoration: none;
}

.language-dropdown-toggle:hover {
    color: var(--ld-brand, #6c4cf1);
    text-decoration: none;
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    display: none;
    min-width: 12rem;
    max-height: min(25rem, 70vh);
    overflow-y: auto;
    padding: 0.35rem;
    border: 1px solid var(--ld-border, #e6e8f0);
    border-radius: 12px;
    background: var(--ld-surface, #ffffff);
    box-shadow: 0 16px 36px rgba(20, 18, 43, 0.18);
}

.language-dropdown.show {
    display: block;
}

.language-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.7rem;
    border-radius: 8px;
    color: var(--ld-text, #1a1d2e);
    font-size: 0.88rem;
}

.language-dropdown .dropdown-item:hover {
    color: var(--ld-brand, #6c4cf1);
    background: var(--ld-brand-soft, #f1edfe);
}

.flag-icon {
    width: 1.25rem;
    height: auto;
}

@media (max-width: 48rem) {
    .main-content.auth-page {
        align-items: flex-start;
        padding: 5.5rem 1rem 1.5rem;
        overflow-y: auto;
    }

    .auth-brand {
        top: 1rem;
        left: 1rem;
        min-height: 2.5rem;
        padding: 0.45rem 0.7rem;
    }

    .auth-brand img {
        width: 7rem;
    }

    .language-selector-container {
        top: 1rem;
        right: 1rem;
    }

    .language-dropdown-toggle {
        min-height: 2.5rem;
        padding: 0.45rem 0.65rem;
    }

    .auth-card,
    .tutorial-item {
        border-radius: 16px;
    }

    .auth-card__body {
        padding: 1.4rem;
    }

    .tab-item {
        min-height: 2.65rem;
        font-size: 0.84rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tab-item,
    .auth-primary-button,
    .auth-card .form-control {
        transition: none;
    }
}
