* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Rubik", "Segoe UI", system-ui, sans-serif;
}

body {
  background: #f8f9fa;
  padding: 0;
  color: #212529;
  line-height: 1.5;
  /* تجنب التمرير غير الضروري */
  overflow-x: hidden;
}

/* --- HEADER --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #2c5aa0; /* أزرق داكن مثل الموقع */
  color: white;
  z-index: 1000;
  padding: 10px 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: bold;
}

.logo i {
  font-size: 24px;
}

.tagline {
  font-size: 14px;
  opacity: 0.9;
  text-align: center;
}

.contact {
  font-size: 16px;
  margin-top: 5px;
}

.contact strong {
  font-weight: bold;
}

.search-bar {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 20px;
  padding: 8px 12px;
  margin-top: 10px;
  width: 100%;
}

.search-icon,
.clear-icon {
  color: #6c757d;
  cursor: pointer;
  margin: 0 5px;
}

.search-icon:hover,
.clear-icon:hover {
  color: #495057;
}

#searchInput {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  padding: 0 5px;
  background: transparent;
}

/* --- MAIN CONTENT --- */
.main-content {
  padding-top: 180px; /* مساحة للهيدر الثابت */
  padding-bottom: 60px; /* مساحة للشريط السفلي الثابت */
  min-height: calc(100vh - 240px); /* ضمان الحد الأدنى للارتفاع */
}

.container {
  max-width: 480px;
  margin: 0 auto;
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 22px;
  color: #0a3d62;
  font-weight: 600;
}

p {
  text-align: center;
  margin-bottom: 20px;
  color: #444;
}

.step {
  display: none;
}

.step.active {
  display: block;
}

label {
  display: block;
  margin: 16px 0 6px;
  font-weight: bold;
  color: #333;
  font-size: 15px;
}

input,
select {
  width: 100%;
  padding: 13px;
  margin-bottom: 16px;
  border: 1px solid #ced4da;
  border-radius: 8px;
  font-size: 17px;
  background: #fff;
  direction: ltr;
  text-align: left;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* إدخال نص عبري */
input[type="text"],
input[type="tel"] {
  direction: rtl;
  text-align: right;
}

/* إضافة أيقونة سؤال بجانب كل حقل */
input::before,
select::before {
  content: "?";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #6c757d;
  background: #e9ecef;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* قوائم التاريخ */
.date-group,
.expiry-group {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.date-group select,
.expiry-group select {
  flex: 1;
}

/* زر */
button {
  width: 100%;
  padding: 15px;
  background: #0a3d62;
  color: white;
  font-size: 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button:hover {
  background: #074166;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* أخطاء */
.error {
  color: #e53e3e;
  text-align: center;
  font-size: 14px;
  margin-top: -12px;
  margin-bottom: 12px;
}

/* أيقونة نجاح */
.success-icon {
  font-size: 48px;
  color: #38a169;
  text-align: center;
  margin-bottom: 10px;
}

/* لودنج دائري حكومي */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(10, 61, 98, 0.2);
  border-top: 4px solid #0a3d62;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* --- FOOTER TOOLBAR --- */
.footer-toolbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #2c5aa0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 0;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.toolbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: white;
  font-size: 12px;
  cursor: pointer;
  padding: 5px 10px;
  transition: all 0.2s ease;
}

.toolbar-item i {
  font-size: 20px;
  margin-bottom: 4px;
}

.toolbar-item:hover {
  opacity: 0.9;
}

.menu-toggle {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  padding: 8px;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 480px) {
  .container { padding: 18px; border-radius: 10px; }
  h2 { font-size: 20px; }
  input, select, button { font-size: 16px; padding: 12px; }

  /* تعديل الهيدر للهواتف */
  .header {
    padding: 8px 10px;
  }

  .logo {
    font-size: 18px;
  }

  .tagline {
    font-size: 12px;
  }

  .contact {
    font-size: 14px;
  }

  .search-bar {
    padding: 6px 10px;
  }

  #searchInput {
    font-size: 14px;
  }

  /* تعديل الشريط السفلي */
  .footer-toolbar {
    padding: 8px 0;
  }

  .toolbar-item {
    font-size: 11px;
  }

  .toolbar-item i {
    font-size: 18px;
  }
}

/* دعم إدخال أرقام الهاتف */
input#phone {
  direction: ltr;
  text-align: left;
  font-family: monospace;
}