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

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

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

button {
  border: 0;
  cursor: pointer;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 440px) 1fr;
  background: linear-gradient(90deg, #f5faf7 0%, #f5faf7 42%, #dfeee5 42%, #dfeee5 100%);
}

.login-panel {
  padding: 56px 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-art {
  min-height: 100vh;
  background:
    linear-gradient(rgba(21, 108, 55, 0.08), rgba(21, 108, 55, 0.08)),
    url("/assets/login-transport.svg") 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: 800;
  margin-bottom: 22px;
}

.login-brand {
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  display: inline-flex;
  align-self: flex-start;
  padding: 6px 10px 9px;
  font-size: 36px;
  line-height: 1;
}

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

.login-panel h1 {
  font-size: 34px;
  line-height: 1.08;
  margin-bottom: 12px;
}

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

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

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

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

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: 750;
  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;
}

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

.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: 700;
  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: 900;
}

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

.user-name {
  font-weight: 800;
  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;
}

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

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

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

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

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

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

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

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

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

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: 800;
  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-Просрочена,
.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: 850;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}

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

.vehicle-status-control {
  max-width: 230px;
}

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

.vehicles-table th,
.vehicles-table td {
  overflow-wrap: anywhere;
}

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

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

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

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

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

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

.vehicles-table th:nth-child(7),
.vehicles-table td:nth-child(7) {
  width: 12%;
  min-width: 0;
  white-space: normal;
}

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

.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: 750;
  text-align: center;
}

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

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

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

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

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

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

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

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

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

#usersTable th:nth-child(4),
#usersTable td:nth-child(4) {
  width: 12.6%;
  min-width: 0;
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

#usersTable th:nth-child(5),
#usersTable td:nth-child(5) {
  width: 9.4%;
  min-width: 0;
  text-align: left;
}

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

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

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

#usersTable th:last-child,
#usersTable td:last-child {
  width: 16%;
  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: 20;
}

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

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

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

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

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

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

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

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: anywhere;
}

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

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

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

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

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

.trip-report {
  margin-top: 18px;
}

.trip-table {
  width: 100%;
  min-width: 760px;
}

.trip-table th,
.trip-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf1ee;
  text-align: left;
}

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

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

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

.manager-shell .sidebar-header {
  margin-bottom: 28px;
}

.manager-shell .sidebar-header .brand-mark {
  border-radius: 14px;
}

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

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

.manager-workspace {
  max-width: 1480px;
  margin: 0 auto;
  padding: 28px 32px 48px;
}

.manager-topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0 22px;
  margin-bottom: 8px;
  background: linear-gradient(180deg, rgba(248, 251, 249, 0.96), rgba(248, 251, 249, 0.82));
  backdrop-filter: blur(18px);
}

.manager-eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

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

.manager-topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.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));
  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 {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.manager-filters label > span {
  padding-left: 4px;
  color: #718078;
  font-size: 12px;
  font-weight: 750;
}

.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-search {
  position: relative;
}

.manager-search span {
  position: absolute;
  left: 13px;
  bottom: 13px;
  padding: 0;
  color: #8a9890;
}

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

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

.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);
  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-card-main {
  display: grid;
  grid-template-columns: 116px minmax(240px, 1.1fr) minmax(320px, 1.5fr);
  gap: 18px;
  min-width: 0;
}

.manager-card-id strong {
  display: block;
  font-size: 19px;
}

.manager-card-id span,
.manager-card-route span,
.manager-card-meta span,
.manager-card-meta em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.manager-card-route {
  min-width: 0;
}

.manager-card-route h3 {
  font-size: 16px;
  line-height: 1.2;
}

.manager-card-route p {
  margin: 5px 0 8px;
  color: #405047;
  line-height: 1.35;
}

.manager-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

.manager-card-meta div {
  min-width: 0;
}

.manager-card-meta strong {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.manager-card-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.manager-card-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

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

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

  .login-art {
    display: none;
  }

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

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

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

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

  .user-box {
    position: static;
    margin-top: 14px;
  }

  .main {
    padding: 16px;
  }

  .topbar {
    flex-direction: column;
  }

  .stats,
  .filters,
  .form-grid,
  .new-address,
  .vehicle-cards,
  .dashboard-grid,
  .report-grid,
  .directory-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .half {
    grid-column: 1;
  }
}

@media (max-width: 760px) {
  .section {
    overflow: visible;
  }

  .table-wrap {
    overflow: visible;
  }

  .requests-table,
  .vehicles-table,
  .points-table,
  #usersTable {
    display: block;
    min-width: 0;
    width: 100%;
    table-layout: auto;
  }

  .requests-table thead,
  .vehicles-table thead,
  .points-table thead,
  #usersTable thead {
    display: none;
  }

  .requests-table tbody,
  .vehicles-table tbody,
  .points-table tbody,
  #usersTable tbody {
    display: grid;
    gap: 12px;
    padding: 12px;
  }

  .requests-table tr,
  .vehicles-table tr,
  .points-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,
  #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: anywhere;
  }

  .requests-table td::before,
  .vehicles-table td::before,
  .points-table td::before,
  #usersTable td::before {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    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: "Комментарий"; }

  .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 td:nth-child(7)::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,
  .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;
  }

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

  .address {
    max-width: none;
  }
}
