.auth-shell {
    --auth-shell-bg: #e9edf6;
    --auth-shell-surface: rgba(255, 255, 255, 0.72);
    --auth-shell-border: #e7e9f4;
    --auth-shell-text: #23233c;
    --auth-shell-muted: #6b6f8d;
    --auth-shell-card: #ffffff;
    --auth-shell-card-text: #1a1f2e;
    --auth-shell-shadow-xs: 0 2px 6px rgba(36, 44, 120, 0.08);
    --auth-shell-shadow-sm: 0 6px 16px rgba(85, 108, 178, 0.25);
    --auth-shell-shadow-md: 0 18px 40px rgba(36, 44, 120, 0.18);
    --auth-shell-radius-pill: 999px;
    --auth-shell-background: url('../assets/img/auth/background_light.png');

    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: var(--auth-shell-bg);
    color: var(--auth-shell-text);
    font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

body[data-bs-theme="dark"] .auth-shell {
    --auth-shell-bg: #0f1220;
    --auth-shell-surface: rgba(23, 24, 42, 0.85);
    --auth-shell-border: #2a2d48;
    --auth-shell-text: #ffffff;
    --auth-shell-muted: #c7cffc;
    --auth-shell-card: #17182a;
    --auth-shell-card-text: #ffffff;
    --auth-shell-shadow-xs: 0 2px 6px rgba(0, 0, 0, 0.2);
    --auth-shell-shadow-sm: 0 6px 16px rgba(0, 0, 0, 0.35);
    --auth-shell-shadow-md: 0 18px 40px rgba(0, 0, 0, 0.45);
    --auth-shell-background: url('../assets/img/auth/background_dark.png');
}

.auth-shell__frame {
    width: 100%;
    max-width: 420px;
    border-radius: 32px;
    background: var(--auth-shell-surface);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
}

.auth-shell__canvas {
    background-image: var(--auth-shell-background);
    background-size: cover;
    background-position: center;
    min-height: 520px;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .auth-shell {
        padding: 32px 24px;
    }

    .auth-shell__frame {
        min-height: 760px;
    }
}

.auth-shell__header {
    padding: 20px 24px 0;
}

.auth-shell__header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.auth-shell__brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-shell__brand-image {
    height: 54px;
    width: auto;
    display: block;
}

.auth-shell__brand-image--dark {
    display: none;
}

body[data-bs-theme="dark"] .auth-shell__brand-image--light {
    display: none;
}

body[data-bs-theme="dark"] .auth-shell__brand-image--dark {
    display: block;
}

.auth-shell__toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-shell__theme-toggle .switch {
    --toggle-track: rgba(255, 255, 255, 0.32);
    --toggle-thumb: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    background: rgba(17, 22, 57, 0.15);
    border-radius: var(--auth-shell-radius-pill);
    box-shadow: var(--auth-shell-shadow-xs);
}

body[data-bs-theme="dark"] .auth-shell__theme-toggle .switch {
    background: rgba(255, 255, 255, 0.12);
}

.auth-shell__theme-checkbox {
    cursor: pointer;
}

.auth-shell__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 32px 24px 28px;
}

.auth-shell__panel {
    background: var(--auth-shell-card);
    color: var(--auth-shell-card-text);
    border-radius: 28px;
    box-shadow: var(--auth-shell-shadow-md);
    padding: 28px 24px;
    backdrop-filter: blur(4px);
}

.auth-shell__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-shell__subtitle {
    font-size: 0.95rem;
    color: var(--auth-shell-muted);
    margin-bottom: 20px;
}

.auth-shell__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-shell__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-shell__label {
    font-weight: 600;
    font-size: 0.95rem;
}

.auth-shell__input {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--auth-shell-border);
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--auth-shell-card-text);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-shell__input:focus {
    outline: none;
    border-color: #556cb2;
    box-shadow: 0 0 0 3px rgba(85, 108, 178, 0.18);
}

body[data-bs-theme="dark"] .auth-shell__input {
    background: rgba(12, 14, 27, 0.95);
    border-color: var(--auth-shell-border);
    color: var(--auth-shell-card-text);
}

.auth-shell__error {
    min-height: 18px;
    font-size: 0.82rem;
    color: #d93030;
}

.auth-shell__actions {
    display: flex;
    justify-content: flex-end;
    margin-top: -8px;
}

.auth-shell__link {
    font-size: 0.9rem;
    color: #556cb2;
    text-decoration: none;
    font-weight: 600;
}

body[data-bs-theme="dark"] .auth-shell__link {
    color: #b8c2ff;
}

.auth-shell__link:hover,
.auth-shell__link:focus-visible {
    text-decoration: underline;
}

.auth-shell__footer {
    text-align: center;
    font-size: 0.95rem;
    color: var(--auth-shell-card-text);
}

.auth-shell__footer a {
    margin-left: 6px;
}

.auth-shell__support {
    text-align: center;
    font-size: 0.9rem;
    color: var(--auth-shell-muted);
}

.auth-shell__cta {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.auth-shell__cta .btn-primary,
.auth-shell__cta .btn-secondary {
    width: 100%;
}

.auth-shell__language-selector .language-selector__button {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    padding: 6px 12px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--auth-shell-card-text);
    box-shadow: var(--auth-shell-shadow-xs);
}

body[data-bs-theme="dark"] .auth-shell__language-selector .language-selector__button {
    background: rgba(10, 12, 24, 0.85);
    color: var(--auth-shell-card-text);
}

.auth-shell__language-selector .language-selector__menu {
    margin-top: 8px;
    border-radius: 16px;
    box-shadow: var(--auth-shell-shadow-sm);
}

.auth-shell__language-selector .language-selector__option.is-active {
    background: rgba(85, 108, 178, 0.12);
}

.auth-shell__language-selector .language-selector__option.is-active .language-selector__text {
    font-weight: 700;
}

.auth-shell__language-selector .language-selector__flag {
    width: 20px;
    height: 14px;
}

.auth-shell__message {
    font-size: 0.95rem;
    color: var(--auth-shell-card-text);
    margin-top: 12px;
}

.auth-shell__message--muted {
    color: var(--auth-shell-muted);
}

.auth-shell__message--success {
    color: #1f7a4d;
}

.auth-shell__message--error {
    color: #b12a2a;
}

.auth-shell__spacer {
    height: 12px;
}

.auth-shell__panel--state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
}

.auth-shell__state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.auth-shell__state-icon {
    position: relative;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--auth-shell-shadow-sm);
}

.auth-shell__state-icon::before,
.auth-shell__state-icon::after {
    content: '';
    position: absolute;
    border-radius: 12px;
    opacity: 0.9;
}

.auth-shell__state-icon--success {
    background: linear-gradient(140deg, #49d390, #2f9d63);
    color: #ffffff;
    background-image: url('../assets/img/auth/status/status_success.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 44px 44px;
}

.auth-shell__state-icon--success::before {
    width: 28px;
    height: 14px;
    border: 4px solid currentColor;
    border-right: none;
    border-top: none;
    transform: rotate(-45deg);
}

.auth-shell__state-icon--success::after {
    display: none;
}

.auth-shell__state-icon--error {
    background: linear-gradient(140deg, #f47360, #d8342f);
    color: #ffffff;
    background-image: url('../assets/img/auth/status/status_error.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 44px 44px;
}

.auth-shell__state-icon--error::before,
.auth-shell__state-icon--error::after {
    width: 34px;
    height: 4px;
    background: currentColor;
}

.auth-shell__state-icon--error::before {
    transform: rotate(45deg);
}

.auth-shell__state-icon--error::after {
    transform: rotate(-45deg);
}

body[data-bs-theme="dark"] .auth-shell__state-icon--success {
    background: linear-gradient(140deg, #3fc885, #1f7a4d);
}

body[data-bs-theme="dark"] .auth-shell__state-icon--error {
    background: linear-gradient(140deg, #f59674, #b12a2a);
}

.auth-shell__alert {
    border-radius: 18px;
    padding: 12px 14px;
    font-size: 0.9rem;
    font-weight: 500;
}

.auth-shell__alert--error {
    background: rgba(217, 48, 48, 0.12);
    color: #b12a2a;
    border: 1px solid rgba(217, 48, 48, 0.3);
}

body[data-bs-theme="dark"] .auth-shell__alert--error {
    background: rgba(217, 104, 104, 0.14);
    color: #ff9d9d;
    border-color: rgba(217, 104, 104, 0.35);
}
