:root {
  --primary: #1DA1F2;
  --secondary: #FFA500;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #102a43;
  --muted: #627d98;
  --border: #e5eaf0;
  --green: #10b981;
  --red: #ef4444;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Tajawal", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.rtl {
  font-family: "Tajawal", "Inter", -apple-system, sans-serif;
}

.container {
  max-width: 560px;
  margin: 0 auto;
  padding: 12px 12px 40px;
}

.header {
  background: var(--primary);
  color: #fff;
  padding: 16px;
  border-radius: 14px;
  margin-bottom: 14px;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.header h1 { margin: 0; font-size: 19px; font-weight: 800; }
.header p { margin: 4px 0 0; font-size: 13px; opacity: 0.92; }

.lang-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  overflow: hidden;
}

.lang-toggle button {
  border: none;
  background: transparent;
  color: #fff;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.lang-toggle button.active {
  background: #fff;
  color: var(--primary);
}

/* ── Request cards (green = open, red = locked) ─────────── */

.card {
  background: #b6f0d6;
  border: 1px solid #34d399;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(16, 42, 67, 0.05);
  cursor: pointer;
}

.card.locked {
  background: #fde2e2;
  border-color: #f87171;
  opacity: 0.9;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge.reqnum {
  background: var(--secondary);
  color: #fff;
}

.card.locked .badge.reqnum { background: var(--red); }

.age {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.vehicles {
  font-size: 21px;
  font-weight: 800;
  color: #065f46;
  margin-bottom: 4px;
}

.card-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.chip {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

.chip-city {
  background: #fff;
  color: #047857;
  border: 1px solid #34d399;
}

.chip-type {
  background: #059669;
  color: #fff;
}

.card.locked .vehicles { color: #7f1d1d; }
.card.locked .chip-city { color: #b91c1c; border-color: #fca5a5; }
.card.locked .chip-type { background: var(--red); }

.details {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}

.detail {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 14px;
}

.detail-icon { flex-shrink: 0; line-height: 1.5; }
.detail-text { color: #1f2937; }

.card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  padding-top: 10px;
}

.slots {
  font-size: 13px;
  font-weight: 700;
  color: #047857;
  background: rgba(16, 185, 129, 0.18);
  padding: 3px 10px;
  border-radius: 999px;
}

.slots.full {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.16);
}

.opened-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(29, 161, 242, 0.14);
  padding: 3px 10px;
  border-radius: 999px;
}

/* ── Detail view ────────────────────────────────────────── */

.detail-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.back-btn {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}

.detail-title {
  font-size: 18px;
  font-weight: 800;
}

.contact-card {
  background: #fff;
  border: 1px solid var(--border);
  border-inline-start: 4px solid var(--primary);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(16, 42, 67, 0.05);
}

.contact-title {
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 10px;
  color: var(--text);
}

.contact-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}

.contact-row:last-child { border-bottom: none; }

.contact-label {
  font-size: 12px;
  color: var(--muted);
}

.contact-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

/* Contact card — inline call/WhatsApp icons + share button */
.contact-phone-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  color: #fff;
}

.icon-btn.whatsapp { background: #25D366; }
.icon-btn.call { background: var(--primary); }

.icon-btn:active { transform: scale(0.94); }

.contact-share {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.action-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
}

.action-btn:active { transform: translateY(1px); }

.share-btn { background: #fff; color: var(--text); border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(16,42,67,0.06); }

/* Remaining fields */
.detail-fields {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(16, 42, 67, 0.05);
}

.section-title {
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 8px;
  color: var(--text);
}

.detail-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}

.detail-field:last-child { border-bottom: none; }

.detail-field-label {
  font-size: 12px;
  color: var(--muted);
}

.detail-field-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.empty {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

.empty.error { color: var(--red); }
