/* ============================================
   Auth Pages - Login & Register
   Modern, Professional Design
============================================ */

/* Reset & Base */
.auth-body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
}

/* Auth Page Container */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

.auth-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ============================================
   Left Side - Branding
============================================ */
.auth-branding {
    flex: 0 0 45%;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0891b2 100%);
    color: #ffffff;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

/* Register page branding with different gradient */
.register-branding {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 50%, #0891b2 100%);
}

/* Decorative elements */
.auth-branding::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
}

.auth-branding::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 500px;
    height: 500px;
    background: rgba(8, 145, 178, 0.1);
    border-radius: 50%;
}

.auth-branding-content {
    position: relative;
    z-index: 1;
}

/* Logo */
.auth-logo {
    margin-bottom: 50px;
}

.auth-logo img {
    max-height: 50px;
    width: auto;
    filter: brightness(0) invert(1);
}

.auth-logo .site-title {
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
}

/* Branding Text */
.auth-branding h1 {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.auth-branding > .auth-branding-content > p {
    font-size: 17px;
    line-height: 1.7;
    opacity: 0.85;
    max-width: 400px;
    margin-bottom: 40px;
}

/* Auth Features */
.auth-features {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.auth-feature {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.auth-feature .feature-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-feature .feature-icon svg {
    width: 24px;
    height: 24px;
    color: #00d4aa;
}

.auth-feature .feature-text h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.auth-feature .feature-text p {
    font-size: 14px;
    opacity: 0.7;
    line-height: 1.5;
}

/* Auth Benefits (Register Page) */
.auth-benefits {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 500;
}

.benefit-item svg {
    width: 20px;
    height: 20px;
    color: #00d4aa;
    flex-shrink: 0;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    gap: 30px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.trust-badge {
    text-align: center;
}

.trust-badge .badge-value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: #00d4aa;
    margin-bottom: 4px;
}

.trust-badge .badge-label {
    font-size: 12px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Branding Footer */
.auth-branding-footer {
    position: relative;
    z-index: 1;
}

.auth-branding-footer p {
    font-size: 13px;
    opacity: 0.6;
}

/* ============================================
   Right Side - Form
============================================ */
.auth-form-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #ffffff;
}

.auth-form-container {
    width: 100%;
    max-width: 420px;
}

.register-form-container {
    max-width: 480px;
}

/* Form Header */
.auth-form-header {
    margin-bottom: 30px;
}

.auth-form-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}

.auth-form-header p {
    font-size: 15px;
    color: #64748b;
}

/* Alert */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
}

.auth-alert.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.auth-alert.success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.auth-alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.form-group label .required {
    color: #dc2626;
}

.form-group label .optional {
    color: #94a3b8;
    font-weight: 400;
    font-size: 12px;
}

/* Input Wrapper */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper svg {
    position: absolute;
    left: 16px;
    width: 20px;
    height: 20px;
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.2s;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    color: #0f172a;
    background: #ffffff;
    transition: all 0.2s;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #0891b2;
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.1);
}

.input-wrapper input:focus + svg,
.input-wrapper:focus-within svg:first-child {
    color: #0891b2;
}

.input-wrapper input::placeholder {
    color: #94a3b8;
}

/* Toggle Password Button */
.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password svg {
    position: static;
    width: 20px;
    height: 20px;
    color: #94a3b8;
    pointer-events: none;
}

.toggle-password:hover svg {
    color: #64748b;
}

/* Password Strength */
.password-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.strength-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: all 0.3s;
}

.strength-bar span.weak { background: #dc2626; }
.strength-bar span.fair { background: #f59e0b; }
.strength-bar span.good { background: #0891b2; }
.strength-bar span.strong { background: #16a34a; }

.strength-text {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    min-width: 50px;
}

/* Form Options (Remember me & Forgot) */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forgot-link {
    font-size: 14px;
    color: #0891b2;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #0e7490;
    text-decoration: underline;
}

/* Checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
}

.checkbox-wrapper input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-top: 2px;
}

.checkbox-wrapper input:checked + .checkmark {
    background: #0891b2;
    border-color: #0891b2;
}

.checkbox-wrapper input:checked + .checkmark::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

.checkbox-wrapper a {
    color: #0891b2;
    text-decoration: none;
}

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

/* Terms & Newsletter */
.terms-group,
.newsletter-group {
    margin-top: 8px;
}

/* Submit Button */
.btn-auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
}

.btn-auth-submit:hover {
    background: linear-gradient(135deg, #0e7490 0%, #0c5d72 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(8, 145, 178, 0.3);
}

.btn-auth-submit svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s;
}

.btn-auth-submit:hover svg {
    transform: translateX(4px);
}

.btn-auth-submit.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-auth-submit .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.auth-divider span {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}

/* WHMCS Direct Button */
.btn-whmcs-direct {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    color: #475569;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-whmcs-direct:hover {
    border-color: #0891b2;
    color: #0891b2;
    background: rgba(8, 145, 178, 0.05);
}

.btn-whmcs-direct svg {
    width: 20px;
    height: 20px;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid #f1f5f9;
}

.auth-footer p {
    font-size: 14px;
    color: #64748b;
}

.auth-footer a {
    color: #0891b2;
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Back to Home */
.back-to-home {
    text-align: center;
    margin-top: 20px;
}

.back-to-home a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.back-to-home a:hover {
    color: #0891b2;
}

.back-to-home svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   Responsive Design
============================================ */
@media (max-width: 1200px) {
    .auth-branding {
        flex: 0 0 40%;
        padding: 50px;
    }
    
    .auth-branding h1 {
        font-size: 32px;
    }
}

@media (max-width: 992px) {
    .auth-container {
        flex-direction: column;
    }
    
    .auth-branding {
        flex: none;
        padding: 40px;
        min-height: auto;
    }
    
    .auth-branding::before,
    .auth-branding::after {
        display: none;
    }
    
    .auth-branding h1 {
        font-size: 28px;
        margin-bottom: 12px;
    }
    
    .auth-branding > .auth-branding-content > p {
        margin-bottom: 24px;
    }
    
    .auth-features {
        display: none;
    }
    
    .auth-benefits {
        display: none;
    }
    
    .trust-badges {
        justify-content: center;
        padding-top: 24px;
    }
    
    .auth-branding-footer {
        display: none;
    }
    
    .auth-form-wrapper {
        padding: 30px 20px 50px;
    }
}

@media (max-width: 576px) {
    .auth-branding {
        padding: 30px 20px;
    }
    
    .auth-branding h1 {
        font-size: 24px;
    }
    
    .auth-logo img {
        max-height: 40px;
    }
    
    .trust-badges {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .trust-badge .badge-value {
        font-size: 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .auth-form-header h2 {
        font-size: 24px;
    }
    
    .input-wrapper input {
        padding: 12px 14px 12px 44px;
        font-size: 14px;
    }
    
    .btn-auth-submit {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* ============================================
   Dark Mode Support
============================================ */
body.dark-mode .auth-form-wrapper {
    background: #1e293b;
}

body.dark-mode .auth-form-header h2 {
    color: #f1f5f9;
}

body.dark-mode .auth-form-header p {
    color: #94a3b8;
}

body.dark-mode .form-group label {
    color: #e2e8f0;
}

body.dark-mode .input-wrapper input {
    background: #0f172a;
    border-color: #334155;
    color: #f1f5f9;
}

body.dark-mode .input-wrapper input:focus {
    border-color: #0891b2;
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.2);
}

body.dark-mode .checkbox-wrapper {
    color: #cbd5e1;
}

body.dark-mode .checkmark {
    border-color: #475569;
}

body.dark-mode .btn-whmcs-direct {
    background: #0f172a;
    border-color: #334155;
    color: #cbd5e1;
}

body.dark-mode .btn-whmcs-direct:hover {
    border-color: #0891b2;
    color: #0891b2;
}

body.dark-mode .auth-footer {
    border-top-color: #334155;
}

body.dark-mode .auth-footer p {
    color: #94a3b8;
}

body.dark-mode .auth-divider::before,
body.dark-mode .auth-divider::after {
    background: #334155;
}

body.dark-mode .back-to-home a {
    color: #94a3b8;
}

