:root {
  color-scheme: light;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: #f4f5f7;
  color: #1d1f23;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
}

.app {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
}

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

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status {
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef1ff;
  color: #2a3b9a;
  font-size: 0.8rem;
  font-weight: 600;
}

.card {
  background: #fff;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(18, 21, 26, 0.08);
}

.card--center {
  max-width: 420px;
  margin: 40px auto;
}

.hidden {
  display: none;
}

.form {
  display: grid;
  gap: 12px;
}

.form--grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: end;
}

.field {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
}

.field span {
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d6dae0;
  font-size: 0.95rem;
  background: #fff;
}

.field--full {
  grid-column: 1 / -1;
}

.button {
  border: none;
  background: #3454f5;
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
}

.button--ghost {
  background: #f0f2ff;
  color: #2a3b9a;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tab {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #e6e8ef;
  cursor: pointer;
  font-weight: 600;
}

.tab.is-active {
  background: #3454f5;
  color: #fff;
}

.panel {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 6px 20px rgba(18, 21, 26, 0.08);
  margin-bottom: 16px;
}

.panel__header {
  margin-bottom: 12px;
}

.list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.item {
  border: 1px solid #e1e4ea;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

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

.badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f0f2ff;
  font-size: 0.8rem;
  font-weight: 600;
}

.muted {
  color: #6a7280;
  font-size: 0.9rem;
}

.balance {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-top: 12px;
}

.summary {
  background: #f8f9fd;
  border-radius: 12px;
  padding: 12px;
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.trip-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: flex-start;
}

.trip-columns {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pill--selectable {
  cursor: pointer;
  gap: 8px;
}

.pill--selectable input {
  accent-color: #3454f5;
}

.packing-checklist {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #e1e4ea;
  border-radius: 12px;
  background: #f8f9fd;
  display: grid;
  gap: 8px;
}

.packing-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard {
  display: grid;
  gap: 12px;
}

.dashboard__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.dashboard__card {
  background: #f8f9fd;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 6px;
}

.dashboard__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px;
}

.dashboard__list li {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef1ff;
  color: #2a3b9a;
  font-weight: 600;
}

.expense-rows {
  display: grid;
  gap: 12px;
}

.expense-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  padding: 12px;
  border: 1px solid #e1e4ea;
  border-radius: 12px;
}

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

.expense-row__remove {
  align-self: end;
}

.field--checkbox {
  align-items: center;
  grid-template-columns: 1fr auto;
}

.badge--muted {
  background: #e6e8ef;
  color: #2d3340;
}

.map-embed {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e1e4ea;
}

.map-embed iframe {
  width: 100%;
  height: 220px;
  border: 0;
}

.tutorial {
  margin-top: 20px;
  background: #f8f9fd;
  border-radius: 12px;
  padding: 16px;
}

.tutorial__steps {
  margin: 12px 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

@media (max-width: 900px) {
  .trip-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .app {
    padding: 12px;
  }

  .app__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .tab {
    flex: 1 1 120px;
    text-align: center;
  }
}
