/* AKDORAT identity surface — intentionally scoped to authentication only. */
#authScreen {
    --auth-accent: #e87945;
    --auth-accent-rgb: 232, 121, 69;
    --auth-bg: #0a0f13;
    --auth-bg-soft: #0d1419;
    --auth-panel: #0e151a;
    --auth-text: #f4f6f8;
    --auth-text-soft: #9ba5ad;
    --auth-text-faint: #6f7b84;
    --auth-border: rgba(166, 181, 192, 0.2);
    --auth-border-strong: rgba(183, 197, 207, 0.31);
    --auth-input: rgba(7, 12, 16, 0.5);
    --auth-focus: rgba(var(--auth-accent-rgb), 0.18);
    --auth-shadow: rgba(0, 0, 0, 0.46);
    align-items: stretch !important;
    background: var(--auth-bg) !important;
    color: var(--auth-text);
    min-height: 100vh;
    min-height: 100dvh;
    overflow: auto;
    padding: 0 !important;
}

#authScreen[hidden] {
    display: none !important;
}

#authScreen[data-auth-theme="light"] {
    --auth-accent: #1459ed;
    --auth-accent-rgb: 20, 89, 237;
    --auth-bg: #f7f9fc;
    --auth-bg-soft: #f2f5fa;
    --auth-panel: #fbfcfe;
    --auth-text: #0b285b;
    --auth-text-soft: #556784;
    --auth-text-faint: #7d8ca5;
    --auth-border: rgba(45, 76, 126, 0.19);
    --auth-border-strong: rgba(37, 68, 119, 0.29);
    --auth-input: rgba(255, 255, 255, 0.9);
    --auth-focus: rgba(var(--auth-accent-rgb), 0.14);
    --auth-shadow: rgba(36, 66, 112, 0.12);
}

#authScreen > .dorat-auth-shell {
    animation: authReveal 0.55s cubic-bezier(.2, .7, .2, 1);
    background: var(--auth-bg) !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: grid;
    grid-template-columns: minmax(430px, 1.04fr) minmax(440px, .96fr);
    grid-template-rows: minmax(0, 1fr) 72px;
    margin: 0 auto;
    max-height: none !important;
    max-width: 1720px !important;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    padding: 0 !important;
    position: relative;
    width: 100% !important;
}

.dorat-auth-story {
    background:
        radial-gradient(circle at 68% 35%, rgba(var(--auth-accent-rgb), .055), transparent 31%),
        linear-gradient(145deg, rgba(255, 255, 255, .018), transparent 42%),
        var(--auth-bg);
    border-right: 1px solid var(--auth-border);
    min-height: 0;
    overflow: hidden;
    padding: clamp(38px, 5.2vw, 76px) clamp(38px, 5vw, 82px) 0;
    position: relative;
}

.dorat-auth-story::before {
    background: linear-gradient(90deg, transparent, rgba(var(--auth-accent-rgb), .9), transparent);
    content: "";
    height: 1px;
    left: 8%;
    opacity: .26;
    position: absolute;
    right: 8%;
    top: 0;
}

.dorat-auth-wordmark,
.dorat-auth-mobile-wordmark {
    color: var(--auth-text) !important;
    font-size: clamp(1.65rem, 2.35vw, 2.35rem);
    font-weight: 820;
    letter-spacing: -.055em;
    line-height: 1;
}

.dorat-auth-wordmark {
    display: inline-block;
    margin-bottom: clamp(66px, 10vh, 112px);
}

.dorat-auth-mobile-wordmark {
    display: none;
    font-size: 1.6rem;
}

.dorat-auth-copy {
    max-width: 570px;
    position: relative;
    z-index: 2;
}

#authScreen .dorat-auth-copy h1 {
    color: var(--auth-text) !important;
    font-size: clamp(2.55rem, 4.7vw, 4.7rem);
    font-weight: 650;
    letter-spacing: -.058em;
    line-height: 1.04;
    margin: 0;
}

.dorat-auth-copy h1 span {
    color: inherit;
}

.dorat-auth-copy .auth-accent-dot {
    color: var(--auth-accent) !important;
}

.dorat-auth-copy-line {
    background: var(--auth-accent);
    border-radius: 999px;
    height: 3px;
    margin: 28px 0 24px;
    width: 44px;
}

#authScreen .dorat-auth-copy p {
    color: var(--auth-text-soft) !important;
    font-size: clamp(.96rem, 1.2vw, 1.12rem);
    font-weight: 430;
    line-height: 1.7;
    margin: 0;
    max-width: 520px;
}

.dorat-auth-illustration {
    bottom: clamp(4px, 1.2vh, 18px);
    height: min(55vh, 560px);
    left: clamp(16px, 3vw, 58px);
    max-height: 56%;
    pointer-events: none;
    position: absolute;
    right: clamp(8px, 2.5vw, 48px);
}

.dorat-auth-illustration img {
    display: block;
    height: 100%;
    object-fit: contain;
    object-position: left bottom;
    width: 100%;
}

.dorat-auth-illustration .auth-illustration-light {
    display: none;
}

#authScreen[data-auth-theme="light"] .dorat-auth-illustration .auth-illustration-dark {
    display: none;
}

#authScreen[data-auth-theme="light"] .dorat-auth-illustration .auth-illustration-light {
    display: block;
}

.dorat-auth-entry {
    align-items: center;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .012), transparent 25%),
        var(--auth-panel);
    display: flex;
    justify-content: center;
    min-height: 0;
    overflow: auto;
    padding: clamp(44px, 7vh, 82px) clamp(38px, 6vw, 94px);
    position: relative;
}

.dorat-auth-entry::after {
    background: linear-gradient(180deg, transparent, rgba(var(--auth-accent-rgb), .35), transparent);
    content: "";
    height: 160px;
    opacity: .18;
    position: absolute;
    right: 0;
    top: 17%;
    width: 1px;
}

.dorat-auth-form-stage {
    max-width: 480px;
    width: 100%;
}

#authScreen form,
#authScreen #emailVerificationFormContainer,
#authScreen #passwordResetFormContainer {
    color: var(--auth-text);
    width: 100%;
}

#authScreen form h3,
#authScreen #emailVerificationFormContainer h3,
#authScreen #passwordResetFormContainer h3 {
    border: 0 !important;
    color: var(--auth-text) !important;
    display: block;
    font-size: 1.62rem;
    font-weight: 650;
    letter-spacing: -.035em;
    margin: 0 0 34px !important;
    padding: 0 0 17px !important;
    position: relative;
}

#authScreen form h3::after,
#authScreen #emailVerificationFormContainer h3::after,
#authScreen #passwordResetFormContainer h3::after {
    background: var(--auth-border-strong);
    bottom: 0;
    content: "";
    height: 1px;
    left: 0;
    position: absolute;
    width: 100%;
}

#authScreen .form-group {
    margin-bottom: 22px;
}

#authScreen .form-group label {
    color: var(--auth-text) !important;
    display: block;
    font-size: .91rem;
    font-weight: 580 !important;
    letter-spacing: -.01em;
    margin-bottom: 9px;
}

.auth-input-control {
    position: relative;
}

.auth-input-control > i {
    color: var(--auth-text-soft);
    font-size: 1rem;
    left: 17px;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

#authScreen input,
#authScreen select,
#authScreen textarea {
    background: var(--auth-input) !important;
    border: 1px solid var(--auth-border-strong) !important;
    border-radius: 7px !important;
    box-shadow: 0 8px 24px transparent;
    color: var(--auth-text) !important;
    font-size: .96rem;
    min-height: 54px;
    outline: none;
    padding: 0 16px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
    width: 100%;
}

#authScreen .auth-input-control input {
    padding-left: 50px;
    padding-right: 50px;
}

#authScreen input::placeholder,
#authScreen textarea::placeholder {
    color: var(--auth-text-faint) !important;
    opacity: 1;
}

#authScreen input:focus,
#authScreen select:focus,
#authScreen textarea:focus {
    background: var(--auth-input) !important;
    border-color: var(--auth-accent) !important;
    box-shadow: 0 0 0 4px var(--auth-focus), 0 15px 32px var(--auth-shadow) !important;
}

.auth-password-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--auth-text-soft);
    cursor: pointer;
    display: inline-flex;
    height: 46px;
    justify-content: center;
    position: absolute;
    right: 4px;
    top: 4px;
    width: 46px;
    z-index: 2;
}

.auth-password-toggle:hover {
    color: var(--auth-accent);
}

.auth-password-toggle:focus-visible,
.auth-theme-toggle:focus-visible,
.auth-language-button:focus-visible {
    outline: 3px solid var(--auth-focus);
    outline-offset: 2px;
}

.auth-remember-row {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin: -3px 0 29px;
}

#authScreen .auth-check {
    align-items: center;
    color: var(--auth-text-soft) !important;
    cursor: pointer;
    display: inline-flex !important;
    font-size: .91rem !important;
    font-weight: 450 !important;
    gap: 10px;
    margin: 0 !important;
}

#authScreen .auth-check span,
#authScreen .auth-divider span,
#authScreen .auth-switch-copy span,
#authScreen .auth-theme-toggle span {
    color: inherit;
}

#authScreen .auth-check input {
    accent-color: var(--auth-accent);
    appearance: none;
    background: transparent !important;
    border: 1px solid var(--auth-border-strong) !important;
    border-radius: 4px !important;
    display: inline-grid;
    height: 19px;
    min-height: 19px;
    padding: 0;
    place-content: center;
    width: 19px;
}

#authScreen .auth-check input::before {
    border: solid #fff;
    border-width: 0 2px 2px 0;
    content: "";
    height: 9px;
    opacity: 0;
    transform: rotate(45deg) translate(-1px, -1px);
    width: 4px;
}

#authScreen .auth-check input:checked {
    background: var(--auth-accent) !important;
    border-color: var(--auth-accent) !important;
}

#authScreen .auth-check input:checked::before {
    opacity: 1;
}

#authScreen .auth-primary-button,
#authScreen form > .btn {
    align-items: center;
    background: var(--auth-accent) !important;
    background: linear-gradient(135deg, var(--auth-accent), color-mix(in srgb, var(--auth-accent), #fff 16%)) !important;
    border: 0 !important;
    border-radius: 6px !important;
    box-shadow: 0 15px 34px rgba(var(--auth-accent-rgb), .18) !important;
    color: #fff !important;
    cursor: pointer;
    display: flex;
    font-size: 1rem;
    font-weight: 650;
    justify-content: center;
    min-height: 54px;
    padding: 0 22px !important;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
    width: 100%;
}

#authScreen .auth-primary-button:hover,
#authScreen form > .btn:hover {
    box-shadow: 0 18px 40px rgba(var(--auth-accent-rgb), .28) !important;
    filter: brightness(1.06);
    transform: translateY(-1px);
}

#authScreen .auth-primary-button:active,
#authScreen form > .btn:active {
    transform: translateY(0);
}

#authScreen .auth-primary-button:disabled,
#authScreen form > .btn:disabled {
    cursor: wait;
    filter: grayscale(.35);
    opacity: .68;
    transform: none;
}

.auth-divider {
    align-items: center;
    color: var(--auth-text-soft);
    display: grid;
    font-size: .87rem;
    gap: 16px;
    grid-template-columns: 1fr auto 1fr;
    margin: 27px 0 24px;
}

.auth-divider::before,
.auth-divider::after {
    background: var(--auth-border);
    content: "";
    height: 1px;
}

#authScreen .auth-secondary-link,
#authScreen .auth-switch-copy {
    color: var(--auth-text-soft) !important;
    font-size: .92rem;
    line-height: 1.6;
    margin: 0;
    text-align: center;
}

#authScreen .auth-secondary-link a,
#authScreen .auth-switch-copy a {
    color: var(--auth-accent) !important;
    font-weight: 560;
    text-decoration: none;
}

#authScreen .auth-secondary-link a:hover,
#authScreen .auth-switch-copy a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.auth-switch-copy {
    border-top: 1px solid var(--auth-border);
    margin-top: 25px !important;
    padding-top: 22px;
}

#authScreen .local-auth-hint {
    background: rgba(59, 130, 246, .08);
    border: 1px solid rgba(96, 165, 250, .25);
    border-radius: 7px;
    color: var(--auth-text-soft);
    margin: -18px 0 22px;
}

#authScreen #authAlert {
    background: rgba(239, 68, 68, .08);
    border: 1px solid rgba(248, 113, 113, .25);
    border-radius: 7px;
    color: #fca5a5;
    line-height: 1.45;
    margin-top: 18px !important;
    padding: 12px 14px;
    text-align: left;
}

#authScreen[data-auth-theme="light"] #authAlert {
    color: #b42318;
}

.dorat-auth-footer {
    align-items: center;
    background: var(--auth-bg);
    border-top: 1px solid var(--auth-border);
    color: var(--auth-text-soft);
    display: flex;
    grid-column: 1 / -1;
    justify-content: space-between;
    min-width: 0;
    padding: 0 clamp(28px, 3.8vw, 64px);
}

.auth-footer-start,
.auth-footer-end {
    align-items: center;
    display: flex;
    gap: 18px;
}

.auth-legal-links {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    justify-content: flex-end;
}

.auth-footer-separator {
    background: var(--auth-border-strong);
    height: 15px;
    width: 1px;
}

.auth-language-button,
.auth-theme-toggle {
    background: transparent;
    border: 0;
    color: var(--auth-text-soft);
    cursor: pointer;
    font-size: .84rem;
    min-height: 42px;
    padding: 0 3px;
    transition: color .18s ease;
}

.auth-language-button:hover,
.auth-language-button.is-active,
.auth-theme-toggle:hover {
    color: var(--auth-accent);
}

.auth-language-button.is-active {
    font-weight: 700;
}

.auth-theme-toggle {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.auth-footer-meta {
    color: var(--auth-text-soft);
    font-size: .82rem;
    min-height: 44px;
    text-decoration: none;
}

a.auth-footer-meta {
    align-items: center;
    display: inline-flex;
    transition: color .18s ease;
}

a.auth-footer-meta:hover,
a.auth-footer-meta:focus-visible {
    color: var(--auth-accent);
}

a.auth-footer-meta:focus-visible,
.digital-sale-consents a:focus-visible {
    border-radius: 4px;
    outline: 2px solid var(--auth-accent);
    outline-offset: 3px;
}

#authScreen .digital-sale-consents {
    border: 1px solid var(--auth-border);
    border-radius: 7px;
    display: grid;
    gap: 10px;
    margin: 16px 0 18px;
    padding: 14px 15px;
}

#authScreen .digital-sale-consents legend {
    color: var(--auth-text);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    padding: 0 6px;
    text-transform: uppercase;
}

#authScreen .digital-sale-consents .auth-check {
    align-items: flex-start;
    font-size: .82rem !important;
    line-height: 1.5;
    min-height: 44px;
    width: 100%;
}

#authScreen .digital-sale-consents .auth-check input {
    flex: 0 0 19px;
    margin-top: 2px;
}

#authScreen .digital-sale-consents a {
    color: var(--auth-accent);
    font-weight: 650;
}
}

.auth-mobile-controls {
    align-items: center;
    display: none;
    justify-content: space-between;
    margin-bottom: 34px;
}

.auth-visually-hidden {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

@keyframes authReveal {
    from { opacity: 0; transform: scale(.995); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 1100px) {
    #authScreen > .dorat-auth-shell {
        grid-template-columns: minmax(360px, .9fr) minmax(420px, 1.1fr);
    }

    .dorat-auth-story {
        padding-inline: 42px;
    }

    .dorat-auth-wordmark {
        margin-bottom: 72px;
    }

    .dorat-auth-illustration {
        left: 0;
        right: 0;
    }
}

@media (max-width: 820px) {
    #authScreen {
        display: block !important;
    }

    #authScreen > .dorat-auth-shell {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        min-height: 100dvh;
        overflow: visible;
    }

    .dorat-auth-story {
        border-bottom: 1px solid var(--auth-border);
        border-right: 0;
        min-height: auto;
        padding: max(28px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) 30px max(24px, env(safe-area-inset-left));
    }

    .dorat-auth-wordmark {
        margin-bottom: 42px;
    }

    #authScreen .dorat-auth-copy h1 {
        font-size: clamp(2.35rem, 10vw, 3.7rem);
    }

    .dorat-auth-copy-line {
        margin: 20px 0 17px;
    }

    .dorat-auth-illustration {
        display: none;
    }

    .dorat-auth-entry {
        align-items: flex-start;
        min-height: auto;
        overflow: visible;
        padding: 38px max(24px, env(safe-area-inset-right)) 48px max(24px, env(safe-area-inset-left));
    }

    .dorat-auth-footer {
        grid-column: 1;
        min-height: 68px;
        padding: 0 max(24px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
    }
}

@media (max-width: 520px) {
    .dorat-auth-story {
        padding-bottom: 25px;
    }

    .dorat-auth-wordmark {
        font-size: 1.7rem;
        margin-bottom: 32px;
    }

    #authScreen .dorat-auth-copy h1 {
        font-size: clamp(2.2rem, 11.2vw, 3.1rem);
    }

    #authScreen .dorat-auth-copy p {
        font-size: .9rem;
        line-height: 1.6;
    }

    .dorat-auth-entry {
        padding-block: 32px 42px;
    }

    #authScreen form h3,
    #authScreen #emailVerificationFormContainer h3,
    #authScreen #passwordResetFormContainer h3 {
        font-size: 1.42rem;
        margin-bottom: 28px !important;
    }

    #authScreen input,
    #authScreen select,
    #authScreen textarea,
    #authScreen .auth-primary-button,
    #authScreen form > .btn {
        min-height: 52px;
    }

    .dorat-auth-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
        padding-block: 12px max(14px, env(safe-area-inset-bottom));
    }

    .auth-footer-end {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
        width: 100%;
    }

    .auth-legal-links {
        justify-content: flex-start;
        width: 100%;
    }

    .auth-footer-meta {
        font-size: .76rem;
    }
}

@media (max-height: 720px) and (min-width: 821px) {
    .dorat-auth-wordmark {
        margin-bottom: 38px;
    }

    .dorat-auth-story {
        padding-top: 32px;
    }

    .dorat-auth-illustration {
        opacity: .72;
    }

    .dorat-auth-entry {
        align-items: flex-start;
        padding-block: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #authScreen > .dorat-auth-shell,
    #authScreen * {
        animation-duration: .01ms !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
