/**
 * ============================================
 * RAHUL WHMCS PANEL - Authentication Pages CSS
 * Login, Register, Forgot Password Styles
 * ============================================
 */

/* ============================================
   AUTH PAGE LAYOUT
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    background: var(--gradient-dark);
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(0,212,255,0.03)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

/* Background Shapes */
.auth-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.auth-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.25;
}

.auth-shape-1 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    top: -150px;
    right: -150px;
    animation: authFloat 25s ease-in-out infinite;
}

.auth-shape-2 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    bottom: -100px;
    left: -100px;
    animation: authFloat 25s ease-in-out infinite reverse;
}

.auth-shape-3 {
    width: 300px;
    height: 300px;
    background: var(--success);
    top: 50%;
    left: 30%;
    animation: authFloat 30s ease-in-out infinite;
    animation-delay: -10s;
}

@keyframes authFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(20px, 30px) scale(1.02); }
}

/* ============================================
   SPLIT LAYOUT
   ============================================ */
.auth-left {
    flex: 1;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    z-index: 1;
}

@media (min-width: 992px) {
    .auth-left {
        display: flex;
    }
}

.auth-left-content {
    max-width: 500px;
    text-align: center;
    color: var(--white);
}

.auth-left-logo {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
}

.auth-left-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.auth-left-text {
    font-size: 1.125rem;
    color: var(--gray-300);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-secondary);
    border-radius: var(--radius);
    color: var(--white);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.auth-feature-text h5 {
    font-size: 1rem;
    color: var(--white);
    margin-bottom: 0.25rem;
}

.auth-feature-text p {
    font-size: 0.875rem;
    color: var(--gray-400);
    margin: 0;
}

/* ============================================
   AUTH RIGHT (FORM SIDE)
   ============================================ */
.auth-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

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

.auth-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-xl), 0 0 60px rgba(0, 212, 255, 0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
    display: block;
    text-decoration: none;
}

.auth-logo span {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    font-size: 0.95rem;
    color: var(--gray-500);
    margin: 0;
}

/* ============================================
   AUTH FORM
   ============================================ */
.auth-form {
    margin-bottom: 1.5rem;
}

.auth-form .form-group {
    margin-bottom: 1.25rem;
}

.auth-form .form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.auth-form .form-input {
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.auth-form .form-input:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.1);
}

.auth-form .form-input.error {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.02);
}

/* Input with icon */
.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .form-input {
    padding-left: 3rem;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 1rem;
}

.input-icon-wrapper .form-input:focus + .input-icon,
.input-icon-wrapper .form-input:not(:placeholder-shown) + .input-icon {
    color: var(--secondary);
}

/* Password toggle */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    transition: color var(--transition-fast);
}

.password-toggle:hover {
    color: var(--gray-600);
}

/* Checkbox */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.form-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--secondary);
    cursor: pointer;
}

.form-checkbox span {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Remember & Forgot row */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.forgot-link {
    font-size: 0.875rem;
    color: var(--secondary-dark);
    font-weight: 500;
}

.forgot-link:hover {
    color: var(--accent);
}

/* Submit button */
.auth-submit {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    background: var(--gradient-secondary);
    color: var(--white);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

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

.auth-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

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

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

/* ============================================
   SOCIAL LOGIN
   ============================================ */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--gray-400);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.auth-divider span {
    padding: 0 1rem;
}

.social-buttons {
    display: flex;
    gap: 0.75rem;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--gray-700);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.social-btn:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

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

.social-btn.google i { color: #ea4335; }
.social-btn.facebook i { color: #1877f2; }

/* ============================================
   AUTH FOOTER
   ============================================ */
.auth-footer {
    text-align: center;
    font-size: 0.95rem;
    color: var(--gray-600);
}

.auth-footer a {
    color: var(--secondary-dark);
    font-weight: 600;
}

.auth-footer a:hover {
    color: var(--accent);
}

/* ============================================
   ALERTS IN AUTH
   ============================================ */
.auth-alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.auth-alert i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.auth-alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.auth-alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.auth-alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.auth-alert-info {
    background: rgba(0, 212, 255, 0.1);
    color: var(--secondary-dark);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

/* ============================================
   PASSWORD STRENGTH METER
   ============================================ */
.password-strength {
    margin-top: 0.5rem;
}

.password-strength-bar {
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.password-strength-fill {
    height: 100%;
    width: 0;
    transition: all var(--transition);
    border-radius: 2px;
}

.password-strength-fill.weak { width: 25%; background: var(--danger); }
.password-strength-fill.fair { width: 50%; background: var(--warning); }
.password-strength-fill.good { width: 75%; background: #84cc16; }
.password-strength-fill.strong { width: 100%; background: var(--success); }

.password-strength-text {
    font-size: 0.75rem;
    font-weight: 500;
}

.password-strength-text.weak { color: var(--danger); }
.password-strength-text.fair { color: var(--warning); }
.password-strength-text.good { color: #84cc16; }
.password-strength-text.strong { color: var(--success); }

/* ============================================
   TERMS CHECKBOX
   ============================================ */
.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.terms-checkbox input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--secondary);
    cursor: pointer;
    flex-shrink: 0;
}

.terms-checkbox label {
    font-size: 0.875rem;
    color: var(--gray-600);
    cursor: pointer;
    line-height: 1.5;
}

.terms-checkbox a {
    color: var(--secondary-dark);
    font-weight: 500;
}

/* ============================================
   REGISTER NAME ROW
   ============================================ */
.name-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 480px) {
    .name-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   BACK TO HOME
   ============================================ */
.back-to-home {
    position: absolute;
    top: 2rem;
    left: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-300);
    font-size: 0.95rem;
    font-weight: 500;
    z-index: 10;
    transition: color var(--transition-fast);
}

.back-to-home:hover {
    color: var(--secondary);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .auth-card {
        padding: 2rem 1.5rem;
    }

    .auth-header {
        margin-bottom: 1.5rem;
    }

    .auth-title {
        font-size: 1.25rem;
    }

    .back-to-home {
        top: 1rem;
        left: 1rem;
    }

    .social-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .auth-right {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.5rem 1.25rem;
        border-radius: var(--radius-lg);
    }

    .auth-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}
