:root {
    --zd-ink: #101b2c;
    --zd-muted: #647286;
    --zd-line: #dce5ef;
    --zd-panel: #ffffff;
    --zd-page: #eef3f8;
    --zd-blue: #1572e8;
    --zd-blue-dark: #0f5fc3;
    --zd-green: #2ba66f;
    --zd-shadow: 0 28px 70px rgba(16, 27, 44, 0.15);
    --zd-font: "Public Sans", "Inter", "Segoe UI", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

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

body.auth-body {
    margin: 0;
    color: var(--zd-ink);
    background: var(--zd-page);
    font-family: var(--zd-font);
    letter-spacing: 0;
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    padding: 2rem;
    place-items: center;
}

.auth-frame {
    display: grid;
    grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
    width: min(1040px, 100%);
    min-height: 620px;
    overflow: hidden;
    border: 1px solid rgba(190, 204, 221, 0.72);
    border-radius: 8px;
    background: var(--zd-panel);
    box-shadow: var(--zd-shadow);
    animation: authFrameIn 0.42s ease-out both;
}

.auth-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 2.2rem;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
        #101f32;
}

.auth-brand-logo,
.auth-card-logo {
    display: inline-flex;
    align-items: center;
}

.auth-brand-logo {
    width: 226px;
    min-height: 52px;
}

.auth-card-logo {
    width: 192px;
    min-height: 44px;
}

.auth-brand-logo img,
.auth-card-logo img {
    display: block;
    width: 100%;
    height: auto;
}

.auth-brand-copy {
    position: relative;
    z-index: 1;
    max-width: 310px;
    margin-top: 4.8rem;
}

.auth-eyebrow,
.auth-card-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 26px;
    font-size: 0.76rem;
    font-weight: 850;
    text-transform: uppercase;
}

.auth-eyebrow {
    color: #a8d9ff;
}

.auth-brand-copy h1 {
    margin: 0.85rem 0 0;
    color: #fff;
    font-size: 2.05rem;
    line-height: 1.13;
    font-weight: 850;
}

.auth-brand-copy p {
    margin: 1rem 0 0;
    color: #cfdbeb;
    font-size: 0.98rem;
    line-height: 1.68;
}

.auth-benefit-list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.7rem;
    margin: 2rem 0 0;
    padding: 0;
    color: #ecf5ff;
    list-style: none;
}

.auth-benefit-list li {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 0.72rem;
    align-items: center;
    min-height: 30px;
    font-size: 0.94rem;
    line-height: 1.42;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.auth-benefit-list li.is-switching {
    opacity: 0;
    transform: translateY(8px);
}

.auth-benefit-list li.is-entering {
    animation: authFeatureIn 0.46s ease-out both;
}

.auth-benefit-list li.is-entering .auth-benefit-icon {
    animation: authFeatureCheck 0.5s ease-out both;
}

.auth-benefit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    color: #7fe0ad;
    background: rgba(43, 166, 111, 0.14);
    font-size: 0.72rem;
    transform-origin: center;
}

.auth-benefit-list [data-auth-feature-text] {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.auth-contact-panel {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.55rem;
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    color: #c4d2e4;
    font-size: 0.9rem;
}

.auth-contact-panel span {
    color: #f5fbff;
    font-weight: 850;
}

.auth-contact-panel a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #dbeafe;
    text-decoration: none;
}

.auth-contact-panel a:hover {
    color: #fff;
    text-decoration: underline;
}

.auth-contact-panel i {
    width: 16px;
    color: #7fc8ff;
}

.auth-motion-lines {
    position: absolute;
    right: 2rem;
    bottom: 11.5rem;
    z-index: 0;
    display: grid;
    gap: 0.65rem;
    width: 152px;
    opacity: 0.42;
    transform: rotate(-1deg);
}

.auth-motion-lines span {
    display: block;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, #73c8ff, transparent);
    animation: authLineSweep 3.6s ease-in-out infinite;
}

.auth-motion-lines span:nth-child(2) {
    width: 78%;
    animation-delay: 0.55s;
}

.auth-motion-lines span:nth-child(3) {
    width: 56%;
    animation-delay: 1.1s;
}

.auth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: min(100%, 454px);
    margin: 0 auto;
    padding: 2.35rem;
    background: #fff;
}

.auth-card-header {
    display: grid;
    gap: 0.62rem;
    padding-bottom: 1.25rem;
}

.auth-card-kicker {
    margin-top: 0.6rem;
    color: var(--zd-blue-dark);
}

.auth-card-header h2 {
    margin: 0;
    color: var(--zd-ink);
    font-size: 1.62rem;
    line-height: 1.22;
    font-weight: 850;
}

.auth-card-header p {
    margin: 0;
    color: var(--zd-muted);
    line-height: 1.54;
}

.auth-tabs {
    display: flex;
    gap: 1.35rem;
    min-height: 42px;
    margin-bottom: 0.9rem;
    border-bottom: 1px solid var(--zd-line);
}

.auth-tab {
    position: relative;
    min-height: 42px;
    padding: 0 0 0.55rem;
    border: 0;
    color: #5c6a7e;
    background: transparent;
    font: inherit;
    font-weight: 850;
}

.auth-tab::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    border-radius: 999px;
    background: transparent;
    transform: scaleX(0);
    transform-origin: left;
    transition: background 0.18s ease, transform 0.18s ease;
}

.auth-tab:hover {
    color: var(--zd-ink);
}

.auth-tab.is-active {
    color: var(--zd-blue-dark);
}

.auth-tab.is-active::after {
    background: var(--zd-blue);
    transform: scaleX(1);
}

.auth-license-alert {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
    margin-bottom: 1rem;
    padding: 0.95rem;
    border: 1px solid #f1c7a2;
    border-radius: 6px;
    color: #59351b;
    background: #fff8f1;
}

.auth-license-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 6px;
    color: #a84f0a;
    background: #ffe9d4;
}

.auth-license-content {
    display: grid;
    gap: 0.42rem;
    min-width: 0;
}

.auth-license-content strong {
    color: #3f240f;
    font-size: 0.94rem;
    font-weight: 850;
}

.auth-license-content p {
    margin: 0;
    color: #6d4a2f;
    font-size: 0.88rem;
    line-height: 1.5;
}

.auth-license-action {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    width: fit-content;
    min-height: 34px;
    margin-top: 0.15rem;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    color: #fff;
    background: #a84f0a;
    font-size: 0.84rem;
    font-weight: 850;
    text-decoration: none;
    transition: background 0.16s ease, transform 0.16s ease;
}

.auth-license-action:hover {
    color: #fff;
    background: #843d07;
    transform: translateY(-1px);
}

.auth-form {
    display: none;
    gap: 0.86rem;
}

.auth-form.is-active {
    display: grid;
}

.auth-form-row {
    display: grid;
    gap: 0.36rem;
}

.auth-form-row label {
    color: #2f4056;
    font-size: 0.88rem;
    font-weight: 800;
}

.auth-input-shell {
    display: flex;
    align-items: center;
    min-height: 48px;
    border: 1px solid #ccd8e6;
    border-radius: 6px;
    color: #73839a;
    background: #fff;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.auth-input-shell:focus-within {
    border-color: var(--zd-blue);
    box-shadow: 0 0 0 0.2rem rgba(21, 114, 232, 0.11);
}

.auth-input-shell i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    min-width: 46px;
    color: #7a8aa0;
    font-size: 0.9rem;
}

.auth-input {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    border: 0;
    border-radius: 6px;
    padding: 0.72rem 0.82rem 0.72rem 0;
    color: var(--zd-ink);
    background: transparent;
    font: inherit;
    outline: none;
}

.auth-input::placeholder {
    color: #9aa7b8;
}

.auth-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--zd-muted);
    font-size: 0.88rem;
}

.auth-actions span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.auth-actions i {
    color: var(--zd-green);
}

.auth-link {
    color: var(--zd-blue-dark);
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border: 0;
    border-radius: 6px;
    color: #fff;
    background: var(--zd-blue);
    font: inherit;
    font-weight: 850;
    transition: background 0.16s ease, transform 0.16s ease;
}

.auth-submit:hover {
    background: var(--zd-blue-dark);
    transform: translateY(-1px);
}

.auth-register-note {
    padding: 0.78rem 0.85rem;
    border-left: 3px solid var(--zd-blue);
    color: #2f557f;
    background: #f3f8ff;
    font-size: 0.88rem;
    line-height: 1.48;
}

.auth-alert {
    border-radius: 6px;
    padding: 0.78rem 0.9rem;
    font-weight: 700;
    line-height: 1.48;
}

.auth-alert.info {
    color: #1d4f82;
    background: #eaf4ff;
}

.auth-alert.success {
    color: #175c3a;
    background: #ecf9f2;
}

.auth-alert.danger,
.validation-summary-errors {
    color: #9a2d2d;
    background: #fff1f1;
}

.validation-summary-errors,
.field-validation-error {
    border-radius: 6px;
    padding: 0.75rem 0.9rem;
    font-size: 0.86rem;
    font-weight: 700;
}

.field-validation-error {
    display: block;
    padding: 0;
    color: #ba3434;
    background: transparent;
}

.auth-footer {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1.1rem;
    color: var(--zd-muted);
    font-size: 0.84rem;
}

.auth-footer a {
    color: var(--zd-blue-dark);
    font-weight: 750;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(16, 27, 44, 0.42);
}

.auth-loading-overlay.is-visible {
    display: flex;
}

.auth-loading-box {
    min-width: 220px;
    padding: 1.2rem;
    border-radius: 8px;
    color: var(--zd-ink);
    background: #fff;
    text-align: center;
    box-shadow: var(--zd-shadow);
}

.auth-spinner {
    width: 36px;
    height: 36px;
    margin: 0 auto 0.7rem;
    border: 4px solid #dbeafe;
    border-top-color: var(--zd-blue);
    border-radius: 50%;
    animation: authSpin 0.8s linear infinite;
}

@keyframes authSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes authFrameIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes authLineSweep {
    0%,
    100% {
        opacity: 0.18;
        transform: translateX(-16px);
    }

    45% {
        opacity: 0.9;
    }

    60% {
        transform: translateX(16px);
    }
}

@keyframes authFeatureIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes authFeatureCheck {
    0% {
        transform: scale(0.76);
        background: rgba(43, 166, 111, 0.08);
    }

    55% {
        transform: scale(1.14);
        background: rgba(43, 166, 111, 0.24);
    }

    100% {
        transform: scale(1);
        background: rgba(43, 166, 111, 0.14);
    }
}

@media (max-width: 991.98px) {
    .auth-shell {
        padding: 1rem;
        align-items: start;
    }

    .auth-frame {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .auth-brand-panel {
        min-height: 350px;
        padding: 1.6rem;
    }

    .auth-brand-copy {
        max-width: 560px;
        margin-top: 2.4rem;
    }

    .auth-brand-copy h1 {
        max-width: 520px;
        font-size: 1.95rem;
    }

    .auth-contact-panel {
        margin-top: 2.4rem;
    }

    .auth-motion-lines {
        right: 1.6rem;
        bottom: 6.8rem;
    }

    .auth-card {
        width: 100%;
        max-width: 540px;
        padding: 1.8rem;
    }
}

@media (max-width: 575.98px) {
    .auth-shell {
        padding: 0.75rem;
    }

    .auth-brand-panel,
    .auth-card {
        padding: 1.1rem;
    }

    .auth-brand-logo,
    .auth-card-logo {
        width: 178px;
    }

    .auth-brand-copy {
        margin-top: 1.8rem;
    }

    .auth-brand-copy h1 {
        font-size: 1.65rem;
    }

    .auth-brand-copy p,
    .auth-benefit-list li {
        font-size: 0.92rem;
    }

    .auth-benefit-list {
        gap: 0.55rem;
        margin-top: 1.35rem;
    }

    .auth-contact-panel {
        margin-top: 1.6rem;
        font-size: 0.86rem;
    }

    .auth-motion-lines {
        display: none;
    }

    .auth-tabs {
        gap: 1rem;
    }

    .auth-actions,
    .auth-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .auth-license-alert {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
