:root {
  --w-purple: #8E3684;
  --w-purple-d: #6f2867;
  --w-purple-l: #f6eef5;
  --w-purple-m: #e7d3e4;
  --w-text: #2b2330;
  --w-muted: #6c6472;
  --w-border: #e6dfe8;
  --w-bg: #faf8fb;
  --am: #fff6df;
  --pm: #e9ecfb;
}
html, body { font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif; }
body { background: var(--w-bg); color: var(--w-text); font-size: .95rem; }
a { color: var(--w-purple); }
a:hover { color: var(--w-purple-d); }

/* Top bar */
.topbar { background: var(--w-purple); padding: .4rem 0; }
.topbar .navbar-brand img { background: #fff; border-radius: 6px; padding: 2px 6px; }
.topbar .brand-sub { color: #fff; font-weight: 600; font-size: .95rem; }
.topbar .nav-link { color: rgba(255,255,255,.85); font-size: .9rem; border-radius: 6px; padding: .4rem .6rem !important; }
.topbar .nav-link:hover, .topbar .nav-link.active { color: #fff; background: rgba(255,255,255,.15); }
.topbar .navbar-toggler { color: #fff; border: 0; }
.topbar .user-box { color: #fff; }
.role-badge { background: rgba(255,255,255,.2); font-weight: 500; }

/* Buttons & forms */
.btn-primary, .btn-w { background: var(--w-purple); border-color: var(--w-purple); color: #fff; }
.btn-primary:hover, .btn-w:hover, .btn-primary:focus { background: var(--w-purple-d); border-color: var(--w-purple-d); color: #fff; }
.btn-outline-w { border-color: var(--w-purple); color: var(--w-purple); }
.btn-outline-w:hover, .btn-check:checked + .btn-outline-w { background: var(--w-purple); color: #fff; }
.form-control:focus, .form-select:focus { border-color: var(--w-purple); box-shadow: 0 0 0 .2rem rgba(142,54,132,.15); }
.form-check-input:checked { background-color: var(--w-purple); border-color: var(--w-purple); }

/* Cards */
.card { border: 1px solid var(--w-border); border-radius: 10px; box-shadow: none; }
.card-header { background: #fff; border-bottom: 1px solid var(--w-border); font-weight: 600; }
.page-title { font-size: 1.25rem; font-weight: 700; margin: 0; }
.page-head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.stat { background: #fff; border: 1px solid var(--w-border); border-radius: 10px; padding: .8rem 1rem; height: 100%; }
.stat .v { font-size: 1.6rem; font-weight: 700; color: var(--w-purple); line-height: 1.1; }
.stat .l { color: var(--w-muted); font-size: .85rem; }

/* Tables */
.table { --bs-table-bg: #fff; margin-bottom: 0; }
.table thead th { background: var(--w-purple-l); color: var(--w-purple-d); font-weight: 600; white-space: nowrap; border-bottom-color: var(--w-purple-m); }
.table td, .table th { vertical-align: middle; }
.table-wrap { background: #fff; border: 1px solid var(--w-border); border-radius: 10px; overflow: auto; }

/* Chips */
.chip { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 500; white-space: nowrap; }
.chip-am { background: var(--am); color: #8a6200; }
.chip-pm { background: var(--pm); color: #3446a8; }
.chip-off { background: #f3f1f4; color: #8a8290; }
.chip-ok { background: #e3f4e8; color: #1f7a3a; }
.chip-warn { background: #fff3cd; color: #8a6200; }
.chip-bad { background: #fde2e2; color: #a12c2c; }
.chip-male { background: #e0f0ff; color: #1d5fa8; }
.region-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-inline-end: .3rem; vertical-align: middle; }

/* Weekly template grid */
.tpl-table td.tpl-cell { min-width: 108px; padding: .25rem; }
.tpl-cell select { font-size: .8rem; padding: .2rem 1.6rem .2rem .3rem; }
.tpl-cell.is-off select { background-color: #f6f4f7; color: #9a929f; }
.tpl-cell.is-am select { background-color: var(--am); }
.tpl-cell.is-pm select { background-color: var(--pm); }
.tpl-cell.saving { opacity: .5; }

/* Daily roster grid (mirrors the Excel sheet) */
.roster-grid { border-collapse: separate; border-spacing: 0; font-size: .85rem; }
.roster-grid th, .roster-grid td { border: 1px solid var(--w-border); padding: .3rem .35rem; text-align: center; background: #fff; }
.roster-grid thead th { position: sticky; top: 0; z-index: 2; }
.roster-grid .hour-col { position: sticky; right: 0; z-index: 1; background: var(--w-purple-l); font-weight: 600; width: 58px; }
.roster-grid thead .hour-col { z-index: 3; }
.roster-grid .reg-head { color: #fff; font-weight: 600; }
.roster-grid .spec-head { min-width: 96px; font-weight: 600; background: #fff; cursor: pointer; }
.roster-grid .spec-head:hover { background: var(--w-purple-l); }
.roster-grid .spec-head .sub { display: block; font-weight: 400; color: var(--w-muted); font-size: .72rem; }
.roster-grid td.slot { height: 34px; cursor: pointer; }
.roster-grid td.slot:hover { outline: 2px solid var(--w-purple); outline-offset: -2px; }
.roster-grid td.slot.closed { background: repeating-linear-gradient(45deg, #f4d6d6, #f4d6d6 6px, #fbeaea 6px, #fbeaea 12px); color: #a12c2c; font-weight: 600; }
.roster-grid td.slot.capped { background: #fff3cd; color: #8a6200; font-weight: 600; }
.roster-grid td.slot.outside { background: #f6f4f7; cursor: default; }
.roster-grid td.slot.outside:hover { outline: none; }
.roster-grid .changed-mark { color: #d97706; }
.shift-sep td { background: var(--w-purple-l) !important; font-weight: 600; color: var(--w-purple-d); }

/* Map */
#districtMap { height: 62vh; min-height: 380px; border-radius: 10px; border: 1px solid var(--w-border); }
@media (max-width: 991px) { #districtMap { height: 45vh; } }
.leaflet-container { font-family: inherit; }
.dist-list { max-height: 62vh; overflow: auto; }
.dist-item { cursor: pointer; }
.dist-item:hover, .dist-item.active { background: var(--w-purple-l); }

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, var(--w-purple-l), #fff 60%); padding: 1rem; }
.login-card { width: 100%; max-width: 380px; }

/* Mobile */
@media (max-width: 575px) {
  body { font-size: .9rem; }
  .page-title { font-size: 1.1rem; }
  .stat .v { font-size: 1.3rem; }
}
.nav-pills .nav-link { color: var(--w-purple); }
.nav-pills .nav-link.active { background: var(--w-purple); color: #fff; }
.dist-item.active { color: var(--w-text); border-color: var(--w-border); font-weight: 600; }
.tpl-cell.is-diff select { border: 2px solid #d97706; font-weight: 600; }

/* ===== Phase 2: monthly schedule, booking, drag & drop ===== */
.book-bar { position: sticky; top: 0; z-index: 20; border-color: var(--w-purple-m); box-shadow: 0 4px 14px rgba(142,54,132,.08); }
.ac-list { position: absolute; top: 100%; right: 0; left: 0; z-index: 30; background: #fff; border: 1px solid var(--w-border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.08); max-height: 260px; overflow: auto; }
.ac-item { display: block; width: 100%; text-align: right; border: 0; background: none; padding: .35rem .6rem; font-size: .9rem; }
.ac-item:hover, .ac-item.active { background: var(--w-purple-l); }
#bkResults { max-height: 34vh; overflow: auto; }
.bk-day { margin-bottom: .5rem; }
.bk-day-title { font-weight: 600; color: var(--w-purple-d); font-size: .85rem; margin-bottom: .25rem; }
.bk-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: .35rem; }
.bk-slot { border: 1px solid var(--w-border); border-radius: 8px; padding: .3rem .45rem; background: #fff; font-size: .8rem; }
.bk-slot.best { border-color: #2eaa4a; box-shadow: 0 0 0 1px #2eaa4a inset; }
.reasons { list-style: none; padding: 0; margin: .15rem 0 .3rem; font-size: .72rem; line-height: 1.35; }
.reasons li::before { content: '•'; margin-inline-end: .3rem; }
.reasons .r-good { color: #1f7a3a; } .reasons .r-info { color: #5d5566; } .reasons .r-warn { color: #a15c00; }

section.day { background: #fff; border: 1px solid var(--w-border); border-radius: 10px; margin-bottom: 1rem; }
section.day.is-today { border-color: var(--w-purple); box-shadow: 0 0 0 1px var(--w-purple) inset; }
section.day.is-past { opacity: .85; }
.day-head { position: sticky; top: var(--bar-h, 0px); z-index: 10; background: #fff; border-bottom: 1px solid var(--w-border); padding: .45rem .7rem; border-radius: 10px 10px 0 0; }
.day-title { font-size: 1rem; color: var(--w-purple-d); }
.shift-block { padding: .35rem .5rem .5rem; }
.shift-label { margin-bottom: .25rem; }
.grid-scroll { overflow-x: auto; }
.roster-grid { width: max-content; min-width: 100%; }
.roster-grid td.slot { min-width: 96px; height: 36px; vertical-align: middle; padding: 2px; }
.roster-grid td.slot.full { background: #faf5fa; }
.roster-grid td.slot.over { background: #fde2e2; }
.roster-grid tr.past-hour td.slot { background-color: #fbfafb; }
.roster-grid th.spec-head.empty { min-width: 70px; background: #fbfafb; }
.roster-grid .spec-head .load { font-weight: 600; } .load.warn { color: #a15c00; } .load.bad { color: #a12c2c; }
.roster-grid [data-drag="spec"] { cursor: grab; user-select: none; }
.block-label { font-size: .75rem; }

.vchip { display: inline-flex; align-items: center; gap: .2rem; padding: .05rem .4rem; border-radius: 6px; font-size: .8rem; line-height: 1.5; border: 1px solid transparent; white-space: nowrap; user-select: none; }
.vchip[data-drag] { cursor: grab; }
.vchip b { font-weight: 700; }
.vchip.st-hold { background: #fff; border: 1px dashed var(--w-purple); color: var(--w-purple-d); }
.vchip.st-booked { background: var(--w-purple-l); color: var(--w-purple-d); border-color: var(--w-purple-m); }
.vchip.st-assigned { background: #e6f0ff; color: #1d4f9a; border-color: #c9dcfb; }
.vchip.st-confirmed { background: #e3f4e8; color: #1f7a3a; border-color: #c4e6cf; }
.vchip.st-done { background: #eef0ef; color: #4a5a50; }
.bupa { font-style: normal; font-size: .68rem; background: #0a6ebd; color: #fff; border-radius: 4px; padding: 0 .25rem; margin-inline-start: .15rem; }
.hold-left { font-style: normal; font-size: .7rem; }

.dnd-ghost { position: fixed; z-index: 2000; pointer-events: none; opacity: .9; box-shadow: 0 6px 18px rgba(0,0,0,.18); background: #fff; border-radius: 6px; padding: .2rem .5rem; transform: rotate(-2deg); }
.dnd-src { opacity: .4; }
.dnd-over { outline: 3px solid #2eaa4a !important; outline-offset: -3px; background: #eaf7ee !important; }
body.dnd-on, body.dnd-on * { cursor: grabbing !important; user-select: none; }
td.slot.flash { animation: flash 1.2s ease 2; }
@keyframes flash { 0%,100% { box-shadow: none; } 50% { box-shadow: 0 0 0 3px #2eaa4a inset; } }

.cell-group { border: 1px solid var(--w-border); border-radius: 8px; padding: .5rem; margin-bottom: .5rem; }
.cell-group.st-hold { border-style: dashed; border-color: var(--w-purple); }
.add-box { background: var(--w-bg); border-radius: 8px; padding: .6rem; }
.sug-chip { border: 1px solid var(--w-purple-m); background: #fff; color: var(--w-purple-d); border-radius: 999px; padding: .1rem .55rem; font-size: .8rem; }
.sug-chip:hover, .sug-chip.active { background: var(--w-purple); color: #fff; }
#cellPanel { width: min(420px, 100vw); }
@media (max-width: 575px) {
  .book-bar .form-check-label { font-size: .75rem; }
  .roster-grid td.slot { min-width: 84px; }
}

/* ===== Undo toolbar & phone view ===== */
.undo-group .btn:disabled { opacity: .45; }
@media (max-width: 767.98px) {
  .m-hide { display: none !important; }
  .roster-grid td.slot { min-width: 110px; height: 42px; }
  .vchip { font-size: .85rem; padding: .15rem .45rem; }
  .book-bar { position: static; }
  .day-head { top: 0; }
}
/* ===== Tomorrow review ===== */
.rev-sec { border-top: 1px solid var(--w-border); }
.rev-sec:first-child { border-top: 0; }
.rev-sec-head { padding: .5rem .75rem; background: #fcfafc; }
.rev-table td, .rev-table th { font-size: .85rem; }
.rev-done td { opacity: .55; }
.rev-done td:last-child { opacity: 1; }
/* ===== v4: AM/PM suggestions, compare box ===== */
.bk-shift { display: flex; gap: .5rem; align-items: flex-start; margin-bottom: .35rem; }
.bk-shift-label { flex: 0 0 auto; margin-top: .35rem; min-width: 52px; text-align: center; }
.bk-shift .bk-slots { flex: 1 1 auto; }
.cmp-here { font-size: .8rem; background: #f6f4f7; border-radius: 6px; padding: .35rem .5rem; margin-bottom: .35rem; }
.cmp-here.bad { background: #fde2e2; }
.cmp-opt { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .82rem; border: 1px solid #c4e6cf; background: #f1faf3; border-radius: 6px; padding: .35rem .5rem; margin-bottom: .35rem; }
.roster-grid .reg-head { font-weight: 700; }
.roster-grid .hour-col { width: 76px; min-width: 76px; white-space: nowrap; font-size: .8rem; }

/* ===== Sheet look (matches the coordinators' Google Sheet) ===== */
:root { --sh-blue: #4484c3; --sh-bupa: #7d6115; --sh-line: #1f1f1f; }
section.day { border-radius: 6px; overflow: hidden; }
.day-head { background: var(--sh-blue); color: #fff; border-bottom: 1px solid var(--sh-line); border-radius: 0; }
.day-head .day-title { color: #fff; font-size: 1.05rem; }
.day-head .text-muted { color: #e8f0fa !important; }
.roster-grid.sheet { font-family: Arial, Tahoma, "IBM Plex Sans Arabic", sans-serif; font-weight: 700; font-size: .84rem; border-collapse: collapse; }
.roster-grid.sheet th, .roster-grid.sheet td { border: 1px solid var(--sh-line); padding: 2px 4px; direction: rtl; }
.roster-grid.sheet .hour-col { position: sticky; left: 0; right: auto; z-index: 2; background: var(--sh-blue); color: #fff; font-weight: 700; width: 84px; min-width: 84px; }
.roster-grid.sheet thead th { position: static; }
.roster-grid.sheet .reg-head { font-weight: 700; font-size: .9rem; height: 28px; }
.roster-grid.sheet .spec-head { min-width: 104px; font-weight: 700; height: 28px; cursor: pointer; }
.roster-grid.sheet .spec-head:hover { filter: brightness(.93); }
.roster-grid.sheet .spec-head .load { font-size: .68rem; font-weight: 600; opacity: .7; margin-inline-start: .25rem; }
.roster-grid.sheet .spec-head.empty, .roster-grid.sheet td.slot, .roster-grid.sheet td.slot.outside { background: var(--sh-blue); }
.roster-grid.sheet td.slot { min-width: 104px; height: 30px; padding: 1px 3px; color: #000; }
.roster-grid.sheet td.slot:hover { outline: 2px solid #fff; outline-offset: -3px; }
.roster-grid.sheet td.slot.outside:hover { outline: none; }
.roster-grid.sheet td.slot.filled { background: #fff; }
.roster-grid.sheet td.slot.bupa-cell { background: var(--sh-bupa); }
.roster-grid.sheet td.slot.bupa-cell .vchip { color: #fff; }
.roster-grid.sheet td.slot.closed { background: #5f6368; color: #fff; }
.roster-grid.sheet td.slot.capped .block-label { color: #fff; font-size: .75rem; }
.roster-grid.sheet td.slot.over { box-shadow: inset 0 0 0 2px #e0241b; }
.roster-grid.sheet tr.past-hour td.slot { filter: saturate(.75) brightness(.97); }
.roster-grid.sheet .vchip { display: flex; justify-content: center; background: transparent; border: 0; border-radius: 0; padding: 0 2px; font-size: .84rem; font-weight: 700; color: #000; line-height: 1.45; }
.roster-grid.sheet .vchip b { margin-inline-start: .2rem; }
.roster-grid.sheet .vchip.is-bupa { background: var(--sh-bupa); color: #fff; }
.roster-grid.sheet .vchip.st-hold { background: #fff8d6; outline: 1px dashed #8E3684; outline-offset: -1px; color: #5a1f55; }
.roster-grid.sheet .vchip + .vchip { border-top: 1px solid #ccc; }
.legend .vchip.sh-booked { background: #fff; border: 1px solid #999; color: #000; font-weight: 700; }
.legend .vchip.sh-bupa { background: var(--sh-bupa); color: #fff; font-weight: 700; }
.legend .vchip.sh-empty { background: var(--sh-blue); color: #fff; }
@media (max-width: 767.98px) { .roster-grid.sheet td.slot { min-width: 110px; height: 40px; } }
.day-head { position: static; }
.roster-grid.sheet tr.past-hour td.slot { background-color: var(--sh-blue); }
.roster-grid.sheet tr.past-hour td.slot.filled { background-color: #fff; }
.roster-grid.sheet tr.past-hour td.slot.bupa-cell { background-color: var(--sh-bupa); }
.roster-grid.sheet tr.past-hour td.slot.closed { background-color: #5f6368; }
/* v8: white = specialist on duty (empty hour), blue = no specialist in that column */
.roster-grid.sheet td.slot, .roster-grid.sheet tr.past-hour td.slot { background-color: #fff; }
.roster-grid.sheet td.slot.outside, .roster-grid.sheet tr.past-hour td.slot.outside, .roster-grid.sheet .spec-head.empty { background-color: var(--sh-blue); }
.roster-grid.sheet td.slot:hover { outline: 2px solid var(--sh-blue); outline-offset: -3px; }
.roster-grid.sheet td.slot.capped .block-label { color: #8a6200; }
.roster-grid.sheet tr.past-hour td.slot { filter: none; }
.roster-grid.sheet, .roster-grid.sheet .vchip, .roster-grid.sheet td.slot { color: #000; font-weight: 800; }
.roster-grid.sheet .vchip { font-size: .9rem; }
.roster-grid.sheet .vchip.st-hold { color: #000; }
.roster-grid.sheet .spec-head .spec-name { font-size: 1rem; font-weight: 800; }
.roster-grid.sheet .spec-head { height: 32px; }
.roster-grid.sheet .reg-head { font-size: 1rem; font-weight: 800; }
/* v8.1: everything in the sheet table is black Arial, like the Google Sheet */
.roster-grid.sheet, .roster-grid.sheet * { font-family: Arial, "Arial Unicode MS", Tahoma, sans-serif !important; }
.roster-grid.sheet th, .roster-grid.sheet td, .roster-grid.sheet .vchip, .roster-grid.sheet .spec-name, .roster-grid.sheet .load,
.roster-grid.sheet td.slot.bupa-cell .vchip, .roster-grid.sheet .vchip.is-bupa { color: #000 !important; }
.roster-grid.sheet .hour-col, .roster-grid.sheet .hour-col.lbl { color: #fff !important; }
.roster-grid.sheet .spec-head .load { opacity: .55; }
.border-w { border-color: var(--w-purple) !important; }

/* locked day */
.roster-grid.sheet .spec-head.locked { box-shadow: inset 0 0 0 3px #b45309; }
.roster-grid.sheet .spec-head .lock-mark { color: #7c2d12; }
.roster-grid.sheet td.slot.locked-col:not(.filled) { background-image: repeating-linear-gradient(45deg, #e5e7eb, #e5e7eb 6px, #f3f4f6 6px, #f3f4f6 12px); background-color: #f3f4f6; cursor: not-allowed; }
.roster-grid.sheet tr.past-hour td.slot.locked-col:not(.filled) { background-color: #f3f4f6; }
/* locked day: the whole column is shaded red */
.roster-grid.sheet .spec-head.locked { background: #ef4444 !important; box-shadow: none; }
.roster-grid.sheet td.slot.locked-col,
.roster-grid.sheet tr.past-hour td.slot.locked-col,
.roster-grid.sheet td.slot.locked-col:not(.filled),
.roster-grid.sheet tr.past-hour td.slot.locked-col:not(.filled) { background-color: #fca5a5; background-image: none; cursor: not-allowed; }
.roster-grid.sheet td.slot.locked-col.filled { background-color: #fecaca; }
.roster-grid.sheet td.slot.locked-col.bupa-cell,
.roster-grid.sheet tr.past-hour td.slot.locked-col.bupa-cell { background-color: var(--sh-bupa); box-shadow: inset 0 0 0 3px #ef4444; }
.legend .vchip.sh-locked { background: #fca5a5; color: #000; font-weight: 700; }

/* city / group switch always reachable while scrolling */
.roster-head { position: sticky; top: 0; z-index: 30; background: var(--w-bg); padding: .35rem 0; margin-bottom: .4rem; }
.book-bar { top: var(--head-h, 0px); }
@media (max-width: 767.98px) {
  .roster-head { padding: .25rem 0; gap: .3rem; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
  .roster-head .page-title { display: none; }
  .roster-head .btn, .roster-head .form-control { font-size: .78rem; padding: .2rem .45rem; }
}
@media (max-width: 767.98px) {
  /* one slim row on the phone: city · date · sample/nursing */
  .roster-head > div:first-child { display: none !important; }
  .roster-head form { flex-wrap: nowrap !important; gap: .25rem !important; width: 100%; overflow-x: auto; }
  .roster-head form > * { flex: 0 0 auto; }
  .roster-head input[type="date"] { width: 100px !important; padding-inline: .25rem !important; }
  .roster-head .btn { white-space: nowrap; }
}
/* review tables on the phone: scroll sideways instead of squeezing the text into one-word lines */
@media (max-width: 767.98px) { .rev-table { min-width: 680px; } .rev-table td { white-space: normal; } }

/* Map pins */
.w-pin { background: none; border: 0; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); transition: transform .12s; }
.w-pin svg { display: block; }
.w-pin:hover { transform: scale(1.15); transform-origin: 50% 100%; }
.w-pin-off { opacity: .4; }
.w-pin-edit { filter: drop-shadow(0 3px 4px rgba(0,0,0,.45)); }
.leaflet-tooltip.w-pin-label { display: none; background: #fff; border: 1px solid #cfc3d4; border-radius: 6px; padding: 2px 8px; font-size: .88rem; font-weight: 700; color: #1f1724; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.leaflet-tooltip.w-pin-label::before { display: none; }
.show-pin-labels .leaflet-tooltip.w-pin-label,
.leaflet-tooltip.w-pin-label.hover { display: block; z-index: 1000; }
.leaflet-control-layers { font-size: .85rem; }
/* صور الخريطة أوضح: تباين وألوان أقوى قليلاً */
#districtMap .leaflet-tile-pane { filter: contrast(1.12) saturate(1.15); }
#districtMap .leaflet-tile { image-rendering: -webkit-optimize-contrast; }

/* the "close" of the search results stays visible while the list scrolls */
#bkResults .bk-res-head { position: sticky; top: 0; z-index: 2; background: #fff; padding: .2rem 0; }

/* live indicator */
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #16a34a; display: inline-block; box-shadow: 0 0 0 0 rgba(22,163,74,.6); animation: livePulse 2s infinite; }
.live-dot.off { background: #dc2626; animation: none; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.55); } 70% { box-shadow: 0 0 0 7px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }
.roster-grid.sheet td.slot.flash { animation: liveFlash 1.6s ease 2; }
@keyframes liveFlash { 0%, 100% { box-shadow: inset 0 0 0 0 rgba(22,163,74,0); } 40% { box-shadow: inset 0 0 0 4px rgba(22,163,74,.9); } }

/* a visit whose district could not be recognised: shown as written in the sheet, marked */
.vchip.unk { border: 1px dashed #c0392b !important; }
.vchip .unk-mark { font-style: normal; color: #c0392b; font-weight: 700; margin-inline-end: .15rem; }

/* doctors ride with a nurse: a column without bookable cells */
.spec-head.doc-head .doc-nurse { display: block; margin: .15rem auto 0; max-width: 100%; font: inherit; font-size: .78rem; font-weight: 700; color: #000; background: #fff; border: 1px solid #000; border-radius: 4px; padding: 0 .2rem; }
.spec-head.doc-head .doc-with { display: block; font-size: .78rem; font-weight: 700; }
td.slot.doc-cell { background: repeating-linear-gradient(135deg, #f1f1f1, #f1f1f1 6px, #e2e2e2 6px, #e2e2e2 12px) !important; cursor: not-allowed; }

/* day title, counts and "not working" list sit in the middle of the schedule */
.day-head { text-align: center; }
.day-head > .d-flex { justify-content: center; }

/* own working hours under a name (mid shift / flexible hours) */
.spec-head .own-hours { display: block; font-size: .7rem; font-weight: 700; direction: rtl; }

/* nursing services: the cell takes the colour of the service (wins over the insurer colour, which becomes a small tag) */
table.sheet td.slot.svc-iv_first, .svc-key.svc-iv_first { background: #FF5A5A !important; }
table.sheet td.slot.svc-iv_follow, .svc-key.svc-iv_follow { background: #7DD8FF !important; }
table.sheet td.slot.svc-im, .svc-key.svc-im { background: #FF5FD2 !important; }
table.sheet td.slot.svc-lab, .svc-key.svc-lab { background: #FFA53A !important; }
table.sheet td.slot[class*="svc-"] .vchip.is-bupa .bupa { display: inline-block !important; font-style: normal; font-size: .65rem; font-weight: 700; background: #7a5a1e; color: #fff; border-radius: 3px; padding: 0 .2rem; margin-inline-start: .2rem; }
.svc-legend { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; font-size: .78rem; }
.svc-key { display: inline-block; padding: .05rem .45rem; border-radius: 4px; color: #000; font-weight: 700; border: 1px solid rgba(0,0,0,.25); }

/* notes */
.day-note { border: 0; border-radius: 12px; padding: .1rem .55rem; font-size: .78rem; background: #fff8d6; color: #5a4600; font-weight: 600; }
.day-note.lvl-1 { background: #ffd9d9; color: #9b1111; font-weight: 800; box-shadow: 0 0 0 1px #e05a5a inset; }
.day-head .day-note { max-width: 32rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-note { display: block; font-size: .68rem; font-weight: 700; color: #6a5200; line-height: 1.25; }
.cell-note.lvl-1 { color: #c0392b; }
.vchip .note-imp { color: #c0392b; }
.visit-note { margin-top: .35rem; padding: .3rem .45rem; border-radius: 6px; background: #fff8d6; font-size: .85rem; }
.visit-note.imp { background: #ffd9d9; color: #8a1010; font-weight: 700; }
/* own daily limit */
.spec-head .load.own-cap { outline: 1px dashed currentColor; border-radius: 4px; padding: 0 .2rem; }
/* nursing under the sampling schedule */
.nurse-embed { border-top: 3px solid #8E3684; margin-top: .25rem; }
.nurse-embed-title { background: #f3e6f1; color: #6b2463; font-weight: 800; padding: .25rem .7rem; font-size: .9rem; text-align: center; }

/* ===== call centre: «حجز موعد» ===== */
.cc-page { max-width: 1080px; margin: 0 auto; --cc-plum: #4a1a44; --cc-mint: #17895a; --cc-mint-l: #e2f5eb; --cc-amber: #9a6a00; --cc-amber-l: #fff4d6; --cc-blue: #1f5fae; --cc-blue-l: #e6f0fc; }
.cc-console { position: relative; background: var(--cc-plum); color: #fff; border-radius: 22px; padding: 1.4rem 1.6rem 1.3rem; margin-bottom: 1.25rem;
  background-image: radial-gradient(120% 140% at 100% 0%, #8E3684 0%, rgba(142,54,132,0) 55%); }
.cc-console-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.cc-title { font-size: 1.35rem; font-weight: 700; margin: 0; display: flex; align-items: center; gap: .5rem; }
.cc-today { display: flex; align-items: baseline; gap: .35rem; font-size: .8rem; color: #e9d7e6; }
.cc-today > span { margin-inline-end: .35rem; }
.cc-today b { font-size: 1.25rem; color: #fff; font-weight: 700; }
.cc-today b.bad { color: #ffb4b4; }
.cc-today small { margin-inline-end: .7rem; }
.cc-cities { display: inline-flex; gap: .25rem; background: rgba(255,255,255,.1); padding: .25rem; border-radius: 999px; margin-bottom: .8rem; }
.cc-city { border: 0; background: transparent; color: #f1e3ee; padding: .35rem 1.1rem; border-radius: 999px; font-weight: 600; font-size: .92rem; }
.cc-city.on { background: #fff; color: var(--cc-plum); }
.cc-city:disabled:not(.on) { opacity: .45; }
.cc-city:focus-visible, .cc-go:focus-visible, .cc-call-end:focus-visible { outline: 3px solid #f3c6ec; outline-offset: 2px; }
.cc-field { position: relative; display: flex; align-items: center; background: #fff; border-radius: 16px; padding: .35rem; box-shadow: 0 10px 30px rgba(30,0,25,.25); }
.cc-field-icon { color: #8E3684; font-size: 1.3rem; padding: 0 .8rem 0 .5rem; }
.cc-input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: 1.3rem; font-weight: 600; color: var(--w-text); padding: .55rem 0; background: transparent; }
.cc-input::placeholder { color: #a99aa6; font-weight: 500; }
.cc-input[readonly] { color: var(--cc-plum); }
.cc-go { border: 0; background: #8E3684; color: #fff; font-weight: 700; border-radius: 12px; padding: .7rem 1.2rem; white-space: nowrap; }
.cc-go:hover { background: #6f2867; }
.cc-go:disabled { background: #cbb6c7; }
.cc-field .ac-list { top: calc(100% + 6px); inset-inline: 0; font-size: 1.05rem; color: var(--w-text); border-radius: 12px; }
.cc-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin-top: .8rem; font-size: .9rem; }
.cc-opts .form-check { display: flex; align-items: center; gap: .55rem; padding: 0; }
.cc-opts .form-check-input { margin: 0; float: none; width: 2.4em; height: 1.25em; cursor: pointer; }
.cc-opts .form-check-input:checked { background-color: #f3a6e4; border-color: #f3a6e4; }
.cc-note { color: #dcc6d8; font-size: .82rem; }
/* the live call strip: the one moving thing on the page */
.cc-call { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: .5rem 1.25rem; margin-top: 1rem; padding: .9rem 1.1rem .4rem;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 16px; }
.cc-call-info { display: flex; gap: .7rem; align-items: center; }
.cc-call-dot { width: 12px; height: 12px; border-radius: 50%; background: #5ee0a0; box-shadow: 0 0 0 0 rgba(94,224,160,.7); animation: cc-pulse 1.6s infinite; flex: none; }
.cc-call-label { font-weight: 600; }
.cc-call-hint { font-size: .8rem; color: #e2cfe0; }
.cc-call-clock { font-size: 2.3rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; direction: ltr; }
.cc-call-end { border: 1px solid rgba(255,255,255,.5); background: transparent; color: #fff; border-radius: 10px; padding: .45rem .9rem; font-size: .88rem; }
.cc-call-end:hover { background: rgba(255,255,255,.12); }
.cc-call-track { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: rgba(255,255,255,.15); overflow: hidden; }
.cc-call-track span { display: block; height: 100%; width: 100%; background: #5ee0a0; border-radius: 3px; transition: width 1s linear; margin-inline-start: 0; }
.cc-call.late .cc-call-track span, .cc-call.late .cc-call-dot { background: #ff8f8f; }
.cc-call.late .cc-call-clock { color: #ffb4b4; }
@keyframes cc-pulse { 70% { box-shadow: 0 0 0 10px rgba(94,224,160,0); } 100% { box-shadow: 0 0 0 0 rgba(94,224,160,0); } }
@media (prefers-reduced-motion: reduce) { .cc-call-dot { animation: none; } .cc-call-track span { transition: none; } }
/* before a search: what the call looks like */
.cc-steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding: 0; margin: 0; }
.cc-steps li { counter-increment: s; background: #fff; border: 1px solid var(--w-border); border-radius: 16px; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .2rem; }
.cc-steps li::before { content: counter(s); width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--w-purple-l); color: #8E3684; font-weight: 700; display: grid; place-items: center; margin-bottom: .35rem; }
.cc-steps span { color: var(--w-muted); font-size: .85rem; }
.cc-msg { background: #fff; border: 1px solid var(--w-border); border-radius: 14px; padding: .8rem 1rem; margin-bottom: .8rem; }
.cc-msg.bad { border-color: #f1b5b5; background: #fff4f4; color: #8c1d1d; }
.cc-msg .js-resume { margin-inline-start: .5rem; }
/* the board of times */
.cc-board-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; margin-bottom: .7rem; }
.cc-board-title { font-size: 1.15rem; font-weight: 700; margin: 0; }
.cc-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .8rem; color: var(--w-muted); }
.cc-legend .sw { display: inline-block; width: .8rem; height: .8rem; border-radius: 4px; vertical-align: -1px; margin-inline-end: .3rem; }
.sw.rec { background: var(--cc-mint); } .sw.avail { background: #f0c65a; } .sw.male { background: var(--cc-blue); }
.cc-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .75rem; }
.cc-day { background: #fff; border: 1px solid var(--w-border); border-radius: 16px; padding: .75rem; }
.cc-day.none { background: transparent; border-style: dashed; }
.cc-day header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: .55rem; padding-bottom: .45rem; border-bottom: 1px solid var(--w-border); }
.cc-wd { font-weight: 700; font-size: 1.05rem; }
.cc-dt { color: var(--w-muted); font-size: .78rem; direction: ltr; }
.cc-times { display: flex; flex-direction: column; gap: .4rem; }
.cc-t { white-space: nowrap; }
.cc-time { display: flex; align-items: center; justify-content: space-between; gap: .4rem; width: 100%; border-radius: 10px; padding: .5rem .7rem; font-weight: 700; font-size: .92rem; text-align: start; }
.cc-time.rec { background: var(--cc-mint-l); border: 1.5px solid var(--cc-mint); color: #0f5a3b; }
.cc-time.avail { background: var(--cc-amber-l); border: 1px solid #ebcf86; color: #6b4b00; }
.cc-time:hover { filter: brightness(.96); }
.cc-time:focus-visible { outline: 3px solid #8E3684; outline-offset: 2px; }
.cc-time:disabled { opacity: .6; }
.cc-empty { color: var(--w-muted); font-size: .85rem; margin: .3rem 0; }
.cc-board-foot { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.cc-male { flex: none; padding: .05rem .4rem; border-radius: 6px; background: var(--cc-blue-l); color: var(--cc-blue); font-size: .72rem; font-weight: 700; }
/* booked by me, waiting for coordination */
.cc-wait { background: #fff; border: 1px solid var(--w-border); border-radius: 14px; padding: .7rem 1rem; margin-bottom: .9rem; font-size: .88rem; }
.cc-wait-title { font-weight: 700; margin-bottom: .3rem; }
.cc-wait-row { display: flex; flex-wrap: wrap; gap: .3rem 1rem; padding: .25rem 0; border-top: 1px dashed var(--w-border); }
.cc-wait-row .ref { color: var(--w-muted); } .cc-wait-row .left { margin-inline-start: auto; color: #8E3684; }
/* the temporary booking window */
.cc-hold { border: 0; border-radius: 18px; overflow: hidden; }
.cc-hold-head { background: #4a1a44; color: #fff; display: flex; justify-content: space-between; align-items: center; padding: .8rem 1.1rem; }
.cc-hold-clock { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; direction: ltr; }
.cc-hold-when { font-size: 1.25rem; font-weight: 700; margin-bottom: .15rem; }
.cc-hold-steps { background: var(--w-purple-l); border-radius: 10px; padding: .55rem .75rem; }
#ccRef { font-size: 1.2rem; font-weight: 600; letter-spacing: .03em; }
@media (max-width: 640px) {
  .cc-console { padding: 1rem; border-radius: 16px; }
  .cc-input { font-size: 1.05rem; }
  .cc-go { padding: .6rem .8rem; font-size: 0; } .cc-go i { font-size: 1.1rem; }
  .cc-call { grid-template-columns: 1fr auto; }
  .cc-call-info { grid-column: 1; grid-row: 1; } .cc-call-clock { grid-column: 2; grid-row: 1; }
  .cc-call-ext { grid-column: 1; grid-row: 2; justify-self: start; } .cc-call-end { grid-column: 2; grid-row: 2; }
  .cc-call-track { grid-row: 3; }
  .cc-steps { grid-template-columns: 1fr; }
  .cc-board { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .cc-day { padding: .55rem; }
  .cc-time { padding: .45rem .5rem; font-size: .85rem; }
}
/* ===== Mobile app: «جدولي» (specialist) + live locations ===== */
.is-app .topbar { padding-top: max(.4rem, env(safe-area-inset-top)); }
.is-app main { padding-bottom: max(1rem, env(safe-area-inset-bottom)) !important; }
.my-wrap { max-width: 640px; margin: 0 auto; }
.my-head { display: flex; align-items: center; gap: .7rem; background: linear-gradient(135deg, var(--w-purple), #b0529f); color: #fff; border-radius: 14px; padding: .8rem 1rem; margin-bottom: .6rem; }
.my-avatar { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 700; flex-shrink: 0; }
.min-w-0 { min-width: 0; }
.loc-pill { border: 0; border-radius: 999px; padding: .35rem .7rem; font-size: .78rem; background: rgba(255,255,255,.2); color: #fff; white-space: nowrap; }
.loc-pill.on { background: #22c55e; } .loc-pill.off { background: #ef4444; } .loc-pill.idle { background: rgba(255,255,255,.35); } .loc-pill.wait { background: #f59e0b; }
.my-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem; }
.my-day { display: flex; flex-direction: column; align-items: center; background: #fff; border: 1px solid var(--w-border); border-radius: 10px; padding: .35rem .1rem; text-decoration: none; color: var(--w-text); font-size: .72rem; line-height: 1.35; }
.my-day .wd { font-weight: 600; } .my-day .dm { font-size: .95rem; font-weight: 700; } .my-day .vn { color: var(--w-muted); font-size: .66rem; }
.my-day.off { background: #f6f4f7; color: #9a929f; }
.my-day.active { background: var(--w-purple); border-color: var(--w-purple); color: #fff; } .my-day.active .vn { color: rgba(255,255,255,.85); }
.my-hour { display: flex; gap: .6rem; margin-bottom: .45rem; }
.my-time { width: 66px; flex-shrink: 0; text-align: center; font-weight: 700; font-size: .85rem; color: var(--w-purple-d); padding-top: .6rem; }
.now-dot { display: block; margin: .2rem auto 0; width: max-content; background: #ef4444; color: #fff; border-radius: 999px; font-size: .65rem; padding: 0 .45rem; }
.my-slot { flex: 1; min-width: 0; background: #fff; border: 1px solid var(--w-border); border-radius: 12px; padding: .55rem .7rem; }
.my-hour.now .my-slot { border-color: var(--w-purple); box-shadow: 0 0 0 3px rgba(142,54,132,.15); }
.my-hour.past { opacity: .6; }
.my-hour.free .my-slot { background: transparent; border-style: dashed; padding: .4rem .7rem; }
.my-hour.closed .my-slot { background: repeating-linear-gradient(45deg, #fbeaea, #fbeaea 6px, #fff 6px, #fff 12px); }
.my-visit { border-inline-start: 4px solid var(--w-purple); padding-inline-start: .55rem; margin-bottom: .45rem; }
.my-visit:last-of-type { margin-bottom: 0; }
#locMap { height: 72vh; min-height: 420px; border-radius: 10px; border: 1px solid var(--w-border); }
@media (max-width: 991px) { #locMap { height: 55vh; } }
.loc-list { max-height: 68vh; overflow: auto; }
.loc-item { display: flex; align-items: center; gap: .5rem; width: 100%; border: 0; border-bottom: 1px solid #f1edf3; background: none; padding: .45rem .4rem; }
.loc-item:hover, .loc-item.active { background: var(--w-purple-l); }
.loc-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: #cbd5e1; flex-shrink: 0; }
.loc-dot.fresh { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.25); } .loc-dot.recent { background: #f59e0b; } .loc-dot.old { background: #94a3b8; }
.loc-pin { width: 34px; height: 34px; border-radius: 50%; background: var(--c, #8E3684); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 3px solid #94a3b8; box-shadow: 0 2px 6px rgba(0,0,0,.3); text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.loc-pin.fresh { border-color: #22c55e; } .loc-pin.recent { border-color: #f59e0b; } .loc-pin.old { border-color: #94a3b8; filter: grayscale(.6); }
.loc-visit { background: #fff; border: 2px solid var(--w-purple); color: var(--w-purple-d); border-radius: 8px 8px 8px 0; font-size: .7rem; font-weight: 700; padding: 1px 4px; white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.app-icon-prev { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 6px 18px rgba(0,0,0,.15); }
.app-steps { padding-inline-start: 1.2rem; margin: 0; } .app-steps li { padding: .35rem 0; }
.my-outcome { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-top: .35rem; padding: .3rem .45rem; border-radius: 8px; background: #f8f6f9; }
.my-outcome.is-done { background: #e3f4e8; } .my-outcome.is-done .oc-label { color: #1f7a3a; }
.my-outcome.is-cancelled { background: #fde2e2; } .my-outcome.is-cancelled .oc-label { color: #a12c2c; }
.oc-reason { display: flex; gap: .5rem; align-items: center; padding: .45rem .5rem; border: 1px solid var(--w-border); border-radius: 8px; margin-bottom: .3rem; cursor: pointer; }
.oc-reason:has(input:checked) { border-color: #dc3545; background: #fff5f5; }
.issue-cats { display: flex; flex-wrap: wrap; gap: .3rem; }
.issue-card.urgent { border: 2px solid #dc3545; }
.issue-desc { background: #faf8fb; border-radius: 8px; padding: .5rem .7rem; white-space: normal; }
@media print { .no-print, .topbar { display: none !important; } }
.dropdown-item.active, .dropdown-item:active { background: var(--w-purple); color: #fff; }
.loc-map-wrap.full { position: fixed; inset: 0; z-index: 1080; background: #fff; padding: env(safe-area-inset-top) 0 0; }
.loc-map-wrap.full #locMap { height: 100vh; border-radius: 0; }
.loc-ctl a { display: flex !important; align-items: center; justify-content: center; font-size: 1rem; color: #333; }
.leaflet-tooltip.loc-name { background: rgba(255,255,255,.92); border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.25); font-weight: 700; font-size: .78rem; padding: 1px 6px; border-radius: 6px; color: #2b2330; }
.leaflet-tooltip.loc-name::before { display: none; }
.leaflet-tooltip.loc-name.old, .leaflet-tooltip.loc-name.none { color: #8a8290; font-weight: 500; }
.loc-issue { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #dc3545; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.loc-issue.done { color: #94a3b8; }
.loc-oc { width: 22px; height: 22px; border-radius: 50%; color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: .8rem; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.loc-oc.done { background: #16a34a; } .loc-oc.cancelled { background: #dc3545; }
.leaflet-container { font-size: .85rem; }
/* call-centre bookings inside the coordinators' schedule */
.vchip.cc-hold { border-style: dashed !important; border-color: #0d6efd !important; }
.vchip .cc-mark { color: #0d6efd; font-style: normal; }

/* ---- The specialist's app: bottom tabs (جدولي · خريطتي · المعلومات) — 15 Oct 2026 ---- */
body.has-spnav main { padding-bottom: 86px !important; }
body.has-spnav .toast-container { bottom: 70px !important; }
.sp-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1030; display: flex; justify-content: space-around;
  background: rgba(255,255,255,.97); backdrop-filter: blur(10px); border-top: 1px solid var(--w-border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px -6px rgba(40,20,40,.12); }
.sp-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--w-muted); font-size: 11px; font-weight: 600; padding: 4px 0; }
.sp-nav a svg { width: 22px; height: 22px; }
.sp-nav a.active { color: var(--w-purple); }
/* «خريطتي» */
.mymap-wrap { max-width: 900px; margin: 0 auto; }
#myMap { height: calc(100vh - 290px); min-height: 340px; border-radius: 14px; border: 1px solid var(--w-border); }
.mymap-list { display: flex; gap: .4rem; overflow-x: auto; padding: .4rem 0 .2rem; scrollbar-width: thin; }
.mymap-stop { flex: 0 0 auto; display: flex; align-items: center; gap: .4rem; background: #fff; border: 1px solid var(--w-border); border-radius: 999px; padding: .3rem .65rem .3rem .35rem; font-size: .8rem; cursor: pointer; white-space: nowrap; }
.mymap-stop .n { width: 24px; height: 24px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .75rem; }
.mymap-stop.past { opacity: .55; }
.mymap-pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; }
.mymap-pin b { transform: rotate(45deg); color: #fff; font-size: 12px; }
.mymap-me { width: 18px; height: 18px; border-radius: 50%; background: #2563eb; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(37,99,235,.25); }
.info-admin .ia-sec { cursor: pointer; }

/* ---- «جدولي» بشكل شيت الإكسل (15 Oct 2026) ---- */
.my-sheet-wrap { border: 2px solid var(--sh-line); border-radius: 4px; overflow: hidden; background: #fff; }
.my-sheet { width: 100%; border-collapse: collapse; font-family: Arial, Tahoma, "IBM Plex Sans Arabic", sans-serif; color: #000; }
.my-sheet th, .my-sheet td { border: 1px solid var(--sh-line); padding: 4px 6px; vertical-align: middle; }
.my-sheet .hc { width: 76px; background: var(--sh-blue); color: #fff; font-weight: 800; text-align: center; font-size: .86rem; white-space: nowrap; }
.my-sheet thead th { height: 36px; font-weight: 800; }
.my-sheet thead .sp { text-align: center; font-size: 1.05rem; }
.my-sheet thead .sp .sp-reg { font-size: .8rem; font-weight: 700; opacity: .85; }
.my-sheet thead .ac { background: var(--sh-blue); width: 1%; }
.my-sheet td.cell { background: #fff; font-weight: 800; text-align: center; height: 42px; }
.my-sheet td.cell.outside { background: var(--sh-blue); }
.my-sheet td.cell.closed { background: #5f6368; color: #fff; font-size: .85rem; }
.my-sheet td.ac { width: 1%; white-space: nowrap; text-align: center; background: #fafafa; }
.my-sheet td.ac .btn { padding: .15rem .4rem; font-size: .78rem; display: block; width: 100%; margin: 2px 0; }
.my-sheet tr.now td { box-shadow: inset 0 3px 0 #e0241b, inset 0 -3px 0 #e0241b; }
.my-sheet tr.now .hc { background: #e0241b; }
.my-sheet .now-tag { display: block; font-size: .65rem; font-weight: 700; }
.my-sheet tr.past td.cell.filled .xl-d { opacity: .55; }
.xl-v { padding: 2px 0; }
.xl-v + .xl-v { border-top: 1px solid #bbb; margin-top: 3px; padding-top: 4px; }
.xl-v.is-bupa { background: var(--sh-bupa); color: #fff; margin: -4px -6px; padding: 6px; }
.xl-v.is-bupa + .xl-v { margin-top: 4px; }
.xl-line { display: flex; align-items: center; justify-content: center; gap: .4rem; }
.xl-d { font-size: 1.08rem; font-weight: 800; }
.xl-d b { display: inline-block; min-width: 1.4em; border-radius: 4px; background: #000; color: #fff; font-size: .8rem; padding: 0 .25em; }
.xl-go { font-size: 1.15rem; color: #1a73e8; line-height: 1; }
.xl-v.is-bupa .xl-go { color: #fff; }
.xl-flags { font-size: .74rem; font-weight: 700; opacity: .85; }
.xl-note { font-size: .74rem; font-weight: 600; color: #555; }
.xl-v.is-bupa .xl-note { color: #f2ead6; }
.xl-cap { font-size: .72rem; color: #8a6200; }
.my-sheet .my-outcome { margin-top: .3rem; text-align: start; }
.my-legend { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; font-size: .74rem; color: var(--w-muted); margin: .4rem 0 .6rem; }
.my-legend .lg { display: inline-block; width: 12px; height: 12px; border: 1px solid #333; vertical-align: -2px; }
.lg-bupa { background: var(--sh-bupa); } .lg-closed { background: #5f6368; } .lg-out { background: var(--sh-blue); }
/* «خريطتي» — clearer pins and names */
.mymap-pin { width: 36px; height: 36px; }
.mymap-pin b { font-size: 14px; }
.leaflet-tooltip.mymap-lbl { background: #fff; border: 1px solid #333; border-radius: 6px; font-weight: 800; font-size: 12px; padding: 1px 6px; color: #000; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.mymap-full #myMap { position: fixed; inset: 0; z-index: 1040; height: 100vh !important; border-radius: 0; }
#myMap.leaflet-container { direction: ltr; }
#myMap .leaflet-popup-content, #myMap .mymap-lbl { direction: rtl; text-align: right; }
.cc-input.cc-warn { color: #b42318; font-size: 1.05rem; font-weight: 700; animation: cc-shake .35s; }
@keyframes cc-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { .cc-input.cc-warn { animation: none; } }
.spec-head .reentry { display: inline-block; margin-inline-start: .2rem; padding: 0 .3rem; border-radius: 8px; background: #fff; color: #b42318; font-weight: 900; font-size: .8rem; line-height: 1.3; }
.arr-item { cursor: pointer; } .arr-item:hover { background: var(--w-purple-l); }
.cc-select { border: 0; border-radius: 10px; padding: .35rem .7rem; font-weight: 600; color: var(--cc-plum); background: #fff; }
.cc-select:disabled { opacity: .55; }
/* «رتّب اليوم» */
.arr-head { background: #4a1a44; color: #fff; }
.arr-wrap { display: grid; grid-template-columns: 330px 1fr; min-height: 0; height: 100%; }
.arr-side { border-inline-end: 1px solid var(--w-border); padding: .9rem; overflow: auto; background: var(--w-bg); }
.arr-grid { overflow: auto; padding: .6rem; }
.arr-grid .grid-scroll { overflow: visible; }
.arr-item { display: flex; gap: .5rem; align-items: flex-start; background: #fff; border: 1px solid var(--w-border); border-radius: 10px; padding: .5rem .6rem; margin-bottom: .45rem; cursor: pointer; font-size: .88rem; }
.arr-item:hover { border-color: #8E3684; }
.arr-item .form-check-input { margin-top: .2rem; flex: none; }
.arr-num { display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; border-radius: 50%; background: #e8590c; color: #fff; font-size: .75rem; font-weight: 800; flex: none; }
.roster-grid td.slot.arr-a { outline: 3px solid #e8590c; outline-offset: -3px; position: relative; background-image: repeating-linear-gradient(45deg, rgba(232,89,12,.10) 0 6px, transparent 6px 12px); }
.roster-grid td.slot.arr-a.arr-off { outline-color: #c9c2cc; background-image: none; }
.roster-grid td.slot.arr-a.arr-off .arr-num { background: #9b929e; }
.roster-grid td.slot.arr-hot { outline-width: 5px; }
.roster-grid td.slot .arr-num { position: absolute; top: 1px; left: 1px; min-width: 1.1rem; height: 1.1rem; font-size: .65rem; }
.roster-grid td.slot .arr-to { display: block; font-size: .66rem; color: #b8460a; font-weight: 800; white-space: nowrap; }
@media (max-width: 900px) { .arr-wrap { grid-template-columns: 1fr; } .arr-side { max-height: 38vh; border-inline-end: 0; border-bottom: 1px solid var(--w-border); } }
/* login page: quick links (no login needed) */
.login-links { display: grid; gap: .5rem; margin-top: 1rem; }
.login-link { display: flex; align-items: center; gap: .7rem; padding: .65rem .8rem; border: 1px solid var(--w-border); border-radius: 12px; text-decoration: none; color: var(--w-text); background: #fff; }
.login-link:hover { border-color: #8E3684; background: var(--w-purple-l); }
.login-link i { font-size: 1.35rem; color: #8E3684; }
.login-link span { display: flex; flex-direction: column; line-height: 1.25; } .login-link small { color: var(--w-muted); }
/* «حي سكني» */
.hr-body { background: linear-gradient(180deg, #f6eef5 0, var(--w-bg) 260px); }
.hr-wrap { max-width: 480px; margin: 0 auto; padding: 1.6rem 1rem 3rem; }
.hr-title { font-size: 1.45rem; font-weight: 700; margin: .8rem 0 .3rem; }
.hr-sub { color: var(--w-muted); font-size: .92rem; max-width: 34ch; margin: 0 auto; }
.hr-card { background: #fff; border: 1px solid var(--w-border); border-radius: 18px; padding: 1.1rem; box-shadow: 0 6px 24px rgba(74,26,68,.07); }
.hr-label { display: block; font-weight: 700; margin: .9rem 0 .35rem; } .hr-card .hr-label:first-of-type { margin-top: 0; }
.hr-cities { display: flex; gap: .4rem; flex-wrap: wrap; }
.hr-city { border: 1px solid var(--w-border); background: #fff; border-radius: 999px; padding: .4rem 1.1rem; font-weight: 600; }
.hr-city.on { background: #8E3684; border-color: #8E3684; color: #fff; }
.hr-input { font-size: 1.1rem; padding: .7rem .9rem; border-radius: 12px; }
.hr-note { font-size: .8rem; color: var(--w-muted); margin: .8rem 0 .6rem; }
.hr-save { padding: .7rem; font-weight: 700; border-radius: 12px; }
.hr-hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
.hr-done { display: flex; gap: .8rem; align-items: center; font-size: 1rem; } .hr-done i { font-size: 2rem; color: #17895a; }
.hr-icon { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: var(--w-purple-l); color: #8E3684; display: grid; place-items: center; font-size: 1.9rem; }
.hr-now { background: var(--w-purple-l); border-radius: 10px; padding: .55rem .75rem; margin-bottom: .8rem; }
/* «تقرير الزيارات اليومي» */
.dr-periods { display: flex; flex-wrap: wrap; gap: .35rem; }
.dr-grid { display: grid; grid-template-columns: minmax(280px, 0.8fr) 1.2fr; gap: 1.2rem; align-items: start; }
@media (max-width: 991px) { .dr-grid { grid-template-columns: 1fr; } }
.dr-text { font-family: inherit; font-size: .95rem; line-height: 1.7; background: #fff; direction: rtl; }
.dr-card { background: #fff; border: 1px solid var(--w-border); border-radius: 18px; padding: 1.3rem 1.4rem; max-width: 640px; color: #2b2330; }
.dr-head { display: flex; align-items: center; gap: 1rem; padding-bottom: .9rem; margin-bottom: 1rem; border-bottom: 3px solid #8E3684; }
.dr-head img { height: 54px; }
.dr-h1 { font-size: 1.35rem; font-weight: 800; color: #4a1a44; }
.dr-h2 { color: #6c6472; font-size: .95rem; direction: rtl; }
.dr-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin-bottom: 1.1rem; }
.dr-kpi { background: #f6eef5; border-radius: 14px; padding: .7rem .9rem; display: flex; flex-direction: column; }
.dr-kpi span { font-size: .85rem; color: #6c6472; } .dr-kpi b { font-size: 1.8rem; color: #4a1a44; line-height: 1.2; }
.dr-kpi.main { background: #4a1a44; } .dr-kpi.main span { color: #e9d7e6; } .dr-kpi.main b { color: #fff; }
.dr-sub { font-weight: 800; margin-bottom: .4rem; color: #4a1a44; }
.dr-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.dr-table td { padding: .38rem .2rem; border-bottom: 1px solid #efe7ef; }
.dr-city { white-space: nowrap; font-weight: 600; width: 1%; padding-inline-end: .8rem !important; }
.dr-bar span { display: block; height: .7rem; border-radius: 4px; background: linear-gradient(90deg, #8E3684, #b0529f); }
.dr-n { text-align: left; font-weight: 800; width: 3.5rem; font-variant-numeric: tabular-nums; }
.dr-table.corp .dr-city { width: auto; } .dr-table.corp tr.zero td { color: #a99aa6; }
.out-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .5rem; }
.out-mini-area { border: 1px solid var(--w-border); border-radius: 10px; padding: .45rem .6rem; }
/* «زيارات خارج المدن» */
.out-total { font-size: 1.05rem; } .out-total b { font-size: 1.4rem; color: #4a1a44; }
.out-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: .8rem; }
.out-area { background: #fff; border: 1px solid var(--w-border); border-radius: 14px; overflow: hidden; }
.out-area header { display: flex; justify-content: space-between; padding: .55rem .8rem; background: #f6eef5; } .out-area header span { color: #8E3684; font-weight: 700; }
/* home page: the platform report (today / tomorrow) */
.dash-tabs .nav-link { font-weight: 700; color: var(--w-text); }
.dash-tabs .nav-link.active { color: #8E3684; }
.dash-tab-body { background: #fff; border: 1px solid var(--w-border); border-top: 0; border-radius: 0 0 14px 14px; padding: 1rem; }
.dash-updated { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; background: #f6eef5; border-radius: 10px; padding: .5rem .75rem; margin-bottom: .9rem; font-size: .9rem; }
.dash-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1rem; align-items: start; }
.dash-cards .dr-card { max-width: none; } .dash-cards .dr-card.mt-3 { margin-top: 0 !important; }
.dash-extra-tools { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; margin-top: 1rem; }
.dr-who { font-size: .72rem; color: #6c6472; font-weight: 500; white-space: normal; max-width: 22rem; }
.dr-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-inline-end: .4rem; vertical-align: -1px; }
.dr-kpi.lab { background: #fff1df; } .dr-kpi.lab b { color: #b35a00; }
.dr-table tr.dr-sum td { font-weight: 800; border-top: 2px solid #4a1a44; color: #4a1a44; }

/* ---- Platform reconciliation drawn on the schedule ---- */
.vchip.rc { position: relative; }
.vchip .rc-mark { font-size: .72rem; margin-inline-start: .1rem; }
.vchip.rc-gone { outline: 2px solid #d92d20; outline-offset: 0; text-decoration: line-through; text-decoration-color: #d92d20; }
.vchip.rc-gone .rc-mark { color: #d92d20; }
.vchip.rc-spec, .vchip.rc-hour { outline: 2px solid #f79009; }
.vchip.rc-spec .rc-mark, .vchip.rc-hour .rc-mark { color: #b54708; }
.vchip.rc-dist, .vchip.rc-unas { outline: 2px dotted #6941c6; }
.vchip.rc-dist .rc-mark, .vchip.rc-unas .rc-mark { color: #6941c6; }
.vchip.rc-maybe { outline: 2px dotted #98a2b3; }
.vchip.rc-nf { outline: 1.5px dashed #98a2b3; }
.vchip.rc-gone.rc-part { text-decoration: none; }        /* part of the cell cancelled there: the rest (done / confirmed) is not struck through */
.vchip .rc-cn { color: #d92d20; font-size: .68rem; font-weight: 700; margin-inline-start: .15rem; white-space: nowrap; }
body.rc-off .vchip .rc-cn { display: none; }          /* 22 Nov 2026: not shown by the platform, not cancelled — kept */
.vchip.rc-nf .rc-mark { color: #667085; }
.vchip.rc-maybe .rc-mark { color: #667085; }
.vchip.rc-ghost { background: #ecfdf3; border: 1.5px dashed #12b76a; color: #067647; cursor: pointer; }
.vchip.rc-ghost:hover { background: #d1fadf; }
body.rc-off .vchip.rc { outline: none; text-decoration: none; }
body.rc-off .vchip .rc-mark, body.rc-off .vchip.rc-ghost { display: none; }
.rc-sec { border-top: 1px solid #eee; padding: .5rem 0; }
.rc-sec-head { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .3rem; }
.rc-row { display: grid; grid-template-columns: 6.5rem 1fr auto; gap: .5rem; align-items: center; padding: .35rem 0; border-bottom: 1px dashed #f0e6ef; font-size: .88rem; }
.rc-when { font-size: .78rem; color: #667085; text-align: right; }
.rc-no { font-size: .75rem; color: #667085; background: #f2f4f7; border-radius: 4px; padding: 0 .3rem; }
.rc-acts { display: flex; flex-wrap: wrap; gap: .25rem; justify-content: flex-end; }
.rc-sug { flex-basis: 100%; }
@media (max-width: 576px) { .rc-row { grid-template-columns: 1fr; } .rc-when { text-align: start; } .rc-acts { justify-content: flex-start; } }
.roster-grid.sheet .vchip.rc-ghost { background: #e7f8ee !important; outline: 2px dashed #12b76a; outline-offset: -2px; color: #067647 !important; font-weight: 700; }
.roster-grid.sheet .vchip.rc-gone { outline: 2px solid #d92d20; outline-offset: -2px; }
.roster-grid.sheet .vchip.rc-spec, .roster-grid.sheet .vchip.rc-hour { outline: 2px solid #f79009; outline-offset: -2px; }
.roster-grid.sheet .vchip.rc-dist, .roster-grid.sheet .vchip.rc-unas { outline: 2px dotted #6941c6; outline-offset: -2px; }
.roster-grid.sheet .vchip.rc-maybe { outline: 2px dotted #667085; outline-offset: -2px; }
.roster-grid.sheet .vchip.rc-nf { outline: 1.5px dashed #98a2b3; outline-offset: -2px; }
body.rc-off .roster-grid.sheet .vchip.rc { outline: none; }
/* many menu items (system admin) never push the page wider than the screen */
@media (min-width: 992px) { .topbar .navbar-collapse { min-width: 0; } .topbar .navbar-nav { flex-wrap: wrap; min-width: 0; } .topbar .user-box { flex-shrink: 0; } }
.dash-side-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin: .5rem 0 .25rem; max-width: 720px; }
.dash-side-kpis .dr-kpi { background: #fff; border: 1px solid #eadff0; }
@media (max-width: 576px) { .dash-side-kpis { grid-template-columns: 1fr 1fr; } }
.vbusy { display: inline-block; font-size: .78rem; color: #667085; background: repeating-linear-gradient(45deg, #f2f4f7, #f2f4f7 4px, #e4e7ec 4px, #e4e7ec 8px); border-radius: 4px; padding: 0 .35rem; }
/* ---- performance report & specialist file ---- */
.pf-table th { font-size: .82rem; white-space: nowrap; } .pf-table td { font-size: .88rem; }
.pf-chg { font-weight: 800; font-size: .82rem; white-space: nowrap; } .pf-chg.up { color: #067647; } .pf-chg.down { color: #b42318; }
.pf-rec { display: flex; gap: .5rem; align-items: flex-start; padding: .45rem 0; border-bottom: 1px dashed #f0e6ef; font-size: .9rem; } .pf-rec:last-child { border-bottom: 0; }
.pf-rec i { margin-top: .15rem; }
.pf-bars { display: flex; align-items: flex-end; gap: 1rem; height: 140px; padding-top: 1.2rem; }
.pf-bars > div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; max-width: 120px; }
.pf-bar { background: #8E3684; border-radius: 6px 6px 0 0; position: relative; min-height: 3px; } .pf-bar.team { background: #c9a3c4; }
.pf-bar span { position: absolute; top: -1.2rem; left: 0; right: 0; text-align: center; font-weight: 800; font-size: .82rem; color: #4a1a44; }
.pf-bl { text-align: center; font-size: .78rem; color: #667085; margin-top: .2rem; }
.pf-spec tr.pf-low td { background: #fff6f5; }
.sf-kpi { background: #fff; border: 1px solid #eadff0; border-radius: 14px; padding: .7rem .9rem; } .sf-kpi span { display: block; font-size: .8rem; color: #667085; } .sf-kpi b { font-size: 1.25rem; color: #4a1a44; }
.sf-kpi.owed { border-color: #abefc6; background: #f6fef9; } .sf-kpi.owed b { color: #067647; } .sf-kpi.owes { border-color: #fecdca; background: #fffbfa; } .sf-kpi.owes b { color: #b42318; }
@media print { .topbar, .no-print, .page-head form, .page-head .btn { display: none !important; } body { background: #fff; } .card { break-inside: avoid; } }
.ev-score { width: 3.2rem; height: 3.2rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1.15rem; }
.ev-kpis { display: flex; flex-wrap: wrap; gap: .9rem; }
.ev-kpis > div { min-width: 4.6rem; text-align: center; } .ev-kpis span { display: block; font-size: .72rem; color: #667085; } .ev-kpis b { display: block; font-size: 1.02rem; } .ev-kpis i { font-style: normal; font-size: .7rem; color: #98a2b3; }
.ev-notes { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin-top: .4rem; font-size: .84rem; }
.ev-p i { color: #12b76a; } .ev-m i { color: #d92d20; } .ev-t i { color: #f79009; }
.av-card { border-radius: 14px; } .av-per { border: 1px solid #eadff0; border-radius: 12px; padding: .5rem .7rem; }
.av-per b { font-size: 1.3rem; } .av-meter { height: .5rem; background: #f2ecf3; border-radius: 6px; overflow: hidden; position: relative; }
.av-meter span { position: absolute; inset: 0 auto 0 0; background: #12b76a; } .av-meter.near span { background: #f79009; } .av-meter.full span { background: #d92d20; }
.cc-rule { background: #fff7e6; border: 1px solid #fedf89; color: #93370d; border-radius: 10px; padding: .4rem .7rem; margin: .4rem 0; font-size: .9rem; font-weight: 600; }
.cc-time .cc-part { display: block; font-size: .7rem; font-weight: 600; opacity: .75; }
.cc-more-times { display: block; width: 100%; margin-top: .4rem; border: 1px dashed #c9b6cf; background: #fbf8fc; color: #6b4a6f; border-radius: 10px; font-size: .82rem; padding: .3rem; }
.cc-more-times.open { background: #f3ecf5; }
.cc-extra { margin-top: .4rem; } .cc-time.extra { opacity: .9; }
.av-people { margin-top: .5rem; border-top: 1px dashed #eadff0; padding-top: .4rem; }
.av-person { display: flex; justify-content: space-between; gap: .5rem; font-size: .85rem; padding: .12rem 0; }
.av-person .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .av-person .c { white-space: nowrap; }
.av-person small { color: #667085; } .av-person.zero { color: #98a2b3; } .av-person.none { color: #b42318; }
.rc-copy { cursor: copy; font-size: .7rem; margin-inline-start: .2rem; opacity: .7; padding: 0 .1rem; }
.rc-copy:hover { opacity: 1; color: #8E3684; }
.rc-no.rc-copy { font-size: .75rem; opacity: 1; }
body.rc-off .vchip .rc-copy { display: none; }
.spec-head .plat-load { display: inline-block; margin-inline-start: .2rem; padding: 0 .3rem; border-radius: 8px; background: rgba(255,255,255,.85); color: #344054; font-size: .72rem; font-weight: 700; line-height: 1.4; }
.spec-head .plat-load.diff { background: #fff; color: #b42318; outline: 1px solid #fda29b; }
/* approve ✓ / ignore ✕ in the schedule (reconciliation and «رتّب اليوم») */
.rc-acts { display: inline-flex; gap: 2px; margin-inline-start: .25rem; }
.rc-acts button, .arr-box button { border: 0; border-radius: 4px; font-size: .72rem; line-height: 1.2; padding: 0 .3rem; font-weight: 900; cursor: pointer; }
.rc-acts .rc-ok, .arr-box .arr-ok { background: #12b76a; color: #fff; } .rc-acts .rc-x, .arr-box .arr-x { background: #e4e7ec; color: #344054; }
body.rc-off .vchip .rc-acts { display: none; }
td.slot.arr-inline { outline: 3px solid #f79009; outline-offset: -3px; background-image: linear-gradient(rgba(247,144,9,.08), rgba(247,144,9,.08)); }
.arr-box { display: flex; align-items: center; justify-content: center; gap: .25rem; margin-top: 2px; font-size: .74rem; color: #b54708; font-weight: 800; }
.arr-bar { margin-top: .35rem; background: #fffaeb; border: 1px solid #fedf89; color: #93370d; border-radius: 10px; padding: .25rem .6rem; font-size: .85rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }

/* ---------- العلاج الطبيعي (physiotherapy) ---------- */
.pt-wrap .card { border-radius: 12px; }
.pt-sec-title { font-weight: 700; margin: .3rem 0 .5rem; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.pt-card.pt-eval { border-color: #bfe0dd; }
.pt-slot.is-eval { border-color: #bfe0dd; background: #f4fbfa; }
.pt-note { background: #f8f6f9; border-radius: 8px; padding: .35rem .5rem; color: var(--w-text); }
.pt-bar { display: flex; height: 9px; border-radius: 999px; background: var(--w-purple-l); overflow: hidden; }
.pt-bar > div { height: 100%; background: var(--w-purple); border-radius: 999px; }
.pt-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--w-purple-l); padding: 4px; border-radius: 12px; border: 0; margin: 0; }
.pt-seg label { margin: 0; }
.pt-seg input { position: absolute; opacity: 0; pointer-events: none; }
.pt-seg span { display: block; text-align: center; padding: .55rem .4rem; border-radius: 9px; font-weight: 600; color: var(--w-text); cursor: pointer; }
.pt-seg input:checked + span { background: var(--w-purple); color: #fff; }
.pt-seg input:focus-visible + span { outline: 2px solid var(--w-purple-d); outline-offset: 1px; }
.pt-seg-sm span { padding: .3rem .8rem; font-size: .85rem; }
.pt-pkg { display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; border: 1px solid var(--w-border); border-radius: 10px; cursor: pointer; margin: 0; background: #fff; }
.pt-pkg:has(input:checked) { border: 2px solid var(--w-purple); background: var(--w-purple-l); }
.pt-wd { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pt-wd label { margin: 0; }
.pt-wd input { position: absolute; opacity: 0; pointer-events: none; }
.pt-wd span { display: block; text-align: center; padding: .5rem 0; border: 1px solid var(--w-border); border-radius: 9px; background: #fff; cursor: pointer; font-size: .9rem; }
.pt-wd input:checked + span { background: var(--w-purple); border-color: var(--w-purple); color: #fff; font-weight: 700; }
.pt-wd input:focus-visible + span { outline: 2px solid var(--w-purple-d); }
.pt-plan { padding: 0; list-style: none; }
.pt-plan em { font-style: normal; color: var(--w-muted); width: 1.6rem; }
.pt-plan li { display: flex; flex-wrap: wrap; gap: .2rem .6rem; padding: .35rem .2rem; border-top: 1px solid #f0e8f2; }
.pt-plan li span { flex: 1; }
.pt-plan li.moved b { color: #8a4b0f; }
.pt-plan li small { width: 100%; color: #8a4b0f; }
.pt-sessions > li { border-top: 1px solid var(--w-border); padding: .55rem 0; }
.pt-sessions > li.focus { background: var(--w-purple-l); border-radius: 8px; padding: .55rem .5rem; }
.pt-sessions > li.st-postponed, .pt-sessions > li.st-cancelled, .pt-sessions > li.st-noshow { opacity: .75; }
.pt-form { margin-top: .5rem; padding: .6rem; background: #fff; border: 1px solid var(--w-border); border-radius: 10px; }
.pt-sub.is-closed { opacity: .85; }
.pt-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pt-day { margin: 0; }
.pt-day input { position: absolute; opacity: 0; pointer-events: none; }
.pt-day-box { display: flex; flex-direction: column; gap: 2px; padding: .7rem .8rem; border: 1px solid var(--w-border); border-radius: 12px; background: #fff; cursor: pointer; height: 100%; }
.pt-day input:checked + .pt-day-box { border: 2px solid var(--w-purple); background: var(--w-purple-l); }
.pt-day input:disabled + .pt-day-box { opacity: .5; cursor: not-allowed; }
.pt-day input:focus-visible + .pt-day-box { outline: 2px solid var(--w-purple-d); }
.pt-rbar { display: grid; grid-template-columns: minmax(0, 1fr) 90px 28px; align-items: center; gap: .5rem; padding: .15rem 0; }
.pt-rbar i { display: block; height: 8px; background: var(--w-purple); border-radius: 999px; }
.pt-rbar b { text-align: end; }

/* ---------- التحضير اليومي (attendance) ---------- */
.att-ok { --att: #e3f4e8; --att-t: #1f7a3a; }
.att-late { --att: #fff1d6; --att-t: #8a5300; }
.att-abs { --att: #fde2e2; --att-t: #a12c2c; }
.att-rest { --att: #eef0f3; --att-t: #5b6470; }
.att-sick { --att: #fbe7f0; --att-t: #9b2c5e; }
.att-leave { --att: #e7eefc; --att-t: #2f4d9a; }
.chip.att-ok, .chip.att-late, .chip.att-abs, .chip.att-rest, .chip.att-leave, .chip.att-sick { background: var(--att); color: var(--att-t); }
.att-table tr[class^="att-"]:not(.att-none) > td { background: var(--att); }
.att-table tr.att-none > td:first-child { border-inline-start: 3px solid #d9cfe0; }
.att-appts { display: inline-block; min-width: 24px; padding: 0 .35rem; border-radius: 999px; background: var(--w-purple-l); color: var(--w-purple-d); font-weight: 600; }
.att-month table { font-size: .78rem; }
.att-month th, .att-month td { padding: .2rem .25rem !important; }
.att-month td:is(.att-ok, .att-late, .att-abs, .att-sick, .att-rest, .att-leave) { background: var(--att); color: var(--att-t); font-weight: 700; }
.att-month .att-name { position: sticky; inset-inline-start: 0; background: #fff; z-index: 1; min-width: 150px; }
.att-month thead .att-name { background: var(--w-purple-l); }
.att-month .att-dh a { text-decoration: none; color: inherit; display: block; line-height: 1.1; }
.att-month .att-dh small { display: block; font-weight: 400; font-size: .65rem; }
.att-month .att-dh.fri { background: #efe7f1; }
.att-month .att-dh.today { outline: 2px solid var(--w-purple); outline-offset: -2px; }
@media print { .att-tabs, .navbar, .topbar { display: none !important; } .att-month { overflow: visible; } }
.att-month td.att-auto { font-style: italic; opacity: .75; }
.att-month td.att-plan { color: #a29aa8; background: repeating-linear-gradient(45deg, #f6f4f7, #f6f4f7 4px, #fff 4px, #fff 8px); }
.att-branch { --att: #e2f3f5; --att-t: #11646e; }
.chip.att-branch { background: var(--att); color: var(--att-t); }
.att-month td.att-branch { background: var(--att); color: var(--att-t); font-weight: 700; }
.att-table tr.att-group > th, .att-month tr.att-group > th { background: var(--w-purple-l); color: var(--w-purple-d); font-weight: 700; padding: .35rem .6rem; border-top: 2px solid var(--w-purple-m); }
.att-quick { background: #f0f7f5; border: 1px solid #cfe5df; border-radius: .5rem; padding: .5rem .75rem; }
.att-quick .btn { white-space: nowrap; }
@media print { .att-quick { display: none !important; } }
.att-end { --att: #e6e4ea; --att-t: #2b2b33; }
.chip.att-end, .att-month td.att-end { background: #3c3c46; color: #fff; font-weight: 700; }
.att-month td.att-after { background: repeating-linear-gradient(135deg, #f1f1f4 0 4px, #e4e4ea 4px 8px); }
.btn-check:checked + .btn-outline-w { background: var(--w-purple); border-color: var(--w-purple); color: #fff; }
.roster-grid .spec-head.not-working { background: #b42318 !important; color: #fff !important; }
.roster-grid .nw-badge { display: block; font-size: .65rem; font-weight: 600; background: #fff; color: #b42318; border-radius: 4px; padding: 0 .25rem; margin-top: 2px; white-space: nowrap; }
.roster-grid td.slot.nw-cell { background: repeating-linear-gradient(135deg, #fdecea 0 6px, #fbd5d0 6px 12px); }
.roster-grid td.slot.nw-cell .vchip { outline: 2px solid #b42318; }

/* call centre (28 Oct): more time for the call, the LDM numbers, the visit created in the platform */
.cc-call-ext { border: 1px solid rgba(255,255,255,.5); background: rgba(255,255,255,.08); color: #fff; border-radius: 10px; padding: .45rem .8rem; font-size: .88rem; font-weight: 600; }
.cc-call-ext:hover:not(:disabled) { background: rgba(255,255,255,.18); }
.cc-call-ext:disabled, .cc-hold-ext:disabled { opacity: .45; cursor: not-allowed; }
.cc-call-ext small, .cc-hold-ext small { opacity: .8; font-weight: 400; }
.cc-hold-ext { font-weight: 600; padding: .2rem .6rem; }
.cc-refs { display: flex; flex-wrap: wrap; gap: .45rem; margin: .3rem 0 .2rem; }
.cc-ref-wrap { position: relative; }
.cc-ref { width: 8.5rem; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: .05em; font-weight: 600; }
.cc-ref-del { position: absolute; top: -7px; inset-inline-end: -7px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: #b42318; color: #fff;
  font-size: .8rem; line-height: 20px; padding: 0; }
.cc-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.cc-done { text-align: center; padding: 1rem 0 .4rem; }
.cc-done > .bi { font-size: 2.6rem; color: #1f9d55; }
.cc-done-title { font-weight: 700; font-size: 1.1rem; }
.cc-done-no { font-size: 2.4rem; font-weight: 800; letter-spacing: .06em; font-variant-numeric: tabular-nums; color: #4a1a44; }
.cc-done-q > .bi { color: #b7791f; }
.cc-done-q .cc-done-no { font-size: 1.7rem; letter-spacing: .02em; }
/* «طابور المنصة» */
.vchip .pfq-mark { color: #b45309; margin-inline-end: .15rem; font-size: .8em; }
.pfq-badge { display: inline-flex; align-items: center; gap: .25rem; font-size: .78rem; padding: .1rem .5rem; border-radius: 999px; background: #fff4e0; color: #8a5300; border: 1px solid #f3d29a; }
.pfq-badge.bad { background: #fdecec; color: #a12622; border-color: #f2b8b5; }
.pfq-badge.ok { background: #e8f6ee; color: #1f6f43; border-color: #b9e2c8; }
.pfq-table td { vertical-align: top; }
.pfq-det { font-size: .82rem; color: #475467; }
.pfq-det b { color: #1d2939; }
.pf-down { border-inline-start: 4px solid #d97706; }
.pf-diag pre { white-space: pre-wrap; word-break: break-word; font-size: .78rem; background: #f8f9fb; border: 1px solid #e5e7eb; border-radius: 8px; padding: .5rem .6rem; margin: 0; max-height: 18rem; overflow: auto; }
.pf-diag .step { display: grid; grid-template-columns: 1.4rem 1fr; gap: .4rem; padding: .35rem 0; border-bottom: 1px dashed #e5e7eb; }
.pf-diag .step:last-child { border-bottom: 0; }
/* «أسند في المنصة كما في الجدول» (29 Oct) */
.rc-batch { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; background: var(--w-purple-l, #f6eef5); border: 1px solid #e3cfe0; border-radius: 12px; padding: .6rem .8rem; margin-bottom: .75rem; font-size: .9rem; }
.rc-batch-head { font-size: 1rem; margin-bottom: .2rem; }
.rc-plan { max-height: 55vh; overflow: auto; border: 1px solid var(--w-border, #e5e7eb); border-radius: 10px; }
.rc-plan-row { display: grid; grid-template-columns: auto auto 1fr; gap: .5rem; align-items: start; padding: .45rem .6rem; border-bottom: 1px dashed var(--w-border, #e5e7eb); margin: 0; cursor: pointer; font-size: .88rem; }
.rc-plan-row:last-child { border-bottom: 0; }
.rc-plan-row.off { background: #fafafa; color: #6b7280; cursor: default; }
.rc-plan-row .rc-no { color: var(--w-muted, #6b7280); margin-inline-start: .35rem; }
.rc-plan-row .rc-when { white-space: nowrap; padding-top: .1rem; }
@media (max-width: 576px) { .rc-plan-row { grid-template-columns: auto 1fr; } .rc-plan-row .rc-what { grid-column: 2; } }

/* «تحليل الطلب» */
.dm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.dm-kpi { background: #fff; border: 1px solid var(--w-border, #e5e7eb); border-radius: 12px; padding: .6rem .8rem; }
.dm-kpi .l { font-size: .8rem; color: #667085; }
.dm-kpi .v { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; color: #4a1a44; }
.dm-kpi.app .v { color: #b45309; }
.dm-kpi .s { font-size: .78rem; color: #667085; }
.dm-g { font-weight: 700; white-space: nowrap; }
.dm-g.up { color: #1f7a45; } .dm-g.down { color: #b42318; }
.dm-svg { width: 100%; height: auto; display: block; }
.dm-svg .oth { fill: #8a3b7f; } .dm-svg .app { fill: #e3962b; }
.dm-svg .grid { stroke: #eceef2; stroke-width: 1; } .dm-svg .ax { font-size: 11px; fill: #667085; }
.dm-svg .share { fill: none; stroke: #1d4ed8; stroke-width: 2.5; } .dm-svg .ax.sh { fill: #1d4ed8; }
.dm-svg g:hover rect { opacity: .8; }
.dm-legend .k { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; vertical-align: middle; margin-inline: .5rem .2rem; }
.dm-legend .k.oth { background: #8a3b7f; } .dm-legend .k.app { background: #e3962b; } .dm-legend .k.line { background: #1d4ed8; height: .2rem; }
.dm-table td, .dm-table th { font-size: .82rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dm-hbar { display: grid; grid-template-columns: 5.5rem 1fr 3rem; gap: .4rem; align-items: center; font-size: .8rem; margin: .15rem 0; }
.dm-hbar .b { background: #f2f4f7; border-radius: 4px; height: .7rem; overflow: hidden; }
.dm-hbar .b i { display: block; height: 100%; background: #8a3b7f; } .dm-hbar .b i.app { background: #e3962b; }
.dm-hbar .v { text-align: end; font-variant-numeric: tabular-nums; }

/* «جدول المدن الأخرى» */
.or-table th, .or-table td { font-size: .82rem; }
.or-table .or-name { min-width: 9rem; white-space: nowrap; }
.or-table .or-today { background: #fbf5fa; }
.or-table .or-status select { min-width: 7.2rem; font-size: .75rem; padding-block: .1rem; }
.or-p { display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; height: 1.6rem; padding: 0 .4rem; border-radius: 6px; border: 1px solid transparent; font-weight: 700; font-size: .8rem; background: #f2f4f7; color: #98a2b3; }
button.or-p { cursor: pointer; }
.or-p.am { background: #e8f1fe; color: #1d4ed8; } .or-p.pm { background: #f3e8ff; color: #7e22ce; } .or-p.full { background: #e8f6ee; color: #1f7a45; } .or-p.mid { background: #fff4e0; color: #b45309; }
.or-p.off { background: #f2f4f7; color: #667085; } .or-p.leave { background: #fff4e0; color: #8a5300; font-weight: 600; font-size: .72rem; }
.or-p.changed, .or-mark { box-shadow: inset 0 -3px 0 #e3962b; }
.or-mark { display: inline-block; width: 1rem; height: .8rem; border-radius: 3px; background: #f2f4f7; vertical-align: middle; }
.or-legend .or-p { min-width: 1.5rem; height: 1.3rem; margin-inline: .4rem .15rem; }
.or-count td { background: #fafafa; }
.or-menu { z-index: 1080; }
.av-card.av-closed { background: #fdf2f2; border-color: #f2b8b5; }

/* «التعميمات» */
.nt-card.nt-new { border-inline-start: 4px solid #8a3b7f; }
.nt-card.nt-imp { border-inline-start: 4px solid #d92d20; }
.nt-card.nt-imp.nt-new { background: #fff6f5; }
.nt-body { white-space: normal; font-size: .92rem; }
.nt-readers { max-height: 14rem; overflow: auto; text-align: start; padding: .3rem 0; }

/* «المدن الأخرى»: closed periods, a specialist off with visits, the message; the call centre's list */
.av-per.shut { background: #fdf2f2; border-radius: 8px; }
.av-person.off { background: #fdecec; border-radius: 6px; }
.av-msg { font-size: .85rem; white-space: pre-wrap; }
.cc-out summary { cursor: pointer; list-style: none; }
.cc-out-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .3rem .9rem; }
.cc-out-row { display: flex; justify-content: space-between; gap: .5rem; font-size: .88rem; border-bottom: 1px dashed #e5e7eb; padding: .2rem 0; }
.cc-out-row.shut b { color: #98a2b3; }

/* a visit with a specialist on her day off — red in the schedule */
.pf-off-bar { background: #fdecec; border: 1px solid #f2b8b5; color: #912018; border-radius: 10px; padding: .35rem .6rem; font-size: .84rem; display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: center; }
.pf-off-item { background: #fff; border: 1px solid #f2b8b5; border-radius: 999px; padding: .05rem .55rem; }

/* physiotherapy: the last update of each specialist */
.pt-lastup { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.pt-lu { font-size: .78rem; background: #eef8f1; border: 1px solid #cde9d6; border-radius: 999px; padding: .1rem .55rem; }
.pt-lu.old { background: #fdecec; border-color: #f3c4c4; color: #a12020; }
.spec-head .plat-load.diff { cursor: pointer; }
.plat-why-box { position: absolute; z-index: 1080; width: min(420px, calc(100vw - 16px)); background: #fff; color: #1d2939; border: 1px solid #fda29b; border-radius: 10px; box-shadow: 0 8px 24px rgba(16,24,40,.18); padding: .55rem .7rem; font-size: .82rem; text-align: start; }
.plat-why-box ul { padding-inline-start: 1.1rem; }
.plat-why-box li { margin-bottom: .2rem; }

/* «رتّب اليوم»: the platform visit numbers to move, each one copied with a tap */
.arr-box { flex-wrap: wrap; }
.arr-box .arr-nos { flex-basis: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; font-size: .66rem; font-weight: 700; }
.arr-box .arr-no { background: #fff; border: 1px dashed #f79009; border-radius: 4px; padding: 0 .25rem; color: #93370d; cursor: copy; user-select: all; }
.arr-box .arr-no:hover { background: #fffaeb; }
.arr-box .arr-no i { font-size: .6rem; }
.rc-tip { pointer-events: none; white-space: pre-line; line-height: 1.6; }

/* «الأعمدة»: her day mixes columns of districts */
.spec-head .zone-mix { display: inline-block; margin-inline-start: .15rem; padding: 0 .25rem; border-radius: 8px; background: #fffaeb; color: #b54708; font-size: .7rem; line-height: 1.4; }
.spec-head .zone-mix.strict { background: #fef3f2; color: #b42318; outline: 1px solid #fda29b; }
/* «أعمدة الأحياء» */
.zn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5rem; }
.zn-col.strict { outline: 2px solid #f04438; }
.zn-list { display: flex; flex-wrap: wrap; gap: 3px; align-items: flex-start; align-content: flex-start; }
.zn-d { display: inline-flex; align-items: center; gap: 2px; font-size: .78rem; background: #f9fafb; border: 1px solid #eaecf0; border-radius: 6px; padding: 1px 4px; }
.zn-move { border: 0; background: transparent; width: 1.1rem; font-size: .7rem; color: #667085; cursor: pointer; }

/* ---------- «العروض والباقات» ---------- */
.pkg-tabs .nav-link{white-space:nowrap;border-radius:20px;padding:.3rem .8rem;color:inherit}
.pkg-tabs .nav-link.active{background:var(--w-purple);color:#fff}
.pkg-grid.view-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px}
.pkg-grid .pkg-card{background:#fff;border:1px solid #ece4f3;border-radius:14px;overflow:hidden;display:flex;flex-direction:column}
.pkg-grid .pkg-card.is-hidden{opacity:.55}
.pkg-img{display:block;position:relative;background:#f6f1fa;aspect-ratio:1/1}
.pkg-img img{width:100%;height:100%;object-fit:cover;display:block}
.pkg-noimg{display:flex;align-items:center;justify-content:center;height:100%;color:#b9a6c9;font-size:2rem}
.pkg-flag{position:absolute;top:8px;inset-inline-start:8px;background:#ffc107;color:#3b2a00;border-radius:12px;padding:1px 8px;font-size:.75rem}
.pkg-body{padding:10px 12px;display:flex;flex-direction:column;gap:4px;flex:1}
.pkg-name{font-weight:700;color:inherit;text-decoration:none;line-height:1.4}
.pkg-price b{color:var(--w-purple);font-size:1.1rem}
.pkg-meta{display:flex;flex-wrap:wrap;gap:4px}
.pkg-meta .chip{font-size:.72rem}
.chip-ldm{background:#e7f4ec;color:#155d33}
.pkg-desc{font-size:.8rem;color:#6c6478}
.pkg-actions{display:flex;gap:6px;margin-top:auto;padding-top:6px}
.pkg-grid.view-list{display:flex;flex-direction:column;gap:6px}
.pkg-grid.view-list .pkg-card{flex-direction:row;align-items:stretch}
.pkg-grid.view-list .pkg-img{display:none}
.pkg-grid.view-list .pkg-body{flex-direction:row;flex-wrap:wrap;align-items:center;gap:6px 14px}
.pkg-grid.view-list .pkg-name{min-width:220px;flex:1 1 220px}
.pkg-grid.view-list .pkg-desc{display:none}
.pkg-grid.view-list .pkg-actions{margin:0;padding:0}
.pkg-why{background:#fff8e6;border-radius:10px;padding:10px 12px}
.pkg-tests li{margin-bottom:6px}
.pkg-big{max-height:560px;object-fit:contain}
/* the bar from a tap until the next page arrives */
.nav-busy { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 2000; pointer-events: none; transform-origin: right; transform: scaleX(0); background: linear-gradient(90deg, #8E3684, #d46fc7); opacity: 0; }
.nav-busy.run { opacity: 1; animation: navBusy 12s cubic-bezier(.1,.7,.2,1) forwards; }
.nav-busy.done { opacity: 0; transition: opacity .2s; }
@keyframes navBusy { 0% { transform: scaleX(0); } 10% { transform: scaleX(.45); } 100% { transform: scaleX(.95); } }

/* replies under a specialist's request */
.rq-thread { border-inline-start: 3px solid #e9d7ee; padding-inline-start: .45rem; display: grid; gap: .25rem; }
.rq-msg { font-size: .8rem; background: #faf7fb; border-radius: 6px; padding: .2rem .4rem; }
.rq-msg.new { background: #fef3f2; }

/* «تحليل الطلب»: each city's requests (red) and done visits (blue) */
.dm-cities { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .6rem; }
.dm-city { border: 1px solid #eceef2; border-radius: 10px; padding: .4rem .55rem; }
.dm-line .tot { fill: none; stroke: #d92d20; stroke-width: 2.4; } .dm-line circle.tot { fill: #d92d20; stroke: none; }
.dm-line .done { fill: none; stroke: #1d4ed8; stroke-width: 2.4; } .dm-line circle.done { fill: #1d4ed8; stroke: none; }
.dm-legend .k.ln-tot { background: #d92d20; } .dm-legend .k.ln-done { background: #1d4ed8; }

/* 22 Nov 2026 — «الميدان»: six groups; the pages of a group side by side at the top of each of them */
.fg-menu .dropdown-item { white-space: normal; min-width: 17.5rem; padding-top: .4rem; padding-bottom: .4rem; }
.fg-menu .fg-hint { display: block; font-size: .74rem; color: var(--w-muted); margin-inline-start: 1.35rem; line-height: 1.35; }
.fg-menu .dropdown-item.active .fg-hint, .fg-menu .dropdown-item:active .fg-hint { color: rgba(255, 255, 255, .82); }
.fg-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; background: #fff; border: 1px solid var(--w-border); border-radius: 10px; padding: .3rem .45rem; margin-bottom: .75rem; }
.fg-name { font-weight: 700; color: var(--w-purple-d); font-size: .85rem; margin-inline-end: .4rem; }
.fg-tab { padding: .22rem .75rem; border-radius: 999px; font-size: .86rem; color: var(--w-text); text-decoration: none; white-space: nowrap; }
.fg-tab:hover { background: var(--w-purple-l); color: var(--w-purple-d); }
.fg-tab.active { background: var(--w-purple); color: #fff; font-weight: 600; }
.fg-tab .badge { font-size: .68rem; }
.fg-new { margin-inline-start: auto; padding-top: .1rem; padding-bottom: .1rem; }

/* 22 Nov 2026 — «المهام» */
.tk-list { max-width: 820px; }
.tk-sec { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .75rem; }
.tk-sec-h { font-size: .8rem; font-weight: 700; color: var(--w-muted); margin-top: .25rem; }
.tk-sec-late .tk-sec-h { color: #b42318; }
.tk-item { display: flex; align-items: flex-start; gap: .6rem; background: #fff; border: 1px solid var(--w-border); border-radius: 10px; padding: .5rem .6rem; }
.tk-item.tk-imp { border-inline-start: 4px solid #d92d20; }
.tk-item.tk-late { border-color: #f4b5ae; background: #fff6f5; }
.tk-item.tk-done, .tk-item.tk-done_late { background: #f6fbf7; border-color: #cfe9d6; }
.tk-item.tk-done .tk-title, .tk-item.tk-done_late .tk-title { text-decoration: line-through; color: var(--w-muted); }
.tk-item.tk-virtual, .tk-item.tk-stopped { background: #faf9fb; border-style: dashed; color: var(--w-muted); }
.tk-check { flex: 0 0 auto; width: 2.1rem; height: 2.1rem; border-radius: 50%; border: 2px solid var(--w-purple); background: #fff; color: transparent; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; padding: 0; }
.tk-check:hover { background: var(--w-purple-l); color: var(--w-purple); }
.tk-done .tk-check, .tk-done_late .tk-check { background: #12b76a; border-color: #12b76a; color: #fff; }
.tk-late .tk-check { border-color: #d92d20; }
.tk-dot { flex: 0 0 auto; font-size: 1.05rem; line-height: 1.3; color: #9a93a0; }
.tk-done .tk-dot, .tk-done_late .tk-dot { color: #12b76a; }
.tk-late .tk-dot { color: #d92d20; }
.tk-body { flex: 1 1 auto; min-width: 0; }
.tk-title { font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.tk-meta { font-size: .78rem; color: var(--w-muted); margin-top: .1rem; }
.tk-late .tk-when { color: #b42318; font-weight: 600; }
.tk-details { font-size: .82rem; margin-top: .2rem; color: #4a4250; }
.tk-note { font-size: .8rem; margin-top: .25rem; background: var(--w-purple-l); border-radius: 6px; padding: .15rem .45rem; display: inline-block; }
.tk-note-edit summary, .tk-redit summary { color: var(--w-purple); cursor: pointer; display: inline-block; margin-top: .15rem; }
.tk-acts { display: flex; gap: .45rem; flex: 0 0 auto; }
.tk-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .6rem; align-items: start; }
.tk-person .tk-item { padding: .35rem .45rem; border-radius: 8px; margin-top: .3rem; }
.tk-add summary { cursor: pointer; }
#tkModal .modal-body { background: var(--w-bg); }
