* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif; 
}


/* تنسيق الصورة/الشعار */
.hh img {
    width: 100px;
    padding-left: 20px;
}

/* الحاوية الرئيسية التي تجمع الشعار والروابط */
.hh {
    display: flex;
    justify-content: space-between ; /* يضع اللوجو في طرف والروابط في الطرف الآخر */
    align-items: center;            /* يربطهم في المنتصف عمودياً تماماً */
    padding-top: 2px;              /* ينزل الشريط كاملاً من سقف الصفحة */
    padding-right: 50px;
    justify-content: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    
}
/* تنسيق الروابط العادي (قبل الهوفر) */
.navbar a {
  text-decoration: none;
  margin-left: 20px;
  color: #21552a; /* لون النص الأساسي قبل الهوفر (يمكنك تغييره للون الأخضر #21552a إذا أردت) */
  font-weight: 900;
  padding: 8px 16px; /* مساحة داخلية ليبدو الرابط كزر */
  border: 2px solid transparent; /* إطار شفاف في الحالة العادية لمنع اهتزاز العناصر */
  border-radius: 30px; /* تدوير الحواف */
  transition: all 0.3s ease; /* حركة انسيابية للتعويم */
}

/* حالة الهوفر (عند تمرير الماوس) */
.navbar a:hover {
  background-color: #21552a; /* خلفية باللون الأخضر */
  color: #000000;            /* تحويل لون النص للأسود */
  border: 2px solid #000000; /* إضافة خط خارجي (Border) باللون الأسود */
  
}




body {
  background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('./imgs/Gemini_Generated_Image_dnm60ddnm60ddnm6.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}


/* حاوية المحتوى الرئيسي */
.hero-section {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 30px;
  padding-right: 40px;
}

/* بطاقة المحتوى الزجاجية (تسهل قراءة النص فوق الصورة) */
.hero-content {
  background-color: rgba(0, 0, 0, 0.35); /* خلفية سوداء شفافة */
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  padding: 40px 35px;
  border-radius: 20px;
  max-width: 650px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* العنوان الرئيسي */
.hero-content h1 {
  color: #ffffff;
  font-size: 2.5rem;
  margin-bottom: 15px;
  line-height: 1.3;
}

/* تمييز كلمة مرسال باللون الأخضر */
.hero-content h1 span {
  color: #00e676; /* أو يمكنك استخدام أخضر المنيو #21552a */
}

/* النص الوصفي */
.hero-content p {
  color: #dddddd;
  font-size: 1.2rem;
  margin-bottom: 30px;
  line-height: 1.6;
}

/* تنسيق الأزرار */
.hero-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

/* الزر الرئيسي (اطلب الآن) */
.btn-primary {
  background-color: #21552a;
  color: #ffffff;
  padding: 12px 30px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  border-radius: 30px;
  border: 2px solid #21552a;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: transparent;
  color: #00e676;
  border-color: #00e676;
}

/* الزر الثانوي (استكشف المنيو) */
.btn-secondary {
  background-color: transparent;
  color: #ffffff;
  padding: 12px 30px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  border-radius: 30px;
  border: 2px solid #ffffff;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background-color: #ffffff;
  color: #000000;
}
/*............................................................................................*/

/* --- تنسيقات صفحة عنا --- */
.about-page {
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url(./imgs/about.jfif);
  background-size: cover;
  min-height: 100vh;
}


.about-container {
  padding-top: 120px;
  max-width: 750px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.about-card {
  background-color: rgba(0, 0, 0, 0.50);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  padding: 35px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #ffffff;
  line-height: 1.8;
}

.about-card h1 {
  color: #21552a; /* اللون الأخضر الخاص بك */
  margin-bottom: 15px;
  font-size: 2rem;
}

.about-card h2 {
  color: #00e676;
  margin-top: 20px;
  font-size: 1.3rem;
}

.about-card p {
  color: #ddd;
  font-size: 1.05rem;
}

.divider {
  border: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: 25px 0;
}

.features-list {
  list-style: none;
  padding-right: 0;
}

.features-list li {
  margin-bottom: 12px;
  font-size: 1rem;
  color: #eee;
}


/*......................تصميم ملف صفحة الطلبات .................................................................................*/

/* --- تنسيقات صفحة طلباتك وتتبع الخريطة --- */
.orders-page {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
              url('./imgs/orders.png') no-repeat center center fixed;
  background-size: cover;
  min-height: 100vh;
}




.orders-layout {
  padding-top: 110px;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
}

.orders-section, .map-section {
  flex: 1;
  min-width: 320px;
}

.section-title {
  color: #fff;
  margin-bottom: 20px;
  font-size: 1.4rem;
}

/* كروت الطلبات */
.order-card {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
}

.order-card.active-order {
  border-right: 5px solid #00e676; /* تمييز الطلب النشط */
}


.order-id {
  font-weight: bold;
}

/* حالات الطلب */
.order-status.delivering {
  color: #00e676;
  font-weight: bold;
}

.order-status.preparing {
  color: #ffca28;
  font-weight: bold;
}

.order-details p {
  margin: 6px 0;
  color: #ddd;
}

.price {
  color: #00e676;
  font-weight: bold;
}

.courier-info {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
  color: #ffca28;
}

/* حاوية الخريطة */
#map {
  width: 100%;
  height: 420px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}


/*................................تنسيق صفحة المطاعم.....................................................................*/

/* --- تنسيقات صفحة المطاعم والكافيهات --- */

/* الحاوية الرئيسية التي تجمع الشعار والروابط */

body.menu-page {
  background: #121212;
  color: #fff;
  min-height: 100vh;
  padding-bottom: 50px;
}

.container {
  padding-top: 100px;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.add-restaurant-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.btn-add {
  background-color: #00e676;
  color: #000;
  font-weight: bold;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.btn-add:hover {
  background-color: #00b359;
}

/* فورمة الإضافة */
.form-container {
  background: #1e1e1e;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 30px;
  border: 1px solid #00e676;
}

.form-container.hidden {
  display: none;
}

.form-group {
  display: flex;
  gap: 15px;
  margin: 12px 0;
}

.form-group input {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #444;
  background: #2b2b2b;
  color: #fff;
}

.btn-submit {
  background-color: #00e676;
  border: none;
  padding: 10px 25px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
}

/* شبكة المطاعم */
.restaurants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.restaurant-card {
  background: #1e1e1e;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #333;
  transition: 0.3s;
}

.restaurant-card:hover {
  transform: translateY(-5px);
  border-color: #00e676;
}

.restaurant-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background-color: #2a2a2a;
}

.card-details {
  padding: 15px;
}

.card-details h3 {
  margin-bottom: 8px;
}

.card-details p {
  color: #aaa;
  font-size: 0.9rem;
  margin: 4px 0;
}

.btn-menu {
  width: 100%;
  margin-top: 12px;
  background: transparent;
  border: 1px solid #00e676;
  color: #00e676;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}

.btn-menu:hover {
  background: #00e676;
  color: #000;
}

/* النافذة المنبثقة Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #1e1e1e;
  color: #fff;
  width: 90%;
  max-width: 500px;
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #00e676;
  position: relative;
}

.close-btn {
  position: absolute;
  top: 15px;
  left: 20px;
  font-size: 28px;
  cursor: pointer;
  color: #aaa;
}

.close-btn:hover {
  color: #00e676;
}

.modal-category {
  color: #888;
  font-size: 0.9rem;
}

.modal-divider {
  margin: 15px 0;
  border-color: #333;
}

.modal-menu-list {
  margin-top: 15px;
  max-height: 300px;
  overflow-y: auto;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #333;
}

.price {
  color: #00e676;
  font-weight: bold;
  margin-left: 10px;
}

.btn-order-item {
  background: #00e676;
  border: none;
  padding: 5px 12px;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}

.btn-order-item:hover {
  background: #00b359;
}

/* زر العودة للرئيسية العائم */
.back-home-btn {
  position: fixed;
  bottom: 25px;
  left: 25px; /* يظهر في الزاوية اليسرى السفلية */
  width: 45px;
  height: 45px;
  background-color: #00e676;
  color: #000;
  border-radius: 50%; /* يجعله دائرياً */
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  font-size: 20px;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.back-home-btn:hover {
  background-color: #ffffff;
  transform: scale(1.15); /* تكبير خفيف عند التحويم بالماوس */
}

/* --- تنسيقات صفحة تسجيل الدخول الموحدة --- */
.login-page {
  background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)), 
              url('./imgs/no-bg.png') no-repeat center center fixed;
  background-size: cover;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.login-container {
  background: rgba(30, 30, 30, 0.95);
  border: 1px solid #00e676;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  padding: 30px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

.login-header {
  text-align: center;
  margin-bottom: 25px;
}

.login-logo {
  height: 60px;
  margin-bottom: 10px;
}

.login-header h2 {
  font-size: 1.4rem;
  color: #fff;
}

.login-header p {
  color: #aaa;
  font-size: 0.85rem;
  margin-top: 5px;
}

/* التبويبات Tabs */
.role-tabs {
  display: flex;
  background: #121212;
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 20px;
  border: 1px solid #333;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: #aaa;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
  font-size: 0.9rem;
}

.tab-btn.active {
  background: #00e676;
  color: #000;
}

/* الحقول */
.login-form .input-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
  text-align: right;
}

.login-form label {
  color: #ddd;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.login-form input {
  padding: 12px;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 8px;
  color: #fff;
  font-size: 0.95rem;
}

.login-form input:focus {
  outline: none;
  border-color: #00e676;
}

.btn-login-submit {
  width: 100%;
  padding: 12px;
  background: #00e676;
  border: none;
  border-radius: 8px;
  color: #000;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 10px;
  transition: 0.3s;
}

.btn-login-submit:hover {
  background: #00b359;
}

.login-footer {
  text-align: center;
  margin-top: 20px;
  color: #aaa;
  font-size: 0.85rem;
}

.login-footer a {
  color: #00e676;
  text-decoration: none;
  font-weight: bold;
}

/* كلاس الإخفاء الإجباري */
.hidden {
  display: none !important;
}


/* ==========================================
   تنسيقات واجهة السائق المحدثة (Driver Page)
   ========================================== */

body.driver-page {
  background-color: #121212;
  color: #ffffff;
  min-height: 100vh;
  padding-bottom: 60px;
}

/* حالة السائق في الهيدر */
.driver-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: bold;
}

.btn-status {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #00e676;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  background: rgba(0, 230, 118, 0.15);
  color: #00e676;
  transition: 0.3s;
}

.btn-status:hover {
  background: #00e676;
  color: #000;
}

/* إحصائيات السائق (الأرباح والطلبات) */
.driver-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: #1e1e1e;
  padding: 22px;
  border-radius: 14px;
  border: 1px solid #333;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: #00e676;
}

.stat-card h3 {
  font-size: 1.1rem;
  color: #aaa;
}

.stat-num {
  font-size: 2rem;
  color: #00e676;
  font-weight: 800;
  margin-top: 8px;
}

/* قسم الخريطة */
.map-section {
  background: #1e1e1e;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid #333;
  margin-bottom: 35px;
}

.map-section h2 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: #fff;
}

#driverMap {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  z-index: 1; /* عشان ما يغطي على الهيدر */
}

/* شبكة وقائمة الطلبات المتاحة */
.available-orders {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.order-card {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: 0.3s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.order-card:hover {
  border-color: #00e676;
  transform: translateY(-4px);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #333;
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.order-id {
  font-weight: bold;
  color: #fff;
  background: #2b2b2b;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
}

.delivery-fee {
  color: #00e676;
  font-weight: bold;
  font-size: 0.95rem;
}

.order-details p {
  margin: 8px 0;
  color: #ccc;
  font-size: 0.95rem;
  line-height: 1.5;
}

.order-details strong {
  color: #fff;
}

.btn-accept {
  width: 100%;
  margin-top: 18px;
  background: #00e676;
  color: #000;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.3s ease;
}

.btn-accept:hover {
  background: #00b359;
  box-shadow: 0 0 12px rgba(0, 230, 118, 0.4);
}




/* ==========================================
   تنسيقات صفحة الملف الشخصي (Profile Page)
   ========================================== */

body.profile-page {
  background-color: #121212;
  color: #fff;
  min-height: 100vh;
  padding-bottom: 60px;
}

/* كارت ترويسة المستخدم */
.profile-header-card {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 16px;
  padding: 25px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.profile-avatar {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  background: #2a2a2a;
  border: 2px solid #00e676;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2.2rem;
  color: #00e676;
}

.profile-info h2 {
  font-size: 1.4rem;
  margin-bottom: 5px;
}

.profile-info p {
  color: #aaa;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.user-badge {
  background: rgba(0, 230, 118, 0.15);
  color: #00e676;
  border: 1px solid #00e676;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
}

/* قائمة الخيارات */
.profile-options h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: #ddd;
}

.option-item {
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  transition: 0.3s ease;
}

.option-item:hover {
  border-color: #00e676;
  background: #252525;
  transform: translateX(-3px);
}

.option-title {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 0.95rem;
  font-weight: 600;
}

.option-title i {
  font-size: 1.2rem;
  color: #00e676;
  width: 25px;
  text-align: center;
}

.arrow-icon {
  color: #666;
  font-size: 0.85rem;
}

.option-value {
  color: #00e676;
  font-size: 0.85rem;
  font-weight: bold;
}

/* خيار مميز: التسجيل ككابتن */
.highlight-option {
  border: 1px solid #00e676;
  background: rgba(0, 230, 118, 0.08);
}

.highlight-option:hover {
  background: rgba(0, 230, 118, 0.2);
}

.icon-highlight {
  color: #00e676 !important;
}

/* خيار تسجيل الخروج */
.logout-option {
  border-color: #ff5252;
  margin-top: 25px;
}

.logout-option i, .logout-option span {
  color: #ff5252 !important;
}

.logout-option:hover {
  background: rgba(255, 82, 82, 0.15);
  border-color: #ff5252;
}


/* --- ضبط الهيدر الأصلي مع الدائرة --- */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 25px;
  position: relative;
}

.profile-dropdown-container {
  position: relative;
}

/* الدائرة الصغيرة جهة اليمين */
.profile-avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #2a2a2a;
  border: 2px solid #00e676;
  color: #00e676;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.profile-avatar-btn:hover {
  background: #00e676;
  color: #000;
  transform: scale(1.08);
}

/* القائمة المنسدلة من الدائرة */
.profile-dropdown-menu {
  position: absolute;
  top: 50px;
  right: 0;
  width: 220px;
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 8px 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
  z-index: 1000;
}

.user-quick-info {
  padding: 8px 15px;
  display: flex;
  flex-direction: column;
}

.user-quick-info strong {
  color: #fff;
  font-size: 0.9rem;
}

.user-quick-info small {
  color: #aaa;
  font-size: 0.75rem;
}

.badge-client {
  background: rgba(0, 230, 118, 0.15);
  color: #00e676;
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 8px;
  width: fit-content;
  margin-top: 4px;
}

.dropdown-divider {
  border: none;
  border-top: 1px solid #333;
  margin: 5px 0;
}

.dropdown-item {
  padding: 10px 15px;
  color: #ddd;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: 0.2s;
}

.dropdown-item i {
  color: #00e676;
  width: 16px;
}

.dropdown-item:hover {
  background: #2a2a2a;
  color: #fff;
}

.highlight-driver {
  color: #00e676 !important;
  font-weight: bold;
}

.logout-item {
  color: #ff5252 !important;
}

.logout-item i {
  color: #ff5252 !important;
}

.logout-item:hover {
  background: rgba(255, 82, 82, 0.15);
}



/* ==========================================
   تنسيقات التجاوب الذكي بدون تغيير هيكل الهيدر
   ========================================== */

/* 1️⃣ الحفاظ على الهيدر في سطر واحد بدون تداخل */
.navbar {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: nowrap !important; /* منع أي عنصر من الخروج لسطر جديد */
  padding: 10px 15px;
  gap: 10px;
}

/* التكيف الذكي لروابط الهيدر والشعار */
.logo img {
  max-height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap; /* منع انقسام الكلمات */
}

.nav-links a {
  font-size: 0.88rem;
  padding: 4px 6px;
}

/* 2️⃣ تجاوب الشاشات المتوسطة والصغيرة (الموبايل والتابلت: 768px وأقل) */
@media (max-width: 768px) {
  
  /* تصغير حجم نصوص وروابط الهيدر قليلاً ليتناسب مع شاشة الموبايل */
  .nav-links a {
    font-size: 0.75rem;
    padding: 2px 4px;
  }
  
  .logo img {
    max-height: 32px;
  }

  .profile-avatar-btn {
    width: 35px;
    height: 35px;
    font-size: 0.85rem;
  }

  /* إعادة اصطفاف كروت المحتوى في جسم الصفحة فقط (لتصبح كارت تحت الآخر) */
  .driver-stats,
  .available-orders,
  .restaurants-grid,
  .menu-grid {
    grid-template-columns: 1fr !important;
    gap: 15px;
  }

  /* تصغير حجم الخريطة لتناسب الشاشة */
  #driverMap {
    height: 260px !important;
  }

  /* تصغير حاوي الدخول والملف الشخصي */
  .login-container,
  .profile-header-card {
    padding: 18px 12px;
  }
}

/* 3️⃣ للشاشات الصغيرة جداً (أقل من 480px) */
@media (max-width: 480px) {
  .navbar {
    padding: 8px 10px;
  }

  .nav-links a {
    font-size: 0.7rem;
  }

  /* تقليل المسافات الداخلية للكروت والأزرار */
  .order-card, .stat-card {
    padding: 14px;
  }

  .btn-accept, .btn-login-submit {
    font-size: 0.9rem;
    padding: 10px;
  }
}

/* مكونات الربط مع Supabase */
.app-message { margin: 14px 0; padding: 12px 16px; border-radius: 10px; background: #e8f4fd; color: #174d70; text-align: center; }
.app-message.success { background: #e8f8ee; color: #176b37; }
.app-message.error { background: #fdecec; color: #9b1c1c; }
.floating-message { position: fixed; z-index: 3000; top: 80px; left: 50%; transform: translateX(-50%); max-width: 90%; }
.loading-state, .empty-state { padding: 24px; text-align: center; color: #667; background: rgba(255,255,255,.85); border-radius: 12px; }
button:disabled { opacity: .65; cursor: wait; }
.cart-panel { margin: 30px 0; background: #fff; padding: 22px; border-radius: 16px; box-shadow: 0 8px 25px rgba(0,0,0,.08); }
.cart-panel h2 { display: flex; justify-content: space-between; }
.cart-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #eee; }
.cart-row button { border: 0; background: #ffe6e6; color: #b00020; border-radius: 50%; width: 28px; height: 28px; cursor: pointer; }
.cart-total { font-size: 1.05rem; margin: 18px 0; }
.checkout-form, .profile-edit-form { display: grid; gap: 15px; }
.checkout-form label, .profile-edit-form label { display: grid; gap: 7px; font-weight: 700; }
.checkout-form input, .checkout-form select, .profile-edit-form input, .profile-edit-form select { width: 100%; padding: 12px; border: 1px solid #ccd3d8; border-radius: 9px; font: inherit; box-sizing: border-box; }
.profile-edit-form { margin: 15px 0 28px; }
.active-driver-order { margin: 25px 0; }
.order-status.pending { background: #fff3cd; color: #7a5a00; }
.order-status.accepted, .order-status.picked_up { background: #dbeafe; color: #174ea6; }
.order-status.delivering { background: #e8f8ee; color: #176b37; }
.order-status.completed { background: #eee; color: #555; }

@media (max-width: 700px) {
  .cart-panel { padding: 15px; }
  .cart-row { grid-template-columns: 1fr auto; }
  .cart-row button { grid-column: 2; }
}
