/* Isolated itinerary-list polish. Every selector is scoped to .page-lines. */
.page-lines {
  --lines-ink: #20352f;
  --lines-muted: #718079;
  --lines-green: #17483c;
  --lines-gold: #b4935b;
  --lines-border: rgba(32, 53, 47, 0.12);
  --lines-surface: #fffdf9;
}

.page-lines .page-head {
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 22px;
  padding-bottom: 20px;
}

.page-lines .page-title {
  color: var(--lines-ink);
  letter-spacing: 0.015em;
}

.page-lines .page-sub {
  color: var(--lines-muted);
}

.page-lines .page-head-right .btn-primary {
  min-height: 42px;
  padding: 0 20px;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(23, 72, 60, 0.16);
}

.page-lines .lines-block {
  overflow: hidden;
  border: 1px solid var(--lines-border);
  border-radius: 18px;
  background: var(--lines-surface);
  box-shadow: 0 18px 48px rgba(40, 48, 43, 0.07);
}

.page-lines .block-head {
  gap: 18px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--lines-border);
  background: linear-gradient(135deg, rgba(250, 247, 240, 0.94), rgba(255, 253, 249, 0.98));
}

.page-lines .block-title {
  gap: 10px;
  color: var(--lines-ink);
  font-size: 17px;
  font-weight: 700;
}

.page-lines .block-count {
  color: var(--lines-gold);
  font-weight: 600;
}

.page-lines .block-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.page-lines .line-price-filter-trigger,
.page-lines .meta-pill {
  min-height: 38px;
  border: 1px solid var(--lines-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
}

.page-lines .line-price-filter-trigger:hover,
.page-lines .line-price-filter-trigger.active {
  border-color: rgba(180, 147, 91, 0.55);
  background: #fbf6ea;
  color: #765c2f;
}

.page-lines .line-agency-filter {
  width: 190px;
}

.page-lines .lines-table {
  min-width: 1280px;
  grid-template-columns:
    54px 76px minmax(230px, 1.6fr) minmax(130px, 0.9fr)
    minmax(140px, 1fr) 66px 70px 104px 82px 96px 188px;
  background: var(--lines-surface);
}

.page-lines .line-row.line-header .line-col {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 48px;
  padding: 0 12px;
  border-top: 0;
  border-bottom: 1px solid var(--lines-border);
  background: #f5f3ed;
  color: #6c7771;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.page-lines .line-row:not(.line-header) .line-col {
  min-height: 94px;
  padding: 16px 12px;
  border-top: 0;
  border-bottom: 1px solid rgba(32, 53, 47, 0.08);
  background: var(--lines-surface);
  transition: background-color 160ms ease;
}

.page-lines .line-row:not(.line-header):hover .line-col {
  background: #faf8f2;
}

.page-lines .line-row.is-hidden-row .line-col {
  background: #f7f6f2;
  opacity: 0.72;
}

.page-lines .line-banner-media,
.page-lines .line-banner-empty {
  width: 58px;
  height: 58px;
  overflow: hidden;
  border: 1px solid rgba(32, 53, 47, 0.1);
  border-radius: 12px;
  background: #eeeae1;
  box-shadow: 0 6px 15px rgba(42, 49, 45, 0.1);
}

.page-lines .line-banner-img,
.page-lines .line-banner-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-lines .line-title-main {
  color: var(--lines-ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.page-lines .line-title-sub {
  margin-top: 5px;
  color: var(--lines-muted);
  font-size: 12px;
  line-height: 1.55;
}

.page-lines .line-tag {
  margin: 2px 4px 2px 0;
  padding: 4px 8px;
  border: 1px solid rgba(23, 72, 60, 0.12);
  border-radius: 999px;
  background: #edf3ef;
  color: #315b4f;
  font-size: 11px;
}

.page-lines .line-meta-price {
  color: #8b6b35;
  font-weight: 700;
}

.page-lines .col-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.page-lines .row-action {
  min-width: 50px;
  min-height: 34px;
  margin: 0;
  border-radius: 9px;
  font-weight: 600;
}

.page-lines .row-action:hover {
  border-color: rgba(23, 72, 60, 0.35);
  background: #edf3ef;
  color: var(--lines-green);
}

.page-lines .row-action-danger:hover {
  border-color: rgba(153, 71, 62, 0.3);
  background: #fbefed;
  color: #99473e;
}

.page-lines .lines-empty {
  padding: 64px 24px;
}

@media (max-width: 1100px) {
  .page-lines .page-head {
    align-items: flex-start;
  }

  .page-lines .block-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-lines .block-meta {
    justify-content: flex-start;
    width: 100%;
  }
}

@media (max-width: 820px) {
  .page-lines .page-head {
    flex-direction: column;
  }

  .page-lines .page-head-right,
  .page-lines .page-head-right .btn-primary {
    width: 100%;
  }

  .page-lines .line-agency-filter {
    width: min(100%, 260px);
  }

  .page-lines .lines-block {
    overflow-x: auto;
    border-radius: 14px;
  }
}

/* Structural correction for the real route-list markup. */
.page-lines .lines-block {
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

.page-lines .line-tag {
  display: inline-flex !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 4px 8px !important;
  border: 1px solid rgba(23, 72, 60, 0.14) !important;
  border-radius: 7px !important;
  background: #edf3ef !important;
  color: #315b4f !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

@media (min-width: 821px) {
  .page-lines .block-head,
  .page-lines .lines-table {
    min-width: 1320px !important;
  }

  .page-lines .lines-table {
    display: grid !important;
    grid-template-columns: 52px 70px minmax(250px, 1.65fr) 145px 150px 62px 66px 108px 78px 94px 174px !important;
    gap: 0 !important;
    padding: 0 !important;
  }

  .page-lines .line-row,
  .page-lines .line-row.line-header,
  .page-lines .line-row:not(.line-header) {
    display: contents !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .page-lines .line-col {
    grid-area: auto !important;
    grid-column: auto !important;
    grid-row: auto !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .page-lines .line-col::before {
    display: none !important;
    content: none !important;
  }

  .page-lines .line-row.line-header .line-col {
    display: flex !important;
    min-height: 46px !important;
    align-items: center !important;
    padding: 0 10px !important;
    text-indent: 0 !important;
    white-space: nowrap !important;
  }

  .page-lines .line-row:not(.line-header) .line-col {
    display: flex !important;
    min-height: 82px !important;
    align-items: center !important;
    padding: 12px 10px !important;
    overflow: hidden !important;
  }

  .page-lines .col-id,
  .page-lines .col-banner,
  .page-lines .col-days,
  .page-lines .col-people,
  .page-lines .col-date,
  .page-lines .col-status,
  .page-lines .col-featured {
    justify-content: center !important;
    white-space: nowrap !important;
  }

  .page-lines .col-title {
    align-items: flex-start !important;
    justify-content: center !important;
    flex-direction: column !important;
  }

  .page-lines .line-title-main,
  .page-lines .line-title-sub {
    display: block !important;
    width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .page-lines .col-agency {
    overflow: visible !important;
  }

  .page-lines .line-agency-select {
    width: 100% !important;
    min-width: 0 !important;
  }

  .page-lines .col-tags {
    display: flex !important;
    grid-template-columns: none !important;
    align-content: center !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
    padding-top: 12px !important;
    border-top: 0 !important;
    white-space: normal !important;
  }

  .page-lines .line-banner-media,
  .page-lines .line-banner-empty {
    width: 50px !important;
    height: 50px !important;
    border-radius: 10px !important;
  }

  .page-lines .col-actions {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    padding-top: 12px !important;
    border-top: 0 !important;
    overflow: visible !important;
    white-space: nowrap !important;
  }

  .page-lines .row-action {
    width: auto !important;
    min-width: 46px !important;
    min-height: 30px !important;
    height: 30px !important;
    flex: 0 0 auto !important;
    padding: 0 10px !important;
    font-size: 11px !important;
    letter-spacing: 0 !important;
  }
}

@media (max-width: 820px) {
  .page-lines .block-head,
  .page-lines .lines-table {
    min-width: 0 !important;
  }

  .page-lines .lines-table {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    padding: 12px !important;
  }

  .page-lines .col-tags .line-tag {
    flex: 0 0 auto !important;
  }
}
