:root {
  --ink: #2f2b28;
  --ink-2: #6f6a64;
  --ink-4: #b4aea6;
  --hairline: #e3ded9;
  --paper: #ffffff;
  --bg: #f6f3f0;
  --warn-bg: #fdf3e3;
  --warn-ink: #8a5a13;
  --note-bg: #eef4f6;
  --note-ink: #155a70;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Kufi Arabic", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}
.card {
  max-width: 720px;
  margin: 24px auto 64px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 28px;
  padding: 28px 24px 36px;
}
@media (max-width: 760px) {
  .card { margin: 0 auto; border: none; border-radius: 0; padding: 20px 16px 48px; }
}
.lp-theme { --lp-accent: #0f766e; }
.lp-theme-blue { --lp-accent: #2563eb; }
.lp-theme-red { --lp-accent: #b91c1c; }
.lp-theme-orange { --lp-accent: #c2410c; }
.lp-theme-white { --lp-accent: #7c3aed; }
.lp-strip { height: 8px; border-radius: 999px; background: var(--lp-accent); margin-bottom: 20px; }
h1 { font-size: 26px; line-height: 1.35; margin: 0 0 4px; }
.fact { color: var(--ink-2); font-weight: 600; margin: 0 0 10px; font-size: 14px; }
.intro { margin: 0 0 18px; color: var(--ink); }
.hero { width: 100%; height: auto; aspect-ratio: 7 / 2; max-height: 140px; object-fit: cover; object-position: 50% 4%; border-radius: 20px; display: block; margin-bottom: 12px; background: #0b1a3a; }
h2 { font-size: 18px; margin: 28px 0 12px; }
.label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 14px 0 6px; }
input[type="text"], input[type="number"] {
  width: 100%; font: inherit; padding: 10px 12px;
  border: 1px solid var(--hairline); border-radius: 12px; background: #fff; color: var(--ink);
}
input[type="text"]:focus, input[type="number"]:focus { outline: 2px solid var(--lp-accent); outline-offset: 1px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  appearance: none; font: inherit; font-size: 14px; line-height: 20px; padding: 6px 16px;
  border-radius: 999px; border: 1px solid var(--hairline); background: #fff; color: var(--ink); cursor: pointer;
}
.chip-btn.on { background: var(--lp-accent); border-color: var(--lp-accent); color: #fff; font-weight: 600; }
.slider-row { display: flex; align-items: center; gap: 12px; direction: ltr; }
.slider-row input[type="range"] { flex: 1; accent-color: var(--lp-accent); }
.slider-val { font-weight: 700; color: var(--lp-accent); min-width: 52px; text-align: center; direction: ltr; }
.caption { font-size: 12.5px; color: var(--ink-2); margin: 8px 0 0; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.lchip { font-size: 12px; line-height: 20px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--hairline); }
.lchip-day { background: #f6d9a0; }
.lchip-night { background: #33415c; color: #fff; }
.lchip-off { background: #efedec; color: var(--ink-2); }
.lchip-picked { background: var(--lp-accent); border-color: var(--lp-accent); color: #fff; }
.months { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 10px; }
@media (min-width: 768px) { .months { grid-template-columns: 1fr 1fr; } }
.month-name { font-weight: 700; margin-bottom: 6px; color: var(--lp-accent); }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; direction: rtl; }
.wd { text-align: center; font-size: 11px; color: var(--ink-2); padding-bottom: 2px; }
.cell {
  appearance: none; border: 1px solid var(--hairline); border-radius: 6px; background: #fff;
  font: inherit; font-size: 12px; line-height: 1; min-height: 36px; padding: 0; cursor: pointer; color: var(--ink);
}
.cell { position: relative; }
.cell.hol::after { content: ''; position: absolute; top: 3px; inset-inline-end: 3px; width: 7px; height: 7px; border-radius: 50%; background: #d9304f; box-shadow: 0 0 0 1.5px #fff; }
.cell.ram::before { content: ''; position: absolute; bottom: 3px; left: 22%; right: 22%; height: 3px; border-radius: 2px; background: #0f9d7a; box-shadow: 0 0 0 1px #fff; }
.lchip-hol::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #d9304f; margin-inline-end: 6px; }
.lchip-ram::before { content: ''; display: inline-block; width: 14px; height: 3px; border-radius: 2px; background: #0f9d7a; margin-inline-end: 6px; vertical-align: middle; }
.ram-badge { font-size: 11px; font-weight: 600; color: #0b7a5e; background: #dff5ee; border-radius: 999px; padding: 1px 8px; margin-inline-start: 6px; }
.ev-title { font-size: 15px; margin: 18px 0 8px; }
.cell.day { background: #f6d9a0; }
.cell.night { background: #33415c; color: #fff; }
.cell.off { background: #efedec; color: var(--ink-4); cursor: default; }
.cell.sel { background: var(--lp-accent); border-color: var(--lp-accent); color: #fff; font-weight: 700; box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px var(--lp-accent); }

/* علامات الأيام المسجلة على الشارت */
.cell .lvtag { position: absolute; top: 2px; inset-inline-start: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; font-size: 10px; line-height: 14px; font-weight: 700; text-align: center; box-shadow: 0 0 0 1px rgba(0,0,0,.18); }
.cell.lv { box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px #15803d; }
.cell.lv .lvtag { color: #15803d; border: 1.5px solid #15803d; line-height: 11px; }
.cell.lc { box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px #92400e; }
.cell.lc .lvtag { background: #92400e; color: #fff; font-size: 11px; line-height: 14px; letter-spacing: .5px; box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px rgba(0,0,0,.22); }
.cell.lp { box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px #1d4ed8; }
.cell.lp .lvtag { background: #1d4ed8; color: #fff; font-size: 11px; line-height: 14px; letter-spacing: .5px; box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px rgba(0,0,0,.22); }
.lchip-leave::before { content: '\2713'; display: inline-block; width: 14px; height: 14px; line-height: 11px; text-align: center; border-radius: 50%; background: #fff; border: 1.5px solid #15803d; color: #15803d; font-size: 10px; font-weight: 700; margin-inline-end: 5px; vertical-align: middle; }
.lchip-pendc::before { content: '\2026'; display: inline-block; width: 14px; height: 14px; line-height: 14px; text-align: center; border-radius: 50%; background: #92400e; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .5px; margin-inline-end: 5px; vertical-align: middle; }
.rows { border: 1px solid var(--hairline); border-radius: 14px; overflow: hidden; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--hairline); }
.row:first-child { border-top: none; }
.row .n { font-size: 13.5px; }
.row .d { font-size: 12px; color: var(--ink-2); }
.row .v { font-weight: 700; white-space: nowrap; }
.row .v.ok { color: #166534; }
.row .v.bad { color: #b45309; }
.callout { border-radius: 14px; padding: 10px 14px; margin-top: 12px; font-size: 13.5px; }
.callout b { display: block; margin-bottom: 2px; }
.callout.warn { background: var(--warn-bg); color: var(--warn-ink); }
.callout.note { background: var(--note-bg); color: var(--note-ink); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.btn {
  appearance: none; border: none; border-radius: 999px; background: var(--lp-accent); color: #fff;
  font: inherit; font-weight: 700; font-size: 14px; line-height: 20px; padding: 9px 18px; cursor: pointer;
  text-decoration: none; display: inline-block; text-align: center;
}
.btn.sec { background: #fff; color: var(--ink); border: 1px solid var(--hairline); font-weight: 600; }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn.install { background: #0f3d5c; }
.closing { margin-top: 28px; font-size: 12.5px; color: var(--ink-2); border-top: 1px solid var(--hairline); padding-top: 14px; }
.status-ok { color: #166534; font-weight: 600; }
.status-bad { color: #b91c1c; font-weight: 600; }

.cell.hol.sub::after { background: #fff; border: 2px solid #d9304f; box-shadow: none; width: 7px; height: 7px; }
.lchip-sub::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; border: 2px solid #d9304f; background: #fff; margin-inline-end: 6px; vertical-align: middle; }
.sub-tag { display: inline-block; font-size: 11px; font-weight: 600; color: #8a5a00; background: #fdf0d2; border-radius: 999px; padding: 1px 8px; margin-inline-start: 4px; }

.reg-list { display: flex; flex-direction: column; gap: 6px; }
.reg-day {
  appearance: none; font: inherit; text-align: start; cursor: pointer; width: 100%;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border: 1px solid var(--hairline); border-radius: 12px; background: #fff; color: var(--ink);
  padding: 9px 12px;
}
.reg-day.on { border-color: var(--lp-accent); box-shadow: inset 0 0 0 1px var(--lp-accent); background: #f5f8ff; }
.reg-day.locked { cursor: default; background: #fbfaf9; }
.reg-date { font-size: 13.5px; font-weight: 600; }
.reg-sub { display: block; font-size: 12px; font-weight: 400; color: var(--ink-2); }
.pill { display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.pill.ok { background: #e7f5ec; color: #166534; }
.pill.pend { background: var(--warn-bg); color: var(--warn-ink); }
.pill.bad { background: #fdeaea; color: #b91c1c; }
.pill.pick { background: var(--lp-accent); color: #fff; }
.req { border: 1px solid var(--hairline); border-radius: 14px; padding: 10px 12px; margin-top: 10px; }
.req-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.req-kind { font-weight: 700; font-size: 13.5px; }
.req-meta { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.req-days { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
.id-row { display: flex; gap: 8px; align-items: stretch; }
.id-row input { flex: 1; min-width: 0; }
.clear-btn { flex: 0 0 auto; padding: 0 18px; border-radius: 14px; border: 1px solid var(--line, #d9d4cc); background: #fff; color: var(--ink-2, #555); font: inherit; font-size: 14px; cursor: pointer; }
.clear-btn:active { background: #f3efe9; }

/* ===== truck amendment app ===== */
.tx-theme { --lp-accent: #0f3d5c; }
.tx-tabs { margin-bottom: 4px; }
.tx-boxes { display: flex; flex-wrap: nowrap; gap: 3px; align-items: center; margin-bottom: 4px; }
.tx-box {
  width: 100%; min-width: 0; flex: 1 1 0; height: 42px; padding: 0; text-align: center;
  font: inherit; font-size: 16px; font-weight: 600; color: var(--ink);
  border: 1px solid var(--hairline); border-radius: 8px; background: #fff;
}
.tx-box:focus { outline: 2px solid var(--lp-accent); outline-offset: 1px; }
.tx-plate { gap: 4px; }
.tx-plate .tx-box.letter { max-width: 34px; }
.tx-plate .tx-sep { width: 10px; }
.tx-truck { border: 1px solid var(--hairline); border-radius: 16px; padding: 12px; margin-top: 10px; }
.tx-truck-title { font-weight: 700; font-size: 13.5px; margin-bottom: 2px; }
.tx-req { border: 1px solid var(--hairline); border-radius: 14px; padding: 10px 12px; margin-top: 10px; }
.tx-req.fresh { border-color: var(--lp-accent); background: #f4f8fb; }
.tx-req-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.tx-req-id { font-weight: 700; font-size: 14px; }
.tx-new { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; background: #e2edf5; color: #0f3d5c; margin-inline-start: 6px; }
.tx-meta { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.tx-plates { font-size: 13.5px; font-weight: 700; margin-top: 4px; }
.tx-verify { display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.tx-verify.match { background: #e7f5ec; color: #166534; }
.tx-verify.notauth { background: var(--warn-bg); color: var(--warn-ink); }
.tx-verify.mismatch { background: #fdeaea; color: #b91c1c; }
.tx-verify.unreg { background: #efedec; color: var(--ink-2); }
.tx-badge { display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.tx-badge.pending { background: #efedec; color: var(--ink-2); }
.tx-badge.done { background: #e7f5ec; color: #166534; }
.tx-badge.missing { background: var(--warn-bg); color: var(--warn-ink); }
.tx-badge.rejected { background: #fdeaea; color: #b91c1c; }
.tx-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tx-mini {
  appearance: none; font: inherit; font-size: 12.5px; line-height: 18px; padding: 5px 12px;
  border-radius: 999px; border: 1px solid var(--hairline); background: #fff; color: var(--ink); cursor: pointer;
}
.tx-mini.on { background: var(--lp-accent); border-color: var(--lp-accent); color: #fff; font-weight: 600; }
.tx-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.tx-confirm { border: 1px solid var(--lp-accent); border-radius: 16px; padding: 14px; margin-top: 12px; background: #f7fafc; }
.tx-confirm h3 { margin: 0 0 6px; font-size: 16px; }
.tx-error { color: #b91c1c; font-weight: 600; font-size: 13.5px; margin-top: 8px; }
.tx-chip { display: inline-block; font-size: 12px; font-weight: 600; background: #f1efed; border-radius: 8px; padding: 1px 8px; margin-inline-start: 4px; }
.tx-code { font-weight: 700; letter-spacing: 1px; }
.tx-spacer { height: 4px; }
