:root {
    --auth-brand-gradient: linear-gradient(135deg, #141727 0%, #3a416f 52%, #1a2035 100%);
    --auth-accent: #344767;
    --auth-muted: var(--dm-text-muted, #7b809a);
    --auth-surface: var(--dm-surface, #ffffff);
    --auth-border: rgba(52, 71, 103, 0.08);
    --auth-shadow: 0 20px 27px 0 rgba(0, 0, 0, 0.05);
    --auth-shadow-lg: 0 23px 45px rgba(20, 23, 39, 0.12);
}

.auth-page {
    min-height: 100vh;
    display: flex;
    background: var(--dm-surface-2, #f8f9fa);
}

.auth-brand {
    position: relative;
    display: none;
    flex: 1.05;
    overflow: hidden;
    color: #fff;
}

@media (min-width: 992px) {
    .auth-brand {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
}

.auth-brand__image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
}

.auth-brand__overlay {
    position: absolute;
    inset: 0;
    background: var(--auth-brand-gradient);
    opacity: 0.92;
}

.auth-brand__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 3rem;
}

.auth-brand__hero {
    width: 100%;
    max-width: clamp(30rem, 38vw, 38rem);
}

.auth-brand__logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #fff;
}

.auth-brand__logo img {
    width: 36px;
    height: 36px;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.12);
    padding: 0.35rem;
}

.auth-brand__logo span {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.auth-brand__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.auth-brand__title {
    font-size: clamp(2rem, 3vw, 2.75rem);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    color: #fff;
}

.auth-brand__subtitle {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 0;
}

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

.auth-feature {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
}

.auth-feature__icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.12);
}

.auth-feature__icon .material-symbols-rounded {
    font-size: 1.15rem;
}

.auth-feature__title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.auth-feature__text {
    font-size: 0.75rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.68);
    margin-bottom: 0;
}

.auth-brand__footer {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.55);
}

.auth-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.auth-panel__inner {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
}

.auth-panel__mobile-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    margin-bottom: 1.75rem;
}

@media (min-width: 992px) {
    .auth-panel__mobile-brand {
        display: none;
    }
}

.auth-panel__mobile-brand img {
    width: 32px;
    height: 32px;
}

.auth-panel__mobile-brand span {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dm-text, var(--auth-accent));
}

.auth-card {
    width: 100%;
    max-width: 34rem;
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    border-radius: 1.25rem;
    box-shadow: var(--auth-shadow-lg);
    overflow: hidden;
}

.auth-card__header {
    padding: 2rem 2rem 0;
}

.auth-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: var(--dm-surface-2, #f8f9fa);
    color: var(--auth-muted);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.auth-card__title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--dm-text, var(--auth-accent));
    margin-bottom: 0.35rem;
}

.auth-card__subtitle {
    font-size: 0.9375rem;
    color: var(--auth-muted);
    margin-bottom: 0;
}

.auth-card__body {
    padding: 1.75rem 2rem 2rem;
}

.auth-field {
    margin-bottom: 1.25rem;
}

.auth-field__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--dm-text, var(--auth-accent));
    margin-bottom: 0.5rem;
}

.auth-field__control {
    position: relative;
}

.auth-field__icon {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-muted);
    pointer-events: none;
    font-size: 1.15rem;
}

.auth-field__input {
    width: 100%;
    height: 3rem;
    padding: 0 1rem 0 2.85rem;
    border: 1px solid var(--dm-border, #dee2e6);
    border-radius: 0.75rem;
    background: var(--dm-surface, #fff);
    color: var(--dm-text, var(--auth-accent));
    font-size: 0.9375rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-field__input:focus {
    outline: none;
    border-color: #344767;
    box-shadow: 0 0 0 0.2rem rgba(52, 71, 103, 0.12);
}

.auth-field__input.is-invalid {
    border-color: #fd5c70;
}

.auth-field__toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--auth-muted);
    padding: 0.25rem;
    line-height: 1;
    cursor: pointer;
}

.auth-field__toggle .material-symbols-rounded {
    font-size: 1.2rem;
}

.auth-field .invalid-feedback {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8125rem;
}

.auth-captcha {
    padding: 1rem;
    border-radius: 0.875rem;
    background: var(--dm-surface-2, #f8f9fa);
    border: 1px solid var(--auth-border);
    margin-bottom: 1.25rem;
}

.auth-captcha__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--dm-text, var(--auth-accent));
    margin-bottom: 0.75rem;
}

.auth-captcha__row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
}

.auth-captcha__image {
    width: 180px;
    height: 60px;
    max-width: none;
    border-radius: 0.65rem;
    border: 1px solid var(--dm-border, #dee2e6);
    background: var(--dm-surface, #fff);
}

.auth-captcha__refresh {
    width: 3rem;
    height: 3rem;
    min-width: 3rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0;
    cursor: pointer;
    user-select: none;
}

.auth-remember input {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: #344767;
}

.auth-remember span {
    font-size: 0.875rem;
    color: var(--auth-muted);
}

.auth-alert {
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.auth-submit {
    width: 100%;
    height: 3rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.auth-submit .material-symbols-rounded {
    font-size: 1.15rem;
}

.auth-panel__footer {
    padding: 1rem 1.25rem 1.5rem;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--auth-muted);
}

.auth-panel__footer a {
    color: var(--dm-text, var(--auth-accent));
    font-weight: 600;
    text-decoration: none;
}

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

.auth-details {
    margin-top: 1rem;
    border-top: 1px solid var(--auth-border);
    padding-top: 1rem;
}

.auth-details summary {
    font-size: 0.875rem;
    color: var(--auth-muted);
    cursor: pointer;
    list-style: none;
}

.auth-details summary::-webkit-details-marker {
    display: none;
}

.auth-details summary::after {
    content: "expand_more";
    font-family: "Material Symbols Rounded";
    vertical-align: middle;
    margin-left: 0.25rem;
}

.auth-details[open] summary::after {
    content: "expand_less";
}
