:root {
  --bg: #dbe6f3;
  --page: #f7fbff;
  --hero: #2c5d8d;
  --hero-deep: #214d79;
  --hero-soft: rgba(255, 255, 255, 0.14);
  --table-head: #173f60;
  --line: #c7d7e6;
  --line-soft: #dde8f2;
  --ink: #243447;
  --muted: #66788a;
  --white: #ffffff;
  --red: #cf4b3c;
  --green: #198579;
  --blue: #2d5e8f;
  --gold: #d89a2b;
  --shadow: 0 18px 40px rgba(34, 62, 89, 0.12);
  --shadow-strong: 0 28px 60px rgba(27, 52, 78, 0.18);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #edf3fa 0%, var(--bg) 100%);
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select {
  font: inherit;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-family: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand-title {
  font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
  font-weight: 700;
}

.brand-tagline {
  margin: -4px 0 18px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.primary-btn,
.toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}

.primary-btn,
.toolbar-btn-primary {
  border-color: #1d527f;
  background: #285987;
  color: var(--white);
}

.landing-shell {
  min-height: 100vh;
  padding: 24px;
}

.landing-wrap {
  max-width: 1240px;
  margin: 0 auto;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 420px);
  gap: 24px;
  align-items: stretch;
}

.landing-copy,
.login-card,
.landing-section {
  border-radius: 24px;
  box-shadow: var(--shadow-strong);
}

.landing-copy {
  padding: 36px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), transparent 32%),
    linear-gradient(180deg, #1f4b74 0%, #163650 100%);
  color: var(--white);
}

.landing-copy h1 {
  margin: 0 0 18px;
  font-size: 3.2rem;
  line-height: 1.02;
  letter-spacing: 0.02em;
}

.landing-lead {
  margin: 0;
  max-width: 660px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.04rem;
  line-height: 1.7;
}

.landing-points {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.landing-points span {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.92rem;
  font-weight: 700;
}

.contact-strip {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.contact-item {
  min-width: 220px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.contact-item span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  font-weight: 700;
}

.contact-item strong {
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.96);
}

.login-card {
  padding: 28px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
}

.login-card-head h2 {
  margin: 0;
  font-size: 1.55rem;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.login-field {
  display: grid;
  gap: 8px;
}

.login-field span {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 700;
}

.login-field input {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

.login-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.login-status.is-error {
  color: #aa4a27;
}

.landing-main {
  display: grid;
  gap: 22px;
  margin-top: 22px;
}

.landing-section {
  padding: 28px;
  background: rgba(255, 255, 255, 0.86);
}

.landing-band {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, #eef5fb 100%);
}

.section-head h3 {
  margin: 0;
  font-size: 1.5rem;
}

.feature-grid,
.workflow-grid {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

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

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

.feature-card,
.workflow-step {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
}

.feature-card strong,
.workflow-step strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.02rem;
}

.feature-card p,
.workflow-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.workflow-step span {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border-radius: 999px;
  background: #e6f0fa;
  color: var(--blue);
  font-weight: 800;
}

.page-shell {
  min-height: 100vh;
  padding: 16px;
}

.wrap {
  max-width: 2048px;
  margin: 0 auto;
  position: relative;
}

.app-topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(34, 62, 89, 0.08);
}

.app-topbar strong {
  font-size: 1.1rem;
}

.app-brand {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.app-brand-copy {
  display: grid;
  gap: 2px;
}

.app-brand-copy .eyebrow {
  margin-bottom: 0;
}

.app-topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.session-label {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--hero) 0%, var(--hero-deep) 100%);
  box-shadow: var(--shadow);
  color: var(--white);
}

.hero-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-stat {
  min-width: 118px;
  padding: 16px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-stat span {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-stat strong {
  font-size: 1.1rem;
}

.hero-copy {
  display: grid;
  align-content: center;
  justify-items: end;
  text-align: right;
}

.hero-copy h1 {
  margin: 0 0 8px;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.02em;
}

.hero-copy p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
}

.hero-context {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.98rem;
}

.main {
  margin-top: 14px;
}

.table-intro {
  padding: 2px 2px 12px;
  color: #6a7f96;
  font-size: 0.95rem;
  font-weight: 700;
}

.toolbar {
  padding: 0 0 10px;
}

.toolbar-compact {
  display: grid;
  gap: 8px;
}

.query-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.toolbar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

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

.toolbar-field span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.toolbar-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
}

.toolbar-field select,
.toolbar-field input {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #d8e2ec;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
}

.toolbar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.94rem;
}

.page-meta {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.toolbar-field-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.toolbar-field-inline span {
  font-size: 0.88rem;
}

.toolbar-field-inline select {
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 12px;
}

.file-mode-hint {
  display: inline-block;
  color: #9a4f24;
}

.table-shell,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: var(--page);
  box-shadow: var(--shadow);
}

.table-wrap {
  margin-top: 18px;
}

.table-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  padding: 18px 18px 12px;
}

.table-head h3 {
  margin: 0;
}

.table-scroll {
  overflow: auto;
  max-height: calc(100vh - 272px);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1396px;
  table-layout: fixed;
}

th,
td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

thead th {
  position: sticky;
  z-index: 2;
}

.filter-row th {
  top: 0;
  padding: 5px 6px;
  background: linear-gradient(180deg, #244f79 0%, #1b4266 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.filter-row th.is-active[data-sort-dir="asc"] .filter-cell::after {
  content: "▲";
}

.filter-row th.is-active[data-sort-dir="desc"] .filter-cell::after {
  content: "▼";
}

.filter-cell {
  display: block;
  position: relative;
}

.filter-cell::after {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  color: #7a8ea3;
  font-size: 0.7rem;
  pointer-events: none;
}

.filter-row input {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 6px 24px 6px 11px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.97);
  cursor: text;
}

.filter-row input[data-multi-key] {
  padding-right: 26px;
  background-image: linear-gradient(45deg, transparent 50%, #7a8ea3 50%), linear-gradient(135deg, #7a8ea3 50%, transparent 50%);
  background-position: calc(100% - 14px) 14px, calc(100% - 9px) 14px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.filter-row input.is-active {
  border-color: #90b8df;
  box-shadow: 0 0 0 2px rgba(144, 184, 223, 0.18);
}

tbody tr:nth-child(even) {
  background: #fbfdff;
}

tbody tr:hover {
  background: #f0f7ff;
}

td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.price-now,
.price-prev,
.price {
  color: var(--red);
  font-weight: 800;
}

.daily-price,
.drop-pct {
  color: var(--green);
  font-weight: 800;
}

.deal-title {
  font-weight: 700;
}

.deal-meta,
.snapshot-stack {
  display: grid;
  gap: 4px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e7f1fb;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
}

.mini-badge-muted {
  background: #eef2f6;
  color: #6b7e91;
}

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

.multi-panel {
  position: absolute;
  z-index: 10;
  max-height: 420px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 40px rgba(27, 52, 78, 0.18);
  overflow: hidden;
}

.multi-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  background: #f1f7fc;
  color: #30506d;
  font-size: 0.84rem;
}

.multi-panel-actions {
  display: flex;
  gap: 8px;
  padding: 8px 12px 8px;
}

.multi-panel-actions button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #30506d;
  cursor: pointer;
}

.multi-panel-list {
  display: grid;
  gap: 1px;
  max-height: 320px;
  overflow: auto;
  padding: 0 0 12px;
}

.multi-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  color: #29435b;
  font-size: 0.92rem;
  white-space: nowrap;
}

.multi-option:hover {
  background: #f6faff;
}

.multi-option-all {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: #fbfdff;
  font-weight: 700;
}

.legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 10px 0;
  color: #53708f;
  font-size: 0.92rem;
  font-weight: 700;
}

.col-region {
  width: 108px;
}

.col-line {
  width: 132px;
}

.col-ship {
  width: 130px;
}

.col-star {
  width: 66px;
}

.col-sail {
  width: 118px;
}

.col-nights {
  width: 56px;
}

.col-deal {
  width: 84px;
}

.col-cabin {
  width: 58px;
}

.col-snapshot {
  width: 74px;
}

.col-price {
  width: 86px;
}

.col-daily {
  width: 86px;
}

.col-prev {
  width: 86px;
}

.col-drop {
  width: 80px;
}

.col-discount {
  width: 80px;
}

.detail-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px;
}

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

.back-link {
  font-weight: 700;
}

.detail-meta {
  color: var(--muted);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 320px;
  gap: 18px;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, #214d79 0%, #173654 100%);
  color: var(--white);
  box-shadow: var(--shadow);
}

.detail-hero h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
}

.detail-sub {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.84);
}

.detail-actions {
  margin-top: 18px;
}

.shortlist-btn {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  cursor: pointer;
}

.shortlist-btn-active {
  background: rgba(216, 154, 43, 0.18);
  border-color: rgba(216, 154, 43, 0.45);
}

.route-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.route-chip {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
}

.route-chip-muted {
  background: rgba(255, 255, 255, 0.08);
}

.detail-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.detail-kv {
  display: grid;
  gap: 4px;
}

.detail-kv span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.84rem;
}

.detail-kv strong {
  font-size: 0.98rem;
}

.history-blocks {
  display: grid;
  gap: 16px;
  padding: 0 18px 18px;
}

.history-card {
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--white);
  overflow: hidden;
}

.history-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #f5f9fd;
  border-bottom: 1px solid var(--line-soft);
}

@media (max-width: 1100px) {
  .query-grid,
  .landing-hero,
  .feature-grid,
  .workflow-grid,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
  }

  .hero-copy {
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 720px) {
  .landing-shell,
  .page-shell,
  .detail-shell {
    padding: 10px;
  }

  .landing-copy,
  .login-card,
  .landing-section,
  .hero,
  .detail-hero {
    padding: 18px;
  }

  .landing-copy h1,
  .hero-copy h1,
  .detail-hero h1 {
    font-size: 1.8rem;
  }

  .app-topbar,
  .detail-header {
    align-items: start;
    flex-direction: column;
  }

  .app-brand {
    gap: 4px;
  }

  .table-scroll {
    max-height: none;
  }
}
