/* 2026-10-21 THE SIMPLER MENU (public/sidemenu.js) — loaded by both dashboards (Field Checks and Loss Control), after their own styles.
   Each group: its colour, its name, "for: …" (who it is for), folded or open (▾ ▸, the number of lines when folded). A family's strip of
   tabs (#famStrip) above the page. The "Waiting for me" cards. */
:root {
  --mg-desk: #efeaff; --mg-desk-i: #5a3fb8; --mg-rep: #dcfae6; --mg-rep-i: #067647; --mg-fck: #e3f4f4; --mg-fck-i: #0b6b6b;
  --mg-iss: #fdf0e1; --mg-iss-i: #9a4f05; --mg-rdg: #e5efff; --mg-rdg-i: #1d4ed8; --mg-ill: #fde8e8; --mg-ill-i: #9b1c1c;
  --mg-wrk: #e5f0ff; --mg-wrk-i: #1d5fa8; --mg-rel: #fff1d6; --mg-rel-i: #8a5300; --mg-map: #e3f8eb; --mg-map-i: #1d7a46;
  --mg-ppl: #ffe4e8; --mg-ppl-i: #b42346; --mg-set: #eceff3; --mg-set-i: #475467;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --mg-desk: #251f3d; --mg-desk-i: #c3b2ff; --mg-rep: #0f3a25; --mg-rep-i: #75e0a7; --mg-fck: #12302f; --mg-fck-i: #7fe0dc;
  --mg-iss: #3a2610; --mg-iss-i: #f5c08a; --mg-rdg: #102a56; --mg-rdg-i: #9ec5ff; --mg-ill: #3a1616; --mg-ill-i: #f8a9a9;
  --mg-wrk: #16283d; --mg-wrk-i: #8cc2ff; --mg-rel: #33270f; --mg-rel-i: #f2c46b; --mg-map: #15301f; --mg-map-i: #8fe0ad;
  --mg-ppl: #3a1a22; --mg-ppl-i: #ff9fb2; --mg-set: #22272e; --mg-set-i: #c4ccd6; } }
:root[data-theme="dark"] {
  --mg-desk: #251f3d; --mg-desk-i: #c3b2ff; --mg-rep: #0f3a25; --mg-rep-i: #75e0a7; --mg-fck: #12302f; --mg-fck-i: #7fe0dc;
  --mg-iss: #3a2610; --mg-iss-i: #f5c08a; --mg-rdg: #102a56; --mg-rdg-i: #9ec5ff; --mg-ill: #3a1616; --mg-ill-i: #f8a9a9;
  --mg-wrk: #16283d; --mg-wrk-i: #8cc2ff; --mg-rel: #33270f; --mg-rel-i: #f2c46b; --mg-map: #15301f; --mg-map-i: #8fe0ad;
  --mg-ppl: #3a1a22; --mg-ppl-i: #ff9fb2; --mg-set: #22272e; --mg-set-i: #c4ccd6;
}
.mg-desk { --gc: var(--mg-desk); --gi: var(--mg-desk-i); } .mg-rep { --gc: var(--mg-rep); --gi: var(--mg-rep-i); } .mg-fck { --gc: var(--mg-fck); --gi: var(--mg-fck-i); }
.mg-iss { --gc: var(--mg-iss); --gi: var(--mg-iss-i); } .mg-rdg { --gc: var(--mg-rdg); --gi: var(--mg-rdg-i); } .mg-ill { --gc: var(--mg-ill); --gi: var(--mg-ill-i); }
.mg-wrk { --gc: var(--mg-wrk); --gi: var(--mg-wrk-i); } .mg-rel { --gc: var(--mg-rel); --gi: var(--mg-rel-i); } .mg-map { --gc: var(--mg-map); --gi: var(--mg-map-i); }
.mg-ppl { --gc: var(--mg-ppl); --gi: var(--mg-ppl-i); } .mg-set { --gc: var(--mg-set); --gi: var(--mg-set-i); }

/* 2026-10-28 THE RESTYLE (the user's go-ahead): one blue for the page shown (every group keeps its own colour for the icons and the heading);
   a family's pages as sub-items under its line, opened with ▸ or by showing one of them; the Debt management group gets its colour. */
:root { --menu-on: #2470cc; --menu-on-ink: #fff; --mg-dbt: #fff4e5; --mg-dbt-i: #b54708; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --menu-on: #2470cc; --menu-on-ink: #fff; --mg-dbt: #3a2a12; --mg-dbt-i: #f5c08a; } }
:root[data-theme="dark"] { --menu-on: #2470cc; --menu-on-ink: #fff; --mg-dbt: #3a2a12; --mg-dbt-i: #f5c08a; }
.mg-dbt { --gc: var(--mg-dbt); --gi: var(--mg-dbt-i); }
/* 2026-10-31 Revenue collection (the cashiers) */
:root { --mg-rcl: #fef7c3; --mg-rcl-i: #854a0e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --mg-rcl: #3a3005; --mg-rcl-i: #fde272; } }
:root[data-theme="dark"] { --mg-rcl: #3a3005; --mg-rcl-i: #fde272; }
.mg-rcl { --gc: var(--mg-rcl); --gi: var(--mg-rcl-i); }
/* 2026-11-25 v2.8.0 Faults & complaints (technical) */
:root { --mg-flt: #fee4e2; --mg-flt-i: #b42318; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --mg-flt: #3d1512; --mg-flt-i: #fda29b; } }
:root[data-theme="dark"] { --mg-flt: #3d1512; --mg-flt-i: #fda29b; }
.mg-flt { --gc: var(--mg-flt); --gi: var(--mg-flt-i); }
/* 2026-11-26 v2.9.0 the Call centre */
:root { --mg-cc: #e0f2fe; --mg-cc-i: #026aa2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --mg-cc: #0b2a3a; --mg-cc-i: #7cd4fd; } }
:root[data-theme="dark"] { --mg-cc: #0b2a3a; --mg-cc-i: #7cd4fd; }
.mg-cc { --gc: var(--mg-cc); --gi: var(--mg-cc-i); }
/* 2026-11-26 v3.0.0 Media & public opinion */
:root { --mg-mw: #f4ebff; --mg-mw-i: #6941c6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --mg-mw: #2a1c47; --mg-mw-i: #d6bbfb; } }
:root[data-theme="dark"] { --mg-mw: #2a1c47; --mg-mw-i: #d6bbfb; }
.mg-mw { --gc: var(--mg-mw); --gi: var(--mg-mw-i); }
#tabs .grp.mg { margin-bottom: 6px; }
#tabs .mg i { background: var(--gc); color: var(--gi); }
#tabs .mg button.on, #tabs .mg a.navlink.on, body.sm #tabs .mg button.on, body.sm #tabs .mg a.navlink.on { background: var(--menu-on); color: var(--menu-on-ink); font-weight: 700; }
#tabs .mg button.on i, #tabs .mg a.navlink.on i, body.sm #tabs .mg button.on i, body.sm #tabs .mg a.navlink.on i { background: rgba(255, 255, 255, .22); color: var(--menu-on-ink); }
/* a family's line while one of its pages is shown below it: the group's colour (the blue is on the page's sub-item) */
#tabs .mg [data-fam].on.x, body.sm #tabs .mg [data-fam].on.x { background: var(--gc); color: var(--gi); }
#tabs .mg [data-fam].on.x i, body.sm #tabs .mg [data-fam].on.x i { background: var(--card); color: var(--gi); }
/* 2026-10-31 THE TREE (the user's organogram of the menu): a line from the group's heading to each page, a family's pages always shown on
   their own branches under its line; FC / LC on every page; the number of pages on the heading; "Find a page" at the top. */
:root { --st-fc: #1d5fa8; --st-fc-bg: #e5efff; --st-lc: #9b1c1c; --st-lc-bg: #fde8e8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --st-fc: #8cc2ff; --st-fc-bg: #16283d; --st-lc: #f8a9a9; --st-lc-bg: #3a1616; } }
:root[data-theme="dark"] { --st-fc: #8cc2ff; --st-fc-bg: #16283d; --st-lc: #f8a9a9; --st-lc-bg: #3a1616; }
#tabs .tree { margin: 0 0 2px 8px; }
#tabs .br { position: relative; padding-left: 15px; }
#tabs .br::before, #tabs .br::after { content: ''; position: absolute; left: 4px; pointer-events: none; border: 0 solid var(--line); border-color: color-mix(in srgb, var(--gi) 45%, transparent); }
#tabs .br::before { top: 0; bottom: 0; border-left-width: 2px; }          /* │ down the group */
#tabs .br::after { top: 21px; width: 10px; border-top-width: 2px; }       /* ─ to the page */
#tabs .br.lst::before { bottom: auto; height: 23px; }                     /* └ the last one */
#tabs .subs { margin-left: 16px; }
#tabs .subs .br { padding-left: 13px; }
#tabs .subs .br::after { top: 13px; width: 9px; }
#tabs .subs .br.lst::before { height: 15px; }
#tabs .tree button, #tabs .tree a.navlink, body.sm #tabs .tree button, body.sm #tabs .tree a.navlink { white-space: normal; }
#tabs .tree span { line-height: 1.25; }
#tabs .sub, body.sm #tabs button.sub, body.sm #tabs a.navlink.sub { display: flex; align-items: center; gap: 6px; margin: 1px 2px 1px 0; padding: 4px 8px; min-height: 0; font-size: 12.5px; font-weight: 500; border-radius: 7px; }
#tabs .sub.on, body.sm #tabs button.sub.on { background: var(--menu-on); color: var(--menu-on-ink); font-weight: 700; }
#tabs .mg a.navlink { font-weight: 500; }
#tabs .st { flex: none; margin-left: auto; font-size: 9.5px; font-weight: 700; font-style: normal; letter-spacing: .3px; line-height: 1; padding: 3px 4px; border-radius: 4px; }
#tabs .st-fc { color: var(--st-fc); background: var(--st-fc-bg); }
#tabs .st-lc { color: var(--st-lc); background: var(--st-lc-bg); }
#tabs .on > .st { color: inherit; background: rgba(0, 0, 0, .22); }
#tabs .st + .navbadge { margin-left: 4px; }
/* "Find a page": stays at the top while the menu scrolls */
#tabs .mfind { position: sticky; top: 0; z-index: 2; background: var(--side); padding: 2px 2px 8px; }
#tabs .mfind input { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; color: var(--ink); background: var(--card) no-repeat 9px center / 15px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23898781' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m15.5 15.5 5 5'/%3E%3C/svg%3E");
  border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px 7px 31px; }
#tabs .mfind input:focus { outline: 2px solid var(--menu-on); outline-offset: -1px; }
#tabs .mnone { margin: 8px 4px 0; font-size: 12.5px; color: var(--muted); }
#tabs .nf { display: none !important; }
#tabs.finding .mg.shut > .tree { display: block; }
/* a wider menu for the lines and the tags (the PC); the drawer on phones and tablets */
@media (min-width: 1024px) { html body:not(.side-mini) .side { width: 246px; } }
@media (max-width: 1023px) { html body .side, html body.side-mini .side, html body.sm .side, html body.sm.side-mini .side { width: 286px; } }
/* the group's heading: name, number of lines (when folded), ▾ / ▸, "for: …" */
#tabs .mg .gl { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; cursor: pointer; user-select: none; color: var(--gi);
  border-left: 3px solid var(--gi); border-radius: 4px; margin: 0 2px 2px; padding: 5px 8px 4px; white-space: nowrap; }
#tabs .mg .gl:hover, #tabs .mg .gl:focus-visible { background: var(--gc); outline: none; }
#tabs .mg .gl .gn { flex: 1; min-width: 0; white-space: normal; letter-spacing: .5px; line-height: 1.25; }
#tabs .mg .gl .gc { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--muted); background: var(--page); border-radius: 8px; padding: 0 6px; }
#tabs .mg .gl .ga::before { content: '▾'; font-size: 11px; }
#tabs .mg.shut .gl .ga::before { content: '▸'; }
#tabs .mg .gl .gf { flex-basis: 100%; font-size: 10.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); white-space: normal; line-height: 1.3; }
/* folded: only the heading; the hidden copies of a family's pages (the address, Back, the title) never show */
#tabs .mg.shut > .tree { display: none; }
#tabs .alt { display: none !important; }
/* the PC menu folded to icons: every page's icon shows (no headings, no lines, no family pages, no tags) */
@media (min-width: 1024px) {
  body.side-mini #tabs .mg .gl { overflow: hidden; border-left: 0; }
  body.side-mini #tabs .mg.shut > .tree { display: block; }
  body.side-mini #tabs .tree { margin: 0; }
  body.side-mini #tabs .br { padding-left: 0; }
  body.side-mini #tabs .br::before, body.side-mini #tabs .br::after { display: none; }
  body.side-mini #tabs .subs, body.side-mini #tabs .st, body.side-mini #tabs .mfind { display: none !important; }
}
/* a family's tabs above the page: Overview → Field Checks | Loss Control, Maps → Visits | Locate & route | Geofence … */
.famstrip { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 18px; background: var(--card); border-bottom: 1px solid var(--line); }
.famstrip[hidden] { display: none; }
.famstrip .fs-l { font-weight: 700; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .7px; margin-right: 4px; }
.famstrip button, .famstrip a { border: 1px solid var(--line); background: var(--page); color: var(--ink); border-radius: 16px; padding: 4px 13px; font: inherit; font-size: 13px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.famstrip button:hover, .famstrip a:hover { border-color: var(--muted); }
.famstrip .on { background: var(--ink); color: var(--card); border-color: var(--ink); font-weight: 600; cursor: default; }
@media (max-width: 760px) { .famstrip { padding: 6px 10px; flex-wrap: nowrap; overflow-x: auto; } }
/* "Waiting for me" (both pages) */
.wt-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.wt-item { border-left: 4px solid #d92d20; }
.wt-item.reloc { border-left-color: #f5a524; } .wt-item.works { border-left-color: #1570ef; }
.wt-item.issues { border-left-color: #9a4f05; } .wt-item.sheets { border-left-color: #1d4ed8; } .wt-item.instr { border-left-color: #5a3fb8; }
.wt-item h3 { margin: 0 0 2px; font-size: 16px; display: flex; align-items: center; gap: 10px; }
.wt-item h3 b { background: #d92d20; color: #fff; border-radius: 12px; padding: 1px 9px; font-size: 13px; }
.wt-item.reloc h3 b { background: #b54708; } .wt-item.works h3 b { background: #1570ef; }
.wt-item.issues h3 b { background: #9a4f05; } .wt-item.sheets h3 b { background: #1d4ed8; } .wt-item.instr h3 b { background: #5a3fb8; }
.wt-rows { margin: 8px 0; }
.wt-rows a { display: block; padding: 6px 8px; border-radius: 8px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.wt-rows a:hover { background: var(--page); }
.wt-rows .s { color: var(--muted); font-size: 12px; }
.wt-done { text-align: center; padding: 40px 10px; }
.wt-done b { font-size: 20px; display: block; margin-bottom: 6px; }
@media (max-width: 760px) { .wt-grid { grid-template-columns: 1fr; } }
/* 2026-11-27 (user-friendliness review): the FC / LC tag means nothing on the media pages */
.mg-mw .st { display: none; }

/* ============ robust stage 12B: THE SHORTER MENU and the TODAY page (both dashboards) ============ */
/* the new groups take the colours of the lines of work they hold */
.mg-bill { --gc: var(--mg-fck); --gi: var(--mg-fck-i); } .mg-pub { --gc: var(--mg-cc); --gi: var(--mg-cc-i); }
.mg-lcx { --gc: var(--mg-ill); --gi: var(--mg-ill-i); } .mg-adm { --gc: var(--mg-set); --gi: var(--mg-set-i); }
.mg-pub .st { display: none; }   /* the FC / LC tag means nothing on the call centre and media pages */
/* the ADMINISTRATION area: apart from the daily work, at the foot of the menu */
#tabs .grp.adm { margin-top: 14px; padding-top: 10px; border-top: 2px solid var(--line); }
/* a family's pages: folded under its line (they are the tabs at the top of the page); shown while one of them is open, and by "Find a page" */
#tabs .subs { display: none; }
#tabs .br.fam.open > .subs, #tabs.finding .subs { display: block; }
#tabs .fn { flex: none; margin-left: auto; min-width: 18px; text-align: center; font-size: 10px; font-weight: 700; font-style: normal; line-height: 16px; color: var(--muted); background: var(--page); border-radius: 8px; padding: 0 5px; }
#tabs .fn + .navbadge { margin-left: 4px; }
#tabs .on > .fn { color: var(--gi); background: var(--card); }
@media (min-width: 1024px) { body.side-mini #tabs .fn, body.side-mini #tabs .mmoved { display: none !important; } }
/* "The menu is shorter — what moved where": once per login, for the first weeks */
#tabs .mmoved { margin: 0 2px 10px; padding: 9px 10px; border: 1px solid var(--menu-on); border-left-width: 4px; border-radius: 9px; background: var(--card); color: var(--ink); font-size: 12.5px; line-height: 1.35; white-space: normal; }
#tabs .mmoved b { display: block; font-size: 13px; margin-bottom: 2px; }
#tabs .mmoved span { display: block; overflow: visible; }
#tabs .mmoved .mm-b { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 7px; }
#tabs .mmoved a { color: var(--menu-on); font-weight: 600; }
#tabs .mmoved button, body.sm #tabs .mmoved button { display: inline-block; width: auto; margin-left: auto; padding: 3px 11px; border: 1px solid var(--line); border-radius: 14px; background: var(--page); color: var(--ink); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
/* TODAY */
.td-head { justify-content: space-between; }
.td-head h2 { margin: 0 0 2px; }
.td-sum { font-size: 15px; font-weight: 600; padding: 6px 14px; border-radius: 18px; background: #fee4e2; color: #912018; white-space: nowrap; }
.td-sum.calm { background: #dcfae6; color: #05603a; }
.td-h { margin: 18px 2px 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); }
.td-h.late { color: #b42318; }
.td-acts { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 12px; }
.td-act { display: flex; align-items: center; gap: 12px; min-height: 72px; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); text-decoration: none; }
.td-act:hover, .td-act:focus-visible { border-color: var(--menu-on); box-shadow: 0 2px 10px rgba(36, 112, 204, .18); outline: none; }
.td-act i { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--gc, var(--page)); color: var(--gi, var(--ink)); }
.td-act i svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.td-act span { min-width: 0; }
.td-act b { display: block; font-size: 15.5px; line-height: 1.25; }
.td-act small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.td-late { display: grid; gap: 6px; }
.td-late a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-left: 4px solid #d92d20; border-radius: 10px; background: var(--card); color: var(--ink); text-decoration: none; }
.td-late a:hover { border-color: #d92d20; }
.td-late b { flex: none; min-width: 26px; text-align: center; background: #d92d20; color: #fff; border-radius: 12px; padding: 1px 8px; font-size: 13px; }
.td-late span { flex: 1; }
.td-late i { flex: none; font-style: normal; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.wt-item.faults { border-left-color: #b42318; } .wt-item.faults h3 b { background: #b42318; }
.wt-item.calls { border-left-color: #026aa2; } .wt-item.calls h3 b { background: #026aa2; }
.wt-item.media { border-left-color: #6941c6; } .wt-item.media h3 b { background: #6941c6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .td-sum { background: #3d1512; color: #fda29b; } :root:not([data-theme="light"]) .td-sum.calm { background: #0f3a25; color: #75e0a7; } :root:not([data-theme="light"]) .td-h.late { color: #fda29b; } }
:root[data-theme="dark"] .td-sum { background: #3d1512; color: #fda29b; } :root[data-theme="dark"] .td-sum.calm { background: #0f3a25; color: #75e0a7; } :root[data-theme="dark"] .td-h.late { color: #fda29b; }
@media (max-width: 760px) {
  .td-acts { grid-template-columns: 1fr 1fr; gap: 8px; }
  .td-act { min-height: 64px; padding: 10px; gap: 9px; }
  .td-act i { width: 36px; height: 36px; border-radius: 10px; } .td-act i svg { width: 20px; height: 20px; }
  .td-act b { font-size: 14px; } .td-sum { font-size: 14px; }
}
.wt-item a.btn, .wt-rows a { text-decoration: none; }
