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

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

:root {
  --brand: rgb(21, 108, 55);
  --brand-dark: rgb(13, 76, 38);
  --brand-soft: rgb(226, 242, 233);
  --ink: #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);
  --control-radius: 12px;
}

* {
  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: 8px;
  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: 16px;
  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: 6px;
  padding: 10px 11px;
  background: white;
  color: var(--ink);
  font-weight: 400;
}

.login-panel input {
  height: 48px;
  border-color: #d9e1dc;
  border-radius: 15px;
  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: 15px;
  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);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: 6px;
  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: 16px;
  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: 6px;
  background: white;
  color: var(--muted);
  font-size: 13px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
  transition: grid-template-columns 0.2s ease;
  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;
  transition: padding 0.2s ease;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 24px;
  min-height: 40px;
}

.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: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef4f0;
  color: var(--brand-dark);
  font-size: 24px;
  line-height: 1;
  font-weight: 600;
  flex: 0 0 32px;
}

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

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

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

.nav button {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  overflow: hidden;
}

.nav button span {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: none;
  place-items: center;
  flex: 0 0 26px;
  background: #eef4f0;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 600;
}

.nav button b {
  font: inherit;
  white-space: nowrap;
}

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

.user-box {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

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

.sidebar-collapsed .sidebar-header {
  justify-content: center;
  margin-bottom: 18px;
}

.sidebar-collapsed .sidebar-header strong,
.sidebar-collapsed .nav button b,
.sidebar-collapsed .user-name,
.sidebar-collapsed .user-role,
.sidebar-collapsed .user-box .btn {
  display: none;
}

.sidebar-collapsed .sidebar-toggle {
  position: absolute;
  top: 72px;
  left: 22px;
  margin: 0;
  width: 32px;
  height: 32px;
}

.sidebar-collapsed .nav {
  margin-top: 48px;
}

.sidebar-collapsed .nav button {
  justify-content: center;
  padding: 9px;
}

.sidebar-collapsed .nav button span {
  display: grid;
}

.sidebar-collapsed .user-box {
  left: 12px;
  right: 12px;
  min-height: 42px;
  display: grid;
  place-items: center;
}

.sidebar-collapsed .user-box::before {
  content: attr(data-initials);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 600;
}

.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 {
  margin: 16px 0 16px 16px;
  height: calc(100vh - 32px);
  padding: 18px 14px;
  border: 1px solid rgba(221, 229, 223, 0.78);
  border-radius: 22px;
  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 {
  justify-content: stretch;
  min-height: 50px;
  margin-bottom: 20px;
}

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

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

.admin-shell .sidebar-toggle {
  width: 100%;
  height: 46px;
  flex: 1 1 auto;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #edf7f1;
  box-shadow: inset 0 0 0 1px rgba(221, 229, 223, 0.8);
  font-size: 24px;
}

.admin-shell .sidebar-toggle-label {
  display: inline-flex;
  min-width: 0;
  color: var(--brand-dark);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.15;
  white-space: nowrap;
}

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

.admin-shell .nav {
  gap: 8px;
}

.admin-shell .nav button {
  min-height: 46px;
  border-radius: 14px;
  padding: 10px 12px;
  color: #5f6f66;
  font-weight: 500;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.admin-shell .nav button span {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 10px;
  background: #f2f6f3;
  color: var(--brand-dark);
}

.admin-shell:not(.sidebar-collapsed) .nav button {
  gap: 0;
}

.admin-shell:not(.sidebar-collapsed) .nav button span {
  display: none;
}

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

.admin-shell .user-box {
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 14px;
  border-top: 0;
  border-radius: 18px;
  background: #f7faf8;
}

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

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

.admin-shell.sidebar-collapsed .sidebar-toggle {
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  justify-content: center;
  padding: 0;
  border-radius: 12px;
}

.admin-shell.sidebar-collapsed .sidebar-toggle-label {
  display: none;
}

.admin-shell.sidebar-collapsed .nav {
  margin-top: 0;
}

.admin-shell.sidebar-collapsed .nav button {
  padding: 9px;
}

.admin-shell.sidebar-collapsed .nav button.active,
.admin-shell.sidebar-collapsed .nav button:hover {
  transform: none;
}

.admin-shell.sidebar-collapsed .user-box {
  left: 0;
  right: 0;
  min-height: 58px;
  padding: 9px;
  background: transparent;
}

.admin-shell.sidebar-collapsed .user-box::before {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  line-height: 1;
  text-align: center;
}

.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: 22px;
  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: 14px;
  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: 12px;
  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: 8px;
  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: 18px;
  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;
}

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

.admin-shell .section {
  border: 1px solid rgba(221, 229, 223, 0.78);
  border-radius: 22px;
  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: 24px;
  line-height: 1.15;
  font-weight: 600;
}

.requests-section {
  border-radius: 22px;
  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: 22px 22px 0 0;
}

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

.requests-search-toggle strong {
  min-width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  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;
}

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

.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;
  border: 1px solid rgba(210, 220, 213, 0.95);
  border-radius: 16px;
  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: 11px;
  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;
}

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: 999px;
  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: 999px;
  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: var(--red);
  background-color: #fde8e8;
  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='%23c73535' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.vehicles-table {
  table-layout: fixed;
  min-width: 0;
  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: 11%;
}

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

.vehicles-table th:nth-child(8),
.vehicles-table td:nth-child(8) {
  width: 11%;
  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: 9%; }
.vehicles-table.has-actions th:nth-child(4),
.vehicles-table.has-actions td:nth-child(4) { width: 10%; 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: 8%; }
.vehicles-table.has-actions th:nth-child(7),
.vehicles-table.has-actions td:nth-child(7) { width: 10.3%; }
.vehicles-table.has-actions th:nth-child(8),
.vehicles-table.has-actions td:nth-child(8) { width: 10%; }
.vehicles-table.has-actions th:nth-child(9),
.vehicles-table.has-actions td:nth-child(9) { width: 12.3%; text-align: center; }

.vehicles-table .vehicle-status-control {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding-inline: 10px 24px;
}

.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: 999px;
  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: 16px;
  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: 11px;
  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;
}

.gps-vehicle-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid #cfe2d7;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.gps-vehicle-pill:hover {
  border-color: #9fc7ae;
  background: #dceddf;
}

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

.gps-vehicle-pill.is-disabled {
  color: #7c4a03;
  border-color: #f1d994;
  background: #fff1c9;
  cursor: default;
}

.gps-vehicle-pill svg {
  width: 16px;
  height: 16px;
}

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

.vehicle-row-actions .btn {
  width: 100%;
  min-width: 0;
  padding-inline: 8px;
}

.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: 22px;
  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: 999px;
  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: 12px;
  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;
}

.gps-provider-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
}

.gps-provider-card h3,
.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-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 {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.vehicle-doc-btn {
  border: 0;
  border-radius: 14px;
  padding: 9px 12px;
  color: var(--green);
  background: var(--green-soft);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.vehicle-doc-btn:hover,
.vehicle-doc-btn:focus-visible {
  transform: translateY(-1px);
  outline: 2px solid rgba(22, 101, 52, 0.2);
  outline-offset: 2px;
}

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

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

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

.vehicle-map-icon {
  background: transparent;
  border: 0;
}

.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 rgba(21, 108, 55, 0.14);
  border-radius: 999px;
  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(--brand);
  border-radius: 50%;
  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: 10%;
  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: 0;
  width: 100%;
}

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

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

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

.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: 16.25%;
  min-width: 0;
}

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

.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: 8%;
  min-width: 0;
  white-space: normal;
}

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

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

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

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

.requests-table td:last-child .actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  justify-items: stretch;
}

.requests-table td:last-child .btn,
.requests-table td:last-child select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.requests-table td:last-child select {
  height: 40px;
  padding-inline: 8px 24px;
}

.requests-table .btn.small {
  padding-inline: 8px;
  font-size: 12px;
}

.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: 24px;
  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: 999px;
  background: var(--brand-soft);
}

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

#usersTable {
  table-layout: fixed;
  min-width: 0;
  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: normal;
  word-break: normal;
  padding-inline: 8px;
  text-align: center;
}

#usersTable th {
  text-align: center;
  overflow-wrap: normal;
  word-break: keep-all;
  white-space: nowrap;
}

#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: normal;
  white-space: nowrap;
}

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

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

#usersTable td:last-child .btn {
  width: fit-content;
  min-width: 0;
  padding-inline: 10px;
  white-space: nowrap;
}

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

.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(3, minmax(0, 1fr));
  gap: 12px;
}

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

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

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

.admin-shell .vehicle-card {
  border-color: rgba(221, 229, 223, 0.82);
  border-radius: 18px;
  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: 8px;
  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: 20px;
  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: 999px;
  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-trips-table td,
.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: 16px;
  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 {
  min-height: 118px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(221, 229, 223, 0.78);
  border-radius: 22px;
  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;
  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: 999px;
  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-height: 2.05em;
  display: grid;
  place-items: center;
  text-align: center;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: balance;
}

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

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 47fr) minmax(0, 53fr);
  gap: 18px;
  height: 100%;
  min-height: 0;
  align-items: stretch;
}

.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: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 45px rgba(18, 36, 25, 0.055);
  overflow: hidden;
}

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

.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: 22px;
  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-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: grid;
  grid-template-rows: auto 1fr;
  border-radius: 24px;
}

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

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

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

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

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

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

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

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

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

.dashboard-trips-table tr.dashboard-trip-overdue td:first-child {
  border-radius: 14px 0 0 14px;
}

.dashboard-trips-table tr.dashboard-trip-overdue td:last-child {
  border-radius: 0 14px 14px 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: 22px;
  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: 16px;
  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-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: 18px;
  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: 22px;
}

.trip-utilization-head {
  min-height: 80px;
  align-items: center;
}

.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: calc(var(--control-radius) - 4px);
  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(--control-radius);
  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(--control-radius);
  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(--control-radius);
  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(--control-radius);
}

.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: 16px;
  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: 8px;
  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: 22px;
}

.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: 50%;
  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: 14px;
  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: 14px;
  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: 8px;
  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;
}

.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: 14px;
  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-table th:first-child,
.route-time-table td:first-child {
  width: 32%;
}

.route-time-table th:nth-child(2),
.route-time-table td:nth-child(2) {
  width: 10%;
}

.route-time-table th:nth-child(n + 3),
.route-time-table td:nth-child(n + 3) {
  width: 14.5%;
}

.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: 8px;
  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%);
}

.manager-shell .sidebar {
  margin: 16px 0 16px 16px;
  height: calc(100vh - 32px);
  border: 1px solid rgba(221, 229, 223, 0.78);
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(18, 36, 25, 0.06);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.app-shell.manager-shell {
  grid-template-columns: 264px minmax(0, 1fr);
}

.manager-shell .sidebar-header strong,
.manager-shell .nav button b,
.manager-shell .user-name,
.manager-shell .user-role,
.manager-shell .user-box .btn {
  display: block;
}

.manager-shell .user-box::before {
  content: none;
}

.manager-shell .sidebar-header {
  display: none;
}

.manager-shell .sidebar-toggle {
  display: none;
}

.manager-shell .nav {
  gap: 8px;
}

.manager-shell .nav button {
  min-height: 46px;
  border-radius: 14px;
  padding: 11px 12px;
  font-weight: 500;
  color: #5f6f66;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.manager-shell .nav button span {
  display: grid;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #f2f6f3;
}

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

.manager-shell .user-box {
  border-top: 0;
  padding: 14px;
  border-radius: 18px;
  background: #f7faf8;
}

.manager-shell .user-box .btn {
  width: 100%;
  margin-top: 12px;
  border-radius: 12px;
  justify-content: center;
  text-align: center;
}

.manager-shell .main {
  padding: 0;
  overflow-y: auto;
}

.manager-points-section {
  margin: 16px 16px 48px 32px;
  border-radius: 22px;
  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: 35%;
}

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

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

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

.points-table th:nth-child(6),
.points-table td:nth-child(6) {
  width: 12%;
  white-space: nowrap;
  overflow-wrap: normal;
  text-align: center;
}

.points-table td:nth-child(6) .actions {
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
}

.points-table td:nth-child(6) .btn {
  min-width: 132px;
  white-space: nowrap;
}

.points-table .point-approve-btn {
  border-radius: 12px;
  padding-inline: 10px;
  box-shadow: none;
}

.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(2),
.points-table.has-access td:nth-child(2) {
  width: 31%;
}

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

.points-table.has-access th:nth-child(5),
.points-table.has-access td:nth-child(5) {
  width: 10%;
}

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

.points-table.has-access th:nth-child(7),
.points-table.has-access td:nth-child(7) {
  width: 11%;
  white-space: nowrap;
  overflow-wrap: normal;
  text-align: center;
}

.points-table.has-access td:nth-child(7) .actions {
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
}

.points-table.has-access td:nth-child(7) .btn {
  min-width: 132px;
  white-space: nowrap;
}

.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: 22px;
  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: 24px;
  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: 14px;
  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: 22px;
  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: 14px;
  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: 24px;
}

.manager-board-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

.manager-board-head > span {
  min-width: 42px;
  height: 34px;
  border-radius: 999px;
  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: 22px;
  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 999px 999px 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: 999px;
  font-size: 24px;
  line-height: 1;
  font-weight: 500;
}

.manager-card-actions {
  display: flex;
  gap: 8px;
}

.manager-card-actions .btn {
  border-radius: 12px;
}

.manager-archive-toggle {
  width: 100%;
  min-height: 54px;
  margin: 14px 0;
  padding: 12px 16px;
  border-radius: 18px;
  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: 999px;
  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: 22px;
  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: 8px;
  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: 12px;
  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: 8px;
  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: 999px;
  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: 12px;
  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: 8px;
  color: var(--ink);
}

.mail-recipient-options .mail-admin-select-all {
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
  border-radius: 8px 8px 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-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;
}

.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: 12px;
  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: 999px;
  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 {
    height: auto;
    min-height: 124px;
    gap: 8px;
    padding: 14px 10px;
  }

  .dashboard-kpi span {
    min-height: 2.35em;
    line-height: 1.15;
  }

  .dashboard-kpi strong {
    margin: 6px 0 0;
  }
}

@media (max-width: 1100px) {
  .login-screen {
    grid-template-columns: 1fr;
    background: #faf9f5;
  }

  .login-panel {
    min-height: 100vh;
    padding: clamp(34px, 8vw, 56px) 22px;
  }

  .login-panel form,
  .login-panel h1 {
    max-width: 390px;
  }

  .login-panel h1 {
    font-size: clamp(30px, 10vw, 38px);
  }

  .login-art {
    display: none;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-shell .sidebar {
    position: static;
    height: auto;
    margin: 10px;
    border-radius: 18px;
  }

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

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

  .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,
  .request-cargo-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 {
    position: static;
    width: auto;
    max-width: none;
    height: auto;
    margin: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: visible;
  }

  .sidebar-header {
    justify-content: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
  }

  .admin-shell .sidebar-header,
  .admin-shell.sidebar-collapsed .sidebar-header {
    justify-content: flex-start;
    min-height: 46px;
    margin-bottom: 12px;
  }

  .sidebar-collapsed .sidebar-header strong,
  .sidebar-collapsed .nav button b,
  .sidebar-collapsed .user-name,
  .sidebar-collapsed .user-role,
  .sidebar-collapsed .user-box .btn {
    display: block;
  }

  .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));
    gap: 8px;
  }

  .nav button,
  .sidebar-collapsed .nav button,
  .admin-shell .nav button,
  .admin-shell.sidebar-collapsed .nav button,
  .manager-shell .nav button {
    justify-content: flex-start;
    min-width: 0;
    padding: 10px;
    border-radius: 12px;
  }

  .nav button span,
  .admin-shell .nav button span,
  .manager-shell .nav button span {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
  }

  .nav button b,
  .manager-shell .nav button b {
    min-width: 0;
    font-size: 13px;
    line-height: 1.15;
    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: block;
    min-height: 0;
    margin-top: 10px;
    padding: 12px;
    border-radius: 14px;
  }

  .sidebar-collapsed .user-box::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;
  }

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

  .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 {
    min-height: 132px;
    padding: 14px;
  }

  .dashboard-kpi strong {
    font-size: 32px;
  }

  .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-actions .dashboard-gps-btn {
    flex: 1;
  }

  .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 {
    align-items: start;
  }

  .dashboard-column {
    grid-template-rows: auto auto;
  }

  .dashboard-map-card,
  .dashboard-trips-card {
    height: 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) {
    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: 16px;
    background: #fff;
  }

  .dashboard-trips-table tr + tr {
    margin-top: 10px;
  }

  .dashboard-trips-table td {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #edf1ee;
  }

  .dashboard-trips-table td:last-child {
    border-bottom: 0;
  }

  .dashboard-trips-table td::before {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
  }

  .dashboard-trips-table td:nth-child(1)::before { content: "Маршрут"; }
  .dashboard-trips-table td:nth-child(2)::before { content: "Дата"; }
  .dashboard-trips-table td:nth-child(3)::before { content: "Водитель"; }
  .dashboard-trips-table td:nth-child(4)::before { content: "Автомобиль"; }

  .dashboard-trips-table td:nth-child(2),
  .dashboard-trips-table td:nth-child(3),
  .dashboard-trips-table td:nth-child(4) {
    text-align: left;
  }

  .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: 8px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .requests-table td,
  .vehicles-table td,
  .points-table td,
  .drivers-table td,
  .gps-units-table td,
  #usersTable td {
    display: grid;
    grid-template-columns: minmax(104px, 38%) 1fr;
    gap: 10px;
    align-items: start;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 0;
    border: 0;
    text-align: left !important;
    white-space: normal !important;
    overflow-wrap: normal;
    word-break: normal;
  }

  #usersTable td:nth-child(2),
  #usersTable td:nth-child(3),
  #usersTable td:nth-child(7) {
    overflow-wrap: anywhere;
  }

  .requests-table td::before,
  .vehicles-table td::before,
  .points-table td::before,
  .drivers-table td::before,
  .gps-units-table td::before,
  #usersTable td::before {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
  }

  .requests-table td:nth-child(1)::before { content: "Номер"; }
  .requests-table td:nth-child(2)::before { content: "Дата"; }
  .requests-table td:nth-child(3)::before { content: "Заказчик"; }
  .requests-table td:nth-child(4)::before { content: "Адрес"; }
  .requests-table td:nth-child(5)::before { content: "Срочность"; }
  .requests-table td:nth-child(6)::before { content: "Груз"; }
  .requests-table td:nth-child(7)::before { content: "Статус"; }
  .requests-table td:nth-child(8)::before { content: "Авто"; }
  .requests-table td:nth-child(9)::before { content: "Водитель"; }
  .requests-table td:nth-child(10)::before { content: "Комментарий"; }
  .requests-table td:nth-child(11)::before { content: "Действия"; }

  .vehicles-table td:nth-child(1)::before { content: "Авто"; }
  .vehicles-table td:nth-child(2)::before { content: "Водитель"; }
  .vehicles-table td:nth-child(3)::before { content: "Вместимость"; }
  .vehicles-table td:nth-child(4)::before { content: "Статус"; }
  .vehicles-table td:nth-child(5)::before { content: "GPS"; }
  .vehicles-table td:nth-child(6)::before { content: "Собственник"; }
  .vehicles-table td:nth-child(7)::before { content: "Комментарий"; }
  .vehicles-table td:nth-child(8)::before { content: "Документы"; }
  .vehicles-table td:nth-child(9)::before { content: "Действия"; }

  .gps-units-table td:nth-child(1)::before { content: "Объект"; }
  .gps-units-table td:nth-child(2)::before { content: "Последний сигнал"; }
  .gps-units-table td:nth-child(3)::before { content: "Автомобиль MYTMS"; }
  .gps-units-table td:nth-child(4)::before { content: "Действие"; }

  .points-table td:nth-child(1)::before { content: "Контрагент"; }
  .points-table td:nth-child(2)::before { content: "Адрес"; }
  .points-table td:nth-child(3)::before { content: "Контакт"; }
  .points-table td:nth-child(4)::before { content: "Тип"; }
  .points-table td:nth-child(5)::before { content: "Статус"; }
  .points-table td:nth-child(6)::before { content: "Действия"; }

  .points-table.has-access td:nth-child(5)::before { content: "Доступ"; }
  .points-table.has-access td:nth-child(6)::before { content: "Статус"; }
  .points-table.has-access td:nth-child(7)::before { content: "Действия"; }

  .drivers-table td:nth-child(1)::before { content: "ФИО"; }
  .drivers-table td:nth-child(2)::before { content: "Телефон"; }
  .drivers-table td:nth-child(3)::before { content: "Автомобиль"; }
  .drivers-table td:nth-child(4)::before { content: "Статус"; }
  .drivers-table td:nth-child(5)::before { content: "Доступность"; }
  .drivers-table td:nth-child(6)::before { content: "Действия"; }

  #usersTable td:nth-child(1)::before { content: "Имя"; }
  #usersTable td:nth-child(2)::before { content: "Логин"; }
  #usersTable td:nth-child(3)::before { content: "Email"; }
  #usersTable td:nth-child(4)::before { content: "Роль"; }
  #usersTable td:nth-child(5)::before { content: "Должность"; }
  #usersTable td:nth-child(6)::before { content: "Отдел"; }
  #usersTable td:nth-child(7)::before { content: "Телефон"; }
  #usersTable td:nth-child(8)::before { content: "Статус"; }
  #usersTable td:nth-child(9)::before { content: "Действия"; }

  .requests-table td:last-child .actions,
  .vehicles-table td:last-child .vehicle-row-actions,
  .gps-units-table td:last-child .gps-unit-actions,
  .drivers-table td:last-child .actions,
  .points-table td:last-child .actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .requests-table td:last-child .btn,
  .requests-table td:last-child select,
  .points-table td:last-child .btn {
    width: 100%;
    min-width: 0;
  }

  .vehicles-table td:last-child .btn,
  .gps-units-table td:last-child .btn,
  .drivers-table td:last-child .btn {
    width: 100%;
    min-width: 0;
  }

  #usersTable td:last-child .btn {
    width: fit-content;
    min-width: 0;
    justify-self: start;
  }

  .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: 8px;
    background: #fff;
  }

  .trip-table td {
    display: grid;
    grid-template-columns: minmax(118px, 42%) 1fr;
    gap: 10px;
    align-items: start;
    width: auto !important;
    padding: 0;
    border: 0;
    text-align: left !important;
    overflow-wrap: normal;
    word-break: normal;
  }

  .trip-table td::before {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
  }

  .vehicle-mileage-table td:nth-child(1)::before { content: "Автомобиль"; }
  .vehicle-mileage-table td:nth-child(2)::before { content: "Пробег"; }
  .vehicle-mileage-table td:nth-child(3)::before { content: "В дороге"; }
  .vehicle-mileage-table td:nth-child(4)::before { content: "Топливо"; }
  .vehicle-mileage-table td:nth-child(5)::before { content: "GPS-точек"; }

  .route-time-table td:nth-child(1)::before { content: "Точка доставки"; }
  .route-time-table td:nth-child(2)::before { content: "Поездок"; }
  .route-time-table td:nth-child(3)::before { content: "Туда"; }
  .route-time-table td:nth-child(4)::before { content: "На точке"; }
  .route-time-table td:nth-child(5)::before { content: "Обратно"; }
  .route-time-table td:nth-child(6)::before { content: "Полный цикл"; }

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

  .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: 14px;
    background: #fff;
  }

  .trips-table td {
    display: grid;
    grid-template-columns: minmax(118px, 40%) 1fr;
    gap: 10px;
    align-items: start;
    width: auto !important;
    padding: 0;
    border: 0;
    text-align: left !important;
  }

  .trips-table td::before {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
  }

  .trips-table td:nth-child(1)::before { content: "Автомобиль"; }
  .trips-table td:nth-child(2)::before { content: "Начало"; }
  .trips-table td:nth-child(3)::before { content: "Завершение"; }
  .trips-table td:nth-child(4)::before { content: "Маршрут"; }
  .trips-table td:nth-child(5)::before { content: "Заявки"; }
  .trips-table td:nth-child(6)::before { content: "Категория"; }
  .trips-table td:nth-child(7)::before { content: "Пробег"; }
  .trips-table td:nth-child(8)::before { content: "GPS"; }
  .trips-table td:nth-child(9)::before { content: "Действия"; }

  .trips-table td[colspan] {
    display: block;
  }

  .trips-table td[colspan]::before {
    content: none;
  }

  .trip-totals,
  .trip-modal-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .trip-kpis {
    grid-template-columns: 1fr;
  }

  .trip-utilization-grid {
    grid-template-columns: 1fr;
  }

  .trip-utilization-controls,
  .trip-period-switch,
  .trip-period-picker {
    width: 100%;
  }

  .trip-utilization-controls {
    flex-wrap: wrap;
  }

  .trip-period-picker {
    min-width: 0;
  }

  .trip-period-switch button {
    flex: 1;
  }

  .trip-utilization-card-head,
  .trip-utilization-meta {
    align-items: flex-start;
  }

  .trip-totals {
    padding: 12px;
  }

  .trips-table td {
    grid-template-columns: 1fr;
  }
}

.btn,
.login-panel .btn,
.admin-shell .btn,
.dashboard-page .btn,
.manager-card-actions .btn,
.nav button,
.admin-shell .nav button,
.manager-shell .nav button,
.sidebar-toggle,
.admin-shell .sidebar-toggle,
.manager-shell .sidebar-toggle,
.archive-toggle,
.admin-shell .admin-archive-toggle,
.manager-archive-toggle,
.dashboard-gps-btn,
.dashboard-icon-btn,
.dashboard-route-btn,
select,
.filter-dropdown-trigger,
.filter-dropdown-menu,
.filter-dropdown-menu button,
.date-filter-trigger,
.date-filter-menu,
.date-filter-head button,
.date-filter-grid button,
.date-filter-actions button,
.mail-admin-picker summary,
.mail-admin-picker-panel,
.badge,
.status-control,
.vehicle-status-control,
.vehicle-driver-control,
.vehicle-driver-menu,
.vehicle-driver-menu button,
.gps-vehicle-pill,
.vehicle-doc-btn,
.driver-availability-pill,
.mail-plan-status,
.mail-plan-table input {
  border-radius: var(--control-radius);
}
