.auth-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.auth-shell {
    position: relative;
    min-height: 100vh;
    padding: 128px 0 72px;
    overflow: hidden;
}

.auth-shell-bg {
    opacity: 0.95;
}

.auth-shell-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 40px;
    align-items: center;
}

.auth-panel {
    max-width: 560px;
}

.auth-panel h1 {
    margin-bottom: 18px;
    font-size: clamp(2.3rem, 4vw, 3.4rem);
    letter-spacing: -0.03em;
}

.auth-panel-subtitle {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--gray-600);
    margin-bottom: 28px;
}

.auth-point-list {
    display: grid;
    gap: 14px;
    margin-bottom: 28px;
}

.auth-point-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gray-700);
    font-weight: 500;
}

.auth-point-item i {
    color: var(--success);
}

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

.auth-mini-card {
    padding: 18px 18px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(99, 102, 241, 0.12);
    box-shadow: 0 18px 40px rgba(79, 70, 229, 0.08);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.auth-mini-label {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 10px;
}

.auth-mini-text {
    color: var(--gray-700);
    font-size: 0.95rem;
    line-height: 1.55;
}

.auth-card {
    padding: 34px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.14);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

.auth-card-header {
    margin-bottom: 24px;
}

.auth-card-header h2 {
    margin-bottom: 10px;
    font-size: clamp(1.7rem, 2vw, 2.15rem);
    letter-spacing: -0.02em;
}

.auth-card-header p {
    color: var(--gray-500);
    line-height: 1.7;
}

.auth-card-header a,
.auth-footer-links a,
.auth-text-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-card-header a:hover,
.auth-footer-links a:hover,
.auth-text-link:hover {
    color: var(--primary-dark);
}

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

.auth-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

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

.auth-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--gray-700);
}

.auth-input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.34);
    background: rgba(248, 250, 252, 0.96);
    color: var(--gray-800);
    border-radius: 16px;
    padding: 15px 16px;
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.auth-input:focus {
    outline: none;
    border-color: rgba(79, 70, 229, 0.58);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14);
}

.auth-input.is-invalid {
    border-color: rgba(239, 68, 68, 0.55);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.auth-select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #6b7280 50%), linear-gradient(135deg, #6b7280 50%, transparent 50%);
    background-position: calc(100% - 22px) calc(50% - 2px), calc(100% - 16px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.auth-field-note {
    font-size: 0.84rem;
    color: var(--gray-500);
}

.auth-error-list {
    display: grid;
    gap: 4px;
    font-size: 0.84rem;
    color: var(--danger);
}

.auth-row {
    display: flex;
    align-items: center;
}

.auth-row-between {
    justify-content: space-between;
    gap: 12px;
}

.auth-check {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--gray-600);
    font-size: 0.92rem;
}

.auth-check input {
    margin-top: 3px;
    accent-color: var(--primary);
}

.auth-check-block {
    margin-top: -2px;
}

.auth-submit {
    width: 100%;
    justify-content: center;
    border: 0;
}

.auth-footer-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--gray-500);
    font-size: 0.92rem;
}

.auth-flash-stack {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.auth-flash {
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 0.92rem;
    line-height: 1.6;
    border: 1px solid transparent;
}

.auth-flash-success {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    border-color: rgba(16, 185, 129, 0.18);
}

.auth-flash-info {
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.18);
}

.auth-flash-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.18);
}

html[data-theme='dark'] .auth-page {
    background: linear-gradient(180deg, #020617 0%, #0F172A 100%);
}

html[data-theme='dark'] .auth-shell-bg {
    opacity: 0.78;
}

html[data-theme='dark'] .auth-panel-subtitle,
html[data-theme='dark'] .auth-point-item,
html[data-theme='dark'] .auth-mini-text,
html[data-theme='dark'] .auth-card-header p,
html[data-theme='dark'] .auth-field-note,
html[data-theme='dark'] .auth-footer-links,
html[data-theme='dark'] .auth-check {
    color: #94A3B8;
}

html[data-theme='dark'] .auth-point-item i {
    color: #34D399;
}

html[data-theme='dark'] .auth-mini-card,
html[data-theme='dark'] .auth-card {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(148, 163, 184, 0.16);
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.42);
}

html[data-theme='dark'] .auth-mini-label,
html[data-theme='dark'] .auth-text-link,
html[data-theme='dark'] .auth-card-header a,
html[data-theme='dark'] .auth-footer-links a {
    color: #C7D2FE;
}

html[data-theme='dark'] .auth-label {
    color: #E2E8F0;
}

html[data-theme='dark'] .auth-input {
    background: rgba(2, 6, 23, 0.72);
    border-color: rgba(148, 163, 184, 0.16);
    color: #F8FAFC;
}

html[data-theme='dark'] .auth-input::placeholder {
    color: #64748B;
}

html[data-theme='dark'] .auth-input:focus {
    background: rgba(15, 23, 42, 0.96);
    border-color: rgba(99, 102, 241, 0.48);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.16);
}

html[data-theme='dark'] .auth-select {
    background-image: linear-gradient(45deg, transparent 50%, #94A3B8 50%), linear-gradient(135deg, #94A3B8 50%, transparent 50%);
}

html[data-theme='dark'] .auth-flash-success {
    color: #A7F3D0;
}

html[data-theme='dark'] .auth-flash-info {
    color: #BFDBFE;
}

html[data-theme='dark'] .auth-flash-danger {
    color: #FCA5A5;
}

@media (max-width: 1024px) {
    .auth-shell-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .auth-panel {
        max-width: none;
        text-align: center;
    }

    .auth-point-item {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .auth-shell {
        padding: 104px 0 48px;
    }

    .auth-card {
        padding: 24px 18px;
        border-radius: 22px;
    }

    .auth-two-col,
    .auth-mini-grid {
        grid-template-columns: 1fr;
    }

    .auth-row-between {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .auth-panel h1 {
        font-size: 2rem;
    }

    .auth-card-header h2 {
        font-size: 1.5rem;
    }

    .auth-footer-links {
        flex-direction: column;
    }
}