@font-face {
  font-family: "AppFont";
  src: url("/fonts/NotoSansArabic-Bold.woff") format("woff");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F;
}
@font-face {
  font-family: "AppFont";
  src: url("/fonts/NotoSans-Bold.woff") format("woff");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2010-205E, U+2190-21FF, U+27F5-27F6, U+20AC;
}
:root {
  --navy: #12263f;
  --navy-2: #1c3a5e;
  --amber: #f2a900;
  --amber-d: #c98a00;
  --bg: #f3f5f8;
  --card: #ffffff;
  --text: #16202c;
  --muted: #5d6b7c;
  --line: #dfe4ea;
  --ok: #1f8a4c;
  --bad: #c0392b;
  --info: #1d6fb8;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body, button, input, select, textarea {
  font-family: "AppFont", Arial, sans-serif;
  font-weight: bold;
}
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; }
a { color: var(--info); }
.hidden { display: none !important; }

/* ===== الشريط العلوي ===== */
.topbar {
  background: var(--navy); color: #fff; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.brand .logo {
  width: 38px; height: 38px; border-radius: 10px; background: var(--amber);
  display: grid; place-items: center; color: var(--navy);
}
.topbar .who { font-size: 13px; color: #c9d6e6; display: flex; align-items: center; gap: 10px; }

/* ===== التخطيط ===== */
.wrap { max-width: 980px; margin: 0 auto; padding: 16px; }
.narrow { max-width: 480px; margin: 0 auto; }
.card {
  background: var(--card); border-radius: var(--radius); padding: 18px;
  box-shadow: 0 1px 3px rgba(18,38,63,.08); border: 1px solid var(--line); margin-bottom: 14px;
}
h1 { font-size: 24px; margin: 0 0 6px; }
h2 { font-size: 20px; margin: 0 0 14px; }
h3 { font-size: 17px; margin: 0 0 10px; }
.muted { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1 1 160px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

/* ===== الحقول ===== */
label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 5px; }
.field { margin-bottom: 12px; }
input, select, textarea {
  width: 100%; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 15px; background: #fff; color: var(--text); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--navy-2); }
textarea { min-height: 70px; resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }
.check input { width: auto; }

/* ===== الأزرار ===== */
.btn {
  border: none; border-radius: 10px; padding: 11px 16px; font-size: 15px; cursor: pointer;
  background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:hover { background: var(--navy-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.amber { background: var(--amber); color: var(--navy); }
.btn.amber:hover { background: var(--amber-d); }
.btn.ok { background: var(--ok); }
.btn.bad { background: var(--bad); }
.btn.ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--line); }
.btn.ghost:hover { background: #eef2f7; }
.btn.small { padding: 7px 11px; font-size: 13px; }
.btn.block { width: 100%; }
.topbar .btn.ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.topbar .btn.ghost:hover { background: rgba(255,255,255,.1); }

/* ===== التبويبات ===== */
.tabs { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; padding-bottom: 2px; }
.tab {
  padding: 10px 14px; border-radius: 10px; background: #fff; border: 1.5px solid var(--line);
  cursor: pointer; white-space: nowrap; font-size: 14px; color: var(--muted);
}
.tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.tab .count { background: var(--amber); color: var(--navy); border-radius: 20px; padding: 1px 7px; font-size: 12px; margin-inline-start: 4px; }

/* ===== اختيار نوع الحساب ===== */
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.role-opt {
  border: 2px solid var(--line); border-radius: 12px; padding: 14px 10px; text-align: center; cursor: pointer; background: #fff;
}
.role-opt .ic { font-size: 30px; display: block; margin-bottom: 4px; }
.role-opt.active { border-color: var(--amber); background: #fff8e6; }

/* ===== السعر ===== */
.price-box {
  background: var(--navy); color: #fff; border-radius: 12px; padding: 14px 16px; margin: 4px 0 14px;
  display: flex; justify-content: space-between; align-items: center;
}
.price-box .val { font-size: 26px; color: var(--amber); }

/* ===== بطاقات الطلبات ===== */
.order {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px;
}
.order .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.order .route { font-size: 17px; }
.order .route .arrow { color: var(--amber-d); margin: 0 6px; }
.order .meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 14px; font-size: 13px; color: var(--muted); margin: 8px 0; }
.order .meta b { color: var(--text); }
.order .price { font-size: 18px; color: var(--navy); }
.order .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.badge { padding: 4px 10px; border-radius: 20px; font-size: 12px; white-space: nowrap; }
.st-new { background: #fff3cd; color: #8a6100; }
.st-assigned { background: #e3efff; color: #1d4f91; }
.st-accepted { background: #dff5e7; color: #1f6b3f; }
.st-in_transit { background: #e6e2ff; color: #4b3aa8; }
.st-delivered { background: #d7f0dd; color: #155a2f; }
.st-cancelled { background: #f6dcdc; color: #8b2a20; }
.st-pending { background: #fff3cd; color: #8a6100; }
.st-approved { background: #dff5e7; color: #1f6b3f; }
.st-suspended { background: #f6dcdc; color: #8b2a20; }
.driver-box { background: #f6f9fc; border-radius: 10px; padding: 10px; display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.thumb { width: 74px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; background: #eef2f7; }

/* ===== رفع الصورة ===== */
.upload {
  border: 2px dashed var(--line); border-radius: 12px; padding: 14px; text-align: center; cursor: pointer; color: var(--muted); background: #fafbfc;
}
.upload img { max-width: 100%; max-height: 180px; border-radius: 8px; display: block; margin: 0 auto 6px; }

/* ===== رمز التحقق ===== */
.code-input { font-size: 30px; letter-spacing: 12px; text-align: center; direction: ltr; }
.dev-note { background: #fff3cd; color: #8a6100; padding: 8px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 10px; }

/* ===== الجداول ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: middle; }
th { color: var(--muted); font-size: 12px; background: #f7f9fb; }
td input { padding: 7px 9px; font-size: 14px; width: 110px; }

/* ===== الإحصائيات ===== */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.stat .n { font-size: 28px; color: var(--navy); }
.stat .l { font-size: 13px; color: var(--muted); }
.stat.hl { background: var(--navy); color: #fff; border-color: var(--navy); }
.stat.hl .n { color: var(--amber); }
.stat.hl .l { color: #c9d6e6; }

/* ===== الإشعارات والنوافذ ===== */
#toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100;
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 92vw;
}
#toast.show { opacity: 1; }
#toast.err { background: var(--bad); }
.modal-bg { position: fixed; inset: 0; background: rgba(10,20,35,.6); display: grid; place-items: center; z-index: 90; padding: 16px; }
.modal { background: #fff; border-radius: var(--radius); padding: 18px; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal img.full { width: 100%; border-radius: 10px; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.hero { text-align: center; padding: 18px 0 8px; }
.hero .big { font-size: 44px; }
.events { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.events li { padding: 7px 0; border-bottom: 1px dashed var(--line); }

/* ===== الواجهة الترحيبية ===== */
.land-hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; }
.land-hero-in { max-width: 1100px; margin: 0 auto; padding: 34px 16px 40px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 26px; align-items: center; }
.land-text h1 { font-size: 34px; line-height: 1.45; margin: 12px 0; }
.land-text p { color: #d4dfec; line-height: 1.9; font-size: 16px; margin: 0 0 18px; }
.pill { display: inline-block; background: rgba(242,169,0,.18); color: var(--amber); border: 1px solid rgba(242,169,0,.45); padding: 6px 12px; border-radius: 20px; font-size: 13px; }
.land-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.land-cta .btn { padding: 13px 20px; font-size: 16px; }
.btn.ghost.light { color: #fff; border-color: rgba(255,255,255,.4); }
.btn.ghost.light:hover { background: rgba(255,255,255,.1); }
.land-login { font-size: 14px; margin-top: 14px !important; }
.land-login a { color: var(--amber); }
.land-art svg { width: 100%; height: auto; display: block; border-radius: 18px; box-shadow: 0 14px 40px rgba(0,0,0,.35); }
.land-art img { width: 100%; display: block; border-radius: 18px; box-shadow: 0 14px 40px rgba(0,0,0,.35); }
@media (max-width: 820px) {
  .land-hero-in { grid-template-columns: 1fr; padding-top: 22px; }
  .land-art { order: -1; }
  .land-text h1 { font-size: 26px; }
}
.sec-title { text-align: center; font-size: 22px; margin: 30px 0 16px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.feat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.feat .fi { font-size: 30px; display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; background: #fff3d1; margin-bottom: 8px; }
.feat p, .step p { color: var(--muted); font-size: 14px; line-height: 1.8; margin: 0; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: relative; }
.step .sn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--amber); color: var(--navy); font-size: 18px; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chips span { background: #fff; border: 1.5px solid var(--line); border-radius: 20px; padding: 8px 14px; font-size: 14px; }
.driver-cta { margin: 30px 0 10px; background: var(--amber); color: var(--navy); border-radius: 18px; padding: 22px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.driver-cta h2 { margin: 0 0 6px; }
.driver-cta p { margin: 0; line-height: 1.8; max-width: 620px; }
.driver-cta .btn { background: var(--navy); color: #fff; padding: 13px 22px; font-size: 16px; }
.land-foot { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px 30px; }

/* ===== إضافات ===== */
.loc-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.stars { display: inline-flex; gap: 2px; direction: ltr; }
.stars button { background: none; border: none; font-size: 28px; cursor: pointer; color: #cfd6df; padding: 0 2px; }
.stars button.on { color: var(--amber); }
.star-txt { color: var(--amber-d); }
.rate-box { background: #fff8e6; border: 1px solid #f5dd9a; border-radius: 10px; padding: 10px; margin-top: 10px; }
.photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.photos figure { margin: 0; text-align: center; font-size: 11px; color: var(--muted); }
.map-box { margin-top: 10px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.map-box iframe { width: 100%; height: 220px; border: 0; display: block; }
.map-box .map-foot { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; font-size: 12px; background: #f6f9fc; }
.group-tag { background: #e8eef7; color: var(--navy-2); border-radius: 20px; padding: 3px 9px; font-size: 12px; }
.group-head { display: flex; justify-content: space-between; align-items: center; margin: 4px 2px 8px; }
.docs { display: flex; gap: 10px; flex-wrap: wrap; }
.docs figure { margin: 0; text-align: center; font-size: 11px; color: var(--muted); }
.perm-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 6px; margin: 6px 0 12px; }
.tp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.tp-grid label { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text); font-size: 14px; }
.tp-grid input { width: 120px; }
@media (min-width: 900px) { .tabs { flex-wrap: wrap; overflow: visible; } }
.app-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 18px 16px 24px; border-top: 1px solid var(--line); margin-top: 20px; }

/* ===== التقرير (صفحة التقرير + تصدير PDF) ===== */
.rep { background: #fff; padding: 26px; }
.rep-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 3px solid var(--amber); padding-bottom: 14px; margin-bottom: 16px; }
.rep-brand { display: flex; gap: 12px; align-items: center; }
.rep-brand .logo { width: 50px; height: 50px; border-radius: 12px; background: var(--navy); display: grid; place-items: center; font-size: 26px; }
.rep-brand h1 { font-size: 21px; margin: 0; }
.rep-meta { text-align: left; font-size: 13px; color: var(--muted); line-height: 1.8; }
.rep h3 { margin: 22px 0 10px; }
.rep table { font-size: 12.5px; }
.rep th { background: var(--navy); color: #fff; }
.rep tr.total td { background: #fff3cd; }
.pdf-stage { position: fixed; left: -20000px; top: 0; width: 1100px; z-index: -1; }
@media (max-width: 560px) {
  .hide-sm { display: none; }
  .topbar { padding: 10px 12px; }
  .brand { font-size: 16px; }
  .wrap { padding: 12px; }
  .card { padding: 14px; }
  .order .actions .btn, .order .actions select { flex: 1 1 auto; }
}
.group-tag { display: inline-block; white-space: nowrap; }
@media (max-width: 560px) {
  .stat .n { font-size: 21px; }
  .order .route { font-size: 15px; }
  .price-box .val { font-size: 21px; }
}
