/**
 * Customer Authentication Styles
 * Login, Register, Forgot Password, etc.
 * Uses system theme variables from admin panel - NO GRADIENTS
 */

/* ========================================
   Base Layout
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    background: var(--secondary-color, #1a1a2e);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ========================================
   Login Container - Split Layout
   ======================================== */
.login-container {
    display: flex;
    max-width: 900px;
    width: 100%;
    background: var(--bg-white, #fff);
    border-radius: var(--border-radius-lg, 20px);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Left Panel - Branding */
.login-left {
    flex: 1;
    background: var(--secondary-color, #1a1a2e);
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--secondary-contrast, white);
}

.login-logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 30px;
}

.login-left h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--secondary-contrast, #fff);
}

.login-left p {
    font-size: 1rem;
    opacity: 0.85;
    line-height: 1.6;
    color: var(--secondary-contrast, rgba(255, 255, 255, 0.85));
}

/* Right Panel - Form */
.login-right {
    flex: 1;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    background: var(--bg-white, #fff);
}

/* Back Link */
.back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted, #666);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 30px;
    transition: color 0.2s;
}

.back-home:hover {
    color: var(--primary-color, #FF6B35);
}

.back-home i {
    font-size: 0.8rem;
}

/* Login Header */
.login-header {
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary, #1a1a2e);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-muted, #666);
    font-size: 0.95rem;
}

/* ========================================
   Form Styles
   ======================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary, #333);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    color: var(--text-muted, #999);
    font-size: 1rem;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border: 2px solid var(--border-color, #e0e0e0);
    border-radius: var(--border-radius, 10px);
    font-size: 1rem;
    transition: all 0.2s;
    background: var(--bg-light, #fafafa);
    color: var(--text-primary, #333);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color, #FF6B35);
    background: var(--bg-white, #fff);
    box-shadow: 0 0 0 4px rgba(var(--primary-color-rgb, 255, 107, 53), 0.1);
}

.input-wrapper input::placeholder {
    color: var(--text-muted, #aaa);
}

/* Submit Button - SOLID COLOR, NO GRADIENT */
.btn-submit {
    width: 100%;
    padding: 15px 25px;
    background: var(--primary-color, #FF6B35);
    color: var(--primary-contrast, white);
    border: none;
    border-radius: var(--border-radius, 10px);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb, 255, 107, 53), 0.3);
}

.btn-submit:hover {
    background: var(--primary-color-dark, #e55a2b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--primary-color-rgb, 255, 107, 53), 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: var(--text-muted, #999);
    font-size: 0.9rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color, #e0e0e0);
}

.divider::before {
    margin-right: 15px;
}

.divider::after {
    margin-left: 15px;
}

/* Register Link */
.register-link {
    text-align: center;
    color: var(--text-muted, #666);
    font-size: 0.95rem;
}

.register-link a {
    color: var(--primary-color, #FF6B35);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.register-link a:hover {
    color: var(--primary-color-dark, #e85a2b);
    text-decoration: underline;
}

/* ========================================
   Alerts
   ======================================== */
.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius, 10px);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}

.alert i {
    font-size: 1.1rem;
}

.alert-error {
    background: rgba(var(--danger-color-rgb, 231, 76, 60), 0.1);
    color: var(--danger-color, #991b1b);
    border: 1px solid rgba(var(--danger-color-rgb, 231, 76, 60), 0.3);
}

.alert-success {
    background: rgba(var(--success-color-rgb, 39, 174, 96), 0.1);
    color: var(--success-color, #166534);
    border: 1px solid rgba(var(--success-color-rgb, 39, 174, 96), 0.3);
}

.alert-warning {
    background: rgba(var(--warning-color-rgb, 243, 156, 18), 0.1);
    color: var(--warning-color, #92400e);
    border: 1px solid rgba(var(--warning-color-rgb, 243, 156, 18), 0.3);
}

.alert-info {
    background: rgba(var(--info-color-rgb, 52, 152, 219), 0.1);
    color: var(--info-color, #1e40af);
    border: 1px solid rgba(var(--info-color-rgb, 52, 152, 219), 0.3);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        max-width: 450px;
    }

    .login-left {
        padding: 30px;
        text-align: center;
    }

    .login-logo {
        margin: 0 auto 20px;
    }

    .login-left h2 {
        font-size: 1.5rem;
    }

    .login-right {
        padding: 30px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .login-container {
        border-radius: 15px;
    }

    .login-left,
    .login-right {
        padding: 25px 20px;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }
}

/* ========================================
   Password Toggle
   ======================================== */
.btn-toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted, #999);
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    z-index: 2;
}

.btn-toggle-password:hover {
    color: var(--text-secondary, #666);
}

.btn-toggle-password:focus {
    outline: none;
}

/* ========================================
   Social Login (optional)
   ======================================== */
.social-login {
    display: flex;
    gap: 15px;
}

.btn-social {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border-color, #e0e0e0);
    border-radius: var(--border-radius, 10px);
    background: var(--bg-white, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary, #333);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-social:hover {
    border-color: var(--primary-color, #ccc);
    background: var(--bg-light, #f5f5f5);
}

.btn-social i {
    font-size: 1.2rem;
}

.btn-google i {
    color: #DB4437;
}

.btn-facebook i {
    color: #4267B2;
}

/* ========================================
   Checkbox styles
   ======================================== */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color, #FF6B35);
    cursor: pointer;
}

.checkbox-group label {
    font-size: 0.9rem;
    color: var(--text-muted, #666);
    cursor: pointer;
    margin: 0;
}

.checkbox-group a {
    color: var(--primary-color, #FF6B35);
    text-decoration: none;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

/* ========================================
   REGISTER PAGE - Uses same split layout
   ======================================== */
.register-container {
    display: flex;
    max-width: 950px;
    width: 100%;
    background: var(--bg-white, #fff);
    border-radius: var(--border-radius-lg, 20px);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Left Panel - SOLID COLOR */
.register-left {
    flex: 0 0 35%;
    background: var(--primary-color, #FF6B35);
    padding: 50px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--primary-contrast, white);
}

.register-left i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.register-left h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.register-left p {
    font-size: 0.95rem;
    opacity: 0.85;
    line-height: 1.5;
}

.register-right {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    max-height: 90vh;
    background: var(--bg-white, #fff);
}

.register-header {
    margin-bottom: 25px;
}

.register-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary, #1a1a2e);
    margin-bottom: 5px;
}

.register-header p {
    color: var(--text-muted, #666);
    font-size: 0.9rem;
}

.login-link {
    text-align: center;
    margin-top: 25px;
    color: var(--text-muted, #666);
    font-size: 0.95rem;
}

.login-link a {
    color: var(--primary-color, #FF6B35);
    text-decoration: none;
    font-weight: 600;
}

.login-link a:hover {
    text-decoration: underline;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-strength.weak {
    background: rgba(var(--danger-color-rgb, 231, 76, 60), 0.1);
    color: var(--danger-color, #dc2626);
}

.password-strength.medium {
    background: rgba(var(--warning-color-rgb, 243, 156, 18), 0.1);
    color: var(--warning-color, #d97706);
}

.password-strength.strong {
    background: rgba(var(--success-color-rgb, 39, 174, 96), 0.1);
    color: var(--success-color, #16a34a);
}

/* ========================================
   FORGOT PASSWORD - Single Panel
   ======================================== */
.forgot-container,
.reset-container {
    max-width: 450px;
    width: 100%;
    background: var(--bg-white, #fff);
    border-radius: var(--border-radius-lg, 20px);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Header - SOLID COLOR */
.forgot-header,
.reset-header {
    background: var(--primary-color, #FF6B35);
    padding: 40px 30px;
    text-align: center;
    color: var(--primary-contrast, white);
}

.forgot-header i,
.reset-header i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.forgot-header h1,
.reset-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.forgot-header p,
.reset-header p {
    opacity: 0.9;
    font-size: 0.95rem;
}

.forgot-body,
.reset-body {
    padding: 35px 30px;
}

.back-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
    text-align: center;
}

.back-links a {
    color: var(--text-muted, #666);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: color 0.2s;
}

.back-links a:hover {
    color: var(--primary-color, #FF6B35);
}

.back-links a.primary {
    color: var(--primary-color, #FF6B35);
    font-weight: 600;
}

.back-link {
    text-align: center;
    margin-top: 25px;
}

.back-link a {
    color: var(--primary-color, #FF6B35);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-link a:hover {
    text-decoration: underline;
}

/* ========================================
   Responsive for Register/Forgot/Reset
   ======================================== */
@media (max-width: 768px) {
    .register-container {
        flex-direction: column;
        max-width: 480px;
    }

    .register-left {
        flex: none;
        padding: 30px;
    }

    .register-left i {
        font-size: 3rem;
    }

    .register-right {
        max-height: none;
        padding: 30px;
    }

    .forgot-container,
    .reset-container {
        margin: 10px;
    }
}

/* Select Styling */
.input-wrapper select {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border: 2px solid var(--border-color, #e0e0e0);
    border-radius: var(--border-radius, 10px);
    font-size: 1rem;
    transition: all 0.2s;
    background: var(--bg-light, #fafafa);
    appearance: none;
    cursor: pointer;
    color: var(--text-primary, #333);
}

.input-wrapper select:focus {
    outline: none;
    border-color: var(--primary-color, #FF6B35);
    background: var(--bg-white, #fff);
    box-shadow: 0 0 0 4px rgba(var(--primary-color-rgb, 255, 107, 53), 0.1);
}