@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/manrope-cyrillic-400-600.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/manrope-latin-400-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

:root {
  --brand: rgb(21, 108, 55);
  --brand-dark: rgb(13, 76, 38);
  --brand-soft: rgb(226, 242, 233);
  --ink: #1d2621;
  --muted: #69716d;
  --line: #dfe4e1;
  --bg: #f4f5f6;
  --panel: #ffffff;
  --red: #c73535;
  --orange: #c66b18;
  --blue: #2771ba;
  --gray: #7b8580;
  --shadow: none;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-round: 999px;
  --control-radius: var(--radius-md);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Manrope, system-ui, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
}

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

button {
  border: 0;
  cursor: pointer;
  font-weight: 500;
}

strong,
b {
  font-weight: 600;
}

button strong,
button b,
table strong,
table b {
  font-weight: 500;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 440px) 1fr;
  font-family: Manrope, system-ui, sans-serif;
  background:
    radial-gradient(circle at 18% 18%, rgba(21, 108, 55, 0.08), transparent 34%),
    linear-gradient(90deg, #faf9f5 0%, #faf9f5 42%, #ddebe3 42%, #ddebe3 100%);
}

.login-panel {
  padding: 64px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(250, 249, 245, 0.72);
}

.login-panel form,
.login-panel h1 {
  width: 100%;
  max-width: 356px;
}

.login-art {
  min-height: 100vh;
  background:
    linear-gradient(rgba(21, 108, 55, 0.06), rgba(21, 108, 55, 0.06)),
    url("/assets/login-transport.svg?v=4") center/cover no-repeat;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 600;
  margin-bottom: 22px;
}

.login-brand {
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  display: inline-flex;
  align-self: flex-start;
  padding: 9px 13px 10px;
  border-radius: var(--radius-md);
  font-size: 30px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0;
  box-shadow: 0 16px 32px rgba(13, 76, 38, 0.16);
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
  font-weight: 600;
}

.page-title {
  margin: 0;
  font-family: inherit;
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
  min-width: 0;
  overflow-wrap: anywhere;
}

.login-panel h1 {
  color: #121a15;
  font-size: clamp(32px, 3.1vw, 42px);
  font-weight: 600;
  line-height: 1.02;
  margin-bottom: 28px;
}

.subtitle {
  color: var(--muted);
  margin: 0 0 28px;
  line-height: 1.45;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field span,
.filter-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.login-panel .field span {
  color: #536059;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 11px;
  background: white;
  color: var(--ink);
  font-weight: 400;
}

.login-panel input {
  height: 48px;
  border-color: #d9e1dc;
  border-radius: var(--radius-md);
  padding: 0 15px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 1px 1px rgba(18, 36, 25, 0.03),
    0 10px 24px rgba(18, 36, 25, 0.055);
  font-weight: 500;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.login-panel input:focus {
  outline: none;
  border-color: rgba(21, 108, 55, 0.58);
  background: #fff;
  box-shadow:
    0 0 0 4px rgba(21, 108, 55, 0.1),
    0 12px 28px rgba(18, 36, 25, 0.07);
}

.login-panel .btn {
  min-height: 44px;
  margin-top: 4px;
  border-radius: var(--radius-md);
  padding: 0 20px;
  background: #156c37;
  box-shadow: 0 16px 30px rgba(13, 76, 38, 0.18);
  font-weight: 500;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.login-panel .btn:hover {
  background: #0f5d2e;
  box-shadow: 0 18px 34px rgba(13, 76, 38, 0.22);
}

.login-panel .btn:active {
  transform: scale(0.98);
}

.login-about-link {
  align-self: flex-start;
  margin-top: 18px;
  padding: 4px 0;
  color: var(--brand-dark);
  background: transparent;
  border-bottom: 1px solid transparent;
  font-size: 14px;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.login-about-link:hover,
.login-about-link:focus-visible {
  color: var(--brand);
  border-color: currentColor;
  outline: none;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: var(--radius-md);
  padding: 9px 14px;
  font-weight: 500;
  background: var(--brand);
  color: #fff;
}

.btn:hover {
  background: var(--brand-dark);
}

.btn.secondary {
  background: #f0f2f3;
  color: var(--brand-dark);
}

.btn.danger {
  background: #fbe9e9;
  color: var(--red);
}

.btn.small {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 13px;
}

.app-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1000;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 18px;
  border: 1px solid rgba(21, 108, 55, 0.18);
  border-radius: var(--radius-lg);
  background: #e8f5ed;
  color: var(--brand-dark);
  box-shadow: 0 18px 46px rgba(18, 36, 25, 0.18);
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.app-toast.is-error {
  border-color: rgba(199, 53, 53, 0.18);
  background: #fde8e8;
  color: var(--red);
}

.demo-users {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.demo-chip {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  color: var(--muted);
  font-size: 13px;
}

.app-shell {
  --sidebar-motion-duration: 200ms;
  --sidebar-motion-easing: ease-in-out;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
  transition: grid-template-columns var(--sidebar-motion-duration) var(--sidebar-motion-easing);
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 76px 1fr;
}

.sidebar {
  background: #ffffff;
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: padding var(--sidebar-motion-duration) var(--sidebar-motion-easing);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 16px;
  height: 50px;
  flex: 0 0 50px;
}

.sidebar-header .brand-mark {
  margin: 0;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
}

.sidebar-header strong {
  line-height: 1.15;
  transition: opacity 0.15s ease;
}

.sidebar-toggle {
  margin-left: 0;
  width: 100%;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef4f0;
  color: var(--brand-dark);
  font-size: 24px;
  line-height: 1;
  font-weight: 600;
  flex: 1 1 auto;
  overflow: hidden;
  transition: padding var(--sidebar-motion-duration) var(--sidebar-motion-easing),
    gap var(--sidebar-motion-duration) var(--sidebar-motion-easing);
}

.sidebar-toggle-label {
  display: none;
}

.sidebar-toggle-arrow {
  display: grid;
  place-items: center;
  line-height: 1;
}

.sidebar-toggle .sidebar-icon-alternate,
.sidebar-collapsed .sidebar-toggle .sidebar-icon-primary {
  display: none;
}

.sidebar-collapsed .sidebar-toggle .sidebar-icon-alternate {
  display: inline;
}

.nav {
  display: grid;
  grid-auto-rows: 46px;
  align-content: start;
  gap: 4px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav button {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  min-height: 46px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  transition: background 0.18s ease, color 0.18s ease,
    padding var(--sidebar-motion-duration) var(--sidebar-motion-easing),
    gap var(--sidebar-motion-duration) var(--sidebar-motion-easing);
}

.nav button span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  color: inherit;
}

.sidebar .sidebar-icon {
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.nav button b {
  font: inherit;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.nav button b,
.sidebar-toggle-label,
.sidebar .user-name,
.sidebar .user-role,
.sidebar .user-box .btn span {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition: opacity var(--sidebar-motion-duration) var(--sidebar-motion-easing),
    transform var(--sidebar-motion-duration) var(--sidebar-motion-easing),
    max-width var(--sidebar-motion-duration) var(--sidebar-motion-easing),
    visibility 0s;
}

.nav button.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: var(--radius-sm);
  background: var(--brand);
}

.sidebar button:focus-visible {
  outline-offset: -2px;
}

.nav button.active {
  font-weight: 500;
}

.nav button.active,
.nav button:hover {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.user-box {
  display: flex;
  flex-direction: column;
  flex: 0 0 98px;
  min-height: 98px;
  margin-top: 12px;
  padding: 10px;
  gap: 8px;
  border-top: 1px solid var(--line);
  transition: padding var(--sidebar-motion-duration) var(--sidebar-motion-easing),
    background-color var(--sidebar-motion-duration) var(--sidebar-motion-easing);
}

.user-identity {
  position: relative;
  height: 32px;
  flex: 0 0 32px;
  min-width: 0;
}

.sidebar .user-name,
.sidebar .user-role {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 16px;
  margin: 0;
}

.sidebar .user-box .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  min-height: 36px;
  flex: 0 0 36px;
  padding: 6px;
  margin: 0;
  width: 100%;
  overflow: hidden;
  transition: gap var(--sidebar-motion-duration) var(--sidebar-motion-easing);
}

.sidebar .user-box .btn span {
  max-width: 70px;
  overflow: hidden;
  white-space: nowrap;
}

.sidebar-collapsed .sidebar {
  padding: 22px 12px;
}

.sidebar-collapsed .sidebar-header {
  justify-content: center;
}

.sidebar-collapsed .nav button b,
.sidebar-collapsed .sidebar-toggle-label,
.sidebar-collapsed .user-name,
.sidebar-collapsed .user-role,
.sidebar-collapsed .user-box .btn span {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-6px);
  transition-delay: 0s, 0s, 0s, var(--sidebar-motion-duration);
}

.sidebar-collapsed .sidebar-toggle {
  margin: 0;
  padding: 0;
}

.sidebar-collapsed .nav button {
  padding: 10px 11px;
  gap: 0;
}

.sidebar-collapsed .user-box .btn {
  gap: 0;
}

.sidebar-collapsed .user-box .btn span {
  max-width: 0;
}

.sidebar-collapsed .user-box {
  padding: 10px 0;
}

.user-identity::before {
  content: attr(data-initials);
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 600;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--sidebar-motion-duration) var(--sidebar-motion-easing),
    visibility 0s var(--sidebar-motion-duration);
}

.sidebar-collapsed .user-identity::before {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.admin-shell {
  grid-template-columns: 238px minmax(0, 1fr);
  background: var(--bg);
}

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

.admin-shell .sidebar,
.manager-shell .sidebar {
  margin: 16px 0 16px 16px;
  height: calc(100vh - 32px);
  padding: 18px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.admin-shell .sidebar-header,
.manager-shell .sidebar-header {
  justify-content: stretch;
}

.admin-shell .sidebar-header .brand-mark {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  border-radius: var(--radius-md);
}

.admin-shell .sidebar-header strong {
  font-size: 18px;
  line-height: 1.18;
}

.admin-shell .sidebar-toggle,
.manager-shell .sidebar-toggle {
  width: 100%;
  height: 46px;
  flex: 1 1 auto;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 24px;
}

.admin-shell .sidebar-toggle-label,
.manager-shell .sidebar-toggle-label {
  display: inline-flex;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.15;
  white-space: nowrap;
}

.admin-shell .sidebar-toggle-arrow,
.manager-shell .sidebar-toggle-arrow {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.admin-shell .nav button,
.manager-shell .nav button {
  min-height: 46px;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: var(--muted);
}

.admin-shell .nav button.active,
.admin-shell .nav button:hover,
.manager-shell .nav button.active,
.manager-shell .nav button:hover {
  background: #e8f5ed;
  color: var(--brand);
}

.admin-shell .user-box,
.manager-shell .user-box {
  border-top: 0;
  border-radius: var(--radius-md);
  background: var(--bg);
}

.admin-shell.sidebar-collapsed .sidebar,
.manager-shell.sidebar-collapsed .sidebar {
  padding: 18px 12px;
}

.admin-shell.sidebar-collapsed .sidebar-header,
.manager-shell.sidebar-collapsed .sidebar-header {
  justify-content: center;
}

.admin-shell.sidebar-collapsed .sidebar-toggle,
.manager-shell.sidebar-collapsed .sidebar-toggle {
  padding: 10px 11px;
  gap: 0;
  border-radius: var(--radius-md);
}

.admin-shell.sidebar-collapsed .nav button,
.manager-shell.sidebar-collapsed .nav button {
  padding: 10px 11px;
}

.admin-shell.sidebar-collapsed .user-box,
.manager-shell.sidebar-collapsed .user-box {
  background: transparent;
}

.sidebar-tooltip,
.user-action-tooltip {
  position: fixed;
  z-index: 80;
  max-width: calc(100vw - 16px);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: #243b2f;
  color: #fff;
  box-shadow: 0 4px 12px rgba(18, 36, 25, 0.16);
  font-size: 13px;
  line-height: 18px;
  pointer-events: none;
}

.sidebar-tooltip[hidden],
.user-action-tooltip[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .app-shell {
    --sidebar-motion-duration: 0s;
  }
}

.user-name {
  font-weight: 600;
  font-size: 14px;
}

.user-role {
  color: var(--muted);
  font-size: 12px;
  margin: 3px 0 10px;
}

.main {
  padding: 24px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.topbar p {
  color: var(--muted);
  margin: 6px 0 0;
}

.admin-shell .main {
  padding: 16px 32px 48px;
}

.admin-shell .topbar,
.requests-page .topbar,
.points-page .topbar,
.trips-workspace .topbar {
  align-items: center;
  gap: 20px;
  min-height: 84px;
  padding: 18px 22px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.admin-shell .topbar > div:first-child {
  display: flex;
  min-height: 48px;
  align-items: center;
}

.admin-shell .topbar p {
  margin-top: 7px;
  font-size: 15px;
}

.admin-shell .topbar .actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

.admin-shell .btn,
.requests-page .btn {
  min-height: 42px;
  border-radius: var(--radius-md);
  padding: 10px 16px;
  box-shadow: 0 12px 24px rgba(22, 101, 52, 0.14);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.admin-shell .btn:hover,
.requests-page .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(22, 101, 52, 0.18);
}

.admin-shell .btn.secondary,
.requests-page .btn.secondary {
  box-shadow: none;
}

.admin-shell .btn.small,
.requests-page .btn.small {
  min-height: 34px;
  border-radius: var(--radius-md);
  padding: 7px 11px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
}

.stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.admin-shell .stat {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.admin-shell .stat span {
  color: #5f6f66;
  font-weight: 500;
}

.admin-shell .stat strong {
  color: var(--ink);
  font-weight: 600;
}

.dashboard-stats {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
}

.dashboard-stats .stat {
  min-height: 72px;
  padding: 10px 12px;
}

.dashboard-stats .stat span {
  font-size: 12px;
}

.dashboard-stats .stat strong {
  margin-top: 6px;
  font-size: 24px;
}

.request-detail-stats {
  gap: 8px;
  margin-bottom: 12px;
}

.request-detail-stats .stat {
  min-height: 62px;
  padding: 9px 12px;
}

.request-detail-stats .stat > span:first-child {
  font-size: 12px;
}

.request-detail-stats .stat > strong,
.request-detail-stats .stat > .badge {
  margin-top: 5px;
  font-size: 18px;
  line-height: 1.2;
}

.request-detail-stats .stat > .badge {
  width: 100%;
  max-width: 100%;
  min-height: 28px;
  padding: 4px 9px;
  text-align: center;
}

.request-detail-stats .request-detail-priority .priority-Высокая {
  color: var(--red);
  background: #fde8e8;
}

.section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 18px;
}

.admin-shell .section {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.section-head {
  padding: 15px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.admin-shell .section-head {
  padding: 17px 20px;
  border-bottom-color: var(--line);
  background: var(--panel);
}

.section-head h2 {
  font-size: 18px;
}

.requests-section .section-head h2 {
  font-size: 22px;
  line-height: 1.15;
  font-weight: 600;
}

.requests-section {
  border-radius: var(--radius-lg);
  overflow: visible;
}

.requests-section > .requests-filter-panel:first-child,
.requests-section > .requests-filter-panel[hidden] + .manager-current .manager-subhead,
.requests-section > .manager-current:first-child .manager-subhead {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.requests-search-toggle {
  gap: 10px;
}

.requests-search-toggle strong {
  min-width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-round);
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 600;
}

.requests-filter-panel {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.requests-filter-panel[hidden] {
  display: none;
}

.requests-filters {
  grid-template-columns: minmax(220px, 1.6fr) repeat(5, minmax(130px, 1fr));
  align-items: end;
  border-bottom: 0;
}

.requests-filters.has-reset {
  grid-template-columns: minmax(220px, 1.6fr) repeat(5, minmax(126px, 1fr)) auto;
}

.requests-filters .filter-field,
.requests-filters .request-search-field {
  align-content: stretch;
}

.requests-filters input,
.requests-filters .filter-dropdown-trigger,
.requests-filters .date-filter-trigger {
  min-height: 48px;
}

.requests-filters input::placeholder,
.filter-dropdown-trigger.is-placeholder,
.date-filter-trigger.is-placeholder {
  color: #6b756f;
}

.requests-reset-filters {
  min-height: 48px;
  white-space: nowrap;
}

.requests-filters .request-attachments-filter {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  min-height: 30px;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}

.request-attachments-filter input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 0;
  accent-color: var(--brand);
}

.request-attachments-filter span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.request-attachments-filter .ui-icon {
  width: 16px;
  height: 16px;
}

.admin-shell .points-section {
  height: calc(100vh - 32px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.admin-shell .points-section .table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.admin-shell .filters,
.requests-page .filters {
  gap: 12px;
  padding: 16px 20px;
  border-bottom-color: rgba(221, 229, 223, 0.72);
  background: #fbfdfc;
}

.admin-shell .filters input,
.admin-shell .filters select,
.admin-shell .filters .date-filter-trigger,
.requests-page .filters input,
.requests-page .filters select,
.requests-page .filters .date-filter-trigger {
  min-height: 42px;
  border-radius: var(--radius-md);
  border-color: rgba(221, 229, 223, 0.95);
  background-color: #fff;
}

.filters > label,
.filters > .filter-field {
  display: grid;
  align-content: end;
  gap: 6px;
  min-width: 0;
}

.filter-field {
  min-width: 0;
}

.filter-dropdown {
  position: relative;
  min-width: 0;
}

.date-filter {
  position: relative;
  min-width: 0;
}

.filter-dropdown-trigger {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(221, 229, 223, 0.95);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.filter-dropdown-trigger > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-dropdown-trigger i {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.date-filter-trigger {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(221, 229, 223, 0.95);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
  cursor: pointer;
}

.date-filter-trigger b {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-radius: var(--radius-sm);
}

.date-filter-trigger b::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 4px;
  border-top: 2px solid currentColor;
}

.filter-dropdown.is-open .filter-dropdown-trigger {
  border-color: rgba(22, 101, 52, 0.42);
  box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.1);
}

.date-filter.is-open .date-filter-trigger {
  border-color: rgba(22, 101, 52, 0.42);
  box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.1);
}

.filter-dropdown.is-open .filter-dropdown-trigger i {
  transform: rotate(225deg) translate(-2px, -2px);
}

.filter-dropdown-trigger:focus-visible,
.filter-dropdown-menu button:focus-visible,
.date-filter-trigger:focus-visible,
.date-filter-menu button:focus-visible {
  outline: 3px solid rgba(22, 101, 52, 0.2);
  outline-offset: 2px;
}

.filter-dropdown-menu {
  position: absolute;
  z-index: 900;
  top: calc(100% + 7px);
  left: 0;
  width: 100%;
  max-width: calc(100vw - 32px);
  max-height: 280px;
  overflow-y: auto;
  padding: 6px 5px;
  border: 1px solid rgba(210, 220, 213, 0.95);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 45px rgba(18, 36, 25, 0.16);
  backdrop-filter: blur(16px);
}

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

.date-filter-menu {
  position: absolute;
  z-index: 920;
  top: calc(100% + 7px);
  left: 0;
  width: 268px;
  max-width: calc(100vw - 32px);
  max-height: min(372px, calc(100vh - 180px));
  overflow-y: auto;
  padding: 12px;
  border: 1px solid rgba(210, 220, 213, 0.95);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 45px rgba(18, 36, 25, 0.16);
  backdrop-filter: blur(16px);
}

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

.date-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.date-filter-head strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.date-filter-head div {
  display: inline-flex;
  gap: 6px;
}

.date-filter-head button,
.date-filter-actions button {
  border: 0;
  color: var(--brand-dark);
  background: transparent;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.date-filter-head button {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
}

.date-filter-head button:hover,
.date-filter-actions button:hover {
  background: var(--brand-soft);
}

.date-filter-weekdays,
.date-filter-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.date-filter-weekdays {
  margin-bottom: 6px;
}

.date-filter-weekdays span {
  min-height: 24px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.date-filter-grid button {
  min-width: 0;
  min-height: 30px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

.date-filter-grid button:hover,
.date-filter-grid button.is-today {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.date-filter-grid button.is-selected {
  background: var(--brand);
  color: #fff;
}

.date-filter-grid button.is-muted {
  color: #93a09a;
}

.date-filter-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
}

.date-filter-actions button {
  min-height: 30px;
  padding: 6px 10px;
}

.filter-dropdown-menu button {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  transition: background 140ms ease, color 140ms ease;
}

.filter-dropdown-menu button:hover,
.filter-dropdown-menu button[aria-selected="true"] {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.filter-dropdown-menu button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-wrap {
  overflow: auto;
  width: 100%;
  max-width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1180px;
}

.sidebar-collapsed .section {
  max-width: calc(100vw - 124px);
}

.sidebar-collapsed .table-wrap {
  max-width: calc(100vw - 126px);
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid #edf1ee;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
  font-weight: 500;
}

td {
  font-weight: 400;
}

th {
  color: var(--muted);
  background: #fbfcfb;
  font-size: 12px;
  text-transform: uppercase;
}

.admin-shell th,
.requests-table th,
.points-table th {
  padding: 13px 12px;
  color: #5f6f66;
  background: #fbfdfc;
  font-weight: 500;
}

.admin-shell td,
.requests-table td,
.points-table td {
  padding-top: 13px;
  padding-bottom: 13px;
}

.admin-shell tr:last-child td,
.requests-table tr:last-child td,
.points-table tr:last-child td {
  border-bottom: 0;
}

.admin-shell tr:hover td {
  background: #fbfdfc;
}

tr:hover td {
  background: #fbfdfc;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-round);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.priority-Низкая {
  color: #4d5751;
  background: #eef0ef;
}

.priority-Обычная {
  color: #145fa3;
  background: #e6f1fb;
}

.priority-Высокая {
  color: #9b4f0d;
  background: #fff1df;
}

.priority-Срочно {
  color: #b12a2a;
  background: #fde8e8;
}

.status {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.status-Новая {
  color: #8a5a00;
  background: #fff1c7;
}

.status-Назначена {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.point-unapproved {
  color: #8a5a00;
  background: #fff4cf;
}

.status-Просрочена,
.status-Проблема,
.status-Отменена {
  color: var(--red);
  background: #fde8e8;
}

.status-control {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: var(--radius-round);
  padding: 6px 30px 6px 11px;
  color: var(--brand-dark);
  background-color: var(--brand-soft);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}

.status-control.status-Просрочена,
.status-control.status-Проблема,
.status-control.status-Отменена {
  color: var(--red);
  background-color: #fde8e8;
}

.status-control.status-Новая {
  color: #8a5a00;
  background-color: #fff1c7;
}

.status-control.status-Назначена {
  color: var(--brand-dark);
  background-color: var(--brand-soft);
}

.vehicle-status-control {
  width: 108px;
  min-width: 108px;
  max-width: 100%;
  padding: 6px 32px 6px 12px;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%230d4c26' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.vehicle-status-control[data-vehicle-status="Занята"] {
  color: #111812;
  background-color: #fff1c9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23111812' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.vehicle-status-control[data-vehicle-status="В ремонте"] {
  color: #8a5a00;
  background-color: #fff1c9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238a5a00' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.vehicle-status-control[data-vehicle-status="Резерв"] {
  color: #53635a;
  background-color: #edf1ee;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2353635a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.vehicles-table {
  table-layout: fixed;
  min-width: 1100px;
  width: 100%;
}

.vehicles-table th,
.vehicles-table td {
  overflow-wrap: normal;
  word-break: normal;
}

.vehicles-table th {
  text-align: center;
}

.vehicles-table th:nth-child(1),
.vehicles-table td:nth-child(1) {
  width: 13%;
}

.vehicles-table th:nth-child(2),
.vehicles-table td:nth-child(2) {
  width: 25%;
}

.vehicles-table th:nth-child(3),
.vehicles-table td:nth-child(3) {
  width: 10%;
}

.vehicles-table th:nth-child(4),
.vehicles-table td:nth-child(4) {
  width: 132px;
}

.vehicles-table th:nth-child(5),
.vehicles-table td:nth-child(5) {
  width: 11%;
  padding-inline: 3px;
  text-align: center;
}

.vehicles-table th:nth-child(6),
.vehicles-table td:nth-child(6) {
  width: 9%;
}

.vehicles-table th:nth-child(7),
.vehicles-table td:nth-child(7) {
  width: 116px;
}

.vehicles-table th:nth-child(8),
.vehicles-table td:nth-child(8) {
  width: 112px;
  min-width: 0;
  text-align: center;
}

.vehicles-table.has-actions th:nth-child(1),
.vehicles-table.has-actions td:nth-child(1) { width: 11%; }
.vehicles-table.has-actions th:nth-child(2),
.vehicles-table.has-actions td:nth-child(2) { width: 18.4%; }
.vehicles-table.has-actions th:nth-child(3),
.vehicles-table.has-actions td:nth-child(3) { width: 112px; }
.vehicles-table.has-actions th:nth-child(4),
.vehicles-table.has-actions td:nth-child(4) { width: 132px; min-width: 0; }
.vehicles-table.has-actions th:nth-child(5),
.vehicles-table.has-actions td:nth-child(5) { width: 11%; }
.vehicles-table.has-actions th:nth-child(6),
.vehicles-table.has-actions td:nth-child(6) { width: 124px; }
.vehicles-table.has-actions th:nth-child(7),
.vehicles-table.has-actions td:nth-child(7) { width: 116px; }
.vehicles-table.has-actions th:nth-child(8),
.vehicles-table.has-actions td:nth-child(8) { width: 112px; }
.vehicles-table.has-actions th:nth-child(9),
.vehicles-table.has-actions td:nth-child(9) { width: 104px; text-align: center; }

.vehicles-table td:nth-child(6),
.vehicles-table td:nth-child(7) {
  white-space: normal;
  overflow-wrap: anywhere;
}

.vehicles-table .vehicle-status-control {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 32px;
  min-height: 32px;
  padding: 0 22px 0 8px;
  background-position: right 8px center;
}

.vehicle-status-label {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 8px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 500;
  color: var(--brand-dark);
  background: var(--brand-soft);
  white-space: nowrap;
}

.vehicle-status-label[data-vehicle-status="Резерв"] {
  color: #53635a;
  background: #edf1ee;
}

.vehicle-status-label[data-vehicle-status="Занята"],
.vehicle-status-label[data-vehicle-status="В ремонте"] {
  color: #8a5a00;
  background: #fff1c9;
}

@media (max-width: 1100px) {
  .vehicles-table .vehicle-status-control,
  .vehicle-status-label {
    height: 44px;
    min-height: 44px;
  }
}

.vehicle-driver-dropdown {
  position: relative;
  width: 100%;
  min-width: 0;
}

.vehicle-driver-control {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 6px 12px 6px 14px;
  border: 1px solid #cfe2d7;
  border-radius: var(--radius-round);
  color: var(--brand-dark);
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.vehicle-driver-control:hover {
  border-color: #9fc7ae;
  background: #fbfdfb;
}

.vehicle-driver-control:focus-visible,
.vehicle-driver-menu button:focus-visible {
  outline: 3px solid rgba(21, 108, 55, 0.18);
  outline-offset: 2px;
}

.vehicle-driver-control span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-driver-control i {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-right: 2px solid var(--brand-dark);
  border-bottom: 2px solid var(--brand-dark);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.16s ease;
}

.vehicle-driver-dropdown.is-open .vehicle-driver-control {
  border-color: #9fc7ae;
  box-shadow: 0 0 0 3px rgba(21, 108, 55, 0.12);
}

.vehicle-driver-dropdown.is-open .vehicle-driver-control i {
  transform: rotate(225deg) translate(-2px, -1px);
}

.vehicle-driver-menu {
  position: absolute;
  z-index: 950;
  top: calc(100% + 7px);
  left: 0;
  width: max-content;
  min-width: 100%;
  max-width: min(360px, calc(100vw - 32px));
  padding: 8px;
  border: 1px solid #d8e3dc;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(18, 45, 31, 0.16);
}

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

.vehicle-driver-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.vehicle-driver-menu button:hover,
.vehicle-driver-menu button[aria-selected="true"] {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.vehicle-driver-menu button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.request-status-summary { min-width: 0; }
.request-visit-state {
  display: block;
  max-width: 190px;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--muted);
  border-radius: var(--radius-sm);
}

.request-visit-state.is-info,
.request-visit-label.is-info { color: #285f8f; }
.request-visit-state.is-warning,
.request-visit-label.is-warning { color: #8a5a00; }
.request-visit-label.is-success { color: var(--brand-dark); }
.request-visit-state:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.request-visit-details {
  display: grid;
  gap: 10px;
  padding: 12px 16px;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
}
.request-visit-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; }
.request-visit-details h3 { font-size: 14px; line-height: 20px; margin: 0; }
.request-visit-title { display: grid; gap: 2px; min-width: 0; flex: 1 1 160px; }
.request-visit-title > span { color: var(--muted); font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }
.request-visit-label {
  max-width: 100%;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: #f0f2f3;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.request-visit-label.is-info { background: #e8f2fc; }
.request-visit-label.is-warning { background: #fff4d8; }
.request-visit-label.is-success { background: var(--brand-soft); }
.request-visit-details .request-visit-reason { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.request-visit-details dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.request-visit-details dl > div { min-width: 0; }
.request-visit-details dt { font-size: 12px; line-height: 18px; color: var(--muted); }
.request-visit-details dd { margin: 4px 0 0; font-size: 14px; line-height: 22px; overflow-wrap: anywhere; }
.request-visit-time { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; font-variant-numeric: tabular-nums; }
.request-visit-time strong { font-size: 15px; font-weight: 600; }
.request-visit-time span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.request-visit-empty { color: var(--muted); }
.trip-request-list { display: grid; gap: 12px; text-align: left; }
.trip-link-warning { display: block; margin-top: 4px; color: #946000; font-size: 12px; line-height: 1.4; }
.trip-link-issues { padding: 10px 12px; border-left: 3px solid #d79a35; background: #fff8e8; color: #755016; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.trip-link-issues ul { margin: 6px 0 0; padding-left: 18px; }
.trip-request-item { display: flex; align-items: flex-start; flex-direction: column; gap: 4px; min-width: 0; }
.trip-request-item .status { max-width: 100%; white-space: normal; }
.trip-request-item .request-visit-state { margin-top: 0; }
@media (max-width: 600px) {
  .request-visit-details { padding: 12px; }
  .request-visit-details dl { grid-template-columns: 1fr; gap: 8px; }
  .request-visit-details dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: baseline; gap: 8px; }
  .request-visit-details dd { margin: 0; }
}

.request-visit-route { gap: 0; padding: 0; }
.request-visit-route .request-visit-stage { display: grid; min-width: 0; gap: 6px; padding: 10px 14px; }
.request-visit-route .request-visit-stage + .request-visit-stage { border-top: 1px solid var(--line); }
.request-visit-route .request-visit-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; flex-basis: 220px; }
.request-visit-route .request-visit-title h3 { overflow-wrap: anywhere; }
.request-visit-route .request-visit-title > span { display: flex; gap: 10px; min-width: 0; font-size: 13px; }
.request-visit-route .request-visit-title > span::before { content: "\00b7"; flex-shrink: 0; }
.request-visit-timeline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; min-width: 0; }
.request-visit-day { color: var(--muted); font-size: 12px; line-height: 22px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.request-visit-route dl { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; min-width: 0; }
.request-visit-route dl > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; max-width: 100%; }
.request-visit-route dd { margin: 0; }
@media (max-width: 600px) {
  .request-visit-route .request-visit-stage { padding: 10px 12px; }
  .request-visit-route .request-visit-title { flex-basis: 100%; }
  .request-visit-route dl { gap: 4px 16px; }
}

.vehicle-gps-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 100%;
  min-height: 32px;
  color: #69766f;
  font-size: 12px;
  line-height: 1.25;
  text-align: left;
  border-radius: var(--radius-sm);
}

.vehicle-gps-state .ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.vehicle-gps-state.is-unlocated {
  color: #8a5a00;
}

.vehicle-gps-state:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.vehicle-gps-button {
  position: relative;
}

span.vehicle-gps-button {
  cursor: default;
}

.vehicle-gps-button.is-fresh {
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-color: #c7e1d1;
}

.vehicle-gps-button.is-stale,
.vehicle-gps-button.is-unknown {
  color: #8a5a00;
  background: #fff1c9;
  border-color: #f1d994;
}

.vehicle-gps-indicator {
  position: absolute;
  bottom: -5px;
  right: -5px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-round);
  border: 1px solid white;
  color: #8a5a00;
  background: #ffe6a3;
}

.vehicle-gps-button .vehicle-gps-indicator .ui-icon {
  width: 12px;
  height: 12px;
}

.gps-unit-actions {
  display: grid;
  gap: 7px;
  justify-items: center;
}

.vehicle-form-grid textarea {
  min-height: 90px;
}

.drivers-section {
  margin-top: 18px;
}

.directory-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.directory-section-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.drivers-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.drivers-table th,
.drivers-table td {
  text-align: center;
  overflow-wrap: normal;
  word-break: normal;
}

.drivers-table th:nth-child(1),
.drivers-table td:nth-child(1) { width: 25%; }
.drivers-table th:nth-child(2),
.drivers-table td:nth-child(2) { width: 15%; }
.drivers-table th:nth-child(3),
.drivers-table td:nth-child(3) { width: 20%; }
.drivers-table th:nth-child(4),
.drivers-table td:nth-child(4) { width: 11%; }
.drivers-table th:nth-child(5),
.drivers-table td:nth-child(5) { width: 18%; }
.drivers-table th:nth-child(6),
.drivers-table td:nth-child(6) { width: 11%; }

.driver-availability-pill {
  display: inline-grid;
  justify-items: center;
  gap: 2px;
  min-width: 116px;
  min-height: 38px;
  padding: 6px 12px;
  border: 0;
  border-radius: var(--radius-round);
  color: var(--brand-dark);
  background: var(--brand-soft);
  font: inherit;
  cursor: pointer;
}

.driver-availability-pill:not(.has-period) {
  align-content: center;
}

.driver-availability-pill strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.15;
}

.driver-availability-pill small {
  font-size: 10px;
  font-weight: 500;
  line-height: 1.15;
  white-space: nowrap;
}

.driver-availability-pill.availability-vacation {
  color: #7c4a03;
  background: #fff1c9;
}

.driver-availability-pill.availability-sick_leave {
  color: var(--red);
  background: #fde8e8;
}

.driver-availability-pill:focus-visible {
  outline: 3px solid rgba(21, 108, 55, 0.22);
  outline-offset: 2px;
}

.driver-availability-form {
  display: grid;
  gap: 18px;
}

.driver-absence-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.driver-absence-item {
  display: inline-grid;
  gap: 2px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink);
  background: #f7faf8;
  text-align: left;
}

.driver-absence-item span {
  color: var(--muted);
  font-size: 12px;
}

.driver-absence-item.is-active {
  border-color: #9fc7ae;
  background: var(--brand-soft);
}

.driver-absence-item.add {
  place-items: center;
  color: var(--brand-dark);
  font-weight: 600;
}

.gps-integration-body {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.gps-integrations-modal {
  width: min(1180px, 100%);
  border-radius: var(--radius-lg);
}

.gps-integrations-modal .modal-header,
.gps-integrations-modal .modal-body,
.gps-integrations-modal .manager-empty,
.gps-integrations-modal .table-wrap,
.gps-integrations-modal .error {
  border-radius: var(--control-radius);
}

.gps-integrations-modal input:not([type="checkbox"]),
.gps-integrations-modal select,
.gps-integrations-modal textarea,
.gps-integrations-modal .btn {
  border-radius: var(--control-radius);
}

.gps-integrations-layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.gps-provider-list {
  display: grid;
  gap: 8px;
  align-content: start;
}

.gps-provider-list-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 72px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.gps-provider-list-item:hover,
.gps-provider-list-item.is-active {
  border-color: var(--gps-provider-color, var(--brand));
  background: var(--gps-provider-soft, var(--brand-soft));
}

.gps-provider-list-item:focus-visible {
  outline: 3px solid var(--gps-provider-focus, rgba(21, 108, 55, 0.22));
  outline-offset: 2px;
}

.gps-provider-list-item strong,
.gps-provider-list-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gps-provider-list-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.gps-provider-list-color {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-round);
  background: var(--gps-provider-color, var(--brand));
}

.gps-provider-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 260px);
  gap: 12px;
  align-items: end;
}

.gps-provider-settings .wide {
  grid-column: 1 / -1;
}

.gps-color-field {
  position: relative;
  min-width: 0;
}

.gps-color-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  padding: 10px 13px;
  border: 1px solid color-mix(in srgb, var(--gps-picker-color) 82%, #17211b);
  border-radius: var(--control-radius);
  color: var(--gps-picker-text);
  background: var(--gps-picker-color);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  text-align: left;
  transition: filter 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.gps-color-trigger:hover {
  filter: brightness(0.96);
}

.gps-color-trigger:active {
  transform: scale(0.99);
}

.gps-color-trigger:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--gps-picker-color) 28%, transparent);
  outline-offset: 2px;
}

.gps-color-trigger__name {
  color: inherit !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  white-space: nowrap;
}

.gps-color-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  width: min(320px, calc(100vw - 48px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(17, 42, 27, 0.2);
}

.gps-color-popover[hidden] {
  display: none;
}

.gps-color-popover__head,
.gps-color-popover__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.gps-color-popover__head {
  margin-bottom: 12px;
}

.gps-color-popover__head > strong {
  font-size: 14px;
  font-weight: 600;
}

.gps-color-popover__head > button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  color: var(--brand-dark);
  background: var(--brand-soft);
  font-size: 22px;
  line-height: 1;
}

.gps-color-swatches {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.gps-color-swatches button {
  aspect-ratio: 1;
  min-width: 0;
  border: 3px solid #ffffff;
  border-radius: var(--radius-sm);
  background: var(--swatch-color);
  box-shadow: 0 0 0 1px var(--line);
}

.gps-color-swatches button:hover,
.gps-color-swatches button.is-selected {
  box-shadow: 0 0 0 2px var(--brand-dark);
}

.gps-color-popover__actions {
  justify-content: flex-end;
}

.gps-provider-settings-actions {
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
}

.gps-provider-settings input:not([type="checkbox"]),
.gps-provider-settings select,
.gps-provider-settings-actions > .btn {
  height: 44px;
}

.gps-provider-active {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
}

.gps-provider-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-color: var(--gps-provider-color, var(--line));
  border-radius: var(--control-radius);
  background: var(--gps-provider-soft, #f9fbfa);
}

.gps-provider-card-title {
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
}

.gps-provider-card-title h3 {
  margin: 0;
}

.gps-provider-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.gps-provider-card-actions > .btn,
.gps-provider-status {
  height: 44px;
}

.gps-provider-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: var(--control-radius);
  color: var(--gps-provider-color, var(--brand-dark));
  background: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.gps-provider-status i {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-round);
  background: currentColor;
}

.gps-provider-status.is-error {
  color: var(--red);
}

.gps-units-head h3 {
  margin: 3px 0;
}

.gps-token-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.gps-token-form .field {
  margin-bottom: 0;
}

.gps-token-form input,
.gps-token-form > .btn {
  height: 44px;
}

.gps-integration-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--muted);
  font-size: 13px;
}

.gps-units-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.gps-units-table {
  min-width: 760px;
  table-layout: fixed;
}

.gps-units-table th:nth-child(1),
.gps-units-table td:nth-child(1) { width: 24%; }
.gps-units-table th:nth-child(2),
.gps-units-table td:nth-child(2) { width: 22%; }
.gps-units-table th:nth-child(3),
.gps-units-table td:nth-child(3) { width: 32%; }
.gps-units-table th:nth-child(4),
.gps-units-table td:nth-child(4) { width: 22%; }

.gps-units-table select {
  width: 100%;
}

.vehicle-doc-actions,
.vehicle-row-actions {
  display: grid;
  grid-template-columns: repeat(2, 32px);
  gap: 10px;
  justify-content: center;
  align-items: center;
  min-height: 32px;
}

.vehicle-doc-btn {
  position: relative;
}

.vehicle-doc-indicator {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-radius: 50%;
  pointer-events: none;
}

.vehicle-doc-btn .vehicle-doc-indicator .ui-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.vehicle-doc-ok {
  color: var(--green);
  background: #e0f2e9;
}

.vehicle-doc-soon {
  color: #875300;
  background: #fff1c9;
}

.vehicle-doc-unknown,
.vehicle-doc-missing,
.vehicle-doc-not-required {
  color: #5e6a65;
  background: #edf1ee;
}

.vehicle-doc-expired {
  color: var(--red);
  background: #fde8e8;
}

.vehicle-doc-form textarea {
  min-height: 92px;
}

.permission-matrix {
  display: grid;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}

.permission-matrix-head,
.permission-matrix-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 160px 190px;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}

.permission-matrix-head {
  color: var(--muted);
  background: #f8fbf8;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
}

.permission-matrix-row + .permission-matrix-row {
  border-top: 1px solid var(--line);
}

.permission-matrix-row strong {
  color: var(--text);
  font-size: 16px;
}

.permission-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border-radius: var(--radius-md);
  color: var(--green);
  background: var(--green-soft);
  font-weight: 500;
}

.permission-cell input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.permission-cell.is-disabled {
  color: var(--muted);
  background: #f5f7f5;
}

.map-section {
  position: relative;
}

.fleet-map {
  width: 100%;
  height: min(68vh, 680px);
  min-height: 460px;
  background: #eef4f0;
}

.map-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 24px;
  color: var(--muted);
  font-weight: 400;
  text-align: center;
}

.leaflet-popup-content {
  color: var(--ink);
  font-family: Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

.fleet-map .vehicle-route-popup .leaflet-popup-content-wrapper,
.fleet-map .vehicle-route-popup .leaflet-popup-tip {
  background: rgba(255, 255, 255, 0.5);
}

.fleet-map .vehicle-route-popup .leaflet-popup-content-wrapper {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.fleet-map .vehicle-route-popup .leaflet-popup-content {
  margin: 7px 22px 7px 9px;
  line-height: 1.3;
  width: min(270px, calc(100vw - 110px)) !important;
}

.fleet-map .vehicle-route-popup .leaflet-popup-close-button {
  top: 1px;
  right: 1px;
  width: 20px;
  height: 20px;
  padding: 1px;
}

.vehicle-route-popup-content {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.vehicle-route-popup-content span {
  white-space: normal;
  overflow-wrap: anywhere;
}

.vehicle-route-popup-stats {
  font-weight: 600;
}

.vehicle-route-popup-content.is-error .vehicle-route-popup-stats {
  color: #a82929;
}

.vehicle-map-icon {
  background: transparent;
  border: 0;
  transition: opacity 160ms ease, filter 160ms ease;
}

.vehicle-map-icon.is-muted {
  opacity: 0.28;
  filter: grayscale(0.7);
}

.vehicle-map-icon.is-selected {
  z-index: 900 !important;
}

.vehicle-map-pin {
  position: relative;
  width: 100%;
  height: 58px;
  filter: drop-shadow(0 2px 3px rgba(8, 35, 24, 0.2));
}

.vehicle-map-label {
  position: absolute;
  top: 2px;
  left: 0;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px 0 44px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-round);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.vehicle-map-label__badge {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #ffffff;
  background: var(--gps-provider-color, var(--brand));
  border: 3px solid #fff;
  border-radius: 12px;
}

.vehicle-map-label__badge svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vehicle-map-pin__tail,
.vehicle-map-pin__tail::after {
  position: absolute;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.vehicle-map-pin__tail {
  top: 31px;
  left: 10px;
  width: 16px;
  height: 14px;
  background: #fff;
}

.vehicle-map-pin__tail::after {
  content: "";
  top: 0;
  left: 3px;
  width: 10px;
  height: 10px;
  background: var(--gps-provider-color, var(--brand));
}

.vehicle-map-pin__position {
  position: absolute;
  left: 12px;
  top: 46px;
  width: 12px;
  height: 12px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--gps-provider-color, var(--brand));
}

.vehicle-map-label__text {
  letter-spacing: 0;
}

.leaflet-attribution-flag {
  display: none !important;
}

.leaflet-control-attribution {
  color: rgba(101, 115, 108, 0.55) !important;
  background: rgba(255, 255, 255, 0.65) !important;
  font-size: 10px !important;
}

.leaflet-control-attribution a {
  color: rgba(21, 108, 55, 0.55) !important;
}

.address {
  max-width: 310px;
  line-height: 1.35;
}

th:nth-child(6),
td:nth-child(6) {
  min-width: 130px;
  white-space: nowrap;
}

th:nth-child(4),
td:nth-child(4) {
  min-width: 260px;
}

th:nth-child(10),
td:nth-child(10) {
  min-width: 170px;
}

th:last-child,
td:last-child,
th:nth-last-child(2),
td:nth-last-child(2) {
  text-align: center;
}

td:last-child .btn,
td:nth-last-child(2) .badge {
  margin-inline: auto;
}

.requests-table th:last-child,
.requests-table td:last-child {
  width: 96px;
  min-width: 0;
  max-width: none;
  padding-inline: 8px;
  position: static;
  background: transparent;
  box-shadow: none;
}

.requests-table th:last-child {
  background: #fbfcfb;
}

.requests-table {
  table-layout: fixed;
  min-width: 1280px;
  width: 100%;
}

.request-table-wrap {
  container: request-table / inline-size;
}

.requests-table th,
.requests-table td {
  padding-inline: 8px;
  overflow-wrap: anywhere;
  word-break: normal;
}

.requests-table th:nth-child(1),
.requests-table td:nth-child(1) {
  width: 74px;
}

.requests-table th:nth-child(2),
.requests-table td:nth-child(2) {
  width: 78px;
}

.requests-table th:nth-child(3),
.requests-table td:nth-child(3) {
  width: 10%;
}

.requests-table th:nth-child(4),
.requests-table td:nth-child(4) {
  width: auto;
  min-width: 0;
}

.requests-table th:nth-child(5),
.requests-table td:nth-child(5) {
  width: 94px;
}

.requests-table th:nth-child(5) {
  white-space: nowrap;
  overflow-wrap: normal;
}

.requests-table th:nth-child(6),
.requests-table td:nth-child(6) {
  width: 84px;
  min-width: 0;
  white-space: normal;
}

.requests-table th:nth-child(7),
.requests-table td:nth-child(7) {
  width: 140px;
}

.requests-table th:nth-child(7),
.requests-table td:nth-child(7),
.requests-table td:nth-child(7) .badge,
.requests-table td:nth-child(7) .status-control {
  white-space: nowrap;
  overflow-wrap: normal;
}

.requests-table th:nth-child(8),
.requests-table td:nth-child(8) {
  width: 112px;
}

.requests-table th:nth-child(9),
.requests-table td:nth-child(9) {
  width: 144px;
}

.requests-table th:nth-child(10),
.requests-table td:nth-child(10) {
  width: 132px;
  min-width: 0;
}

.requests-table th:nth-child(10) {
  white-space: nowrap;
}

.request-comment-cell {
  vertical-align: middle;
}

.request-route {
  display: grid;
  gap: 4px;
  min-width: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.request-route-address {
  display: block;
  padding-left: 8px;
  font-size: 12px;
}

.request-cargo {
  display: grid;
  min-width: 0;
}

.request-comment-indicators {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 32px;
  min-width: 0;
}

.request-content-indicator {
  position: relative;
  flex: 0 0 auto;
}

.request-content-indicator.is-unread {
  --indicator-color: #315fba;
  --indicator-soft: #eef3ff;
  --indicator-hover: #e0e9ff;
  --indicator-border: rgba(49, 95, 186, 0.3);
  --indicator-glow: rgba(49, 95, 186, 0.16);
  color: var(--indicator-color);
  background: var(--indicator-soft);
  border-color: var(--indicator-border);
  animation: request-content-unread-pulse 4s ease-in-out infinite;
}

.request-content-indicator.is-unread:hover {
  border-color: var(--indicator-color);
  background: var(--indicator-hover);
  animation-play-state: paused;
}

.request-attachment-count {
  position: absolute;
  right: -5px;
  bottom: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  display: grid;
  place-items: center;
  border: 1px solid #fff;
  border-radius: var(--radius-sm);
  background: #edf1ee;
  color: var(--brand-dark);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

.request-content-indicator.is-unread .request-attachment-count {
  color: #fff;
  background: #315fba;
}

.request-content-indicator.is-unread::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 6px;
  height: 6px;
  border: 1px solid white;
  border-radius: 50%;
  background: var(--indicator-color);
}

.request-comment-empty {
  color: var(--muted);
}

@keyframes request-content-unread-pulse {
  0%, 58%, 74%, 90%, 100% {
    box-shadow: 0 0 0 0 transparent;
    transform: scale(1);
  }
  66%, 82% {
    box-shadow: 0 0 0 5px var(--indicator-glow);
    transform: scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  .request-content-indicator.is-unread {
    animation: none;
  }
}

.request-row-actions {
  display: grid;
  grid-template-columns: repeat(2, 32px);
  grid-auto-rows: 32px;
  gap: 8px;
  width: max-content;
  margin-inline: auto;
}

.request-row-actions [data-delete-request]:hover {
  color: var(--red);
  background: #fde8e8;
  border-color: #edb9bd;
}

.requests-table .status-control {
  width: 124px;
  max-width: 100%;
  min-height: 32px;
  text-align: left;
  padding-inline: 8px;
}

.request-number-cell,
.request-vehicle-summary {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.request-number-link {
  justify-self: start;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--brand-dark);
  background: transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  text-align: left;
}

.request-number-link:hover {
  color: var(--brand);
}

.request-number-link:focus-visible,
.request-driver-name:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.request-driver-name {
  border-radius: var(--radius-sm);
  overflow-wrap: anywhere;
}

.request-driver-summary {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.request-driver-summary .request-driver-name { min-width: 0; }

.request-vehicle-plate {
  font-weight: 500;
}

@container request-table (min-width: 1500px) {
  .requests-table th:last-child,
  .requests-table td:last-child {
    width: 168px;
  }

  .request-row-actions {
    grid-template-columns: repeat(4, 32px);
  }
}

.requests-table .badge {
  white-space: normal;
  text-align: center;
}

.manager-current,
.manager-other {
  display: grid;
}

.manager-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}

.manager-subhead h3 {
  font-size: 22px;
  line-height: 1.15;
  font-weight: 600;
}

.manager-subhead span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.archive-toggle {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
  font-weight: 500;
}

.archive-toggle span {
  font-size: 24px;
  line-height: 1.15;
}

.archive-toggle:hover {
  background: #fbfdfc;
}

.archive-toggle strong {
  min-width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-round);
  background: var(--brand-soft);
}

.archive-toggle b {
  font-size: 22px;
  line-height: 1;
}

#usersTable {
  table-layout: fixed;
  min-width: 960px;
  width: 100%;
}

#usersTable th,
#usersTable td {
  overflow-wrap: anywhere;
  word-break: normal;
  white-space: normal;
  padding-inline: 8px;
  text-align: center;
}

#usersTable th {
  text-align: center;
}

#usersTable th:nth-child(1),
#usersTable td:nth-child(1) {
  width: 12.58%;
  min-width: 0;
}

#usersTable td:nth-child(1) {
  text-align: left;
}

#usersTable th:nth-child(2),
#usersTable td:nth-child(2) {
  width: 9.28%;
  min-width: 0;
}

#usersTable th:nth-child(4),
#usersTable td:nth-child(4) {
  width: 11.8%;
  min-width: 0;
  max-width: none;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

#usersTable th:nth-child(3),
#usersTable td:nth-child(3) {
  width: 16.64%;
  min-width: 0;
  max-width: none;
  overflow-wrap: anywhere;
  white-space: normal;
}

#usersTable td:nth-child(3) {
  text-align: left;
}

#usersTable th:nth-child(5),
#usersTable td:nth-child(5) {
  width: 10%;
  min-width: 0;
}

#usersTable td:nth-child(5) {
  text-align: left;
}

#usersTable th:nth-child(6),
#usersTable td:nth-child(6) {
  width: 7.3%;
  min-width: 0;
}

#usersTable th:nth-child(7),
#usersTable td:nth-child(7) {
  width: 12.7%;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

#usersTable th:nth-child(8),
#usersTable td:nth-child(8) {
  width: 104px;
  min-width: 0;
}

#usersTable th:last-child,
#usersTable td:last-child {
  width: 88px;
  min-width: 0;
  max-width: none;
  padding-inline: 8px;
  overflow-wrap: normal;
  white-space: nowrap;
}

.user-account-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.user-account-status > span {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: currentColor;
}

.user-account-status.is-active {
  color: var(--brand);
}

.user-row-actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 32px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}

.user-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--brand-dark);
}

.user-action-button:hover {
  background: #eef4f0;
  border-color: #b9cec0;
}

.user-action-button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.user-action-button .ui-icon {
  width: 18px;
  height: 18px;
}

.muted {
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.drawer,
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
}

.modal-backdrop {
  background: rgba(12, 24, 17, 0.42);
  display: grid;
  place-items: start center;
  padding: 30px 16px;
  overflow: auto;
}

.modal {
  position: relative;
  z-index: 10001;
  width: min(980px, 100%);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-body {
  padding: 18px;
}

.request-form-modal .modal-header {
  padding: 10px 14px;
}

.request-form-modal .modal-body {
  padding: 14px;
}

.request-form-modal .field {
  min-width: 0;
  gap: 6px;
  margin-bottom: 12px;
}

.request-form-modal :is(.form-grid, .request-top-grid, .request-cargo-grid, .new-address) {
  gap: 10px;
}

.request-form-modal textarea {
  min-height: calc(2lh + 22px);
  resize: vertical;
}

.request-form-modal .request-top-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.point-form-modal .modal-header {
  padding: 10px 14px;
}

.point-form-modal .modal-body {
  padding: 14px;
}

.point-form-modal .field {
  min-width: 0;
  gap: 6px;
  margin-bottom: 12px;
}

.point-form-modal .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.point-form-modal .gps-color-field {
  align-self: end;
}

.point-form-modal :is(input:not([type="hidden"]), select, .gps-color-trigger) {
  height: 40px;
}

.point-form-modal :is(input:not([type="hidden"]), select) {
  padding-block: 0;
}

.vehicle-form-modal .modal-header {
  padding: 10px 14px;
}

.vehicle-form-modal .modal-body {
  padding: 14px;
}

.vehicle-form-modal .field {
  min-width: 0;
  gap: 6px;
  margin-bottom: 12px;
}

.vehicle-form-modal .field[hidden] {
  display: none;
}

.vehicle-form-modal .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.vehicle-form-modal :is(input:not([type="hidden"]), select) {
  min-width: 0;
  height: 40px;
  padding-block: 0;
}

.vehicle-form-modal select {
  padding-inline: 8px;
}

.vehicle-form-modal textarea {
  min-height: calc(2lh + 22px);
  resize: vertical;
}

@media (min-width: 701px) and (max-width: 1000px) {
  .vehicle-form-modal .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .point-form-modal .form-grid,
  .vehicle-form-modal .form-grid {
    grid-template-columns: 1fr;
  }

  .point-form-modal :is(input:not([type="hidden"]), select, .gps-color-trigger),
  .vehicle-form-modal :is(input:not([type="hidden"]), select) {
    height: 44px;
  }
}

@media (max-width: 1100px) {
  .request-form-modal .request-top-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .request-form-modal .request-top-grid {
    grid-template-columns: 1fr;
  }
}

.request-export-modal {
  max-width: 480px;
}

.request-export-modal h2 {
  font-size: 20px;
}

.request-export-period {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.request-export-period legend {
  margin-bottom: 14px;
  font-weight: 600;
}

.request-export-period .field,
.request-export-period .trip-period-picker,
.request-export-period input {
  min-width: 0;
  width: 100%;
}

.request-export-error {
  color: #b42318;
  overflow-wrap: anywhere;
}

.request-export-period .trip-period-trigger > span {
  color: inherit;
  font: inherit;
}

.request-export-period .trip-period-trigger[aria-invalid="true"] {
  border-color: var(--red);
}

@media (max-width: 420px) {
  .request-export-period {
    grid-template-columns: minmax(0, 1fr);
  }
}

.request-attachment-picker small {
  color: var(--muted);
  font-size: 13px;
}

.request-attachment-native-input {
  display: none;
}

.request-attachment-draft-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.request-attachment-selection {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.request-attachment-selection.is-empty {
  color: var(--muted);
}

.request-attachment-draft-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-height: 36px;
  padding: 5px 5px 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg);
}

.request-attachment-draft-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-attachment-draft-size {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.request-attachment-draft-remove {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.request-attachment-draft-remove:hover {
  color: var(--red);
  background: #fbe9e9;
}

.request-attachment-draft-remove svg {
  width: 15px;
  height: 15px;
}

.request-attachment-picker input[type="file"] {
  padding: 9px;
}

.request-attachments {
  padding: 16px;
}

.request-attachment-list {
  display: grid;
  gap: 8px;
}

.request-attachment-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.request-attachment-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: var(--brand);
  background: var(--brand-soft);
}

.request-attachment-info {
  min-width: 0;
}

.request-attachment-info strong,
.request-attachment-info span {
  display: block;
}

.request-attachment-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-attachment-info span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.request-attachment-actions {
  display: flex;
  gap: 7px;
}

.request-attachment-empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
  text-align: center;
}

.request-attachment-empty.is-error {
  color: var(--red);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.request-comment-modal {
  width: min(480px, 100%);
  min-height: 88px;
  padding: 24px 52px 24px 24px;
}

.request-comment-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: var(--control-radius);
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.request-comment-modal-close:hover,
.request-comment-modal-close:focus-visible {
  background: #d8eee0;
  outline: 2px solid rgba(21, 108, 55, 0.2);
}

.request-comment-modal-close .ui-icon {
  width: 17px;
  height: 17px;
}

.request-comment-modal-body {
  max-height: min(60vh, 420px);
  overflow: auto;
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.request-attachments-modal {
  width: min(760px, 100%);
}

.request-attachments-modal-header > div {
  min-width: 0;
}

.request-attachments-modal-header p {
  margin-top: 3px;
  font-size: 13px;
}

.request-attachments-modal-body {
  max-height: min(70vh, 620px);
  overflow-y: auto;
  background: #fbfcfb;
}

.request-attachments-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.request-attachments-modal .request-attachments {
  padding: 0;
}

.about-modal {
  width: min(640px, 100%);
  border-radius: var(--radius-lg);
}

.about-dialog-header {
  align-items: center;
  padding: 10px 14px;
}

.about-dialog-header > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.about-product-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: var(--control-radius);
  color: #fff;
  background: var(--brand);
  font-weight: 600;
}

.about-dialog-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "summary"
    "legal"
    "support";
  align-items: stretch;
  gap: 10px;
  padding: 12px;
  background: var(--bg);
}

.about-product-summary,
.about-legal-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
}

.about-product-summary {
  grid-area: summary;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0;
  overflow: hidden;
}

.about-product-summary > div {
  display: grid;
  align-content: start;
  gap: 3px;
  min-width: 0;
  padding: 9px 12px;
}

.about-product-summary > div + div {
  border-left: 1px solid var(--line);
}

.about-product-summary span,
.about-eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.about-product-summary strong {
  overflow-wrap: anywhere;
  line-height: 1.3;
}

.about-legal-section {
  padding: 12px;
}

.about-legal-section {
  grid-area: legal;
}

.about-contact-link-row {
  grid-area: support;
  display: flex;
  justify-content: flex-end;
}

.about-contact-link {
  min-height: 32px;
  padding: 6px 0;
  background: transparent;
  color: var(--brand-dark);
  font-size: 14px;
  line-height: 20px;
}

.about-contact-link:hover,
.about-contact-link:focus-visible {
  text-decoration: underline;
}

.about-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.about-section-heading h3 {
  margin-top: 2px;
  font-size: 17px;
  line-height: 1.2;
}

.about-license-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: var(--control-radius);
  color: var(--brand-dark);
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 500;
}

.about-legal-section > p,
.about-details-content p {
  margin: 0 0 6px;
  color: #46534c;
  font-size: 13px;
  line-height: 1.4;
}

.about-details {
  border-top: 1px solid var(--line);
}

.about-details:last-child {
  border-bottom: 1px solid var(--line);
}

.about-details summary {
  padding: 8px 0;
  color: var(--brand-dark);
  cursor: pointer;
  font-weight: 500;
}

.about-details-content {
  padding-bottom: 3px;
}

.about-details-content p {
  margin-bottom: 4px;
  font-size: 12px;
  line-height: 1.35;
}

.contact-owner-form {
  margin-top: 8px;
}

.contact-owner-form .field {
  gap: 5px;
  margin-bottom: 8px;
}

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

.contact-owner-form input,
.contact-owner-form textarea {
  border-radius: var(--control-radius);
  min-height: 38px;
}

.contact-owner-form textarea {
  min-height: 72px;
}

.contact-owner-form input:focus,
.contact-owner-form textarea:focus {
  outline: none;
  border-color: rgba(21, 108, 55, 0.58);
  box-shadow: 0 0 0 4px rgba(21, 108, 55, 0.1);
}

.contact-owner-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.contact-owner-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 14px;
}

.contact-owner-status.is-success {
  color: var(--brand);
}

.contact-owner-status.is-error {
  color: var(--red);
}

.contact-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.form-grid .half {
  grid-column: span 2;
}

.request-top-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.request-cargo-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.request-cargo-grid .field {
  min-width: 0;
}

@media (max-width: 720px) {
  .request-cargo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .request-cargo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 370px) {
  .request-cargo-grid {
    grid-template-columns: 1fr;
  }
}

.new-address {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 12px;
  background: #f8fbf9;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.vehicle-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
}

.vehicle-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: grid;
  gap: 8px;
}

.admin-shell .vehicle-card {
  border-color: rgba(221, 229, 223, 0.82);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 12px 28px rgba(18, 36, 25, 0.045);
}

.vehicle-card.bad {
  opacity: 0.72;
  background: #fafafa;
}

.vehicle-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.reasons {
  color: var(--red);
  font-size: 13px;
  line-height: 1.35;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
}

.dashboard-grid-compact {
  grid-template-columns: minmax(320px, 560px);
  margin-bottom: 18px;
}

.dashboard-map {
  margin-top: 0;
}

.dashboard-widget {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.admin-shell .dashboard-widget,
.admin-shell .report-box,
.admin-shell .directory-card {
  border-color: var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.dashboard-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.admin-shell .dashboard-widget-head {
  padding: 16px 18px;
  border-bottom-color: var(--line);
  background: var(--panel);
}

.dashboard-widget-head h2 {
  font-size: 17px;
}

.dashboard-widget-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  border-radius: var(--radius-round);
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 600;
}

.dashboard-list {
  display: grid;
}

.dashboard-item {
  width: 100%;
  display: grid;
  gap: 5px;
  padding: 12px 16px;
  border-bottom: 1px solid #edf1ee;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.admin-shell .dashboard-item {
  padding: 14px 18px;
  border-bottom-color: #edf3ef;
}

button.dashboard-item:hover {
  background: #fbfdfc;
}

.dashboard-item span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-item b {
  font-size: 14px;
  overflow-wrap: normal;
}

.dashboard-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.dashboard-empty {
  padding: 18px 16px;
  color: var(--muted);
}

.dashboard-page {
  display: grid;
  gap: 18px;
  height: calc(100vh - 32px);
  min-height: 0;
  font-family: Manrope, system-ui, sans-serif;
  font-weight: 400;
}

.dashboard-page .btn,
.dashboard-trips-table th,
.dashboard-route-btn {
  font-weight: 500;
}

.dashboard-gps-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.dashboard-gps-btn.is-error {
  border-color: rgba(190, 18, 60, 0.22);
  background: #fde8e8;
  color: var(--red);
}

.dashboard-gps-btn.is-error:hover {
  border-color: rgba(190, 18, 60, 0.32);
  background: #fbdada;
  color: var(--red);
}

.dashboard-map-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.dashboard-gps-btn:focus-visible,
.dashboard-icon-btn:focus-visible,
.dashboard-route-btn:focus-visible {
  outline: 3px solid rgba(22, 101, 52, 0.22);
  outline-offset: 3px;
}

.dashboard-notice {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 520;
  min-height: 42px;
  padding: 12px 16px;
  border: 1px solid rgba(205, 226, 214, 0.9);
  border-radius: var(--radius-lg);
  background: rgba(231, 244, 236, 0.9);
  color: var(--brand-dark);
  font-weight: 500;
  box-shadow: 0 12px 28px rgba(18, 36, 25, 0.08);
  backdrop-filter: blur(5px);
}

.dashboard-notice.is-error {
  border-color: rgba(190, 18, 60, 0.2);
  background: rgba(253, 232, 232, 0.94);
  color: var(--red);
  box-shadow: 0 12px 28px rgba(190, 18, 60, 0.1);
}

.dashboard-notice.is-hidden,
.map-loading.is-hidden {
  display: none;
}

.dashboard-kpis {
  grid-area: summary;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.dashboard-summary-card {
  --summary-title-height: 24px;
  --summary-details-height: 32px;
  display: grid;
  grid-template-rows: calc(var(--summary-title-height) + 52px) 12px minmax(var(--summary-details-height), auto);
  gap: 8px;
  min-width: 0; padding: 12px;
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff;
}
.dashboard-metric {
  display: grid;
  grid-template-rows: var(--summary-title-height) 44px;
  gap: 8px;
  align-content: start;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.dashboard-metric-heading { display: flex; justify-content: space-between; align-items: start; gap: 8px; min-width: 0; }
.dashboard-metric-heading .ui-icon { width: 24px; height: 24px; flex: 0 0 24px; color: #52615b; }
.dashboard-metric-label { display: flex; align-items: start; height: var(--summary-title-height); min-width: 0; font-size: 16px; line-height: 22px; color: var(--ink); font-weight: 600; }
.dashboard-metric-value { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.dashboard-metric-value strong { font-size: 40px; line-height: 44px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dashboard-metric-value > span { color: var(--muted); font-size: 14px; line-height: 20px; font-weight: 400; }
.dashboard-metric:disabled, div.dashboard-metric { cursor: default; opacity: 1; }
button.dashboard-metric:hover:not(:disabled) .dashboard-metric-label { color: var(--brand-dark); }
.dashboard-metric-note { min-width: 0; font-size: 12px; line-height: 18px; color: var(--ink); }
.dashboard-metric-note b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.dashboard-kpi-link { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.dashboard-kpi-link:hover:not(:disabled) { color: var(--brand); text-decoration: underline; }
.dashboard-kpi-link:disabled { opacity: 1; cursor: default; }
.dashboard-summary-card.is-danger .dashboard-metric-value strong,
.dashboard-summary-card.is-warning .dashboard-metric-value strong { color: #c7780a; }
.dashboard-summary-card.is-open { border-color: var(--brand); }
.dashboard-distribution { position: relative; display: flex; height: 12px; min-width: 0; overflow: hidden; border-radius: 3px; background: #eef1f4; }
.dashboard-distribution > span { height: 100%; flex: 0 0 auto; }
.dashboard-distribution > span + span { border-left: 1px solid #fff; }
.dashboard-progress-value { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(0, 0, 0, 0.65); font-size: 10px; line-height: 12px; font-weight: 600; font-variant-numeric: tabular-nums; pointer-events: none; }
.dashboard-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.dashboard-distribution .is-blue, .dashboard-swatch.is-blue { background: #3989ed; }
.dashboard-distribution .is-blue-soft { background: #cfe2fc; }
.dashboard-distribution .is-green, .dashboard-swatch.is-green { background: #2c9b5d; }
.dashboard-distribution .is-gray, .dashboard-swatch.is-gray { background: #bac2ce; }
.dashboard-distribution .is-muted, .dashboard-swatch.is-muted { background: #e0e4e9; }
.dashboard-distribution .is-red, .dashboard-swatch.is-red { background: #df555b; }
.dashboard-distribution .is-amber, .dashboard-swatch.is-amber { background: #f7c844; }
.dashboard-inline-legend { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--summary-details-height); min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.dashboard-inline-legend > * { flex: 0 0 auto; white-space: nowrap; }
.dashboard-inline-legend::-webkit-scrollbar { height: 4px; }
.dashboard-inline-legend::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }
.dashboard-inline-legend:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--radius-sm); }
.dashboard-inline-legend .dashboard-kpi-link:focus-visible { outline-offset: 0; }
.dashboard-legend-item, .dashboard-fleet-legend .dashboard-kpi-link, .dashboard-severity-legend .dashboard-kpi-link {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 24px; min-width: 0;
}
.dashboard-inline-legend .dashboard-legend-item, .dashboard-fleet-legend .dashboard-kpi-link { grid-template-columns: 10px auto auto; gap: 5px; }
.dashboard-today-details .dashboard-kpi-link { display: flex; align-items: center; gap: 6px; min-height: 24px; }
.dashboard-severity-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; height: var(--summary-details-height); }
.dashboard-severity-legend > :first-child { padding-right: 12px; }
.dashboard-severity-legend > :last-child { border-left: 1px solid var(--line); padding-left: 12px; }
.dashboard-metric:focus-visible, .dashboard-kpi-link:focus-visible,
.dashboard-attention button:focus-visible, .dashboard-alert-group > summary:focus-visible, .dashboard-filter-note button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

@media (min-width: 1101px) and (max-width: 1400px) {
  .dashboard-summary-card { --summary-title-height: 44px; }
  .dashboard-metric-label { font-size: 14px; }
}

.dashboard-attention {
  position: absolute;
  grid-area: 2 / 1 / -1 / -1;
  inset: 0 0 0 auto;
  width: min(400px, 100%);
  z-index: 950;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: -8px 0 24px rgba(18, 36, 25, 0.1);
  visibility: visible;
  opacity: 1;
  clip-path: inset(-24px -24px -24px -24px);
  transition: clip-path 180ms ease, opacity 180ms ease, visibility 0s;
}
.dashboard-attention[hidden] {
  display: flex;
  visibility: hidden;
  opacity: 0;
  clip-path: inset(0 0 0 100%);
  pointer-events: none;
  transition: clip-path 180ms ease, opacity 180ms ease, visibility 0s linear 180ms;
}
.dashboard-attention-head { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 6px 16px; }
.dashboard-attention-head h2 { margin: 0; font-size: 16px; line-height: 22px; }
.dashboard-attention-head h2 span { margin-left: 8px; font-weight: 400; color: var(--muted); }
.dashboard-close, .dashboard-filter-note button {
  display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px;
  border: 0; border-radius: var(--radius-sm); background: none; color: var(--muted); cursor: pointer;
}
.dashboard-close:hover, .dashboard-filter-note button:hover { background: var(--brand-soft); color: var(--brand); }
.dashboard-attention-tabs { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.dashboard-attention-tabs button {
  padding: 7px 10px; border: 0; border-bottom: 2px solid transparent;
  background: none; font-size: 12px; color: var(--muted); cursor: pointer;
}
.dashboard-attention-tabs button[aria-pressed="true"] { border-bottom-color: var(--brand); color: var(--brand-dark); }
.dashboard-attention-tabs span { margin-left: 3px; }
.dashboard-attention-list { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 0 16px; scrollbar-gutter: stable; }
.dashboard-alert-group { border-bottom: 1px solid var(--line); }
.dashboard-alert-group:last-child { border-bottom: 0; }
.dashboard-alert-group > summary { min-height: 38px; padding: 10px 0; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink); cursor: pointer; }
.dashboard-alert-group > summary::marker { color: var(--muted); font-size: 10px; }
.dashboard-alert-group > summary > span { float: right; margin-left: 8px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.dashboard-alert-group > summary:hover { color: var(--brand-dark); }
.dashboard-alert-group[open] > summary { border-bottom: 1px solid var(--line); }
.dashboard-alert-row { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 4px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dashboard-alert-row:last-child { border-bottom: 0; }
.dashboard-alert-icon { flex: 0 0 20px; color: #975c06; }
.dashboard-alert-row.is-danger .dashboard-alert-icon { color: var(--red); }
.dashboard-alert-text { display: grid; gap: 3px; min-width: 0; flex: 1; overflow-wrap: anywhere; }
.dashboard-alert-text strong { font-size: 13px; line-height: 18px; font-weight: 500; }
.dashboard-alert-text span { font-size: 12px; line-height: 17px; color: var(--muted); }
.dashboard-alert-action { grid-column: 2; justify-self: end; display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: var(--radius-sm); padding: 6px; background: none; color: var(--brand-dark); font-size: 12px; cursor: pointer; }
.dashboard-alert-action:hover { background: var(--brand-soft); }
.dashboard-alert-action .ui-icon { width: 16px; height: 16px; flex: 0 0 auto; }
.dashboard-attention-empty { padding: 12px 0; font-size: 13px; color: var(--muted); }
.dashboard-filter-note { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 12px; margin-bottom: 10px; border-left: 3px solid var(--brand); background: #fff; font-size: 13px; }

.dashboard-main-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 64fr) minmax(352px, 36fr);
  grid-template-areas:
    "summary summary"
    "trips map";
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  height: 100%;
  min-height: 0;
  align-self: stretch;
  align-items: stretch;
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-attention, .dashboard-attention[hidden] { transition: none; }
}

.dashboard-trips-card {
  grid-area: trips;
}

.dashboard-map-card {
  grid-area: map;
  isolation: isolate;
}

.dashboard-column {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
}

.dashboard-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.dashboard-trips-card {
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}

.dashboard-trips-card {
  height: 100%;
  align-self: stretch;
}

.dashboard-map-card {
  display: block;
  height: 100%;
  aspect-ratio: auto;
  align-self: stretch;
}

.dashboard-card-head {
  height: 72px;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.dashboard-card-head h2 {
  font-size: 20px;
  line-height: 1.15;
  font-weight: 600;
}

.dashboard-card-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

.dashboard-icon-btn {
  width: 44px;
  min-width: 44px;
  padding-inline: 0;
}

.dashboard-map-wrap {
  position: relative;
  min-height: 0;
  height: 100%;
}

.dashboard-map-overlay-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 540;
  gap: 6px;
}

.dashboard-map-overlay-actions .btn {
  box-shadow: 0 8px 20px rgba(17, 42, 27, 0.14);
}

.dashboard-map-overlay-actions .dashboard-gps-btn {
  gap: 5px;
  padding-inline: 6px;
}

.dashboard-map-overlay-actions .dashboard-notice {
  position: static;
  width: 120px;
  min-width: 120px;
  min-height: 34px;
  flex: 0 0 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border-radius: var(--control-radius);
  font-size: 13px;
  line-height: normal;
  text-align: center;
  white-space: nowrap;
}

.dashboard-map-overlay-actions .dashboard-notice.is-hidden {
  display: none;
}

.dashboard-replacement-btn {
  gap: 5px;
  padding-inline: 10px;
  color: #7c4a03;
  border-color: #efd18a;
  background: #fff1c9;
}

.dashboard-replacement-btn:hover {
  color: #623900;
  border-color: #e0ba62;
  background: #ffe7aa;
}

.replacement-candidates-modal {
  width: min(780px, 100%);
}

.replacement-candidates-modal .modal-header {
  align-items: center;
  padding: 10px 14px;
}

.replacement-candidates-modal .modal-header h2 {
  min-width: 0;
  font-size: 20px;
  line-height: 26px;
}

.replacement-candidates-modal .modal-header .btn {
  flex-shrink: 0;
}

.replacement-candidates-list {
  display: grid;
  gap: 0;
  padding: 0 14px;
}

.replacement-candidate {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(260px, 1.5fr) minmax(150px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.replacement-candidate:last-child {
  border-bottom: 0;
}

.replacement-candidate-main,
.replacement-candidate-vehicles div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.replacement-candidate-main span,
.replacement-candidate-main small,
.replacement-candidate-vehicles span {
  color: var(--muted);
  font-size: 12px;
}

.replacement-candidate-main strong,
.replacement-candidate-main span,
.replacement-candidate-vehicles strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.replacement-candidate-vehicles strong {
  font-size: 13px;
}

.replacement-candidate-reason {
  min-width: 0;
  margin: 0;
}

.replacement-candidate-reason input {
  min-height: 36px;
  font-size: 13px;
  padding: 8px 10px;
}

.replacement-candidate-actions {
  display: grid;
  gap: 6px;
}

@media (max-width: 1100px) {
  .replacement-candidate {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 12px;
  }

  .replacement-candidate-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 370px) {
  .dashboard-map-overlay-actions {
    top: 82px;
  }

  .dashboard-map-overlay-actions .dashboard-gps-btn .ui-icon {
    display: none;
  }
}

@media (min-width: 1101px) and (max-width: 1320px) {
  .dashboard-map-card .leaflet-top.leaflet-left {
    top: 48px;
  }
}

.gps-provider-legend {
  position: absolute;
  z-index: 450;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: calc(100% - 24px);
  pointer-events: none;
}

.gps-provider-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid rgba(221, 229, 223, 0.92);
  border-radius: var(--control-radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 20px rgba(17, 42, 27, 0.1);
  font-size: 11px;
  font-weight: 500;
}

.gps-provider-legend i {
  width: 9px;
  height: 9px;
  border-radius: var(--radius-round);
}

.dashboard-fleet-map {
  height: 100%;
  min-height: 0;
}

.map-loading {
  position: absolute;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  background: rgba(248, 251, 249, 0.72);
  color: var(--brand-dark);
  font-weight: 500;
  backdrop-filter: blur(3px);
}

.dashboard-map-card.is-fullscreen {
  position: fixed;
  inset: 22px;
  z-index: 1000;
  display: block;
  height: auto;
  aspect-ratio: auto;
  align-self: auto;
  border-radius: var(--radius-lg);
}

.dashboard-map-card.is-fullscreen .dashboard-map-wrap,
.dashboard-map-card.is-fullscreen .dashboard-fleet-map {
  height: 100%;
  min-height: 0;
}

body.dashboard-map-open {
  overflow: hidden;
}

#dashboardUpcoming {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}

.dashboard-trips-table-wrap {
  min-height: 0;
  padding: 0 14px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.dashboard-trips-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.dashboard-trips-table th,
.dashboard-trips-table td {
  padding: 13px 10px;
  border-bottom: 1px solid #edf1ee;
  vertical-align: middle;
}

.dashboard-trips-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: left;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.dashboard-trips-table th:nth-child(1),
.dashboard-trips-table td:nth-child(1) {
  width: 13%;
  text-align: center;
}

.dashboard-trips-table th:nth-child(2),
.dashboard-trips-table td:nth-child(2) {
  width: 15%;
  text-align: center;
}

.dashboard-trips-table th:nth-child(3),
.dashboard-trips-table td:nth-child(3) {
  width: 42%;
}

.dashboard-trips-table th:nth-child(4),
.dashboard-trips-table td:nth-child(4) {
  width: 15%;
  text-align: center;
}

.dashboard-trips-table th:nth-child(5),
.dashboard-trips-table td:nth-child(5) {
  width: 15%;
  text-align: center;
}

.dashboard-trip-date,
.dashboard-trip-vehicle {
  line-height: 1.35;
}

.dashboard-trip-date span,
.dashboard-trip-vehicle span {
  display: block;
}

.dashboard-trip-date-values,
.dashboard-trip-value {
  min-width: 0;
}

.dashboard-vehicle-plate {
  margin-top: 2px;
}

.dashboard-trip-unassigned {
  color: #c66a16;
  font-weight: 500;
}

.dashboard-department-stack {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
}

.dashboard-department-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid var(--department-border);
  border-radius: var(--control-radius);
  color: var(--department-color);
  background: var(--department-soft);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

.dashboard-trips-table tr.dashboard-trip-unassigned-row td {
  background: #fffaf1;
}

.dashboard-trips-table tr.dashboard-trip-problem-row td {
  background: #fff3ec;
}

.dashboard-trips-table tr.dashboard-trip-overdue td {
  background: #fdeaea;
  color: #c92f36;
}

.dashboard-trips-table tr.dashboard-trip-overdue td:first-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.dashboard-trips-table tr.dashboard-trip-overdue td:last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.dashboard-trips-table tr.dashboard-trip-overdue .dashboard-route-btn,
.dashboard-trips-table tr.dashboard-trip-overdue .dashboard-route-btn strong,
.dashboard-trips-table tr.dashboard-trip-overdue .dashboard-route-btn span,
.dashboard-trips-table tr.dashboard-trip-overdue .dashboard-trip-unassigned {
  color: #c92f36;
}

.dashboard-route-btn {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.dashboard-route-btn strong {
  font-size: 14px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.dashboard-route-btn span,
.dashboard-route-btn em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  overflow-wrap: normal;
}

.dashboard-empty-state {
  min-height: 260px;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 28px;
  text-align: center;
}

.dashboard-empty-state strong {
  font-size: 20px;
  font-weight: 600;
}

.dashboard-empty-state span {
  color: var(--muted);
  font-weight: 400;
}

.dashboard-summary-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(221, 229, 223, 0.78);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 38px rgba(18, 36, 25, 0.05);
}

.dashboard-summary-item {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: #f8fbf9;
}

.dashboard-summary-item span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.dashboard-summary-item strong {
  color: var(--brand-dark);
  font-size: 24px;
  line-height: 1;
  font-weight: 600;
}

.trip-load-state {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 180px;
  padding: 24px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.trip-load-state.is-error {
  color: #a33127;
}

.trip-loading-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  animation: trip-loading-spin 1.2s linear infinite;
}

@keyframes trip-loading-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .trip-loading-icon { animation: none; }
}

.trip-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.trip-kpi {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
  padding: 18px 20px;
  border: 1px solid rgba(221, 229, 223, 0.9);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(18, 36, 25, 0.055);
}

.trip-kpi span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.trip-kpi strong {
  font-size: 30px;
  line-height: 1;
  font-weight: 600;
}

.trip-kpi strong small {
  font-size: 15px;
  font-weight: 500;
}

.trip-kpi.is-warning {
  border-color: #efd991;
  background: #fff9e8;
}

.trip-kpi.is-danger {
  border-color: #f2c5c5;
  background: #fdecec;
  color: #bd3138;
}

.trip-utilization-section {
  margin-bottom: 18px;
  overflow: visible;
  border-radius: var(--radius-lg);
}

.trip-utilization-head {
  min-height: 80px;
  align-items: center;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.trip-utilization-head h2 {
  margin-bottom: 4px;
}

.trip-utilization-head p {
  margin: 0;
}

.trip-utilization-controls {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
}

.trip-period-switch {
  height: 48px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(21, 108, 55, 0.14);
  border-radius: var(--control-radius);
  background: #f3f7f4;
}

.trip-period-switch button {
  min-width: 92px;
  height: 38px;
  padding: 7px 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.trip-period-switch button.active {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: 0 3px 10px rgba(18, 36, 25, 0.08);
}

.trip-period-switch button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.trip-period-picker {
  position: relative;
  width: 196px;
  min-width: 196px;
}

.trip-period-trigger {
  height: 48px;
  min-height: 48px;
  border-radius: var(--control-radius);
  font-size: 13px;
}

.trip-month-picker.is-open .trip-period-trigger {
  border-color: rgba(22, 101, 52, 0.42);
  box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.1);
}

.trip-month-picker.is-open .trip-period-trigger i {
  transform: rotate(225deg) translate(-2px, -2px);
}

.trip-month-picker-menu {
  position: absolute;
  z-index: 920;
  top: calc(100% + 7px);
  right: 0;
  width: 310px;
  max-width: calc(100vw - 32px);
  padding: 12px;
  border: 1px solid rgba(210, 220, 213, 0.95);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 45px rgba(18, 36, 25, 0.16);
  backdrop-filter: blur(16px);
}

.trip-month-picker-menu[hidden] {
  display: none;
}

.trip-month-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.trip-month-picker-head strong {
  font-size: 14px;
  font-weight: 600;
}

.trip-month-picker-head div {
  display: inline-flex;
  gap: 6px;
}

.trip-month-picker-head button {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--brand-dark);
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.trip-month-picker-head button:hover {
  background: var(--brand-soft);
}

.trip-month-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.trip-month-picker-grid button {
  min-height: 40px;
  padding: 8px 6px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.trip-month-picker-grid button:hover,
.trip-month-picker-grid button[aria-selected="true"] {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.trip-month-picker-grid button:disabled {
  color: #a5aea9;
  cursor: default;
}

.trip-period-picker .date-filter-menu {
  right: 0;
  left: auto;
  border-radius: var(--radius-lg);
}

.date-filter-actions.is-single {
  justify-content: flex-end;
}

.trip-utilization-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.trip-utilization-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid rgba(21, 108, 55, 0.14);
  border-radius: var(--radius-md);
  background: #fbfdfb;
}

.trip-utilization-card.is-idle {
  border-color: var(--line);
  background: #fafbfa;
}

.trip-utilization-card-head,
.trip-utilization-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.trip-utilization-card-head div {
  min-width: 0;
}

.trip-utilization-card-head strong,
.trip-utilization-card-head span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trip-utilization-card-head strong {
  font-size: 14px;
  font-weight: 600;
}

.trip-utilization-card-head span,
.trip-utilization-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.trip-utilization-card-head b {
  color: var(--brand-dark);
  font-size: 24px;
  line-height: 1;
  font-weight: 600;
}

.trip-utilization-progress {
  height: 8px;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #e7ede9;
}

.trip-utilization-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.trip-utilization-card.is-idle .trip-utilization-progress i {
  background: var(--muted);
}

.trip-utilization-days {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.trip-month-note {
  padding: 0 16px 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.trip-utilization-empty {
  grid-column: 1 / -1;
  height: 110px;
}

.trips-section {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.trips-section-head {
  min-height: 84px;
  align-items: center;
}

.trips-section-head h2 {
  margin-bottom: 4px;
}

.trips-section-head p {
  margin: 0;
}

.trip-review-count {
  padding: 9px 12px;
  border-radius: var(--control-radius);
  background: #fff0c9;
  color: #915500;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.trips-table {
  min-width: 1240px;
  table-layout: fixed;
}

.trips-table th,
.trips-table td {
  text-align: center;
}

.trips-table th:nth-child(1) { width: 13%; }
.trips-table th:nth-child(2),
.trips-table th:nth-child(3) { width: 7%; }
.trips-table th:nth-child(4) { width: 22%; }
.trips-table th:nth-child(5) { width: 10%; }
.trips-table th:nth-child(6) { width: 12%; }
.trips-table th:nth-child(7) { width: 8%; }
.trips-table th:nth-child(8) { width: 12%; }
.trips-table th:nth-child(9) { width: 9%; }

.trips-table td:first-child,
.trips-table .trip-route-cell {
  text-align: left;
}

.trips-table tr.needs-review td {
  background: #fffcf3;
}

.trip-vehicle-plate,
.trip-moving-time,
.trip-start-warning {
  display: block;
  margin-top: 3px;
}

.trip-start-warning {
  color: #a16108;
  font-size: 11px;
}

.trip-open-status {
  color: var(--blue);
  font-weight: 500;
}

.trip-incomplete-status {
  color: #a16108;
  font-weight: 500;
}

.trip-category,
.trip-gps-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: var(--control-radius);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.trip-category.is-success {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.trip-category.is-warning {
  color: #8f5500;
  background: #fff0c9;
}

.trip-category.is-danger {
  color: #b82f36;
  background: #fde8e8;
}

.trip-category.is-neutral {
  color: #4f5c55;
  background: #eef2ef;
}

.trip-gps-status {
  gap: 7px;
  padding-inline: 0;
}

.trip-gps-status i {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: var(--radius-round);
  background: var(--gray);
}

.trip-gps-status.is-complete {
  color: var(--brand);
}

.trip-gps-status.is-complete i {
  background: var(--brand);
}

.trip-gps-status.is-gap {
  color: #a86500;
}

.trip-gps-status.is-gap i {
  background: #e5a400;
}

.trip-gps-status.is-missing {
  color: var(--red);
}

.trip-gps-status.is-missing i {
  background: var(--red);
}

.trips-empty {
  height: 220px;
  text-align: center !important;
}

.trips-empty strong,
.trips-empty span {
  display: block;
}

.trips-empty strong {
  margin-bottom: 6px;
  font-size: 18px;
  font-weight: 600;
}

.trips-empty span {
  color: var(--muted);
}

.trip-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 20px;
  border-top: 1px solid var(--line);
  background: #fbfdfc;
}

.trip-totals div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: #f3f7f4;
}

.trip-totals span {
  color: var(--muted);
  font-size: 13px;
}

.trip-totals strong {
  color: var(--brand-dark);
  font-size: 18px;
}

.trip-totals .is-danger {
  background: #fdecec;
}

.trip-totals .is-danger strong {
  color: #bd3138;
}

.trip-classification-form {
  display: grid;
  gap: 16px;
}

.trip-modal-summary {
  display: grid;
  grid-template-columns: 1.5fr 1fr 0.7fr;
  gap: 10px;
}

.trip-modal-summary div,
.trip-modal-route {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: #f3f7f4;
}

.trip-modal-summary span,
.trip-modal-route span {
  color: var(--muted);
  font-size: 12px;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 500;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.report-grid,
.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 16px;
}

.admin-shell .report-grid {
  padding: 0;
  margin-bottom: 18px;
}

.report-box,
.directory-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px;
  background: #fff;
}

.admin-shell .report-box,
.admin-shell .directory-card {
  padding: 16px;
}

.admin-shell .report-box h3,
.admin-shell .directory-card h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.admin-shell .admin-archive-toggle {
  width: calc(100% - 40px);
  margin: 18px 20px;
}

.report-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid #edf1ee;
}

.reports-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.report-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}

.report-panel.trip-report {
  margin-top: 0;
}

.report-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 7px 18px;
  border-radius: inherit;
  cursor: pointer;
  list-style: none;
}

.report-panel-heading::-webkit-details-marker {
  display: none;
}

.report-panel-heading h3 {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.report-panel-controls {
  display: block;
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
  cursor: default;
}

.report-panel:not([open]) .report-panel-controls {
  display: none;
}

.report-panel-controls .report-period-control {
  min-width: 0;
  width: 210px;
  max-width: 100%;
}

.report-panel-controls .report-period-control input,
.report-panel-controls .report-period-control > .trip-period-trigger,
.report-panel-controls .report-period-control select {
  width: 100%;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
}

.floating-period-picker .date-filter-menu,
.floating-period-picker .trip-month-picker-menu {
  position: fixed;
  right: auto;
  overflow-y: auto;
}

.report-panel-controls .report-period-picker {
  color: var(--ink);
  font: inherit;
  text-transform: none;
}

@media (max-width: 600px) {
  .report-panel-heading {
    flex-wrap: wrap;
  }

  .report-panel-controls {
    order: 1;
    flex-basis: 100%;
  }

  .report-panel-controls .report-period-control {
    width: 100%;
  }
}

.report-panel-heading > .ui-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: var(--muted);
}

.report-panel[open] > .report-panel-heading > .ui-icon {
  transform: rotate(90deg);
}

.report-panel[open] > .report-panel-heading {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.report-panel-heading:hover {
  background: #f5f7f6;
}

.report-panel-heading:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.report-panel-content {
  min-width: 0;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}

.report-panel-content .report-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.report-panel-content .report-row > strong {
  flex-shrink: 0;
}

.report-panel-content .report-row:last-child {
  border-bottom: 0;
}

.report-note {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.report-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.report-section-head .report-note {
  margin-bottom: 0;
}

.report-period-control {
  display: grid;
  gap: 6px;
  min-width: 180px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.report-period-control input {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid rgba(221, 229, 223, 0.9);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  text-transform: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.report-period-control input:focus {
  outline: 2px solid rgba(22, 101, 52, 0.18);
  border-color: rgba(22, 101, 52, 0.32);
}

.trip-report {
  margin-top: 18px;
}

.trip-table {
  width: 100%;
  min-width: 760px;
  table-layout: fixed;
}

.trip-table th,
.trip-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf1ee;
  text-align: center;
  vertical-align: middle;
}

.trip-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.trip-table th:first-child {
  text-align: center;
}

.trip-table td:first-child {
  text-align: left;
  overflow-wrap: normal;
}

.vehicle-mileage-table th:first-child,
.vehicle-mileage-table td:first-child {
  width: 34%;
}

.vehicle-mileage-table th:nth-child(2),
.vehicle-mileage-table td:nth-child(2),
.vehicle-mileage-table th:nth-child(3),
.vehicle-mileage-table td:nth-child(3),
.vehicle-mileage-table th:nth-child(4),
.vehicle-mileage-table td:nth-child(4),
.vehicle-mileage-table th:nth-child(5),
.vehicle-mileage-table td:nth-child(5) {
  width: 16.5%;
}

.route-time-control select {
  min-height: 44px;
  max-width: 100%;
  border-radius: var(--radius-md);
  background: #fff;
  font-size: 15px;
  text-transform: none;
}

.route-time-control select:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.route-time-point {
  display: grid;
  gap: 4px;
  text-align: left;
  overflow-wrap: anywhere;
}

.route-time-point small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.route-time-value {
  display: inline-grid;
  gap: 4px;
  overflow-wrap: anywhere;
}

.route-time-value small {
  color: var(--muted);
  font-size: 11px;
}

.route-time-table th:nth-child(-n + 2),
.route-time-table td:nth-child(-n + 2) {
  width: 20%;
}

.route-time-table th:nth-child(3),
.route-time-table td:nth-child(3) {
  width: 8%;
}

.route-time-table th:nth-child(n + 4),
.route-time-table td:nth-child(n + 4) {
  width: 13%;
}

.route-time-table:not([data-route-type="warehouse_to_point"]) th:nth-child(-n + 2),
.route-time-table:not([data-route-type="warehouse_to_point"]) td:nth-child(-n + 2) {
  width: 25%;
}

.route-time-table:not([data-route-type="warehouse_to_point"]) th:nth-child(3),
.route-time-table:not([data-route-type="warehouse_to_point"]) td:nth-child(3) {
  width: 10%;
}

.route-time-table:not([data-route-type="warehouse_to_point"]) th:nth-child(n + 4),
.route-time-table:not([data-route-type="warehouse_to_point"]) td:nth-child(n + 4) {
  width: 20%;
}

.route-time-table[data-route-type="point_to_warehouse"] th:nth-child(-n + 2),
.route-time-table[data-route-type="point_to_warehouse"] td:nth-child(-n + 2) {
  width: 35%;
}

.history-row {
  align-items: flex-start;
}

.history-value {
  display: grid;
  justify-items: end;
  min-width: 150px;
  max-width: 46%;
  text-align: right;
  white-space: normal;
}

.notice {
  margin: 0 0 14px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #eef8f2;
  color: var(--brand-dark);
  font-weight: 500;
}

.error {
  color: var(--red);
  margin-top: 10px;
}

.ui-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.manager-shell {
  grid-template-columns: 264px minmax(0, 1fr);
  background: var(--bg);
}

.app-shell.manager-shell {
  grid-template-columns: 264px minmax(0, 1fr);
}

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

.manager-shell .user-box .btn {
  width: 100%;
  border-radius: var(--radius-md);
  justify-content: center;
  text-align: center;
}

.manager-shell .main {
  padding: 0;
  overflow-y: auto;
}

.manager-shell .manager-view-frame {
  width: auto;
  margin: 16px 16px 16px 32px;
}

.manager-shell .dashboard-page.manager-view-frame {
  height: calc(100vh - 32px);
}

.manager-shell .requests-page {
  display: flex;
  min-height: calc(100vh - 32px);
  flex-direction: column;
}

.manager-shell .requests-page .topbar {
  flex: 0 0 auto;
}

.manager-shell .requests-page .requests-section {
  flex: 1 0 auto;
  margin-bottom: 0;
}

.manager-points-section {
  margin: 16px 16px 48px 32px;
  border-radius: var(--radius-lg);
  border-color: var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.manager-points-section .table-wrap {
  border-radius: inherit;
}

.points-table th {
  text-align: center;
}

.points-table {
  table-layout: fixed;
  min-width: 0;
  width: 100%;
}

.points-table th,
.points-table td {
  text-align: center;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

.points-table td {
  vertical-align: middle;
}

.points-table td:nth-child(1),
.points-table td:nth-child(2),
.points-table td:nth-child(3) {
  text-wrap: pretty;
}

.points-table th:nth-child(1),
.points-table td:nth-child(1) {
  width: 20%;
}

.points-table th:nth-child(2),
.points-table td:nth-child(2) {
  width: auto;
}

.points-table th:nth-child(3),
.points-table td:nth-child(3) {
  width: 16%;
}

.points-table th:nth-child(4),
.points-table td:nth-child(4) {
  width: 14%;
}

.points-table .point-status-cell {
  width: 84px;
  white-space: nowrap;
}

.points-table .point-actions-cell {
  width: 104px;
  white-space: nowrap;
}

.points-table.has-access .point-actions-cell { width: 144px; }
.points-table [data-point-map][aria-disabled="true"] { color: var(--muted); background: #f4f5f6; cursor: not-allowed; }
.points-table [data-point-map][aria-disabled="true"]:hover { border-color: var(--line); }
.modal-backdrop.point-map-backdrop { place-items: center; }
.modal.point-map-modal { width: min(920px, 100%); height: min(640px, calc(100dvh - 64px)); display: flex; flex-direction: column; }
.point-map-modal .modal-header { flex: 0 0 auto; align-items: center; padding: 10px 14px; }
.point-map-modal .modal-header h2 { margin: 0; min-width: 0; font-size: 18px; line-height: 24px; }
.point-map-modal .modal-header button { flex-shrink: 0; }
.point-map-body { flex: 1; min-height: 0; display: grid; grid-template-rows: auto minmax(100px, 1fr); gap: 12px; padding: 14px; }
.point-map-info { max-height: 25dvh; overflow: auto; overflow-wrap: anywhere; font-size: 14px; line-height: 20px; }
.point-map-info p { margin: 4px 0 0; color: var(--muted); }
.point-map-actions { display: flex; gap: 8px; }
.point-map-modal [data-point-map-retry] { color: #8a5a00; }
.point-map-modal [data-point-map-retry][hidden] { display: none; }
.point-map-canvas { min-height: 0; width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #eef3f0; }
.point-map-vehicle-popup { display: grid; gap: 4px; overflow-wrap: anywhere; }
.point-map-vehicle-popup span { color: var(--muted); }
.point-map-vehicle-popup .is-warning { color: #8a5a00; }
.point-map-vehicle.is-stale .vehicle-map-label, .point-map-vehicle.is-unknown .vehicle-map-label { border-color: #b88416; border-style: dashed; }
.point-map-vehicle-warning { position: absolute; top: -5px; left: 24px; display: grid; place-items: center; width: 20px; height: 20px; border: 2px solid #fff; border-radius: 50%; color: #825800; background: #fff0bd; }
.point-map-vehicle-warning .ui-icon { width: 14px; height: 14px; }

.point-approval-status {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  color: #8a5a00;
}

.point-approval-status.is-approved {
  color: var(--brand);
}

.point-approval-status .ui-icon {
  width: 18px;
  height: 18px;
}

.point-approval-status:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

.points-table.has-access th:nth-child(1),
.points-table.has-access td:nth-child(1) {
  width: 18%;
}

.points-table.has-access th:nth-child(3),
.points-table.has-access td:nth-child(3) {
  width: 12%;
}

.points-table.has-access th:nth-child(4),
.points-table.has-access td:nth-child(4) {
  width: 10%;
}

.points-table.has-access th:nth-child(5),
.points-table.has-access td:nth-child(5) {
  width: 10%;
}

.manager-workspace {
  max-width: 1480px;
  margin: 0 auto;
  padding: 16px 32px 48px;
}

.manager-topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 12px 24px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.manager-topbar > div:first-child {
  display: flex;
  min-height: 46px;
  align-items: center;
}

.manager-topbar h1 {
  font-size: 22px;
  line-height: 1.08;
}

.manager-topbar p {
  margin: 8px 0 0;
  color: var(--muted);
}

.manager-topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

.manager-create,
.manager-export {
  min-height: 46px;
  border-radius: var(--radius-md);
  padding: 11px 18px;
  box-shadow: 0 14px 26px rgba(22, 101, 52, 0.16);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.manager-export {
  box-shadow: none;
}

.manager-create:hover,
.manager-export:hover {
  transform: translateY(-1px);
}

.manager-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1.55fr) repeat(4, minmax(140px, 1fr));
  align-items: end;
  gap: 10px;
  margin: 0 0 22px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.manager-filters label,
.manager-filters .filter-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.manager-filters label > span,
.manager-filters .filter-field > span {
  padding-left: 4px;
  color: #718078;
  font-size: 12px;
  font-weight: 500;
}

.manager-filters input,
.manager-filters select {
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-md);
  background: #f6f9f7;
  box-shadow: inset 0 0 0 1px rgba(221, 229, 223, 0.72);
}

.manager-filters .filter-dropdown-trigger,
.manager-filters .date-filter-trigger {
  min-height: 44px;
  border: 0;
  background: #f6f9f7;
  box-shadow: inset 0 0 0 1px rgba(221, 229, 223, 0.72);
}

.manager-search {
  position: relative;
  align-self: end;
  display: block;
  height: 44px;
}

.manager-search span {
  position: absolute;
  left: 13px;
  bottom: 13px;
  padding: 0;
  color: #8a9890;
}

.manager-search input {
  width: 100%;
  height: 44px;
  padding-left: 42px;
}

.manager-board {
  margin-bottom: 16px;
}

.manager-board-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  margin: 2px 0 12px;
  padding-inline: 24px;
}

.manager-board-head h2 {
  font-size: 22px;
}

.manager-board-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

.manager-board-head > span {
  min-width: 42px;
  height: 34px;
  border-radius: var(--radius-round);
  display: grid;
  place-items: center;
  background: #e8f5ed;
  color: var(--brand);
  font-weight: 600;
}

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

.manager-request-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 18px;
  padding: 18px 18px 18px 22px;
  border: 1px solid rgba(221, 229, 223, 0.78);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 36px rgba(18, 36, 25, 0.06);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.manager-request-card::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 0;
  width: 4px;
  border-radius: 0 var(--radius-round) var(--radius-round) 0;
  background: var(--brand);
}

.manager-request-card:hover {
  transform: translateY(-2px);
  border-color: rgba(22, 101, 52, 0.22);
  box-shadow: 0 22px 52px rgba(18, 36, 25, 0.1);
}

.manager-request-card:focus-visible {
  outline: 3px solid rgba(22, 101, 52, 0.22);
  outline-offset: 3px;
}

.manager-card-main {
  display: grid;
  grid-template-columns: 116px minmax(280px, 1.15fr) minmax(420px, 1.7fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.manager-card-id strong {
  display: block;
  font-size: 19px;
}

.manager-card-id span {
  display: block;
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.1;
  font-weight: 400;
}

.manager-card-id span,
.manager-card-route span,
.manager-card-meta span,
.manager-card-meta em {
  color: var(--muted);
  font-style: normal;
}

.manager-card-route span,
.manager-card-meta span,
.manager-card-meta em {
  font-size: 16px;
}

.manager-card-route {
  min-width: 0;
}

.manager-card-route h3 {
  font-size: 19px;
  line-height: 1.2;
}

.manager-card-route p {
  margin: 6px 0 10px;
  color: #405047;
  font-size: 19px;
  line-height: 1.35;
}

.manager-card-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 16px;
  align-items: start;
}

.manager-card-meta div {
  min-width: 0;
}

.manager-card-meta strong {
  display: block;
  margin-top: 6px;
  font-size: 19px;
  line-height: 1.28;
  overflow-wrap: normal;
  word-break: normal;
}

.manager-card-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.manager-card-badges {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.manager-card-badges .badge {
  min-width: 174px;
  min-height: 52px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 24px;
  line-height: 1;
  font-weight: 500;
}

.manager-card-actions {
  display: flex;
  gap: 8px;
}

.manager-card-actions .btn {
  border-radius: var(--radius-md);
}

.manager-archive-toggle {
  width: 100%;
  min-height: 54px;
  margin: 14px 0;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px rgba(221, 229, 223, 0.78);
  font-weight: 500;
  transition: background 0.18s ease, transform 0.18s ease;
}

.manager-archive-toggle:hover {
  background: #fff;
  transform: translateY(-1px);
}

.manager-archive-toggle strong {
  min-width: 28px;
  height: 28px;
  border-radius: var(--radius-round);
  display: grid;
  place-items: center;
  background: #e8f5ed;
  color: var(--brand);
}

.manager-empty {
  display: grid;
  gap: 7px;
  justify-items: center;
  padding: 34px 20px;
  border: 1px dashed rgba(101, 115, 108, 0.28);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.66);
  color: var(--muted);
  text-align: center;
}

.manager-empty strong {
  color: var(--ink);
  font-size: 17px;
}


.admin-shell .main.login-audit-main { padding: 16px 32px; min-height: 0; overflow: hidden; }
.login-audit-page { height: calc(100dvh - 32px); min-height: 0; display: flex; flex-direction: column; }
.login-audit-page .topbar.login-audit-head { flex: 0 0 auto; flex-direction: row; align-items: center; gap: 12px; min-height: 60px; padding: 10px 16px; margin-bottom: 12px; }
.login-audit-head > button { margin-left: auto; flex-shrink: 0; }
.login-audit-section { flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: column; padding: 0 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.login-audit-toolbar { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 14px 0; }
.login-audit-toolbar > .trip-filter { flex: 0 1 200px; max-width: 200px; }
.login-audit-toolbar .login-audit-search-group { position: relative; flex: 1 1 260px; max-width: 420px; min-width: 0; }
.login-audit-search > label { font-size: 12px; line-height: 16px; color: var(--muted); }
.login-audit-search .login-audit-search-field { display: flex; align-items: center; gap: 8px; height: 36px; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 0 0 0 10px; color: var(--muted); background: #fff; }
.login-audit-search-field svg { width: 16px; height: 16px; flex: 0 0 16px; }
.login-audit-search-field input { width: 100%; min-width: 0; height: 100%; border: 0; background: none; padding: 0; font: inherit; font-size: 13px; color: var(--ink); }
.login-audit-search-field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.login-audit-search-field .user-action-button { border: 0; background: transparent; }
.login-audit-search-field .user-action-button:disabled { visibility: hidden; }
.login-audit-search-group.has-user .login-audit-search-field { border-color: var(--brand); background: #f3f8f5; }
.login-audit-search-field:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.login-audit-search-field input:focus-visible { outline: none; }
.login-audit-suggestions { position: absolute; top: calc(100% + 6px); inset-inline: 0; z-index: 5; max-height: min(224px, calc(100dvh - 220px)); overflow: auto; overscroll-behavior: contain; padding: 4px; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: 0 5px 16px rgb(20 30 24 / 12%); }
.login-audit-suggestions[hidden] { display: none; }
.login-audit-suggestions [role=option] { padding: 9px 10px; min-height: 36px; font-size: 13px; line-height: 18px; overflow-wrap: anywhere; border-radius: 4px; cursor: pointer; }
.login-audit-suggestions [role=option]:is(:hover, .is-active) { background: #edf6f0; }
.login-audit-suggestions [aria-selected=true] { color: var(--brand-dark); font-weight: 600; }
.login-audit-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; border-top: 1px solid var(--line); }
.login-audit-table { width: 100%; min-width: 700px; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.login-audit-page .login-audit-table :is(th, td) { padding: 10px 12px; min-width: 0; text-align: left; vertical-align: middle; white-space: normal; overflow-wrap: anywhere; border-bottom: 1px solid #edf1ee; }
.login-audit-page .login-audit-table thead th { position: sticky; top: 0; z-index: 1; font-size: 12px; line-height: 18px; font-weight: 500; color: var(--muted); background: #f6f8f7; }
.login-audit-page .login-audit-table td { height: 68px; font-size: 13px; line-height: 19px; }
.login-audit-table th:nth-child(1) { width: 17%; }
.login-audit-table th:nth-child(2) { width: 26%; }
.login-audit-table th:nth-child(3) { width: 19%; }
.login-audit-table th:nth-child(4) { width: 17%; }
.login-audit-table th:nth-child(5) { width: 21%; }
.login-audit-table strong { font-weight: 600; }
.login-audit-ip { font-variant-numeric: tabular-nums; }
.login-audit-row { cursor: pointer; }
.login-audit-row:hover { background: #f7faf8; }
.login-audit-row.is-selected { background: #edf6f0; }
.login-audit-row.is-selected td:first-child { box-shadow: inset 3px 0 var(--brand); }
.login-audit-open { border: 0; padding: 0; background: none; font: inherit; font-weight: 500; text-align: left; color: var(--brand-dark); cursor: pointer; font-variant-numeric: tabular-nums; }
.login-audit-open:hover { text-decoration: underline; }
.login-audit-secondary { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 17px; }
.login-audit-status { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 6px; border-radius: 4px; font-size: 11px; line-height: 16px; font-weight: 500; }
.login-audit-status.is-success { color: #17663a; background: #e3f2e9; }
.login-audit-status.is-error { color: #a13430; background: #fbeceb; }
.login-audit-footer { display: flex; flex-wrap: wrap; flex: 0 0 auto; gap: 4px 16px; padding: 10px 0; min-height: 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 18px; }
.login-audit-footer > span:first-child { margin-right: auto; }
.login-audit-load-state { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 140px; padding: 20px 8px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.login-audit-load-state[role=alert] { color: #a13430; }
.login-audit-load-state > button { flex: 0 0 auto; }
.login-audit-page .login-audit-table .login-audit-empty, .login-audit-empty { height: auto; padding: 28px 12px; text-align: center; color: var(--muted); font-size: 13px; line-height: 20px; }
.login-audit-page .user-action-button, .login-audit-panel .user-action-button { width: 36px; height: 36px; min-height: 36px; flex-shrink: 0; }
.login-audit-page .user-action-button:disabled { opacity: .4; cursor: default; background: transparent; }
.login-audit-page :is(button, select):focus-visible, .login-audit-scroll:focus-visible, .login-audit-panel :is(button, [tabindex]):focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.login-audit-panel-open .login-audit-section { margin-right: calc(var(--audit-detail-width) + 12px); }
.login-audit-backdrop { background: none; pointer-events: none; padding: 0; }
.login-audit-panel.modal { position: fixed; top: var(--audit-detail-top); right: var(--audit-detail-right); width: var(--audit-detail-width); height: var(--audit-detail-height); max-height: none; display: flex; flex-direction: column; margin: 0; pointer-events: auto; box-shadow: none; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.login-audit-panel .modal-header { display: flex; gap: 12px; align-items: center; flex: 0 0 auto; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.login-audit-panel .modal-header h2 { flex: 1; min-width: 0; margin: 0; font-size: 18px; line-height: 24px; font-weight: 600; }
.login-audit-detail { flex: 1; min-height: 0; padding: 16px; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; font-size: 13px; line-height: 19px; overflow-wrap: anywhere; }
.login-audit-detail-status { margin-bottom: 12px; }
.login-audit-summary { margin: 0; padding: 0 0 14px; }
.login-audit-summary > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px; padding: 5px 0; }
.login-audit-summary dt { color: var(--muted); }
.login-audit-summary dd { margin: 0; }
.login-audit-reason { padding: 12px 0; border-top: 1px solid var(--line); }
.login-audit-reason > span { color: var(--muted); font-size: 12px; }
.login-audit-reason p { margin: 4px 0 0; color: #a13430; }
.login-audit-activity-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 14px 0 4px; border-top: 1px solid var(--line); }
.login-audit-activity-head h3 { margin: 0; font-size: 14px; line-height: 20px; font-weight: 600; }
.login-audit-activity-head > span { flex: 0 0 auto; font-size: 12px; color: var(--muted); }
.login-audit-activity-list { padding: 0; margin: 0; list-style: none; }
.login-audit-activity-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.login-audit-activity-item > div { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 11px; line-height: 16px; }
.login-audit-activity-item p { margin: 4px 0 0; }
.login-audit-backdrop.is-modal { pointer-events: auto; background: rgb(20 30 24 / 24%); }
.login-audit-backdrop.is-modal .login-audit-panel { top: 16px; right: 16px; width: min(440px, calc(100% - 32px)); height: calc(100dvh - 32px); }

@media (max-width: 1100px) {
  .app-shell:has(.login-audit-page) { height: 100dvh; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
  .app-shell:has(.login-audit-page) .sidebar { flex: 0 0 56px; height: 56px; margin: 8px 12px 0; padding: 4px; flex-direction: row; gap: 4px; min-height: 0; overflow: hidden; }
  .app-shell:has(.login-audit-page) .nav { display: flex; flex: 1; min-width: 0; gap: 4px; overflow-x: auto; overflow-y: hidden; margin: 0; }
  .app-shell:has(.login-audit-page) .nav button { flex: 0 0 auto; width: auto; height: 44px; padding: 8px; }
  .app-shell:has(.login-audit-page) .nav button b { white-space: nowrap; }
  .app-shell:has(.login-audit-page) .user-box { flex: 0 0 auto; height: 44px; min-height: 0; margin: 0; padding: 0; background: none; }
  .app-shell:has(.login-audit-page) .user-identity, .app-shell:has(.login-audit-page) .user-box .btn span { display: none; }
  .app-shell:has(.login-audit-page) .user-box .btn { width: 44px; height: 44px; min-height: 44px; margin: 0; padding: 10px; }
  .admin-shell .main.login-audit-main { flex: 1; padding: 12px; }
  .login-audit-page { height: 100%; }
  .login-audit-page .trip-filter select, .login-audit-search .login-audit-search-field { height: 44px; }
  .login-audit-page .user-action-button, .login-audit-panel .user-action-button { width: 44px; height: 44px; min-height: 44px; }
}
@media (max-width: 600px) {
  .admin-shell .main.login-audit-main { padding: 8px; }
  .app-shell:has(.login-audit-page) .sidebar { margin-inline: 8px; }
  .login-audit-page .topbar.login-audit-head { padding: 4px 12px; min-height: 54px; margin-bottom: 8px; }
  .login-audit-section { padding: 0 12px; }
  .login-audit-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; padding: 10px 0; }
  .login-audit-toolbar .login-audit-search-group { grid-column: 1 / -1; max-width: none; }
  .login-audit-toolbar > .trip-filter { max-width: none; }
  .login-audit-suggestions [role=option] { min-height: 44px; padding-block: 12px; }
  .login-audit-page .login-audit-table { display: block; min-width: 0; }
  .login-audit-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .login-audit-table tbody { display: block; }
  .login-audit-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .login-audit-page .login-audit-table td { display: block; height: auto; min-width: 0; padding: 0; border: 0; }
  .login-audit-table td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11px; line-height: 15px; margin-bottom: 3px; }
  .login-audit-table td:nth-child(2), .login-audit-table td[colspan] { grid-column: 1 / -1; }
  .login-audit-table td:nth-child(5) { grid-row: 1; grid-column: 2; }
  .login-audit-table .login-audit-row.is-selected td:first-child { box-shadow: none; }
  .login-audit-row.is-selected { box-shadow: inset 2px 0 var(--brand); padding-inline: 8px; }
  .login-audit-footer { min-height: 0; padding: 8px 0; font-size: 11px; line-height: 16px; }
  .login-audit-backdrop.is-modal .login-audit-panel { inset: 8px; width: auto; height: calc(100dvh - 16px); }
  .login-audit-panel .modal-header { padding: 8px 12px; }
  .login-audit-detail { padding: 12px; }
  .login-audit-summary > div { grid-template-columns: 90px minmax(0, 1fr); gap: 8px; }
}
@media (max-height: 500px) {
  .login-audit-page .topbar.login-audit-head { min-height: 44px; padding-block: 0; margin-bottom: 8px; }
  .login-audit-toolbar { padding: 6px 0; }
  .login-audit-footer { min-height: 0; padding: 6px 0; }
}


@media (max-width: 1100px) {
  .login-screen {
    grid-template-columns: 1fr;
    background: #faf9f5;
  }

  .login-panel {
    min-height: 100vh;
    padding: clamp(34px, 8vw, 56px) 22px;
  }

  .login-panel form,
  .login-panel h1 {
    max-width: 390px;
  }

  .login-panel h1 {
    font-size: clamp(30px, 10vw, 38px);
  }

  .login-art {
    display: none;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-shell .sidebar {
    position: static;
    height: auto;
    margin: 10px;
    border-radius: var(--radius-lg);
  }

  .admin-shell .user-box {
    position: static;
    margin-top: 12px;
  }

  .manager-shell {
    grid-template-columns: 1fr;
  }

  .app-shell.manager-shell {
    grid-template-columns: 1fr;
  }

  .manager-shell .sidebar {
    margin: 10px;
    height: auto;
    border-radius: var(--radius-lg);
  }

  .manager-shell .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manager-shell .user-box {
    position: static;
    margin-top: 12px;
  }

  .manager-workspace {
    padding: 18px 14px 34px;
  }

  .manager-topbar {
    position: static;
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
    padding: 18px;
  }

  .manager-topbar > div:first-child {
    min-height: 56px;
  }

  .manager-topbar-actions {
    width: 100%;
  }

  .manager-topbar-actions .btn {
    flex: 1;
  }

  .manager-filters {
    grid-template-columns: 1fr;
  }

  .manager-request-card {
    grid-template-columns: 1fr;
  }

  .manager-card-main {
    grid-template-columns: 1fr;
  }

  .manager-card-side {
    align-items: stretch;
  }

  .manager-card-badges,
  .manager-card-actions {
    justify-content: flex-start;
  }

  .manager-board-head {
    padding-inline: 18px;
  }

  .user-box {
    position: static;
    margin-top: 14px;
  }

  .main {
    padding: 16px;
  }

  .admin-shell .main {
    padding: 18px 14px 34px;
  }

  .admin-shell .topbar {
    position: static;
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
    padding: 18px;
  }

  .topbar {
    flex-direction: column;
  }

  .stats,
  .filters,
  .form-grid,
  .new-address,
  .vehicle-cards,
  .dashboard-grid,
  .report-grid,
  .directory-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-main-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "summary"
      "trips"
      "map";
  }

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

  .report-section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .report-period-control {
    min-width: 0;
  }

  .form-grid .half {
    grid-column: 1;
  }

  .request-top-grid {
    grid-template-columns: 1fr;
  }

  .gps-units-head {
    align-items: stretch;
    flex-direction: column;
  }

  .gps-token-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
  }

  .app-shell,
  .app-shell.sidebar-collapsed,
  .app-shell.manager-shell {
    display: block;
    width: 100%;
    max-width: 100vw;
    overflow-x: visible;
  }

  .sidebar,
  .sidebar-collapsed .sidebar,
  .admin-shell .sidebar,
  .admin-shell.sidebar-collapsed .sidebar,
  .manager-shell.sidebar-collapsed .sidebar,
  .manager-shell .sidebar {
    position: static;
    width: auto;
    max-width: none;
    height: auto;
    margin: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: visible;
  }

  .sidebar-header,
  .admin-shell .sidebar-header,
  .admin-shell.sidebar-collapsed .sidebar-header {
    display: none;
  }

  .sidebar-collapsed .nav button b,
  .sidebar-collapsed .user-name,
  .sidebar-collapsed .user-role,
  .sidebar-collapsed .user-box .btn span {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }

  .sidebar-collapsed .user-box .btn {
    gap: 8px;
  }

  .sidebar-collapsed .user-box .btn span {
    max-width: none;
  }

  .sidebar-header strong {
    font-size: 18px;
  }

  .sidebar-toggle {
    display: none;
  }

  .nav,
  .sidebar-collapsed .nav,
  .admin-shell .nav,
  .admin-shell.sidebar-collapsed .nav,
  .manager-shell .nav {
    margin-top: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 52px;
    gap: 8px;
  }

  .nav button,
  .sidebar-collapsed .nav button,
  .admin-shell .nav button,
  .admin-shell.sidebar-collapsed .nav button,
  .manager-shell.sidebar-collapsed .nav button,
  .manager-shell .nav button {
    justify-content: flex-start;
    min-width: 0;
    padding: 8px;
    height: 52px;
    gap: 8px;
    border-radius: var(--radius-md);
  }

  .nav button span,
  .admin-shell .nav button span,
  .manager-shell .nav button span {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
  }

  .nav button b,
  .manager-shell .nav button b {
    min-width: 0;
    font-size: 13px;
    line-height: 1.15;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
  }

  .user-box,
  .sidebar-collapsed .user-box,
  .admin-shell .user-box,
  .admin-shell.sidebar-collapsed .user-box,
  .manager-shell .user-box {
    position: static;
    display: flex;
    min-height: 98px;
    margin-top: 10px;
    padding: 10px;
    border-radius: var(--radius-md);
  }

  .sidebar-collapsed .user-identity::before {
    content: none;
  }

  .main,
  .admin-shell .main,
  .manager-shell .main {
    width: 100%;
    min-width: 0;
    max-width: 100vw;
    padding: 10px;
    overflow-x: visible;
  }

  .manager-points-section {
    margin: 10px 0 24px;
  }

  .manager-shell .manager-view-frame {
    width: auto;
    min-height: 0;
    margin: 0;
  }

  .manager-shell .dashboard-page.manager-view-frame {
    height: auto;
  }

  .topbar {
    align-items: stretch;
    gap: 10px;
    margin-bottom: 10px;
  }

  .topbar .actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .topbar .btn {
    width: 100%;
  }

  .stats,
  .dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat {
    min-width: 0;
  }

  .section {
    width: 100%;
    max-width: 100%;
    border-radius: var(--radius-lg);
    overflow: visible;
  }

  .requests-search-toggle {
    width: 100%;
    justify-content: center;
  }

  .requests-filters,
  .requests-filters.has-reset {
    grid-template-columns: 1fr;
  }

  .admin-shell .points-section {
    height: auto;
    display: block;
    margin-bottom: 18px;
  }

  .table-wrap {
    width: 100%;
    max-width: 100%;
    overflow: visible;
  }

  .admin-shell .points-section .table-wrap {
    overflow: visible;
  }

  .modal-backdrop {
    padding: 8px;
  }

  .modal {
    width: 100%;
    max-width: 100%;
    border-radius: var(--radius-lg);
  }

  .modal-header {
    align-items: flex-start;
    padding: 14px;
  }

  .modal-header h2 {
    font-size: 22px;
    line-height: 1.15;
  }

  .modal-body {
    padding: 14px;
  }

  .permission-matrix-head {
    display: none;
  }

  .permission-matrix-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px;
  }

  .permission-cell {
    justify-content: flex-start;
    padding: 0 12px;
  }

  .fleet-map {
    min-height: 320px;
    height: 62vh;
  }

  .dashboard-page {
    gap: 12px;
    height: auto;
    min-height: 0;
  }

  .dashboard-gps-btn {
    justify-content: center;
    width: 100%;
  }

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

  .dashboard-kpi-link { min-height: 44px; }
  .dashboard-summary-card { --summary-title-height: 44px; --summary-details-height: 48px; }
  .dashboard-inline-legend .dashboard-kpi-link, .dashboard-severity-legend .dashboard-kpi-link { min-height: 44px; }
  .dashboard-severity-legend > :first-child { padding-right: 8px; }
  .dashboard-severity-legend > :last-child { padding-left: 8px; }
  .dashboard-fleet-legend .dashboard-kpi-link, .dashboard-severity-legend .dashboard-kpi-link, .dashboard-legend-item { gap: 5px; }
  .dashboard-attention {
    position: fixed;
    inset: 8px 8px 8px auto;
    width: min(400px, calc(100% - 16px));
    max-height: calc(100dvh - 16px);
  }
  .dashboard-alert-action { min-height: 44px; margin-left: auto; }
  .dashboard-alert-group > summary { min-height: 44px; padding-block: 13px; }
  .dashboard-attention-tabs { padding-inline: 4px; }
  .dashboard-attention-tabs button { padding-inline: 6px; min-height: 44px; }
  .dashboard-close, .dashboard-filter-note button { width: 44px; height: 44px; }

  .dashboard-card-head {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    min-height: auto;
    padding: 16px;
  }

  .dashboard-card-head .btn {
    width: 100%;
  }

  .dashboard-map-actions {
    width: 100%;
  }

  .dashboard-map-overlay-actions {
    width: auto;
    max-width: calc(100% - 24px);
  }

  .dashboard-map-actions .dashboard-gps-btn {
    flex: 1;
  }

  .dashboard-map-overlay-actions .dashboard-gps-btn {
    flex: 0 1 auto;
  }

  .dashboard-icon-btn {
    width: 44px;
  }

  .dashboard-map-actions .dashboard-icon-btn {
    width: 44px;
    flex: 0 0 44px;
  }

  .dashboard-page,
  .dashboard-main-grid {
    min-height: 0;
  }

  .dashboard-main-grid {
    height: auto;
    align-items: start;
  }

  .dashboard-column {
    grid-template-rows: auto auto;
  }

  .dashboard-map-card,
  .dashboard-trips-card {
    height: auto;
  }

  .dashboard-trips-card {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .dashboard-map-card {
    aspect-ratio: auto;
  }

  .dashboard-map-wrap,
  .dashboard-fleet-map {
    min-height: 330px;
    height: 330px;
  }

  .dashboard-trips-table-wrap {
    max-height: 430px;
    padding: 12px;
  }

  .dashboard-trips-table,
  .dashboard-trips-table thead,
  .dashboard-trips-table tbody,
  .dashboard-trips-table tr,
  .dashboard-trips-table td,
  .dashboard-trips-table td:nth-child(1),
  .dashboard-trips-table td:nth-child(2),
  .dashboard-trips-table td:nth-child(3),
  .dashboard-trips-table td:nth-child(4),
  .dashboard-trips-table td:nth-child(5) {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .dashboard-trips-table thead {
    display: none;
  }

  .dashboard-trips-table tr {
    padding: 12px;
    border: 1px solid #edf1ee;
    border-radius: var(--radius-lg);
    background: #fff;
  }

  .dashboard-trips-table tr + tr {
    margin-top: 10px;
  }

  .dashboard-trips-table td {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #edf1ee;
  }

  .dashboard-trips-table td:last-child {
    border-bottom: 0;
  }

  .dashboard-trips-table td::before {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
  }

  .dashboard-trips-table td:nth-child(1)::before { content: "Дата"; }
  .dashboard-trips-table td:nth-child(2)::before { content: "Отдел"; }
  .dashboard-trips-table td:nth-child(3)::before { content: "Маршрут"; }
  .dashboard-trips-table td:nth-child(4)::before { content: "Водитель"; }
  .dashboard-trips-table td:nth-child(5)::before { content: "Автомобиль"; }

  .dashboard-trips-table td:nth-child(1),
  .dashboard-trips-table td:nth-child(2),
  .dashboard-trips-table td:nth-child(3),
  .dashboard-trips-table td:nth-child(4),
  .dashboard-trips-table td:nth-child(5) {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    width: 100%;
    text-align: left;
  }

  .dashboard-department-stack {
    justify-content: flex-start;
  }

  .dashboard-summary-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .requests-table,
  .vehicles-table,
  .points-table,
  .drivers-table,
  .gps-units-table,
  #usersTable {
    display: block;
    min-width: 0;
    width: 100%;
    table-layout: auto;
  }

  .requests-table thead,
  .vehicles-table thead,
  .points-table thead,
  .drivers-table thead,
  .gps-units-table thead,
  #usersTable thead {
    display: none;
  }

  .requests-table tbody,
  .vehicles-table tbody,
  .points-table tbody,
  .drivers-table tbody,
  .gps-units-table tbody,
  #usersTable tbody {
    display: grid;
    gap: 12px;
    padding: 12px;
  }

  .requests-table tr,
  .vehicles-table tr,
  .points-table tr,
  .drivers-table tr,
  .gps-units-table tr,
  #usersTable tr {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow);
  }

  .requests-table td,
  .vehicles-table td,
  .points-table td,
  .drivers-table td,
  .gps-units-table td,
  #usersTable td {
    display: grid;
    grid-template-columns: minmax(104px, 38%) 1fr;
    gap: 10px;
    align-items: start;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 0;
    border: 0;
    text-align: left !important;
    white-space: normal !important;
    overflow-wrap: normal;
    word-break: normal;
  }

  #usersTable td:nth-child(2),
  #usersTable td:nth-child(3),
  #usersTable td:nth-child(7) {
    overflow-wrap: anywhere;
  }

  .requests-table td::before,
  .vehicles-table td::before,
  .points-table td::before,
  .drivers-table td::before,
  .gps-units-table td::before,
  #usersTable td::before {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
  }

  .requests-table td:nth-child(1)::before { content: "Номер"; }
  .requests-table td:nth-child(2)::before { content: "Дата"; }
  .requests-table td:nth-child(3)::before { content: "Заказчик"; }
  .requests-table td:nth-child(4)::before { content: "Маршрут"; }
  .requests-table td:nth-child(5)::before { content: "Срочность"; }
  .requests-table td:nth-child(6)::before { content: "Груз"; }
  .requests-table td:nth-child(7)::before { content: "Статус"; }
  .requests-table td:nth-child(8)::before { content: "Авто"; }
  .requests-table td:nth-child(9)::before { content: "Водитель"; }
  .requests-table td:nth-child(10)::before { content: "Дополнительно"; }
  .requests-table td:nth-child(11)::before { content: "Действия"; }

  .vehicles-table td:nth-child(1)::before { content: "Авто"; }
  .vehicles-table td:nth-child(2)::before { content: "Водитель"; }
  .vehicles-table td:nth-child(3)::before { content: "Вместимость"; }
  .vehicles-table td:nth-child(4)::before { content: "Статус"; }
  .vehicles-table td:nth-child(5)::before { content: "GPS"; }
  .vehicles-table td:nth-child(6)::before { content: "Собственник"; }
  .vehicles-table td:nth-child(7)::before { content: "Комментарий"; }
  .vehicles-table td:nth-child(8)::before { content: "Документы"; }
  .vehicles-table td:nth-child(9)::before { content: "Действия"; }

  .gps-units-table td:nth-child(1)::before { content: "Объект"; }
  .gps-units-table td:nth-child(2)::before { content: "Последний сигнал"; }
  .gps-units-table td:nth-child(3)::before { content: "Автомобиль MYTMS"; }
  .gps-units-table td:nth-child(4)::before { content: "Действие"; }

  .points-table td:nth-child(1)::before { content: "Контрагент"; }
  .points-table td:nth-child(2)::before { content: "Адрес"; }
  .points-table td:nth-child(3)::before { content: "Контакт"; }
  .points-table td:nth-child(4)::before { content: "Тип"; }
  .points-table td:nth-child(5)::before { content: "Статус"; }
  .points-table td:nth-child(6)::before { content: "Действия"; }

  .points-table.has-access td:nth-child(5)::before { content: "Доступ"; }
  .points-table.has-access td:nth-child(6)::before { content: "Статус"; }
  .points-table.has-access td:nth-child(7)::before { content: "Действия"; }

  .points-table td.point-actions-cell {
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: center;
  }

  .drivers-table td:nth-child(1)::before { content: "ФИО"; }
  .drivers-table td:nth-child(2)::before { content: "Телефон"; }
  .drivers-table td:nth-child(3)::before { content: "Автомобиль"; }
  .drivers-table td:nth-child(4)::before { content: "Статус"; }
  .drivers-table td:nth-child(5)::before { content: "Доступность"; }
  .drivers-table td:nth-child(6)::before { content: "Действия"; }

  #usersTable td:nth-child(1)::before { content: "Имя"; }
  #usersTable td:nth-child(2)::before { content: "Логин"; }
  #usersTable td:nth-child(3)::before { content: "Email"; }
  #usersTable td:nth-child(4)::before { content: "Роль"; }
  #usersTable td:nth-child(5)::before { content: "Должность"; }
  #usersTable td:nth-child(6)::before { content: "Отдел"; }
  #usersTable td:nth-child(7)::before { content: "Телефон"; }
  #usersTable td:nth-child(8)::before { content: "Статус"; }
  #usersTable td:nth-child(9)::before { content: "Действия"; }

  .gps-units-table td:last-child .gps-unit-actions,
  .drivers-table td:last-child .actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .vehicles-table td:last-child .btn,
  .gps-units-table td:last-child .btn,
  .drivers-table td:last-child .btn {
    width: 100%;
    min-width: 0;
  }

  .user-row-actions {
    grid-auto-columns: 44px;
    min-height: 44px;
  }

  .user-action-button {
    width: 44px;
    height: 44px;
  }

  .point-approval-status {
    width: 44px;
    height: 44px;
  }

  .vehicle-doc-actions,
  .vehicle-row-actions {
    grid-template-columns: repeat(2, 44px);
    justify-content: start;
    min-height: 44px;
  }

  .request-row-actions {
    grid-template-columns: repeat(2, 44px);
    grid-auto-rows: 44px;
    margin-inline: 0;
  }

  .request-comment-indicators {
    justify-content: start;
    min-height: 44px;
  }

  .requests-table .status-control {
    min-height: 44px;
  }

  .trip-report .table-wrap {
    overflow: visible;
  }

  .trip-table {
    display: block;
    min-width: 0;
    width: 100%;
    table-layout: auto;
  }

  .trip-table thead {
    display: none;
  }

  .trip-table tbody {
    display: grid;
    gap: 10px;
  }

  .trip-table tr {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
  }

  .trip-table td {
    display: grid;
    grid-template-columns: minmax(118px, 42%) 1fr;
    gap: 10px;
    align-items: start;
    width: auto !important;
    padding: 0;
    border: 0;
    text-align: left !important;
    overflow-wrap: normal;
    word-break: normal;
  }

  .trip-table td::before {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
  }

  .vehicle-mileage-table td:nth-child(1)::before { content: "Автомобиль"; }
  .vehicle-mileage-table td:nth-child(2)::before { content: "Пробег"; }
  .vehicle-mileage-table td:nth-child(3)::before { content: "В дороге"; }
  .vehicle-mileage-table td:nth-child(4)::before { content: "Топливо"; }
  .vehicle-mileage-table td:nth-child(5)::before { content: "GPS-точек"; }

  .route-time-table td[data-label]::before { content: attr(data-label); }

  .report-panel .trip-table tbody {
    grid-template-columns: minmax(0, 1fr);
  }

  .report-panel .trip-table tr,
  .report-panel .trip-table td {
    min-width: 0;
  }

  .report-panel .trip-table td {
    grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
    overflow-wrap: anywhere;
  }

  .trip-table td[colspan] {
    display: block;
    color: var(--muted);
    text-align: center !important;
  }

  .trip-table td[colspan]::before {
    content: none;
  }

  .address {
    max-width: none;
  }
}

@media (max-width: 1100px) {
  .gps-integrations-layout {
    grid-template-columns: 1fr;
  }

  .gps-provider-list {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }

}

@media (max-width: 600px) {
  .gps-provider-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .gps-provider-card-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .gps-provider-settings-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .gps-provider-list,
  .gps-provider-settings,
  .gps-token-form {
    grid-template-columns: 1fr;
  }

  .gps-provider-settings .wide {
    grid-column: auto;
  }

  .gps-provider-settings .btn,
  .gps-token-form .btn,
  .gps-units-head .btn {
    width: 100%;
  }

  .gps-units-head {
    align-items: stretch;
    flex-direction: column;
  }

}

@media (max-width: 560px) {
  .dashboard-kpis { grid-template-columns: 1fr; gap: 12px; }
}

@media (max-width: 1450px) {
  .trip-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .trip-utilization-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .trip-kpi {
    min-height: 96px;
  }

  .trips-section-head,
  .trips-topbar {
    align-items: stretch;
  }

  .trips-section-head {
    flex-direction: column;
  }

  .trip-review-count {
    width: fit-content;
  }

  .trips-table-wrap {
    overflow: visible;
  }

  .trips-table {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .trips-table thead {
    display: none;
  }

  .trips-table tbody {
    display: grid;
    gap: 12px;
    padding: 12px;
  }

  .trips-table tr {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
  }

  .trips-table td {
    display: grid;
    grid-template-columns: minmax(118px, 40%) 1fr;
    gap: 10px;
    align-items: start;
    width: auto !important;
    padding: 0;
    border: 0;
    text-align: left !important;
  }

  .trips-table td::before {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
  }

  .trips-table td:nth-child(1)::before { content: "Автомобиль"; }
  .trips-table td:nth-child(2)::before { content: "Начало"; }
  .trips-table td:nth-child(3)::before { content: "Завершение"; }
  .trips-table td:nth-child(4)::before { content: "Маршрут"; }
  .trips-table td:nth-child(5)::before { content: "Заявки"; }
  .trips-table td:nth-child(6)::before { content: "Категория"; }
  .trips-table td:nth-child(7)::before { content: "Пробег"; }
  .trips-table td:nth-child(8)::before { content: "GPS"; }
  .trips-table td:nth-child(9)::before { content: "Действия"; }

  .trips-table td[colspan] {
    display: block;
  }

  .trips-table td[colspan]::before {
    content: none;
  }

  .trip-totals,
  .trip-modal-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .trip-kpis {
    grid-template-columns: 1fr;
  }

  .trip-utilization-grid {
    grid-template-columns: 1fr;
  }

  .trip-utilization-controls,
  .trip-period-switch,
  .trip-period-picker {
    width: 100%;
  }

  .trip-utilization-controls {
    flex-wrap: wrap;
  }

  .trip-period-picker {
    min-width: 0;
  }

  .trip-period-switch button {
    flex: 1;
  }

  .trip-utilization-card-head,
  .trip-utilization-meta {
    align-items: flex-start;
  }

  .trip-totals {
    padding: 12px;
  }

  .trips-table td {
    grid-template-columns: 1fr;
  }
}

.btn,
.login-panel .btn,
.admin-shell .btn,
.dashboard-page .btn,
.manager-card-actions .btn,
.nav button,
.admin-shell .nav button,
.manager-shell .nav button,
.sidebar-toggle,
.admin-shell .sidebar-toggle,
.manager-shell .sidebar-toggle,
.archive-toggle,
.admin-shell .admin-archive-toggle,
.manager-archive-toggle,
.dashboard-gps-btn,
.dashboard-icon-btn,
.dashboard-route-btn,
select,
.filter-dropdown-trigger,
.date-filter-trigger,
.mail-admin-picker summary,
.status-control,
.vehicle-status-control,
.vehicle-driver-control,
.gps-vehicle-pill,
.vehicle-doc-btn,
.driver-availability-pill,
.mail-plan-status,
.mail-plan-table input {
  border-radius: var(--control-radius);
}

.filter-dropdown-menu,
.date-filter-menu,
.vehicle-driver-menu,
.mail-admin-picker-panel,
.leaflet-popup-content-wrapper,
.leaflet-control-layers {
  border-radius: var(--radius-lg);
}

.filter-dropdown-menu button,
.date-filter-head button,
.date-filter-grid button,
.date-filter-actions button,
.vehicle-driver-menu button,
.badge,
.leaflet-tooltip {
  border-radius: var(--radius-sm);
}

.leaflet-touch .leaflet-bar a:first-child {
  border-top-left-radius: var(--radius-sm);
  border-top-right-radius: var(--radius-sm);
}

.leaflet-touch .leaflet-bar a:last-child {
  border-bottom-left-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
}

@media (max-width: 720px) {
  .request-attachments-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .request-attachments-toolbar .btn {
    width: 100%;
  }

  .request-attachment-draft-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .request-attachment-draft-controls .btn {
    width: 100%;
  }

  .request-attachment-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .request-attachment-actions {
    grid-column: 1 / -1;
  }

  .request-attachment-actions .btn {
    flex: 1;
  }

  .about-dialog-header {
    padding: 16px;
  }

  .about-dialog-header > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .about-dialog-body {
    grid-template-columns: 1fr;
    grid-template-areas:
      "summary"
      "legal"
      "support";
    padding: 12px;
  }

  .about-product-summary,
  .contact-owner-grid {
    grid-template-columns: 1fr;
  }

  .about-product-summary > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .about-legal-section {
    padding: 16px;
  }

  .about-contact-link {
    min-height: 44px;
  }

  .about-section-heading,
  .contact-owner-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .contact-owner-actions .btn {
    width: 100%;
  }

  .replacement-candidate {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 12px;
  }

  .replacement-candidate-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}
.operation-load-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 96px;
  padding: 20px;
  color: var(--muted);
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}

.operation-load-state.is-error { color: #b42318; }
.request-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 8px;
}
.request-pagination .btn {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 8px;
}
.request-pagination span { text-align: center; font-size: 13px; }

.requests-page .topbar,
.directory-page .topbar,
.trips-workspace .topbar {
  flex: 0 0 auto;
  min-height: 64px;
  padding: 12px 16px;
  margin-bottom: 12px;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.requests-page .topbar > .requests-heading:first-child,
.directory-page .topbar > .directory-heading:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  min-width: 0;
  width: 240px;
  max-width: 100%;
  flex-shrink: 0;
}

.requests-heading > span {
  font-size: 13px;
}

.requests-page .topbar > .actions,
.directory-page .topbar > .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  margin-left: auto;
}

.requests-page .topbar .btn,
.directory-page .topbar .btn {
  min-height: 40px;
  padding: 8px 12px;
  gap: 8px;
  font-size: 13px;
  line-height: 20px;
  box-shadow: none;
}

.requests-page .topbar .ui-icon,
.directory-page .topbar .ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.directory-page .directory-heading h2 {
  overflow-wrap: anywhere;
}

.vehicles-page .topbar > .directory-heading:first-child {
  width: auto;
}

.vehicles-page .topbar .vehicle-gps-sync {
  width: 152px;
  flex-shrink: 0;
  white-space: nowrap;
}

.vehicles-page .directory-heading { display: flex; align-items: center; gap: 12px; }
.vehicle-heading-text { display: flex; align-items: baseline; gap: 8px; min-width: 0; white-space: nowrap; }
.vehicle-list-count { flex-shrink: 0; color: var(--muted); font-size: 12px; line-height: 18px; }
.vehicle-owner-trigger { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 4px; max-width: 100%; min-height: 32px; padding: 0; border: 0; border-radius: var(--radius-sm); color: inherit; background: transparent; font: inherit; text-transform: inherit; cursor: pointer; }
.vehicle-owner-trigger > span { min-width: 0; overflow-wrap: anywhere; }
.vehicle-owner-trigger .ui-icon { width: 14px; height: 14px; flex: 0 0 14px; }
.vehicle-owner-trigger:hover, .vehicle-owner-trigger.is-active, .vehicle-owner-trigger[aria-expanded="true"] { color: var(--brand-dark); }
.vehicle-owner-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 3px; background: var(--brand-soft); border-radius: 4px; font-size: 11px; line-height: 16px; font-weight: 600; }
.vehicle-owner-trigger:focus-visible, .vehicle-owner-menu input:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.vehicle-owner-trigger-mobile { display: none; }
.vehicle-owner-menu { position: fixed; z-index: 120; display: flex; flex-direction: column; width: 250px; max-width: calc(100vw - 16px); padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); box-shadow: 0 4px 16px #12251c1a; font-size: 13px; line-height: 20px; overflow-y: auto; }
.vehicle-owner-menu[hidden] { display: none; }
.vehicle-owner-order { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 0 0 6px; border: 0; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.vehicle-owner-order label { position: relative; min-width: 0; cursor: pointer; }
.vehicle-owner-order input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.vehicle-owner-order span { display: flex; align-items: center; justify-content: center; min-height: 30px; padding: 4px; border: 1px solid var(--line); border-radius: 4px; font-size: 13px; line-height: 20px; }
.vehicle-owner-order input:checked + span { color: var(--brand-dark); background: var(--brand-soft); border-color: var(--brand); }
.vehicle-owner-order input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.vehicle-owner-choice { display: flex; align-items: flex-start; gap: 8px; min-height: 32px; margin: 0; padding: 6px; border-radius: 4px; font-size: 13px; line-height: 20px; font-weight: 400; cursor: pointer; }
.vehicle-owner-choice:hover { background: var(--brand-soft); }
.vehicle-owner-choice input { flex: 0 0 16px; width: 16px; height: 16px; margin: 2px 0; padding: 0; accent-color: var(--brand); }
.vehicle-owner-choice span { min-width: 0; overflow-wrap: anywhere; }
.vehicle-owner-all { flex-shrink: 0; margin-top: 4px; font-weight: 600; }
.vehicle-owner-choices { flex: 1 1 auto; min-height: 32px; overflow-y: auto; overscroll-behavior: contain; }
.vehicle-owner-menu-actions { display: flex; justify-content: space-between; gap: 8px; flex-shrink: 0; padding-top: 6px; margin-top: 4px; border-top: 1px solid var(--line); }
.vehicle-owner-menu-actions .btn { min-height: 32px; padding: 4px 10px; font-size: 13px; box-shadow: none; }
.vehicle-owner-menu-actions .vehicle-owner-reset { background: transparent; border-color: transparent; color: var(--muted); }
.vehicle-owner-menu-actions .vehicle-owner-reset:hover { color: var(--brand-dark); }
@media (max-width: 1100px) {
  .vehicle-owner-trigger-mobile { display: inline-flex; justify-content: center; flex-wrap: nowrap; min-width: 44px; height: 44px; padding: 0 8px; margin-left: auto; flex-shrink: 0; border: 1px solid var(--line); }
  .vehicle-owner-choice { min-height: 44px; padding-block: 12px; }
  .vehicle-owner-menu-actions .btn, .vehicle-owner-order span { min-height: 44px; }
}

.vehicle-gps-sync[data-sync-status="success"] {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.vehicle-gps-sync[data-sync-status="error"] {
  background: #fde8e8;
  color: #b4232d;
}

.points-page > .points-section {
  margin: 0;
}

.users-tabs {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.users-page .topbar > .users-tabs:first-child {
  min-height: 40px;
}

.users-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.users-tabs button[aria-selected="true"] {
  color: var(--brand-dark);
  border-bottom-color: var(--brand);
}

.users-tabs button span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.users-tools,
.points-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 360px;
  max-width: 500px;
  min-width: 0;
  margin-left: auto;
}

.users-search,
.points-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding-left: 10px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  color: var(--muted);
  background: #fff;
}

.users-search input,
.points-search input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 8px 8px 8px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  box-shadow: none;
  outline: none;
}

.users-search:focus-within,
.points-search:focus-within,
.users-tabs button:focus-visible,
.users-list-scroll:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.users-page .users-tools .btn {
  flex: 0 0 128px;
}

.points-page .points-tools .btn {
  flex: 0 0 auto;
}

.users-panel {
  margin: 0;
}

.users-search-result,
.points-search-result {
  flex: 0 0 auto;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.users-search-result[hidden],
.points-search-result[hidden] {
  display: none;
}

.users-empty,
.points-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

@media (min-width: 1101px) {
  .main:has(> .users-page) {
    padding-bottom: 16px;
  }

  .users-page {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 32px);
    min-height: 0;
  }

  .users-page > .users-panel {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
  }

  .users-page .users-list-scroll {
    flex: 1 1 0;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  .users-page th {
    position: sticky;
    top: 0;
    z-index: 1;
  }
}

@media (max-width: 1100px) {
  .users-page .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .users-tabs {
    justify-content: flex-start;
    gap: 20px;
  }

  .users-tabs button {
    min-height: 44px;
  }

  .users-tools,
  .points-tools {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    margin: 0;
    flex-wrap: wrap;
    gap: 10px;
  }

  .users-search,
  .points-search {
    flex: 1 1 200px;
  }

  .users-search input,
  .points-search input {
    height: 42px;
  }

  .users-page .users-tools .btn {
    flex: 1 0 128px;
  }

  .points-page .points-tools .btn {
    flex: 1 0 152px;
    width: auto;
  }

  .users-page .users-list-scroll {
    overflow: visible;
  }
}

@media (min-width: 1101px) {
  .main:has(> .points-page) {
    padding-bottom: 16px;
  }

  .manager-shell .main:has(> .points-page) {
    padding-bottom: 0;
  }

  .points-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 32px);
    min-height: 0;
  }

  .points-page > .points-section {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    height: auto;
    min-height: 0;
  }

  .points-page .table-wrap {
    flex: 1 1 0;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
  }
}

.requests-page #toggleOtherRequests {
  width: 180px;
  flex-shrink: 0;
}

/* Reserve the longer label's width and wrapping in both list modes. */
.request-list-switch-label {
  display: grid;
  min-width: 0;
  width: 100%;
}

.request-list-switch-label > span {
  grid-area: 1 / 1;
}

.request-list-switch-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.request-list-switch-size {
  visibility: hidden;
  padding-left: 26px;
}

.requests-page .requests-search-toggle {
  width: 120px;
  flex-shrink: 0;
}

.requests-page .requests-search-toggle.is-active {
  background: var(--brand-soft);
  color: var(--brand-dark);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.requests-search-toggle strong {
  min-width: 20px;
  height: 20px;
  padding-inline: 4px;
  font-size: 12px;
}

.requests-page .requests-filters {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.requests-page .requests-section,
.requests-page .request-table-wrap {
  width: 100%;
  max-width: 100%;
}

.main:has(> .requests-page) {
  padding-bottom: 16px;
}

.requests-page:is(.is-current, .is-archive) {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 32px);
  min-height: 0;
}

.requests-page:is(.is-current, .is-archive) > .requests-section {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  margin-bottom: 0;
}

.requests-page .requests-filter-panel {
  flex: 0 0 auto;
  max-height: min(32vh, 260px);
  overflow: auto;
  overscroll-behavior: contain;
}

.requests-page .filter-dropdown-menu,
.requests-page .date-filter-menu {
  position: fixed;
}

.requests-archive {
  flex: 1 1 0;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: inherit;
}

.requests-page.is-current .manager-current {
  flex: 1 1 0;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  border-radius: inherit;
}

.requests-filter-panel.is-open + .requests-archive,
.requests-page.is-current .requests-filter-panel.is-open + .manager-current {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.requests-archive .request-table-wrap,
.requests-page.is-current .request-table-wrap {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.requests-archive th,
.requests-page.is-current th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.requests-archive .request-pagination {
  padding: 8px;
  border-top: 1px solid var(--line);
}

@media (min-width: 1101px) {
  .manager-shell .main:has(> .requests-page) {
    padding-bottom: 0;
  }

  .requests-page.is-current .requests-table td {
    padding-block: 8px;
  }
}

@media (max-width: 1100px) {
  .requests-page .topbar,
  .directory-page .topbar {
    padding: 10px;
  }

  .requests-page .topbar > .requests-heading:first-child,
  .directory-page .topbar > .directory-heading:first-child {
    min-height: 28px;
    width: 100%;
  }

  .requests-page .topbar > .actions,
  .directory-page .topbar > .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .points-page .topbar > .actions {
    grid-template-columns: 1fr;
  }

  .vehicles-page .topbar > .directory-heading:first-child {
    width: 100%;
  }

  .vehicles-page .topbar .vehicle-gps-sync {
    width: 100%;
    min-width: 0;
  }

  .requests-page.is-current .requests-table tr {
    padding-block: 10px;
    row-gap: 6px;
  }

  .requests-page.is-current .requests-table td {
    row-gap: 6px;
  }

  .requests-page .topbar .btn,
  .directory-page .topbar .btn {
    min-height: 44px;
    padding: 8px;
  }

  .requests-page #toggleOtherRequests,
  .requests-page .requests-search-toggle {
    width: 100%;
  }

  .requests-page:is(.is-current, .is-archive) {
    height: calc(100dvh - 20px);
    min-height: 520px;
  }

  .requests-page .requests-filters {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  }

  .requests-archive .request-pagination .btn {
    min-width: 44px;
    min-height: 44px;
  }
}


/* Trips: one viewport, independent workspaces and internally scrolling lists. */
.main:has(> .trips-workspace) { padding: 16px 32px; min-height: 0; overflow: hidden; }
.trips-workspace { height: calc(100dvh - 32px); min-height: 0; display: flex; flex-direction: column; }
.trips-workspace .trips-workspace-head { flex-direction: row; justify-content: flex-start; gap: 8px 28px; min-height: 60px; padding: 0 16px; margin-bottom: 12px; flex: 0 0 auto; }
.trips-workspace-head > .user-action-button { margin-left: auto; flex-shrink: 0; }
.trip-workspace-tabs { flex: 0 0 auto; }
.trip-workspace-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; min-width: 0; padding: 0 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.trip-workspace-toolbar { flex: 0 0 auto; display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px 12px; padding: 14px 0; }
.trip-filter { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1 1 180px; max-width: 300px; }
.trip-filter > span { font-size: 12px; line-height: 16px; color: var(--muted); }
.trip-filter select { min-width: 0; width: 100%; height: 36px; padding: 6px 26px 6px 10px; font: inherit; font-size: 13px; line-height: 22px; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-md); background-color: white; }
.trip-period-control { flex: 0 0 168px; }
.trips-workspace .trip-period-picker { width: 100%; min-width: 0; }
.trips-workspace .trip-period-trigger { min-width: 0; width: 100%; height: 36px; min-height: 36px; padding: 6px 10px; font-size: 13px; line-height: 22px; }
.trips-workspace .trip-period-switch { height: 36px; padding: 2px; gap: 2px; border-radius: var(--radius-md); }
.trips-workspace .trip-period-switch button { height: 30px; min-width: 72px; padding: 4px 8px; font-size: 12px; }
.trip-review-filter { display: flex; align-items: center; align-self: flex-end; gap: 8px; min-height: 36px; font-size: 13px; }
.trip-review-filter input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); }
.trip-workspace-metrics { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 12px 24px; margin: 0; padding: 12px 0; border-top: 1px solid var(--line); }
.trip-workspace-metrics > div { min-width: 100px; display: flex; flex-direction: column; gap: 4px; }
.trip-workspace-metrics dt { color: var(--muted); font-size: 12px; line-height: 16px; }
.trip-workspace-metrics dd { margin: 0; font-size: 22px; line-height: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.trips-workspace .is-warning { color: #915500; }
.trip-list-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; border-top: 1px solid var(--line); }
.trips-workspace table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.trips-workspace th { position: sticky; top: 0; z-index: 1; background: #f6f8f7; color: var(--muted); font-weight: 500; font-size: 12px; line-height: 18px; }
.trips-workspace :is(th, td) { padding: 10px 12px; text-align: left; border-bottom: 1px solid #edf1ee; overflow-wrap: anywhere; }
.trips-workspace td { height: 60px; font-size: 13px; line-height: 19px; vertical-align: middle; }
.trips-workspace td strong { font-weight: 600; }
.trip-log-table { min-width: 720px; }
.trip-log-table th:nth-child(1) { width: 18%; }
.trip-log-table th:nth-child(2) { width: 13%; }
.trip-log-table th:nth-child(3) { width: 28%; }
.trip-log-table th:nth-child(4) { width: 12%; }
.trip-log-table th:nth-child(5) { width: 16%; }
.trip-log-table th:nth-child(6) { width: 13%; }
.trip-log-table [data-trip-row] { cursor: pointer; }
.trip-log-table [data-trip-row]:hover { background: #f7faf8; }
.trip-log-table tr.is-selected { background: #edf6f0; }
.trip-log-table tr.is-selected td:first-child { box-shadow: inset 3px 0 var(--brand); }
.trip-linked-numbers { display: flex; flex-wrap: wrap; gap: 3px 10px; margin-top: 4px; color: var(--muted); font-size: 12px; }
.trip-linked-numbers .request-number-link { font-size: 12px; }
.trip-log-table tr.needs-review td:first-child { box-shadow: inset 2px 0 #d79e46; }
.trip-cell-secondary { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 17px; }
.trip-time-range { white-space: nowrap; font-variant-numeric: tabular-nums; }
.trip-route-short { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.trips-workspace .trip-category { min-height: 24px; padding: 3px 6px; white-space: normal; overflow-wrap: normal; font-size: 11px; line-height: 16px; }
.trips-workspace .trip-gps-status { min-height: 24px; font-size: 11px; line-height: 16px; white-space: normal; }
.trips-workspace .btn.trip-review-button { display: block; min-height: 28px; min-width: 0; width: auto; margin-top: 4px; padding: 3px 0; font-size: 12px; white-space: nowrap; border: 0; box-shadow: none; background: none; color: #84520b; text-decoration: underline; text-underline-offset: 3px; }
.trips-workspace .user-action-button { width: 32px; height: 32px; min-height: 32px; }
.trip-log-table :is(td, th):last-child { text-align: left; }
.trip-load-table { min-width: 740px; }
.trip-load-table th:first-child { width: 22%; }
.trip-load-table th:nth-child(2) { width: 20%; }
.trip-load-table th:nth-child(3) { width: 18%; }
.trips-workspace th { overflow-wrap: normal; }
.trip-load-table:where(:has(th:nth-child(7))) { min-width: 1000px; }
.trip-load-table:has(th:nth-child(7)) th:nth-child(-n+2) { width: 18%; }
.trip-load-table:has(th:nth-child(7)) th:nth-child(3) { width: 16%; }
.trip-load-table :is(th, td):nth-child(n+4) { text-align: right; font-variant-numeric: tabular-nums; }
.trip-vehicle-link { padding: 0; border: 0; background: none; color: var(--brand-dark); cursor: pointer; font: inherit; font-weight: 600; text-align: left; }
.trip-vehicle-link:hover { text-decoration: underline; }
.trip-load-meter { position: relative; display: grid; place-items: center; width: 144px; max-width: 100%; height: 22px; box-sizing: border-box; overflow: hidden; border: 1px solid var(--meter-border); border-radius: 4px; background: var(--meter-track); color: #203329; font-size: 12px; line-height: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.trip-load-meter.is-low { --meter-track: #fceced; --meter-fill: #edb2b2; --meter-border: #e3b0b0; }
.trip-load-meter.is-moderate { --meter-track: #fff0e2; --meter-fill: #efbc88; --meter-border: #e5bc92; }
.trip-load-meter.is-medium { --meter-track: #faf3d5; --meter-fill: #ead477; --meter-border: #dfcc8d; }
.trip-load-meter.is-high { --meter-track: #e6f3e9; --meter-fill: #90c9a2; --meter-border: #b1d3bc; }
.trip-load-meter.is-unavailable { --meter-track: #f1f4f2; --meter-border: #dce3de; color: #55665c; font-size: 11px; font-weight: 400; }
.trip-load-meter > i { position: absolute; inset: 0 auto 0 0; background: var(--meter-fill); }
.trip-load-label { position: relative; white-space: nowrap; }
.trips-workspace .trip-list-empty { height: 140px; text-align: center; color: var(--muted); }
.trip-workspace-footer { flex: 0 0 auto; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 20px; min-height: 44px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 18px; }
.trip-workspace-footer > span:first-child { margin-right: auto; }
.trip-workspace-footer b { color: var(--ink); font-weight: 500; }
.trips-workspace :is(button, select, input):focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.reports-workspace .trip-filter { flex-basis: 140px; max-width: 240px; }
.reports-workspace .report-kind-filter { flex-basis: 230px; max-width: 280px; }
.reports-workspace .trip-period-control { flex: 0 0 152px; }
.report-context { flex: 0 0 auto; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; padding: 12px 0 0; border-top: 1px solid var(--line); }
.report-context h2 { margin: 0 auto 0 0; font-size: 16px; line-height: 22px; font-weight: 600; overflow-wrap: anywhere; }
.report-context > span { color: var(--muted); font-size: 12px; line-height: 18px; }
.reports-workspace .trip-workspace-metrics { border-top: 0; padding: 10px 0 12px; gap: 12px 32px; }
.reports-workspace .trip-workspace-metrics dd { font-size: 20px; line-height: 26px; }
.report-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.reports-workspace .btn.report-export { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 6px 10px; flex: 0 0 auto; font-size: 12px; line-height: 22px; white-space: nowrap; }
.report-export svg { width: 18px; height: 18px; }
.reports-workspace .report-results > .table-wrap { padding: 0; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
.reports-workspace .report-results td { height: 54px; }
.reports-workspace .report-results tr:hover { background: #f8faf9; }
.reports-workspace .report-results :is(th, td) { min-width: 0; white-space: normal; }
.reports-workspace .report-summary-table { min-width: 0; }
.reports-workspace .report-summary-table th:last-child,
.reports-workspace .report-summary-table td:last-child { width: 32%; text-align: right; font-variant-numeric: tabular-nums; }
.report-count { display: flex; align-items: center; justify-content: flex-end; gap: 20px; }
.report-count > strong { min-width: 4ch; flex: 0 0 auto; }
.report-count-track { display: block; width: 180px; max-width: 100%; height: 6px; border-radius: 2px; overflow: hidden; background: #eef2f4; }
.report-count-track > i { display: block; height: 100%; background: #739bb6; }
.reports-workspace .vehicle-mileage-table :is(th, td) { width: auto; }
.reports-workspace .vehicle-mileage-table { min-width: 700px; }
.reports-workspace .vehicle-mileage-table th:first-child { width: 24%; }
.reports-workspace .vehicle-mileage-table th:nth-child(2) { width: 20%; }
.reports-workspace .vehicle-mileage-table :is(th, td):nth-child(n+3) { text-align: right; font-variant-numeric: tabular-nums; }
.report-no-gps { display: block; color: #915500; font-size: 11px; line-height: 16px; }
.reports-workspace .route-time-table { min-width: 760px; }
.reports-workspace .route-time-table th:first-child { text-align: left; }
.reports-workspace .route-time-table :is(th, td):nth-child(n+3) { text-align: right; font-variant-numeric: tabular-nums; }
.reports-workspace .route-time-value { font-weight: 600; }
.reports-workspace .route-time-value small { font-weight: 400; }
.trip-drilldown { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; }
.trip-drilldown .field { margin: 0; }

@media (min-width: 601px) and (max-width: 1100px) {
  .reports-workspace .route-time-table { display: table; table-layout: fixed; }
  .reports-workspace .route-time-table thead { display: table-header-group; }
  .reports-workspace .route-time-table tbody { display: table-row-group; }
  .reports-workspace .route-time-table tr { display: table-row; border: 0; background: none; }
  .reports-workspace .route-time-table td { display: table-cell; padding: 10px 12px; border-bottom: 1px solid #edf1ee; }
  .reports-workspace .route-time-table td::before,
  .reports-workspace .vehicle-mileage-table td::before { content: none; }
}
.modal:has(.trip-classification-form) { max-height: calc(100dvh - 32px); display: flex; flex-direction: column; }
.modal:has(.trip-classification-form) .modal-header { flex: 0 0 auto; }
.trip-classification-form { min-height: 0; overflow: auto; }

.parking-modal { width: min(740px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; }
.parking-modal .modal-header { flex: 0 0 auto; padding: 10px 14px; }
.parking-modal .modal-header h2 { margin: 0; font-size: 20px; }
.parking-settings { padding: 14px; overflow: auto; min-height: 0; }
.parking-settings .field, .trip-work-decision .field { margin-bottom: 12px; min-width: 0; }
.parking-settings .field input, .parking-settings .field select { min-width: 0; height: 38px; padding: 6px 10px; font-size: 14px; line-height: normal; }
.parking-settings textarea, .trip-work-decision textarea { min-height: 58px; resize: vertical; }
.parking-state { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 12px; font-size: 14px; }
.parking-state span, .parking-evidence, .parking-effective-note { color: var(--muted); font-size: 13px; }
.parking-evidence { margin: -4px 0 12px; }
.parking-coordinates { display: grid; grid-template-columns: 1fr 1fr 100px; gap: 12px; }
.parking-map { height: 190px; width: 100%; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 12px; background: #f1f5f3; }
.parking-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.parking-actions .btn { min-height: 36px; font-size: 14px; padding: 7px 10px; white-space: normal; }
.parking-settings .error, .trip-work-detail .error { margin: 8px 0; }
.parking-settings [hidden], .trip-work-detail [hidden] { display: none !important; }
.parking-history { margin-top: 12px; font-size: 13px; }
.parking-history summary, .trip-work-decision summary { cursor: pointer; padding: 8px 0; }
.parking-history p { border-top: 1px solid var(--line); padding: 8px 0; margin: 0; overflow-wrap: anywhere; }
.trip-work-detail { border-block: 1px solid var(--line); padding: 12px 0; margin-bottom: 12px; font-size: 14px; }
.trip-work-detail h3 { margin: 0 0 8px; font-size: 16px; }
.trip-work-detail p { margin: 6px 0 12px; overflow-wrap: anywhere; }
.trip-work-detail dl { margin: 12px 0; }
.trip-work-detail dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.trip-work-detail dt { color: var(--muted); }
.trip-work-detail dd { margin: 0; text-align: right; }
.trip-work-decision input { font-size: 14px; }
.trip-parking-review { color: #9a4b00; }
.trip-parking-confirmed, .trip-parking-manual { color: #176d3c; }
@media (max-width: 600px) {
  .parking-coordinates { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 10px; }
  .parking-settings .field input, .parking-settings .field select, .parking-actions .btn { min-height: 44px; }
  .parking-map { height: 160px; }
  .trip-work-detail dl > div { flex-wrap: wrap; gap: 2px 8px; }
  .trip-work-detail dd { text-align: left; }
}
@media (max-width: 1100px) {
  .app-shell:has(.trips-workspace) { height: 100dvh; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
  .app-shell:has(.trips-workspace) .sidebar { flex: 0 0 56px; height: 56px; margin: 8px 12px 0; padding: 4px; flex-direction: row; gap: 4px; min-height: 0; overflow: hidden; }
  .app-shell:has(.trips-workspace) .nav { display: flex; flex: 1; min-width: 0; gap: 4px; overflow-x: auto; overflow-y: hidden; margin: 0; }
  .app-shell:has(.trips-workspace) .nav button { flex: 0 0 auto; width: auto; height: 44px; padding: 8px; }
  .app-shell:has(.trips-workspace) .nav button b { white-space: nowrap; }
  .app-shell:has(.trips-workspace) .user-box { flex: 0 0 auto; height: 44px; min-height: 0; margin: 0; padding: 0; background: none; }
  .app-shell:has(.trips-workspace) .user-identity, .app-shell:has(.trips-workspace) .user-box .btn span { display: none; }
  .app-shell:has(.trips-workspace) .user-box .btn { width: 44px; height: 44px; min-height: 44px; margin: 0; padding: 10px; }
  .main:has(> .trips-workspace) { flex: 1; padding: 12px; }
  .trips-workspace { height: 100%; }
  .trip-filter select, .trips-workspace .trip-period-trigger, .trip-review-filter { min-height: 44px; height: 44px; }
  .trips-workspace .trip-period-switch { height: 44px; }
  .trips-workspace .trip-period-switch button { height: 38px; }
  .trips-workspace .user-action-button, .trips-workspace .btn.trip-review-button { min-width: 44px; min-height: 44px; height: 44px; }
}
@media (max-width: 600px) {
  .main:has(> .trips-workspace) { padding: 8px; }
  .app-shell:has(.trips-workspace) .sidebar { margin-inline: 8px; }
  .trips-workspace .trips-workspace-head { min-height: 54px; padding: 4px 12px; margin-bottom: 8px; }
  .trip-workspace-tabs { gap: 20px; }
  .trip-workspace-tabs button { min-height: 44px; padding: 10px 0; }
  .trip-workspace-panel { padding: 0 12px; }
  .trip-workspace-toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px 0; }
  .trip-filter { max-width: none; width: 100%; }
  .trip-period-control { width: 100%; }
  .trip-review-filter { grid-column: 1 / -1; }
  .trip-workspace-toolbar > .trip-period-switch { width: 100%; }
  .trips-workspace .trip-period-switch button { min-width: 0; flex: 1; padding: 4px; }
  .trip-workspace-metrics { flex-wrap: nowrap; overflow-x: auto; gap: 16px; padding: 10px 0; }
  .trip-workspace-metrics > div { flex: 0 0 auto; min-width: 80px; }
  .trip-workspace-metrics dt { font-size: 11px; line-height: 15px; }
  .trip-workspace-metrics dd { font-size: 18px; line-height: 24px; overflow-wrap: anywhere; }
  .trips-workspace :is(.trip-log-table, .trip-load-table) { display: block; min-width: 0; table-layout: auto; }
  .trips-workspace thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .trips-workspace tbody { display: block; }
  .trips-workspace tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .trips-workspace td { display: block; height: auto; min-width: 0; padding: 0; border: 0; text-align: left !important; }
  .trips-workspace td::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; line-height: 15px; }
  .trip-log-table td:nth-child(3) { grid-column: 1 / -1; }
  .trips-workspace td[colspan] { grid-column: 1 / -1; height: auto; padding: 20px 0; }
  .trip-log-table tr.needs-review td:first-child { box-shadow: none; }
  .trip-log-table tr.needs-review { border-left: 2px solid #d79e46; padding-left: 8px; }
  .trip-workspace-footer { gap: 4px 12px; padding: 8px 0; font-size: 11px; }
  .trip-vehicle-link { min-height: 28px; }
  .trip-modal-summary { grid-template-columns: 1fr; }
  .reports-workspace .report-data-table,
  .reports-workspace .route-time-table { display: block; min-width: 0; }
  .reports-workspace .route-time-table tbody { display: block; }
  .reports-workspace .route-time-table tr { border: 0; border-radius: 0; border-bottom: 1px solid var(--line); background: none; padding: 12px 0; }
  .reports-workspace .route-time-table td { display: block; }
  .reports-workspace .route-time-table td:nth-child(-n+2) { grid-column: 1 / -1; }
  .reports-workspace td[data-label]::before { content: attr(data-label); }
  .reports-workspace .report-results td { height: auto; }
  .reports-workspace .report-summary-table tr { grid-template-columns: minmax(0, 1fr) 88px; }
  .reports-workspace .report-summary-table td:last-child { width: auto; }
  .reports-workspace .report-count { gap: 8px; justify-content: flex-start; flex-direction: column-reverse; align-items: flex-start; }
  .reports-workspace .report-count-track { width: 64px; height: 4px; }
  .reports-workspace .trip-filter { max-width: none; }
  .reports-workspace .trip-filter:has(#reportKind) { grid-column: 1 / -1; }
  .reports-workspace .report-kind-filter > span { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .reports-workspace .report-actions { margin: 0; }
  .reports-workspace .btn.report-export { flex: 1; min-height: 44px; }
  .reports-workspace .trip-workspace-metrics { gap: 12px; padding: 8px 0; }
  .reports-workspace .trip-workspace-metrics > div { min-width: 0; flex: 1 1 0; }
  .reports-workspace .trip-workspace-metrics dt { min-height: 30px; }
  .reports-workspace .trip-workspace-metrics dd { font-size: 18px; line-height: 24px; }
  .report-context { padding: 10px 0 0; }
  .report-context h2 { font-size: 16px; line-height: 22px; }
}
@media (max-height: 500px) {
  .trips-workspace .trips-workspace-head { min-height: 46px; padding-block: 0; margin-bottom: 8px; }
  .trip-workspace-tabs button { min-height: 44px; padding-block: 8px; }
  .trip-workspace-toolbar { display: flex; flex-wrap: nowrap; padding-block: 8px; overflow: auto; }
  .trip-workspace-toolbar > * { flex: 0 0 auto; }
  .trip-workspace-toolbar .trip-filter { width: 160px; flex: 0 0 160px; }
  .trip-workspace-metrics { flex-wrap: nowrap; display: flex; overflow-x: auto; padding: 8px 0; }
  .trip-workspace-metrics > div { flex: 0 0 auto; flex-direction: row; align-items: baseline; gap: 8px; }
  .trip-workspace-metrics dd { font-size: 18px; line-height: 24px; }
  .trip-workspace-footer { min-height: 32px; padding: 4px 0; }
  .reports-workspace .report-context { padding-top: 6px; }
  .reports-workspace .trip-workspace-toolbar { padding-block: 6px; }
  .reports-workspace .trip-workspace-metrics { padding: 4px 0; }
  .reports-workspace .trip-workspace-metrics dd { font-size: 18px; line-height: 24px; }
}
@media (max-width: 1100px) and (max-height: 500px) {
  .main:has(> .trips-workspace) { padding-block: 8px; }
}

/* Trip detail: non-modal alongside the list on desktop, a focused dialog on small screens. */
.trip-panel-open > .trip-workspace-panel { margin-right: calc(var(--trip-detail-width) + 12px); }
.trip-detail-backdrop { background: none; pointer-events: none; padding: 0; }
.trip-detail-panel.modal { position: fixed; top: var(--trip-detail-top); right: var(--trip-detail-right); width: var(--trip-detail-width); height: var(--trip-detail-height); max-height: none; margin: 0; display: flex; flex-direction: column; pointer-events: auto; box-shadow: none; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.trip-detail-panel .modal-header { padding: 14px 16px 10px; align-items: flex-start; gap: 12px; }
.trip-detail-panel .modal-header > div { min-width: 0; }
.trip-detail-panel .modal-header h2 { margin: 0; font-size: 20px; line-height: 26px; overflow-wrap: anywhere; }
.trip-detail-panel .modal-header p { margin: 3px 0 0; font-size: 12px; line-height: 18px; color: var(--muted); overflow-wrap: anywhere; }
.trip-detail-panel .user-action-button { flex: 0 0 32px; width: 32px; height: 32px; min-height: 32px; }
.trip-detail-panel .trip-classification-form { display: flex; flex: 1; flex-direction: column; padding: 0; min-height: 0; overflow: hidden; }
.trip-detail-scroll { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 16px; scrollbar-gutter: stable; }
.trip-detail-date { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.trip-detail-summary { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.trip-detail-summary dt, .trip-calculation-values dt { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.trip-detail-summary dd { margin: 0; font-size: 14px; line-height: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.trip-detail-summary .trip-time-range { white-space: normal; }
.trip-detail-summary .trip-cell-secondary { font-weight: 400; }
.trip-detail-panel h3 { font-size: 14px; line-height: 20px; margin: 0 0 10px; font-weight: 600; }
.trip-detail-section-heading { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.trip-detail-section-heading h3 { margin: 0; }
.trip-detail-panel .trip-gps-status { font-size: 11px; min-height: 20px; }
.trip-detail-panel .trip-category { padding: 3px 7px; font-size: 11px; line-height: 16px; min-height: 22px; }
.trip-detail-map { height: 176px; width: 100%; border-radius: 4px; background: #eef1ef; }
.trip-map-status { margin: 7px 0; color: var(--muted); font-size: 11px; line-height: 16px; overflow-wrap: anywhere; }
.trip-map-status.is-error { color: var(--danger); }
.trip-detail-route { margin: 8px 0 0; font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }
.trip-detail-visits, .trip-detail-requests, .trip-detail-classification { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.trip-detail-panel .muted { font-size: 12px; line-height: 18px; margin: 8px 0; }
.trip-event-timeline { list-style: none; padding: 0; margin: 0; font-size: 12px; line-height: 18px; }
.trip-event-timeline li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; position: relative; padding-bottom: 12px; }
.trip-event-timeline li:last-child { padding-bottom: 0; }
.trip-event-timeline li::before { content: ''; position: absolute; left: 51px; top: 8px; bottom: -8px; width: 1px; background: #d7e2da; }
.trip-event-timeline li:last-child::before { display: none; }
.trip-event-timeline li::after { content: ''; position: absolute; left: 48px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: #5c8870; }
.trip-event-timeline time { font-variant-numeric: tabular-nums; color: var(--muted); }
.trip-event-timeline strong { font-weight: 500; }
.trip-event-timeline span { display: block; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.trip-event-timeline dl { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0 0; }
.trip-event-timeline dl > div { display: flex; flex-wrap: wrap; gap: 4px; font-size: 11px; }
.trip-event-timeline dt { color: var(--muted); }
.trip-event-timeline dd { margin: 0; font-variant-numeric: tabular-nums; }
.trip-detail-requests h3 > span { color: var(--muted); font-weight: 400; margin-left: 4px; }
.trip-detail-requests > div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 8px 0; font-size: 12px; }
.trip-detail-requests > div > p { flex-basis: 100%; margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.trip-detail-requests .badge { min-height: 20px; font-size: 11px; }
.trip-calculations { margin-top: 14px; border-block: 1px solid var(--line); font-size: 13px; }
.trip-calculations > summary { padding: 12px 0; cursor: pointer; font-weight: 500; }
.trip-calculation-values { margin: 0 0 12px; }
.trip-calculation-values > div { display: flex; justify-content: space-between; gap: 12px; }
.trip-calculation-values dd { margin: 0; }
.trip-detail-classification { margin-top: 0; border-top: 0; }
.trip-detail-panel .field { margin-bottom: 12px; }
.trip-detail-panel .field > span { font-size: 12px; line-height: 18px; }
.trip-detail-panel .field :is(input, select, textarea) { width: 100%; min-width: 0; font-size: 13px; padding: 8px 10px; border-radius: var(--radius-md); }
.trip-detail-panel .field :is(input, select) { height: 36px; }
.trip-detail-panel textarea { min-height: 62px; resize: vertical; }
.trip-detail-panel .checkbox-field { font-size: 13px; }
.trip-detail-panel .checkbox-field input { accent-color: var(--brand); }
.trip-detail-panel .form-actions { flex: 0 0 auto; padding: 12px 16px; margin: 0; border-top: 1px solid var(--line); background: #fff; }
.trip-detail-panel .btn { font-size: 13px; min-height: 36px; }
.trip-detail-panel [hidden] { display: none !important; }
.trip-detail-panel :is(button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.trip-detail-backdrop.is-modal { pointer-events: auto; background: rgb(20 30 24 / 24%); }
.trip-detail-backdrop.is-modal .trip-detail-panel { top: 16px; right: 16px; height: calc(100dvh - 32px); width: min(440px, calc(100% - 32px)); }
@media (max-width: 1100px) {
  .trips-workspace .trips-workspace-head { flex-wrap: wrap; column-gap: 20px; }
  .trip-detail-panel .user-action-button { width: 44px; height: 44px; flex-basis: 44px; }
  .trip-detail-panel :is(.btn, .field input, .field select) { min-height: 44px; height: auto; }
  .trip-detail-panel .checkbox-field { min-height: 44px; }
}
@media (max-width: 720px) {
  .trips-workspace .trips-workspace-head { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 0 8px; padding-top: 4px; }
  .trip-workspace-tabs { grid-column: 1 / -1; grid-row: 2; gap: 20px; width: 100%; overflow-x: auto; }
  .trip-workspace-tabs button { white-space: nowrap; font-size: 13px; }
  .trip-workspace-head > .user-action-button { grid-column: 2; grid-row: 1; }
  .trip-detail-backdrop.is-modal .trip-detail-panel { inset: 8px; width: auto; height: calc(100dvh - 16px); }
}
@media (max-width: 600px) {
  .trip-log-table tr.is-selected { border-left: 3px solid var(--brand); padding-left: 8px; }
  .trip-log-table tr.is-selected td:first-child { box-shadow: none; }
  .trips-workspace .trip-log-table .trip-review-button { min-height: 30px; height: auto; }
}
@media (max-height: 500px) {
  .trips-workspace .trips-workspace-head { min-height: 44px; }
}

.trip-review-summary { display: block; max-width: 220px; margin-top: 5px; color: #946208; font-size: 11px; line-height: 16px; overflow-wrap: anywhere; }
.trip-review-reasons { padding: 0 0 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 12px; line-height: 18px; }
.trip-review-reasons.needs-review h3 { color: #946208; }
.trip-review-reasons ul { margin: 0; padding-left: 18px; color: var(--muted); }
.trip-reviewed-note { color: var(--brand-dark); font-size: 12px; margin: 0 0 12px; }
.trip-detail-navigation { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; margin: 0 16px 12px; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.trip-detail-navigation span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.trip-map-tools { display: flex; align-items: center; gap: 4px; }
.trip-map-section .trip-detail-section-heading { align-items: center; }
.trip-map-visit-marker { display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; background: #28679a; color: #fff; font-size: 12px; font-weight: 600; box-shadow: 0 1px 4px #0004; }
.trip-detail-panel button:disabled { cursor: default; opacity: .45; }
.trip-request-pane { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.trip-request-pane .modal-header { align-items: center; flex: 0 0 auto; }
.trip-request-pane .modal-header > div { flex: 1; }
.trip-request-pane .modal-header h2 { font-size: 16px; line-height: 22px; }
.trip-request-body { overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 16px; min-height: 0; font-size: 13px; overflow-wrap: anywhere; }
.trip-request-body .request-detail-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.trip-request-body .stat { padding: 0; border: 0; border-radius: 0; box-shadow: none; min-width: 0; }
.trip-request-body .stat strong { font-size: 14px; }
.trip-request-body .section { border: 0; border-top: 1px solid var(--line); border-radius: 0; margin-top: 16px; box-shadow: none; }
.trip-request-body .section-head { padding: 12px 0 0; }
.trip-request-body .section-head h2 { font-size: 14px; }
.trip-request-body .section > div:not(.section-head) { padding: 8px 0 !important; }
.trip-request-body .report-row { flex-wrap: wrap; gap: 4px; }
.trip-request-body .request-visit-details { border-radius: 0; border-inline: 0; box-shadow: none; }
.trip-request-body .request-visit-stage { padding-inline: 0; }
.trip-detail-backdrop.is-map-expanded .trip-detail-panel { inset: 16px; width: auto; height: calc(100dvh - 32px); }
.is-map-expanded .trip-detail-navigation, .is-map-expanded .trip-detail-scroll > :not(.trip-map-section), .is-map-expanded .form-actions { display: none; }
.is-map-expanded .trip-detail-scroll { display: flex; flex-direction: column; padding-top: 4px; }
.is-map-expanded .trip-map-section { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.is-map-expanded .trip-detail-map { flex: 1; min-height: 100px; height: auto; }
.is-map-expanded .trip-map-section > :not(.trip-detail-map) { flex: 0 0 auto; }
@media (max-width: 720px) {
  .trip-detail-backdrop.is-map-expanded .trip-detail-panel { inset: 8px; height: calc(100dvh - 16px); }
}

.utilization-workspace .trip-filter { flex-basis: 140px; }
.utilization-workspace .trip-period-control { flex: 0 0 152px; }
.utilization-workspace .trip-workspace-metrics { gap: 12px 22px; }
.utilization-workspace .trip-workspace-metrics > div { min-width: 90px; }
.trip-load-table [data-trip-util-row] { cursor: pointer; }
.trip-load-table [data-trip-util-row]:hover { background: #f7faf8; }
.trip-load-table tr.needs-review td:first-child { box-shadow: inset 2px 0 #d79e46; }
.trip-load-table tr.is-selected { background: #edf6f0; }
.trip-load-table tr.is-selected td:first-child { box-shadow: inset 3px 0 var(--brand); }
.trip-load-table:not(:has(th:nth-child(7))) th:nth-child(6) { width: 15%; }
.trip-util-review { display: block; color: #915500; font-size: 11px; line-height: 17px; margin-top: 3px; overflow-wrap: anywhere; }
.trip-util-detail { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 0 16px 16px; }
.trip-util-context { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; color: var(--muted); font-size: 12px; line-height: 18px; padding-bottom: 14px; overflow-wrap: anywhere; }
.trip-util-overview .trip-load-meter { width: 100%; }
.trip-util-time { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.trip-util-time dt { color: var(--muted); font-size: 12px; line-height: 18px; }
.trip-util-time dd { margin: 4px 0 0; font-size: 18px; line-height: 24px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.trip-util-accounting, .trip-util-trips, .trip-util-rules { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 14px; }
.trip-util-facts { margin: 0; font-size: 12px; line-height: 18px; }
.trip-util-facts > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 5px 0; }
.trip-util-facts dt { color: var(--muted); overflow-wrap: anywhere; }
.trip-util-facts dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.trip-util-trip { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; width: 100%; border: 0; border-top: 1px solid #edf1ee; background: none; text-align: left; font: inherit; font-size: 12px; line-height: 18px; cursor: pointer; color: var(--ink); }
.trip-util-trip:first-of-type { border-top: 0; padding-top: 0; }
.trip-util-trip:hover .trip-util-trip-heading strong { color: var(--brand-dark); text-decoration: underline; }
.trip-util-trip-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-variant-numeric: tabular-nums; }
.trip-util-trip-heading strong { font-weight: 600; }
.trip-util-trip-route { color: var(--muted); overflow-wrap: anywhere; }
.trip-util-empty { font-size: 12px; line-height: 18px; color: var(--muted); margin: 0; }
.trip-util-rules { font-size: 12px; line-height: 18px; }
.trip-util-rules summary { cursor: pointer; font-weight: 500; padding-bottom: 4px; }
.trip-util-rules p { color: var(--muted); margin: 8px 0 0; }
.trip-util-panel .trip-drilldown { flex: 0 0 auto; margin: 0; padding: 12px 16px; gap: 10px; }
.trip-util-panel .trip-drilldown .field { flex: 1 1 100%; margin: 0; }
.trip-util-panel .trip-drilldown .btn { width: 100%; }
@media (max-width: 600px) {
  .utilization-workspace .trip-workspace-metrics { gap: 16px; }
  .utilization-workspace .trip-workspace-metrics > div { min-width: 80px; }
  .trip-load-table tr.needs-review td:first-child, .trip-load-table tr.is-selected td:first-child { box-shadow: none; }
  .trip-load-table tr.needs-review { border-left: 2px solid #d79e46; padding-left: 8px; }
  .trip-load-table tr.is-selected { border-left: 3px solid var(--brand); padding-left: 8px; }
}

/* Mailing workspace: compact lists, on-demand editors and bounded history. */
.main:has(> .mailings-page) { padding-bottom: 16px; }
.mailings-page { height: calc(100dvh - 32px); min-height: 440px; display: flex; flex-direction: column; gap: 12px; min-width: 0; container: mailings / inline-size; }
.mail-page-header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "title tabs status"; align-items: center; column-gap: 28px; padding: 0 16px; flex: 0 0 auto; background: #fff; border-radius: var(--radius-lg); }
.mail-workspace { display: flex; flex: 1; flex-direction: column; min-height: 0; min-width: 0; background: #fff; border-radius: var(--radius-lg); }
.mail-page-header h1 { grid-area: title; }
.mail-page-header > .mail-status { grid-area: status; justify-self: end; }
.mail-status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; line-height: 18px; color: var(--muted); white-space: nowrap; }
.mail-status::before { content: ""; flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.mail-status.is-success { color: #187345; }
.mail-status.is-danger { color: #b4232d; }
.mail-status.is-warning { color: #946208; }
.mail-tabs { grid-area: tabs; min-width: 0; display: flex; gap: 20px; overflow-x: auto; }
.mail-tabs button { flex: 0 0 auto; min-height: 60px; padding: 8px 0; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.mail-tabs button[aria-selected="true"] { color: var(--brand-dark); border-bottom-color: var(--brand); }
@container mailings (max-width: 900px) {
  .mail-page-header { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title status" "tabs tabs"; column-gap: 12px; }
  .mail-page-header h1, .mail-page-header > .mail-status { margin-top: 12px; margin-bottom: 4px; }
  .mail-tabs button { min-height: 44px; }
}
.mail-tab-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; min-width: 0; padding: 0 16px; }
.mail-section-toolbar { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; min-height: 56px; padding: 10px 0; }
.mailings-page h2 { margin: 0; font-size: 16px; line-height: 22px; font-weight: 600; }
.mail-section-toolbar h2 span { margin-left: 8px; color: var(--muted); font-size: 13px; font-weight: 400; }
.mail-section-count { color: var(--muted); font-size: 13px; }
.mailings-page .btn, .mail-dialog .btn { display: inline-flex; gap: 6px; align-items: center; justify-content: center; min-height: 32px; padding: 6px 10px; box-shadow: none; font-size: 13px; line-height: 20px; transform: none; }
.mailings-page .btn .ui-icon, .mail-dialog .btn .ui-icon { width: 16px; height: 16px; flex: 0 0 16px; }
.mail-table-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.mailings-page .mail-table { min-width: 0; width: 100%; table-layout: fixed; }
.mailings-page .mail-table th { position: sticky; top: 0; z-index: 1; min-width: 0; padding: 10px 12px; background: #f6f8f7; font-size: 12px; line-height: 18px; font-weight: 500; text-align: left; }
.mailings-page .mail-table td { min-width: 0; white-space: normal; height: 52px; padding: 8px 12px; font-size: 13px; line-height: 19px; overflow-wrap: anywhere; text-align: left; border-bottom: 1px solid #edf1ee; }
.mail-table strong { font-size: 14px; font-weight: 500; }
.mail-table .is-disabled td { color: #65716a; }
.mail-table .is-selected td { background: #edf7f0; }
.mail-table .is-selected td:first-child { box-shadow: inset 3px 0 var(--brand); }
.mailings-page .mail-table .mail-centered { text-align: center; }
.mail-events-table th:nth-child(1) { width: 35%; }
.mail-events-table th:nth-child(3), .mail-recipients-table th:nth-child(3) { width: 100px; }
.mail-events-table th:nth-child(4), .mail-recipients-table th:nth-child(4) { width: 104px; }
.mail-table-scroll .mail-history-table { min-width: 860px; table-layout: auto; }
.mail-history-table th:last-child { width: 88px; }
.mail-history-table th:first-child { width: 145px; }
.mail-row-actions { display: flex; justify-content: center; align-items: center; gap: 6px; }
.mailings-page .user-action-button, .mail-dialog .user-action-button { flex: 0 0 32px; width: 32px; height: 32px; min-height: 32px; border-color: transparent; background: none; border-radius: var(--radius-sm); }
.mailings-page .user-action-button:hover, .mail-dialog .user-action-button:hover { background: var(--brand-soft); }
.mailings-page [data-mail-recipient-delete] { color: var(--muted); }
.mailings-page [data-mail-recipient-delete]:hover { color: var(--red); background: #fff1f2; }
.mailings-page .user-action-button .ui-icon, .mail-dialog .user-action-button .ui-icon { width: 18px; height: 18px; }
.mail-switch { position: relative; display: inline-flex; vertical-align: middle; flex: 0 0 36px; align-items: center; justify-content: center; width: 36px; height: 32px; cursor: pointer; }
.mail-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.mail-switch > span { display: block; position: relative; width: 32px; height: 18px; border-radius: 12px; background: #89958e; transition: background 140ms; }
.mail-switch > span::after { content: ""; position: absolute; width: 14px; height: 14px; left: 2px; top: 2px; border-radius: 50%; background: #fff; transition: transform 140ms; }
.mail-switch input:checked + span { background: var(--brand); }
.mail-switch input:checked + span::after { transform: translateX(14px); }
.mail-switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 3px; }
.mail-switch input:disabled { cursor: default; }
.mail-switch input:disabled + span { opacity: .65; }
.mail-toggle-label { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 20px; }
.mail-feedback { flex: 0 0 auto; margin: 8px 16px; padding: 8px 12px; border-left: 2px solid var(--brand); color: var(--brand-dark); background: #f2faf5; font-size: 13px; overflow-wrap: anywhere; }
.mail-feedback.is-error { border-color: var(--red); color: var(--red); background: #fff5f5; }
.mail-sending-notice { flex: 0 0 auto; margin: 0; padding: 10px 16px; border-bottom: 1px solid #eadfbc; border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: #fffaf0; color: #735513; font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }
.mail-feedback[hidden], .mail-dialog-error[hidden], .mail-preview[hidden] { display: none; }
.mail-settings-scroll { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.mail-settings-form { display: block; padding: 0; max-width: 1100px; }
.mail-settings-group { padding: 16px 0; border-bottom: 1px solid var(--line); }
.mail-settings-group > h2 { margin-bottom: 12px; }
.mail-settings-group .mail-section-toolbar { padding: 0 0 12px; min-height: 0; }
.mail-settings-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.mail-settings-grid > .field:nth-child(1), .mail-settings-grid > .field:nth-child(4), .mail-settings-grid > .field:nth-child(5) { grid-column: span 3; }
.mail-settings-grid > .field:nth-child(3) { grid-column: span 2; }
.mail-sender-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mail-sender-grid > .field:nth-child(n) { grid-column: auto; }
.mailings-page .field, .mail-dialog .field { min-width: 0; margin: 0 0 12px; gap: 5px; font-size: 13px; }
.mailings-page .field > span, .mail-dialog .field > span { font-size: 13px; line-height: 18px; }
.mailings-page .field input, .mailings-page .field select, .mail-dialog .field input, .mail-dialog .field textarea { min-width: 0; width: 100%; height: 36px; padding: 6px 10px; font-size: 14px; line-height: 22px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; color: var(--ink); }
.mail-dialog .field textarea { height: auto; min-height: 120px; resize: vertical; }
.mail-settings-grid .field { margin-bottom: 0; }
.mail-settings-grid { margin-bottom: 12px; }
.mail-address-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; font-size: 13px; color: var(--muted); }
.mail-address-list { display: grid; gap: 6px; min-width: 0; }
.mail-address-row { display: grid; grid-template-columns: minmax(0, 1fr) 32px; gap: 4px 6px; align-items: center; }
.mail-address-row .mail-address-error { grid-column: 1 / -1; margin: 0; color: var(--red); font-size: 12px; line-height: 18px; }
.mail-address-row .mail-address-error[hidden] { display: none; }
.mailings-page .mail-address-row input[aria-invalid=true] { border-color: var(--red); }
.mail-address-readonly { margin: 0; padding: 7px 0; font-size: 14px; line-height: 22px; overflow-wrap: anywhere; }
.mail-recipient-settings .mail-sender-grid { align-items: start; }
.mail-recipient-settings .field:has([name=contact_recipient]) { padding-top: 7px; }
.mail-recipient-settings .field:has([name=contact_recipient]) > span { min-height: 25px; }
.mail-extra-settings { min-width: 0; }
.mail-extra-settings > summary { cursor: pointer; min-height: 36px; padding: 8px 0; font-size: 13px; line-height: 20px; font-weight: 500; color: var(--ink); }
.mail-extra-settings .mail-settings-grid { padding-top: 8px; margin-bottom: 0; }
.mail-check { display: flex; align-items: center; gap: 8px; padding: 6px 0; min-height: 32px; font-size: 13px; line-height: 19px; overflow-wrap: anywhere; }
.mail-check input { width: 16px; height: 16px; flex: 0 0 16px; margin: 0; accent-color: var(--brand); }
.mail-check small { display: block; font-size: 12px; color: var(--muted); }
.mail-form-footer { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: flex-end; min-height: 36px; padding: 0; font-size: 12px; color: var(--muted); }
.mail-form-footer > span { max-width: 190px; margin-right: auto; }
.mail-form-footer > span:empty { display: none; }
.mailings-page .mail-form-footer > .btn { flex: 0 0 auto; min-height: 36px; }
.mail-test-section { max-width: 1100px; border-bottom: 0; }
.mail-check-state { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
#mailConnectionStatus { margin-bottom: 12px; }
#mailConnectionStatus > .mail-status { margin: 0 0 6px; }
#mailConnectionStatus .mail-check-state { line-height: 20px; overflow-wrap: anywhere; }
.mail-test-form { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; padding: 0; }
.mail-test-form .field { flex: 1 1 220px; max-width: 400px; margin: 0; }
.mail-test-form .btn { min-height: 36px; width: auto; }
.mail-log-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 0; }
.mail-log-modes { display: flex; border-bottom: 1px solid var(--line); }
.mail-log-modes button { border: 0; border-bottom: 2px solid transparent; background: none; padding: 7px 10px; font-size: 13px; color: var(--muted); min-height: 34px; cursor: pointer; }
.mail-log-modes button[aria-pressed=true] { border-bottom-color: var(--brand); color: var(--brand-dark); }
#mailLogSearch { display: flex; gap: 4px; margin-left: auto; min-width: 0; }
#mailLogSearch input { min-width: 0; width: 260px; max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 6px 10px; height: 34px; font-size: 13px; }
.mail-log-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding-bottom: 12px; }
.mail-log-filters .field { margin: 0; width: 170px; }
.mail-log-filters .trip-period-picker { width: 100%; min-width: 0; }
.mail-log-filters .date-filter-trigger { min-height: 36px; height: 36px; padding: 6px 10px; font-size: 13px; }
.mail-pagination { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.mail-pagination > div { display: flex; align-items: center; gap: 10px; }
.mail-pagination [data-mail-page="1"] .ui-icon { transform: rotate(180deg); }
.mail-empty { padding: 32px 12px; text-align: center; color: var(--muted); font-size: 13px; }
.mailings-page .mail-table td.mail-empty { text-align: center; padding: 32px 12px; }
.mail-dialog-backdrop { padding: 16px; place-items: start end; background: rgba(12, 24, 17, .22); overflow: hidden; }
.mail-dialog { display: flex; flex-direction: column; width: min(480px, 100%); height: 100%; max-height: none; min-height: 0; }
.mail-editor-tabs { display: flex; flex: 0 0 auto; gap: 20px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.mail-editor-tabs button { border: 0; border-bottom: 2px solid transparent; background: none; min-height: 42px; padding: 8px 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.mail-editor-tabs button[aria-selected=true] { color: var(--brand-dark); border-bottom-color: var(--brand); }
.mail-dialog [role=tabpanel][hidden] { display: none; }
.mail-dialog [role=tabpanel] { min-width: 0; }
.mail-dialog .modal-header { flex: 0 0 auto; padding: 12px 16px; }
.mail-dialog .modal-header h2 { font-size: 16px; line-height: 22px; font-weight: 600; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.mail-dialog-form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.mail-dialog-body { padding: 16px; overflow: auto; min-height: 0; flex: 1; overscroll-behavior: contain; }
.mail-dialog-footer { display: flex; flex: 0 0 auto; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.mail-event-modal .modal-header, .mail-event-modal .mail-dialog-footer { padding: 10px 14px; }
.mail-event-modal .mail-dialog-body { padding: 14px; }
.mail-event-modal .field { gap: 6px; }
.mail-template { min-width: 0; }
.mail-template > summary { padding: 10px 0; min-height: 40px; font-size: 14px; line-height: 20px; font-weight: 600; cursor: pointer; }
.mail-template-fields { padding-top: 8px; }
.mail-failure { margin: 16px 0; padding: 12px 0; border-block: 1px solid var(--line); }
.mail-failure h3 { margin: 0; font-size: 14px; font-weight: 600; line-height: 20px; }
.mail-error-summary { margin: 8px 0; color: var(--red); font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }
.mail-error-technical > summary { cursor: pointer; min-height: 36px; padding: 8px 0; color: var(--muted); font-size: 13px; line-height: 20px; }
.mail-error-technical .mail-error-detail { margin: 4px 0 8px; font-family: inherit; color: var(--muted); }
.mail-dialog-error, .mail-error-detail { color: var(--red); font-size: 13px; line-height: 20px; overflow-wrap: anywhere; white-space: pre-wrap; margin: 12px 0 0; }
.mail-recipient-fieldset { border: 0; border-bottom: 1px solid var(--line); padding: 4px 0 8px; margin: 12px 0; min-width: 0; }
.mail-recipient-fieldset legend, .mail-preview-head h3 { font-size: 14px; font-weight: 600; }
.mail-recipient-row { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 10px 0; min-width: 0; font-size: 13px; line-height: 20px; }
.mail-recipient-row > input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--brand); }
.mail-recipient-row > .ui-icon { width: 16px; height: 16px; margin-top: 2px; color: var(--muted); }
.mail-recipient-row > .btn { align-self: center; }
.mail-recipient-copy { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.mail-recipient-title { font-weight: 500; }
.mail-recipient-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.mail-recipient-count { font-size: 12px; color: var(--muted); white-space: nowrap; }
.mail-recipient-detail { color: var(--muted); font-size: 12px; line-height: 18px; }
.mail-admin-choice { border-block: 1px solid #edf1ee; }
.mail-admin-picker { padding: 10px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #f8faf9; }
.mail-admin-picker[hidden], .mail-admin-option[hidden], .mail-admin-empty[hidden] { display: none; }
.mail-admin-search-row { display: flex; align-items: center; gap: 6px; }
.mail-admin-search { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; }
.mail-admin-search > .ui-icon { width: 16px; height: 16px; color: var(--muted); flex: 0 0 16px; }
.mail-admin-search input { width: 100%; min-width: 0; height: 34px; padding: 6px 0; border: 0; border-radius: var(--radius-sm); background: transparent; font-size: 13px; color: var(--ink); }
.mail-admin-picker .mail-check { padding: 8px 2px; align-items: start; }
.mail-admin-picker .mail-check input { margin-top: 2px; }
.mail-admin-picker .mail-check > span { min-width: 0; }
.mail-admin-select-all { border-bottom: 1px solid var(--line); }
.mail-admin-options { max-height: 180px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.mail-admin-option:has(input:disabled) { color: var(--muted); }
.mail-admin-empty { margin: 0; padding: 12px 2px; font-size: 13px; color: var(--muted); }
.mail-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0 10px; }
.mail-preview-head h3 { margin: 0; }
.mail-dialog [role=tabpanel] > .mail-preview-head:first-child { margin-top: 0; }
.mail-preview { padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }
.mail-preview > strong { font-weight: 500; }
.mail-preview iframe { display: block; width: 100%; height: 300px; margin-top: 12px; border: 0; background: #fff; }
.mail-preview :is(iframe, pre)[hidden] { display: none; }
.mail-preview pre { margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.mail-details { margin: 16px 0; display: grid; gap: 10px; font-size: 13px; }
.mail-details > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; }
.mail-details dt { color: var(--muted); }
.mail-details dd { margin: 0; overflow-wrap: anywhere; }
.mailings-page :is(button, input, select, summary):focus-visible, .mail-dialog :is(button, input, textarea, summary):focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (min-width: 1280px) and (min-height: 600px) {
  .mail-panel-open .mail-workspace { margin-right: calc(var(--mail-panel-width, 420px) + 12px); }
  .mail-dialog-backdrop { padding: var(--mail-panel-top, 126px) var(--mail-panel-right, 16px) 16px 16px; background: transparent; }
  .mail-dialog { width: var(--mail-panel-width, 420px); height: var(--mail-panel-height, calc(100dvh - 142px)); border: 1px solid var(--line); box-shadow: none; }
}
@media (max-width: 1100px) {
  .main:has(> .mailings-page) { padding: 12px; }
  .mailings-page { height: calc(100dvh - 24px); }
  .mailings-page .btn, .mail-dialog .btn { min-height: 44px; }
  .mail-extra-settings > summary, .mail-template > summary, .mailings-page .mail-form-footer > .btn { min-height: 44px; }
  .mail-error-technical > summary { min-height: 44px; }
  .mail-address-heading { min-height: 44px; }
  .mail-address-row { grid-template-columns: minmax(0, 1fr) 44px; }
  .mail-recipient-settings .field:has([name=contact_recipient]) > span { min-height: 37px; }
  .mailings-page .user-action-button, .mail-dialog .user-action-button { width: 44px; height: 44px; flex-basis: 44px; }
  .mail-switch { width: 44px; height: 44px; flex-basis: 44px; }
  .mailings-page .field input, .mailings-page .field select, .mail-dialog .field input { height: 44px; }
  .mail-tabs button, .mail-editor-tabs button, .mail-log-modes button, #mailLogSearch input, .mail-log-filters .date-filter-trigger { min-height: 44px; }
  .mail-check { min-height: 44px; }
  .mail-recipient-row { min-height: 44px; }
  .mail-admin-search input { height: 42px; }
  .mail-recipients-table th:nth-child(4) { width: 112px; }
}
@media (max-width: 600px) {
  .mail-page-header { padding: 0 12px; }
  .mail-page-header > .mail-status { font-size: 12px; }
  .mail-tab-panel { padding: 0 12px; }
  .mail-tabs { gap: 18px; }
  .mailings-page :is(.mail-events-table, .mail-recipients-table) { min-width: 0; display: block; }
  .mailings-page :is(.mail-events-table, .mail-recipients-table) thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .mailings-page :is(.mail-events-table, .mail-recipients-table) tbody { display: block; }
  .mailings-page :is(.mail-events-table, .mail-recipients-table) tr { display: grid; grid-template-columns: minmax(0, 1fr) 44px 44px; grid-template-areas: "name toggle actions" "detail toggle actions"; column-gap: 4px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .mailings-page .mail-recipients-table tr { grid-template-columns: minmax(0, 1fr) 44px 88px; }
  .mailings-page :is(.mail-events-table, .mail-recipients-table) td { height: auto; padding: 0; border: 0; min-width: 0; }
  .mailings-page :is(.mail-events-table, .mail-recipients-table) td:nth-child(1) { grid-area: name; }
  .mailings-page :is(.mail-events-table, .mail-recipients-table) td:nth-child(2) { grid-area: detail; font-size: 12px; color: var(--muted); margin-top: 4px; }
  .mailings-page :is(.mail-events-table, .mail-recipients-table) td:nth-child(3) { grid-area: toggle; }
  .mailings-page :is(.mail-events-table, .mail-recipients-table) td:nth-child(4) { grid-area: actions; }
  .mailings-page .mail-recipients-table .mail-row-actions { gap: 0; }
  .mailings-page :is(.mail-events-table, .mail-recipients-table) td[colspan] { grid-column: 1 / -1; }
  .mail-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mail-settings-grid > .field:nth-child(n) { grid-column: auto; }
  .mail-settings-grid > .field:first-child { grid-column: 1 / -1; }
  .mail-sender-grid { grid-template-columns: 1fr; }
  .mail-recipient-settings .field:has([name=contact_recipient]) { padding-top: 0; }
  .mail-recipient-settings .field:has([name=contact_recipient]) > span { min-height: 0; }
  .mail-settings-group .mail-section-toolbar { align-items: flex-start; flex-direction: column; }
  #mailLogSearch { margin: 0; width: 100%; }
  #mailLogSearch input { flex: 1; width: 0; }
  .mail-log-filters { gap: 8px; }
  .mail-log-filters .field { width: calc(50% - 4px); }
  .mail-log-filters .field:first-child { width: 100%; }
  .mail-log-filters > .user-action-button { margin-left: auto; }
  .mail-dialog-backdrop { padding: 12px; }
  .mail-details > div { grid-template-columns: 100px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .mail-switch > span, .mail-switch > span::after { transition: none; }
}

#userDriverField[hidden] { display: none; }
.driver-account-link { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.driver-shell { min-height: 100dvh; background: var(--bg); }
.driver-header { display: flex; align-items: center; gap: 16px; padding: 12px max(16px, calc((100% - 760px) / 2)); background: var(--panel); border-bottom: 1px solid var(--line); }
.driver-brand { color: var(--brand-dark); font-size: 20px; font-weight: 600; text-decoration: none; flex-shrink: 0; }
.driver-identity { flex: 1; min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.driver-identity small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.driver-main { max-width: 792px; margin: 0 auto; padding: 16px; }
.driver-shell .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 12px; border-radius: 6px; font-size: 14px; text-decoration: none; box-shadow: none; }
.driver-shell .driver-icon-button { width: 44px; height: 44px; flex: 0 0 44px; padding: 10px; }
.driver-shell .ui-icon { width: 20px; height: 20px; flex: 0 0 20px; }
.driver-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.driver-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.driver-tabs button { min-height: 44px; padding: 8px 0; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font: inherit; cursor: pointer; }
.driver-tabs button[aria-selected=true] { border-bottom-color: var(--brand); color: var(--brand-dark); font-weight: 600; }
.driver-task-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.driver-task-card { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); min-width: 0; }
.driver-task-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.driver-task-meta strong { font-size: 15px; overflow-wrap: anywhere; }
.driver-task-date { margin-top: 6px; font-size: 13px; color: var(--muted); }
.driver-stop { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.driver-stop-icon { color: var(--brand); padding-top: 3px; }
.driver-stop.is-delivery .driver-stop-icon { color: #2771ba; }
.driver-label { display: block; color: var(--muted); font-size: 12px; line-height: 18px; margin-bottom: 3px; }
.driver-stop h3 { font-size: 15px; line-height: 22px; overflow-wrap: anywhere; }
.driver-stop p { margin: 4px 0 0; font-size: 14px; line-height: 21px; overflow-wrap: anywhere; }
.driver-stop-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 10px; }
.driver-phone { display: inline-flex; align-items: center; min-height: 44px; color: var(--brand-dark); text-decoration: underline; overflow-wrap: anywhere; }
.driver-task-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; font-size: 13px; }
.driver-task-footer > span { overflow-wrap: anywhere; }
.driver-task-details { background: var(--panel); padding: 0 16px; }
.driver-detail-summary { padding: 16px 0; border-bottom: 1px solid var(--line); }
.driver-detail-summary p { color: var(--muted); font-size: 14px; margin: 8px 0 16px; }
.driver-detail-summary > strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.driver-detail-section { padding: 18px 0; border-bottom: 1px solid var(--line); }
.driver-detail-section:last-child { border-bottom: 0; }
.driver-detail-section h2, .driver-empty h2 { font-size: 16px; line-height: 22px; }
.driver-detail-section p { margin: 8px 0; font-size: 14px; line-height: 22px; overflow-wrap: anywhere; }
.driver-comment, .driver-contact { white-space: pre-wrap; }
.driver-detail-section dl { display: grid; gap: 12px; margin: 16px 0 0; }
.driver-detail-section dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; font-size: 13px; line-height: 20px; }
.driver-detail-section dt { color: var(--muted); }
.driver-detail-section dd { margin: 0; overflow-wrap: anywhere; }
.driver-empty { display: grid; justify-items: center; gap: 12px; padding: 40px 16px; text-align: center; color: var(--muted); overflow-wrap: anywhere; }
.driver-empty[role=alert] { color: #a42e37; }
.driver-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 20px 0; font-size: 14px; }
.driver-shell :is(button, a):focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
@media (max-width: 400px) {
  .driver-header { padding: 10px 12px; gap: 10px; }
  .driver-main { padding: 12px; }
  .driver-task-card { padding: 12px; }
}
#driverDevice:empty { display: none; }
.driver-device-container { width: min(100%, 792px); margin: 0 auto; padding: 12px 16px 0; box-sizing: border-box; }
.driver-device { border-bottom: 1px solid var(--border); font-size: 13px; }
.driver-device summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.driver-device summary::after { content: "+"; flex: 0 0 auto; }
.driver-device[open] summary::after { content: "−"; }
.driver-device summary span { min-width: 0; overflow-wrap: anywhere; }
.driver-device summary .muted { margin-left: auto; text-align: right; }
.driver-device-body { padding: 8px 0 12px; }
.driver-device-install, .driver-device-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.driver-device button { min-height: 44px; white-space: normal; max-width: 100%; }
.driver-device-message:empty { display: none; }
.driver-device-message { margin: 8px 0 0; overflow-wrap: anywhere; }
.driver-device-message[role=alert], .driver-action-error { color: #a52632; }
.driver-acceptance { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; line-height: 1.5; }
.driver-acceptance-indicator, .driver-acceptance-status {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0; border: 0; border-radius: 6px; background: transparent;
  font: inherit; font-weight: 500; cursor: pointer; min-width: 0;
  -webkit-tap-highlight-color: transparent;
}
.driver-acceptance-indicator { width: 32px; height: 32px; flex: 0 0 32px; }
.driver-acceptance-status { min-height: 32px; max-width: 100%; text-align: left; }
.driver-acceptance-status span { min-width: 0; overflow-wrap: anywhere; }
.driver-acceptance-indicator.is-accepted, .driver-acceptance-status.is-accepted { color: #156c37; }
.driver-acceptance-indicator.is-pending, .driver-acceptance-status.is-pending { color: #667085; }
.driver-acceptance-indicator.is-updated, .driver-acceptance-status.is-updated { color: #946200; }
.driver-acceptance-indicator:hover, .driver-acceptance-status:hover { background: #f0f3f1; }
.driver-acceptance-indicator:active, .driver-acceptance-status:active { background: #e8eeea; }
.driver-acceptance-indicator:focus-visible, .driver-acceptance-status:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.driver-acceptance-indicator .ui-icon { width: 18px; height: 18px; flex: 0 0 18px; }
.driver-shell .driver-acceptance button { min-height: 44px; }
.driver-task-card > .driver-acceptance { padding-bottom: 10px; }
.driver-task-details > .driver-acceptance { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-body > .driver-acceptance { padding: 12px 0; }
.modal-backdrop > .user-action-tooltip { z-index: 10002; }
@media (pointer: coarse) {
  .driver-acceptance-indicator { width: 44px; height: 44px; flex-basis: 44px; }
  .driver-acceptance-status { min-height: 44px; }
}
@media (max-width: 420px) {
  .driver-task-details > .driver-acceptance { padding: 12px 16px; }
  .driver-device-actions .btn:not(.driver-icon-button) { flex: 1 1 150px; }
}
