:root {
  --ink: #102027;
  --muted: #5d6f72;
  --line: rgba(16, 32, 39, 0.14);
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --teal: #0f766e;
  --teal-dark: #0d5f5a;
  --amber: #f0b35a;
  --error: #b42318;
  --focus: rgba(15, 118, 110, 0.22);
  --shadow: 0 28px 70px rgba(7, 23, 31, 0.32);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: #102027;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.is-auth::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(10, 26, 34, 0.9) 0%, rgba(10, 26, 34, 0.64) 38%, rgba(10, 26, 34, 0.18) 100%),
    url("assets/login-background.png") center / cover no-repeat;
  content: "";
}

body.is-auth::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(240, 179, 90, 0.14), transparent 34%);
  content: "";
  pointer-events: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

a {
  color: inherit;
}

body.is-app {
  overflow-x: hidden;
  background:
    linear-gradient(180deg, #eef5f2 0%, #f7f8f4 44%, #eef2f3 100%);
}

body.is-app::before,
body.is-app::after {
  display: none;
}

.auth-page {
  display: grid;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 20px 32px;
}

.auth-panel {
  width: min(452px, 100%);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand-row,
.security-note,
.form-options,
.switch,
.field-control,
.submit-button {
  display: flex;
  align-items: center;
}

.brand-row {
  gap: 12px;
  margin-bottom: 22px;
}

.brand-logo {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  min-width: 0;
}

.brand-logo[hidden] {
  display: none;
}

.brand-logo img {
  display: block;
  width: auto;
  max-width: 168px;
  max-height: 44px;
  object-fit: contain;
}

.side-brand .brand-logo img {
  max-width: 142px;
  max-height: 42px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: #102027;
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(16, 32, 39, 0.2);
}

.brand-mark svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.brand-name {
  font-size: 1.12rem;
  font-weight: 780;
}

body.has-company-logo .brand-row .brand-name,
body.has-company-logo .side-brand .brand-name {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.intro {
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal-dark);
  font-size: 0.86rem;
  font-weight: 780;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 2.45rem;
  line-height: 1.04;
  letter-spacing: 0;
}

.subtitle {
  max-width: 30rem;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.login-form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label,
.field > span {
  color: #23363b;
  font-size: 0.95rem;
  font-weight: 720;
}

.field-control {
  min-height: 52px;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.field-control:focus-within {
  border-color: var(--teal);
  background: #ffffff;
  box-shadow: 0 0 0 5px var(--focus);
}

.field-control > svg {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-left: 16px;
  fill: none;
  stroke: #61777a;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.field-control input {
  width: 100%;
  min-width: 0;
  height: 50px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.note-field textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface-strong);
  padding: 14px 16px;
  font: inherit;
  outline: 0;
}

.note-field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 5px var(--focus);
}

.note-field textarea:disabled {
  color: #6e8386;
  background: #edf3f2;
}

.note-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(16, 32, 39, 0.42);
  backdrop-filter: blur(10px);
}

.note-modal {
  width: min(520px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.note-modal form {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.note-modal-header {
  display: grid;
  gap: 6px;
}

.note-modal-header h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.note-modal-field {
  display: grid;
  gap: 8px;
  color: #30474b;
  font-size: 0.86rem;
  font-weight: 760;
}

.note-modal-field input,
.note-modal-field textarea,
.note-modal-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  padding: 14px 16px;
  outline: 0;
}

.note-modal-field input,
.note-modal-field select {
  min-height: 48px;
}

.note-modal-field textarea {
  min-height: 112px;
  resize: vertical;
}

.note-modal-field input:focus,
.note-modal-field textarea:focus,
.note-modal-field select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 5px var(--focus);
}

.note-modal-field small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.overnight-modal {
  width: min(560px, 100%);
}

.admin-trip-edit-modal {
  width: min(760px, 100%);
  max-height: min(92vh, 980px);
  overflow: hidden;
}

.admin-trip-edit-modal form {
  max-height: min(92vh, 980px);
  overflow: auto;
}

.admin-trip-edit-section {
  display: grid;
  gap: 14px;
  border-top: 1px solid rgba(16, 32, 39, 0.1);
  padding-top: 18px;
}

.admin-trip-edit-section h3,
.admin-trip-work-heading {
  margin: 0;
  color: var(--ink);
  font-size: 0.96rem;
  letter-spacing: 0;
}

.admin-trip-work-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 780;
}

.admin-trip-work-list {
  display: grid;
  gap: 10px;
}

.admin-trip-work-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.admin-trip-work-row .route-stop-marker {
  align-self: center;
}

.admin-trip-work-row .route-stop-actions {
  padding-bottom: 6px;
}

.admin-trip-work-row .icon-mini-button:disabled {
  cursor: default;
  opacity: 0.35;
}

.admin-trip-end-toggle {
  width: fit-content;
}

.admin-day-edit-modal {
  width: min(920px, 100%);
}

.admin-day-edit-meta,
.admin-day-add-event {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.admin-day-confirmed {
  min-height: 48px;
  margin-bottom: 1px;
}

.admin-day-events-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.admin-day-events-heading span,
.admin-day-event-actions small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.admin-day-event-list {
  display: grid;
  gap: 10px;
}

.admin-day-event-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(190px, 1fr) minmax(180px, 1.2fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid rgba(16, 32, 39, 0.1);
  border-radius: 8px;
  background: #f7fbf9;
  padding: 12px;
}

.admin-day-event-actions {
  display: grid;
  gap: 6px;
  justify-items: start;
  min-width: 110px;
}

.overnight-reuse {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 8px;
  background: #eef8f5;
  padding: 12px;
}

.overnight-reuse div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.overnight-reuse strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.overnight-reuse span {
  color: #587074;
  font-size: 0.82rem;
  line-height: 1.4;
}

.overnight-meals {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.overnight-meals legend {
  color: #30474b;
  font-size: 0.86rem;
  font-weight: 760;
}

.overnight-meal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.overnight-meal-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 740;
}

.overnight-meal-option:has(input:checked) {
  border-color: rgba(15, 118, 110, 0.42);
  background: #e5f5f1;
  color: #066760;
}

.overnight-meal-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

.note-modal-header p:not(.eyebrow),
.note-modal-message,
.note-modal-error {
  margin: 0;
  color: #637a7d;
  font-size: 0.86rem;
  line-height: 1.45;
}

.note-modal-error:not(:empty) {
  color: #8b332c;
  font-weight: 720;
}

.password-reset-dev-link {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 8px;
  background: #eef8f5;
  color: #30474b;
  font-size: 0.86rem;
  line-height: 1.45;
}

.password-reset-dev-link p {
  margin: 0;
}

.password-reset-dev-link[hidden] {
  display: none;
}

.mfa-setup-key {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 8px;
  background: #eef8f5;
}

.mfa-setup-key span {
  grid-column: 1 / -1;
  color: #526d70;
  font-size: 0.78rem;
  font-weight: 720;
}

.mfa-setup-key strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.95rem;
  letter-spacing: 0;
}

.mfa-open-app {
  justify-self: start;
}

.mfa-recovery-codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f8f7;
}

.mfa-recovery-codes code {
  color: var(--ink);
  font-size: 0.92rem;
  letter-spacing: 0;
}

.note-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.audit-modal {
  width: min(860px, 100%);
  max-height: min(88vh, 920px);
  overflow: hidden;
}

.audit-modal-body {
  display: grid;
  gap: 16px;
  max-height: min(88vh, 920px);
  overflow: auto;
  padding: 22px;
}

.audit-modal-header {
  padding-bottom: 4px;
}

.audit-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.audit-summary-strip div {
  display: grid;
  gap: 5px;
  min-height: 74px;
  border: 1px solid rgba(16, 32, 39, 0.08);
  border-radius: 8px;
  background: #f3faf7;
  padding: 12px;
}

.audit-summary-strip span {
  color: #637a7d;
  font-size: 0.76rem;
  font-weight: 820;
  text-transform: uppercase;
}

.audit-summary-strip strong {
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
}

.trip-time-modal {
  width: min(980px, 100%);
}

.trip-time-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(16, 32, 39, 0.09);
  border-radius: 8px;
  background: #f3faf7;
}

.trip-time-summary div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px 16px;
}

.trip-time-summary div + div {
  border-left: 1px solid rgba(16, 32, 39, 0.09);
}

.trip-time-summary .is-total {
  background: #fff7ea;
}

.trip-time-vehicle {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(16, 32, 39, 0.09);
  border-radius: 8px;
  background: #f7fbf9;
  padding: 12px 14px;
}

.trip-time-vehicle span {
  color: #637a7d;
  font-size: 0.72rem;
  font-weight: 820;
  text-transform: uppercase;
}

.trip-time-vehicle strong {
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.trip-time-summary span,
.trip-time-day-header > div > span,
.trip-time-day-totals dt {
  color: #637a7d;
  font-size: 0.72rem;
  font-weight: 820;
  text-transform: uppercase;
}

.trip-time-summary strong {
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1.1;
}

.trip-time-days {
  display: grid;
}

.trip-time-day {
  display: grid;
  gap: 12px;
  border-top: 1px solid rgba(16, 32, 39, 0.1);
  padding: 18px 0;
}

.trip-time-day:first-child {
  border-top: 0;
  padding-top: 2px;
}

.trip-time-day-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.trip-time-day-header > div {
  display: grid;
  gap: 3px;
}

.trip-time-day-header > .ghost-button {
  flex: 0 0 auto;
}

.trip-time-day-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
}

.trip-time-day-totals {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  margin: 0;
}

.trip-time-day-totals div {
  display: grid;
  gap: 2px;
}

.trip-time-day-totals dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.trip-time-day-route {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border-left: 3px solid #7eb9b0;
  background: #f2f8f6;
  padding: 10px 12px;
}

.trip-time-day-route span {
  color: #527174;
  font-size: 0.7rem;
  font-weight: 840;
  text-transform: uppercase;
}

.trip-time-day-route strong {
  min-width: 0;
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.trip-time-table {
  overflow: hidden;
  border: 1px solid rgba(16, 32, 39, 0.09);
  border-radius: 8px;
}

.trip-time-table-head,
.trip-time-row {
  display: grid;
  grid-template-columns: 110px minmax(180px, 1fr) 100px 100px 100px;
  gap: 12px;
  align-items: center;
}

.trip-time-table-head {
  color: #637a7d;
  background: #edf5f3;
  padding: 9px 12px;
  font-size: 0.68rem;
  font-weight: 840;
  text-transform: uppercase;
}

.trip-time-row {
  min-height: 52px;
  padding: 10px 12px;
  color: #40575b;
  font-size: 0.82rem;
}

.trip-time-row + .trip-time-row {
  border-top: 1px solid rgba(16, 32, 39, 0.08);
}

.trip-time-row strong {
  min-width: 0;
  color: var(--ink);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.trip-time-row > span:not(.trip-time-kind) {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.trip-time-row em {
  color: #a25c1e;
  font-style: normal;
  font-weight: 780;
}

.trip-time-kind {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 0.7rem;
  font-weight: 840;
}

.trip-time-kind.is-travel {
  color: #275d63;
  background: #e4f1f2;
}

.trip-time-kind.is-work {
  color: #3d654b;
  background: #e8f3eb;
}

.trip-time-kind.is-overnight {
  color: #7a4f18;
  background: #fff0d7;
}

.trip-time-overnights {
  display: grid;
  gap: 10px;
}

.trip-time-overnight-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(196, 130, 43, 0.22);
  border-radius: 8px;
  background: #fffaf1;
  padding: 12px;
}

.trip-time-overnight-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.trip-time-overnight-head > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.trip-time-overnight-head strong {
  color: var(--ink);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.trip-time-overnight-edit {
  min-height: 34px;
  padding: 7px 12px;
  white-space: nowrap;
}

.trip-time-overnight-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 0;
}

.trip-time-overnight-card div {
  min-width: 0;
}

.trip-time-overnight-card dt {
  color: #637a7d;
  font-size: 0.68rem;
  font-weight: 820;
  text-transform: uppercase;
}

.trip-time-overnight-card dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 760;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.trip-time-empty {
  margin: 0;
  border: 1px dashed rgba(16, 32, 39, 0.14);
  border-radius: 8px;
  color: #637a7d;
  padding: 13px;
  font-size: 0.82rem;
}

.audit-review-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(16, 32, 39, 0.1);
  border-radius: 8px;
  background: #f8fbfa;
  padding: 12px;
}

.audit-review-status span {
  width: fit-content;
  border-radius: 999px;
  color: #40575b;
  background: #e8efee;
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.audit-review-status strong {
  min-width: 0;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.audit-review-status em {
  color: #637a7d;
  font-size: 0.8rem;
  font-style: normal;
  line-height: 1.35;
  text-align: right;
}

.audit-review-status.is-reviewed {
  border-color: rgba(15, 118, 110, 0.22);
  background: #eef8f4;
}

.audit-review-status.is-reviewed span {
  color: #ffffff;
  background: var(--teal);
}

.audit-review-status.is-neutral {
  border-color: rgba(16, 32, 39, 0.08);
  background: #f7faf9;
}

.audit-review-status.is-neutral span {
  color: #50676b;
  background: #e8efee;
}

.audit-review-status.needs-review {
  border-color: rgba(215, 127, 54, 0.24);
  background: #fff8ed;
}

.audit-review-status.needs-review span {
  color: #6e4b16;
  background: #f5ddbd;
}

.audit-section {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(16, 32, 39, 0.09);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.audit-section-title {
  display: grid;
  gap: 4px;
}

.audit-section-title h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.2;
}

.audit-technical-context {
  overflow: hidden;
  border: 1px solid rgba(16, 32, 39, 0.09);
  border-radius: 8px;
  background: #f7faf9;
}

.audit-technical-context summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
}

.audit-technical-context summary::-webkit-details-marker {
  display: none;
}

.audit-technical-context summary::after {
  content: "+";
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  color: #587074;
  font-size: 1.05rem;
  font-weight: 820;
}

.audit-technical-context[open] summary::after {
  content: "−";
}

.audit-technical-context summary > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.audit-technical-context summary strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.audit-technical-context summary small {
  color: #637a7d;
  font-size: 0.78rem;
  line-height: 1.35;
}

.audit-technical-context-body {
  border-top: 1px solid rgba(16, 32, 39, 0.08);
  padding: 12px;
  background: #ffffff;
}

.audit-timeline {
  position: relative;
  display: grid;
  gap: 10px;
}

.audit-timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 10px;
  width: 2px;
  background: #dbe9e6;
}

.audit-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
}

.audit-timeline-dot {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  border: 4px solid #ffffff;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.2);
}

.audit-timeline-card,
.audit-warning-item,
.audit-empty-state,
.audit-event-row {
  border: 1px solid rgba(16, 32, 39, 0.08);
  border-radius: 8px;
  background: #f8fbfa;
  padding: 11px 12px;
}

.audit-timeline-card {
  display: grid;
  gap: 8px;
}

.audit-timeline-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: #637a7d;
  font-size: 0.78rem;
  font-weight: 760;
}

.audit-timeline-card h3 {
  margin: 0;
  color: #102027;
  font-size: 0.98rem;
  line-height: 1.28;
}

.audit-timeline-card p {
  margin: 0;
  color: #50676a;
  font-size: 0.82rem;
  line-height: 1.4;
}

.audit-field-grid {
  display: grid;
  gap: 8px;
}

.audit-field-grid div {
  display: grid;
  grid-template-columns: minmax(82px, 0.35fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border-top: 1px solid rgba(16, 32, 39, 0.08);
  padding-top: 8px;
}

.audit-field-grid span,
.audit-field-grid strong,
.audit-field-grid em {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
  line-height: 1.35;
}

.audit-field-grid span {
  color: #637a7d;
  font-weight: 820;
}

.audit-field-grid strong {
  color: #7a3832;
  font-style: normal;
  font-weight: 760;
}

.audit-field-grid em {
  color: var(--teal-dark);
  font-style: normal;
  font-weight: 760;
}

.audit-warning-list,
.audit-note-list,
.audit-event-list {
  display: grid;
  gap: 8px;
}

.audit-warning-overview {
  display: grid;
  gap: 3px;
  border-left: 3px solid #d9963c;
  padding: 3px 0 3px 12px;
  margin-bottom: 4px;
}

.audit-warning-overview strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.audit-warning-overview span {
  color: #637a7d;
  font-size: 0.82rem;
  line-height: 1.4;
}

.audit-warning-group {
  overflow: hidden;
  border: 1px solid rgba(16, 32, 39, 0.1);
  border-left: 4px solid #d9a357;
  border-radius: 8px;
  background: #ffffff;
}

.audit-warning-group.is-critical {
  border-left-color: #b94f45;
}

.audit-warning-group.is-info {
  border-left-color: #56818a;
}

.audit-warning-group summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 20px;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

.audit-warning-group summary::-webkit-details-marker {
  display: none;
}

.audit-warning-group summary::before {
  content: "+";
  grid-column: 3;
  grid-row: 1;
  justify-self: center;
  color: #637a7d;
  font-size: 1rem;
  font-weight: 800;
}

.audit-warning-group[open] summary::before {
  content: "−";
}

.audit-warning-group-copy {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.audit-warning-group-copy strong {
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.25;
}

.audit-warning-group-copy span {
  color: #637a7d;
  font-size: 0.8rem;
  line-height: 1.35;
}

.audit-warning-count {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  padding: 0 5px;
  color: #74410f;
  background: #ffead0;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 22px;
  text-align: center;
}

.audit-warning-group.is-critical .audit-warning-count {
  color: #7a2f29;
  background: #f8dfdc;
}

.audit-warning-group.is-info .audit-warning-count {
  color: #315d65;
  background: #e3eff0;
}

.audit-warning-details {
  border-top: 1px solid rgba(16, 32, 39, 0.08);
  padding: 10px 12px 12px;
  background: #f8fbfa;
}

.audit-warning-details p {
  margin: 0 0 8px;
  color: #466064;
  font-size: 0.76rem;
  font-weight: 820;
}

.audit-warning-details ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.audit-warning-details li {
  color: #354b50;
  font-size: 0.8rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.audit-warning-item,
.audit-note-item,
.audit-empty-state {
  display: grid;
  gap: 5px;
}

.audit-warning-item strong,
.audit-empty-state strong {
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.3;
}

.audit-empty-state span {
  color: #637a7d;
  font-size: 0.82rem;
  line-height: 1.35;
}

.audit-empty-state.compact {
  background: #f6faf9;
}

.audit-note-item {
  border: 1px solid rgba(16, 32, 39, 0.08);
  border-radius: 8px;
  background: #f8fbfa;
  padding: 11px 12px;
}

.audit-note-item span {
  color: var(--teal-dark);
  font-size: 0.76rem;
  font-weight: 840;
  text-transform: uppercase;
}

.audit-note-item p {
  margin: 0;
  color: #30474b;
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.audit-event-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.55fr) minmax(125px, 0.45fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.audit-event-row strong,
.audit-event-row span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.82rem;
  line-height: 1.35;
}

.audit-event-row strong {
  color: var(--ink);
}

.audit-event-row span {
  color: #50676a;
}

.audit-event-row .audit-capture {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(16, 32, 39, 0.08);
  color: #526d70;
  padding-top: 7px;
  font-size: 0.75rem;
  line-height: 1.4;
}

@media (max-width: 720px) {
  .note-modal-backdrop {
    padding: 12px;
  }

  .audit-modal,
  .audit-modal-body {
    max-height: 92vh;
  }

  .audit-modal-body {
    padding: 16px;
  }

  .mfa-setup-key,
  .mfa-recovery-codes {
    grid-template-columns: 1fr;
  }

  .audit-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trip-time-summary strong {
    font-size: 1.1rem;
  }

  .admin-trip-work-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-trip-work-heading .ghost-button {
    width: 100%;
  }

  .admin-day-edit-meta,
  .admin-day-add-event,
  .admin-day-event-row {
    grid-template-columns: 1fr;
  }

  .admin-day-event-actions {
    grid-template-columns: repeat(2, minmax(0, auto));
    align-items: center;
  }

  .admin-trip-work-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .admin-trip-work-row .route-stop-actions {
    grid-column: 2;
    justify-content: flex-start;
    padding-bottom: 0;
  }

  .trip-time-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trip-time-summary div:nth-child(odd) {
    border-left: 0;
  }

  .trip-time-summary div:nth-child(n + 3) {
    border-top: 1px solid rgba(16, 32, 39, 0.09);
  }
  .trip-time-day-header {
    align-items: start;
    flex-direction: column;
  }

  .trip-time-day-totals {
    justify-content: flex-start;
  }

  .trip-time-day-route {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .trip-time-table-head {
    display: none;
  }

  .trip-time-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    padding: 12px;
  }

  .trip-time-row .trip-time-kind {
    grid-column: 1;
  }

  .trip-time-row strong {
    grid-column: 2 / -1;
    text-align: right;
  }

  .trip-time-row [data-trip-time-label] {
    display: grid;
    gap: 3px;
  }

  .trip-time-row [data-trip-time-label]::before {
    content: attr(data-trip-time-label);
    color: #71878a;
    font-size: 0.64rem;
    font-weight: 820;
    text-transform: uppercase;
  }

  .trip-time-overnight-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .trip-time-overnight-edit {
    width: 100%;
  }

  .trip-time-overnight-card dl {
    grid-template-columns: 1fr;
  }

  .audit-review-status {
    grid-template-columns: 1fr;
  }

  .audit-review-status em {
    text-align: left;
  }

  .audit-field-grid div,
  .audit-event-row {
    grid-template-columns: 1fr;
  }
}

.field-control select {
  width: 100%;
  min-width: 0;
  height: 50px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.field-control input::placeholder {
  color: #8aa0a2;
}

.field-control.is-invalid {
  border-color: rgba(180, 35, 24, 0.62);
}

.field-error {
  min-height: 0.95rem;
  margin: 0;
  color: var(--error);
  font-size: 0.85rem;
  line-height: 1.35;
}

.field-help {
  margin: -2px 0 0;
  color: #637a7d;
  font-size: 0.76rem;
  line-height: 1.35;
}

.inline-field-error {
  margin-top: 4px;
  font-size: 0.76rem;
  font-weight: 720;
}

.icon-button {
  display: grid;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  margin-right: 4px;
  place-items: center;
  border-radius: 8px;
  color: #42575b;
  background: transparent;
  cursor: pointer;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  color: var(--ink);
  background: rgba(15, 118, 110, 0.1);
  outline: 0;
}

.icon-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.password-toggle .eye-closed,
.password-toggle[data-visible="true"] .eye-open {
  display: none;
}

.password-toggle[data-visible="true"] .eye-closed {
  display: block;
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
}

.form-options {
  justify-content: space-between;
  gap: 18px;
  margin-top: 0;
  color: #30474b;
  font-size: 0.93rem;
}

.switch {
  min-height: 34px;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.switch-track {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 26px;
  border: 1px solid rgba(16, 32, 39, 0.16);
  border-radius: 999px;
  background: #dfe8e7;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.switch-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 7px rgba(16, 32, 39, 0.22);
  content: "";
  transition: transform 160ms ease;
}

.switch input:checked + .switch-track {
  border-color: var(--teal);
  background: var(--teal);
}

.switch input:checked + .switch-track::after {
  transform: translateX(20px);
}

.switch input:focus-visible + .switch-track {
  box-shadow: 0 0 0 5px var(--focus);
}

.text-link {
  min-height: 34px;
  color: var(--teal-dark);
  font-weight: 720;
  text-decoration: none;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  outline: 0;
}

.submit-button {
  justify-content: center;
  min-height: 52px;
  gap: 10px;
  margin-top: 4px;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), #0b4f55 68%, #15313a);
  box-shadow: 0 18px 34px rgba(15, 118, 110, 0.26);
  cursor: pointer;
  font-weight: 780;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

.submit-button:hover,
.submit-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 22px 40px rgba(15, 118, 110, 0.32);
  filter: saturate(1.04);
  outline: 0;
}

.submit-button:active {
  transform: translateY(0);
}

.submit-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.submit-button.is-loading {
  pointer-events: none;
  opacity: 0.86;
}

.dev-login-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background: #f4fbf8;
}

.dev-login-panel[hidden] {
  display: none;
}

.dev-login-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.dev-login-header span {
  color: var(--teal-dark);
  font-size: 0.76rem;
  font-weight: 860;
  text-transform: uppercase;
}

.dev-login-header small {
  color: #637a7d;
  font-size: 0.74rem;
  font-weight: 700;
}

.dev-login-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dev-login-actions .ghost-button {
  display: grid;
  gap: 2px;
  min-height: 48px;
  margin: 0;
  padding: 7px 8px;
  text-align: center;
}

.dev-login-actions .ghost-button strong,
.dev-login-actions .ghost-button span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.dev-login-actions .ghost-button strong {
  font-size: 0.8rem;
}

.dev-login-actions .ghost-button span {
  color: #637a7d;
  font-size: 0.71rem;
  font-weight: 740;
}

.dev-login-actions .ghost-button.is-loading {
  opacity: 0.72;
}

@media (max-width: 720px) {
  .dev-login-header {
    display: grid;
    gap: 2px;
  }

  .dev-login-actions {
    grid-template-columns: 1fr;
  }
}

.status-message {
  min-height: 1.05rem;
  margin: 0;
  color: var(--teal-dark);
  font-size: 0.9rem;
  line-height: 1.45;
}

.security-note {
  gap: 9px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(16, 32, 39, 0.11);
  color: #40575b;
  font-size: 0.9rem;
}

.security-note svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: var(--teal);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.app-shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  transition: grid-template-columns 0.2s ease;
}

.side-nav {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  padding: 22px 18px;
  border-right: 1px solid rgba(16, 32, 39, 0.1);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  transition:
    padding 0.2s ease,
    align-items 0.2s ease;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 20px;
}

.side-brand .brand-logo {
  max-width: calc(100% - 52px);
}

.sidebar-toggle {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  margin-left: auto;
  place-items: center;
  border: 1px solid rgba(16, 32, 39, 0.12);
  border-radius: 8px;
  color: #40575b;
  background: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
  color: var(--ink);
  border-color: rgba(15, 118, 110, 0.28);
  background: rgba(15, 118, 110, 0.09);
  outline: 0;
}

.sidebar-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.sidebar-toggle .toggle-arrow {
  transform-origin: center;
  transition: transform 0.18s ease;
}

.nav-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.sidebar-footer {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(16, 32, 39, 0.08);
}

.sidebar-copyright {
  margin: 0;
  color: #8a9b9e;
  font-size: 0.72rem;
  line-height: 1.35;
  padding: 0 12px;
}

.nav-button,
.logout-button,
.mobile-nav button {
  display: flex;
  align-items: center;
  border-radius: 8px;
  color: #40575b;
  background: transparent;
  cursor: pointer;
  font-weight: 720;
}

.nav-button {
  min-height: 48px;
  gap: 12px;
  padding: 0 12px;
}

.nav-button:hover,
.nav-button:focus-visible,
.logout-button:hover,
.logout-button:focus-visible {
  color: var(--ink);
  background: rgba(15, 118, 110, 0.09);
  outline: 0;
}

.nav-button.is-active,
.mobile-nav button.is-active {
  color: #ffffff;
  background: #102027;
  box-shadow: 0 14px 28px rgba(16, 32, 39, 0.16);
}

.nav-button svg,
.logout-button svg,
.mobile-nav svg,
.icon-action svg,
.route-button svg,
.quick-grid svg {
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.logout-button {
  min-height: 48px;
  gap: 12px;
  padding: 0 12px;
  color: #7a3832;
}

body.is-sidebar-collapsed .app-shell {
  grid-template-columns: 86px minmax(0, 1fr);
}

body.is-sidebar-collapsed .side-nav {
  align-items: center;
  padding: 18px 12px;
}

body.is-sidebar-collapsed .side-brand {
  justify-content: center;
  padding-inline: 0;
}

body.is-sidebar-collapsed .side-brand .brand-logo,
body.is-sidebar-collapsed .side-brand .brand-mark {
  display: none;
}

body.is-sidebar-collapsed .side-brand .brand-name,
body.is-sidebar-collapsed .nav-button span,
body.is-sidebar-collapsed .logout-button span,
body.is-sidebar-collapsed .sidebar-copyright {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

body.is-sidebar-collapsed .sidebar-toggle {
  margin-left: 0;
}

body.is-sidebar-collapsed .sidebar-toggle .toggle-arrow {
  transform: rotate(180deg);
}

body.is-sidebar-collapsed .sidebar-footer {
  gap: 8px;
  width: 54px;
}

body.is-sidebar-collapsed .nav-button,
body.is-sidebar-collapsed .logout-button {
  justify-content: center;
  width: 54px;
  padding: 0;
}

.field-dashboard {
  min-width: 0;
  padding: 28px clamp(20px, 4vw, 48px) 36px;
}

.app-view {
  display: grid;
  gap: 0;
  min-width: 0;
}

.dashboard-header,
.header-actions,
.user-chip,
.route-band,
.metric-grid,
.section-heading,
.task-card,
.task-title-row,
.task-meta,
.task-actions,
.mobile-nav {
  display: flex;
  align-items: center;
}

.dashboard-header {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.dashboard-header h1 {
  margin: 0;
  font-size: 2.35rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.impersonation-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: -4px 0 22px;
  padding: 13px 14px;
  border: 1px solid #e6b55f;
  border-left: 4px solid #c8751f;
  border-radius: 8px;
  color: #54310d;
  background: #fff5df;
}

.impersonation-banner[hidden] {
  display: none;
}

.impersonation-banner-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: #9b5417;
}

.impersonation-banner-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.impersonation-banner > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.impersonation-banner strong {
  font-size: 0.94rem;
}

.impersonation-banner > div > span {
  color: #76502a;
  font-size: 0.8rem;
  line-height: 1.35;
}

.impersonation-banner .ghost-button {
  border-color: rgba(84, 49, 13, 0.22);
  color: #54310d;
  background: #ffffff;
}

@media (max-width: 720px) {
  .impersonation-banner {
    grid-template-columns: auto minmax(0, 1fr);
    margin-bottom: 16px;
  }

  .impersonation-banner .ghost-button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

.header-actions {
  gap: 12px;
}

.user-menu-wrap {
  position: relative;
}

.icon-action {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(16, 32, 39, 0.12);
  border-radius: 8px;
  color: #30474b;
  background: rgba(255, 255, 255, 0.86);
  cursor: pointer;
}

.icon-action:hover,
.icon-action:focus-visible {
  border-color: rgba(15, 118, 110, 0.32);
  color: var(--teal-dark);
  outline: 0;
}

.notification-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 9px;
  height: 9px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #de7c35;
}

.user-chip {
  min-height: 46px;
  gap: 10px;
  padding: 5px 12px 5px 5px;
  border: 1px solid rgba(16, 32, 39, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: #40575b;
  font-size: 0.92rem;
  font-weight: 720;
  cursor: pointer;
}

.user-chip:hover,
.user-chip:focus-visible {
  border-color: rgba(15, 118, 110, 0.32);
  color: var(--teal-dark);
  outline: 0;
}

.user-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: #24434b;
  font-size: 0.76rem;
}

.user-menu-chevron {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 0.18s ease;
}

.user-chip[aria-expanded="true"] .user-menu-chevron {
  transform: rotate(180deg);
}

.user-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  width: min(260px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid rgba(16, 32, 39, 0.12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(16, 32, 39, 0.18);
}

.user-menu[hidden] {
  display: none;
}

.user-menu-heading {
  display: grid;
  gap: 3px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(16, 32, 39, 0.08);
}

.user-menu-heading strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.user-menu-heading span {
  color: #637a7d;
  font-size: 0.76rem;
  font-weight: 700;
}

.user-menu-item {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  color: #30474b;
  background: #ffffff;
  cursor: pointer;
  font-weight: 760;
  text-align: left;
}

.user-menu-item[hidden] {
  display: none;
}

.user-menu-item:hover,
.user-menu-item:focus-visible {
  color: var(--teal-dark);
  background: #eef8f5;
  outline: 0;
}

.user-menu-item.danger {
  color: #7a3832;
}

.user-menu-item svg {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.pwa-install-offer {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
  padding: 16px 54px 16px 16px;
  border: 1px solid #bfdcd5;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(16, 32, 39, 0.08);
}

.pwa-install-offer[hidden] {
  display: none;
}

.pwa-install-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: #102027;
}

.pwa-install-icon svg,
.pwa-install-close svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.pwa-install-copy {
  min-width: 0;
}

.pwa-install-copy .eyebrow {
  margin-bottom: 3px;
  font-size: 0.7rem;
}

.pwa-install-copy h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.pwa-install-copy > p:last-child {
  margin: 4px 0 0;
  color: #637a7d;
  font-size: 0.84rem;
  line-height: 1.4;
}

.pwa-install-primary {
  min-width: 116px;
}

.pwa-install-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  color: #637a7d;
}

.route-band {
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  min-height: 134px;
  padding: 22px;
  border: 1px solid rgba(16, 32, 39, 0.1);
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(16, 32, 39, 0.96), rgba(13, 95, 90, 0.94)),
    linear-gradient(90deg, transparent, rgba(240, 179, 90, 0.3));
  box-shadow: 0 20px 48px rgba(16, 32, 39, 0.18);
}

.route-copy {
  min-width: 0;
}

.route-copy .eyebrow {
  color: #8fd4ca;
}

.route-copy h2,
.section-heading h2 {
  margin: 0;
  letter-spacing: 0;
}

.route-copy h2 {
  font-size: 1.75rem;
  line-height: 1.12;
}

.route-copy p:last-child {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.45;
}

.route-button {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  gap: 10px;
  padding: 0 18px;
  border-radius: 8px;
  color: #102027;
  background: #ffffff;
  cursor: pointer;
  font-weight: 820;
}

.route-button:hover,
.route-button:focus-visible {
  background: #f3faf8;
  outline: 0;
}

.route-button:disabled {
  color: #ffffff;
  background: #2e6264;
  cursor: default;
}

.evidence-export-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 22px;
  min-width: 0;
}

.metric-card {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 88px;
  padding: 14px 16px;
  border: 1px solid rgba(16, 32, 39, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 26px rgba(16, 32, 39, 0.055);
}

.metric-card strong {
  color: #152c31;
  font-size: 1.38rem;
  line-height: 1;
}

.metric-label,
.metric-note {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.25;
}

.metric-card.accent {
  border-color: rgba(222, 124, 53, 0.26);
  background: #fff9ef;
}

.app-shell[data-active-nav="evidenca"] .metric-grid {
  gap: 8px;
  margin: 10px 0 14px;
}

.app-shell[data-active-nav="evidenca"] .metric-card {
  min-height: 62px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.app-shell[data-active-nav="evidenca"] .metric-card strong {
  font-size: 1.02rem;
}

.app-shell[data-active-nav="evidenca"] .metric-label,
.app-shell[data-active-nav="evidenca"] .metric-note {
  font-size: 0.72rem;
}

.administration-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -6px 0 14px;
}

.administration-metrics .metric-card {
  display: flex;
  align-items: center;
  width: fit-content;
  min-height: 42px;
  gap: 8px;
  border-color: rgba(15, 118, 110, 0.16);
  border-radius: 999px;
  background: #eef8f4;
  padding: 5px 12px 5px 5px;
  box-shadow: none;
}

.administration-metrics .metric-card:nth-child(n + 3) {
  display: none;
}

.administration-metrics .metric-card strong {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--teal);
  font-size: 0.9rem;
  line-height: 1;
}

.administration-metrics .metric-card:nth-child(2) strong {
  background: #d77f36;
}

.administration-metrics .metric-label {
  color: #30474b;
  font-size: 0.8rem;
  font-weight: 840;
}

.administration-metrics .metric-note {
  display: none;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: start;
  min-width: 0;
}

.location-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
}

.location-field {
  padding: 16px;
  border: 1px solid rgba(16, 32, 39, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 32px rgba(16, 32, 39, 0.06);
}

.end-location-field {
  grid-column: 1 / -1;
}

.location-field-header,
.work-location-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.location-field-header {
  justify-content: space-between;
  margin-bottom: 10px;
}

.work-location-list {
  display: grid;
  gap: 10px;
}

.work-location-row .field-control {
  flex: 1 1 auto;
}

.work-location-row [data-remove-work-location] {
  flex: 0 0 auto;
}

.route-exception {
  margin-bottom: 10px;
}

.route-builder,
.vehicle-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(16, 32, 39, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 32px rgba(16, 32, 39, 0.06);
}

.route-builder-header,
.vehicle-card-header,
.route-stop-label-row,
.route-stop-actions,
.vehicle-options,
.vehicle-detail-fields,
.passenger-fields {
  display: flex;
  align-items: center;
}

.route-builder-header,
.vehicle-card-header,
.route-stop-label-row {
  justify-content: space-between;
  gap: 12px;
}

.route-builder-header h2,
.vehicle-card-header h2 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: 0;
}

.route-status-card {
  display: none;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background: #eef8f4;
}

.route-status-card span {
  color: var(--teal-dark);
  font-size: 0.76rem;
  font-weight: 820;
  text-transform: uppercase;
}

.route-status-card strong {
  color: #152c31;
  font-size: 1rem;
  line-height: 1.2;
}

.route-status-card p {
  margin: 0;
  color: #50676a;
  font-size: 0.84rem;
  line-height: 1.35;
}

.work-location-row.is-location-locked .route-stop-actions {
  opacity: 0.45;
}

.route-builder .field-control:has([data-location-input]:disabled) {
  background: #f3f8f6;
}

.route-builder [data-location-input]:disabled {
  color: #40575b;
  cursor: default;
}

.mobile-step-button {
  display: none;
}

.route-stop {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.route-stop-home::after,
.work-location-row::after {
  position: absolute;
  top: 44px;
  bottom: -18px;
  left: 20px;
  width: 2px;
  background: rgba(15, 118, 110, 0.18);
  content: "";
}

.route-stop-marker {
  position: relative;
  z-index: 1;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 50%;
  color: var(--teal-dark);
  background: #eff8f5;
  font-size: 0.82rem;
  font-weight: 820;
}

.route-stop-home .route-stop-marker,
.route-stop-return .route-stop-marker {
  color: #ffffff;
  background: #102027;
}

.route-stop-field {
  min-width: 0;
}

.route-stop-label-row {
  min-height: 34px;
  margin-bottom: 8px;
}

.route-stop-label-row label {
  margin: 0;
}

.route-stop-actions {
  flex: 0 0 auto;
  gap: 6px;
}

.icon-mini-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(16, 32, 39, 0.12);
  border-radius: 8px;
  color: #30474b;
  background: #ffffff;
  cursor: pointer;
}

.icon-mini-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.icon-mini-button:hover,
.icon-mini-button:focus-visible {
  border-color: rgba(15, 118, 110, 0.34);
  color: var(--teal-dark);
  outline: 0;
}

.icon-mini-button.danger {
  color: #7a3832;
}

.icon-mini-button:disabled {
  color: #9badb0;
  background: #edf3f2;
  cursor: default;
}

.route-return-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(16, 32, 39, 0.1);
  border-radius: 8px;
  background: #f7fbf9;
}

.route-return-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.vehicle-options {
  flex-wrap: wrap;
  gap: 10px;
}

.vehicle-option {
  display: flex;
  flex: 1 1 160px;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 10px 12px;
  border: 1px solid rgba(16, 32, 39, 0.12);
  border-radius: 8px;
  background: #ffffff;
  color: #30474b;
  font-weight: 760;
  cursor: pointer;
}

.vehicle-option input {
  width: 17px;
  height: 17px;
  accent-color: var(--teal);
}

.vehicle-option:has(input:checked) {
  border-color: rgba(15, 118, 110, 0.32);
  color: var(--teal-dark);
  background: #e8f5f1;
}

.vehicle-detail-fields,
.passenger-fields {
  align-items: start;
  gap: 12px;
}

.vehicle-detail-fields .field,
.passenger-fields .field {
  flex: 1 1 220px;
}

.day-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(16, 32, 39, 0.1);
  border-radius: 8px;
  background: #f7fbf9;
  box-shadow: 0 14px 32px rgba(16, 32, 39, 0.06);
}

.day-toolbar label {
  display: grid;
  flex: 1 1 220px;
  gap: 6px;
  color: #30474b;
  font-size: 0.82rem;
  font-weight: 720;
}

.day-toolbar select {
  min-height: 40px;
  border: 1px solid rgba(16, 32, 39, 0.13);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  padding: 0 10px;
}

.day-toolbar .internal-location-select {
  display: none;
}

.day-confirm-copy {
  display: grid;
  flex: 1 1 240px;
  gap: 3px;
  min-width: 0;
}

.day-confirm-copy strong {
  color: var(--ink);
  font-size: 0.96rem;
}

.day-confirm-copy span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.day-toolbar > .solid-button {
  flex: 0 0 auto;
  min-width: 190px;
  margin-left: auto;
}

.location-readout {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(16, 32, 39, 0.09);
  border-radius: 8px;
  color: #143f43;
  background: #eef8f4;
  font-size: 0.92rem;
  line-height: 1.25;
}

.location-readout[data-empty="true"] {
  color: var(--muted);
  background: #f6faf8;
}

.event-action-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.event-button {
  display: grid;
  min-height: 92px;
  align-content: center;
  gap: 5px;
  padding: 16px;
  border: 1px solid rgba(16, 32, 39, 0.1);
  border-radius: 8px;
  color: #30474b;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 32px rgba(16, 32, 39, 0.07);
  cursor: pointer;
  text-align: left;
}

.event-button span {
  font-size: 1rem;
  font-weight: 820;
}

.event-button small {
  color: var(--muted);
  font-size: 0.78rem;
}

.event-button:hover,
.event-button:focus-visible {
  border-color: rgba(15, 118, 110, 0.34);
  color: var(--teal-dark);
  outline: 0;
}

.event-button.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), #0b4f55 68%, #15313a);
}

.event-button.primary small {
  color: rgba(255, 255, 255, 0.76);
}

.event-button.is-loading {
  pointer-events: none;
  opacity: 0.72;
}

.event-button:disabled {
  color: #6e8386;
  background: #edf3f2;
  cursor: default;
}

.event-button.is-recorded {
  border-color: rgba(15, 118, 110, 0.24);
  background: #e8f5f1;
}

.event-button.primary.is-recorded {
  background: #2e6264;
}

.gps-status {
  min-height: 1.2rem;
  margin: 0;
  color: #40575b;
  font-size: 0.9rem;
  line-height: 1.45;
}

.sync-status {
  width: fit-content;
  margin: -4px 0 0;
  border-radius: 999px;
  color: #50676a;
  background: #edf4f2;
  padding: 5px 10px;
  font-size: 0.76rem;
  font-weight: 760;
}

.sync-status[data-state="pending"] {
  color: #7b4317;
  background: #fff0dc;
}

.sync-status[data-state="syncing"] {
  color: #0d5f5a;
  background: #dff4ef;
}

.event-list:empty::before {
  display: block;
  padding: 18px;
  border: 1px dashed rgba(16, 32, 39, 0.2);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.66);
  content: attr(data-empty-message);
}

.event-list .task-card {
  min-height: 96px;
}

.location-summary {
  display: grid;
  gap: 10px;
}

.today-tile {
  display: grid;
  min-height: 132px;
  gap: 10px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 38%),
    linear-gradient(135deg, #102027 0%, #0f766e 58%, #de7c35 100%);
  box-shadow: 0 18px 42px rgba(16, 32, 39, 0.15);
}

.today-tile-main {
  display: grid;
  gap: 7px;
}

.today-tile-label,
.today-tile-main span:last-child {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.86rem;
  font-weight: 760;
}

.today-tile strong {
  font-size: 2.65rem;
  line-height: 1;
}

.route-map-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(16, 32, 39, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 38px rgba(16, 32, 39, 0.07);
}

.route-map {
  min-height: 240px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(222, 124, 53, 0.12)),
    #eef5f2;
}

.route-map-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.guide-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(16, 32, 39, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 38px rgba(16, 32, 39, 0.07);
}

.guide-today {
  display: grid;
  min-height: 104px;
  padding: 16px;
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 42%),
    linear-gradient(135deg, #102027 0%, #0f766e 72%, #de7c35 100%);
}

.guide-today .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.guide-today h2 {
  margin: 0;
  font-size: 2.25rem;
  line-height: 1;
  letter-spacing: 0;
}

.guide-today span {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.88rem;
  font-weight: 760;
}

.guide-today .mobile-trip-status {
  display: none;
}

.guide-next,
.guide-section {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(16, 32, 39, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.guide-next {
  border-color: rgba(15, 118, 110, 0.24);
  background: #eef8f4;
}

.guide-section-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 820;
  text-transform: uppercase;
}

.guide-next strong,
.guide-section > strong {
  color: #152c31;
  font-size: 1.04rem;
  line-height: 1.25;
}

.guide-next p,
.guide-section p {
  margin: 0;
  color: #50676a;
  font-size: 0.86rem;
  line-height: 1.38;
}

.guide-next .solid-button {
  justify-self: start;
  min-height: 40px;
  padding-inline: 16px;
}

.guide-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.guide-action-row .solid-button,
.guide-action-row .ghost-button {
  min-height: 40px;
  padding-inline: 16px;
  max-width: 100%;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

.guide-action-row.has-tertiary-action {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-action-row.has-tertiary-action .solid-button,
.guide-action-row.has-tertiary-action .ghost-button {
  width: 100%;
  padding: 10px 12px;
}

.guide-action-row.has-tertiary-action:not(.has-quaternary-action) [data-guide-tertiary-action] {
  grid-column: 1 / -1;
  min-height: 46px;
  border-color: rgba(15, 118, 110, 0.24);
  color: #143f43;
  background: #ffffff;
  overflow-wrap: anywhere;
}

.guide-action-row.has-quaternary-action [data-guide-tertiary-action],
.guide-action-row.has-quaternary-action [data-guide-quaternary-action] {
  min-height: 46px;
  border-color: rgba(15, 118, 110, 0.24);
  color: #143f43;
  background: #ffffff;
  overflow-wrap: anywhere;
}

.guide-route-list {
  display: grid;
  gap: 8px;
}

.guide-route-list div {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.guide-route-list strong {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: var(--teal-dark);
  background: #e8f5f1;
  font-size: 0.78rem;
}

.guide-route-list span {
  min-width: 0;
  color: #30474b;
  font-size: 0.88rem;
  line-height: 1.3;
}

.guide-summary-grid {
  display: grid;
  gap: 8px;
}

.guide-summary-grid div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-block: 3px;
}

.guide-summary-grid span {
  color: var(--muted);
  font-size: 0.84rem;
}

.guide-summary-grid strong {
  color: #152c31;
  font-size: 0.92rem;
  text-align: right;
}

.guide-panel .route-map-card {
  box-shadow: none;
}

.guide-panel .route-map {
  min-height: 190px;
}

.admin-band {
  margin-bottom: 18px;
}

.admin-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(16, 32, 39, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 38px rgba(16, 32, 39, 0.07);
}

.security-review-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  border: 1px solid rgba(215, 127, 54, 0.22);
  border-radius: 8px;
  background: #fff8ed;
  padding: 16px;
  box-shadow: 0 16px 36px rgba(16, 32, 39, 0.06);
}

.security-review-panel[hidden] {
  display: none;
}

.security-review-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.security-review-header h3 {
  margin: 2px 0 0;
  font-size: 1rem;
  line-height: 1.2;
}

.security-review-header p {
  margin: 4px 0 0;
  color: #637a7d;
  font-size: 0.86rem;
  line-height: 1.4;
}

.security-review-list {
  display: grid;
  gap: 8px;
}

.security-review-item {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(16, 32, 39, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 10px 12px;
}

.security-review-item strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.security-review-item span {
  color: #50676a;
  font-size: 0.82rem;
  line-height: 1.38;
}

.security-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.security-review-actions .ghost-button,
.security-review-actions .solid-button {
  min-height: 36px;
  padding: 8px 12px;
}

.admin-filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-filters label {
  display: grid;
  gap: 6px;
  color: #30474b;
  font-size: 0.82rem;
  font-weight: 720;
}

.admin-filters select,
.admin-filters input {
  min-height: 40px;
  min-width: 150px;
  border: 1px solid rgba(16, 32, 39, 0.13);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  padding: 0 10px;
}

.admin-archive-filter {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  gap: 8px;
  margin: 0;
  padding: 0 10px;
}

.admin-archive-filter[hidden] {
  display: none;
}

.admin-archive-filter svg {
  width: 18px;
  height: 18px;
}

.admin-archive-filter strong {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: #66797c;
  font-size: 0.74rem;
  line-height: 1;
}

.admin-archive-filter.is-active {
  border-color: #102027;
  color: #ffffff;
  background: #102027;
}

.admin-archive-filter.is-active strong {
  color: #102027;
  background: #ffffff;
}

.table-wrap {
  max-height: min(68vh, 760px);
  overflow: auto;
  border: 1px solid rgba(16, 32, 39, 0.09);
  border-radius: 8px;
}

.admin-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: collapse;
  background: #ffffff;
}

.admin-table th,
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(16, 32, 39, 0.08);
  text-align: left;
  vertical-align: top;
  font-size: 0.88rem;
}

.admin-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #40575b;
  background: #eef5f2;
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
}

.admin-table th:first-child,
.admin-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 360px;
  min-width: 360px;
  background: #ffffff;
}

.admin-table th:nth-child(2),
.admin-table td:nth-child(2) {
  position: sticky;
  left: 360px;
  z-index: 1;
  width: 170px;
  min-width: 170px;
  background: #ffffff;
  box-shadow: 8px 0 14px rgba(16, 32, 39, 0.035);
}

.admin-table th:first-child,
.admin-table th:nth-child(2) {
  z-index: 3;
  background: #e8f2ef;
}

.admin-table tbody tr:hover td {
  background: #f7fbf9;
}

.admin-table tbody tr.is-archived td {
  background: #f4f5f5;
  color: #66787b;
}

.admin-table th button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 28px;
  border: 0;
  color: inherit;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  text-transform: inherit;
}

.admin-table th button:hover,
.admin-table th button:focus-visible {
  color: var(--teal-dark);
  outline: 0;
}

.admin-table th button.is-active {
  color: #102027;
}

.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-table .muted-cell {
  color: var(--muted);
}

.admin-table .admin-row-actions {
  text-align: right;
  white-space: nowrap;
}

.admin-employee-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-employee-cell strong {
  color: var(--ink);
  line-height: 1.25;
}

.admin-employee-route {
  display: block;
  max-width: 100%;
  color: #345256;
  font-size: 0.78rem;
  font-weight: 720;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.admin-row-action-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.admin-review-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}

.attention-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 4px 9px 4px 4px;
  border: 1px solid rgba(217, 130, 53, 0.28);
  border-radius: 999px;
  color: #7b4317;
  background: #fff7ed;
  font-size: 0.76rem;
  font-weight: 780;
  white-space: nowrap;
}

.attention-dot {
  display: grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: #d98235;
  box-shadow: 0 0 0 4px rgba(217, 130, 53, 0.14);
  font-size: 0.72rem;
  font-weight: 820;
  line-height: 1;
}

.admin-note-text {
  display: -webkit-box;
  max-width: 260px;
  overflow: hidden;
  color: #30474b;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.admin-table .empty-row td {
  color: var(--muted);
  text-align: center;
}

.evidence-card-list {
  display: none;
}

.evidence-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(16, 32, 39, 0.1);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(16, 32, 39, 0.045);
}

.evidence-card.is-archived {
  background: #f4f5f5;
}

.evidence-card-header,
.evidence-card-route,
.evidence-card-header > div {
  display: grid;
  gap: 4px;
}

.evidence-card-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.evidence-card-header strong {
  color: var(--ink);
  font-size: 1rem;
}

.evidence-card-header span:not(.status-badge),
.evidence-card-route small {
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.evidence-card-route {
  border-top: 1px solid rgba(16, 32, 39, 0.08);
  border-bottom: 1px solid rgba(16, 32, 39, 0.08);
  padding: 10px 0;
}

.evidence-card-route > span,
.evidence-card-metrics dt {
  color: #637a7d;
  font-size: 0.7rem;
  font-weight: 820;
  text-transform: uppercase;
}

.evidence-card-route strong {
  color: #30474b;
  font-size: 0.88rem;
  line-height: 1.4;
}

.evidence-card-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.evidence-card-metrics div {
  display: grid;
  gap: 3px;
}

.evidence-card-metrics dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 760;
  line-height: 1.35;
}

.evidence-card-review {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.evidence-card-actions {
  border-top: 1px solid rgba(16, 32, 39, 0.08);
  padding-top: 10px;
}

.evidence-card-actions .admin-row-action-buttons {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.evidence-archive-reason,
.evidence-card-empty {
  margin: 0;
  color: #637a7d;
  font-size: 0.82rem;
}

.administration-panel {
  align-content: start;
  overflow: hidden;
  padding: 0;
}

.administration-workspace {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 620px;
}

.administration-sidebar {
  display: grid;
  align-content: start;
  gap: 22px;
  padding: 20px 12px;
  border-right: 1px solid rgba(16, 32, 39, 0.09);
  background: #f7faf9;
}

.administration-nav-group {
  display: grid;
  gap: 4px;
}

.administration-nav-group-label {
  padding: 0 10px 5px;
  color: #6b8083;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.administration-sidebar button {
  display: grid;
  width: 100%;
  min-height: 52px;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #30474b;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.administration-sidebar button > span:first-child {
  font-size: 0.88rem;
  font-weight: 820;
  line-height: 1.2;
}

.administration-sidebar button small {
  color: #74878a;
  font-size: 0.72rem;
  font-weight: 620;
  line-height: 1.25;
}

.administration-sidebar button:hover,
.administration-sidebar button:focus-visible {
  border-color: rgba(15, 118, 110, 0.13);
  background: #eef7f4;
  outline: 0;
}

.administration-sidebar button.is-active {
  border-color: rgba(15, 118, 110, 0.2);
  color: #0b5f59;
  background: #e5f4ef;
  box-shadow: inset 3px 0 0 var(--teal);
}

.administration-sidebar button.is-active small {
  color: #4f7472;
}

.administration-nav-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.administration-content {
  min-width: 0;
  padding: 22px;
}

.administration-mobile-navigation {
  display: none;
}

.administration-section {
  display: grid;
  gap: 14px;
}

.administration-section[hidden] {
  display: none;
}

.session-overview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  min-height: 34px;
  padding: 0 4px;
  color: #52686c;
  font-size: 0.82rem;
}

.session-overview span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
}

.session-overview strong {
  color: #102027;
  font-size: 1rem;
}

.session-list {
  display: grid;
  gap: 10px;
}

.session-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(16, 32, 39, 0.1);
  border-radius: 8px;
  background: #ffffff;
}

.session-presence {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: #a8bab9;
  box-shadow: 0 0 0 4px rgba(168, 186, 185, 0.16);
}

.session-item.is-recent .session-presence {
  background: #14937f;
  box-shadow: 0 0 0 4px rgba(20, 147, 127, 0.14);
}

.session-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.session-main > p {
  margin: 0;
  overflow-wrap: anywhere;
  color: #637a7d;
  font-size: 0.82rem;
}

.session-current-badge {
  padding: 3px 7px;
  border-radius: 999px;
  color: #0f665e;
  background: #e6f5f1;
  font-size: 0.7rem;
  font-weight: 800;
}

.session-details {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 8px 18px;
  margin: 10px 0 0;
}

.session-details div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.session-details dt {
  color: #718587;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.session-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #243a3e;
  font-size: 0.8rem;
  font-weight: 700;
}

.session-actions {
  display: flex;
  align-items: center;
  min-height: 34px;
}

.session-protected-label {
  color: #718587;
  font-size: 0.76rem;
  font-weight: 750;
}

.ghost-button.danger {
  color: #8d3d35;
  border-color: rgba(141, 61, 53, 0.2);
}

.ghost-button.danger:hover,
.ghost-button.danger:focus-visible {
  color: #ffffff;
  background: #8d3d35;
}

@media (max-width: 1100px) {
  .session-details {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }
}

@media (max-width: 680px) {
  .session-item {
    grid-template-columns: 10px minmax(0, 1fr);
  }

  .session-actions {
    grid-column: 2;
  }

  .session-actions .ghost-button {
    width: 100%;
  }

  .session-details {
    grid-template-columns: 1fr;
  }
}

.admin-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  color: #ffffff;
  background: #a8463c;
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
}

.admin-tab-count[hidden] {
  display: none;
}

.error-log-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.error-log-filters {
  flex: 0 0 auto;
}

.error-log-overview {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 16px;
  color: #607679;
  font-size: 0.78rem;
}

.error-log-overview span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.error-log-overview strong {
  color: #102027;
  font-size: 0.9rem;
}

.error-log-list {
  display: grid;
  gap: 12px;
}

.error-log-item {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(16, 32, 39, 0.11);
  border-left: 4px solid #a8463c;
  border-radius: 8px;
  background: #ffffff;
}

.error-log-item.status-reviewed {
  border-left-color: #d58a37;
}

.error-log-item.status-resolved {
  border-left-color: #168b76;
}

.error-log-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
}

.error-log-heading {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.error-log-heading h4,
.error-log-heading p {
  margin: 0;
}

.error-log-heading h4 {
  color: #102027;
  font-size: 1rem;
}

.error-log-heading p {
  overflow-wrap: anywhere;
  color: #52686c;
  font-size: 0.86rem;
  line-height: 1.5;
}

.error-log-header time {
  color: #718587;
  font-size: 0.76rem;
  font-weight: 750;
  white-space: nowrap;
}

.error-log-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.error-log-status,
.error-log-source,
.error-log-repeat {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 850;
}

.error-log-status.status-new {
  color: #8d3d35;
  background: #fbe9e6;
}

.error-log-status.status-reviewed {
  color: #895117;
  background: #fff0dc;
}

.error-log-status.status-resolved {
  color: #0f665e;
  background: #e6f5f1;
}

.error-log-source,
.error-log-repeat {
  color: #52686c;
  background: #eef3f2;
}

.error-log-context {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px 18px;
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid rgba(16, 32, 39, 0.08);
  border-bottom: 1px solid rgba(16, 32, 39, 0.08);
}

.error-log-context div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.error-log-context dt {
  color: #718587;
  font-size: 0.67rem;
  font-weight: 850;
  text-transform: uppercase;
}

.error-log-context dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #243a3e;
  font-size: 0.8rem;
  font-weight: 700;
}

.error-log-technical {
  color: #52686c;
  font-size: 0.8rem;
}

.error-log-technical summary {
  width: fit-content;
  cursor: pointer;
  color: #0f665e;
  font-weight: 800;
}

.error-log-technical pre {
  max-height: 260px;
  margin: 10px 0 0;
  padding: 12px;
  overflow: auto;
  border-radius: 6px;
  color: #dce7e6;
  background: #102027;
  font: 0.73rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.error-log-review {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr)) auto;
  align-items: end;
  gap: 12px;
}

.error-log-review label {
  display: grid;
  gap: 6px;
  color: #243a3e;
  font-size: 0.75rem;
  font-weight: 800;
}

.error-log-review label small {
  color: #718587;
  font-size: 0.7rem;
  font-weight: 650;
}

.error-log-review select,
.error-log-review textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(16, 32, 39, 0.16);
  border-radius: 7px;
  color: #102027;
  background: #ffffff;
  padding: 9px 11px;
  font: inherit;
}

.error-log-review textarea {
  height: 42px;
  min-height: 42px;
  resize: none;
  line-height: 1.35;
}

.error-log-review select:focus,
.error-log-review textarea:focus {
  border-color: #168b76;
  outline: 3px solid rgba(22, 139, 118, 0.13);
}

@media (max-width: 900px) {
  .error-log-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .error-log-overview {
    justify-content: flex-start;
  }

  .error-log-context {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .error-log-review {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .error-log-review .solid-button {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

@media (max-width: 620px) {
  .error-log-header,
  .error-log-context,
  .error-log-review {
    grid-template-columns: 1fr;
  }

  .error-log-header time {
    white-space: normal;
  }

  .error-log-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .error-log-review .solid-button {
    grid-column: auto;
    width: 100%;
  }
}

.admin-section-copy {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 8px;
  background: #eef8f4;
}

.admin-section-copy-with-action {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.admin-section-copy-with-action > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.add-record-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 999px;
  color: #ffffff;
  background: var(--teal);
  padding: 8px 14px 8px 10px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(15, 118, 110, 0.16);
}

.add-record-button span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  color: var(--teal);
  background: #ffffff;
  font-size: 1.15rem;
  line-height: 1;
}

.add-record-button.is-open {
  color: var(--teal-dark);
  background: #ffffff;
  box-shadow: none;
}

.add-record-button.is-open span {
  color: #ffffff;
  background: var(--teal);
}

[data-admin-editor].is-collapsed {
  display: none;
}

@media (max-width: 680px) {
  .admin-section-copy-with-action {
    grid-template-columns: 1fr;
  }

  .add-record-button {
    width: 100%;
  }
}

.admin-section-copy h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.2;
}

.admin-section-copy p {
  margin: 0;
  color: #40575b;
  font-size: 0.88rem;
  line-height: 1.42;
}

.permission-preview {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
}

.permission-preview span {
  min-height: 30px;
  border: 1px solid rgba(16, 32, 39, 0.09);
  border-radius: 999px;
  color: #30474b;
  background: #eef5f2;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 760;
}

.administration-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  padding: 16px;
  border: 1px solid rgba(16, 32, 39, 0.09);
  border-radius: 8px;
  background: #ffffff;
}

.employee-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 16px;
  align-items: start;
}

.administration-form.employee-form,
.administration-form.vehicle-form {
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.admin-form-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.13);
  border-radius: 8px;
  background: #f1faf7;
}

.admin-form-section:last-of-type {
  border-bottom: 1px solid rgba(15, 118, 110, 0.13);
}

.admin-form-section-heading {
  display: grid;
  gap: 3px;
}

.admin-form-section-heading span {
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.admin-form-section-heading p {
  margin: 0;
  color: #637a7d;
  font-size: 0.84rem;
  line-height: 1.35;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.admin-wide-field,
.employee-role-field {
  grid-column: 1 / -1;
}

.role-choice-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.role-choice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid rgba(16, 32, 39, 0.12);
  border-radius: 8px;
  color: #30474b;
  background: #ffffff;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 800;
  text-align: center;
}

.role-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-choice:has(input:checked) {
  border-color: rgba(15, 118, 110, 0.34);
  color: var(--teal-dark);
  background: #e8f5f1;
}

.role-choice:has(input:focus-visible) {
  box-shadow: 0 0 0 5px var(--focus);
}

.password-generate-control {
  padding-right: 6px;
}

.password-generate-control input {
  padding-left: 12px;
}

.password-generate-control .ghost-button {
  flex: 0 0 auto;
  min-height: 38px;
}

.payroll-rates-editor {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.13);
  border-radius: 8px;
  background: #f6fbf9;
}

.field:has(input[name="overnightSupplement"]) {
  display: none;
}

.payroll-rate-list {
  display: grid;
  gap: 8px;
}

.payroll-rate-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(140px, 0.6fr) 42px;
  gap: 8px;
  align-items: end;
}

.payroll-rate-row label {
  display: grid;
  gap: 5px;
}

.payroll-rate-row label span {
  color: #30474b;
  font-size: 0.78rem;
  font-weight: 780;
}

.payroll-rate-row select,
.payroll-rate-row input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 0 12px;
  color: var(--ink);
  font: inherit;
}

.payroll-rate-row select[aria-invalid="true"] {
  border-color: #b8443c;
  box-shadow: 0 0 0 2px rgb(184 68 60 / 10%);
}

.payroll-rate-error {
  margin: 0;
  color: #9a332d;
  font-size: 0.76rem;
  line-height: 1.35;
}

.compact-icon {
  width: 42px;
  height: 42px;
  margin: 0;
}

.logo-upload-control {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  gap: 14px;
  align-items: center;
}

.logo-preview {
  display: grid;
  width: 132px;
  height: 72px;
  min-height: 72px;
  place-items: center;
  border-radius: 6px;
  background: #f4f8f7;
  padding: 10px;
  color: #637a7d;
  font-size: 0.82rem;
  font-weight: 720;
  text-align: center;
}

.logo-preview img {
  display: block;
  max-width: 100%;
  max-height: 48px;
  object-fit: contain;
}

.logo-upload-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.logo-upload-main strong {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.25;
}

.logo-upload-main small {
  color: #637a7d;
  font-size: 0.84rem;
  line-height: 1.35;
}

.logo-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 2px;
  min-width: 0;
}

.logo-upload-actions .ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 136px;
  min-height: 38px;
  margin: 0;
  padding: 0 12px;
  line-height: 1;
  text-align: center;
}

.logo-upload-actions input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 720px) {
  .logo-upload-control {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .payroll-rate-row {
    grid-template-columns: 1fr 1fr 42px;
  }

  .logo-preview {
    width: 100%;
  }
}

.pin-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 0 12px;
  cursor: pointer;
}

.pin-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pin-toggle-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 30px;
  border-radius: 999px;
  color: #637a7d;
  background: #edf3f2;
  font-size: 0.76rem;
  font-weight: 850;
}

.pin-toggle strong {
  color: #30474b;
  font-size: 0.88rem;
}

.pin-toggle:has(input:checked) {
  border-color: rgba(15, 118, 110, 0.28);
  background: #e8f5f1;
}

.pin-toggle:has(input:checked) .pin-toggle-mark {
  color: #ffffff;
  background: var(--teal);
}

.pin-toggle:has(input:focus-visible) {
  box-shadow: 0 0 0 5px var(--focus);
}

.employee-summary-card {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(16, 32, 39, 0.09);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(215, 127, 54, 0.1)),
    #ffffff;
  box-shadow: 0 18px 40px rgba(16, 32, 39, 0.08);
}

.employee-summary-avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #102027);
  font-size: 1.15rem;
  font-weight: 900;
}

.employee-summary-title {
  display: grid;
  gap: 4px;
}

.employee-summary-title strong {
  color: var(--ink);
  font-size: 1.12rem;
  line-height: 1.2;
}

.employee-summary-title span {
  color: #637a7d;
  font-size: 0.86rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.employee-summary-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.employee-summary-badges span {
  min-height: 30px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(232, 245, 241, 0.9);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 850;
}

.employee-summary-details {
  display: grid;
  gap: 10px;
  margin: 0;
}

.employee-summary-details div {
  display: grid;
  gap: 3px;
  padding-top: 10px;
  border-top: 1px solid rgba(16, 32, 39, 0.08);
}

.employee-summary-details dt {
  color: #637a7d;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.employee-summary-details dd {
  margin: 0;
  color: #102027;
  font-size: 0.92rem;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.administration-form .solid-button {
  min-height: 50px;
}

.administration-form-actions {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.administration-form-actions .solid-button,
.administration-form-actions .ghost-button {
  min-height: 50px;
}

.administration-wide-field {
  grid-column: 1 / -1;
}

.administration-wide-field textarea {
  width: 100%;
  min-height: 108px;
  resize: vertical;
  border: 1px solid rgba(16, 32, 39, 0.13);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  padding: 12px 14px;
  outline: 0;
}

.administration-wide-field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 5px var(--focus);
}

.status-toggle {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 12px;
  border: 1px solid rgba(16, 32, 39, 0.13);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
}

.status-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.status-toggle-track {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 26px;
  border-radius: 999px;
  background: #d85d55;
  transition:
    background 160ms ease,
    box-shadow 160ms ease;
}

.status-toggle-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 7px rgba(16, 32, 39, 0.2);
  content: "";
  transition: transform 160ms ease;
}

.status-toggle input:checked + .status-toggle-track {
  background: #0d8b72;
}

.status-toggle input:checked + .status-toggle-track::after {
  transform: translateX(22px);
}

.status-toggle input:focus-visible + .status-toggle-track {
  box-shadow: 0 0 0 5px var(--focus);
}

.status-toggle strong {
  color: #30474b;
  font-size: 0.88rem;
}

.management-list {
  display: grid;
  gap: 10px;
}

.management-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.management-filter {
  justify-self: start;
  flex-wrap: wrap;
}

.management-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #40575b;
  font-size: 0.82rem;
  font-weight: 780;
}

.management-sort select {
  min-height: 40px;
  border: 1px solid rgba(16, 32, 39, 0.13);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  padding: 0 34px 0 10px;
  font-weight: 760;
}

.management-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(16, 32, 39, 0.09);
  border-radius: 8px;
  background: #ffffff;
}

.management-item p {
  margin: 5px 0 0;
  color: #50676a;
  font-size: 0.86rem;
  line-height: 1.35;
}

.management-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.management-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.ghost-button.compact {
  min-height: 38px;
  padding: 0 12px;
  font-size: 0.78rem;
}

.status-badge.inactive {
  color: #8b2d26;
  background: #ffe0dc;
}

.role-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 820;
}

.pin-badge {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  color: #0f5f58;
  background: #dff4ee;
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1;
}

.pin-badge.admin-pin {
  color: #102027;
  background: #dfe8ea;
}

.pin-icon-button {
  flex: 0 0 auto;
  min-height: 23px;
  border: 1px solid rgba(16, 32, 39, 0.08);
  border-radius: 999px;
  color: #8aa0a2;
  background: #eef3f2;
  padding: 3px 7px;
  cursor: pointer;
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1;
}

.pin-icon-button.is-pinned {
  border-color: rgba(15, 118, 110, 0.28);
  color: #ffffff;
  background: var(--teal);
}

.pin-icon-button:hover,
.pin-icon-button:focus-visible {
  border-color: rgba(15, 118, 110, 0.28);
  color: var(--teal-dark);
  background: #dff4ee;
  outline: 0;
}

.pin-icon-button.is-pinned:hover,
.pin-icon-button.is-pinned:focus-visible {
  color: #ffffff;
  background: #0f5f58;
}

.role-badge.admin {
  color: #102027;
  background: #dfe8ea;
}

.role-badge.manager {
  color: #0d5f5a;
  background: #dff4ef;
}

.role-badge.employee {
  color: #81430e;
  background: #ffead0;
}

.status-toggle-button {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid rgba(216, 93, 85, 0.35);
  border-radius: 999px;
  color: #8b2d26;
  background: #fff1ef;
  padding: 0 12px 0 7px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 820;
}

.status-toggle-button span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #d85d55;
}

.status-toggle-button.is-active {
  border-color: rgba(13, 139, 114, 0.35);
  color: #0d5f5a;
  background: #e1f5f0;
}

.status-toggle-button.is-active span {
  background: #0d8b72;
}

.mileage-toggle-button {
  min-width: 132px;
}

.status-toggle-button:hover,
.status-toggle-button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 5px var(--focus);
}

.admin-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-info-grid article {
  display: grid;
  gap: 8px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid rgba(16, 32, 39, 0.09);
  border-radius: 8px;
  background: #ffffff;
}

.admin-info-grid span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 780;
  text-transform: uppercase;
}

.admin-info-grid strong {
  align-self: end;
  color: #152c31;
  font-size: 1rem;
}

.report-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.report-chart-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(16, 32, 39, 0.09);
  border-radius: 8px;
  background: #ffffff;
}

.report-chart-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.report-chart-heading span {
  color: #30474b;
  font-size: 0.84rem;
  font-weight: 820;
  text-transform: uppercase;
}

.report-chart-heading strong {
  color: #102027;
  font-size: 0.96rem;
}

.report-bars {
  display: grid;
  gap: 10px;
}

.report-bar-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(120px, 2fr) minmax(72px, auto);
  align-items: center;
  gap: 10px;
}

.report-bar-row span,
.report-bar-row strong {
  color: #40575b;
  font-size: 0.82rem;
}

.report-bar-row strong {
  text-align: right;
}

.report-bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef5f2;
}

.report-bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0d5f5a, #d88a3d);
}

.empty-management {
  margin: 0;
  color: var(--muted);
  padding: 12px 0;
}

.main-column,
.right-rail,
.quick-actions,
.alert-list {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.section-heading {
  justify-content: space-between;
  gap: 16px;
}

.section-heading h2 {
  font-size: 1.35rem;
  line-height: 1.15;
}

.section-heading.compact h2 {
  font-size: 1.12rem;
}

.segment-control {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(16, 32, 39, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.segment-control button {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 6px;
  color: #40575b;
  background: transparent;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 760;
}

.segment-control button.is-active,
.segment-control button:hover,
.segment-control button:focus-visible {
  color: #ffffff;
  background: #102027;
  outline: 0;
}

.task-list {
  display: grid;
  gap: 12px;
}

.task-card {
  gap: 16px;
  min-height: 118px;
  padding: 16px;
  border: 1px solid rgba(16, 32, 39, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 38px rgba(16, 32, 39, 0.07);
}

.task-card[hidden] {
  display: none;
}

.task-time {
  display: grid;
  flex: 0 0 92px;
  gap: 4px;
}

.task-time strong {
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.task-time span,
.task-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.task-content {
  min-width: 0;
  flex: 1 1 auto;
}

.task-title-row {
  justify-content: space-between;
  gap: 10px;
}

.task-title-row h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.task-content p {
  margin: 7px 0 8px;
  color: #41585c;
  line-height: 1.4;
}

.task-overnight-details {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 10px;
  margin: 8px 0;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 8px;
  background: #f3faf7;
  padding: 10px 12px;
}

.task-overnight-details span {
  color: #587074;
  font-size: 0.78rem;
  font-weight: 760;
}

.task-overnight-details strong {
  min-width: 0;
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.task-meta {
  flex-wrap: wrap;
  gap: 8px 14px;
}

.status-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: #24434b;
  background: #e6efee;
  font-size: 0.72rem;
  font-weight: 820;
}

.status-badge.priority {
  color: #81430e;
  background: #ffead0;
}

.status-badge.done {
  color: #0d5f5a;
  background: #dff4ef;
}

.status-badge.archived {
  color: #5d6c6f;
  background: #e7ebeb;
}

.review-flags {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
  color: #6e4b16;
  font-size: 0.78rem;
  line-height: 1.35;
}

.review-flags .status-badge {
  width: fit-content;
}

.change-log-summary {
  display: grid;
  gap: 5px;
  margin-bottom: 8px;
  color: #40545a;
  font-size: 0.78rem;
  line-height: 1.35;
}

.change-log-summary .status-badge {
  width: fit-content;
}

.status-badge.audit {
  color: #23454f;
  background: #e3edf4;
}

.task-actions {
  flex: 0 0 auto;
  gap: 8px;
}

.ghost-button,
.solid-button {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 780;
}

.ghost-button {
  border: 1px solid rgba(16, 32, 39, 0.13);
  color: #30474b;
  background: #ffffff;
}

.ghost-button.danger {
  color: #8b332c;
}

.solid-button {
  color: #ffffff;
  background: var(--teal);
}

.ghost-button:hover,
.ghost-button:focus-visible,
.solid-button:hover,
.solid-button:focus-visible {
  filter: saturate(1.06);
  outline: 0;
}

.ghost-button:disabled,
.solid-button:disabled {
  color: #587174;
  background: #dfe8e7;
  cursor: default;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-grid button {
  display: grid;
  min-height: 94px;
  gap: 10px;
  justify-items: start;
  padding: 16px;
  border: 1px solid rgba(16, 32, 39, 0.1);
  border-radius: 8px;
  color: #30474b;
  background: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  font-weight: 760;
  text-align: left;
}

.quick-grid button:hover,
.quick-grid button:focus-visible {
  border-color: rgba(15, 118, 110, 0.32);
  color: var(--teal-dark);
  outline: 0;
}

.alert-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(16, 32, 39, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.alert-card.warning {
  border-color: rgba(222, 124, 53, 0.32);
  background: #fff7eb;
}

.alert-card p {
  margin: 0;
  color: #50676a;
  font-size: 0.9rem;
  line-height: 1.45;
}

.mobile-nav {
  display: none;
}

@media (min-width: 1121px) {
  .side-nav [data-compact-nav-only] {
    display: none;
  }
}

@media (min-width: 900px) {
  .auth-page {
    justify-items: start;
    padding-left: 7%;
  }
}

@media (max-width: 720px) {
  body.is-auth::before {
    background:
      linear-gradient(180deg, rgba(10, 26, 34, 0.8) 0%, rgba(10, 26, 34, 0.72) 44%, rgba(10, 26, 34, 0.88) 100%),
      url("assets/login-background.png") 68% center / cover no-repeat;
  }

  body.is-auth::after {
    background: linear-gradient(180deg, rgba(240, 179, 90, 0.12), transparent 30%);
  }

  .auth-page {
    align-items: end;
    padding: 18px;
  }

  .auth-panel {
    padding: 24px;
  }

  .brand-row {
    margin-bottom: 26px;
  }

  h1 {
    font-size: 2.1rem;
  }
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .side-nav {
    align-items: center;
    padding: 18px 12px;
  }

  .side-brand {
    flex-direction: column;
    gap: 8px;
    padding-inline: 0;
  }

  .sidebar-toggle {
    margin-left: 0;
  }

  .side-brand .brand-name,
  .nav-button span,
  .logout-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .nav-button,
  .logout-button {
    justify-content: center;
    width: 54px;
    padding: 0;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .right-rail {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .guide-panel {
    grid-column: 1 / -1;
  }

  .app-shell[data-active-nav="pregled"] .main-column {
    display: none;
  }

  .app-shell[data-active-nav="pregled"] .dashboard-grid,
  .app-shell[data-active-nav="lokacije"] .dashboard-grid,
  .app-shell[data-active-nav="vozilo"] .dashboard-grid,
  .app-shell[data-active-nav="dogodki"] .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .app-shell[data-active-nav="pregled"] .route-band,
  .app-shell[data-active-nav="pregled"] .metric-grid,
  .app-shell[data-active-nav="pregled"] .guide-panel .route-map-card {
    display: none;
  }

  .app-shell[data-active-nav="pregled"] .right-rail {
    display: grid;
    grid-template-columns: 1fr;
  }

  .app-shell[data-active-nav="lokacije"] .route-band,
  .app-shell[data-active-nav="lokacije"] .metric-grid,
  .app-shell[data-active-nav="lokacije"] .right-rail,
  .app-shell[data-active-nav="lokacije"] .section-heading,
  .app-shell[data-active-nav="lokacije"] .vehicle-card,
  .app-shell[data-active-nav="lokacije"] .event-action-grid,
  .app-shell[data-active-nav="lokacije"] .day-toolbar,
  .app-shell[data-active-nav="lokacije"] .gps-status,
  .app-shell[data-active-nav="lokacije"] .event-list {
    display: none;
  }

  .app-shell[data-active-nav="vozilo"] .route-band,
  .app-shell[data-active-nav="vozilo"] .metric-grid,
  .app-shell[data-active-nav="vozilo"] .right-rail,
  .app-shell[data-active-nav="vozilo"] .section-heading,
  .app-shell[data-active-nav="vozilo"] .route-builder,
  .app-shell[data-active-nav="vozilo"] .event-action-grid,
  .app-shell[data-active-nav="vozilo"] .day-toolbar,
  .app-shell[data-active-nav="vozilo"] .gps-status,
  .app-shell[data-active-nav="vozilo"] .event-list {
    display: none;
  }

  .app-shell[data-active-nav="dogodki"] .route-band,
  .app-shell[data-active-nav="dogodki"] .metric-grid,
  .app-shell[data-active-nav="dogodki"] .right-rail,
  .app-shell[data-active-nav="dogodki"] .route-builder,
  .app-shell[data-active-nav="dogodki"] .vehicle-card {
    display: none;
  }

  .app-shell[data-active-nav="lokacije"] .main-column,
  .app-shell[data-active-nav="vozilo"] .main-column,
  .app-shell[data-active-nav="dogodki"] .main-column {
    display: grid;
  }

  .mobile-step-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
  }

  .vehicle-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .vehicle-option {
    flex: none;
    justify-content: center;
    text-align: center;
  }

  .administration-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .employee-editor {
    grid-template-columns: 1fr;
  }

  .employee-summary-card {
    position: static;
  }

  .admin-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell[data-active-nav="evidenca"] .table-wrap {
    display: none;
  }

  .app-shell[data-active-nav="evidenca"] .evidence-card-list {
    display: grid;
    gap: 10px;
  }
}

@media (max-width: 860px) {
  .app-shell {
    display: block;
    padding-bottom: 82px;
    max-width: 100vw;
    overflow-x: clip;
  }

  .side-nav {
    display: none;
  }

  .field-dashboard {
    padding: 18px 14px 22px;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .dashboard-grid,
  .main-column,
  .route-builder,
  .vehicle-card,
  .route-stop,
  .route-stop-field,
  .route-return-panel,
  .field-control {
    max-width: 100%;
    min-width: 0;
  }

  .field-control input,
  .field-control select,
  .field-control textarea,
  .route-builder input,
  .route-builder select,
  .vehicle-card input,
  .vehicle-card select {
    font-size: 16px;
  }

  .dashboard-header {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
  }

  .dashboard-header .eyebrow {
    margin-bottom: 4px;
    font-size: 0.7rem;
  }

  .dashboard-header h1 {
    font-size: 1.25rem;
    line-height: 1.12;
  }

  .user-chip {
    width: 46px;
    justify-content: center;
    padding: 5px;
  }

  .user-chip > span:not(.user-avatar),
  .user-menu-chevron {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .pwa-install-offer {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 14px 46px 14px 14px;
  }

  .pwa-install-primary {
    grid-column: 1 / -1;
    width: 100%;
  }

  .route-band {
    align-items: stretch;
    flex-direction: column;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .location-grid {
    grid-template-columns: 1fr;
  }

  .work-location-row {
    align-items: start;
  }

  .route-builder-header,
  .route-stop-label-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .route-builder-header {
    display: contents;
  }

  .route-builder-header > div {
    order: 0;
  }

  .route-status-card {
    display: grid;
    order: 1;
  }

  .route-stop-home {
    order: 2;
  }

  .work-location-list {
    order: 3;
  }

  .route-builder-header [data-add-work-location] {
    order: 4;
    width: 100%;
    justify-content: center;
  }

  .route-stop-return {
    order: 5;
  }

  .route-builder [data-mobile-next="vozilo"] {
    order: 6;
  }

  .route-stop {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
  }

  .route-stop-marker {
    width: 36px;
    height: 36px;
  }

  .route-stop-home::after,
  .work-location-row::after {
    top: 38px;
    left: 17px;
  }

  .route-stop-actions {
    display: grid;
    width: auto;
    max-width: 100%;
    grid-template-columns: repeat(3, 40px);
    gap: 8px;
  }

  .icon-mini-button {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
  }

  .vehicle-detail-fields,
  .passenger-fields {
    flex-direction: column;
  }

  .vehicle-card {
    gap: 12px;
    padding: 14px;
  }

  .vehicle-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .vehicle-option {
    flex: none;
    justify-content: flex-start;
    min-height: 44px;
    padding: 8px 12px;
    text-align: left;
    font-size: 0.88rem;
    line-height: 1.2;
  }

  .vehicle-option input {
    width: 14px;
    height: 14px;
  }

  .vehicle-card .field-control {
    min-height: 46px;
    height: 46px;
  }

  .vehicle-card .field-control input {
    height: 44px;
  }

  .vehicle-card .field-control > svg {
    margin-left: 14px;
  }

  .vehicle-detail-fields,
  .passenger-fields {
    gap: 10px;
  }

  .vehicle-detail-fields .field,
  .passenger-fields .field {
    flex: none;
    width: 100%;
  }

  .event-action-grid {
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-button {
    min-width: 0;
    width: 100%;
    overflow: hidden;
  }

  .event-button span,
  .event-button small {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .day-toolbar {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
  }

  .day-toolbar > .solid-button {
    margin-left: 0;
  }

  .day-toolbar label {
    flex: 1 1 220px;
    min-width: 0;
    width: auto;
  }

  .day-toolbar .solid-button {
    flex: 0 0 auto;
    min-width: 150px;
    width: auto;
  }

  .right-rail {
    grid-template-columns: 1fr;
  }

  .administration-mobile-navigation {
    display: grid;
    gap: 7px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(16, 32, 39, 0.09);
    background: #f7faf9;
  }

  .administration-mobile-navigation > label {
    color: #52686c;
    font-size: 0.72rem;
    font-weight: 820;
  }

  .administration-mobile-select-row {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .administration-mobile-select-row select {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    border: 1px solid rgba(16, 32, 39, 0.14);
    border-radius: 6px;
    color: #102027;
    background: #ffffff;
    padding: 0 38px 0 12px;
    font-size: 0.9rem;
    font-weight: 740;
  }

  .administration-workspace {
    display: block;
    min-height: 0;
  }

  .administration-sidebar {
    display: none;
  }

  .administration-content {
    padding: 16px;
  }

  .admin-mobile-error-count {
    flex: 0 0 auto;
    margin-left: 0;
  }

  .administration-form,
  .admin-info-grid,
  .report-chart-grid {
    grid-template-columns: 1fr;
  }

  .admin-form-grid,
  .role-choice-group {
    grid-template-columns: 1fr;
  }

  .report-bar-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .report-bar-row strong {
    text-align: left;
  }

  .management-item {
    align-items: stretch;
    flex-direction: column;
  }

  .management-actions {
    justify-content: stretch;
  }

  .management-actions > button {
    flex: 1 1 0;
  }

  .task-card {
    align-items: stretch;
    flex-direction: column;
  }

  .task-time {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: space-between;
  }

  .task-actions {
    width: 100%;
  }

  .task-actions button {
    flex: 1 1 0;
  }

  .mobile-nav {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 20;
    display: flex;
    justify-content: space-around;
    gap: 4px;
    padding: 6px;
    border: 1px solid rgba(16, 32, 39, 0.12);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 46px rgba(16, 32, 39, 0.18);
    backdrop-filter: blur(16px);
  }

  .mobile-nav button {
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    min-height: 56px;
    gap: 3px;
    padding: 0 3px;
    font-size: 0.68rem;
    overflow: hidden;
  }

  .mobile-nav span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-nav svg {
    width: 20px;
    height: 20px;
  }

  .mobile-nav [data-nav="lokacije"] {
    order: -1;
  }

  .mobile-nav [data-nav="vozilo"] {
    order: 0;
  }

  .mobile-nav [data-nav="dogodki"] {
    order: 1;
  }

  .mobile-nav [data-nav="pregled"] {
    order: 2;
  }

  .mobile-nav [data-nav="evidenca"] {
    order: 3;
  }

  .mobile-nav [data-nav="administracija"] {
    order: 4;
  }
}

@media (max-width: 560px) {
  .dashboard-header {
    gap: 12px;
  }

  .header-actions {
    flex: 0 0 auto;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .segment-control {
    width: 100%;
  }

  .segment-control button {
    flex: 1 1 0;
  }

  .quick-grid {
    grid-template-columns: 1fr;
  }

  .event-action-grid {
    grid-template-columns: 1fr;
  }

  .event-button.primary {
    grid-column: auto;
  }

  .day-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
    padding: 16px;
    border: 1px solid rgba(16, 32, 39, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 14px 32px rgba(16, 32, 39, 0.06);
  }

  .day-toolbar label,
  .day-toolbar .solid-button,
  .day-confirm-copy {
    min-width: 0;
    width: 100%;
  }

  .admin-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-filters select,
  .admin-filters input,
  .admin-filters .ghost-button {
    width: 100%;
  }

  .app-shell[data-active-nav="evidenca"] [data-export-csv],
  .app-shell[data-active-nav="evidenca"] [data-export-payroll] {
    display: none;
  }

  .app-shell[data-active-nav="evidenca"] .admin-band {
    min-height: 0;
    margin-bottom: 12px;
    padding: 14px;
    box-shadow: 0 12px 28px rgba(16, 32, 39, 0.14);
  }

  .app-shell[data-active-nav="evidenca"] .admin-band .route-copy .eyebrow {
    margin-bottom: 4px;
    font-size: 0.68rem;
  }

  .app-shell[data-active-nav="evidenca"] .admin-band .route-copy h2 {
    font-size: 1.16rem;
    line-height: 1.16;
  }

  .app-shell[data-active-nav="evidenca"] .admin-band .route-copy p:last-child,
  .app-shell[data-active-nav="evidenca"] .metric-grid {
    display: none;
  }

  .guide-today .mobile-trip-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    margin-top: 10px;
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    font-size: 0.72rem;
    font-weight: 820;
    line-height: 1.2;
  }

  .guide-today .mobile-trip-status[data-status="active"] {
    background: rgba(240, 179, 90, 0.24);
  }

  .guide-today .mobile-trip-status[data-status="closed"] {
    background: rgba(255, 255, 255, 0.2);
  }

  .guide-today {
    min-height: 0;
    padding: 14px;
  }

  .guide-today h2,
  .guide-today [data-current-day] {
    display: none;
  }

  .route-button,
  .ghost-button,
  .solid-button {
    width: 100%;
  }

}

@media (max-width: 680px) {
  .overnight-modal-backdrop {
    align-items: end;
    place-items: end stretch;
    padding: 0;
  }

  .overnight-modal {
    width: 100%;
    max-height: 92vh;
    overflow: hidden;
    border-radius: 18px 18px 0 0;
  }

  .overnight-modal form {
    max-height: 92vh;
    overflow: auto;
    padding: 18px;
  }

  .overnight-reuse {
    grid-template-columns: 1fr;
  }

  .overnight-reuse .ghost-button {
    width: 100%;
  }

  .overnight-meal-grid {
    grid-template-columns: 1fr;
  }

  .overnight-meal-option {
    min-height: 42px;
  }

  .overnight-modal .note-modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .task-overnight-details {
    grid-template-columns: 1fr;
    gap: 3px 0;
  }
}

@media (max-width: 430px) {
  .auth-page {
    padding: 12px;
  }

  .auth-panel {
    padding: 20px;
  }

  .form-options {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .text-link,
  .switch {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
