/* ========================================
        AUTH PAGES (LOGIN & SIGNUP) 
   ======================================== */

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Mode Colors - Sapphire Theme */
    --sapphire-primary: #0066cc;
    --sapphire-secondary: #0099ff;
    --sapphire-accent: #00ccff;
    --sapphire-deep: #003366;
    --sapphire-glow: #33ccff;
    --sapphire-soft: #e6f3ff;
    
    /* Light Mode Backgrounds */
    --bg-primary: #f0f9ff;
    --bg-secondary: #e6f3ff;
    --bg-gradient: linear-gradient(135deg, #f0f9ff 0%, #e6f3ff 50%, #d9efff 100%);
    --text-primary: #0a1928;
    --text-secondary: #1e3a5f;
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-bg-solid: #ffffff;
    --border-color: rgba(0, 102, 204, 0.2);
    --header-bg: rgba(255, 255, 255, 0.9);
    --shadow-color: rgba(0, 102, 204, 0.15);
    --shadow-strong: rgba(0, 102, 204, 0.25);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0066cc, #0099ff, #00ccff);
    --gradient-secondary: linear-gradient(135deg, #003366, #0066cc, #0099ff);
    --gradient-accent: linear-gradient(135deg, #0099ff, #00ccff, #33ccff);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 102, 204, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 102, 204, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 102, 204, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 102, 204, 0.2);
    
    /* Glass Effects */
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.35);
    --glass-shadow: 0 8px 32px rgba(0, 102, 204, 0.1);
}

[data-theme="dark"] {
    /* Dark Mode Colors - Sapphire Theme */
    --sapphire-primary: #00a3ff;
    --sapphire-secondary: #4db8ff;
    --sapphire-accent: #80ccff;
    --sapphire-deep: #001a33;
    --sapphire-glow: #0066cc;
    
    /* Dark Mode Backgrounds */
    --bg-primary: #0a1428;
    --bg-secondary: #0d1a33;
    --bg-gradient: linear-gradient(135deg, #0a1428 0%, #0d1a33 50%, #10203d 100%);
    --text-primary: #ffffff;
    --text-secondary: #b3d9ff;
    --card-bg: rgba(10, 25, 45, 0.85);
    --card-bg-solid: #0f1a2f;
    --border-color: rgba(0, 163, 255, 0.25);
    --header-bg: rgba(10, 20, 40, 0.95);
    --shadow-color: rgba(0, 163, 255, 0.2);
    --shadow-strong: rgba(0, 163, 255, 0.3);
    
    /* Gradients - Dark Mode */
    --gradient-primary: linear-gradient(135deg, #0066cc, #0099ff, #00ccff);
    --gradient-secondary: linear-gradient(135deg, #003366, #0066cc, #0099ff);
    --gradient-accent: linear-gradient(135deg, #0099ff, #00ccff, #33ccff);
    
    /* Shadows - Dark Mode */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.7);
    
    /* Glass Effects - Dark Mode */
    --glass-bg: rgba(0, 102, 204, 0.15);
    --glass-border: rgba(0, 163, 255, 0.25);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ===== SAPPHIRE BACKGROUND EFFECTS ===== */
.background-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    background: var(--bg-gradient);
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.35;
    animation: floatOrb 25s infinite ease-in-out;
    mix-blend-mode: screen;
}

.orb-1 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle at 30% 30%, 
        rgba(0, 102, 204, 0.5), 
        rgba(0, 153, 255, 0.3), 
        rgba(0, 204, 255, 0.2));
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle at 70% 70%, 
        rgba(0, 153, 255, 0.4), 
        rgba(0, 102, 204, 0.3), 
        rgba(0, 51, 102, 0.2));
    bottom: -200px;
    right: -200px;
    animation-delay: -7s;
}

.orb-3 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle at 50% 50%, 
        rgba(0, 204, 255, 0.3), 
        rgba(0, 102, 204, 0.2), 
        rgba(0, 51, 102, 0.1));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
    opacity: 0.25;
}

[data-theme="dark"] .glow-orb {
    opacity: 0.45;
    mix-blend-mode: lighten;
}

[data-theme="dark"] .orb-1 {
    background: radial-gradient(circle at 30% 30%, 
        rgba(0, 163, 255, 0.6), 
        rgba(0, 102, 204, 0.4), 
        rgba(0, 51, 102, 0.3));
}

[data-theme="dark"] .orb-2 {
    background: radial-gradient(circle at 70% 70%, 
        rgba(77, 184, 255, 0.5), 
        rgba(0, 102, 204, 0.4), 
        rgba(0, 51, 102, 0.3));
}

[data-theme="dark"] .orb-3 {
    background: radial-gradient(circle at 50% 50%, 
        rgba(128, 204, 255, 0.4), 
        rgba(0, 102, 204, 0.3), 
        rgba(0, 51, 102, 0.2));
}

@keyframes floatOrb {
    0%, 100% { 
        transform: translate(0, 0) scale(1); 
        filter: blur(100px);
    }
    20% { 
        transform: translate(50px, -50px) scale(1.1); 
        filter: blur(90px);
    }
    40% { 
        transform: translate(-30px, 40px) scale(0.95); 
        filter: blur(110px);
    }
    60% { 
        transform: translate(40px, 30px) scale(1.05); 
        filter: blur(95px);
    }
    80% { 
        transform: translate(-40px, -30px) scale(0.98); 
        filter: blur(105px);
    }
}

.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(0, 163, 255, 0.3);
    border-radius: 50%;
    pointer-events: none;
    animation: floatParticle 20s linear infinite;
    box-shadow: 0 0 10px rgba(0, 163, 255, 0.5);
}

[data-theme="dark"] .particle {
    background: rgba(77, 184, 255, 0.4);
    box-shadow: 0 0 15px rgba(0, 163, 255, 0.6);
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}



/* ===== AUTH SECTION STYLES ===== */
.auth-section {
    position: relative;
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    margin-top: 70px;
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.auth-container {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

@media screen and (max-width: 992px) {
    .auth-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 500px;
    }
}

/* ===== AUTH HERO (Left Side) ===== */
.auth-hero {
    animation: slideInLeft 0.8s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.auth-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, 
        rgba(0, 102, 204, 0.15), 
        rgba(0, 153, 255, 0.15));
    backdrop-filter: blur(10px);
    color: var(--sapphire-primary);
    padding: 0.6rem 1.2rem;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 102, 204, 0.25);
    animation: fadeInUp 0.5s ease;
}

.auth-hero-title {
    font-size: clamp(2.5rem, 5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.2rem;
    color: var(--text-primary);
}

.title-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.2rem;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.auth-feature:nth-child(1) { animation-delay: 0.2s; }
.auth-feature:nth-child(2) { animation-delay: 0.3s; }
.auth-feature:nth-child(3) { animation-delay: 0.4s; }

.auth-feature:hover {
    transform: translateX(10px);
    border-color: var(--sapphire-primary);
    box-shadow: var(--shadow-md);
}

.auth-feature i {
    color: var(--sapphire-primary);
    font-size: 1.2rem;
}

.auth-feature span {
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== AUTH CARD (Right Side) ===== */
.auth-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 40px;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
    animation: slideInRight 0.8s ease;
    width: 100%;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.auth-card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-card-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-card-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===== FORM STYLES ===== */
.auth-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.15s; }
.form-group:nth-child(3) { animation-delay: 0.2s; }
.form-group:nth-child(4) { animation-delay: 0.25s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group label i {
    color: var(--sapphire-primary);
}

.password-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.forgot-link {
    color: var(--sapphire-primary);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.forgot-link:hover {
    color: var(--sapphire-accent);
    text-decoration: underline;
}

.form-control {
    width: 100%;
    padding: 1rem 1.2rem;
    background: var(--card-bg-solid);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--sapphire-primary);
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
}

.form-control::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.password-toggle:hover {
    color: var(--sapphire-primary);
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

.terms-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.5s ease 0.3s forwards;
    opacity: 0;
}

.terms-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--sapphire-primary);
}

.terms-checkbox label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.terms-checkbox a {
    color: var(--sapphire-primary);
    text-decoration: none;
    font-weight: 500;
}

.terms-checkbox a:hover {
    text-decoration: underline;
}

/* ===== BUTTON STYLES ===== */
.auth-btn {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: 16px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease 0.35s forwards;
    opacity: 0;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.auth-btn:hover::before {
    left: 100%;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px var(--shadow-strong);
}

.auth-btn i {
    transition: transform 0.3s ease;
}

.auth-btn:hover i {
    transform: translateX(5px);
}

.auth-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* ===== SOCIAL DIVIDER ===== */
.social-divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
    animation: fadeInUp 0.5s ease 0.4s forwards;
    opacity: 0;
}

.social-divider::before,
.social-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 70px);
    height: 1px;
    background: var(--border-color);
}

.social-divider::before {
    left: 0;
}

.social-divider::after {
    right: 0;
}

.social-divider span {
    background: var(--card-bg);
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ===== SOCIAL BUTTON ===== */
.social-btn {
    width: 100%;
    padding: 1rem;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    animation: fadeInUp 0.5s ease 0.45s forwards;
    opacity: 0;
}

.social-btn:hover {
    border-color: var(--sapphire-primary);
    background: rgba(0, 102, 204, 0.05);
    transform: translateY(-2px);
}

.social-btn i {
    font-size: 1.2rem;
    color: var(--sapphire-primary);
}

/* ===== FOOTER TEXT ===== */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    animation: fadeInUp 0.5s ease 0.5s forwards;
    opacity: 0;
}

.auth-footer a {
    color: var(--sapphire-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-footer a:hover {
    color: var(--sapphire-accent);
    text-decoration: underline;
}

/* ===== DARK MODE ADJUSTMENTS ===== */
[data-theme="dark"] .auth-card {
    background: rgba(10, 25, 45, 0.95);
}

[data-theme="dark"] .form-control {
    background: rgba(10, 25, 45, 0.9);
    border-color: rgba(0, 163, 255, 0.3);
}

[data-theme="dark"] .form-control:focus {
    border-color: var(--sapphire-accent);
}

[data-theme="dark"] .social-btn {
    border-color: rgba(0, 163, 255, 0.3);
}

[data-theme="dark"] .social-btn:hover {
    background: rgba(0, 163, 255, 0.1);
}

[data-theme="dark"] .auth-feature {
    background: rgba(10, 25, 45, 0.9);
}

[data-theme="dark"] .toolkit-menu,
[data-theme="dark"] .profile-menu,
[data-theme="dark"] .mobile-nav {
    background: rgba(10, 25, 45, 0.98);
}

[data-theme="dark"] .password-toggle {
    color: var(--text-secondary);
}

[data-theme="dark"] .password-toggle:hover {
    color: var(--sapphire-accent);
}

/* ===== RESPONSIVE STYLES ===== */
@media screen and (max-width: 992px) {
    .auth-section {
        padding: 1rem;
    }
    
    .auth-hero {
        text-align: center;
    }
    
    .auth-features {
        align-items: center;
    }
    
    .auth-feature:hover {
        transform: translateY(-5px) translateX(0);
    }
    
    .auth-card {
        padding: 2rem;
    }
}

@media screen and (max-width: 768px) {
    .auth-section {
        margin-top: 65px;
    }
    
    .auth-card-header h2 {
        font-size: 1.8rem;
    }
    
    .form-control {
        padding: 0.9rem 1rem;
    }
    
    .social-divider::before,
    .social-divider::after {
        width: calc(50% - 50px);
    }
}

@media screen and (max-width: 480px) {
    .auth-card {
        padding: 1.5rem;
        border-radius: 30px;
    }
    
    .auth-card-header h2 {
        font-size: 1.6rem;
    }
    
    .auth-hero-title {
        font-size: 2rem;
    }
    
    .auth-feature {
        width: 100%;
        justify-content: center;
    }
    
    .password-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .social-divider::before,
    .social-divider::after {
        width: calc(50% - 40px);
    }
    
    .terms-checkbox {
        flex-wrap: wrap;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}



/* ===== PASSWORD TOGGLE BUTTON STYLES - FIXED ===== */
.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-toggle {
    position: absolute !important;  /* Forcefully position fixed rakho */
    right: 1rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;  /* Z-index barhao */
    width: auto;
    height: auto;
    line-height: 1;
}

.password-toggle:hover {
    color: var(--sapphire-primary);
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.95) !important;
}

/* Ensure input field has proper padding */
.form-control {
    width: 100%;
    padding: 1rem 3rem 1rem 1.2rem !important;  /* Right side extra padding for button */
    background: var(--card-bg-solid);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

/* Dark mode support */
[data-theme="dark"] .password-toggle {
    color: var(--text-secondary);
}

[data-theme="dark"] .password-toggle:hover {
    color: var(--sapphire-accent);
}