/* ============================================
   Landing Page & Login Styles
   ============================================ */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --light: #f8fafc;
    --white: #ffffff;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --gradient-3: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-md: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 25px rgba(0,0,0,0.15);
    --shadow-xl: 0 25px 50px rgba(0,0,0,0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    color: var(--dark);
    overflow-x: hidden;
}

/* ============================================
   Navbar
   ============================================ */
#mainNav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

#mainNav.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-size: 1.4rem;
    color: var(--primary) !important;
    font-weight: 800;
}

.nav-link {
    font-weight: 600;
    color: var(--dark) !important;
    margin: 0 0.5rem;
    transition: color 0.3s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s;
    transform: translateX(50%);
}

.nav-link:hover::after {
    width: 70%;
}

.nav-link:hover {
    color: var(--primary) !important;
}

.btn-login {
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    background: var(--gradient-2);
    color: var(--white);
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 3rem 0;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.badge-hero {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.8;
    max-width: 550px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn-hero {
    padding: 0.9rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.btn-hero-outline {
    padding: 0.9rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    border: 2px solid rgba(255,255,255,0.5);
    color: var(--white);
    transition: all 0.3s;
}

.btn-hero-outline:hover {
    background: var(--white);
    color: var(--primary);
    transform: translateY(-3px);
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.hero-stats .stat h3 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    color: #fbbf24;
}

.hero-stats .stat p {
    margin: 0;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Dashboard Mockup */
.hero-visual {
    position: relative;
    z-index: 2;
    animation: fadeInRight 1.2s ease;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.dashboard-mockup {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0,0,0,0.3);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: all 0.5s;
}

.dashboard-mockup:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.mockup-header {
    background: #f1f5f9;
    padding: 1rem 1.5rem;
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.mockup-body {
    display: flex;
    min-height: 400px;
}

.mockup-sidebar {
    width: 60px;
    background: var(--dark);
    padding: 1.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-item {
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
}

.sidebar-item.active {
    background: var(--primary);
}

.mockup-content {
    flex: 1;
    padding: 1.5rem;
    background: var(--light);
}

.mockup-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mockup-card {
    height: 70px;
    border-radius: 10px;
}

.mockup-card.blue { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.mockup-card.green { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.mockup-card.orange { background: linear-gradient(135deg, #fed7aa, #fdba74); }

.mockup-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    height: 180px;
    padding: 1rem;
    background: var(--white);
    border-radius: 10px;
}

.bar {
    flex: 1;
    background: var(--gradient-2);
    border-radius: 6px 6px 0 0;
    transition: all 0.3s;
    animation: growBar 1.5s ease;
}

@keyframes growBar {
    from { height: 0; }
}

/* ============================================
   Features Section
   ============================================ */
.features {
    padding: 6rem 0;
    background: var(--light);
}

.section-header {
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--secondary);
    font-size: 1.1rem;
}

.feature-card {
    background: var(--white);
    padding: 2rem 1.5rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s;
    height: 100%;
    border: 1px solid #e2e8f0;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--white);
    transition: all 0.4s;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(-5deg);
}

.feature-icon.blue { background: var(--gradient-2); box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3); }
.feature-icon.green { background: var(--gradient-3); box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3); }
.feature-icon.orange { background: linear-gradient(135deg, #f59e0b, #ea580c); box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3); }
.feature-icon.purple { background: var(--gradient-1); box-shadow: 0 10px 25px rgba(118, 75, 162, 0.3); }

.feature-card h4 {
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 1.15rem;
}

.feature-card p {
    color: var(--secondary);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ============================================
   How it works
   ============================================ */
.how-it-works {
    padding: 6rem 0;
    background: var(--white);
}

.step-card {
    position: relative;
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: var(--light);
    border-radius: 20px;
    transition: all 0.4s;
    height: 100%;
}

.step-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    position: absolute;
    top: -20px;
    right: 50%;
    transform: translateX(50%);
    width: 50px;
    height: 50px;
    background: var(--gradient-2);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
}

.step-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin: 1rem 0 1.5rem;
}

.step-card h4 {
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.step-card p {
    color: var(--secondary);
    margin: 0;
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
    padding: 4rem 0;
    background: var(--light);
}

.cta-box {
    background: var(--gradient-2);
    color: var(--white);
    padding: 4rem 2rem;
    border-radius: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(37, 99, 235, 0.3);
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.cta-box h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.cta-box p {
    font-size: 1.15rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.cta-box .btn {
    position: relative;
    z-index: 2;
    padding: 0.9rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    color: var(--primary);
    transition: all 0.3s;
}

.cta-box .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 4rem 0 2rem;
}

.footer h5 {
    color: var(--white);
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.footer p {
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s;
}

.footer-links a:hover {
    color: var(--white);
    padding-right: 5px;
}

.footer hr {
    border-color: rgba(255,255,255,0.1);
    margin: 2rem 0 1.5rem;
}

/* ============================================
   Login Page
   ============================================ */
.login-page {
    min-height: 100vh;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1100px;
    width: 100%;
    background: var(--white);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    min-height: 600px;
}

.login-visual {
    background: var(--gradient-2);
    color: var(--white);
    padding: 3rem;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.login-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 70%, rgba(255,255,255,0.15) 0%, transparent 50%);
}

.visual-content {
    position: relative;
    z-index: 2;
}

.back-link {
    display: inline-block;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    margin-bottom: 2rem;
    font-weight: 600;
    transition: all 0.3s;
}

.back-link:hover {
    color: var(--white);
    transform: translateX(-5px);
}

.visual-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.visual-content h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.visual-content > p {
    font-size: 1.05rem;
    opacity: 0.9;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.visual-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.visual-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.visual-feature i {
    color: #fbbf24;
    font-size: 1.1rem;
}

.login-form-wrapper {
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form {
    width: 100%;
    max-width: 400px;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.form-header p {
    color: var(--secondary);
    margin: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
    background: var(--light);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--secondary);
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: var(--primary);
}

.btn-login-submit {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.3s;
    background: var(--gradient-2);
    border: none;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.btn-login-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.4);
}

.form-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--secondary);
    font-size: 0.9rem;
}

.form-footer p {
    margin: 0;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 991px) {
    .hero-content {
        text-align: center;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-visual {
        margin-top: 3rem;
    }
    
    .dashboard-mockup {
        transform: none;
    }
    
    .login-container {
        grid-template-columns: 1fr;
    }
    
    .login-visual {
        display: none;
    }
}

@media (max-width: 767px) {
    .hero {
        padding-top: 100px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .hero-stats .stat h3 {
        font-size: 1.5rem;
    }
    
    .features,
    .how-it-works {
        padding: 4rem 0;
    }
    
    .cta-box {
        padding: 3rem 1.5rem;
    }
    
    .login-form-wrapper {
        padding: 2rem 1.5rem;
    }
    
    .mockup-cards {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Animations
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}