/* ورشة الحافظ — design tokens first, then shared parts, then the three surfaces. */

@font-face { font-family: "Cairo"; src: url("../lib/fonts/cairo-arabic-wght-normal.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Cairo"; src: url("../lib/fonts/cairo-latin-wght-normal.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Tajawal"; src: url("../lib/fonts/tajawal-arabic-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Tajawal"; src: url("../lib/fonts/tajawal-arabic-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Tajawal"; src: url("../lib/fonts/tajawal-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Tajawal"; src: url("../lib/fonts/tajawal-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }

:root {
    --navy-950: #081b33;
    --navy-900: #0b2545;
    --navy-700: #1b3f73;
    --steel-500: #5f7d9c;
    --steel-300: #a9bfd4;
    --steel-200: #d3e0ec;
    --mist: #f1f5f9;
    --white: #ffffff;
    --orange: #f47a1f;
    --orange-hover: #ff9142;
    --orange-text: #b24c06;
    --orange-tint: #fff1e5;
    --ink: #10253f;
    --muted: #54687f;
    --radius: 14px;
    --display: "Cairo", "Segoe UI", Tahoma, sans-serif;
    --body: "Tajawal", "Segoe UI", Tahoma, sans-serif;

    --bs-body-font-family: var(--body);
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--white);
    --bs-link-color-rgb: 27, 63, 115;
    --bs-link-hover-color-rgb: 178, 76, 6;
    --bs-border-color: var(--steel-200);
}

/* Installed app only: scroll yes, pinch or double-tap zoom no. */
html.app-installed { touch-action: pan-x pan-y; }
body { font-size: 1.0625rem; line-height: 1.7; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 800; color: var(--navy-900); line-height: 1.3; }
a { text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.muted { color: var(--muted); }

.skip-link { position: fixed; top: -60px; right: 12px; z-index: 2000; background: var(--orange); color: var(--navy-950); padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 12px; }

/* Buttons */
.btn { font-family: var(--display); font-weight: 700; border-radius: 10px; padding: .6rem 1.15rem; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.btn-accent { background: var(--orange); border-color: var(--orange); color: var(--navy-950); }
.btn-accent:hover, .btn-accent:active, .btn-accent:focus { background: var(--orange-hover) !important; border-color: var(--orange-hover) !important; color: var(--navy-950) !important; }
.btn-navy { background: var(--navy-900); border-color: var(--navy-900); color: var(--white); }
.btn-navy:hover, .btn-navy:active, .btn-navy:focus { background: var(--navy-700) !important; border-color: var(--navy-700) !important; color: var(--white) !important; }
.btn-line { background: var(--white); border: 1.5px solid var(--steel-200); color: var(--navy-900); }
.btn-line:hover { border-color: var(--navy-700); color: var(--navy-900); background: var(--mist); }
.btn-danger-line { background: var(--white); border: 1.5px solid #e9b8b4; color: #a3271d; }
.btn-danger-line:hover { background: #fdf0ef; border-color: #a3271d; color: #a3271d; }
.btn-danger-fill { background: #a3271d; border-color: #a3271d; color: var(--white); }
.btn-danger-fill:hover, .btn-danger-fill:active, .btn-danger-fill:focus { background: #861f17 !important; border-color: #861f17 !important; color: var(--white) !important; }
.btn-lg-tap { min-height: 56px; font-size: 1.125rem; width: 100%; }
.icon-btn { position: relative; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: inherit; border-radius: 10px; font-size: 1.15rem; text-decoration: none; }
.icon-btn:hover { background: rgba(127, 150, 175, .18); color: inherit; }
/* The way up, in the top bar: the arrow alone on phones; from 992px it also names the page it leads to. */
.back-link { width: auto; min-width: 44px; flex: none; gap: .5rem; }
.back-link span { display: none; font: 700 1rem/1 var(--display); white-space: nowrap; }
.dot-count { position: absolute; top: 3px; left: 3px; min-width: 18px; height: 18px; padding: 0 4px; background: var(--orange); color: var(--navy-950); font: 700 .7rem/18px var(--display); border-radius: 9px; text-align: center; }

/* Forms */
.form-label { font-weight: 700; margin-bottom: .3rem; }
.form-control, .form-select { min-height: 48px; border-radius: 10px; border: 1.5px solid var(--steel-200); font-size: 1rem; }
textarea.form-control { min-height: 96px; }
.form-control:focus, .form-select:focus { border-color: var(--navy-700); box-shadow: 0 0 0 3px rgba(27, 63, 115, .15); }
.field-hint { font-size: .9rem; color: var(--muted); margin-top: .25rem; }
.match-hint { font-size: .9rem; font-weight: 700; color: #a3271d; margin-top: .25rem; }
.match-hint.is-match { color: #1c7c4a; }
.field-validation-error { display: block; color: #a3271d; font-size: .92rem; margin-top: .25rem; font-weight: 700; }
.field-validation-error::before { content: "\f06a"; font: var(--fa-font-solid); margin-inline-end: .35rem; }
/* An empty message slot takes no room, even as a grid item or beside buttons. */
.field-validation-valid { display: none; }
.input-validation-error { border-color: #a3271d; background-color: #fdf0ef; }
.input-validation-error:focus { border-color: #a3271d; box-shadow: 0 0 0 3px rgba(163, 39, 29, .18); }
/* A required field's mark, in the same red as its message. */
.req { color: #a3271d; font-weight: 800; margin-inline-start: .2rem; }
/* Only the bottom margin: the top one is the row's gutter, which keeps the note off the panel's edge. */
.req-note { margin-bottom: 0; font-size: .9rem; color: var(--muted); }
.validation-summary-errors { background: #fdf0ef; color: #a3271d; border-radius: 10px; padding: .7rem 1rem; margin-bottom: 1rem; font-weight: 700; }
.validation-summary-errors ul { margin: 0; padding: 0; list-style: none; }
.validation-summary-valid { display: none; }
.hp-field { position: absolute; right: -10000px; width: 1px; height: 1px; overflow: hidden; }

.upload { display: flex; align-items: center; gap: .85rem; border: 1.5px dashed var(--steel-300); border-radius: 12px; padding: .85rem 1rem; cursor: pointer; background: var(--mist); margin: 0; min-height: 72px; }
.upload:hover { border-color: var(--navy-700); }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload:focus-within { outline: 3px solid var(--orange); outline-offset: 2px; }
.upload img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; }
.upload i { font-size: 1.4rem; color: var(--navy-700); }

.loc-hint { font-size: .92rem; margin: 0 0 .6rem; }
.loc-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 575.98px) {
    .loc-actions [data-locate], .loc-actions [data-pick], .loc-actions [data-coords] { flex: 1 1 0; min-width: 0; white-space: nowrap; padding-inline: .5rem; gap: .35rem; font-size: .9rem; }
    .loc-actions [data-clear] { flex-basis: 100%; }
}
.loc-actions [data-coords][aria-expanded="true"] { border-color: var(--navy-700); background: var(--mist); }
/* Typed coordinates (manager only): two short fields side by side, even on a phone. */
.loc-coords { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; align-items: end; margin-top: .7rem; padding: .85rem; border: 1px solid var(--steel-200); border-radius: 12px; background: var(--mist); }
.loc-coords[hidden] { display: none; }
.loc-coords .form-label { font-size: .9rem; margin-bottom: .3rem; }
.loc-coords .form-control { text-align: left; }
.loc-coords .form-control[aria-invalid="true"] { border-color: #a3271d; }
.loc-coords [data-coords-apply], .loc-coords-note { grid-column: 1 / -1; }
.loc-coords-note { margin: 0; font-size: .85rem; }
@media (min-width: 576px) {
    .loc-coords { grid-template-columns: 1fr 1fr auto; }
    .loc-coords [data-coords-apply] { grid-column: auto; }
}
.loc-status { margin: .6rem 0 0; font-size: .92rem; color: var(--navy-700); }
/* isolation keeps Leaflet's high z-index panes under the sticky site header. */
.loc-map { height: 280px; margin-top: .7rem; border: 1px solid var(--steel-200); border-radius: 12px; direction: ltr; isolation: isolate; }

/* Status badges: tint + dark text, each pair above 4.5:1 */
.status { display: inline-flex; align-items: center; gap: .4rem; padding: .16rem .65rem; border-radius: 999px; font: 700 .86rem/1.7 var(--display); white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.s-new { background: #e1edfb; color: #124a8c; }
.s-pendingconfirmation { background: #fdf0cf; color: #765100; }
.s-confirmed { background: #d9f2ee; color: #0b5e53; }
.s-assigned, .s-techniciancalled, .s-ontheway { background: #dcf1fa; color: #0a5575; }
.s-inprogress { background: var(--orange-tint); color: var(--orange-text); }
.s-completed { background: #dff3e3; color: #1b6631; }
.s-cancelled { background: #e8edf2; color: #465a70; }
.s-rejected, .s-unabletorepair { background: #fbe6e4; color: #a3271d; }
/* The workshop path: violet while the manager moves the machine, deeper while its technicians work on it */
.s-needsworkshop, .s-awaitingpickup, .s-atworkshop { background: #ede7fb; color: #4b2d91; }
.s-workshoprepair { background: #e4ddf7; color: #3d2380; }
.s-awaitingreturn { background: #f6e7ea; color: #8a2635; }

/* Cycle dial — the request's position, read like a washing machine's programme knob */
.dial { position: relative; width: 148px; height: 148px; flex: none; }
.dial svg { width: 100%; height: 100%; display: block; }
.dial-seg { fill: none; stroke: var(--steel-200); stroke-width: 9; }
.dial-seg.done { stroke: var(--navy-700); }
.dial-seg.now { stroke: var(--orange); }
.dial-knob { fill: var(--white); stroke: var(--steel-200); stroke-width: 1.5; }
.dial-pointer { stroke: var(--orange); stroke-width: 5; stroke-linecap: round; }
.dial.off .dial-pointer { stroke: var(--steel-300); }
.dial-hub { fill: var(--navy-900); }

/* Shared surfaces */
.panel { background: var(--white); border: 1px solid var(--steel-200); border-radius: var(--radius); }
.panel + .panel { margin-top: 1rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.15rem; border-bottom: 1px solid var(--steel-200); }
.panel-head h2 { font-size: 1.08rem; margin: 0; }
.panel-body { padding: 1.15rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .9rem 1.25rem; margin: 0; }
.facts dt { font-size: .87rem; color: var(--muted); font-weight: 400; }
.facts dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.facts .wide { grid-column: 1 / -1; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .75rem; }
.photo-grid a { display: block; text-decoration: none; }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--mist); }
.photo-grid span { display: block; font-size: .85rem; color: var(--muted); margin-top: .2rem; }

/* Photo viewer (app.js). The page behind it does not scroll while it is open. */
html.viewer-open, html.viewer-open body { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 2100; display: flex; flex-direction: column; background: #050d1a; color: var(--white); touch-action: none; }
.viewer[hidden] { display: none; }
.viewer-bar { display: flex; align-items: center; gap: .75rem; padding: max(.6rem, env(safe-area-inset-top)) 1rem .6rem; }
.viewer-caption { min-width: 0; }
.viewer-caption strong { display: block; font: 700 1rem/1.4 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-caption span { display: block; font-size: .85rem; color: var(--steel-200); }
.viewer-btn { flex: none; width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: var(--white); font-size: 1.25rem; }
.viewer-btn:hover { background: rgba(255, 255, 255, .24); }
.viewer-btn:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.viewer-btn[hidden] { display: none; }
.viewer-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; padding-bottom: env(safe-area-inset-bottom); }
.viewer-img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .2s ease; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; cursor: zoom-in; }
.viewer.zoomed .viewer-img { cursor: grab; }
.viewer.dragging .viewer-img { transition: none; }
.viewer.loading .viewer-img { opacity: 0; }
.viewer.loading .viewer-stage::after { content: ""; position: absolute; width: 38px; height: 38px; border: 3px solid rgba(255, 255, 255, .25); border-top-color: var(--orange); border-radius: 50%; animation: viewer-spin .8s linear infinite; }
@keyframes viewer-spin { to { transform: rotate(360deg); } }
.viewer-note { position: absolute; margin: 0; padding: 1rem; text-align: center; color: var(--steel-200); }
.viewer-prev, .viewer-next { position: absolute; top: 50%; margin-top: -24px; }
.viewer-prev { right: .75rem; }
.viewer-next { left: .75rem; }
.viewer.zoomed .viewer-prev, .viewer.zoomed .viewer-next { display: none; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty i { font-size: 2rem; color: var(--steel-300); display: block; margin-bottom: .6rem; }

.req-card { display: block; padding: .95rem 1.1rem; border-bottom: 1px solid var(--steel-200); color: inherit; text-decoration: none; }
.req-card:last-child { border-bottom: 0; }
.req-card:hover { background: var(--mist); color: inherit; }
.req-card.plain:hover { background: transparent; }
.req-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.req-name { font: 700 1.08rem/1.5 var(--display); color: var(--navy-900); }
.req-meta { font-size: .92rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .1rem 1rem; margin-top: .15rem; }
.req-num { font-size: .85rem; color: var(--muted); }
.req-money { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; }
.req-money strong { font-family: var(--display); color: var(--navy-900); }
/* The manager's card (_AdminRequestCard): the name's link stretches over the whole card, and the call
   button sits above that link as a target of its own. */
.req-card.linked { position: relative; }
.req-card.linked .req-top { align-items: flex-start; }
.req-badges { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: .25rem; padding-top: .15rem; }
.req-badges .rq-tag { margin: 0; }
.req-link { text-decoration: none; }
.req-link::after { content: ""; position: absolute; inset: 0; }
.req-link:focus-visible { outline: 0; }
.req-link:focus-visible::after { outline: 3px solid var(--orange); outline-offset: -3px; }
.req-when { color: var(--ink); }
.req-when i { color: var(--muted); }
.req-foot { display: flex; align-items: center; gap: .75rem; margin-top: .4rem; }
.req-who { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; }
.req-tech { display: inline-flex; align-items: center; gap: .45rem; font: 700 .95rem/1.4 var(--display); color: var(--navy-900); }
.req-tech-mark { flex: none; width: 28px; height: 28px; border-radius: 50%; background: #e3ebf4; color: var(--navy-700); font: 800 .8rem/28px var(--display); text-align: center; }
.req-tech.none { font: .9rem/1.4 var(--body); color: var(--muted); }
.req-tech.none .req-tech-mark { border: 1.5px dashed var(--steel-300); background: transparent; }
.req-call { position: relative; z-index: 1; margin-inline-start: auto; background: var(--white); }
.req-card.linked .req-money { margin-top: .55rem; padding-top: .55rem; border-top: 1px dashed var(--steel-200); }
/* A finished job's money on one line: the amount, the workshop's part and the technician's part. The parts leave
   their currency to the amount, and the type shrinks with the card (cqi, the line's own width), so a narrow phone
   or a two-column tablet still fits it. Where cqi is unknown the sizes before it stand. */
.req-card.linked .req-money { container-type: inline-size; flex-wrap: nowrap; gap: .4rem; }
.req-card.linked .req-money > * { flex: none; }
.req-card.linked .req-money .amount-badge, .req-card.linked .req-money .share-badge { padding-inline: .5rem; font-size: .8rem; font-size: clamp(.68rem, 4.1cqi, .84rem); }
.req-card.linked .share-badge .cur { display: none; }
.empty p { margin: 0 0 1rem; }
/* Above the request list: which requests it shows and their order; under it: the pages and how many a page holds. */
.rl-bar, .rl-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .7rem 1.15rem; }
.rl-bar { border-bottom: 1px solid var(--steel-200); }
.rl-pager { border-top: 1px solid var(--steel-200); }
.rl-bar > .muted { font-size: .92rem; }
.rl-pick { display: inline-flex; align-items: center; gap: .5rem; }
.rl-pick label { font-size: .86rem; color: var(--muted); white-space: nowrap; }
.rl-pick .form-select { width: auto; min-height: 44px; padding-block: .3rem; font: 700 .92rem var(--display); color: var(--navy-900); }
/* The phone's pager shows the ends and the current page, the wider one the pages beside it too (PageWindow). */
.pg, .pg-set { display: flex; align-items: center; gap: .3rem; }
.pg-wide { display: none; }
.pg-num, .pg-step { min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: 0 .6rem; border: 1.5px solid var(--steel-200); border-radius: 10px; background: var(--white); color: var(--navy-900); font: 700 .95rem/1 var(--display); text-decoration: none; font-variant-numeric: tabular-nums; }
.pg-num:hover, .pg-step:hover { border-color: var(--navy-700); background: var(--mist); color: var(--navy-900); }
.pg-num.active { background: var(--navy-900); border-color: var(--navy-900); color: var(--white); }
.pg-step.disabled { color: var(--steel-300); }
.pg-gap { min-width: 1.1rem; text-align: center; color: var(--muted); }
@media (max-width: 575.98px) {
    .rl-pager { justify-content: center; }
}
@media (min-width: 576px) {
    .pg-narrow { display: none; }
    .pg-wide { display: flex; }
}
.cell-sub { display: block; font-size: .85rem; }

/* Keeps .visually-hidden headers inside the scroll box instead of widening the page. */
.table-responsive { position: relative; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { font-size: .85rem; color: var(--muted); font-weight: 700; padding: .7rem .8rem; text-align: start; border-bottom: 1px solid var(--steel-200); white-space: nowrap; }
.data-table td { padding: .7rem .8rem; border-bottom: 1px solid var(--mist); vertical-align: middle; white-space: nowrap; }
.data-table td.ltr { display: table-cell; text-align: right; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--mist); }
.data-table tfoot td { padding: .75rem .8rem; border-top: 2px solid var(--steel-200); font: 700 .95rem/1.5 var(--display); color: var(--navy-900); white-space: nowrap; }
.table-note { margin: 0; padding: .75rem 1.15rem; border-top: 1px solid var(--mist); font-size: .88rem; color: var(--muted); }
/* Shown on paper only (see the print block at the end). */
.print-only { display: none; }
/* The request list has the most columns, so it keeps its cells tighter to fit common laptop screens. */
.request-table th, .request-table td { padding-inline: .5rem; }
/* A long name takes a second line rather than push the table past the screen; a tag drops under its badge whole. */
.request-table .wrap { white-space: normal; }
.request-table td.wrap { min-width: 5.5rem; }
.request-table .rq-tag { white-space: nowrap; }
.request-table { font-variant-numeric: tabular-nums; }
/* The header stays under the sticky top bar (60px) while the page scrolls. A collapsed border does not move with
   a sticky cell, so its line is a shadow; the outer corners round off with the panel's. */
.req-table-box { position: relative; }
.request-table thead th { position: sticky; top: 60px; z-index: 2; background: var(--white); border-bottom: 0; box-shadow: inset 0 -1px 0 var(--steel-200); }
.request-table thead th:first-child { border-start-start-radius: var(--radius); }
.request-table thead th:last-child { border-start-end-radius: var(--radius); }
.request-table tbody tr[data-href] { cursor: pointer; }
.req-row-link { font: 700 .95rem/1.5 var(--display); color: var(--navy-900); text-decoration: none; }
.req-row-link:hover { text-decoration: underline; }
.request-table .req-tech { font-size: .9rem; }
.request-table .req-tech-mark { width: 26px; height: 26px; line-height: 26px; }
.req-money-cell strong { font-family: var(--display); color: var(--navy-900); }
.req-money-cell .share-badge { display: flex; width: fit-content; margin-top: .2rem; }
.request-table .row-go { width: 1%; padding-inline-end: .9rem; color: var(--steel-300); }
.request-table tbody tr:hover .row-go { color: var(--navy-700); }

/* Announcements, on both sides: the manager's own words, so the lines break where they were typed. */
.ann-text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; font-size: 1.06rem; line-height: 1.9; }
.ann-snippet { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; white-space: pre-line; overflow-wrap: anywhere; }
.ann-mark { margin-inline-end: .3rem; font-size: .9em; color: var(--orange); }
.ann-from { font-size: .85rem; font-weight: 700; color: var(--orange-text); }

/* ---------- Public site ---------- */
.site-head { position: sticky; top: 0; z-index: 100; background: var(--white); border-bottom: 1px solid var(--steel-200); }
.site-head-in { display: flex; align-items: center; gap: .75rem; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--navy-900); font: 800 1.12rem/1.2 var(--display); }
.brand small { display: block; font: 400 .78rem/1.2 var(--body); color: var(--muted); }
.logo-mark { width: 38px; height: 38px; flex: none; }
.site-links { display: none; gap: 1.4rem; margin-inline-start: 1.5rem; }
.site-links a { color: var(--ink); text-decoration: none; font-weight: 700; white-space: nowrap; }
.site-head-actions { gap: .5rem; }
.site-head-actions .btn { white-space: nowrap; }
.site-links a:hover { color: var(--orange-text); }

.site-drawer { --bs-offcanvas-width: min(290px, 84vw); }
.site-drawer-head { display: flex; align-items: center; justify-content: space-between; min-height: 66px; padding: 0 1rem; border-bottom: 1px solid var(--steel-200); }
.site-drawer-nav { display: flex; flex-direction: column; padding: .5rem; overflow-y: auto; }
.site-drawer-nav a { display: flex; align-items: center; gap: .8rem; min-height: 52px; padding: 0 .75rem; border-radius: 10px; color: var(--navy-900); font-weight: 700; text-decoration: none; }
.site-drawer-nav a:hover { background: var(--mist); }
.site-drawer-nav i { width: 22px; text-align: center; color: var(--orange-text); }

.hero { position: relative; background: var(--navy-900); color: var(--white); overflow: hidden; }
.hero-in { display: grid; gap: 2.25rem; padding-block: 2.5rem 3rem; }
/* The logo sits on its own square backdrop; the circle keeps that from reading as a box on navy. */
.hero-logo { display: block; width: min(76vw, 320px); height: auto; margin-inline: auto; border-radius: 50%; }
.hero h1 { color: var(--white); font-size: clamp(2.1rem, 9.6vw, 4.6rem); font-weight: 900; line-height: 1.16; margin-bottom: 1rem; }
.hero h1 em { font-style: normal; color: var(--orange); }
.hero p { font-size: 1.15rem; color: var(--steel-200); max-width: 30rem; margin-bottom: 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-actions .btn { flex: 1 1 auto; min-height: 54px; padding-inline: .9rem; font-size: 1.08rem; }
.btn-whatsapp { background: #25d366; border-color: #25d366; color: var(--navy-950); }
.btn-whatsapp:hover, .btn-whatsapp:active, .btn-whatsapp:focus { background: #4be083 !important; border-color: #4be083 !important; color: var(--navy-950) !important; }
.btn-whatsapp i { font-size: 1.3rem; }

.section { padding: 3.25rem 0; }
.section h2 { font-size: clamp(1.6rem, 6vw, 2.2rem); margin-bottom: .5rem; }
.section-lead { color: var(--muted); max-width: 36rem; margin-bottom: 1.75rem; }

.contact-grid { display: grid; gap: .25rem; }
.contact-row { display: flex; gap: .9rem; align-items: center; padding: .85rem 0; border-bottom: 1px solid var(--steel-200); color: inherit; text-decoration: none; }
.contact-row i { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--navy-900); color: var(--white); display: flex; align-items: center; justify-content: center; }
.contact-row small { display: block; color: var(--muted); }
.contact-row strong { font-family: var(--display); }
.contact-pin { margin-inline-start: auto; text-decoration: none; }
.contact-pin i { background: var(--white); color: var(--navy-900); border: 1px solid var(--navy-900); }
.contact-pin:hover i { background: var(--navy-900); color: var(--white); }

.site-foot { background: var(--navy-950); color: var(--steel-200); padding: 2rem 0; font-size: .96rem; }
.site-foot a { color: var(--white); }
.site-foot strong { color: var(--white); font-family: var(--display); }
.foot-copy { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.12); text-align: center; font-size: .88rem; color: var(--steel-200); }
.foot-links { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem 1.1rem; }
.foot-links a { text-decoration: none; padding: .35rem 0; }
.foot-links a:hover { color: var(--orange); }
.foot-social { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.foot-social a { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.1); text-decoration: none; font-size: 1.1rem; transition: background .15s; }
.foot-social a:hover { background: var(--orange); color: var(--navy-950); }

.form-page { background: var(--mist); padding: 2rem 0 3rem; min-height: 70vh; }
.form-sheet { max-width: 640px; margin: 0 auto; background: var(--white); border: 1px solid var(--steel-200); border-radius: var(--radius); padding: 1.35rem; }
.form-sheet h1, .form-sheet h2 { font-size: 1.7rem; margin-bottom: .25rem; }
.home-request { min-height: 0; }
.home-request, #about, #contact { scroll-margin-top: 66px; }

/* Stays out of the home page until a link to #about is chosen. */
#about:not(:target) { display: none; }
.about-card { padding: 1.6rem 1.35rem 1.8rem; background: var(--white); border: 1px solid var(--steel-200); border-radius: 20px; box-shadow: 0 18px 40px -28px rgba(11, 37, 69, .55); }
.section .about-card h2 { margin-bottom: .75rem; }
.about-card h2::after { content: ""; display: block; width: 52px; height: 4px; margin-top: .6rem; border-radius: 2px; background: var(--orange); }
.about-card p { margin: 0; font-size: 1.12rem; line-height: 1.95; white-space: pre-line; overflow-wrap: anywhere; }

.done-sheet { max-width: 520px; margin: 0 auto; text-align: center; background: var(--white); border: 1px solid var(--steel-200); border-radius: var(--radius); padding: 2rem 1.35rem; }
.done-sheet .dial { margin: 0 auto 1rem; }
.done-number { font: 900 1.7rem/1.3 var(--display); color: var(--navy-900); margin: .25rem 0 1rem; }

.auth-body { background: var(--white); }
.auth-shell { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.auth-brand { display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1.25rem; background: var(--navy-900); color: var(--steel-200); }
.auth-brand img { flex: none; width: 72px; height: 72px; border-radius: 50%; }
.auth-brand strong { display: block; font: 900 1.4rem/1.3 var(--display); color: var(--white); }
.auth-brand span { display: block; font-size: .98rem; }
.auth-panel { flex: 1; display: flex; justify-content: center; padding: 1.75rem 1.25rem 2rem; }
.auth-form { width: 100%; max-width: 400px; }
.auth-form h1 { font-size: 1.75rem; margin-bottom: .2rem; }
.auth-form > .muted { margin-bottom: 1.35rem; }
.password-field { position: relative; }
.password-field input { padding-right: 3rem; }
.password-toggle { position: absolute; top: 0; right: 0; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--steel-500); border-radius: 10px; }
.password-toggle:hover { color: var(--navy-900); }
.auth-back { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; margin-top: .6rem; color: var(--muted); font-weight: 700; text-decoration: none; }
.auth-back:hover { color: var(--navy-900); }
.error-page { text-align: center; padding: 4.5rem 1rem; }
.error-page i { font-size: 2.6rem; color: var(--orange-text); margin-bottom: 1rem; }

/* ---------- Admin ---------- */
.app-body { background: var(--mist); }
/* Bootstrap forces a transparent .offcanvas-lg background with !important from lg upwards. */
.side { background: var(--navy-950) !important; color: var(--steel-200); --bs-offcanvas-width: 270px; }
.side-brand { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.1rem; font: 800 1.1rem var(--display); color: var(--white); white-space: nowrap; overflow: hidden; }
.side-brand .logo-mark { flex: none; }
.side-nav { display: flex; flex-direction: column; gap: .15rem; padding: .5rem .75rem; flex: 1; overflow-y: auto; }
/* No wrapping, so the names slide out of sight while the menu folds instead of breaking onto two lines. */
.side-nav a { display: flex; align-items: center; gap: .75rem; padding: .62rem .8rem; border-radius: 10px; color: var(--steel-200); text-decoration: none; font-weight: 700; white-space: nowrap; overflow: hidden; }
.side-nav a i { flex: none; }
.side-nav a i { width: 20px; text-align: center; color: var(--steel-300); }
.side-nav a:hover { background: rgba(255, 255, 255, .07); color: var(--white); }
.side-nav a.active { background: var(--orange); color: var(--navy-950); }
.side-nav a.active i { color: var(--navy-950); }
.side-label { font-size: .8rem; color: var(--steel-300); padding: 1rem .8rem .3rem; }
.side-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem 1.1rem; border-top: 1px solid rgba(255, 255, 255, .1); margin: 0; }
.side-foot span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .icon-btn { flex: none; }
/* The folded menu, from the menu's own width so the class, the screen size and the fold all agree:
   icons alone, each named beside it by app.js on hover or keyboard focus. The names shrink to nothing
   rather than leave, so each row keeps its height and screen readers still read them. */
@container side (max-width: 120px) {
    .side-brand, .side-nav a, .side-foot { justify-content: center; gap: 0; padding-inline: 0; }
    .side-brand span, .side-nav a span, .side-foot span { flex: none; width: 0; min-width: 0; overflow: hidden; }
    .side-nav { padding-inline: .6rem; }
    .side-nav a i { font-size: 1.1rem; }
    .side-label { overflow: hidden; white-space: nowrap; color: transparent; background: linear-gradient(rgba(255, 255, 255, .12), rgba(255, 255, 255, .12)) center / calc(100% - 1rem) 1px no-repeat; }
}
/* Drawn outside the menu, so the menu's own scrolling never cuts it off. */
.side-tip { position: fixed; z-index: 1080; transform: translate(-100%, -50%); padding: .38rem .75rem; border-radius: 8px; background: var(--navy-900); color: var(--white); font: 700 .92rem/1.4 var(--display); white-space: nowrap; pointer-events: none; box-shadow: 0 10px 24px -10px rgba(8, 27, 51, .6); animation: side-tip-in .12s ease-out; }
.side-tip::after { content: ""; position: absolute; top: 50%; left: 100%; margin-top: -6px; border: 6px solid transparent; border-right-width: 0; border-left-color: var(--navy-900); }
@keyframes side-tip-in { from { opacity: 0; } }
/* The site's dark red fails on navy, so this one is lighter. */
.side-foot .icon-btn { color: #ff6b5e; background: rgba(255, 107, 94, .14); }
.side-foot .icon-btn:hover { color: #ff8a80; background: rgba(255, 107, 94, .26); }
.topbar { display: flex; align-items: center; gap: .5rem; min-height: 60px; padding: 0 .75rem; background: var(--white); border-bottom: 1px solid var(--steel-200); position: sticky; top: 0; z-index: 50; color: var(--navy-900); }
.app-content { padding: 1.15rem 1rem 2.5rem; max-width: 1240px; margin: 0 auto; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.15rem; }
.page-head h1 { font-size: 1.55rem; margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; margin-bottom: 1.15rem; }
.stat { background: var(--white); border: 1px solid var(--steel-200); border-radius: var(--radius); padding: .85rem 1rem; text-decoration: none; color: inherit; display: flex; flex-direction: column; justify-content: space-between; border-inline-start: 4px solid var(--steel-300); }
.stat:hover { border-color: var(--navy-700); color: inherit; }
.stat-label { font-size: .92rem; color: var(--muted); display: block; }
.stat-value { font: 900 2rem/1.25 var(--display); color: var(--navy-900); display: block; }
.stat.g-pending { border-inline-start-color: #c9920c; }
.stat.g-confirmed { border-inline-start-color: #14897a; }
.stat.g-inprogress { border-inline-start-color: var(--orange); }
.stat.g-completed { border-inline-start-color: #2f9a4d; }
.stat.g-closed { border-inline-start-color: #7b8ea3; }
.filter-actions { display: flex; gap: .5rem; align-self: end; }
/* The request list's filters (Requests/Index). One form: on a phone the search box and a «تصفية» button that opens
   the rest in a bottom sheet (Bootstrap offcanvas-md); from 768px the sheet's fields join the bar as one row. */
.rf-bar { display: flex; align-items: flex-end; gap: .5rem; }
.rf-search { flex: 1 1 240px; min-width: 0; }
.rf-search-box { position: relative; }
.rf-search-box .form-control { padding-inline-start: 2.9rem; }
.rf-search-go { position: absolute; inset-block: 0; inset-inline-start: 2px; width: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); }
.rf-search-go:hover { color: var(--navy-900); }
.rf label { font-size: .86rem; color: var(--muted); }
.rf-field { min-width: 0; }
.rf-open, .rf-more { flex: none; min-height: 48px; }
.rf-count { min-width: 20px; padding: 0 .35rem; border-radius: 999px; background: var(--orange); color: var(--navy-950); font: 800 .78rem/20px var(--display); text-align: center; }
/* The visit dates: shortcuts (today, tomorrow, this week, this month, last month) beside the two fields. */
.rf-dates { grid-column: 1 / -1; margin: 0; padding: 0; border: 0; }
.rf-dates legend { float: none; width: auto; margin: 0 0 .3rem; padding: 0; font-size: .86rem; line-height: 1.5; color: var(--muted); }
.rf-dates-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem 1rem; }
.rf-quick { display: flex; flex-wrap: wrap; gap: .4rem; }
.rf-quick-btn { min-height: 40px; padding: 0 .85rem; border: 1.5px solid var(--steel-200); border-radius: 999px; background: var(--white); color: var(--navy-900); font: 700 .88rem/1 var(--display); white-space: nowrap; }
.rf-quick-btn:hover { border-color: var(--navy-700); }
.rf-quick-btn[aria-pressed="true"] { background: var(--navy-900); border-color: var(--navy-900); color: var(--white); }
.rf-range { flex: 1 1 300px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.rf-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .5rem; margin-top: .8rem; }
.rf-chips .filter-chip { margin: 0; }
.rf-clear { font: 700 .86rem/1.7 var(--display); color: var(--navy-700); }
/* Hidden on a phone but read aloud there (an icon-only button's name, a label the placeholder stands in for). */
@media (max-width: 767.98px) {
    .label-md { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
    .btn-export { padding-inline: .85rem; }
    .rf-open { padding-inline: .8rem; }
    .rf-sheet.offcanvas-md { --bs-offcanvas-height: auto; max-height: 88vh; border-radius: 22px 22px 0 0; }
    .rf-sheet .offcanvas-header { position: relative; padding: 1.2rem .75rem .35rem 1.15rem; }
    .rf-sheet .offcanvas-header::before { content: ""; position: absolute; top: .55rem; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 999px; background: var(--steel-200); }
    .rf-sheet .offcanvas-title { margin: 0; font: 800 1.15rem/1.4 var(--display); color: var(--navy-900); }
    .rf-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem .65rem; align-content: start; min-height: 0; padding: .35rem 1.15rem 1rem; }
    .rf-wide { grid-column: 1 / -1; }
    .rf-quick-btn { min-height: 44px; }
    /* In the sheet every field shows; «المزيد» is for the wider row only. */
    .rf-extra, .rf-extra.collapse:not(.show) { display: contents; }
    .rf-sheet-foot { display: flex; gap: .6rem; padding: .75rem 1.15rem calc(.9rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--steel-200); }
    .rf-sheet-foot .btn-line { flex: 1; }
    .rf-sheet-foot .btn-navy { flex: 2; }
}
/* The request list's groups as tabs across the top of the filter panel. They scroll sideways where eight
   do not fit (a phone), without a scrollbar: the cut-off tab at the edge shows there are more. The line under
   them is a shadow, so the open tab's orange bar covers it without spilling out of the scrolling box. */
.req-tabs { display: flex; gap: .15rem; padding: 0 .6rem; box-shadow: inset 0 -1px 0 var(--steel-200); overflow-x: auto; scrollbar-width: none; }
.req-tabs::-webkit-scrollbar { display: none; }
.req-tab { flex: none; display: inline-flex; align-items: center; gap: .45rem; min-height: 50px; padding: 0 .7rem; border-bottom: 3px solid transparent; color: var(--muted); font: 700 .95rem/1 var(--display); text-decoration: none; white-space: nowrap; }
.req-tab:hover { color: var(--navy-900); }
.req-tab:focus-visible { outline-offset: -3px; }
.req-tab.active { color: var(--navy-900); border-bottom-color: var(--orange); }
.req-tab-count { min-width: 22px; padding: 0 .45rem; border-radius: 999px; background: var(--mist); color: var(--muted); font: 700 .8rem/22px var(--display); text-align: center; }
.req-tab-count.waiting { background: var(--orange-tint); color: var(--orange-text); }
.req-tab.active .req-tab-count { background: var(--navy-900); color: var(--white); }
.filter-chip { display: inline-flex; align-items: center; gap: .45rem; margin-inline-start: .5rem; padding: .16rem .75rem; border-radius: 999px; background: var(--orange-tint); color: var(--orange-text); font: 700 .86rem/1.7 var(--display); text-decoration: none; }
.filter-chip:hover, .filter-chip:focus { background: var(--orange); color: var(--navy-950); }
.btn-square { width: 48px; height: 48px; padding: 0; flex: 0 0 48px; font-size: 1.05rem; }
.action-stack { display: grid; gap: .5rem; }
.bar { height: 8px; background: var(--mist); border-radius: 4px; overflow: hidden; min-width: 60px; }
.bar span { display: block; height: 100%; background: var(--navy-700); border-radius: 4px; }
.lookup-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .45rem 0; border-bottom: 1px solid var(--mist); }
.lookup-row.off .lookup-name { color: var(--muted); text-decoration: line-through; }
.lookup-name { flex: 1; min-width: 0; }
.lookup-handle { flex: none; width: 32px; height: 36px; margin-inline-end: -.4rem; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); cursor: grab; touch-action: none; border-radius: 6px; }
.lookup-handle:hover { color: var(--navy-900); background: var(--mist); }
.lookup-row.sort-ghost { opacity: .4; }
.lookup-row.sort-chosen { background: var(--mist); }
.lookup-list.is-saving { pointer-events: none; opacity: .7; }
.lookup-actions { display: flex; align-items: center; gap: .5rem; flex: none; }
.lookup-actions form { display: flex; }
.lookup-icon { width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; }
/* The knob sits at the inline start when off and slides to the inline end when on, so it mirrors in RTL. */
.lookup-switch { position: relative; width: 46px; height: 26px; padding: 0; border: 0; border-radius: 999px; background: var(--steel-300); cursor: pointer; transition: background-color .2s; }
.lookup-switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 3px rgba(8, 27, 51, .3); transition: inset-inline-start .2s; }
.lookup-switch[aria-checked="true"] { background: var(--navy-900); }
.lookup-switch[aria-checked="true"]::after { inset-inline-start: 23px; }
.lookup-switch:hover { background: var(--steel-500); }
.lookup-switch[aria-checked="true"]:hover { background: var(--navy-700); }
.lookup-switch:focus-visible { border-radius: 999px; }
/* A message for an empty name takes its own line under the box and its buttons. */
.lookup-edit { display: none; flex: 1; flex-wrap: wrap; gap: .4rem; }
.lookup-edit input { flex: 1 1 0; min-width: 0; }
.lookup-edit .field-validation-error { flex-basis: 100%; margin-top: 0; }
.lookup-row.editing > span, .lookup-row.editing .lookup-actions { display: none; }
.lookup-row.editing .lookup-edit { display: flex; }
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--steel-200); color: var(--navy-900); display: inline-flex; align-items: center; justify-content: center; font: 800 1.05rem var(--display); flex: none; }
.avatar.lg { width: 84px; height: 84px; font-size: 1.8rem; }

.report-stats .stat-value { font-size: 1.45rem; overflow-wrap: anywhere; }

#settle { scroll-margin-top: 72px; }
.balance-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1rem; background: var(--navy-900); color: var(--steel-200); border-radius: var(--radius); padding: 1rem 1.15rem; }
.balance-band strong { font: 900 1.7rem/1.3 var(--display); color: var(--white); }
.balance-band small { flex-basis: 100%; font-size: .88rem; color: var(--steel-300); }
.share-form { display: grid; gap: .6rem; }
.share-rest { margin: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; background: var(--mist); border-radius: 10px; padding: .55rem .8rem; color: var(--muted); }
.share-rest strong { font: 800 1.08rem/1.4 var(--display); color: var(--navy-900); }
.share-rest.is-charge { background: var(--orange-tint); color: var(--orange-text); }
.share-rest.is-charge strong { color: var(--orange-text); }
.share-rest.is-over { background: #fbe6e4; color: #a3271d; }
.share-rest.is-over strong { color: #a3271d; }
.share-form .share-reason { grid-column: 1 / -1; }
.share-facts { margin: 0 0 .75rem; }
.share-facts > div { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; border-bottom: 1px solid var(--mist); }
.share-facts dt { font-weight: 400; color: var(--muted); font-size: .92rem; }
.share-facts dd { margin: 0; font-weight: 700; }
.share-facts .is-charge dt, .share-facts .is-charge dd { color: var(--orange-text); }
.share-edit { margin-top: .75rem; }
.share-edit summary { cursor: pointer; font-weight: 700; color: var(--navy-700); padding: .6rem 0; }
.share-waiting { font-size: .88rem; color: var(--orange-text); }
.share-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .16rem .65rem; border-radius: 999px; font: 700 .84rem/1.7 var(--display); white-space: nowrap; }
/* Colour is for a share that waits on someone: one not decided yet, and a charge to the technician. */
.share-badge.awaiting { background: var(--orange-tint); color: var(--orange-text); }
.share-badge.charged { background: #fbe3d3; color: #8a3a05; }
/* A finished job's money, the amount and its two parts, in one plain pill each: white with a grey ring (a shadow, so
   no taller than the coloured ones), the number in navy and its word (IQD, الورشة, الفني) in grey. They are facts, not
   calls to act, so they leave colour to the badges above and to a share that still waits. */
.amount-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .16rem .65rem; border-radius: 999px; font: 800 .84rem/1.7 var(--display); white-space: nowrap; }
.amount-badge, .share-badge.approved, .share-badge.technician { background: var(--white); box-shadow: inset 0 0 0 1.5px var(--steel-300); color: var(--navy-900); font-weight: 800; }
.money-word, .amount-badge .cur, .share-badge.approved .cur, .share-badge.technician .cur { color: var(--muted); font-weight: 600; }
.amount-badge.free { color: var(--muted); font-weight: 700; }
.share-task { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.15rem; padding: .85rem 1rem; border-radius: var(--radius); background: var(--orange-tint); border: 1px solid #f6c9a3; border-inline-start: 4px solid var(--orange); color: var(--orange-text); text-decoration: none; }
.share-task:hover { border-color: var(--orange); color: var(--orange-text); }
.share-task > i { font-size: 1.2rem; }
.share-task strong { font: 900 1.15rem/1 var(--display); }
.share-task-go { margin-inline-start: auto; font-weight: 700; white-space: nowrap; }
.share-task-sum { display: block; font-size: .9rem; }

/* Announcements (manager). One light for each technician it went to, lit once they have read it:
   the dashboard's panel lights, so how many have read it shows before the number is read. */
.ann-intro { max-width: 62ch; margin: -.35rem 0 1.15rem; font-size: .95rem; }
.ann-row .req-name { display: block; overflow-wrap: anywhere; }
.ann-row .ann-snippet { margin: .1rem 0 .45rem; color: var(--ink); }
.ann-row-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem 1rem; }
.ann-read { display: inline-flex; align-items: center; gap: .55rem; font-size: .85rem; font-weight: 700; color: var(--navy-700); white-space: nowrap; }
.ann-lights { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.ann-lights > span { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--steel-200); }
.ann-lights > .on { background: #2f9e55; box-shadow: 0 0 0 3px rgba(47, 158, 85, .18); }
.ann-lights.lg { gap: 9px; }
.ann-lights.lg > span { width: 13px; height: 13px; }
.ann-lights.lg > .on { box-shadow: 0 0 0 3px rgba(47, 158, 85, .2), 0 0 10px rgba(47, 158, 85, .45); }
.ann-gauge { display: grid; gap: .7rem; padding: 1rem 1.15rem 1.1rem; border-bottom: 1px solid var(--steel-200); }
.ann-gauge-count { font: 700 1rem/1.2 var(--display); color: var(--muted); }
.ann-gauge-count strong { font-size: 1.9rem; font-weight: 900; color: var(--navy-900); }
.ann-meta { display: flex; align-items: flex-start; gap: .6rem; margin: 0 0 .9rem; padding-bottom: .9rem; border-bottom: 1px dashed var(--steel-200); font-size: .9rem; color: var(--muted); }
.ann-meta > i { margin-top: .3rem; color: var(--orange); }
.ann-meta strong { display: block; font: 700 .98rem/1.5 var(--display); color: var(--navy-900); }
.ann-reader .dash-name { width: fit-content; max-width: 100%; }
a.dash-name { text-decoration: none; }
a.dash-name:hover { color: var(--orange-text); text-decoration: underline; }
.ann-seen { font-weight: 700; color: #1b6631; }
.ann-unseen { font-weight: 700; color: var(--orange-text); }

/* Writing one: two plain choices for who receives it, the chosen one outlined in navy. */
.ann-hint { display: flex; justify-content: space-between; gap: 1rem; }
.ann-hint .ltr { flex: none; font-variant-numeric: tabular-nums; }
.ann-audience-set > legend { float: none; margin-bottom: .45rem; font-size: inherit; line-height: inherit; }
.ann-audience { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.ann-choice { display: flex; align-items: flex-start; gap: .6rem; min-height: 64px; padding: .75rem .85rem; border: 1.5px solid var(--steel-200); border-radius: 12px; background: var(--white); cursor: pointer; }
.ann-choice:hover { border-color: var(--steel-300); }
.ann-choice:has(input:checked) { border-color: var(--navy-900); background: var(--mist); box-shadow: inset 0 0 0 1px var(--navy-900); }
.ann-choice:has(input:focus-visible) { outline: 3px solid var(--orange); outline-offset: 2px; }
.ann-choice input { flex: none; width: 1.1rem; height: 1.1rem; margin-top: .3rem; accent-color: var(--navy-900); }
.ann-choice input:focus-visible { outline: none; }
.ann-choice strong { display: block; font: 700 1rem/1.5 var(--display); color: var(--navy-900); }
.ann-choice small { display: block; font-size: .86rem; color: var(--muted); }
/* The chosen technicians: a face, a name and a box, each row a target big enough for a thumb. */
.ann-pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .5rem; }
.ann-pick { display: flex; align-items: center; gap: .65rem; min-height: 58px; padding: .5rem .75rem; border: 1.5px solid var(--steel-200); border-radius: 12px; background: var(--white); cursor: pointer; }
.ann-pick:hover { border-color: var(--steel-300); }
.ann-pick:has(input:checked) { border-color: var(--navy-900); background: var(--mist); }
.ann-pick:has(input:focus-visible) { outline: 3px solid var(--orange); outline-offset: 2px; }
.ann-pick input { flex: none; width: 1.15rem; height: 1.15rem; accent-color: var(--navy-900); }
.ann-pick input:focus-visible { outline: none; }
.ann-pick .avatar { width: 38px; height: 38px; font-size: .9rem; }
.ann-pick-name { min-width: 0; font-weight: 700; color: var(--navy-900); overflow-wrap: anywhere; }
.ann-pick-name small { display: block; font-weight: 400; font-size: .82rem; color: var(--muted); }
.ann-reach { display: flex; align-items: baseline; gap: .55rem; margin: 0; padding: .7rem .85rem; border-radius: 10px; background: var(--mist); font-size: .92rem; color: var(--muted); }
.ann-reach > i { color: var(--steel-500); }
.ann-reach strong { color: var(--navy-900); }

/* Admin dashboard: what waits for the manager now. Phone first; the page widens by its own width
   (a container), so folding the side menu gives it room the same way a wider screen does. */
.dash { container: dash / inline-size; }

/* The open requests as a machine's programme panel: a light is on wherever a stage holds requests,
   orange where the manager acts, blue where the technicians do. */
.dash-stages { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: .55rem; margin-bottom: 1rem; padding: .85rem .75rem .75rem; border-radius: var(--radius); background: var(--navy-900); color: var(--white); }
.dash-stages-total { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; padding: 0 .25rem; }
.dash-stages-total h2 { margin: 0; font-size: 1rem; color: var(--white); }
.dash-stages-total strong { font: 900 1.55rem/1 var(--display); }
.dash-stage-label { display: block; padding: 0 .25rem .35rem; font: 700 .8rem/1.4 var(--display); color: var(--steel-300); }
.dash-stage-group.mine .dash-stage-label { color: #ffb27a; }
.dash-stage-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .4rem; }
.dash-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; min-height: 86px; padding: .6rem .15rem .5rem; border-radius: 10px; background: rgba(255, 255, 255, .07); color: var(--white); text-decoration: none; }
.dash-stage:hover, .dash-stage:focus-visible { background: rgba(255, 255, 255, .15); color: var(--white); }
.dash-stage-text { display: flex; flex-direction: column; align-items: center; gap: .3rem; min-width: 0; }
.dash-stage-num { font: 900 1.55rem/1 var(--display); color: rgba(255, 255, 255, .5); }
.dash-stage.lit .dash-stage-num { color: var(--white); }
.dash-stage-word { font: 600 .8rem/1.3 var(--display); color: var(--steel-200); text-align: center; }
.dash-led { width: 9px; height: 9px; flex: none; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.mine .dash-stage.lit .dash-led { background: var(--orange); box-shadow: 0 0 0 3px rgba(244, 122, 31, .25), 0 0 12px rgba(244, 122, 31, .8); }
.theirs .dash-stage.lit .dash-led { background: #7fb3d9; box-shadow: 0 0 0 3px rgba(127, 179, 217, .2); }

.dash-grid { display: grid; gap: 1rem; align-items: start; }
.dash-side { display: grid; gap: 1rem; align-content: start; }
.dash-grid .panel { overflow: hidden; }
.dash-grid .panel + .panel { margin-top: 0; }
.dash .panel-head { min-height: 58px; padding-block: .35rem; padding-inline: 1.15rem .5rem; }
.dash-count { margin-inline-start: .35rem; padding: .05rem .55rem; border-radius: 999px; background: #e1edfb; color: #124a8c; font-size: .8rem; vertical-align: middle; }
.dash-sub { display: block; font-size: .84rem; color: var(--muted); }
.dash-late { color: #a3271d; font-weight: 700; }
.dash-more { display: inline-flex; align-items: center; gap: .35rem; flex: none; min-height: 44px; padding: 0 .65rem; border-radius: 8px; font: 700 .9rem/1 var(--display); text-decoration: none; }
.dash-more i, .dash-foot i, .dash-held i { font-size: .72rem; }
.dash-more:hover { background: var(--mist); }
.dash-empty { margin: 0; padding: 1.1rem 1.15rem; font-size: .95rem; color: var(--muted); }

.dash-row { display: flex; align-items: center; gap: .7rem; min-height: 64px; padding: .6rem 1.15rem; border-bottom: 1px solid var(--mist); color: inherit; text-decoration: none; }
a.dash-row:hover { background: var(--mist); color: inherit; }
.dash-row:focus-visible, .dash-row-main:focus-visible, .dash-foot:focus-visible, .dash-held:focus-visible { outline-offset: -3px; }
.dash-row-main { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.dash-row-main:hover { color: inherit; }
.dash-row-main:hover .dash-name { color: var(--orange-text); }
.dash-row-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.dash-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 1rem/1.5 var(--display); color: var(--navy-900); }
.dash-when { flex: none; font-size: .84rem; color: var(--muted); }
.dash-row-meta { display: block; min-width: 0; font-size: .9rem; color: var(--muted); }
.dash-call, .req-call { flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--steel-200); border-radius: 50%; color: var(--navy-900); text-decoration: none; }
.dash-call:hover, .req-call:hover { border-color: var(--navy-700); background: var(--mist); color: var(--navy-900); }
.dash-visit { display: block; }
/* The second line keeps the place and technician whole; the late tag drops below them when it must. */
.dash-visit .dash-row-top + .dash-row-top { flex-wrap: wrap; row-gap: .25rem; margin-top: .15rem; }
.dash-visit .dash-row-top + .dash-row-top .dash-row-meta { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-visit .rq-tag { flex: none; margin: 0; }
.dash-foot { display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: 48px; font: 700 .9rem/1 var(--display); text-decoration: none; }
.dash-foot:hover { background: var(--mist); }

.dash-row .avatar { width: 42px; height: 42px; font-size: .95rem; }
.dash-tech { flex: 1; min-width: 0; }
.dash-tech .dash-name { display: block; }
.dash-free { display: block; font: 700 .9rem/1.6 var(--display); color: #1b6631; }
.dash-money { flex: none; text-align: left; }
.dash-money .ltr { display: block; font: 800 .95rem/1.4 var(--display); color: var(--navy-900); }
.dash-money.zero .ltr { color: var(--muted); }
.dash-money small { display: block; font-size: .76rem; color: var(--muted); }
.dash-held { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 52px; padding: 0 1.15rem; background: var(--mist); color: var(--navy-900); font: 700 .92rem/1.4 var(--display); text-decoration: none; }
.dash-held strong { font-weight: 900; font-size: 1rem; }
.dash-held:hover { background: var(--steel-200); color: var(--navy-900); }

.dash-month { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: 0; padding: .9rem 1.15rem 1.1rem; }
.dash-month dt { font-weight: 400; font-size: .88rem; color: var(--muted); }
.dash-month dd { margin: 0; font: 900 1.6rem/1.25 var(--display); color: var(--navy-900); }
.dash-month .wide { grid-column: 1 / -1; padding-top: .75rem; border-top: 1px solid var(--mist); }
.dash-month .dash-month-note { font: 400 .88rem/1.6 var(--body); color: var(--muted); }

@container dash (min-width: 700px) {
    .dash-stages { grid-template-columns: auto minmax(0, 3fr) minmax(0, 2fr); gap: 1rem; padding: 1rem 1.1rem; }
    .dash-stages-total { grid-column: auto; flex-direction: column; justify-content: center; gap: .25rem; padding-inline-end: .5rem; }
    .dash-stages-total strong { font-size: 2.7rem; }
    .dash-stage { flex-direction: row; justify-content: flex-start; gap: .75rem; min-height: 74px; padding: .7rem .95rem; }
    .dash-stage-text { align-items: flex-start; gap: .2rem; }
    .dash-stage-num { font-size: 1.9rem; }
    .dash-stage-word { font-size: .88rem; text-align: start; }
    .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-side { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

@container dash (min-width: 940px) {
    .dash-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dash-side { grid-column: auto; grid-template-columns: minmax(0, 1fr); }
}
.dash-chart { min-height: 250px; padding: .85rem 1rem .5rem; }
.dash-chart > .dash-empty { padding: 1rem 0; }

/* Charts drawn by Razor as SVG (Charts.cs, _ColumnChart, _SplitBar). Lengths inside the SVG are percentages
   of the plot; every word sits in HTML around it at its real size. Time runs from right to left, as the page
   reads. Colours come in fixed pairs that differ in lightness as well as hue, and every series is named in
   the legend, so no figure depends on colour alone. */
.chart { container: chart / inline-size; margin: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.chart-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1rem; margin-bottom: .65rem; font-size: .88rem; color: var(--ink); }
.chart-legend > span { display: inline-flex; align-items: center; gap: .4rem; }
.chart-unit { margin-inline-start: auto; font-size: .8rem; color: var(--muted); }
.chart-key { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 3px; }
.chart-body { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); padding-top: .4rem; }
.chart-y { position: relative; }
.chart-y span { position: absolute; inset-inline: 0 .45rem; transform: translateY(50%); text-align: end; font: 600 .74rem/1 var(--display); color: var(--muted); }
.chart-plot { height: 190px; }
.chart-plot svg { display: block; overflow: visible; }
.chart-grid { stroke: var(--steel-200); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-base { stroke: var(--steel-300); stroke-width: 1.5; }
.chart-hit { fill: transparent; cursor: pointer; }
.chart-hit:hover, .chart-hit.on { fill: rgba(27, 63, 115, .08); }
.chart-mark { pointer-events: none; }
.chart-stacked .chart-mark { stroke: var(--white); stroke-width: 2px; }
.chart-x { position: relative; height: 1.4rem; margin-inline-start: 2.6rem; margin-top: .35rem; }
.chart-x span { position: absolute; top: 0; display: none; transform: translateX(50%); white-space: nowrap; font: 600 .74rem/1.2 var(--display); color: var(--muted); }
.chart-x .n { display: block; }
.chart-readout { min-height: 1.5rem; margin: .4rem 0 0; font-size: .86rem; color: var(--ink); }
.chart-empty { margin: 0; padding: 1.75rem 0; text-align: center; color: var(--muted); }
.chart-table { margin-top: .25rem; }
.chart-table summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font: 700 .88rem/1 var(--display); color: var(--navy-700); }
.chart-table .data-table { margin-bottom: .5rem; }
.chart-sm .chart-plot { height: 130px; }
@container chart (min-width: 560px) {
    .chart-plot { height: 240px; }
    .chart-sm .chart-plot { height: 150px; }
    .chart-x .n { display: none; }
    .chart-x .w { display: block; }
}

.c-received { fill: var(--navy-700); background: var(--navy-700); }
.c-completed { fill: var(--orange); background: var(--orange); }
.c-workshop { fill: var(--navy-900); background: var(--navy-900); }
.c-technicians { fill: #8fb0cf; background: #8fb0cf; }
.c-awaiting { fill: var(--orange); background: var(--orange); }
.c-awaiting-bg { fill: var(--orange-tint); }
.chart-key.hatched { background: repeating-linear-gradient(45deg, var(--orange) 0 2.5px, var(--orange-tint) 2.5px 6px); }
.c-done { fill: #2f9a4d; background: #2f9a4d; }
.c-closed { fill: #b8c5d3; background: #b8c5d3; }
.c-open { fill: var(--navy-700); background: var(--navy-700); }

.split { container: split / inline-size; margin: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.split-track { overflow: hidden; border-radius: 8px; background: var(--mist); }
.split-bar { display: block; }
.split-bar rect { stroke: var(--white); stroke-width: 2px; }
.split-legend { display: grid; gap: .4rem; margin: .7rem 0 0; padding: 0; list-style: none; }
.split-legend li { display: flex; align-items: center; gap: .5rem; font-size: .92rem; }
.split-legend strong { margin-inline-start: auto; font: 800 1rem/1 var(--display); color: var(--navy-900); }
.split-share { min-width: 3.2ch; text-align: end; font-size: .84rem; color: var(--muted); }
@container split (min-width: 560px) {
    .split-legend { grid-template-columns: repeat(3, auto); justify-content: start; column-gap: 2rem; }
    .split-legend strong { margin-inline-start: .25rem; }
}

/* The report's analytics: one chart after another, full width, each with its own heading. */
.analytics-item + .analytics-item { margin-top: 1.4rem; padding-top: 1.25rem; border-top: 1px solid var(--steel-200); }
.analytics-item-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-bottom: .75rem; }
.analytics-item h3 { margin: 0; font-size: 1.02rem; }
.analytics-note { margin: .35rem 0 0; font-size: .84rem; color: var(--muted); }
.seg-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--mist); }
.seg-switch a, .seg-switch span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 .9rem; border-radius: 8px; font: 700 .86rem/1 var(--display); color: var(--navy-700); text-decoration: none; }
.seg-switch a:hover { background: var(--white); color: var(--navy-900); }
.seg-switch [aria-current] { background: var(--white); color: var(--navy-900); box-shadow: 0 1px 3px rgba(8, 27, 51, .16); }
.seg-switch [aria-disabled] { color: var(--steel-500); cursor: not-allowed; }

/* Technician finance: the balance and how it was reached, then one card per finished job. */
.money-sum { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--steel-200); background: var(--white); }
.money-sum-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1rem; background: var(--navy-900); color: var(--steel-200); padding: 1rem 1.15rem; }
.money-sum-head strong { font: 900 1.7rem/1.3 var(--display); color: var(--white); }
.money-sum-head small { flex-basis: 100%; font-size: .88rem; color: var(--steel-300); }
.money-sum-period { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .5rem; margin: 0; padding: .55rem 1.15rem; background: var(--mist); color: var(--navy-900); font-weight: 700; font-size: .9rem; border-bottom: 1px solid var(--steel-200); }
.money-sum-period .ltr { color: var(--muted); font-weight: 400; }
.period-bar { margin-bottom: .9rem; }
.period-bar .panel-body { display: grid; gap: .6rem; padding: .75rem 1rem; }
.period-bar .period-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; }
.period-bar .period-presets .btn { padding-inline: .25rem; white-space: nowrap; font-size: .82rem; }
.period-custom summary { cursor: pointer; font-weight: 700; color: var(--navy-700); font-size: .92rem; }
.period-custom .ledger-filter { padding: .6rem 0 0; border-bottom: 0; }
.month-tag { padding: 0 .5rem; border-radius: 999px; background: var(--mist); color: var(--navy-700); font-weight: 700; font-size: .8rem; }
.money-sum-rows { margin: 0; padding: .35rem 1.15rem .6rem; }
.money-sum-rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--mist); }
.money-sum-rows dt { font-weight: 400; color: var(--muted); font-size: .95rem; }
.money-sum-rows dd { margin: 0; font: 800 1rem/1.4 var(--display); color: var(--navy-900); white-space: nowrap; }
.money-sum-rows .minus dd { color: #1b6631; }
.money-sum-rows .plus dd { color: var(--orange-text); }
.money-sum-rows .subtotal { border-top: 1px solid var(--steel-300); background: var(--mist); margin-inline: -1.15rem; padding-inline: 1.15rem; }
.money-sum-rows .subtotal dt { color: var(--navy-900); font-weight: 700; }
.money-sum-rows .subtotal dt small { display: block; font-weight: 400; font-size: .82rem; color: var(--muted); }
.money-sum-rows .total { border-bottom: 0; border-top: 2px solid var(--navy-900); margin-top: .2rem; }
.money-sum-rows .total dt { color: var(--navy-900); font-weight: 800; }
.money-sum-rows .total dd { font-size: 1.15rem; }
.job-list { display: grid; gap: .75rem; margin-top: .9rem; }
.job-card { background: var(--white); border: 1px solid var(--steel-200); border-inline-start: 4px solid #2f9a4d; border-radius: var(--radius); overflow: hidden; }
.job-card.awaiting { border-inline-start-color: var(--orange); }
.job-card.charged { border-inline-start-color: #8a3a05; }
.job-card.free { border-inline-start-color: var(--steel-300); }
.job-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; padding: .8rem 1rem .4rem; }
.job-card-head a { font: 800 1.02rem/1.4 var(--display); color: var(--navy-900); }
.job-card-head time { margin-inline-start: auto; font-size: .85rem; color: var(--muted); }
.job-tag { padding: .1rem .6rem; border-radius: 999px; font: 700 .8rem/1.7 var(--display); white-space: nowrap; }
.job-tag.approved { background: #dff3e3; color: #1b6631; }
.job-tag.awaiting { background: var(--orange-tint); color: var(--orange-text); }
.job-tag.charged { background: #fbe3d3; color: #8a3a05; }
.job-tag.free { background: var(--mist); color: var(--muted); }
.job-lines { margin: 0; padding: 0 1rem .3rem; }
.job-lines > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .4rem 0; border-bottom: 1px solid var(--mist); }
.job-lines > div:last-child { border-bottom: 0; }
.job-lines dt { font-weight: 400; color: var(--muted); font-size: .93rem; }
.job-lines dd { margin: 0; font-weight: 700; color: var(--navy-900); white-space: nowrap; }
.job-lines .mine dt { color: var(--navy-900); font-weight: 700; }
.job-lines .mine dd { font: 800 1.02rem/1.4 var(--display); color: #1b6631; }
.job-lines .mine dd.wait { font-family: inherit; font-size: .9rem; font-weight: 700; color: var(--orange-text); white-space: normal; text-align: end; }
.job-lines .charge dt, .job-lines .charge dd { color: var(--orange-text); }
.job-owed { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--mist); padding: .7rem 1rem; }
.job-owed span { font-weight: 700; color: var(--navy-900); font-size: .95rem; }
.job-owed strong { font: 900 1.2rem/1.3 var(--display); color: var(--navy-900); white-space: nowrap; }
.job-card.awaiting .job-owed { background: var(--orange-tint); }
.job-card.charged .job-owed { background: #fbe3d3; }
.job-card.charged .job-owed strong, .job-card.charged .job-owed span { color: #8a3a05; }
.job-card.free .job-owed span { color: var(--muted); font-weight: 400; }
.job-note { margin: 0; padding: .6rem 1rem .75rem; font-size: .88rem; color: var(--muted); border-top: 1px solid var(--mist); }
.job-paid { display: flex; align-items: center; gap: .45rem; margin: 0; padding: .55rem 1rem; font-size: .9rem; font-weight: 700; border-top: 1px solid var(--mist); }
.job-paid.done { color: #1b6631; background: #f1faf3; }
.job-paid.partly { color: var(--orange-text); }
.job-paid.not-yet { color: var(--muted); font-weight: 400; }
.job-settle { padding-top: .65rem; }
.settle-jobs { margin: 0; padding: 0; border: 0; min-width: 0; }
.settle-jobs legend { float: none; font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.settle-jobs-list { display: grid; gap: .35rem; max-height: 260px; overflow-y: auto; }
.settle-job { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "box num amount" "box date amount"; align-items: center; gap: 0 .6rem; padding: .5rem .65rem; border: 1px solid var(--steel-200); border-radius: 10px; cursor: pointer; margin: 0; }
.settle-job:has(input:checked) { border-color: var(--navy-700); background: var(--mist); }
.settle-job input { grid-area: box; margin: 0; width: 1.2rem; height: 1.2rem; }
.settle-job > span { grid-area: num; font-weight: 700; color: var(--navy-900); text-align: start; }
.settle-job small { grid-area: date; color: var(--muted); font-size: .8rem; text-align: start; }
.settle-job strong { grid-area: amount; font-family: var(--display); color: var(--navy-900); white-space: nowrap; }
input[data-money]:read-only { background: var(--mist); }
.job-actions { padding: .2rem 1rem .85rem; border-top: 1px solid var(--mist); }
.job-actions > .share-form { padding-top: .65rem; }
.job-actions .share-edit { margin-top: 0; }
.account-totals .is-charge { border-color: var(--orange); background: var(--orange-tint); }
.account-totals .is-charge strong { color: var(--orange-text); }
.account-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .5rem; margin-top: .6rem; }
.account-totals div { background: var(--white); border: 1px solid var(--steel-200); border-radius: 12px; padding: .6rem .8rem; min-width: 0; }
.account-totals span { display: block; font-size: .87rem; color: var(--muted); }
.account-totals strong { font: 800 1.08rem/1.4 var(--display); color: var(--navy-900); overflow-wrap: anywhere; }
.account-balance { font: 800 1.08rem/1.5 var(--display); color: var(--navy-900); white-space: nowrap; }
.ledger-filter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; align-items: end; border-bottom: 1px solid var(--steel-200); }
.ledger-filter > * { min-width: 0; }
.ledger-filter .filter-actions { grid-column: 1 / -1; }
.ledger-period { font-size: .86rem; color: var(--muted); }
.ledger-filter:last-child { border-bottom: 0; }
.period-presets { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .45rem; }
.ledger-filter label { font-size: .86rem; color: var(--muted); }
.ledger-row { display: flex; justify-content: space-between; gap: .75rem; padding: .8rem 1.15rem; border-bottom: 1px solid var(--mist); }
.ledger-row:last-of-type { border-bottom: 0; }
.ledger-main { min-width: 0; }
.ledger-main strong { display: block; font-family: var(--display); color: var(--navy-900); }
.ledger-main span:not(.ltr), .ledger-main a { display: block; overflow-wrap: anywhere; }
.ledger-main a.ltr { display: inline-block; }
.ledger-main small, .ledger-amount small { display: block; color: var(--muted); font-size: .84rem; }
.ledger-amount { flex: none; text-align: end; }
.ledger-amount strong { font-family: var(--display); }
.ledger-amount .up { color: var(--orange-text); }
.ledger-amount .down { color: #1b6631; }

.tech-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem; }
.tech-card { display: flex; flex-direction: column; gap: .9rem; background: var(--white); border: 1px solid var(--steel-200); border-radius: var(--radius); padding: 1.1rem; }
.tech-card.off { background: var(--mist); }
.tech-card.off .avatar { filter: grayscale(1); }
.tech-card-head { display: flex; align-items: center; gap: .8rem; }
.tech-card-head .avatar { width: 58px; height: 58px; font-size: 1.35rem; }
.tech-card-name { min-width: 0; }
.tech-card-name h2 { font-size: 1.12rem; margin: 0 0 .2rem; overflow-wrap: anywhere; }
.tech-card-info { margin: 0; }
.tech-card-info > div { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; border-bottom: 1px solid var(--mist); }
.tech-card.off .tech-card-info > div { border-bottom-color: var(--steel-200); }
.tech-card-info dt { font-weight: 400; color: var(--muted); font-size: .92rem; }
.tech-card-info dd { margin: 0; font-weight: 700; text-align: end; min-width: 0; overflow-wrap: anywhere; }
.tech-card-counts { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.tech-card-counts div { background: var(--mist); border-radius: 10px; padding: .45rem; text-align: center; }
.tech-card.off .tech-card-counts div { background: var(--white); }
.tech-card-counts strong { display: block; font: 900 1.35rem/1.3 var(--display); color: var(--navy-900); }
.tech-card-counts span { font-size: .84rem; color: var(--muted); }
.tech-card-counts .tech-card-balance { grid-column: 1 / -1; padding: 0; }
.tech-card-balance a { display: block; padding: .45rem; border-radius: 10px; color: inherit; text-decoration: none; }
.tech-card-balance a:hover { outline: 1.5px solid var(--navy-700); }
.tech-card-balance strong { display: block; overflow-wrap: anywhere; }
.tech-card-foot { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: auto; }
.tech-card-foot .btn, .tech-card-foot .dropdown { width: 100%; white-space: nowrap; }
.dropdown-menu { font-size: 1rem; border-color: var(--steel-200); border-radius: 10px; }
.dropdown-item { display: flex; align-items: center; gap: .6rem; padding: .55rem .9rem; }
.dropdown-item i { width: 18px; text-align: center; }
.dropdown-item:active { background: var(--navy-900); }

/* Request pages (manager and technician): a navy control panel with the cycle knob, then the actions, then the request itself. */
.rq-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "text dial" "quick quick"; gap: 1rem; margin-bottom: 1rem; padding: 1.1rem 1.1rem 1rem; border-radius: 20px; background: var(--navy-900); color: var(--steel-200); box-shadow: 0 18px 36px -26px rgba(8, 27, 51, .9); }
.rq-hero-text { grid-area: text; min-width: 0; }
.rq-hero-ref { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; margin: 0 0 .4rem; font: 700 .9rem/1.5 var(--display); color: var(--steel-300); }
.rq-hero h1 { margin: 0; font-size: clamp(1.45rem, 6vw, 2.1rem); font-weight: 900; line-height: 1.25; color: var(--white); overflow-wrap: anywhere; }
.rq-hero-sub { display: flex; flex-wrap: wrap; gap: .15rem 1.1rem; margin: .45rem 0 0; font-weight: 700; color: var(--steel-200); }
.rq-hero-sub i { margin-inline-end: .4rem; font-size: .85rem; color: var(--orange); }
.rq-hero-age { margin: .2rem 0 0; font-size: .88rem; color: var(--steel-300); }
.rq-hero-dial { grid-area: dial; display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.rq-hero .dial { width: 92px; height: 92px; border-radius: 50%; box-shadow: 0 0 0 6px rgba(255, 255, 255, .04); }
.rq-hero .dial-seg { stroke: rgba(255, 255, 255, .14); }
.rq-hero .dial-seg.done { stroke: var(--steel-300); }
.rq-hero .dial-seg.now { stroke: var(--orange); }
.rq-hero .dial-knob { fill: var(--white); stroke: none; }
/* The knob turns to the request's stage as the page opens, the way a programme knob is set. */
.rq-hero .dial-pointer { transform-origin: 60px 60px; animation: knob-turn 1s cubic-bezier(.2, .8, .25, 1) .2s both; }
@keyframes knob-turn { from { transform: rotate(0deg); } to { transform: rotate(var(--angle)); } }
.rq-hero-dial small { font: 700 .78rem/1.3 var(--display); color: var(--steel-300); white-space: nowrap; }
.rq-quick { grid-area: quick; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .5rem; }
.rq-quick .btn { min-height: 48px; padding-inline: .4rem; white-space: nowrap; }
.btn-glass { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .24); color: var(--white); }
.btn-glass:hover, .btn-glass:active, .btn-glass:focus { background: rgba(255, 255, 255, .2) !important; border-color: rgba(255, 255, 255, .4) !important; color: var(--white) !important; }

.rq-side { margin-bottom: 1rem; }
.rq-card { border-radius: 16px; box-shadow: 0 1px 2px rgba(11, 37, 69, .04), 0 12px 28px -24px rgba(11, 37, 69, .5); }
.rq-card .panel-head { flex-wrap: wrap; row-gap: .35rem; }
.rq-head-meta { font-size: .85rem; color: var(--muted); }
.rq-count { min-width: 1.9rem; padding: 0 .5rem; border-radius: 999px; background: var(--mist); color: var(--navy-700); font: 800 .85rem/1.9 var(--display); text-align: center; }
.rq-ends { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .5rem; }
.action-stack + .rq-ends { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--steel-200); }
.rq-ends .btn { min-height: 44px; padding: .4rem .5rem; font-size: .95rem; white-space: nowrap; }
.rq-share.awaiting { border-color: #f6c9a3; border-top: 4px solid var(--orange); }
.rq-split { display: flex; height: 10px; margin-bottom: .75rem; border-radius: 5px; overflow: hidden; background: #2f9a4d; }
.rq-split span { background: var(--navy-700); }
/* The dots are the bar's legend, so they show only where the bar does. */
.rq-dot { display: none; width: .6rem; height: .6rem; margin-inline-end: .45rem; border-radius: 50%; vertical-align: middle; }
.rq-split + .share-facts .rq-dot { display: inline-block; }
.rq-dot.workshop { background: var(--navy-700); }
.rq-dot.technician { background: #2f9a4d; }

.rq-chip { display: inline-flex; align-items: baseline; gap: .4rem; min-width: 0; padding: .1rem .75rem; border-radius: 999px; background: var(--mist); font: 700 .92rem/1.8 var(--display); color: var(--navy-900); overflow-wrap: anywhere; }
.rq-chip small { font: 400 .8rem var(--body); color: var(--muted); }
.rq-quote { margin: 0; padding: .9rem 1.05rem; border-inline-start: 4px solid var(--orange); border-radius: 12px; background: var(--mist); font-size: 1.1rem; line-height: 1.9; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.rq-label { margin: 1.1rem 0 .25rem; font: 700 .88rem/1.4 var(--body); color: var(--muted); }
.rq-text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.rq-facts { display: grid; gap: 1rem 1.5rem; margin: 0; }
.rq-facts > div { position: relative; min-width: 0; min-height: 2.25rem; padding-inline-start: 3rem; }
.rq-facts dt { font-size: .86rem; font-weight: 400; line-height: 1.5; color: var(--muted); }
.rq-facts dt i { position: absolute; inset-inline-start: 0; top: .1rem; width: 2.25rem; height: 2.25rem; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--mist); color: var(--navy-700); font-size: .92rem; }
.rq-facts dd { margin: 0; font-weight: 700; color: var(--navy-900); overflow-wrap: anywhere; }
.rq-sub { display: block; font-size: .92rem; font-weight: 400; }
.rq-tag { display: inline-block; margin-inline-start: .35rem; padding: 0 .55rem; border-radius: 999px; background: var(--orange-tint); color: var(--orange-text); font: 700 .78rem/1.8 var(--display); vertical-align: middle; }
.rq-tag.late { background: #fbe6e4; color: #a3271d; }
.rq-amount { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .75rem; margin-bottom: .75rem; padding: .8rem 1rem; border-radius: 12px; background: var(--mist); }
.rq-amount > span:first-child { flex-basis: 100%; font-size: .86rem; color: var(--muted); }
.rq-amount strong { font: 900 1.75rem/1.3 var(--display); color: var(--navy-900); }
.rq-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: 0; }
.rq-pair > div { min-width: 0; padding: .5rem .8rem; border: 1px solid var(--steel-200); border-radius: 12px; }
.rq-pair dt { font-size: .84rem; font-weight: 400; color: var(--muted); }
.rq-pair dd { margin: 0; font-weight: 700; color: var(--navy-900); overflow-wrap: anywhere; }
.rq-twin { display: grid; column-gap: 1.5rem; }
.rq-main .photo-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .85rem; }
.rq-main .photo-grid img { border-radius: 12px; transition: transform .2s ease, box-shadow .2s ease; }
.rq-main .photo-grid a:hover img { transform: translateY(-2px); box-shadow: 0 10px 22px -14px rgba(11, 37, 69, .6); }
.rq-log { list-style: none; margin: 0; padding: 0; }
.rq-log li { position: relative; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: .8rem; padding-bottom: 1.15rem; }
.rq-log li::after { content: ""; position: absolute; inset-inline-start: calc(1.125rem - 1px); top: 2.6rem; bottom: .25rem; width: 2px; border-radius: 1px; background: var(--steel-200); }
.rq-log li:last-child { padding-bottom: 0; }
.rq-log li:last-child::after { display: none; }
.rq-log-icon { width: 2.25rem; height: 2.25rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: .88rem; }
.rq-log li:last-child .rq-log-icon { box-shadow: 0 0 0 3px var(--white), 0 0 0 5px currentColor; }
.rq-log strong { display: block; padding-top: .3rem; font-weight: 700; line-height: 1.5; color: var(--navy-900); overflow-wrap: anywhere; }
.rq-log small { display: block; font-size: .85rem; color: var(--muted); }

/* Returning a finished job: the quiet button under the share, the reason wherever it shows, and the
   completions that were sent back, each kept as it was entered. */
.rq-return-act { display: grid; gap: .5rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--steel-200); }
.rq-return-act .btn { min-height: 44px; }
.rq-return-why { display: flex; align-items: baseline; gap: .55rem; margin: .5rem 0 .35rem; font-weight: 700; color: var(--navy-900); overflow-wrap: anywhere; }
.rq-return-why i { color: var(--orange-text); }
.rq-returns { list-style: none; margin: 0; padding: 0; }
.rq-returns li { padding: .85rem 1rem; border: 1px solid var(--steel-200); border-inline-start: 4px solid var(--orange); border-radius: 12px; }
.rq-returns li + li { margin-top: .75rem; }

/* The machine's trip to the workshop: one line per step it reached, the current one lit */
.ws-steps { list-style: none; margin: 0; padding: 0; }
.ws-steps li { position: relative; display: flex; gap: .8rem; padding-bottom: 1rem; }
.ws-steps li:last-child { padding-bottom: 0; }
.ws-steps li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 1.05rem; top: 2.3rem; bottom: .15rem; width: 2px; background: var(--steel-200); }
.ws-dot { flex: none; width: 2.2rem; height: 2.2rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--mist); color: #3d2380; font-size: .9rem; }
.ws-steps li.now .ws-dot { background: #3d2380; color: var(--white); box-shadow: 0 0 0 4px #e4ddf7; }
.ws-steps li.stop .ws-dot { background: #f6e7ea; color: #8a2635; }
.ws-steps strong { display: block; color: var(--navy-900); }
.ws-steps .rq-text { margin: .2rem 0 0; }
.ws-steps small { display: block; margin-top: .15rem; color: var(--muted); }
.ws-team { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.ws-team li { display: flex; align-items: center; gap: .7rem; padding: .55rem .75rem; border: 1px solid var(--steel-200); border-radius: 12px; }
.ws-team li > i { color: #3d2380; }
.ws-team strong, .ws-team small { display: block; }
.ws-team small { color: var(--muted); }
.share-parts { display: grid; gap: .6rem; margin: 0; padding: 0; border: 0; }
.share-parts legend { font-size: 1rem; font-weight: 700; margin-bottom: .1rem; }
.share-parts .form-label { margin-bottom: .2rem; }
.rq-return-top { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.rq-return-top strong { font: 800 1rem/1.5 var(--display); color: var(--navy-900); }
.rq-return-top span { font: 800 1.05rem/1.5 var(--display); color: var(--navy-900); }
.rq-return-meta { display: block; font-size: .85rem; line-height: 1.7; color: var(--muted); }
.rq-returns .share-edit { margin-top: .4rem; }
.rq-returns .share-edit summary { padding: .35rem 0; }

@media (min-width: 576px) {
    .rq-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
    .rq-hero { grid-template-areas: "text dial" "quick dial"; align-items: center; gap: 1.1rem 2rem; padding: 1.5rem 1.75rem; }
    .rq-hero .dial { width: 132px; height: 132px; }
    .rq-quick { display: flex; flex-wrap: wrap; }
    .rq-quick .btn { padding-inline: 1.25rem; }
    .rq-twin { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Two columns only where the main one keeps a readable width. The page's own width decides, so a 1100px
   screen gets them beside the open menu and a 992px one beside the folded menu. */
.rq-frame { container: rq-page / inline-size; }
@container rq-page (min-width: 780px) {
    .rq-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 1rem; align-items: start; }
    .rq-grid.solo { grid-template-columns: minmax(0, 1fr); }
    .rq-main { grid-column: 1; grid-row: 1; }
    .rq-side { grid-column: 2; grid-row: 1; position: sticky; top: 76px; max-height: calc(100vh - 92px); margin-bottom: 0; overflow-y: auto; scrollbar-width: thin; }
}

@media (prefers-reduced-motion: reduce) {
    .rq-hero .dial-pointer { animation: none; }
}

/* ---------- Technician ---------- */
.tech-body { background: var(--mist); padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
.tech-body.no-nav { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
.tech-top { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: .35rem; min-height: 60px; padding: 0 .4rem; background: var(--navy-900); color: var(--white); font-family: var(--display); }
.tech-top strong { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tech-drawer { --bs-offcanvas-width: min(280px, 84vw); background: var(--navy-950); color: var(--steel-200); }
.tech-content { padding: .9rem .9rem 1.25rem; max-width: 640px; margin: 0 auto; }
/* A floating pill: it clears the phone's home indicator and side insets, and the blur keeps labels readable over scrolling content. */
.tech-nav { position: fixed; inset-inline: 0; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 70; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(calc(100% - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)), 640px); margin-inline: auto; padding: .3rem; background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); border: 1px solid var(--steel-200); border-radius: 22px; box-shadow: 0 14px 30px -12px rgba(11, 37, 69, .4), 0 2px 6px rgba(11, 37, 69, .08); }
.tech-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; min-height: 58px; padding: .25rem .1rem; border-radius: 17px; color: var(--muted); text-decoration: none; font: 700 clamp(.72rem, 3.6vw, .8rem)/1.2 var(--display); white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.tech-nav a i { display: flex; align-items: center; justify-content: center; width: 52px; height: 28px; border-radius: 14px; font-size: 1.1rem; transition: background-color .15s ease, color .15s ease, transform .15s ease; }
.tech-nav a:active i { transform: scale(.92); }
.tech-nav a.active { color: var(--navy-900); font-weight: 800; }
.tech-nav a.active i { background: var(--orange); color: var(--navy-950); }
.tech-nav a:focus-visible { outline: 2px solid var(--navy-700); outline-offset: -2px; }
@media (hover: hover) { .tech-nav a:not(.active):hover i { background: var(--mist); } }
/* A phone on its side has little height, so the icon and label share one row. */
@media (orientation: landscape) and (max-height: 500px) {
    .tech-nav a { flex-direction: row; gap: .3rem; min-height: 42px; }
    .tech-nav a i { width: 38px; }
}
.tech-hero { display: grid; gap: .85rem; margin-bottom: 1rem; padding: 1rem 1.1rem; border-radius: 18px; background: var(--navy-900); box-shadow: 0 14px 28px -20px rgba(11, 37, 69, .8); }
.tech-hero-head { display: flex; align-items: center; gap: .9rem; }
.tech-hero .avatar { width: 78px; height: 78px; border: 3px solid var(--orange); font-size: 1.9rem; }
.tech-hero-text { min-width: 0; }
.tech-hero h1 { margin: 0; font-size: 1.15rem; color: var(--white); overflow-wrap: anywhere; }
.tech-hero time { display: block; margin-top: .15rem; color: var(--steel-200); font-size: .92rem; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.mini-stats div { background: rgba(255, 255, 255, .08); border-radius: 10px; padding: .3rem .35rem; text-align: center; }
.mini-stats strong { display: block; font: 800 1.15rem/1.3 var(--display); color: var(--white); }
.mini-stats span { display: block; font-size: .8rem; line-height: 1.3; color: var(--steel-200); }
.tech-hero-balance { display: flex; align-items: center; gap: .6rem; min-height: 48px; padding-top: .75rem; border-top: 1px solid rgba(255, 255, 255, .14); color: var(--steel-200); text-decoration: none; }
.tech-hero-balance:hover { color: var(--white); }
.tech-hero-balance span { flex: 1; }
.tech-hero-balance strong { min-width: 0; font: 800 1.15rem/1.3 var(--display); color: var(--orange-hover); overflow-wrap: anywhere; }
.tech-hero-balance i { font-size: .85rem; }
.tabs-line { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; background: var(--steel-200); border-radius: 12px; padding: .25rem; margin-bottom: .9rem; }
.tabs-line a { text-align: center; padding: .55rem; border-radius: 9px; font-weight: 700; color: var(--navy-900); text-decoration: none; }
.tabs-line a.active { background: var(--white); }
.my-search { margin-bottom: .9rem; }
.my-search-note { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; margin: .55rem .15rem 0; font-size: .9rem; color: var(--muted); }
.my-search-note span { overflow-wrap: anywhere; }
.my-search-note a { font-weight: 700; white-space: nowrap; }

.btn-call { background: var(--orange); color: var(--navy-950); min-height: 64px; font-size: 1.25rem; width: 100%; border: 0; }
.btn-call:hover, .btn-call:focus { background: var(--orange-hover); color: var(--navy-950); }
.sticky-actions { position: fixed; inset-inline: 0; bottom: 0; z-index: 70; background: var(--white); border-top: 1px solid var(--steel-200); padding: .65rem .9rem calc(.65rem + env(safe-area-inset-bottom)); }
.sticky-actions-in { max-width: 640px; margin: 0 auto; display: grid; gap: .5rem; }
.sticky-actions form { margin: 0; }

/* Technician's own account: his workshop badge, how to reach him, then his settings. */
.id-card { position: relative; display: grid; gap: 1rem; margin-bottom: 1rem; padding: 1.7rem 1.15rem 1.15rem; border-radius: 20px; background: var(--navy-900); color: var(--steel-200); box-shadow: 0 18px 36px -26px rgba(8, 27, 51, .9); }
/* The slot a badge hangs from. */
.id-card::before { content: ""; position: absolute; top: .7rem; left: 50%; width: 54px; height: 7px; translate: -50% 0; border-radius: 4px; background: var(--mist); }
.id-card-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-bottom: .9rem; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.id-card-brand { display: inline-flex; align-items: center; gap: .5rem; font: 800 1rem/1.2 var(--display); color: var(--white); }
.id-card-brand .logo-mark { width: 30px; height: 30px; }
.id-card-role { padding: .1rem .7rem; border-radius: 999px; background: rgba(255, 255, 255, .1); font: 700 .82rem/1.8 var(--display); color: var(--steel-200); white-space: nowrap; }
.id-card-person { display: flex; align-items: center; gap: 1rem; }
.id-card-name { min-width: 0; }
.id-card .avatar { border: 3px solid var(--orange); font-size: 2rem; }
.id-card h1 { margin: 0; font-size: clamp(1.3rem, 5.5vw, 1.7rem); font-weight: 900; color: var(--white); overflow-wrap: anywhere; }
.id-card-since { margin: .2rem 0 0; font-size: .92rem; color: var(--steel-300); }
.id-card-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: 0; }
.id-card-stats div { display: flex; flex-direction: column-reverse; padding: .55rem .8rem; border-radius: 12px; background: rgba(255, 255, 255, .08); }
.id-card-stats dt { font-size: .85rem; font-weight: 400; color: var(--steel-200); }
.id-card-stats dd { margin: 0; font: 900 1.6rem/1.2 var(--display); color: var(--white); }
.set-note { display: flex; align-items: baseline; gap: .45rem; margin: 1.1rem 0 0; padding-top: .85rem; border-top: 1px solid var(--mist); font-size: .88rem; color: var(--muted); }
.set-card { overflow: hidden; }
.set-list > * + * { border-top: 1px solid var(--mist); }
.set-row { display: flex; align-items: center; gap: .85rem; width: 100%; min-height: 62px; padding: .65rem 1.15rem; border: 0; background: none; color: var(--navy-900); font: inherit; text-align: start; text-decoration: none; cursor: pointer; }
.set-row:hover { background: var(--mist); color: var(--navy-900); }
/* The card clips its corners, so the focus ring sits inside the row. */
.set-row:focus-visible { outline-offset: -3px; }
.set-icon { flex: none; width: 2.4rem; height: 2.4rem; display: flex; align-items: center; justify-content: center; border-radius: 11px; background: var(--mist); color: var(--navy-700); }
.set-text { flex: 1; min-width: 0; }
.set-text strong { display: block; font-weight: 700; }
.set-text small { display: block; font-size: .85rem; color: var(--muted); }
.set-go { flex: none; font-size: .8rem; color: var(--steel-500); transition: transform .2s ease; }
.set-fold > summary { list-style: none; }
.set-fold > summary::-webkit-details-marker { display: none; }
.set-fold[open] .set-go { transform: rotate(-90deg); }
.set-fold-body { padding: .35rem 1.15rem 1.15rem; }
.set-row.danger { color: #a3271d; }
.set-row.danger .set-icon { background: #fbe6e4; color: #a3271d; }
.set-row.danger:hover { background: #fdf0ef; color: #a3271d; }

/* Announcements (technician). An unread one waits on the home page in the orange strip the manager's
   tasks use; opened, it reads as a letter under a navy band like the home page's own. */
.ann-notice { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; padding: .85rem 1rem; border-radius: var(--radius); background: var(--orange-tint); border: 1px solid #f6c9a3; border-inline-start: 4px solid var(--orange); color: var(--ink); text-decoration: none; }
.ann-notice:hover { border-color: var(--orange); color: var(--ink); }
.ann-notice > i { flex: none; color: var(--orange-text); }
.ann-notice > i:first-child { font-size: 1.25rem; }
.ann-notice > i:last-child { font-size: .85rem; }
.ann-notice-text { flex: 1; min-width: 0; }
.ann-notice-from { display: block; font-size: .82rem; font-weight: 700; color: var(--orange-text); }
.ann-notice strong { display: block; font: 800 1.05rem/1.45 var(--display); color: var(--navy-900); overflow-wrap: anywhere; }
.ann-notice-body { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; font-size: .94rem; overflow-wrap: anywhere; }
.ann-letter { overflow: hidden; }
.ann-letter-head { display: flex; align-items: center; gap: .75rem; padding: .9rem 1.15rem; background: var(--navy-900); color: var(--steel-200); }
.ann-letter-icon { flex: none; width: 2.6rem; height: 2.6rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--orange); color: var(--navy-950); font-size: 1.05rem; }
.ann-letter-from { display: block; font: 700 1rem/1.4 var(--display); color: var(--white); }
.ann-letter-head time { display: block; font-size: .86rem; }
.ann-letter h1 { margin: 0; padding: 1.15rem 1.15rem .35rem; font-size: 1.4rem; overflow-wrap: anywhere; }
.ann-letter .ann-text { padding: 0 1.15rem 1.35rem; }

/* ---------- Larger screens ---------- */
@media (min-width: 768px) {
    .hero-in { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3rem; padding-block: 4rem; }
    .hero-logo { width: clamp(260px, 34vw, 420px); }
    .hero-actions .btn { flex: 0 0 auto; padding-inline: 1.5rem; }
    .about-card { padding: 2.5rem 2.75rem; }
    .tech-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .contact-grid { grid-template-columns: 1fr 1fr; column-gap: 2.5rem; }
    .form-sheet { padding: 2rem; }
    .stat-grid { grid-template-columns: repeat(4, 1fr); }
    /* The request filters in one row: the sheet and its body step aside (display: contents), so search, status and
       technician sit beside «المزيد», and the folded fields take a row of their own under them. */
    .rf-bar { flex-wrap: wrap; gap: .65rem; }
    .rf-sheet, .rf-sheet .offcanvas-body { display: contents; }
    /* Sized so search, status, technician and «المزيد» share one row from 768px. */
    .rf-search { flex-basis: 200px; }
    .rf-bar > .rf-sheet .rf-fields > .rf-field { flex: 0 1 170px; min-width: 140px; }
    .rf-more { order: 1; }
    .rf-extra { order: 2; flex-basis: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .65rem; }
    .ledger-filter { grid-template-columns: repeat(2, minmax(0, 1fr)) auto; }
    .ledger-filter .filter-actions { grid-column: auto; }
    .app-content { padding: 1.5rem 1.5rem 3rem; }
}

@media (min-width: 992px) {
    .auth-shell { flex-direction: row; }
    .auth-brand { flex: 0 0 44%; flex-direction: column; justify-content: center; gap: 1.5rem; padding: 3rem; text-align: center; }
    .auth-brand img { width: min(300px, 62%); height: auto; }
    .auth-brand strong { font-size: 2.3rem; }
    .auth-brand span { font-size: 1.12rem; margin-top: .25rem; }
    .auth-panel { align-items: center; padding: 3rem; }
    .site-links { display: flex; }
    .app-body { display: block; }
    /* The menu is 256px open and 72px folded down to its icons. The manager's choice arrives as a class
       on <html> (see _AdminLayout); without one, laptops start folded (the block after this one). */
    :root { --side-w: 256px; }
    :root.side-rail { --side-w: 72px; }
    .side { position: fixed !important; inset-block: 0; right: 0; width: var(--side-w); display: flex; flex-direction: column; visibility: visible !important; transform: none !important; container: side / inline-size; transition: width .22s ease; }
    .app-main { margin-right: var(--side-w); transition: margin-right .22s ease; }
    .back-link { padding-inline: .75rem 1rem; background: var(--mist); }
    .back-link:hover { background: var(--steel-200); }
    .tech-top .back-link { background: rgba(255, 255, 255, .1); }
    .tech-top .back-link:hover { background: rgba(255, 255, 255, .2); }
    .back-link span { display: inline; }
    .stat-grid.report-stats { grid-template-columns: repeat(3, 1fr); }
    .details-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
    .details-grid > * + * { margin-top: 0; }
}

@media (min-width: 992px) and (max-width: 1279.98px) {
    :root:not(.side-full) { --side-w: 72px; }
}

/* Until the table takes over at 1200px, each request is a card of its own on the page, with a gap between cards,
   so where one request ends and the next begins is plain while scrolling. One column on a phone; two from a tablet
   to a laptop, so a name stays near its status instead of across a wide screen. */
@media (max-width: 1199.98px) {
    .req-list { background: transparent; border: 0; }
    .req-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
    .req-cards .req-card, .req-cards .req-card:last-child { background: var(--white); border: 1px solid var(--steel-200); border-radius: var(--radius); }
    .req-cards .req-card:hover { background: var(--white); border-color: var(--navy-700); }
    .req-cards .req-link::after { border-radius: var(--radius); }
    /* The cards stand on the page here, so the bars above and under them do too. */
    .req-list > .rl-bar, .req-list > .rl-pager { padding-inline: 0; border: 0; }
}
@media (min-width: 768px) and (max-width: 1199.98px) {
    .req-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
    .tech-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; }
    .side-tip { animation: none; }
}

/* ---------- Printing ---------- */
/* Every page prints without the app around it. The reports page (.print-sheet) is laid out for paper: a
   letterhead, a summary and a place to sign that only paper shows (.print-only), and its tables as plain
   ruled tables. Those rules stay inside .print-sheet, so other pages print as they did. */
@media print {
    /* The skip link too: Chrome prints a fixed element on every page, wherever the page ends up putting it. */
    .side, .topbar, .tech-nav, .sticky-actions, .skip-link { display: none !important; }
    html, body, .app-body { background: #fff !important; }
    .app-main { margin: 0 !important; }

    /* No margin above or below the report: Chrome and Edge then have no room for the header and footer
       they add themselves (the date, the page's address) unless someone unticks them in the print dialog.
       Each page's room at top and bottom comes from .print-sheet instead, repeated on every page, and the
       page number sits in the side margin at the bottom corner. Other pages keep the browser's margins. */
    @page report {
        size: A4;
        margin: 0 13mm;
        /* The right-to-left mark keeps "1 من 3" reading the right way round whatever direction the margin takes. */
        @left-bottom { content: "\200F" counter(page) " من " counter(pages); direction: rtl; vertical-align: bottom; text-align: center; padding-bottom: 9mm; font: 8pt "Tajawal", sans-serif; color: #54687f; }
    }
    .app-content:has(> .print-sheet) { max-width: none; padding: 0; }
    .print-sheet { page: report; padding: 14mm 0 16mm; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

    .print-only { display: block; }
    .print-head { display: flex; align-items: center; gap: 4mm; position: relative; padding-bottom: 4mm; border-bottom: 2pt solid var(--navy-900); }
    /* The brand's orange as the first stretch of the rule: a border, since browsers leave backgrounds out of print. */
    .print-head::after { content: ""; position: absolute; bottom: -2pt; right: 0; width: 30mm; border-bottom: 2pt solid var(--orange); }
    .print-head img { width: 17mm; height: 17mm; border-radius: 50%; }
    .print-brand { flex: 1; min-width: 0; }
    .print-brand strong { display: block; font: 800 15pt/1.35 var(--display); color: var(--navy-900); }
    .print-brand > span { font-size: 9pt; color: var(--muted); }
    .print-title { text-align: end; }
    .print-title h1 { margin: 0; font-size: 14pt; }
    .print-title span { font-size: 9.5pt; color: var(--navy-900); }
    .print-meta { margin: 2.5mm 0 7mm; font-size: 8.5pt; color: var(--muted); }

    .print-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 10mm; margin-bottom: 8mm; break-inside: avoid; }
    .print-summary h2, .print-sheet .panel-head h2 { margin: 0 0 1.5mm; font-size: 11pt; }
    .print-summary h2 { padding-bottom: 1.5mm; border-bottom: 1pt solid var(--navy-900); }
    .print-summary h3 { margin: 4mm 0 .5mm; font-size: 9.5pt; color: var(--muted); }
    .print-lines { margin: 0; }
    .print-lines > div { display: flex; align-items: baseline; padding: 1mm 0; }
    /* Dotted leaders carry the eye from each name to its figure. */
    .print-lines dt { flex: 1; display: flex; align-items: baseline; gap: 2mm; font-size: 9.5pt; font-weight: 400; }
    .print-lines dt::after { content: ""; flex: 1; min-width: 6mm; margin-inline-end: 2mm; border-bottom: 1pt dotted var(--steel-300); }
    .print-lines dd { margin: 0; font: 700 10pt/1.3 var(--display); color: var(--navy-900); white-space: nowrap; }

    /* One table under another; a plain block also breaks across pages more predictably than a flex row. */
    .print-sheet .row { display: block; margin: 0; }
    .print-sheet .row > * { padding: 0; }
    .print-sheet .panel { border: 0; border-radius: 0; margin-bottom: 7mm; }
    .print-sheet .panel-head { padding: 0; border: 0; break-after: avoid; }
    .print-sheet .table-responsive { overflow: visible; }
    .print-sheet .data-table th { padding: 1.5mm 2mm; font-size: 8.5pt; color: var(--navy-900); border-bottom: 1pt solid var(--navy-900); }
    .print-sheet .data-table td { padding: 1.5mm 2mm; font-size: 9pt; border-bottom: .5pt solid var(--steel-200); }
    .print-sheet .data-table tbody tr { break-inside: avoid; }
    .print-sheet .data-table tbody strong { font-weight: inherit; }
    /* Once, after the last row, rather than at the foot of every page the table runs onto. Ruled the way
       accounts rule a final total: a line above, a double line below. */
    .print-sheet .data-table tfoot { display: table-row-group; }
    .print-sheet .data-table tfoot td { border-top: 1pt solid var(--navy-900); border-bottom: 2.5pt double var(--navy-900); font-size: 9.5pt; }
    .print-sheet .bar { display: none; }
    /* Charts print as drawn, without what only a screen uses: the grouping switch, the tapped column's line
       and the folded tables. Each chart keeps to one page. */
    .print-sheet .analytics-item { break-inside: avoid; }
    .print-sheet .analytics-item + .analytics-item { margin-top: 5mm; padding-top: 4mm; border-top: .5pt solid var(--steel-200); }
    .print-sheet .analytics-item h3 { font-size: 10pt; }
    .print-sheet .analytics-note { font-size: 8.5pt; }
    .seg-switch, .chart-readout, .chart-table, .chart-hit { display: none !important; }
    .chart-plot { height: 42mm; }
    .chart-x .n { display: none; }
    .chart-x .w { display: block; }
    .print-sheet .table-note { padding: 1.5mm 0 0; border: 0; font-size: 8.5pt; }
    .print-sheet .panel .empty { padding: 2mm 0; text-align: start; font-size: 9pt; }

    .print-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 24mm; margin-top: 16mm; break-inside: avoid; }
    .print-sign div { padding-top: 1.5mm; border-top: 1pt solid var(--navy-900); font: 700 9.5pt/1.4 var(--display); color: var(--navy-900); }
}

.push-device { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .85rem; border-top: 1px solid var(--steel-200); }

/* Confirmation sheet — a bottom sheet on phones, a card on wider screens */
.sheet.swal2-container { padding: 1rem; background: rgba(8, 27, 51, .55) !important; backdrop-filter: blur(3px); }
.sheet .sheet-card { width: min(400px, 100%); padding: 1.75rem 1.5rem 1.5rem; border-radius: 22px; background: var(--white); color: var(--ink); box-shadow: 0 24px 60px rgba(8, 27, 51, .35); }
.sheet .sheet-dial { position: relative; align-items: center; justify-content: center; width: 76px; height: 76px; margin: 0 auto 1rem; border: 0; border-radius: 50%; color: var(--navy-900); background: conic-gradient(var(--orange) 0 25%, var(--navy-700) 25% 70%, var(--steel-200) 70%); }
.sheet .sheet-dial::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--white); box-shadow: 0 0 0 1.5px var(--steel-200); }
.sheet .sheet-dial .swal2-icon-content { position: relative; font-size: 1.45rem; animation: none; }
.sheet .sheet-title { padding: 0; font: 800 1.3rem/1.4 var(--display); color: var(--navy-900); }
.sheet .sheet-text { margin: .4rem 0 0; padding: 0; font: 400 1rem/1.7 var(--body); color: var(--muted); }
.sheet-danger .sheet-dial { color: #a3271d; background: conic-gradient(#a3271d 0 70%, var(--steel-200) 70%); }
.sheet .sheet-fields { display: grid; gap: .85rem; margin-top: .85rem; text-align: start; }
.sheet .sheet-fields .form-label { font-weight: 700; color: var(--navy-900); }
.sheet .sheet-label { justify-content: flex-start; margin: 1rem 0 .4rem; font: 700 1rem/1.5 var(--body); color: var(--navy-900); }
.sheet .sheet-input { width: 100%; min-height: 104px; margin: 0; padding: .7rem .85rem; border: 1.5px solid var(--steel-200); border-radius: 10px; box-shadow: none; font: 400 1rem/1.6 var(--body); color: var(--ink); }
.sheet .sheet-input:focus { border-color: var(--navy-700); box-shadow: 0 0 0 3px rgba(27, 63, 115, .15); }
.sheet .sheet-problem { justify-content: flex-start; margin: .75rem 0 0; padding: .6rem .8rem; border-radius: 10px; background: #fdf0ef; color: #a3271d; font-weight: 700; }
.sheet .sheet-actions { display: grid !important; grid-template-columns: 1fr 1fr; gap: .6rem; width: 100%; margin: 1.35rem 0 0; }
.sheet .sheet-actions .btn { min-height: 48px; margin: 0; font-family: var(--display); font-weight: 700; }
.sheet .sheet-actions .btn:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
/* A message on the same sheet: one wide button, and the dial coloured by what it says. */
.sheet-single .sheet-actions { grid-template-columns: 1fr; }
.sheet-error .sheet-dial { color: #a3271d; background: conic-gradient(#a3271d 0 70%, var(--steel-200) 70%); }
.sheet-warning .sheet-dial { color: var(--orange-text); background: conic-gradient(var(--orange) 0 70%, var(--steel-200) 70%); }
.sheet-success .sheet-dial { color: #1b6631; background: #2e8a4b; }
.sheet .sheet-number { display: grid; justify-items: center; gap: .55rem; margin-top: .9rem; padding: .85rem .75rem .75rem; border: 1.5px dashed var(--steel-300); border-radius: 14px; background: var(--mist); }
.sheet .sheet-number-value { font: 900 1.6rem/1.2 var(--display); color: var(--navy-900); letter-spacing: .02em; user-select: all; }
.sheet .sheet-copy { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .35rem 1.1rem; border: 1.5px solid var(--steel-200); border-radius: 999px; background: var(--white); color: var(--navy-900); font: 700 .95rem/1 var(--display); transition: background-color .15s, border-color .15s, color .15s; }
.sheet .sheet-copy:hover { border-color: var(--navy-700); }
.sheet .sheet-copy:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.sheet .sheet-copy.copied { border-color: #2e8a4b; background: #dff3e3; color: #1b6631; }
.copy-field { position: fixed; top: 0; left: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; font-size: 16px; }

.sheet-in { animation: sheet-rise .26s cubic-bezier(.2, .8, .25, 1); }
.sheet-out { animation: sheet-sink .16s ease-in forwards; }

/* SweetAlert waits for the closing animation to end, so it needs its own name: reusing the opening one never restarts. */
@keyframes sheet-rise {
    from { opacity: 0; transform: translateY(28px); }
}

@keyframes sheet-sink {
    to { opacity: 0; transform: translateY(28px); }
}

@keyframes sheet-rise-full {
    from { transform: translateY(100%); }
}

@keyframes sheet-sink-full {
    to { transform: translateY(100%); }
}

@media (max-width: 575.98px) {
    .sheet .sheet-actions { grid-template-columns: 1fr; }
    .sheet-docked.swal2-container { padding: 0; }
    .sheet-docked .sheet-card { width: 100%; padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; }
    .sheet-docked .sheet-in { animation-name: sheet-rise-full; }
    .sheet-docked .sheet-out { animation-name: sheet-sink-full; }
}

/* A short note under the top bar that goes away by itself (app.js note). The orange line runs out
   with its time and stops while a finger or the pointer rests on the note. */
.note-region { position: fixed; top: 0; right: 0; left: 0; z-index: 1050; display: flex; justify-content: center; padding: .6rem .75rem 0; pointer-events: none; }
.note-region.bare { padding-top: calc(.6rem + env(safe-area-inset-top)); }
.note { position: relative; display: flex; align-items: center; gap: .75rem; width: min(440px, 100%); padding: .75rem .85rem .85rem 1.1rem; overflow: hidden; border: 1px solid var(--steel-200); border-radius: 16px; background: var(--white); color: var(--navy-900); box-shadow: 0 18px 44px rgba(8, 27, 51, .24), 0 2px 6px rgba(8, 27, 51, .08); pointer-events: auto; touch-action: none; user-select: none; cursor: pointer; animation: note-drop .3s cubic-bezier(.2, .8, .25, 1); }
.note-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #2e8a4b; color: var(--white); font-size: .95rem; }
.note-text { min-width: 0; font: 700 .98rem/1.55 var(--display); }
.note-timer { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; background: var(--orange); transform-origin: right; animation: note-time var(--note-time, 4s) linear forwards; }
.note:hover .note-timer, .note.held .note-timer { animation-play-state: paused; }
.note.note-out { animation: note-lift .2s ease-in forwards; }

@keyframes note-drop {
    from { opacity: 0; transform: translateY(-18px); }
}

@keyframes note-lift {
    to { opacity: 0; transform: translateY(calc(-100% - 1rem)); }
}

@keyframes note-time {
    to { transform: scaleX(0); }
}

@media (prefers-reduced-motion: reduce) {
    .sheet-in, .sheet-out { animation: none; }
    .note, .note.note-out { animation: none; }
}

/* A free job the owner pays the technician for, and a balance the workshop owes him: blue, apart from the
   green of a split, the orange of what he owes and the brown of a charge. */
.share-badge.paid, .job-tag.paid { background: #e1eefa; color: #164f86; }
.job-card.paid { border-inline-start-color: #2f6fb0; }
.job-card.paid .job-owed { background: #eef5fc; }
.job-card.paid .job-owed strong, .job-card.paid .job-owed span { color: #164f86; }
.job-lines .pay dt, .job-lines .pay dd, .share-facts .is-pay dt, .share-facts .is-pay dd { color: #164f86; }
.share-rest.is-pay { background: #eef5fc; color: #164f86; }
.share-rest.is-pay strong { color: #164f86; }
.account-balance.is-owed, .dash-money.is-owed .ltr, .account-totals .is-owed strong { color: #164f86; }
.account-totals .is-owed { border-color: #2f6fb0; background: #eef5fc; }
.balance-band strong.is-owed, .money-sum-head strong.is-owed, .tech-hero-balance strong.is-owed { color: #9fd0ff; }
.share-kind { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.share-kind legend { float: none; width: 100%; font-size: 1rem; font-weight: 700; margin-bottom: .15rem; }
.share-kind label { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; cursor: pointer; font-weight: 700; color: var(--navy-900); }
.share-kind input { margin: 0; width: 1.15rem; height: 1.15rem; }
.dash-held + .dash-held { border-top: 1px solid var(--steel-200); }
.dash-held strong.is-owed { color: #164f86; }
.balance-band small strong.is-owed { font-size: 1rem; }
