/* Ultimate Audit SaaS - Auth Pages Styles - Dark Theme */

/* ========== Auth Layout ========== */
.auth-page {
    min-height: 100vh;
    display: block;
    background: var(--bg-deep) !important;
    color: white;
    position: relative;
    overflow-x: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1400px;
    height: 700px;
    background:
        radial-gradient(ellipse 100% 60% at 50% 0%, rgba(139, 92, 246, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse 70% 50% at 75% 10%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}

.auth-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    flex-direction: row-reverse;
    position: relative;
    z-index: 1;
    padding-top: 120px;
    padding-bottom: 60px;
}

/* ========== Auth Sidebar (Right Panel) ========== */
.auth-sidebar {
    flex: 0 0 55%;
    background: transparent;
    color: white;
    padding: 80px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.auth-sidebar-content {
    max-width: 520px;
    margin: 0 auto;
}

.auth-sidebar-title {
    font-size: 2.75rem;
    line-height: 1.2;
    margin-bottom: 24px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.02em;
}

.auth-sidebar-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 48px;
    font-weight: 400;
}

.auth-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 16px;
    font-weight: 500;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.auth-features li:hover {
    transform: translateX(6px);
    color: white;
}

.auth-features li:last-child {
    border-bottom: none;
}

.auth-features li::before {
    content: '✓';
    width: 28px;
    height: 28px;
    background: rgba(139, 92, 246, 0.2);
    color: var(--primary-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.1);
    border: 1px solid var(--border-color);
}

/* ========== Auth Form Panel (Left Panel) ========== */
.auth-main {
    flex: 0 0 45%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 50px 80px;
    background: transparent;
}

.auth-form-container {
    width: 100%;
    max-width: 440px;
    margin: auto 0;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
}

.auth-form-header {
    text-align: left;
    margin-bottom: 40px;
}

.auth-form-title {
    font-size: 2rem;
    margin-bottom: 8px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.02em;
}

.auth-form-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin: 0;
}

/* ========== Auth Form ========== */
.auth-form {
    width: 100%;
}

.auth-form .form-group {
    margin-bottom: 24px;
}

.auth-form .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: white;
}

.auth-form .form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s ease;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-family: inherit;
}

.auth-form .form-input:hover {
    border-color: rgba(139, 92, 246, 0.3);
}

.auth-form .form-input:focus {
    border-color: var(--primary-accent);
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
    outline: none;
}

.auth-form .form-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.auth-form .form-input.is-invalid {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.auth-form .field-error {
    color: #ef4444;
    font-size: 13px;
    margin-top: 6px;
    display: block;
}

/* Password Toggle */
.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 8px;
    color: var(--text-muted);
    transition: color 0.2s;
}

.password-toggle:hover {
    color: white;
}

/* Form Row */
.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.form-remember {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-remember label,
.terms-check label {
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    margin: 0;
}

.form-forgot,
.terms-check a {
    font-size: 14px;
    color: var(--primary-accent);
    text-decoration: none;
    font-weight: 500;
}

.form-forgot:hover,
.terms-check a:hover {
    text-decoration: underline;
}

/* Submit Button */
.auth-form .btn-submit,
.auth-form .btn-primary {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 700;
    margin-top: 12px;
    border-radius: 12px;
    letter-spacing: 0.01em;
    background: var(--primary-accent);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
    border: none;
    cursor: pointer;
    color: white;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-form .btn-submit:hover,
.auth-form .btn-primary:hover {
    background: #6d28d9;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(124, 58, 237, 0.4);
}

.btn-submit .spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-submit.loading .btn-text {
    opacity: 0;
}

.btn-submit.loading .spinner {
    display: block;
}

/* Auth Footer */
.auth-form-footer,
.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-form-footer a,
.auth-footer a {
    color: var(--primary-accent);
    text-decoration: none;
    font-weight: 600;
}

.auth-form-footer a:hover,
.auth-footer a:hover {
    text-decoration: underline;
}

/* Auth Result (Success/Error Pages) */
.auth-result {
    text-align: center;
    padding: 40px 0;
}

.auth-result-icon {
    width: 80px;
    height: 80px;
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 24px;
}

.auth-result-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
}

.auth-result-desc {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 32px;
}

/* Verification Result Aliases */
.verification-content {
    text-align: center;
    padding: 20px 0;
}

.verification-icon {
    width: 80px;
    height: 80px;
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 24px;
}

.verification-icon.success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.verification-icon.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.verification-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
}

.verification-message {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 32px;
}

/* CAPTCHA */
.captcha-refresh {
    background: rgba(0, 0, 0, 0.2);
    border-color: var(--border-color);
    color: white;
}

.captcha-refresh:hover {
    border-color: var(--primary-accent);
    color: var(--primary-accent);
}

/* ========== Auth Simple (Centered Card) ========== */
.auth-simple {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--bg-deep);
    position: relative;
    color: white;
}

.auth-simple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.auth-simple-brand {
    margin-bottom: 40px;
    text-decoration: none;
    color: white;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1;
}

.auth-simple-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.auth-simple-footer {
    margin-top: 32px;
    text-align: center;
    z-index: 1;
}

.auth-simple-footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
}

.auth-simple-footer a:hover {
    color: var(--primary-accent);
}

/* Responsive */
@media (max-width: 992px) {
    .auth-container {
        flex-direction: column;
        padding-top: 100px;
    }

    .auth-sidebar {
        flex: 0 0 auto;
        padding: 40px;
    }

    .auth-main {
        flex: 1;
        padding: 40px 24px;
    }

    .auth-form-container {
        max-width: 100%;
        margin: 0;
    }
}