* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.auth-page-body {
    background: linear-gradient(125deg, #f8fafc 0%, #ecfdf5 25%, #eff6ff 50%, #fbf7ee 75%, #f8fafc 100%);
    background-size: 300% 300%;
    animation: seamlessMeshFlow 14s ease-in-out infinite;
    color: var(--text-primary, #0f172a);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

@keyframes seamlessMeshFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

body.auth-page-body .site-wrapper {
    background: transparent !important;
    width: 100%;
    max-width: 100% !important;
}

.auth-viewport-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    min-height: calc(100vh - 160px);
    width: 100%;
}

.auth-viewport-wrapper::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.16) 0%, rgba(99, 102, 241, 0.12) 45%, rgba(14, 165, 233, 0.08) 70%, transparent 100%);
    filter: blur(80px);
    animation: ambientAuraPulse 9s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes ambientAuraPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 1;
    }
}

.auth-viewport-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(to right, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 0;
}

.auth-card {
    position: relative;
    z-index: 1;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.85);
    width: 100%;
    max-width: 440px;
    border-radius: 12px;
    padding: 36px 32px;
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.07), 0 0 1px 1px rgba(15, 23, 42, 0.03);
    margin: 0 auto;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.auth-card:hover {
    box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.10), 0 0 1px 1px rgba(15, 23, 42, 0.04);
}

.auth-card-head {
    margin-bottom: 24px;
}

.security-chip {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary, #475569);
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 4px 10px;
    display: inline-block;
    border-radius: 20px;
    margin-bottom: 14px;
}

.auth-title {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary, #0f172a);
    margin: 0;
}

.auth-subtitle {
    font-size: 0.88rem;
    color: var(--text-secondary, #475569);
    margin-top: 6px;
    margin-bottom: 0;
}

.auth-alert {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 0.84rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.auth-alert.success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.input-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary, #475569);
}

.forgot-link {
    font-size: 0.8rem;
    color: var(--text-muted, #64748b);
    text-decoration: none;
    transition: color 0.15s ease;
}

.forgot-link:hover {
    color: var(--brand-primary, #0f172a);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input {
    width: 100%;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: var(--text-primary, #0f172a);
    padding: 10px 42px 10px 14px;
    height: 42px;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input:focus {
    border-color: var(--brand-primary, #0f172a);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.auth-input.input-error {
    border-color: #ef4444;
}

.input-icon {
    position: absolute;
    right: 14px;
    color: var(--text-muted, #64748b);
    pointer-events: none;
    display: flex;
    align-items: center;
}

.password-toggle-btn {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-muted, #64748b);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0;
}

.password-toggle-btn:hover {
    color: var(--text-primary, #0f172a);
}

.auth-form-options {
    display: flex;
    align-items: center;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.custom-checkbox input {
    display: none;
}

.checkbox-box {
    width: 16px;
    height: 16px;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    border-radius: 4px;
    display: inline-block;
    position: relative;
    transition: all 0.15s ease;
}

.custom-checkbox input:checked + .checkbox-box {
    background-color: var(--brand-primary, #0f172a);
    border-color: var(--brand-primary, #0f172a);
}

.custom-checkbox input:checked + .checkbox-box::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    font-size: 0.82rem;
    color: var(--text-secondary, #475569);
}

.auth-submit-btn {
    background-color: var(--brand-primary, #0f172a);
    color: #ffffff;
    border: 1px solid var(--brand-primary, #0f172a);
    height: 42px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08);
}

.auth-submit-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(15, 23, 42, 0.12);
}

.auth-card-foot {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.support-text {
    font-size: 0.8rem;
    color: var(--text-muted, #64748b);
}

.support-link {
    font-size: 0.8rem;
    color: var(--brand-primary, #0f172a);
    text-decoration: none;
    font-weight: 600;
}

.support-link:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .auth-viewport-wrapper {
        padding: 40px 16px;
    }

    .auth-card {
        padding: 24px 20px;
    }
}