@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800;900&display=swap');

:root {
  --green: #16A34A;
  --green-dark: #0F7C38;
  --green-darker: #0B5C2A;
  --green-light: #E8F5E9;
  --green-lighter: #F3FAF4;
  --gray-bg: #F5F5F5;
  --white: #FFFFFF;
  --text: #16241C;
  --text-muted: #5B6B62;
  --border: #E3EBE6;
  --danger: #D64545;
  --warning: #C98A1A;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 3px rgba(15, 30, 20, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 60, 30, 0.08);
  --shadow-lg: 0 16px 40px rgba(15, 60, 30, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
  background: var(--white);
  color: var(--text);
  direction: rtl;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-text {
  font-weight: 900;
  font-size: 20px;
  color: var(--green-darker);
  line-height: 1;
}

.brand-text small {
  display: block;
  font-weight: 500;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.main-nav {
  display: none;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  font-weight: 500;
  font-size: 15px;
  color: var(--text);
  position: relative;
  padding: 6px 0;
}
.main-nav a.active { color: var(--green-dark); font-weight: 700; }
.main-nav a:hover { color: var(--green-dark); }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 6px 16px rgba(22,163,74,0.28); }
.btn-primary:hover { background: var(--green-dark); }
.btn-outline { background: transparent; color: var(--green-dark); border: 1.5px solid var(--green); }
.btn-outline:hover { background: var(--green-light); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { color: var(--green-dark); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border);
  background: #fff;
}

.mobile-menu-toggle { display: inline-flex; }

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 10px 20px 18px;
  border-top: 1px solid var(--border);
  gap: 4px;
  background: #fff;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 12px 8px;
  font-weight: 600;
  border-radius: 10px;
}
.mobile-nav a:hover { background: var(--green-lighter); }

@media (min-width: 900px) {
  .main-nav { display: flex; }
  .mobile-menu-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--green-lighter) 0%, #FFFFFF 65%);
  padding: 48px 0 40px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 40px; }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-light);
  color: var(--green-darker);
  font-weight: 700;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: 32px;
  line-height: 1.35;
  font-weight: 900;
  margin: 0 0 16px;
  color: var(--text);
}
.hero h1 span { color: var(--green-dark); }
.hero p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0 0 26px;
  max-width: 480px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 640px) { .hero h1 { font-size: 42px; } }

.hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-art svg { width: 100%; max-width: 460px; }

/* ---------- Steps ---------- */
.steps-section { padding: 44px 0; }
.section-title {
  text-align: center;
  font-size: 26px;
  font-weight: 900;
  margin: 0 0 8px;
}
.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin: 0 0 32px;
  font-size: 15px;
}
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 760px) {
  .steps-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; }
}
.step-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 20px;
  text-align: center;
  position: relative;
  transition: box-shadow .2s ease, transform .2s ease;
}
.step-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.step-num {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px;
  margin: 0 auto 16px;
  box-shadow: 0 6px 14px rgba(22,163,74,0.3);
}
.step-card h3 { font-size: 17px; margin: 0 0 8px; font-weight: 800; }
.step-card p { font-size: 14px; color: var(--text-muted); margin: 0; line-height: 1.7; }

/* ---------- Features ---------- */
.features-section { padding: 20px 0 56px; background: var(--gray-bg); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 28px;
}
@media (min-width: 760px) { .features-grid { gap: 18px; } }
.feature-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 22px 16px;
  text-align: center;
  border: 1px solid var(--border);
}
.feature-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--green-light);
  color: var(--green-dark);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.feature-card h4 { font-size: 14px; margin: 0; font-weight: 700; line-height: 1.6; }

/* ---------- Footer ---------- */
.site-footer {
  background: #0F2318;
  color: #cfe4d6;
  padding: 40px 0 20px;
  margin-top: 20px;
}
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.footer-brand .brand-text { color: #fff; }
.footer-brand p { color: #9db9a8; font-size: 13px; margin-top: 10px; max-width: 280px; line-height: 1.7; }
.footer-links { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-col h5 { font-size: 14px; margin: 0 0 12px; color: #fff; }
.footer-col a { display: block; font-size: 13px; color: #a9c6b4; margin-bottom: 9px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 16px; text-align: center; font-size: 12px; color: #7c9a88; }

/* ---------- Cards / Forms (shared) ---------- */
.page-wrap { min-height: 70vh; }
.form-shell {
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 0 60px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card-title { font-size: 20px; font-weight: 800; margin: 0 0 4px; }
.card-sub { color: var(--text-muted); font-size: 13.5px; margin: 0 0 22px; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.field .optional-tag { color: var(--text-muted); font-weight: 500; font-size: 12px; }
.field select, .field input[type="text"], .field input[type="tel"], .field textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: #FBFCFB;
  font-size: 14.5px;
  color: var(--text);
  transition: border-color .15s ease, background .15s ease;
}
.field select:focus, .field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--green);
  background: #fff;
}
.field select:disabled { color: #9aa8a0; background: #F2F2F2; }

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (min-width: 480px) { .checkbox-grid { grid-template-columns: repeat(3, 1fr); } }
.chip-check {
  display: flex; align-items: center; gap: 7px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  transition: all .15s ease;
}
.chip-check:hover { border-color: var(--green); }
.chip-check.checked { background: var(--green-light); border-color: var(--green); color: var(--green-darker); font-weight: 700; }
.chip-check input { display: none; }

.upload-box {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  text-align: center;
  cursor: pointer;
  background: #FBFCFB;
  transition: border-color .15s ease, background .15s ease;
}
.upload-box:hover { border-color: var(--green); background: var(--green-lighter); }
.upload-box.has-image { padding: 10px; }
.upload-box img { max-height: 160px; margin: 0 auto; border-radius: 10px; }
.upload-box .upload-icon { color: var(--green); margin-bottom: 8px; }
.upload-box span { display: block; font-size: 13px; color: var(--text-muted); font-weight: 600; }

.helper-text { font-size: 12.5px; color: var(--text-muted); margin-top: 6px; }

/* ---------- Badges / status ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.badge-green { background: var(--green-light); color: var(--green-darker); }
.badge-gray { background: #EEF1EF; color: var(--text-muted); }
.badge-warning { background: #FDF3E0; color: var(--warning); }
.badge-danger { background: #FBE9E9; color: var(--danger); }

/* ---------- Tracking page ---------- */
.track-header-card {
  background: linear-gradient(135deg, var(--green-darker), var(--green));
  border-radius: var(--radius-lg);
  color: #fff;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
}
.track-header-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.track-id { font-size: 13px; opacity: .85; font-weight: 700; letter-spacing: .5px; }
.track-title { font-size: 20px; font-weight: 800; margin: 6px 0 2px; }
.track-sub { font-size: 13px; opacity: .9; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 20px;
}
.stat-box {
  background: rgba(255,255,255,0.14);
  border-radius: 12px;
  padding: 12px 6px;
  text-align: center;
}
.stat-num { font-size: 19px; font-weight: 900; }
.stat-label { font-size: 10.5px; opacity: .9; margin-top: 2px; line-height: 1.4; }

.offers-section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.offers-section-title h2 { font-size: 17px; margin: 0; font-weight: 800; }

.offer-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.offer-card:hover { box-shadow: var(--shadow-md); border-color: #cfe6d7; }
.offer-card.selected { border-color: var(--green); background: var(--green-lighter); }
.offer-main { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.offer-price { font-size: 24px; font-weight: 900; color: var(--green-darker); white-space: nowrap; }
.offer-price small { font-size: 13px; font-weight: 700; margin-right: 3px; }
.offer-meta { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-muted); }
.offer-meta-row { display: flex; align-items: center; gap: 6px; }

.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { color: var(--green); margin-bottom: 14px; opacity: .7; }
.empty-state h3 { color: var(--text); margin: 0 0 6px; font-size: 16px; }
.empty-state p { font-size: 13.5px; margin: 0; }

.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  animation: pulse 1.4s ease-in-out infinite;
  display: inline-block;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(22,163,74,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(22,163,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); }
}

/* ---------- Reveal modal ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 30, 18, 0.55);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  padding: 0;
}
.modal-overlay.open { display: flex; }
@media (min-width: 640px) { .modal-overlay { align-items: center; } }
.modal-box {
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 26px 22px 30px;
  width: 100%;
  max-width: 440px;
  animation: slideUp .25s ease;
}
@media (min-width: 640px) { .modal-box { border-radius: 22px; } }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--green-light); color: var(--green-dark);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.reveal-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.reveal-row:last-of-type { border-bottom: none; }
.reveal-label { font-size: 12.5px; color: var(--text-muted); }
.reveal-value { font-size: 14.5px; font-weight: 800; }
.reveal-value a { color: var(--green-dark); }

/* ---------- Workshop dashboard ---------- */
.dash-top {
  background: var(--green-lighter);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  margin-bottom: 24px;
}
.dash-top-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.dash-welcome { font-size: 13px; color: var(--text-muted); }
.dash-welcome strong { color: var(--text); font-size: 15px; }

.filter-tabs { display: flex; gap: 8px; margin-bottom: 18px; overflow-x: auto; padding-bottom: 4px; }
.filter-tab {
  padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--border);
  font-size: 13.5px; font-weight: 700; color: var(--text-muted); white-space: nowrap; background: #fff;
}
.filter-tab.active { background: var(--green); color: #fff; border-color: var(--green); }

.request-card {
  background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius-md);
  padding: 18px; margin-bottom: 12px;
}
.request-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.request-title { font-size: 16px; font-weight: 800; margin: 0 0 4px; }
.request-sub { font-size: 12.5px; color: var(--text-muted); }
.request-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.request-img-thumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); }

.offer-form-inline {
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border);
  display: none;
}
.offer-form-inline.open { display: block; }
.offer-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 520px) { .offer-form-grid { grid-template-columns: 1fr 1fr 1fr; } }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: #fff; padding: 13px 22px; border-radius: 999px;
  font-size: 14px; font-weight: 700; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 200;
  display: flex; align-items: center; gap: 8px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--green-darker); }

/* ---------------- Notifications (dashboard bell + simulated WhatsApp preview) ---------------- */
.notif-wrap { position: relative; }
.notif-badge {
  position: absolute; top: -5px; left: -5px;
  background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 800;
  min-width: 18px; height: 18px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px; border: 2px solid #fff;
}
.notif-panel {
  position: absolute; top: calc(100% + 10px); left: 0;
  width: 330px; max-width: 86vw;
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-lg);
  z-index: 70; overflow: hidden; display: none;
}
.notif-panel.open { display: block; }
.notif-panel-head { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.notif-panel-head h4 { margin: 0 0 3px; font-size: 14px; font-weight: 800; }
.notif-panel-head p { margin: 0; font-size: 11px; color: var(--text-muted); }
.notif-panel-body { max-height: 360px; overflow-y: auto; padding: 10px; }
.notif-empty { padding: 34px 16px; text-align: center; color: var(--text-muted); font-size: 12.5px; }

.wa-item { background: #F6FBF5; border: 1px solid #DCEEDB; border-radius: 12px; padding: 10px 11px; margin-bottom: 8px; position: relative; }
.wa-item-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 7px; }
.wa-item-head-title { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; color: #0F7C38; }
.wa-bubble { background: #DCF8C6; border-radius: 10px; border-top-right-radius: 3px; padding: 9px 11px; font-size: 12px; line-height: 1.75; white-space: pre-line; color: #111b14; }
.wa-meta { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-top: 6px; font-size: 10px; color: var(--text-muted); }
.wa-check { color: #34B7F1; font-weight: 800; }

.request-card.is-new { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,163,74,0.1); }
.new-pill { background: var(--green); color: #fff; font-size: 10.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; }

/* ---------------- OTP verification step ---------------- */
.otp-step { display: none; }
.otp-step.open { display: block; }
.otp-sent-to { text-align: center; font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }
.otp-sent-to b { color: var(--text); direction: ltr; display: inline-block; }
.otp-input {
  width: 100%; text-align: center; letter-spacing: 10px; font-size: 24px; font-weight: 800;
  padding: 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  background: #FBFCFB; direction: ltr;
}
.otp-input:focus { outline: none; border-color: var(--green); background: #fff; }
.otp-actions-row { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 12.5px; }
.otp-actions-row button.link-btn { background: none; border: none; padding: 0; cursor: pointer; }
.otp-actions-row button.link-btn:disabled { color: var(--text-muted); cursor: not-allowed; }

.auth-shell {
  max-width: 480px; margin: 0 auto; padding: 40px 0 60px;
}
.auth-tabs { display: flex; gap: 8px; margin-bottom: 22px; background: var(--gray-bg); padding: 5px; border-radius: 12px; }
.auth-tab { flex: 1; text-align: center; padding: 10px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--text-muted); }
.auth-tab.active { background: #fff; color: var(--green-darker); box-shadow: var(--shadow-sm); }

.two-col { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 520px) { .two-col { grid-template-columns: 1fr 1fr; } }

.brand-specialty-block { border: 1.5px solid var(--border); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.brand-specialty-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-weight: 800; font-size: 14px; }

.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.divider-text {
  display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 12.5px;
  margin: 18px 0;
}
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.link-btn { color: var(--green-dark); font-weight: 700; font-size: 13.5px; }

.page-header-simple {
  padding: 30px 0 10px;
  text-align: center;
}
.page-header-simple h1 { font-size: 24px; font-weight: 900; margin: 0 0 6px; }
.page-header-simple p { color: var(--text-muted); font-size: 14px; margin: 0; }
