* {
  font-family: 'Cairo', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #ee5f06;
  --secondary-color: #f4bf3a;
  --text-color: #333;
  --background-light: #fffaf2;
  --success-color: #28a745;
  --error-color: #dc3545;
  --warning-color: #ffc107;
}

body {
  background: linear-gradient(135deg, #fffaf2, #fff2e0);
  min-height: 100vh;
  color: var(--text-color);
}

/* قسم إدخال الـ ID */
.client-id-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  padding: 40px;
  width: 100%;
  max-width: 500px;
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-header h1 {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 10px;
}

.login-header p {
  color: #666;
  font-size: 1.1rem;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(238, 95, 6, 0.1);
}

.form-hint {
  font-size: 0.9rem;
  color: #666;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-hint i {
  color: var(--primary-color);
}

.submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.submit-btn:hover {
  background: #d35400;
  transform: translateY(-2px);
}

.help-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.help-link {
  color: var(--primary-color);
  text-decoration: none;
  text-align: center;
  padding: 10px;
  border: 1px solid var(--primary-color);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.help-link:hover {
  background: var(--primary-color);
  color: white;
}

/* شريط معلومات العميل */
.client-info-bar {
  background: white;
  padding: 15px 20px;
  border-bottom: 2px solid var(--secondary-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.client-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.client-id-badge {
  background: var(--secondary-color);
  color: var(--text-color);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
}

.logout-btn {
  background: none;
  border: 1px solid var(--error-color);
  color: var(--error-color);
  padding: 8px 15px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  background: var(--error-color);
  color: white;
}

/* واجهة الطلب الرئيسية */
#main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.order-header {
  text-align: center;
  margin-bottom: 30px;
}

.order-header h1 {
  color: var(--primary-color);
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.subtitle {
  color: #666;
  font-size: 1.2rem;
}

/* أقسام الطلب */
.order-section {
  background: white;
  padding: 25px;
  border-radius: 15px;
  margin-bottom: 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.section-title {
  color: var(--primary-color);
  margin-bottom: 20px;
  font-size: 1.3rem;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 10px;
}

/* خيارات مكان الأكل */
.dining-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.dining-option {
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dining-option:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.dining-option.selected {
  border-color: var(--primary-color);
  background: rgba(238, 95, 6, 0.05);
}

.dining-option i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.dining-option h4 {
  color: var(--text-color);
  margin: 0;
}

/* تفاصيل العميل */
.client-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.detail-item {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border-right: 4px solid var(--primary-color);
}

.detail-item strong {
  color: var(--primary-color);
  display: block;
  margin-bottom: 5px;
}

/* رسوم التوصيل */
.delivery-fee {
  background: var(--warning-color);
  color: var(--text-color);
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  margin: 15px 0;
}

/* زر إرسال الطلب */
.submit-order-btn {
  width: 100%;
  padding: 16px;
  background: #25D366;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
}

.submit-order-btn:hover {
  background: #128C7E;
  transform: translateY(-2px);
}

/* رسالة التأكيد */
#confirmation-message {
  background: var(--success-color);
  color: white;
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  margin-top: 20px;
}

#confirmation-message i {
  font-size: 3rem;
  margin-bottom: 15px;
}

/* روابط الفوتر */
.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: white;
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid var(--primary-color);
}

.footer-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* التحميل */
.loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.loading i {
  font-size: 2rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

/* أيقونة السلة */
.cart-icon {
  position: fixed;
  top: 20px;
  left: 20px;
  background: var(--primary-color);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(238, 95, 6, 0.3);
  z-index: 1000;
  transition: all 0.3s ease;
}

.cart-icon:hover {
  transform: scale(1.1);
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--error-color);
  color: white;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
}

/* النوافذ المنبثقة */
.quantity-popup,
.cart-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.quantity-content,
.cart-content {
  background: white;
  padding: 30px;
  border-radius: 15px;
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
}

.quantity-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
}

.quantity-btn {
  width: 40px;
  height: 40px;
  border: 2px solid var(--primary-color);
  background: white;
  color: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.quantity-btn:hover {
  background: var(--primary-color);
  color: white;
}

.quantity-input {
  width: 60px;
  text-align: center;
  padding: 8px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 1.1rem;
}

.popup-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.popup-buttons button {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.popup-buttons button:first-child {
  background: #6c757d;
  color: white;
}

.popup-buttons button:last-child {
  background: var(--primary-color);
  color: white;
}

.popup-buttons button:hover {
  transform: translateY(-2px);
}

/* عناصر السلة */
.cart-items {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 20px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid #e9ecef;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-info h4 {
  margin: 0;
  color: var(--text-color);
}

.cart-item-info .item-price {
  color: var(--primary-color);
  font-weight: 600;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-item-quantity {
  background: #f8f9fa;
  padding: 5px 10px;
  border-radius: 20px;
  font-weight: 600;
}

.remove-item {
  background: var(--error-color);
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ملخص السلة */
.cart-summary {
  border-top: 2px solid #e9ecef;
  padding-top: 20px;
}

.cart-summary-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 8px 0;
}

.cart-summary-item.total {
  border-top: 2px solid var(--primary-color);
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--primary-color);
  padding-top: 15px;
  margin-top: 10px;
}

/* رسائل الخطأ */
.error-message {
  color: var(--error-color);
  font-size: 0.9rem;
  margin-top: 5px;
  display: none;
}

.error-message.show {
  display: block;
}

/* النافذة المنبثقة */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.modal-content h2 {
  color: var(--success-color);
  margin-bottom: 15px;
}

.modal-content button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 15px;
}

/* التجاوب */
@media (max-width: 768px) {
  .login-container {
    padding: 30px 20px;
  }
  
  .client-info-bar {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  
  .order-header h1 {
    font-size: 2rem;
  }
  
  .dining-options {
    grid-template-columns: 1fr;
  }
  
  .client-details {
    grid-template-columns: 1fr;
  }
  
  .footer-links {
    flex-direction: column;
    align-items: center;
  }
  
  .cart-icon {
    width: 50px;
    height: 50px;
    top: 10px;
    left: 10px;
  }
}