.data-table th {
  text-align: center;
}

.table-days td:nth-child(4) input,
.table-hotels td:nth-child(3) input {
  display: block;
  width: calc(100% - 12px);
  margin-inline: auto;
  text-align: center;
}

.cell-weekday {
  min-width: 0;
}

.weekday-value {
  display: block;
  padding: 9px 10px;
  color: var(--muted);
  font-weight: 650;
}

.day-number {
  display: block;
  padding: 7px 8px;
  text-align: center;
  color: var(--green);
  font-weight: 750;
}

.table-days {
  min-width: 980px;
  table-layout: fixed;
}

.table-days th,
.table-days td {
  padding: 5px 6px;
  vertical-align: middle;
}

.table-days input {
  padding: 7px 8px;
  font-size: 14px;
}

.table-plan {
  width: 100%;
  min-height: 34px;
  field-sizing: content;
  padding: 7px 8px;
  border-color: transparent;
  background: transparent;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow: hidden;
  resize: none;
}

.table-plan:focus {
  background: #fff;
  border-color: var(--green2);
}

.table-days th:nth-child(1) { width: 32px; }
.table-days th:nth-child(2) { width: 104px; text-align: center; }
.table-days th:nth-child(3) { width: 70px; text-align: center; }
.table-days th:nth-child(4) { width: 190px; }
.table-days th:nth-child(5) { width: auto; }
.table-days th:nth-child(6) { width: 126px; text-align: center; }
.table-days th:nth-child(7) { width: 30px; }

.table-hotels {
  min-width: 940px;
  table-layout: fixed;
}

.table-hotels th,
.table-hotels td {
  padding: 5px 6px;
}

.table-hotels th:nth-child(1),
.table-hotels th:nth-child(2) { width: 112px; }
.table-hotels th:nth-child(3) { width: 190px; }
.table-hotels th:nth-child(4) { width: auto; }
.table-hotels th:nth-child(5) { width: 190px; }
.table-hotels th:nth-child(6) { width: 30px; }

.table-hotels input {
  padding: 7px 8px;
  font-size: 14px;
}

.table-hotels td:nth-child(3),
.table-hotels td:nth-child(5),
.table-hotels td:nth-child(3) input,
.table-hotels td:nth-child(5) input {
  text-align: center;
}

.money-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 66px;
  align-items: center;
  gap: 4px;
}

.table-hotels .money-field input,
.table-hotels .money-field select {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 7px 5px;
  text-align: center;
}

.table-hotels .money-field select {
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
}

.table-days td:nth-child(4),
.table-days td:nth-child(4) input {
  text-align: center;
}

.table-days tbody td:nth-child(4) > input[data-key="city"] {
  field-sizing: content;
  width: auto;
  min-width: 84px;
  max-width: 100%;
  margin-inline: auto;
  padding-inline: 12px;
  text-align: center;
  text-overflow: ellipsis;
}

.table-days tbody td:nth-child(4) > input[data-key="city"]:focus {
  text-align: center;
}

.hotel-date {
  gap: 3px;
}

.cell-noteButton {
  text-align: center;
}

.note-button {
  min-width: 31px;
  height: 27px;
  padding: 0 7px 4px;
  border-radius: 9px;
  background: #eef0ec;
  color: #9aa39c;
  font-weight: 800;
  letter-spacing: 1px;
}

.note-button.has-note {
  background: var(--lime);
  color: var(--green);
}

.note-dialog-field {
  display: grid;
  gap: 10px;
  margin: 24px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.note-dialog-field textarea {
  width: 100%;
  min-height: 180px;
  padding: 14px 16px;
  color: var(--ink);
  line-height: 1.5;
  resize: vertical;
}

.drag-cell {
  width: 32px;
  padding-inline: 0 !important;
  text-align: center;
}

.row-controls {
  white-space: nowrap;
  text-align: center;
}

.drag-handle {
  padding: 6px 4px;
  background: transparent;
  color: #89938c;
  font-size: 19px;
  line-height: 1;
  cursor: grab;
  touch-action: none;
}

.drag-handle:active {
  cursor: grabbing;
}

.table-days tbody tr {
  transition: opacity 0.15s ease, background 0.15s ease;
}

.table-days tbody tr.is-dragging {
  opacity: 0.42;
}

.table-days tbody tr.drag-over {
  background: rgba(54, 119, 91, 0.08);
  box-shadow: inset 0 2px 0 var(--green2);
}

.date-with-weekday {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.date-short {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  min-height: 32px;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.date-short input[type="date"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.weekday-short {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-transform: lowercase;
}

.tab-content {
  padding: 22px;
}

.tab-content:has(.table-days) {
  min-height: 250px;
}

.cell-hotel,
.cell-transportIndicator,
.cell-bookings {
  text-align: center;
}

.booking-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.table-days .row-controls .icon-btn,
.table-hotels .row-controls .icon-btn {
  opacity: 0;
  transform: translateX(3px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.table-days tbody tr:hover .row-controls .icon-btn,
.table-days tbody tr:focus-within .row-controls .icon-btn,
.table-hotels tbody tr:hover .row-controls .icon-btn,
.table-hotels tbody tr:focus-within .row-controls .icon-btn {
  opacity: 1;
  transform: none;
}

.hotel-indicator {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: #eef0ec;
  color: #a1a8a2;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.hotel-indicator:hover {
  transform: translateY(-1px);
}

.hotel-indicator.has-hotel {
  background: var(--lime);
  color: var(--green);
}

.hotel-indicator svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.list-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 130px;
  gap: 8px;
}

.section-title {
  align-items: center;
  min-height: 42px;
  margin-bottom: 20px;
}

.section-title h2 {
  line-height: 1.1;
}

.list-actions .refresh-list {
  color: var(--green);
}

.list-actions button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.row-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 28px 90px rgba(21, 39, 29, 0.24);
}

.row-dialog::backdrop {
  background: rgba(19, 31, 24, 0.42);
  backdrop-filter: blur(3px);
}

.row-dialog-form {
  padding: 26px;
}

.row-dialog-head,
.row-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

@media (hover: none) {
  .table-days .row-controls .icon-btn,
  .table-hotels .row-controls .icon-btn {
    opacity: 1;
    transform: none;
  }
}

.summary-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

.budget-tools {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin: 0 0 22px;
  padding: 14px;
  border-radius: 14px;
  background: #f3f5ef;
}

.budget-tools label {
  display: grid;
  gap: 6px;
  width: 150px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.budget-tools select {
  padding: 10px 12px;
}

.rate-card {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  padding: 10px 14px;
  border-left: 1px solid var(--line);
}

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

.rate-card strong {
  color: var(--green);
  font-size: 16px;
}

.rate-card small {
  margin-left: auto;
}

.row-dialog-head h2 {
  margin: 4px 0 0;
  font-family: Georgia, serif;
  font-size: 30px;
}

.dialog-eyebrow {
  color: var(--green2);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dialog-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f1f2ee;
  font-size: 22px;
}

.row-dialog-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 26px 0;
}

.row-dialog-fields label:not(.dialog-checkbox) {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.row-dialog-fields label:has([name="plan"]) {
  grid-column: 1 / -1;
}

.row-dialog-fields [name="plan"] {
  width: 100%;
  min-height: 120px;
  padding: 14px 16px;
  line-height: 1.5;
  resize: vertical;
}

.dialog-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  font-weight: 700;
}

.dialog-checkbox input {
  width: 19px;
  height: 19px;
}

.row-dialog-actions {
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

@media (max-width: 620px) {
  .summary-fields {
    grid-template-columns: 1fr;
  }

  .budget-tools,
  .rate-card {
    align-items: stretch;
    flex-direction: column;
  }

  .budget-tools label {
    width: 100%;
  }

  .rate-card {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .rate-card small {
    margin-left: 0;
  }

  .section-title {
    align-items: flex-start;
    gap: 14px;
    flex-direction: column;
  }

  .list-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .row-dialog-form {
    padding: 20px;
  }

  .row-dialog-fields {
    grid-template-columns: 1fr;
  }
}
