/* NaqlThaqeel design system (Phase 2). Started from the approved prototype (06_Documentation/Django_Mockups_2026-10-19).
   Tokens from the owner-approved brand layer (Brand_Assets/app_files/nt-brand.css). Logical properties only (RTL + LTR). */
@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap");

:root {
  /* brand (logo pack) */
  --nt-navy: #112c3d; --nt-navy-2: #183a50; --nt-navy-3: #24495f; --nt-navy-deep: #0b1f2c;
  --nt-orange: #f15939; --nt-orange-d: #d9472a; --nt-orange-dd: #b93a20; --nt-orange-soft: #fdebe6; --nt-orange-faint: #fff6f3;
  --nt-orange-text: var(--nt-orange-dd); --nt-orange-text-strong: #9c2f19;  /* 4.5:1 on every light surface */
  --nt-sand: #d1cbc1; --nt-sand-l: #f4f1ec;
  /* surfaces and text (redesign UI-1: cooler neutral background, white cards) */
  --nt-bg: #f3f5f7; --nt-surface: #ffffff; --nt-surface-2: #f8f9fb;
  --nt-line: #e3e7eb; --nt-line-2: #d3d9df; --nt-text: #102a3a; --nt-heading: #112c3d; --nt-muted: #5e6c76; --nt-faint: #626f79;
  /* status */
  --nt-success: #16784a; --nt-success-soft: #e4f4ea; --nt-danger: #b42318; --nt-danger-soft: #fdecea;
  --nt-warning: #b45309; --nt-warning-soft: #fff3e0; --nt-info: #1f5f8b; --nt-info-soft: #e7f1f8;
  --nt-violet: #6d4bd8; --nt-violet-soft: #efeafd;
  /* shape, depth, motion */
  --nt-radius: 16px; --nt-radius-sm: 10px;
  --nt-shadow: 0 1px 2px rgba(16, 42, 58, .06), 0 2px 8px rgba(16, 42, 58, .05);
  --nt-shadow-lg: 0 18px 44px rgba(16, 42, 58, .16);
  --nt-focus: 0 0 0 3px rgba(241, 89, 57, .35);
  --nt-ease: cubic-bezier(.2, .7, .2, 1);
  --nt-font: "Cairo", "Segoe UI", Tahoma, system-ui, sans-serif;
  --nt-sidebar: 264px; --nt-sidebar-mini: 76px; --nt-head: 64px;
}
/* Dark theme tokens (UI-1). <html data-theme> is the user's choice: "dark", "light" or "auto" (follow the device: the
   same rules apply through prefers-color-scheme, generated at the end of this file by scripts/dark_auto.py). */
:root[data-theme="dark"] {
  --nt-bg: #0d1820; --nt-surface: #13232e; --nt-surface-2: #172a37;
  --nt-line: #22384a; --nt-line-2: #2c475b; --nt-text: #e6edf2; --nt-heading: #f1f5f8; --nt-muted: #9fb0bc; --nt-faint: #8ea1ad;
  --nt-orange-soft: rgba(241, 89, 57, .16); --nt-orange-faint: rgba(241, 89, 57, .08); --nt-sand-l: #1a2d3a;
  --nt-orange-text: #ff8a6b; --nt-orange-text-strong: #ffa58c;
  --nt-success: #4cc38a; --nt-danger: #ff7b70; --nt-warning: #f2b45a; --nt-info: #7dbbe6; --nt-violet: #a990f2;
  --nt-success-soft: rgba(22, 120, 74, .22); --nt-danger-soft: rgba(180, 35, 24, .22); --nt-warning-soft: rgba(180, 83, 9, .22);
  --nt-info-soft: rgba(31, 95, 139, .26); --nt-violet-soft: rgba(109, 75, 216, .24);
  --nt-shadow: 0 1px 2px rgba(0, 0, 0, .3); --nt-shadow-lg: 0 18px 44px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--nt-font); font-size: 15px; line-height: 1.6; color: var(--nt-text); background: var(--nt-bg); }
a { color: var(--nt-orange-text); }
a:hover { color: var(--nt-orange-text-strong); }
:focus-visible { outline: none; box-shadow: var(--nt-focus); }
/* step 8: links and buttons show an outline (it never competes with a component's own shadow) */
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgba(241, 89, 57, .75) !important; outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; }
small { font-size: 12.5px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--nt-navy); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }
[data-icon] > svg { width: 1.2em; height: 1.2em; flex: none; vertical-align: -.2em; }
.card__head > [data-icon] { display: inline-flex; color: var(--nt-heading); }
.num, .ltr { direction: ltr; unicode-bidi: isolate; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--nt-muted); }

/* ---------- app shell (redesign UI-2: collapsible sidebar, header with menus, phone drawer) ---------- */
.shell { min-height: 100vh; }
.sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--nt-sidebar); z-index: 40; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--nt-navy) 0%, var(--nt-navy-deep) 100%); color: #dfe7ec; transition: width .28s var(--nt-ease); }
.sidebar__brand { height: var(--nt-head); flex: none; display: flex; align-items: center; padding-inline: 18px; border-bottom: 1px solid rgba(255,255,255,.07); overflow: hidden; }
.sidebar__brand img { height: 30px; width: auto; }
.sidebar__brand .mini { display: none; height: 34px; }
.sidebar__brand a, .topbar__brand, .auth__brand a { display: inline-flex; border-radius: 8px; }
.sidebar__user { flex: none; margin: 14px 12px 6px; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.06); display: flex; gap: 10px; align-items: center;
  overflow: hidden; white-space: nowrap; }
.sidebar__user div { min-width: 0; }
.sidebar__user b { display: block; font-size: 13.5px; color: #fff; overflow: hidden; text-overflow: ellipsis; }
.sidebar__user small { color: #9fb3bf; font-size: 12px; }
/* the card is a link to «My profile» (2026-10-23): hover / focus / current page, and a small arrow at the far end */
a.sidebar__user { color: inherit; text-decoration: none; transition: background .2s var(--nt-ease); }
a.sidebar__user:hover, a.sidebar__user[aria-current="page"] { background: rgba(255,255,255,.12); }
a.sidebar__user:focus-visible { outline: none; box-shadow: var(--nt-focus); }
.sidebar__user-go { margin-inline-start: auto; display: inline-flex; color: #9fb3bf; opacity: .7; transition: opacity .2s, transform .2s var(--nt-ease); }
.sidebar__user-go svg { width: 16px; height: 16px; }
a.sidebar__user:hover .sidebar__user-go { opacity: 1; transform: translateX(-2px); }
[dir="ltr"] a.sidebar__user:hover .sidebar__user-go { transform: translateX(2px); }
#company, #alerts { scroll-margin-top: calc(var(--nt-head) + 16px); }
.avatar { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--nt-orange), #ff8a5c); color: #fff; display: grid; place-items: center;
  font-weight: 800; flex: none; }
.sidebar .nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 6px 0 12px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.nav-group { padding: 14px 22px 6px; font-size: 11.5px; font-weight: 700; color: #7f97a5; white-space: nowrap; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; margin: 2px 12px; padding: 9px 12px; min-height: 42px; border-radius: 12px; color: #dfe7ec;
  text-decoration: none; font-weight: 600; white-space: nowrap; transition: background .18s, color .18s; }
.nav a > span:first-of-type { overflow: hidden; text-overflow: ellipsis; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a[aria-current="page"] { background: rgba(241,89,57,.16); color: #fff; }
.nav a[aria-current="page"]::before { content: ""; position: absolute; inset-block: 9px; inset-inline-start: -12px; width: 4px; border-radius: 4px; background: var(--nt-orange); }
.nav svg { width: 20px; height: 20px; flex: none; color: #b7c7d1; }
.nav a[aria-current="page"] svg { color: var(--nt-orange); }
.nav .tag { margin-inline-start: auto; font-size: 11px; background: var(--nt-orange); color: #fff; border-radius: 999px; padding: 0 8px; }
.nav-dot { display: none; }
.sidebar__foot { flex: none; padding: 10px 12px 14px; border-top: 1px solid rgba(255,255,255,.07); }
.side-collapse { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 12px; min-height: 42px; border: 0; border-radius: 12px; background: transparent;
  color: #9fb3bf; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.side-collapse:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-collapse svg { width: 20px; height: 20px; flex: none; transition: transform .28s var(--nt-ease); }
[dir="rtl"] .side-collapse svg { transform: scaleX(-1); }
.nt-tip { position: fixed; z-index: 90; background: var(--nt-navy-deep); color: #fff; font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 8px;
  pointer-events: none; white-space: nowrap; box-shadow: var(--nt-shadow-lg); animation: nt-fade .15s ease both; }
.nt-tip[hidden] { display: none; }
@keyframes nt-fade { from { opacity: 0; } to { opacity: 1; } }

.main { margin-inline-start: var(--nt-sidebar); min-height: 100vh; display: flex; flex-direction: column; transition: margin .28s var(--nt-ease); }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--nt-head); display: flex; align-items: center; gap: 12px; padding-inline: 24px;
  background: color-mix(in srgb, var(--nt-surface) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--nt-line); }
.topbar__title { min-width: 0; font-size: 17px; font-weight: 800; color: var(--nt-heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__end { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.topbar__end form { margin: 0; }
.topbar__brand, .icon-btn.topbar__burger { display: none; }
.topbar__brand img { width: 34px; height: 34px; }
.content { padding: 22px 24px 96px; width: 100%; max-width: 1440px; }

.lang-switch { display: inline-flex; border: 1px solid var(--nt-line-2); border-radius: 999px; overflow: hidden; background: var(--nt-surface); }
.lang-switch button { border: 0; background: none; font: inherit; font-weight: 700; font-size: 13px; padding: 4px 12px; min-height: 34px; cursor: pointer; color: var(--nt-muted); }
.lang-switch button[aria-pressed="true"] { background: var(--nt-navy); color: #fff; }

/* header: theme switch, user chip, menus ([data-pop] in nt.js) */
.when-light { display: contents; }
.when-dark, :root[data-theme="dark"] .when-light { display: none; }
:root[data-theme="dark"] .when-dark { display: contents; }
.user-chip { display: flex; align-items: center; gap: 10px; min-height: 44px; padding-block: 4px; padding-inline: 5px 10px; border: 1px solid var(--nt-line); border-radius: 14px;
  background: var(--nt-surface); color: var(--nt-text); font: inherit; cursor: pointer; text-align: start; transition: background .15s, border-color .15s; }
.user-chip:hover { background: var(--nt-surface-2); border-color: var(--nt-line-2); }
.user-chip .avatar { width: 34px; height: 34px; border-radius: 50%; font-size: 14px; }
.user-chip__text b { display: block; font-size: 13px; line-height: 1.25; white-space: nowrap; color: var(--nt-heading); max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.user-chip__text small { display: block; color: var(--nt-muted); font-size: 11.5px; line-height: 1.3; }
.user-chip > svg { width: 16px; height: 16px; color: var(--nt-muted); transform: rotate(-90deg); transition: transform .18s var(--nt-ease); }
.user-chip[aria-expanded="true"] > svg { transform: rotate(90deg); }  /* the chevron points up while the menu is open */
.pop-wrap { position: relative; }
.pop { position: absolute; inset-block-start: calc(100% + 8px); inset-inline-end: 0; z-index: 70; background: var(--nt-surface); border: 1px solid var(--nt-line);
  border-radius: 16px; box-shadow: var(--nt-shadow-lg); animation: nt-pop-in .18s var(--nt-ease) both; }
.pop[hidden] { display: none; }
@keyframes nt-pop-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.menu { padding: 6px; min-width: 290px; }
.menu form { margin: 0; }
.menu a, .menu button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 10px; min-height: 44px; border: 0; background: none; border-radius: 10px;
  cursor: pointer; color: var(--nt-text); text-align: start; font: inherit; font-weight: 600; text-decoration: none; }
.menu a:hover, .menu button:hover { background: var(--nt-surface-2); color: var(--nt-heading); }
.menu b { display: block; font-size: 14px; color: var(--nt-heading); }
.menu small { display: block; color: var(--nt-muted); font-size: 12px; font-weight: 500; }
.menu svg { width: 19px; height: 19px; flex: none; color: var(--nt-muted); }
.menu .ic { width: 36px; height: 36px; border-radius: 10px; }
.menu .ic svg { color: inherit; }
.menu hr { border: 0; border-top: 1px solid var(--nt-line); margin: 6px 4px; }
.menu__who { display: flex; gap: 10px; align-items: center; padding: 8px 10px; }
.menu__who .avatar { border-radius: 50%; }
.scrim { display: none; }

.tabbar { display: none; }

/* collapsed rail (desktop only); labels stay readable by screen readers */
@media (min-width: 1024px) {
  .is-mini .sidebar { width: var(--nt-sidebar-mini); }
  .is-mini .main { margin-inline-start: var(--nt-sidebar-mini); }
  .is-mini .sidebar__brand { justify-content: center; padding: 0; }
  .is-mini .sidebar__brand .full { display: none; }
  .is-mini .sidebar__brand .mini { display: block; }
  .is-mini .sidebar__user { justify-content: center; padding: 8px 0; margin-inline: 10px; }
  .is-mini .sidebar__user div, .is-mini .sidebar__user-go { display: none; }
  .is-mini .nav-group { height: 10px; padding: 0; overflow: hidden; color: transparent; }
  .is-mini .nav a { justify-content: center; padding-inline: 0; margin-inline: 10px; }
  .is-mini .nav a::before { inset-inline-start: -10px; }
  .is-mini .nav a > span, .is-mini .side-collapse span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .is-mini .nav-dot { display: block; position: absolute; inset-block-start: 7px; inset-inline-end: 12px; width: 9px; height: 9px; border-radius: 50%;
    background: var(--nt-orange); box-shadow: 0 0 0 2px var(--nt-navy); }
  .is-mini .side-collapse { justify-content: center; padding-inline: 0; }
  .is-mini .side-collapse svg { transform: scaleX(-1); }
  [dir="rtl"] .is-mini .side-collapse svg { transform: none; }
}

/* tablet and phone: the sidebar becomes a slide-in drawer, opened by the header button or "More" in the bottom bar */
@media (max-width: 1023px) {
  .sidebar { width: min(86vw, 300px); z-index: 65; transform: translateX(100%); visibility: hidden; transition: transform .28s var(--nt-ease), visibility 0s linear .28s; }
  [dir="ltr"] .sidebar { transform: translateX(-100%); }
  body.menu-open .sidebar { transform: none; visibility: visible; box-shadow: var(--nt-shadow-lg); transition: transform .28s var(--nt-ease); }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; z-index: 60; background: rgba(8, 20, 28, .45); backdrop-filter: blur(2px); animation: nt-fade .2s ease both; }
  .sidebar__foot { display: none; }
  .main { margin-inline-start: 0; }
  .topbar { padding-inline: 14px; gap: 10px; }
  .icon-btn.topbar__burger { display: inline-grid; }
  .topbar__brand { display: inline-flex; }
  .content { padding: 14px 16px 104px; }
  .page-head { display: block !important; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset-inline: 0; bottom: 0; z-index: 40; background: var(--nt-surface);
    border-top: 1px solid var(--nt-line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(17,44,61,.08); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; min-height: 52px; font-size: 11.5px; font-weight: 700;
    color: var(--nt-muted); text-decoration: none; border-radius: 10px; }
  .tabbar a[aria-current="page"] { color: var(--nt-orange-text); }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .tabbar__add span.plus { width: 46px; height: 46px; margin-top: -18px; border-radius: 50%; background: var(--nt-orange-d); color: #fff;
    display: grid; place-items: center; box-shadow: 0 8px 18px rgba(217,71,42,.35); }
}
@media (max-width: 760px) {
  .topbar { padding-inline: 10px; gap: 8px; background: var(--nt-surface); backdrop-filter: none; }  /* no containing block: the menu sheets are fixed */
  .topbar__title, .topbar .hide-sm, .user-chip__text, .user-chip > svg { display: none; }
  .user-chip { padding: 3px; border-radius: 50%; min-height: 0; }
  .topbar__end { gap: 6px; }
  /* menus drop down under the header, by the button that opened them (owner's request 2026-10-23) */
  .pop.menu { position: fixed; inset-inline: 10px; inset-block: calc(var(--nt-head) + 6px) auto; min-width: 0;
    max-height: calc(100dvh - var(--nt-head) - 90px - env(safe-area-inset-bottom)); overflow-y: auto; }
  /* «+ New» opened from the bottom bar rises from it, just above the bar (owner's request 2026-10-23) */
  .pop.menu.is-from-bottom { inset-block: auto calc(76px + env(safe-area-inset-bottom)); animation-name: nt-pop;
    max-height: calc(100dvh - var(--nt-head) - 96px - env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .sidebar, .main, .side-collapse svg { transition: none; } .pop, .nt-tip, body.menu-open .scrim { animation: none; } }

/* ---------- page head / hero ---------- */
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
/* the reveal animation leaves a transform on the head: keep its menus (share) above the cards that follow */
.page-head:has(.pop:not([hidden])) { position: relative; z-index: 30; }
.page-head h1 { font-size: 24px; font-weight: 800; }
.page-head p { margin: 4px 0 0; color: var(--nt-muted); }
.page-head__actions { margin-inline-start: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.hero { position: relative; overflow: hidden; isolation: isolate; background: var(--nt-navy); color: #fff; border-radius: 18px; padding: 22px 24px; box-shadow: var(--nt-shadow-lg); margin-bottom: 18px; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 300'%3E%3Cpath d='M0 0H330C190 40 70 140 0 292Z' fill='%23F15939' fill-opacity='.16'/%3E%3Cpath d='M268 2C160 48 64 132 14 250' fill='none' stroke='%23F15939' stroke-width='9' stroke-linecap='round' stroke-opacity='.55'/%3E%3C/svg%3E") left top/340px 255px no-repeat; }
[dir="ltr"] .hero::before { background-position: right top; transform: scaleX(-1); }
.hero__kicker { font-size: 13px; color: #f7b8a8; font-weight: 700; }
.hero h1 { font-size: 26px; font-weight: 800; margin-top: 2px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hero .chip { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.2); }
.hero__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.hero__stat { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 10px 14px; }
.hero__stat small { display: block; color: #c9d4da; font-weight: 600; }
.hero__stat b { font-size: 20px; font-weight: 800; }
.hero__stat--accent { background: var(--nt-orange-d); border-color: var(--nt-orange-d); }
.plate { display: inline-flex; align-items: stretch; border: 2px solid #fff; border-radius: 8px; overflow: hidden; background: var(--nt-surface); color: var(--nt-heading); font-weight: 800; }
.plate__band { background: #2f6db5; color: #fff; font-size: 10px; display: flex; flex-direction: column; justify-content: center; padding: 0 6px; line-height: 1.2; }
.plate__no { padding: 2px 10px; letter-spacing: 1px; }

/* ---------- surfaces ---------- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1023px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.card { background: var(--nt-surface); border: 1px solid var(--nt-line); border-radius: var(--nt-radius); box-shadow: var(--nt-shadow); }
.card__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--nt-line); }
.card__head h2, .card__head h3 { font-size: 16px; font-weight: 800; }
.card__head .end { margin-inline-start: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* rows hidden by script (removed lines, unused auto quarry rows) stay hidden in the phone card layout too */
.tbl tr[hidden] { display: none !important; }
/* shift page: a line whose bin was ticked is hidden; this note offers "Undo" until the shift is saved */
.tbl tr.row-removed > td { font-size: 13.5px; padding-block: 8px; }
.tbl tr.row-removed .btn { margin-inline-start: 10px; }
/* a row reached by a link (#entry-12 from the truck statement): below the sticky top bar, highlighted */
.tbl tr:target { scroll-margin-top: calc(var(--nt-head) + 16px); }
.tbl tr:target > td { background: var(--nt-warning-soft); }
.card__body { padding: 16px 18px; }
.kpi { padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; position: relative; }
.kpi small { color: var(--nt-muted); font-weight: 700; }
.kpi b { font-size: 22px; font-weight: 800; }
.kpi .hint { font-size: 12px; color: var(--nt-muted); }
.kpi--pos b { color: var(--nt-success); }
.kpi--neg b { color: var(--nt-danger); }
.kpi--accent { border-color: var(--nt-orange); box-shadow: inset 0 3px 0 var(--nt-orange), var(--nt-shadow); }
.kpi--dirty { outline: 2px dashed var(--nt-orange); outline-offset: -4px; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 16px; border-radius: 12px; border: 1px solid var(--nt-line-2);
  background: var(--nt-surface); color: var(--nt-heading); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--nt-heading); color: var(--nt-heading); }
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--nt-orange-d); border-color: var(--nt-orange-d); color: #fff; box-shadow: 0 8px 18px rgba(217,71,42,.22); }
.btn--primary:hover { background: var(--nt-orange-dd); border-color: var(--nt-orange-dd); color: #fff; }
.btn--navy { background: var(--nt-navy); border-color: var(--nt-heading); color: #fff; }
.btn--navy:hover { background: var(--nt-navy-2); color: #fff; }
.btn--ghost { background: transparent; border-color: transparent; }
.btn--danger { color: var(--nt-danger); border-color: #f1c3be; }
.btn--sm { min-height: 34px; padding: 4px 12px; font-size: 13.5px; border-radius: 10px; }
.btn--block { width: 100%; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--nt-line-2); background: var(--nt-surface); color: var(--nt-heading); cursor: pointer; }
.icon-btn svg { width: 20px; height: 20px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; border: 1px solid var(--nt-line-2); background: var(--nt-surface); font-size: 13px; font-weight: 700; color: var(--nt-heading); text-decoration: none; }
button.chip { cursor: pointer; font-family: inherit; min-height: 34px; }
.chip.is-on, .chip[aria-pressed="true"] { background: var(--nt-navy); border-color: var(--nt-heading); color: #fff; }
.chip--warn { background: var(--nt-warning-soft); border-color: #f5d0a2; color: var(--nt-warning); }
.chip--ok { background: var(--nt-success-soft); border-color: #b6dcc6; color: var(--nt-success); }
.chip--bad { background: var(--nt-danger-soft); border-color: #f1c3be; color: var(--nt-danger); }
.badge { display: inline-block; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--nt-sand-l); color: var(--nt-heading); border: 1px solid var(--nt-line); }

.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: 14px; }
.field .req { color: var(--nt-danger); }
.field .help { font-size: 12.5px; color: var(--nt-muted); }
.field .err { font-size: 12.5px; color: var(--nt-danger); font-weight: 700; }
.input, select.input, textarea.input { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--nt-line-2); border-radius: 10px; background: var(--nt-surface); font: inherit; color: var(--nt-text); }
.input:focus { border-color: var(--nt-orange-d); box-shadow: var(--nt-focus); outline: none; }
.input[aria-invalid="true"] { border-color: var(--nt-danger); background: var(--nt-danger-soft); }
.input--money { text-align: end; direction: ltr; font-variant-numeric: tabular-nums; }
.search { position: relative; }
.search svg { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--nt-muted); }
.search .input { padding-inline-start: 40px; }

/* ---------- tables -> cards on phones ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: start; font-size: 12.5px; color: var(--nt-muted); font-weight: 700; background: var(--nt-surface-2); padding: 10px 12px; border-bottom: 1px solid var(--nt-line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--nt-line); vertical-align: middle; }
.tbl tr:hover td { background: var(--nt-surface-2); }
.tbl .n { text-align: end; direction: ltr; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tfoot td { font-weight: 800; background: var(--nt-sand-l); }
.tbl .pos { color: var(--nt-success); font-weight: 700; }
.tbl .neg { color: var(--nt-danger); font-weight: 700; }
.tbl tr.is-locked td { color: var(--nt-muted); }
@media (max-width: 767px) {
  table.tbl--cards thead { display: none; }
  table.tbl--cards, .tbl--cards tbody, .tbl--cards tr, .tbl--cards td { display: block; width: 100%; }
  .tbl--cards tr { margin: 0 0 10px; border: 1px solid var(--nt-line); border-radius: 12px; background: var(--nt-surface); padding: 6px 12px; box-shadow: var(--nt-shadow); }
  .tbl--cards td { border: 0; padding: 5px 0; display: flex; justify-content: space-between; gap: 12px; }
  .tbl--cards td::before { content: attr(data-label); color: var(--nt-muted); font-weight: 700; font-size: 12.5px; }
  .tbl--cards td.n { text-align: start; }
  .tbl--cards tfoot { display: block; }
  .tbl--cards tfoot tr { background: var(--nt-sand-l); }
}

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--nt-line); overflow-x: auto; scrollbar-width: none; }
.tabs [role="tab"] { border: 0; background: none; font: inherit; font-weight: 800; color: var(--nt-muted); padding: 10px 14px; min-height: 46px; cursor: pointer; white-space: nowrap;
  border-bottom: 3px solid transparent; margin-bottom: -2px; display: inline-flex; gap: 8px; align-items: center; }
.tabs [role="tab"][aria-selected="true"] { color: var(--nt-heading); border-bottom-color: var(--nt-orange); }
.tabs .sum { font-size: 12px; background: var(--nt-sand-l); border-radius: 999px; padding: 0 8px; color: var(--nt-heading); }
.tabs .dirty { width: 8px; height: 8px; border-radius: 50%; background: var(--nt-orange); }
[role="tabpanel"][hidden] { display: none; }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0; }

/* ---------- lists / misc ---------- */
.attention { list-style: none; margin: 0; padding: 0; }
.attention li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 18px; border-bottom: 1px solid var(--nt-line); }
.attention li:last-child { border-bottom: 0; }
.attention .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--nt-warning-soft); color: var(--nt-warning); }
.attention .ico svg { width: 18px; height: 18px; }
.attention .links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.truck-card { display: flex; flex-direction: column; overflow: hidden; }
.truck-card__img { height: 120px; background: linear-gradient(135deg, var(--nt-navy) 0%, var(--nt-navy-3) 100%); display: grid; place-items: center; position: relative; }
.truck-card__img img { height: 74px; opacity: .95; }
.truck-card__img .chip { position: absolute; top: 10px; inset-inline-start: 10px; }
.truck-card__body { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.truck-card__body h3 { font-size: 17px; font-weight: 800; }
.truck-card__foot { padding: 10px 14px; border-top: 1px solid var(--nt-line); display: flex; gap: 8px; }
.savebar { position: sticky; bottom: 0; z-index: 25; margin: 18px -24px -96px; padding: 12px 24px calc(12px + env(safe-area-inset-bottom)); background: var(--nt-navy); color: #fff;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; box-shadow: 0 -8px 24px rgba(17,44,61,.2); }
.savebar .msg { font-weight: 700; }
.savebar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--nt-orange); display: inline-block; margin-inline-end: 6px; }
.savebar .end { margin-inline-start: auto; display: flex; gap: 8px; flex-wrap: wrap; }
/* on a phone the bar sits right on top of the tab bar, which grows by the iPhone's home strip (safe area); its lower part
   is left free for the raised «+» of the tab bar; at the end of the page it rests there too, so nothing above it is covered */
@media (max-width: 1023px) { .savebar { margin: 16px -16px calc(env(safe-area-inset-bottom) - 36px); bottom: calc(68px + env(safe-area-inset-bottom)); padding: 10px 16px 18px; } }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid; font-size: 14px; }
.notice[hidden] { display: none; }  /* nt.js shows them when needed (dispatch site warnings, draft offer, settle, distribution) */
.notice--info { background: var(--nt-info-soft); border-color: #c6d8e3; }
.notice--ok { background: var(--nt-success-soft); border-color: #b9dfc8; color: #14532d; }
.notice--warn { background: var(--nt-warning-soft); border-color: #f5d0a2; }
.notice--tip { align-items: center; background: var(--nt-violet-soft); border-color: #d9cffb; }
.notice--tip > .nt-ico { flex: none; color: var(--nt-violet); }
.notice--tip > div { flex: 1; }
.notice--tip [data-tip-close] { flex: none; }
/* the terms in the pop-up (sign-up and sign-in pages; the full page uses landing.css) */
.terms-dlg { font-size: 15px; line-height: 1.75; }
.terms-dlg__date { margin: 0 0 10px; color: var(--nt-muted); font-weight: 600; }
.terms-dlg .lp-terms__lead { font-weight: 600; }
.terms-dlg .lp-terms__toc { background: var(--nt-bg); border: 1px solid var(--nt-line); border-radius: 12px; padding: 10px 16px; margin: 12px 0 4px; }
.terms-dlg .lp-terms__toc ol { margin: 0; padding-inline-start: 22px; columns: 2; column-gap: 24px; }
.terms-dlg .lp-terms__toc a { color: var(--nt-text); font-weight: 600; }
.terms-dlg section { padding-top: 18px; }
.terms-dlg h2 { font-size: 17px; font-weight: 800; margin: 0 0 6px; }
.terms-dlg ul { padding-inline-start: 22px; margin: 0 0 10px; }
.terms-dlg li + li { margin-top: 4px; }
.terms-dlg .lp-terms__notice { margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: var(--nt-orange-faint); border: 1px solid var(--nt-orange-soft); border-inline-start: 4px solid var(--nt-orange); }
.terms-dlg__actions { position: sticky; bottom: -1px; margin-top: 18px; padding-top: 12px; background: var(--nt-surface); border-top: 1px solid var(--nt-line); }
@media (max-width: 640px) { .terms-dlg .lp-terms__toc ol { columns: 1; } }
.notice svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.empty { text-align: center; padding: 28px 16px; color: var(--nt-muted); }
.empty img { width: 120px; opacity: .9; }
/* «Show the reversed shifts» under the shifts list (2026-11-13) */
.list-reversed { margin: 0; padding: 12px 16px; text-align: center; font-size: 13px; }
.list-reversed a { color: var(--nt-muted); font-weight: 700; }
.drop { border: 2px dashed var(--nt-line-2); border-radius: 14px; padding: 22px; text-align: center; background: var(--nt-surface); }
.drop b { display: block; font-size: 16px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.thumb { border: 1px solid var(--nt-line); border-radius: 12px; overflow: hidden; background: var(--nt-surface); }
.thumb__img { height: 110px; display: grid; place-items: center; background: var(--nt-sand-l); color: var(--nt-muted); }
.thumb__img svg { width: 42px; height: 42px; }
.thumb__body { padding: 8px 10px; font-size: 13px; }
.thumb__body b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dialog-mock { border: 1px solid var(--nt-line); border-radius: 16px; background: var(--nt-surface); box-shadow: var(--nt-shadow-lg); max-width: 560px; }
.foot-note { margin-top: 24px; font-size: 12.5px; color: var(--nt-muted); text-align: center; }
.proto-flag { position: fixed; inset-inline-end: 12px; top: 64px; z-index: 50; background: var(--nt-warning-soft); color: var(--nt-warning); border: 1px solid #f5d0a2;
  font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 999px; }
@media (max-width: 1023px) { .proto-flag { top: 58px; font-size: 11px; opacity: .92; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .sidebar, .topbar, .tabbar, .scrim, .pop, .nt-tip, .savebar, .proto-flag, .no-print { display: none !important; } .main { margin: 0; } }

/* ---------- Django app additions (Phase 2) - no inline styles anywhere (CSP style-src 'self') ---------- */
.main--full { margin-inline-start: 0; }
.nt-ico { width: 20px; height: 20px; flex: none; }
.btn .nt-ico { width: 18px; height: 18px; }
.toasts { display: grid; gap: 8px; margin-bottom: 14px; }
.stack { display: grid; gap: 16px; }
.mt-16 { margin-top: 16px; } .mb-16 { margin-bottom: 16px; } .m-0 { margin: 0; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.form-narrow { max-width: 520px; }
.errorlist { list-style: none; margin: 4px 0 0; padding: 0; color: var(--nt-danger); font-size: 12.5px; font-weight: 700; }
.field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea { width: 100%; min-height: 44px; padding: 8px 12px;
  border: 1px solid var(--nt-line-2); border-radius: 10px; background: var(--nt-surface); font: inherit; color: var(--nt-text); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--nt-orange-d); box-shadow: var(--nt-focus); outline: none; }
.field .helptext { font-size: 12.5px; color: var(--nt-muted); }
.check { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }
.check input { width: 20px; height: 20px; accent-color: var(--nt-orange-d); }
/* auth pages (login, reset) */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth__brand { background: var(--nt-navy); color: #fff; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px; position: relative; }
.auth__brand::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 6px; background: var(--nt-orange); }
.auth__brand a { justify-content: center; width: min(460px, 90%); }
.auth__brand img { width: 100%; height: auto; }
.auth__brand p { margin: 18px 0 0; color: #c9d4da; font-size: 16px; text-align: center; max-width: 420px; }
.auth__form { display: flex; flex-direction: column; justify-content: center; padding: 32px; }
.auth__card { width: 100%; max-width: 420px; margin: 0 auto; }
.auth__top { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-bottom: 24px; }
.auth__mini { display: none; }
.auth__mini img { display: block; height: 48px; width: auto; }
.auth h1 { font-size: 26px; font-weight: 800; }
.auth .sub { color: var(--nt-muted); margin: 6px 0 22px; }
.auth__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 18px; flex-wrap: wrap; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth__brand { padding: 28px 20px 30px; } .auth__brand img { width: 240px; }
  .auth__form { padding: 22px 16px 40px; }
  /* sign-up on the phone: no navy band, the small colour logo beside the language switch */
  .auth--lite .auth__brand { display: none; } .auth--lite .auth__form { padding-top: 12px; }
  .auth--lite .auth__top { justify-content: space-between; margin-bottom: 10px; } .auth--lite .auth__mini { display: block; }
  .auth--lite .auth__top + .osta-hello { margin-top: 0; margin-inline-end: 0; } }
.att-panel .thumb__img img { width: 100%; height: 110px; object-fit: cover; }

/* ---------- Phase 3a: trucks and lists ---------- */
.filters { padding: 12px 14px; margin-bottom: 16px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters .search { flex: 1 1 260px; }
.filters select.input { width: auto; }
.chip[aria-current="page"] { background: var(--nt-navy); border-color: var(--nt-heading); color: #fff; }
a.card.kpi { text-decoration: none; color: inherit; }
a.card.kpi .nt-ico { color: var(--nt-orange-text); }
a.card.kpi b { font-size: 16px; }
.kpi--soon { opacity: .6; }
.kpi--soon b { font-size: 16px; }
.kpi--soon .nt-ico { color: var(--nt-orange-text); }
.truck-card__img .photo { width: 100%; height: 120px; object-fit: cover; opacity: 1; }
.truck-card__body .muted { font-size: 13.5px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .field--wide { grid-column: 1 / -1; }
.form-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } .form-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
fieldset.box { border: 1px solid var(--nt-line); border-radius: 12px; padding: 12px 14px 0; margin: 0 0 14px; }
fieldset.box legend { font-weight: 800; padding: 0 6px; color: var(--nt-heading); }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.form-actions .end { margin-inline-start: auto; }
.similar-list { margin: 6px 0 10px; padding-inline-start: 18px; }
/* shareholder rows (shares page, stage closing; 2026-10-21): tips, total bar, header once, numbered compact rows */
.share-tips { margin-bottom: 14px; border: 1px solid #c6d8e3; border-radius: var(--nt-radius-sm); background: var(--nt-info-soft); }
.share-tips summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; font-weight: 800; color: var(--nt-info); }
.share-tips summary svg { width: 18px; height: 18px; }
.share-tips ol { margin: 0; padding: 0 34px 12px 18px; display: grid; gap: 4px; font-size: 14px; }
[dir="rtl"] .share-tips ol { padding: 0 18px 12px 34px; }
.share-meter { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; }
.share-meter__bar { flex: 1; height: 10px; border-radius: 999px; background: var(--nt-surface-2); border: 1px solid var(--nt-line); overflow: hidden; }
.share-meter__bar i { display: block; height: 100%; width: 0; background: var(--nt-warning); border-radius: inherit; transition: width .35s var(--nt-ease), background .3s; }
.share-meter__bar.is-ok i { background: var(--nt-success); }
.share-meter__bar.is-over i { background: var(--nt-danger); }
.share-meter__text { font-weight: 800; white-space: nowrap; }
.share-meter__text.is-ok { color: var(--nt-success); }
.share-meter__text.is-bad { color: var(--nt-warning); }
.share-head, .share-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 150px 38px; gap: 0 10px; align-items: start; }
.share-head { padding: 0 6px 6px; font-size: 12.5px; font-weight: 700; color: var(--nt-muted); border-bottom: 1px solid var(--nt-line); }
.share-list [data-share-rows] { counter-reset: nt-share; }
.share-row { padding: 8px 6px; border-bottom: 1px solid var(--nt-line); border-radius: 10px; transition: background .2s; }
.share-row:not([hidden]) { counter-increment: nt-share; }
.share-row:hover { background: var(--nt-surface-2); }
.share-row.is-warn { background: var(--nt-warning-soft); }
.share-row__n { margin-top: 8px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800;
  background: var(--nt-surface-2); border: 1px solid var(--nt-line); color: var(--nt-muted); }
.share-row__n::before { content: counter(nt-share); }
.share-row__name { position: relative; min-width: 0; }
.share-row__owner { position: absolute; inset-inline-end: 44px; top: 9px; pointer-events: none; font-size: 11.5px; }
.share-row__input { position: relative; }
.share-row__input .input { padding-inline-end: 28px; }
.share-row__input span { position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%); color: var(--nt-muted); font-weight: 700; }
[dir="rtl"] .share-row__input span { inset-inline-end: auto; inset-inline-start: 10px; }  /* the number is LTR: % after it */
[dir="rtl"] .share-row__input .input { padding-inline-end: 10px; padding-inline-start: 28px; }
.share-row__bar { display: block; height: 4px; margin-top: 6px; border-radius: 999px; background: var(--nt-surface-2); overflow: hidden; }
.share-row__bar i { display: block; height: 100%; width: 0; background: var(--nt-orange); border-radius: inherit; transition: width .3s var(--nt-ease); }
.icon-btn.share-row__del { margin-top: 2px; color: var(--nt-danger); }
.share-row__warn { grid-column: 2 / -1; margin: 6px 0 0; font-size: 13px; font-weight: 700; color: var(--nt-warning); }
.share-row[hidden], .share-row__owner[hidden], .share-row__warn[hidden] { display: none; }
.share-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 12px 0 4px; }
@media (max-width: 640px) {
  .share-head, .share-row { grid-template-columns: 26px minmax(0, 1fr) 96px 34px; gap: 0 6px; }
  .share-row__owner { position: static; display: inline-block; margin-top: 4px; }
}
.plain-list { margin: 0; padding-inline-start: 18px; }
/* profit distribution (fleet/distribution_detail.html) */
.dist-calc th { text-align: start; font-weight: 600; color: var(--nt-text); }
.dist-calc__key td, .dist-calc__key th { background: var(--nt-orange-faint); font-size: 16px; }
.dist-note { margin: 0; padding: 10px 14px; font-size: 13px; }
form.inline { display: inline; }
.cal__shift.is-reversed { text-decoration: line-through; opacity: .6; }
.amount-line { margin: 0; }
.amount-line b { font-size: 20px; }
.danger-zone { border-color: #f1c3be; }
.photo-frame { width: 100%; max-height: 260px; object-fit: cover; border-radius: 12px; display: block; }
.field [aria-invalid="true"] { border-color: var(--nt-danger); background: var(--nt-danger-soft); }

/* ---------- Phase 3b: shifts ---------- */
.nav-shifts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.nav-shifts .push-end { margin-inline-start: auto; }
.btn.is-disabled { opacity: .45; pointer-events: none; }
.btn--warn { background: var(--nt-warning-soft); border-color: #f5d0a2; color: #8a5a00; }
.btn--on-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.chip--accent { background: var(--nt-orange-d) !important; border-color: var(--nt-orange-d) !important; color: #fff !important; }
.kpi-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tabs--pad { padding: 0 10px; }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .form-grid--3 { grid-template-columns: 1fr; } }
.lines .input { min-height: 38px; padding: 6px 8px; }
.w-s { width: 90px; } .w-m { min-width: 150px; } .w-n { width: 96px; } .w-auto { width: auto; }
.lines td { vertical-align: top; }
/* shift work table: every column on a desktop screen without scrolling sideways (owner's request 2026-10-21) */
@media (min-width: 761px) {
  .lines[data-lines="deliveries"] th, .lines[data-lines="deliveries"] td { padding-inline: 5px; }
  .lines[data-lines="deliveries"] .w-m { min-width: 0; width: 100%; }
  .lines[data-lines="deliveries"] .w-s { width: 78px; }
  .lines[data-lines="deliveries"] .w-n { width: 78px; }
  .lines[data-lines="deliveries"] .input { padding-inline: 6px; }
}
.row-locked td { background: var(--nt-surface-2); color: var(--nt-muted); }
.row-reversal td { text-decoration: line-through; text-decoration-color: rgba(180,35,24,.35); }
.lines .check { cursor: pointer; color: var(--nt-danger); }
.lines .check input { width: 18px; height: 18px; }
.line-section { margin-bottom: 22px; }
.line-section h3 { font-size: 15px; font-weight: 800; margin: 0 0 8px; display: flex; gap: 8px; align-items: center; }
.small { font-size: 12.5px; } .mt-8 { margin-top: 8px; }
details summary { font-weight: 700; cursor: pointer; }
.tr-opening td { background: var(--nt-sand-l); font-weight: 700; }

/* ---------- Phase 3c: customer statement ---------- */
.kind { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; text-decoration: none; }
.k-open { background: var(--nt-sand-l); color: var(--nt-heading); }
.k-load { background: var(--nt-orange-soft); color: var(--nt-orange-text-strong); }
.k-cus { background: var(--nt-info-soft); color: var(--nt-info); }
.k-pay { background: var(--nt-success-soft); color: var(--nt-success); }
.more-filters { border-top: 1px solid var(--nt-line); }

/* ---------- Phase 3f: calendar, dashboard, admin (landing page: landing.css) ---------- */
.cal { padding: 8px; overflow-x: auto; }
.cal__row { display: grid; grid-template-columns: repeat(7, minmax(110px, 1fr)); gap: 6px; margin-bottom: 6px; }
.cal__head div { font-weight: 800; font-size: 12.5px; color: var(--nt-muted); text-align: center; }
.cal__day { min-height: 92px; border: 1px solid var(--nt-line); border-radius: 10px; padding: 6px; background: var(--nt-surface); display: flex; flex-direction: column; gap: 4px; }
.cal__day--out { background: var(--nt-sand-l); border-style: dashed; }
.cal__day--today { border-color: var(--nt-orange); box-shadow: inset 0 0 0 1px var(--nt-orange); }
.cal__num { font-weight: 800; font-size: 13px; }
.cal__shift { display: block; font-size: 12px; padding: 2px 6px; border-radius: 6px; background: var(--nt-info-soft); color: var(--nt-heading); text-decoration: none; }
.cal__shift.neg { background: var(--nt-danger-soft); color: var(--nt-danger); }
.att-list { list-style: none; margin: 0; padding: 0; }
.att-list li { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--nt-line); }
.att-list li:last-child { border-bottom: 0; }
.support-banner { background: var(--nt-warning-soft); color: #7a3f00; border-bottom: 2px solid #f5d0a2; padding: 8px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-weight: 700; }
.support-banner form { margin-inline-start: auto; }
.hp { position: absolute !important; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- breadcrumb (every app screen; Home is the first step) ---------- */
.crumbs { margin: 0 0 14px; font-size: 13.5px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; overflow-x: auto;
  scrollbar-width: none; white-space: nowrap; }
.crumbs ol::-webkit-scrollbar { display: none; }
.crumbs li { display: inline-flex; align-items: center; color: var(--nt-muted); }
.crumbs li + li::before { content: ""; width: 7px; height: 7px; margin-inline: 8px 6px; border-inline-end: 1.5px solid var(--nt-line-2);
  border-block-start: 1.5px solid var(--nt-line-2); transform: rotate(45deg); flex: none; }
[dir="rtl"] .crumbs li + li::before { transform: rotate(-135deg); }
.crumbs a { display: inline-flex; align-items: center; gap: 5px; color: var(--nt-muted); text-decoration: none; padding: 4px 6px;
  border-radius: 6px; min-height: 32px; }
.crumbs a:hover { color: var(--nt-orange-text-strong); background: var(--nt-orange-soft); }
.crumbs a .nt-ico { width: 16px; height: 16px; }
.crumbs [aria-current="page"] { color: var(--nt-text); font-weight: 700; padding: 4px 6px; }
@media (max-width: 760px) {  /* phone: Home icon > parent > current page; middle steps hidden, long names cut */
  .crumbs { margin-bottom: 10px; }
  .crumbs ol { overflow: hidden; }
  .crumbs li:not(:first-child):not(:nth-last-child(-n+2)) { display: none; }
  .crumbs li:first-child span { display: none; }
  .crumbs li:not(:first-child) { min-width: 0; flex: 0 1 auto; }
  .crumbs li bdi { overflow: hidden; text-overflow: ellipsis; display: block; }
  .crumbs li a { min-width: 0; max-width: 100%; }
}

/* ---------- shared pop-up and its message (apps/core/dialogs.py, nt.js) ---------- */
.dialog { border: 0; padding: 0; border-radius: 18px; width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 48px);
  background: var(--nt-surface); color: var(--nt-text); box-shadow: 0 30px 70px rgba(13, 35, 49, .35); overflow: hidden; }
.dialog[open] { display: flex; flex-direction: column; animation: nt-pop .16s ease-out; }
.dialog::backdrop { background: rgba(13, 35, 49, .55); backdrop-filter: blur(2px); }
.dialog__bar { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--nt-line);
  border-top: 4px solid var(--nt-orange); }
.dialog__title { font-size: 18px; font-weight: 800; margin: 0; flex: 1; }
.dialog__body { padding: 18px; overflow-y: auto; }
.dialog__message { margin: 0 0 14px; font-size: 16px; font-weight: 600; }
.dialog .field { display: grid; gap: 6px; font-weight: 600; margin-bottom: 14px; }
.dlg .page-head { margin: 0 0 12px; }
.dlg .page-head p { margin: 0; }
.dlg .card { box-shadow: none; border: 0; background: transparent; }
.dlg .card__body { padding: 0; }
.dlg .form-narrow { max-width: none; margin: 0; }
.dialog .form-actions { position: sticky; bottom: -18px; background: var(--nt-surface); padding: 12px 0 2px; margin-top: 8px; }
@keyframes nt-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .dialog[open] { animation: none; } }
@media (max-width: 760px) {  /* phone: a full-screen sheet */
  .dialog { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; }
}
.toast { position: fixed; z-index: 90; inset-inline: 0; margin-inline: auto; bottom: 24px; width: max-content; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 12px; font-weight: 700; color: #fff; background: #16784a; box-shadow: var(--nt-shadow-lg); }
.toast--error { background: #b42318; }
.toast--info { background: var(--nt-navy); }
@media (max-width: 760px) { .toast { bottom: 84px; } }  /* above the bottom tab bar */
.dlg__sub { font-size: 16px; font-weight: 800; color: var(--nt-orange-text-strong); margin: 0 0 4px; }

/* ---------- dropdowns (modern look) ----------
   1. Choice lists (<select>): own arrow everywhere; in browsers with customizable selects (Chrome / Edge 135+) the open
      list is styled too (rounded panel, roomy rows, orange highlight); other browsers keep their native list.
   2. Name fields with suggestions (input[data-combo], nt-combo.js): the same panel, filtered as you type. */
/* :not(#nt-x) only raises priority above the generic .field input rule (which resets background and padding) */
select.input:not(#nt-x), .field select:not(#nt-x), input[data-combo]:not(#nt-x) {
  appearance: none; -webkit-appearance: none; padding-inline-end: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c6a72' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 18px; background-position: right 12px center;
}
[dir="rtl"] select.input:not(#nt-x), [dir="rtl"] .field select:not(#nt-x), [dir="rtl"] input[data-combo]:not(#nt-x) { background-position: left 12px center; }
input[data-combo]:not(#nt-x) { cursor: text; }
select.input:hover, .field select:hover, input[data-combo]:hover { border-color: var(--nt-line-2); }
@supports (appearance: base-select) {
  select.input:not(#nt-x), .field select:not(#nt-x) { appearance: base-select; display: flex; align-items: center; }
  select.input::picker-icon, .field select::picker-icon { display: none; }  /* the same chevron as every other dropdown */
  select.input:open, .field select:open { border-color: var(--nt-orange-d); box-shadow: var(--nt-focus); }
  select.input::picker(select), .field select::picker(select) {
    appearance: base-select; border: 1px solid var(--nt-line); border-radius: 14px; padding: 6px; margin-block: 6px;
    background: var(--nt-surface); box-shadow: 0 18px 40px rgba(13, 35, 49, .18); max-height: min(340px, 60dvh);
    scrollbar-width: thin; scrollbar-color: var(--nt-line-2) transparent; }
  select.input option, .field select option { padding: 9px 12px; border-radius: 9px; min-height: 40px; gap: 8px; font: inherit; color: var(--nt-text); }
  select.input option:hover, .field select option:hover, select.input option:focus-visible, .field select option:focus-visible {
    background: var(--nt-orange-soft); color: var(--nt-orange-text-strong); outline: none; }
  select.input option:checked, .field select option:checked { font-weight: 800; background: var(--nt-sand-l); }
  select.input option::checkmark, .field select option::checkmark { color: var(--nt-orange-text); }
}
.combo { position: fixed; z-index: 120; margin: 0; padding: 6px; list-style: none; overflow-y: auto; background: var(--nt-surface);
  scrollbar-width: thin; scrollbar-color: var(--nt-line-2) transparent;
  border: 1px solid var(--nt-line); border-radius: 14px; box-shadow: 0 18px 40px rgba(13, 35, 49, .18); font-size: 15px; }
.combo li { padding: 9px 12px; border-radius: 9px; cursor: pointer; color: var(--nt-text); line-height: 1.45; overflow-wrap: anywhere; }
.combo li:hover, .combo li[aria-selected="true"] { background: var(--nt-orange-soft); color: var(--nt-orange-text-strong); }
.combo mark { background: none; color: var(--nt-orange-text); font-weight: 800; }
/* name hints (2026-10-23): «➕ Add new …» first, a helpful empty list, «new» on a name added on save */
.combo .combo__new { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; background: var(--nt-success-soft); color: var(--nt-success); }
.combo .combo__new:hover, .combo .combo__new[aria-selected="true"] { background: var(--nt-success-soft); color: var(--nt-success); box-shadow: inset 0 0 0 1px var(--nt-success); }
.combo .combo__new b { font-weight: 800; }
.combo .combo__note { margin-inline-start: 10px; color: var(--nt-muted); font-size: .85em; font-weight: 600; }
.combo .combo__new small, .combo .combo__empty small { display: block; font-size: 12.5px; font-weight: 600; opacity: .85; }
.combo__plus { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--nt-success); color: #fff; font-weight: 800; }
.combo .combo__empty { display: flex; gap: 10px; align-items: flex-start; color: var(--nt-text); cursor: default; }
.combo .combo__empty:hover { background: none; color: var(--nt-text); }
.combo .combo__empty small { color: var(--nt-muted); }
.combo__bulb { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--nt-info-soft); }
.combo-host { position: relative; }
.input.is-new { border-color: var(--nt-success); }
.combo-badge { position: absolute; inset-block-start: -8px; inset-inline-end: 10px; padding: 0 8px; border-radius: 999px; background: var(--nt-success); color: #fff; font-size: 11px; font-weight: 800; line-height: 17px; pointer-events: none; }
/* calendar: "+" on each day up to today opens the new-shift pop-up for that day */
.cal__day { position: relative; }
.cal__add { position: absolute; inset-block-start: 4px; inset-inline-end: 4px; width: 26px; height: 26px; border-radius: 8px; display: grid;
  place-items: center; color: var(--nt-orange-text); background: var(--nt-orange-soft); opacity: 0; transition: opacity .15s; }
.cal__add .nt-ico { width: 16px; height: 16px; }
.cal__day:hover .cal__add, .cal__add:focus-visible { opacity: 1; }
@media (hover: none) { .cal__add { opacity: 1; } }  /* touch screens: always visible */
/* illustrative truck photo (apps/fleet/photos.py) while a truck has no photo of its own */
.photo-note { position: absolute; inset-block-end: 8px; inset-inline-end: 8px; font-size: 11.5px; font-weight: 700; color: #fff;
  background: rgba(13, 35, 49, .65); padding: 2px 8px; border-radius: 999px; }
.photo-default { margin: 0; }
.photo-default figcaption { margin-top: 8px; font-size: 13px; color: var(--nt-muted); }
/* profile photo / company logo */
.avatar--img { object-fit: cover; background: var(--nt-surface); padding: 0; }
.avatar--logo { object-fit: contain; border-radius: 10px; padding: 2px; }
.pic { display: flex; gap: 16px; align-items: flex-start; }
.pic__img { width: 96px; height: 96px; flex: none; border-radius: 16px; object-fit: contain; background: var(--nt-sand-l); border: 1px solid var(--nt-line); }
.pic__img--round { border-radius: 50%; object-fit: cover; }
.pic__empty { display: grid; place-items: center; font-size: 36px; font-weight: 800; color: #fff; background: var(--nt-orange); border: 0; }
.pic__body { flex: 1; min-width: 0; }
.pic__body > p { margin: 0 0 8px; }
@media (max-width: 760px) { .pic { flex-direction: column; } }
/* admin panel: contact messages */
.subtabs .count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-inline-start: 4px;
  border-radius: 999px; background: var(--nt-orange); color: #fff; font-size: 12px; font-weight: 800; }
.tbl tr.row-new td { font-weight: 600; background: var(--nt-orange-faint); }
.msg-text { white-space: normal; font-size: 15.5px; line-height: 1.8; background: var(--nt-sand-l); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.facts dt { color: var(--nt-muted); font-size: 13.5px; }
.facts dd { margin: 0; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 12px; }

/* ---------- notifications (MSG-1): bell, drop-down, inbox, important window ---------- */
.bell-wrap { position: relative; }
.bell { position: relative; }
.bell__count { position: absolute; inset-block-start: -6px; inset-inline-end: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--nt-orange); color: #fff; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--nt-bg); line-height: 1; }
.bell__count[hidden] { display: none; }
.topbar .bell__count { border-color: var(--nt-surface); }
.nav-count { margin-inline-start: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--nt-orange); color: #fff;
  font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.tabbar__bell { position: relative; }
.tabbar__bell .bell__count { inset-block-start: 2px; inset-inline-end: calc(50% - 22px); border-color: var(--nt-surface); }
.notif-panel { position: absolute; inset-block-start: calc(100% + 10px); inset-inline-end: 0; width: 380px; max-width: calc(100vw - 24px);
  background: var(--nt-surface); border: 1px solid var(--nt-line); border-radius: 16px; box-shadow: 0 22px 50px rgba(13, 35, 49, .22); z-index: 60; overflow: hidden; color: var(--nt-text); }
.notif-panel[hidden] { display: none; }
.notif-panel__head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--nt-line); }
.notif-panel__head h2 { font-size: 16px; font-weight: 800; margin: 0; }
.notif-panel__head form { margin-inline-start: auto; }
.linkish { border: 0; background: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--nt-orange-text); cursor: pointer; padding: 4px; }
.notif-panel__foot { display: block; text-align: center; padding: 11px; border-top: 1px solid var(--nt-line); font-weight: 700; text-decoration: none; }
.notif-panel .empty { padding: 18px; margin: 0; }
.notif { display: flex; gap: 12px; padding: 12px 14px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--nt-line); position: relative; }
.notif:hover { background: var(--nt-sand-l); color: inherit; }
.notif--unread { background: var(--nt-orange-faint); }
.notif--unread::before { content: ""; position: absolute; inset-block-start: 18px; inset-inline-end: 12px; width: 9px; height: 9px; border-radius: 50%; background: var(--nt-orange); }
.notif__icon { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--nt-info-soft); color: var(--nt-heading); }
.notif__icon svg { width: 20px; height: 20px; }
.notif__icon--important { background: var(--nt-orange-soft); color: var(--nt-orange-text); }
.notif__icon--maintenance { background: var(--nt-warning-soft); color: var(--nt-warning); }
.notif__body { min-width: 0; flex: 1; padding-inline-end: 14px; display: block; }
.notif__title { display: block; font-weight: 800; font-size: 14.5px; margin: 0 0 2px; }
.notif--read .notif__title { font-weight: 600; }
.notif__text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--nt-muted); font-size: 13.5px; }
.notif__time { display: block; font-size: 12px; color: var(--nt-muted); margin-top: 4px; }
.chip--important { background: var(--nt-orange-soft); border-color: #f8cfc4; color: var(--nt-orange-text-strong); }
.chip--info { background: var(--nt-info-soft); border-color: #c6d8e3; color: var(--nt-heading); }
.chip--maintenance { background: var(--nt-warning-soft); border-color: #f5d0a2; color: var(--nt-warning); }
.inbox { display: grid; grid-template-columns: 380px 1fr; min-height: 460px; overflow: hidden; }
.inbox__list { border-inline-end: 1px solid var(--nt-line); overflow-y: auto; max-height: 70vh; }
.inbox__list .notif[aria-current="true"] { background: var(--nt-orange-soft); box-shadow: inset -4px 0 0 var(--nt-orange); }
[dir="ltr"] .inbox__list .notif[aria-current="true"] { box-shadow: inset 4px 0 0 var(--nt-orange); }
.inbox__read { padding: 22px 26px; min-width: 0; }
.inbox__read h2 { font-size: 22px; font-weight: 800; margin: 8px 0 6px; }
.inbox__meta { color: var(--nt-muted); font-size: 13px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inbox__meta .nt-ico { width: 16px; height: 16px; }
.inbox__text { font-size: 15.5px; line-height: 1.9; }
.inbox__read .inbox__text { margin-top: 16px; }
.inbox__text p { margin: 0 0 10px; }
.inbox__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--nt-line); }
.inbox__back { display: none; font-weight: 700; margin-bottom: 10px; text-decoration: none; }
[dir="ltr"] .flip { transform: scaleX(-1); }
@media (max-width: 860px) {
  .inbox { grid-template-columns: 1fr; min-height: 0; }
  .inbox__list { border: 0; max-height: none; }
  .inbox:not(.inbox--open) .inbox__read { display: none; }
  .inbox--open .inbox__list { display: none; }
  .inbox__back { display: inline-flex; gap: 6px; align-items: center; }
}
.dialog--important { border-top: 5px solid var(--nt-orange); }
.dialog--important .dialog__bar { border-top: 0; align-items: flex-start; }
.dialog__foot { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 18px; border-top: 1px solid var(--nt-line); }

/* ---------- admin: notifications (MSG-1) ---------- */
.dialog--wide { width: min(1080px, calc(100% - 32px)); }
.gap-tight { gap: 0 12px; }
.readbar { display: grid; gap: 4px; min-width: 140px; }
.readbar__track { height: 8px; border-radius: 999px; background: var(--nt-sand-l); overflow: hidden; }
.readbar__track--big { height: 12px; }
.readbar__fill { height: 100%; width: 0; border-radius: 999px; background: var(--nt-success); }
.readbar small { color: var(--nt-muted); }
.compose { display: grid; grid-template-columns: 1.25fr 1fr; gap: 22px; align-items: start; }
.compose fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.compose legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.compose details > summary { cursor: pointer; font-weight: 700; color: var(--nt-orange-text); margin-bottom: 8px; }
.seg-radio { display: inline-flex; border: 1px solid var(--nt-line-2); border-radius: 999px; overflow: hidden; flex-wrap: wrap; }
.seg-radio label { position: relative; cursor: pointer; }
.seg-radio input { position: absolute; opacity: 0; pointer-events: none; }
.seg-radio span { display: block; font-weight: 700; font-size: 13.5px; padding: 7px 16px; color: var(--nt-muted); }
.seg-radio input:checked + span { background: var(--nt-navy); color: #fff; }
.seg-radio input:focus-visible + span { box-shadow: var(--nt-focus); }
.audience { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 0 8px; }
.audience label { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--nt-line-2); border-radius: 12px; padding: 10px 12px; cursor: pointer; background: var(--nt-surface); }
.audience label:has(input:checked) { border-color: var(--nt-orange-d); background: var(--nt-orange-soft); }
.audience input { margin-top: 4px; accent-color: var(--nt-orange-d); }
.audience b { display: block; font-size: 14.5px; }
.audience small { color: var(--nt-muted); }
.audience-more[hidden] { display: none; }
.pick-filter { margin-bottom: 6px; }
select.pick-list:not(#nt-x) { appearance: auto; background-image: none; padding: 6px; min-height: 140px; }
select.pick-list option { padding: 5px 8px; border-radius: 6px; }
.reach { display: flex; gap: 10px; align-items: center; background: var(--nt-success-soft); border: 1px solid #b6dcc6; color: #14532d;
  border-radius: 12px; padding: 10px 12px; font-weight: 700; margin: 0 0 12px; flex-wrap: wrap; }
.reach__extra { margin-inline-start: auto; font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 14px; cursor: pointer; }
.check input { margin-top: 5px; accent-color: var(--nt-orange-d); }
.check small { display: block; color: var(--nt-muted); }
.preview { position: sticky; top: 0; display: grid; gap: 14px; }
.preview__label { font-size: 12px; font-weight: 800; color: var(--nt-muted); margin-bottom: 6px; }
.preview__title { display: block; font-size: 16px; margin-bottom: 6px; }
.notif--boxed { border: 1px solid var(--nt-line); border-radius: 12px; }
@media (max-width: 980px) { .compose, .audience { grid-template-columns: 1fr; } .preview { position: static; } }


/* ======================================================================================================== UI-1
   Redesign step 1 (approved mock-up 06_Documentation/Django_Mockups_2026-10-20_Redesign): shared components restyled
   and motion helpers. Same class names as before, so every screen picks the new look up. */
body { font-size: 14.5px; -webkit-font-smoothing: antialiased; }
a { text-decoration-thickness: from-font; }
.nt-ico { stroke-width: 1.9; }

/* page header and cards */
.page-head h1 { font-size: 26px; letter-spacing: -.01em; color: var(--nt-heading); }
.card { border-radius: var(--nt-radius); }
.card__head h2, .card__head h3 { color: var(--nt-heading); }
.card--hover { transition: transform .22s var(--nt-ease), box-shadow .22s var(--nt-ease), border-color .22s; }
.card--hover:hover { transform: translateY(-3px); box-shadow: var(--nt-shadow-lg); border-color: var(--nt-line-2); }

/* icon chips: <span class="ic ic--orange">{% icon 'coins' %}</span> */
.ic { width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; flex: none; background: var(--nt-info-soft); color: var(--nt-info); }
.ic svg { width: 21px; height: 21px; }
.ic--orange { background: var(--nt-orange-soft); color: var(--nt-orange-text); }
.ic--ok { background: var(--nt-success-soft); color: var(--nt-success); }
.ic--warn { background: var(--nt-warning-soft); color: var(--nt-warning); }
.ic--bad { background: var(--nt-danger-soft); color: var(--nt-danger); }
.ic--violet { background: var(--nt-violet-soft); color: var(--nt-violet); }
.ic--sm { width: 32px; height: 32px; border-radius: 10px; }
.ic--sm svg { width: 17px; height: 17px; }

/* KPI cards: label row (icon chip, label, change badge), value, foot (hint, sparkline) */
.kpi { padding: 16px 18px; gap: 6px; overflow: hidden; }
.kpi small { font-size: 13.5px; }
.kpi b { font-size: 26px; letter-spacing: -.01em; line-height: 1.2; color: var(--nt-heading); }
.kpi--pos b { color: var(--nt-success); }
.kpi--neg b { color: var(--nt-danger); }
.kpi__top { display: flex; align-items: center; gap: 10px; color: var(--nt-muted); font-weight: 700; font-size: 13.5px; }
.kpi__top .delta { margin-inline-start: auto; }
.kpi__foot { display: flex; align-items: flex-end; gap: 10px; color: var(--nt-muted); font-size: 12.5px; }
.kpi--hero { background: linear-gradient(135deg, var(--nt-navy) 0%, var(--nt-navy-3) 100%); border-color: transparent; color: #fff; }
.kpi--hero b, .kpi--hero .kpi__top { color: #fff; }
.kpi--hero small, .kpi--hero .kpi__foot, .kpi--hero .hint { color: #b7c7d1; }
.kpi--hero::after { content: ""; position: absolute; inset-block-start: -40px; inset-inline-end: -40px; width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(241, 89, 57, .45), transparent 70%); pointer-events: none; }
.spark { margin-inline-start: auto; width: 110px; height: 34px; flex: none; }
.spark .l { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.spark .a { stroke: none; opacity: .14; }

/* change badges: <span class="delta delta--up">{% icon 'up' %}9%</span> */
.delta { display: inline-flex; align-items: center; gap: 2px; font-size: 12.5px; font-weight: 800; padding: 1px 7px; border-radius: 999px; direction: ltr; }
.delta--up { color: var(--nt-success); background: var(--nt-success-soft); }
.delta--down { color: var(--nt-danger); background: var(--nt-danger-soft); }
.delta svg { width: 13px; height: 13px; stroke-width: 2.6; }

/* buttons */
.btn { min-height: 40px; padding: 8px 16px; background: var(--nt-surface); color: var(--nt-heading);
  transition: background .15s, border-color .15s, box-shadow .2s, transform .15s; }
.btn:hover { background: var(--nt-surface-2); border-color: var(--nt-line-2); color: var(--nt-heading); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--nt-orange); border-color: var(--nt-orange); color: #fff; box-shadow: 0 6px 16px rgba(241, 89, 57, .28); }
.btn--primary:hover { background: var(--nt-orange-d); border-color: var(--nt-orange-d); color: #fff; }
.btn--navy { background: var(--nt-navy); border-color: var(--nt-navy); color: #fff; }
.btn--navy:hover { background: var(--nt-navy-2); border-color: var(--nt-navy-2); color: #fff; }
.btn--ghost { background: transparent; border-color: transparent; }
.btn--ghost:hover { background: var(--nt-surface-2); border-color: transparent; }
.btn--sm { min-height: 32px; padding: 4px 11px; font-size: 13px; border-radius: 10px; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; border-color: var(--nt-line); background: var(--nt-surface); color: var(--nt-heading);
  transition: background .15s, border-color .15s, transform .15s; }
.icon-btn:hover { background: var(--nt-surface-2); border-color: var(--nt-line-2); }
.icon-btn:active { transform: scale(.96); }

/* chips */
.chip { background: var(--nt-surface-2); border-color: var(--nt-line); color: var(--nt-muted); }
.chip svg { width: 14px; height: 14px; }
.chip--ok { background: var(--nt-success-soft); border-color: transparent; color: var(--nt-success); }
.chip--warn { background: var(--nt-warning-soft); border-color: transparent; color: var(--nt-warning); }
.chip--bad { background: var(--nt-danger-soft); border-color: transparent; color: var(--nt-danger); }
.chip--info { background: var(--nt-info-soft); border-color: transparent; color: var(--nt-info); }
.chip--orange, .chip--important { background: var(--nt-orange-soft); border-color: transparent; color: var(--nt-orange-text-strong); }
.chip--violet { background: var(--nt-violet-soft); border-color: transparent; color: var(--nt-violet); }
.chip.is-on, .chip[aria-pressed="true"], .chip[aria-current="page"] { background: var(--nt-navy); border-color: var(--nt-navy); color: #fff; }

/* form fields */
.input, select.input, textarea.input, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea {
  border-radius: 11px; border-color: var(--nt-line-2); background-color: var(--nt-surface); color: var(--nt-text); transition: border-color .15s, box-shadow .15s; }
.input:hover, .field input:hover, .field select:hover, .field textarea:hover { border-color: var(--nt-faint); }
.field label { color: var(--nt-heading); }

/* tables */
.tbl td { padding: 12px 14px; }
.tbl th { padding: 10px 14px; }
.tbl tbody tr { transition: background .15s; }
.tbl tr:hover td { background: var(--nt-surface-2); }

/* tabs */
.tabs { border-bottom-width: 1px; }
.tabs [role="tab"] { border-bottom-width: 3px; border-radius: 3px 3px 0 0; transition: color .15s; }
.tabs [role="tab"]:hover { color: var(--nt-heading); }
.tabs [role="tab"][aria-selected="true"] { color: var(--nt-heading); }

/* progress bar: <div class="progress"><i data-pct="72"></i></div> */
.progress { height: 8px; border-radius: 999px; background: var(--nt-surface-2); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--nt-orange), #ff9a73); transition: width 1s var(--nt-ease); }

/* messages after an action */
.toast { display: flex; align-items: center; gap: 10px; background: var(--nt-navy); border-radius: 14px; padding: 12px 16px; animation: nt-toast-in .35s var(--nt-ease); }
.toast::before { content: ""; width: 26px; height: 26px; flex: none; border-radius: 8px; background: rgba(126, 224, 168, .18) no-repeat center / 16px
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237ee0a8' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E"); }
.toast[hidden] { display: none; }
.toast--error { background: #b42318; }
.toast--error::before { background-color: rgba(255, 255, 255, .16);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 7v6M12 17h.01'/%3E%3C/svg%3E"); }
@keyframes nt-toast-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }

/* pop-up */
.dialog { border-radius: 18px; }

/* motion helpers: blocks of a page rise in one after another; numbers count up (data-count, nt.js); loading placeholder */
.content.reveal > * { animation: nt-rise .45s var(--nt-ease) both; }
.content.reveal > *:nth-child(2) { animation-delay: .04s; } .content.reveal > *:nth-child(3) { animation-delay: .08s; }
.content.reveal > *:nth-child(4) { animation-delay: .12s; } .content.reveal > *:nth-child(5) { animation-delay: .16s; }
.content.reveal > *:nth-child(n+6) { animation-delay: .2s; }
.stagger > * { animation: nt-rise .45s var(--nt-ease) both; }
.stagger > *:nth-child(2) { animation-delay: .05s; } .stagger > *:nth-child(3) { animation-delay: .1s; } .stagger > *:nth-child(4) { animation-delay: .15s; }
.stagger > *:nth-child(n+5) { animation-delay: .2s; }
@keyframes nt-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.skel { border-radius: 10px; background: linear-gradient(90deg, var(--nt-surface-2) 0%, var(--nt-line) 50%, var(--nt-surface-2) 100%);
  background-size: 200% 100%; animation: nt-shimmer 1.1s linear infinite; min-height: 14px; }
@keyframes nt-shimmer { to { background-position: -200% 0; } }
.htmx-request.skel-on-load { position: relative; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ======================================================================================================== UI-3
   Command palette (Ctrl+K): header search button and the palette dialog (templates/partials/_palette.html). */
.kbd { display: inline-block; font: 700 11.5px/1.6 var(--nt-font); direction: ltr; border: 1px solid var(--nt-line-2); border-bottom-width: 2px; border-radius: 6px;
  padding: 0 6px; color: var(--nt-muted); background: var(--nt-surface); white-space: nowrap; }
.search-btn { flex: 1 1 0; min-width: 0; max-width: 460px; display: flex; align-items: center; gap: 10px; height: 42px; padding-inline: 14px; margin-inline-start: 8px; border-radius: 12px;
  background: var(--nt-surface-2); border: 1px solid var(--nt-line); color: var(--nt-muted); font: inherit; font-size: 14px; cursor: text; transition: border-color .2s, box-shadow .2s; }
.search-btn:hover { border-color: var(--nt-line-2); }
.search-btn svg { width: 19px; height: 19px; flex: none; }
.search-btn span { flex: 1; min-width: 0; text-align: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette { border: 0; padding: 0; margin-block: 12vh auto; width: min(640px, calc(100% - 24px)); max-height: 76dvh; border-radius: 18px; overflow: hidden;
  background: var(--nt-surface); color: var(--nt-text); box-shadow: var(--nt-shadow-lg); }
.palette[open] { display: flex; flex-direction: column; animation: nt-pop .16s ease-out; }
.palette::backdrop { background: rgba(13, 35, 49, .5); backdrop-filter: blur(2px); }
.palette__bar { display: flex; align-items: center; gap: 12px; padding-inline: 18px 14px; border-bottom: 1px solid var(--nt-line); }
.palette__bar > svg { width: 21px; height: 21px; color: var(--nt-muted); flex: none; }
.palette__bar input { flex: 1; min-width: 0; height: 58px; border: 0; background: transparent; font: inherit; font-size: 16.5px; color: var(--nt-text); outline: none; box-shadow: none; }
.palette ul { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.palette li { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; cursor: pointer; color: var(--nt-text); }
.palette li .ic { width: 34px; height: 34px; border-radius: 10px; }
.palette li .ic svg { width: 18px; height: 18px; }
.palette li b { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette li small { margin-inline-start: auto; color: var(--nt-muted); font-size: 12px; white-space: nowrap; }
.palette li[aria-selected="true"] { background: var(--nt-orange-soft); }
.palette li[aria-selected="true"] b { color: var(--nt-heading); }
.palette li.palette__cat { font-size: 11.5px; font-weight: 800; color: var(--nt-faint); padding: 10px 10px 2px; cursor: default; }
.palette li.palette__empty { color: var(--nt-muted); cursor: default; justify-content: center; padding: 22px 10px; }
.palette__foot { display: flex; gap: 16px; margin: 0; padding: 8px 16px; border-top: 1px solid var(--nt-line); color: var(--nt-faint); font-size: 12px; }
.palette__foot .kbd { margin-inline-end: 2px; }
@media (max-width: 1199px) { .search-btn .kbd { display: none; } }
@media (max-width: 760px) {
  .search-btn { flex: 0 0 42px; max-width: 42px; padding: 0; justify-content: center; margin-inline-start: auto; background: var(--nt-surface); }
  .search-btn span { display: none; }
  .topbar .search-btn + .topbar__end { margin-inline-start: 0; }
  .palette { margin-block: 10px auto; max-height: calc(100dvh - 20px); }
  .palette__bar .kbd, .palette__foot { display: none; }
}
@media (prefers-reduced-motion: reduce) { .palette[open] { animation: none; } }
/* ======================================================================================================== UI-4
   Home dashboard (templates/core/home.html, apps/dashboard/home.py): welcome strip, quick actions, KPI cards with
   change badge and sparkline, revenue chart (server-drawn SVG), attention list, trucks today, recent activity. */
.hello { position: relative; overflow: hidden; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 20px 22px; margin-bottom: 16px;
  border-radius: var(--nt-radius); color: #fff;
  background: radial-gradient(900px 260px at 0% 0%, rgba(241, 89, 57, .38), transparent 60%), linear-gradient(120deg, var(--nt-navy) 0%, var(--nt-navy-2) 60%, var(--nt-navy-3) 100%); }
[dir="rtl"] .hello { background: radial-gradient(900px 260px at 100% 0%, rgba(241, 89, 57, .38), transparent 60%), linear-gradient(240deg, var(--nt-navy) 0%, var(--nt-navy-2) 60%, var(--nt-navy-3) 100%); }
.hello__text { min-width: 0; }
.hello h1 { font-size: 23px; font-weight: 800; color: #fff; }
.hello p { margin: 3px 0 0; color: #c3d2db; }
.hello__stats { margin-inline-start: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.hello__stats div { min-width: 104px; padding: 8px 14px; border-radius: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); text-align: center; }
.hello__stats b { display: block; font-size: 21px; font-weight: 800; color: #fff; }
.hello__stats small { color: #b7c7d1; font-weight: 600; }

.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.qa { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--nt-surface); border: 1px solid var(--nt-line); color: var(--nt-text);
  text-decoration: none; box-shadow: var(--nt-shadow); transition: transform .2s var(--nt-ease), box-shadow .2s, border-color .2s; }
.qa:hover { transform: translateY(-2px); box-shadow: var(--nt-shadow-lg); border-color: var(--nt-orange); color: var(--nt-text); }
.qa b { display: block; font-size: 14px; color: var(--nt-heading); }
.qa small { display: block; color: var(--nt-muted); font-size: 12px; line-height: 1.4; }

a.kpi { color: var(--nt-text); text-decoration: none; }
a.kpi:hover { color: var(--nt-text); }
.kpis .kpi > b { font-size: 25px; }
.kpi__top > span:nth-child(2) { min-width: 0; line-height: 1.35; }
.kpi__foot > span { min-width: 0; line-height: 1.4; }
.kpi--hero .kpi__top .ic { background: rgba(255,255,255,.12); color: #fff; }
.kpi--hero .delta--up { background: rgba(22, 120, 74, .35); color: #b9f0cf; }
.kpi--hero .delta--down { background: rgba(180, 35, 24, .35); color: #ffc9c2; }
.spark { color: var(--nt-info); }
.spark .l { stroke: currentColor; }
.spark .a { fill: currentColor; }
.spark--ok { color: var(--nt-success); }
.spark--bad { color: var(--nt-danger); }
.spark--violet { color: var(--nt-violet); }
.spark--orange, .kpi--hero .spark { color: var(--nt-orange); }

.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.chart { width: 100%; height: auto; max-height: 280px; display: block; }
.chart .grid-line { stroke: var(--nt-line); stroke-dasharray: 4 6; }
.chart .base-line { stroke: var(--nt-line-2); }
.chart .bar { fill: var(--nt-navy); opacity: .85; transition: opacity .2s, fill .2s; }
.chart .bar--now { fill: var(--nt-navy-3); }
.chart .bar:hover { opacity: 1; fill: var(--nt-orange); }
.chart .line { fill: none; stroke: var(--nt-orange); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart .dot { fill: var(--nt-surface); stroke: var(--nt-orange); stroke-width: 2.5; }
.chart .axis { fill: var(--nt-muted); font-size: 11.5px; font-family: var(--nt-font); }
.chart .axis--y { text-anchor: end; direction: ltr; }
:root[data-theme="dark"] .chart .bar { fill: #3e6a86; }
:root[data-theme="dark"] .chart .bar--now { fill: #5b88a6; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin: 8px 0 0; font-size: 12.5px; color: var(--nt-muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; }
.legend__bar { background: var(--nt-navy); }
.legend__line { background: var(--nt-orange); height: 4px !important; border-radius: 4px !important; vertical-align: 3px !important; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--nt-line); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list b { display: block; font-size: 14px; color: var(--nt-heading); overflow: hidden; text-overflow: ellipsis; }
.list small { display: block; color: var(--nt-muted); font-size: 12.5px; }
.list b small { display: inline; font-weight: 600; }
.list .progress { margin-top: 7px; }
.list__link { color: inherit; text-decoration: none; }
.list__link:hover b { color: var(--nt-orange-text); }
.list__num { text-align: center; min-width: 52px; }
.list__num b { font-size: 18px; }
.card__foot { padding: 10px 18px; border-top: 1px solid var(--nt-line); font-size: 13.5px; font-weight: 700; }
.card__foot a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
[dir="rtl"] .card__foot svg, [dir="rtl"] .card__head .end .btn svg { transform: scaleX(-1); }
.empty-mini { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 26px 18px; color: var(--nt-muted); text-align: center; }
.empty-mini svg { width: 22px; height: 22px; color: var(--nt-success); }

@media (max-width: 1200px) { .g-main { grid-template-columns: 1fr; } }
@media (max-width: 1100px) { .kpis.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .hello { padding: 16px; }
  .hello h1 { font-size: 19px; }
  .hello__stats { margin-inline-start: 0; width: 100%; }
  .hello__stats div { flex: 1; min-width: 0; padding: 6px 8px; }
  .hello__stats b { font-size: 17px; }
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .qa { padding: 10px; gap: 10px; }
  .qa .ic { width: 34px; height: 34px; }
  .qa small { display: none; }
  .kpis.grid-4 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .list li { padding: 10px 14px; }
}
/* ======================================================================================================== UI-5
   Fleet and shifts: status row, toolbar with view switch, truck cards, page header card, shift KPI row and tabs. */
.push-end { margin-inline-start: auto; }
.w-auto { width: auto; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 14px; }
.toolbar .search { flex: 1 1 240px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--nt-surface-2); border: 1px solid var(--nt-line); }
.seg a, .seg button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; min-height: 34px; border: 0; border-radius: 9px; background: none; font: inherit;
  font-size: 13.5px; font-weight: 700; color: var(--nt-muted); text-decoration: none; cursor: pointer; }
.seg a:hover { color: var(--nt-heading); }
.seg [aria-pressed="true"], .seg [aria-current="true"] { background: var(--nt-surface); color: var(--nt-heading); box-shadow: var(--nt-shadow); }
.seg svg { width: 17px; height: 17px; }
.page-head__actions .seg { align-self: center; }

.status-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--nt-text); text-decoration: none; }
.stat b { display: block; font-size: 22px; font-weight: 800; color: var(--nt-heading); line-height: 1.2; }
.stat small { color: var(--nt-muted); font-weight: 600; }
.stat.is-on { border-color: var(--nt-orange); box-shadow: inset 0 0 0 1px var(--nt-orange), var(--nt-shadow); }
.stat:hover { color: var(--nt-text); }

.tcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.truck-card { display: flex; flex-direction: column; overflow: hidden; }
.truck-card__img { position: relative; display: block; height: 160px; background: linear-gradient(135deg, var(--nt-navy) 0%, var(--nt-navy-3) 100%); overflow: hidden; }
.truck-card__img .photo { width: 100%; height: 160px; object-fit: cover; transition: transform .5s var(--nt-ease); }
.truck-card:hover .truck-card__img .photo { transform: scale(1.04); }
.truck-card__img .status-chip { position: absolute; inset-block-start: 10px; inset-inline-start: 10px; box-shadow: var(--nt-shadow); }
.truck-card__img .chip:not(.chip--ok):not(.chip--warn) { background: rgba(255,255,255,.92); color: var(--nt-heading); }
.plate-badge { position: absolute; inset-block-end: 10px; inset-inline-start: 10px; padding: 2px 10px; border-radius: 8px; background: #fff; color: var(--nt-navy);
  font-weight: 800; font-size: 13px; letter-spacing: .5px; border: 2px solid var(--nt-navy); box-shadow: var(--nt-shadow); }
.truck-card__body { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.truck-card__body h3 { font-size: 17px; font-weight: 800; }
.truck-card__body h3 a { color: var(--nt-heading); text-decoration: none; }
.truck-card__body h3 a:hover { color: var(--nt-orange-text); }
.truck-card__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 0; padding-top: 10px; border-top: 1px dashed var(--nt-line); }
.truck-card__stats dt { font-size: 11.5px; color: var(--nt-muted); font-weight: 600; }
.truck-card__stats dd { margin: 0; font-weight: 800; color: var(--nt-heading); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.truck-card__stats dd.neg { color: var(--nt-danger); }
.truck-card__stats > div:nth-child(2) { text-align: center; }
.truck-card__stats > div:nth-child(3) { text-align: end; }
.truck-card__stats dd.num { direction: inherit; }  /* follow the column's alignment (a whole number reads the same) */
.truck-card__foot { padding: 10px 14px; border-top: 1px solid var(--nt-line); display: flex; gap: 8px; align-items: center; }
.status-chip svg { width: 14px; height: 14px; }
.cell-main { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.cell-main:hover b { color: var(--nt-orange-text); }

.entity-head { display: flex; align-items: center; gap: 18px; padding: 16px 18px; flex-wrap: wrap; }
.entity-head__img { width: 132px; height: 96px; border-radius: 14px; overflow: hidden; flex: none; background: var(--nt-navy); }
.entity-head__img img { width: 100%; height: 100%; object-fit: cover; }
.entity-head__icon .ic { width: 56px; height: 56px; border-radius: 16px; }
.entity-head__icon .ic svg { width: 28px; height: 28px; }
.entity-head__main { flex: 1; min-width: 220px; }
.entity-head__kicker { font-size: 13px; font-weight: 700; color: var(--nt-orange-text); }
.entity-head__kicker a { color: inherit; }
.entity-head h1 { font-size: 24px; font-weight: 800; color: var(--nt-heading); margin: 2px 0 8px; }
.entity-head__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.entity-head__meta .plate { border-color: var(--nt-navy); }
.entity-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.quick--links { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.kpi--hero.kpi--neg b { color: #ffc9c2; }
.kpi--hero.kpi--pos b { color: #fff; }
.kpi-grid.kpis { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.kpis .kpi > b { font-size: 23px; }
.tabs [role="tab"] { display: inline-flex; align-items: center; gap: 7px; }
.tabs [role="tab"] svg { width: 18px; height: 18px; }
.tabs .count, .line-section .count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 12px; font-weight: 800;
  background: var(--nt-orange-soft); color: var(--nt-orange-text-strong); }
.tabs [aria-selected="false"] .count { background: var(--nt-surface-2); color: var(--nt-muted); }

.go-back svg, .go-next svg { width: 16px; height: 16px; }
[dir="ltr"] .go-back svg, [dir="rtl"] .go-next svg { transform: scaleX(-1); }
.cal { padding: 10px; }
.cal__day { border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
.cal__day:not(.cal__day--out):hover { border-color: var(--nt-line-2); box-shadow: var(--nt-shadow); }
.cal__day--out { background: var(--nt-surface-2); }
.cal__shift { border-radius: 7px; font-weight: 600; }
.cal__shift:hover { background: var(--nt-orange-soft); color: var(--nt-orange-text-strong); }

.toolbar select.input { width: auto; }
@media (max-width: 760px) { .status-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .status-row { gap: 8px; }
  .stat { padding: 10px 12px; gap: 8px; }
  .stat .ic { width: 34px; height: 34px; }
  .stat b { font-size: 18px; }
  .seg span { display: none; }
  .toolbar .seg { margin-inline-start: auto; }
  .entity-head { padding: 14px; gap: 12px; }
  .entity-head__img { width: 100%; height: 150px; }
  .entity-head h1 { font-size: 20px; }
  .entity-head__actions { width: 100%; }
  .entity-head__actions .btn { flex: 1; justify-content: center; }
  .truck-card__img, .truck-card__img .photo { height: 150px; }
}
/* ======================================================================================================== UI-6
   Accounts: customer accounts table (collection bar), supplier due cards, driver cards with balance chips. */
.avatar--sm { width: 32px; height: 32px; border-radius: 10px; font-size: 13px; }
.collect { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.collect .progress { flex: 1; }
.collect .num { font-size: 12.5px; font-weight: 800; color: var(--nt-muted); min-width: 38px; }
.progress--ok i { background: linear-gradient(90deg, var(--nt-success), #3fb27a); }
.progress--bad i { background: linear-gradient(90deg, var(--nt-danger), #e2665d); }
.toolbar .subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }

.scards, .dcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.scard, .dcard { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.scard__head, .dcard__head { display: flex; align-items: center; gap: 12px; }
.scard h3, .dcard h3 { font-size: 15.5px; font-weight: 800; line-height: 1.3; }
.scard h3 a, .dcard h3 a { color: var(--nt-heading); text-decoration: none; }
.scard h3 a:hover, .dcard h3 a:hover { color: var(--nt-orange-text); }
.scard small, .dcard small { color: var(--nt-muted); }
.scard .grow, .dcard .grow { flex: 1; min-width: 0; }
.scard__due small { display: block; font-weight: 700; font-size: 12.5px; }
.scard__due b { font-size: 22px; font-weight: 800; color: var(--nt-heading); }
.scard__due b.neg { color: var(--nt-danger); }
.scard__due b.pos { color: var(--nt-success); }
.scard__nums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.scard__nums dt { font-size: 11.5px; color: var(--nt-muted); font-weight: 600; }
.scard__nums dd { margin: 0; font-weight: 700; color: var(--nt-heading); font-size: 13.5px; }
.scard__foot, .dcard__foot { display: flex; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--nt-line); }
.dcard .avatar { width: 44px; height: 44px; font-size: 18px; }
.dcard__bal .chip { font-size: 13px; padding: 4px 10px; }
.dcard__bal .chip svg { width: 15px; height: 15px; }
.dcard__bal b { margin-inline-start: 4px; }
@media (min-width: 761px) { .tbl .row-actions { flex-wrap: nowrap; } .tbl .row-actions .btn { white-space: nowrap; } }

/* ======================================================================================================== UI-7
   Setup, admin and the rest: sub-tabs as one segmented bar (lists, admin panel, supplier kinds, notifications, supply),
   profile header avatar, error pages. */
.subtabs { display: flex; flex-wrap: nowrap; gap: 4px; width: fit-content; max-width: 100%; margin: 0 0 16px; padding: 4px; overflow-x: auto;
  scrollbar-width: none; background: var(--nt-surface-2); border: 1px solid var(--nt-line); border-radius: 14px; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs .chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; min-height: 36px; border: 0; border-radius: 10px; background: none;
  color: var(--nt-muted); font-weight: 700; white-space: nowrap; text-decoration: none; transition: background .15s, color .15s; }
.subtabs .chip:hover { color: var(--nt-heading); }
.subtabs .chip[aria-current="page"] { background: var(--nt-surface); color: var(--nt-heading); box-shadow: var(--nt-shadow); }
.subtabs .chip svg { width: 16px; height: 16px; }
.subtabs .chip[aria-current="page"] svg { color: var(--nt-orange-text); }
.toolbar .subtabs { width: auto; margin: 0; }

.entity-head__icon .avatar { width: 56px; height: 56px; border-radius: 50%; font-size: 22px; }

.errpage-body { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(800px 360px at 50% 0%, var(--nt-orange-faint), transparent 70%), var(--nt-bg); }
.errpage { display: flex; flex-direction: column; align-items: center; gap: 18px; width: min(520px, 100%); text-align: center; }
.errpage__logo img { width: 160px; height: auto; }
.errpage__card { width: 100%; padding: 30px 24px 26px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.errpage__ic { width: 60px; height: 60px; border-radius: 18px; background: var(--nt-orange-soft); color: var(--nt-orange-text); }
.errpage__ic svg { width: 30px; height: 30px; }
.errpage__code { margin: 6px 0 0; font-size: 46px; font-weight: 800; line-height: 1; color: var(--nt-heading); letter-spacing: 2px; }
.errpage h1 { font-size: 22px; color: var(--nt-heading); }
.errpage__text { margin: 0; color: var(--nt-muted); }
.errpage__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 12px 0 0; }@media (min-width: 761px) { .subtabs { flex-wrap: wrap; } }
/* step 8: appearance choice on the profile page (light / dark / follow the device) */
.theme-choice__set { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; border: 0; padding: 0; margin: 0; }
.theme-opt { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 2px solid var(--nt-line); border-radius: 14px; cursor: pointer;
  background: var(--nt-surface); transition: border-color .15s, box-shadow .15s; }
.theme-opt:hover { border-color: var(--nt-line-2); }
.theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
.theme-opt:has(input:checked) { border-color: var(--nt-orange); box-shadow: 0 0 0 3px var(--nt-orange-faint); }
.theme-opt:has(input:focus-visible) { box-shadow: var(--nt-focus); }
.theme-opt__look { display: grid; grid-template-columns: 26% 1fr; grid-template-rows: 10px 1fr; gap: 4px; height: 64px; padding: 6px; border-radius: 9px; background: #f3f5f7; }
.theme-opt__look i { border-radius: 4px; background: #fff; }
.theme-opt__look i:first-child { grid-row: span 2; background: #112c3d; }
.theme-opt__look i:last-child { background: #e3e7eb; }
.theme-opt--dark .theme-opt__look { background: #0d1820; }
.theme-opt--dark .theme-opt__look i { background: #13232e; }
.theme-opt--dark .theme-opt__look i:first-child { background: #0b1f2c; }
.theme-opt--dark .theme-opt__look i:last-child { background: #22384a; }
.theme-opt--auto .theme-opt__look { background: linear-gradient(135deg, #f3f5f7 50%, #0d1820 50%); }
.theme-opt__name { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--nt-heading); font-size: 13.5px; }
.theme-opt__name svg { width: 16px; height: 16px; color: var(--nt-muted); }
.theme-choice .help { margin: 10px 0 0; }
@media (max-width: 520px) { .theme-choice__set { gap: 8px; } .theme-opt { padding: 6px; } .theme-opt__look { height: 46px; } .theme-opt__name { font-size: 12px; } }
/* step 8 dark pass: fixed light borders and dark text that do not follow the tokens */
.truck-card__img .chip:not(.chip--ok):not(.chip--warn) { color: #112c3d; }
:root[data-theme="dark"] .notice, :root[data-theme="dark"] .reach, :root[data-theme="dark"] .danger-zone, :root[data-theme="dark"] .btn--danger { border-color: var(--nt-line-2); }
:root[data-theme="dark"] .notice--ok, :root[data-theme="dark"] .reach { color: var(--nt-success); }
:root[data-theme="dark"] .btn--warn, :root[data-theme="dark"] .support-banner { color: var(--nt-warning); border-color: var(--nt-line-2); }
:root[data-theme="dark"] .truck-card__img .chip--ok, :root[data-theme="dark"] .truck-card__img .chip--warn { background: rgba(13, 24, 32, .86); }
:root[data-theme="dark"] .plate-badge { box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
:root[data-theme="dark"] img.photo, :root[data-theme="dark"] .entity-head__img img, :root[data-theme="dark"] .photo-frame { filter: brightness(.92); }
/* step 8: visually hidden labels inside a scrolled table must not widen the page (they are absolutely positioned) */
.table-wrap, .tabs, .subtabs { position: relative; }

/* Serial number column ("م", owner's request 2026-10-20) on every data table with a header row. Drawn with a CSS counter,
   so it stays right when rows are added, removed or refreshed in place (shift lines, pop-ups, filters). Label/value
   tables (no <thead>) are left alone; previous-balance, empty-message and total rows get a blank cell. */
.tbl:has(> thead) { counter-reset: nt-sn; }
.tbl:has(> thead) > thead > tr::before, .tbl:has(> thead) > tbody > tr::before, .tbl:has(> thead) > tfoot > tr::before {
  display: table-cell; width: 1%; padding: 10px 6px 10px 12px; text-align: center; vertical-align: middle; white-space: nowrap;
  border-bottom: 1px solid var(--nt-line); color: var(--nt-faint); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
[dir="rtl"] .tbl:has(> thead) > * > tr::before { padding: 10px 12px 10px 6px; }
.tbl:has(> thead) > thead > tr::before { content: "#"; background: var(--nt-surface-2); color: var(--nt-muted); font-size: 12.5px; }
:root[lang="ar"] .tbl:has(> thead) > thead > tr::before { content: "م"; }
.tbl:has(> thead) > tbody > tr::before { counter-increment: nt-sn; content: counter(nt-sn); }
.tbl:has(> thead) > tbody > tr:is(.tr-opening, .row-open)::before,
.tbl:has(> thead) > tbody > tr:has(> td[colspan]:only-child)::before { counter-increment: none; content: ""; }
.tbl:has(> thead) > tfoot > tr::before { content: ""; background: var(--nt-sand-l); }
.tbl:has(> thead) > tbody > tr.tr-opening::before { background: var(--nt-sand-l); }
.tbl:has(> thead) > tbody > tr.row-locked::before { background: var(--nt-surface-2); }
.tbl:has(> thead) > tbody > tr:hover::before { background: var(--nt-surface-2); }
@media (max-width: 760px) {  /* phone: rows are cards; the number is a small badge on top of each card */
  .tbl--cards:has(> thead) > tbody > tr::before { display: inline-block; width: auto; margin: 2px 0 2px; padding: 0 8px; border: 0; border-radius: 999px;
    background: var(--nt-surface-2); content: "#" counter(nt-sn); font-size: 11.5px; }
  .tbl--cards:has(> thead) > tbody > tr:is(.tr-opening, .row-open)::before,
  .tbl--cards:has(> thead) > tbody > tr:has(> td[colspan]:only-child)::before,
  .tbl--cards:has(> thead) > tfoot > tr::before { display: none; }
}
@media print { .tbl:has(> thead) > * > tr::before { color: #555; } }

/* share button busy while the PDF is prepared (reports/_share.html) */
.btn[aria-busy="true"] { opacity: .75; cursor: progress; }

/* ---------- shift page: Expenses tab (owner-approved mock-up 2026-10-21, Django_Mockups_2026-10-21_Expenses) ---------- */
.exp-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.exp-chip { flex: 1 1 128px; min-width: 120px; display: flex; flex-direction: column; gap: 1px; padding: 10px 14px; text-align: start;
  font: inherit; color: inherit; background: var(--nt-surface); border: 1px solid var(--nt-line); border-radius: 14px; cursor: pointer;
  transition: transform .2s var(--nt-ease), box-shadow .2s, border-color .2s, background .2s; }
.exp-chip:hover { transform: translateY(-2px); box-shadow: var(--nt-shadow-lg); border-color: var(--nt-line-2); }
.exp-chip:focus-visible { outline: none; box-shadow: var(--nt-focus); }
.exp-chip small { display: flex; align-items: center; gap: 6px; color: var(--nt-muted); font-weight: 700; font-size: 12.5px; }
.exp-chip small svg { width: 15px; height: 15px; }
.exp-chip b { font-size: 19px; font-weight: 800; }
.exp-chip__n { margin-inline-start: auto; min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--nt-surface-2);
  border: 1px solid var(--nt-line); font-size: 11.5px; text-align: center; }
.exp-chip__owe { font-size: 11.5px; font-weight: 700; color: var(--nt-warning); min-height: 1em; }
.exp-chip.is-empty { background: var(--nt-surface-2); border-style: dashed; }
.exp-chip.is-empty b { color: var(--nt-faint); opacity: .6; }
.exp-chip--total { cursor: default; flex-basis: 150px; background: var(--nt-navy); border-color: var(--nt-navy); color: #fff; }
.exp-chip--total:hover { transform: none; box-shadow: none; border-color: var(--nt-navy); }
.exp-chip--total small { color: #b6cad6; }
.exp-chip.is-bumped b { animation: nt-bump .45s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes nt-bump { 40% { transform: scale(1.12); } }
.exp-group { margin-bottom: 12px; border: 1px solid var(--nt-line); border-radius: var(--nt-radius); background: var(--nt-surface);
  box-shadow: var(--nt-shadow); overflow: hidden; }
.exp-group.is-flashed { animation: nt-flash 1.1s var(--nt-ease); }
/* The quarry line made from the loads (mock-up 2026-10-27, Django_Mockups_2026-10-27_QuarryLine): «From the loads» under
   the quarry, the charge marked when the quarry has no saved price, the Expenses count lit, and the Work-tab note.
   All of it keys on data-auto-quarry, which goes when the line is touched by hand. */
tr[data-auto-quarry] td[data-auto]::after { content: attr(data-auto); display: block; width: fit-content; margin-top: 4px; padding: 0 8px;
  border-radius: 999px; background: var(--nt-success-soft); color: var(--nt-success); font-size: 11.5px; font-weight: 800; }
tr[data-auto-quarry][data-no-price] [name$="-amount"] { border-color: var(--nt-orange); box-shadow: 0 0 0 3px rgba(241, 89, 57, .16); }
tr[data-auto-quarry][data-no-price] td[data-need]::after { content: attr(data-need); display: block; margin-top: 3px; font-size: 12px; font-weight: 700; color: var(--nt-orange-text); }
/* it follows all the loads (mock-up 2026-11-11): m³ × price under the charge; a charge typed for fewer m³ with no saved
   price is marked to check; a locked line behind the loads gets a red note with «Add a line for the difference» */
tr[data-auto-quarry]:not([data-no-price]):not([data-stale]) td[data-rate]::after { content: attr(data-rate); display: block; margin-top: 3px; font-size: 11.5px; font-weight: 700; color: var(--nt-success); white-space: nowrap; }
tr[data-auto-quarry][data-stale] [name$="-amount"] { border-color: var(--nt-orange); box-shadow: 0 0 0 3px rgba(241, 89, 57, .16); }
tr[data-auto-quarry][data-stale] td[data-stale-text]::after { content: attr(data-stale-text); display: block; margin-top: 3px; font-size: 12px; font-weight: 700; color: var(--nt-danger); white-space: nowrap; }
.notice--bad { background: var(--nt-danger-soft); border-color: color-mix(in srgb, var(--nt-danger) 30%, transparent); color: var(--nt-danger); }
.tabs .count.is-lit { animation: nt-lit 1.6s var(--nt-ease); }
@keyframes nt-lit { 15%, 60% { background: var(--nt-orange); color: #fff; transform: scale(1.3); box-shadow: 0 0 0 4px rgba(241, 89, 57, .22); } }
.exp-ghost[hidden], .exp-empties[hidden], .quarry-notes[hidden] { display: none; }
.quarry-notes { display: grid; gap: 8px; margin-top: 8px; }
.quarry-note { align-items: center; margin: 0; }
.quarry-note > div { flex: 1; }
@keyframes nt-flash { 0% { box-shadow: 0 0 0 0 rgba(241, 89, 57, .55); } 30% { box-shadow: 0 0 0 6px rgba(241, 89, 57, .25); } 100% { box-shadow: var(--nt-shadow); } }
.exp-group__head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 16px; font: inherit; color: inherit;
  text-align: start; background: none; border: 0; cursor: pointer; }
.exp-group__head:hover { background: var(--nt-surface-2); }
.exp-group__head:focus-visible { outline: none; box-shadow: inset var(--nt-focus); }
.exp-group__head h3 { margin: 0; font-size: 16px; font-weight: 800; }
.exp-group__meta { margin-inline-start: auto; font-size: 13px; color: var(--nt-muted); }
.exp-group__meta b { color: var(--nt-text); font-size: 15px; }
.exp-group__owe { color: var(--nt-warning); font-weight: 700; }
.exp-group__chev { display: inline-flex; color: var(--nt-muted); transition: transform .3s var(--nt-ease); }
.exp-group__chev svg { width: 16px; height: 16px; }
.exp-group__head[aria-expanded="false"] .exp-group__chev { transform: rotate(-90deg); }  /* closed: points along the line */
[dir="rtl"] .exp-group__head[aria-expanded="false"] .exp-group__chev { transform: rotate(90deg); }
.exp-group__body { border-top: 1px solid var(--nt-line); padding: 6px 6px 12px; overflow: hidden; }
.exp-group__body tfoot { display: none; }  /* the card head shows the total */
.exp-group__body .table-wrap { margin: 0; }
.exp-empties { margin-top: 18px; }
.exp-empties__title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; font-weight: 800; color: var(--nt-muted); }
.exp-empties__title::after { content: ""; flex: 1; height: 1px; background: var(--nt-line); }
.exp-empties__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.exp-ghost { display: flex; align-items: center; gap: 10px; padding: 9px 14px; font: inherit; font-weight: 700; color: var(--nt-muted);
  text-align: start; background: transparent; border: 1.5px dashed var(--nt-line-2); border-radius: 14px; cursor: pointer;
  transition: border-color .2s, background .2s, color .2s, transform .2s var(--nt-ease); }
.exp-ghost:hover, .exp-ghost:focus-visible { outline: none; border-color: var(--nt-orange); background: var(--nt-orange-faint); color: var(--nt-orange-text); transform: translateY(-1px); }
.exp-ghost .ic { background: var(--nt-surface-2); color: inherit; }
.exp-ghost__none { font-weight: 400; font-size: 13px; }
.exp-ghost__plus { margin-inline-start: auto; display: inline-flex; }
/* removed line: red while it slides away, green when Undo brings it back; the note that replaces it */
.tbl tr.row-going > td { background: var(--nt-danger-soft); }
.tbl tr.row-back > td { background: var(--nt-success-soft); transition: background .6s ease .3s; }
.tbl tr.row-removed > td { background: var(--nt-danger-soft); color: var(--nt-danger); font-weight: 700; border-radius: 10px; }
.tbl tr.row-removed .btn { color: var(--nt-danger); }
/* tab panels slide in; the save bar's dot pulses while there are unsaved changes */
[role="tabpanel"]:not([hidden]) { animation: nt-fade-up .3s var(--nt-ease); }
@keyframes nt-fade-up { from { transform: translateY(6px); } to { transform: none; } }  /* no opacity: a page whose animations are paused still shows */
.savebar:has([data-dirty]) .dot { animation: nt-pulse 1.6s infinite; }
@keyframes nt-pulse { 0% { box-shadow: 0 0 0 0 rgba(241, 89, 57, .6); } 70% { box-shadow: 0 0 0 8px rgba(241, 89, 57, 0); } 100% { box-shadow: 0 0 0 0 rgba(241, 89, 57, 0); } }
@media (max-width: 760px) {
  .exp-chip { flex-basis: calc(50% - 5px); }
  .exp-group__body { padding-inline: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .exp-chip, .exp-ghost, .exp-group__chev { transition: none; }
  .exp-chip.is-bumped b, .exp-group.is-flashed, [role="tabpanel"]:not([hidden]), .savebar:has([data-dirty]) .dot { animation: none; }
}

/* ---------- control panel: trucks today (redesign 2026-10-21) ---------- */
.btn--outline-primary { background: var(--nt-surface); border-color: var(--nt-orange); color: var(--nt-orange-text); }
.btn--outline-primary:hover { background: var(--nt-orange); border-color: var(--nt-orange); color: #fff; }
.tt-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.tt-head h2 { margin: 0; font-size: 20px; font-weight: 800; }
.tt-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.tt-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; font: inherit; font-size: 13.5px; font-weight: 700;
  color: var(--nt-muted); background: var(--nt-surface); border: 1px solid var(--nt-line); border-radius: 999px; cursor: pointer;
  transition: background .2s, border-color .2s, color .2s; }
.tt-chip b { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--nt-surface-2); color: var(--nt-text); font-size: 12px; text-align: center; }
.tt-chip:hover { border-color: var(--nt-line-2); color: var(--nt-text); }
.tt-chip.is-on { background: var(--nt-navy); border-color: var(--nt-navy); color: #fff; }
.tt-chip.is-on b { background: rgba(255, 255, 255, .18); color: #fff; }
.tt-chip--ok:not(.is-on) b { background: var(--nt-success-soft); color: var(--nt-success); }
.tt-chip--wait:not(.is-on) b { background: var(--nt-orange-soft); color: var(--nt-orange-text); }
.tt-chip--warn:not(.is-on) b { background: var(--nt-warning-soft); color: var(--nt-warning); }
.tt-search { position: relative; margin-inline-start: auto; flex: 0 1 280px; }
.tt-search svg { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--nt-muted); pointer-events: none; }
.tt-search .input { padding-inline-start: 36px; min-height: 38px; }
.tt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tt-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 12px; background: var(--nt-surface);
  border: 1px solid var(--nt-line); border-radius: var(--nt-radius); box-shadow: var(--nt-shadow); overflow: hidden;
  transition: transform .2s var(--nt-ease), box-shadow .2s; }
.tt-card::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--nt-line-2); }
.tt-card--started::before { background: var(--nt-success); }
.tt-card--waiting::before { background: var(--nt-orange); }
.tt-card--workshop::before { background: var(--nt-warning); }
.tt-card:hover { transform: translateY(-2px); box-shadow: var(--nt-shadow-lg); }
.tt-card[hidden] { display: none; }
.tt-card__top { display: flex; align-items: center; gap: 8px; }
.tt-card__top h3 { margin: 0; font-size: 17px; font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-card__top h3 a { color: inherit; text-decoration: none; }
.tt-card__top h3 a:hover { color: var(--nt-orange-text); }
.tt-plate { margin-inline-start: auto; flex: none; padding: 1px 8px; border: 1.5px solid var(--nt-navy); border-radius: 6px; font-size: 12px; font-weight: 800; color: var(--nt-heading); background: var(--nt-surface); white-space: nowrap; }
.tt-card__line { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13.5px; color: var(--nt-text); min-width: 0; }
.tt-card__line svg { width: 15px; height: 15px; flex: none; color: var(--nt-muted); }
.tt-card__state { color: var(--nt-muted); font-weight: 600; }
.tt-card--started .tt-card__state { color: var(--nt-success); }
.tt-card--started .tt-card__state svg { color: var(--nt-success); }
.tt-card--workshop .tt-card__state { color: var(--nt-warning); }
.tt-card__figs { margin-inline-start: auto; color: var(--nt-text); font-weight: 600; white-space: nowrap; }
.tt-card__foot { margin-top: 6px; display: flex; gap: 8px; }
.tt-card__foot .btn { width: 100%; justify-content: center; }
@media (max-width: 640px) { .tt-search { flex: 1 1 100%; margin-inline-start: 0; } }

/* ---------- control panel layout (redesign 2026-10-21): today at a glance, trucks + grouped alerts ---------- */
.kpi--link { color: inherit; text-decoration: none; transition: transform .2s var(--nt-ease), box-shadow .2s; }
.kpi--link:hover { transform: translateY(-2px); box-shadow: var(--nt-shadow-lg); }
.kpi--warn { border-color: transparent; background: var(--nt-warning-soft); }
.glance-bar { display: block; height: 6px; margin-top: 8px; border-radius: 999px; background: var(--nt-surface-2); overflow: hidden; }
.glance-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--nt-success); transition: width .6s var(--nt-ease); }
.control-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.control-side { position: sticky; top: calc(var(--nt-head) + 12px); }
@media (max-width: 1180px) { .control-layout { grid-template-columns: 1fr; } .control-side { position: static; order: -1; } }
.att-panel .card__head { border-bottom: 0; }
.att-group { border-top: 1px solid var(--nt-line); }
.att-group > summary { display: flex; align-items: center; gap: 10px; padding: 11px 16px; cursor: pointer; list-style: none; font-weight: 800; }
.att-group > summary::-webkit-details-marker { display: none; }
.att-group > summary:hover { background: var(--nt-surface-2); }
.att-group__ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--nt-info-soft); color: var(--nt-info); }
.att-group__ic svg { width: 16px; height: 16px; }
.att-group--warn .att-group__ic { background: var(--nt-warning-soft); color: var(--nt-warning); }
.att-group--bad .att-group__ic { background: var(--nt-danger-soft); color: var(--nt-danger); }
.att-group__title { flex: 1; min-width: 0; font-size: 14.5px; }
.att-group__n { min-width: 26px; padding: 1px 8px; border-radius: 999px; text-align: center; font-size: 12.5px; background: var(--nt-surface-2); border: 1px solid var(--nt-line); }
.att-group--bad .att-group__n { background: var(--nt-danger-soft); color: var(--nt-danger); border-color: transparent; }
.att-group--warn .att-group__n { background: var(--nt-warning-soft); color: var(--nt-warning); border-color: transparent; }
.att-group__chev { display: inline-flex; color: var(--nt-muted); transition: transform .25s var(--nt-ease); }
.att-group__chev svg { width: 16px; height: 16px; }
.att-group:not([open]) .att-group__chev { transform: rotate(90deg); }
[dir="rtl"] .att-group:not([open]) .att-group__chev { transform: rotate(-90deg); }
.att-group__hint { margin: 0 16px 8px; font-size: 13px; color: var(--nt-muted); }
.att-rows { list-style: none; margin: 0; padding: 0 8px 8px; }
.att-rows li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; }
.att-rows li:hover { background: var(--nt-surface-2); }
.att-row__main { flex: 1; min-width: 0; display: flex; gap: 8px; align-items: baseline; }
.att-row__main a { font-weight: 700; color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-row__main a:hover { color: var(--nt-orange-text); }
.att-more > summary { margin: 0 16px 10px; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--nt-orange-text); }
.att-clear { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 16px; text-align: center; }
.att-clear svg { width: 34px; height: 34px; padding: 6px; border-radius: 50%; color: var(--nt-success); background: var(--nt-success-soft); }


/* ---------- supplier installment plans (2026-10-21) ---------- */
.plan-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 760px) { .plan-grid { grid-template-columns: 1fr; } }
.plan-preview { border: 1px solid var(--nt-line); border-radius: var(--nt-radius-sm); background: var(--nt-surface-2); padding: 10px; }
.plan-preview .tbl { background: var(--nt-surface); border-radius: 8px; }
.plan-preview__sum { font-weight: 800; font-size: 13.5px; margin: 2px 4px 8px; }
.field__label { font-weight: 700; font-size: 14px; }
.seg-choices > div { display: flex; flex-wrap: wrap; border: 1px solid var(--nt-line-2); border-radius: 10px; overflow: hidden; }
.seg-choices > div > div { flex: 1 1 auto; }
.seg-choices label { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 8px 10px; cursor: pointer; font-weight: 700; font-size: 13.5px; color: var(--nt-muted); background: var(--nt-surface); white-space: nowrap; }
.seg-choices input { position: absolute; opacity: 0; pointer-events: none; }
.seg-choices label:has(input:checked) { background: var(--nt-navy); color: #fff; }
.seg-choices label:has(input:focus-visible) { box-shadow: inset var(--nt-focus); }

.notif-inst { border-bottom: 1px solid var(--nt-line); padding-bottom: 4px; }
.notif-inst__title { display: flex; align-items: center; gap: 6px; margin: 8px 14px 4px; font-size: 12.5px; font-weight: 800; color: var(--nt-muted); }
.notif-inst__title svg { width: 14px; height: 14px; }
.notif-inst__row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 14px; color: inherit; text-decoration: none; font-size: 13.5px; }
.notif-inst__row:hover { background: var(--nt-surface-2); }
.notif-inst__row .chip { font-size: 11px; padding: 0 8px; }
.dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex: none; }
.dot--bad { background: var(--nt-danger); } .dot--warn { background: var(--nt-warning); }

/* supplier installments page (redesign 2026-10-21): status cards as filters, cards grouped by urgency */
.inst-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.inst-filter { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--nt-radius); border: 1px solid var(--nt-line);
  background: var(--nt-surface); color: inherit; text-decoration: none; box-shadow: var(--nt-shadow); transition: transform .2s var(--nt-ease), box-shadow .2s, border-color .2s; }
.inst-filter:hover { transform: translateY(-2px); box-shadow: var(--nt-shadow-lg); }
.inst-filter__top { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--nt-muted); }
.inst-filter__n { margin-inline-start: auto; min-width: 24px; padding: 0 8px; border-radius: 999px; background: var(--nt-surface-2); border: 1px solid var(--nt-line); text-align: center; font-size: 12px; color: var(--nt-text); }
.inst-filter b { font-size: 21px; font-weight: 800; }
.inst-filter--bad b { color: var(--nt-danger); } .inst-filter--bad .ic { background: var(--nt-danger-soft); color: var(--nt-danger); }
.inst-filter--warn b { color: var(--nt-warning); } .inst-filter--warn .ic { background: var(--nt-warning-soft); color: var(--nt-warning); }
.inst-filter--ok b { color: var(--nt-success); } .inst-filter--ok .ic { background: var(--nt-success-soft); color: var(--nt-success); }
.inst-filter.is-on { border: 2px solid var(--nt-orange); box-shadow: 0 0 0 4px rgba(241, 89, 57, .12); }
.inst-filter--hero { background: var(--nt-navy); border-color: var(--nt-navy); color: #fff; }
.inst-filter--hero .inst-filter__top { color: #b6cad6; } .inst-filter--hero .ic { background: rgba(255, 255, 255, .12); color: #fff; }
.inst-filter--hero .inst-filter__n { background: rgba(255, 255, 255, .15); border-color: transparent; color: #fff; }
.inst-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 16px; padding: 12px 14px; background: var(--nt-surface);
  border: 1px solid var(--nt-line); border-radius: var(--nt-radius); }
.inst-bar__field { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; font-weight: 700; color: var(--nt-muted); }
.inst-bar__field .input { min-width: 170px; }
.inst-bar__all { margin-inline-start: auto; }
.inst-bar__all.is-on { background: var(--nt-navy); border-color: var(--nt-navy); color: #fff; }
.inst-group { margin-bottom: 18px; }
.inst-group__head { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 16px; font-weight: 800; }
.inst-group__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--nt-info); }
.inst-group--bad .inst-group__dot { background: var(--nt-danger); } .inst-group--warn .inst-group__dot { background: var(--nt-warning); }
.inst-group--ok .inst-group__dot { background: var(--nt-success); }
.inst-group__n { min-width: 24px; padding: 0 8px; border-radius: 999px; background: var(--nt-surface-2); border: 1px solid var(--nt-line); text-align: center; font-size: 12px; }
.inst-group__sum { margin-inline-start: auto; font-size: 14px; color: var(--nt-muted); }
.inst-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.inst-card { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 14px;
  background: var(--nt-surface); border: 1px solid var(--nt-line); border-radius: var(--nt-radius); box-shadow: var(--nt-shadow); }
.inst-card--overdue { border-inline-start: 4px solid var(--nt-danger); }
.inst-card--due { border-inline-start: 4px solid var(--nt-warning); }
.inst-card--paid { opacity: .78; }
.inst-date { display: grid; place-items: center; height: 58px; border-radius: 12px; background: var(--nt-surface-2); border: 1px solid var(--nt-line); line-height: 1.1; }
.inst-date b { font-size: 22px; font-weight: 800; }
.inst-date small { font-size: 11.5px; color: var(--nt-muted); font-weight: 700; }
.inst-card--overdue .inst-date { background: var(--nt-danger-soft); border-color: transparent; color: var(--nt-danger); }
.inst-card--due .inst-date { background: var(--nt-warning-soft); border-color: transparent; color: var(--nt-warning); }
.inst-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.inst-main__sup { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.inst-main__sup:hover b { color: var(--nt-orange-text); }
.inst-main__inv { font-size: 13px; color: var(--nt-muted); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inst-main__inv:hover { color: var(--nt-orange-text); }
.inst-main__seq { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--nt-muted); font-weight: 700; }
.inst-steps { display: inline-flex; gap: 3px; }
.inst-steps i { width: 14px; height: 5px; border-radius: 3px; background: var(--nt-line-2); }
.inst-steps i.is-before { background: var(--nt-success); } .inst-steps i.is-this { background: var(--nt-orange); }
.inst-money { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: end; }
.inst-money b { font-size: 18px; font-weight: 800; }
.inst-money small { font-size: 12px; color: var(--nt-muted); }
.inst-actions { display: flex; flex-direction: column; gap: 6px; }
.inst-total { margin: 4px 0 0; font-size: 13.5px; color: var(--nt-muted); }
@media (max-width: 760px) {
  .inst-card { grid-template-columns: 54px minmax(0, 1fr); }
  .inst-money { grid-column: 2; align-items: flex-start; text-align: start; }
  .inst-actions { grid-column: 1 / -1; flex-direction: row; }
  .inst-bar__all { margin-inline-start: 0; }
}

/* truck form (2026-10-22): numbered sections beside a live preview card; the capacity as on the APEX screen,
   length × width × height × clearance = box total, front + trailer = capacity */
.vf { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.vf__side { position: sticky; top: 84px; }
.vf__main { min-width: 0; }
.vf-sec { scroll-margin-top: 84px; }
.vf-sec__n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--nt-orange); color: #fff; font-weight: 800; font-size: 13px; }
.vf-sec__hint { margin-inline-start: auto; color: var(--nt-muted); font-size: 12.5px; }
.vf-plate .input { font-weight: 800; letter-spacing: 1px; font-size: 16px; }
.vf-more { margin: 2px 0 10px; border: 1px dashed var(--nt-line-2); border-radius: var(--nt-radius-sm); padding: 8px 12px; }
.vf-more summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; color: var(--nt-heading); list-style: none; }
.vf-more summary::-webkit-details-marker { display: none; }
.vf-more summary svg { width: 16px; height: 16px; transition: transform .2s; }
.vf-more[open] summary svg { transform: rotate(90deg); }
.vf-more summary small { color: var(--nt-muted); font-weight: 500; }
.vf-more[open] > .form-grid { margin-top: 10px; }
.vp { overflow: hidden; }
.vp__img { aspect-ratio: 16 / 9; background: var(--nt-surface-2); }
.vp__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vp__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.vp__kicker { color: var(--nt-muted); font-size: 12px; font-weight: 700; }
.vp__body h3 { font-size: 18px; font-weight: 800; color: var(--nt-heading); }
.vp [data-vp-out].is-empty { color: var(--nt-muted); font-weight: 500; }
.vp__body .plate { border-color: var(--nt-line-2); }
.vp__facts { margin: 0; width: 100%; }
.vp__facts div { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--nt-line); }
.vp__facts dt { color: var(--nt-muted); font-size: 13px; }
.vp__facts dd { margin: 0; font-weight: 700; }
.vp__facts dd b { font-size: 20px; color: var(--nt-heading); }
.vp__facts [hidden] { display: none; }
.vp__steps { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 2px; }
.vp__steps a { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; color: var(--nt-muted); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.vp__steps a:hover { background: var(--nt-surface-2); }
.vp__steps svg { width: 18px; height: 18px; padding: 2px; border-radius: 50%; border: 1.5px solid var(--nt-line-2); color: transparent; transition: background .2s, color .2s, border-color .2s; }
.vp__steps .is-done a { color: var(--nt-heading); }
.vp__steps .is-done svg { background: var(--nt-success); border-color: var(--nt-success); color: #fff; }
.cap-box { margin: 0 0 12px; padding: 10px 14px 4px; border: 1px solid var(--nt-line); border-radius: var(--nt-radius-sm); background: var(--nt-surface-2); min-width: 0; transition: border-color .2s, background .2s; }
.cap-box.is-set { background: var(--nt-surface); border-color: var(--nt-line-2); }
.cap-box legend { display: flex; align-items: center; gap: 8px; padding: 0 6px; font-weight: 800; color: var(--nt-heading); }
.cap-box legend svg { width: 18px; height: 18px; color: var(--nt-orange); }
.cap-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr) auto) minmax(0, 1fr); gap: 0 8px; align-items: start; }
.cap-row .field { margin-bottom: 8px; min-width: 0; }
.cap-row .field label, .cap-out__label { font-size: 12.5px; font-weight: 700; color: var(--nt-heading); }
.cap-op { margin-top: 30px; color: var(--nt-muted); font-weight: 800; font-size: 16px; }
.cap-out__v { display: flex; align-items: center; justify-content: center; min-height: 42px; border-radius: var(--nt-radius-sm); background: var(--nt-surface-2);
  border: 1px solid var(--nt-line); font-size: 18px; font-weight: 800; color: var(--nt-muted); }
.cap-box.is-set .cap-out__v { background: var(--nt-success-soft); border-color: transparent; color: var(--nt-success); }
.cap-box__warn { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--nt-warning); }
.cap-box__warn[hidden] { display: none; }
.cap-box__warn svg { width: 15px; height: 15px; }
/* box sizes in cm or m (2026-10-24): the switch sits on the box's border like its heading */
.cap-box { position: relative; }
.unit-switch { position: absolute; inset-block-start: -15px; inset-inline-end: 12px; display: inline-flex; padding: 2px; gap: 2px;
  border: 1px solid var(--nt-line-2); border-radius: 999px; background: var(--nt-surface); }
.unit-switch button { min-width: 40px; padding: 1px 10px; border: 0; border-radius: 999px; background: none; font: inherit; font-size: 12.5px;
  font-weight: 800; color: var(--nt-muted); cursor: pointer; }
.unit-switch button[aria-pressed="true"] { background: var(--nt-navy); color: #fff; }
.cap-box__conv { margin: -2px 0 8px; font-size: 12.5px; color: var(--nt-muted); text-align: end; }
.cap-box__conv[hidden], .cap-guard[hidden] { display: none; }
.cap-guard { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 10px; padding: 10px 12px; border-radius: 12px;
  background: var(--nt-warning-soft); border: 1px solid #f5d0a2; font-size: 13.5px; font-weight: 600; }
.cap-guard > svg { width: 17px; height: 17px; color: var(--nt-warning); flex: none; }
.cap-guard > span { flex: 1 1 220px; }
.cap-box.is-odd .cap-out__v { background: var(--nt-danger-soft); color: var(--nt-danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }  /* e.g. Save while a box size does not fit its unit */
/* the illustrative photo of a truck without its own: labelled, with a way to add the real one */
.vp__img, .entity-head__img { position: relative; }
.vp__add { position: absolute; inset-block-end: 10px; inset-inline-start: 10px; box-shadow: var(--nt-shadow); background: var(--nt-surface); }
.photo-note[hidden], .vp__add[hidden] { display: none; }
.entity-head__img .photo-note { inset-block-end: 4px; inset-inline-end: 4px; font-size: 10.5px; padding: 1px 6px; }
.cap-total { display: grid; grid-template-columns: minmax(0, 260px) 1fr; gap: 8px 16px; align-items: center; padding: 12px 14px;
  border-radius: var(--nt-radius-sm); background: var(--nt-orange-faint); border: 1px solid var(--nt-orange-soft); }
.cap-total__field .field { margin-bottom: 0; }
.cap-total__field .input { font-size: 20px; font-weight: 800; }
.cap-total__field .input.is-manual { border-color: var(--nt-warning); }
.cap-total__info { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.cap-total__info [hidden] { display: none; }
.cap-total__sum { margin: 0; padding: 8px 12px; border-radius: 8px; background: var(--nt-surface); font-size: 14px; color: var(--nt-muted); }
.cap-total__sum b { color: var(--nt-heading); }
@media (max-width: 1100px) {
  .vf { grid-template-columns: minmax(0, 1fr); }
  .vf__side { display: none; }
}
@media (max-width: 760px) {
  .cap-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cap-op { display: none; }
  .cap-out { grid-column: 1 / -1; }
  .cap-total { grid-template-columns: 1fr; }
  .vf-sec__hint { display: none; }
}

/* truck photos (2026-10-22): several, one of them the main photo */
.pgal-card__n { margin-inline-start: auto; color: var(--nt-muted); font-size: 12.5px; }
.pgal { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pgal__item { position: relative; border-radius: 12px; overflow: hidden; border: 2px solid transparent; background: var(--nt-surface-2); }
.pgal__item.is-main { border-color: var(--nt-orange); }
.pgal__img { display: block; aspect-ratio: 4 / 3; }
.pgal__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.pgal__img:hover img { transform: scale(1.04); }
.pgal__badge { position: absolute; top: 8px; inset-inline-start: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px;
  border-radius: 999px; background: var(--nt-orange); color: #fff; font-size: 12px; font-weight: 800; }
.pgal__badge svg { width: 13px; height: 13px; }
.pgal__actions { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px; background: var(--nt-surface); }
.pgal__actions form:last-child { margin-inline-start: auto; }
.pgal__del { color: var(--nt-danger); }
.pgal-up { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pgal-up__drop { flex: 1 1 260px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px; text-align: center; cursor: pointer;
  border: 2px dashed var(--nt-line-2); border-radius: 12px; background: var(--nt-surface-2); color: var(--nt-heading); transition: border-color .2s, background .2s; }
.pgal-up__drop:hover { border-color: var(--nt-orange); background: var(--nt-orange-faint); }
.pgal-up__drop svg { width: 26px; height: 26px; color: var(--nt-orange); }
.pgal-up__drop small { color: var(--nt-muted); }
.pgal-up [data-photo-input] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pgal-up:focus-within .pgal-up__drop { outline: 2px solid var(--nt-orange); outline-offset: 2px; }
.pgal-up.htmx-request { opacity: .6; pointer-events: none; }
.vf-photos-later { display: flex; align-items: center; gap: 8px; }

/* materials supply (redesign 2026-10-22): bons, truck owners, customers' collection */
.bon { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: 6px; border: 1px dashed var(--nt-orange); background: var(--nt-orange-faint);
  color: var(--nt-orange-d); font-weight: 800; font-family: Consolas, "Cascadia Mono", monospace; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.bon--old { border-style: solid; border-color: var(--nt-line-2); background: var(--nt-surface-2); color: var(--nt-muted); font-family: inherit; font-weight: 700; direction: inherit; }
.bon-pic { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: var(--nt-violet); vertical-align: middle; }
.bon-pic:hover { background: var(--nt-violet-soft); }
.bon-pic svg { width: 16px; height: 16px; }
.sup-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sup-trips td { vertical-align: middle; }
.sup-form { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.sup-side { position: sticky; top: 84px; }
.bon-box { margin-bottom: 14px; padding: 12px 14px 2px; border: 2px solid var(--nt-orange); border-radius: var(--nt-radius-sm); background: var(--nt-orange-faint); transition: border-color .2s, background .2s; }
.bon-box .input { font-size: 20px; font-weight: 800; letter-spacing: 1px; }
.bon-box.is-dup { border-color: var(--nt-danger); background: var(--nt-danger-soft); }
.bon-box__dup { display: flex; align-items: center; gap: 6px; margin: -6px 0 10px; color: var(--nt-danger); font-weight: 700; font-size: 13.5px; }
.bon-box__dup[hidden] { display: none; }
.bon-box__dup svg { width: 16px; height: 16px; flex: none; }
.sup-auto { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; padding: 6px 12px; border-radius: 10px; background: var(--nt-violet-soft); color: var(--nt-violet); font-weight: 700; font-size: 13px; }
.sup-auto[hidden] { display: none; }
.input.is-auto { background: var(--nt-success-soft); border-color: #b6dcc6; }
.sup-src { margin: -10px 0 12px; font-size: 12px; font-weight: 700; color: var(--nt-success); }
.sup-src[hidden] { display: none; }
.sup-miss { margin: -10px 0 12px; padding: 6px 10px; border-radius: 8px; background: var(--nt-warning-soft); color: var(--nt-warning); font-size: 12.5px; font-weight: 700; }
.sup-miss[hidden] { display: none; }
.sup-miss a { color: inherit; text-decoration: underline; white-space: nowrap; }
.sup-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 4px; padding: 12px; border-radius: var(--nt-radius-sm); background: var(--nt-surface-2); text-align: center; }
.sup-totals small { display: block; color: var(--nt-muted); font-size: 12px; font-weight: 700; }
.sup-totals b { font-size: 20px; color: var(--nt-heading); }
.sup-totals__profit b { color: var(--nt-success); }
.sup-recent li { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--nt-line); }
.sup-recent li:last-child { border-bottom: 0; }
.sup-recent li span:last-child { margin-inline-start: auto; }
.sup-search { display: flex; gap: 8px; max-width: 420px; }
.sup-owners { list-style: none; margin: 0; padding: 0; }
.sup-owners > li { border-top: 1px solid var(--nt-line); }
.sup-owner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 18px; color: inherit; text-decoration: none; }
a.sup-owner:hover { background: var(--nt-surface-2); }
.sup-owner .avatar { background: var(--nt-violet-soft); color: var(--nt-violet); }
.sup-owner .avatar svg { width: 18px; height: 18px; }
.sup-owner__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sup-plates { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.plate--sm { font-size: 12px; border-color: var(--nt-line-2); }
.plate--sm .plate__band { font-size: 8px; padding: 0 4px; }
.sup-owner__due { text-align: end; display: flex; flex-direction: column; }
.sup-owner__due b { font-size: 17px; }
.sup-owner__trucks { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 12px; }
.sup-tcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.sup-tcard { padding: 14px 16px; }
.sup-tcard h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 15px; }
.sup-tcard .plate { border-color: var(--nt-line-2); }
.sup-tcard > p { margin: 0 0 6px; font-size: 13px; }
.sup-tcard__facts { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; margin: 8px 0; font-size: 13.5px; }
.sup-tcard__facts dt { color: var(--nt-muted); }
.sup-tcard__facts dd { margin: 0; text-align: end; font-weight: 700; }
.sup-tcard__due { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--nt-orange-faint); font-weight: 800; color: var(--nt-heading); }
.sup-tcard__due b { font-size: 18px; }
.sup-tcard__due.is-neg { background: var(--nt-danger-soft); color: var(--nt-danger); }
.sup-tcard__acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sup-aging { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; }
.sup-aging > div { padding: 12px; text-align: center; border-inline-start: 1px solid var(--nt-line); }
.sup-aging > div:first-child { border-inline-start: 0; }
.sup-aging small { display: block; font-size: 12px; font-weight: 700; color: var(--nt-muted); }
.sup-aging b { font-size: 18px; color: var(--nt-heading); }
.sup-aging .is-warn b { color: var(--nt-warning); }
.sup-aging .is-bad b { color: var(--nt-danger); }
.sup-bar { display: inline-block; width: 90px; vertical-align: middle; }
.sup-dir { border: 0; padding: 0; margin: 0 0 14px; }
.sup-dir legend { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.sup-dir { display: flex; flex-wrap: wrap; gap: 8px; }
.sup-dir legend { width: 100%; }
.sup-dir__opt { flex: 1 1 180px; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1.5px solid var(--nt-line-2); border-radius: 10px; cursor: pointer; font-weight: 700; }
.sup-dir__opt:has(input:checked) { border-color: var(--nt-orange); background: var(--nt-orange-faint); }
.sup-dir__opt input { accent-color: var(--nt-orange-d); }
.sup-alloc__title { margin: 4px 0 6px; font-weight: 700; font-size: 13.5px; }
.sup-alloc td { padding: 6px 8px; }
.sup-alloc tr.is-hit td { background: var(--nt-success-soft); }
.sup-alloc tr.is-part td { background: var(--nt-warning-soft); }
.sup-chips { display: flex; flex-wrap: wrap; gap: 4px; }
[data-belongs-form] .field[hidden], [data-price-form] .field[hidden] { display: none; }
.geo-box { margin: 0 0 14px; padding: 10px 14px 12px; border: 1px solid var(--nt-line); border-radius: var(--nt-radius-sm); background: var(--nt-surface-2); min-width: 0; }
.geo-box legend { display: flex; align-items: center; gap: 6px; padding: 0 6px; font-weight: 800; color: var(--nt-heading); }
.geo-box legend svg { width: 17px; height: 17px; color: var(--nt-orange); }
.geo-box .field { margin-bottom: 8px; }
.geo-box__tools { display: flex; flex-wrap: wrap; gap: 6px; }
.geo-box__state { margin: 6px 0 0; font-variant-numeric: tabular-nums; }
.geo-box__map { margin-top: 10px; border-radius: 12px; overflow: hidden; border: 1px solid var(--nt-line); aspect-ratio: 16 / 9; background: var(--nt-surface); }
.geo-box__map[hidden] { display: none; }
.geo-box__map iframe { width: 100%; height: 100%; border: 0; display: block; }
.geo-links { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.drv-list { list-style: none; margin: 0; padding: 0; }
.tbl .sn { width: 40px; text-align: center; color: var(--nt-muted); font-weight: 700; font-size: 12.5px; }
.price-row.is-old td { color: var(--nt-muted); }
.price-row .chip { margin-inline-start: 6px; }
.trip-v { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.trip-v__photo { grid-column: 1 / -1; display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--nt-line); max-height: 260px; background: var(--nt-surface-2); }
.trip-v__photo img { width: 100%; height: 100%; max-height: 260px; object-fit: contain; display: block; }
.trip-v > .notice { grid-column: 1 / -1; margin: 0; }
.trip-v__sec { padding: 10px 14px; border: 1px solid var(--nt-line); border-radius: var(--nt-radius-sm); background: var(--nt-surface); min-width: 0; }
.trip-v__sec h2 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 14px; font-weight: 800; color: var(--nt-heading); }
.trip-v__sec h2 svg { width: 16px; height: 16px; color: var(--nt-orange); }
.trip-v__dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 14px; }
.trip-v__dl dt { color: var(--nt-muted); }
.trip-v__dl dd { margin: 0; font-weight: 700; color: var(--nt-heading); }
.trip-v__money { font-size: 13.5px; }
.trip-v__money th[scope="row"] { font-weight: 600; text-align: start; }
.trip-v__stamp { grid-column: 1 / -1; margin: 0; font-size: 12.5px; }
.trip-v__chips { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 640px) { .trip-v { grid-template-columns: minmax(0, 1fr); } }
.settle-sum { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--nt-radius-sm); background: var(--nt-surface-2); }
.settle-sum > div { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; }
.settle-sum dt { color: var(--nt-muted); }
.settle-sum dd { margin: 0; font-weight: 700; color: var(--nt-heading); }
.settle-sum__due { margin-top: 4px; padding-top: 8px !important; border-top: 1px dashed var(--nt-line-2); }
.settle-sum__due dt, .settle-sum__due dd { font-weight: 800; color: var(--nt-heading); font-size: 16px; }
.settle-carry { margin: -6px 0 14px; color: var(--nt-muted); font-size: 13.5px; }
.settle-carry b { color: var(--nt-heading); }
.sup-truck-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 6px; }
.sup-truck-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.sup-truck-meta svg { width: 15px; height: 15px; color: var(--nt-muted); }
.page-head h1 .plate { font-size: 20px; border-color: var(--nt-line-2); }
.drv { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--nt-line); }
.drv:first-child { border-top: 0; }
.drv__who { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.drv.is-past { opacity: .7; }
.drv.is-now { background: var(--nt-success-soft); }
.drv-mini { list-style: none; margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; background: var(--nt-surface-2); font-size: 13px; display: grid; gap: 2px; }
.geo-pin { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--nt-info-soft); color: var(--nt-info); font-size: 12.5px; font-weight: 700; text-decoration: none; }
.geo-pin:hover { filter: brightness(.96); }
.geo-pin svg { width: 14px; height: 14px; }
.geo-pin--wa { background: var(--nt-success-soft); color: var(--nt-success); }
@media (max-width: 1100px) {
  .sup-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sup-form { grid-template-columns: minmax(0, 1fr); }
  .sup-side { position: static; }
}
@media (max-width: 640px) {
  .sup-aging { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sup-aging > div:nth-child(3) { border-inline-start: 0; }
  .sup-owner { grid-template-columns: auto minmax(0, 1fr); }
  .sup-owner__due { grid-column: 2; text-align: start; }
  .sup-totals b { font-size: 16px; }
}

/* delivery to the site (2026-10-22): the owner's board and order, the phone pages opened from a link */
.dl-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpi--ok b { color: var(--nt-success); } .kpi--warn b { color: var(--nt-warning); } .kpi--bad b { color: var(--nt-danger); }
.dl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.dl-board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.dl-col { background: var(--nt-surface-2); border: 1px solid var(--nt-line); border-radius: 14px; padding: 8px; min-width: 0; }
.dl-col h2 { display: flex; align-items: center; gap: 6px; margin: 2px 4px 8px; font-size: 13px; font-weight: 800; color: var(--nt-heading); }
.dl-col h2 b { margin-inline-start: auto; background: var(--nt-surface); border-radius: 999px; padding: 0 8px; font-size: 12px; }
.dl-ord { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; padding: 8px 10px; border-radius: 12px; background: var(--nt-surface); border: 1px solid var(--nt-line);
  color: inherit; text-decoration: none; font-size: 13px; box-shadow: var(--nt-shadow); transition: border-color .2s, transform .2s; }
.dl-ord:hover { border-color: var(--nt-orange); transform: translateY(-1px); }
.dl-ord.is-bad { border-color: var(--nt-danger); }
.dl-ord .bon { align-self: flex-start; margin-top: 2px; }
.dl-empty { text-align: center; margin: 6px 0; }
.dl-exc ul { list-style: none; margin: 0; padding: 4px 16px 10px; }
.dl-exc li { display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--nt-line); font-size: 13.5px; }
.dl-exc li:last-child { border-bottom: 0; }
.dl-exc a { color: inherit; text-decoration: none; }
.dl-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--nt-info); }
.dl-dot--bad { background: var(--nt-danger); } .dl-dot--warn { background: var(--nt-warning); }
.dl-send { align-items: flex-start; margin-bottom: 16px; }
.dl-detail { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.dl-tl { list-style: none; margin: 0; padding: 0; position: relative; }
.dl-tl::before { content: ""; position: absolute; inset-inline-start: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--nt-line); }
.dl-tl__item { position: relative; padding: 2px 0 12px; padding-inline-start: 30px; display: flex; flex-direction: column; gap: 1px; }
.dl-tl__item::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--nt-success);
  color: #fff; font-size: 11px; display: grid; place-items: center; }
.dl-tl__item.is-warn::before { content: "!"; background: var(--nt-warning); }
.dl-tl__item.is-bad::before { content: "✗"; background: var(--nt-danger); }
.dl-thumb { display: inline-block; margin-top: 4px; width: 110px; height: 80px; border-radius: 8px; overflow: hidden; border: 1px solid var(--nt-line); }
.dl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dl-checks p { margin: 0 0 4px; font-weight: 700; }
@media (max-width: 1200px) { .dl-layout, .dl-detail { grid-template-columns: minmax(0, 1fr); } .dl-board { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dl-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .dl-board { grid-template-columns: minmax(0, 1fr); } }
body.pub { background: var(--nt-bg); margin: 0; }
.pub__bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--nt-navy); color: #fff; }
.pub__bar small { display: block; color: #b9d0dd; font-size: 12.5px; }
.pub__ic { font-size: 22px; }
.pub__main { max-width: 520px; margin: 0 auto; padding: 12px 14px 24px; display: flex; flex-direction: column; gap: 12px; }
.pub__foot { text-align: center; color: var(--nt-muted); font-size: 12px; padding: 0 0 18px; }
.pub-card { background: var(--nt-surface); border: 1px solid var(--nt-line); border-radius: 14px; padding: 12px 14px; }
.pub-note { margin: 8px 0 0; padding: 6px 10px; border-radius: 8px; background: var(--nt-warning-soft); color: var(--nt-warning); font-weight: 700; font-size: 13.5px; }
.pub-map { border-radius: 14px; overflow: hidden; border: 1px solid var(--nt-line); aspect-ratio: 16 / 10; background: var(--nt-surface); }
.pub-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.pub-wide { width: 100%; justify-content: center; }
.pub-big { width: 100%; justify-content: center; padding: 14px 18px; font-size: 17px; border-radius: 14px; }
.pub-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }  /* minmax: the file input's own width must not widen the page (2026-10-27) */
.pub-step { background: var(--nt-surface); border: 1px solid var(--nt-line); border-radius: 14px; padding: 10px 12px; }
.pub-step.is-now { border-color: var(--nt-orange); background: var(--nt-orange-faint); }
.pub-step.is-done { opacity: .75; }
.pub-step__head { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; align-items: center; }
.pub-step__head i { grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; background: var(--nt-surface-2); }
.pub-step.is-now .pub-step__head i { background: var(--nt-orange); color: #fff; }
.pub-step.is-done .pub-step__head i { background: var(--nt-success); color: #fff; }
.pub-step__head small { color: var(--nt-muted); font-size: 12.5px; }
.pub-step__form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 10px; }
.pub-bon { font-size: 20px; font-weight: 800; letter-spacing: 1px; }
.pub-file { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 2px dashed var(--nt-line-2); border-radius: 12px; background: var(--nt-surface-2); font-weight: 700; cursor: pointer; }
.pub-file input { flex: 1; min-width: 0; font-size: 12px; }
.pub-file svg { width: 20px; height: 20px; color: var(--nt-orange); }
.pub-qr { text-align: center; }
.pub-qr .qr { width: 240px; height: 240px; margin: 6px auto; display: block; background: #fff; border-radius: 12px; }
.pub-qr__head { font-weight: 800; margin: 0; }
.pub-qr__foot { margin: 4px 0 0; }
.pub-wait { margin: 8px 0 0; font-weight: 700; color: var(--nt-muted); }
.pub-ok { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 20px 12px; border-radius: 14px; background: var(--nt-success-soft); }
.pub-ok span { width: 60px; height: 60px; border-radius: 50%; background: var(--nt-success); color: #fff; display: grid; place-items: center; font-size: 30px; font-weight: 800; }
.pub-ok b { font-size: 18px; color: var(--nt-success); }
.pub-ok.is-bad { background: var(--nt-danger-soft); }
.pub-ok.is-bad span { background: var(--nt-danger); }
.pub-ok.is-bad b { color: var(--nt-danger); }
.pub-who { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--nt-violet-soft); color: var(--nt-violet); font-weight: 700; }
.pub-who b { display: block; color: var(--nt-heading); }
.pub-who small { font-size: 12.5px; }
.pub-links { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0 0; }
.pub-links a { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.pub-answer { display: grid; gap: 10px; }
.pub-dispute summary { list-style: none; }
.pub-dispute[open] { display: grid; gap: 8px; }
.pub-danger { border-color: var(--nt-danger); color: var(--nt-danger); }
.pub-small { font-size: 12.5px; margin: 0; }
.pub-approve { display: grid; gap: 10px; }
.pub-refused { padding: 12px 14px; border-radius: 14px; border: 2px solid var(--nt-danger); background: var(--nt-danger-soft); color: var(--nt-danger); }
.pub-refused b { display: block; font-size: 16px; margin-bottom: 4px; }
.pub-refused ul { margin: 0 0 6px; padding: 0; list-style: none; display: grid; gap: 4px; font-weight: 700; }
.pub-refused small { color: var(--nt-muted); }
.btn.is-busy { opacity: .6; pointer-events: none; }

/* ---------- admin panel: overview + Usage tab (mock-up approved 2026-10-23) ---------- */
.chip--violet { background: var(--nt-violet-soft); border-color: #d9cffb; color: var(--nt-violet); }
.ap-sec { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 24px 0 12px; font-size: 17px; font-weight: 800; color: var(--nt-heading); }
.ap-sec h2 { font-size: 17px; font-weight: 800; }
.ap-sec .ap-more { margin-inline-start: auto; }
.ap-sec--first { margin-top: 4px; }
.ap-more { display: inline-flex; align-items: center; gap: 2px; font-size: 13.5px; font-weight: 700; text-decoration: none; }
.ap-more .nt-ico { width: 15px; height: 15px; }
.ap-sub { font-size: 12.5px; margin: 0 0 6px; }
.ap-block { display: block; }
.ap-bad { color: var(--nt-danger); }
.ap-todo { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ap-todo__card { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; border-inline-start: 4px solid var(--nt-orange); }
.ap-todo__card.is-calm { border-inline-start-color: var(--nt-success); }
.ap-todo__card h3 { font-size: 14.5px; font-weight: 800; color: var(--nt-heading); }
.ap-todo__head { display: flex; align-items: center; gap: 10px; }
.ap-todo__head b { margin-inline-start: auto; font-size: 28px; font-weight: 800; line-height: 1; color: var(--nt-heading); }
.ap-todo__card.is-calm .ap-todo__head b { color: var(--nt-muted); }
.ap-todo__list { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.ap-todo__list li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-top: 1px dashed var(--nt-line); }
.ap-todo__list li > span:last-child { font-weight: 700; white-space: nowrap; color: var(--nt-heading); }
.ap-todo__list a { color: var(--nt-text); text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-todo__list a:hover { color: var(--nt-orange-text); }
.ap-todo__card .ap-more { margin-top: auto; }
.ap-two { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.ap-two--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ap-pulse { gap: 16px; }
.ap-pulse .kpi b small, .ap-totals .kpi b small { font-size: 14px; color: var(--nt-muted); font-weight: 700; }
.ap-hero { gap: 4px; }
.ap-hero .ic { background: rgba(255, 255, 255, .12); color: #fff; }
.ap-hero__n { font-size: 40px !important; line-height: 1.1; }
.ap-stack { display: flex; height: 12px; border-radius: 999px; overflow: hidden; margin: 12px 0 8px; background: rgba(255, 255, 255, .1); position: relative; z-index: 1; }
.ap-stack span { display: block; height: 100%; width: 0; transition: width .6s var(--nt-ease); }
.ap-st--active { background: #2fa36b; } .ap-st--trial { background: #4a90c2; } .ap-st--expiring { background: #e0a030; }
.ap-st--expired { background: #d9534f; } .ap-st--inactive { background: #8f7fd6; }
.ap-legend { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; position: relative; z-index: 1; }
.ap-legend a { display: flex; flex-direction: column; padding: 7px 9px; border-radius: 10px; background: rgba(255, 255, 255, .07); color: #d6e0e6; font-size: 12.5px; text-decoration: none; }
.ap-legend a:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.ap-legend b { font-size: 18px !important; color: #fff; }
.ap-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-inline-end: 5px; }
.ap-hero__users { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 13px; color: #c4d0d8; position: relative; z-index: 1; }
.ap-hero__users b { font-size: 16px !important; color: #fff; }
.ap-meter { display: block; height: 6px; border-radius: 999px; background: var(--nt-surface-2); outline: 1px solid var(--nt-line); overflow: hidden; margin-top: 4px; }
.ap-meter > span { display: block; height: 100%; width: 0; background: var(--nt-success); border-radius: 999px; transition: width .6s var(--nt-ease); }
.ap-meter--info > span { background: var(--nt-info); }
.ap-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--nt-surface-2); border: 1px solid var(--nt-line); border-radius: 10px; }
.ap-seg [role="tab"] { border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--nt-muted); padding: 3px 12px; border-radius: 8px; cursor: pointer; }
.ap-seg [role="tab"][aria-selected="true"] { background: var(--nt-surface); color: var(--nt-heading); box-shadow: var(--nt-shadow); }
.ap-chart { max-height: 230px; }
.ap-chart .ap-chart__top { fill: var(--nt-heading); font-weight: 700; font-size: 11px; }
.ap-rows { list-style: none; margin: 0; padding: 0; }
.ap-rows li + li { border-top: 1px solid var(--nt-line); }
.ap-rows a { display: flex; align-items: center; gap: 10px; padding: 10px 18px; color: var(--nt-text); text-decoration: none; }
.ap-rows a:hover { background: var(--nt-surface-2); }
.ap-rows__t { flex: 1; min-width: 0; }
.ap-rows__t b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--nt-heading); }
.ap-rows__t small { color: var(--nt-muted); }
.ap-av { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--nt-orange-soft); color: var(--nt-orange-text); font-weight: 800; }
.ap-av--bad { background: var(--nt-danger-soft); color: var(--nt-danger); }
.ap-av .nt-ico { width: 17px; height: 17px; }
.ap-privacy { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin-bottom: 16px; border-radius: 14px; background: var(--nt-violet-soft); border: 1px solid #d9cffb; font-size: 13.5px; }
.ap-privacy > .nt-ico { flex: none; width: 32px; height: 32px; padding: 7px; border-radius: 10px; background: var(--nt-violet); color: #fff; }
.ap-privacy p { margin: 0; }
.ap-privacy p + p { margin-top: 4px; }
.ap-totals { margin-bottom: 16px; }
.ap-filters select.input { width: auto; }
.ap-usage td { white-space: nowrap; }
.tbl.ap-usage th, .tbl.ap-usage td { padding-inline: 8px; }
.tbl.ap-usage th { white-space: normal; vertical-align: bottom; line-height: 1.35; }
.ap-usage .ap-wrap { white-space: normal; min-width: 96px; }
@media (max-width: 1500px) { .ap-usage .ap-mh { display: none; } }  /* in the business pop-up instead */
.ap-usage .ap-usage__name { white-space: normal; min-width: 140px; max-width: 200px; }
.ap-usage .ap-usage__name b { display: block; line-height: 1.35; }
.ap-sort { color: inherit; text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }
.ap-sort span { font-size: 10px; opacity: .45; }
.ap-sort.is-on { color: var(--nt-heading); }
.ap-sort.is-on span { opacity: 1; color: var(--nt-orange-text); }
.ap-spark { width: 72px; height: 20px; display: block; }
.ap-spark line { stroke: var(--nt-line-2); }
.ap-spark rect { fill: var(--nt-navy); }
.ap-spark rect.is-now { fill: var(--nt-orange); }
.ap-foot { font-size: 12.5px; margin: 0; padding: 10px 16px; border-top: 1px solid var(--nt-line); }
.ap-owner__title { font-size: 20px; font-weight: 800; color: var(--nt-heading); margin-bottom: 6px; }
.dlg .ap-owner__title { display: none; }  /* the pop-up's bar already shows the name */
.ap-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ap-owner__kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.ap-owner__kpis .kpi { padding: 12px 14px; }
.ap-owner__kpis .kpi b { font-size: 22px; }
.ap-owner__kpis .kpi__top .nt-ico { width: 16px; height: 16px; }
.ap-owner__chart { margin-bottom: 12px; }
.ap-owner__chart .card__head, .ap-owner__chart .card__body { padding: 10px 14px; }
.ap-facts { margin: 0 0 12px; padding: 2px 0; }
.ap-facts > div, .ap-facts li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px; border-top: 1px solid var(--nt-line); font-size: 14px; }
.ap-facts > div:first-child { border-top: 0; }
.ap-facts dt { color: var(--nt-muted); }
.ap-facts dd { margin: 0; font-weight: 700; text-align: end; }
.ap-facts ul { list-style: none; margin: 0; padding: 0; }
.ap-facts__title { font-size: 14.5px; font-weight: 800; padding: 10px 14px 6px; color: var(--nt-heading); }
.ap-support { margin-bottom: 4px; }
@media (max-width: 1100px) { .ap-todo { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ap-two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .ap-two--even { grid-template-columns: minmax(0, 1fr); }
  .ap-legend { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ap-todo { gap: 10px; }
  .ap-todo__card { padding: 12px; }
  .ap-todo__head b { font-size: 24px; }
  .ap-pulse, .ap-totals { gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-pulse .kpi b, .ap-totals .kpi b { font-size: 22px; }
  .ap-owner__kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-filters select.input { flex: 1 1 140px; }
}
@media (max-width: 767px) {  /* the usage table as compact two-column cards (tbl--cards) */
  .tbl--cards.ap-usage tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 14px; }
  .tbl--cards.ap-usage td { flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 0; padding: 3px 0; white-space: normal; }
  .tbl--cards.ap-usage td::before { font-size: 11.5px; }
  .tbl--cards.ap-usage td.n { text-align: start; }
  .tbl--cards.ap-usage td.ap-usage__name { grid-column: 1 / -1; max-width: none; padding-top: 6px; }
  .tbl--cards.ap-usage td.ap-usage__name::before { display: none; }
  .tbl--cards.ap-usage td.ap-mh { display: none; }
  .tbl--cards.ap-usage td.empty { grid-column: 1 / -1; }
}
@media (max-width: 420px) { .ap-todo__list { display: none; } .ap-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
:root[data-theme="dark"] .ap-privacy, :root[data-theme="dark"] .chip--violet { border-color: rgba(169, 144, 242, .35); }
:root[data-theme="dark"] .ap-spark rect { fill: #5b88a6; }
:root[data-theme="dark"] .ap-spark rect.is-now { fill: var(--nt-orange); }

/* ---------- first-run guide (2026-10-24, mock-up 06_Documentation/Django_Mockups_2026-10-24_FirstRun): "Start here" on
   the home page, locked quick actions, today's tasks, the "How to get started" page and empty states that say what next.
   Tokens only, so the dark themes need no extra rules. ---------- */
.nav a.nav-start { background: rgba(241,89,57,.1); border: 1px dashed rgba(241,89,57,.55); margin-block: 8px 2px; }
.nav a.nav-start:hover { background: rgba(241,89,57,.18); }
.g-guide { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; }
.g-tasks { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
.guide__bar { flex: 1; max-width: 220px; min-width: 90px; }
.card__head form.end, .notice-card form.end { margin: 0; margin-inline-start: auto; }
.gsteps { list-style: none; margin: 0; padding: 4px 0; }
.gstep { display: flex; gap: 14px; align-items: flex-start; padding: 12px 18px; border-top: 1px solid var(--nt-line); }
.gstep:first-child { border-top: 0; }
.gstep__n { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px;
  border: 2px solid var(--nt-line-2); color: var(--nt-muted); background: var(--nt-surface); }
.gstep__n svg { width: 16px; height: 16px; }
.gstep__body { flex: 1; min-width: 0; }
.gstep__body b { display: block; color: var(--nt-heading); font-size: 15px; }
.gstep__body p { margin: 2px 0 0; color: var(--nt-muted); font-size: 13.5px; }
.gstep__act { flex: none; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.gstep.is-done .gstep__n { background: var(--nt-success); border-color: var(--nt-success); color: #fff; }
.gstep.is-done .gstep__body b { color: var(--nt-muted); }
.gstep.is-locked .gstep__n { border-style: dashed; }
.gstep.is-next { background: var(--nt-orange-faint); box-shadow: inset 4px 0 0 var(--nt-orange); }
[dir="rtl"] .gstep.is-next { box-shadow: inset -4px 0 0 var(--nt-orange); }
.gstep.is-next .gstep__n { background: var(--nt-orange-d); border-color: var(--nt-orange-d); color: #fff; }
.gstep.is-next .gstep__body b { font-size: 16px; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 800; padding: 0 8px; border-radius: 999px; vertical-align: 2px;
  background: var(--nt-surface-2); color: var(--nt-muted); border: 1px solid var(--nt-line); }
.tag--must { background: var(--nt-orange-soft); color: var(--nt-orange-text); border-color: transparent; }
.cycle { list-style: none; margin: 0; padding: 6px 18px 12px; }
.cycle li { position: relative; display: flex; gap: 12px; padding: 10px 0; }
.cycle li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 15px; top: 46px; bottom: -6px; width: 2px; background: var(--nt-line); }
.cycle b { display: block; color: var(--nt-heading); font-size: 14.5px; }
.cycle small { display: block; color: var(--nt-muted); font-size: 13px; }
.cycle__here { color: var(--nt-orange-text); font-weight: 800; font-size: 13px; }
.qa { position: relative; }
.qa--locked { background: var(--nt-surface-2); border-style: dashed; }
.qa--locked .ic { filter: grayscale(1); opacity: .55; }
.qa--locked b { color: var(--nt-muted); }
.qa--locked small { color: var(--nt-warning); font-weight: 700; }
.qa__lock { position: absolute; inset-block-start: 8px; inset-inline-end: 8px; color: var(--nt-muted); display: inline-flex; }
.qa__lock svg { width: 15px; height: 15px; }
.qa--next { border-color: var(--nt-orange); box-shadow: 0 0 0 3px var(--nt-orange-soft); }
.menu a.is-locked small { color: var(--nt-warning); font-weight: 700; }
.menu a.is-locked small svg { width: 13px; height: 13px; vertical-align: -2px; }
.kpi--ghost { min-height: 92px; border-style: dashed; background: var(--nt-surface-2); box-shadow: none; }
.kpi--ghost i { display: block; height: 10px; border-radius: 6px; background: var(--nt-line); width: 60%; margin-top: 12px; }
.kpi--ghost i + i { width: 35%; }
.notice-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; color: var(--nt-muted); font-size: 14px; }
.notice-card > span:not(.ic) { flex: 1; min-width: 220px; }
.notice-card b { color: var(--nt-heading); }
.task.is-done b { color: var(--nt-muted); }
.task__trucks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.truck-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px; padding-inline-start: 10px; border-radius: 10px; background: var(--nt-surface-2);
  border: 1px solid var(--nt-line); font-size: 13px; font-weight: 700; color: var(--nt-heading); text-decoration: none; }
.truck-chip svg { width: 15px; height: 15px; }
.truck-chip small { display: inline; color: var(--nt-muted); font-weight: 600; }
.truck-chip span { border-radius: 8px; background: var(--nt-orange-d); color: #fff; font-size: 12px; font-weight: 800; padding: 1px 8px; }
.truck-chip:hover { border-color: var(--nt-orange); color: var(--nt-heading); }
.truck-chip--more { padding-inline-end: 10px; }
.month-end .card__head { background: var(--nt-violet-soft); border-radius: var(--nt-radius) var(--nt-radius) 0 0; }
.phases { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.phase .card__head { border-radius: var(--nt-radius) var(--nt-radius) 0 0; }
.phase--once .card__head { background: var(--nt-orange-soft); }
.phase--day .card__head { background: var(--nt-success-soft); }
.phase--month .card__head { background: var(--nt-violet-soft); }
.phase__steps { margin: 0; padding: 6px 18px 14px; list-style: none; counter-reset: s; }
.phase__steps li { counter-increment: s; position: relative; padding: 12px 0; padding-inline-start: 40px; border-top: 1px solid var(--nt-line); }
.phase__steps li:first-child { border-top: 0; }
.phase__steps li::before { content: counter(s); position: absolute; inset-inline-start: 0; top: 13px; width: 28px; height: 28px; border-radius: 50%; display: grid;
  place-items: center; font-weight: 800; font-size: 13px; background: var(--nt-surface-2); border: 1px solid var(--nt-line-2); color: var(--nt-heading); }
.phase__steps li.is-done::before { background: var(--nt-success); border-color: var(--nt-success); color: #fff; }
.phase__steps b { display: block; color: var(--nt-heading); font-size: 14.5px; }
.phase__steps p { margin: 2px 0 8px; font-size: 13px; color: var(--nt-muted); }
.empty-guide { text-align: center; padding: 40px 20px 30px; }
.empty-guide--compact { padding: 24px 12px 16px; box-shadow: none; }
.empty-guide__art { width: 92px; height: 92px; margin: 0 auto 14px; border-radius: 28px; display: grid; place-items: center; background: var(--nt-orange-soft); color: var(--nt-orange-text); }
.empty-guide__art svg { width: 44px; height: 44px; }
.empty-guide__art--warn { background: var(--nt-warning-soft); color: var(--nt-warning); }
.empty-guide h2 { font-size: 20px; font-weight: 800; color: var(--nt-heading); }
.empty-guide p { max-width: 560px; margin: 8px auto 0; color: var(--nt-muted); }
.empty-guide__acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.empty-guide__next { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 760px; margin: 26px auto 0; padding: 0; list-style: none;
  counter-reset: s; text-align: start; }
.empty-guide__next li { counter-increment: s; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--nt-line); background: var(--nt-surface-2); font-size: 13.5px; color: var(--nt-muted); }
.empty-guide__next li::before { content: counter(s); font-weight: 800; color: var(--nt-orange-text); margin-inline-end: 6px; }
.empty-guide__next b { color: var(--nt-heading); font-size: 14px; }
.empty-guide__next b::after { content: ""; display: block; }
@media (max-width: 1100px) { .g-guide, .g-tasks, .phases { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .gstep { flex-wrap: wrap; }
  .gstep__act { width: 100%; justify-content: flex-start; padding-inline-start: 46px; }
  .empty-guide__next { grid-template-columns: 1fr; }
}

/* ---------- admin panel: data quality + traffic (mock-up approved 2026-10-24) ---------- */
.ap-groups { display: flex; flex-wrap: wrap; gap: 6px; margin-inline-start: auto; }
.ap-groups--pad { margin: 0; padding: 12px 14px; border-bottom: 1px solid var(--nt-line); }
.ap-groups .chip .num { opacity: .7; font-size: 12px; }
.ap-chks { list-style: none; margin: 0; padding: 0; }
.ap-chks > li + li { border-top: 1px solid var(--nt-line); }
.ap-chk { display: grid; grid-template-columns: 8px minmax(0, 1.8fr) 72px 72px 124px minmax(0, 1.3fr); gap: 12px; align-items: center; padding: 12px 16px; color: var(--nt-text); text-decoration: none; }
a.ap-chk:hover { background: var(--nt-orange-faint); color: var(--nt-text); }
.ap-chk--head { padding-block: 8px; background: var(--nt-surface-2); border-bottom: 1px solid var(--nt-line); font-size: 12px; font-weight: 700; color: var(--nt-muted); border-radius: var(--nt-radius) var(--nt-radius) 0 0; }
.ap-chk__t b { display: block; font-size: 14.5px; color: var(--nt-heading); }
.ap-chk__t small { color: var(--nt-muted); }
.ap-chk__n { text-align: center; }
.ap-chk__n b { display: block; font-size: 18px; font-weight: 800; color: var(--nt-heading); line-height: 1.2; }
.ap-chk__n small { color: var(--nt-muted); font-size: 11.5px; }
.ap-chk--head .ap-chk__n, .ap-chk--head > span:nth-child(3), .ap-chk--head > span:nth-child(4) { text-align: center; }
.ap-chk__fix { font-size: 13px; color: var(--nt-muted); }
.ap-sev { width: 8px; height: 38px; border-radius: 999px; background: #9fb0bc; }
.ap-sev--high { background: var(--nt-danger); } .ap-sev--medium { background: #e0a030; }
.ap-spark8 { display: block; width: 120px; height: 30px; }
.ap-spark8 line { stroke: var(--nt-line-2); }
.ap-spark8 rect { fill: var(--nt-navy-3); } .ap-spark8 rect.is-now { fill: var(--nt-orange); }
.ap-spark8 .is-fix, .ap-fixline { stroke: var(--nt-success); stroke-width: 2; stroke-dasharray: 3 3; }
.ap-facts3 { margin-bottom: 16px; }
.ap-fact { padding: 14px 16px; }
.ap-fact h2 { font-size: 14.5px; font-weight: 800; display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--nt-heading); }
.ap-fact h2 .nt-ico { width: 18px; height: 18px; }
.ap-fact p { margin: 0; font-size: 13.5px; }
.ap-fact ul { margin: 0; padding-inline-start: 18px; font-size: 13.5px; }
.ap-fact--how { border-top: 4px solid var(--nt-info); } .ap-fact--cause { border-top: 4px solid #e0a030; } .ap-fact--fix { border-top: 4px solid var(--nt-success); }
.ap-mask span { color: var(--nt-faint); letter-spacing: 1px; }
.ap-mask mark { background: #fff1b8; color: var(--nt-text); border-radius: 3px; padding: 0 2px; font-weight: 700; white-space: pre; }
.ap-hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.ap-hbars li { display: grid; grid-template-columns: minmax(0, 170px) minmax(0, 1fr) 56px; gap: 10px; align-items: center; font-size: 13.5px; }
.ap-hbars--wide li { grid-template-columns: minmax(0, 220px) minmax(0, 1fr) 56px; }
.ap-hbars li > bdi { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-hbars b { text-align: end; color: var(--nt-heading); }
.ap-hbar { display: block; height: 10px; border-radius: 999px; background: var(--nt-surface-2); outline: 1px solid var(--nt-line); overflow: hidden; }
.ap-hbar > span { display: block; height: 100%; width: 0; background: var(--nt-navy-3); border-radius: 999px; transition: width .6s var(--nt-ease); }
.ap-hbars li.is-hl .ap-hbar > span { background: var(--nt-orange); }
@media (max-width: 1100px) { .ap-chk { grid-template-columns: 8px minmax(0, 1fr) 64px 64px 124px; } .ap-chk__fix { display: none; } }
@media (max-width: 760px) {
  .ap-chk--head { display: none; }
  .ap-chk { grid-template-columns: 8px minmax(0, 1fr) auto; grid-template-areas: "s t t" "s a b" "s sp sp"; gap: 4px 10px; }
  .ap-chk .ap-sev { grid-area: s; height: 100%; }
  .ap-chk__t { grid-area: t; }
  .ap-chk__n { text-align: start; }
  .ap-chk__n b { display: inline; font-size: 15px; margin-inline-end: 6px; }
  .ap-chk > span:nth-child(3) { grid-area: a; } .ap-chk > span:nth-child(4) { grid-area: b; } .ap-chk > span:nth-child(5) { grid-area: sp; }
  .ap-groups { margin-inline-start: 0; }
  .ap-hbars li, .ap-hbars--wide li { grid-template-columns: minmax(0, 110px) minmax(0, 1fr) 48px; }
}
:root[data-theme="dark"] .ap-mask mark { background: rgba(242, 180, 90, .3); color: var(--nt-heading); }
:root[data-theme="dark"] .ap-spark8 rect { fill: #5b88a6; }
:root[data-theme="dark"] .ap-spark8 rect.is-now { fill: var(--nt-orange); }

/* >>> generated by scripts/dark_auto.py: dark rules for theme = follow the device (do not edit) */
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] { --nt-bg: #0d1820; --nt-surface: #13232e; --nt-surface-2: #172a37; --nt-line: #22384a; --nt-line-2: #2c475b; --nt-text: #e6edf2; --nt-heading: #f1f5f8; --nt-muted: #9fb0bc; --nt-faint: #8ea1ad; --nt-orange-soft: rgba(241, 89, 57, .16); --nt-orange-faint: rgba(241, 89, 57, .08); --nt-sand-l: #1a2d3a; --nt-orange-text: #ff8a6b; --nt-orange-text-strong: #ffa58c; --nt-success: #4cc38a; --nt-danger: #ff7b70; --nt-warning: #f2b45a; --nt-info: #7dbbe6; --nt-violet: #a990f2; --nt-success-soft: rgba(22, 120, 74, .22); --nt-danger-soft: rgba(180, 35, 24, .22); --nt-warning-soft: rgba(180, 83, 9, .22); --nt-info-soft: rgba(31, 95, 139, .26); --nt-violet-soft: rgba(109, 75, 216, .24); --nt-shadow: 0 1px 2px rgba(0, 0, 0, .3); --nt-shadow-lg: 0 18px 44px rgba(0, 0, 0, .45); color-scheme: dark; }
  :root[data-theme="auto"] .when-light { display: none; }
  :root[data-theme="auto"] .when-dark { display: contents; }
  :root[data-theme="auto"] .chart .bar { fill: #3e6a86; }
  :root[data-theme="auto"] .chart .bar--now { fill: #5b88a6; }
  :root[data-theme="auto"] .notice, :root[data-theme="auto"] .reach, :root[data-theme="auto"] .danger-zone, :root[data-theme="auto"] .btn--danger { border-color: var(--nt-line-2); }
  :root[data-theme="auto"] .notice--ok, :root[data-theme="auto"] .reach { color: var(--nt-success); }
  :root[data-theme="auto"] .btn--warn, :root[data-theme="auto"] .support-banner { color: var(--nt-warning); border-color: var(--nt-line-2); }
  :root[data-theme="auto"] .truck-card__img .chip--ok, :root[data-theme="auto"] .truck-card__img .chip--warn { background: rgba(13, 24, 32, .86); }
  :root[data-theme="auto"] .plate-badge { box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
  :root[data-theme="auto"] img.photo, :root[data-theme="auto"] .entity-head__img img, :root[data-theme="auto"] .photo-frame { filter: brightness(.92); }
  :root[data-theme="auto"] .ap-privacy, :root[data-theme="auto"] .chip--violet { border-color: rgba(169, 144, 242, .35); }
  :root[data-theme="auto"] .ap-spark rect { fill: #5b88a6; }
  :root[data-theme="auto"] .ap-spark rect.is-now { fill: var(--nt-orange); }
  :root[data-theme="auto"] .ap-mask mark { background: rgba(242, 180, 90, .3); color: var(--nt-heading); }
  :root[data-theme="auto"] .ap-spark8 rect { fill: #5b88a6; }
  :root[data-theme="auto"] .ap-spark8 rect.is-now { fill: var(--nt-orange); }
}
/* <<< end of generated dark rules */

/* ---------- supply guide (2026-10-24, mock-up 06_Documentation/Django_Mockups_2026-10-24_SupplyGuide): the steps and the
   work cycle on the trips page while the set-up is open, a progress bar after it, empty tabs that say what next. ---------- */
.sup-guide .card__head .end { display: flex; gap: 6px; flex-wrap: wrap; margin-inline-start: auto; }
.sup-guide .card__head .end form { margin: 0; }
.sup-guide__lead { margin: 0; padding: 10px 18px 0; color: var(--nt-muted); }
.sup-guide .vlink { margin: 10px 18px 0; }
.sup-cycle { list-style: none; margin: 0; padding: 12px 18px 14px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; counter-reset: none; }
.sup-cycle li { position: relative; padding: 8px 6px; border: 1px solid var(--nt-line); border-radius: 12px; background: var(--nt-surface); text-align: center; font-size: 12.5px; color: var(--nt-muted); }
.sup-cycle li span { display: block; font-size: 20px; line-height: 1.3; }
.sup-cycle li b { display: block; color: var(--nt-heading); font-size: 13px; }
.sup-cycle li small { display: block; }
.sup-cycle li + li::before { content: "←"; position: absolute; inset-inline-start: -9px; top: 50%; transform: translateY(-50%); color: var(--nt-muted); font-weight: 800; font-size: 12px; }
[dir="ltr"] .sup-cycle li + li::before { content: "→"; }
.sup-guide-slim { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 16px; background: var(--nt-orange-faint); border-color: var(--nt-orange-soft); }
.sup-guide-slim .progress { flex: 1 1 140px; max-width: 240px; }
.sup-guide-slim form { margin: 0; margin-inline-start: auto; }
.sup-kpis.is-dim { opacity: .45; }
.btn--locked { background: var(--nt-surface-2); border: 1px dashed var(--nt-line-2); color: var(--nt-muted); box-shadow: none; }
.sup-locked { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.sup-locked small { font-size: 12px; color: var(--nt-muted); }
.sup-empty { display: flex; gap: 16px; align-items: center; padding: 22px 20px; }
.sup-empty__ic { flex: none; width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; font-size: 28px; background: var(--nt-orange-soft); }
.sup-empty h3 { margin: 0 0 4px; font-size: 17px; color: var(--nt-heading); }
.sup-empty p { margin: 0 0 10px; color: var(--nt-muted); max-width: 640px; }
.sup-empty .btn + .btn { margin-inline-start: 6px; }
.sup-routine { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.sup-routine ol { margin: 0; padding-inline-start: 34px; }
.sup-routine li { margin: 4px 0; }
@media (max-width: 900px) { .sup-cycle { grid-template-columns: repeat(3, minmax(0, 1fr)); } .sup-cycle li:nth-child(4)::before { display: none; } .sup-routine { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .sup-cycle { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sup-cycle li:nth-child(4)::before { display: block; } .sup-cycle li:nth-child(odd)::before { display: none; } .sup-empty { flex-direction: column; align-items: flex-start; } }

/* ---------- sign-in help (2026-10-25, mock-up 06_Documentation/Django_Mockups_2026-10-25_SignInHelp) ---------- */
.pw-wrap { position: relative; }
.pw-wrap .input, .pw-wrap input { padding-inline-end: 44px; }
/* the password box is dir=ltr while the eye follows the page: keep the dots clear of the eye by its physical side (2026-10-26) */
html[dir="rtl"] .pw-wrap input[dir="ltr"] { padding-left: 44px; padding-right: 12px; }
.pw-eye { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 8px;
  background: none; color: var(--nt-muted); display: grid; place-items: center; cursor: pointer; }
.pw-eye[aria-pressed="true"] { color: var(--nt-orange-d); }
.pw-eye .nt-ico { width: 18px; height: 18px; }
.btn--wa { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.btn--wa:hover { background: #18834a; color: #fff; }
.auth__help { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; padding: 12px; border-radius: 12px; background: var(--nt-surface-2); border: 1px solid var(--nt-line); font-size: 14px; }
.auth__help b { flex: 1 1 160px; }
.saved-creds { border: 2px dashed var(--nt-orange); border-radius: 14px; padding: 12px 14px; background: var(--nt-orange-faint); margin: 12px 0 16px; }
.saved-creds div { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; }
.saved-creds b { font-size: 17px; }
/* recovery code (2026-10-26, mock-up 06_Documentation/Django_Mockups_2026-10-26_RecoveryCode) */
.codebox { border: 2px dashed var(--nt-orange); border-radius: 16px; padding: 14px; background: var(--nt-orange-faint); text-align: center; margin: 12px 0; }
.codebox small { display: block; color: var(--nt-muted); font-weight: 700; }
.codebox b { display: block; font-size: 28px; letter-spacing: 4px; margin: 4px 0; color: var(--nt-heading); font-variant-numeric: tabular-nums; }
.codebox p { margin: 0; font-size: 13px; color: var(--nt-muted); }
.check.kept { margin: 12px 0; }
.btn.is-disabled { opacity: .5; pointer-events: auto; cursor: not-allowed; }
.input--code { letter-spacing: 3px; font-weight: 800; text-transform: uppercase; text-align: center; font-size: 18px; }
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 14px; border: 1px solid var(--nt-line); border-radius: 12px; background: var(--nt-surface-2); }
.seg2 a { text-align: center; padding: 8px; border-radius: 9px; font-weight: 800; color: var(--nt-muted); text-decoration: none; }
.seg2 a[aria-current="page"] { background: var(--nt-surface); color: var(--nt-heading); box-shadow: var(--nt-shadow); }
.rc-renew { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.rc-renew .field { margin: 0; flex: 0 1 280px; }

/* Stay signed in (owner-approved mock-up 2026-10-26): the note and video links on the sign-in pages, the devices in
   «My profile», and the short in-page videos (templates/accounts/video/). The phone is drawn light in both themes. */
.stay-note { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; padding: 7px 11px; border-radius: 10px; background: var(--nt-success-soft); color: var(--nt-success); font-size: 13.5px; font-weight: 700; }
.stay-note svg { width: 18px; height: 18px; flex: none; }
.vlink { display: flex; gap: 10px; align-items: center; margin: 14px 0; padding: 9px 12px; border: 1px solid var(--nt-line); border-radius: 14px; background: var(--nt-surface-2); color: var(--nt-text); text-decoration: none; }
.vlink:hover { border-color: var(--nt-orange); color: var(--nt-text); }
.vlink i { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--nt-orange); color: #fff; }
.vlink i svg { width: 16px; height: 16px; fill: currentColor; }
.vlink b { display: block; font-size: 14.5px; }
.vlink small { color: var(--nt-muted); }
.dev-row { padding: 8px 0; border-top: 1px solid var(--nt-line); }
.dev-row:first-child { border-top: 0; padding-top: 0; }
.logout-ask { margin-top: 16px; }
.vid { background: #0d2231; color: #fff; border-radius: 18px; padding: 14px 14px 10px; margin: 12px 0; }
.vid__title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 8px; font-weight: 800; }
.vid__title svg { width: 16px; height: 16px; fill: var(--nt-orange); stroke: var(--nt-orange); }
.vid__title small { margin-inline-start: auto; opacity: .75; font-weight: 600; }
.vid__stage, .vid__bar, .vid__cap { display: none; }
.vid.is-ready .vid__stage { display: flex; justify-content: center; }
.vid.is-ready .vid__bar { display: flex; }
.vid.is-ready .vid__cap { display: block; }
.vid.is-ready .vid__scenes { display: none; }
.vid__scenes { margin: 0; padding-inline-start: 20px; }
.vid__scenes .s-scene { display: none; }
.vid__scenes p { margin: 4px 0; }
.vid__phone { position: relative; width: 230px; height: 430px; padding: 9px; border-radius: 32px; background: #000; box-shadow: 0 8px 30px rgba(0, 0, 0, .4); }
.vid__phone::before { content: ""; position: absolute; top: 13px; left: 50%; z-index: 4; width: 70px; height: 16px; border-radius: 10px; background: #000; transform: translateX(-50%); }
.vid__screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 24px; background: #fff; color: #102a3a; font-size: 12px; line-height: 1.5; }
.vid__poster { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; border: 0; border-radius: 24px; background: rgba(13, 34, 49, .55); cursor: pointer; }
.vid__poster span { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--nt-orange); color: #fff; box-shadow: 0 6px 20px rgba(241, 89, 57, .5); }
.vid__poster svg { width: 26px; height: 26px; fill: currentColor; }
.vid__cap { min-height: 52px; margin: 10px 4px 6px; text-align: center; font-size: 15px; font-weight: 700; }
.vid__cap.is-new, .s-scene--on { animation: vid-in .45s var(--nt-ease) both; }
.vid__bar { align-items: center; gap: 8px; }
.vid__btn { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 13px; cursor: pointer; }
.vid__segs { display: flex; flex: 1; gap: 4px; }
.vid__seg { flex: 1 1 0; height: 5px; padding: 0; overflow: hidden; border: 0; border-radius: 3px; background: rgba(255, 255, 255, .22); cursor: pointer; }
.vid__seg i { display: block; width: 0; height: 100%; background: var(--nt-orange); }
.vid__time { min-width: 72px; font-size: 12px; opacity: .75; text-align: center; }
@keyframes vid-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* what is drawn inside the phone */
.s-scene { position: absolute; inset: 0; padding: 32px 12px 12px; }
.s-bar { display: flex; justify-content: space-between; align-items: center; margin: -32px -12px 10px; padding: 30px 10px 8px; background: #112c3d; color: #fff; font-weight: 800; }
.s-bar span { color: #f15939; }
.s-h { margin: 4px 0; font-size: 15px; font-weight: 800; }
.s-mut { color: #5e6c76; font-size: 11px; }
.s-inp { display: flex; align-items: center; justify-content: flex-end; height: 32px; margin: 4px 0 8px; padding: 0 9px; overflow: hidden; border: 1px solid #d3d9df; border-radius: 9px; direction: ltr; white-space: nowrap; }
.s-btn { margin-top: 6px; padding: 7px; border-radius: 9px; background: #f15939; color: #fff; text-align: center; font-weight: 800; }
.s-btn--g { background: #fff; color: #102a3a; border: 1px solid #d3d9df; }
.s-end { text-align: end; }
.s-end .s-btn { display: inline-block; padding: 5px 14px; }
.s-card { margin: 6px 0; padding: 8px; border: 1px solid #e3e7eb; border-radius: 10px; background: #f8f9fb; }
.s-center { text-align: center; margin-top: 16px; }
.s-kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.s-kpi div { padding: 6px; border: 1px solid #e3e7eb; border-radius: 9px; text-align: center; color: #5e6c76; font-size: 11px; }
.s-kpi b { display: block; color: #102a3a; font-size: 15px; }
.s-done { margin-top: 30px; text-align: center; }
.s-done span { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 50%; background: #e4f4ea; color: #16784a; font-size: 26px; }
.s-done + .s-btn { margin-top: 30px; }
.s-cal { width: 150px; margin: 22px auto 0; overflow: hidden; border: 1px solid #e3e7eb; border-radius: 14px; text-align: center; }
.s-cal b { display: block; padding: 5px; background: #f15939; color: #fff; font-size: 13px; }
.s-cal span { display: block; font-size: 40px; font-weight: 800; line-height: 1.3; }
.s-cal small { display: block; padding-bottom: 8px; color: #5e6c76; }
.s-apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 6px; margin-top: 22px; text-align: center; font-size: 10px; }
.s-apps i { display: grid; place-items: center; width: 42px; height: 42px; margin: 0 auto 3px; border-radius: 12px; background: rgba(255, 255, 255, .2); font-style: normal; font-size: 18px; }
.s-apps__nt i { background: #f15939; color: #fff; font-weight: 800; font-size: 16px; }
.s-look--home { background: linear-gradient(160deg, #2d5b78, #112c3d); color: #fff; }
.s-look--wa { background: #e5ddd5; }
.s-look--wa .s-bar { background: #075e54; }
.s-look--dim::after { content: ""; position: absolute; inset: 0; z-index: 2; background: rgba(0, 0, 0, .35); animation: vid-in .4s ease .4s both; }
.s-pop { position: absolute; inset-inline: 10px; bottom: 14px; z-index: 3; padding: 10px; border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); animation: vid-up .5s ease .5s both; }
.s-bubble { margin: 8px 0 0 30px; padding: 8px; border-radius: 10px 10px 2px 10px; background: #dcf8c6; box-shadow: 0 1px 1px rgba(0, 0, 0, .1); animation: vid-up .5s ease .4s both; }
.s-bubble b { letter-spacing: 2px; }
.s-pulse { animation: vid-pulse 1.2s ease-in-out 2; }
.s-type { display: inline-block; width: 0; overflow: hidden; white-space: nowrap; animation: vid-type 1.4s steps(11) .5s forwards; }
.s-type--late { animation-delay: 2s; }
/* Arabic words typed in (the sign-up video, 2026-10-26): grows by width, the letters stay joined */
.s-inp--rtl { direction: rtl; justify-content: flex-start; }
.s-type--w { width: auto; max-width: 0; animation-name: vid-type-w; animation-timing-function: steps(10); }
.s-tap { position: absolute; z-index: 5; width: 30px; height: 30px; border: 2px solid #fff; border-radius: 50%; background: rgba(16, 42, 58, .4); box-shadow: 0 0 0 2px #f15939, 0 2px 8px rgba(0, 0, 0, .3); opacity: 0; pointer-events: none; animation: vid-tap 1.1s ease-out forwards; }
/* the player puts each tap on the middle of its scene's [data-tap] element (static/js/nt.js «videos»); here only when */
.s-tap--icon { animation-delay: 1.6s; }
.s-tap--btn { animation-delay: 3.6s; }
.s-tap--save { animation-delay: 2.2s; }
.s-tap--menu { animation-delay: 2.2s; }
.s-tap--make { animation-delay: 2.6s; }
/* the supply and delivery videos (owner-approved mock-up 2026-10-26, Django_Mockups_2026-10-26_SupplyVideo): a bigger
   phone, a button per part, and the pieces their scenes draw */
.vid--parts .vid__phone { width: 262px; height: 470px; }
.vid__chap { display: none; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 0 8px; }
.vid.is-ready .vid__chap:not(:empty) { display: flex; }
.vid__chap button { padding: 2px 10px; border: 0; border-radius: 20px; background: rgba(255, 255, 255, .12); color: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.vid__chap button.is-on { background: var(--nt-orange); }
.s-inp--rtl.s-inp--sel { justify-content: space-between; }
.s-inp em { font-style: normal; color: #5e6c76; }
.s-mt { margin-top: 8px; }
.s-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.s-chip { padding: 2px 9px; border: 1px solid #d3d9df; border-radius: 20px; background: #fff; font-weight: 700; }
.s-chip--on { border-color: #f15939; background: #fff1ed; color: #c2410c; }
.s-row { display: flex; justify-content: space-between; gap: 6px; padding: 3px 0; border-bottom: 1px dashed #e3e7eb; }
.s-row:last-child { border-bottom: 0; }
.s-ok { color: #16784a; font-weight: 800; }
.s-bad { color: #b42318; font-weight: 800; }
.s-warn, .s-good { margin: 6px 0; padding: 8px; border-radius: 10px; font-weight: 700; }
.s-warn { background: #fdecea; color: #b42318; }
.s-good { background: #e4f4ea; color: #16784a; }
.s-big { font-size: 22px; font-weight: 800; }
.s-flow { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 10px; text-align: center; }
.s-flow div { width: 66px; }
.s-flow i { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 4px; border-radius: 14px; background: #f1f4f7; font-style: normal; font-size: 24px; }
.s-flow b { font-size: 11px; }
.s-arrow { color: #f15939; font-size: 18px; font-weight: 800; }
.s-arrow::before { content: "→"; }
[dir="rtl"] .s-arrow::before { content: "←"; }
.s-money { display: flex; justify-content: space-around; margin-top: 8px; text-align: center; }
.s-money div { padding: 6px 8px; border: 1px solid #e3e7eb; border-radius: 10px; background: #f8f9fb; }
.s-map { position: relative; height: 84px; margin: 4px 0 8px; border: 1px solid #e3e7eb; border-radius: 10px; background: repeating-linear-gradient(45deg, #e8f0e4 0 10px, #edf3ea 10px 20px); }
.s-map--tall { height: 120px; }
.s-map span { position: absolute; left: 50%; top: 22px; margin-left: -9px; font-size: 20px; }
.s-photo { display: grid; place-items: center; height: 86px; margin: 4px 0 8px; border: 1px dashed #d8c9a3; border-radius: 10px; background: #fbf7ec; color: #7c6a3e; font-weight: 700; }
.s-photo--sm { height: 60px; }
.s-qr { font-size: 42px; line-height: 1; }
.s-list { margin: 6px 0; padding: 0; list-style: none; }
.s-list li { display: flex; gap: 6px; align-items: flex-start; margin: 6px 0; padding: 6px 8px; border: 1px solid #e3e7eb; border-radius: 10px; background: #f8f9fb; animation: vid-in .4s ease both; }
.s-list li:nth-child(2) { animation-delay: .6s; }
.s-list li:nth-child(3) { animation-delay: 1.2s; }
.s-list li:nth-child(4) { animation-delay: 1.8s; }
.s-list li:nth-child(5) { animation-delay: 2.4s; }
.s-list b { color: #f15939; }
.s-fill { opacity: 0; animation: vid-fill .5s ease 2.4s forwards; }
.s-fill--2 { animation-delay: 2.8s; }
.s-fill--3, .s-fill--late { animation-delay: 3.2s; }
.s-strike { position: relative; }
.s-strike::after { content: ""; position: absolute; inset-inline: 0; top: 50%; height: 2px; background: #16784a; transform: scaleX(0); transform-origin: right; animation: vid-strike .5s ease 1.8s forwards; }
.s-strike--2::after { animation-delay: 2.4s; }
.s-tap--early { animation-delay: 1.2s; }
.s-tap--mid { animation-delay: 2.4s; }
.s-tap--late { animation-delay: 3.4s; }
@keyframes vid-fill { from { opacity: 0; background: #fff1ed; } to { opacity: 1; } }
@keyframes vid-strike { to { transform: scaleX(1); } }
@keyframes vid-up { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes vid-pulse { 50% { transform: scale(1.06); } }
@keyframes vid-type { to { width: 11ch; } }
@keyframes vid-type-w { to { max-width: 18em; } }
@keyframes vid-tap { 0% { opacity: 0; transform: scale(1.6); } 30% { opacity: 1; transform: scale(1); } 60% { opacity: 1; transform: scale(.8); } 100% { opacity: 0; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .vid__cap.is-new, .s-scene--on, .s-pop, .s-bubble, .s-pulse, .s-look--dim::after, .s-list li, .s-fill, .s-strike::after { animation: none; }
  .s-fill { opacity: 1; }
  .s-strike::after { transform: none; }
  .s-type { width: 11ch; animation: none; }
  .s-type--w { width: auto; max-width: none; }
}

/* Sign-in trouble (owner-approved mock-up 2026-10-26): the admin panel's cases and the phone alert settings. */
.trouble-list { display: flex; flex-direction: column; gap: 10px; }
.trouble { padding: 12px 14px; }
.trouble--open { border-color: #f3c2bd; }
.trouble__top { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.trouble__who { flex: 1 1 240px; display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; }
.trouble__who b { font-size: 16px; }
.trouble__who small { flex-basis: 100%; }
.trouble__what { flex: 1 1 240px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.trouble__what p { flex-basis: 100%; font-size: 13.5px; }
.trouble__steps { flex-basis: 100%; }
.trouble__steps summary { cursor: pointer; color: var(--nt-info); font-weight: 700; font-size: 13px; }
.trouble__steps ol { list-style: none; margin: 6px 0 0; padding: 6px 0 0; border-top: 1px dashed var(--nt-line-2); font-size: 13.5px; }
.trouble__step { display: flex; gap: 10px; }
.trouble__step .num { min-width: 42px; color: var(--nt-muted); }
.trouble__step--password, .trouble__step--unknown, .trouble__step--recovery, .trouble__step--signup,
.trouble__step--locked, .trouble__step--rc_locked { color: var(--nt-danger); }
.trouble__step--signed_in, .trouble__step--contacted { color: var(--nt-success); }
.trouble__acts { flex-wrap: wrap; }
.push-devices { margin: 10px 0; }
.push-device { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--nt-line); }
.push-device:first-child { border-top: 0; }
.push-msg { margin: 8px 0; }
.push-msg[hidden] { display: none; }
.alert-opts fieldset { border: 0; margin: 12px 0 0; padding: 0; }
.alert-opts legend { font-weight: 800; margin-bottom: 4px; }
.alert-opts .field { max-width: 280px; }

/* One-screen shift entry (owner-approved mock-up 2026-10-26, Django_Mockups_2026-10-26_ShiftEntry) */
.savebar .dot.dot--ok { background: #3ddc84; }
.btn--dash { border-style: dashed; color: var(--nt-muted); background: transparent; }
.new-shift__hdr input[data-auto] { background: var(--nt-success-soft); }
.kpi-grid.kpis.kpis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) {
  .kpi-grid.kpis.kpis--3 { gap: 6px; }
  .kpis--3 .kpi { padding: 8px 10px; }
  .kpis--3 .kpi b { font-size: 16px; }
  .kpis--3 .kpi .ic { display: none; }
}
.kpi-more { margin-top: 8px; }
.kpi-more > summary { display: inline-flex; gap: 6px; align-items: center; padding: 5px 12px; border: 1px dashed var(--nt-line-2); border-radius: 10px;
  color: var(--nt-muted); font-weight: 700; font-size: 13.5px; cursor: pointer; list-style: none; }
.kpi-more > summary::-webkit-details-marker { display: none; }
.kpi-more > summary::after { content: "▾"; }
.kpi-more[open] > summary::after { content: "▴"; }
.shift-hdr > summary { cursor: pointer; list-style: none; flex-wrap: wrap; }
.shift-hdr > summary::-webkit-details-marker { display: none; }
.shift-hdr__sum { font-weight: 600; font-size: 14px; }
.shift-hdr__edit { margin-inline-start: auto; color: var(--nt-muted); display: inline-flex; }
.shift-hdr__edit svg { width: 16px; height: 16px; }
.shift-hdr[open] .shift-hdr__sum { display: none; }
/* a finished load on a phone: one closed line (number, customer · material, its loads, amount); a tap opens it under
   that line, which stays as its head (owner-approved mock-up 2026-10-26, Django_Mockups_2026-10-26_ShiftPage) */
.lines td.row-fold, .row-done { display: none; }
.lines tr.is-folded > td:not(.row-fold) { display: none !important; }
.lines tr.is-folded > td.row-fold, .lines tr[data-open] > td.row-fold { display: flex !important; align-items: center; gap: 8px; padding: 2px 0; cursor: pointer; font-size: 14px; }
.lines tr[data-open] > td.row-fold { padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--nt-line); }
.lines td.row-fold::before { display: none !important; }
.row-fold__no { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--nt-surface-2); color: var(--nt-muted); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.row-fold__who { flex: 1; min-width: 0; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-fold__who small { font-weight: 600; color: var(--nt-muted); font-size: inherit; }
.row-fold__tr { flex: none; padding: 0 8px; border-radius: 999px; background: var(--nt-surface-2); color: var(--nt-muted); font-size: 12px; font-weight: 800; }
.row-fold__amt { flex: none; white-space: nowrap; }
.row-fold__chev { flex: none; color: var(--nt-muted); }
.row-fold__chev::before { content: "⌄"; }
.lines tr[data-open] .row-fold__chev::before { content: "⌃"; }
/* «The shift is not saved yet» */
.leave-ask { position: fixed; inset: 0; z-index: 90; display: grid; place-items: end center; padding: 16px; background: rgba(0, 0, 0, .42); }
.leave-ask[hidden] { display: none; }
.leave-ask__box { width: min(420px, 100%); padding: 18px; border-radius: 18px; background: var(--nt-surface); color: var(--nt-text); box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  display: grid; gap: 8px; animation: vid-up .3s ease both; }
.leave-ask__box h2 { margin: 0; font-size: 18px; }
.leave-ask__box p { margin: 0 0 4px; color: var(--nt-muted); }
@media (min-width: 761px) { .leave-ask { place-items: center; } }
.empty-shifts .grow { flex: 1; }
.empty-shifts small { display: block; }
/* cards and notices set their own display: «hidden» must still hide them (new-shift screen, 2026-10-26) */
[data-new-kpis][hidden], [data-draft-offer][hidden] { display: none; }
.savebar:not(:has([data-dirty])) [data-leave-ok] { display: none; }  /* «Discard changes» only when there are some */

/* Shift lines on a phone (owner's request 2026-10-26): each field under its label, two to a row; names, notes and
   details take the whole row; the bin at the end of the card */
@media (max-width: 767px) {
  .lines.tbl--cards [data-rows] > tr[data-row] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 10px; padding: 8px 12px; }
  .lines.tbl--cards [data-rows] > tr[data-row]::before { grid-column: 1 / -1; justify-self: start; }
  .lines.tbl--cards [data-rows] > tr[data-row] > td { flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 2px; padding: 3px 0; min-width: 0; }
  .lines.tbl--cards [data-rows] > tr[data-row] > td::before { font-size: 11.5px; line-height: 1.3; }
  .lines.tbl--cards [data-rows] > tr[data-row] > td :is(.input, input:not([type=checkbox]), select) { width: 100%; max-width: none; min-width: 0; }
  .lines.tbl--cards [data-rows] > tr[data-row] > td:has(input[list], input[data-combo], input[name$="-notes"], input[name$="-details"]) { grid-column: 1 / -1; }
  .lines.tbl--cards [data-rows] > tr[data-row] > td:last-child { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; padding-top: 0; }
  .lines.tbl--cards [data-rows] > tr[data-row] > td:last-child::before { display: none; }
  .lines.tbl--cards [data-rows] > tr[data-row] > td:has([data-total], [data-remaining]) { justify-content: center; }
  /* number cells are LTR (for the digits): their label and total keep the page's side, like the others (2026-10-26) */
  .lines.tbl--cards [data-rows] > tr[data-row] > td.n { direction: inherit; text-align: start; }
  .lines.tbl--cards [data-rows] > tr:is(.is-folded, [data-open]) > td.row-fold { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; }
  .lines.tbl--cards [data-rows] > tr[data-row]:has(> td.row-fold)::before { display: none; }
  .lines.tbl--cards [data-rows] > tr.is-folded { padding: 8px 10px; }
  .lines.tbl--cards [data-rows] > tr[data-open] { border-color: var(--nt-orange-d); box-shadow: var(--nt-focus); }
  .lines tr[data-open] .row-done { display: inline-flex; }
  .lines.tbl--cards [data-rows] > tr[data-open] > td:last-child { justify-content: space-between; }
  /* the bottom bar in one slim row: what is saved on the side, then «+ Load» and «Save shift» */
  .savebar { flex-wrap: nowrap; gap: 8px; padding: 8px 12px 16px; }
  .savebar .msg { flex: 1 1 auto; min-width: 0; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .savebar .end { flex-wrap: nowrap; gap: 6px; margin-inline-start: 0; }
  .savebar .btn { min-height: 36px; padding: 6px 10px; font-size: 13.5px; white-space: nowrap; }
  .savebar .btn svg { width: 15px; height: 15px; }
}
/* working: a thin bar at the top while a page or a save is on its way, and the pressed button turns busy */
.nt-busybar { position: fixed; top: 0; inset-inline: 0; z-index: 200; height: 3px; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .2s; }
.nt-busybar::before { content: ""; position: absolute; inset-block: 0; width: 40%; background: var(--nt-orange); border-radius: 3px; animation: nt-busy 1.1s ease-in-out infinite; }
html.is-working .nt-busybar { opacity: 1; }
@keyframes nt-busy { from { inset-inline-start: -40%; } to { inset-inline-start: 100%; } }
.btn.is-busy { position: relative; color: transparent !important; }
.btn.is-busy > * { visibility: hidden; }
.btn.is-busy::after { content: ""; position: absolute; top: 50%; left: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 2px solid currentColor;
  border-color: #fff #fff transparent transparent; border-radius: 50%; animation: nt-spin .7s linear infinite; }
.btn:not(.btn--primary):not(.btn--navy).is-busy::after { border-color: var(--nt-orange) var(--nt-orange) transparent transparent; }
@keyframes nt-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .nt-busybar::before { animation-duration: 2.5s; } .btn.is-busy::after { animation-duration: 1.6s; } }
@media (max-width: 767px) {  /* each table's total as one slim line, not a card (owner's request 2026-10-26) */
  .lines.tbl--cards tfoot tr { display: flex; justify-content: space-between; align-items: center; margin: 0 0 6px; padding: 6px 12px; box-shadow: none; }
  .lines.tbl--cards tfoot tr::before { display: none; }
  .lines.tbl--cards tfoot td { display: inline; width: auto; padding: 0; background: none; }
  .lines.tbl--cards tfoot td::before { display: none; }
  #p-work > p.muted.small { display: none; }  /* the formula note: on a computer only */
}
/* iPhone: Safari zooms the whole page in when a field's text is under 16px and stays zoomed, so the page looks wider
   than the screen (owner's report 2026-10-26); on phones and touch screens fields are 16px, the bigger ones keep their size */
@media (max-width: 1023px), (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]), select, select.input, .field select, textarea, textarea.input, .field textarea { font-size: 16px; }
  .cap-total__field input.input, .bon-box input.input { font-size: 20px; }
  input.input--code { font-size: 18px; }
  .palette__bar input:not([type=checkbox]) { font-size: 16.5px; }
}
/* A line's bin is one button: the tick box behind it is not shown (owner's request 2026-10-26); nt.js asks first */
.lines .check { position: relative; justify-content: center; min-width: 40px; min-height: 40px; border-radius: 10px; }
.lines .check:hover { background: var(--nt-danger-soft); }
.lines .check input[name$="-DELETE"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.lines .check:has(input:focus-visible) { box-shadow: var(--nt-focus); }
/* «Next» above a phone's number pad, which has no Enter key (2026-10-26) */
.nt-nextkey { position: fixed; top: 0; inset-inline-end: 12px; z-index: 95; min-height: 40px; padding: 6px 16px; border: 0; border-radius: 999px;
  background: var(--nt-navy); color: #fff; font: inherit; font-weight: 800; font-size: 15px; box-shadow: 0 6px 18px rgba(17, 44, 61, .3); cursor: pointer; }
.nt-nextkey[hidden] { display: none; }
/* the lines in red after a save, listed in the notice with «Go to it» (2026-10-26) */
.bad-lines { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.bad-lines li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 10px;
  background: var(--nt-surface); color: var(--nt-text); font-weight: 600; font-size: 13.5px; }
.bad-lines .btn { flex: none; }
[role="tab"].has-err { position: relative; }
[role="tab"].has-err::after { content: ""; position: absolute; top: 6px; inset-inline-start: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--nt-danger); }
/* iPhone: a date field keeps its own width and spills out of its column */
@media (max-width: 1023px) { input[type="date"].input { min-width: 0; max-width: 100%; -webkit-appearance: none; appearance: none; }
  input[type="date"].input::-webkit-date-and-time-value { text-align: start; } }
/* the shift's net under the tabs, opening into how it is made and the other totals (2026-10-26) */
.net-line { margin: 12px 16px 0; border: 1px solid #bfe3cc; border-radius: 12px; background: var(--nt-success-soft); }
.net-line > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 12px; cursor: pointer; list-style: none; font-weight: 700; }
.net-line > summary::-webkit-details-marker { display: none; }
/* the driver's balance next to the net (mock-up 2026-11-11): blue = still with the driver, red = due to the driver */
.net-line > summary > span:first-child { flex: 1; }
.driver-cash { display: inline-flex; align-items: center; gap: 4px; border: 1px solid color-mix(in srgb, var(--nt-info) 30%, transparent); background: var(--nt-info-soft); color: var(--nt-info); border-radius: 999px; padding: 1px 10px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.driver-cash.is-owed { border-color: color-mix(in srgb, var(--nt-danger) 30%, transparent); background: var(--nt-danger-soft); color: var(--nt-danger); }
.driver-cash[hidden] { display: none; }
@media (max-width: 480px) { .net-line > summary { flex-wrap: wrap; } .driver-cash { margin-inline-start: auto; } }
.net-line > summary b { color: var(--nt-success); font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.net-line > summary b::after { content: "▾"; font-size: 12px; color: var(--nt-muted); }
.net-line[open] > summary b::after { content: "▴"; }
.net-line.is-neg { border-color: #f3c2bd; background: var(--nt-danger-soft); }
.net-line.is-neg > summary b, .net-line.is-neg .net-line__eq dd { color: var(--nt-danger); }
.net-line__body { margin: 0; padding: 6px 12px 10px; border-top: 1px dashed var(--nt-line-2); background: var(--nt-surface); border-radius: 0 0 12px 12px; font-size: 14px; }
.net-line__body div { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.net-line__body dt { color: var(--nt-muted); }
.net-line__body dd { margin: 0; font-weight: 700; }
.net-line__body .net-line__eq { border-top: 1px dashed var(--nt-line-2); margin-top: 2px; padding-top: 5px; font-weight: 800; }
.net-line__body .net-line__eq dt, .net-line__body .net-line__eq dd { color: var(--nt-success); font-weight: 800; }
.net-line__body .net-line__gap { margin-top: 6px; }
.net-line__body .is-neg dd { color: var(--nt-danger); }
/* the driver's whole account around the shift, beside the net details (owner-approved mock-up 2026-11-14, DriverSettle) */
.driver-cash--acct { background: var(--nt-surface); border-color: var(--nt-line-2); color: var(--nt-text); }
.driver-cash--acct.is-owed { background: var(--nt-danger-soft); border-color: color-mix(in srgb, var(--nt-danger) 30%, transparent); color: var(--nt-danger); }
.driver-cash--acct.is-with { background: var(--nt-info-soft); border-color: color-mix(in srgb, var(--nt-info) 30%, transparent); color: var(--nt-info); }
.driver-cash--acct.is-zero { background: var(--nt-success-soft); border-color: color-mix(in srgb, var(--nt-success) 30%, transparent); color: var(--nt-success); }
.net-line__panes { border-top: 1px dashed var(--nt-line-2); background: var(--nt-surface); border-radius: 0 0 12px 12px; }
.net-line__panes > .net-line__body { border-top: 0; background: none; }
.net-line__panes.has-acct { display: grid; gap: 4px 16px; padding-bottom: 10px; }
.driver-acct { margin: 0 12px; padding: 8px 12px; border: 1px solid var(--nt-line); border-radius: 12px; background: var(--nt-surface-2, var(--nt-bg)); font-size: 14px; }
.driver-acct h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 14.5px; }
.driver-acct h4 > a { margin-inline-start: auto; font-size: 13px; font-weight: 700; white-space: nowrap; }
.driver-acct h4 svg { width: 16px; height: 16px; }
.driver-acct dl { margin: 0; }
.driver-acct dl > div { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; border-bottom: 1px dashed var(--nt-line); }
.driver-acct dt { color: var(--nt-muted); display: flex; align-items: center; gap: 4px; }
.driver-acct dt a svg { width: 14px; height: 14px; }
.driver-acct dd { margin: 0; font-weight: 700; white-space: nowrap; }
.driver-acct small { font-size: 12px; font-weight: 700; }
.driver-acct .is-owed dd, .driver-acct .is-owed dt { color: var(--nt-danger); }
.driver-acct .is-with dd, .driver-acct .is-with dt { color: var(--nt-info); }
.driver-acct .driver-acct__eq { border-bottom: 0; font-weight: 800; }
.driver-acct .driver-acct__eq dt { font-weight: 800; color: var(--nt-text); }
.driver-acct__eq:not(.is-owed):not(.is-with) dd { color: var(--nt-success); }
.driver-acct__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.driver-acct__btns[hidden], .driver-acct__done[hidden] { display: none; }
.driver-acct__done { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; padding: 5px 10px; border-radius: 10px; background: var(--nt-success-soft); color: var(--nt-success); font-weight: 800; }
@media (min-width: 768px) {
  .net-line.has-acct { max-width: 900px; }
  .net-line__panes.has-acct { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .net-line__panes.has-acct .driver-acct { margin: 8px 0 0 12px; }
  [dir="ltr"] .net-line__panes.has-acct .driver-acct { margin: 8px 12px 0 0; }
}
@media (max-width: 480px) { .driver-acct__btns .btn { flex: 1; justify-content: center; } }
@media (max-width: 767px) { .net-line { margin: 10px 12px 0; } }
/* «Delete shift»: one line until tapped (2026-10-26) */
.shift-del > summary { list-style: none; cursor: pointer; }
.shift-del > summary::-webkit-details-marker { display: none; }
.shift-del:not([open]) > summary { border-bottom: 0; }
.shift-del__chev { margin-inline-start: auto; display: inline-flex; color: var(--nt-muted); transition: transform .2s; }
.shift-del__chev svg { width: 18px; height: 18px; }
.shift-del[open] .shift-del__chev { transform: rotate(180deg); }
/* on a computer the net line keeps its figures beside their labels instead of across the whole page (2026-10-26) */
@media (min-width: 768px) { .net-line { max-width: 480px; } }
/* Shifts list and calendar (owner-approved mock-up 2026-10-27, Django_Mockups_2026-10-27_ShiftList): one filter row
   (month with arrows, truck, list / calendar), one summary bar with the net line, the shifts under a day heading;
   on a phone each shift is one line: truck · driver, its loads, its net */
.shifts-head { align-items: center; }
.month-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.month-pick { display: flex; align-items: center; gap: 4px; }
.month-pick select { width: auto; min-width: 150px; font-weight: 800; }
.month-filter__truck { width: auto; min-width: 150px; flex: 0 1 220px; }
.month-filter .seg { margin-inline-start: auto; }
.share-hidden { position: absolute; inset-block-start: 0; inset-inline-end: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; overflow: hidden; pointer-events: none; }
.month-sum { padding: 12px 16px 0; }
.month-sum__bar { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--nt-muted); font-size: 14px; }
.month-sum__bar b { color: var(--nt-text); font-size: 15px; }
.month-sum .net-line { margin: 10px 0 12px; }
.tbl--shifts tr[data-href] { cursor: pointer; }
.tbl--shifts tr[data-href]:hover > td { background: var(--nt-orange-faint); }
.tbl--shifts .day-row th { background: none; text-align: start; font-size: 13px; font-weight: 800; color: var(--nt-muted); padding: 14px 12px 4px; border-bottom: 0; }
.tbl--shifts .day-row small { font-size: inherit; font-weight: 600; }
.tbl--shifts .c-crew, .tbl--shifts .c-trips-text { display: none; }
.tbl--shifts .c-chev { display: inline-flex; color: var(--nt-muted); }
.tbl--shifts .c-chev svg { width: 16px; height: 16px; }
[dir="ltr"] .tbl--shifts .c-chev svg { transform: scaleX(-1); }
.tbl--shifts tfoot td { font-weight: 800; background: var(--nt-sand-l); }
@media (max-width: 767px) {
  .month-filter { gap: 6px; }
  .month-pick { flex: 1 1 100%; }
  .month-pick select { flex: 1; min-width: 0; }
  .month-filter__truck { flex: 1 1 auto; min-width: 0; }
  .card > .table-wrap:has(> .tbl--shifts) { padding: 0 12px 12px; }
  .tbl--shifts, .tbl--shifts tbody, .tbl--shifts tfoot { display: block; width: 100%; }
  .tbl--shifts thead { display: none; }
  .tbl--shifts tr { display: flex; align-items: center; gap: 8px; }
  .tbl--shifts tr[data-href] { border: 1px solid var(--nt-line); border-radius: 12px; background: var(--nt-surface); padding: 10px 12px; margin: 0 0 6px; }
  .tbl--shifts td { display: block; border: 0; padding: 0; background: none !important; }
  .tbl--shifts .c-date, .tbl--shifts .c-driver, .tbl--shifts .c-money, .tbl--shifts .c-trips { display: none; }
  .tbl--shifts .c-crew, .tbl--shifts .c-trips-text { display: inline; }
  .tbl--shifts .c-truck { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tbl--shifts .c-crew { color: var(--nt-muted); font-size: 13px; }
  .tbl--shifts .c-loads .c-trips-text { padding: 0 8px; border-radius: 999px; background: var(--nt-surface-2); color: var(--nt-muted); font-size: 12px; font-weight: 800; white-space: nowrap; }
  .tbl--shifts .c-net { font-weight: 800; white-space: nowrap; }
  .tbl--shifts .day-row { display: block; }
  .tbl--shifts .day-row th { display: block; padding: 10px 2px 5px; }
  .tbl--shifts tfoot tr { border-radius: 10px; padding: 9px 12px; margin-top: 8px; background: var(--nt-sand-l); }
  .tbl--shifts tfoot td:first-child { flex: 1; }
}
/* the «م» column skips the day headings; a phone's one-line shifts carry no number */
.tbl--shifts > tbody > tr.day-row::before { counter-increment: none; content: ""; border-bottom: 0; }
@media (max-width: 767px) {
  .tbl--shifts > * > tr::before { display: none !important; }
  .month-filter .month-filter__truck { width: auto; flex: 1 1 0; }
  .month-filter .seg { margin-inline-start: 0; }
}
[dir="rtl"] .tbl--shifts .c-trips-text { direction: rtl; unicode-bidi: isolate; }  /* «5 نقلات» inside an LTR number cell */
/* locked lines (entered on an earlier day) fold and open like the others on a phone (owner's report 2026-10-27) */
@media (max-width: 767px) {
  .lines.tbl--cards tbody[data-locked-sum] > tr:is(.is-folded, [data-open]) > td.row-fold { flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; }
  .lines.tbl--cards tbody[data-locked-sum] > tr:has(> td.row-fold)::before { display: none; }
  .lines.tbl--cards tbody[data-locked-sum] > tr.is-folded { padding: 8px 10px; }
  .lines.tbl--cards tbody[data-locked-sum] > tr[data-open] { border-color: var(--nt-orange-d); box-shadow: var(--nt-focus); }
}
/* admin panel «Traffic»: why sign-ups were refused, under the sign-up steps (2026-10-27) */
.ap-sub-title { margin: 0 0 8px; font-size: 14px; font-weight: 800; color: var(--nt-heading); }
.ap-hbars--warn .ap-hbar > span { background: var(--nt-orange); }
/* «why the screens refuse» (2026-10-27): one column per screen; the long «part · box · reason» gets its own line */
.ap-refuse { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ap-refuse .ap-hbars li { grid-template-columns: minmax(0, 1fr) 44px; row-gap: 4px; }
.ap-refuse .ap-hbars li > span:first-child { grid-column: 1 / -1; line-height: 1.5; }
@media (max-width: 900px) { .ap-refuse { grid-template-columns: minmax(0, 1fr); } }

/* ---------- easy sign-up (2026-10-27, mock-up 06_Documentation/Django_Mockups_2026-10-27_EasySignUp) ---------- */
.su-field label { display: flex; align-items: center; gap: 7px; font-size: 15.5px; font-weight: 800; }
.su-n { width: 24px; height: 24px; border-radius: 50%; background: var(--nt-navy); color: #fff; display: grid; place-items: center; font-size: 13px; flex: none; }
.su-field .input { min-height: 50px; font-size: 17px; }
.field.su-field.is-bad input.input { border-color: var(--nt-danger); background-color: var(--nt-danger-soft); }
.field.su-field.is-ok input.input, .field.su-field.is-good input.input { border-color: var(--nt-success); }
.field.su-field.is-wrong input.input { border-color: var(--nt-danger); }
/* a refused box is red on every form: the brand rule «.field input:not(…)» had out-weighed «.field [aria-invalid]» (2026-10-27) */
.field input[aria-invalid="true"]:not([type="checkbox"]):not([type="radio"]), .field select[aria-invalid="true"], .field textarea[aria-invalid="true"],
.input[aria-invalid="true"]:not([type="checkbox"]):not([type="radio"]) { border-color: var(--nt-danger); background-color: var(--nt-danger-soft); }
.su-hint:empty { display: none; }
.su-hint { margin: 4px 0 0; min-height: 20px; font-size: 14px; font-weight: 700; color: var(--nt-muted); }
.su-hint.is-ok { color: var(--nt-success); }
.su-hint.is-bad { color: var(--nt-danger); }
.su-go { min-height: 54px; font-size: 17px; }
.su-terms { margin: 8px 0 12px; text-align: center; font-size: 13.5px; color: var(--nt-muted); }
.su-terms a { font-weight: 700; }
.su-help { margin-top: 14px; padding: 12px; border-radius: 14px; background: var(--nt-surface-2); border: 1px solid var(--nt-line); text-align: center; }
.su-help b { display: block; margin-bottom: 8px; }
.su-help .btn { gap: 8px; }
.su-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding-top: 12px; }
.su-done__ok { width: 70px; height: 70px; border-radius: 50%; background: var(--nt-success-soft); color: var(--nt-success); display: grid; place-items: center; font-size: 34px; font-weight: 800; }
.biz-ask { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.biz-ask .field { flex: 1 1 220px; margin: 0; }
.biz-ask__acts { display: flex; gap: 8px; }

/* ---------- «الأسطى ثقيل», the site's driver (owner-approved mock-up 06_Documentation/Django_Mockups_2026-11-01_Mascot):
   beside the logo, never instead of it; never on prints ---------- */
.osta { display: block; height: auto; flex: none; }
.osta-bubble { position: relative; margin: 0; background: var(--nt-surface); border: 2px solid var(--nt-navy); border-radius: 16px;
  padding: 8px 12px; font-weight: 800; font-size: 15px; line-height: 1.5; color: var(--nt-heading); }
.osta-hello { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; }
.osta-hello .osta { width: 90px; }  /* head and waving hand only: the form stays near the top on phones (owner, 2026-11-01) */
.osta-hello .osta-bubble { padding: 6px 12px; font-size: 14px; line-height: 1.45; }
.auth__top + .osta-hello { margin-top: -50px; margin-inline-end: 92px; }  /* beside the language switch, not under it */
@media (max-width: 374px) { .osta-hello .osta { width: 62px; } .osta-hello .osta-bubble { font-size: 13px; padding: 5px 9px; white-space: nowrap; } }
.osta-hello .osta-bubble::after { content: ""; position: absolute; bottom: calc(50% - 7px); inset-inline-end: -9px; width: 14px; height: 14px;
  background: var(--nt-surface); border: solid var(--nt-navy); border-width: 0 0 2px 2px; transform: rotate(-135deg); }
[dir="ltr"] .osta-hello .osta-bubble::after { transform: rotate(45deg); }
.notice--osta { align-items: center; }
.notice--osta > .osta { width: 70px; margin: -10px 0 -8px; }
.osta-done { display: flex; flex-direction: column; align-items: center; text-align: center; background: var(--nt-success-soft);
  border: 1px solid var(--nt-success); border-radius: 18px; padding: 10px 14px 14px; color: var(--nt-heading); }
.osta-done .osta { width: 140px; }
.osta-done b { font-size: 22px; color: var(--nt-success); }
.empty-guide__art--osta, .sup-empty__ic--osta { background: none !important; width: auto !important; height: auto !important; }
.empty-guide__art--osta .osta { width: 170px; }
.sup-empty__ic--osta .osta { width: 120px; }
.osta-tip { display: none; }
@media (max-width: 1023px) {
  .osta-tip { display: block; position: fixed; inset-inline: 10px; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 41; height: 230px;
    pointer-events: none; }
  .osta-tip > * { pointer-events: auto; }
  .osta-tip .osta { position: absolute; left: 0; bottom: 0; width: 128px; transform: rotate(14deg); transform-origin: bottom left; }
  .osta-tip .osta-bubble { position: absolute; top: 0; right: 0; width: min(230px, 62vw); font-size: 14px; box-shadow: 0 8px 22px rgba(17,44,61,.18); }
  .osta-tip__x { position: absolute; top: -12px; right: -6px; z-index: 2; width: 28px; height: 28px; border-radius: 50%; border: 0;
    background: var(--nt-navy); color: #fff; font-weight: 800; cursor: pointer; }
}
@media print { .osta, .osta-tip, .osta-done, .osta-hello { display: none !important; } }

/* «التعتيق» on a load (owner's request 2026-11-07): the price taken from the site's last load, and on phones the
   customer's sites as buttons; the site box waits for the customer there. */
.lines .input.is-suggested { background: var(--nt-success-soft); border-color: color-mix(in srgb, var(--nt-success) 35%, transparent); }
.lines .site-price { display: block; margin-top: 3px; font-size: 11.5px; font-weight: 700; color: var(--nt-success); white-space: nowrap; }
.site-chips { display: none; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.site-chips .chip-btn { border: 1px solid var(--nt-line-2); background: var(--nt-surface, #fff); color: var(--nt-text); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; min-height: 32px; }
.site-chips .chip-btn.is-on { background: var(--nt-orange); border-color: var(--nt-orange); color: #fff; }
@media (max-width: 760px) {
  .site-chips { display: flex; }
  .lines tr.no-customer > td:has(> input[name$="-site"]) { display: none; }
}
/* the customer's unloading sites on the statement (mock-up Django_Mockups_2026-11-07_ShiftSite, screen 4) */
.site-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.site-card { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--nt-line); border-radius: 14px; padding: 10px 12px; background: var(--nt-surface); min-width: 0; }
.site-card.is-on { border-color: var(--nt-orange); box-shadow: 0 0 0 2px var(--nt-orange-soft); }
.site-card__name { color: var(--nt-heading); text-decoration: none; font-size: 16px; }
.site-card__name:hover { color: var(--nt-orange-text-strong); text-decoration: underline; }
.site-card__price { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 700; }
.site-card__tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 13px; font-weight: 700; margin-top: 2px; }
.site-card__tools a { display: inline-flex; gap: 4px; align-items: center; color: var(--nt-muted); text-decoration: none; }
.site-card__tools a:hover { color: var(--nt-orange-text-strong); }
.site-card__tools .nt-ico { width: 15px; height: 15px; }
.site-card--add { align-items: center; justify-content: center; border-style: dashed; color: var(--nt-orange-text-strong); font-weight: 800; text-decoration: none; min-height: 92px; flex-direction: row; }
/* admin panel: database backup line under «Needs your action» (2026-11-07) */
.ap-backup { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 14px; margin-top: 12px; }
.ap-backup h3 { margin: 0; font-size: 15px; }
.ap-backup.is-bad { border-color: var(--nt-danger); border-inline-start-width: 4px; }
.ap-backup__item { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; }

/* ---------------------------------------------------------------- attachments pop-up (mock-up 2026-11-13,
   Django_Mockups_2026-11-13_Attachments; static/js/nt-attach.js) */
.att { display: grid; gap: 14px; }
.att__drop { border: 2px dashed var(--nt-line-2); border-radius: 14px; padding: 16px; text-align: center; background: var(--nt-surface-2); transition: background .15s, border-color .15s; }
.att__drop.is-over { border-color: var(--nt-orange); background: var(--nt-orange-soft); }
.att__btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.att__pick { cursor: pointer; position: relative; }
.att__pick:focus-within { outline: 2px solid var(--nt-orange); outline-offset: 2px; }
.att__hint { margin: 8px 0 0; color: var(--nt-muted); font-size: 13px; font-weight: 600; }
.att__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.att__grid:empty { display: none; }
.att__foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--nt-line); padding-top: 12px; font-size: 13px; font-weight: 700; }
.att__saved-note { margin-inline-end: auto; }
.att__done { display: none; }
dialog .att__done { display: inline-flex; }
dialog .att-back { display: none; }
.att-thumb { margin: 0; border: 1px solid var(--nt-line); border-radius: 14px; overflow: hidden; background: var(--nt-surface); display: flex; flex-direction: column; }
.att-thumb.is-new { animation: nt-att-in .35s ease-out; }
@keyframes nt-att-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.att-thumb__img { position: relative; height: 120px; display: grid; place-items: center; background: var(--nt-surface-2); border: 0; padding: 0; width: 100%; cursor: zoom-in; overflow: hidden; }
.att-thumb__img img { width: 100%; height: 100%; object-fit: cover; }
.att-pdf { width: 62px; height: 78px; border-radius: 6px; background: #fff; border: 1px solid var(--nt-line-2); display: grid; place-items: center; font-weight: 800; color: var(--nt-danger); box-shadow: 0 2px 6px rgba(0, 0, 0, .08); }
.att-thumb.is-busy .att-thumb__img { cursor: progress; }
.att-thumb__pct { display: none; position: absolute; top: 8px; inset-inline-start: 8px; background: rgba(17, 44, 61, .78); color: #fff; font-size: 12px; font-weight: 800; border-radius: 99px; padding: 0 8px; }
.att-thumb__bar { display: none; position: absolute; inset: auto 10px 10px 10px; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .85); overflow: hidden; }
.att-thumb__bar i { display: block; height: 100%; width: 0; background: var(--nt-orange); border-radius: 99px; transition: width .15s; }
.att-thumb.is-busy .att-thumb__pct, .att-thumb.is-busy .att-thumb__bar { display: block; }
.att-thumb.is-bad { border-color: color-mix(in srgb, var(--nt-danger) 35%, transparent); }
.att-thumb.is-bad .att-thumb__img { background: var(--nt-danger-soft); cursor: default; padding: 10px; }
.att-thumb__err { color: var(--nt-danger); font-weight: 800; font-size: 13px; text-align: center; }
.att-thumb__body { padding: 7px 10px 8px; font-size: 13px; display: grid; gap: 4px; }
.att-thumb__row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.att-thumb__row b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.att-thumb__row form { margin: 0; }
.att-thumb__state { color: var(--nt-muted); font-weight: 700; }
.att-thumb__del { width: 30px; height: 30px; flex: none; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--nt-danger) 30%, transparent); background: var(--nt-surface); color: var(--nt-danger); display: grid; place-items: center; cursor: pointer; padding: 0; }
.att-thumb__del .nt-ico { width: 16px; height: 16px; }
.att-thumb__desc summary { cursor: pointer; list-style: none; color: var(--nt-orange-text-strong); font-weight: 800; font-size: 12.5px; }
.att-thumb__desc summary::-webkit-details-marker { display: none; }
.att-thumb__desc form { display: grid; gap: 6px; margin-top: 6px; }
.att-thumb__desc .input { font-size: 13px; padding: 5px 8px; min-height: 34px; }
.att-view { position: fixed; inset: 0; z-index: 2000; background: rgba(10, 20, 28, .94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; color: #fff; }
.att-view[hidden] { display: none; }
.att-view__top { display: flex; gap: 10px; font-weight: 800; }
.att-view__top span { opacity: .75; }
.att-view img { max-width: min(100%, 980px); max-height: calc(100vh - 170px); border-radius: 8px; background: #fff; object-fit: contain; }
.att-view__tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.att-view__btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255, 255, 255, .35); background: transparent; color: #fff; border-radius: 10px; padding: 6px 14px; font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; text-decoration: none; }
.att-view__btn--bad { color: #ffb4ab; border-color: #ff9b91; }
.att-view__btn[hidden], .att-view__nav[hidden] { display: none; }
.att-view__nav { position: absolute; top: 50%; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; font-size: 24px; font-weight: 800; cursor: pointer; }
.att-view__nav--prev { right: 18px; }
.att-view__nav--next { left: 18px; }
/* the 📎 of a record with its count (shift lines, lists) */
.icon-btn.has-files { color: var(--nt-success); border-color: color-mix(in srgb, var(--nt-success) 35%, transparent); background: var(--nt-success-soft); }
.att-n { font-size: 12px; font-weight: 800; margin-inline-start: 2px; }
.att-n[hidden] { display: none; }
@media (max-width: 760px) {
  .att__btns { display: grid; }
  .att__btns .btn { justify-content: center; padding: 13px 16px; font-size: 16px; }
  .att__hint-drop { display: none; }
  .att__grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .att-thumb__img { height: 104px; }
  .att-view__nav { display: none; }
}
.icon-btn.att-for { width: auto; min-width: 40px; padding: 0 9px; grid-auto-flow: column; gap: 3px; }
/* the attachments pop-up: the record's line under the title, small like other pop-ups' second line */
dialog .att-head h1 { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: var(--nt-muted); line-height: 1.5; }
dialog .att-head { margin-bottom: 4px; }

/* a customer's opening balance in his pop-up (owner-approved mock-up 2026-11-14, CustomerOpening) */
.opening-box { margin: 14px 0 0; padding: 10px 12px 12px; border: 1px dashed var(--nt-line-2); border-radius: 14px; background: var(--nt-surface-2); display: grid; gap: 8px; min-width: 0; }
.opening-box legend { display: flex; align-items: center; gap: 6px; padding: 0 6px; font-weight: 800; }
.opening-box legend svg { width: 16px; height: 16px; }
.opening-box__side { justify-self: start; }
.opening-box__fields[hidden], .opening-box__say[hidden] { display: none; }
.opening-box__say { margin: 0; font-weight: 700; color: var(--nt-success); }
.opening-box__say.is-owes { color: var(--nt-danger); }
.openings-day { margin: 0; min-width: 170px; }
.seg-radio--sm { flex-wrap: nowrap; white-space: nowrap; }
.seg-radio--sm span { padding: 4px 11px; font-size: 13px; }
.openings .input--money { max-width: 150px; }
.openings tr.is-error td, .openings tr.is-error th { background: var(--nt-danger-soft); }
.openings .error, .openings-day .error { display: block; color: var(--nt-danger); font-size: 12.5px; font-weight: 700; }
