/* «ساحة» — الأنماط مأخوذة حرفيًا من حزمة التصميم (tokens.json + الشاشات) */
:root {
  --paper: #F5F3EE; --surface: #FFFFFF; --ink: #15171A; --ink2: #5B5F66; --line: #D6D2C8; --perf: #B9B5AC;
  --accent: #E8590C; --accent-text: #C2410C; --error: #B42318; --error-bg: #FDECEA; --error-ink: #7A1A12;
  --map-land: #ECE9E2; --map-water: #D9DFE1; --disabled: #7A7D83; --on-dark-muted: #C9C6BE;
  --sans: 'IBM Plex Sans Arabic', Tahoma, sans-serif; --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --nav-h: 76px; --rail-w: 96px; --gutter: 24px; --sel-shadow: 4px 4px 0 var(--accent);
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.5; -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
body.sheet-open { overflow: hidden; }
button, input, select, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--accent-text); }
a:hover { color: #9A3412; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink2); }
.ltr { direction: ltr; unicode-bidi: isolate; }
.col { display: flex; flex-direction: column; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { flex: none; display: block; }
h1, h2 { margin: 0; }
.h1 { font-size: 28px; font-weight: 700; line-height: 1.35; }
.h1s { font-size: 24px; font-weight: 700; line-height: 1.3; }
.h1o { font-size: 22px; font-weight: 700; line-height: 1.3; }
.cap12 { font-size: 12px; color: var(--ink2); }
.cap13 { font-size: 13px; color: var(--ink2); }

/* ---------- الهيكل ---------- */
#app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
#screen { flex: 1 0 auto; display: flex; flex-direction: column; }
.scr { flex: 1 0 auto; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; width: 100%; }
body.has-nav .scr { padding-bottom: calc(var(--nav-h) + var(--safe-b)); }
.wrap { width: 100%; max-width: 720px; margin-inline: auto; }
.pad { padding-inline: var(--gutter); }
.grow { flex: 1; }
.push { margin-top: auto; }
#net:empty { display: none; }
#net { position: sticky; top: 0; z-index: 30; padding: 8px var(--gutter) 0; padding-top: calc(8px + var(--safe-t)); background: var(--paper); }

/* شريط التنقّل */
#nav { position: fixed; inset-inline: 0; bottom: 0; z-index: 20; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: calc(12px + var(--safe-b)); border-top: 2px solid var(--ink); background: var(--paper); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
#nav[hidden] { display: none; }
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--ink2); text-decoration: none; font-size: 12px; min-height: 44px; }
.nav-item:hover { color: var(--ink); }
.nav-item.on { color: var(--ink); font-weight: 700; border-top: 3px solid var(--accent); margin-top: -2px; }

/* ---------- الأزرار ---------- */
.btn, .btn2, .input, .input-wrap, .stepper, .slot, .ticket, .alert { flex-shrink: 0; }
.btn { height: 56px; width: 100%; border: 0; background: var(--ink); color: #FFFFFF; font-size: 17px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; padding: 0 16px; }
.btn:hover:not(:disabled) { background: #000; color: #fff; }
.btn:disabled { background: var(--line); color: var(--disabled); }
.btn:disabled .ic { stroke: var(--disabled); }
.btn.busy:disabled { background: var(--ink); color: #FFFFFF; }
.btn.accent { background: var(--accent); color: var(--ink); font-weight: 700; font-size: 18px; }
.btn.accent:hover { background: #F06A1F; color: var(--ink); }
.btn2 { height: 48px; width: 100%; border: 2px solid var(--ink); background: transparent; color: var(--ink); font-size: 15px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; padding: 0 14px; }
.btn2:hover:not(:disabled) { background: var(--surface); color: var(--ink); }
.btn2:disabled { border-color: var(--perf); color: var(--disabled); }
.btn2.sm { height: 44px; width: auto; font-size: 14px; font-weight: 700; }
.btn-dark2 { height: 48px; width: 100%; border: 1.5px solid var(--ink2); background: transparent; color: #FFFFFF; font-size: 15px; font-weight: 500; }
.btn-dark2:hover { border-color: #fff; }
.link { min-height: 44px; display: inline-flex; align-items: center; font-size: 15px; font-weight: 600; color: var(--accent-text); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.link:disabled { color: var(--disabled); text-decoration: none; }
.link.ink { color: var(--ink); }
.icon-btn { width: 44px; height: 44px; border: 0; background: transparent; padding: 0; display: flex; align-items: center; justify-content: center; color: var(--ink); flex: none; }
.icon-btn.sm { width: 36px; height: 36px; }
.icon-btn:disabled { opacity: .3; }
.busy { display: inline-flex; gap: 6px; align-items: center; }
.busy span { width: 10px; height: 8px; animation: yardPulse 1.2s infinite; }
.busy span:nth-child(1) { background: var(--accent); }
.busy span:nth-child(2) { background: var(--paper); animation-delay: .2s; }
.busy span:nth-child(3) { border: 1.5px solid var(--paper); animation-delay: .4s; }
@keyframes yardPulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .busy span, .sk { animation: none !important; } }

/* ---------- الحقول ---------- */
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; min-width: 0; }
.input { height: 52px; width: 100%; border: 2px solid var(--ink); border-radius: 0; background: var(--surface); font-size: 16px; color: var(--ink); padding: 0 12px; min-width: 0; font-weight: 400; }
textarea.input { height: auto; padding: 10px 12px; font-size: 14px; line-height: 1.7; resize: vertical; min-height: 96px; }
select.input { font-size: 15px; font-weight: 600; padding: 0 10px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2315171A' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 10px center; padding-left: 32px; }
.input.mono { font-family: var(--mono); font-weight: 600; }
.input:focus { outline: none; box-shadow: var(--sel-shadow); }
.input:disabled { border-color: var(--perf); color: var(--disabled); background: var(--paper); }
.fld.err { color: var(--error); }
.fld.err .input, .fld.err .input-wrap { border-color: var(--error); }
.fld .msg { font-weight: 500; font-size: 12px; }
.fld .hint { font-weight: 400; font-size: 12px; color: var(--ink2); }
.input-wrap { display: flex; align-items: center; height: 52px; border: 2px solid var(--ink); background: var(--surface); }
.input-wrap:focus-within { box-shadow: var(--sel-shadow); }
.input-wrap input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; padding: 0 12px; outline: none; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stepper { display: flex; height: 52px; border: 2px solid var(--ink); background: var(--surface); align-items: center; flex: none; }
.stepper button { width: 52px; height: 100%; border: 0; background: transparent; font-size: 22px; font-weight: 700; }
.stepper button:disabled { color: var(--perf); }
.stepper .v { width: 44px; text-align: center; font-family: var(--mono); font-size: 20px; font-weight: 600; border-inline: 1px solid var(--line); line-height: 48px; }

/* خيارات مكدّسة (نوع الحساب، طريقة الدفع) */
.choices { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; min-width: 0; }
.choices legend { font-size: 13px; font-weight: 600; padding: 0 0 10px; }
.choice { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 0 16px; border: 2px solid var(--ink); cursor: pointer; position: relative; }
.choice + .choice { border-top: 0; }
.choice input { width: 22px; height: 22px; accent-color: var(--ink); margin: 0; flex: none; }
.choice.on { background: var(--surface); box-shadow: var(--sel-shadow); z-index: 1; }
.choice .t { font-size: 17px; font-weight: 600; }
.choice.on .t { font-weight: 700; }
.choice.pay { min-height: 56px; height: 56px; gap: 12px; padding: 0 14px; font-size: 15px; }
.choice.pay input { width: 20px; height: 20px; }
.choice.pay.on { font-weight: 600; box-shadow: none; }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 2px solid var(--ink); }
.seg label { height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; color: var(--ink2); cursor: pointer; }
.seg label input { accent-color: var(--ink); margin: 0; }
.seg label.on { background: var(--ink); color: #FFFFFF; font-weight: 700; }
.seg label.on input { accent-color: var(--accent); }

/* ---------- السعة والفترات ---------- */
.cells { display: flex; gap: 3px; flex-wrap: wrap; }
.cell { width: 16px; height: 12px; border: 1.5px solid var(--ink); flex: none; }
.cell.on { background: var(--ink); }
.cells.full .cell.on { background: var(--perf); border-color: var(--perf); }
.slot { display: flex; align-items: center; width: 100%; min-height: 66px; padding: 0; border: 0; border-bottom: 1px dashed var(--perf); background: transparent; text-align: start; color: var(--ink); font: inherit; }
.slot.tall { min-height: 62px; }
.slot:hover:not(:disabled) { background: rgba(255,255,255,.6); }
.slot .stub { width: 70px; align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 10px 0 10px; padding-inline-start: 10px; border-inline-end: 1px dashed var(--perf); flex: none; }
.slot .stub .t { font-size: 19px; font-weight: 600; line-height: 1; }
.slot .stub .e { font-size: 11px; opacity: .75; }
.slot .mid { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 8px 14px; min-width: 0; }
.slot .cap { font-size: 13px; font-weight: 600; }
.slot .cap.low { color: var(--accent-text); }
.slot .fee { font-size: 14px; font-weight: 600; padding-inline-end: 10px; white-space: nowrap; }
.slot.full { color: var(--disabled); }
.slot.full .fee { text-decoration: line-through; }
.slot.sel { outline: 2px solid var(--ink); outline-offset: -2px; background: var(--surface); }
.slot.sel .stub { background: var(--ink); color: #FFFFFF; }
.badge { font-size: 12px; font-weight: 700; padding: 4px 8px; white-space: nowrap; flex: none; }
.badge.confirmed { background: var(--ink); color: #FFFFFF; }
.badge.pending { border: 1.5px solid var(--accent-text); color: var(--accent-text); background: repeating-linear-gradient(-45deg, rgba(232,89,12,.12) 0 4px, transparent 4px 8px); }
.badge.full { background: var(--line); color: var(--ink2); }
.stamp { border: 2px solid var(--accent-text); color: var(--accent-text); font-size: 13px; font-weight: 700; padding: 2px 10px; transform: rotate(-4deg); flex: none; }
.stamp.dark { border-color: var(--accent); color: var(--accent); font-size: 12px; padding: 2px 8px; }

/* شريط الفعل الرئيس المثبّت أسفل الشاشة */
.actionbar { position: sticky; bottom: 0; z-index: 10; margin-top: auto; background: var(--paper); border-top: 1px solid var(--line); padding: 10px var(--gutter) calc(26px + var(--safe-b)); }
body.has-nav .actionbar { bottom: calc(var(--nav-h) + var(--safe-b)); padding-bottom: 12px; }
.actionbar .row { display: flex; gap: 10px; align-items: center; }
.actionbar .sum { display: flex; flex-direction: column; flex: none; min-width: 64px; }
.actionbar .sum .t { font-family: var(--mono); font-size: 17px; font-weight: 600; }
.actionbar .row .btn { flex: 1 0 0; }
.actionbar.plain { border-top: 0; }

/* ---------- التنبيهات ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 2px solid var(--error); background: var(--error-bg); color: var(--error-ink); }
.alert b { font-size: 15px; }
.alert span span, .alert .col > span { font-size: 13px; line-height: 1.6; }
.offline-bar { display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: var(--ink); color: var(--paper); }
.offline-bar b { font-size: 14px; }
.offline-bar .col > span { font-size: 12px; color: var(--on-dark-muted); }
#toast { position: fixed; top: calc(12px + var(--safe-t)); inset-inline: 12px; z-index: 60; display: flex; justify-content: center; pointer-events: none; }
.toast { pointer-events: auto; width: 100%; max-width: 560px; display: flex; gap: 10px; align-items: center; padding: 10px 6px 10px 14px; padding-inline-start: 14px; background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 500; box-shadow: 0 8px 24px rgba(21,23,26,.2); animation: toastIn .18s ease-out; }
.toast .col { flex: 1; line-height: 1.6; }
.toast .icon-btn { color: var(--paper); }
.toast.error { background: var(--error-bg); color: var(--error-ink); border: 2px solid var(--error); }
.toast.error .icon-btn { color: var(--error-ink); }
.toast.sms { background: var(--surface); color: var(--ink); border: 2px solid var(--ink); }
.toast.sms .icon-btn { color: var(--ink); }
.toast a { color: var(--accent); font-weight: 600; }
.toast .code { font-family: var(--mono); font-size: 20px; font-weight: 600; letter-spacing: .12em; }
@keyframes toastIn { from { transform: translateY(-8px); opacity: 0; } }

/* ---------- النافذة السفلية ---------- */
#sheet { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
#sheet[hidden] { display: none; }
.scrim { position: absolute; inset: 0; background: rgba(21,23,26,.55); }
.sheet { position: relative; width: 100%; max-width: 720px; max-height: 92dvh; overflow: auto; background: var(--paper); border-top: 2px solid var(--ink); padding: 24px var(--gutter) calc(28px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; outline: none; animation: sheetIn .2s ease-out; }
@keyframes sheetIn { from { transform: translateY(24px); opacity: .6; } }
.sheet .title { font-size: 20px; font-weight: 700; line-height: 1.35; }
.sheet .body { font-size: 14px; line-height: 1.7; color: var(--ink2); }
.sheet .kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; column-gap: 16px; border-top: 2px solid var(--ink); padding-top: 14px; }
.kv .k { font-size: 12px; color: var(--ink2); }
.kv .v { font-size: 15px; font-weight: 600; }
.lock-ic { width: 56px; height: 56px; flex: none; background: var(--ink); display: flex; align-items: center; justify-content: center; }
.alt { display: flex; align-items: center; min-height: 56px; border-bottom: 1px dashed var(--perf); cursor: pointer; }
.alt input { width: 20px; height: 20px; accent-color: var(--ink); margin: 0 12px; flex: none; }
.alt.on { background: var(--surface); outline: 2px solid var(--ink); outline-offset: -2px; }
.alt .t { font-family: var(--mono); font-size: 18px; font-weight: 600; width: 64px; }
.alt .l { flex: 1; font-size: 13px; font-weight: 600; }
.alt .f { font-family: var(--mono); font-size: 14px; font-weight: 600; padding-inline-end: 10px; }

/* ---------- هياكل التحميل ---------- */
.sk { display: block; background: var(--line); animation: yardPulse 1.4s infinite; }
.sk.l2 { background: #E3DFD6; }
.loading-cells { display: flex; gap: 4px; }
.loading-cells span { width: 18px; height: 14px; background: var(--ink); animation: yardPulse 1.2s infinite; }
.loading-cells span:nth-child(2) { animation-delay: .2s; }
.loading-cells span:nth-child(3) { background: transparent; border: 2px solid var(--ink); animation-delay: .4s; }

/* ---------- 01 الدخول ---------- */
.login { padding: 0 var(--gutter) calc(28px + var(--safe-b)); }
.login .hero { padding-top: 56px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.login .logo { width: 200px; height: 115px; }
.phone .cc { font-family: var(--mono); font-size: 16px; padding: 0 14px; border-inline-start: 1px solid var(--line); height: 100%; display: flex; align-items: center; }
.phone input { font-family: var(--mono); font-size: 18px; font-weight: 600; padding: 0 14px; direction: ltr; text-align: left; }
.terms { font-size: 12px; color: var(--ink2); line-height: 1.7; }
.terms .link { font-size: 12px; min-height: 0; font-weight: 500; }

/* ---------- 02 رمز التحقق ---------- */
.topbar { height: 56px; display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-inline: 12px; }
.otp { margin-top: 32px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; direction: ltr; }
.otp input { height: 72px; border: 2px solid var(--ink); border-radius: 0; background: var(--surface); text-align: center; font-family: var(--mono); font-size: 32px; font-weight: 600; color: var(--ink); padding: 0; min-width: 0; width: 100%; }
.otp input:focus { outline: none; box-shadow: var(--sel-shadow); }
.otp.err input { border-color: var(--error); }

/* ---------- 03 الخريطة ---------- */
.map-screen { position: relative; }
.map { position: relative; height: 39vh; height: 39dvh; min-height: 260px; max-height: 460px; flex: none; overflow: hidden; background: var(--map-land); touch-action: none; }
.map svg.world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.map .float { position: absolute; top: 12px; inset-inline: 12px; display: flex; gap: 8px; z-index: 3; }
.map .search { flex: 1; height: 48px; background: var(--surface); border: 2px solid var(--ink); display: flex; align-items: center; gap: 8px; padding: 0 12px; min-width: 0; }
.map .search:focus-within { box-shadow: var(--sel-shadow); }
.map .search input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 15px; color: var(--ink); outline: none; height: 100%; }
.map .search input::-webkit-search-cancel-button { display: none; }
.day-btn { height: 48px; padding: 0 12px; border: 2px solid var(--ink); background: var(--surface); font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex: none; }
.day-btn[aria-expanded="true"] { box-shadow: var(--sel-shadow); }
.menu { position: absolute; top: 64px; left: 12px; z-index: 5; min-width: 180px; background: var(--surface); border: 2px solid var(--ink); display: flex; flex-direction: column; box-shadow: 0 8px 24px rgba(21,23,26,.15); }
.menu button { min-height: 44px; border: 0; border-bottom: 1px dashed var(--perf); background: transparent; text-align: start; padding: 0 14px; font-size: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.menu button:last-child { border-bottom: 0; }
.menu button[aria-checked="true"] { font-weight: 700; background: var(--paper); }
.menu button:hover { background: var(--paper); }
.marker { position: absolute; transform: translate(-50%, -100%); border: 0; background: transparent; padding: 0; display: flex; flex-direction: column; align-items: center; min-height: 44px; min-width: 44px; justify-content: flex-end; z-index: 2; }
.marker .box { display: block; min-width: 50px; height: 28px; line-height: 24px; padding: 0 6px; border: 2px solid var(--ink); background: var(--surface); color: var(--ink); font-family: var(--mono); font-size: 13px; font-weight: 600; text-align: center; white-space: nowrap; }
.marker .tip { display: block; width: 2px; height: 10px; background: var(--ink); }
.marker.full .box { background: var(--line); color: var(--ink2); }
.marker.sel { z-index: 3; }
.marker.sel .box { min-width: 62px; height: 34px; line-height: 30px; font-size: 16px; background: var(--ink); color: #FFFFFF; box-shadow: var(--sel-shadow); }
.me-dot { position: absolute; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); border: 3px solid #FFFFFF; box-shadow: 0 0 0 10px rgba(21,23,26,.1); transform: translate(-50%, -50%); z-index: 1; pointer-events: none; }
.panel { flex: 1; display: flex; flex-direction: column; border-top: 2px solid var(--ink); background: var(--paper); min-height: 0; }
.panel-head { padding: 14px var(--gutter) 10px; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.yard-link { font-size: 20px; font-weight: 700; color: var(--ink); text-decoration: none; background: none; border: 0; padding: 0; text-align: start; line-height: 1.4; }
.yard-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.code { font-family: var(--mono); font-size: 11px; color: var(--ink2); letter-spacing: .08em; flex: none; }
.slot-list { margin: 0 var(--gutter); border-top: 1px solid var(--line); display: flex; flex-direction: column; }
.state-box { margin: 18px var(--gutter); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.state-box b { font-size: 16px; }

/* ---------- 04 تفاصيل الساحة ---------- */
.yard-head { padding: 4px var(--gutter) 16px; display: flex; gap: 14px; align-items: flex-start; }
.thumb { width: 84px; height: 84px; flex: none; border: 2px solid var(--ink); overflow: hidden; background: var(--map-land); padding: 0; }
.daybar { margin: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); height: 52px; }
.daybar .d { font-size: 17px; font-weight: 600; }
.daybar .n { font-family: var(--mono); font-size: 14px; color: var(--ink2); }

/* ---------- 05 تأكيد الحجز ---------- */
.ticket { display: flex; border: 2px solid var(--ink); background: var(--surface); }
.ticket .tstub { width: 92px; flex: none; background: var(--ink); color: #FFFFFF; display: flex; flex-direction: column; justify-content: center; padding: 14px 12px; gap: 4px; }
.ticket .tstub .t { font-family: var(--mono); font-size: 26px; font-weight: 600; line-height: 1; }
.ticket .tstub .e { font-family: var(--mono); font-size: 12px; opacity: .8; }
.ticket .tbody { flex: 1; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; border-inline-start: 2px dashed var(--perf); min-width: 0; }
.ticket .tbody b { font-size: 16px; }
.lines .ln { display: flex; justify-content: space-between; min-height: 38px; align-items: center; font-size: 14px; border-top: 1px solid var(--line); gap: 12px; }
.lines .ln .mono { font-weight: 600; }
.lines .total { min-height: 48px; font-size: 18px; font-weight: 700; border-top: 2px solid var(--ink); }
.timer { font-size: 13px; color: var(--ink2); }
.timer .mono { color: var(--accent-text); font-weight: 600; }

/* ---------- 06 التصريح ---------- */
.pass-screen { background: var(--ink); padding: calc(20px + var(--safe-t)) 20px calc(28px + var(--safe-b)); gap: 20px; }
.pass-wrap { width: 100%; max-width: 520px; margin-inline: auto; flex: 1; display: flex; flex-direction: column; gap: 20px; }
.pass-top { display: flex; align-items: center; justify-content: space-between; color: #FFFFFF; min-height: 44px; }
.pass-top .icon-btn { color: #FFFFFF; }
.pass { background: var(--paper); flex: 1; display: flex; flex-direction: column; position: relative; }
.pass .perf { height: 0; border-top: 2px dashed var(--perf); margin: 0 16px; position: relative; }
.pass .perf::before, .pass .perf::after { content: ''; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); }
.pass .perf::before { right: -28px; }
.pass .perf::after { left: -28px; }
.pass .big { font-family: var(--mono); font-size: 72px; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.pass .kv { padding: 20px 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; column-gap: 16px; }
.pass .kv .v { font-size: 16px; }

/* ---------- 07 مواعيدي ---------- */
.next-card { background: var(--ink); color: #FFFFFF; display: flex; flex-direction: column; }
.next-card .muted-d { color: var(--on-dark-muted); }
.next-card .big { font-family: var(--mono); font-size: 44px; font-weight: 600; line-height: 1.05; }
.next-card .foot { border-top: 2px dashed #3A3D42; padding: 12px 20px; display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--on-dark-muted); }
.next-card .btn.accent { height: 48px; font-size: 15px; }
.section-label { padding: 28px var(--gutter) 8px; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--ink2); }
.bk-list { margin: 0 var(--gutter); border-top: 2px solid var(--ink); display: flex; flex-direction: column; }
.bk { display: flex; align-items: center; min-height: 84px; border-bottom: 1px dashed var(--perf); gap: 14px; }
.bk.pending { min-height: 96px; background: repeating-linear-gradient(-45deg, rgba(232,89,12,.08) 0 8px, transparent 8px 16px); }
.bk .open { flex: 1; display: flex; align-items: center; gap: 14px; min-width: 0; align-self: stretch; border: 0; background: transparent; padding: 0; text-align: start; font: inherit; color: inherit; }
.bk .date { width: 52px; flex: none; display: flex; flex-direction: column; align-items: center; border-inline-end: 1px dashed var(--perf); padding: 12px 0; align-self: stretch; justify-content: center; }
.bk .date .n { font-family: var(--mono); font-size: 22px; font-weight: 600; }
.bk .info { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bk .info b { font-size: 15px; font-weight: 600; }
.bk .st { font-size: 13px; font-weight: 600; padding-inline-end: 4px; }
.bk .warn { font-size: 12px; font-weight: 600; color: var(--accent-text); }
.bk .btn2 { background: var(--paper); margin-inline-end: 4px; }
.empty-pass { margin: 0 var(--gutter); border: 2px dashed var(--perf); display: flex; flex-direction: column; }

/* ---------- 08 حجوزات اليوم ---------- */
.ohead { padding: 20px var(--gutter) 12px; padding-top: calc(20px + var(--safe-t)); display: flex; align-items: center; gap: 12px; }
.stats { margin: 0 var(--gutter); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.stat { padding: 10px 12px; display: flex; flex-direction: column; border: 0; background: transparent; text-align: start; font: inherit; color: inherit; }
.stat:first-child { padding-inline-start: 0; }
.stat + .stat { border-inline-start: 1px dashed var(--perf); }
.stat .n { font-family: var(--mono); font-size: 22px; font-weight: 600; }
button.stat[aria-pressed="true"] { background: var(--surface); box-shadow: inset 0 -3px 0 var(--ink); padding-inline-start: 12px; }
.ghead { display: flex; justify-content: space-between; align-items: center; min-height: 36px; margin-top: 8px; font-size: 13px; font-weight: 600; border-bottom: 2px solid var(--ink); }
.orow { display: flex; align-items: center; gap: 10px; min-height: 56px; width: 100%; border: 0; border-bottom: 1px dashed var(--perf); background: transparent; padding: 6px 0; text-align: start; font: inherit; color: inherit; }
.orow:hover { background: rgba(255,255,255,.6); }
.orow b { font-size: 15px; font-weight: 600; }
.new-tag { font-size: 11px; font-weight: 700; color: var(--ink); background: var(--accent); padding: 1px 6px; margin-inline-start: 8px; vertical-align: 2px; }
.new-bar { margin: 12px var(--gutter) 4px; padding: 10px 12px; background: var(--accent); color: var(--ink); display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; }
.new-bar b { font-size: 16px; }
.new-bar .btn2 { border-color: var(--ink); background: var(--paper); }
.new-bar .btn2[aria-pressed="true"] { background: var(--ink); color: #fff; }
.orow.is-new { background: #FFF1E6; border-inline-start: 4px solid var(--accent); padding-inline-start: 10px; }
.orow.is-new:hover { background: #FFE6D3; }

/* ---------- 09 الفترات ---------- */
.tabs { margin: 0 var(--gutter); display: grid; grid-auto-flow: column; grid-auto-columns: 25%; overflow-x: auto; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { height: 52px; border: 0; background: transparent; color: var(--ink2); display: flex; flex-direction: column; align-items: center; justify-content: center; font: inherit; }
.tab .n { font-family: var(--mono); font-size: 15px; font-weight: 600; }
.tab .d { font-size: 12px; }
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: inset 0 -3px 0 var(--ink); }
.oslot { display: flex; align-items: center; min-height: 62px; border-bottom: 1px dashed var(--perf); color: var(--ink); text-decoration: none; }
.oslot:hover { background: rgba(255,255,255,.6); color: var(--ink); }
.oslot .stub { width: 70px; align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding-inline-start: 10px; border-inline-end: 1px dashed var(--perf); flex: none; }
.oslot .stub .t { font-family: var(--mono); font-size: 18px; font-weight: 600; line-height: 1; }
.oslot .stub .e { font-size: 11px; color: var(--ink2); }
.oslot .mid { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 8px 14px; min-width: 0; }
.add-btn { height: 44px; padding: 0 14px; background: var(--ink); color: #FFFFFF; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; text-decoration: none; border: 0; flex: none; }
.add-btn:hover { color: #fff; background: #000; }
.gen-row { display: flex; align-items: center; min-height: 40px; border-bottom: 1px dashed var(--perf); gap: 12px; font-size: 14px; }
.gen-row .mono { font-weight: 600; width: 120px; flex: none; }
.gen-row.clash { color: var(--error); }

/* ---------- 11 بيانات الساحة ---------- */
.pin-map { height: 150px; border: 2px solid var(--ink); position: relative; overflow: hidden; background: var(--map-land); cursor: grab; touch-action: none; }
.pin-map:active { cursor: grabbing; }
.pin-map:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pin-map.err { border-color: var(--error); }
.pin-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.pin .b { display: block; width: 30px; height: 22px; background: var(--ink); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--accent); }
.pin .s { display: block; width: 2px; height: 10px; background: var(--ink); }
.map-hint { position: absolute; bottom: 8px; right: 8px; background: var(--surface); border: 1.5px solid var(--ink); font-size: 12px; padding: 4px 8px; pointer-events: none; }

/* ---------- الحجز المتعدد (شركة النقل) ---------- */
.qty-strip { background: var(--surface); border: 2px solid var(--ink); border-top: 0; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.qty-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.qty-row .stepper { margin-inline-start: auto; }
.stepper.sm { height: 44px; }
.stepper.sm button { width: 44px; font-size: 20px; }
.stepper.sm .v { line-height: 40px; width: 40px; font-size: 18px; }
.short-note { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; font-size: 13px; font-weight: 600; color: var(--accent-text); border-top: 1px dashed var(--perf); padding-top: 10px; }
.short-note .btn2 { color: var(--ink); }
.truck { border: 2px solid var(--ink); background: var(--surface); display: flex; flex-direction: column; }
.truck + .truck { margin-top: 12px; }
.truck .thead { display: flex; align-items: stretch; border-bottom: 2px dashed var(--perf); }
.truck .tnum { width: 70px; flex: none; background: var(--ink); color: #fff; display: flex; flex-direction: column; justify-content: center; padding: 8px 10px; gap: 2px; }
.truck .tnum .t { font-family: var(--mono); font-size: 20px; font-weight: 600; line-height: 1; }
.truck .tinfo { flex: 1; padding: 8px 12px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.truck .tfields { padding: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.truck .tfields .wide { grid-column: 1 / -1; }
.mini-pass { display: flex; width: 100%; border: 0; background: var(--paper); text-align: start; font: inherit; color: var(--ink); padding: 0; }
.mini-pass + .mini-pass { margin-top: 10px; }
.mini-pass .tnum { width: 84px; flex: none; display: flex; flex-direction: column; justify-content: center; padding: 12px; border-inline-end: 2px dashed var(--perf); }
.mini-pass .tnum .t { font-family: var(--mono); font-size: 24px; font-weight: 600; line-height: 1; }
.mini-pass .tinfo { flex: 1; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* ---------- صور الساحة ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ph { margin: 0; position: relative; border: 2px solid var(--ink); background: var(--surface); aspect-ratio: 4 / 3; overflow: hidden; }
.ph.main { box-shadow: var(--sel-shadow); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-tag { position: absolute; top: 0; right: 0; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 6px; }
.ph-tools { position: absolute; inset: auto 0 0 0; display: flex; background: rgba(21,23,26,.82); }
.ph-tools button { flex: 1; min-height: 44px; border: 0; background: transparent; color: #fff; font-size: 16px; }
.ph-tools button:disabled { opacity: .3; }
.ph-tools button:hover:not(:disabled) { background: rgba(255,255,255,.15); }
.ph-tools button:focus-visible { outline-offset: -3px; } /* الإطار يقصّ ما خارجه */
@media (max-width: 560px) { .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
label.btn2:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
label.btn2[aria-disabled="true"] { cursor: progress; }
.photo-strip { margin: 0 var(--gutter) 16px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.photo-strip button { flex: none; width: 132px; aspect-ratio: 4 / 3; padding: 0; border: 2px solid var(--ink); background: var(--surface); overflow: hidden; position: relative; }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-strip .more { position: absolute; bottom: 0; left: 0; background: var(--ink); color: #fff; font-family: var(--mono); font-size: 12px; padding: 2px 6px; }
.viewer { display: flex; flex-direction: column; gap: 12px; }
.viewer img { width: 100%; max-height: 64dvh; object-fit: contain; background: var(--ink); border: 2px solid var(--ink); }
.viewer .nav-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------- الحساب ---------- */
.plate-row { display: flex; align-items: center; min-height: 56px; border-bottom: 1px dashed var(--perf); gap: 12px; }
.plate-row b { font-size: 16px; font-weight: 600; flex: 1; }
.drv-open { min-width: 0; border: 0; background: transparent; padding: 8px 0; text-align: start; font: inherit; color: inherit; gap: 2px; }
.drv-open:hover b { text-decoration: underline; text-underline-offset: 3px; }
.busy-note { font-size: 12px; font-weight: 600; color: var(--accent-text); }

/* آيفون يكبّر الشاشة عند لمس حقل خطه أصغر من 16 بكسل، فتضيع أول ضغطة على القائمة */
@supports (-webkit-touch-callout: none) {
  select.input, textarea.input, .map .search input, #container, [id^="cont-"], [id^="dphone"] { font-size: 16px !important; }
}

/* ---------- التجاوب ---------- */
@media (max-width: 360px) { :root { --gutter: 16px; } .login .hero { padding-top: 32px; } }
@media (min-width: 1024px) {
  body.has-nav #app { padding-right: var(--rail-w); }
  body.has-nav .scr { padding-bottom: 0; }
  #nav { inset: 0 0 0 auto; width: var(--rail-w); height: auto; padding: 24px 0; border-top: 0; border-left: 2px solid var(--ink); display: flex; flex-direction: column; gap: 8px; }
  .nav-item { height: 76px; flex: none; }
  .nav-item.on { border-top: 0; margin-top: 0; border-right: 3px solid var(--accent); }
  body.has-nav .actionbar { bottom: 0; padding-bottom: 26px; }
  #net { padding-inline: var(--gutter); }
  .actionbar > .row, .actionbar > .inner { max-width: 672px; margin-inline: auto; }
  /* الخريطة على الحاسوب: خريطة كاملة ولوحة الفترات بجانبها */
  body[data-screen="yards"] .map-screen { flex-direction: row; height: 100vh; height: 100dvh; min-height: 0; }
  body[data-screen="yards"] .map { height: auto; max-height: none; flex: 1; order: 2; }
  body[data-screen="yards"] .panel { width: 440px; flex: none; order: 1; border-top: 0; border-left: 2px solid var(--ink); overflow-y: auto; }
  body[data-screen="yards"] .panel .actionbar { margin-top: auto; }
  body.has-nav #toast { right: calc(var(--rail-w) + 12px); }
  .sheet { margin-bottom: 0; }
}

/* التحقق الأمني: لا يشغل مكانًا إلا إن احتاج تفاعلًا */
#captcha { position: fixed; inset-inline: 0; top: calc(12px + var(--safe-t)); display: flex; justify-content: center; z-index: 90; pointer-events: none; }
#captcha > * { pointer-events: auto; }
#captcha.active { inset: 0; top: 0; flex-direction: column; align-items: center; gap: 12px; background: rgba(21, 23, 26, .55); pointer-events: auto; }
#captcha.active::before { content: 'أكمل التحقق الأمني للمتابعة'; color: #fff; font-size: 15px; font-weight: 600; }
