:root {
  --ink: #111417;
  --muted: #687078;
  --panel: rgba(246, 248, 250, .94);
  --panel-solid: #f6f8fa;
  --surface: rgba(255, 255, 255, .66);
  --surface-strong: #ffffff;
  --line: #caff2f;
  --turquoise: #00c2b8;
  --pink: #ff4f9a;
  --danger: #ff2f7d;
  --danger-dark: #8d123f;
  --warning: #f0b429;
  --border: rgba(17, 20, 23, .12);
  --shadow: 0 18px 48px rgba(0, 0, 0, .16);
  --tool-size: 48px;
  --sheet-peek-height: 172px;
  --sheet-half-height: min(48svh, 430px);
  --safe-top: max(24px, env(safe-area-inset-top, 0px));
  --safe-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  --app-height: 100dvh;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  width: 100%;
  height: var(--app-height);
  min-height: var(--app-height);
  margin: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  background:
    radial-gradient(circle at top left, rgba(202, 255, 47, .12), transparent 28rem),
    linear-gradient(135deg, #111417 0%, #2a2f35 48%, #0f1114 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

input,
textarea,
select {
  font-size: 16px;
}

button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button:active {
  transform: scale(.98);
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(0, 194, 184, .38);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
  }
}

.phone-shell {
  width: min(410px, 100vw);
  height: min(884px, var(--app-height));
  overflow: hidden;
  border-radius: 28px;
  background: #0d1117;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .38);
}

.app {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: var(--ink);
  background: #d8dde2;
}

.app[data-theme="night"] {
  --ink: #f7fafc;
  --muted: #a2acb7;
  --panel: rgba(16, 22, 29, .94);
  --panel-solid: #121820;
  --surface: rgba(24, 33, 43, .7);
  --surface-strong: #18212b;
  --border: rgba(255, 255, 255, .12);
}

.app::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  height: var(--safe-top);
  pointer-events: none;
  background: linear-gradient(180deg, rgba(17, 20, 23, .2), rgba(17, 20, 23, 0));
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
}

.map {
  position: absolute;
  inset: 0;
  background: #d8dde2;
}

@media (hover: none), (max-width: 640px) {
  body {
    place-items: stretch;
  }

  .phone-shell {
    width: 100dvw;
    height: var(--app-height);
    border-radius: 0;
    box-shadow: none;
  }
}

.map::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, .18), transparent 28%, transparent 66%, rgba(17, 20, 23, .09)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .1) 1px, transparent 1px, transparent 88px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .1) 1px, transparent 1px, transparent 88px);
}

.app[data-theme="night"] .map {
  filter: none;
}

.app[data-theme="night"] .map::after {
  background:
    linear-gradient(180deg, rgba(5, 8, 12, .08), rgba(5, 8, 12, .03) 42%, rgba(5, 8, 12, .12)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .035) 1px, transparent 1px, transparent 88px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .03) 1px, transparent 1px, transparent 88px);
}

.topbar {
  position: absolute;
  z-index: 4;
  top: calc(var(--safe-top) + 8px);
  left: 12px;
  right: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
  pointer-events: none;
}

.tour-chip,
.live-chip,
.profile-chip,
.icon-button,
.location-banner,
.network-banner,
.bottom-sheet,
.auth-card,
.admin-card,
.profile-card,
.photo-crop-card,
.tour-detail-card,
.settings-card,
.participant-picker-card,
.emergency-card,
.emergency-position,
.red-alert-card,
.flyin,
.toast {
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.tour-chip {
  min-width: 0;
  height: 46px;
  border-radius: 10px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  color: var(--ink);
  text-align: left;
  pointer-events: auto;
  cursor: pointer;
  overflow: hidden;
}

.bottom-sheet span,
.bottom-sheet small,
.panel-header span,
.admin-form label {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.1;
}

.tour-chip strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tour-chip strong {
  display: block;
  font-size: 14.5px;
  line-height: 1.1;
}

.live-chip {
  height: 46px;
  border-radius: 10px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: start;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.live-chip strong {
  font-size: 15px;
}

.live-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--turquoise);
  box-shadow: 0 0 0 4px rgba(0, 194, 184, .14);
}

.app[data-network="offline"] .live-dot,
.app[data-network="reconnecting"] .live-dot {
  background: var(--pink);
  box-shadow: 0 0 0 4px rgba(255, 79, 154, .14);
}

.profile-chip {
  width: var(--tool-size);
  height: 46px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  align-self: start;
  color: var(--ink);
  pointer-events: auto;
  cursor: pointer;
}

.profile-chip svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.map-actions {
  position: absolute;
  z-index: 5;
  right: 14px;
  top: calc(var(--safe-top) + var(--tool-size) + 16px);
  display: grid;
  gap: 8px;
}

.map-actions > .icon-button.danger {
  margin-top: 8px;
}

.nav-speed-chip {
  position: absolute;
  z-index: 4;
  top: calc(var(--safe-top) + 64px);
  left: 14px;
  height: 38px;
  min-width: 92px;
  border: 1px solid rgba(220, 225, 230, 0.86);
  border-radius: 10px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  background: rgba(248, 250, 252, 0.72);
  box-shadow: 0 14px 34px rgba(18, 25, 33, 0.16);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  pointer-events: none;
}

.nav-speed-chip[hidden] {
  display: none;
}

.nav-speed-chip svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.1;
  opacity: 0.78;
}

.nav-speed-chip strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.app[data-theme="night"] .nav-speed-chip {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(15, 22, 31, 0.72);
}

.icon-button[hidden] {
  display: none;
}

.auth-panel {
  position: absolute;
  z-index: 20;
  inset: 0;
  padding: calc(var(--safe-top) + 20px) 18px calc(var(--safe-bottom) + 18px);
  display: grid;
  align-items: end;
  background: linear-gradient(180deg, rgba(17, 20, 23, .28), rgba(17, 20, 23, .72));
}

.auth-panel[hidden] {
  display: none;
}

.auth-card {
  border-radius: 16px;
  padding: 16px;
  color: var(--ink);
}

.auth-card header {
  display: grid;
  gap: 3px;
}

.auth-card header span,
.auth-card header small,
.auth-form label,
.auth-form small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.auth-card header strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.05;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 14px 0;
  padding: 4px;
  border-radius: 10px;
  background: rgba(17, 20, 23, .08);
}

.app[data-theme="night"] .auth-tabs {
  background: rgba(255, 255, 255, .07);
}

.auth-tabs button {
  height: 40px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.auth-tabs button.is-active {
  color: #111417;
  background: var(--line);
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form[hidden] {
  display: none;
}

.auth-error {
  border: 1px solid rgba(255, 79, 154, .46);
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--danger);
  background: rgba(255, 79, 154, .1);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 850;
}

.auth-error.is-info {
  color: #07665f;
  border-color: rgba(0, 194, 184, .34);
  background: rgba(0, 194, 184, .12);
}

.auth-error[hidden] {
  display: none;
}

.auth-form label {
  display: grid;
  gap: 5px;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--surface-strong);
  outline: none;
}

.password-input {
  position: relative;
  display: block;
}

.password-input input {
  padding-right: 46px;
}

.auth-form .password-toggle {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  width: 34px;
  min-height: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0;
  color: var(--muted);
  background: rgba(255, 255, 255, .58);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle .eye-off,
.password-toggle[aria-pressed="true"] .eye-on {
  display: none;
}

.password-toggle[aria-pressed="true"] .eye-off {
  display: block;
}

.auth-form button,
.logout-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: #111417;
  background: var(--line);
  font-weight: 900;
  cursor: pointer;
}

.auth-form .auth-link-button {
  min-height: 28px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  text-align: left;
}

.auth-invite-card {
  display: grid;
  gap: 3px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px;
  background: var(--surface-strong);
}

.auth-invite-card span,
.auth-invite-card small {
  color: var(--muted);
  font-size: 12px;
}

.auth-invite-card strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-button {
  width: 100%;
  color: var(--ink);
  background: var(--surface-strong);
  border: 1px solid var(--border);
}

.location-banner,
.network-banner,
.navigation-banner {
  position: absolute;
  z-index: 7;
  top: calc(var(--safe-top) + 84px);
  left: 14px;
  right: 72px;
  min-height: 58px;
  border-radius: 12px;
  padding: 10px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  color: var(--ink);
}

.network-banner {
  grid-template-columns: 28px minmax(0, 1fr);
}

.navigation-banner {
  top: calc(var(--safe-top) + 154px);
  grid-template-columns: 28px minmax(0, 1fr);
  border: 1px solid rgba(0, 194, 184, 0.42);
  background: rgba(248, 250, 252, 0.86);
  box-shadow: 0 18px 40px rgba(18, 25, 33, 0.18);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.navigation-banner[data-mode="warning"] {
  border-color: rgba(255, 209, 102, 0.78);
}

.navigation-banner[data-mode="error"] {
  border-color: rgba(255, 47, 125, 0.5);
}

.navigation-banner[data-mode="success"] {
  border-color: rgba(0, 194, 184, 0.72);
}

.app[data-network="offline"] .location-banner,
.app[data-network="reconnecting"] .location-banner {
  top: calc(var(--safe-top) + 154px);
}

.app[data-network="offline"] .navigation-banner,
.app[data-network="reconnecting"] .navigation-banner {
  top: calc(var(--safe-top) + 224px);
}

.location-banner[hidden],
.network-banner[hidden],
.navigation-banner[hidden] {
  display: none;
}

.location-banner svg,
.network-banner svg,
.navigation-banner svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.location-banner strong,
.location-banner span,
.network-banner strong,
.network-banner span,
.navigation-banner strong,
.navigation-banner span {
  display: block;
}

.location-banner strong,
.network-banner strong,
.navigation-banner strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.15;
}

.location-banner span,
.network-banner span,
.navigation-banner span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.location-banner button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 0 10px;
  color: #111417;
  background: var(--line);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.location-banner button:disabled {
  opacity: .62;
  cursor: wait;
}

.location-banner[data-mode="denied"] {
  border-color: rgba(255, 47, 125, .28);
}

.location-banner[data-mode="denied"] svg {
  color: var(--pink);
}

.location-banner[data-mode="prompt"] svg,
.location-banner[data-mode="checking"] svg {
  color: var(--turquoise);
}

.location-banner[data-mode="warning"] svg {
  color: var(--warning);
}

.network-banner svg {
  color: var(--pink);
}

.network-banner[data-mode="reconnecting"] svg {
  color: var(--warning);
}

.navigation-banner svg {
  color: var(--turquoise);
}

.navigation-banner[data-mode="warning"] svg {
  color: var(--warning);
}

.navigation-banner[data-mode="error"] svg {
  color: var(--pink);
}

.tool-popover {
  display: grid;
  gap: 8px;
}

.tool-popover .icon-button {
  box-shadow: none;
}

.tool-popover[hidden] {
  display: none;
}

.icon-button {
  position: relative;
  width: var(--tool-size);
  height: var(--tool-size);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--ink);
  cursor: pointer;
}

.icon-button svg,
.tabs svg,
.stage-icon svg,
.chat-form button svg,
.admin-form button svg,
.emergency-send svg,
.emergency-help svg,
.close-button svg,
.red-alert svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.icon-button.orientation span {
  position: absolute;
  right: 5px;
  bottom: 5px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #111417;
  background: var(--line);
  font-size: 10px;
  font-weight: 950;
}

.icon-button.orientation.is-heading {
  color: var(--teal);
}

.icon-button.orientation.is-heading span {
  color: #111417;
  background: var(--line);
}

.icon-button.chat {
  color: var(--pink);
}

.icon-button.settings {
  color: var(--ink);
}

.icon-button.admin {
  color: var(--turquoise);
}

.icon-button.danger {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--danger), var(--danger-dark));
}

.badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 22px;
  height: 22px;
  border: 3px solid var(--surface-strong);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff !important;
  background: var(--pink);
  font-size: 12px !important;
  font-weight: 950;
}

.bottom-sheet {
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--sheet-half-height) + var(--safe-bottom));
  border-radius: 16px 16px 0 0;
  padding: 0 14px;
  display: grid;
  grid-template-rows: 44px minmax(0, 1fr);
  overflow: hidden;
  scrollbar-width: none;
  transition: height .26s cubic-bezier(.2, .8, .2, 1);
}

.bottom-sheet::-webkit-scrollbar {
  display: none;
}

.app[data-panel="peek"] .bottom-sheet {
  height: calc(var(--sheet-peek-height) + var(--safe-bottom));
}

.app[data-panel="half"] .bottom-sheet {
  height: calc(var(--sheet-half-height) + var(--safe-bottom));
}

.app[data-panel="full"] .bottom-sheet {
  height: calc(100% - var(--safe-top) - 12px);
}

.sheet-toggle {
  width: 100%;
  min-height: 44px;
  border: 0;
  display: grid;
  place-items: center;
  color: inherit;
  background: transparent;
  cursor: pointer;
  touch-action: none;
}

.sheet-toggle span {
  width: 48px;
  height: 4px;
  border-radius: 999px;
  background: #b7c0c9;
}

.sheet-content {
  min-height: 0;
  padding: 0 0 calc(14px + var(--safe-bottom));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

.panel.is-visible {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.panel.is-visible::-webkit-scrollbar {
  display: none;
}

.app[data-panel="peek"] .sheet-content {
  display: block;
  padding-bottom: calc(10px + var(--safe-bottom));
}

.app[data-panel="peek"] .focus-row,
.app[data-panel="peek"] .tabs,
.app[data-panel="peek"] .stage-selector,
.app[data-panel="peek"] .stage-offline {
  display: none;
}

.app[data-panel="peek"] .panel:not([data-panel-view="route"]) {
  display: none !important;
}

.focus-row,
.stage-card,
.stage-offline,
.metric-grid div,
.driver-row,
.chat-list article,
.settings-section,
.admin-form {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.focus-row {
  min-height: 72px;
  padding: 10px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #111417;
  background: var(--turquoise);
  font-weight: 950;
  background-position: center;
  background-size: cover;
}

.avatar.has-photo {
  color: transparent;
  background-color: var(--surface-strong);
}

.focus-row strong,
.stage-card strong,
.metric-grid strong,
.driver-row strong,
.panel-header strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  line-height: 1.15;
}

.focus-row small,
.stage-card small,
.driver-row small {
  display: block;
  margin-top: 2px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 12px 0;
  padding: 4px;
  border-radius: 10px;
  background: rgba(17, 20, 23, .08);
}

.app[data-theme="night"] .tabs {
  background: rgba(255, 255, 255, .07);
}

.tabs button {
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  background: transparent;
  font-weight: 850;
  cursor: pointer;
}

.tabs svg {
  width: 18px;
  height: 18px;
}

.tabs button span {
  color: inherit;
  font-size: inherit;
}

.tabs .tab-count {
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #111417;
  background: rgba(0, 194, 184, .26);
  font-size: 11px;
  line-height: 1;
  font-weight: 950;
}

.tabs button.is-active {
  color: var(--ink);
  background: color-mix(in srgb, var(--line), var(--surface-strong) 54%);
}

.tabs button.is-active .tab-count {
  background: rgba(17, 20, 23, .14);
}

.panel {
  display: none;
}

.panel.is-visible {
  display: block;
}

.panel[data-panel-view="chat"].is-visible {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.stage-card {
  min-height: 76px;
  padding: 11px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
}

.stage-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #111417;
  background: var(--line);
}

.app[data-panel="peek"] .stage-card {
  min-height: 58px;
  padding: 8px;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
}

.app[data-panel="peek"] .stage-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

.app[data-panel="peek"] .stage-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-selector {
  margin-top: 10px;
}

.stage-list {
  display: grid;
  gap: 8px;
}

.stage-button {
  min-height: 54px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  background: var(--surface-strong);
  text-align: left;
  cursor: pointer;
}

.stage-button strong,
.stage-button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-button small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.stage-button em {
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--muted);
  background: rgba(17, 20, 23, .07);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.stage-button.is-active {
  border-color: rgba(0, 194, 184, .35);
  background: rgba(0, 194, 184, .1);
}

.stage-button.is-active em {
  color: #111417;
  background: var(--turquoise);
}

.stage-offline {
  min-height: 58px;
  margin-top: 10px;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.stage-offline strong,
.stage-offline small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-offline strong {
  color: var(--ink);
  font-size: 14px;
}

.stage-offline small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.stage-offline button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: #111417;
  background: var(--line);
  font-weight: 950;
}

.stage-offline button:disabled {
  color: var(--muted);
  background: rgba(17, 20, 23, .08);
}

.stage-actions {
  display: flex;
  gap: 6px;
}

.admin-form .stage-actions button {
  min-height: 32px;
  border: 1px solid var(--border);
  padding: 0 9px;
  color: var(--ink);
  background: var(--surface);
  font-size: 11px;
}

.admin-form .stage-button.is-active [data-stage-action="select"] {
  border-color: transparent;
  color: #111417;
  background: var(--turquoise);
}

.admin-form .stage-actions [data-stage-action="delete"] {
  color: var(--pink);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.metric-grid div {
  min-height: 62px;
  padding: 10px;
}

.app[data-panel="peek"] .metric-grid {
  gap: 6px;
  margin-top: 7px;
}

.app[data-panel="peek"] .metric-grid div {
  min-height: 42px;
  padding: 7px 8px;
}

.app[data-panel="peek"] .metric-grid strong {
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.driver-list,
.chat-list {
  display: grid;
  gap: 8px;
}

.chat-list {
  min-height: 0;
  overflow-y: auto;
  align-content: start;
  grid-auto-rows: max-content;
  scrollbar-width: none;
}

.chat-list::-webkit-scrollbar {
  display: none;
}

.driver-row {
  min-height: 58px;
  width: 100%;
  border: 1px solid var(--border);
  padding: 10px;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.driver-row.is-followed {
  border-color: rgba(255, 79, 154, .45);
  background: color-mix(in srgb, var(--pink), var(--surface) 86%);
}

.driver-row.is-self {
  cursor: default;
}

.driver-row:disabled {
  opacity: 1;
}

.driver-color {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--driver-color);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--driver-color), transparent 78%);
}

.driver-speed {
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
}

.follow-state {
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--muted);
  background: rgba(17, 20, 23, .07);
  font-size: 11px;
  font-weight: 950;
}

.driver-row.is-followed .follow-state {
  color: #fff;
  background: var(--pink);
}

.driver-row.is-self .follow-state {
  color: #111417;
  background: rgba(0, 194, 184, .26);
}

.chat-list article {
  min-height: 64px;
  padding: 11px 12px;
  overflow: visible;
  align-self: start;
}

.chat-list article strong,
.chat-list article span {
  display: block;
  overflow-wrap: anywhere;
}

.chat-list article strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.15;
}

.chat-list article span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.chat-list article.own {
  border-color: rgba(0, 194, 184, .22);
  background: rgba(0, 194, 184, .1);
}

.chat-list article.alert {
  border-color: rgba(255, 47, 125, .34);
  background: linear-gradient(135deg, rgba(255, 47, 125, .12), rgba(141, 18, 63, .1));
}

.chat-list article.alert strong {
  color: var(--danger);
}

.chat-list article small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
  font-weight: 800;
}

.panel[data-panel-view="chat"].is-visible .chat-list {
  flex: 1 1 auto;
}

.chat-form,
.date-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 8px;
}

.date-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-top: 0;
}

.date-grid > label {
  min-width: 0;
  max-width: 100%;
}

#tourForm .date-grid,
#tourEditForm .date-grid,
.tour-date-fields {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-width: 0;
}

.tour-date-fields label {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.tour-date-fields input[type="datetime-local"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  inline-size: 100%;
  height: 54px;
  min-height: 54px;
  min-width: 0;
  max-width: 100%;
  max-inline-size: 100%;
  padding-block: 0;
  padding-right: 36px;
  font-size: clamp(16px, 4.2vw, 18px);
  line-height: 54px;
  text-align: left;
  overflow: hidden;
}

.tour-date-fields input[type="datetime-local"]::-webkit-date-and-time-value,
.tour-date-fields input[type="datetime-local"]::-webkit-datetime-edit,
.tour-date-fields input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper {
  height: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  display: flex;
  align-items: center;
  text-align: left;
  line-height: normal;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tour-date-fields input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  flex: 0 0 auto;
  margin-inline-start: auto;
}

.chat-form input,
.admin-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--surface-strong);
  outline: none;
}

.chat-form button,
.admin-form button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #111417;
  background: var(--line);
  font-weight: 900;
  cursor: pointer;
}

.chat-form button {
  width: 46px;
  padding: 0;
}

.track-file-field {
  display: grid;
  gap: 6px;
}

.track-file-label {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.1;
  font-weight: 800;
}

.admin-form .track-dropzone {
  min-height: 78px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  justify-content: stretch;
  gap: 11px;
  border: 1px dashed color-mix(in srgb, var(--turquoise), var(--border) 46%);
  border-radius: 10px;
  padding: 11px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(0, 194, 184, .12), rgba(202, 255, 47, .08)),
    var(--surface-strong);
  text-align: left;
}

.admin-form .track-dropzone.is-dragover {
  border-color: var(--line);
  background:
    linear-gradient(135deg, rgba(202, 255, 47, .22), rgba(0, 194, 184, .16)),
    var(--surface-strong);
}

.track-drop-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #111417;
  background: var(--line);
}

.track-drop-icon svg {
  width: 20px;
  height: 20px;
}

.track-drop-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
  align-content: center;
}

.track-drop-copy strong,
.track-drop-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-drop-copy strong {
  font-size: 15px;
  line-height: 1.1;
  font-weight: 950;
}

.track-drop-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
}

.participant-form-hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 800;
}

.admin-participant-list-section {
  gap: 10px;
}

.admin-participant-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  scrollbar-width: none;
}

.admin-participant-list::-webkit-scrollbar {
  display: none;
}

.admin-participant-row {
  min-height: 58px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  background: var(--surface-strong);
}

.admin-participant-avatar {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #111417;
  background: var(--turquoise);
  background-position: center;
  background-size: cover;
  font-size: 14px;
  font-weight: 950;
}

.admin-participant-row strong,
.admin-participant-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-participant-row strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.1;
  font-weight: 950;
}

.admin-participant-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
}

.admin-form .admin-participant-row button {
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 9px;
  color: var(--muted);
  background: var(--surface);
  font-size: 11px;
}

.admin-panel {
  position: absolute;
  z-index: 9;
  inset: 0;
  display: grid;
  align-items: end;
}

.emergency-panel {
  position: absolute;
  z-index: 13;
  inset: 0;
  display: grid;
  align-items: end;
}

.tour-detail-panel {
  position: absolute;
  z-index: 9;
  inset: 0;
  display: grid;
  align-items: end;
}

.profile-panel {
  position: absolute;
  z-index: 9;
  inset: 0;
  display: grid;
  align-items: end;
}

.photo-crop-panel {
  position: absolute;
  z-index: 14;
  inset: 0;
  display: grid;
  align-items: end;
}

.settings-panel {
  position: absolute;
  z-index: 9;
  inset: 0;
  display: grid;
  align-items: end;
}

.participant-picker-panel {
  position: absolute;
  z-index: 12;
  inset: 0;
  display: grid;
  align-items: end;
}

.admin-panel[hidden],
.emergency-panel[hidden],
.tour-detail-panel[hidden],
.profile-panel[hidden],
.photo-crop-panel[hidden],
.settings-panel[hidden],
.participant-picker-panel[hidden],
.red-alert[hidden] {
  display: none;
}

.panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .34);
}

.admin-card {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  max-height: calc(100% - var(--safe-top) - 24px);
  overflow: auto;
  border-radius: 16px 16px 0 0;
  padding: 14px 14px calc(14px + var(--safe-bottom));
  color: var(--ink);
  scrollbar-width: none;
}

.emergency-card {
  position: relative;
  max-height: calc(100% - var(--safe-top) - 24px);
  overflow: auto;
  border-radius: 16px 16px 0 0;
  padding: 16px 14px calc(14px + var(--safe-bottom));
  color: var(--ink);
  scrollbar-width: none;
}

.emergency-position {
  margin-top: 12px;
  min-height: 66px;
  border-color: rgba(255, 47, 125, .18);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: #fff;
  background: linear-gradient(135deg, rgba(55, 14, 34, .98), rgba(112, 17, 61, .96));
}

.emergency-position svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.emergency-position span,
.emergency-position strong {
  display: block;
}

.emergency-position span {
  color: rgba(255, 255, 255, .7);
  font-size: 12px;
  font-weight: 800;
}

.emergency-position strong {
  margin-top: 2px;
  font-size: 15px;
  line-height: 1.15;
}

.emergency-reasons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.emergency-reasons button,
.emergency-send,
.emergency-help {
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface-strong);
  font-size: 15px;
  font-weight: 950;
  cursor: pointer;
}

.emergency-reasons button.is-active {
  color: #fff;
  border-color: transparent;
  background: var(--danger);
}

.emergency-send,
.emergency-help {
  width: 100%;
  margin-top: 12px;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.emergency-send {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--danger), var(--danger-dark));
}

.emergency-send:disabled {
  opacity: .68;
  cursor: wait;
}

.emergency-help {
  min-height: 48px;
  color: var(--danger-dark);
  background: rgba(255, 79, 154, .14);
}

.tour-detail-card {
  position: relative;
  max-height: calc(100% - var(--safe-top) - 24px);
  overflow: auto;
  border-radius: 16px 16px 0 0;
  padding: 14px 14px calc(14px + var(--safe-bottom));
  color: var(--ink);
  scrollbar-width: none;
}

.profile-card {
  position: relative;
  max-height: calc(100% - var(--safe-top) - 24px);
  overflow: auto;
  border-radius: 16px 16px 0 0;
  padding: 14px 14px calc(14px + var(--safe-bottom));
  color: var(--ink);
  scrollbar-width: none;
}

.photo-crop-card {
  position: relative;
  max-height: calc(100% - var(--safe-top) - 24px);
  overflow: auto;
  border-radius: 16px 16px 0 0;
  padding: 14px 14px calc(14px + var(--safe-bottom));
  color: var(--ink);
  scrollbar-width: none;
}

.settings-card {
  position: relative;
  max-height: calc(100% - var(--safe-top) - 24px);
  overflow: auto;
  border-radius: 16px 16px 0 0;
  padding: 14px 14px calc(14px + var(--safe-bottom));
  color: var(--ink);
  scrollbar-width: none;
}

.participant-picker-card {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: min(78%, calc(100% - var(--safe-top) - 24px));
  min-height: 430px;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  padding: 14px 14px calc(14px + var(--safe-bottom));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  color: var(--ink);
}

.admin-card::-webkit-scrollbar {
  display: none;
}

.tour-detail-card::-webkit-scrollbar {
  display: none;
}

.profile-card::-webkit-scrollbar {
  display: none;
}

.photo-crop-card::-webkit-scrollbar {
  display: none;
}

.settings-card::-webkit-scrollbar {
  display: none;
}

.participant-search-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.1;
  font-weight: 800;
}

.participant-search-field input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--surface-strong);
  font-size: 16px;
  font-weight: 850;
  outline: none;
}

.participant-picker-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  scrollbar-width: none;
}

.participant-picker-list::-webkit-scrollbar {
  display: none;
}

.participant-picker-row,
.participant-picker-empty {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.participant-picker-row {
  width: 100%;
  min-height: 62px;
  padding: 8px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.participant-picker-row strong,
.participant-picker-row small,
.participant-picker-empty strong,
.participant-picker-empty small {
  display: block;
}

.participant-picker-row strong,
.participant-picker-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-picker-row strong,
.participant-picker-empty strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.1;
  font-weight: 950;
}

.participant-picker-row small,
.participant-picker-empty small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 800;
}

.participant-picker-row:disabled {
  cursor: default;
  opacity: .72;
}

.participant-picker-row.is-added {
  background: color-mix(in srgb, var(--surface), var(--border) 18%);
}

.participant-picker-badge {
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  color: #111417;
  background: var(--line);
  font-size: 11px;
  line-height: 1;
  font-weight: 950;
  white-space: nowrap;
}

.participant-picker-row.is-added .participant-picker-badge {
  color: var(--muted);
  background: var(--surface-strong);
}

.participant-picker-empty {
  min-height: 72px;
  padding: 12px;
  display: grid;
  align-content: center;
  min-width: 0;
}

.participant-new-invite {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  max-height: 64px;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #111417;
  background: var(--line);
  font-size: 15px;
  line-height: 1.12;
  font-weight: 950;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
}

.participant-new-invite svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.participant-new-invite span {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-new-invite[hidden] {
  display: none;
}

.participant-invite-card button {
  width: 100%;
}

.photo-crop-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #101820;
}

.photo-crop-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 33%, rgba(255, 255, 255, .28) 33%, rgba(255, 255, 255, .28) calc(33% + 1px), transparent calc(33% + 1px), transparent 66%, rgba(255, 255, 255, .28) 66%, rgba(255, 255, 255, .28) calc(66% + 1px), transparent calc(66% + 1px)),
    linear-gradient(0deg, transparent 33%, rgba(255, 255, 255, .28) 33%, rgba(255, 255, 255, .28) calc(33% + 1px), transparent calc(33% + 1px), transparent 66%, rgba(255, 255, 255, .28) 66%, rgba(255, 255, 255, .28) calc(66% + 1px), transparent calc(66% + 1px));
}

.app[data-theme="night"] .photo-crop-stage::after {
  background:
    linear-gradient(90deg, transparent 33%, rgba(255, 255, 255, .18) 33%, rgba(255, 255, 255, .18) calc(33% + 1px), transparent calc(33% + 1px), transparent 66%, rgba(255, 255, 255, .18) 66%, rgba(255, 255, 255, .18) calc(66% + 1px), transparent calc(66% + 1px)),
    linear-gradient(0deg, transparent 33%, rgba(255, 255, 255, .18) 33%, rgba(255, 255, 255, .18) calc(33% + 1px), transparent calc(33% + 1px), transparent 66%, rgba(255, 255, 255, .18) 66%, rgba(255, 255, 255, .18) calc(66% + 1px), transparent calc(66% + 1px));
}

.photo-crop-canvas {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  touch-action: none;
  cursor: grab;
}

.photo-crop-canvas:active {
  cursor: grabbing;
}

.photo-zoom {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.photo-zoom input {
  width: 100%;
  accent-color: var(--turquoise);
}

.photo-crop-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 8px;
  margin-top: 12px;
}

.photo-crop-actions button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: #111417;
  background: var(--line);
  font-weight: 900;
  cursor: pointer;
}

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

.close-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: inherit;
  background: rgba(17, 20, 23, .08);
  cursor: pointer;
}

.app[data-theme="night"] .close-button {
  background: rgba(255, 255, 255, .08);
}

.admin-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  min-width: 0;
  max-width: 100%;
}

.tour-detail-hero,
.tour-detail-metrics,
.tour-detail-grid div {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.tour-detail-hero {
  min-height: 70px;
  padding: 11px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.tour-detail-hero span,
.tour-detail-metrics span,
.tour-detail-grid span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.tour-detail-hero strong,
.tour-detail-metrics strong,
.tour-detail-grid strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.15;
}

.tour-detail-hero button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #111417;
  background: var(--line);
  font-weight: 900;
  cursor: pointer;
}

.tour-detail-hero button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.tour-detail-metrics {
  margin-top: 10px;
  padding: 11px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tour-detail-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.tour-detail-grid div {
  min-height: 58px;
  padding: 10px;
}

.profile-form,
.profile-section {
  border: 1px solid var(--border);
  border-radius: 10px;
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  background: var(--surface);
}

.profile-form label,
.profile-section span,
.profile-form span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
}

.profile-section strong,
.profile-form strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  line-height: 1.15;
}

.profile-form label {
  display: grid;
  gap: 5px;
}

.profile-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--surface-strong);
  outline: none;
}

.profile-form button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: #111417;
  background: var(--line);
  font-weight: 900;
  cursor: pointer;
}

.profile-photo-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  background: var(--surface-strong);
}

.profile-photo-preview {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #111417;
  background: var(--turquoise);
  background-position: center;
  background-size: cover;
  font-weight: 950;
}

.profile-photo-preview.has-photo {
  color: transparent;
  background-color: var(--surface);
}

.profile-photo-copy {
  min-width: 0;
}

.profile-photo-copy small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.profile-photo-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 9px;
}

.profile-photo-actions button {
  min-height: 36px;
  padding: 0 10px;
}

.vehicle-form-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.vehicle-add-button {
  min-width: 78px;
}

.vehicle-count {
  width: max-content;
  border-radius: 999px;
  padding: 4px 8px;
  color: #111417;
  background: rgba(18, 194, 185, .2);
  font-size: 12px;
  font-weight: 900;
}

.vehicle-list {
  display: grid;
  gap: 7px;
}

.vehicle-empty-state {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  background: var(--surface-strong);
  font-size: 13px;
  font-weight: 800;
}

.profile-form .vehicle-row {
  min-height: 50px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 2px 8px;
  padding: 9px 10px;
  color: var(--ink);
  background: var(--surface-strong);
  text-align: left;
}

.profile-form .vehicle-row.is-active {
  border-color: rgba(18, 194, 185, .75);
  box-shadow: 0 0 0 2px rgba(18, 194, 185, .18);
}

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

.vehicle-row strong {
  grid-column: 1;
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.vehicle-row span {
  grid-column: 1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.vehicle-row em {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  border-radius: 999px;
  padding: 5px 8px;
  color: #111417;
  background: rgba(202, 255, 47, .65);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.vehicle-form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.vehicle-form-actions .secondary {
  min-width: 96px;
}

.profile-form .secondary,
.photo-crop-actions .secondary {
  border: 1px solid var(--border);
  color: var(--ink);
  background: var(--surface);
}

.profile-form button:disabled,
.photo-crop-actions button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.profile-account {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.profile-account .logout-button {
  width: auto;
  min-width: 108px;
}

.profile-tour-list {
  display: grid;
  gap: 8px;
}

.profile-tour-button {
  min-height: 62px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  background: var(--surface-strong);
  text-align: left;
  cursor: pointer;
}

.profile-tour-button strong,
.profile-tour-button small {
  display: block;
}

.profile-tour-button strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-tour-button small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.profile-tour-button span {
  border-radius: 999px;
  padding: 5px 8px;
  color: #111417;
  background: var(--line);
  font-size: 11px;
  font-weight: 950;
}

.profile-tour-button.is-active {
  border-color: rgba(0, 194, 184, .35);
  background: rgba(0, 194, 184, .1);
}

.profile-empty {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  background: var(--surface-strong);
  font-size: 13px;
}

.admin-tour-picker {
  gap: 10px;
}

.admin-tile-source {
  gap: 10px;
}

.admin-stage-picker {
  gap: 10px;
}

.admin-tour-picker small,
.admin-tile-source small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.admin-tour-list {
  display: grid;
  gap: 8px;
  max-height: 210px;
  overflow: auto;
  scrollbar-width: none;
}

.admin-tour-list::-webkit-scrollbar {
  display: none;
}

.admin-form .admin-tour-button {
  min-height: 58px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  background: var(--surface-strong);
  text-align: left;
}

.admin-tour-button strong,
.admin-tour-button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-tour-button small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.admin-tour-button em {
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--muted);
  background: rgba(17, 20, 23, .07);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.admin-tour-button.is-active {
  border-color: rgba(0, 194, 184, .35);
  background: rgba(0, 194, 184, .1);
}

.admin-tour-button.is-active em {
  color: #111417;
  background: var(--turquoise);
}

.tile-source-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.admin-form .tile-source-options button {
  min-height: 58px;
  border: 1px solid var(--border);
  padding: 8px 10px;
  display: grid;
  gap: 3px;
  align-content: center;
  color: var(--ink);
  background: var(--surface-strong);
  text-align: left;
}

.tile-source-options button span,
.tile-source-options button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-source-options button span {
  font-size: 13px;
  font-weight: 950;
}

.tile-source-options button.is-active {
  border-color: rgba(0, 194, 184, .42);
  background: rgba(0, 194, 184, .1);
}

.tile-source-options button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.settings-section {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.settings-section + .settings-section {
  margin-top: 10px;
}

.settings-section.settings-toggle {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.settings-section[hidden] {
  display: none;
}

.build-info-section {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.tenant-settings-section {
  grid-template-columns: minmax(0, 1fr);
  position: relative;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--turquoise), var(--border) 46%);
  background:
    linear-gradient(135deg, rgba(0, 194, 184, .13), rgba(202, 255, 47, .18) 46%, rgba(255, 79, 154, .09)),
    var(--surface);
}

.tenant-settings-section::before {
  content: "PRO";
  position: absolute;
  top: 14px;
  right: 14px;
  border-radius: 999px;
  padding: 5px 8px;
  color: #111417;
  background: var(--line);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .04em;
}

.tenant-settings-section > * {
  position: relative;
  z-index: 1;
}

.pro-feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pro-feature-list span {
  border: 1px solid rgba(17, 20, 23, .1);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, .55);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.tenant-checkout-notice {
  border: 1px solid rgba(18, 195, 188, .42);
  border-radius: 9px;
  padding: 10px;
  color: var(--ink);
  background: rgba(18, 195, 188, .12);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.tenant-checkout-notice[hidden] {
  display: none;
}

.tenant-checkout-notice.is-cancel {
  border-color: rgba(255, 62, 87, .34);
  background: rgba(255, 62, 87, .1);
}

.tenant-seat-status {
  border: 1px solid color-mix(in srgb, var(--turquoise), var(--border) 42%);
  border-radius: 9px;
  padding: 10px;
  display: grid;
  gap: 2px;
  background: rgba(255, 255, 255, .58);
}

.tenant-seat-status[hidden] {
  display: none;
}

.tenant-seat-status span,
.tenant-seat-status small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
}

.tenant-seat-status strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.1;
  font-weight: 950;
}

.tenant-plan-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.tenant-plan-switch[hidden] {
  display: none;
}

.tenant-plan-switch button {
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, .64);
  text-align: left;
}

.tenant-plan-switch button.is-active {
  border-color: color-mix(in srgb, var(--line), var(--turquoise) 20%);
  background: color-mix(in srgb, var(--line), white 78%);
}

.tenant-plan-switch span,
.tenant-plan-switch strong {
  display: block;
  margin: 0;
  line-height: 1.05;
}

.tenant-plan-switch span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.tenant-plan-switch strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
  white-space: nowrap;
}

.tenant-billing-meta {
  border: 1px solid color-mix(in srgb, var(--turquoise), var(--border) 50%);
  border-radius: 9px;
  padding: 10px;
  display: grid;
  gap: 3px;
  background: rgba(255, 255, 255, .58);
}

.tenant-billing-meta[hidden] {
  display: none;
}

.tenant-billing-meta span,
.tenant-billing-meta small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
}

.tenant-billing-meta strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.1;
  font-weight: 950;
}

.tenant-name-field {
  display: grid;
  gap: 5px;
}

.tenant-name-field[hidden] {
  display: none;
}

.tenant-name-field span,
.tenant-name-field small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
}

.tenant-name-field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--surface-strong);
  outline: none;
  font-weight: 850;
}

.tenant-settings-section .settings-action-button {
  min-height: 42px;
}

.tenant-settings-section .pro-action-button {
  border-color: color-mix(in srgb, var(--line), var(--turquoise) 18%);
  color: #111417;
  background: var(--line);
  box-shadow: 0 10px 24px rgba(202, 255, 47, .22);
}

.settings-action-button.secondary {
  color: #111417;
  border-color: color-mix(in srgb, var(--line), var(--border) 30%);
  background: var(--line);
}

.settings-section span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.settings-section strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  line-height: 1.15;
}

.settings-section small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.switch-button {
  width: 54px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  display: flex;
  align-items: center;
  background: rgba(17, 20, 23, .1);
  cursor: pointer;
}

.switch-button span {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: block;
  background: var(--surface-strong);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .16);
  transform: translateX(0);
  transition: transform .18s ease, background .18s ease;
}

.switch-button.is-active {
  border-color: color-mix(in srgb, var(--turquoise), var(--border) 34%);
  background: color-mix(in srgb, var(--turquoise), transparent 62%);
}

.switch-button.is-active span {
  background: var(--turquoise);
  transform: translateX(20px);
}

.switch-button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.settings-action-button {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface-strong);
  font-weight: 900;
  cursor: pointer;
}

.color-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.color-choice {
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  background: var(--surface-strong);
  font-weight: 850;
  cursor: pointer;
}

.color-choice[data-track-color="lime"] {
  --track-swatch: #caff2f;
}

.color-choice[data-track-color="red"] {
  --track-swatch: #ff3b4f;
}

.color-choice[data-track-color="blue"] {
  --track-swatch: #2f80ff;
}

.color-swatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--track-swatch);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--track-swatch), transparent 80%);
}

.color-choice span:last-child {
  color: inherit;
  font-size: 13px;
}

.color-choice.is-active {
  border-color: color-mix(in srgb, var(--track-swatch), var(--border) 36%);
  color: var(--ink);
  background: color-mix(in srgb, var(--track-swatch), var(--surface-strong) 84%);
}

.admin-form label {
  display: grid;
  gap: 5px;
  font-weight: 800;
}

.red-alert {
  position: absolute;
  z-index: 18;
  inset: 0;
  display: grid;
  align-items: end;
}

.red-alert-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(74, 15, 42, .42);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  backdrop-filter: blur(8px) saturate(120%);
}

.red-alert-card {
  position: relative;
  margin: 0 0 calc(var(--safe-bottom) + 8px);
  border-radius: 18px 18px 0 0;
  padding: 18px 16px 18px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  color: var(--ink);
}

.red-alert-card .close-button {
  position: absolute;
  top: 16px;
  right: 16px;
}

.red-alert-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--danger), var(--danger-dark));
}

.red-alert-icon svg {
  width: 28px;
  height: 28px;
}

.red-alert-card strong,
.red-alert-card span {
  display: block;
}

.red-alert-card span {
  color: var(--danger);
  font-size: 12px;
  font-weight: 900;
}

.red-alert-card strong {
  max-width: calc(100% - 58px);
  margin-top: 2px;
  font-size: 25px;
  line-height: 1.05;
}

.red-alert-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.red-alert-card button:not(.close-button) {
  min-height: 44px;
  margin-top: 14px;
  border: 0;
  border-radius: 10px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  background: var(--danger-dark);
  font-weight: 950;
  cursor: pointer;
}

.update-panel {
  position: absolute;
  z-index: 21;
  inset: 0;
  display: grid;
  align-items: end;
}

.update-panel[hidden] {
  display: none;
}

.update-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 20, 23, .42);
  -webkit-backdrop-filter: blur(8px) saturate(115%);
  backdrop-filter: blur(8px) saturate(115%);
}

.update-card {
  position: relative;
  margin: 0 0 calc(var(--safe-bottom) + 8px);
  border: 1px solid var(--border);
  border-radius: 18px 18px 0 0;
  padding: 18px 16px 16px;
  display: grid;
  gap: 10px;
  color: var(--ink);
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}

.update-card span,
.update-card p {
  color: var(--muted);
}

.update-card span,
.update-card strong {
  display: block;
}

.update-card span {
  font-size: 12px;
  font-weight: 900;
}

.update-card strong {
  margin-top: 3px;
  font-size: 24px;
  line-height: 1.05;
}

.update-card p {
  margin: 8px 0 2px;
  font-size: 14px;
  line-height: 1.35;
}

.update-card button {
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  padding: 0 14px;
  color: #111417;
  background: var(--line);
  font-weight: 950;
  cursor: pointer;
}

.update-card button.secondary {
  color: var(--ink);
  background: var(--surface-strong);
  border: 1px solid var(--border);
}

.flyins {
  position: absolute;
  z-index: 12;
  top: calc(var(--safe-top) + 78px);
  left: 14px;
  right: 72px;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.flyin {
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--ink);
  text-align: left;
  pointer-events: auto;
  animation: flyin-in .22s ease-out;
}

.flyin strong,
.flyin span {
  display: block;
}

.flyin strong {
  font-size: 12px;
  line-height: 1.2;
}

.flyin span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.flyin.alert {
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 47, 125, .96), rgba(141, 18, 63, .96));
}

.flyin.alert span {
  color: rgba(255, 255, 255, .82);
}

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

.toast {
  position: absolute;
  z-index: 11;
  left: 50%;
  bottom: calc(var(--sheet-half-height) + var(--safe-bottom) + 12px);
  min-width: 190px;
  max-width: calc(100% - 32px);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--ink);
  text-align: center;
  font-size: 13px;
  font-weight: 850;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.app[data-panel="peek"] .toast {
  bottom: calc(var(--sheet-peek-height) + var(--safe-bottom) + 12px);
}

.app[data-panel="full"] .toast {
  top: calc(var(--safe-top) + 14px);
  bottom: auto;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.vehicle-marker {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  display: grid;
  place-items: center;
  background: rgba(17, 20, 23, .22);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
  cursor: pointer;
}

.vehicle-marker.is-followed {
  background: color-mix(in srgb, var(--pink), transparent 54%);
  box-shadow:
    0 0 0 7px rgba(255, 79, 154, .22),
    0 14px 30px rgba(0, 0, 0, .32);
}

.vehicle-marker span {
  width: 14px;
  height: 14px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--driver-color, var(--turquoise));
}

.vehicle-marker.is-you span {
  background: var(--turquoise);
}

.vehicle-marker.is-followed span {
  border-color: #fff;
  background: var(--pink);
}

.waypoint-marker {
  width: 26px;
  height: 26px;
  border: 2px solid #fff;
  border-radius: 999px;
  padding: 0;
  display: grid;
  place-items: center;
  color: #111417;
  background: var(--surface-strong);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .24);
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.waypoint-marker.is-fuel {
  background: var(--turquoise);
}

.waypoint-marker.has-brand {
  width: 42px;
  min-width: 42px;
  height: 42px;
  border-radius: 12px;
  padding: 0;
  color: #111417;
  background: #fff;
}

.waypoint-marker.has-brand.has-high-octane {
  min-width: 42px;
}

.waypoint-brand-card,
.waypoint-brand,
.waypoint-logo,
.waypoint-plus {
  pointer-events: none;
}

.waypoint-brand-card {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 10px;
}

.waypoint-brand {
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
}

.waypoint-plus {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 17px;
  height: 17px;
  border: 2px solid #111417;
  border-radius: 999px;
  color: #111417;
  background: transparent;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .24);
  font-size: 0;
}

.waypoint-plus::before,
.waypoint-plus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.waypoint-plus::after {
  width: 2px;
  height: 8px;
}

.waypoint-logo {
  width: 29px;
  height: 29px;
  display: block;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.waypoint-logo-q8 {
  width: 31px;
  height: 18px;
  background-image: url("assets/brands/q8-logo-marker.png");
}

.waypoint-logo-eni {
  background-image: url("assets/brands/eni-logo-marker.png");
}

.waypoint-marker.brand-q8 {
  color: #111417;
  background: #fff;
}

.waypoint-marker.brand-eni,
.waypoint-marker.brand-agip {
  color: #111417;
  background: #fff;
}

.waypoint-marker.brand-shell {
  color: #111417;
  background: #ffd000;
}

.waypoint-marker.brand-aral,
.waypoint-marker.brand-esso,
.waypoint-marker.brand-omv {
  color: #fff;
  background: #1f68c7;
}

.waypoint-marker.is-food,
.waypoint-marker.is-stop {
  background: var(--pink);
  color: #fff;
}

.waypoint-marker.is-hotel {
  background: #2f80ff;
  color: #fff;
}

.waypoint-marker.is-parking {
  background: #687078;
  color: #fff;
}

.driver-popup .maplibregl-popup-content {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: #111417;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .16);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font: 13px Inter, ui-sans-serif, system-ui, sans-serif;
}

.driver-popup em {
  display: inline-block;
  margin-top: 4px;
  border-radius: 999px;
  padding: 3px 7px;
  color: #fff;
  background: var(--pink);
  font-style: normal;
  font-weight: 850;
}

.maplibregl-popup-content strong,
.maplibregl-popup-content span,
.maplibregl-popup-content small {
  display: block;
}

.maplibregl-popup-content span {
  margin-top: 3px;
  color: #687078;
  font-size: 12px;
  font-weight: 800;
}

.maplibregl-popup-content small {
  max-width: 220px;
  margin-top: 5px;
  color: #687078;
  line-height: 1.25;
}

.driver-popup .maplibregl-popup-tip {
  display: none;
}

.maplibregl-ctrl-bottom-left {
  bottom: calc(var(--sheet-half-height) + var(--safe-bottom) + 10px);
  left: 10px;
}

.app[data-panel="peek"] .maplibregl-ctrl-bottom-left {
  bottom: calc(var(--sheet-peek-height) + var(--safe-bottom) + 10px);
}

.app[data-panel="full"] .maplibregl-ctrl-bottom-left {
  bottom: calc(var(--safe-bottom) + 10px);
}

.maplibregl-ctrl-group {
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .16);
}

@media (max-width: 520px) {
  body {
    display: block;
    background: #111417;
  }

  .phone-shell {
    width: 100vw;
    height: var(--app-height);
    min-height: var(--app-height);
    border-radius: 0;
  }
}
