:root {
  --navy: #071b31;
  --navy-2: #0b2945;
  --ink: #152236;
  --muted: #778294;
  --line: #e0e6ec;
  --line-soft: #edf1f4;
  --canvas: #f5f7f9;
  --surface: #ffffff;
  --teal: #10a78e;
  --teal-soft: #e6f8f4;
  --blue: #167de2;
  --orange: #f59a13;
  --red: #eb665b;
  --shadow: 0 10px 30px rgba(26, 52, 77, .055);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--canvas); }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 72% -15%, rgba(16, 167, 142, .055), transparent 34rem),
    var(--canvas);
  color: var(--ink);
  font-family: "MiSans", "HarmonyOS Sans SC", "Microsoft YaHei UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: 236px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #d7e5ef;
  background:
    linear-gradient(155deg, rgba(16, 167, 142, .08), transparent 28%),
    linear-gradient(180deg, var(--navy), #091d33 62%, #0a2039);
  box-shadow: 12px 0 40px rgba(6, 27, 48, .08);
}
.sidebar::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  left: -100px;
  top: 36%;
  border: 1px solid rgba(36, 196, 169, .08);
  border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(36, 196, 169, .025), 0 0 0 78px rgba(36, 196, 169, .018);
  pointer-events: none;
}
.side-brand {
  height: 88px;
  padding: 25px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.side-brand span { color: #fff; font-family: "STZhongsong", "SimSun", serif; font-size: 25px; font-weight: 800; letter-spacing: .05em; }
.side-brand small { color: #55d6c0; font: 8px/1.5 "Bahnschrift", sans-serif; letter-spacing: .26em; margin-top: 2px; }
.side-nav { position: relative; z-index: 1; padding: 14px 0; }
.side-nav a {
  height: 64px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-left: 5px solid transparent;
  color: #aebfcd;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: .2s ease;
}
.side-nav a:hover { color: white; background: rgba(27, 179, 154, .08); }
.side-nav a.active { color: white; border-left-color: #17c8a8; background: linear-gradient(90deg, rgba(16, 167, 142, .34), rgba(16, 167, 142, .13)); }
.nav-icon { width: 20px; color: #d8e7ef; font: 23px/1 Georgia, serif; text-align: center; }
.side-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 26px;
  display: flex;
  align-items: center;
  gap: 13px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #19c6a7, #0b8e7e); box-shadow: 0 6px 18px rgba(16,167,142,.28); }
.side-footer strong, .side-footer small { display: block; }
.side-footer strong { font-size: 14px; }
.side-footer small { color: #7f9aac; font-size: 10px; margin-top: 3px; }

.app-shell { min-height: 100vh; margin-left: 236px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 72px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .91);
  backdrop-filter: blur(18px);
}
.mobile-brand { display: none; }
.title-line { display: flex; align-items: baseline; gap: 13px; }
.title-line h1 { margin: 0; font-family: "STZhongsong", "SimSun", serif; font-size: 24px; font-weight: 800; }
.title-line p { margin: 0; color: var(--muted); font-size: 13px; }
.top-actions { display: flex; align-items: center; gap: 24px; }
.live-status { display: grid; grid-template-columns: 12px auto auto; align-items: center; column-gap: 8px; font-size: 12px; }
.live-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 5px rgba(16,167,142,.08); }
.live-status strong { font-size: 13px; }
.live-status span { padding-left: 9px; color: var(--muted); border-left: 1px solid var(--line); }
.primary-button, .outline-button {
  min-height: 38px;
  border-radius: 5px;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.primary-button { padding: 0 18px; border: 0; color: white; background: linear-gradient(135deg, #16b69b, #07957f); box-shadow: 0 7px 18px rgba(16,167,142,.2); }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 9px 24px rgba(16,167,142,.28); }
.primary-button.loading { opacity: .65; pointer-events: none; }

main { width: min(1440px, 100%); margin: 0 auto; padding: 28px 28px 0; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) 355px; gap: 24px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.stat-card, .trend-card, .date-tabs, .price-board {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow);
}
.stat-card {
  min-height: 124px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  animation: lift-in .45s both;
}
.stat-card:nth-child(2) { animation-delay: 60ms; }
.stat-card:nth-child(3) { animation-delay: 120ms; }
@keyframes lift-in { from { opacity: 0; transform: translateY(10px); } }
.stat-icon { width: 48px; height: 48px; display: grid; place-items: center; font: 34px/1 Georgia, serif; }
.hotel-icon { color: var(--teal); }
.room-icon { color: var(--blue); }
.price-icon { color: var(--orange); font-size: 44px; transform: rotate(-10deg); }
.stat-card p { margin: 0 0 9px; color: var(--muted); font-size: 13px; }
.stat-card strong { font: 700 28px/1 "DIN Alternate", "Bahnschrift", sans-serif; }
.stat-card small { margin-left: 7px; color: var(--ink); font-size: 12px; }
.stat-card .currency { margin-right: 1px; font-size: 21px; }

.trend-card { min-height: 214px; padding: 18px 21px 14px; grid-row: span 2; }
.card-title { display: flex; justify-content: space-between; gap: 12px; }
.card-title h2 { margin: 0 0 14px; font-size: 17px; }
.card-title p { margin: 0; color: var(--muted); font-size: 12px; }
.card-title > strong { align-self: flex-end; color: var(--muted); font-size: 12px; font-weight: 500; }
.card-title b { color: var(--teal); font-size: 18px; }
#trendChart { width: 100%; height: 102px; margin-top: 4px; overflow: visible; }
.trend-line { fill: none; stroke: var(--teal); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.trend-area { fill: url(#chartFill); }
#trendDots circle { fill: var(--teal); stroke: white; stroke-width: 2; }
.trend-dates { display: flex; justify-content: space-between; padding: 0 8px; color: var(--muted); font: 10px/1 "Bahnschrift", sans-serif; }

.date-tabs { min-height: 74px; margin-top: -74px; margin-right: 379px; display: grid; grid-template-columns: repeat(7, minmax(92px, 1fr)); overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.date-tabs button { position: relative; min-height: 74px; border: 0; border-right: 1px solid var(--line); color: var(--ink); background: transparent; }
.date-tabs button:last-child { border-right: 0; }
.date-tabs button::after { content: ""; position: absolute; inset: auto 16% 0; height: 3px; border-radius: 3px 3px 0 0; background: transparent; }
.date-tabs button:hover { background: #f9fbfb; }
.date-tabs button.active { color: var(--teal); background: linear-gradient(180deg, rgba(16,167,142,.035), rgba(16,167,142,.08)); }
.date-tabs button.active::after { background: var(--teal); }
.date-tabs strong, .date-tabs span, .date-tabs small { display: block; }
.date-tabs strong { font-size: 14px; }
.date-tabs span { position: absolute; top: 15px; right: 10px; color: var(--muted); font-size: 10px; }
.date-tabs small { margin-top: 7px; color: var(--muted); font: 11px/1 "Bahnschrift", sans-serif; }
.date-tabs button.active small, .date-tabs button.active span { color: var(--teal); }

.toolbar { margin: 20px 0; display: grid; grid-template-columns: minmax(250px, 1fr) 180px 180px auto; gap: 16px; }
.search-control { position: relative; }
.search-control span { position: absolute; left: 17px; top: 50%; transform: translateY(-52%); color: #8b98a7; font: 22px/1 Georgia, serif; }
.search-control input, .toolbar select {
  width: 100%;
  height: 43px;
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: none;
  color: var(--ink);
  background: var(--surface);
  transition: border .18s ease, box-shadow .18s ease;
}
.search-control input { padding: 0 16px 0 46px; }
.toolbar select { padding: 0 38px 0 15px; }
.search-control input:focus, .toolbar select:focus { border-color: rgba(16,167,142,.65); box-shadow: 0 0 0 3px rgba(16,167,142,.08); }
.outline-button { min-width: 104px; padding: 0 17px; border: 1px solid var(--line); color: #46566a; background: var(--surface); }
.outline-button:hover { border-color: #b9c5cf; background: #f9fbfc; }
.outline-button span { margin-right: 5px; font-size: 18px; }

.price-board { overflow: hidden; }
.board-head { min-height: 57px; padding: 0 24px; display: grid; grid-template-columns: 210px minmax(160px, 1fr) minmax(210px, 1.35fr) 92px 92px 92px 112px; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.hotel-group { display: grid; grid-template-columns: 210px minmax(0, 1fr); border-bottom: 1px solid var(--line); animation: lift-in .38s both; animation-delay: var(--delay); }
.hotel-group:last-child { border-bottom: 0; }
.hotel-summary { position: relative; padding: 24px 22px 24px 48px; border: 0; border-right: 1px solid var(--line-soft); text-align: left; color: var(--ink); background: #fff; }
.hotel-summary:hover { background: #fbfdfd; }
.collapse-arrow { position: absolute; left: 24px; top: 27px; font: 22px/1 Georgia, serif; transform: rotate(0); transition: transform .2s ease; }
.hotel-group.collapsed .collapse-arrow { transform: rotate(-90deg); }
.hotel-name { display: block; font-size: 14px; line-height: 1.65; font-weight: 800; }
.room-badge { display: inline-block; margin-top: 10px; padding: 3px 7px; border: 1px solid #cbe5df; border-radius: 3px; color: var(--teal); background: #f6fffc; font-size: 11px; }
.hotel-summary small { display: none; color: var(--muted); font-size: 10px; }
.room-list { min-width: 0; }
.hotel-group.collapsed .room-list { display: none; }
.room-line { min-height: 59px; padding: 0 24px; display: grid; grid-template-columns: minmax(160px, 1fr) minmax(210px, 1.35fr) 92px 92px 92px 112px; align-items: center; gap: 14px; border-bottom: 1px solid var(--line-soft); text-decoration: none; transition: background .16s ease; }
.room-line:last-child { border-bottom: 0; }
.room-line:hover { background: #f8fcfb; }
.room-name { font-size: 13px; font-weight: 600; }
.package, .room-line time { color: #5f6d7e; font-size: 12px; }
.price { font: 700 19px/1 "DIN Alternate", "Bahnschrift", sans-serif; }
.previous-price { white-space: nowrap; font: 700 13px/1 "Bahnschrift", sans-serif; }
.previous-price.down { color: var(--teal); }
.previous-price.up { color: var(--red); }
.previous-price.flat { color: #526174; font-weight: 600; }
.historical-price { color: var(--teal); white-space: nowrap; font: 700 13px/1 "Bahnschrift", sans-serif; }
.room-line time { white-space: nowrap; }

.changes-panel { margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 17px; }
.section-heading span { color: var(--teal); font: 9px/1 "Bahnschrift", sans-serif; letter-spacing: .2em; }
.section-heading h2 { margin: 8px 0 0; font-family: "STZhongsong", "SimSun", serif; font-size: 25px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.section-heading i { display: inline-block; width: 7px; height: 7px; margin: 0 5px 0 13px; border-radius: 50%; }
.section-heading .down { background: var(--teal); }
.section-heading .up { background: var(--red); }
.event-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.event-item { min-height: 72px; padding: 17px 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.event-item strong { font-size: 13px; }
.event-item p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.movement { white-space: nowrap; font: 700 14px/1 "Bahnschrift", sans-serif; }
.movement.down { color: var(--teal); }
.movement.up { color: var(--red); }
.empty-state { grid-column: 1 / -1; padding: 38px 20px; color: var(--muted); text-align: center; font-size: 13px; background: var(--surface); }
footer { margin-top: 34px; padding: 24px 0 34px; display: flex; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
footer a { color: var(--teal); text-decoration: none; }
.mobile-nav { display: none; }

@media (max-width: 1180px) {
  .sidebar { width: 205px; }
  .app-shell { margin-left: 205px; }
  .side-nav a { padding-inline: 22px; }
  .overview-grid { grid-template-columns: 1fr 300px; gap: 16px; }
  .stat-grid { gap: 16px; }
  .stat-card { padding: 18px; gap: 14px; }
  .date-tabs { margin-right: 316px; }
  .board-head { padding-inline: 16px; grid-template-columns: 170px minmax(115px, 1fr) minmax(155px, 1.25fr) 75px 75px 75px 90px; gap: 8px; }
  .hotel-group { grid-template-columns: 170px minmax(0, 1fr); }
  .room-line { padding-inline: 16px; grid-template-columns: minmax(115px, 1fr) minmax(155px, 1.25fr) 75px 75px 75px 90px; gap: 8px; }
}

@media (max-width: 900px) {
  .sidebar { display: none; }
  .app-shell { margin-left: 0; }
  .topbar { height: 66px; padding-inline: 20px; }
  .mobile-brand { display: block; font-family: "STZhongsong", "SimSun", serif; font-size: 20px; font-weight: 800; }
  .title-line { display: none; }
  main { padding: 18px 18px 74px; }
  .overview-grid { grid-template-columns: 1fr; }
  .trend-card { grid-row: auto; }
  .date-tabs { margin: 16px 0 0; }
  .date-tabs { grid-template-columns: repeat(7, minmax(88px, 1fr)); }
  .board-head { display: none; }
  .price-board { border: 0; overflow: visible; background: transparent; box-shadow: none; }
  #hotelGroups { display: grid; gap: 14px; }
  .hotel-group { grid-template-columns: 1fr; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
  .hotel-summary { min-height: 68px; padding: 14px 16px 14px 48px; border: 0; border-bottom: 1px solid var(--line); }
  .collapse-arrow { left: 20px; top: 20px; }
  .hotel-name { padding-right: 80px; }
  .room-badge { position: absolute; right: 16px; top: 13px; margin: 0; }
  .hotel-summary small { display: block; margin-top: 4px; }
  .room-line { min-height: 0; padding: 16px; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; }
  .room-line > * { min-width: 0; }
  .room-line [data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; color: #96a0ac; font-size: 9px; font-weight: 500; }
  .room-name { grid-column: 1; grid-row: 1; font-size: 14px; }
  .price { grid-column: 2; grid-row: 1; align-self: center; text-align: right; font-size: 20px; }
  .package { grid-column: 1 / -1; grid-row: 2; line-height: 1.55; }
  .previous-price { grid-column: 1; grid-row: 3; }
  .historical-price { grid-column: 2; grid-row: 3; text-align: right; }
  .room-line time { grid-column: 2; grid-row: 4; text-align: right; }
  .event-list { grid-template-columns: 1fr; }
  .mobile-nav { position: fixed; inset: auto 0 0; z-index: 35; height: 62px; padding-bottom: env(safe-area-inset-bottom); display: flex; justify-content: space-around; border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(14px); box-shadow: 0 -10px 30px rgba(19,39,59,.08); }
  .mobile-nav a { min-width: 70px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); text-decoration: none; font-size: 10px; }
  .mobile-nav a span { font: 20px/1 Georgia, serif; }
  .mobile-nav a.active { color: var(--teal); }
}

@media (max-width: 620px) {
  .topbar { height: 62px; padding-inline: 15px; }
  .top-actions { gap: 10px; }
  .live-status { grid-template-columns: 10px auto; column-gap: 6px; }
  .live-status span { display: none; }
  .live-status strong { font-size: 11px; }
  .primary-button { min-height: 34px; padding: 0 12px; font-size: 12px; }
  main { padding: 14px 12px 76px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { min-height: 92px; padding: 14px; justify-content: flex-start; gap: 10px; }
  .stat-card:nth-child(3) { grid-column: 1 / -1; }
  .stat-icon { width: 36px; height: 36px; font-size: 27px; }
  .price-icon { font-size: 34px; }
  .stat-card p { margin-bottom: 6px; font-size: 11px; }
  .stat-card strong { font-size: 23px; }
  .trend-card { min-height: 190px; padding: 16px; }
  #trendChart { height: 88px; }
  .date-tabs { min-height: 67px; }
  .date-tabs button { min-height: 67px; }
  .date-tabs strong, .date-tabs span, .date-tabs small { display: block; margin: 0; }
  .date-tabs span { position: absolute; top: 13px; right: 14px; font-size: 10px; }
  .date-tabs small { margin-top: 5px; }
  .toolbar { grid-template-columns: 1fr 1fr; gap: 10px; }
  .search-control { grid-column: 1 / -1; }
  .toolbar select { padding-inline: 11px 24px; font-size: 12px; }
  .outline-button { min-width: 0; }
  .hotel-name { padding-right: 68px; font-size: 13px; }
  .room-badge { right: 12px; font-size: 10px; }
  .room-line { padding: 14px 13px; }
  .section-heading h2 { font-size: 22px; }
  .section-heading p { display: none; }
  .event-item { align-items: flex-start; flex-direction: column; }
  footer { padding-bottom: 16px; flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
