/* =========================================
   MODERN AUTHENTICATION STYLES (auth.css)
   Compatible with Light & Dark Modes
   ========================================= */

.auth-wrapper {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card {
    background: var(--card-bg, #ffffff);
    border-radius: 20px;
    border: 1px solid var(--border-color, transparent);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    width: 100%;
    max-width: 450px;
    transition: background 0.3s, border-color 0.3s;
}

.auth-card.register-card {
    max-width: 500px;
}

.auth-header {
    background: linear-gradient(135deg, var(--primary, #8e4199), #6a2a73);
    padding: 40px 30px 30px;
    text-align: center;
    color: white;
}

.auth-header-icon {
    background: rgba(255, 255, 255, 0.2);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 30px;
    backdrop-filter: blur(5px);
}

.auth-body {
    padding: 40px 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label-custom {
    font-weight: 700;
    color: var(--text-main, #475569);
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: block;
}

.form-control-custom {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color, #e2e8f0);
    background-color: var(--bg-main, #f8fafc);
    font-size: 0.95rem;
    color: var(--text-main, #1e293b);
    transition: all 0.3s ease;
}

.form-control-custom:focus {
    border-color: var(--primary, #8e4199);
    background-color: var(--card-bg, #ffffff);
    box-shadow: 0 0 0 4px rgba(142, 65, 153, 0.1);
    outline: none;
}

.btn-brand {
    background-color: var(--primary, #8e4199);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px;
    font-weight: 700;
    font-size: 1.05rem;
    width: 100%;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-top: 10px;
}

.btn-brand:hover:not(:disabled) {
    background-color: #72347a;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(142, 65, 153, 0.25);
}

.btn-brand:disabled {
    background-color: var(--border-color, #cbd5e1);
    color: var(--text-muted, #94a3b8);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.custom-checkbox .form-check-input:checked {
    background-color: var(--primary, #8e4199);
    border-color: var(--primary, #8e4199);
}

.auth-link {
    color: var(--primary, #8e4199);
    font-weight: 800;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-link:hover {
    color: #5e2a66;
    text-decoration: underline;
}

/* --- Password Strength Meter --- */
.strength-meter {
    height: 6px;
    background-color: var(--border-color, #e2e8f0);
    border-radius: 10px;
    margin-top: 10px;
    overflow: hidden;
    display: flex;
}

.strength-meter div {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
    border-radius: 10px;
}

.strength-weak { background-color: #ef4444; width: 25%; }
.strength-fair { background-color: #f59e0b; width: 50%; }
.strength-good { background-color: #3b82f6; width: 75%; }
.strength-strong { background-color: #10b981; width: 100%; }

.password-rules {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-muted, #64748b);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.rule-item { display: flex; align-items: center; gap: 5px; }
.rule-item i { font-size: 0.7rem; }
.rule-met { color: #10b981; }
.rule-unmet { color: var(--text-muted, #94a3b8); }

/* --- Explicit Dark Mode Overrides (if not covered by master layout CSS variables) --- */
@media (prefers-color-scheme: dark) {
    body[data-theme="dark"] .auth-card,
    .dark-mode .auth-card {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    }

    body[data-theme="dark"] .form-control-custom:focus,
    .dark-mode .form-control-custom:focus {
        box-shadow: 0 0 0 4px rgba(142, 65, 153, 0.2);
    }
}
