@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #3b82f6; 
    --sidebar-bg: #1e1e2d;
    --bg-color: #f4f7fe; 
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --border-color: #e5e7eb;
}

body { font-family: 'Poppins', sans-serif; background-color: var(--bg-color); color: var(--text-main); margin: 0; direction: ltr; overflow-x: hidden;}
.hidden { display: none !important; }

/* =========================================
   1. LANDING PAGE
========================================= */
.landing-wrapper { background: #ffffff; min-height: 100vh; display: flex; flex-direction: column; }
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 15px 50px; background: white; box-shadow: 0 4px 20px rgba(0,0,0,0.03); position: sticky; top: 0; z-index: 1000;}
.nav-logo { display: flex; align-items: center; text-decoration: none;}
.logo-img { height: 40px; width: auto; max-width: 180px;} 
.nav-buttons { display: flex; gap: 15px; }
.btn-nav-login { padding: 10px 20px; font-weight: 600; color: var(--text-main); background: transparent; border: 1px solid #e4e6ef; border-radius: 8px; cursor: pointer; transition: 0.3s; }
.btn-nav-login:hover { background: #f5f8fa; }
.btn-nav-register { padding: 10px 20px; font-weight: 600; color: white; background: var(--primary); border: none; border-radius: 8px; cursor: pointer; transition: 0.3s; }

.hero-sec { padding: 100px 20px; text-align: center; background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%); position: relative; overflow: hidden;}
.hero-badge { display: inline-block; padding: 8px 16px; background: #e0f2fe; color: var(--primary); border-radius: 50px; font-size: 14px; font-weight: 700; margin-bottom: 20px; }
.hero-title { font-size: 55px; font-weight: 800; color: #181c32; margin: 0 0 20px 0; line-height: 1.2;}
.hero-title span { color: var(--primary); }
.hero-desc { font-size: 18px; color: #4b5563; max-width: 600px; margin: 0 auto 40px auto; line-height: 1.6;}
.hero-buttons { display: flex; justify-content: center; gap: 20px; }
.btn-huge { padding: 15px 35px; font-size: 16px; font-weight: 700; border-radius: 10px; cursor: pointer; border: none; transition: 0.3s; background: var(--primary); color: white;}

/* Features Grid (البطاقات الثلاثة) */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 40px; padding: 20px; }

/* =========================================
   2. AUTH SCREENS
========================================= */
.auth-wrapper { background-color: var(--bg-color); min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding-top: 20px; padding-bottom: 40px; }
.auth-top-nav { width: 95%; max-width: 1300px; background: white; border-radius: 50px; display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; box-sizing: border-box; box-shadow: 0 2px 10px rgba(0,0,0,0.02); }
.auth-nav-center { display: flex; align-items: center; gap: 15px; }
.auth-nav-center a { text-decoration: none; color: #4b5563; font-weight: 500; margin: 0 10px; font-size: 14px; }
.auth-nav-center a:hover, .auth-nav-center a.active { color: var(--primary); }
.btn-auth-signin { background: white; border: none; padding: 8px 20px; border-radius: 20px; color: var(--primary); font-weight: 600; cursor: pointer; font-size: 14px; box-shadow: 0 2px 5px rgba(0,0,0,0.05);}
.btn-auth-signup { background: var(--primary); border: none; padding: 10px 25px; border-radius: 25px; color: white; font-weight: 600; cursor: pointer; font-size: 14px; display: flex; align-items: center; gap: 8px;}

.auth-main-card { width: 95%; max-width: 1300px; background-color: var(--primary); border-radius: 20px; margin-top: 30px; display: flex; min-height: 600px; box-sizing: border-box; overflow: hidden; }
.auth-left-content { flex: 1.2; padding: 60px; color: white; display: flex; flex-direction: column; justify-content: center; }
.auth-badge-panel { background: white; color: var(--primary); padding: 6px 15px; border-radius: 20px; font-size: 12px; font-weight: 700; display: inline-block; width: fit-content; margin-bottom: 20px; }
.auth-left-content h1 { font-size: 42px; font-weight: 800; margin: 0 0 20px 0; line-height: 1.2;}
.auth-left-content p { font-size: 16px; margin-bottom: 20px; line-height: 1.6; opacity: 0.9;}

.auth-right-form { flex: 0.8; display: flex; align-items: center; justify-content: center; padding: 30px; }
.form-box { background: white; width: 100%; max-width: 450px; border-radius: 15px; padding: 40px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); box-sizing: border-box; }
.form-box h2 { font-size: 28px; font-weight: 800; color: #111827; margin: 0 0 5px 0;}
.form-subtitle { font-size: 14px; color: #6b7280; margin-bottom: 30px;}

.form-group-clean { margin-bottom: 20px; text-align: left; }
.form-group-clean label { display: block; font-size: 14px; font-weight: 600; color: #111827; margin-bottom: 8px;}
.form-group-clean input { width: 100%; padding: 12px 15px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; font-family: inherit; box-sizing: border-box; outline: none; transition: 0.2s; background: white; color: #111827;}
.form-group-clean input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);}

.form-row-options { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 25px;}
.remember-me { color: #4b5563; display: flex; align-items: center; gap: 8px; cursor: pointer;}
.forgot-link { color: var(--primary); font-weight: 600; text-decoration: none;}

.form-row-buttons { display: flex; gap: 15px; margin-bottom: 25px; flex-direction: column;}
.btn-simple-primary { width: 100%; background: var(--primary); color: white; border: none; padding: 14px; border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 8px; transition: 0.3s; }
.btn-simple-primary:hover { opacity: 0.9; }
.btn-simple-google { width: 100%; background: white; color: #374151; border: 1px solid #d1d5db; padding: 14px; border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 10px; transition: 0.3s; }
.btn-simple-google:hover { background: #f9fafb; }

.switch-link-row { margin-top: 15px; text-align: left;}
.switch-link-row a { font-size: 15px; font-weight: 700; color: #111827; text-decoration: none; display: inline-flex; align-items: center; transition: 0.2s; cursor: pointer;}
.switch-link-row a:hover { color: var(--primary); }
.switch-link-row a i { margin-left: 8px; font-size: 14px; transition: transform 0.2s;}

/* =========================================
   3. INFO PAGES & CONTACT
========================================= */
.info-page-wrapper { background-color: var(--bg-color); min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding-top: 20px; padding-bottom: 40px;}
.info-content-card { width: 95%; max-width: 1300px; background-color: var(--primary); border-radius: 20px; margin-top: 30px; padding: 60px; color: white; box-sizing: border-box; }
.info-content-card h1 { font-size: 42px; font-weight: 800; margin: 0 0 10px 0;}
.info-update-date { font-size: 14px; color: #e0f2fe; margin-bottom: 40px; opacity: 0.9;}
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.info-section { background: rgba(255,255,255,0.1); padding: 30px; border-radius: 15px; border: 1px solid rgba(255,255,255,0.2); }
.info-section h3 { font-size: 18px; font-weight: 700; margin-top: 0; margin-bottom: 15px;}
.info-section ul { padding-left: 20px; margin-bottom: 0;}
.info-section li { font-size: 14px; color: white; margin-bottom: 8px; line-height: 1.6;}
.info-text { font-size: 14px; color: white; line-height: 1.6; margin: 0;}
.info-email { color: white; text-decoration: underline; font-weight: 600;}

.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; margin-top: 50px;}
.contact-card { background: white; padding: 40px; border-radius: 20px; text-align: left; text-decoration: none; color: #111827; display: block; box-shadow: 0 10px 30px rgba(0,0,0,0.1);}
.contact-icon-row { display: flex; align-items: center; gap: 15px; margin-bottom: 15px;}
.contact-icon { font-size: 24px; color: var(--primary); }
.contact-card h3 { font-size: 18px; font-weight: 700; margin: 0;}
.contact-value { font-size: 16px; color: #4b5563; font-weight: 500;}

/* =========================================
   4. DASHBOARD
========================================= */
.dashboard-container { display: flex; min-height: 100vh; background: var(--bg-color);}
.sidebar { width: 260px; background-color: var(--sidebar-bg); color: white; display: flex; flex-direction: column; transition: transform 0.3s ease; z-index: 1000; }
.sidebar-header { padding: 20px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.05); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;}
.close-sidebar { display: none; position: absolute; right: 15px; top: 15px; background: none; border: none; color: white; font-size: 20px; cursor: pointer; }
.logo-sidebar-img { height: 35px; width: auto; max-width: 200px; margin-bottom: 10px;}
.sidebar-profile { display: flex; flex-direction: column; align-items: center; margin-top: 5px; }
.user-avatar { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.1); }
.menu-items { padding: 20px 0; list-style: none; margin: 0; }
.menu-items li { padding: 12px 25px; cursor: pointer; transition: 0.3s; color: #9899ac;}
.menu-items li:hover, .menu-items li.active { background: #1b1b29; color: white; border-right: 3px solid var(--primary); }
.menu-items li i { margin-right: 10px; width: 20px; text-align: center; }

.main-content { flex: 1; display: flex; flex-direction: column; width: 100%;}
.top-header { background: white; padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.mobile-menu-btn { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-main); }
.badge { border: 1px solid var(--border-color); padding: 8px 15px; border-radius: 8px; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.badge strong { color: var(--primary); font-size: 16px;}

.header-profile { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 5px 10px; border-radius: 8px; transition: 0.2s;}
.header-profile:hover { background: #f5f8fa; }
.header-user-email { font-size: 14px; color: #181c32; font-weight: bold;}
.header-avatar { width: 35px; height: 35px; border-radius: 50%; object-fit: cover; }

.profile-dropdown-menu { position: absolute; top: 60px; right: 30px; background: white; border: 1px solid #eff2f5; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); width: 230px; display: none; flex-direction: column; z-index: 9999; padding: 10px 0;}
.profile-dropdown-menu.show { display: flex; animation: dropDown 0.2s ease; }
@keyframes dropDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.dropdown-user-info { padding: 5px 20px 15px 20px; border-bottom: 1px solid #eff2f5; margin-bottom: 5px;}
.dropdown-user-info strong { display: block; font-size: 15px; color: #181c32; margin-bottom: 3px; font-weight: 700;}
.dropdown-item { padding: 10px 20px; color: #5e6278; font-size: 14px; text-decoration: none; display: flex; align-items: center; gap: 12px; cursor: pointer; transition: 0.2s; font-weight: 500;}
.dropdown-item:hover { background-color: #f9f9f9; }
.dropdown-item i { width: 16px; text-align: center; }
.dropdown-item.logout { border-top: 1px solid #eff2f5; color: #e63946; margin-top: 5px; padding-top: 15px;}

.content-area { padding: 30px; }
.page-sec { animation: fadeIn 0.3s ease-in-out; }

.order-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.card { background: var(--card-bg); border-radius: 12px; padding: 25px; box-shadow: 0 0 20px rgba(0,0,0,0.02); margin-bottom: 20px;}
.card-title { font-size: 18px; font-weight: bold; margin-bottom: 20px; margin-top:0;}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color:#374151;}

.category-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 15px; margin-bottom: 20px; }
.cat-card { background: white; border: 1px solid #e5e7eb; border-radius: 12px; padding: 15px 5px; text-align: center; cursor: pointer; transition: 0.3s; display: flex; flex-direction: column; align-items: center; gap: 10px;}
.cat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 15px rgba(0,0,0,0.06); }
.cat-card.active { border-color: var(--primary); background: #eff6ff; box-shadow: 0 4px 10px rgba(59, 130, 246, 0.15);}
.cat-card.active span { color: var(--primary); font-weight: 700; }
.cat-card span { font-size: 13px; font-weight: 600; color: #4b5563; }
.cat-card img { width: 35px; height: 35px; object-fit: contain; }

.form-control { width: 100%; padding: 12px 15px; border: 1px solid #d1d5db; border-radius: 8px; background-color: #f9fafb; color: #111827; box-sizing: border-box; font-family: inherit; transition: 0.3s; }
.form-control:focus { background-color: white; border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);}
.charge-input { background-color: #ecfdf5 !important; color: #10b981 !important; font-weight: bold; cursor: not-allowed;}
.btn { padding: 12px 24px; border-radius: 8px; border: none; font-weight: 600; cursor: pointer; width: 100%; transition: 0.3s; color: white; display: inline-block; text-align: center; box-sizing: border-box; }
.btn-primary { background-color: var(--primary); }
.btn-primary:hover { opacity: 0.9; transform: translateY(-2px); }

.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.custom-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; white-space: nowrap; }
.custom-table th { background-color: #f9fafb; padding: 12px 15px; color: #6b7280; font-weight: 600; border-bottom: 1px solid var(--border-color); }
.custom-table td { padding: 12px 15px; border-bottom: 1px solid var(--border-color); vertical-align: middle; }
.status-badge { padding: 5px 10px; border-radius: 4px; font-weight: bold; font-size: 12px; }
.status-pending { background: #fef3c7; color: #d97706; }
.status-processing { background: #e0e7ff; color: #4338ca; }
.status-completed { background: #d1fae5; color: #059669; }
.status-cancelled { background: #fee2e2; color: #dc2626; }

#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { padding: 15px 25px; border-radius: 8px; color: white; font-weight: 500; font-size: 14px; box-shadow: 0 5px 15px rgba(0,0,0,0.2); animation: slideIn 0.3s ease forwards; pointer-events: all; }
.toast.success { background: #10b981; }
.toast.error { background: #ef4444; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateY(100px) scale(0.9); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }

/* =========================================
   5. RESPONSIVENESS (البيسي، الطابليط، التليفون)
========================================= */

/* --- 💻 الطابليط (Tablets - under 1024px) --- */
@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .order-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 45px; }
    .auth-main-card { flex-direction: column; height: auto; }
    .auth-left-content { padding: 40px; text-align: center; }
    .auth-right-form { width: 100%; padding: 40px; }
    .form-box { max-width: 100%; }
}

/* --- 📱 الهواتف (Mobiles - under 768px) --- */
@media (max-width: 768px) {
    /* Navbar & Hero */
    .navbar { padding: 15px; flex-direction: column; gap: 15px; text-align: center; }
    .nav-buttons { display: flex; flex-direction: column; width: 100%; gap: 10px; }
    .btn-nav-login, .btn-nav-register { width: 100%; margin: 0; }
    .hero-sec { padding: 60px 20px; }
    .hero-title { font-size: 32px; padding: 0 10px; }
    .hero-desc { font-size: 16px; padding: 0 10px; }
    .hero-buttons { flex-direction: column; width: 100%; gap: 15px; }
    .btn-huge { width: 100%; margin: 0; }
    .features-grid { grid-template-columns: 1fr; padding: 10px; }

    /* Auth Screens */
    .auth-top-nav { flex-direction: column; gap: 10px; padding: 15px; border-radius: 15px; width: 100%;}
    .auth-nav-center { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
    .auth-main-card { margin-top: 15px; border-radius: 15px; width: 100%;}
    .auth-left-content { padding: 30px 20px; }
    .auth-left-content h1 { font-size: 28px; }
    .auth-badge-panel { margin: 0 auto 20px auto; }
    .auth-right-form { padding: 20px 15px; background: var(--bg-color); border-radius: 0 0 15px 15px;}
    .form-box { padding: 25px 20px; border-radius: 12px;}
    
    /* Info & Contact */
    .info-content-card { padding: 25px 15px; margin-top: 15px; border-radius: 15px;}
    .info-content-card h1 { font-size: 28px; }
    .info-grid, .contact-grid { grid-template-columns: 1fr; gap: 15px;}
    .contact-card { padding: 25px 20px; }

    /* Dashboard & Sidebar */
    .sidebar { position: fixed; height: 100vh; transform: translateX(-100%); width: 260px; box-shadow: 5px 0 15px rgba(0,0,0,0.5); z-index: 9999; }
    .sidebar.open { transform: translateX(0); }
    .close-sidebar, .mobile-menu-btn { display: block; }
    .top-header { padding: 15px; flex-wrap: wrap; gap: 10px; justify-content: space-between;}
    .stats-badges { order: 3; width: 100%; display: flex; justify-content: center; margin-top: 10px;}
    .badge { width: 100%; justify-content: center; }
    .content-area { padding: 15px; }
    .category-cards { grid-template-columns: repeat(2, 1fr); gap: 10px;}
    .card { padding: 20px 15px; }
}