:root {
  --bg: #f5f6f8; --surface: #fff; --text: #1d2330; --muted: #667085; --border: #e3e6eb;
  --side: #121826; --side-2: #1b2334; --side-text: #c4cad6; --side-muted: #7d869a;
  --accent: #2f6fed; --accent-2: #1f57c9; --danger: #c93a3a; --ok: #1f8a4c;
  --radius: 8px; --side-w: 240px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px; color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: 0 0 .25rem; }
h2 { font-size: 1.1rem; margin: 2rem 0 .75rem; }
.muted { color: var(--muted); margin: 0; }
h1 + .form, h1 + .error, h1 + p.muted + .form, h1 + p.muted + .error { margin-top: 1rem; }
.table-wrap + p { margin-top: .75rem; }
.small { font-size: .85rem; }
.mono { font-family: ui-monospace, monospace; font-size: .85rem; }
.nowrap { white-space: nowrap; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* shell */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--side-w); background: var(--side); color: var(--side-text); display: flex; flex-direction: column;
  position: fixed; inset: 0 auto 0 0; overflow-y: auto; z-index: 20; }
.brand { padding: 1.1rem 1.25rem; font-weight: 700; font-size: 1.15rem; color: #fff; letter-spacing: .02em; }
.brand-row { display: flex; align-items: center; gap: .5rem; }
.tumar-mark, .side-me, .flyout, .side-toggle .when-folded { display: none; }
.side-toggle { margin-left: auto; width: 26px; height: 26px; display: inline-grid; place-items: center; padding: 0; border-radius: 6px;
  border: 1px solid var(--side-2); background: transparent; color: var(--side-text); font-size: 1rem; line-height: 1; cursor: pointer; }
.side-toggle:hover { background: var(--side-2); color: #fff; }
.brand > span, .brand-tenant span { display: block; font-weight: 400; font-size: .8rem; color: var(--side-muted); margin-top: .15rem; }
.brand.dark { color: var(--text); padding: 0 0 1rem; }
.sidebar nav { flex: 1; padding: 0 .6rem; }
.nav-section { text-transform: uppercase; font-size: .7rem; letter-spacing: .08em; color: var(--side-muted); padding: 1rem .65rem .4rem; }
.sidebar nav a { display: flex; align-items: center; gap: .65rem; padding: .55rem .65rem; border-radius: 6px; color: var(--side-text); }
.sidebar nav a:hover { background: var(--side-2); color: #fff; text-decoration: none; }
.sidebar nav a.active { background: var(--accent); color: #fff; }
.sidebar nav a.parent.open { color: #fff; }
.subnav { display: grid; gap: 1px; margin: .15rem 0 .35rem 1.6rem; padding-left: .6rem; border-left: 1px solid var(--side-2); }
.subnav a { padding: .4rem .65rem; font-size: .9rem; }
.sidebar-foot { padding: 1rem 1.25rem; border-top: 1px solid var(--side-2); font-size: .85rem; display: grid; gap: .4rem; }
.sidebar-foot a, .sidebar-foot .link { color: var(--side-text); }
.who { color: #fff; }
.who span { display: block; color: var(--side-muted); font-size: .75rem; }
.main { flex: 1; margin-left: var(--side-w); min-width: 0; }
.topbar { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; padding: .6rem 1.5rem; background: var(--surface);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.switch label { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--muted); }
.switch select { min-width: 12rem; }
.hamburger { display: none; background: none; border: 0; padding: .3rem; color: var(--text); }
.backdrop { display: none; }
.content { padding: 1.5rem; max-width: 1200px; }
.page-head { margin-bottom: 1.25rem; }

/* components */
.flash { background: #e8f5ee; border: 1px solid #b9e0c8; color: #165c35; padding: .65rem .9rem; border-radius: var(--radius); margin-bottom: 1rem; }
.warn-box { background: #fff8e6; border: 1px solid #f1d58a; color: #5c4400; padding: .65rem .9rem; border-radius: var(--radius); margin-bottom: 1rem; }
.warn-box p { margin: 0 0 .5rem; }
.error { background: #fdecec; border: 1px solid #f3c0c0; color: #8f2424; padding: .65rem .9rem; border-radius: var(--radius); margin-bottom: 1rem; }
.empty { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 2rem; text-align: center; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; color: var(--text); }
.stat span { color: var(--muted); font-size: .85rem; }
.stat strong { display: block; font-size: 1.8rem; margin-top: .25rem; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: #fafbfc; }
tr:last-child td { border-bottom: 0; }
tr.selected td { background: #eef3fe; }
pre { font-size: .75rem; max-width: 40rem; overflow: auto; background: #f6f7f9; padding: .5rem; border-radius: 6px; }
.badge { display: inline-block; font-size: .75rem; padding: .1rem .5rem; border-radius: 999px; background: #eef0f3; color: var(--muted); }
.badge.active { background: #e3f4ea; color: var(--ok); }
.badge.disabled { background: #f3e5e5; color: var(--danger); }
.badge.authority-active { background: #e3f4ea; color: var(--ok); }
.badge.authority-inactive { background: #fff4d6; color: #6b4b00; }
.badge.authority-revoked { background: #f3e5e5; color: var(--danger); }
.companies-table td { vertical-align: middle; }
.co-cell.loading { color: var(--muted); }
.co-cell.loading::before { content: ''; display: inline-block; width: .7rem; height: .7rem; margin-right: .35rem; vertical-align: -1px;
  border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: co-spin .8s linear infinite; }
@keyframes co-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .co-cell.loading::before { animation: none; } }
.companies-table input, .companies-table select { width: 100%; min-width: 6rem; }
.badge.authority-pending { background: #eef1f5; color: var(--muted); }
.row-form .authority { grid-column: 1 / -1; }
.tabs { display: flex; gap: .25rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); }
.tabs a { padding: .5rem .9rem; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--text); border-color: var(--accent); }

/* forms */
input, select, button { font: inherit; }
input, select { padding: .5rem .6rem; border: 1px solid var(--border); border-radius: 6px; background: #fff; width: 100%; color: var(--text); }
.switch select { width: auto; padding: .35rem .5rem; }
button { padding: .5rem .9rem; border: 1px solid var(--border); background: #fff; border-radius: 6px; cursor: pointer; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover { background: var(--accent-2); }
button.danger { color: var(--danger); border-color: #f0c4c4; }
button.link { background: none; border: 0; padding: 0; text-align: left; }
.form { display: grid; gap: .9rem; }
.form label { display: grid; gap: .3rem; font-size: .85rem; color: var(--muted); }
.form.grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: end; background: var(--surface);
  padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: .9rem; }
.narrow { max-width: 28rem; }
.actions { display: flex; gap: .75rem; align-items: center; }
.row-form { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: .5rem; align-items: end; }
.row-form .cap { display: grid; gap: .2rem; margin: 0; }
.row-form .cap span { display: none; font-size: .75rem; color: var(--muted); }
.danger-zone { margin-top: 2rem; }

/* bare pages (login) */
body.bare { display: grid; place-items: center; min-height: 100vh; padding: 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; width: 100%; }

/* the side menu folded to icons (wide screens only): titles on hover, a section's pages in a
   flyout, the person under an avatar */
@media (min-width: 861px) {
  .side-anim .sidebar { transition: width .2s ease; }
  .side-anim .main { transition: margin-left .2s ease; }
  .side-collapsed { --side-w: 64px; }
  .side-collapsed .sidebar { overflow: visible; }
  .side-collapsed .brand { padding: 1rem 0 .5rem; }
  .side-collapsed .brand-row { flex-direction: column; gap: .6rem; }
  .side-collapsed .tumar-logo, .side-collapsed .brand-tenant, .side-collapsed .side-toggle .when-open,
  .side-collapsed .label, .side-collapsed .subnav, .side-collapsed .sidebar-foot, .side-collapsed .nav-badge { display: none; }
  .side-collapsed .tumar-mark, .side-collapsed .side-toggle .when-folded { display: block; }
  .side-collapsed .side-toggle { margin: 0; }
  .side-collapsed .sidebar nav { padding: 0 .55rem; }
  .side-collapsed .nav-section { padding: .5rem 0; margin: 0 .3rem; border-top: 1px solid var(--side-2); }
  .side-collapsed .nav-section:first-child { border-top: 0; }
  .side-collapsed .nav-item { position: relative; }
  .side-collapsed .nav-item > a { justify-content: center; padding: .6rem 0; }
  .side-collapsed .nav-item > a.open { background: var(--side-2); color: #fff; }
  .side-collapsed .nav-item > a.parent.open:not(.active) { box-shadow: inset 3px 0 0 var(--accent); }
  .side-collapsed .flyout { position: absolute; left: 100%; top: 0; z-index: 30; min-width: 11rem; padding: 0 0 0 .5rem; }
  .side-collapsed .nav-item:hover .flyout, .side-collapsed .nav-item:focus-within .flyout { display: grid; }
  .side-collapsed .flyout > * { background: var(--side); }
  .side-collapsed .flyout a { display: flex; align-items: center; gap: .5rem; padding: .45rem .8rem; border-radius: 0; color: var(--side-text); white-space: nowrap; }
  .side-collapsed .flyout a:hover { background: var(--side-2); color: #fff; text-decoration: none; }
  .side-collapsed .flyout a.active { color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
  .side-collapsed .flyout .fly-head { font-weight: 600; color: #fff; border-radius: 6px 6px 0 0; }
  .side-collapsed .flyout > :last-child { border-radius: 0 0 6px 6px; padding-bottom: .55rem; }
  .side-collapsed .flyout > :only-child { border-radius: 6px; padding-bottom: .45rem; }
  .side-collapsed .side-me { display: block; position: relative; margin: auto 0 0; padding: .8rem 0 1rem; border-top: 1px solid var(--side-2); text-align: center; }
  .side-collapsed .avatar { list-style: none; width: 36px; height: 36px; margin: 0 auto; border-radius: 50%; background: var(--side-2); color: #fff;
    display: grid; place-items: center; font-weight: 600; font-size: .85rem; cursor: pointer; }
  .side-collapsed .avatar::-webkit-details-marker { display: none; }
  .side-collapsed .avatar:hover, .side-collapsed .side-me[open] .avatar { background: var(--accent); }
  .side-collapsed .side-me[open] .me-menu { display: grid; top: auto; bottom: .8rem; gap: .1rem; padding: .7rem .9rem; margin-left: .5rem;
    background: var(--side); border-radius: 6px; text-align: left; font-size: .85rem; box-shadow: 0 4px 16px rgb(0 0 0 / .25); }
  .side-collapsed .me-menu > * { background: none; }
  .side-collapsed .me-menu a, .side-collapsed .me-menu .link { padding: .25rem 0; color: var(--side-text); }
  .side-collapsed .me-menu .who { padding-bottom: .35rem; }
}
@media (min-width: 861px) and (prefers-reduced-motion: reduce) { .side-anim .sidebar, .side-anim .main { transition: none; } }

/* phone */
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  .nav-open .sidebar { transform: none; }
  .nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgb(0 0 0 / .4); z-index: 15; }
  .main { margin-left: 0; }
  .hamburger { display: inline-flex; }
  .side-toggle { display: none; }
  .topbar { padding: .5rem 1rem; gap: .5rem; }
  .switch select { min-width: 0; max-width: 60vw; }
  .content { padding: 1rem; }
  .row-form { grid-template-columns: 1fr 1fr; }
  .row-form input[name="name"] { grid-column: 1 / -1; }
}

/* banners, admin */
.banner { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; padding: .55rem 1.5rem; font-size: .9rem; border-bottom: 1px solid var(--border); }
.banner form { margin: 0; }
.banner a { color: inherit; text-decoration: underline; font-weight: 600; }
.banner button { padding: .2rem .7rem; }
.banner .notice-ack { margin-left: auto; }
.banner .notice-ack-btn { background: transparent; border: 1px solid currentColor; border-radius: 4px; color: inherit; font-size: .8rem; padding: .1rem .55rem; cursor: pointer; opacity: .85; }
.banner .notice-ack-btn:hover { opacity: 1; background: rgb(0 0 0 / .06); }
.banner.impersonation { background: #7a1f1f; color: #fff; }
.banner.warn { background: #fff4d6; color: #6b4b00; }
.banner.info { background: #eef3fe; color: #1f3f86; }
.admin-bar { background: var(--side); color: #fff; }
.admin-bar-inner { max-width: 1400px; margin: 0 auto; padding: .7rem 1.5rem; display: flex; align-items: center; gap: .75rem; }
.admin-brand { color: #fff; font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; flex: none; }
.admin-brand:hover { text-decoration: none; }
.pill { flex: none; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  padding: .2rem .55rem; border-radius: 999px; background: #2b3550; color: #c9d4f2; }
.admin-email { margin-left: auto; color: var(--side-text); font-size: .9rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-signout { margin: 0; flex: none; }
button.ghost { background: transparent; color: #fff; border: 1px solid #3a4560; padding: .35rem .8rem; white-space: nowrap; }
button.ghost:hover { background: var(--side-2); }
.content.wide { max-width: 1400px; margin: 0 auto; }
.admin-table td { vertical-align: middle; }
.admin-table .num { text-align: right; }
.admin-table .sub { display: block; font-size: .8rem; color: var(--muted); }
.admin-table .sub.urgent { color: var(--danger); font-weight: 600; }
.admin-actions { display: grid; gap: .4rem; justify-items: start; }
.admin-actions form { margin: 0; }
.ctl-row { display: flex; gap: .4rem; align-items: flex-start; flex-wrap: wrap; }
.ctl { height: 2.25rem; padding-block: 0; line-height: 1; display: inline-flex; align-items: center; white-space: nowrap; }
select.ctl { width: 8.5rem; }
input.ctl.days { width: 3.5rem; }
details.more > summary { gap: .5rem; list-style: none; cursor: pointer; padding: 0 .75rem; border: 1px solid var(--border); border-radius: 6px; background: #fff; font-size: 1.1rem; }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary { background: #eef0f3; }
.more-label { display: none; }
.more-panel { display: grid; gap: .4rem; margin-top: .4rem; padding: .5rem; border: 1px solid var(--border); border-radius: 6px; background: #fafbfc; }
.secret { background: #eef3fe; border: 1px solid #c6d6fb; padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; }
.secret code { font-size: 1rem; background: #fff; padding: .1rem .4rem; border-radius: 4px; }
.badge.status-active { background: #e3f4ea; color: var(--ok); }
.badge.status-trial { background: #eef3fe; color: #1f3f86; }
.badge.status-past_due { background: #fff4d6; color: #6b4b00; }
.badge.status-suspended { background: #f3e5e5; color: var(--danger); }
.form label.check { display: flex; gap: .5rem; align-items: center; color: var(--text); font-size: .9rem; }
.form label.check input { width: auto; }
.checks { display: grid; gap: .3rem; padding-left: 1.5rem; }
@media (max-width: 860px) {
  .banner { padding: .5rem 1rem; }
  .admin-bar-inner { padding: .6rem 1rem; }
}

/* phone: tables marked .cards become one card per row (td[data-label] = caption) */
@media (max-width: 720px) {
  table.cards thead { display: none; }
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; width: 100%; }
  table.cards tr { padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
  table.cards tr:last-child { border-bottom: 0; }
  table.cards td { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .2rem 0; border: 0; text-align: right; }
  table.cards td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: .8rem; text-align: left; flex: none; }
  table.cards td.card-title, table.cards td:first-child { display: block; text-align: left; padding-bottom: .35rem; }
  table.cards td:first-child::before, table.cards td.card-title::before, table.cards td.admin-actions::before { display: none; }
  table.cards td.card-action { justify-content: flex-start; padding-top: .5rem; }
  table.cards td.empty-cell { display: none; }
  table.cards td .val { text-align: right; }
  table.cards td.nowrap { white-space: normal; }
  table.cards pre { max-width: calc(100vw - 4rem); }
  table.cards tr.selected { background: #eef3fe; }

  .admin-table td.admin-actions { display: grid; justify-content: stretch; justify-items: stretch; text-align: left; padding-top: .6rem; }
  .admin-actions .primary.ctl { width: 100%; justify-content: center; }
  .admin-actions select.ctl { flex: 1; width: auto; min-width: 0; }
  .admin-actions .ctl-row > form.ctl-row { flex: 1; flex-wrap: nowrap; min-width: 0; }
  .admin-actions > .ctl-row { flex-wrap: wrap; }
  .admin-actions details.more { flex-basis: 100%; }
  .admin-actions details.more > summary { justify-content: center; gap: .5rem; font-size: .95rem; }
  .more-label { display: inline; }

  /* companies: inline edit rows get captions */
  table.cards .row-form { grid-template-columns: 1fr 1fr; }
  table.cards .row-form button { grid-column: 1 / -1; }
  .row-form .cap span { display: block; }

  /* data grids scroll sideways instead of squeezing; first column stays put */
  table.grid th, table.grid td { white-space: nowrap; }
  table.grid th:first-child, table.grid td:first-child { position: sticky; left: 0; background: var(--surface); box-shadow: 1px 0 0 var(--border); }
  table.grid th:first-child { background: #fafbfc; }

  /* admin header: Tumar · badge · Sign out on the first line, email below */
  .admin-bar-inner { flex-wrap: wrap; row-gap: .25rem; }
  .admin-signout { margin-left: auto; }
  .admin-email { order: 5; flex-basis: 100%; margin-left: 0; font-size: .8rem; }
}

.inline-banner { border: 1px solid #f1dfa6; border-radius: var(--radius); margin: 1rem 0; }
.card-action select.ctl { width: auto; min-width: 12rem; }
@media (max-width: 720px) { .card-action .ctl-row { flex-wrap: nowrap; width: 100%; } .card-action select.ctl { flex: 1; min-width: 0; } }
tr.subrow td { background: #fafbfc; }
tr.subrow td.card-title { padding-left: 1.6rem; }
/* safety */
tr.highlight td { background: #fff8e1; }
tr.muted-row td { color: var(--muted); }
.badge.new { background: #fde68a; color: #6b4b00; }
.filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin-bottom: 1rem; }
.filters label { display: grid; gap: .25rem; font-size: .8rem; color: var(--muted); }
.filters label.check { display: flex; align-items: center; gap: .4rem; color: var(--text); font-size: .9rem; }
.filters input, .filters select { width: auto; }
.filters input[type=checkbox] { width: auto; }
.filter-multi { display: grid; gap: .25rem; font-size: .8rem; color: var(--muted); }
.filter-multi .dt-multi > summary { padding: .45rem .6rem; font-size: .9rem; color: var(--text); min-width: 9rem; max-width: 16rem; }
/* pages that use the whole window (Claims board): no max width */
.content.full { max-width: none; }
.inline-form { display: inline; margin-left: .5rem; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.panel h2 { margin: 0 0 .5rem; font-size: 1rem; }
.panel p { margin: .25rem 0 .6rem; }
.panel .ctl-row label.check { display: flex; gap: .35rem; align-items: center; font-size: .9rem; }
.panel input[type=checkbox] { width: auto; }
.form .checks-inline { border: 0; padding: 0; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.form .checks-inline legend { font-size: .85rem; color: var(--muted); padding: 0; margin-bottom: .3rem; }
.form label.wide { grid-column: 1 / -1; }
textarea { font: inherit; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: 6px; width: 100%; }
table.report td, table.report th { text-align: right; }
table.report td:nth-child(-n+2), table.report th:nth-child(-n+2) { text-align: left; }
table.report tr.total td { background: #f1f4f9; font-weight: 600; border-top: 2px solid var(--border); }
table.report td, table.report th { white-space: nowrap; }
.badge { white-space: nowrap; }
select.ctl[name=basic] { width: auto; min-width: 13rem; }
@media (max-width: 720px) { select.ctl[name=basic] { min-width: 0; flex: 1; } }
/* DQ files */
td.dq-cell { font-size: .8rem; text-align: center; white-space: nowrap; }
td.dq-cell .sub { display: block; font-size: .7rem; opacity: .8; }
@media (max-width: 860px) { td.dq-cell { text-align: right; } td.dq-cell .sub { display: inline; margin-left: .4rem; } }
td.dq-cell.ok { background: #eaf7ef; color: var(--ok); }
/* a document in order is just a green dot: the eye goes to what needs work; the date is in the tooltip */
td.dq-cell .dq-dot { font-size: 1rem; line-height: 1; }
td.dq-cell.expiring { background: #fff4d6; color: #6b4b00; }
td.dq-cell.expired { background: #fde8e8; color: var(--danger); font-weight: 600; }
td.dq-cell.missing { background: #f3f4f6; color: var(--danger); }
td.dq-cell.optional { color: var(--muted); }
.badge.dq-ok { background: #e3f4ea; color: var(--ok); }
.badge.dq-expiring { background: #fff4d6; color: #6b4b00; }
.badge.dq-expired, .badge.dq-missing { background: #f3e5e5; color: var(--danger); }
.text-bad { color: var(--danger); }
.text-warn { color: #a16207; }
.type-form .ctl.short { width: 5.5rem; }
.type-form label.check { display: flex; align-items: center; gap: .3rem; font-size: .85rem; }
.type-form input[type=checkbox] { width: auto; }
.badge.ticket-open { background: #fff4d6; color: #6b4b00; }
.badge.ticket-contested { background: #eef3fe; color: #1f3f86; }
.badge.ticket-paid { background: #e3f4ea; color: var(--ok); }
.badge.ticket-dismissed { background: #eef0f3; color: var(--muted); }
.file-list { list-style: none; padding: 0; margin: 0 0 .75rem; display: grid; gap: .35rem; }
.plain-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; font-size: .92rem; }
.stat .small { display: block; color: var(--muted); margin-top: .2rem; }
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs a { white-space: nowrap; flex: none; }
td.dq-cell.no_expiry { background: #fff4d6; color: #6b4b00; }
.badge.dq-no_expiry { background: #fff4d6; color: #6b4b00; }
.stats + .detail-grid, .stats + .table-wrap, .stats + .filters, .stats + .empty, .stats + form { margin-top: 1rem; }
/* claims */
.chip { display: inline-block; font-size: .7rem; padding: .05rem .45rem; border-radius: 999px; background: #eef0f3; color: var(--muted); margin: 0 .2rem .2rem 0; white-space: nowrap; }
.chip.type-cargo { background: #e0ecff; color: #1f3f86; } .chip.type-liability { background: #f3e8ff; color: #5b2a86; }
.chip.type-physical_damage { background: #ffe8d6; color: #8a3b00; } .chip.type-theft { background: #fde8e8; color: var(--danger); }
.chip.fault-ours { background: #fde8e8; color: var(--danger); } .chip.fault-not_ours { background: #e3f4ea; color: var(--ok); }
.chip.review, .chip.sla-amber { background: #fff4d6; color: #6b4b00; } .chip.sla-red { background: #fde8e8; color: var(--danger); font-weight: 600; }
.text-ok { color: var(--ok); }
.board { display: flex; gap: .5rem; overflow-x: auto; align-items: flex-start; padding-bottom: 1rem; }
.board-col { flex: 1 0 264px; min-width: 0; background: #eef1f5; border-radius: var(--radius); padding: .5rem; min-height: 6rem; }
.board-col > header { padding: .25rem .25rem .5rem; display: grid; gap: .1rem; }
.board-col .col-totals { color: var(--muted); }
.claim-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .55rem .6rem; margin-bottom: .5rem; cursor: grab; }
.claim-card.dragging { opacity: .4; }
.claim-card-link { color: inherit; display: grid; gap: .2rem; }
.claim-card-link:hover { text-decoration: none; }
.claim-card .thumb { width: 100%; height: 90px; object-fit: cover; border-radius: 6px; }
.claim-card .money-line { display: flex; gap: .5rem; flex-wrap: wrap; }
.claim-card .card-move select { margin-top: .35rem; font-size: .8rem; padding: .2rem .3rem; }
.link-kind { font-size: .65rem; text-transform: uppercase; color: var(--accent); margin-right: .3rem; }
.stepper { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: 1rem; }
.stepper form { margin: 0; }
.stepper button, .stepper span { font-size: .8rem; padding: .3rem .6rem; border-radius: 999px; }
.stepper .current { background: var(--accent); color: #fff; border-color: var(--accent); }
.pnl-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.pnl-box > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem .75rem; display: grid; }
.pnl-box span { font-size: .75rem; color: var(--muted); } .pnl-box strong { font-size: 1.15rem; } .pnl-box small { color: var(--muted); font-size: .7rem; }
.form fieldset.group { border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75rem; }
.form fieldset.group legend { font-size: .8rem; color: var(--muted); padding: 0 .3rem; }
.timeline { list-style: none; padding: 0; display: grid; gap: .6rem; }
.timeline li { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .5rem .7rem; font-size: .9rem; }
.timeline .when { color: var(--muted); font-size: .75rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.gallery figure { margin: 0; } .gallery img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.doc-icon { display: grid; place-items: center; height: 120px; border: 1px solid var(--border); border-radius: 8px; background: #f6f7f9; font-weight: 700; color: var(--muted); }
.tasks { list-style: none; padding: 0; display: grid; gap: .4rem; } .tasks li { display: flex; gap: .5rem; align-items: center; } .tasks li.done span:first-of-type { text-decoration: line-through; color: var(--muted); }
.tabs.views a { font-size: .85rem; }
table.cards td.num { text-align: right; }
@media (max-width: 720px) { .board-col { flex-basis: 82vw; } }
.form label.sub { padding-left: 1rem; border-left: 2px solid var(--border); }
fieldset.contents { display: contents; }
a.button { display: inline-block; padding: .5rem .9rem; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); }
a.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
a.button:hover { text-decoration: none; }
.lawsuits-table td .sub { display: block; }
.lawsuits-table .status-text { min-width: 10rem; }

/* claims dashboard */
.basis { margin: 0 0 .5rem; max-width: 60rem; }
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem 1rem 1rem; --spent: #2a78d6; --recovered: #eb6834; --net: #1d2330; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: #eceef1; stroke-width: 1; }
.chart .axis-zero { stroke: #9aa1ad; stroke-width: 1; }
.chart .tick { font-size: 11px; fill: var(--muted); }
.chart .bar-spent { fill: var(--spent); }
.chart .bar-recovered { fill: var(--recovered); }
.chart .net-line { fill: none; stroke: var(--net); stroke-width: 2; stroke-linejoin: round; }
.chart .net-dot { fill: var(--net); stroke: var(--surface); stroke-width: 2; }
.chart .hit { fill: transparent; }
.chart .month:hover .hit { fill: #f2f4f7; }
.legend { display: flex; gap: .4rem 1rem; align-items: center; flex-wrap: wrap; margin-bottom: .25rem; color: var(--text); }
.legend .key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .3rem; vertical-align: -1px; }
.legend .key-spent { background: var(--spent); }
.legend .key-recovered { background: var(--recovered); }
.legend .key-net { height: 2px; width: 14px; background: var(--net); vertical-align: 3px; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 1.5rem; }
.money-stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.money-stats .stat strong { font-size: 1.45rem; overflow-wrap: anywhere; }
.chart-scroll { overflow-x: auto; }
@media (max-width: 860px) {
  .chart-scroll .chart { min-width: 560px; }
  .money-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .money-stats .stat { padding: .75rem; }
  .money-stats .stat strong { font-size: 1.15rem; }
}
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs a { white-space: nowrap; }
.dash-grid { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
@media (max-width: 860px) { .dash-grid { grid-template-columns: 1fr; } }

/* view-first cards: details list, actions behind buttons */
.card-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-start; margin: .5rem 0 1rem; }
details.action { margin: .5rem 0 1rem; }
.card-actions details.action { margin: 0; }
details.action > summary { list-style: none; cursor: pointer; display: inline-block; }
details.action > summary::-webkit-details-marker { display: none; }
summary.button { padding: .5rem .9rem; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); }
summary.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
details.action[open] > summary { margin-bottom: .75rem; }
details.action[open] { flex-basis: 100%; }
.details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem 1.5rem; margin: 0 0 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.details-grid > div { min-width: 0; }
.details-grid dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.details-grid dd { margin: .15rem 0 0; overflow-wrap: anywhere; }
.details-grid .wide { grid-column: 1 / -1; }
.details-grid .pre { white-space: pre-wrap; }
.stepper span { cursor: default; }
.stepper span:not(.current) { border: 1px solid var(--border); background: #fff; color: var(--muted); }
.form fieldset.wide, .form .actions.wide { grid-column: 1 / -1; }
@media (max-width: 860px) { .details-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem 1rem; } }
.nav-badge { margin-left: auto; display: inline-flex; gap: .25rem; align-items: center; font-size: .72rem; font-weight: 600; background: rgb(255 255 255 / .14); color: #fff; border-radius: 999px; padding: .05rem .45rem; }
.nav-badge b { background: #e34948; color: #fff; border-radius: 999px; padding: 0 .35rem; font-weight: 700; }
.badge.task-open { background: #eef3fe; color: #1f3f86; }
.badge.task-in_progress { background: #fff4d6; color: #6b4b00; }
.badge.task-done { background: #e3f4ea; color: var(--ok); }
.badge.priority-urgent { background: #f3e5e5; color: var(--danger); }
.badge.priority-high { background: #fff4d6; color: #6b4b00; }
.file-list { padding-left: 1.2rem; }
.badge.auto { background: #ede9fb; color: #4b3cb0; }

/* data tables (core/views/datatable.eta) */
.dt-top { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; margin-bottom: .75rem; }
.dt-top .dt-search { flex: 1 1 18rem; max-width: 28rem; }
.dt-count { margin-left: auto; }
.dt-sort, .dt-filters-toggle { display: none; }
.dt-head th { white-space: nowrap; }
.dt-head th a { color: inherit; text-decoration: none; display: inline-flex; gap: .25rem; align-items: center; }
.dt-head th a:hover { color: var(--accent); }
.dt-head th[aria-sort="ascending"] a, .dt-head th[aria-sort="descending"] a { color: var(--text); }
.dt-arrow { font-size: .7rem; color: var(--accent); min-width: .7rem; }
.dt-filter-row td { padding: .35rem .5rem; background: #fafbfc; border-bottom: 1px solid var(--border); vertical-align: top; }
.dt-filter-row input[type=search] { padding: .3rem .45rem; font-size: .85rem; min-width: 6rem; }
.dt-multi { position: relative; }
.dt-multi > summary { list-style: none; cursor: pointer; padding: .3rem .45rem; border: 1px solid var(--border); border-radius: 6px; background: #fff;
  font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 12rem; }
.dt-multi > summary::-webkit-details-marker { display: none; }
.dt-multi > summary::after { content: ' ▾'; color: var(--muted); }
.dt-multi[open] .dt-multi-list { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; min-width: 14rem; max-height: 18rem; overflow: auto;
  background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgb(16 24 40 / .12); padding: .5rem .65rem; display: grid; gap: .35rem; }
.dt-multi-list label { font-size: .85rem; color: var(--text); display: flex; gap: .4rem; align-items: center; }
.dt-multi-list label:not(.check) { display: grid; gap: .2rem; color: var(--muted); }
.dt-empty td { text-align: center; color: var(--muted); padding: 1.5rem; }
.dt-pager { display: flex; gap: .75rem; align-items: center; justify-content: center; margin-top: .75rem; }
.dt-pager:empty { display: none; }
/* wide tables scroll inside their box; an open filter list is pinned to the window (app.js) so the box does not clip it */
.dt-multi[open] .dt-multi-list.pinned { position: fixed; top: var(--pin-top); left: var(--pin-left); }
@media (max-width: 860px) {
  .dt-sort, .dt-filters-toggle { display: inline-flex; align-items: center; gap: .35rem; }
  .dt-sort { display: none; }
  .dt.filters-open .dt-sort { display: flex; flex-wrap: wrap; gap: .35rem; width: 100%; }
  .dt-sort span { font-size: .8rem; color: var(--muted); }
  .dt-count { margin-left: 0; width: 100%; }
  .dt table.cards thead { display: block; }
  .dt .dt-head { display: none; }
  .dt .dt-filter-row { display: none; }
  .dt.filters-open .dt-filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding: .75rem; background: #fafbfc; border-bottom: 1px solid var(--border); }
  .dt.filters-open .dt-filter-row td { display: grid; gap: .2rem; padding: 0; border: 0; background: none; text-align: left; }
  .dt.filters-open .dt-filter-row td::before { content: attr(data-label); font-size: .75rem; color: var(--muted); }
  .dt-multi > summary { max-width: none; }
  .dt-multi[open] .dt-multi-list { position: static; box-shadow: none; margin-top: .25rem; }
}
.dt-multi-list input[type=checkbox], .dt-multi-list input[type=radio] { width: auto; flex: none; margin: 0; }
@media (max-width: 860px) {
  .dt.filters-open .dt-filter-row td:first-child::before { display: block; }
  .dt.filters-open .dt-multi > summary { width: 100%; }
}
.temp-password { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.temp-password code { font-size: 1.35rem; letter-spacing: .06em; padding: .35rem .6rem; background: #fff; border: 1px solid var(--border); border-radius: 6px; user-select: all; }
.brand-logo { display: block; max-height: 32px; max-width: 160px; margin-top: .6rem; object-fit: contain; } /* the tenant's, under Tumar's */
.logo-field { display: grid; gap: .5rem; }
.logo-preview { max-height: 64px; max-width: 240px; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: .35rem; }
.sr-only { position: absolute; left: 0; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* notifications bell (top bar) */
.topbar .bell { margin-left: auto; position: relative; display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem;
  border-radius: 8px; color: var(--muted); }
.topbar .bell:hover { background: #f1f3f6; color: var(--text); text-decoration: none; }
.topbar .bell.has-unread { color: var(--text); }
.topbar .bell svg { width: 1.25rem; height: 1.25rem; }
.bell-count { position: absolute; top: 0; right: -2px; min-width: 1.1rem; height: 1.1rem; padding: 0 .25rem; border-radius: 999px; background: var(--danger);
  color: #fff; font-size: .7rem; font-weight: 600; line-height: 1.1rem; text-align: center; }
.notif-list { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.notif-list li { border-bottom: 1px solid var(--border); }
.notif-list li:last-child { border-bottom: 0; }
.notif-list a { display: grid; gap: .15rem; padding: .7rem .9rem; color: inherit; }
.notif-list a:hover { background: #f8f9fb; text-decoration: none; }
.notif-list li.unread a { background: #f2f6ff; }
.notif-list .what { font-size: .9rem; }
.notif-list .snippet { color: var(--muted); font-size: .85rem; }
.notif-list .when { color: var(--muted); font-size: .75rem; }

/* claim chat */
.chat-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .5rem; max-height: 60vh; overflow-y: auto;
  display: grid; gap: .5rem; align-content: start; margin-bottom: .75rem; }
.chat-empty { margin: .5rem; }
.msg { max-width: 46rem; padding: .5rem .7rem; border-radius: 10px; background: #f3f5f8; }
.msg.mine { background: #eaf1ff; justify-self: end; }
.msg.deleted { background: none; border: 1px dashed var(--border); }
.msg.flash-msg { outline: 2px solid var(--accent); }
.msg header { font-size: .8rem; display: flex; gap: .4rem; align-items: baseline; flex-wrap: wrap; }
.msg header .when { color: var(--muted); font-size: .75rem; }
.msg .body { margin: .25rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .mention { color: var(--accent); font-weight: 600; }
.msg-files { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; }
.msg-files img { width: 120px; height: 90px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.file-chip { font-size: .8rem; padding: .25rem .5rem; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.msg-actions { display: flex; gap: .6rem; margin-top: .25rem; }
.chat-form { display: grid; gap: .5rem; }
.chat-form-row { display: flex; gap: .75rem; align-items: end; justify-content: space-between; flex-wrap: wrap; }
.mention-wrap { position: relative; }
.mention-wrap textarea { width: 100%; }
.mention-list { position: absolute; left: .5rem; bottom: calc(100% + 4px); z-index: 30; list-style: none; margin: 0; padding: .25rem 0; min-width: 14rem;
  background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgb(16 24 40 / .12); }
.mention-list li { padding: .35rem .7rem; cursor: pointer; font-size: .9rem; }
.mention-list li.active, .mention-list li:hover { background: #eef3fe; }
.chat-note { margin: 0 0 .75rem; }
.chat-badge { display: inline-flex; align-items: center; gap: .2rem; font-size: .72rem; font-weight: 600; color: #fff; background: var(--accent);
  border-radius: 999px; padding: .05rem .4rem; }
.chat-badge svg { width: .8rem; height: .8rem; }
.chat-badge:hover { text-decoration: none; filter: brightness(1.1); }

.admin-nav { display: flex; gap: .25rem; }
.admin-nav a { color: #c4cad6; padding: .3rem .6rem; border-radius: 6px; font-size: .9rem; }
.admin-nav a.active, .admin-nav a:hover { background: rgb(255 255 255 / .1); color: #fff; text-decoration: none; }
.co-fmcsa { display: block; color: var(--muted); margin-top: .2rem; }
.companies-table input.units { max-width: 6rem; }
.fmcsa-preview { grid-column: 1 / -1; padding: .6rem .8rem; border-radius: var(--radius); border: 1px solid var(--border); background: #f8fafc; }
.fmcsa-preview.ok { border-color: #b9e0c8; background: #f1faf4; }
.fmcsa-preview.bad { border-color: #f3c0c0; background: #fdf3f3; color: #8f2424; }

.tumar-logo { display: block; height: 32px; width: auto; }
.brand-home { display: block; border-radius: 4px; }
.brand-home:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.brand.dark .tumar-logo { height: 40px; }
.admin-brand .tumar-logo { height: 28px; }
/* Audit > Insurance */
.insured { display: inline-flex; align-items: center; gap: .3rem; font-size: .82rem; white-space: nowrap; }
.insured .mark { display: inline-grid; place-items: center; width: 1.1rem; height: 1.1rem; border-radius: 50%; font-size: .7rem; font-weight: 700; color: #fff; background: #98a2b3; }
.insured-yes .mark { background: var(--ok); } .insured-no .mark { background: var(--danger); }
.insured-btn { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .45rem; border: 1px solid var(--border); border-radius: 999px; background: #fff; font: inherit; font-size: .8rem; cursor: pointer; }
.insured-btn:hover { border-color: var(--accent); }
tr.ins-missing td { background: #fdf0f0; } tr.ins-extra td { background: #fff6e5; }
.ins-stats .stat.bad strong { color: var(--danger); } .ins-stats .stat.warn strong { color: #a15c00; }
.ins-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: .6rem; margin: 1rem 0 .5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); position: sticky; top: 0; z-index: 3; }
.ins-actions .sep { width: 1px; height: 1.4rem; background: var(--border); margin: 0 .3rem; }
.ins-table td.pick { width: 2rem; }
.value-input { width: 7rem; text-align: right; }
.small-btn { font-size: .8rem; padding: .25rem .55rem; margin-left: .5rem; }
.email-preview { max-width: 46rem; white-space: pre-wrap; background: var(--surface); border: 1px solid var(--border); padding: 1rem; font-size: .9rem; }
.ins-unknown > summary { list-style: none; cursor: pointer; } .ins-unknown > summary h2 { display: inline; }
.cover { display: inline-flex; align-items: center; gap: .2rem; font-size: .8rem; }
.cover .mark { display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 6px; font-weight: 700; color: #fff; background: #98a2b3; font-size: .75rem; }
.cover-yes .mark { background: var(--ok); } .cover-no .mark { background: var(--danger); } .cover-nopolicy .mark { background: #e3e6eb; color: var(--muted); }
.cover-btn { display: inline-flex; align-items: center; gap: .25rem; padding: 0; border: 0; background: none; cursor: pointer; }
.cover-btn:hover .mark { outline: 2px solid var(--accent); outline-offset: 1px; }
.cover-flag { font-size: .7rem; font-weight: 700; color: #a15c00; background: #fff4d6; border-radius: 4px; padding: 0 .25rem; }
.cover-add { font-size: .75rem; white-space: nowrap; }
.chips-cover { display: inline-flex; gap: .4rem; align-items: center; }
.chips-cover .lbl { font-size: .7rem; color: var(--muted); font-weight: 600; }
tr.ins-warn td { background: #fff8eb; }
.value-input.missing { border-color: #e0a000; background: #fffaf0; }

/* Companies (MC): list and company page */
.chip.chip-ok { background: #e3f4ea; color: var(--ok); } .chip.chip-warn { background: #fff4d6; color: #6b4b00; }
.chip.chip-bad { background: #fde8e8; color: var(--danger); } .chip.chip-muted { background: #eef0f3; color: var(--muted); }
.chips-link { text-decoration: none; }
tr.row-link { cursor: pointer; } tr.row-link:hover td { background: #f6f8fb; }
.co-logo-cell { width: 3rem; }
.co-logo-sm { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; object-fit: contain; border-radius: 6px; background: #fff; border: 1px solid var(--border); }
.co-logo-empty { background: #eef0f3; color: var(--muted); font-weight: 600; font-size: .9rem; }
.co-head { display: flex; gap: 1rem; align-items: center; }
.co-head h1 { margin-bottom: .1rem; }
.co-logo-md { width: 4rem; height: 4rem; object-fit: contain; border-radius: 8px; border: 1px solid var(--border); background: #fff; flex: none; }
.co-logo-panel { padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; display: inline-block; min-width: 12rem; margin-bottom: .75rem; }
.co-logo-lg { display: block; max-width: min(24rem, 100%); max-height: 10rem; object-fit: contain; }
.co-tabs { overflow-x: auto; scrollbar-width: thin; }
.co-tabs a { white-space: nowrap; }
.co-ins { margin-bottom: 2rem; }
.co-ins h3 { font-size: 1rem; margin: 1rem 0 .5rem; }
.co-cert-form label { display: inline-flex; flex-direction: column; gap: .2rem; }
.co-cert-history { margin: .5rem 0; }
details.inline-edit > summary { list-style: none; display: inline-block; }
details.inline-edit[open] { min-width: min(36rem, 90vw); }
input.short { max-width: 8rem; }
@media (max-width: 640px) { .co-head { align-items: flex-start; } .co-logo-md { width: 3rem; height: 3rem; } }
.notice { background: #eef3fe; border: 1px solid #c9d8f7; color: #1f3f86; border-radius: var(--radius); padding: .6rem .9rem; margin-bottom: 1rem; }
fieldset.insureds { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; align-items: center; }
fieldset.insureds .check { display: inline-flex; gap: .35rem; align-items: center; }
fieldset.insureds > p { flex-basis: 100%; margin: .25rem 0 0; }
.co-role { font-size: .75rem; color: var(--muted); display: block; }

/* Certificate first (Audit > Insurance, company page): upload, read, check, save */
.coi-upload { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: .5rem 0 1rem; }
.coi-pick { cursor: pointer; }
.coi-pick:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.htmx-indicator { display: none; }
.htmx-indicator.htmx-request, .htmx-request .htmx-indicator { display: inline-flex; }
.coi-reading { align-items: center; gap: .5rem; color: var(--muted); }
.spinner { width: 1rem; height: 1rem; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
.coi-review { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 1.25rem; align-items: start; margin-bottom: 2rem;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 1rem; }
.coi-preview { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: .4rem; }
.coi-preview iframe { width: 100%; height: min(80vh, 60rem); border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.coi-preview img { width: 100%; border: 1px solid var(--border); border-radius: 6px; }
.coi-form fieldset { margin-bottom: .9rem; }
.coi-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .6rem .8rem; }
.coi-fields label { display: flex; flex-direction: column; gap: .2rem; font-size: .85rem; }
.coi-additional { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .5rem; align-items: center; }
input.coi-from, select.coi-from { background: #eef6ff; border-color: #9cc1f2; }
input.coi-unsure, select.coi-unsure { background: #fff4e0; border-color: #f0a33a; }
label.coi-from { background: #eef6ff; border-radius: 4px; padding: 0 .3rem; }
.coi-key { display: inline-block; padding: 0 .4rem; border-radius: 4px; border: 1px solid; font-size: .75rem; }
.coi-key.coi-from { background: #eef6ff; border-color: #9cc1f2; } .coi-key.coi-unsure { background: #fff4e0; border-color: #f0a33a; }
.coi-unsure-text { color: #8a4b00; }
.coi-was { font-size: .72rem; color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.coi-units { list-style: none; padding: 0; margin: .25rem 0; display: grid; gap: .2rem; }
.coi-policy legend select { font-weight: 600; }
@media (max-width: 900px) { .coi-review { grid-template-columns: 1fr; } .coi-preview { position: static; order: -1; } .coi-preview iframe { height: 50vh; } }
label.button, summary.button { display: inline-block; padding: .5rem .9rem; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); cursor: pointer; font-size: 1rem; }
label.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
label.button.primary:hover { background: var(--accent-2); }
.coi-form label.check { display: inline-flex; flex-direction: row; align-items: center; gap: .35rem; color: var(--text); font-size: .9rem; }
.coi-form label.check input { width: auto; }
.coi-form fieldset { border: 1px solid var(--border); border-radius: 6px; padding: .6rem .8rem .8rem; }
.coi-form .coi-fields input, .coi-form select { width: 100%; }
.coi-form legend select { width: auto; }
.coi-form .actions { display: flex; gap: .6rem; margin-top: .5rem; }
details.co-cert-manual { margin: .5rem 0 1rem; }
details.co-cert-manual > summary { cursor: pointer; color: var(--muted); font-size: .85rem; }
th.dt-pick, td.dt-pick { width: 2rem; text-align: center; }
.co-summary { margin: .25rem 0 .75rem; }
.fmcsa-head { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.banner.bad { background: #fde8e8; color: var(--danger); }
.fmcsa-filing { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .5rem; }

/* Dispatch board (modules/dispatch): drawn like the old board - days across, loads as cards over
   the day fills, totals right of a thick line; dense rows, light background, thin lines, no
   cards or shadows. Everything under .dispatch-board so nothing leaks into the rest of Tumar. */
.dispatch-board { --db-ink: #1a1a1a; --db-line: #d9d9d9; --db-head: #f2f2f2; --db-weekend: rgba(0, 0, 0, 0.06); --db-group: #eef3fa;
  font-size: 13px; color: var(--db-ink); }
.dispatch-board .muted { color: #6b6b6b; font-weight: 400; }
.dispatch-board .db-head { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.25rem; margin-bottom: .5rem; }
.dispatch-board .db-head h1 { margin: 0; font-size: 1.35rem; }
.dispatch-board .db-nav { display: flex; gap: 10px; align-items: center; }
.dispatch-board .db-nav .button { padding: 3px 10px; font-size: 13px; }
.dispatch-board .db-week { font-size: 14px; }
.dispatch-board table.db-upcoming { border-collapse: collapse; margin-bottom: .75rem; background: #fff; }
.dispatch-board table.db-upcoming th, .dispatch-board table.db-upcoming td { border: 1px solid var(--db-line); padding: 4px 10px; text-align: left; white-space: nowrap; }
.dispatch-board table.db-upcoming th { background: var(--db-head); font-weight: 600; text-transform: none; letter-spacing: normal; font-size: 14px; color: var(--db-ink); }
.dispatch-board .db-attention { margin: .25rem 0 .75rem; } .dispatch-board .db-attention summary { cursor: pointer; }
.dispatch-board .db-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: .5rem 0; line-height: 22px; }
.dispatch-board .db-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.dispatch-board .db-sep { color: #999; }
.dispatch-board .sw { display: inline-block; width: 16px; height: 16px; border: 1px solid rgba(0, 0, 0, 0.25); border-radius: 2px; vertical-align: -3px; }
.dispatch-board .db-wrap { overflow: auto; background: #fff; border: 1px solid var(--db-line); max-height: var(--fit-height, none); }
/* the board scrolls in its own box (data-fit-height): the head on top and Week total at the bottom always show */
.dispatch-board table.dboard tfoot tr.week-total td { position: sticky; bottom: 0; z-index: 3; }
.dispatch-board table.dboard { table-layout: fixed; border-collapse: collapse; width: 100%; min-width: 1500px; }
.dispatch-board table.dboard col.who { width: 230px; } .dispatch-board table.dboard col.day { width: auto; }
.dispatch-board table.dboard col.tot { width: 76px; } .dispatch-board table.dboard col.tot.wide { width: 104px; }
.dispatch-board table.dboard th, .dispatch-board table.dboard td { border-bottom: 1px solid var(--db-line); padding: 6px 8px; vertical-align: top; }
.dispatch-board table.dboard thead th { position: sticky; top: 0; z-index: 4; background: #fff; text-align: left; font-weight: 600; border-bottom: 1px solid #bbb; white-space: nowrap;
  text-transform: none; letter-spacing: normal; font-size: 14px; color: var(--db-ink); padding: 8px; }
.dispatch-board table.dboard thead th.num { text-align: right; }
.dispatch-board table.dboard thead th.weekend { background: #ebebeb; }
.dispatch-board table.dboard thead th.today { outline: 2px solid var(--db-ink); outline-offset: -2px; }
.dispatch-board table.dboard .num { text-align: right; vertical-align: middle; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dispatch-board table.dboard .tot-first { border-left: 2px solid var(--db-ink); }
.dispatch-board table.dboard .rc-pct { color: #6b6b6b; font-size: 11px; font-weight: 400; }
.dispatch-board table.dboard tr.group td { background: var(--db-group); padding: 6px 8px; vertical-align: middle; }
.dispatch-board table.dboard tbody.orphan tr.group td { background: #f9e7ea; }
.dispatch-board table.dboard tr.group button.fold { padding: 0 6px; margin-right: 8px; font-size: 11px; line-height: 18px; border: 1px solid #bbb; border-radius: 3px; background: #fff; }
.dispatch-board table.dboard .you { background: var(--db-ink); color: #fff; border-radius: 3px; padding: 0 5px; font-size: 11px; }
.dispatch-board table.dboard .spec { font-size: 12px; padding: 0 6px; border-radius: 3px; margin-left: 8px; }
.dispatch-board .spec-reefer_van { border: 1px solid #5aa36a; color: #23602f; background: #eef8f0; }
.dispatch-board .spec-stepdeck { border: 1px solid #8e6cc2; color: #4b2b7a; background: #f4effb; }
.dispatch-board table.dboard tbody.collapsed tr.driver { display: none; }
.dispatch-board table.dboard tr.driver:nth-child(odd) td { background: #fafafa; }
.dispatch-board table.dboard td.who .est { display: block; font-size: 12px; color: #6b6b6b; white-space: normal; }
.dispatch-board table.dboard td.who .est a { color: inherit; text-decoration: underline; }
.dispatch-board table.dboard td.who a b { color: var(--db-ink); }
.dispatch-board table.dboard td.who .offboard { font-size: 10px; font-weight: 700; text-transform: uppercase; color: #8a3b00; }
.dispatch-board table.dboard tr.idle td.who b { font-weight: 400; color: #6b6b6b; }
.dispatch-board table.dboard td.who .term { font-size: 11px; color: #6b6b6b; border: 1px solid #c4c4c4; border-radius: 3px; padding: 0 4px; background: #f1f1f1; white-space: nowrap; }
/* heat: RPM red <= 2.80, white at 3.20, green >= 3.60; RC blue by its share of gross */
.dispatch-board td.h-r3 { background: #f4b4ae !important; } .dispatch-board td.h-r2 { background: #f8cdc8 !important; } .dispatch-board td.h-r1 { background: #fce6e3 !important; }
.dispatch-board td.h-g1 { background: #e3f3e4 !important; } .dispatch-board td.h-g2 { background: #cbe9cd !important; } .dispatch-board td.h-g3 { background: #b3dcb5 !important; }
.dispatch-board td.h-b1 { background: #eef4fc !important; } .dispatch-board td.h-b2 { background: #dde9fa !important; } .dispatch-board td.h-b3 { background: #c9dcf6 !important; }
.dispatch-board td.h-b4 { background: #b3cef2 !important; } .dispatch-board td.h-b5 { background: #9cbfee !important; }
.dispatch-board table.dboard tfoot tr.week-total td { background: #ebebeb; border-top: 2px solid var(--db-ink); padding: 6px 8px; vertical-align: middle; }
/* a driver's week: the day fills (clickable) under the loads grid, labels on the fills */
.dispatch-board td.lanes-cell { padding: 0; position: relative; isolation: isolate; }
.dispatch-board .day-bg { position: absolute; inset: 0; z-index: 0; display: grid; grid-template-columns: repeat(7, 1fr); }
.dispatch-board .day-bg .day { border: 0; border-radius: 0; margin: 0; padding: 2px 5px; background: transparent; cursor: pointer; text-align: left;
  display: flex; align-items: flex-start; justify-content: flex-end; font: inherit; color: inherit; min-height: 100%; }
.dispatch-board .day-bg .day.weekend { background: var(--db-weekend); }
.dispatch-board .day-bg .day:hover { background-image: linear-gradient(rgba(0, 0, 0, 0.09), rgba(0, 0, 0, 0.09)); }
.dispatch-board .day-bg .day .tag { font-size: 10px; line-height: 13px; font-weight: 700; white-space: nowrap; }
.dispatch-board td.lanes-cell:not(.tagged) .day .tag { align-self: center; margin: auto; font-size: 11px; }
.dispatch-board td.lanes-cell.tagged .lanes { padding-top: 18px; }
.dispatch-board .st-need_load { background: #f4b4ae !important; color: #7a1712; } .dispatch-board .st-covered { background: #b3dcb5 !important; color: #18501b; }
.dispatch-board .st-off.off-home { background: #f6f27a !important; color: #4a4700; } .dispatch-board .st-off.off-yard { background: #8fdcd6 !important; color: #0d4b46; }
.dispatch-board .st-off.off-untyped { background: #dcdcdc repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.10) 0 3px, transparent 3px 8px) !important; color: #444; }
.dispatch-board .st-empty_earlier { background: #ffb36b !important; color: #6b3000; }
.dispatch-board .st-otr_repair { background: #c3aef0 !important; color: #3b2378; } .dispatch-board .st-shop { background: #8fb3e8 !important; color: #10305e; }
.dispatch-board .st-dealer { background: #eb9ad8 !important; color: #5e1050; }
.dispatch-board .st-gps-yard { background: #bfeae6 repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.35) 0 4px, transparent 4px 9px) !important; color: #0d4b46; }
.dispatch-board .st-gps-parked { background: #e6e6e6 !important; color: #444; }
.dispatch-board .gps-stale { background: #e6efee repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.06) 0 4px, transparent 4px 9px) !important; color: #5b6766; }
.dispatch-board .gps-stale .tag { font-style: italic; font-weight: 500 !important; }
.dispatch-board .day.in-plan, .dispatch-board .sw.plan-sw { --plan-hatch: rgba(222, 215, 60, 0.55); --plan-line: #b9b23a; }
.dispatch-board .day.in-plan.off-yard { --plan-hatch: rgba(80, 190, 180, 0.45); --plan-line: #3a9f96; }
.dispatch-board .day.in-plan.off-untyped { --plan-hatch: rgba(0, 0, 0, 0.12); --plan-line: #8a8a8a; }
.dispatch-board .day.in-plan { background-image: repeating-linear-gradient(135deg, var(--plan-hatch) 0 3px, transparent 3px 8px); box-shadow: inset 0 0 0 2px var(--plan-line); }
.dispatch-board .sw.plan-sw { background: repeating-linear-gradient(135deg, var(--plan-hatch) 0 2px, transparent 2px 5px); border: 1px dashed var(--plan-line); }
.dispatch-board .off-shift { display: inline-block; font-size: 10px; line-height: 12px; font-weight: 700; padding: 0 3px; margin-left: 4px; border-radius: 6px;
  background: #fff; color: #333; border: 1px solid #999; }
.dispatch-board .off-shift.yellow { background: #f6f27a; border-color: #b9b23a; color: #4a4700; }
.dispatch-board .off-shift.red { background: #f4b4ae; border-color: #c0605a; color: #7a1712; }
.dispatch-board .lanes { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-flow: row dense;
  gap: 5px 6px; padding: 6px; min-height: 30px; pointer-events: none; }
.dispatch-board .load { pointer-events: auto; border: 1px solid rgba(0, 0, 0, 0.35); border-left-width: 4px; border-radius: 3px; padding: 2px 5px;
  font-size: 12px; line-height: 1.3; overflow: hidden; color: #1a1a1a; background-color: #fff; min-width: 0; }
.dispatch-board .load span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dispatch-board .load .meta { color: #4a4a4a; }
.dispatch-board .load .rc-load { color: #5a4a00; font-weight: 600; }
.dispatch-board .load.done, .dispatch-board .sw.ld-done { background-color: #eceff1; border-left-color: #78909c; }
.dispatch-board .load.rolling, .dispatch-board .sw.ld-rolling { background-color: #deecfc; border-left-color: #2f6fb5; }
.dispatch-board .load.planned, .dispatch-board .sw.ld-planned { background-color: #f7eede; border-left-color: #8a6400; }
.dispatch-board .load.tonu, .dispatch-board .sw.ld-tonu { background-color: #fae0ec; border-left-color: #c2185b; }
.dispatch-board .sw.ld-done, .dispatch-board .sw.ld-rolling, .dispatch-board .sw.ld-planned, .dispatch-board .sw.ld-tonu { border-left-width: 4px; border-left-style: solid; }
.dispatch-board .load.context { border-style: dashed; border-left-style: solid; background-image: repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.07) 0 3px, transparent 3px 9px); }
.dispatch-board .sw.ld-context { background: #eceff1 repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.18) 0 2px, transparent 2px 5px); border: 1px dashed #666; }
.dispatch-board .load .ctx-tag { display: inline; font-size: 10px; font-weight: 600; text-transform: uppercase; color: #555; border: 1px solid #999; border-radius: 2px; padding: 0 3px; background: #fff; }
.dispatch-board .c1 { grid-column-start: 1; } .dispatch-board .c2 { grid-column-start: 2; } .dispatch-board .c3 { grid-column-start: 3; } .dispatch-board .c4 { grid-column-start: 4; }
.dispatch-board .c5 { grid-column-start: 5; } .dispatch-board .c6 { grid-column-start: 6; } .dispatch-board .c7 { grid-column-start: 7; }
.dispatch-board .s1 { grid-column-end: span 1; } .dispatch-board .s2 { grid-column-end: span 2; } .dispatch-board .s3 { grid-column-end: span 3; } .dispatch-board .s4 { grid-column-end: span 4; }
.dispatch-board .s5 { grid-column-end: span 5; } .dispatch-board .s6 { grid-column-end: span 6; } .dispatch-board .s7 { grid-column-end: span 7; }
.dispatch-board .day-notes { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 0 6px; padding: 0 6px 6px; margin-top: -2px; pointer-events: none; }
.dispatch-board .day-notes .note { pointer-events: auto; font-size: 11px; line-height: 1.25; color: #1f2937; padding: 1px 4px; border-left: 3px solid #5b6b8c;
  background: rgba(255, 255, 255, 0.72); border-radius: 0 2px 2px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
/* the header: "?" help, Full / Simple, folded sections under the board */
.dispatch-board .db-help { position: relative; }
.dispatch-board .db-help summary { list-style: none; width: 22px; height: 22px; border-radius: 50%; border: 1px solid #9aa3b2; color: #4a5568;
  display: grid; place-items: center; font-weight: 700; font-size: 13px; cursor: pointer; background: #fff; }
.dispatch-board .db-help summary::-webkit-details-marker { display: none; }
.dispatch-board .db-help[open] summary, .dispatch-board .db-help summary:hover { background: var(--db-ink); color: #fff; border-color: var(--db-ink); }
.dispatch-board .db-help-body { position: absolute; z-index: 20; top: 30px; left: -8px; width: min(34rem, 86vw); padding: .7rem .9rem; background: #fff;
  border: 1px solid #c9ced6; border-radius: 6px; box-shadow: 0 6px 20px rgb(0 0 0 / .14); font-size: 13px; line-height: 1.45; }
.dispatch-board .db-help-body p { margin: 0 0 .45rem; } .dispatch-board .db-help-body p:last-child { margin: 0; }
.dispatch-board .db-switch { display: inline-flex; border: 1px solid #bbb; border-radius: 4px; overflow: hidden; }
.dispatch-board .db-switch button { border: 0; border-radius: 0; padding: 3px 12px; font-size: 13px; background: #fff; color: var(--db-ink); cursor: pointer; }
.dispatch-board .db-switch button + button { border-left: 1px solid #bbb; }
.dispatch-board .db-switch button.on { background: var(--db-ink); color: #fff; }
.dispatch-board .db-warn { margin: 0 0 .5rem; padding: .4rem .7rem; background: #fdecea; border: 1px solid #f0b9b3; border-radius: 4px; color: #7a1712; }
.dispatch-board .db-fold { margin: .75rem 0; } .dispatch-board .db-fold > summary { cursor: pointer; font-size: 14px; margin-bottom: .4rem; }
.dispatch-board table.dboard tr.driver.picked td, .dispatch-board table.dboard tr.driver:target td { box-shadow: inset 0 2px 0 #2f6fb5, inset 0 -2px 0 #2f6fb5; }
.dispatch-board table.dboard tr.driver { scroll-margin-top: 120px; }
.dispatch-board table.dboard tr.driver.picked td.who, .dispatch-board table.dboard tr.driver:target td.who { background: #dbe8fa; }
/* Simple view: dispatchers by rows, Idle + 7 days, a card where each driver comes free */
.dispatch-board table.dsimple { table-layout: fixed; border-collapse: collapse; width: 100%; min-width: 1350px; }
.dispatch-board table.dsimple col.who { width: 170px; }
.dispatch-board table.dsimple th, .dispatch-board table.dsimple td { vertical-align: top; border: 1px solid #c9ced6; padding: 4px; }
.dispatch-board table.dsimple th { text-transform: none; letter-spacing: normal; color: var(--db-ink); font-size: 14px; font-weight: 600; }
.dispatch-board table.dsimple thead th { text-align: center; background: #fff; position: sticky; top: 0; z-index: 2; }
.dispatch-board table.dsimple th.who { text-align: left; background: var(--db-group); }
.dispatch-board table.dsimple tr.orphan th.who { background: #f9e7ea; }
.dispatch-board table.dsimple th.who .est { display: block; font-weight: 400; font-size: 12px; color: #6b6b6b; }
.dispatch-board table.dsimple th.who .you { display: inline-block; background: var(--db-ink); color: #fff; border-radius: 3px; padding: 0 5px; font-size: 11px; }
.dispatch-board table.dsimple td { background: #fff; }
.dispatch-board table.dsimple .stands { background: #fbe1df; } .dispatch-board table.dsimple thead th.stands { color: #7a1712; }
.dispatch-board table.dsimple .weekend { background: #e8f2fb; }
.dispatch-board table.dsimple .today { background: #cfe2fa; box-shadow: inset 2px 0 0 #2f6fb5, inset -2px 0 0 #2f6fb5; }
.dispatch-board table.dsimple thead th.today { outline: 2px solid #2f6fb5; outline-offset: -2px; color: #123d6b; box-shadow: none; }
.dispatch-board .cal-card { display: flex; flex-direction: column; gap: 1px; margin-bottom: 4px; padding: 4px 6px; border-radius: 4px; color: #1a1a1a;
  border: 1px solid rgba(0, 0, 0, 0.18); font-size: 12px; line-height: 1.3; text-decoration: none; }
.dispatch-board .cal-card:last-child { margin-bottom: 0; }
.dispatch-board .cal-card:hover { text-decoration: none; border-color: var(--db-ink); }
.dispatch-board .cal-card b { font-size: 13px; } .dispatch-board .cal-card i { color: #4a4a4a; }
.dispatch-board .cal-card span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dispatch-board .cal-card .since { font-weight: 700; color: #7a1712; }
.dispatch-board .cal-card .note { white-space: normal; font-size: 11px; padding: 1px 4px; border-left: 3px solid #5b6b8c; background: rgba(255, 255, 255, 0.72); }
.dispatch-board .cal-card.st-need_load { background: #f4b4ae; } .dispatch-board .cal-card.st-empty_earlier { background: #ffb36b; }

/* the day menu and Dispatch settings */
dialog.day-menu { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; max-width: min(46rem, 94vw); }
dialog.day-menu::backdrop { background: rgba(0,0,0,.25); }
.day-menu-close { position: absolute; top: .4rem; right: .6rem; } .day-menu-close button { border: 0; background: none; font-size: 1.4rem; }
.day-actions form { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; }
.day-menu fieldset { margin: .6rem 0; } .day-menu .ctl-row { display: flex; flex-wrap: wrap; gap: .4rem; align-items: flex-end; }
.board-history { padding-left: 1rem; max-height: 14rem; overflow: auto; }
.yard-form { border-top: 1px solid var(--border); padding-top: .75rem; }
.flag-warn { display: inline-block; font-size: .72rem; font-weight: 600; color: #8a5300; background: #fff4dc; border: 1px solid #f0d49b; border-radius: 3px; padding: 0 .35rem; white-space: nowrap; }
/* Finance > Loans */
.fin-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.fin-head h1 { margin: 0; } .fin-head .actions { margin-left: auto; display: flex; gap: .5rem; }
.fin-help { position: relative; }
.fin-help summary { list-style: none; width: 22px; height: 22px; border-radius: 50%; border: 1px solid #9aa3b2; display: grid; place-items: center; font-weight: 700; font-size: 13px; cursor: pointer; background: #fff; }
.fin-help summary::-webkit-details-marker { display: none; }
.fin-help-body { position: absolute; z-index: 20; top: 30px; left: -8px; width: min(34rem, 86vw); padding: .7rem .9rem; background: #fff; border: 1px solid #c9ced6; border-radius: 6px; box-shadow: 0 6px 20px rgb(0 0 0 / .14); }
.fin-help-body p { margin: 0 0 .45rem; }
.fin-filters { display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: flex-end; margin: .75rem 0; }
.fin-filters label { display: flex; flex-direction: column; font-size: .8rem; color: var(--muted); gap: .15rem; }
.fin-filters select, .fin-filters input { width: auto; min-width: 8rem; }
.fin-stats { margin: .75rem 0; }
.fin-wrap { overflow-x: auto; }
table.fin { border-collapse: collapse; width: 100%; font-size: .85rem; background: var(--surface); }
table.fin th, table.fin td { padding: .35rem .5rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; white-space: nowrap; }
table.fin th { font-size: .75rem; color: var(--muted); font-weight: 600; position: sticky; top: 0; background: var(--surface); }
table.fin .num, table.fin-units .num, table.fin-lines .num { text-align: right; font-variant-numeric: tabular-nums; }
table.fin tr.fin-paid td { background: #eef8f0; }
table.fin tfoot td { border-top: 2px solid var(--text); background: #f3f4f6; }
table.fin-lines tr.fin-done td { color: var(--muted); }
label.unsure input, label.unsure select { background: #fff4e0; border-color: #f0a33a; }
.fin-upload { margin: .75rem 0; }

/* Finance > Schedule by month: the old Financial Division /loans-schedule grid (13px, thin grid,
   1px frame, no radius). The table scrolls in its own box so the head (vertical) and the unit
   columns Unit…Remaining (horizontal) both stay; the columns have fixed widths for their offsets. */
.fin-sched { --ink: #1a1a1a; --line: rgba(0, 0, 0, .09); --line-frame: #9a9a9a; --line-head: #7d7d7d; --muted: #5f5f5f; --down: #a13a3a;
  --gray-body: #f6f6f7; --gray-sub: #dfe0e2; --head-row: 28px; font-size: 13px; line-height: 1.45; color: var(--ink); }
.fin-sched .sched-filters { margin: 10px 0 4px; } .fin-sched .sched-filters label { margin-right: 14px; font-size: 13px; color: var(--ink); }
.fin-sched .sched-filters select { width: auto; max-width: 240px; padding: 2px 6px; font-size: 13px; }
.fin-sched .sched-period { color: var(--muted); margin: 4px 0 12px; } .fin-sched .sched-period a { color: var(--ink); }
.fin-sched .sched-summary { margin: 8px 0; max-width: 120em; }
.fin-sched .sched-warn { color: var(--down); }
.fin-sched .est { color: var(--muted); } .fin-sched .src { color: var(--muted); font-size: 10px; font-weight: 600; margin-left: 1px; }
.fin-sched .sched-wrap { overflow: auto; max-height: var(--fit-height, calc(100vh - 150px)); border-top: 1px solid var(--line-frame); border-left: 1px solid var(--line-frame); background: #fff; }
.fin-sched table.loans { border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; background: #fff; }
.fin-sched table.loans th, .fin-sched table.loans td { padding: 6px 10px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: left; white-space: nowrap; vertical-align: middle; font-size: 13px; }
.fin-sched table.loans .num { text-align: right; }
.fin-sched table.loans thead th { position: sticky; top: 0; z-index: 3; height: var(--head-row); padding: 4px 10px; line-height: 18px; font-weight: 600; color: var(--ink);
  background: #fff; text-transform: none; letter-spacing: normal; border-bottom: 1px solid var(--line-head); }
.fin-sched table.loans thead tr:nth-child(2) th { top: var(--head-row); }
.fin-sched table.loans thead th.yr { text-align: center; border-bottom: 1px solid var(--line); }
.fin-sched table.loans td.vin { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.fin-sched table.loans td.wrap { white-space: normal; min-width: 9em; max-width: 16em; }
.fin-sched table.loans a { color: var(--ink); }
/* the frozen unit columns */
.fin-sched table.loans .k1, .fin-sched table.loans .k2, .fin-sched table.loans .k3, .fin-sched table.loans .k4, .fin-sched table.loans .k5, .fin-sched table.loans .k6,
.fin-sched table.loans .k7, .fin-sched table.loans .k8, .fin-sched table.loans .k9, .fin-sched table.loans .k10, .fin-sched table.loans .k11 { position: sticky; z-index: 2; background: #fff; box-sizing: border-box; }
.fin-sched table.loans thead .k1, .fin-sched table.loans thead .k2, .fin-sched table.loans thead .k3, .fin-sched table.loans thead .k4, .fin-sched table.loans thead .k5, .fin-sched table.loans thead .k6,
.fin-sched table.loans thead .k7, .fin-sched table.loans thead .k8, .fin-sched table.loans thead .k9, .fin-sched table.loans thead .k10, .fin-sched table.loans thead .k11 { z-index: 5; }
.fin-sched .k1 { left: 0; min-width: 64px; max-width: 64px; } .fin-sched .k2 { left: 64px; min-width: 58px; max-width: 58px; }
.fin-sched .k3 { left: 122px; min-width: 148px; max-width: 148px; font-size: 11px !important; } .fin-sched .k4 { left: 270px; min-width: 120px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.fin-sched .k5 { left: 390px; min-width: 70px; max-width: 70px; } .fin-sched .k6 { left: 460px; min-width: 86px; max-width: 86px; }
.fin-sched .k7 { left: 546px; min-width: 98px; max-width: 98px; } .fin-sched .k8 { left: 644px; min-width: 92px; max-width: 92px; }
.fin-sched .k9 { left: 736px; min-width: 76px; max-width: 76px; } .fin-sched .k10 { left: 812px; min-width: 112px; max-width: 112px; }
.fin-sched .k11 { left: 924px; min-width: 116px; max-width: 116px; border-right: 1px solid var(--line-head) !important; }
.fin-sched table.loans .k1, .fin-sched table.loans .k2, .fin-sched table.loans .k3, .fin-sched table.loans .k4, .fin-sched table.loans .k5, .fin-sched table.loans .k6,
.fin-sched table.loans .k7, .fin-sched table.loans .k8, .fin-sched table.loans .k9, .fin-sched table.loans .k10, .fin-sched table.loans .k11 { padding-left: 6px; padding-right: 6px; }
.fin-sched table.loans td[colspan].k1, .fin-sched table.loans td[colspan].k2, .fin-sched table.loans td[colspan].k6 { min-width: 0; max-width: none; }
/* narrower screens: only Unit…Status stay; the money columns scroll with the months */
@media (max-width: 1599px) {
  .fin-sched table.loans .k6, .fin-sched table.loans .k7, .fin-sched table.loans .k8, .fin-sched table.loans .k9, .fin-sched table.loans .k10, .fin-sched table.loans .k11 { position: static; }
  /* they keep sticking to the top / bottom, under the frozen ones when they scroll past them */
  .fin-sched table.loans thead .k6, .fin-sched table.loans thead .k7, .fin-sched table.loans thead .k8, .fin-sched table.loans thead .k9, .fin-sched table.loans thead .k10,
  .fin-sched table.loans thead .k11 { position: sticky; left: auto; z-index: 3; }
  .fin-sched table.loans tfoot td.k6, .fin-sched table.loans tfoot td.k7, .fin-sched table.loans tfoot td.k8, .fin-sched table.loans tfoot td.k9, .fin-sched table.loans tfoot td.k10,
  .fin-sched table.loans tfoot td.k11 { position: sticky; left: auto; z-index: 1; }
  .fin-sched table.loans tfoot td.k1, .fin-sched table.loans tfoot td.k2 { z-index: 4; }
  .fin-sched .k5 { border-right: 1px solid var(--line-head) !important; }
  .fin-sched .k11 { border-right: 1px solid var(--line) !important; }
}
/* Paid off rows, groups, totals */
.fin-sched table.loans tbody tr.paid td { background: #dcefdc; } .fin-sched table.loans tbody tr.paid td.k1 { background: #c9e5c9; }
.fin-sched table.loans tbody tr.group-head td { background: var(--gray-body); font-weight: 700; border-top: 2px solid var(--line-head); }
.fin-sched table.loans tbody tr.subtotal td { background: var(--gray-sub); font-weight: 700; border-top: 1px solid var(--line-head); }
.fin-sched table.loans tfoot td { background: #fff; font-weight: 700; border-top: 2px solid var(--line-head); position: sticky; bottom: 0; z-index: 2; }
.fin-sched table.loans tfoot tr.paying td { font-weight: 400; color: var(--muted); border-top: 1px solid var(--line); bottom: 0; }
.fin-sched table.loans tfoot tr:first-child td { bottom: 31px; }
.fin-sched table.loans tfoot td.k1, .fin-sched table.loans tfoot td.k2, .fin-sched table.loans tfoot td.k6, .fin-sched table.loans tfoot td.k9,
.fin-sched table.loans tfoot td.k10, .fin-sched table.loans tfoot td.k11 { z-index: 4; }
/* edited in place */
.fin-sched table.loans td.editable { cursor: pointer; }
.fin-sched table.loans td.editable:hover { outline: 1px dashed var(--line-frame); outline-offset: -3px; }
.fin-sched table.loans td.editable input { font: inherit; width: auto; padding: 0 2px; }
.fin-sched table.loans td.price input { text-align: right; width: 6em; }
.fin-sched #price-status.warn { color: var(--down); }
/* table marks (core/views/_flag.eta): a small "!" with its text in a tip (app.js) */
.flag { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 4px; border-radius: 50%; background: #e88a10; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1; vertical-align: 1px; cursor: help; user-select: none; }
.flag.flag-bad { background: #c93a3a; }
.flag:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.flag-tip { position: fixed; z-index: 100; max-width: min(22rem, 90vw); padding: 5px 9px; border-radius: 5px; background: #1f2937; color: #fff;
  font-size: 12px; line-height: 1.35; pointer-events: none; box-shadow: 0 4px 14px rgb(0 0 0 / .2); }
table.fin th a.sort { color: inherit; text-decoration: none; white-space: nowrap; } table.fin th a.sort:hover { text-decoration: underline; } table.fin th a.sort.on { color: var(--text); }
.fin-stats .stat.warn strong { color: #a15c00; } .fin-stats a.stat { color: inherit; text-decoration: none; } .fin-stats a.stat:hover { border-color: var(--accent); }

/* "label: value" lines (an inspection's card), as the old safety office page; on a phone the label sits above */
dl.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .35rem 1.25rem; margin: .25rem 0 1rem; max-width: 60rem; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
dl.kv .check { margin-right: .75rem; }
.kv-form textarea { width: 100%; max-width: 36rem; }
.kv-form .driver-select { display: inline-flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-right: .4rem; }
.insp-head h1 { font-variant-numeric: tabular-nums; }
.insp-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .5rem 0 1.5rem; }
.insp-actions .inline-form { margin: 0; }
.insp-h2 { margin-top: 1rem; }
table.viol { font-size: .85rem; }
table.viol td.desc { white-space: normal; max-width: 44em; }
@media (max-width: 640px) {
  dl.kv { grid-template-columns: 1fr; gap: 0; }
  dl.kv dt { margin-top: .6rem; font-size: .8rem; }
}
.kv-form label.check { display: inline-flex; align-items: center; gap: .35rem; width: auto; margin: 0 1rem 0 0; font-weight: normal; }
.kv-form input[type=checkbox] { width: auto; margin: 0; }
.kv-form input.ctl, .kv-form select.ctl { width: auto; max-width: 100%; }
.kv-form input[name=driver_name] { width: 16rem; }
.kv-form input[type=file] { width: 22rem; }
/* folding report rows (Inspections weekly / monthly) */
table.fold-report button.fold { border: 0; background: none; padding: 0 .3rem 0 0; cursor: pointer; font: inherit; color: var(--muted); }
table.fold-report tr.fold-row td { background: var(--bg, #fff); }
.report-fold-all { display: inline-flex; gap: .4rem; align-self: end; }

/* ---- list tables (the shared data table, and the main table of report / log pages: .list-box) ----
   The page takes the whole width; the table scrolls in its own box down to the window's bottom
   (data-fit-height), so the column heads and filters stay on top and the horizontal bar at the
   bottom; the first column (tick + name / unit) stays when scrolling sideways. Short values do not
   wrap; long ones end in "…" (whole text on hover, app.js). Phones keep the cards. */
.content:has(.list-box) { max-width: none; }
@media (min-width: 721px) {
  .list-box { overflow: auto; max-height: var(--fit-height, none); }
  .list-box > table > thead { position: sticky; top: 0; z-index: 3; }
  .list-box > table > thead th, .list-box > table > thead td { background: #fafbfc; }
  .list-box > table > tbody td { white-space: nowrap; max-width: 26rem; overflow: hidden; text-overflow: ellipsis; }
  .list-box > table > tbody td.wrap { white-space: normal; }
  .list-box > table > tbody td:has(details, .flag, select, form) { overflow: visible; }
  .list-box > table tr > :first-child { position: sticky; left: 0; z-index: 1; background-color: var(--surface); }
  .list-box > table > thead tr > :first-child { z-index: 4; background-color: #fafbfc; }
  .list-box > table tr > .dt-pick { width: 2.4rem; min-width: 2.4rem; max-width: 2.4rem; }
  .list-box > table tr > .dt-pick + * { position: sticky; left: 2.4rem; z-index: 1; background-color: var(--surface); box-shadow: 1px 0 0 var(--border); }
  .list-box > table > thead tr > .dt-pick + * { z-index: 4; background-color: #fafbfc; }
  .list-box > table tr > :first-child:not(.dt-pick) { box-shadow: 1px 0 0 var(--border); }
}
@media (min-width: 721px) {
  .list-box > table tr > .dt-pick { padding-left: .55rem; padding-right: .35rem; overflow: visible; text-overflow: clip; }
}
/* Finance stat cards: big sums fit a phone's half width */
@media (max-width: 720px) { .fin-stats .stat strong { font-size: 1.2rem; overflow-wrap: anywhere; } }

/* Safety > Drivers: dense, as the old OCAC check page */
.drivers-ocac .dt-table { font-size: .82rem; }
.drivers-ocac .dt-table td, .drivers-ocac .dt-table th { padding: .32rem .55rem; }
.drivers-ocac td.dr-n { width: 2.5rem; color: var(--muted); }
@media (min-width: 721px) { .drivers-ocac td.narrow-col { width: 1%; } }
@media (max-width: 720px) { .drivers-ocac table.cards td.dr-n { display: none; } }
.unit-link { vertical-align: -1px; margin-right: .2rem; opacity: .7; }
td.lc span { font-weight: 600; font-size: .78rem; padding: 0 .15rem; border-radius: 3px; cursor: default; }
.lc-ok { color: var(--ok); } .lc-soon { color: #b45f06; background: #fff4d6; } .lc-bad { color: var(--danger); background: #fde8e8; }
.occ { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; padding: .05rem .45rem; border-radius: 999px; background: #eef0f3; color: var(--muted); white-space: nowrap; }
.occ .dot { width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.occ-on { background: #e3f4ea; color: var(--ok); } .occ-off { background: #f3e5e5; color: var(--danger); } .occ-na { background: #eef0f3; color: var(--muted); }
.occ-gap { font-size: .7rem; color: #b45f06; white-space: normal; max-width: 18rem; margin-top: .1rem; }
@media (min-width: 721px) { .drivers-ocac .list-box > table > tbody td.occ-cell { overflow: visible; white-space: normal; min-width: 9rem; } }

/* data table chips (checks with counts, core/views/datatable.eta) */
.dt-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0 0 .5rem; }
.dt-chips a.chip { font-size: .75rem; padding: .2rem .6rem; margin: 0; border: 1px solid transparent; text-decoration: none; cursor: pointer; }
.dt-chips a.chip .chip-n { font-weight: 700; margin-left: .15rem; }
.dt-chips a.chip.zero { opacity: .55; }
.dt-chips a.chip.active { border-color: currentColor; box-shadow: 0 0 0 1px currentColor inset; }
.dt-chips a.chip:hover { filter: brightness(.96); }
@media (max-width: 720px) { .dt-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .2rem; } }
.lc-na { color: var(--muted); }
.cdl-bad { color: var(--danger); } .cdl-soon { color: #b45f06; }
/* safety notes (modules/safety/views/_note-cell, _notes-block) */
.note-cell { max-width: 16rem; }
.note-cell .note-text { color: inherit; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-cell .note-add { font-size: .75rem; color: var(--muted); border: 1px dashed var(--border); border-radius: 4px; padding: 0 .35rem; white-space: nowrap; }
.note-cell .note-add:hover { color: var(--accent); border-color: var(--accent); }
.note-edit { display: grid; gap: .25rem; min-width: 14rem; white-space: normal; }
.note-edit textarea { width: 100%; font: inherit; font-size: .8rem; }
.note-edit button { justify-self: start; }
@media (min-width: 721px) { .list-box > table > tbody td.note-col:has(.note-edit) { overflow: visible; } }
.safety-notes .note-form { display: grid; gap: .4rem; max-width: 44rem; margin-bottom: .8rem; }
.safety-notes .note-form textarea { width: 100%; font: inherit; }
.note-log { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; max-width: 44rem; }
.note-log li { border-left: 3px solid var(--border); padding: .2rem .6rem; }
.note-log li.current { border-left-color: var(--accent); }
.safety-block { margin-top: 1.4rem; }
table.cards.compact td, table.cards.compact th { padding: .3rem .55rem; font-size: .85rem; }
.page-head .button.back { margin-right: .4rem; }
/* Safety > Trucks / Trailers (modules/safety/views/_unit-check-row) */
.units-check .dt-table { font-size: .82rem; }
.units-check .dt-table td, .units-check .dt-table th { padding: .32rem .55rem; }
.units-check td.dr-n { width: 2.5rem; color: var(--muted); }
@media (max-width: 720px) { .units-check table.cards td.dr-n { display: none; } }
.units-select { margin: 0 0 .5rem; }
.irp { font-size: .62rem; font-weight: 700; letter-spacing: .03em; padding: 0 .3rem; border-radius: 3px; vertical-align: 1px; }
.irp-ok { background: #e3f4ea; color: var(--ok); } .irp-soon { background: #fff4d6; color: #8a5a00; }
.irp-bad { background: #fde8e8; color: var(--danger); } .irp-none { background: #eef0f3; color: var(--muted); }
.own-unknown { color: #b45f06; font-weight: 600; }
.fs { font-size: .7rem; font-weight: 700; letter-spacing: .03em; padding: .05rem .35rem; border-radius: 3px; background: #eef0f3; color: var(--muted); }
.fs-assigned { background: #e0ecff; color: #1f3f86; } .fs-owner { background: #f3e8ff; color: #5b2a86; }
.fs-rent { background: #ffe8d6; color: #8a3b00; } .fs-yard { background: #fff4d6; color: #6b4b00; }
.fs-shop, .fs-capital, .fs-sale, .fs-inactive { background: #eef0f3; color: var(--muted); }

/* Settings > Groups: the matrix (area -> level) */
table.matrix td.lvl { font-size: .85rem; white-space: nowrap; }
table.matrix td.lvl-none { color: var(--muted); }
table.matrix td.lvl-view { color: var(--text); }
table.matrix td.lvl-edit { color: var(--accent-2); font-weight: 600; }
table.matrix td.lvl-manage { color: var(--ok); font-weight: 700; }
table.matrix-edit { width: auto; }
table.matrix-edit th[scope="row"] { text-align: left; text-transform: none; letter-spacing: 0; font-size: .9rem; color: var(--text); background: none; font-weight: 600; }
table.matrix-edit td { text-align: center; }
fieldset.checks { border: 0; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: column; gap: .35rem; }
fieldset.checks legend { font-weight: 600; margin-bottom: .35rem; }

/* sign-in with Google / Microsoft */
.sso { margin-top: 1.25rem; }
.sso-or { display: flex; align-items: center; gap: .75rem; margin: 0 0 .9rem; color: var(--muted); font-size: .85rem; }
.sso-or::before, .sso-or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.sso-icons { display: flex; justify-content: center; gap: .75rem; }
.sso-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; box-sizing: border-box;
  background: #fff; border: 1px solid #dadce0; border-radius: 6px; }
.sso-icon:hover { background: #f8f9fa; border-color: #c4c7cc; }
.sso-icon:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
form.inline { display: inline; }

/* the setup guide (/setup) and the overview's "Setup progress" card */
.setup-steps { margin: 0 0 1.25rem; }
.setup-steps ol { list-style: none; margin: 0 0 .6rem; padding: 0; display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: thin; }
.setup-steps li { flex: 1 0 auto; min-width: 0; }
.setup-steps a { display: flex; align-items: center; gap: .45rem; padding: .4rem .5rem; border-radius: 6px; color: var(--muted); text-decoration: none; white-space: nowrap; font-size: .88rem; }
.setup-steps a:hover { background: #eef1f5; color: var(--text); }
.setup-steps a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.setup-dot { flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: inline-grid; place-items: center; font-size: .78rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.setup-steps li.done .setup-dot { background: #e3f4ea; border-color: #b9e0c8; color: var(--ok); }
.setup-steps li.later .setup-dot { background: #fff8e6; border-color: #f1d58a; color: #6b4b00; }
.setup-steps li.current a { color: var(--text); font-weight: 600; background: var(--surface); box-shadow: 0 0 0 1px var(--border); }
.setup-steps li.current .setup-dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.setup-bar { display: block; width: 100%; height: 6px; border: 0; border-radius: 999px; background: #e7eaf0; overflow: hidden; appearance: none; -webkit-appearance: none; }
.setup-bar::-webkit-progress-bar { background: #e7eaf0; border-radius: 999px; }
.setup-bar::-webkit-progress-value { background: var(--ok); border-radius: 999px; }
.setup-bar::-moz-progress-bar { background: var(--ok); border-radius: 999px; }
.setup-body { max-width: 52rem; }
.setup-intro h2 { margin: 0 0 .25rem; font-size: 1.25rem; }
.setup-intro p { margin: 0 0 1rem; }
.setup-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin: 0 0 1rem; display: grid; gap: .6rem; }
.setup-box > summary { cursor: pointer; font-weight: 600; }
.setup-box[open] > summary { margin-bottom: .4rem; }
.setup-box-title { font-weight: 600; }
.setup-box p { margin: 0; }
.setup-sub { border-top: 1px solid var(--border); padding-top: .6rem; display: grid; gap: .4rem; }
.setup-howto summary { cursor: pointer; color: var(--accent); font-size: .88rem; }
.setup-howto ol { margin: .4rem 0 0; padding-left: 1.2rem; }
.setup-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .35rem; }
.setup-list li { display: flex; flex-wrap: wrap; gap: .4rem; align-items: baseline; }
.setup-ok { color: var(--ok); font-weight: 700; }
.setup-count { margin-bottom: .5rem; }
.setup-count label { max-width: 24rem; }
.setup-lookup-row { flex-wrap: nowrap; }
.setup-lookup-row select { width: auto; flex: none; }
.setup-lookup-row input { min-width: 0; }
.setup-found { border-top: 1px solid var(--border); padding-top: .6rem; display: grid; gap: .6rem; }
.setup-found-head { font-size: 1.02rem; }
.setup-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .4rem 1rem; margin: 0; }
.setup-facts dt { font-size: .78rem; color: var(--muted); }
.setup-facts dd { margin: 0; }
.setup-confirm { align-items: end; flex-wrap: wrap; }
.setup-confirm label { flex: 1 1 14rem; }
.setup-other { grid-template-columns: 1fr 12rem auto; align-items: end; }
.setup-systems { max-width: 52rem; }
.setup-sys { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important; }
.setup-other-input { max-width: 16rem; }
.soon { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; padding: .05rem .4rem; border-radius: 999px; background: #eef1f5; color: var(--muted); }
.setup-found-line { color: var(--ok); }
.setup-token-row { flex-wrap: wrap; }
.setup-token-row input { flex: 1 1 14rem; width: auto; }
.setup-stats { margin-bottom: 1rem; }
.setup-upload { flex-wrap: wrap; }
.setup-upload input[type=file] { width: auto; flex: 1 1 14rem; }
.setup-preview { max-height: 26rem; overflow: auto; }
tr.row-bad td { background: #fdf3f3; }
.setup-team-head, .setup-team-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: .5rem; align-items: start; }
.setup-team-head span { font-size: .8rem; color: var(--muted); }
.setup-team-row label { display: block; }
.setup-team-error { grid-column: 1 / -1; margin: 0; }
.setup-nav { margin-top: .5rem; flex-wrap: wrap; }
.setup-nav-gap { flex: 1; }
.setup-skip { margin-top: 1.5rem; }
.setup-done { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.setup-done h3 { margin: 0 0 .5rem; font-size: 1rem; }
.setup-left { margin: .75rem 0; padding-left: 1.1rem; display: grid; gap: .25rem; }
.setup-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; margin: 0 0 1.25rem; max-width: 40rem; }
.setup-card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .5rem; }
.setup-card-head h2 { margin: 0; font-size: 1.05rem; }
.setup-card .actions form { margin: 0; }
@media (max-width: 720px) {
  .setup-label { display: none; }
  .setup-steps li.current .setup-label { display: inline; }
  .setup-steps li { flex: none; }
  .setup-other { grid-template-columns: 1fr; }
  .setup-team-head { display: none; }
  .setup-team-row { grid-template-columns: 1fr 1fr; padding-bottom: .5rem; border-bottom: 1px solid var(--border); }
  .setup-team-row label:first-child { grid-column: 1 / -1; }
}
.admin-report { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.admin-report h3 { margin: 0 0 .5rem; font-size: 1rem; }
table.report-mini { width: 100%; }
table.report-mini td { padding: .25rem 0; border-bottom: 1px solid var(--border); }
table.report-mini td.num { text-align: right; font-variant-numeric: tabular-nums; }
.section-title { margin: 2rem 0 .25rem; font-size: 1.15rem; }
.setup-lookup-row button, .setup-confirm button, .setup-token-row button { white-space: nowrap; }

/* ---------------------------------------------------------------- a page title with its action on the right */
.page-head-actions { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.page-head-actions > button, .page-head-actions > .button { flex: none; margin-top: .25rem; }
@media (max-width: 640px) { .page-head-actions { flex-direction: column; } }

.badge.invited { background: #fff4dc; color: #8a5a00; }

/* ---------------------------------------------------------------- modal windows (app.js openDialog) */
dialog.modal { border: 0; border-radius: var(--radius); padding: 0; width: min(40rem, 94vw); max-height: 90vh;
  background: var(--surface); color: var(--text); box-shadow: 0 12px 40px rgba(16, 24, 40, .25); }
dialog.modal::backdrop { background: rgba(16, 24, 40, .45); }
dialog.modal .modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem 1.2rem; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
dialog.modal .modal-head h2 { margin: 0; font-size: 1.1rem; }
dialog.modal form { padding: 1rem 1.2rem 1.2rem; max-width: none; }
.icon-btn { background: none; border: 0; font-size: 1.5rem; line-height: 1; width: 2.2rem; height: 2.2rem; border-radius: 6px; cursor: pointer; color: var(--muted); padding: 0; }
.icon-btn:hover { background: var(--bg); color: var(--text); }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.link-btn { background: none; border: 0; padding: .2rem 0; color: var(--accent); cursor: pointer; font: inherit; margin-bottom: .8rem; }
.link-btn:hover { text-decoration: underline; }
.invite-rows { display: grid; gap: .5rem; margin-bottom: .4rem; }
.invite-row { display: grid; grid-template-columns: 1.4fr 1fr 2.2rem; gap: .6rem; align-items: end; }
.invite-row label { margin: 0; }
.invite-row .invite-row-remove { margin-bottom: .2rem; }
.invite-row .invite-row-error { grid-column: 1 / -1; margin: -.2rem 0 .2rem; }
.invite-row.has-error input[type=email] { border-color: var(--danger); }
.invite-form .actions { display: flex; gap: .6rem; }
@media (max-width: 640px) {
  dialog.modal { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .invite-row { grid-template-columns: 1fr 2.2rem; }
  .invite-row label:nth-of-type(2) { grid-column: 1; }
  .invite-row .invite-row-remove { grid-column: 2; grid-row: 1; }
  .invite-form .actions { position: sticky; bottom: 0; background: var(--surface); padding: .6rem 0; }
  .invite-form .actions button { flex: 1; }
}

/* ---------------------------------------------------------------- toasts (app.js toast) */
.toasts { position: fixed; right: 1rem; bottom: 1rem; display: grid; gap: .5rem; z-index: 1000; max-width: min(26rem, calc(100vw - 2rem)); }
.toast { background: #1d2330; color: #fff; padding: .7rem 1rem; border-radius: var(--radius); box-shadow: 0 6px 20px rgba(0,0,0,.2); transition: opacity .35s; }
.toast.gone { opacity: 0; }
.invite-row label small { display: inline; margin-left: .25rem; }
.invite-form .link-btn { justify-self: start; align-self: start; width: auto; text-align: left; }

/* ---------------------------------------------------------------- trucks / trailers / drivers by hand (record-form.eta, _record-actions.eta) */
.record-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1.5rem; }
.record-form-grid .field.wide { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1.5rem; }
.record-form-grid label { margin: 0; }
.field-note { margin: .25rem 0 0; }
.warn-note { color: #8a5a00; }
.mark { color: var(--accent); font-weight: 600; }
.field-source { margin-left: .25rem; }
.revert-form { display: inline; margin-left: .3rem; }
.revert-form .link-btn { margin: 0; padding: 0; }
.card-actions .record-chips { flex-basis: 100%; margin: 0 0 .4rem; }
.record-chips .chip { font-size: .75rem; }
.chip.warn { background: #fff4dc; color: #8a5a00; }
.record-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-start; }
.record-actions .inline-form { margin: 0; }
.sync-entity { border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem 1rem 1rem; background: var(--surface); }
.sync-entity legend { font-weight: 700; padding: 0 .3rem; }
.sync-row { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: baseline; }
.sync-priority select { max-width: 16rem; }
.sync-groups table select { max-width: 16rem; }
.sync-changes li { margin-bottom: .4rem; }
@media (max-width: 640px) {
  .record-form-grid, .record-form-grid .field.wide { grid-template-columns: 1fr; }
}
.sync-quick select { min-width: 9.5rem; }
/* DQ file of a driver (dq-driver.eta, dq-upload.eta) */
.badge.dq-na, .badge.dq-optional { background: #eef0f3; color: var(--muted); }
td.dq-cell.na { color: var(--muted); }
table.dq-file tr[data-dq-drop] { transition: background .1s; }
table.dq-file tr.dq-drop-over td { background: #eef3fe; outline: 2px dashed #7c9cf0; outline-offset: -2px; }
.dq-actions { display: flex; gap: .4rem; align-items: flex-start; justify-content: flex-end; flex-wrap: wrap; }
.dq-actions .more-panel { position: absolute; right: 0; z-index: 5; min-width: 12rem; }
.dq-actions details.more { position: relative; }
.dq-actions .more-panel .ctl { width: 100%; justify-content: flex-start; }
.dq-file-link { display: inline-block; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.dq-notes { margin-top: .2rem; white-space: pre-line; }
.dq-history { list-style: none; margin: 0; padding: .5rem 1.2rem 1.2rem; display: grid; gap: .75rem; }
.dq-history li { border-bottom: 1px solid var(--border); padding-bottom: .6rem; }
.dq-history .badge { margin-left: .4rem; }
.dq-confirm { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.dq-staged ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .dq-confirm { grid-template-columns: 1fr; }
  .dq-actions { justify-content: flex-start; }
  .dq-actions .more-panel { position: static; }
}
.dq-actions form.inline-form { display: contents; }
table.dq-file td[data-label=Issued], table.dq-file td[data-label=Expires] { white-space: nowrap; }
table.dq-file td.dq-actions-cell { width: 1%; white-space: nowrap; }
.dq-actions { flex-wrap: nowrap; }
.dq-history form.inline-form { display: inline; }
/* Settings > Integrations: Overview cards, the catalog, email */
.integration-problems { display: grid; gap: .4rem; margin-bottom: 1rem; }
.integration-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 1rem; }
.integration-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; display: grid; gap: .5rem; align-content: start; }
.integration-card.status-error { border-color: #f1b5b5; }
.integration-card.status-soon { border-color: #f3d27a; }
.integration-card.status-expired { border-color: #f1b5b5; }
.integration-card header { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.integration-card h2 { margin: 0; font-size: 1.1rem; }
.integration-card h2 a { color: inherit; text-decoration: none; }
.integration-card p { margin: 0; }
.integration-facts { display: grid; gap: .25rem; margin: 0; font-size: .88rem; }
.integration-facts div { display: grid; grid-template-columns: 7rem 1fr; gap: .5rem; }
.integration-facts dt { color: var(--muted); }
.integration-facts dd { margin: 0; overflow-wrap: anywhere; }
.integration-actions { margin-top: .25rem; }
.integration-actions form { margin: 0; }
.badge.integration-connected { background: #e3f4ea; color: var(--ok); }
.badge.integration-error { background: #fde8e8; color: var(--danger); }
.badge.integration-soon { background: #fff4d6; color: #6b4b00; }
.badge.integration-expired { background: #fde8e8; color: var(--danger); }
.catalog-section { margin-bottom: 1.5rem; }
.catalog-section h2 { font-size: 1rem; margin: 0 0 .6rem; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .75rem; }
.catalog-tile { display: grid; gap: .3rem; align-content: start; padding: .9rem 1rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); color: inherit; text-decoration: none; }
a.catalog-tile:hover, a.catalog-tile:focus-visible { border-color: #7c9cf0; box-shadow: 0 0 0 3px #eef3fe; }
.catalog-tile.soon { background: #fafbfc; color: var(--muted); }
.catalog-tile .chip { justify-self: start; }
.catalog-go { color: var(--link, #2563eb); }
.email-new .other-label { max-width: 20rem; margin-top: .3rem; }
table.addresses .address { overflow-wrap: anywhere; }
.ctl-row a.strong { font-weight: 700; text-decoration: none; color: inherit; }
input.wide-ctl { width: 24rem; max-width: 100%; }
.catalog-tile strong { font-size: 1rem; font-weight: 700; text-transform: none; letter-spacing: 0; color: inherit; }
.catalog-tile.soon strong { color: var(--muted); }
table.addresses + form, .table-wrap + form.ctl-row { margin-top: .6rem; }
.integration-problems .banner { margin: 0; }
/* the driver app: the invite page, the driver card's block */
.invite-box { display: grid; grid-template-columns: minmax(0, 16rem) minmax(0, 1fr); gap: 1.5rem; align-items: start; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; }
.invite-qr svg { width: 100%; height: auto; display: block; }
.invite-link { display: grid; gap: .7rem; }
.invite-link input { width: 100%; }
.driver-app-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: 1rem; }
.driver-app-box h2 { font-size: 1rem; margin: 0 0 .3rem; }
.driver-app-box p { margin: 0 0 .5rem; }
@media (max-width: 720px) { .invite-box { grid-template-columns: 1fr; } .invite-qr { max-width: 16rem; margin: 0 auto; } }
.badge.dq-pending { background: #eef3fe; color: #1f3f86; }
.dq-upload-review { display: grid; gap: .3rem; margin-top: .4rem; padding: .4rem .5rem; border-left: 3px solid #7c9cf0; background: #f8faff; }

/* truck statuses: the pill (colours from data-c / data-t, see app.js) */
.tstatus { display: inline-block; padding: .12rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap;
  background: var(--c, #64748b); color: var(--t, #fff); line-height: 1.5; }
.tstatus.auto::after { content: ' ·A'; opacity: .7; font-weight: 500; }
.status-pills { display: flex; flex-wrap: wrap; gap: .4rem; margin: .25rem 0 .9rem; }
.status-pills a { text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; border-radius: 999px; outline-offset: 2px; }
.status-pills a.on .tstatus { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--c, #64748b); }
.status-pills a.dim .tstatus { opacity: .45; }
.status-pills .count { font-weight: 700; }
.status-pills a.all { padding: .12rem .6rem; border: 1px solid var(--border); border-radius: 999px; font-size: .78rem; color: inherit; }
.status-pills a.all.on { background: #111827; color: #fff; }
.status-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.status-item { display: grid; grid-template-columns: auto auto auto minmax(7rem, auto) 1fr auto auto; gap: .6rem; align-items: center;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem .8rem; }
.status-item.dragging { opacity: .5; }
.drag-handle { cursor: grab; color: var(--muted); font-size: 1.1rem; user-select: none; }
.move-btn { width: 1.8rem; height: 1.8rem; }
.status-fields { display: grid; gap: .35rem; }
.status-fields label { margin: 0; }
.swatches { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.swatch { width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); background: var(--c); padding: 0; cursor: pointer; }
.swatch.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #111827; }
.swatches input[type=color] { width: 2rem; height: 1.6rem; padding: 0; border: 1px solid var(--border); background: none; }
.swatches input.hex { width: 6rem; font-family: var(--mono, monospace); }
.status-count { white-space: nowrap; }
.status-item details.more { position: relative; }
.status-item .more-panel { position: absolute; right: 0; z-index: 5; min-width: 14rem; }
@media (max-width: 720px) {
  .status-item { grid-template-columns: auto auto auto 1fr; }
  .status-item .status-fields { grid-column: 1 / -1; }
  .status-item .more-panel { position: static; }
}
.status-item .tstatus { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.swatches input.hex { width: 7.5rem; }
.status-new input[name=name] { width: 16rem; max-width: 100%; }
.status-new input[type=color] { width: 3rem; flex: none; padding: .15rem; }
@media (max-width: 720px) {
  .status-item { grid-template-columns: auto auto auto minmax(0, 1fr); }
  .status-item .status-count { grid-column: 1 / 3; }
  .status-item details.more { grid-column: 3 / -1; justify-self: end; }
}
.app-version { margin: .5rem 0 0; font-size: .7rem; color: rgba(255, 255, 255, .45); letter-spacing: .01em; }
/* DOT documents (Fleet / Companies > Documents, Settings > DOT documents, Roadside readiness) */
.unit-docs tr.muted-row td { opacity: .65; }
.warn-text { color: #8a5a00; }
.permit-states { margin: 0 0 .75rem; }
.permit-states .ctl-row { flex-wrap: wrap; align-items: center; gap: .4rem 1rem; }
.permit-states p { margin: .3rem 0 0; }
.dot-types input.ctl { min-width: 6rem; }
.readiness-cell { white-space: nowrap; }
.permit-states label.check { display: inline-flex; align-items: center; gap: .3rem; font-weight: 500; }

/* Fleet > Documents: many files at once (core/views/unit-docs-bulk.eta) */
.bulk-drop { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; margin: 1rem 0; padding: 1.75rem 1.25rem; cursor: pointer;
  border: 2px dashed #b8c4dc; border-radius: var(--radius); background: var(--surface); transition: background .1s, border-color .1s; }
.bulk-drop:hover, .bulk-drop.over { background: #eef3fe; border-color: #7c9cf0; }
.bulk-drop .link { color: var(--accent); text-decoration: underline; }
.bulk-drop .warn-text { flex-basis: 100%; }
table.bulk-docs td { vertical-align: top; }
table.bulk-docs input.bulk-target { width: 10rem; }
table.bulk-docs select { width: 13rem; }
table.bulk-docs td.card-title { min-width: 9rem; max-width: 14rem; }
table.bulk-docs .bulk-name { word-break: break-word; }
table.bulk-docs tr.bulk-error td { background: #fdf1f1; }
table.bulk-docs tr.bulk-pending td { font-style: italic; }
table.bulk-docs td.bulk-tick { white-space: nowrap; }
.bulk-actions { position: sticky; bottom: 0; background: var(--bg); padding: .75rem 0; align-items: center; }
@media (max-width: 760px) {
  table.bulk-docs input.bulk-target, table.bulk-docs select { width: 100%; max-width: none; }
}
@media (max-width: 760px) { table.bulk-docs .bulk-cell { flex: 1; } }
.bulk-actions[hidden], [data-bdocs-section][hidden] { display: none; }

/* Fleet > Assets */
.badge.asset-in_truck, .badge.asset-with_driver { background: #e3f4ea; color: var(--ok); }
.badge.asset-in_office { background: #eef1f6; color: #475467; }
.badge.asset-repair, .badge.act-waiting, .badge.charge-open { background: #fff4d6; color: #6b4b00; }
.badge.asset-lost, .badge.act-disputed, .badge.result-missing, .badge.result-damaged { background: #fde8e8; color: var(--danger); }
.badge.asset-retired, .badge.act-cancelled, .badge.charge-written_off { background: #f2f4f7; color: var(--muted); }
.badge.act-confirmed, .badge.act-done, .badge.result-ok, .badge.result-returned, .badge.charge-deducted { background: #e3f4ea; color: var(--ok); }
.badge.charge-charge { background: #e8effd; color: var(--accent-2); }
.tabs .count { display: inline-block; min-width: 1.3em; padding: 0 .35em; border-radius: 999px; background: #fde8e8; color: var(--danger); font-size: .75rem; text-align: center; }
ol.asset-history { list-style: none; padding: 0; margin: 0; }
ol.asset-history li { padding: .4rem 0; border-bottom: 1px solid var(--border); }
.asset-photos { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.asset-photos img { width: 120px; height: 90px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
ul.asset-due li { margin: .35rem 0; }
.act-who { margin: 1rem 0; align-items: flex-end; flex-wrap: wrap; }
.act-who label { display: flex; flex-direction: column; gap: .2rem; font-size: .85rem; }
.act-result { display: flex; flex-wrap: wrap; gap: .25rem .75rem; }
td.act-tick { width: 3rem; }
.act-office { margin: .75rem 0; }
.act-sign { border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem; margin: 1rem 0; }
.sign-pad { display: flex; flex-direction: column; gap: .3rem; max-width: 600px; margin: .5rem 0; }
.sign-pad canvas { width: 100%; height: auto; aspect-ratio: 3 / 1; background: #fff; border: 1.5px dashed #98a2b3; border-radius: var(--radius); touch-action: none; }
.sign-pad [data-sign-clear] { align-self: flex-start; }
.charge-form { flex-wrap: wrap; gap: .35rem; }
.charge-form input[name=note] { width: 10rem; }
.sign-pad [data-sign-clear], form[action$="/cancel"] .link { color: var(--accent); }

/* Dispatch > Brokers */
.badge.fmcsa-active { background: #e3f4ea; color: var(--ok); }
.badge.fmcsa-inactive, .badge.broker-blocked { background: #fde8e8; color: var(--danger); }
.badge.fmcsa-none, .badge.broker-review { background: #fff4d6; color: #6b4b00; }
.badge.fmcsa-unknown { background: #f2f4f7; color: var(--muted); }
.broker-merge { margin-top: 1.5rem; }

/* Dispatch > Loads */
.badge.load-booked, .badge.load-assigned { background: #eef1f6; color: #475467; }
.badge.load-dispatched, .badge.load-in_transit { background: #e8effd; color: var(--accent-2); }
.badge.load-delivered { background: #fff4d6; color: #6b4b00; }
.badge.load-invoiced, .badge.load-paid { background: #e3f4ea; color: var(--ok); }
.badge.load-canceled, .badge.load-tonu { background: #fde8e8; color: var(--danger); }
.badge.stop-pickup { background: #e8effd; color: var(--accent-2); }
.badge.stop-delivery { background: #e3f4ea; color: var(--ok); }
.doc-mark { font-size: .72rem; padding: 0 .25rem; border-radius: 4px; color: #b0b6c3; border: 1px solid #e3e6eb; }
.doc-mark.on { color: var(--ok); border-color: #b9e2c9; background: #f1faf4; }
ul.load-docs { list-style: none; padding: 0; margin: .25rem 0 1rem; }
ul.load-docs li { padding: .25rem 0; }

/* Dispatch > New load (load-form.eta) */
.badge.load-test { background: #fff0d6; color: #7a4d00; border: 1px dashed #d9a441; }
.field-error { display: block; color: var(--danger); font-size: .82rem; margin-top: .2rem; }
.record-form-grid label.wide { grid-column: 1 / -1; }
.record-form-grid label.check { display: flex; align-items: center; gap: .5rem; align-self: end; }
.rc-upload { border: 1px dashed var(--line, #d0d5dd); border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: 1.25rem; }
.rc-upload h2 { margin-top: 0; }
.rc-upload .inline-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.load-warnings ul { margin: .35rem 0 .35rem 1.1rem; padding: 0; }
.load-form h2 { margin-top: 1.6rem; }
.stop-fieldset { border: 1px solid var(--line, #e4e7ec); border-radius: var(--radius); padding: .6rem 1rem 1rem; margin: 0 0 .9rem; min-width: 0; }
.stop-fieldset legend { font-weight: 600; padding: 0 .3rem; }
.more-stops > summary { cursor: pointer; margin: .3rem 0 .8rem; color: var(--accent-2); }
.load-charges-form { width: 100%; max-width: 640px; }
.load-charges-form td { padding: .25rem .4rem .25rem 0; }
.load-charges-form input, .load-charges-form select { width: 100%; }
.pre-line { white-space: pre-line; }
.entry-form fieldset { border: 0; padding: 0; margin: 0 0 .8rem; }
.entry-form legend { font-weight: 600; margin-bottom: .3rem; }
.entry-form label.check { display: flex; gap: .5rem; align-items: center; margin: .2rem 0; }
.entry-testers { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 1rem; max-height: 260px; overflow: auto; }
