:root {
    --thydom-auth-ink: #171717;
    --thydom-auth-muted: #5f5b54;
    --thydom-auth-line: #dedbd5;
    --thydom-auth-soft: #f7f7f5;
    --thydom-auth-red: #981b34;
    --thydom-auth-red-dark: #741226;
    --thydom-auth-blue: #4285f4;
    --thydom-auth-focus: #1269d3;
}

html {
    min-height: 100%;
}

body[data-thydom-portal="app"] {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

body[data-thydom-portal="app"] > main {
    flex: 1 0 auto;
}

body[data-thydom-portal="app"] > footer {
    flex: 0 0 auto;
}

.thydom-auth-showcase,
.thydom-auth-showcase * {
    box-sizing: border-box;
}

.thydom-auth-showcase {
    width: min(100% - 40px, 1480px);
    min-height: clamp(620px, calc(100vh - 210px), 920px);
    margin: 0 auto;
    padding: clamp(34px, 5vw, 76px) 0;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(400px, .9fr);
    align-items: center;
    gap: clamp(34px, 6vw, 100px);
    color: var(--thydom-auth-ink);
}

.thydom-auth-showcase__visual {
    min-width: 0;
    min-height: 440px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 26px;
    background:
        radial-gradient(circle at 50% 50%, rgba(152, 27, 52, .08), transparent 68%),
        #fff;
    overflow: hidden;
}

.thydom-auth-showcase__image {
    display: block;
    width: min(100%, 780px);
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.thydom-auth-showcase__panel {
    min-width: 0;
    display: flex;
    justify-content: center;
}

.thydom-auth-card {
    width: min(100%, 500px);
    padding: clamp(30px, 4vw, 48px);
    background: #fff;
    border: 1px solid var(--thydom-auth-line);
    border-radius: 4px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .13);
}

.thydom-auth-card__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 28px;
    color: var(--thydom-auth-ink);
    font-size: .92rem;
    font-weight: 800;
    text-decoration: none;
}

.thydom-auth-card__back:hover,
.thydom-auth-card__back:focus-visible {
    color: var(--thydom-auth-red);
    text-decoration: underline;
}

.thydom-auth-card__kicker {
    margin: 0 0 8px;
    color: var(--thydom-auth-red);
    font-size: .74rem;
    font-weight: 900;
    letter-spacing: .15em;
    text-align: center;
    text-transform: uppercase;
}

.thydom-auth-card__title {
    margin: 0;
    color: var(--thydom-auth-ink);
    font-size: clamp(2rem, 4vw, 2.7rem);
    line-height: 1.08;
    letter-spacing: -.035em;
    text-align: center;
}

.thydom-auth-card__subtitle {
    max-width: 390px;
    margin: 14px auto 28px;
    color: var(--thydom-auth-muted);
    font-size: .98rem;
    line-height: 1.55;
    text-align: center;
}

.thydom-auth-card__message,
.thydom-auth-card__errors,
.thydom-auth-card__success {
    margin: 0 0 18px;
    padding: 13px 15px;
    border: 1px solid;
    border-radius: 8px;
    font-size: .9rem;
    line-height: 1.45;
}

.thydom-auth-card__message {
    background: #eef8f8;
    border-color: #7cb8bc;
    color: #174f53;
}

.thydom-auth-card__errors {
    background: #fff1f3;
    border-color: #d88b9a;
    color: #77142a;
}

.thydom-auth-card__errors ul {
    margin: 0;
    padding-left: 20px;
}

.thydom-auth-card__success {
    background: #edf8f0;
    border-color: #78b78b;
    color: #164e2b;
}

.thydom-auth-actions {
    display: grid;
    gap: 14px;
}

.thydom-auth-button {
    width: 100%;
    min-height: 50px;
    padding: 11px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    border: 1px solid var(--thydom-auth-ink);
    border-radius: 999px;
    background: #fff;
    color: var(--thydom-auth-ink);
    font: 800 .95rem/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}

.thydom-auth-button:hover,
.thydom-auth-button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .12);
}

.thydom-auth-button:focus-visible,
.thydom-auth-field input:focus-visible,
.thydom-auth-field select:focus-visible,
.thydom-auth-password__toggle:focus-visible,
.thydom-auth-card a:focus-visible {
    outline: 3px solid rgba(18, 105, 211, .28);
    outline-offset: 2px;
}

.thydom-auth-button--primary {
    border-color: var(--thydom-auth-red);
    background: var(--thydom-auth-red);
    color: #fff;
}

.thydom-auth-button--primary:hover,
.thydom-auth-button--primary:focus-visible {
    border-color: var(--thydom-auth-red-dark);
    background: var(--thydom-auth-red-dark);
}

.thydom-auth-button--google {
    border-color: #c8c8c8;
    background: #fff;
}

.thydom-auth-button--google svg {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.thydom-auth-divider {
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 13px;
    color: var(--thydom-auth-muted);
    font-size: .82rem;
    font-weight: 800;
    text-transform: lowercase;
}

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

.thydom-auth-form {
    display: grid;
    gap: 17px;
}

.thydom-auth-field {
    display: grid;
    gap: 7px;
}

.thydom-auth-field label {
    color: var(--thydom-auth-ink);
    font-size: .94rem;
    font-weight: 800;
}

.thydom-auth-field input,
.thydom-auth-field select {
    width: 100%;
    min-height: 50px;
    padding: 11px 13px;
    border: 1px solid #cfcfcf;
    border-radius: 6px;
    background: #fff;
    color: var(--thydom-auth-ink);
    font: 400 1rem/1.3 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.thydom-auth-field input::placeholder {
    color: #777;
}

.thydom-auth-field input[aria-invalid="true"] {
    border-color: var(--thydom-auth-red);
}

.thydom-auth-field__hint {
    color: var(--thydom-auth-muted);
    font-size: .78rem;
    line-height: 1.45;
}

.thydom-auth-password {
    position: relative;
}

.thydom-auth-password input {
    padding-right: 82px;
}

.thydom-auth-password__toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    min-height: 36px;
    padding: 0 9px;
    border: 0;
    background: transparent;
    color: #17676c;
    font-weight: 900;
    transform: translateY(-50%);
    cursor: pointer;
}

.thydom-auth-check {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 10px;
    align-items: start;
    color: var(--thydom-auth-muted);
    font-size: .82rem;
    line-height: 1.45;
}

.thydom-auth-check input {
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    accent-color: var(--thydom-auth-red);
}

.thydom-auth-check a,
.thydom-auth-card__links a {
    color: #17676c;
    font-weight: 800;
}

.thydom-auth-card__links {
    margin: 24px 0 0;
    color: var(--thydom-auth-muted);
    font-size: .9rem;
    line-height: 1.5;
    text-align: center;
}

.thydom-auth-card__links--stacked {
    display: grid;
    gap: 8px;
}

.thydom-auth-language {
    margin-top: 18px;
}

.thydom-auth-language label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.thydom-auth-language select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--thydom-auth-line);
    border-radius: 6px;
    background: #fff;
    padding: 8px 11px;
}

.thydom-auth-legal {
    margin: 18px 0 0;
    color: var(--thydom-auth-muted);
    font-size: .74rem;
    line-height: 1.5;
    text-align: center;
}

.thydom-auth-showcase .td-google-auth-fase8b {
    margin-bottom: 0;
}

.thydom-auth-showcase .td-google-auth-fase8b__button {
    min-height: 50px;
    border-radius: 999px;
}

.thydom-auth-showcase .td-google-auth-fase8b__divider {
    margin: 6px 0 2px;
    text-transform: lowercase;
}

@media (max-width: 991px) {
    .thydom-auth-showcase {
        width: min(100% - 30px, 1080px);
        grid-template-columns: minmax(0, 1fr) minmax(380px, .92fr);
        gap: 28px;
    }

    .thydom-auth-showcase__visual {
        min-height: 330px;
    }
}

@media (max-width: 767px) {
    .thydom-auth-showcase {
        width: min(100% - 28px, 540px);
        min-height: 0;
        padding: 24px 0 36px;
        display: flex;
        flex-direction: column;
        gap: 26px;
    }

    .thydom-auth-showcase__panel {
        width: 100%;
        order: 1;
    }

    .thydom-auth-showcase__visual {
        width: 100%;
        min-height: 0;
        order: 2;
        padding: 10px;
        border-radius: 18px;
    }

    .thydom-auth-showcase__image {
        width: min(100%, 500px);
    }

    .thydom-auth-card {
        padding: 28px 22px;
    }

    .thydom-auth-card__title {
        font-size: clamp(1.9rem, 9vw, 2.4rem);
    }
}

@media (max-width: 390px) {
    .thydom-auth-showcase {
        width: min(100% - 20px, 540px);
    }

    .thydom-auth-card {
        padding: 25px 17px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .thydom-auth-button {
        transition: none;
    }
}
