:root {
  color-scheme: dark;
  --bg: #0b1020;
  --panel: #11182b;
  --panel-2: #151e33;
  --panel-3: #1a2440;
  --line: #25324f;
  --line-strong: #385180;
  --text: #f7f9ff;
  --muted: #9fb0cd;
  --soft: #c9d5eb;
  --blue: #5d91ff;
  --green: #1ed39a;
  --yellow: #f8c545;
  --orange: #ff8b3d;
  --pink: #ff72b6;
  --red: #ff677d;
  --cyan: #4ad0ff;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 12%, rgba(74, 208, 255, 0.16), transparent 26%),
    radial-gradient(circle at 84% 10%, rgba(93, 145, 255, 0.2), transparent 28%),
    linear-gradient(135deg, #071126, #123b75 54%, #0b1020);
  background-attachment: fixed;
  color: var(--text);
}

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

button {
  cursor: pointer;
}

.shell {
  position: relative;
  min-height: 100vh;
  padding-bottom: 40px;
}

.shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(216, 230, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 230, 255, 0.07) 1px, transparent 1px),
    radial-gradient(circle at 20% 12%, rgba(74, 208, 255, 0.14), transparent 28%),
    radial-gradient(circle at 84% 8%, rgba(93, 145, 255, 0.18), transparent 30%);
  background-size: 72px 72px, 72px 72px, auto, auto;
  mask-image: radial-gradient(circle at center, black, transparent 88%);
  z-index: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background:
    url("data:image/svg+xml,%3Csvg width='420' height='118' viewBox='0 0 420 118' xmlns='http://www.w3.org/2000/svg'%3E%3Cg opacity='.28'%3E%3Cpath d='M8 118 L86 64 L130 96 L192 48 L270 118 Z' fill='%237aa7d9'/%3E%3Cpath d='M138 118 L234 60 L330 118 Z' fill='%236f9bcf'/%3E%3Cpath d='M248 118 L314 74 L406 118 Z' fill='%237ea8d7'/%3E%3Cpath d='M192 48 C211 60 224 76 232 98 L192 118 Z' fill='%234f75ad' opacity='.72'/%3E%3Cpath d='M86 64 C105 79 113 96 116 118 H76 Z' fill='%234a6fa6' opacity='.62'/%3E%3Cpath d='M314 74 C330 88 341 104 348 118 H304 Z' fill='%234f75ad' opacity='.58'/%3E%3Cpath d='M0 118 H420' stroke='%238bb6e7' stroke-opacity='.5'/%3E%3Cg fill='%232c5a85' opacity='.88'%3E%3Cpath d='M18 118 h3 v-9 h-6 l5-8 h-4 l6-9 h-4 l7-10 7 10 h-4 l6 9 h-4 l5 8 h-6 v9 h3z'/%3E%3Cpath d='M43 118 h3 v-7 h-5 l4-7 h-3 l5-8 h-3 l6-9 6 9 h-3 l5 8 h-3 l4 7 h-5 v7 h3z'/%3E%3Cpath d='M79 118 h3 v-8 h-6 l5-8 h-4 l6-9 h-4 l7-10 7 10 h-4 l6 9 h-4 l5 8 h-6 v8 h3z'/%3E%3Cpath d='M104 118 h3 v-7 h-5 l4-7 h-3 l5-8 h-3 l6-9 6 9 h-3 l5 8 h-3 l4 7 h-5 v7 h3z'/%3E%3Cpath d='M128 118 h3 v-8 h-6 l5-8 h-4 l6-9 h-4 l7-10 7 10 h-4 l6 9 h-4 l5 8 h-6 v8 h3z'/%3E%3Cpath d='M216 118 h3 v-8 h-6 l5-8 h-4 l6-9 h-4 l7-10 7 10 h-4 l6 9 h-4 l5 8 h-6 v8 h3z'/%3E%3Cpath d='M240 118 h3 v-7 h-5 l4-7 h-3 l5-8 h-3 l6-9 6 9 h-3 l5 8 h-3 l4 7 h-5 v7 h3z'/%3E%3Cpath d='M306 118 h3 v-8 h-6 l5-8 h-4 l6-9 h-4 l7-10 7 10 h-4 l6 9 h-4 l5 8 h-6 v8 h3z'/%3E%3C/g%3E%3Cg stroke='%238bb6e7' stroke-opacity='.18' stroke-width='1' stroke-linecap='round'%3E%3Cpath d='M25 91 v22'/%3E%3Cpath d='M50 97 v18'/%3E%3Cpath d='M86 92 v22'/%3E%3Cpath d='M111 97 v18'/%3E%3Cpath d='M135 92 v22'/%3E%3Cpath d='M223 92 v22'/%3E%3Cpath d='M247 97 v18'/%3E%3Cpath d='M313 92 v22'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
    rgba(7, 17, 38, 0.9);
  background-size: min(420px, 34vw) auto, auto;
  background-position: right 24px bottom 0, center;
  background-repeat: no-repeat, no-repeat;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.bike-lane {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  --bike-duration: 42s;
}

.banner-bike {
  position: absolute;
  left: -58px;
  bottom: -4px;
  width: 42px;
  height: 24px;
  opacity: 0.72;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.32));
  animation: bikeBannerRide var(--bike-duration) linear infinite;
  animation-delay: 0s;
  margin-left: calc(var(--bike-index) * -50px);
}

.banner-bike svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.bike-wheel,
.bike-frame,
.bike-rider {
  fill: none;
  stroke: #76a8e9;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bike-wheel {
  stroke: #9fc5ff;
}

.wheel-spokes {
  transform-origin: 0 0;
  animation: wheelSpin 0.9s linear infinite;
}

.wheel-spokes path {
  stroke-width: 2;
  opacity: 0.9;
}

.bike-frame {
  stroke: #5d91ff;
}

.bike-rider {
  stroke: #f8c545;
  stroke-width: 3.2;
}

.bike-head {
  fill: #f8c545;
  stroke: #f8c545;
  stroke-width: 1;
}

.bike-helmet {
  fill: #5d91ff;
  stroke: #9fc5ff;
  stroke-width: 0.9;
}

.topbar-inner {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(260px, 520px) auto;
  gap: 18px;
  align-items: start;
  max-width: 1220px;
  margin: 0 auto;
  padding: 16px 20px;
}

.title h1 {
  margin: 0;
  font-size: 21px;
  line-height: 1.1;
}

.title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #11182b;
  color: var(--text);
  padding: 12px 16px;
  outline: none;
}

.search:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.toolbar-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(93, 145, 255, 0.16);
}

.actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.nav-menu {
  position: relative;
  z-index: 30;
}

.title.nav-menu {
  z-index: 70;
}

.itinerary-menu {
  z-index: 50;
}

.dashboard-menu {
  z-index: 55;
}

.home-inline {
  margin-right: 8px;
}

.menu-trigger {
  border: 1px solid var(--line);
  background: rgba(21, 30, 51, 0.92);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 900;
}

.menu-trigger:hover,
.nav-menu:focus-within .menu-trigger {
  background: var(--panel-3);
  border-color: var(--blue);
}

.mega-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  min-width: min(760px, calc(100vw - 32px));
  display: none;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
  padding: 18px;
  background: rgba(17, 24, 43, 0.98);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 100;
}

.itinerary-menu .filter-menu {
  top: calc(100% + 18px);
  z-index: 80;
}

.nav-menu:hover .mega-menu,
.nav-menu:focus-within .mega-menu {
  display: grid;
}

.main-menu {
  width: min(760px, calc(100vw - 32px));
}

.filter-menu {
  width: min(680px, calc(100vw - 32px));
  grid-template-columns: repeat(3, minmax(160px, 1fr));
}

.menu-item {
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 42px 1fr;
  column-gap: 10px;
  align-items: center;
  padding: 10px;
  text-align: left;
}

.menu-item span {
  grid-row: span 2;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(93, 145, 255, 0.16);
  color: #dce8ff;
  font-weight: 900;
}

.menu-item strong {
  font-size: 14px;
}

.menu-item small {
  color: var(--muted);
  font-size: 12px;
}

.menu-item:hover,
.menu-item.selected {
  background: var(--panel-3);
}

.button,
.chip,
.icon-button {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--soft);
  border-radius: 8px;
  padding: 9px 13px;
  font-weight: 750;
  font-size: 13px;
}

.button.primary,
.chip.active {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.button.ghost {
  background: transparent;
}

.button.warn {
  color: #111827;
  background: var(--yellow);
  border-color: var(--yellow);
}

.filters {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 8px;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 20px 16px;
  overflow-x: auto;
}

.menu-row {
  overflow: visible;
}

.chip {
  white-space: nowrap;
  border-radius: 18px;
  color: var(--muted);
}

.chip .count {
  margin-left: 6px;
  color: inherit;
  opacity: 0.82;
}

.content {
  position: relative;
  z-index: 1;
  max-width: 1220px;
  margin: 0 auto;
  padding: 24px 20px;
}

.welcome {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(74, 208, 255, 0.24), transparent 28%),
    radial-gradient(circle at 78% 18%, rgba(93, 145, 255, 0.28), transparent 32%),
    linear-gradient(135deg, #071126, #123b75 52%, #0b1020);
  display: grid;
  align-items: center;
  padding: 28px 18px;
}

.welcome::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(216, 230, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 230, 255, 0.07) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
}

.welcome::after {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  right: -120px;
  top: 50px;
  border: 1px solid rgba(216, 230, 255, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle at 44% 40%, rgba(29, 42, 68, 0.92) 0 16%, transparent 17%),
    radial-gradient(circle at 62% 42%, rgba(29, 42, 68, 0.86) 0 9%, transparent 10%),
    radial-gradient(circle at 46% 62%, rgba(29, 42, 68, 0.8) 0 12%, transparent 13%),
    repeating-linear-gradient(0deg, transparent 0 58px, rgba(216, 230, 255, 0.09) 59px 60px),
    repeating-linear-gradient(90deg, transparent 0 58px, rgba(216, 230, 255, 0.09) 59px 60px);
  box-shadow: inset 0 0 70px rgba(74, 208, 255, 0.12), 0 0 90px rgba(93, 145, 255, 0.16);
  opacity: 0.72;
}

.welcome-card {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 34px;
  align-items: center;
}

.welcome-copy h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.94;
  letter-spacing: 0;
}

.welcome-copy p {
  margin: 18px 0 0;
  max-width: 520px;
  color: #d8e6ff;
  font-size: 17px;
}

.travel-animation {
  position: relative;
  width: min(520px, 92vw);
  height: 170px;
  margin-top: 28px;
}

.travel-animation svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.travel-route {
  fill: none;
  stroke: rgba(255, 255, 255, 0.42);
  stroke-width: 2;
  stroke-dasharray: 8 10;
  animation: routeDash 1.4s linear infinite;
}

.travel-plane {
  offset-path: path("M 20 128 C 150 10 330 25 500 78");
  animation: planeFly 5.2s ease-in-out infinite;
  font-size: 28px;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.35));
}

.travel-pin {
  fill: #5d91ff;
  stroke: white;
  stroke-width: 3;
}

.welcome-form {
  background: rgba(12, 19, 38, 0.74);
  border: 1px solid rgba(216, 230, 255, 0.22);
  box-shadow: var(--shadow);
  border-radius: 8px;
  padding: 22px;
}

.welcome-form .form-grid {
  grid-template-columns: 1fr 1fr;
}

.welcome-form .field.span-4 {
  grid-column: span 2;
}

.access-card {
  width: min(900px, 100%);
}

.access-form {
  align-self: center;
}

.span-2 {
  grid-column: span 2;
}

.form-error {
  margin: 0;
  color: #ffd2d9;
  background: rgba(255, 103, 125, 0.12);
  border: 1px solid rgba(255, 103, 125, 0.32);
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 800;
}

.file-button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  justify-content: center;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.trip-hub {
  display: grid;
  gap: 16px;
  align-self: center;
}

.trip-list {
  display: grid;
  gap: 10px;
}

.trip-row {
  border: 1px solid var(--line);
  background: rgba(16, 23, 42, 0.88);
  color: var(--text);
  border-radius: 8px;
  padding: 13px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  text-align: left;
}

.trip-row strong,
.trip-row small {
  display: block;
}

.trip-row small {
  color: var(--muted);
  margin-top: 4px;
}

.trip-row:hover {
  border-color: var(--blue);
  background: rgba(26, 36, 64, 0.92);
}

.view-tabs {
  display: none;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat,
.panel,
.item-card,
.modal-box {
  background: linear-gradient(180deg, rgba(24, 35, 62, 0.94), rgba(15, 24, 45, 0.94));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.stat {
  padding: 18px;
  min-height: 118px;
}

.stat label,
.field label,
.section-label {
  display: block;
  color: #a9c3ee;
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 800;
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(24px, 4vw, 31px);
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.bar {
  height: 5px;
  background: #273047;
  border-radius: 999px;
  margin-top: 14px;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  background: var(--blue);
}

.panel {
  padding: 18px;
  margin-bottom: 20px;
}

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

.panel-title h2 {
  margin: 0;
  font-size: 18px;
}

.panel-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.alerts-panel {
  display: flex;
  flex-direction: column;
  min-height: 425px;
  max-height: 425px;
}

.bike-dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 16px;
  align-items: start;
}

.bike-ride-grid {
  display: grid;
  gap: 10px;
}

.bike-ride-mini {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 8px;
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.bike-ride-mini.active,
.bike-ride-mini:hover {
  border-color: var(--green);
  background: var(--panel-3);
}

.bike-ride-mini strong,
.bike-ride-mini span,
.bike-ride-mini small {
  display: block;
}

.bike-ride-mini span,
.bike-ride-mini small {
  color: var(--muted);
  margin-top: 4px;
}

.bike-ride-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(13, 23, 48, 0.38);
}

.bike-detail-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.bike-detail-stats .stat {
  min-height: 96px;
  padding: 14px;
}

.elevation-mini {
  margin-top: 10px;
  padding: 8px;
}

.elevation-mini span {
  font-size: 10px;
}

.elevation-mini svg {
  height: 62px;
}

.alerts-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.alerts-scroll .empty {
  margin-top: 46px;
}

.charts {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
}

.category-row,
.package-item,
.alert,
.export-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid rgba(151, 169, 205, 0.12);
}

.category-row:first-child,
.package-item:first-child,
.alert:first-child,
.export-row:first-child {
  border-top: 0;
}

.budget-group {
  border-top: 1px solid rgba(151, 169, 205, 0.12);
  padding: 12px 0;
}

.budget-group:first-child {
  border-top: 0;
}

.budget-group summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  font-weight: 900;
}

.loose-budget-master {
  margin-top: 14px;
}

.loose-budget-master > summary {
  color: var(--soft);
  cursor: pointer;
  font-weight: 900;
  padding: 10px 0;
}

.loose-budget-card {
  background: rgba(12, 21, 40, 0.28);
  border: 1px solid rgba(151, 169, 205, 0.16);
  border-radius: 8px;
  padding: 16px;
  margin-top: 12px;
}

.loose-budget-card:first-child {
  margin-top: 0;
}

.loose-budget-head {
  list-style: none;
}

.loose-budget-head::-webkit-details-marker {
  display: none;
}

.loose-budget-head h3 {
  margin: 0;
  font-size: 19px;
}

.loose-budget-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.loose-budget-head > span {
  color: var(--soft);
  font-size: 13px;
}

.loose-budget-head > span::before {
  content: "▸ ";
}

.loose-budget-card[open] .loose-budget-head > span::before {
  content: "▾ ";
}

.loose-budget-stats {
  margin-top: 14px;
}

.loose-budget-detail {
  border-top: 1px solid rgba(151, 169, 205, 0.14);
  margin-top: 12px;
  padding-top: 8px;
}

.package-item-money {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.package-item-money small {
  color: var(--muted);
  font-size: 12px;
}

.package-details {
  border-top: 1px solid rgba(151, 169, 205, 0.14);
  margin-top: 12px;
  padding-top: 10px;
}

.package-details summary {
  cursor: pointer;
  color: var(--soft);
  font-weight: 900;
  padding: 8px 0;
}

.category-line {
  height: 7px;
  background: #26314c;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 7px;
}

.category-line i {
  display: block;
  height: 100%;
}

.timeline {
  display: grid;
  gap: 28px;
}

.day-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.day-date {
  color: #a9c3ee;
  letter-spacing: 0.13em;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
}

.day-route {
  font-weight: 900;
}

.day-city-button {
  margin-left: 8px;
  padding: 5px 8px;
  font-size: 11px;
  vertical-align: middle;
}

.day-count {
  color: var(--muted);
  font-size: 12px;
}

.items {
  display: grid;
  gap: 10px;
}

.item-card {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-left: 4px solid var(--blue);
  cursor: grab;
  backdrop-filter: blur(2px);
}

.compact-items {
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
}

.item-card.compact {
  grid-template-columns: 30px 1fr;
  padding: 6px 10px;
  min-height: 0;
  gap: 8px;
  width: 100%;
}

.item-card.compact .item-icon {
  width: 26px;
  height: 26px;
  font-size: 14px;
}

.item-card.compact h3 {
  font-size: 14px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-card.compact p {
  font-size: 12px;
  margin-top: 2px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-card.compact .package-link {
  display: none;
}

.day:has(.compact-items) .day-header {
  padding-bottom: 6px;
  margin-bottom: 6px;
  gap: 8px;
}

.day:has(.compact-items) {
  margin-bottom: 10px;
}

.day:has(.compact-items) .day-date,
.day:has(.compact-items) .day-count {
  font-size: 11px;
}

.day:has(.compact-items) .day-route {
  font-size: 16px;
}

.day:has(.compact-items) .day-city-button {
  padding: 4px 7px;
  font-size: 10px;
}

.compact-hidden {
  display: none;
}

.item-card:active {
  cursor: grabbing;
}

.item-card.drag-over {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.item-card.hotel {
  border-left-color: var(--pink);
}

.item-card.lodging {
  border-left-color: #b981ff;
}

.item-card.bike,
.item-card.package {
  border-left-color: var(--orange);
}

.item-card.train,
.item-card.car {
  border-left-color: var(--green);
}

.item-card.activity,
.item-card.walk {
  border-left-color: var(--cyan);
}

.item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.055);
  font-size: 18px;
}

.item-main h3 {
  margin: 0;
  font-size: 16px;
  min-width: 0;
}

.item-main p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  min-width: 0;
}

.item-main {
  min-width: 0;
  overflow: hidden;
}

.package-link {
  color: var(--orange);
  font-weight: 850;
}

.money {
  text-align: right;
  min-width: 145px;
}

.money strong {
  display: block;
}

.money span {
  color: var(--muted);
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  color: var(--blue);
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 850;
  font-size: 12px;
  margin-top: 6px;
}

.badge.paid {
  color: var(--green);
  border-color: var(--green);
}

.badge.partial {
  color: var(--yellow);
  border-color: var(--yellow);
}

.badge.pending {
  color: var(--red);
  border-color: var(--red);
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.toolbar-select {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(24, 35, 62, 0.95), rgba(15, 24, 45, 0.95));
  color: var(--soft);
  border-radius: 8px;
  padding: 9px 36px 9px 13px;
  font-weight: 750;
  font-size: 13px;
  outline: none;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--soft);
  font-size: 13px;
}

.toggle input {
  width: 18px;
  height: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

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

.field.span-2 {
  grid-column: span 2;
}

.field.span-4 {
  grid-column: span 4;
}

.field input,
.field select,
.field textarea {
  min-width: 0;
  border: 1px solid var(--line);
  background: #10172a;
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
}

.field textarea {
  min-height: 78px;
  resize: vertical;
}

.type-field {
  display: none;
}

form[data-selected-type="flight"] .for-flight,
form[data-selected-type="hotel"] .for-hotel,
form[data-selected-type="lodging"] .for-lodging,
form[data-selected-type="car"] .for-car,
form[data-selected-type="train"] .for-train,
form[data-selected-type="activity"] .for-activity,
form[data-selected-type="museum"] .for-museum,
form[data-selected-type="bike"] .for-bike,
form[data-selected-type="walk"] .for-walk,
form[data-selected-type="food"] .for-food,
form[data-selected-type="other"] .for-other {
  display: grid;
}

.item-form-tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 2px 0 4px;
}

form.item-minimal[data-selected-type="flight"] .field:not(.always-min):not(.min-flight),
form.item-minimal[data-selected-type="hotel"] .field:not(.always-min):not(.min-hotel),
form.item-minimal[data-selected-type="lodging"] .field:not(.always-min):not(.min-lodging),
form.item-minimal[data-selected-type="car"] .field:not(.always-min):not(.min-car),
form.item-minimal[data-selected-type="train"] .field:not(.always-min):not(.min-train),
form.item-minimal[data-selected-type="activity"] .field:not(.always-min):not(.min-activity),
form.item-minimal[data-selected-type="museum"] .field:not(.always-min):not(.min-museum),
form.item-minimal[data-selected-type="bike"] .field:not(.always-min):not(.min-bike),
form.item-minimal[data-selected-type="walk"] .field:not(.always-min):not(.min-walk),
form.item-minimal[data-selected-type="food"] .field:not(.always-min):not(.min-food),
form.item-minimal[data-selected-type="other"] .field:not(.always-min):not(.min-other) {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(5, 8, 18, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal.open {
  display: flex;
}

.modal-box {
  width: min(920px, 100%);
  max-height: 92vh;
  overflow: auto;
  box-shadow: var(--shadow);
  padding: 18px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-head h2 {
  margin: 0;
}

.type-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.type-option {
  min-height: 104px;
  border: 1px solid var(--line);
  background: #10172a;
  color: var(--text);
  border-radius: 8px;
  display: grid;
  place-items: center;
  gap: 6px;
}

.type-option span {
  font-size: 28px;
}

.type-option:hover {
  border-color: var(--blue);
  background: var(--panel-3);
}

.empty {
  color: var(--muted);
  padding: 24px 0;
  text-align: center;
}

.footer-note {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  margin-top: 30px;
}

.route-hero {
  overflow: hidden;
}

.route-line {
  position: relative;
  display: grid;
  gap: 14px;
  padding-left: 28px;
}

.world-route {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 18px;
}

.route-map-shell {
  min-width: 0;
}

.real-route-map {
  width: 100%;
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #0d1730;
}

.route-map-fallback {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.map-unavailable {
  min-height: 560px;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--soft);
  text-align: center;
}

.route-number-marker {
  border: 0;
  background: transparent;
}

.route-number-marker span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  font-size: 12px;
  font-weight: 900;
}

.leaflet-container {
  background: #0d1730;
  color: #111827;
  font-family: inherit;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #10172a;
  color: var(--text);
}

.leaflet-control-attribution {
  font-size: 10px;
}

.bike-route-summary,
.bike-elevation-preview {
  color: var(--soft);
  border: 1px solid rgba(169, 195, 238, 0.16);
  background: rgba(13, 23, 48, 0.42);
  border-radius: 8px;
  padding: 10px 12px;
}

.elevation-card span {
  display: block;
  margin-bottom: 8px;
  color: #a9c3ee;
  font-size: 12px;
  font-weight: 800;
}

.elevation-card svg {
  width: 100%;
  height: 150px;
}

.elevation-area {
  fill: rgba(30, 211, 154, 0.16);
}

.elevation-line {
  fill: none;
  stroke: var(--green);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-legs {
  display: grid;
  gap: 8px;
  align-content: start;
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}

.route-map-note {
  border: 1px solid rgba(169, 195, 238, 0.18);
  background: rgba(13, 23, 48, 0.72);
  border-radius: 8px;
  padding: 12px;
}

.route-map-note strong,
.route-map-note span {
  display: block;
}

.route-map-note span {
  color: var(--muted);
  margin-top: 3px;
}

.route-leg {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 8px;
  padding: 12px;
  text-align: left;
}

.route-leg span,
.route-leg small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.route-leg strong {
  display: block;
  margin: 4px 0;
}

.route-leg.active,
.route-leg:hover {
  border-color: var(--green);
  background: var(--panel-3);
}

.shopping-form {
  display: grid;
  grid-template-columns: 1fr 170px 120px auto;
  gap: 10px;
  margin-bottom: 16px;
}

.shopping-form input,
.shopping-form select {
  border: 1px solid var(--line);
  background: #10172a;
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
}

.shopping-stats {
  margin: 14px 0;
}

.shopping-list {
  display: grid;
  gap: 10px;
}

.shopping-item {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(24, 35, 62, 0.94), rgba(15, 24, 45, 0.94));
}

.shopping-item.done {
  opacity: 0.72;
}

.shopping-item.done .toggle span {
  text-decoration: line-through;
}

.package-payments-editor {
  border-top: 1px solid rgba(151, 169, 205, 0.16);
  padding-top: 12px;
}

.payment-row {
  display: grid;
  grid-template-columns: 160px 150px 110px 1fr auto auto;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.payment-row input,
.payment-row select {
  border: 1px solid var(--line);
  background: #10172a;
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
}

.route-line::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 18px;
  bottom: 18px;
  width: 2px;
  background: linear-gradient(var(--blue), var(--green), var(--orange));
  transform-origin: top;
  animation: routeGrow 900ms ease both;
}

.route-stop {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(17, 24, 43, 0.72);
  border-radius: 8px;
  animation: routeIn 420ms ease both;
  animation-delay: var(--delay);
}

.route-dot {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: white;
  font-weight: 900;
  font-size: 12px;
  z-index: 1;
}

.route-stop h3 {
  margin: 3px 0 6px;
  font-size: 20px;
}

.route-stop p {
  margin: 4px 0;
  color: var(--muted);
}

@keyframes routeGrow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

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

@keyframes routeDash {
  to { stroke-dashoffset: -36; }
}

@keyframes planeFly {
  0% {
    offset-distance: 0%;
    opacity: 0;
    transform: rotate(-12deg);
  }
  12%, 88% {
    opacity: 1;
  }
  100% {
    offset-distance: 100%;
    opacity: 0;
    transform: rotate(8deg);
  }
}

@keyframes bikeBannerRide {
  0% {
    transform: translateX(0) translateY(2px);
    opacity: 0;
  }
  10% {
    opacity: 0.72;
  }
  48% {
    transform: translateX(52vw) translateY(0);
  }
  90% {
    opacity: 0.72;
  }
  100% {
    transform: translateX(calc(100vw + 84px)) translateY(2px);
    opacity: 0;
  }
}

@keyframes wheelSpin {
  to {
    transform: rotate(360deg);
  }
}

#printableReport {
  display: none;
}

@media print {
  body > *:not(#printableReport) {
    display: none !important;
  }

  #printableReport {
    display: block;
    color: #111827;
    background: white;
    padding: 24px;
    font-family: Arial, sans-serif;
  }

  #printableReport table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
  }

  #printableReport th,
  #printableReport td {
    border: 1px solid #d1d5db;
    padding: 6px;
    text-align: left;
  }
}

@media (max-width: 900px) {
  .topbar-inner {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .actions {
    justify-content: flex-start;
  }

  .mega-menu,
  .filter-menu {
    grid-template-columns: 1fr;
    min-width: calc(100vw - 24px);
  }

  .dashboard-grid,
  .charts {
    grid-template-columns: 1fr 1fr;
  }

  .bike-dashboard-layout,
  .bike-detail-stats {
    grid-template-columns: 1fr;
  }

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

  .field.span-4 {
    grid-column: span 2;
  }

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

@media (max-width: 640px) {
  .content {
    padding: 18px 12px;
  }

  .banner-bike {
    bottom: -3px;
    width: 36px;
    height: 21px;
    margin-left: calc(var(--bike-index) * -42px);
  }

  .bike-lane {
    --bike-duration: 36s;
  }

  .alerts-panel {
    min-height: 340px;
    max-height: 340px;
  }

  .topbar-inner,
  .filters {
    padding-left: 12px;
    padding-right: 12px;
  }

  .dashboard-grid,
  .charts,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .bike-dashboard-layout,
  .bike-detail-stats {
    grid-template-columns: 1fr;
  }

  .field.span-2,
  .field.span-4 {
    grid-column: span 1;
  }

  .welcome-form .form-grid {
    grid-template-columns: 1fr;
  }

  .welcome-form .field.span-4 {
    grid-column: span 1;
  }

  .span-2 {
    grid-column: span 1;
  }

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

  .shopping-form,
  .shopping-item,
  .payment-row {
    grid-template-columns: 1fr;
  }

  .type-picker {
    grid-template-columns: 1fr 1fr;
  }

  .day-header {
    grid-template-columns: 1fr auto;
  }

  .day-date {
    grid-column: 1 / -1;
  }

  .item-card {
    grid-template-columns: 34px 1fr;
    align-items: start;
  }

  .item-card.compact {
    grid-template-columns: 28px 1fr;
    padding: 6px 8px;
  }

  .compact-items {
    grid-template-columns: 1fr;
  }

  .item-card.compact .item-main h3,
  .item-card.compact .item-main p {
    max-width: calc(100vw - 92px);
  }

  .day:has(.compact-items) .day-header {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .money {
    grid-column: 2;
    text-align: left;
    min-width: 0;
  }

  .button,
  .chip {
    padding: 9px 11px;
  }
}

/* Approved mobile itinerary redesign */
body {
  background:
    linear-gradient(rgba(216, 230, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 230, 255, .07) 1px, transparent 1px),
    radial-gradient(circle at 20% 12%, rgba(74, 208, 255, .16), transparent 26%),
    radial-gradient(circle at 84% 10%, rgba(93, 145, 255, .20), transparent 28%),
    linear-gradient(135deg, #071126, #123b75 54%, #0b1020);
  background-size: 72px 72px, 72px 72px, auto, auto, auto;
  background-attachment: fixed;
}

.shell {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: #ffffff;
  color: #18232e;
  padding-bottom: 82px;
  box-shadow: 0 24px 70px rgba(3, 27, 46, .35), 0 0 0 1px rgba(255,255,255,.45);
}

.shell::before,
.bike-lane {
  display: none;
}

.appbar {
  position: sticky;
  top: 0;
  z-index: 160;
  overflow: visible;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid #e4ebf0;
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.appbar-inner {
  max-width: none;
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  gap: 10px;
  align-items: center;
  padding: 12px 14px 10px;
}

.appbar .title h1 {
  margin: 0;
  color: #18232e;
  font-size: 17px;
  line-height: 1.12;
}

.appbar .title p {
  margin: 3px 0 0;
  color: #687884;
  font-size: 12px;
}

.ghost {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  position: relative;
}

.back::before,
.share::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-left: 2px solid #2d8fc0;
  border-bottom: 2px solid #2d8fc0;
  transform: rotate(45deg);
}

.share::before {
  inset: 9px 10px 13px;
  border: 2px solid #2d8fc0;
  border-top: 0;
  transform: none;
}

.share::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 7px;
  width: 2px;
  height: 14px;
  background: #2d8fc0;
}

.appbar .search {
  grid-column: 1 / -1;
  width: 100%;
  border: 1px solid #dfe7ed;
  border-radius: 8px;
  padding: 12px 13px;
  color: #18232e;
  background: #f8fafb;
  outline: none;
}

.filters {
  max-width: none;
  padding: 0 14px 12px;
  margin: 0;
  gap: 8px;
}

.menu-trigger,
.toolbar-select,
.button,
.chip,
.icon-button {
  background: #ffffff;
  color: #18232e;
  border: 1px solid #dfe7ed;
  border-radius: 8px;
}

.button.primary,
.chip.active {
  background: #2686b7;
  border-color: #2686b7;
  color: #ffffff;
}

.content {
  max-width: none;
  padding: 12px 14px 18px;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.toggle {
  color: #5f6f7d;
  font-size: 12px;
  font-weight: 800;
}

.toggle input {
  accent-color: #2686b7;
}

input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 2px solid #9aaab6;
  border-radius: 4px;
  background: transparent;
  display: inline-grid;
  place-content: center;
  vertical-align: middle;
}

input[type="checkbox"]:checked {
  border-color: #2686b7;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.2 9.1 7.4 12.2 13.8 5.8' fill='none' stroke='%232686b7' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
}

.trip-timeline {
  display: grid;
  gap: 0;
}

.timeline-day {
  margin: 0;
}

.date-band {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  background: #eef1f6;
  color: #5f6f7d;
  padding: 7px 10px;
  margin: 8px 0 4px;
}

.date-band span {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 10px;
  font-weight: 900;
}

.date-band strong {
  grid-column: 1 / -1;
  grid-row: 2;
  color: #18232e;
  font-size: 14px;
}

.date-band small {
  background: #ffffff;
  border: 1px solid #dfe7ed;
  border-radius: 999px;
  color: #687884;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 900;
}

.day-city-button {
  padding: 5px 8px;
  font-size: 10px;
}

.items,
.compact-items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.row.item-card,
.row.item-card.compact {
  position: relative;
  display: grid;
  grid-template-columns: 48px 32px 1fr;
  gap: 9px;
  align-items: start;
  padding: 12px 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  cursor: pointer;
}

.row.item-card::before {
  content: "";
  position: absolute;
  left: 63px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #c9e5ef;
}

.row.item-card time {
  color: #2b3945;
  font-weight: 900;
  font-size: 12px;
  text-align: right;
  line-height: 1.1;
  padding-top: 7px;
}

.item-icon.icon {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #42bdd5;
  box-shadow: 0 0 0 4px #ffffff;
}

.item-icon.icon::before,
.item-icon.icon::after,
.tab::before,
.tab::after {
  content: "";
  position: absolute;
}

.item-icon.flight::before,
.item-icon.plane::before {
  width: 17px;
  height: 2px;
  background: #ffffff;
  transform: rotate(-25deg);
}

.item-icon.flight::after,
.item-icon.plane::after {
  width: 7px;
  height: 7px;
  border-top: 2px solid #ffffff;
  border-right: 2px solid #ffffff;
  transform: rotate(20deg);
}

.item-icon.hotel::before,
.item-icon.lodging::before {
  width: 17px;
  height: 9px;
  border: 2px solid #ffffff;
  border-top: 0;
  bottom: 8px;
}

.item-icon.hotel::after,
.item-icon.lodging::after {
  width: 6px;
  height: 6px;
  background: #ffffff;
  border-radius: 2px;
  left: 8px;
  top: 11px;
}

.item-icon.car,
.item-icon.train {
  background: #48c59a;
}

.item-icon.car::before,
.item-icon.train::before {
  width: 18px;
  height: 8px;
  border: 2px solid #ffffff;
  border-radius: 5px 5px 3px 3px;
}

.item-icon.car::after,
.item-icon.train::after {
  width: 17px;
  height: 4px;
  border-left: 3px solid #ffffff;
  border-right: 3px solid #ffffff;
  bottom: 8px;
}

.item-icon.bike {
  background: #f5a338;
}

.item-icon.bike::before {
  width: 17px;
  height: 8px;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  border-radius: 999px;
}

.item-icon.activity,
.item-icon.walk,
.item-icon.museum,
.item-icon.food,
.item-icon.other {
  background: #42b7d5;
}

.item-icon.activity::before,
.item-icon.walk::before,
.item-icon.museum::before,
.item-icon.food::before,
.item-icon.other::before {
  width: 11px;
  height: 11px;
  border: 2px solid #ffffff;
  border-radius: 999px 999px 999px 0;
  transform: rotate(-45deg);
}

.row .item-main {
  min-width: 0;
  border-bottom: 1px solid #edf2f5;
  padding: 0 0 11px;
  overflow: visible;
}

.row-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.row-title h3 {
  margin: 0;
  color: #18232e;
  font-size: 14px;
}

.row-title em {
  background: #36bf86;
  color: #ffffff;
  border-radius: 999px;
  padding: 3px 7px;
  font-style: normal;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.row .item-main p {
  display: block;
  margin: 3px 0 0;
  color: #6d7c87;
  font-size: 12px;
  white-space: normal;
}

.row .package-link {
  color: #2686b7;
  font-weight: 800;
}

.row .money {
  display: none;
}

.panel,
.stat,
.item-card,
.modal-box,
.trip-row,
.bike-ride-detail {
  background: #ffffff;
  color: #18232e;
  border-color: #dfe7ed;
}

.modal-box .field input,
.modal-box .field select,
.modal-box .field textarea,
.shopping-form input,
.shopping-form select,
.payment-row input,
.payment-row select {
  background: #ffffff;
  color: #18232e;
  border-color: #d7e3ea;
}

.modal-box .field input::placeholder,
.modal-box .field textarea::placeholder {
  color: #91a1ad;
}

.modal-box .type-option {
  background: #f7fafc;
  color: #18232e;
  border-color: #d7e3ea;
}

.modal-box .toggle input {
  background: transparent;
  border-color: #b9cbd6;
}

.modal-box .button.ghost {
  background: #ffffff;
  color: #18232e;
  border: 1px solid #d7e3ea;
}

.mega-menu,
.filter-menu {
  background: #ffffff;
  color: #18232e;
  border: 1px solid #d7e3ea;
  border-radius: 12px;
  box-shadow: 0 24px 56px rgba(19, 39, 58, .18);
  z-index: 220;
}

.menu-item {
  color: #18232e;
  font-family: inherit;
  font-weight: 750;
}

.menu-item span {
  background: #eef6fa;
  color: #2686b7;
}

.menu-item strong,
.menu-trigger,
.tabbar button,
.toggle,
.toolbar-select {
  font-family: inherit;
  font-weight: 800;
  letter-spacing: 0;
}

.menu-item small {
  color: #6d7c87;
}

.menu-item:hover,
.menu-item.selected {
  background: #f2f8fb;
}

.menu-trigger:hover,
.nav-menu:focus-within .menu-trigger {
  background: #ffffff;
  color: #18232e;
  border-color: #2686b7;
  box-shadow: 0 0 0 3px rgba(38, 134, 183, .12);
}

.item-form-tools {
  justify-content: flex-start;
}

.modal-box .bike-route-summary,
.modal-box .bike-elevation-preview {
  min-height: auto;
  background: #f7fafc;
  color: #5f6f7d;
  border: 1px solid #d7e3ea;
  border-radius: 8px;
  padding: 12px;
}

.modal-box input[type="file"] {
  width: 100%;
  min-height: 44px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid #d7e3ea;
  border-radius: 8px;
  color: #18232e;
}

.modal-box input[type="file"]::file-selector-button {
  margin-right: 10px;
  border: 1px solid #d7e3ea;
  border-radius: 7px;
  background: #eef6fa;
  color: #18232e;
  padding: 8px 10px;
  font-weight: 800;
}

.modal-box .form-grid > .button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  align-self: end;
  justify-content: center;
  width: 100%;
  text-align: center;
}

.modal-box .form-grid > .button.ghost {
  max-width: none;
  white-space: normal;
  line-height: 1.1;
}

.modal-box .form-grid > button[type="submit"],
.modal-box .form-grid > [data-use-day-city],
.modal-box .form-grid > .button.warn {
  grid-column: span 2;
}

.route-hero {
  overflow: visible;
}

.route-line,
.route-stop,
.route-map-note,
.route-leg,
.shopping-item {
  background: #ffffff;
  color: #18232e;
  border-color: #dfe7ed;
}

.route-line {
  padding: 14px 14px 14px 42px;
  border: 1px solid #dfe7ed;
  border-radius: 12px;
}

.route-line::before {
  left: 24px;
  background: linear-gradient(#2686b7, #48c59a, #f5a338);
}

.route-stop {
  box-shadow: 0 8px 22px rgba(28, 48, 65, .07);
}

.route-dot,
.route-number-marker span {
  background: #2686b7;
}

.route-stop p,
.route-leg span,
.route-leg small,
.route-map-note span,
.route-map-fallback,
.leaflet-control-attribution,
.shopping-item .money span {
  color: #6d7c87;
}

.route-stop h3,
.route-leg strong,
.route-map-note strong,
.shopping-item strong,
.shopping-item .toggle span {
  color: #18232e;
}

.world-route {
  align-items: start;
}

.real-route-map {
  min-height: 420px;
  background: #eef6fa;
  border-color: #dfe7ed;
}

.leaflet-container {
  background: #eef6fa;
  color: #18232e;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #ffffff;
  color: #18232e;
}

.route-map-note {
  border-radius: 10px;
}

.route-leg {
  box-shadow: 0 6px 18px rgba(28, 48, 65, .06);
}

.route-leg.active,
.route-leg:hover {
  background: #f2f8fb;
  border-color: #2686b7;
}

.shopping-form {
  background: #f7fafc;
  border: 1px solid #dfe7ed;
  border-radius: 12px;
  padding: 12px;
}

.shopping-form input,
.shopping-form select {
  background: #ffffff;
  color: #18232e;
  border-color: #d7e3ea;
}

.shopping-item {
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(28, 48, 65, .06);
}

.shopping-item.done {
  opacity: 1;
  background: #f7fafc;
}

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(430px, 100vw);
  height: 68px;
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid #dfe7ed;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 90;
}

.tabbar button {
  border: 0;
  background: transparent;
  color: #8b98a2;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
}

.tabbar button.active {
  color: #2686b7;
}

.tab {
  position: relative;
  width: 20px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid currentColor;
  opacity: .9;
}

.star {
  clip-path: polygon(50% 0, 62% 34%, 98% 35%, 68% 56%, 79% 91%, 50% 70%, 21% 91%, 32% 56%, 2% 35%, 38% 34%);
  border: 0;
  background: currentColor;
}

.trips {
  width: 19px;
  height: 18px;
  border-radius: 4px;
}

.trips::before {
  width: 9px;
  height: 3px;
  left: 3px;
  top: -5px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
}

.route {
  border: 0;
}

.route::before {
  width: 4px;
  height: 4px;
  left: 1px;
  top: 10px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 13px -8px 0 currentColor;
}

.route::after {
  width: 17px;
  height: 10px;
  left: 2px;
  top: 5px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  border-radius: 0 8px 0 0;
  transform: rotate(-16deg);
}

.more {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.more::before {
  width: 4px;
  height: 4px;
  left: 8px;
  top: 7px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: -7px 0 0 currentColor, 7px 0 0 currentColor;
}

@media (min-width: 520px) {
  body {
    padding: 22px;
  }

  .shell {
    min-height: calc(100vh - 44px);
    border-radius: 30px;
    overflow: visible;
  }
}

@media (min-width: 640px) {
  body {
    min-height: 100vh;
    padding: 24px;
    background:
      linear-gradient(rgba(216, 230, 255, .07) 1px, transparent 1px),
      linear-gradient(90deg, rgba(216, 230, 255, .07) 1px, transparent 1px),
      radial-gradient(circle at 20% 12%, rgba(74, 208, 255, .16), transparent 26%),
      radial-gradient(circle at 84% 10%, rgba(93, 145, 255, .20), transparent 28%),
      linear-gradient(135deg, #071126, #123b75 54%, #0b1020);
    background-size: 72px 72px, 72px 72px, auto, auto, auto;
    background-attachment: fixed;
  }

  .shell {
    width: min(100%, 980px);
    max-width: none;
    min-height: calc(100vh - 48px);
    margin: 0 auto;
    border-radius: 22px;
    overflow: visible;
    box-shadow: 0 26px 70px rgba(4, 23, 39, .34);
  }

  .appbar {
    position: sticky;
    top: 0;
    z-index: 160;
    overflow: visible;
    border-bottom: 1px solid #dfe7ed;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(16px);
  }

  .appbar-inner {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 14px;
    padding: 18px 22px 12px;
  }

  .appbar .title h1 {
    font-size: 22px;
  }

  .appbar .search {
    grid-column: 1 / -1;
    align-self: center;
  }

  .filters {
    padding: 0 22px 14px;
  }

  .tabbar {
    position: sticky;
    left: auto;
    bottom: auto;
    top: 92px;
    transform: none;
    width: 100%;
    height: 58px;
    padding: 0 22px;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 10px;
    background: #ffffff;
    border-top: 0;
    border-bottom: 1px solid #dfe7ed;
  }

  .tabbar button {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    justify-content: center;
    align-content: center;
    border-bottom: 3px solid transparent;
    font-size: 12px;
  }

  .tabbar button.active {
    border-bottom-color: #2686b7;
    background: #f2f8fb;
  }

  .content {
    padding: 20px 22px 34px;
  }

  .toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #f7fafc;
    border: 1px solid #dfe7ed;
    border-radius: 12px;
  }

  .trip-timeline {
    gap: 16px;
  }

  .timeline-day {
    background: #ffffff;
    border: 1px solid #dfe7ed;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(28, 48, 65, .08);
  }

  .date-band {
    grid-template-columns: auto 1fr auto auto;
    margin: 0;
    padding: 14px 16px;
    background: #f3f7fa;
    border-bottom: 1px solid #dfe7ed;
  }

  .date-band strong {
    grid-column: auto;
    grid-row: auto;
    font-size: 16px;
  }

  .items,
  .compact-items {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
  }

  .row.item-card,
  .row.item-card.compact {
    grid-template-columns: 58px 38px 1fr;
    padding: 14px;
    border: 1px solid #e2ebf0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(28, 48, 65, .07);
  }

  .row.item-card::before {
    display: none;
  }

  .row.item-card time {
    padding-top: 9px;
    font-size: 13px;
  }

  .row .item-main {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .row-title h3 {
    font-size: 15px;
  }
}

@media (min-width: 900px) {
  .appbar-inner {
    grid-template-columns: 42px minmax(260px, 1fr) 42px minmax(260px, 390px);
  }

  .appbar .search {
    grid-column: auto;
  }

  .toolbar {
    grid-template-columns: repeat(3, max-content) 1fr 220px 220px;
  }

  .items,
  .compact-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1180px) {
  body {
    padding: 28px;
  }

  .shell {
    width: min(100%, 1220px);
    min-height: calc(100vh - 56px);
    border-radius: 24px;
    overflow: visible;
  }

  .content {
    padding: 24px 28px 40px;
  }

  .appbar-inner {
    padding-left: 28px;
    padding-right: 28px;
    grid-template-columns: 44px minmax(320px, 1fr) 44px minmax(360px, 460px);
  }

  .filters,
  .tabbar {
    padding-left: 28px;
    padding-right: 28px;
  }

  .toolbar {
    grid-template-columns: repeat(3, max-content) 1fr 240px 240px;
  }

  .items,
  .compact-items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .items:has(.row.item-card:first-child:nth-last-child(1)),
  .compact-items:has(.row.item-card:first-child:nth-last-child(1)) {
    grid-template-columns: 1fr;
  }
}
