@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;
}

/* Responsive table labels follow the selected interface language. */
:root {
  --table-label-access: "Access";
  --table-label-action: "Action";
  --table-label-actions: "Actions";
  --table-label-additional-details: "Additional details";
  --table-label-address: "Address";
  --table-label-availability: "Availability";
  --table-label-business-partner: "Business partner";
  --table-label-capacity: "Capacity";
  --table-label-cargo: "Cargo";
  --table-label-category: "Category";
  --table-label-comment: "Comment";
  --table-label-contact: "Contact";
  --table-label-customer: "Customer";
  --table-label-date: "Date";
  --table-label-department: "Department";
  --table-label-distance: "Distance";
  --table-label-documents: "Documents";
  --table-label-driver: "Driver";
  --table-label-driving-time: "Driving time";
  --table-label-end: "End";
  --table-label-fuel: "Fuel";
  --table-label-full-name: "Full name";
  --table-label-gps-points: "GPS points";
  --table-label-last-signal: "Last signal";
  --table-label-name: "Name";
  --table-label-number: "Number";
  --table-label-owner: "Owner";
  --table-label-phone: "Phone";
  --table-label-position: "Position";
  --table-label-priority: "Priority";
  --table-label-requests: "Requests";
  --table-label-role: "Role";
  --table-label-route: "Route";
  --table-label-start: "Start";
  --table-label-status: "Status";
  --table-label-torviqo-vehicle: "TORVIQO vehicle";
  --table-label-type: "Type";
  --table-label-unit: "Unit";
  --table-label-username: "Username";
  --table-label-vehicle: "Vehicle";
}

html[lang="es"] {
  --table-label-access: "Acceso";
  --table-label-action: "Acción";
  --table-label-actions: "Acciones";
  --table-label-additional-details: "Datos adicionales";
  --table-label-address: "Dirección";
  --table-label-availability: "Disponibilidad";
  --table-label-business-partner: "Socio comercial";
  --table-label-capacity: "Capacidad";
  --table-label-cargo: "Mercancía";
  --table-label-category: "Categoría";
  --table-label-comment: "Comentario";
  --table-label-contact: "Contacto";
  --table-label-customer: "Cliente";
  --table-label-date: "Fecha";
  --table-label-department: "Departamento";
  --table-label-distance: "Distancia";
  --table-label-documents: "Documentos";
  --table-label-driver: "Conductor";
  --table-label-driving-time: "Tiempo de conducción";
  --table-label-end: "Fin";
  --table-label-fuel: "Combustible";
  --table-label-full-name: "Nombre completo";
  --table-label-gps-points: "Puntos GPS";
  --table-label-last-signal: "Última señal";
  --table-label-name: "Nombre";
  --table-label-number: "Número";
  --table-label-owner: "Propietario";
  --table-label-phone: "Teléfono";
  --table-label-position: "Cargo";
  --table-label-priority: "Prioridad";
  --table-label-requests: "Solicitudes";
  --table-label-role: "Rol";
  --table-label-route: "Ruta";
  --table-label-start: "Inicio";
  --table-label-status: "Estado";
  --table-label-torviqo-vehicle: "Vehículo de TORVIQO";
  --table-label-type: "Tipo";
  --table-label-unit: "Unidad";
  --table-label-username: "Usuario";
  --table-label-vehicle: "Vehículo";
}

:root {
  --brand: rgb(21, 108, 55);
  --brand-dark: rgb(13, 76, 38);
  --brand-soft: rgb(226, 242, 233);
  --ink: #17211b;
  --muted: #65736c;
  --line: #dde5df;
  --bg: #f6f8f7;
  --panel: #ffffff;
  --red: #c73535;
  --orange: #c66b18;
  --blue: #2771ba;
  --gray: #7b8580;
  --shadow: 0 12px 30px rgba(17, 42, 27, 0.08);
  --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;
}

.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: #eef4f0;
  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:
    radial-gradient(circle at 8% 0%, rgba(22, 101, 52, 0.08), transparent 28%),
    linear-gradient(180deg, #fbfdfc 0%, #f5f8f6 100%);
}

.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 rgba(221, 229, 223, 0.78);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 45px rgba(18, 36, 25, 0.06);
  backdrop-filter: blur(18px);
}

.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: #edf7f1;
  box-shadow: inset 0 0 0 1px rgba(221, 229, 223, 0.8);
  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: #5f6f66;
}

.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: #f7faf8;
}

.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 h1 {
  font-size: 28px;
  line-height: 1.15;
}

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

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

.admin-shell .topbar {
  align-items: center;
  gap: 20px;
  min-height: 84px;
  padding: 18px 22px;
  margin-bottom: 18px;
  border: 1px solid rgba(221, 229, 223, 0.72);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(248, 251, 249, 0.96), rgba(248, 251, 249, 0.84));
  box-shadow: 0 18px 45px rgba(18, 36, 25, 0.06);
  backdrop-filter: blur(18px);
}

.admin-shell .topbar h1 {
  font-size: 34px;
  line-height: 1.08;
}

.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;
}

.vehicles-actions-bar {
  align-items: center;
  gap: 16px;
  margin-top: 18px;
}

.vehicle-gps-message {
  min-width: 0;
  color: var(--brand-dark);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
  overflow-wrap: break-word;
}

.admin-shell .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 {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(22, 101, 52, 0.18);
}

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

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

.points-topbar {
  position: relative;
  min-height: 42px;
  align-items: center;
  justify-content: center;
}

.points-title {
  text-align: center;
}

.points-topbar > .btn {
  position: absolute;
  right: 0;
}

.admin-shell .points-topbar {
  justify-content: space-between;
}

.admin-shell .points-title {
  text-align: left;
}

.admin-shell .points-topbar > .btn {
  position: static;
  margin-left: auto;
}

.points-actions-bar {
  margin-top: 18px;
}

.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 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.055);
}

.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 rgba(221, 229, 223, 0.78);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 45px rgba(18, 36, 25, 0.055);
}

.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: rgba(221, 229, 223, 0.72);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(250, 253, 251, 0.86));
}

.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 rgba(221, 229, 223, 0.72);
  background: linear-gradient(180deg, rgba(251, 253, 252, 0.94), rgba(247, 250, 248, 0.9));
}

.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 {
  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 {
  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 {
  padding: 13px 12px;
  color: #5f6f66;
  background: #fbfdfc;
  font-weight: 500;
}

.admin-shell td {
  padding-top: 13px;
  padding-bottom: 13px;
}

.admin-shell 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) {
  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 { padding: 16px 0; margin: 12px 0; border-block: 1px solid var(--line); }
.request-visit-details h3 { font-size: 14px; margin: 0 0 10px; }
.request-visit-details p { margin: 8px 0 12px; overflow-wrap: anywhere; }
.request-visit-details dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.request-visit-details dt { font-size: 12px; color: var(--muted); }
.request-visit-details dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.trip-request-list { display: grid; gap: 12px; text-align: left; }
.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 dl { grid-template-columns: 1fr; }
}

.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-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 4px 12px 4px 4px;
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--gps-provider-color, rgba(21, 108, 55, 0.14));
  border-radius: var(--radius-round);
  box-shadow: 0 10px 24px rgba(8, 35, 24, 0.16);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transform: translateY(-2px);
}

.vehicle-map-label__badge {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: #ffffff;
  background: var(--gps-provider-color, var(--brand));
  border-radius: var(--radius-round);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

.vehicle-map-label__badge svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.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: 110px;
}

.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-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-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%;
}

.users-actions-bar {
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.users-actions-bar > .btn {
  margin-left: 0;
}

#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-template-columns: repeat(2, 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));
}

@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(900px, 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: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "summary summary"
    "legal contact";
  align-items: stretch;
  gap: 10px;
  padding: 12px;
  background: var(--bg);
}

.about-product-summary,
.about-legal-section,
.about-contact-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: 0.7fr 1.4fr 1fr;
  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,
.about-contact-section {
  padding: 12px;
}

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

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

.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: rgba(221, 229, 223, 0.78);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 45px rgba(18, 36, 25, 0.055);
  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: rgba(221, 229, 223, 0.72);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(250, 253, 251, 0.86));
}

.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 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-kpi {
  height: 152px;
  min-height: 152px;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 38px 74px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(221, 229, 223, 0.78);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 40px rgba(18, 36, 25, 0.055);
  text-align: center;
}

.dashboard-kpi > div:not(.dashboard-kpi-icon) {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 36px 34px;
  gap: 4px;
  justify-items: center;
}

.dashboard-kpi.is-alert {
  border-color: rgba(190, 18, 60, 0.14);
  background: #fde8e8;
}

.dashboard-kpi.is-alert .dashboard-kpi-icon {
  color: var(--red);
  background: rgba(255, 255, 255, 0.62);
}

.dashboard-kpi.is-alert span,
.dashboard-kpi.is-alert em,
.dashboard-kpi.is-alert strong {
  color: var(--red);
}

.dashboard-kpi.is-warning {
  border-color: rgba(180, 83, 9, 0.18);
  background: #fff1c9;
}

.dashboard-kpi.is-warning .dashboard-kpi-icon {
  color: #7c4a03;
  background: rgba(255, 255, 255, 0.64);
}

.dashboard-kpi.is-warning span,
.dashboard-kpi.is-warning em {
  color: #7c4a03;
}

.dashboard-kpi-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-round);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.dashboard-kpi span,
.dashboard-kpi em {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 500;
}

.dashboard-kpi span {
  width: 100%;
  min-width: 0;
  height: 36px;
  line-height: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  text-align: center;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: balance;
}

.dashboard-kpi strong {
  display: block;
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
  font-weight: 600;
}

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

.dashboard-kpis-requests {
  grid-area: request-kpis;
}

.dashboard-kpis-vehicles {
  grid-area: vehicle-kpis;
}

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

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

.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 rgba(221, 229, 223, 0.78);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 45px rgba(18, 36, 25, 0.055);
  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 rgba(221, 229, 223, 0.72);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 253, 251, 0.86));
}

.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-list {
  display: grid;
  gap: 0;
  padding-block: 0;
}

.replacement-candidate {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(260px, 1.5fr) minmax(150px, 1fr) auto;
  align-items: end;
  gap: 16px;
  padding: 16px 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));
  gap: 12px;
}

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

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

.replacement-candidate-reason input {
  min-height: 38px;
  padding: 8px 10px;
}

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

@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;
}

.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:
    radial-gradient(circle at 8% 0%, rgba(22, 101, 52, 0.08), transparent 28%),
    linear-gradient(180deg, #fbfdfc 0%, #f5f8f6 100%);
}

.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: rgba(221, 229, 223, 0.78);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 45px rgba(18, 36, 25, 0.06);
  backdrop-filter: blur(18px);
}

.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;
}

.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 rgba(221, 229, 223, 0.72);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(248, 251, 249, 0.96), rgba(248, 251, 249, 0.82));
  box-shadow: 0 18px 45px rgba(18, 36, 25, 0.06);
  backdrop-filter: blur(18px);
}

.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 rgba(221, 229, 223, 0.72);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 45px rgba(18, 36, 25, 0.06);
}

.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;
}

.mailings-layout {
  display: grid;
  gap: 18px;
}

.mail-settings-section,
.mail-plan-section,
.mail-events-section,
.mail-log-section {
  overflow: hidden;
}

.mail-enabled-toggle,
.mail-event-switch,
.mail-recipient-options label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--brand-dark);
  font-weight: 500;
}

.mail-enabled-toggle input,
.mail-event-switch input,
.mail-recipient-options input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.mail-clear-password {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.mail-clear-password input {
  width: 16px;
  height: 16px;
  accent-color: var(--red);
}

.mail-settings-form {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) 130px minmax(160px, 0.7fr) repeat(2, minmax(220px, 1fr));
  gap: 0 14px;
  padding: 18px 22px 4px;
}

.mail-extra-field {
  grid-column: span 2;
}

.mail-form-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  padding-bottom: 16px;
}

.mail-test-form {
  display: grid;
  grid-template-columns: minmax(260px, 420px) auto;
  align-items: end;
  gap: 14px;
  padding: 0 22px 20px;
}

.mail-test-form .field {
  margin-bottom: 0;
}

.mail-feedback {
  margin: 0 22px 20px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 500;
}

.mail-feedback.is-error {
  background: #fde8e8;
  color: var(--red);
}

.mail-events-form {
  display: grid;
  gap: 14px;
  padding: 18px 22px 22px;
}

.mail-event-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  overflow: visible;
}

.mail-event-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 16px;
  background: #f8fbf9;
}

.mail-recipient-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 20px;
  align-items: center;
}

.mail-admin-picker {
  position: relative;
  color: var(--brand-dark);
}

.mail-admin-picker summary {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  cursor: pointer;
  list-style: none;
  font-weight: 500;
}

.mail-admin-picker summary::-webkit-details-marker {
  display: none;
}

.mail-admin-picker summary::after {
  content: "⌄";
  margin-left: 2px;
}

.mail-admin-picker[open] summary::after {
  content: "⌃";
}

.mail-admin-picker summary span {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-round);
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 12px;
}

.mail-admin-picker-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: min(360px, 82vw);
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 18px 46px rgba(18, 36, 25, 0.16);
}

.mail-recipient-options .mail-admin-select-all,
.mail-recipient-options .mail-admin-option {
  width: 100%;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  color: var(--ink);
}

.mail-recipient-options .mail-admin-select-all {
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.mail-recipient-options .mail-admin-option:hover {
  background: #f1f7f3;
}

.mail-admin-option span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.mail-admin-option strong,
.mail-admin-option em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-admin-option strong {
  font-weight: 500;
}

.mail-admin-option em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.mail-admin-option.is-disabled {
  opacity: 0.52;
}

.mail-admin-empty {
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

.mail-template-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(420px, 1.4fr);
  gap: 14px;
  padding: 16px;
}

.mail-template-grid .field {
  margin: 0;
}

.mail-template-grid textarea {
  min-height: 132px;
}

.mail-log-table {
  min-width: 980px;
  table-layout: fixed;
}

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

.mail-log-table th:nth-child(1) { width: 15%; }
.mail-log-table th:nth-child(2) { width: 20%; }
.mail-log-table th:nth-child(3) { width: 10%; }
.mail-log-table th:nth-child(4) { width: 24%; }
.mail-log-table th:nth-child(5) { width: 15%; }
.mail-log-table th:nth-child(6) { width: 16%; }

.admin-shell .main.login-audit-main {
  padding-bottom: 16px;
}

.login-audit-page {
  height: calc(100vh - 32px);
  min-height: 460px;
}

.login-audit-section {
  height: 100%;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.login-audit-section .section-head {
  flex: 0 0 auto;
  align-items: center;
}

.login-audit-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.login-audit-table {
  min-width: 1080px;
  table-layout: fixed;
}

.login-audit-table th,
.login-audit-table td {
  text-align: center;
  vertical-align: middle;
}

.login-audit-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fbfdfc;
}

.login-audit-table th:nth-child(1) { width: 15%; }
.login-audit-table th:nth-child(2) { width: 19%; }
.login-audit-table th:nth-child(3) { width: 14%; }
.login-audit-table th:nth-child(4) { width: 14%; }
.login-audit-table th:nth-child(5) { width: 16%; }
.login-audit-table th:nth-child(6) { width: 10%; }
.login-audit-table th:nth-child(7) { width: 12%; }

.login-audit-row {
  cursor: pointer;
  transition: background-color 160ms ease;
}

.login-audit-row:hover,
.login-audit-row:focus-visible {
  background: #edf7f1;
  outline: none;
}

.login-audit-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 14px;
  border-radius: var(--control-radius);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.login-audit-status.is-success {
  color: #0d4f2a;
  background: #dff3e9;
}

.login-audit-status.is-error {
  color: #be2f32;
  background: #fde6e7;
}

.login-audit-detail {
  display: grid;
  gap: 18px;
}

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

.login-audit-summary > div,
.login-audit-agent,
.login-audit-reason {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: #fbfdfc;
}

.login-audit-summary span,
.login-audit-agent span,
.login-audit-reason span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.login-audit-summary strong,
.login-audit-reason strong {
  font-weight: 600;
}

.login-audit-agent code {
  display: block;
  overflow-wrap: anywhere;
  white-space: normal;
}

.login-audit-activity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.login-audit-activity-head h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.login-audit-activity-list {
  max-height: 44vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.login-audit-activity-item {
  display: grid;
  grid-template-columns: 150px 150px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.login-audit-activity-item:last-child {
  border-bottom: 0;
}

.login-audit-activity-item time,
.login-audit-activity-item span {
  color: var(--muted);
  font-size: 13px;
}

.login-audit-activity-item strong {
  font-weight: 500;
}

.login-audit-empty,
.login-audit-loading {
  padding: 28px 18px;
  color: var(--muted);
  text-align: center;
}

.mail-plan-recipient-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr) auto auto;
  gap: 14px;
  align-items: end;
  padding: 18px 22px 16px;
}

.mail-plan-recipient-form .field {
  margin: 0;
}

.mail-plan-active,
.mail-plan-table-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--brand-dark);
  font-weight: 500;
}

.mail-plan-active {
  min-height: 48px;
  padding: 0 12px;
}

.mail-plan-active input,
.mail-plan-table-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.mail-plan-table,
.mail-plan-log-table {
  min-width: 980px;
  table-layout: fixed;
}

.mail-plan-table th,
.mail-plan-table td,
.mail-plan-log-table th,
.mail-plan-log-table td {
  text-align: center;
  vertical-align: middle;
}

.mail-plan-table th:nth-child(1) { width: 24%; }
.mail-plan-table th:nth-child(2) { width: 24%; }
.mail-plan-table th:nth-child(3) { width: 10%; }
.mail-plan-table th:nth-child(4) { width: 14%; }
.mail-plan-table th:nth-child(5) { width: 14%; }
.mail-plan-table th:nth-child(6) { width: 14%; }

.mail-plan-table input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--ink);
}

.mail-plan-actions {
  display: inline-grid;
  grid-template-columns: repeat(2, auto);
  gap: 8px;
}

.mail-plan-log-head {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 10px;
  border-top: 1px solid var(--line);
}

.mail-plan-log-head h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
}

.mail-plan-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: var(--radius-round);
  font-weight: 500;
}

.mail-plan-status.is-success {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.mail-plan-status.is-error {
  background: #fde8e8;
  color: var(--red);
}

@media (min-width: 981px) and (max-width: 1600px) {
  .dashboard-kpis {
    gap: 10px;
  }

  .dashboard-kpi {
    padding: 14px 10px;
  }
}

@media (min-width: 1101px) and (max-width: 1320px) {
  .dashboard-kpi {
    padding-inline: 9px;
  }

  .dashboard-kpis-vehicles .dashboard-kpi {
    padding-inline: 3px;
  }
}

@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:
      "request-kpis"
      "trips"
      "vehicle-kpis"
      "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 h1 {
    font-size: 26px;
    line-height: 1.12;
  }

  .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-kpis,
  .dashboard-summary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .dashboard-kpi {
    padding: 14px;
  }

  .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: var(--table-label-date, "Date"); }
  .dashboard-trips-table td:nth-child(2)::before { content: var(--table-label-department, "Department"); }
  .dashboard-trips-table td:nth-child(3)::before { content: var(--table-label-route, "Route"); }
  .dashboard-trips-table td:nth-child(4)::before { content: var(--table-label-driver, "Driver"); }
  .dashboard-trips-table td:nth-child(5)::before { content: var(--table-label-vehicle, "Vehicle"); }

  .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: var(--table-label-number, "Number"); }
  .requests-table td:nth-child(2)::before { content: var(--table-label-date, "Date"); }
  .requests-table td:nth-child(3)::before { content: var(--table-label-customer, "Customer"); }
  .requests-table td:nth-child(4)::before { content: var(--table-label-address, "Address"); }
  .requests-table td:nth-child(5)::before { content: var(--table-label-priority, "Priority"); }
  .requests-table td:nth-child(6)::before { content: var(--table-label-cargo, "Cargo"); }
  .requests-table td:nth-child(7)::before { content: var(--table-label-status, "Status"); }
  .requests-table td:nth-child(8)::before { content: var(--table-label-vehicle, "Vehicle"); }
  .requests-table td:nth-child(9)::before { content: var(--table-label-driver, "Driver"); }
  .requests-table td:nth-child(10)::before { content: var(--table-label-additional-details, "Additional details"); }
  .requests-table td:nth-child(11)::before { content: var(--table-label-actions, "Actions"); }

  .vehicles-table td:nth-child(1)::before { content: var(--table-label-vehicle, "Vehicle"); }
  .vehicles-table td:nth-child(2)::before { content: var(--table-label-driver, "Driver"); }
  .vehicles-table td:nth-child(3)::before { content: var(--table-label-capacity, "Capacity"); }
  .vehicles-table td:nth-child(4)::before { content: var(--table-label-status, "Status"); }
  .vehicles-table td:nth-child(5)::before { content: "GPS"; }
  .vehicles-table td:nth-child(6)::before { content: var(--table-label-owner, "Owner"); }
  .vehicles-table td:nth-child(7)::before { content: var(--table-label-comment, "Comment"); }
  .vehicles-table td:nth-child(8)::before { content: var(--table-label-documents, "Documents"); }
  .vehicles-table td:nth-child(9)::before { content: var(--table-label-actions, "Actions"); }

  .gps-units-table td:nth-child(1)::before { content: var(--table-label-unit, "Unit"); }
  .gps-units-table td:nth-child(2)::before { content: var(--table-label-last-signal, "Last signal"); }
  .gps-units-table td:nth-child(3)::before { content: var(--table-label-torviqo-vehicle, "TORVIQO vehicle"); }
  .gps-units-table td:nth-child(4)::before { content: var(--table-label-action, "Action"); }

  .points-table td:nth-child(1)::before { content: var(--table-label-business-partner, "Business partner"); }
  .points-table td:nth-child(2)::before { content: var(--table-label-address, "Address"); }
  .points-table td:nth-child(3)::before { content: var(--table-label-contact, "Contact"); }
  .points-table td:nth-child(4)::before { content: var(--table-label-type, "Type"); }
  .points-table td:nth-child(5)::before { content: var(--table-label-status, "Status"); }
  .points-table td:nth-child(6)::before { content: var(--table-label-actions, "Actions"); }

  .points-table.has-access td:nth-child(5)::before { content: var(--table-label-access, "Access"); }
  .points-table.has-access td:nth-child(6)::before { content: var(--table-label-status, "Status"); }
  .points-table.has-access td:nth-child(7)::before { content: var(--table-label-actions, "Actions"); }

  .drivers-table td:nth-child(1)::before { content: var(--table-label-full-name, "Full name"); }
  .drivers-table td:nth-child(2)::before { content: var(--table-label-phone, "Phone"); }
  .drivers-table td:nth-child(3)::before { content: var(--table-label-vehicle, "Vehicle"); }
  .drivers-table td:nth-child(4)::before { content: var(--table-label-status, "Status"); }
  .drivers-table td:nth-child(5)::before { content: var(--table-label-availability, "Availability"); }
  .drivers-table td:nth-child(6)::before { content: var(--table-label-actions, "Actions"); }

  #usersTable td:nth-child(1)::before { content: var(--table-label-name, "Name"); }
  #usersTable td:nth-child(2)::before { content: var(--table-label-username, "Username"); }
  #usersTable td:nth-child(3)::before { content: "Email"; }
  #usersTable td:nth-child(4)::before { content: var(--table-label-role, "Role"); }
  #usersTable td:nth-child(5)::before { content: var(--table-label-position, "Position"); }
  #usersTable td:nth-child(6)::before { content: var(--table-label-department, "Department"); }
  #usersTable td:nth-child(7)::before { content: var(--table-label-phone, "Phone"); }
  #usersTable td:nth-child(8)::before { content: var(--table-label-status, "Status"); }
  #usersTable td:nth-child(9)::before { content: var(--table-label-actions, "Actions"); }

  .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-template-columns: repeat(2, 44px);
    justify-content: start;
    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: var(--table-label-vehicle, "Vehicle"); }
  .vehicle-mileage-table td:nth-child(2)::before { content: var(--table-label-distance, "Distance"); }
  .vehicle-mileage-table td:nth-child(3)::before { content: var(--table-label-driving-time, "Driving time"); }
  .vehicle-mileage-table td:nth-child(4)::before { content: var(--table-label-fuel, "Fuel"); }
  .vehicle-mileage-table td:nth-child(5)::before { content: var(--table-label-gps-points, "GPS points"); }

  .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));
  }

  .mail-settings-form,
  .mail-template-grid,
  .mail-plan-recipient-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mail-extra-field {
    grid-column: 1 / -1;
  }

  .mail-event-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .mail-recipient-options {
    justify-content: flex-start;
  }

  .mail-admin-picker-panel {
    right: auto;
    left: 0;
  }

  .mail-template-grid .field:last-child {
    grid-column: 1 / -1;
  }
}

@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;
  }

  .mail-settings-form,
  .mail-template-grid,
  .mail-test-form,
  .mail-plan-recipient-form {
    grid-template-columns: 1fr;
  }

  .mail-settings-form,
  .mail-events-form,
  .mail-test-form,
  .mail-plan-recipient-form {
    padding-inline: 14px;
  }

  .mail-template-grid .field:last-child,
  .mail-extra-field {
    grid-column: auto;
  }

  .mail-form-actions,
  .mail-form-actions .btn,
  .mail-test-form .btn,
  .mail-plan-recipient-form .btn {
    width: 100%;
  }
}

@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: var(--table-label-vehicle, "Vehicle"); }
  .trips-table td:nth-child(2)::before { content: var(--table-label-start, "Start"); }
  .trips-table td:nth-child(3)::before { content: var(--table-label-end, "End"); }
  .trips-table td:nth-child(4)::before { content: var(--table-label-route, "Route"); }
  .trips-table td:nth-child(5)::before { content: var(--table-label-requests, "Requests"); }
  .trips-table td:nth-child(6)::before { content: var(--table-label-category, "Category"); }
  .trips-table td:nth-child(7)::before { content: var(--table-label-distance, "Distance"); }
  .trips-table td:nth-child(8)::before { content: "GPS"; }
  .trips-table td:nth-child(9)::before { content: var(--table-label-actions, "Actions"); }

  .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"
      "contact";
    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,
  .about-contact-section {
    padding: 16px;
  }

  .about-section-heading,
  .contact-owner-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .contact-owner-actions .btn {
    width: 100%;
  }

  .login-audit-summary {
    grid-template-columns: 1fr;
  }

  .login-audit-activity-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .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 {
  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 {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  min-width: 0;
  width: 240px;
  max-width: 100%;
  flex-shrink: 0;
}

.requests-heading h2 {
  margin: 0;
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
}

.requests-heading > span {
  font-size: 13px;
}

.requests-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 {
  min-height: 40px;
  padding: 8px 12px;
  gap: 8px;
  font-size: 13px;
  line-height: 20px;
  box-shadow: none;
}

.requests-page .topbar .ui-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.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: 6px;
  }

  .admin-shell .requests-page.is-current .requests-table td {
    padding-block: 8px;
  }
}

@media (max-width: 1100px) {
  .requests-page .topbar {
    padding: 10px;
  }

  .requests-page .topbar > .requests-heading:first-child {
    min-height: 28px;
    width: 100%;
  }

  .requests-page .topbar > .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .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 {
    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;
  }
}
