:root {
  color-scheme: dark;
  --bg: #070b12;
  --bg-2: #0d1420;
  --surface: rgba(20, 29, 44, 0.88);
  --surface-2: rgba(28, 39, 58, 0.9);
  --surface-3: rgba(39, 53, 76, 0.86);
  --line: rgba(134, 166, 196, 0.16);
  --line-strong: rgba(134, 166, 196, 0.26);
  --text: var(--tg-theme-text-color, #f4f8fb);
  --muted: var(--tg-theme-hint-color, #92a1b4);
  --faint: #66778e;
  --blue: var(--tg-theme-link-color, #63b3ff);
  --blue-fill: var(--tg-theme-button-color, #2d8cff);
  --blue-text: var(--tg-theme-button-text-color, #ffffff);
  --teal: #32d6c4;
  --green: #5ee087;
  --amber: #ffc36a;
  --red: #ff6f87;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
  --radius-lg: 24px;
  --radius: 18px;
  --radius-sm: 13px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Inter, Roboto, sans-serif;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100svh;
  background:
    radial-gradient(circle at 12% -10%, rgba(45, 140, 255, 0.34), transparent 30%),
    radial-gradient(circle at 88% 4%, rgba(50, 214, 196, 0.22), transparent 28%),
    linear-gradient(180deg, #07101b 0%, var(--bg) 52%, #05070c 100%);
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

button,
input,
select {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0 15px;
  color: var(--blue-text);
  background: linear-gradient(135deg, var(--blue-fill), #35b7ff);
  box-shadow: 0 10px 28px rgba(45, 140, 255, 0.24);
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

button:active {
  transform: translateY(1px);
}

button.ghost,
.invoice .danger,
.transfer-row button {
  color: var(--blue);
  background: rgba(99, 179, 255, 0.1);
  box-shadow: none;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 13px;
  color: var(--text);
  background: rgba(7, 11, 18, 0.45);
  outline: none;
}

input::placeholder {
  color: var(--faint);
}

select {
  appearance: none;
  padding-right: 34px;
  color: var(--text);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 12px) 20px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.48;
}

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

.app {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: calc(12px + env(safe-area-inset-top)) 14px calc(24px + env(safe-area-inset-bottom));
}

.boot-panel {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: rgba(20, 29, 44, 0.9);
  box-shadow: var(--shadow);
}

.boot-panel.hidden {
  display: none;
}

.boot-panel strong {
  font-size: 15px;
  font-weight: 760;
}

.boot-panel span,
.hint,
.metric-card p,
.empty-row,
.raw-details,
.check-copy small,
.transfer-row span {
  color: var(--muted);
  font-size: 13px;
}

.profile-header {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -2px -4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 24px;
  padding: 10px;
  background: rgba(8, 13, 21, 0.72);
  backdrop-filter: blur(22px);
}

.avatar {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  color: #061018;
  background: linear-gradient(135deg, var(--teal), #79b8ff);
  box-shadow: 0 12px 30px rgba(50, 214, 196, 0.22);
  font-size: 24px;
  font-weight: 850;
}

.profile-main {
  min-width: 0;
  flex: 1;
}

.eyebrow {
  margin-bottom: 3px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: clamp(20px, 5vw, 27px);
  font-weight: 820;
  line-height: 1.08;
  white-space: nowrap;
}

.profile-main p:last-child {
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  text-overflow: ellipsis;
  font-size: 13px;
  white-space: nowrap;
}

.icon-button {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  min-height: 42px;
  place-items: center;
  border-radius: 15px;
  padding: 0;
  color: var(--blue);
  background: rgba(99, 179, 255, 0.12);
  box-shadow: none;
  font-size: 21px;
}

.setup,
.metric-card,
.panel,
.trip-card,
.list-panel,
.invoice {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), rgba(13, 20, 32, 0.92));
  box-shadow: var(--shadow);
}

.setup {
  margin-bottom: 12px;
}

.setup label {
  display: block;
  padding: 14px 16px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 12px;
}

.hint {
  min-height: 0;
  padding: 0 16px 14px;
}

.status-deck {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.metric-card {
  display: grid;
  gap: 10px;
  min-height: 118px;
  padding: 14px;
}

.metric-readiness {
  grid-column: 1 / -1;
  background:
    linear-gradient(135deg, rgba(45, 140, 255, 0.22), transparent 58%),
    linear-gradient(180deg, var(--surface), rgba(13, 20, 32, 0.92));
}

.metric-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.metric-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.metric-head strong {
  color: var(--text);
  font-size: 24px;
  font-weight: 850;
  line-height: 1;
}

.progress-track {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  transition: width 0.28s ease;
}

.metric-budget .progress-track span {
  background: linear-gradient(90deg, var(--amber), var(--green));
}

.tabs {
  position: sticky;
  top: 76px;
  z-index: 7;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin: 0 0 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 5px;
  background: rgba(7, 11, 18, 0.72);
  backdrop-filter: blur(22px);
}

.tabs button {
  min-width: 0;
  min-height: 38px;
  border-radius: 15px;
  padding: 0 6px;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  font-size: clamp(11px, 3.1vw, 13px);
  font-weight: 760;
  overflow-wrap: anywhere;
}

.tabs button.active {
  color: #061018;
  background: linear-gradient(135deg, var(--teal), #7cc2ff);
}

.tab {
  display: none;
}

.tab.active {
  display: grid;
  gap: 14px;
  animation: tab-in 0.18s ease both;
}

@keyframes tab-in {
  from {
    transform: translateY(6px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.trip-card {
  display: grid;
}

.trip-card-top {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px rgba(94, 224, 135, 0.75);
}

h2 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 18px;
  font-weight: 820;
  line-height: 1.15;
}

.trip-card pre,
.list-panel pre,
.panel pre,
.invoice pre {
  padding: 0 16px 15px;
}

.trip-card > pre,
.list-panel > pre {
  display: none;
}

.info-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.trip-card-top + .info-list {
  border-top: 0;
}

.info-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 11px 16px;
  color: var(--text);
  font-size: 15px;
}

.info-row + .info-row,
.check-row + .check-row,
.transfer-row + .transfer-row {
  border-top: 1px solid var(--line);
}

.info-row span,
.info-row strong,
.check-copy strong,
.check-copy small,
.transfer-row span,
.invoice h3 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info-row strong {
  max-width: 48vw;
  color: var(--muted);
  font-size: 14px;
  font-weight: 560;
}

.role-row {
  grid-template-columns: minmax(0, 1fr) minmax(138px, 48%);
}

.role-select {
  min-height: 38px;
  text-align: right;
}

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

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.quick-actions button {
  min-width: 0;
  min-height: 48px;
  border-radius: 0;
  color: var(--blue);
  background: rgba(99, 179, 255, 0.08);
  box-shadow: none;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.list-stack,
.grid,
.invoice-list {
  display: grid;
  gap: 14px;
}

.grid.two {
  grid-template-columns: 1fr;
}

.subtabs {
  position: sticky;
  top: max(10px, env(safe-area-inset-top));
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 4px;
  background: rgba(7, 11, 18, 0.88);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

.subtabs button {
  min-width: 0;
  min-height: 36px;
  border-radius: 14px;
  padding: 0 6px;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  font-size: 12px;
}

.subtabs button.active {
  color: #061018;
  background: linear-gradient(135deg, var(--teal), #7cc2ff);
}

.logistics-pane {
  display: none;
}

.logistics-pane.active {
  display: grid;
}

.panel,
.list-panel,
.invoice {
  padding: 14px;
}

.panel pre,
.invoice pre {
  padding-right: 0;
  padding-left: 0;
}

form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0 0 12px;
  padding: 0;
}

form.compact-form {
  grid-template-columns: minmax(0, 1fr) minmax(92px, 0.38fr) auto;
}

form button {
  min-height: 42px;
  padding: 0 13px;
  font-size: 14px;
}

form select {
  min-width: 104px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.panel-title h2 {
  margin: 0;
}

.panel-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.danger-text {
  color: var(--red);
}

.map-panel {
  display: grid;
  gap: 12px;
}

.map-search {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 0;
}

.map-search-results {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(7, 11, 18, 0.34);
}

.map-search-results:empty {
  display: none;
}

.search-result-row {
  display: grid;
  gap: 3px;
  min-height: 50px;
  border-radius: 0;
  padding: 10px 13px;
  color: var(--text);
  background: rgba(22, 31, 47, 0.72);
  box-shadow: none;
  text-align: left;
}

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

.search-result-row strong,
.search-result-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 520;
}

.map-shell {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(45, 140, 255, 0.14), transparent 55%),
    rgba(7, 11, 18, 0.55);
}

.map-canvas {
  width: 100%;
  height: 320px;
}

.map-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 24px;
  text-align: center;
}

.map-empty.hidden {
  display: none;
}

.map-empty strong {
  font-size: 17px;
  font-weight: 820;
}

.map-empty span,
.map-actions span,
.map-point-row small {
  color: var(--muted);
  font-size: 13px;
}

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

.map-actions button {
  flex: 0 0 auto;
}

.selected-point-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(50, 214, 196, 0.12), transparent 62%),
    rgba(7, 11, 18, 0.34);
}

.selected-point-card div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.selected-point-card span,
.selected-point-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.selected-point-card strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 820;
}

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

.selected-point-actions a,
.map-point-row a {
  display: inline-grid;
  min-height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 9px;
  color: var(--blue);
  background: rgba(99, 179, 255, 0.1);
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
}

.map-form {
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.4fr) minmax(96px, 0.65fr) auto;
}

.map-form input[name="lat"],
.map-form input[name="lon"] {
  min-width: 0;
}

.map-points {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(7, 11, 18, 0.34);
}

.map-point-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  gap: 8px 10px;
  align-items: center;
  min-height: 48px;
  padding: 10px 13px;
}

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

.map-point-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-point-row small {
  grid-column: 2;
}

.point-group-title {
  padding: 10px 13px 7px;
  color: var(--muted);
  background: rgba(7, 11, 18, 0.45);
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
}

.point-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.point-filters button {
  min-height: 34px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(99, 179, 255, 0.08);
  box-shadow: none;
  font-size: 12px;
}

.point-filters button.active {
  color: #061018;
  background: linear-gradient(135deg, var(--teal), #7cc2ff);
}

.cars-builder {
  display: grid;
  gap: 12px;
}

.people-dock {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 10px;
  scrollbar-width: none;
}

.people-dock::-webkit-scrollbar {
  display: none;
}

.person-chip {
  flex: 0 0 auto;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(99, 179, 255, 0.12);
  box-shadow: none;
  font-size: 12px;
}

.car-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px;
  background: rgba(7, 11, 18, 0.34);
}

.car-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.car-card-head strong {
  font-size: 16px;
  font-weight: 820;
}

.field-label,
.route-builder label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.car-layout {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 18%, rgba(124, 194, 255, 0.22), transparent 32%),
    linear-gradient(180deg, rgba(11, 18, 30, 0.92), rgba(7, 11, 18, 0.96));
}

.car-top {
  position: absolute;
  inset: 10px 18px;
  width: calc(100% - 36px);
  height: calc(100% - 20px);
  filter: drop-shadow(0 22px 28px rgba(0, 0, 0, 0.38));
}

.car-body {
  fill: rgba(230, 246, 255, 0.94);
}

.car-glass {
  fill: rgba(19, 42, 58, 0.72);
}

.car-line {
  fill: none;
  stroke: rgba(7, 11, 18, 0.24);
  stroke-width: 5;
  stroke-linecap: round;
}

.seat-hotspot {
  position: absolute;
  display: grid;
  width: 42%;
  min-width: 0;
  transform: translate(-50%, -50%);
  gap: 5px;
  border: 1px solid rgba(94, 224, 135, 0.24);
  border-radius: 16px;
  padding: 7px;
  background: rgba(7, 11, 18, 0.78);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.seat-hotspot.filled {
  border-color: rgba(94, 224, 135, 0.64);
  background: rgba(13, 43, 35, 0.82);
}

.seat-hotspot.drag-over {
  transform: translate(-50%, -50%) scale(1.04);
  border-color: var(--teal);
}

.seat-hotspot span {
  color: rgba(235, 245, 247, 0.78);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 820;
}

.seat-hotspot select {
  min-width: 0;
  min-height: 34px;
  border-radius: 12px;
  padding: 0 26px 0 9px;
  font-size: 12px;
}

.route-builder {
  display: grid;
  gap: 12px;
}

.route-builder label {
  display: grid;
  gap: 6px;
}

.route-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.route-actions a {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--blue);
  background: rgba(99, 179, 255, 0.1);
  font-weight: 760;
  text-decoration: none;
}

.chip-list,
.user-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.people-panel {
  margin-bottom: 12px;
}

.user-chip,
.pick-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 11px;
  color: var(--text);
  background: rgba(99, 179, 255, 0.08);
  box-shadow: none;
  font-size: 13px;
  font-weight: 720;
}

.user-chip span,
.pick-chip span {
  min-width: 0;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip strong {
  color: var(--red);
  font-size: 17px;
  line-height: 1;
}

.pick-chip input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--teal);
}

.pick-chip select {
  width: 72px;
  min-height: 30px;
  padding: 0 22px 0 8px;
  border-radius: 999px;
  font-size: 12px;
  background-position: calc(100% - 13px) 13px, calc(100% - 8px) 13px;
}

.form-stack {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.form-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.checklist-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(7, 11, 18, 0.34);
}

.check-row,
.transfer-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  min-height: 54px;
  border-radius: 0;
  padding: 11px 14px;
  color: var(--text);
  background: rgba(22, 31, 47, 0.72);
  box-shadow: none;
  text-align: left;
}

.inventory-row {
  position: relative;
  display: block;
  min-height: 54px;
  padding: 10px 112px 10px 12px;
}

.check-main {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.inventory-row .check-mark {
  width: 25px;
  height: 25px;
}

.inventory-row .check-copy {
  min-height: 34px;
  justify-content: center;
}

.item-actions {
  position: absolute;
  top: 9px;
  right: 10px;
  display: flex;
  gap: 6px;
}

.item-actions button {
  display: grid;
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0;
  color: var(--blue);
  background: rgba(99, 179, 255, 0.1);
  box-shadow: none;
  font-size: 16px;
  font-weight: 850;
  line-height: 1;
}

.item-actions .danger {
  color: var(--red);
}

.check-row:active {
  background: rgba(39, 53, 76, 0.92);
}

.check-mark {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  align-self: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: transparent;
  background: rgba(255, 255, 255, 0.04);
  font-weight: 850;
}

.check-row.done .check-mark {
  color: #061018;
  border-color: transparent;
  background: linear-gradient(135deg, var(--teal), #7cc2ff);
}

.check-row.partial .check-mark {
  color: #061018;
  border-color: transparent;
  background: linear-gradient(135deg, var(--green), var(--amber));
}

.check-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.check-copy strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 720;
}

.empty-row {
  padding: 14px 16px;
}

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

.raw-details summary {
  cursor: pointer;
  padding: 12px 0 0;
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
}

.raw-details pre {
  padding-top: 10px;
}

.invoice header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.invoice h3 {
  font-size: 16px;
  font-weight: 800;
}

.invoice .danger {
  min-height: 36px;
  color: var(--red);
  padding: 0 11px;
}

.summary-transfers,
.transfers {
  overflow: hidden;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.transfer-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 48px;
  border-top: 0;
}

.transfer-row button {
  min-width: 44px;
  min-height: 34px;
  padding: 0 9px;
}

.toast {
  position: fixed;
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 20;
  max-width: min(360px, calc(100vw - 28px));
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 14px;
  color: var(--text);
  background: rgba(11, 17, 27, 0.96);
  box-shadow: var(--shadow);
  transition: 0.18s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 420px) {
  .app {
    padding-right: 10px;
    padding-left: 10px;
  }

  .profile-header {
    border-radius: 22px;
  }

  .avatar {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    border-radius: 15px;
  }

  .tabs {
    top: 72px;
  }

  .status-deck {
    gap: 8px;
  }

  .metric-card {
    min-height: 104px;
    padding: 12px;
  }

  .metric-head strong {
    font-size: 21px;
  }

  form,
  form.compact-form,
  .map-search,
  .map-form,
  .row {
    grid-template-columns: 1fr;
  }

  .selected-point-card {
    grid-template-columns: 1fr;
  }

  .selected-point-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .map-point-row {
    grid-template-columns: 28px minmax(0, 1fr) auto;
  }

  .map-point-row a:last-child {
    grid-column: 2 / -1;
    width: fit-content;
  }

  .subtabs button {
    font-size: 11px;
  }

  .route-actions {
    grid-template-columns: 1fr;
  }

  .car-layout {
    min-height: 360px;
  }

  .seat-hotspot {
    width: 45%;
    padding: 6px;
  }

  .seat-hotspot select {
    font-size: 11px;
  }

  form button,
  .row button {
    width: 100%;
  }
}
