.table-checklist .checklist-category {
  display: block;
  width: auto;
  max-width: 185px;
  margin-inline: auto;
  padding: 7px 32px 7px 14px;
  border: 0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.table-checklist .checklist-documents { background-color: #d8deea; color: #40536f; }
.table-checklist .checklist-certificates { background-color: #d4e4f0; color: #315c78; }
.table-checklist .checklist-tech { background-color: #ddd6ed; color: #574978; }
.table-checklist .checklist-clothes { background-color: #f2d8e5; color: #7b3f60; }
.table-checklist .checklist-booking { background-color: #cfe5d7; color: #315d43; }
.table-checklist .checklist-call { background-color: #f7d7b2; color: #784815; }
.table-checklist .checklist-sending { background-color: #dceabf; color: #46622d; }

/* Unified table system */
.data-table th {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.data-table td,
.data-table input,
.data-table select,
.data-table textarea {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
}

.data-table td { vertical-align: middle; }

/* Compact checklist add form: category follows its content, task gets the rest. */
.checklist-dialog .row-dialog-fields {
  grid-template-columns: 190px minmax(0, 1fr);
}

.checklist-dialog .row-dialog-fields label:has([name="category"]) { grid-column: 1; }
.checklist-dialog .row-dialog-fields label:has([name="item"]) { grid-column: 2; }

/* Transport type uses the same compact highlighted-pill language as categories. */
.table-transport .transport-type-pill {
  display: block;
  width: auto;
  max-width: 145px;
  margin-inline: auto;
  padding: 7px 30px 7px 13px;
  border: 0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.table-transport .transport-plane { background: #cfe4f4; color: #285b7d; }
.table-transport .transport-train { background: #dceabf; color: #46622d; }
.table-transport .transport-bus { background: #f7d7b2; color: #784815; }
.table-transport .transport-car { background: #d8deea; color: #40536f; }
.table-transport .transport-other { background: #e7e9e5; color: #59615b; }

.unified-datetime {
  position: relative;
  display: block;
  min-height: 34px;
  padding: 8px 9px;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 650;
  text-align: center;
  white-space: nowrap;
}

.unified-datetime input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.unified-datetime:focus-within {
  outline: 2px solid var(--green2);
  background: #fff;
}

/* Budget editing and sharing */
.table-expenses th:nth-child(1) { width: 165px; }
.table-expenses th:nth-child(2) { width: auto; }
.table-expenses th:nth-child(3) { width: 190px; }
.table-expenses th:nth-child(4) { width: 126px; }
.table-expenses th,
.table-expenses td,
.table-expenses .linked-expense td { padding: 5px 6px; }
.table-expenses .money-field { grid-template-columns: minmax(0, 1fr) 66px; gap: 4px; }
.table-expenses .money-field input,
.table-expenses .money-field select { width: 100%; min-width: 0; margin: 0; padding: 7px 5px; text-align: center; }
.table-expenses .money-field select { color: var(--green); font-size: 12px; font-weight: 750; }
.table-transport th:nth-child(5) { width: 190px; }
.table-transport .money-field { grid-template-columns: minmax(0, 1fr) 66px; gap: 4px; }
.table-transport .money-field input,
.table-transport .money-field select { width: 100%; min-width: 0; margin: 0; padding: 7px 5px; text-align: center; }
.table-transport .money-field select { color: var(--green); font-size: 12px; font-weight: 750; }
.table-expenses .row-controls { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.split-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 112px; height: 38px; padding: 0 10px; border: 1px solid #d9e1da; border-radius: 13px; background: #f0f5f1; color: var(--green2); font-size: 11px; font-weight: 800; transition: background .15s,color .15s,transform .15s; }
.split-button:hover { transform: translateY(-1px); background: #e6f0e8; }
.split-mark { position: relative; width: 25px; height: 17px; flex: 0 0 25px; }
.split-mark i { position: absolute; top: 1px; width: 15px; height: 15px; border: 2px solid currentColor; border-radius: 50% 42% 50% 42%; transform: rotate(18deg); }
.split-mark i:first-child { left: 0; }
.split-mark i:last-child { right: 0; transform: rotate(-18deg); }
.split-button.active { border-color: var(--green); background: var(--green); color: #fff; }
.split-button.active .split-mark i:first-child { background: rgba(255,255,255,.2); }
.split-button:disabled { cursor: default; opacity: .45; }

.share-all {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.share-all.compact { align-items: center; }
.share-all.compact > span { margin-right: auto; color: var(--muted); font-size: 13px; font-weight: 750; }
.split-all-button { padding: 10px 16px; border-radius: 12px; background: #eef0ed; color: var(--ink); font-weight: 750; }
.split-all-button.active { background: var(--lime); color: var(--green); }
.budget-total-card { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 10px 24px; }
.budget-total-card > span { align-self: center; }
.budget-total-card .total-currency { align-self: center; }
.budget-people { grid-column: 1 / -1; display: grid; gap: 2px; padding-top: 10px; border-top: 1px solid rgba(40,92,69,.12); }
.budget-person { display: grid; grid-template-columns: minmax(160px,1fr) auto; align-items: center; gap: 18px; min-height: 30px; font-size: 13px; font-weight: 650; }
.budget-person.leader { font-size: 14px; font-weight: 800; }
.budget-person input { width: min(280px,100%); padding: 4px 7px; border-color: transparent; background: transparent; font-size: inherit; font-weight: inherit; }
.budget-person input:hover,
.budget-person input:focus { border-color: rgba(40,92,69,.22); background: rgba(255,255,255,.55); box-shadow: none; }
.budget-person strong { justify-self: end; color: var(--green); font-size: 12px; white-space: nowrap; }
.budget-person.leader strong { font-size: 13px; }

.share-all label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 750; }
.share-all select { min-width: 150px; padding: 9px 34px 9px 11px; }
.budget-shares { margin-top: 14px; padding: 16px; border-radius: 16px; background: #eef3e7; }
.share-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-weight: 800; }
.share-head small { color: var(--muted); }
.share-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 9px; }
.share-person { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border-radius: 11px; background: #fff; }
.share-person span { color: var(--muted); font-size: 12px; }
.share-person strong { color: var(--green); }
.share-loading { color: var(--muted); font-size: 13px; }

@media (max-width: 620px) {
  .checklist-dialog .row-dialog-fields { grid-template-columns: 1fr; }
  .checklist-dialog .row-dialog-fields label:has([name="category"]),
  .checklist-dialog .row-dialog-fields label:has([name="item"]) { grid-column: 1; }
  .share-all { align-items: stretch; flex-direction: column; }
}

/* Archived trips are intentionally subdued while remaining interactive. */
.trip-section[data-group="archive"] .trip-section-head h2,
.trip-section[data-group="archive"] .trip-count { color: #8b938e; }
.trip-section[data-group="archive"] .trip-count { background: #e4e6e2; }
.trip-section[data-group="archive"] .trip-card { background: #f0f1ee; border-color: #d8dcd7; box-shadow: none; }
.trip-section[data-group="archive"] .trip-card-main { opacity: .68; }
.trip-section[data-group="archive"] .trip-card-main .date { color: #7e8881; }
.trip-section[data-group="archive"] .trip-menu-button { background: #7f8983; }
