/* Shared components */
:root {
  --red: #cf2636;
  --red-dark: #b41d2c;
  --red-pale: #fdf0f1;
  --ink: #222936;
  --muted: #7b818d;
  --line: #e9eaed;
  --bg: #f7f8fa;
  --amber: #a96307;
  --amber-bg: #fff7e7;
  --green: #238261;
  --shadow: 0 6px 28px #25304408;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 0;
  background: none;
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #cf26367a;
  outline-offset: 3px;
}
.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icon-library {
  display: none;
}
.topbar {
  height: 88px;
  display: flex;
  align-items: center;
  padding: 0 42px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  gap: 64px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 27px;
  letter-spacing: -1px;
  line-height: 1;
}
.brand-light {
  font-weight: 450;
}
.brand-icon {
  background: var(--red);
  color: #fff;
  width: 43px;
  height: 47px;
  border-radius: 11px;
  display: grid;
  place-items: center;
}
.brand-icon .icon {
  width: 29px;
  height: 29px;
}
.brand small {
  display: block;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 1.8px;
  color: var(--muted);
  margin-top: 8px;
}
.topbar nav {
  display: flex;
  height: 100%;
  gap: 37px;
  align-items: center;
  flex: 1;
  font-size: 13px;
  font-weight: 600;
}
.topbar nav a {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 3px solid transparent;
  padding-top: 3px;
  white-space: nowrap;
}
.topbar nav a.active {
  color: var(--red);
  border-color: var(--red);
}
.nav-count {
  background: var(--red-pale);
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 5px;
}
.management {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 650;
}
.management:hover {
  background: var(--bg);
}
.shell {
  display: grid;
  grid-template-columns: 238px 1fr;
  min-height: calc(100vh - 148px);
}
.sidebar {
  padding: 35px 18px 20px 25px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.side-label {
  font-size: 9px;
  letter-spacing: 1.5px;
  font-weight: 750;
  color: #9a9eaa;
  margin: 5px 12px 12px;
}
.side-link {
  display: flex;
  gap: 11px;
  align-items: center;
  text-align: left;
  padding: 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 550;
  color: #707784;
  width: 100%;
}
.side-link .icon {
  width: 18px;
  height: 18px;
}
.side-link.active {
  background: var(--red-pale);
  color: var(--red);
  font-weight: 700;
}
.side-link:hover {
  background: var(--bg);
}
.side-number {
  margin-left: auto;
  font-size: 10px;
}
.side-divider {
  border-top: 1px solid var(--line);
  margin: 21px 12px;
}
.side-note {
  background: #faf6f6;
  border: 1px solid #f3e8e9;
  border-radius: 10px;
  margin: 42px 5px 24px;
  padding: 17px 15px;
}
.note-icon {
  display: block;
  color: var(--red);
  margin-bottom: 12px;
}
.note-icon .icon {
  width: 23px;
  height: 23px;
}
.side-note strong {
  font-size: 11px;
}
.side-note p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin: 8px 0 15px;
}
.side-note button {
  font-size: 10px;
  color: var(--red);
  font-weight: 650;
  padding: 0;
  display: flex;
  justify-content: space-between;
  width: 100%;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 15px 12px 0;
  border-top: 1px solid var(--line);
  font-size: 9px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
}
.sidebar-bottom #clock {
  margin-left: auto;
}
.status-dot {
  width: 5px;
  height: 5px;
  background: var(--green);
  display: inline-block;
  border-radius: 100%;
  flex-shrink: 0;
}
main {
  padding: 32px 42px 48px;
  min-width: 0;
  max-width: 1650px;
  width: 100%;
  margin: auto;
}
.breadcrumb {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 22px;
}
.breadcrumb .icon {
  width: 13px;
  height: 13px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  gap: 20px;
}
.eyebrow {
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 1.4px;
  color: var(--red);
  margin-bottom: 10px;
}
.page-heading h1 {
  margin: 0;
  font-size: 30px;
  letter-spacing: -1.1px;
  line-height: 1.2;
  font-weight: 760;
}
.page-heading p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin: 10px 0 0;
}
.date-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #7f8490;
  font-size: 10px;
  background: #fff;
  white-space: nowrap;
}
.date-pill .icon {
  width: 14px;
  height: 14px;
}
.hero {
  border-radius: 13px;
  background: var(--red);
  color: #fff;
  padding: 28px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  margin-bottom: 26px;
}
.hero:after {
  content: '';
  position: absolute;
  right: 70px;
  width: 250px;
  height: 250px;
  border: 1px solid #ffffff18;
  border-radius: 50%;
  box-shadow:
    0 0 0 35px #ffffff08,
    0 0 0 75px #ffffff05;
  pointer-events: none;
}
.hero h2 {
  font-size: 23px;
  margin: 0 0 9px;
  letter-spacing: -0.6px;
}
.hero p {
  font-size: 11px;
  color: #ffe1e5;
  margin: 0;
  line-height: 1.8;
}
.hero-label {
  font-size: 8px;
  letter-spacing: 1.7px;
  color: #ffd6da;
  margin-bottom: 12px;
}
.hero-illustration {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  padding-right: 35px;
  opacity: 0.95;
}
.hero-illustration .icon {
  width: 55px;
  height: 55px;
  stroke-width: 1;
}
.hero-illustration span {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.8;
}
.hero-illustration small {
  font-weight: 400;
  font-size: 10px;
  display: block;
  color: #ffd6da;
}
.overview {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin: 0 0 30px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  gap: 13px;
}
.stat-icon {
  background: #f6f7f9;
  border-radius: 8px;
  padding: 9px;
  color: #777e8d;
  height: 38px;
}
.stat:nth-child(2) .stat-icon {
  color: var(--amber);
  background: var(--amber-bg);
}
.stat:nth-child(3) .stat-icon {
  color: var(--red);
  background: var(--red-pale);
}
.stat strong {
  font-size: 21px;
  letter-spacing: -0.7px;
}
.stat small {
  font-size: 10px;
  color: var(--muted);
  margin-left: 9px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
}
.section-heading h2 {
  font-size: 16px;
  letter-spacing: -0.3px;
  margin: 0;
}
.section-heading small {
  font-size: 10px;
  color: var(--muted);
  font-weight: 450;
  margin-left: 8px;
}
.view-icon {
  color: var(--muted);
  display: flex;
  gap: 7px;
}
.view-icon span {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px;
  background: #fff;
}
.view-icon .icon {
  width: 14px;
  height: 14px;
}
.toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 0 0 20px;
}
.search {
  position: relative;
  flex: 1;
}
.search .icon {
  position: absolute;
  left: 14px;
  top: 13px;
  color: #9297a1;
  width: 17px;
  height: 17px;
}
.search input {
  padding: 13px 14px 13px 40px;
  border: 1px solid #e3e5ea;
  border-radius: 8px;
  background: #fff;
  width: 100%;
  font-size: 11px;
  color: var(--ink);
}
.search input::placeholder {
  color: #a1a5af;
}
.filters {
  display: flex;
  padding: 4px;
  background: #edeff2;
  border-radius: 7px;
  gap: 3px;
}
.filters button {
  font-size: 10px;
  padding: 9px 12px;
  border-radius: 5px;
  color: #747b86;
  white-space: nowrap;
  display: flex;
  gap: 5px;
  align-items: center;
}
.filters .icon {
  width: 12px;
  height: 12px;
}
.filters button.active {
  background: #fff;
  box-shadow: 0 2px 4px #00000008;
  color: var(--ink);
  font-weight: 650;
}
.lines-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.line-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  transition:
    transform 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
  position: relative;
  min-width: 0;
  overflow: hidden;
}
.line-card:hover {
  transform: translateY(-3px);
  border-color: #e7b7bd;
  box-shadow: var(--shadow);
}
.card-body {
  padding: 20px 20px 16px;
  cursor: pointer;
  display: block;
  min-height: 172px;
  width: 100%;
  text-align: left;
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 17px;
}
.line-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--red-pale);
  color: var(--red);
  min-width: 40px;
  height: 37px;
  border-radius: 7px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.5px;
  padding: 0 9px;
}
.line-number.hlp {
  background: #eef3f5;
  color: #527387;
  font-size: 11px;
}
.card-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.7;
  min-height: 38px;
  margin: 0 0 12px;
}
.card-title .arrow {
  font-size: 11px;
  color: #abb0b9;
  display: inline-block;
  padding: 0 3px;
}
.card-title.missing {
  font-weight: 500;
  color: #969ba5;
}
.badge {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  font-size: 8px;
  font-weight: 650;
  border-radius: 4px;
  padding: 5px 7px;
  background: #f3f5f7;
  color: #7d8592;
  line-height: 1.4;
}
.badge .icon {
  width: 11px;
  height: 11px;
}
.badge.amber {
  background: var(--amber-bg);
  color: var(--amber);
}
.badge.green {
  background: #edf7f1;
  color: var(--green);
}
.badge.red {
  background: var(--red-pale);
  color: var(--red);
}
.fav {
  position: absolute;
  right: 16px;
  top: 22px;
  color: #c1c5cd;
  padding: 4px;
  display: grid;
  place-items: center;
}
.fav .icon {
  width: 17px;
  height: 17px;
}
.fav.selected {
  color: var(--red);
}
.fav.selected .icon {
  fill: #cf26361a;
}
.card-bottom {
  border-top: 1px solid #f0f1f4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  font-size: 9px;
  color: #8d929c;
  gap: 8px;
  min-height: 42px;
}
.card-bottom .icon {
  width: 12px;
  height: 12px;
}
.card-bottom span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.bottom-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  font-size: 10px;
  color: var(--muted);
}
.bottom-label .icon {
  width: 13px;
  height: 13px;
}
.bottom-label > span {
  display: flex;
  gap: 7px;
  align-items: center;
}
.footer {
  border-top: 1px solid var(--line);
  font-size: 9px;
  color: #9096a0;
  display: flex;
  justify-content: space-between;
  padding: 20px 42px;
  background: #fff;
}
.footer > span:first-child {
  font-weight: 700;
  color: #6d7481;
}
.footer .muted {
  font-weight: 400;
  margin-left: 6px;
}
.empty {
  text-align: center;
  padding: 65px 20px;
  color: var(--muted);
  background: #fff;
  border: 1px dashed #dfe2e8;
  border-radius: 12px;
  grid-column: 1/-1;
}
.empty .icon {
  width: 32px;
  height: 32px;
  color: #afb6c2;
}
.empty h3 {
  color: var(--ink);
  font-size: 16px;
}
.empty p {
  font-size: 12px;
  line-height: 1.8;
}
.loading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  min-height: 55vh;
  color: var(--muted);
  font-size: 13px;
}
.spinner {
  display: inline-block;
  width: 19px;
  height: 19px;
  border: 2px solid #ddd;
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 650;
  background: #fff;
  border: 1px solid var(--line);
  line-height: 1.6;
}
.btn:hover {
  background: #f5f6f8;
}
.btn.primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.btn.primary:hover {
  background: var(--red-dark);
}
.btn .icon {
  width: 16px;
  height: 16px;
}
.btn.small {
  padding: 7px 11px;
  font-size: 10px;
}
.btn.danger {
  color: var(--red);
  border-color: #efd5d8;
}
.btn.download {
  padding: 15px 18px;
  width: 100%;
  font-size: 13px;
}
.btn.link {
  border: none;
  background: transparent;
  color: var(--red);
  padding-left: 0;
}
.detail-heading {
  display: flex;
  gap: 17px;
  align-items: center;
}
.detail-heading .line-number {
  height: 55px;
  min-width: 56px;
  font-size: 29px;
  border-radius: 10px;
}
.detail-heading h1 {
  font-size: 27px;
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: start;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
}
.panel-inner {
  padding: 23px;
}
.panel h3 {
  font-size: 13px;
  margin: 0 0 15px;
}
.variant-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 17px;
}
.variant-tabs button {
  padding: 9px 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 11px;
}
.variant-tabs button.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 11px;
  line-height: 1.8;
  padding: 14px 16px;
  background: #f2f6fa;
  color: #4c6b85;
  border: 1px solid #e2ebf2;
  border-radius: 7px;
  margin-bottom: 17px;
}
.info .icon {
  width: 17px;
  height: 17px;
  margin-top: 2px;
}
.info.amber {
  background: var(--amber-bg);
  border-color: #f6e6c6;
  color: var(--amber);
}
.info strong {
  display: block;
}
.info p {
  margin: 2px 0 0;
}
.direction-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 6px;
  background: #f5f6f8;
  border-radius: 8px;
  margin-bottom: 19px;
}
.direction-tabs button {
  font-size: 10px;
  padding: 11px 8px;
  border-radius: 5px;
  line-height: 1.6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.direction-tabs button.active {
  background: #fff;
  color: var(--red);
  box-shadow: 0 2px 6px #00000008;
  font-weight: 650;
}
.direction-tabs .icon {
  width: 14px;
  height: 14px;
}
.route-map {
  height: 340px;
  position: relative;
  overflow: hidden;
  background: #edf0ed;
  border-radius: 7px;
}
.map-stamp {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 8px;
  color: #606f74;
  background: #ffffffe0;
  padding: 5px 7px;
  border-radius: 4px;
}
.map-controls {
  position: absolute;
  left: 12px;
  top: 12px;
  display: grid;
  gap: 1px;
  box-shadow: 0 2px 8px #0001;
  border-radius: 5px;
  overflow: hidden;
}
.map-controls button {
  background: #fff;
  width: 29px;
  height: 28px;
  font-size: 18px;
}
.map-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: #ffffff78;
  gap: 9px;
  color: #5a6670;
}
.map-placeholder .icon {
  width: 33px;
  height: 33px;
}
.map-placeholder strong {
  font-size: 13px;
}
.map-placeholder small {
  font-size: 10px;
}
.map-endpoints {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #747c86;
  padding: 13px 1px 0;
  gap: 15px;
}
.map-endpoints span:before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 100%;
  border: 2px solid var(--red);
  display: inline-block;
  margin-right: 6px;
}
.download-sub {
  font-size: 10px;
  text-align: center;
  color: var(--muted);
  line-height: 1.8;
  margin: 10px 0 20px;
}
.file-data {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: var(--muted);
  font-size: 10px;
  line-height: 2;
}
.file-data strong {
  color: var(--ink);
}
.file-data div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin: 5px 0;
}
.full-width {
  width: 100%;
}
.history {
  margin-top: 22px;
}
.history summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  padding: 17px 20px;
}
.history-row {
  border-top: 1px solid var(--line);
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  gap: 15px;
}
.history-row small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin: 6px 0;
}
.history-actions {
  display: flex;
  gap: 5px;
}
.detail-aside {
  display: grid;
  gap: 17px;
}
.detail-aside .panel-inner {
  padding: 20px;
}
.aside-label {
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 15px;
}
.tip-list {
  font-size: 11px;
  color: #7a8290;
  line-height: 1.9;
  margin: 0;
  padding-left: 17px;
}
.tip-list li + li {
  margin-top: 8px;
}
.admin-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.table-wrap {
  overflow-x: auto;
}
.admin-table {
  border-collapse: collapse;
  width: 100%;
  background: #fff;
  font-size: 11px;
}
.admin-table th {
  text-align: left;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  background: #fafbfc;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.admin-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
.admin-table .line-number {
  font-size: 12px;
  min-width: 32px;
  height: 29px;
}
.admin-table tr:last-child td {
  border: 0;
}
.admin-table .row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.admin-tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.admin-tabs button {
  font-size: 12px;
  padding: 12px 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
}
.admin-tabs button.active {
  color: var(--red);
  border-color: var(--red);
  font-weight: 650;
}
.event {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.8;
}
.event small {
  color: var(--muted);
  white-space: nowrap;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0;
  width: min(650px, calc(100% - 30px));
  max-height: 90vh;
  color: var(--ink);
  box-shadow: 0 20px 100px #0002;
}
dialog::backdrop {
  background: #1b24386b;
  backdrop-filter: blur(3px);
}
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 26px;
  border-bottom: 1px solid var(--line);
}
.modal-header h2 {
  font-size: 19px;
  margin: 0;
  letter-spacing: -0.5px;
}
.modal-header p {
  font-size: 11px;
  color: var(--muted);
  margin: 8px 0 0;
  line-height: 1.7;
}
.modal-header .close {
  padding: 0;
  color: var(--muted);
}
.modal-body {
  padding: 24px 26px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 11px;
  margin-bottom: 17px;
}
.field label {
  font-weight: 650;
}
.field input,
.field select,
.field textarea {
  border: 1px solid #dfe2e7;
  padding: 11px 12px;
  border-radius: 6px;
  width: 100%;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  min-width: 0;
}
.field textarea {
  min-height: 70px;
  resize: vertical;
}
.field small {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
}
.form-grid .field {
  margin: 0;
}
.form-grid {
  margin-bottom: 17px;
}
.field .checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 450;
  line-height: 1.6;
}
.checkbox-line input {
  width: 15px;
  height: 15px;
  accent-color: var(--red);
}
.day-picker {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.day-picker label {
  display: flex;
  gap: 4px;
  align-items: center;
  background: var(--bg);
  padding: 8px 9px;
  border-radius: 5px;
  font-size: 10px;
}
.day-picker input {
  width: 12px;
  height: 12px;
  accent-color: var(--red);
}
.modal-actions {
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  margin-top: 23px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
}
.upload-box {
  border: 1px dashed #ccd1db;
  border-radius: 7px;
  padding: 13px;
  background: #fafbfc;
}
.upload-box input {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 10px;
}
.upload-box .filename {
  font-size: 10px;
  color: var(--green);
  margin-bottom: 7px;
  display: block;
  overflow-wrap: anywhere;
}
.error {
  color: #b42030;
  background: #fff1f2;
  border: 1px solid #f2cdd2;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 11px;
  line-height: 1.7;
  margin: 12px 0;
}
.success {
  color: var(--green);
  background: #edf7f1;
  border: 1px solid #d6e9dd;
  border-radius: 6px;
  padding: 12px;
  font-size: 11px;
  line-height: 1.8;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
  z-index: 50;
  background: #252c38;
  color: #fff;
  padding: 14px 22px;
  box-shadow: 0 7px 30px #0002;
  border-radius: 8px;
  font-size: 12px;
  max-width: calc(100% - 30px);
  line-height: 1.6;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.help-steps {
  display: grid;
  gap: 20px;
}
.help-step {
  display: flex;
  gap: 14px;
  font-size: 12px;
  line-height: 1.9;
}
.help-step b {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  background: var(--red-pale);
  color: var(--red);
  border-radius: 100%;
  flex-shrink: 0;
}
.help-step p {
  margin: 4px 0;
  color: var(--muted);
}
.login-panel {
  max-width: 440px;
  margin: 40px auto;
}
.login-panel h2 {
  font-size: 21px;
  margin: 0 0 10px;
}
.login-panel > p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}
.info.banner {
  margin-bottom: 25px;
}
.no-margin {
  margin: 0;
}
.select-small {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 10px;
  background: #fff;
}
.file-name-wrap {
  overflow-wrap: anywhere;
}
.text-muted {
  color: var(--muted);
}
.version-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 15px;
}
.version-heading h3 {
  margin: 0;
}
.admin-form-note {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
  margin: 12px 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (min-width: 1600px) {
  main {
    padding: 40px 60px;
  }
  .lines-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .hero {
    padding: 35px 36px;
  }
}
@media (max-width: 1180px) {
  .topbar {
    gap: 40px;
    padding: 0 28px;
  }
  .topbar nav {
    gap: 25px;
  }
  .shell {
    grid-template-columns: 206px 1fr;
  }
  .sidebar {
    padding: 28px 12px;
  }
  .side-link {
    font-size: 11px;
  }
  .side-note {
    margin-top: 30px;
  }
  .sidebar-bottom {
    font-size: 8px;
    padding-left: 5px;
    padding-right: 5px;
  }
  main {
    padding: 28px;
  }
  .lines-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .detail-grid {
    grid-template-columns: minmax(0, 1fr) 265px;
  }
  .hero-illustration {
    padding-right: 0;
  }
  .hero h2 {
    font-size: 21px;
  }
  .stat {
    padding: 13px;
  }
  .stat small {
    display: block;
    margin: 3px 0 0;
  }
  .detail-grid .panel-inner {
    padding: 17px;
  }
}
@media (max-width: 940px) {
  .shell {
    grid-template-columns: 175px 1fr;
  }
  .sidebar {
    padding: 25px 8px;
  }
  .side-link {
    font-size: 10px;
    gap: 8px;
    padding: 11px 9px;
  }
  .side-label {
    font-size: 8px;
  }
  .side-note {
    padding: 14px 10px;
  }
  .sidebar-bottom {
    flex-wrap: wrap;
  }
  .topbar nav {
    gap: 20px;
    font-size: 11px;
  }
  .topbar {
    height: 77px;
    gap: 30px;
    padding: 0 22px;
  }
  .brand {
    font-size: 23px;
  }
  .brand-icon {
    width: 37px;
    height: 42px;
  }
  .brand small {
    font-size: 7px;
  }
  .management {
    font-size: 10px;
    padding: 9px;
  }
  .page-heading h1 {
    font-size: 27px;
  }
  .date-pill {
    display: none;
  }
  .hero-illustration {
    display: none;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .detail-aside {
    grid-template-columns: 1fr 1fr;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .search {
    min-width: 190px;
  }
  .filters {
    margin-left: auto;
  }
  .sidebar-bottom #clock {
    margin-left: 0;
  }
}
@media (max-width: 680px) {
  .topbar {
    height: 72px;
    padding: 0 18px;
    gap: 12px;
    flex-wrap: wrap;
    align-content: center;
  }
  .brand {
    font-size: 24px;
    gap: 8px;
    margin-right: auto;
  }
  .brand-icon {
    width: 35px;
    height: 39px;
    border-radius: 8px;
  }
  .brand-icon .icon {
    width: 25px;
    height: 25px;
  }
  .brand small {
    font-size: 6px;
    letter-spacing: 1.5px;
  }
  .topbar nav {
    display: none;
  }
  .management {
    font-size: 10px;
    padding: 9px 10px;
  }
  .management .icon {
    width: 15px;
    height: 15px;
  }
  .shell {
    display: block;
    min-height: calc(100vh - 132px);
  }
  .sidebar {
    background: #fff;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 8px 13px;
    flex-direction: row;
    gap: 3px;
    overflow-x: auto;
    position: relative;
    white-space: nowrap;
  }
  .side-label,
  .side-divider,
  .side-note,
  .sidebar-bottom {
    display: none;
  }
  .side-link {
    width: auto;
    flex-shrink: 0;
    font-size: 10px;
    padding: 9px 10px;
    gap: 6px;
  }
  .side-link .icon {
    width: 14px;
    height: 14px;
  }
  .side-number {
    display: none;
  }
  main {
    padding: 23px 18px 35px;
  }
  .breadcrumb {
    font-size: 9px;
    margin-bottom: 20px;
  }
  .page-heading {
    margin-bottom: 20px;
  }
  .page-heading h1 {
    font-size: 27px;
    letter-spacing: -0.9px;
  }
  .page-heading p {
    font-size: 11px;
    max-width: 270px;
    line-height: 1.8;
  }
  .eyebrow {
    font-size: 8px;
  }
  .hero {
    padding: 23px 21px;
    border-radius: 10px;
    margin-bottom: 19px;
  }
  .hero h2 {
    font-size: 20px;
  }
  .hero p {
    font-size: 10px;
    max-width: 260px;
  }
  .hero-label {
    font-size: 7px;
  }
  .overview {
    gap: 8px;
    margin-bottom: 25px;
  }
  .stat {
    padding: 12px 9px;
    gap: 8px;
    border-radius: 8px;
    display: block;
  }
  .stat-icon {
    display: none;
  }
  .stat strong {
    font-size: 21px;
  }
  .stat small {
    font-size: 8px;
    margin-top: 5px;
  }
  .toolbar {
    gap: 11px;
    margin-bottom: 16px;
  }
  .search {
    flex-basis: 100%;
  }
  .search input {
    font-size: 12px;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .filters {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }
  .filters button {
    font-size: 10px;
    padding: 9px 11px;
  }
  .lines-grid {
    gap: 11px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .card-body {
    padding: 15px 13px 12px;
    min-height: 171px;
  }
  .card-top {
    margin-bottom: 14px;
  }
  .line-number {
    min-width: 34px;
    height: 33px;
    font-size: 16px;
  }
  .fav {
    top: 18px;
    right: 10px;
  }
  .fav .icon {
    width: 15px;
    height: 15px;
  }
  .card-title {
    font-size: 10px;
    min-height: 49px;
    line-height: 1.8;
    margin-bottom: 10px;
  }
  .badge {
    font-size: 7px;
    padding: 4px 6px;
  }
  .card-bottom {
    padding: 10px 12px;
    font-size: 8px;
    min-height: 37px;
  }
  .card-bottom .icon {
    width: 10px;
    height: 10px;
  }
  .card-bottom > span:nth-child(2) {
    display: none;
  }
  .section-heading h2 {
    font-size: 15px;
  }
  .section-heading small {
    font-size: 9px;
  }
  .bottom-label {
    font-size: 8px;
    gap: 10px;
    line-height: 1.7;
  }
  .footer {
    padding: 18px;
    font-size: 8px;
    gap: 10px;
    line-height: 1.7;
  }
  .footer > span:last-child {
    display: none;
  }
  .detail-heading {
    gap: 12px;
  }
  .detail-heading h1 {
    font-size: 23px;
  }
  .detail-heading .line-number {
    height: 46px;
    min-width: 46px;
    font-size: 24px;
  }
  .detail-heading p {
    font-size: 10px;
  }
  .detail-grid .panel-inner {
    padding: 15px;
  }
  .detail-aside {
    grid-template-columns: 1fr;
  }
  .route-map {
    height: 270px;
  }
  .variant-tabs {
    gap: 6px;
  }
  .variant-tabs button {
    font-size: 10px;
    padding: 8px 11px;
  }
  .direction-tabs button {
    font-size: 9px;
  }
  .info {
    font-size: 10px;
    padding: 12px;
  }
  .page-heading > .btn {
    font-size: 0;
    padding: 9px;
  }
  .page-heading > .btn .icon {
    width: 16px;
    height: 16px;
  }
  .history-row {
    padding: 12px;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .modal-header {
    padding: 20px;
  }
  .modal-body {
    padding: 20px;
  }
  .modal-header h2 {
    font-size: 18px;
  }
  .admin-tabs {
    gap: 15px;
    overflow-x: auto;
  }
  .admin-tabs button {
    font-size: 11px;
    white-space: nowrap;
  }
  .admin-table th,
  .admin-table td {
    padding: 12px;
  }
  .admin-table .row-actions {
    flex-wrap: wrap;
  }
  .admin-bar {
    gap: 6px;
  }
  .btn {
    font-size: 10px;
    padding: 10px 12px;
  }
  .modal-actions {
    flex-wrap: wrap;
  }
  .event {
    flex-direction: column;
    gap: 4px;
  }
  .login-panel {
    margin: 20px auto;
  }
  .hero:after {
    right: -120px;
  }
  .version-heading {
    align-items: flex-start;
  }
  .version-heading .badge {
    font-size: 8px;
  }
  .map-endpoints {
    font-size: 9px;
  }
  .admin-table {
    min-width: 560px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.sidebar {
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar {
  display: none;
}

.direction-tabs.single {
  grid-template-columns: 1fr;
}
.line-number.hlp {
  max-width: calc(100% - 24px);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px;
}
.detail-heading .line-number.hlp {
  font-size: 12px;
  max-width: 140px;
  white-space: normal;
  text-align: center;
  line-height: 1.4;
}

.route-map {
  z-index: 0;
  background: #edf0f2;
}
.route-map.empty-map {
  background: #f3f5f7;
}
.map-loading {
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: #6e7784;
}
.route-map.leaflet-container {
  font-family: inherit;
  font-size: 11px;
}
.route-map .leaflet-control-attribution {
  font-size: 9px;
  padding: 3px 6px;
}
.route-map .leaflet-control-attribution a {
  color: #38596d;
}
.map-network-warning {
  position: absolute;
  bottom: 29px;
  left: 10px;
  right: 10px;
  z-index: 900;
  background: #fff8e9ef;
  border: 1px solid #e8d7af;
  border-radius: 5px;
  padding: 7px 9px;
  font-size: 10px;
  color: #8f610f;
  pointer-events: none;
}
.map-recenter button {
  width: 30px;
  height: 30px;
  background: #fff;
  display: grid;
  place-items: center;
  border-radius: 2px;
}
.map-recenter button:hover {
  background: #f4f4f4;
}
.map-recenter .icon {
  width: 18px;
  height: 18px;
}
.route-map .leaflet-tooltip {
  font-size: 11px;
}
.route-map .leaflet-control-scale-line {
  font-size: 9px;
}
.route-map .leaflet-control-zoom a {
  color: #444;
}
.route-map .leaflet-interactive {
  cursor: grab;
}
.deviation-banner {
  width: 100%;
  min-width: 0;
}
.public-deviation {
  padding: 10px 0;
  border-bottom: 1px solid #ead8b1;
  display: grid;
  gap: 3px;
}
.public-deviation b {
  font-size: 11px;
}
.public-deviation span,
.public-deviation small {
  font-size: 10px;
}
.public-deviation a {
  display: flex;
  gap: 5px;
  align-items: center;
  text-decoration: underline;
  font-size: 10px;
}
.manual-note {
  display: block;
  font-size: 9px;
  line-height: 1.7;
  margin-top: 10px;
}
.notice-button + .notice-button {
  margin-top: 8px;
}
.deviation-edit-card {
  padding: 17px;
  background: #fffcf5;
  border: 1px solid #f0e2c5;
  border-radius: 8px;
  margin-bottom: 14px;
}
.deviation-edit-card .version-heading h3 {
  font-size: 12px;
}
.deviation-edit-card .version-heading .btn {
  font-size: 9px;
  padding: 6px 8px;
}
.update-steps {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--red-pale);
  color: var(--red);
  border-radius: 6px;
  font-size: 9px;
  line-height: 1.7;
  margin-bottom: 17px;
}
.deviation-edit-card .field:last-child {
  margin-bottom: 0;
}
#deviation-count {
  font-size: 10px;
}
#complete-description {
  font-size: 11px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 680px) {
  .deviation-edit-card {
    padding: 12px;
  }
  .deviation-edit-card .version-heading {
    flex-wrap: wrap;
  }
  .update-steps {
    font-size: 8px;
    gap: 4px;
  }
}

/* Driver updates and guided publication */
[hidden] {
  display: none !important;
}
.updates-panel {
  margin: 0 0 24px;
  border-left: 4px solid var(--red, #cf2636);
}
.updates-panel h2 {
  font-size: 20px;
}
.update-item {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid #e9e9ec;
}
.update-item a {
  display: grid;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}
.update-item span,
.updates-panel small {
  color: #626873;
}
.wizard-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 22px;
}
.current-step {
  color: #cf2636;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.preview-legend {
  overflow-wrap: anywhere;
  font-size: 13px;
}
#publication-map {
  height: 330px;
}
@media (max-width: 600px) {
  .update-item {
    align-items: flex-start;
  }
  .updates-panel .version-heading {
    flex-wrap: wrap;
  }
  .wizard-actions .btn {
    flex: 1 1 140px;
  }
}
.install-preview {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}
.install-preview img {
  border-radius: 18px;
}
.install-preview strong {
  font-size: 22px;
}
.install-preview p {
  margin: 5px 0;
  color: #626873;
}
#install-app {
  margin-top: 14px;
  font-size: 13px;
}
body {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.comparison-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 0 4px;
}
.comparison-controls label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  cursor: pointer;
}
.trace-swatch {
  display: inline-block;
  vertical-align: middle;
  width: 25px;
  height: 4px;
  border-radius: 3px;
  flex-shrink: 0;
}
.trace-swatch.base {
  background: #707784;
}
.trace-swatch.changed {
  background: #cf2636;
}
.comparison-note {
  display: block;
  font-size: 11px;
  line-height: 1.7;
  color: #626873;
  margin: 8px 0;
}
#publication-comparison section {
  padding: 12px 0;
  border-bottom: 1px solid #e9eaed;
}

/* Responsive layouts and access screens */
/* Mobile-first polish, with motion as progressive enhancement. */
:root {
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}
html {
  scroll-padding-top: 90px;
}
button,
a,
input,
select,
textarea {
  transition:
    background-color 0.18s,
    color 0.18s,
    border-color 0.18s,
    box-shadow 0.18s,
    transform 0.18s;
}
button:active,
.btn:active {
  transform: scale(0.97);
}
.btn.primary {
  box-shadow: 0 5px 16px #cf263623;
}
.btn.primary:hover {
  background: #b61e2e;
  box-shadow: 0 8px 20px #cf263632;
}
.panel,
.line-card {
  border-radius: 16px;
}
.line-card {
  animation: card-arrive 0.35s var(--ease-out) both;
  transition:
    transform 0.2s var(--ease-out),
    box-shadow 0.2s;
}
.line-card:nth-child(2) {
  animation-delay: 0.035s;
}
.line-card:nth-child(3) {
  animation-delay: 0.07s;
}
.line-card:nth-child(4) {
  animation-delay: 0.105s;
}
.line-card:nth-child(5) {
  animation-delay: 0.14s;
}
.line-card:nth-child(6) {
  animation-delay: 0.175s;
}
.line-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px #2229360d;
}
.hero {
  background: linear-gradient(120deg, #b31b2c, #db3041);
}
.hero-illustration {
  animation: route-float 6s ease-in-out infinite;
}
.topbar {
  gap: 30px;
}
.account-shortcut {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: #f7f8fa;
  border-radius: 12px;
  color: #5f6570;
}
.management {
  min-height: 42px;
}
.topbar nav {
  flex: 1;
}
.mobile-nav {
  display: none;
}
.driver-login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1040px;
  width: 100%;
  margin: auto;
  border: 1px solid #e9e9ed;
  border-radius: 28px;
  overflow: hidden;
  background: white;
  box-shadow: 0 24px 80px #38252a0b;
}
.is-guest .shell {
  grid-template-columns: 1fr;
  min-height: calc(100svh - 90px);
}
.is-guest .sidebar,
.is-guest .footer,
.is-guest .mobile-nav,
.is-guest .topbar nav,
.is-guest .account-shortcut {
  display: none;
}
.is-guest .management {
  margin-left: auto;
}
.is-guest main {
  display: grid;
  align-items: center;
  padding: 40px;
  min-width: 0;
}
.login-story {
  background: linear-gradient(145deg, #a7192b, #d52a3d);
  padding: 40px;
  color: white;
  position: relative;
  overflow: hidden;
}
.login-pill {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 2px;
  display: inline-flex;
  border: 1px solid #ffffff40;
  padding: 10px 13px;
  border-radius: 30px;
}
.login-story h1 {
  font-size: 37px;
  line-height: 1.2;
  letter-spacing: -1.3px;
  margin: 24px 0 20px;
}
.login-story h1 span {
  color: #ffcbd0;
}
.login-story p {
  font-size: 14px;
  line-height: 1.8;
  color: #ffe8eb;
}
.login-route-art {
  height: 150px;
  position: relative;
  margin-top: 20px;
}
.login-route-art > .icon {
  width: 145px;
  height: 145px;
  stroke-width: 0.65;
  opacity: 0.7;
  transform: rotate(-18deg);
  animation: route-float 7s ease-in-out infinite;
}
.route-dot {
  position: absolute;
  border: 1px solid #ffffff40;
  border-radius: 50%;
  width: 80px;
  height: 80px;
  right: 15px;
  top: 25px;
  animation: route-pulse 5s ease-in-out infinite;
}
.route-dot.two {
  width: 130px;
  height: 130px;
  right: -10px;
  top: 0;
  animation-delay: 0.5s;
}
.login-trust {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  opacity: 0.85;
  margin-top: 35px;
}
.driver-login-form {
  padding: 48px 42px;
}
.driver-login-form h2 {
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.8px;
  margin: 14px 0;
}
.driver-login-form > p {
  font-size: 14px;
  color: #7b818d;
  margin: 0 0 30px;
}
.driver-login-form .field {
  margin-bottom: 22px;
}
.driver-login-form .field label {
  font-size: 13px;
  font-weight: 650;
}
.driver-login-form input {
  font-size: 17px;
  min-height: 56px;
  border-radius: 12px;
  padding: 14px 16px;
}
.driver-login-form [type='submit'] {
  min-height: 54px;
  font-size: 14px;
  border-radius: 12px;
}
.pin-wrap {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fafbfc;
}
.pin-wrap input {
  border: 0;
  background: transparent;
  min-width: 0;
  width: 100%;
  box-shadow: none;
  letter-spacing: 8px;
}
.pin-wrap button {
  padding: 0 15px;
  color: #8d2533;
  font-size: 12px;
  font-weight: 650;
}
.login-help {
  font-size: 12px;
  color: #8c3440;
  padding: 18px 0;
}
.login-privacy {
  display: flex;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid #ececf0;
  color: #858a94;
}
.login-privacy .icon {
  width: 16px;
  height: 16px;
  margin-top: 3px;
}
.login-privacy p {
  font-size: 10px;
  line-height: 1.7;
  margin: 0;
}
.admin-entry {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  padding-top: 22px;
  gap: 4px;
  color: #626873;
}
.account-panel {
  max-width: 600px;
  margin: auto;
  display: grid;
  gap: 18px;
  padding: 32px;
}
.account-panel h1 {
  margin: 0;
  font-size: 30px;
}
.account-panel > p {
  margin: 0;
  color: #727987;
}
.account-avatar,
.driver-avatar {
  background: #fcecef;
  color: #cf2636;
  border-radius: 16px;
  display: grid;
  place-items: center;
}
.account-avatar {
  width: 60px;
  height: 60px;
}
.account-avatar .icon {
  width: 29px;
  height: 29px;
}
.driver-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.driver-card {
  padding: 22px;
  min-width: 0;
}
.driver-card-head {
  display: flex;
  gap: 12px;
  align-items: center;
}
.driver-avatar {
  width: 43px;
  height: 43px;
  flex-shrink: 0;
}
.driver-card-head h3 {
  margin: 0;
  font-size: 17px;
  overflow-wrap: anywhere;
}
.driver-card-head p {
  margin: 4px 0 0;
  color: #7b818d;
  font-size: 12px;
}
.driver-card-head > .badge {
  margin-left: auto;
}
.driver-metrics {
  display: flex;
  gap: 15px;
  margin: 20px 0;
  font-size: 11px;
  color: #7b818d;
}
.driver-metrics strong {
  display: block;
  font-size: 24px;
  color: #222936;
  margin-bottom: 4px;
}
.device-hint {
  font-size: 11px;
  color: #985e0b;
  background: #fff6e6;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 15px;
  line-height: 1.7;
}
.driver-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.session-card {
  border: 1px solid #e9eaed;
  border-radius: 14px;
  padding: 18px;
  margin: 16px 0;
}
.session-card h3 {
  font-size: 15px;
}
.session-card p {
  font-size: 13px;
  color: #707784;
}
.session-card dl {
  font-size: 11px;
}
.session-card dl > div {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 7px 0;
}
.session-card dt {
  color: #7b818d;
}
.session-card dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
.admin-tabs {
  flex-wrap: wrap;
}
.admin-tabs button {
  min-height: 44px;
}
.driver-list > .empty {
  grid-column: 1/-1;
}
@keyframes card-arrive {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes route-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -7px;
  }
}
@keyframes route-pulse {
  0%,
  100% {
    opacity: 0.35;
    scale: 0.9;
  }
  50% {
    opacity: 0.75;
    scale: 1.05;
  }
}
@media (max-width: 900px) {
  .topbar {
    gap: 14px;
    padding: 0 24px;
  }
  .topbar nav {
    gap: 20px;
  }
  .driver-login-form {
    padding: 36px 28px;
  }
  .login-story {
    padding: 32px;
  }
  .login-story h1 {
    font-size: 30px;
  }
  .driver-login-form h2 {
    font-size: 25px;
  }
}
@media (max-width: 700px) {
  body {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    background: #f7f8fa;
  }
  .topbar {
    height: 72px;
    padding: env(safe-area-inset-top, 0px) 20px 0;
    gap: 10px;
    background: #ffffffef;
    backdrop-filter: blur(18px);
    border-bottom: 1px solid #eaebef;
  }
  .brand {
    font-size: 24px;
    gap: 9px;
  }
  .brand-icon {
    width: 37px;
    height: 41px;
    border-radius: 12px;
  }
  .brand small {
    font-size: 7px;
    letter-spacing: 1.2px;
  }
  .topbar nav {
    display: none;
  }
  .management {
    padding: 9px 10px;
    font-size: 11px;
    min-height: 44px;
    border: 0;
    background: #f5f6f8;
    border-radius: 12px;
  }
  .management .icon {
    width: 18px;
    height: 18px;
  }
  .account-shortcut {
    display: none;
  }
  .shell {
    display: block;
    min-height: calc(100svh - 150px);
  }
  .sidebar {
    display: none;
  }
  main {
    padding: 26px 20px 30px;
    min-width: 0;
  }
  .breadcrumb {
    font-size: 11px;
    margin-bottom: 20px;
  }
  .page-heading {
    gap: 12px;
  }
  .page-heading h1 {
    font-size: 29px;
    line-height: 1.15;
    letter-spacing: -1px;
  }
  .page-heading p {
    font-size: 13px;
    line-height: 1.6;
    max-width: none;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 1.4px;
  }
  .date-pill {
    display: none;
  }
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: #fffffff5;
    backdrop-filter: blur(20px);
    border-top: 1px solid #e5e7ec;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
    gap: 4px;
    box-shadow: 0 -6px 25px #22293605;
  }
  .mobile-nav a {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-height: 52px;
    justify-content: center;
    font-size: 10px;
    font-weight: 650;
    color: #8b909a;
    border-radius: 13px;
  }
  .mobile-nav .icon {
    width: 22px;
    height: 22px;
    stroke-width: 1.8;
  }
  .mobile-nav a.active {
    color: #cf2636;
    background: #fcf0f2;
  }
  .mobile-nav a:active {
    background: #f6e8eb;
  }
  .hero {
    padding: 25px;
    border-radius: 20px;
    margin: 24px 0 18px;
    box-shadow: 0 12px 28px #cf26361a;
  }
  .hero h2 {
    font-size: 24px;
    line-height: 1.2;
  }
  .hero p {
    font-size: 12px;
    line-height: 1.75;
  }
  .hero-label {
    font-size: 8px;
    line-height: 1.5;
    max-width: 210px;
    letter-spacing: 1px;
  }
  .hero-illustration {
    display: none;
  }
  .overview {
    gap: 10px;
    margin-bottom: 30px;
  }
  .stat {
    border: 1px solid #ebecef;
    background: #fff;
    border-radius: 14px;
    padding: 16px 12px;
    box-shadow: none;
  }
  .stat strong {
    font-size: 24px;
  }
  .stat small {
    font-size: 10px;
    line-height: 1.6;
  }
  .section-heading h2 {
    font-size: 20px;
  }
  .section-heading small {
    font-size: 11px;
  }
  .toolbar {
    margin: 18px 0;
    gap: 14px;
  }
  .search input {
    font-size: 16px;
    padding: 16px 15px 16px 44px;
    border-radius: 14px;
    min-height: 54px;
  }
  .filters {
    gap: 6px;
    overflow: auto;
    justify-content: flex-start;
  }
  .filters button {
    font-size: 12px;
    white-space: nowrap;
    min-height: 42px;
    padding: 10px 13px;
    border-radius: 11px;
  }
  .lines-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .card-body {
    display: grid;
    grid-template-columns: 52px 1fr;
    column-gap: 14px;
    row-gap: 8px;
    padding: 20px;
    min-height: 0;
  }
  .card-top {
    grid-row: 1/3;
    margin: 0;
    align-self: start;
  }
  .line-number {
    min-width: 46px;
    height: 46px;
    font-size: 22px;
    border-radius: 12px;
  }
  .card-title {
    grid-column: 2;
    min-height: 0;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 35px 0 0;
  }
  .card-body > .badge {
    grid-column: 2;
    justify-self: start;
    font-size: 10px;
    padding: 5px 8px;
    max-width: 100%;
  }
  .fav {
    top: 13px;
    right: 10px;
    width: 44px;
    height: 44px;
  }
  .fav .icon {
    width: 20px;
    height: 20px;
  }
  .card-bottom {
    padding: 13px 20px;
    font-size: 11px;
    min-height: 44px;
  }
  .card-bottom > span:nth-child(2) {
    display: flex;
  }
  .card-bottom .icon {
    width: 14px;
    height: 14px;
  }
  .empty {
    padding: 34px 20px;
  }
  .empty h3 {
    font-size: 19px;
    line-height: 1.4;
  }
  .empty p {
    font-size: 13px;
    line-height: 1.7;
  }
  .bottom-label {
    font-size: 10px;
    display: block;
    margin-top: 25px;
  }
  .bottom-label > span {
    display: block;
    margin-top: 8px;
  }
  .footer {
    padding: 15px 20px;
    font-size: 10px;
  }
  .footer > span {
    display: none;
  }
  .footer .btn {
    min-height: 44px;
  }
  .page-heading > .btn {
    min-height: 44px;
    min-width: 44px;
    border-radius: 12px;
  }
  .detail-heading h1 {
    font-size: 27px;
  }
  .detail-heading p {
    font-size: 12px;
  }
  .detail-grid .panel-inner {
    padding: 18px;
  }
  .direction-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .direction-tabs.single {
    grid-template-columns: 1fr;
  }
  .direction-tabs button {
    font-size: 12px;
    line-height: 1.5;
    min-height: 48px;
    padding: 10px;
  }
  .variant-tabs {
    overflow: auto;
    flex-wrap: nowrap;
    padding-bottom: 7px;
    margin-top: 20px;
  }
  .variant-tabs button {
    font-size: 13px;
    white-space: nowrap;
    min-height: 44px;
    padding: 10px 16px;
  }
  .info {
    font-size: 12px;
    line-height: 1.75;
    padding: 16px;
    border-radius: 13px;
  }
  .info strong {
    font-size: 13px;
  }
  .public-deviation small,
  .manual-note {
    font-size: 11px;
  }
  .route-map {
    height: 310px;
    border-radius: 12px;
  }
  .comparison-controls {
    gap: 10px;
  }
  .comparison-controls label {
    font-size: 11px;
    min-height: 35px;
  }
  .comparison-note {
    font-size: 11px;
  }
  .download {
    min-height: 54px;
    font-size: 14px !important;
    border-radius: 13px;
  }
  .file-data span,
  .file-data strong {
    font-size: 12px;
  }
  .notice-button {
    font-size: 12px;
  }
  .btn {
    font-size: 13px;
    min-height: 44px;
    padding: 12px 15px;
    border-radius: 11px;
  }
  .btn.small {
    font-size: 11px;
    min-height: 40px;
  }
  .detail-aside h3 {
    font-size: 17px;
  }
  .account-panel {
    padding: 24px;
    gap: 20px;
  }
  .account-panel h1 {
    font-size: 26px;
  }
  .is-guest {
    padding-bottom: 0;
  }
  .is-guest .topbar {
    position: relative;
  }
  .is-guest main {
    padding: 22px 16px 30px;
    display: block;
  }
  .driver-login {
    display: block;
    border-radius: 24px;
  }
  .login-story {
    padding: 25px 25px 27px;
  }
  .login-route-art {
    position: absolute;
    right: -15px;
    top: 25px;
    width: 110px;
    height: 100px;
    margin: 0;
    opacity: 0.5;
  }
  .login-route-art > .icon {
    width: 100px;
    height: 100px;
  }
  .route-dot {
    display: none;
  }
  .login-pill {
    font-size: 8px;
    padding: 8px 11px;
    letter-spacing: 1.4px;
  }
  .login-story h1 {
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -0.8px;
    margin: 20px 0 12px;
  }
  .login-story p {
    font-size: 12px;
    line-height: 1.7;
    margin: 0;
  }
  .login-trust {
    display: none;
  }
  .driver-login-form {
    padding: 28px 25px;
  }
  .driver-login-form h2 {
    font-size: 25px;
    max-width: 250px;
    margin: 12px 0;
  }
  .driver-login-form > p {
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 25px;
  }
  .driver-login-form input {
    font-size: 17px;
  }
  .driver-login-form .field {
    margin-bottom: 20px;
  }
  .driver-login-form [type='submit'] {
    font-size: 14px;
  }
  .login-help {
    min-height: 44px;
    padding: 15px 0;
    font-size: 12px;
  }
  .login-privacy p {
    font-size: 10px;
  }
  .admin-entry {
    font-size: 12px;
    min-height: 44px;
  }
  .is-guest .login-panel {
    margin: 0 auto;
    border-radius: 20px;
    padding: 25px;
    max-width: 480px;
  }
  .login-panel h2 {
    font-size: 25px;
  }
  .field input,
  .field textarea,
  .field select {
    font-size: 16px;
    min-height: 48px;
    border-radius: 11px;
  }
  .field label {
    font-size: 13px;
  }
  .field small {
    font-size: 11px;
  }
  .modal-header h2 {
    font-size: 21px;
  }
  .modal-header p {
    font-size: 12px;
  }
  .modal-header {
    padding: 24px 22px 18px;
  }
  .modal-body {
    padding: 20px 22px 26px;
  }
  dialog {
    width: calc(100% - 20px);
    max-height: calc(100svh - 32px);
    border-radius: 22px;
  }
  .close {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }
  .modal-actions {
    gap: 8px;
  }
  .admin-tabs {
    gap: 6px;
    flex-wrap: wrap;
    margin: 22px 0;
  }
  .admin-tabs button {
    font-size: 12px;
    padding: 10px;
    min-height: 44px;
  }
  .admin-bar {
    align-items: stretch;
    gap: 12px;
  }
  .admin-bar > .search {
    width: 100%;
    flex-basis: 100%;
  }
  .driver-list {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .driver-card {
    padding: 21px;
  }
  .driver-card-head h3 {
    font-size: 18px;
  }
  .driver-card-head > .badge {
    font-size: 10px;
    padding: 6px 9px;
  }
  .driver-card-actions .btn {
    flex: 1;
    font-size: 12px;
  }
  .driver-metrics {
    font-size: 12px;
    gap: 26px;
  }
  .driver-metrics strong {
    font-size: 25px;
  }
  .session-card dl {
    font-size: 12px;
    line-height: 1.6;
  }
  .session-card dl > div {
    display: block;
  }
  .session-card dd {
    text-align: left;
    margin-top: 2px;
  }
  .updates-panel h2 {
    font-size: 18px;
  }
  .updates-panel p {
    font-size: 13px;
    line-height: 1.6;
  }
  .update-item {
    font-size: 13px;
  }
  .update-item .btn {
    min-width: 44px;
  }
  .update-steps {
    font-size: 10px;
    flex-wrap: wrap;
    line-height: 1.7;
  }
  .wizard-actions {
    gap: 8px;
  }
  .wizard-actions .btn {
    font-size: 12px;
  }
  .admin-table {
    font-size: 12px;
  }
  .admin-table .line-number {
    font-size: 17px;
    min-width: 38px;
    height: 38px;
  }
  .table-wrap {
    border-radius: 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.device-explainer {
  border: 1px solid #e5e8ef;
  background: #f1f5f8;
  border-radius: 12px;
  margin: 0 0 20px;
  padding: 14px 16px;
  font-size: 12px;
  color: #596878;
  line-height: 1.7;
}
.device-explainer summary {
  cursor: pointer;
  font-weight: 650;
  min-height: 24px;
}
.device-explainer p {
  margin-bottom: 0;
}

.application-code-notice {
  border: 1px solid #f0ccd2;
  background: #fff5f6;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 24px;
  color: #762332;
}
.application-code-notice strong {
  font-size: 13px;
}
.application-code-notice p {
  margin: 7px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: #7d5159;
}

.simple-route-panel {
  border: 1px solid #e6e8ed;
  border-radius: 16px;
  padding: 22px;
  margin: 20px 0;
  background: #fff;
}
.simple-route-panel h3 {
  margin: 0;
  font-size: 20px;
}
.route-status {
  font-size: 13px;
  font-weight: 650;
  margin: 8px 0 0;
}
.route-status.ordinary {
  color: #238261;
}
.route-status.deviated {
  color: #a96307;
}
.base-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  border: 1px dashed #d9dde5;
  border-radius: 12px;
  margin: 20px 0 10px;
  background: #fafbfc;
}
.base-summary.ready {
  border: 1px solid #d7e9e1;
  background: #f5faf7;
}
.base-summary > span {
  color: #238261;
}
.base-summary > div {
  flex: 1;
}
.base-summary strong,
.base-summary small {
  display: block;
}
.base-summary strong {
  font-size: 13px;
}
.base-summary small {
  font-size: 11px;
  color: #738078;
  margin-top: 5px;
  line-height: 1.5;
}
.base-file-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 20px;
}
.base-file-links a {
  font-size: 11px;
  display: flex;
  gap: 6px;
  align-items: center;
  color: #527061;
}
.base-file-links .icon {
  width: 15px;
  height: 15px;
}
.route-main-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 20px 0 5px;
}
.route-history {
  border-top: 1px solid #e9eaed;
  margin-top: 18px;
  padding-top: 14px;
}
.route-history summary {
  cursor: pointer;
  font-size: 12px;
  color: #727987;
  min-height: 30px;
}
.active-deviation-list {
  margin: 20px 0;
}
.active-deviation-row {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #eee;
}
.active-deviation-row strong {
  font-size: 13px;
}
.active-deviation-row small {
  display: block;
  font-size: 11px;
  line-height: 1.6;
  color: #7b818d;
  margin-top: 5px;
}
#simple-map-wrap {
  margin: 18px 0;
}
#simple-map-legend section {
  margin-top: 15px;
  font-size: 12px;
}
@media (max-width: 700px) {
  .simple-route-panel {
    padding: 16px;
    margin: 16px 0;
  }
  .base-summary {
    flex-wrap: wrap;
    padding: 13px;
  }
  .base-summary > .btn {
    width: 100%;
  }
  .route-main-actions .btn {
    width: 100%;
  }
  .active-deviation-row {
    align-items: flex-start;
  }
  .active-deviation-row strong {
    font-size: 12px;
  }
  .simple-route-panel .version-heading h3 {
    font-size: 20px;
  }
  .simple-route-panel .version-heading > .btn {
    font-size: 10px;
  }
  .base-file-links a {
    min-height: 35px;
  }
  .active-deviation-row > .btn {
    min-width: 78px;
  }
}

.route-state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.route-state-grid > .simple-route-panel {
  margin: 0;
}
.route-state-grid > .empty {
  grid-column: 1/-1;
}
@media (max-width: 700px) {
  .route-state-grid {
    grid-template-columns: 1fr;
  }
  .route-state-grid .route-main-actions .btn {
    font-size: 12px;
  }
}
/* Separate experimental drawing workshop, never a publication shortcut. */
.atelier-map {
  height: 440px;
  min-height: 320px;
  touch-action: pan-x pan-y;
}
.atelier-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
.atelier-label {
  background: transparent;
  border: 0;
}
.atelier-label span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: #cf2636;
  color: white;
  border: 2px solid white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 2px 5px #0005;
}
.atelier-layout #atelier-stats {
  padding: 12px;
  background: #f4f5f7;
  border-radius: 10px;
  margin-bottom: 12px;
}
.atelier-layout .checkbox-line {
  margin: 18px 0;
}
@media (max-width: 600px) {
  .atelier-map {
    height: 54vh;
    min-height: 310px;
  }
  .atelier-tools .btn {
    flex: 1 1 130px;
  }
}

/* Application theme */
/* Mes Lignes / new visual system — local assets only, mobile first. */
:root {
  --red: #d5283e;
  --red-dark: #af1730;
  --red-pale: #fff0f2;
  --ink: #20272b;
  --muted: #68727a;
  --line: #e3e5e3;
  --bg: #f4f5f1;
  --shadow: 0 12px 36px #2330250b;
  --rail: #202c2c;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
body {
  background: var(--bg);
}
.topbar {
  height: 84px;
  padding: 0 34px;
  gap: 40px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 26px;
  letter-spacing: -1.4px;
}
.brand-light {
  font-weight: 500;
}
.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--red);
  box-shadow: 0 5px 12px #d5283e20;
}
.brand small {
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #68727a;
}
.topbar nav {
  gap: 30px;
  font-size: 13px;
}
.topbar nav a {
  position: relative;
  border: 0;
}
.topbar nav a.active:after {
  content: '';
  height: 3px;
  width: 24px;
  border-radius: 3px;
  background: var(--red);
  position: absolute;
  bottom: 17px;
  left: 0;
}
.management {
  background: var(--rail);
  color: white;
  border: 1px solid var(--rail);
  border-radius: 12px;
  min-height: 44px;
  padding: 10px 16px;
}
.management:hover {
  background: #354744;
}
.account-shortcut {
  background: #f2f3f0;
  color: var(--rail);
}
.shell {
  grid-template-columns: 232px minmax(0, 1fr);
}
.sidebar {
  background: var(--rail);
  color: #d7e1dc;
  border: 0;
  padding: 34px 17px 24px;
  gap: 8px;
}
.side-label {
  color: #a0b2ab;
  font-size: 9px;
  letter-spacing: 1.7px;
  margin-left: 14px;
}
.side-link {
  min-height: 47px;
  padding: 13px 14px;
  font-size: 12px;
  color: #c3cfca;
  border-radius: 12px;
}
.side-link.active {
  background: #ffffff12;
  color: #fff;
  box-shadow: inset 3px 0 var(--red);
}
.side-link:hover {
  background: #ffffff0b;
  color: #fff;
}
.side-link.active .icon {
  color: #ff7987;
}
.side-number {
  padding: 3px 7px;
  border-radius: 6px;
  background: #ffffff12;
  color: #fff;
}
.side-divider,
.sidebar-bottom {
  border-color: #ffffff15;
}
.side-note {
  background: #ffffff08;
  border: 1px solid #ffffff14;
  border-radius: 16px;
  margin: 40px 0 24px;
  padding: 20px 16px;
}
.side-note strong {
  color: #fff;
  font-size: 12px;
}
.side-note p {
  color: #a9bcb3;
  font-size: 11px;
  line-height: 1.8;
}
.side-note button,
.note-icon {
  color: #ffa8b2;
}
.sidebar-bottom {
  font-size: 10px;
  color: #adc0b7;
  padding-left: 8px;
  padding-right: 8px;
}
main {
  padding: 34px 40px 48px;
  max-width: 1580px;
}
.breadcrumb {
  font-size: 11px;
  margin-bottom: 25px;
  color: #737f7b;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.7px;
  margin-bottom: 12px;
  color: #9d2438;
  font-weight: 750;
}
.page-heading {
  align-items: center;
  margin-bottom: 26px;
}
.page-heading h1 {
  font-size: clamp(30px, 3vw, 43px);
  letter-spacing: -1.6px;
  line-height: 1.08;
  font-weight: 750;
}
.heading-light {
  color: #7a8481;
  font-weight: 450;
}
.page-heading p {
  font-size: 13px;
  line-height: 1.7;
  color: #66716c;
  margin-top: 12px;
}
.date-pill {
  border: 1px solid #e0e4df;
  border-radius: 25px;
  padding: 12px 15px;
  font-size: 11px;
  background: #ffffff80;
}
.hero {
  min-height: 245px;
  padding: 32px 36px;
  border-radius: 24px;
  background: linear-gradient(115deg, #ad1730 0%, #d5283e 64%, #e23d50);
  box-shadow: 0 14px 24px #b7243114;
  margin-bottom: 18px;
}
.hero:after {
  display: none;
}
.hero h2 {
  font-size: clamp(25px, 2.6vw, 37px);
  font-weight: 680;
  letter-spacing: -1.2px;
  line-height: 1.15;
  margin: 0 0 15px;
  max-width: 450px;
}
.hero p {
  font-size: 13px;
  line-height: 1.7;
  color: #ffe4e7;
}
.hero-label {
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #ffc9d1;
  margin-bottom: 17px;
}
.hero-route-art {
  position: relative;
  width: 310px;
  min-width: 245px;
  align-self: stretch;
  margin-left: 12px;
}
.hero-route-art > svg {
  height: 100%;
  width: 100%;
  min-height: 180px;
}
.art-start,
.art-end {
  position: absolute;
  font-size: 8px;
  letter-spacing: 1.7px;
  font-weight: 750;
}
.art-start {
  left: 2%;
  bottom: 6%;
}
.art-end {
  right: 0;
  top: 6%;
}
.art-chip {
  position: absolute;
  bottom: 8%;
  right: 1%;
  background: #fff;
  color: #9b1e33;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 12px;
  box-shadow: 0 8px 30px #7c102422;
  font-size: 10px;
  font-weight: 700;
  animation: chip-float 5s ease-in-out infinite;
}
.art-chip .icon {
  width: 14px;
  height: 14px;
}
.overview {
  gap: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  margin-bottom: 32px;
  overflow: hidden;
}
.stat {
  border: 0;
  border-radius: 0;
  padding: 20px;
  gap: 13px;
  box-shadow: none;
  background: transparent;
}
.stat + .stat {
  border-left: 1px solid var(--line);
}
.stat-icon {
  height: 40px;
  border-radius: 12px;
  padding: 10px;
  background: #eff3f0;
  color: #527269;
}
.stat strong {
  font-size: 27px;
  font-weight: 750;
  letter-spacing: -1.1px;
}
.stat small {
  display: block;
  font-size: 10px;
  line-height: 1.5;
  margin: 3px 0 0;
  color: #6d7872;
}
.section-heading h2 {
  font-size: 21px;
  letter-spacing: -0.7px;
}
.section-heading small {
  font-size: 11px;
}
.view-icon {
  display: none;
}
.toolbar {
  gap: 12px;
  margin: 18px 0 22px;
}
.search input {
  font-size: 13px;
  min-height: 52px;
  padding: 15px 17px 15px 44px;
  border: 1px solid #dce1db;
  border-radius: 14px;
  box-shadow: 0 3px 8px #25302503;
}
.search .icon {
  top: 17px;
  left: 16px;
  color: #63736a;
}
.search input::placeholder {
  color: #59665c;
}
.filters {
  background: #e8ece5;
  border-radius: 12px;
  padding: 5px;
}
.filters button {
  font-size: 11px;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 9px;
  color: #58665e;
}
.filters button.active {
  color: #202c2c;
  box-shadow: 0 2px 4px #25302508;
}
.lines-grid {
  gap: 17px;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
}
.line-card {
  border: 1px solid #dfe4dd;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 3px 6px #25302502;
}
.line-card:hover {
  border-color: #d3a3ab;
  box-shadow: 0 12px 25px #2530250b;
  transform: translateY(-4px);
}
.card-body {
  padding: 22px;
  min-height: 196px;
}
.line-number {
  min-width: 48px;
  height: 48px;
  border-radius: 13px;
  color: white;
  background: var(--red);
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -0.8px;
}
.line-number.hlp {
  color: #35584d;
  background: #e8f0ea;
}
.card-top {
  margin-bottom: 20px;
}
.card-title {
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: -0.2px;
  color: #293932;
  margin-bottom: 14px;
  padding-right: 8px;
}
.card-title .arrow {
  color: #81958b;
}
.badge {
  font-size: 10px;
  padding: 5px 8px;
  border-radius: 7px;
  line-height: 1.5;
  font-weight: 650;
}
.badge.green {
  color: #22624a;
  background: #eaf4ed;
}
.badge.amber {
  background: #fff0d9;
  color: #885206;
}
.badge .icon {
  width: 12px;
  height: 12px;
}
.fav {
  top: 23px;
  right: 18px;
  width: 36px;
  height: 36px;
  background: #f5f6f2;
  border-radius: 50%;
  color: #8b968d;
}
.fav.selected {
  background: #fff0f2;
  color: var(--red);
}
.fav .icon {
  width: 18px;
  height: 18px;
}
.card-bottom {
  padding: 14px 22px;
  min-height: 50px;
  background: #fcfdfb;
  border-color: #ecf0e9;
  font-size: 11px;
  color: #63776b;
}
.card-bottom span:last-child {
  font-weight: 650;
  color: #283b30;
}
.btn {
  border-radius: 12px;
  min-height: 46px;
  padding: 12px 17px;
  font-size: 12px;
  line-height: 1.5;
  border-color: #dce1db;
  background: white;
  font-weight: 650;
}
.btn:hover {
  background: #f1f4ed;
  border-color: #bdc9bd;
}
.btn.primary {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  box-shadow: 0 4px 10px #d5283e15;
}
.btn.primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
}
.btn.small {
  font-size: 11px;
  min-height: 38px;
  border-radius: 10px;
  padding: 8px 12px;
}
.btn.danger {
  background: #fff8f9;
  color: #a72035;
  border-color: #efd3d9;
}
.btn.link {
  border: 0;
  background: transparent;
  color: #a72035;
  box-shadow: none;
}
.icon-button {
  padding: 10px;
  min-width: 44px;
}
.empty {
  border: 1px dashed #c8d2c8;
  background: #ffffffb0;
  border-radius: 22px;
  padding: 48px 24px;
}
.empty h3 {
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.5px;
}
.empty p {
  font-size: 13px;
  max-width: 450px;
  margin: 12px auto;
}
.empty > .icon {
  color: #6b8375;
  width: 35px;
  height: 35px;
}
.footer {
  background: var(--bg);
  border-color: #dfe4dc;
  padding: 20px 34px;
  font-size: 10px;
  color: #68756a;
  align-items: center;
}
.footer .btn {
  background: transparent;
}
.panel {
  border-radius: 20px;
  border-color: #dfe4dd;
  box-shadow: 0 4px 12px #25302503;
}
.panel-inner {
  padding: 25px;
}
.panel h3 {
  font-size: 16px;
  letter-spacing: -0.3px;
}
.variant-tabs {
  gap: 8px;
}
.variant-tabs button {
  border-radius: 12px;
  min-height: 44px;
  font-size: 13px;
  padding: 11px 17px;
  border-color: #dce2d8;
}
.variant-tabs button.active {
  background: var(--rail);
  border-color: var(--rail);
  box-shadow: 0 4px 12px #25302510;
}
.direction-tabs {
  background: #eff2eb;
  padding: 6px;
  border-radius: 14px;
}
.direction-tabs button {
  min-height: 48px;
  font-size: 12px;
  border-radius: 10px;
}
.direction-tabs button.active {
  color: #a72035;
  box-shadow: 0 3px 10px #25302507;
}
.route-map {
  border-radius: 14px;
}
.map-endpoints {
  font-size: 11px;
  line-height: 1.6;
}
.info {
  border-radius: 13px;
  font-size: 12px;
  background: #eef3f2;
  color: #3e5f57;
  border-color: #dce8e3;
  line-height: 1.75;
}
.info.amber {
  background: #fff5e7;
  color: #805312;
  border-color: #efdfc6;
}
.aside-label {
  color: #54645c;
  font-size: 10px;
  letter-spacing: 1.2px;
}
.detail-aside h3 {
  font-size: 19px;
  line-height: 1.4;
}
.detail-aside .panel:first-child {
  border-top: 4px solid var(--red);
}
.download-sub {
  font-size: 12px;
}
.file-data {
  font-size: 12px;
}
.tip-list {
  font-size: 12px;
}
.admin-tabs {
  background: #e6ebe2;
  border-radius: 15px;
  padding: 6px;
  border: 1px solid #dce3d7;
  gap: 5px;
  margin: 28px 0;
}
.admin-tabs button {
  padding: 12px 18px;
  font-size: 12px;
  border-radius: 10px;
  min-height: 44px;
  border: 0;
  color: #53664f;
  background: transparent;
}
.admin-tabs button.active {
  background: var(--rail);
  color: #fff;
  box-shadow: 0 4px 10px #25302510;
}
.admin-bar {
  align-items: center;
  gap: 10px;
  margin: 24px 0;
}
.admin-bar .search {
  min-width: 210px;
}
.admin-line-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}
.admin-line-card {
  background: #fff;
  border: 1px solid #dce3d7;
  border-radius: 21px;
  padding: 23px;
  animation: surface-in 0.35s both;
}
.admin-line-top {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 26px;
}
.admin-line-top .badge {
  margin-left: auto;
}
.admin-category {
  font-size: 10px;
  color: #6c7b6b;
  font-weight: 600;
}
.journey-stops {
  position: relative;
  display: grid;
  gap: 18px;
  padding-left: 23px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.5;
}
.journey-stops:before {
  content: '';
  position: absolute;
  left: 5px;
  top: 9px;
  bottom: 9px;
  width: 1px;
  background: #c0cdbd;
}
.journey-stops strong,
.journey-stops > span {
  position: relative;
  font-weight: 550;
}
.journey-stops strong:before,
.journey-stops > span:before {
  content: '';
  position: absolute;
  left: -22px;
  top: 6px;
  width: 8px;
  height: 8px;
  border: 2px solid #7f9680;
  border-radius: 50%;
  background: #fff;
}
.journey-stops > span:before {
  background: var(--rail);
  border-color: var(--rail);
}
.admin-variant-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 23px;
  min-height: 24px;
}
.admin-variant-list span {
  padding: 6px 9px;
  border-radius: 7px;
  font-size: 10px;
  color: #5b7159;
  background: #f0f4ec;
}
.admin-line-bottom {
  display: flex;
  gap: 7px;
  padding-top: 18px;
  border-top: 1px solid #ecf0e8;
}
.admin-line-bottom > .primary {
  flex: 1;
}
.admin-line-bottom .icon-button {
  min-width: 40px;
  padding: 9px;
}
.simple-route-panel {
  padding: 25px;
  border: 1px solid #dce3d7;
  border-radius: 20px;
  margin: 22px 0;
  background: #fff;
}
.simple-route-panel h3 {
  font-size: 23px;
  letter-spacing: -0.8px;
}
.route-state-grid {
  gap: 18px;
}
.route-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  margin-top: 12px;
  line-height: 1.6;
}
.route-status:before {
  content: '';
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: currentColor;
}
.base-summary {
  border-radius: 13px;
  padding: 17px;
  background: #f6f8f2;
}
.base-summary.ready {
  background: #f0f7ef;
  border-color: #d6e5d2;
}
.base-summary strong {
  font-size: 14px;
}
.base-summary small {
  font-size: 12px;
}
.base-file-links a {
  font-size: 12px;
  padding: 6px 0;
}
.active-deviation-row {
  background: #fff8ee;
  padding: 15px;
  border-radius: 12px;
  margin: 8px 0;
  border: 1px solid #f0e3cb;
}
.active-deviation-row strong {
  font-size: 14px;
}
.active-deviation-row small {
  font-size: 12px;
  color: #785f37;
}
.route-history summary {
  font-size: 12px;
  min-height: 34px;
}
.history-row {
  padding: 16px 0;
  font-size: 12px;
}
.route-main-actions {
  gap: 8px;
}
.route-main-actions .btn {
  flex: 1 1 170px;
}
.admin-form-note {
  font-size: 12px;
  line-height: 1.75;
  color: #53604f;
}
.driver-card {
  padding: 24px;
}
.driver-avatar,
.account-avatar {
  color: #a72035;
  background: #fff0f2;
}
.driver-metrics strong {
  font-size: 30px;
}
.device-explainer {
  background: #edf2eb;
  border-color: #d7e2d2;
  color: #4c6549;
}
.event {
  font-size: 13px;
  line-height: 1.7;
  padding: 17px 0;
}
.event small {
  font-size: 11px;
  color: #6f7e6b;
}
.driver-login {
  max-width: 1080px;
  border-radius: 28px;
  border: 1px solid #dbe2d5;
  box-shadow: 0 20px 60px #2530250b;
}
.login-story {
  padding: 52px 42px;
  background: linear-gradient(145deg, #94172c, #cf263e 65%, #e14355);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 620px;
}
.login-story h1 {
  font-size: 42px;
  line-height: 1.12;
  letter-spacing: -1.6px;
  max-width: 340px;
}
.login-story p {
  font-size: 14px;
}
.login-pill {
  align-self: flex-start;
  font-size: 9px;
  letter-spacing: 2px;
}
.login-trust {
  margin-top: 35px;
  font-size: 12px;
}
.login-route-art {
  order: 3;
  height: 115px;
  opacity: 0.75;
}
.login-route-art > .icon {
  width: 115px;
  height: 115px;
}
.driver-login-form {
  padding: 45px 42px;
}
.driver-login-form h2 {
  font-size: 32px;
  letter-spacing: -1.2px;
}
.driver-login-form > p {
  font-size: 13px;
}
.application-code-notice {
  border-radius: 14px;
  background: #fff5f5;
  border-color: #efd1d7;
  padding: 15px;
}
.application-code-notice strong {
  font-size: 13px;
}
.application-code-notice p {
  font-size: 12px;
}
.field label {
  font-size: 12px;
  font-weight: 650;
  color: #364833;
}
.field input,
.field select,
.field textarea {
  background: #fbfcf9;
  border: 1px solid #d7dfd1;
  color: var(--ink);
  border-radius: 12px;
  min-height: 48px;
  font-size: 14px;
  padding: 13px 14px;
}
.field small {
  font-size: 11px;
  color: #697663;
  line-height: 1.7;
}
.pin-wrap {
  border-color: #d7dfd1;
  background: #fbfcf9;
}
.pin-wrap input {
  border: 0;
  background: transparent;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid #d5283e35;
  border-color: #cc8491;
}
.field textarea {
  min-height: 100px;
}
.driver-login-form input {
  font-size: 17px;
  min-height: 54px;
}
.driver-login-form [type='submit'] {
  font-size: 14px;
  min-height: 54px;
}
.login-panel {
  border-top: 4px solid var(--red);
  padding: 32px !important;
  border-radius: 22px;
}
.login-panel h2 {
  font-size: 28px;
  letter-spacing: -1px;
}
.login-panel p {
  font-size: 13px;
  line-height: 1.7;
}
.login-privacy {
  color: #65745e;
}
.login-privacy p {
  font-size: 11px;
}
.login-help,
.admin-entry {
  font-size: 12px;
}
dialog {
  width: min(760px, calc(100% - 40px));
  max-height: 92svh;
  border: 1px solid #dce3d7;
  border-radius: 23px;
  box-shadow: 0 24px 100px #14261a40;
}
dialog::backdrop {
  background: #15271d8f;
  backdrop-filter: blur(7px);
}
.modal-header {
  padding: 26px 28px 23px;
  background: #f8faf5;
  border-bottom: 1px solid #e0e6db;
  position: sticky;
  top: 0;
  z-index: 1100;
}
.modal-header h2 {
  font-size: 24px;
  letter-spacing: -0.8px;
  margin-top: 0;
}
.modal-header p {
  font-size: 12px;
  line-height: 1.6;
  color: #697962;
}
.close {
  background: #eaf0e5;
  color: #42573d;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
}
.modal-body {
  padding: 25px 28px 30px;
}
.modal-body h3 {
  font-size: 17px;
  letter-spacing: -0.4px;
}
.checkbox-line {
  font-size: 12px;
  line-height: 1.8;
  align-items: flex-start;
}
.checkbox-line input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex-shrink: 0;
  accent-color: var(--red);
  margin-top: 3px;
}
.modal-actions {
  padding-top: 20px;
}
.atelier-map {
  height: 420px;
}
.atelier-layout #atelier-stats {
  background: #eef3e9;
  color: #385331;
  font-size: 12px;
  line-height: 1.7;
}
.atelier-tools .btn {
  font-size: 12px;
}
.atelier-label span {
  background: var(--red);
}
#toast {
  border-radius: 14px;
  background: var(--rail);
  color: white;
  box-shadow: 0 10px 35px #14261a25;
  font-size: 13px;
  padding: 14px 22px;
  z-index: 2000;
}
.bottom-label {
  font-size: 11px;
  line-height: 1.6;
}
.btn:focus-visible,
a:focus-visible {
  outline: 3px solid #d5283e80;
  outline-offset: 4px;
}
@keyframes chip-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}
@keyframes surface-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 1500px) {
  main {
    padding: 40px 60px;
  }
  .hero {
    min-height: 275px;
  }
  .hero-route-art {
    width: 365px;
  }
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 195px minmax(0, 1fr);
  }
  main {
    padding: 30px 28px;
  }
  .sidebar {
    padding-left: 12px;
    padding-right: 12px;
  }
  .side-link {
    font-size: 11px;
  }
  .hero {
    padding: 28px;
  }
  .hero-route-art {
    min-width: 180px;
    width: 220px;
  }
  .hero h2 {
    font-size: 29px;
  }
  .stat {
    padding: 18px 14px;
    gap: 10px;
  }
  .topbar {
    gap: 25px;
  }
  .detail-grid {
    grid-template-columns: minmax(0, 1fr) 270px;
  }
}
@media (max-width: 900px) {
  .hero-route-art {
    display: none;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .detail-aside {
    grid-template-columns: 1fr 1fr;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .toolbar .search {
    flex-basis: 100%;
  }
  .filters {
    width: 100%;
  }
  .filters button {
    flex: 1;
  }
  .driver-login {
    grid-template-columns: 1fr 1.15fr;
  }
  .login-story {
    padding: 32px;
    min-height: 580px;
  }
  .login-story h1 {
    font-size: 34px;
  }
  .driver-login-form {
    padding: 35px 28px;
  }
  .topbar nav {
    gap: 20px;
  }
  .overview {
    gap: 0;
  }
  .stat-icon {
    display: none;
  }
}
@media (max-width: 700px) {
  html {
    scroll-padding-top: 80px;
  }
  body {
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
  .topbar {
    height: 72px;
    flex-wrap: nowrap;
    gap: 12px;
    padding: 0 20px;
    background: #fffffff2;
    backdrop-filter: blur(18px);
  }
  .brand {
    font-size: 24px;
    gap: 9px;
  }
  .brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }
  .brand small {
    font-size: 7px;
    letter-spacing: 1.2px;
  }
  .topbar nav,
  .sidebar,
  .account-shortcut {
    display: none;
  }
  .management {
    margin-left: auto;
    font-size: 11px;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 11px;
  }
  .management .icon {
    width: 17px;
    height: 17px;
  }
  .shell {
    display: block;
    min-height: calc(100svh - 156px);
  }
  main {
    padding: 25px 19px 32px;
  }
  .breadcrumb {
    font-size: 11px;
    margin-bottom: 23px;
  }
  .page-heading {
    gap: 10px;
    margin-bottom: 25px;
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 34px;
    letter-spacing: -1.3px;
    line-height: 1.1;
  }
  .page-heading p {
    font-size: 13px;
    line-height: 1.65;
    margin-top: 11px;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 1.4px;
    margin-bottom: 10px;
  }
  .page-heading > .btn {
    font-size: 11px;
    padding: 10px 12px;
    flex-shrink: 0;
  }
  .date-pill {
    display: none;
  }
  .hero {
    min-height: 225px;
    border-radius: 21px;
    padding: 27px 25px;
    margin: 0 0 14px;
    box-shadow: 0 10px 24px #ad173015;
  }
  .hero h2 {
    font-size: 31px;
    letter-spacing: -1px;
    line-height: 1.12;
    max-width: 310px;
    margin-bottom: 15px;
  }
  .hero-label {
    font-size: 8px;
    letter-spacing: 1.6px;
    margin-bottom: 18px;
  }
  .hero p {
    font-size: 12px;
    line-height: 1.8;
  }
  .hero-route-art {
    display: none;
  }
  .overview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-radius: 16px;
    margin-bottom: 31px;
  }
  .stat {
    padding: 17px 12px;
    display: block;
    min-width: 0;
  }
  .stat strong {
    font-size: 27px;
    letter-spacing: -1px;
  }
  .stat small {
    font-size: 9px;
    line-height: 1.7;
    margin: 4px 0 0;
    max-width: 85px;
  }
  .stat-icon {
    display: none;
  }
  .section-heading {
    margin-bottom: 15px;
  }
  .section-heading h2 {
    font-size: 22px;
  }
  .section-heading small {
    font-size: 11px;
    display: inline-block;
    margin-left: 6px;
  }
  .toolbar {
    display: flex;
    gap: 11px;
    margin: 0 0 20px;
    flex-wrap: wrap;
  }
  .search {
    min-width: 0;
  }
  .search input {
    font-size: 16px;
    min-height: 54px;
    border-radius: 14px;
    padding: 16px 16px 16px 44px;
  }
  .search .icon {
    top: 18px;
  }
  .filters {
    padding: 5px;
    gap: 3px;
    overflow-x: auto;
    border-radius: 12px;
  }
  .filters button {
    font-size: 10px;
    min-height: 38px;
    padding: 9px 8px;
    flex: 1;
    justify-content: center;
    gap: 5px;
  }
  .filters .icon {
    width: 13px;
    height: 13px;
  }
  .lines-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }
  .line-card {
    border-radius: 18px;
  }
  .card-body {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 10px 15px;
    padding: 21px 20px 18px;
    min-height: 133px;
  }
  .card-top {
    margin: 0;
    grid-column: 1;
    grid-row: 1/3;
    align-self: start;
  }
  .line-number {
    min-width: 49px;
    height: 49px;
    border-radius: 13px;
    font-size: 23px;
  }
  .card-title {
    grid-column: 2;
    margin: 0 25px 0 0;
    font-size: 15px;
    line-height: 1.55;
    min-height: 0;
    padding: 0;
  }
  .card-title .arrow {
    display: block;
    font-size: 11px;
    line-height: 1.4;
    height: 17px;
  }
  .card-body > .badge {
    grid-column: 2;
    justify-self: start;
    font-size: 9px;
    margin-top: 1px;
  }
  .fav {
    top: 12px;
    right: 8px;
    width: 40px;
    height: 40px;
    background: transparent;
  }
  .fav .icon {
    width: 19px;
    height: 19px;
  }
  .card-bottom {
    padding: 13px 20px;
    min-height: 47px;
    font-size: 11px;
  }
  .card-bottom > span:nth-child(2) {
    display: flex;
  }
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 9px 13px calc(9px + env(safe-area-inset-bottom, 0px));
    background: #ffffffee;
    backdrop-filter: blur(22px);
    border-top: 1px solid #dce4d6;
    box-shadow: 0 -5px 24px #25302507;
    z-index: 50;
    gap: 6px;
  }
  .mobile-nav a {
    position: relative;
    color: #7b8875;
    font-size: 10px;
    font-weight: 650;
    min-height: 53px;
    border-radius: 12px;
    gap: 5px;
  }
  .mobile-nav a.active {
    color: var(--red);
    background: #fff0f2;
  }
  .mobile-nav .icon {
    width: 22px;
    height: 22px;
  }
  .footer {
    padding: 12px 19px;
  }
  .footer .btn {
    font-size: 11px;
    min-height: 40px;
  }
  .footer > span {
    display: none;
  }
  .btn {
    min-height: 47px;
    font-size: 13px;
    border-radius: 12px;
    padding: 12px 15px;
  }
  .btn.small {
    min-height: 42px;
    font-size: 11px;
  }
  .empty {
    padding: 37px 22px;
  }
  .empty h3 {
    font-size: 23px;
  }
  .empty p {
    font-size: 13px;
  }
  .bottom-label {
    font-size: 10px;
    line-height: 1.8;
    margin-top: 24px;
    display: grid;
    gap: 7px;
  }
  .detail-heading {
    gap: 13px;
  }
  .detail-heading h1 {
    font-size: 29px;
  }
  .detail-heading .line-number {
    height: 54px;
    min-width: 54px;
    font-size: 28px;
  }
  .detail-heading p {
    font-size: 12px;
  }
  .detail-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  .detail-grid > div,
  .detail-aside {
    width: 100%;
  }
  .detail-aside {
    display: grid;
    grid-template-columns: 1fr;
  }
  .panel-inner,
  .detail-grid .panel-inner {
    padding: 18px;
  }
  .detail-aside .panel:first-child {
    border-top-width: 3px;
  }
  .variant-tabs {
    flex-wrap: nowrap;
    gap: 7px;
    overflow: auto;
    margin: 0 0 15px;
    padding-bottom: 5px;
  }
  .variant-tabs button {
    font-size: 12px;
    padding: 11px 17px;
    min-height: 45px;
    white-space: nowrap;
    border-radius: 12px;
  }
  .direction-tabs {
    grid-template-columns: 1fr 1fr;
    padding: 5px;
    gap: 5px;
    border-radius: 12px;
  }
  .direction-tabs.single {
    grid-template-columns: 1fr;
  }
  .direction-tabs button {
    font-size: 12px;
    min-height: 54px;
    line-height: 1.5;
    padding: 9px;
  }
  .direction-tabs .icon {
    display: none;
  }
  .route-map {
    height: 335px;
    border-radius: 12px;
  }
  .info {
    font-size: 12px;
    padding: 15px;
    border-radius: 12px;
  }
  .info strong {
    font-size: 13px;
  }
  .map-endpoints {
    font-size: 10px;
    gap: 15px;
    line-height: 1.6;
  }
  .detail-aside h3 {
    font-size: 20px;
  }
  .download {
    min-height: 55px;
    border-radius: 13px;
  }
  .tip-list {
    font-size: 12px;
  }
  .history summary {
    font-size: 12px;
  }
  .history-row {
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    padding: 15px 18px;
  }
  .history-actions {
    width: 100%;
  }
  .admin-tabs {
    gap: 5px;
    padding: 6px;
    border-radius: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 24px 0;
  }
  .admin-tabs button {
    font-size: 11px;
    min-height: 45px;
    padding: 10px 8px;
    border-radius: 10px;
    white-space: normal;
  }
  .admin-bar {
    gap: 10px;
    margin: 20px 0;
    align-items: stretch;
  }
  .admin-bar .btn {
    font-size: 11px;
    flex: 1;
    min-height: 46px;
  }
  .admin-bar .search {
    width: 100%;
    flex-basis: 100%;
  }
  .admin-line-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .admin-line-card {
    padding: 21px;
    border-radius: 20px;
  }
  .admin-line-top {
    margin-bottom: 23px;
  }
  .journey-stops {
    font-size: 15px;
    gap: 18px;
    margin-bottom: 23px;
  }
  .admin-line-bottom > .primary {
    font-size: 12px;
  }
  .admin-variant-list span {
    font-size: 11px;
  }
  .route-state-grid {
    grid-template-columns: 1fr;
  }
  .simple-route-panel {
    padding: 19px;
    border-radius: 18px;
    margin: 18px 0;
  }
  .simple-route-panel h3 {
    font-size: 23px;
  }
  .simple-route-panel .version-heading {
    align-items: flex-start;
    gap: 10px;
  }
  .simple-route-panel .version-heading > .btn {
    font-size: 10px;
    min-height: 38px;
  }
  .base-summary {
    padding: 14px;
    gap: 10px;
    margin-top: 20px;
  }
  .base-summary > div {
    min-width: 0;
  }
  .base-summary strong {
    font-size: 13px;
  }
  .base-summary small {
    font-size: 11px;
  }
  .base-summary > .btn {
    width: 100%;
    font-size: 12px;
  }
  .route-main-actions .btn {
    flex: 1 1 100%;
    font-size: 12px;
    min-height: 47px;
  }
  .active-deviation-row {
    padding: 13px;
    align-items: flex-start;
    gap: 9px;
  }
  .active-deviation-row strong {
    font-size: 13px;
    overflow-wrap: anywhere;
  }
  .active-deviation-row small {
    font-size: 11px;
    overflow-wrap: anywhere;
  }
  .active-deviation-row .btn {
    min-width: 72px;
    padding: 9px;
    min-height: 40px;
  }
  .base-file-links {
    gap: 8px;
    display: grid;
  }
  .base-file-links a {
    font-size: 11px;
    min-height: 36px;
  }
  .admin-form-note {
    font-size: 12px;
  }
  .driver-card {
    padding: 22px;
  }
  .driver-list {
    grid-template-columns: 1fr;
  }
  .driver-metrics {
    gap: 24px;
  }
  .driver-metrics strong {
    font-size: 30px;
  }
  .driver-card-actions .btn {
    font-size: 12px;
  }
  .device-explainer {
    font-size: 12px;
  }
  .session-card {
    padding: 17px;
  }
  .session-card dd {
    text-align: left;
  }
  .session-card dl > div {
    display: block;
  }
  .account-panel {
    padding: 25px;
    gap: 18px;
  }
  .account-panel h1 {
    font-size: 30px;
  }
  .account-panel > p {
    font-size: 14px;
  }
  .is-guest {
    padding-bottom: 0;
  }
  .is-guest .shell {
    min-height: calc(100svh - 72px);
  }
  .is-guest main {
    padding: 20px 15px 30px;
    display: block;
  }
  .driver-login {
    display: block;
    border-radius: 23px;
  }
  .login-story {
    min-height: 0;
    padding: 28px 26px 30px;
    display: block;
  }
  .login-story h1 {
    font-size: 32px;
    line-height: 1.1;
    letter-spacing: -1.1px;
    margin: 23px 0 14px;
    max-width: 290px;
  }
  .login-story p {
    font-size: 12px;
    line-height: 1.8;
    max-width: 280px;
  }
  .login-pill {
    font-size: 8px;
    padding: 8px 11px;
  }
  .login-route-art {
    display: none;
  }
  .login-trust {
    display: flex;
    margin-top: 20px;
    font-size: 10px;
  }
  .driver-login-form {
    padding: 29px 25px 32px;
  }
  .driver-login-form h2 {
    font-size: 29px;
    letter-spacing: -1px;
    margin: 10px 0 12px;
  }
  .driver-login-form > p {
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 22px;
  }
  .application-code-notice {
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 23px;
  }
  .application-code-notice strong {
    font-size: 12px;
  }
  .application-code-notice p {
    font-size: 11px;
    line-height: 1.75;
  }
  .driver-login-form .field {
    margin-bottom: 21px;
  }
  .field label {
    font-size: 13px;
  }
  .field input,
  .field textarea,
  .field select {
    font-size: 16px;
    min-height: 51px;
    border-radius: 11px;
  }
  .field small {
    font-size: 11px;
    line-height: 1.7;
  }
  .driver-login-form input {
    min-height: 56px;
    font-size: 17px;
  }
  .pin-wrap input {
    min-width: 0;
  }
  .driver-login-form [type='submit'] {
    min-height: 55px;
    font-size: 14px;
  }
  .login-privacy p {
    font-size: 10px;
  }
  .login-panel {
    padding: 26px !important;
  }
  .login-panel h2 {
    font-size: 27px;
  }
  dialog {
    width: 100%;
    max-width: 100%;
    max-height: 94svh;
    margin: auto 0 0;
    border-radius: 24px 24px 0 0;
    border-bottom: 0;
    box-shadow: 0 -20px 80px #14261a30;
  }
  .modal-header {
    padding: 24px 21px 20px;
    position: sticky;
    top: 0;
  }
  .modal-header h2 {
    font-size: 22px;
    line-height: 1.25;
    letter-spacing: -0.7px;
  }
  .modal-header p {
    font-size: 11px;
    margin: 8px 0 0;
    line-height: 1.6;
  }
  .close {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
  }
  .modal-body {
    padding: 20px 21px calc(28px + env(safe-area-inset-bottom, 0px));
  }
  .modal-body .form-grid {
    grid-template-columns: 1fr;
    gap: 17px;
  }
  .modal-actions {
    gap: 9px;
  }
  .modal-actions .btn {
    flex: 1;
  }
  .checkbox-line {
    font-size: 12px;
    line-height: 1.75;
  }
  .checkbox-line input {
    min-height: 18px;
    width: 18px;
    height: 18px;
  }
  .atelier-map {
    height: 50svh;
    min-height: 300px;
  }
  .atelier-tools {
    gap: 7px;
  }
  .atelier-tools .btn {
    flex: 1 1 125px;
    font-size: 11px;
    min-height: 44px;
  }
  .atelier-layout .info p {
    font-size: 11px;
  }
  .atelier-layout #atelier-instruction {
    font-size: 13px;
    line-height: 1.65;
  }
  .atelier-layout .admin-form-note {
    font-size: 11px;
    line-height: 1.75;
  }
  #toast,
  #toast.visible {
    bottom: calc(90px + env(safe-area-inset-bottom, 0px));
    left: 16px;
    right: 16px;
    transform: none;
    width: auto;
    font-size: 12px;
    padding: 14px 18px;
    max-width: none;
  }
  .comparison-controls {
    gap: 9px;
  }
  .comparison-controls label {
    font-size: 11px;
    line-height: 1.5;
  }
  .comparison-note {
    font-size: 11px;
  }
  .updates-panel h2 {
    font-size: 19px;
  }
  .event {
    font-size: 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .event small {
    font-size: 10px;
  }
}
@media (max-width: 370px) {
  main {
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-heading h1 {
    font-size: 30px;
  }
  .hero h2 {
    font-size: 28px;
  }
  .hero {
    padding: 25px 22px;
  }
  .stat {
    padding: 15px 10px;
  }
  .card-title {
    font-size: 14px;
  }
  .management {
    font-size: 10px;
    padding: 10px;
  }
  .filters button {
    font-size: 9px;
  }
  .filters button .icon {
    display: none;
  }
  .modal-body {
    padding-left: 17px;
    padding-right: 17px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 700px) {
  .login-story {
    padding: 24px 26px;
  }
  .login-story h1 {
    font-size: 28px;
    max-width: none;
    margin: 18px 0 12px;
  }
  .login-trust {
    margin-top: 18px;
  }
  .is-guest .driver-login-form > p {
    margin-bottom: 20px;
  }
}
