:root {
    --auth-bg: #15110f;
    --auth-surface: #201714;
    --auth-surface-strong: #301400;
    --auth-line: rgba(255, 220, 197, 0.16);
    --auth-line-strong: rgba(244, 187, 146, 0.34);
    --auth-text: #FFEDE3;
    --auth-muted: rgba(255, 237, 227, 0.64);
    --auth-soft: rgba(255, 220, 197, 0.08);
    --auth-accent: #D6A079;
    --auth-accent-deep: #9C6D49;
    --auth-danger: #f3a89a;
    --auth-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-wrapper {
    align-items: center;
    color: var(--auth-text);
    display: grid;
    font-family: "Manrope", "Segoe UI", sans-serif;
    min-height: calc(100dvh - 78px);
    overflow: hidden;
    padding: clamp(1.25rem, 4vw, 4rem);
    position: relative;
}

.auth-wrapper::before {
    background:
        linear-gradient(90deg, transparent, rgba(15, 11, 9, 0.1), transparent),
        linear-gradient(180deg, transparent, rgba(214, 160, 121, 0.08), transparent);
    content: "";
    inset: 0;
    opacity: 0.75;
    pointer-events: none;
    position: absolute;
}

.auth-shell {
    display: grid;
    gap: clamp(1rem, 2vw, 1.5rem);
    isolation: isolate;
    position: relative;
    width: min(100%, 750px);
}

.auth-shell-register {
    grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.12fr);
}

.auth-brand-panel,
.auth-form-panel,
.auth-card {
    border: 1px solid var(--auth-line);
    /* box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 28px 80px rgba(48, 20, 0, 0.24); */
}

.auth-brand-panel {
    align-content: end;
    /* background:
        linear-gradient(160deg, rgba(255, 237, 227, 0.1), rgba(48, 20, 0, 0.18)),
        linear-gradient(180deg, rgba(32, 23, 20, 0.68), rgba(18, 14, 12, 0.86)); */
    border-radius: 8px;
    display: grid;
    min-height: 640px;
    overflow: hidden;
    padding: clamp(1.35rem, 4vw, 3.75rem);
    position: relative;
}

.auth-brand-panel::before {
    /* background:
        linear-gradient(90deg, transparent 0 28%, rgba(255, 220, 197, 0.1) 28% 28.18%, transparent 28.18%),
        linear-gradient(0deg, transparent 0 70%, rgba(255, 220, 197, 0.08) 70% 70.18%, transparent 70.18%); */
    content: "";
    inset: 1rem;
    opacity: 0.7;
    pointer-events: none;
    position: absolute;
}

.auth-brand-panel::after {
    /* background:
        linear-gradient(135deg, transparent 0 42%, rgba(214, 160, 121, 0.18) 42% 43%, transparent 43% 100%),
        linear-gradient(45deg, transparent 0 58%, rgba(255, 237, 227, 0.08) 58% 59%, transparent 59% 100%); */
    content: "";
    inset: auto 0 0 auto;
    height: 58%;
    opacity: 0.86;
    pointer-events: none;
    position: absolute;
    width: 74%;
}

.auth-brand-mark {
    color: var(--auth-text);
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    font-weight: 800;
    left: clamp(1.35rem, 4vw, 3.75rem);
    letter-spacing: 0;
    line-height: 1;
    position: absolute;
    text-decoration: none;
    top: clamp(1.35rem, 4vw, 3.75rem);
    transition: color 0.28s var(--auth-ease), transform 0.28s var(--auth-ease);
    z-index: 1;
}

.auth-brand-mark:hover,
.auth-brand-mark:focus-visible {
    color: #FFDCC5;
    transform: translateY(-1px);
}

.auth-eyebrow,
.auth-form-kicker {
    color: var(--auth-accent);
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0 0 0.8rem;
    text-transform: uppercase;
}

.auth-hero-title {
    color: var(--auth-text);
    font-family: "Archivo Narrow", "Manrope", sans-serif;
    font-size: clamp(2.7rem, 7vw, 6.2rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 0.92;
    margin: 0;
    max-width: 10ch;
    position: relative;
    z-index: 1;
}

.auth-hero-copy {
    color: var(--auth-muted);
    font-size: clamp(0.98rem, 1.5vw, 1.08rem);
    line-height: 1.7;
    margin: 1.35rem 0 0;
    max-width: 58ch;
    position: relative;
    z-index: 1;
}

.auth-proof-list {
    border-top: 1px solid var(--auth-line);
    display: grid;
    gap: 0;
    margin-top: clamp(2rem, 5vw, 4.25rem);
    position: relative;
    z-index: 1;
}

.auth-proof-list div {
    display: grid;
    gap: 1rem;
    grid-template-columns: 2.75rem 1fr;
    padding: 1rem 0;
}

.auth-proof-list div + div {
    border-top: 1px solid rgba(255, 220, 197, 0.12);
}

.auth-proof-list span {
    color: var(--auth-accent);
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 0.8rem;
    font-weight: 800;
}

.auth-proof-list p {
    color: rgba(255, 237, 227, 0.74);
    line-height: 1.55;
    margin: 0;
}

.auth-form-panel,
.auth-card {
    /* background-color: rgba(32, 23, 20, 0.86); */
    border-radius: 8px;
    position: relative;
}

.auth-form-panel {
    align-self: center;
    backdrop-filter: blur(18px);
    padding: clamp(1.25rem, 3.6vw, 2.4rem);
}

.auth-form-heading {
    margin-bottom: 1.25rem;
}

.auth-form-heading h2 {
    color: var(--auth-text);
    font-family: "Archivo Narrow", "Manrope", sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    margin: 0;
}

.auth-form-heading p:last-child {
    color: var(--auth-muted);
    line-height: 1.6;
    margin: 0.65rem 0 0;
}

.auth-tabs {
    background-color: rgba(255, 220, 197, 0.06);
    border: 1px solid rgba(255, 220, 197, 0.12);
    border-radius: 999px;
    display: grid;
    gap: 0.25rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 1.35rem;
    padding: 0.25rem;
}

.auth-tab {
    border-radius: 999px;
    color: rgba(255, 237, 227, 0.68);
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 800;
    justify-content: center;
    line-height: 1;
    padding: 0.82rem 0.9rem;
    text-decoration: none;
    transition: background-color 0.24s var(--auth-ease), color 0.24s var(--auth-ease), transform 0.24s var(--auth-ease);
}

.auth-tab.active {
    background-color: #FFEDE3;
    color: #301400;
}

.auth-tab:hover {
    color: var(--auth-text);
    transform: translateY(-1px);
}

.auth-tab.active:hover {
    color: #301400;
}

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

.auth-field-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-field {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
}

.auth-label-row {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.auth-label,
.form-label-custom {
    color: rgba(255, 237, 227, 0.74);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    margin: 0;
    text-transform: uppercase;
}

.auth-input-frame {
    align-items: stretch;
    background-color: rgba(255, 220, 197, 0.06);
    border: 1px solid rgba(255, 220, 197, 0.13);
    border-radius: 8px;
    display: grid;
    grid-template-columns: 2.95rem minmax(0, 1fr) auto;
    min-height: 3.35rem;
    overflow: hidden;
    transition: background-color 0.24s var(--auth-ease), border-color 0.24s var(--auth-ease), box-shadow 0.24s var(--auth-ease);
}

.auth-input-frame:focus-within {
    background-color: rgba(255, 220, 197, 0.09);
    border-color: var(--auth-line-strong);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-input-icon,
.auth-password-toggle {
    align-items: center;
    color: rgba(255, 237, 227, 0.55);
    display: inline-flex;
    justify-content: center;
}

.auth-input-icon svg,
.auth-password-toggle svg {
    fill: currentColor;
    height: 1.08rem;
    width: 1.08rem;
}

.auth-input,
.input-group-custom .form-control {
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--auth-text) !important;
    font-size: 0.98rem;
    min-height: 3.35rem;
    outline: 0;
    padding: 0.85rem 0.25rem;
}

.auth-input::placeholder {
    color: rgba(255, 237, 227, 0.34);
}

.auth-input:focus {
    background-color: transparent;
    color: var(--auth-text);
}

.auth-input[type="date"] {
    color-scheme: dark;
}

.auth-input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.88) sepia(0.15) saturate(1.2);
    opacity: 0.75;
}

.auth-password-toggle {
    background-color: transparent;
    border: 0;
    cursor: pointer;
    min-width: 3rem;
    padding: 0;
    transition: background-color 0.24s var(--auth-ease), color 0.24s var(--auth-ease), transform 0.24s var(--auth-ease);
}

.auth-password-toggle:hover {
    background-color: rgba(255, 220, 197, 0.07);
    color: var(--auth-accent);
}

.forgot-link,
.auth-switch-copy a,
.auth-secondary-link,
.btn-resend-confirmation {
    color: var(--auth-accent);
    font-weight: 800;
    text-decoration: none;
    transition: color 0.24s var(--auth-ease);
}

.forgot-link {
    font-size: 0.8rem;
    white-space: nowrap;
}

.forgot-link:hover,
.auth-switch-copy a:hover,
.auth-secondary-link:hover,
.btn-resend-confirmation:hover {
    color: #FFDCC5;
}

.auth-helper {
    color: rgba(255, 237, 227, 0.48);
    font-size: 0.78rem;
    line-height: 1.45;
}

.auth-field-error,
.auth-validation-summary,
.text-danger {
    color: var(--auth-danger) !important;
    font-size: 0.78rem;
    line-height: 1.45;
}

.auth-field-error:empty,
.auth-validation-summary:empty {
    display: none;
}

.auth-validation-summary {
    background-color: rgba(243, 168, 154, 0.09);
    border: 1px solid rgba(243, 168, 154, 0.18);
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 0.8rem 0.95rem;
}

.auth-validation-summary ul {
    margin: 0;
    padding-left: 1.1rem;
}

.auth-turnstile {
    display: grid;
    gap: 0.5rem;
    min-height: 4.25rem;
}

.auth-check {
    align-items: center;
    color: rgba(255, 237, 227, 0.72);
    cursor: pointer;
    display: inline-flex;
    font-size: 0.9rem;
    gap: 0.65rem;
    margin: 0.1rem 0;
}

.form-check-input {
    background-color: rgba(255, 220, 197, 0.08);
    border: 1px solid rgba(255, 220, 197, 0.24);
    cursor: pointer;
    height: 1rem;
    margin: 0;
    width: 1rem;
}

.form-check-input:checked {
    background-color: var(--auth-accent-deep);
    border-color: var(--auth-accent-deep);
}

.form-check-input:focus,
.auth-brand-mark:focus-visible,
.auth-tab:focus-visible,
.auth-input:focus,
.auth-password-toggle:focus-visible,
.btn-submit:focus-visible,
.btn-google-login:focus-visible,
.auth-switch-copy a:focus-visible,
.forgot-link:focus-visible,
.auth-secondary-link:focus-visible,
.btn-resend-confirmation:focus-visible {
    outline: 2px solid rgba(255, 220, 197, 0.82);
    outline-offset: 3px;
}

.btn-submit {
    align-items: center;
    background-color: #D6A079;
    border: 1px solid rgba(255, 220, 197, 0.22);
    border-radius: 8px;
    color: #301400;
    cursor: pointer;
    display: inline-flex;
    font-weight: 900;
    justify-content: center;
    letter-spacing: 0;
    line-height: 1;
    min-height: 3.35rem;
    padding: 0.95rem 1.2rem;
    text-decoration: none;
    transition: background-color 0.24s var(--auth-ease), border-color 0.24s var(--auth-ease), color 0.24s var(--auth-ease), transform 0.24s var(--auth-ease), box-shadow 0.24s var(--auth-ease);
    width: 100%;
}

.btn-submit:hover {
    background-color: #F4BB92;
    border-color: rgba(255, 237, 227, 0.34);
    color: #301400;
    transform: translateY(-1px);
}

.btn-submit:active,
.auth-tab:active,
.auth-password-toggle:active,
.btn-google-login:active,
.btn-resend-confirmation:active {
    transform: translateY(0) scale(0.98);
}

.btn-submit:disabled,
.btn-submit.disabled {
    cursor: wait;
    opacity: 0.72;
}

.auth-resend-form {
    margin-top: 1rem;
    text-align: center;
}

.btn-resend-confirmation {
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
}

.auth-switch-copy {
    color: rgba(255, 237, 227, 0.62);
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 1rem 0 0;
    text-align: center;
}

.auth-divider {
    align-items: center;
    color: rgba(255, 237, 227, 0.48);
    display: flex;
    font-size: 0.8rem;
    gap: 0.8rem;
    margin: 1.2rem 0 1rem;
}

.auth-divider::before,
.auth-divider::after {
    background-color: rgba(255, 220, 197, 0.14);
    content: "";
    flex: 1;
    height: 1px;
}

.btn-google-login {
    align-items: center;
    background-color: #FFEDE3;
    border: 1px solid rgba(255, 220, 197, 0.44);
    border-radius: 8px;
    color: #301400;
    display: inline-flex;
    font-weight: 900;
    gap: 0.75rem;
    justify-content: center;
    min-height: 3.35rem;
    text-decoration: none;
    transition: background-color 0.24s var(--auth-ease), border-color 0.24s var(--auth-ease), transform 0.24s var(--auth-ease);
    width: 100%;
}

.btn-google-login:hover {
    background-color: #FFDCC5;
    border-color: rgba(255, 237, 227, 0.62);
    color: #301400;
    transform: translateY(-1px);
}

.google-logo {
    flex: 0 0 1.25rem;
    height: 1.25rem;
    width: 1.25rem;
}

.auth-container,
.register-wide {
    margin: 0 auto;
    max-width: 460px;
    position: relative;
    width: 100%;
    z-index: 1;
}

.register-wide {
    max-width: 760px;
}

.auth-header-text {
    color: var(--auth-accent);
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    font-size: clamp(1.55rem, 4vw, 2.1rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
}

.auth-subtitle {
    color: var(--auth-muted);
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
}

.auth-card {
    padding: clamp(1.25rem, 4vw, 2rem);
}

.auth-state-title {
    color: var(--auth-text);
    font-family: "Archivo Narrow", "Manrope", sans-serif;
    font-size: clamp(1.65rem, 4vw, 2.35rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    margin: 0 0 0.8rem;
    text-align: center;
}

.auth-state-text {
    color: var(--auth-muted);
    font-size: 0.96rem;
    line-height: 1.65;
    margin: 0 0 1.35rem;
    text-align: center;
}

.auth-state-form {
    margin-bottom: 1rem;
}

.auth-secondary-link {
    display: block;
    font-size: 0.9rem;
    text-align: center;
}

.input-group-custom {
    align-items: stretch;
    background-color: rgba(255, 220, 197, 0.06);
    border: 1px solid rgba(255, 220, 197, 0.13);
    border-radius: 8px;
    overflow: hidden;
}

.input-group-custom .input-group-text {
    background-color: transparent;
    border: 0;
    color: rgba(255, 237, 227, 0.55);
}

@media (max-width: 991.98px) {
    .auth-wrapper {
        overflow: visible;
        padding: 1rem;
    }

    .auth-shell,
    .auth-shell-register {
        grid-template-columns: 1fr;
        width: min(100%, 760px);
    }

    .auth-brand-panel {
        min-height: auto;
        padding-top: 5rem;
    }

    .auth-hero-title {
        max-width: 12ch;
    }
}

@media (max-width: 575.98px) {
    .auth-wrapper {
        align-items: start;
        min-height: calc(100dvh - 70px);
        padding: 0.75rem;
    }

    .auth-brand-panel,
    .auth-form-panel,
    .auth-card {
        border-radius: 8px;
    }

    .auth-brand-panel {
        padding: 4.5rem 1.1rem 1.2rem;
    }

    .auth-form-panel {
        padding: 1rem;
    }

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

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

    .auth-label-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.45rem;
    }

    .auth-input-frame {
        grid-template-columns: 2.65rem minmax(0, 1fr) auto;
    }

    .auth-proof-list div {
        grid-template-columns: 2.35rem 1fr;
    }
}

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