/* Grupo Neón — local, shared visual system. Replaces the three legacy sheets. */
:root {
  font-family:"Segoe UI",Arial,sans-serif;
  font-synthesis:none;
  color-scheme:light;
  --ink:#182e3c;
  --muted:#526777;
  --line:#dce4e9;
  --blue:#086b8b;
  --green:#116749;
  --red:#ac302e;
  --amber:#865309;
  --bg:#f3f6f8;
  --surface:#fff;
  --nav:#132c3b;
  --space-1:4px;
  --space-2:8px;
  --space-3:12px;
  --space-4:16px;
  --space-6:24px;
  --space-8:32px;
  --radius:8px;
  color:var(--ink);
  background:var(--bg);
  font-size:14px;
  line-height:1.5;
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
}
button,input,select,textarea {
  font:inherit;
}
button,a {
  -webkit-tap-highlight-color:transparent;
}
a {
  color:var(--blue);
  text-underline-offset:3px;
}
a:hover {
  color:#054e65;
}
button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:40px;
  border:1px solid #a3b3bf;
  border-radius:6px;
  padding:8px 14px;
  background:#fff;
  color:var(--ink);
  font-weight:600;
  font-size:13px;
  cursor:pointer;
  line-height:1.35;
  transition:background-color .12s,border-color .12s;
}
button:hover {
  background:#edf4f7;
  border-color:#607e90;
}
button:active {
  background:#e0ebf1;
}
button.primary {
  color:#fff;
  background:var(--blue);
  border-color:var(--blue);
}
button.primary:hover {
  background:#05536e;
  border-color:#05536e;
}
button.danger {
  background:#fff7f6;
  border-color:#c25850;
  color:#932b27;
}
button.danger:hover {
  background:#fbe3df;
}
button.small {
  min-height:32px;
  padding:6px 10px;
  font-size:12px;
}
button.subtle {
  border-color:transparent;
  color:var(--blue);
  background:transparent;
}
button:disabled {
  opacity:.5;
  cursor:not-allowed;
}
button[disabled]:hover {
  border-color:var(--line);
}
[aria-busy=true] button:disabled {
  cursor:wait;
}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,[tabindex]:focus-visible {
  outline:3px solid #167ea2;
  outline-offset:3px;
}
#sidebar a:focus-visible {
  outline-color:#8dd8ee;
}
.icon {
  width:18px;
  height:18px;
  flex-shrink:0;
  vertical-align:middle;
}
button .icon {
  width:16px;
  height:16px;
}
.text-button {
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding:8px 4px;
  font-size:13px;
}
.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
  border:0;
}
.skip-link {
  position:fixed;
  top:8px;
  left:16px;
  padding:12px 16px;
  background:white;
  z-index:100;
  transform:translateY(-150%);
  border-radius:6px;
}
.skip-link:focus {
  transform:translateY(0);
}
[hidden] {
  display:none!important;
}
/* Navigation and persistent context */
#sidebar {
  width:236px;
  position:fixed;
  inset:0 auto 0 0;
  background:var(--nav);
  display:flex;
  flex-direction:column;
  color:white;
  z-index:20;
}
.brand {
  display:block;
  background:white;
  margin:20px 24px 0;
  padding:8px 12px;
  border-radius:6px;
}
.brand img {
  display:block;
  width:100%;
  height:auto;
}
.brand-sub {
  font-size:10px;
  color:#bdd0db;
  letter-spacing:1.6px;
  text-align:center;
  margin:12px 0 16px;
}
nav {
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:#4b6777 transparent;
  padding:0 12px 16px;
  min-height:0;
}
nav a {
  display:flex;
  align-items:center;
  gap:12px;
  border-radius:6px;
  text-decoration:none;
  color:#c3d3dd;
  font-size:13px;
  min-height:36px;
  padding:8px 12px;
  margin:2px 0;
  border:1px solid transparent;
}
nav a>span {
  display:flex;
}
nav a:hover {
  background:#203e50;
  color:white;
}
nav a.active {
  background:#244c61;
  color:#fff;
  border-color:#36657d;
  box-shadow:inset 3px 0 #62c9e4;
}
nav a.active .icon {
  color:#8fe0f3;
}
.nav-label {
  font-size:10px;
  letter-spacing:1.4px;
  color:#9eb8c7;
  padding:16px 12px 6px;
}
aside footer {
  margin-top:auto;
  border-top:1px solid #36505f;
  padding:14px 24px;
  font-size:11px;
  line-height:1.7;
  color:#c1d3dd;
}
aside footer small {
  font-size:10px;
  color:#a6c0cf;
}
.status-dot {
  display:inline-block;
  width:6px;
  height:6px;
  border-radius:50%;
  background:#81d2ae;
  margin-right:6px;
}
.creator {
  display:block;
  margin-top:8px;
  padding-top:8px;
  border-top:1px solid #36505f;
  font-size:10px;
  color:#bbd0dc;
}
#shell {
  margin-left:236px;
  min-width:0;
}
#topbar {
  min-height:72px;
  padding:14px 28px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  background:white;
  border-bottom:1px solid var(--line);
}
.heading-context {
  display:flex;
  gap:12px;
  align-items:center;
  min-width:0;
}
#page-kicker {
  display:block;
  font-size:10px;
  letter-spacing:1.3px;
  color:var(--muted);
  margin-bottom:2px;
}
#page-title {
  font-size:16px;
  font-weight:650;
  letter-spacing:-.2px;
}
.top-actions {
  display:flex;
  align-items:center;
  gap:20px;
  flex-shrink:0;
}
#clock {
  font-size:12px;
  color:var(--muted);
}
#nav-toggle {
  display:none;
}
main {
  padding:24px 28px 40px;
  max-width:1760px;
  margin:auto;
  min-width:0;
}
main:focus {
  outline:none;
}
#global-alert:empty {
  display:none;
}
#global-alert {
  position:sticky;
  top:0;
  z-index:10;
  padding:12px 28px;
  background:#fff4df;
  border-bottom:1px solid #dbc395;
  color:#714709;
}
.persistent {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  font-size:12px;
}
.persistent strong {
  display:block;
  font-size:14px;
}
.persistent p {
  margin:4px 0 0;
  line-height:1.5;
}
.persistent button {
  flex-shrink:0;
}
.alert-list {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
}
.alert-list button {
  min-height:28px;
  padding:4px 8px;
  font-size:11px;
  color:#74480a;
  background:#fffaf0;
  border-color:#ccb98d;
}
/* Data hierarchy */
h1,h2,h3,p {
  margin-top:0;
}
h1 {
  font-size:24px;
  line-height:1.25;
  letter-spacing:-.65px;
  font-weight:650;
  margin-bottom:8px;
}
h2 {
  font-size:16px;
  font-weight:650;
  letter-spacing:-.2px;
  margin-bottom:4px;
}
h3 {
  font-size:14px;
  font-weight:650;
}
p.sub,.muted {
  font-size:13px;
  color:var(--muted);
  line-height:1.6;
}
p.sub {
  margin-bottom:0;
}
.greeting {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-bottom:20px;
}
.greeting>div {
  min-width:0;
}
.greeting>button {
  flex-shrink:0;
}
.period {
  display:inline-flex;
  align-items:center;
  font-size:12px;
  border:1px solid var(--line);
  border-radius:6px;
  background:white;
  padding:8px 12px;
  max-width:330px;
  color:var(--muted);
}
.metrics {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:0 0 20px;
}
.metric {
  min-width:0;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:16px 20px;
  background:white;
  position:relative;
}
.metric .label {
  font-size:12px;
  color:var(--muted);
  font-weight:600;
  margin-bottom:8px;
}
.metric .value {
  font-size:28px;
  line-height:1.2;
  letter-spacing:-.8px;
  font-weight:650;
  font-variant-numeric:tabular-nums;
  overflow-wrap:anywhere;
}
.metric small {
  font-size:12px;
  display:block;
  color:var(--muted);
  margin-top:8px;
  line-height:1.4;
}
.metric.emphasis {
  border-top:3px solid var(--blue);
  padding-top:14px;
}
.metric.emphasis .value {
  color:var(--blue);
}
.metric.green .value {
  color:var(--green);
}
.metric.red .value {
  color:var(--red);
}
.grid2 {
  display:grid;
  grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);
  gap:20px;
}
.grid2>div {
  min-width:0;
}
.panel {
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:white;
  margin-bottom:20px;
  overflow:hidden;
  min-width:0;
}
.panel-head {
  padding:16px 20px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  border-bottom:1px solid var(--line);
}
.panel-head p {
  font-size:12px;
  color:var(--muted);
  margin:4px 0 0;
}
.panel-head h2,.panel-head h3 {
  margin-bottom:0;
}
.panel-head>button {
  flex-shrink:0;
}
.panel-body {
  padding:20px;
}
.empty {
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  padding:28px 20px;
  color:var(--muted);
  font-size:13px;
  line-height:1.6;
  gap:4px;
}
.empty strong {
  font-size:14px;
  font-weight:600;
  color:var(--ink);
}
.empty-icon {
  display:flex;
  width:36px;
  height:36px;
  border:1px solid var(--line);
  border-radius:8px;
  align-items:center;
  justify-content:center;
  margin-bottom:8px;
  color:#607a8c;
  background:#f6f9fb;
}
.setup {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
.setup a {
  display:block;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:6px;
  font-size:12px;
  color:var(--muted);
  text-decoration:none;
  line-height:1.6;
}
.setup a:hover {
  border-color:#6997ab;
  background:#f4f9fb;
}
.setup b {
  display:block;
  font-size:13px;
  color:var(--blue);
  margin-bottom:4px;
}
.setup .done {
  color:var(--green);
}
.row-line {
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:12px 0;
  border-bottom:1px solid var(--line);
  font-size:13px;
}
.row-line:last-child {
  border-bottom:0;
}
.row-line strong {
  font-size:13px;
  font-weight:650;
  font-variant-numeric:tabular-nums;
}
.row-line small {
  display:block;
  font-size:12px;
  color:var(--muted);
  margin-top:4px;
}
/* Tables keep every column available, without widening the page. */
.table-wrap {
  position:relative;
  overflow:auto;
  max-width:100%;
  scrollbar-width:thin;
  scrollbar-color:#8fa4b2 #edf2f5;
  overscroll-behavior-x:contain;
}
.table-wrap:focus-visible {
  outline-offset:-3px;
}
table {
  border-collapse:separate;
  border-spacing:0;
  width:100%;
  font-size:13px;
  line-height:1.5;
}
th {
  padding:10px 16px;
  text-align:left;
  background:#f4f7f9;
  color:#4a6070;
  font-weight:600;
  font-size:11px;
  letter-spacing:.4px;
  text-transform:uppercase;
  white-space:nowrap;
  border-bottom:1px solid var(--line);
}
td {
  padding:12px 16px;
  border-bottom:1px solid #e8edf1;
  vertical-align:middle;
  min-width:80px;
}
tbody tr:last-child td {
  border-bottom:0;
}
td strong {
  font-weight:600;
}
td small {
  display:block;
  color:var(--muted);
  font-size:12px;
  line-height:1.5;
  margin-top:3px;
}
tr:hover td {
  background:#f5f9fb;
}
.amount {
  text-align:right;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
td:has(button) {
  white-space:nowrap;
}
.table-actions {
  white-space:nowrap;
}
.table-actions button+button {
  margin-left:6px;
}
.table-empty,.filter-empty td {
  padding:28px;
  text-align:center;
  color:var(--muted);
  font-size:13px;
}
.badge {
  display:inline-flex;
  align-items:center;
  border-radius:4px;
  padding:3px 7px;
  font-size:11px;
  font-weight:600;
  line-height:1.5;
  color:#435969;
  background:#eaf0f4;
  white-space:nowrap;
}
.badge.green {
  color:#116749;
  background:#e5f3ec;
}
.badge.blue {
  color:#126180;
  background:#e6f2f9;
}
.badge.amber {
  color:#805006;
  background:#fff0d5;
}
.badge.red {
  color:#a22c2a;
  background:#fde9e6;
}
.list-toolbar {
  display:flex;
  align-items:flex-end;
  gap:12px;
  padding:12px 20px;
  border-bottom:1px solid var(--line);
  flex-wrap:wrap;
  background:#fff;
}
.list-search {
  flex:1;
  min-width:200px;
  max-width:400px;
}
.search-field {
  position:relative;
  display:block;
}
.search-field>.icon {
  position:absolute;
  left:12px;
  top:11px;
  color:var(--muted);
  pointer-events:none;
}
.search-field input {
  padding-left:38px;
}
.list-count {
  margin-left:auto;
  font-size:12px;
  color:var(--muted);
  align-self:center;
  font-variant-numeric:tabular-nums;
}
.list-toolbar>button {
  height:40px;
}
.list-toolbar label {
  font-size:12px;
}
.list-toolbar select {
  min-width:160px;
}
.list-toolbar:has([data-list-search]:placeholder-shown) [data-clear-list]:disabled {
  opacity:.45;
}
.toolbar {
  display:flex;
  align-items:flex-end;
  gap:12px;
  flex-wrap:wrap;
  margin:0 0 20px;
}
.toolbar label {
  min-width:145px;
}
.toolbar .spacer {
  flex:1;
}
.toolbar>button {
  min-height:40px;
}
.toolbar>a {
  display:inline-flex;
  gap:8px;
  align-items:center;
  min-height:40px;
  font-size:13px;
}
.toolbar.panel-body {
  margin-bottom:0;
}
.quick-periods {
  display:flex;
  gap:4px;
  align-items:center;
}
.quick-periods button {
  font-size:12px;
  padding:8px 10px;
  min-height:40px;
  background:#f7fafb;
}
.quick-periods button[aria-pressed=true] {
  color:var(--blue);
  border-color:var(--blue);
  background:#e9f4f8;
}
/* Forms and feedback */
label {
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:12px;
  font-weight:600;
  color:#3c5363;
}
input,select,textarea {
  width:100%;
  min-height:40px;
  border:1px solid #9aafbd;
  border-radius:6px;
  background:#fff;
  padding:9px 11px;
  color:var(--ink);
  font-size:13px;
  line-height:1.4;
}
input::placeholder,textarea::placeholder {
  color:#657988;
  opacity:1;
}
input:hover,select:hover,textarea:hover {
  border-color:#4f758b;
}
input:read-only {
  background:#f2f5f7;
}
input:disabled,select:disabled {
  background:#eef2f5;
  color:#667984;
}
input[type=checkbox],input[type=radio] {
  width:18px;
  height:18px;
  min-height:18px;
  accent-color:var(--blue);
  flex-shrink:0;
}
input[type=file] {
  padding:8px;
  font-size:12px;
  max-width:100%;
  overflow:hidden;
}
input[type=file]::file-selector-button {
  border:0;
  background:#e9f0f4;
  color:var(--ink);
  padding:5px 8px;
  border-radius:4px;
  margin-right:8px;
  font:inherit;
}
textarea {
  resize:vertical;
  min-height:88px;
}
.form-grid {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:16px;
}
.form-grid .wide {
  grid-column:1/-1;
}
.check {
  flex-direction:row;
  align-items:center;
  min-height:32px;
}
.form-section {
  font-size:11px;
  color:var(--muted);
  font-weight:650;
  letter-spacing:.8px;
  text-transform:uppercase;
  border-bottom:1px solid var(--line);
  padding-bottom:8px;
  margin-top:8px;
}
.hint {
  font-size:12px;
  color:var(--muted);
  line-height:1.6;
}
.notice {
  padding:12px 16px;
  border:1px solid #cddfe9;
  border-left:3px solid #5790ab;
  border-radius:6px;
  background:#eef6fa;
  color:#34596d;
  font-size:13px;
  line-height:1.6;
  margin-bottom:16px;
  overflow-wrap:anywhere;
}
.notice.amber {
  background:#fff6e7;
  color:#7b4c0b;
  border-color:#e9ce9d;
  border-left-color:#b4791c;
}
.notice.red {
  background:#fff0ed;
  color:#982e29;
  border-color:#e6bab5;
  border-left-color:#b84138;
}
.notice.green {
  background:#edf7f2;
  color:#1e664b;
  border-color:#bcdbcc;
  border-left-color:#3a8b68;
}
.notice button {
  margin-left:8px;
}
.notice:last-child {
  margin-bottom:0;
}
.form-error {
  padding:12px 16px;
  background:#fff0ed;
  border:1px solid #d5a5a0;
  border-left:3px solid #b84138;
  border-radius:6px;
  color:#982e29;
  font-size:13px;
  margin-bottom:16px;
}
.form-error:empty {
  display:none;
}
.inline-total {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:16px;
  background:#edf5f9;
  border:1px solid #d0e2eb;
  border-radius:6px;
  font-size:13px;
}
.inline-total strong {
  font-size:24px;
  font-variant-numeric:tabular-nums;
}
.days {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.days label {
  flex-direction:row;
  align-items:center;
  border:1px solid var(--line);
  padding:7px;
  border-radius:4px;
  min-height:36px;
}
.days label:has(:checked) {
  border-color:#649caf;
  background:#eef7f9;
}
.pay-summary {
  padding:12px 16px;
  background:#f1f6f8;
  border:1px solid var(--line);
  border-radius:6px;
}
.pay-summary>div {
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:8px 0;
  font-size:13px;
  font-variant-numeric:tabular-nums;
}
.pay-summary .pay-total {
  border-top:1px solid var(--line);
  font-weight:650;
}
.source-box {
  border:1px solid var(--line);
  border-radius:6px;
  padding:16px;
  background:#f7fafb;
  display:grid;
  gap:12px;
  min-width:0;
}
.source-box>div:first-child {
  display:flex;
  flex-direction:column;
  gap:4px;
  overflow-wrap:anywhere;
}
.source-box small {
  font-size:12px;
  color:var(--muted);
}
.source-actions {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.source-actions .danger {
  margin-left:auto;
}
.import-results {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin:16px 0;
}
.import-results div {
  padding:12px;
  background:#f3f7f9;
  border:1px solid var(--line);
  border-radius:6px;
  text-align:center;
}
.import-results span {
  display:block;
  font-size:12px;
  color:var(--muted);
}
.import-results strong {
  font-size:24px;
}
.import-warnings {
  max-height:220px;
  overflow:auto;
  color:#7b4c0b;
  font-size:13px;
  line-height:1.6;
}
/* Routes */
.route-cards {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}
.route-cards>.empty {
  grid-column:1/-1;
  border:1px dashed #b4c4ce;
  border-radius:8px;
  background:white;
}
.route-card {
  padding:16px 20px;
  background:white;
  border:1px solid var(--line);
  border-radius:8px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  min-width:0;
}
.route-card:hover {
  border-color:#9bb9c9;
}
.route-card .route-id {
  font-size:10px;
  letter-spacing:.9px;
  color:var(--muted);
  font-weight:600;
}
.route-card h3 {
  font-size:16px;
  line-height:1.3;
  margin:8px 0;
}
.route-card p {
  font-size:12px;
  line-height:1.5;
  color:var(--muted);
  margin-bottom:12px;
}
.schedule-mini {
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-bottom:12px;
}
.schedule-mini span {
  font-size:11px;
  background:#eef3f6;
  color:#3e596b;
  border-radius:4px;
  padding:4px 6px;
}
.route-actions {
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:auto;
  width:100%;
  padding-top:8px;
}
.route-actions button:first-child {
  flex:1;
  justify-content:flex-start;
}
.route-actions button:last-child {
  border-color:transparent;
}
.route-count {
  font-size:12px;
  color:var(--muted);
  margin:-4px 0 12px;
  display:flex;
  align-items:center;
  gap:16px;
  flex-wrap:wrap;
}
.route-search-label {
  flex:1;
  max-width:420px;
  min-width:180px!important;
}
.detail-image {
  display:block;
  max-width:100%;
  height:auto;
  margin:16px auto;
  border:1px solid var(--line);
}
summary {
  padding:12px 0;
  color:var(--blue);
  font-size:13px;
  cursor:pointer;
}
/* Dialogs, print and motion */
dialog {
  border:1px solid var(--line);
  border-radius:10px;
  box-shadow:0 20px 70px #10253640;
  padding:0;
  width:min(800px,calc(100vw - 40px));
  max-height:90dvh;
  color:var(--ink);
  background:white;
  overscroll-behavior:contain;
}
dialog::backdrop {
  background:#1229399c;
}
.modal-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:16px 24px;
  border-bottom:1px solid var(--line);
  background:white;
  position:sticky;
  top:0;
  z-index:2;
}
.modal-head h2 {
  font-size:20px;
  margin:0;
}
.modal-head button {
  border-color:transparent;
  width:36px;
  min-height:36px;
  padding:8px;
  flex-shrink:0;
}
.modal-body {
  padding:20px 24px;
}
.modal-foot {
  display:flex;
  justify-content:flex-end;
  gap:8px;
  padding:12px 24px;
  position:sticky;
  bottom:0;
  background:#fff;
  border-top:1px solid var(--line);
  z-index:2;
}
body:has(dialog[open]) {
  overflow:hidden;
}
#toast {
  display:none;
  position:fixed;
  bottom:24px;
  left:calc(50% + 118px);
  transform:translateX(-50%);
  max-width:min(600px,90vw);
  padding:14px 20px;
  background:#153c4f;
  color:white;
  border:1px solid #42677a;
  border-radius:8px;
  box-shadow:0 4px 20px #10253626;
  font-size:13px;
  line-height:1.5;
  z-index:50;
}
.loading {
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:center;
  padding:64px 24px;
  color:var(--muted);
  font-size:14px;
}
.loading:before {
  content:'';
  height:18px;
  width:18px;
  border:2px solid var(--line);
  border-top-color:var(--blue);
  border-radius:50%;
  animation:spin .8s linear infinite;
}
@keyframes spin {
  to {
    transform:rotate(360deg);
  }
}
.help {
  max-width:960px;
}
.help h2 {
  margin:24px 0 8px;
}
.help li {
  font-size:14px;
  line-height:1.8;
  margin:8px 0;
}
.mono {
  font-family:Consolas,monospace;
  font-size:12px;
  overflow-wrap:anywhere;
}
.invoice-paper h1 {
  font-size:24px;
}
.invoice-paper .meta {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
  margin:20px 0;
  font-size:13px;
}
.total-line {
  font-weight:700;
}
.progress {
  height:6px;
  background:#e8f0f4;
  border-radius:3px;
  overflow:hidden;
}
.progress i {
  display:block;
  height:100%;
  background:var(--blue);
}
@media(min-width:1400px) {
  .route-cards {
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
}
@media(max-width:1150px) {
  #sidebar {
    width:216px;
  }
  #shell {
    margin-left:216px;
  }
  #topbar {
    padding:14px 24px;
  }
  main {
    padding:24px;
  }
  #global-alert {
    padding:12px 24px;
  }
  #clock {
    display:none;
  }
  .metric {
    padding:16px;
  }
  .metric.emphasis {
    padding-top:14px;
  }
  .metric .value {
    font-size:25px;
  }
  .grid2 {
    grid-template-columns:minmax(0,1fr);
  }
  .route-cards {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .period {
    max-width:240px;
  }
  .setup {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  #toast {
    left:calc(50% + 108px);
  }
}
@media(max-width:800px) {
  body {
    display:grid;
    grid-template-columns:minmax(0,1fr);
  }
  #shell {
    display:contents;
  }
  #topbar {
    grid-row:1;
    position:sticky;
    top:0;
    z-index:30;
    padding:12px 16px;
    min-height:68px;
    gap:8px;
    flex-wrap:wrap;
    align-items:flex-start;
  }
  .heading-context {
    gap:8px;
    width:100%;
    flex-basis:100%;
  }
  .heading-context > div {
    min-width:0;
    overflow-wrap:anywhere;
  }
  #page-title {
    font-size:14px;
  }
  #page-kicker {
    font-size:9px;
  }
  #nav-toggle {
    display:flex;
    min-height:36px;
    width:36px;
    padding:8px;
    border-color:var(--line);
  }
  #nav-toggle>span {
    display:none;
  }
  .top-actions {
    flex-wrap:wrap;
    flex-basis:100%;
    flex-shrink:1;
    min-width:0;
    gap:8px 12px;
  }
  .top-actions > a {
    display:inline-flex;
    align-items:center;
    min-height:36px;
  }
  .top-actions button {
    padding:8px 10px;
    font-size:12px;
    min-height:36px;
  }
  #sidebar {
    grid-row:2;
    position:static;
    width:auto;
    display:none;
    max-height:65dvh;
  }
  body.nav-open #sidebar {
    display:flex;
  }
  .brand,.brand-sub {
    display:none;
  }
  nav {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:2px 8px;
    padding:8px 16px 16px;
    overflow-y:auto;
  }
  .nav-label {
    grid-column:1/-1;
    padding:12px 12px 4px;
  }
  nav a {
    font-size:13px;
    min-height:40px;
  }
  aside footer {
    display:none;
  }
  #global-alert {
    top:68px;
    grid-row:3;
    padding:12px 16px;
  }
  main {
    grid-row:4;
    padding:20px 16px 32px;
    width:100%;
  }
  .greeting {
    align-items:flex-start;
    flex-wrap:wrap;
    margin-bottom:16px;
  }
  h1 {
    font-size:22px;
  }
  .period {
    max-width:none;
    font-size:11px;
  }
  .metrics {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
  }
  .metric .value {
    font-size:26px;
  }
  .metric {
    padding:16px;
  }
  .metric.emphasis {
    padding-top:14px;
  }
  .metric small {
    font-size:11px;
  }
  .panel-head,.panel-body {
    padding:16px;
  }
  .panel-head {
    flex-wrap:wrap;
    align-items:flex-start;
  }
  .persistent {
    align-items:flex-start;
    flex-wrap:wrap;
  }
  .alert-list {
    max-height:90px;
    overflow-y:auto;
  }
  .toolbar {
    gap:8px;
  }
  .toolbar label {
    flex:1;
    min-width:130px;
  }
  .toolbar>.spacer {
    display:none;
  }
  .list-toolbar {
    padding:12px 16px;
    gap:8px;
  }
  .list-search {
    min-width:100%;
    max-width:none;
  }
  .list-toolbar>label:not(.list-search) {
    flex:1;
  }
  .list-count {
    font-size:11px;
    min-width:100%;
    margin:0;
  }
  .form-grid {
    grid-template-columns:1fr;
  }
  .form-grid .wide {
    grid-column:1;
  }
  .form-grid label {
    min-width:0;
  }
  .source-actions .danger {
    margin-left:0;
  }
  .route-search-label {
    max-width:none;
  }
  .route-cards {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .route-card {
    padding:16px;
  }
  .route-actions {
    flex-wrap:wrap;
  }
  .route-actions button:first-child {
    flex-basis:100%;
  }
  dialog {
    width:calc(100vw - 24px);
    max-height:92dvh;
  }
  .modal-head {
    padding:16px;
  }
  .modal-body {
    padding:16px;
  }
  .modal-foot {
    padding:12px 16px;
  }
  .modal-head h2 {
    font-size:18px;
  }
  .import-results {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  #toast {
    left:50%;
    width:calc(100% - 32px);
    bottom:16px;
  }
  .table-wrap table {
    min-width:600px;
  }
  .invoice-paper .meta {
    grid-template-columns:1fr;
  }
  .source-box {
    padding:12px;
  }
}
@media(max-width:480px) {
  .route-cards {
    grid-template-columns:minmax(0,1fr);
  }
  .route-actions {
    flex-wrap:nowrap;
  }
  .route-actions button:first-child {
    flex-basis:auto;
  }
  .setup {
    grid-template-columns:minmax(0,1fr);
  }
  .setup a {
    padding:10px 12px;
  }
  .metrics {
    gap:8px;
  }
  .metric {
    padding:12px;
  }
  .metric.emphasis {
    padding-top:10px;
  }
  .metric .value {
    font-size:23px;
  }
  .metric .label {
    font-size:11px;
  }
  .metric small {
    font-size:11px;
  }
  .top-actions button .icon {
    display:none;
  }
  .top-actions button {
    padding:8px;
    font-size:11px;
  }
  #page-title {
    font-size:12px;
  }
  #topbar {
    padding:10px 12px;
  }
  .panel-head>button {
    font-size:12px;
  }
  .toolbar>.quick-periods {
    flex-basis:100%;
  }
  nav {
    grid-template-columns:1fr;
  }
  .inline-total {
    flex-wrap:wrap;
  }
  .source-actions>button {
    width:100%;
  }
  input,select,textarea {
    font-size:16px;
  }
  .list-toolbar select {
    min-width:0;
  }
  .list-toolbar>button {
    font-size:11px;
    padding:8px;
  }
  .route-card h3 {
    font-size:17px;
  }
}
@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {
    animation:none!important;
    transition:none!important;
    scroll-behavior:auto!important;
  }
}
@media print {
  #sidebar,#topbar,#global-alert,#toast,.no-print,.modal-head,.modal-foot,.toolbar,.list-toolbar,.skip-link {
    display:none!important;
  }
  body {
    display:block;
    background:white;
    color:black;
  }
  #shell {
    margin:0;
    display:block;
  }
  main {
    padding:0;
  }
  .metrics {
    break-inside:avoid;
  }
  .panel {
    border:0;
    overflow:visible;
  }
  .table-wrap {
    overflow:visible;
  }
  table {
    min-width:0!important;
    font-size:10px;
  }
  .table-wrap[tabindex] {
    outline:none;
  }
  th,td {
    padding:6px;
  }
  tr {
    break-inside:avoid;
  }
  body:has(dialog[open]) #shell {
    display:none;
  }
  dialog[open] {
    position:static;
    width:100%;
    max-width:none;
    max-height:none;
    box-shadow:none;
    border:0;
    overflow:visible;
  }
  .modal-body {
    padding:0;
  }
  dialog::backdrop {
    background:none;
  }
  .greeting {
    margin-bottom:12px;
  }
  .metric {
    border:1px solid #bbb;
  }
  .icon {
    display:none;
  }
}
