:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #12213c;
  --muted: #7e8ca2;
  --blue: #168cff;
  --blue-dark: #0e6fd0;
  --border: #e7edf5;
  --shadow: 0 12px 34px rgba(35, 57, 91, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}

button,
input {
  font: inherit;
}

.topbar {
  height: 72px;
  padding: 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg,#12375e,#071a32);
  color: #64d5ff;
  font-size: 20px;
  font-weight: 900;
}

.brand strong {
  display: block;
  font-size: 19px;
  letter-spacing: 1px;
}

.brand span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 2px;
}

.top-actions {
  display: flex;
  gap: 10px;
}

.secondary-btn,
.primary-btn {
  border-radius: 10px;
  padding: 9px 16px;
  cursor: pointer;
}

.secondary-btn {
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
}

.primary-btn {
  border: 0;
  background: var(--blue);
  color: white;
}

.page {
  width: min(1500px, calc(100% - 48px));
  margin: auto;
  padding: 34px 0 70px;
}

.hero-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 22px;
}

.eyebrow,
.section-title span,
.panel-head span {
  color: var(--blue);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2.5px;
}

.hero-head h1 {
  margin: 8px 0 6px;
  font-size: 31px;
}

.hero-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.date-control {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.period-tabs {
  display: flex;
  background: #eaf0f7;
  padding: 4px;
  border-radius: 11px;
}

.period-tab {
  border: 0;
  background: transparent;
  padding: 8px 13px;
  border-radius: 8px;
  color: #69788d;
  font-size: 11px;
}

.period-tab.active {
  background: white;
  color: var(--text);
  box-shadow: 0 3px 10px rgba(0,0,0,.05);
}

.date-picker {
  display: flex;
  gap: 8px;
}

.date-picker input {
  border: 1px solid var(--border);
  background: white;
  padding: 9px 12px;
  border-radius: 9px;
}

.status-bar {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 22px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #24c89c;
  box-shadow: 0 0 0 4px rgba(36,200,156,.13);
}

.business-core {
  display: grid;
  grid-template-columns: 2fr .9fr;
  gap: 18px;
  align-items: stretch;
}

.core-main,
.insight-panel,
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.core-main {
  padding: 22px;
}

.insight-panel,
.panel {
  padding: 20px;
}

.core-title-row,
.section-title,
.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.core-title-row h2,
.section-title h2,
.panel-head h3 {
  margin: 5px 0 0;
}

.core-title-row h2,
.section-title h2 {
  font-size: 20px;
}

.panel-head h3 {
  font-size: 17px;
}

.date-label,
.section-title small {
  color: var(--muted);
  font-size: 10px;
}

.core-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 14px;
  margin-top: 18px;
}

.hero-metric {
  min-height: 150px;
  padding: 20px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: #fbfcfe;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-metric.blue {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg,#167fe4,#25a2ff);
}

.hero-metric span {
  color: var(--muted);
  font-size: 11px;
}

.hero-metric.blue span,
.hero-metric.blue small {
  color: rgba(255,255,255,.82);
}

.hero-metric strong {
  font-size: 31px;
  letter-spacing: -1px;
}

.hero-metric small {
  color: #a3aec0;
  font-size: 8px;
}

.sub-metrics {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(5,1fr);
  gap: 10px;
}

.sub-metrics article {
  padding: 14px 15px;
  border-radius: 11px;
  background: #f7f9fc;
}

.sub-metrics span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.sub-metrics strong {
  display: block;
  margin-top: 7px;
  font-size: 17px;
}

.alert-count {
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff1e4;
  color: #e97921;
  font-size: 11px;
  font-weight: 700;
}

.alerts {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alert {
  display: flex;
  gap: 12px;
  padding: 13px;
  border-radius: 11px;
  background: #f8fafc;
}

.alert-icon {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #fff1df;
  color: #ef942f;
}

.alert.attention .alert-icon {
  background: #eef3ff;
  color: #6680eb;
}

.alert h4 {
  margin: 0 0 4px;
  font-size: 11px;
}

.alert p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.wide-panel {
  margin-top: 20px;
}

.rank-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.rank-row {
  display: grid;
  grid-template-columns: minmax(100px,1fr) 3fr 100px;
  align-items: center;
  gap: 12px;
  font-size: 11px;
}

.bar-track {
  height: 7px;
  border-radius: 999px;
  background: #edf1f5;
  overflow: hidden;
}

.bar {
  height: 100%;
  background: linear-gradient(90deg,#168cff,#52b7ff);
}

.bar.negative {
  background: linear-gradient(90deg,#ff8b83,#ed5e67);
}

.rank-row .value {
  text-align: right;
  font-weight: 700;
}

.section {
  margin-top: 22px;
}

.table-wrap {
  margin-top: 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow-x: auto;
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

th {
  text-align: left;
  padding: 12px 14px;
  background: #f8fafc;
  color: #718096;
  white-space: nowrap;
}

td {
  padding: 13px 14px;
  border-top: 1px solid #eef2f6;
  white-space: nowrap;
}

td:first-child {
  font-weight: 600;
}

.two-column {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.ranking {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 28px 1fr 80px 90px;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid #f0f3f7;
  font-size: 10px;
}

.rank-number {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #f1f5fa;
  color: #65758b;
}

.ranking-item:first-child .rank-number {
  background: #eaf4ff;
  color: #167cff;
}

.ranking-name {
  font-weight: 600;
}

.ranking-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.ranking-nights,
.ranking-revenue {
  text-align: right;
}

.ranking-revenue {
  font-weight: 700;
}

.no-alert {
  padding: 30px 0;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%,15px);
  opacity: 0;
  pointer-events: none;
  background: #10213e;
  color: white;
  padding: 11px 17px;
  border-radius: 9px;
  font-size: 11px;
  transition: .2s;
  z-index: 100;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%,0);
}

@media (max-width: 1100px) {
  .business-core {
    grid-template-columns: 1fr;
  }

  .core-grid {
    grid-template-columns: repeat(2,1fr);
  }

  .sub-metrics {
    grid-template-columns: repeat(3,1fr);
  }
}

@media (max-width: 820px) {
  .page {
    width: calc(100% - 28px);
  }

  .hero-head {
    flex-direction: column;
    align-items: stretch;
  }

  .date-control {
    align-items: stretch;
  }

  .two-column {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .topbar {
    padding: 0 14px;
  }

  .top-actions {
    display: none;
  }

  .core-grid {
    grid-template-columns: 1fr;
  }

  .sub-metrics {
    grid-template-columns: repeat(2,1fr);
  }
}