/* ===== CSS Variables ===== */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --success: #16a34a;
  --success-light: #dcfce7;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --info: #2563eb;
  --info-light: #dbeafe;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --transition: 0.2s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===== App Shell ===== */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: #fff;
  position: relative;
}

/* ===== Header ===== */
.app-header {
  background: var(--primary);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.app-header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-header .logo-icon {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}

.app-header h1 {
  font-size: 1.2rem;
  font-weight: 600;
}

.app-header .subtitle {
  font-size: 0.75rem;
  opacity: 0.85;
  font-weight: 400;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-logout {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background var(--transition);
}

.btn-logout:hover {
  background: rgba(255,255,255,0.25);
}

.user-greeting {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-right: 4px;
}

/* ===== Auth Page ===== */
.auth-page {
  padding: 40px 20px 20px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo-icon {
  width: 72px;
  height: 72px;
  background: var(--primary);
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
  box-shadow: var(--shadow-lg);
}

.auth-logo h2 {
  font-size: 1.5rem;
  color: var(--gray-900);
}

.auth-logo p {
  font-size: 0.9rem;
  color: var(--gray-500);
  margin-top: 4px;
}

/* ===== Tab Toggle ===== */
.auth-tabs {
  display: flex;
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  transition: all var(--transition);
}

.auth-tab.active {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow);
}

/* ===== Forms ===== */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: var(--gray-800);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input::placeholder {
  color: var(--gray-400);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-primary {
  width: 100%;
  padding: 13px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform 0.1s;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===== Screens ===== */
.screen {
  display: none;
  padding: 16px 20px 90px;
}

.screen.active {
  display: block;
}

/* ===== Home Screen ===== */
.home-welcome {
  text-align: center;
  padding: 32px 0 24px;
}

.home-welcome h2 {
  font-size: 1.4rem;
  color: var(--gray-900);
}

.home-welcome p {
  color: var(--gray-500);
  margin-top: 4px;
}

.home-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: #fff;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  text-align: left;
}

.home-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.home-card:active {
  transform: scale(0.98);
}

.home-card-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
}

.home-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gray-800);
}

.home-card-desc {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-top: 2px;
}

.notif-icon {
  background: #fef3c7 !important;
  color: #d97706 !important;
}

/* ===== Screen Header (back button) ===== */
.screen-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-100);
}

.screen-header h3 {
  font-size: 1.1rem;
  color: var(--gray-800);
}

.btn-back {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
}

/* ===== Bottom Navigation ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  background: #fff;
  border-top: 1px solid var(--gray-200);
  padding: 6px 0;
  padding-bottom: env(safe-area-inset-bottom, 6px);
  z-index: 200;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  transition: color var(--transition);
}

.bottom-nav-item.active {
  color: var(--primary);
}

.nav-icon {
  font-size: 1.3rem;
}

.nav-label {
  font-size: 0.7rem;
  font-weight: 600;
}

/* ===== Category Filter ===== */
.category-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.category-btn {
  padding: 8px 18px;
  border: 1.5px solid var(--gray-200);
  border-radius: 50px;
  background: #fff;
  color: var(--gray-600);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}

.category-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===== Test Cards ===== */
.test-card {
  background: #fff;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  transition: border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.test-card:active {
  transform: scale(0.99);
}

.test-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.test-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.test-card-left {
  flex: 1;
  margin-right: 12px;
}

.test-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.test-card-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gray-800);
}

.test-card-name-ar {
  font-size: 0.85rem;
  color: var(--gray-500);
  direction: rtl;
  margin-top: 2px;
  margin-bottom: 4px;
}

.test-card-price {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
  white-space: nowrap;
}

.test-card-price::after {
  content: ' IQD';
  font-size: 0.7rem;
  font-weight: 500;
}

.test-card-check {
  width: 24px;
  height: 24px;
  border: 2px solid var(--gray-300);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: transparent;
  transition: all var(--transition);
  flex-shrink: 0;
}

.test-card.selected .test-card-check {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-test {
  background: var(--info-light);
  color: var(--info);
}

.badge-panel {
  background: #f5f3ff;
  color: #7c3aed;
}

.test-card-includes {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--gray-500);
  padding-top: 10px;
  border-top: 1px solid var(--gray-100);
}

.test-card-includes span {
  color: var(--gray-600);
  font-weight: 500;
}

/* ===== Cart Bar ===== */
.cart-bar {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 448px;
  background: var(--gray-900);
  color: #fff;
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 150;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.cart-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.cart-count {
  background: var(--primary);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.cart-total {
  font-weight: 700;
  margin-left: 4px;
}

.cart-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.cart-btn:active {
  background: var(--primary-dark);
}

/* ===== Review Screen ===== */
.review-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
}

.review-item-info {
  flex: 1;
}

.review-item-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gray-800);
}

.review-item-name-ar {
  font-size: 0.8rem;
  color: var(--gray-500);
  direction: rtl;
}

.review-item-price {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.95rem;
  white-space: nowrap;
}

.review-item-remove {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 8px;
  margin-left: 8px;
}

.review-footer {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 448px;
  background: #fff;
  border-top: 2px solid var(--gray-100);
  padding: 16px;
  border-radius: var(--radius);
  box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
  z-index: 150;
}

.review-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
}

/* ===== Success Screen ===== */
.success-content {
  text-align: center;
  padding: 60px 20px;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--success-light);
  color: var(--success);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.success-content h2 {
  color: var(--gray-900);
  margin-bottom: 8px;
}

.success-content p {
  color: var(--gray-500);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Legacy - keep for admin */
.btn-order {
  margin-top: 12px;
  width: 100%;
  padding: 10px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform 0.1s;
}

.btn-order:hover {
  background: var(--primary-dark);
}

.btn-order:active {
  transform: scale(0.98);
}

.btn-order:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== Order Cards ===== */
.order-card {
  background: #fff;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.order-card-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gray-800);
}

.badge-pending {
  background: var(--warning-light);
  color: var(--warning);
}

.badge-processing {
  background: var(--info-light);
  color: var(--info);
}

.badge-completed {
  background: var(--success-light);
  color: var(--success);
}

.order-card-date {
  font-size: 0.82rem;
  color: var(--gray-400);
}

.order-card-result {
  margin-top: 8px;
  padding: 10px;
  background: var(--success-light);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--success);
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--gray-400);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 0.95rem;
}

/* ===== Toast ===== */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: 90%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  pointer-events: auto;
}

.toast-success {
  background: var(--success);
  color: #fff;
}

.toast-error {
  background: var(--danger);
  color: #fff;
}

.toast-info {
  background: var(--primary);
  color: #fff;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-20px); }
}

/* ===== Section Title ===== */
.section-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-400);
  margin-bottom: 12px;
  margin-top: 8px;
}

/* ===== Loading Spinner ===== */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Phone Input ===== */
.phone-input-row {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.phone-input-row:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.phone-prefix {
  padding: 12px 12px;
  background: var(--gray-100);
  color: var(--gray-600);
  font-weight: 600;
  font-size: 0.95rem;
  border-right: 1.5px solid var(--gray-200);
  white-space: nowrap;
}

.phone-input-row input {
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  flex: 1;
}

/* ===== OTP Styles ===== */
.otp-info {
  text-align: center;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
}

.otp-info p {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 4px;
}

.otp-info strong {
  font-size: 1.1rem;
  color: var(--primary-dark);
  direction: ltr;
  unicode-bidi: embed;
}

.otp-info .small-text {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 8px;
  margin-bottom: 0;
}

.otp-timer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 16px;
}

.btn-link {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  margin-top: 8px;
  transition: color var(--transition);
}

.btn-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}


/* ===== QR Code Screen ===== */
.qr-image {
  width: 260px;
  height: 260px;
  margin: 20px auto;
  display: block;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.qr-ref {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 12px;
  letter-spacing: 0.05em;
}

.qr-actions {
  margin-top: 24px;
}

.btn-outline {
  background: transparent !important;
  color: var(--primary) !important;
  border: 2px solid var(--primary) !important;
}

.btn-outline:hover {
  background: var(--primary-light) !important;
}

.btn-show-qr {
  margin-top: 10px;
  width: 100%;
  padding: 8px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.btn-show-qr:hover {
  background: var(--primary);
  color: #fff;
}

.order-card-ref {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 4px;
  letter-spacing: 0.03em;
}

/* ===== Order Progress Stepper ===== */
.order-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  padding: 8px 0;
}

.order-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.order-progress-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gray-200);
  border: 2px solid var(--gray-300);
  transition: all var(--transition);
}

.order-progress-step.done .order-progress-dot {
  background: var(--primary);
  border-color: var(--primary);
}

.order-progress-step.active .order-progress-dot {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.order-progress-label {
  font-size: 0.7rem;
  color: var(--gray-400);
  margin-top: 4px;
  font-weight: 500;
  white-space: nowrap;
}

.order-progress-step.done .order-progress-label,
.order-progress-step.active .order-progress-label {
  color: var(--primary);
  font-weight: 600;
}

.order-progress-line {
  width: 40px;
  height: 3px;
  background: var(--gray-200);
  margin: 0 4px;
  margin-bottom: 18px;
  border-radius: 2px;
  transition: background var(--transition);
}

.order-progress-line.done {
  background: var(--primary);
}

/* ===== Location Select ===== */
.location-select-section {
  margin-top: 8px;
  margin-bottom: 80px;
}

.location-select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: var(--gray-800);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.location-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ===== Location Cards ===== */
.location-card {
  background: #fff;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  position: relative;
}

.nearest-badge {
  display: inline-block;
  background: var(--success-light);
  color: var(--success);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.location-card-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--gray-800);
}

.location-card-name-ar {
  font-size: 0.9rem;
  color: var(--gray-500);
  direction: rtl;
  margin-bottom: 10px;
}

.location-card-detail {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--gray-600);
  margin-bottom: 6px;
  line-height: 1.4;
}

.location-card-detail a {
  color: var(--primary);
  text-decoration: none;
}

.location-detail-icon {
  flex-shrink: 0;
  font-size: 1rem;
}

.btn-directions {
  display: block;
  margin-top: 12px;
  text-align: center;
  padding: 10px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition);
}

.btn-directions:hover {
  background: var(--primary-dark);
}

/* ===== Maps Preview & Search ===== */
.maps-preview {
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.search-results {
  margin-top: 8px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  max-height: 250px;
  overflow-y: auto;
}

.search-result-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--primary-light);
}

.search-result-name {
  font-size: 0.85rem;
  color: var(--gray-800);
  line-height: 1.4;
}

.search-result-coords {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-top: 2px;
}

/* ===== Nearest Branch Box ===== */
.nearest-branch-box {
  margin-top: 20px;
  padding: 16px;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  text-align: center;
}

.nearest-branch-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--success);
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.nearest-branch-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
}

.nearest-branch-name-ar {
  font-size: 0.9rem;
  color: var(--gray-500);
  direction: rtl;
  margin-bottom: 4px;
}

.nearest-branch-addr {
  font-size: 0.85rem;
  color: var(--gray-600);
}

/* ===== WhatsApp Share ===== */
.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition);
}

.btn-whatsapp:hover {
  background: #1da851;
}

.btn-whatsapp:active {
  transform: scale(0.98);
}

.whatsapp-icon {
  font-size: 1.1rem;
}

/* ===== App Footer ===== */
.app-footer {
  text-align: center;
  padding: 16px 20px 80px;
  font-size: 0.75rem;
  color: var(--gray-400);
  letter-spacing: 0.03em;
}

/* ===== Hidden ===== */
.hidden {
  display: none !important;
}

/* ===== Responsive ===== */
@media (min-width: 481px) {
  .app-container {
    box-shadow: var(--shadow-lg);
  }
}

@media (min-width: 768px) {
  .app-container {
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: var(--radius);
    min-height: calc(100vh - 40px);
  }

  .app-header {
    border-radius: var(--radius) var(--radius) 0 0;
  }
}
