:root {
  --primary: #5645d4;
  --primary-hover: #4534b3;
  --canvas: #ffffff;
  --surface: #f6f5f4;
  --surface-soft: #fafaf9;
  --surface-muted: #f0efed;
  --hairline: #e5e3df;
  --hairline-soft: #ede9e4;
  --hairline-strong: #c8c4be;
  --ink: #1a1a1a;
  --charcoal: #37352f;
  --slate: #5d5b54;
  --steel: #787671;
  --stone: #a4a097;
  --navy: #0a1530;
  --link-blue: #0075de;
  --radius-md: 8px;
  --radius-xl: 12px;
  --shadow-card: rgba(25, 25, 25, 0.027) 0 8px 12px, rgba(25, 25, 25, 0.02) 0 1px 2px;
  --shadow-frame: rgba(15, 15, 15, 0.16) 0 24px 64px -36px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--charcoal);
  font-family: "Notion Sans", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.login-frame {
  width: min(1120px, calc(100vw - 80px));
  height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 440px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  background: var(--canvas);
  box-shadow: var(--shadow-frame);
}

.visual-panel {
  position: relative;
  display: block;
  min-width: 0;
  border-right: 1px solid var(--hairline);
  background: var(--surface);
}

.visual-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0.88;
}

.visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 21, 48, 0.7), rgba(10, 21, 48, 0.38), rgba(10, 21, 48, 0));
}

.visual-content {
  position: absolute;
  inset: 0;
  padding: 40px;
  color: #ffffff;
}

.brand-line {
  position: absolute;
  top: 40px;
  left: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-line {
  font-size: 14px;
  font-weight: 500;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.brand-icon svg,
.input-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-icon svg {
  width: 16px;
  height: 16px;
}

.visual-copy {
  position: absolute;
  left: 40px;
  top: 258px;
  max-width: 520px;
}

.visual-copy h1 {
  margin: 0;
  color: #ffffff;
  font-size: 42px;
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: 0;
}

.visual-description {
  max-width: 440px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  line-height: 1.75;
}

.form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: var(--canvas);
}

.login-form {
  width: 100%;
  max-width: 336px;
}

.login-form h2 {
  margin: 0;
  color: var(--ink);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
}

.form-subtitle {
  margin: 8px 0 28px;
  color: var(--steel);
  font-size: 14px;
  line-height: 1.5;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--charcoal);
  font-size: 13px;
  font-weight: 500;
}

.input-shell {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 0 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--canvas);
}

.input-shell:focus-within {
  border-color: var(--hairline-strong);
  box-shadow: 0 0 0 4px rgba(86, 69, 212, 0.1);
}

.input-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--stone);
}

.input-shell input {
  width: 100%;
  height: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}

.input-shell input::placeholder {
  color: var(--stone);
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  color: var(--steel);
  font-size: 13px;
}

.remember-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.remember-row input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--primary);
}

.quiet-link {
  color: var(--slate);
  text-decoration: none;
}

.quiet-link:hover {
  color: var(--ink);
}

.login-button {
  width: 100%;
  height: 42px;
  margin-top: 24px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.15s ease;
}

.login-button:hover {
  background: var(--primary-hover);
}

.login-button:disabled {
  cursor: default;
  opacity: 0.72;
}

.form-message {
  min-height: 20px;
  margin: 0;
  padding-top: 16px;
  color: var(--stone);
  font-size: 13px;
  line-height: 1.45;
}

.form-message[data-state="error"] {
  color: #b42318;
}

.form-message[data-state="success"] {
  color: #157347;
}

.dashboard-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 204px minmax(0, 1fr);
  background: var(--canvas);
}

.side-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  overflow: hidden;
  padding: 16px 14px;
  border-right: 1px solid var(--hairline);
  background: var(--surface-soft);
}

.side-brand {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.side-subtitle {
  margin: 5px 0 14px;
  color: var(--steel);
  font-size: 13px;
  line-height: 1.5;
}

.side-hotel-card {
  min-height: 66px;
  display: grid;
  align-content: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  background: var(--canvas);
}

.side-hotel-card p {
  margin: 0;
  color: var(--steel);
  font-size: 12px;
  line-height: 1.35;
}

.side-hotel-card strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.nav-list {
  display: grid;
  gap: 3px;
}

.nav-item {
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: var(--radius-md);
  color: var(--slate);
  font-size: 14px;
  text-decoration: none;
}

.nav-item.active {
  position: relative;
  background: var(--canvas);
  color: var(--ink);
  font-weight: 500;
  box-shadow: rgba(25, 25, 25, 0.035) 0 1px 2px;
}

.nav-item.disabled,
.card-link.disabled {
  cursor: default;
  opacity: 0.55;
}

.side-account {
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
}

.side-account span {
  display: block;
  margin-bottom: 8px;
  color: var(--steel);
  font-size: 12px;
}

.side-account p {
  margin: 0 0 12px;
  color: var(--charcoal);
  font-size: 13px;
  line-height: 1.45;
}

.text-button,
.secondary-button,
.icon-button {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--canvas);
  color: var(--charcoal);
  cursor: pointer;
  font-size: 13px;
}

.text-button {
  height: 30px;
  padding: 0 10px;
}

.secondary-button {
  height: 34px;
  padding: 0 13px;
  font-weight: 500;
}

.icon-button {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  padding: 0;
  color: var(--slate);
  font-size: 20px;
  line-height: 1;
}

.text-button:hover,
.secondary-button:hover,
.icon-button:hover {
  border-color: var(--hairline-strong);
}

.text-button:disabled,
.secondary-button:disabled,
.icon-button:disabled {
  cursor: default;
  opacity: 0.7;
}

.dashboard-main {
  width: 100%;
  min-width: 0;
  padding: 12px 18px 20px;
}

.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 8px;
}

.dashboard-header h1 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.25;
  font-weight: 600;
}

.dashboard-subtitle {
  margin: 4px 0 0;
  color: var(--steel);
  font-size: 13px;
  line-height: 1.5;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-badge,
.mini-badge,
.date-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge {
  height: 28px;
  padding: 0 11px;
  background: #eaf7ee;
  color: #176b2c;
}

.status-badge[data-state="warning"] {
  background: #fff4e8;
  color: #9a3d00;
}

.status-badge[data-state="loading"] {
  background: var(--surface);
  color: var(--steel);
}

.dashboard-alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #ffd7b0;
  border-radius: var(--radius-md);
  background: #fff8f1;
  color: #8a3500;
  font-size: 13px;
}

.status-strip {
  min-height: 44px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  background: var(--canvas);
  box-shadow: var(--shadow-card);
}

.status-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 7px 12px;
  border-right: 1px solid var(--hairline);
}

.status-cell > div {
  min-width: 0;
}

.status-cell:last-child {
  border-right: 0;
}

.status-cell p {
  margin: 0 0 4px;
  color: var(--steel);
  font-size: 12px;
  font-weight: 500;
}

.status-cell strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot,
.risk-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.status-dot.normal,
.risk-dot.normal {
  background: #1aae39;
}

.status-dot.warning,
.risk-dot.warning {
  background: #dd5b00;
}

.risk-dot.empty {
  background: var(--stone);
}

.status-dot.empty {
  background: var(--stone);
}

.overview-grid,
.price-grid,
.risk-grid,
.price-summary-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.overview-grid {
  grid-template-columns: 304px minmax(0, 1fr);
  align-items: stretch;
}

.price-grid {
  grid-template-columns: 1fr;
  align-content: start;
  margin-bottom: 0;
}

.risk-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.price-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card,
.risk-card,
.trend-card,
.table-card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  background: var(--canvas);
  box-shadow: var(--shadow-card);
}

.metric-card {
  min-height: 88px;
  padding: 10px 13px 9px;
}

.risk-card {
  min-height: 0;
  padding: 14px 18px 12px;
}

.trend-section {
  min-width: 0;
  display: flex;
}

.trend-card {
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 14px 16px 12px;
}

.trend-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.trend-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.trend-header p {
  margin: 5px 0 0;
  color: var(--steel);
  font-size: 13px;
  line-height: 1.5;
}

.trend-actions {
  display: inline-flex;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.trend-controls {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  flex: 0 0 auto;
}

.competitor-trigger-button {
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px 0 11px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface);
  color: var(--charcoal);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  box-shadow: rgba(25, 25, 25, 0.05) 0 1px 3px;
}

.competitor-trigger-button::before {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--primary);
  content: "";
}

.competitor-trigger-button:hover {
  border-color: var(--hairline-strong);
  background: var(--surface-muted);
}

.range-button {
  min-width: 64px;
  height: 26px;
  border: 0;
  border-right: 1px solid var(--hairline);
  background: transparent;
  color: var(--slate);
  cursor: pointer;
  font-size: 13px;
}

.range-button:last-child {
  border-right: 0;
}

.range-button.active {
  background: var(--canvas);
  color: var(--ink);
  font-weight: 600;
  box-shadow: rgba(25, 25, 25, 0.04) 0 1px 2px;
}

.trend-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.trend-summary-item {
  min-width: 0;
  min-height: 58px;
  padding: 9px 12px;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.trend-summary-item p {
  margin: 0 0 6px;
  overflow: hidden;
  color: var(--steel);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trend-summary-item strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trend-summary-item:first-child strong {
  color: #2f63e7;
}

.trend-summary-item:nth-child(2) strong {
  color: var(--primary);
}

.trend-summary-item:nth-child(3) strong {
  color: #dd5b00;
}

.trend-summary-item span {
  display: block;
  margin-top: 4px;
  color: var(--steel);
  font-size: 12px;
}

.trend-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
}

.trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 0;
  color: var(--slate);
  font-size: 12px;
}

.trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-line {
  width: 22px;
  height: 0;
  display: inline-block;
  border-top: 2px solid var(--primary);
}

.legend-line.ctrip {
  border-top-color: rgba(86, 69, 212, 0.72);
  border-top-style: dashed;
}

.legend-line.meituan {
  border-top-color: rgba(221, 91, 0, 0.72);
  border-top-style: dashed;
}

.trend-channel-pill {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0 10px;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--slate);
  font-size: 12px;
  white-space: nowrap;
}

.trend-chart-shell {
  position: relative;
  flex: 1 1 168px;
  min-height: 132px;
  margin-top: 4px;
  overflow: hidden;
}

.trend-chart {
  width: 100%;
  height: 100%;
  display: block;
}

.trend-grid-line {
  stroke: var(--hairline-soft);
  stroke-width: 1;
}

.trend-axis-label {
  fill: var(--stone);
  font-size: 11px;
}

.trend-line {
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-line.total {
  stroke: #315fe8;
  stroke-width: 2.6;
}

.trend-line.ctrip {
  stroke: rgba(86, 69, 212, 0.48);
  stroke-width: 1.6;
  stroke-dasharray: 4 6;
}

.trend-line.meituan {
  stroke: rgba(221, 91, 0, 0.45);
  stroke-width: 1.6;
  stroke-dasharray: 4 6;
}

.trend-hover-point {
  fill: transparent;
  stroke: transparent;
}

.trend-empty {
  position: absolute;
  inset: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  border: 1px dashed var(--hairline);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--steel);
  font-size: 13px;
}

.trend-tooltip {
  position: absolute;
  z-index: 2;
  min-width: 168px;
  padding: 10px 11px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-card);
  color: var(--slate);
  font-size: 12px;
  line-height: 1.5;
  pointer-events: none;
  transform: translate(10px, -50%);
}

.trend-tooltip strong,
.trend-tooltip span {
  display: block;
}

.trend-tooltip strong {
  color: var(--ink);
  font-weight: 600;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title-row h2 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
}

.mini-badge,
.date-badge {
  min-height: 24px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--slate);
  font-size: 12px;
  border: 1px solid var(--hairline-soft);
}

.mini-badge.success {
  background: #eaf7ee;
  color: #176b2c;
  border-color: #cae8d2;
}

.mini-badge.danger {
  background: #fff0ed;
  color: #b42318;
  border-color: #ffd3cb;
}

.mini-badge.muted {
  color: var(--steel);
}

.metric-value,
.main-number {
  margin: 8px 0 4px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.metric-value small,
.main-number small {
  margin-left: 5px;
  color: var(--steel);
  font-size: 14px;
  font-weight: 400;
}

.metric-copy {
  margin: 0;
  color: var(--steel);
  font-size: 13px;
  line-height: 1.5;
}

.metric-copy.success {
  color: #176b2c;
}

.metric-copy.danger {
  color: #b42318;
}

.card-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--link-blue);
  font-size: 13px;
  text-decoration: none;
}

.risk-list {
  display: grid;
  margin-top: 8px;
  border-top: 1px solid var(--hairline-soft);
}

.risk-row {
  min-height: 31px;
  display: grid;
  grid-template-columns: 8px minmax(84px, 0.8fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--hairline-soft);
}

.risk-row p {
  margin: 0;
  color: var(--charcoal);
  font-size: 13px;
}

.risk-row strong {
  justify-self: end;
  color: var(--slate);
  font-size: 13px;
  font-weight: 500;
  text-align: right;
}

.empty-state {
  margin-top: 8px;
  padding: 9px 10px;
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--steel);
  font-size: 13px;
}

.table-card {
  overflow: hidden;
}

.price-trend-panel {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  background: var(--canvas);
  box-shadow: var(--shadow-card);
}

.trend-panel-header,
.competitor-modal-header,
.trend-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.trend-panel-header h2,
.trend-card-header h3,
.competitor-modal h2 {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.3;
}

.trend-panel-header h2 {
  font-size: 16px;
}

.trend-card-header h3 {
  font-size: 13px;
}

.competitor-modal h2 {
  font-size: 18px;
}

.trend-panel-header p,
.trend-card-header p,
.competitor-modal p {
  margin: 4px 0 0;
  color: var(--steel);
  font-size: 12px;
  line-height: 1.45;
}

.modal-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(26, 26, 26, 0.24);
}

.competitor-modal {
  width: min(680px, calc(100vw - 48px));
  max-height: min(680px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  background: var(--canvas);
  box-shadow: var(--shadow-frame);
}

.competitor-modal-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--hairline);
}

.competitor-actions {
  display: inline-flex;
  gap: 8px;
  flex: 0 0 auto;
}

.competitor-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding: 16px 20px;
}

.competitor-option {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 0 10px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--canvas);
  color: var(--charcoal);
  cursor: pointer;
  font-size: 13px;
}

.competitor-option input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--primary);
}

.competitor-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.competitor-exclusion {
  padding: 0 20px 14px;
  color: var(--steel);
  font-size: 12px;
  line-height: 1.5;
}

.competitor-exclusion p {
  margin: 0 0 6px;
  color: var(--charcoal);
  font-weight: 700;
}

.competitor-exclusion ul {
  margin: 0;
  padding-left: 18px;
}

.competitor-exclusion li + li {
  margin-top: 4px;
}

.competitor-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--hairline);
}

.trend-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.price-trend-card,
.rank-trend-card {
  min-height: 226px;
  padding: 10px 12px 8px;
}

.legend-line.own {
  border-top-color: #315fe8;
}

.legend-line.average {
  border-top-color: rgba(221, 91, 0, 0.72);
  border-top-style: dashed;
}

.legend-line.rank {
  border-top-color: var(--primary);
}

.trend-line.own {
  stroke: #315fe8;
  stroke-width: 2.6;
}

.trend-line.average {
  stroke: rgba(221, 91, 0, 0.72);
  stroke-width: 2.2;
  stroke-dasharray: 5 6;
}

.trend-line.rank {
  stroke: var(--primary);
  stroke-width: 2.6;
}

.table-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px 10px;
  border-bottom: 1px solid var(--hairline);
}

.table-card-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.table-card-header p {
  margin: 4px 0 0;
  color: var(--steel);
  font-size: 13px;
}

.price-date-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.segmented-control {
  display: inline-flex;
  min-height: 30px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface-soft);
}

.segment-button {
  min-width: 56px;
  border: 0;
  border-right: 1px solid var(--hairline);
  background: transparent;
  color: var(--slate);
  cursor: pointer;
  font-size: 13px;
}

.segment-button:last-child {
  border-right: 0;
}

.segment-button.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
}

.segment-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.date-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  color: var(--steel);
  font-size: 12px;
  white-space: nowrap;
}

.date-control select {
  min-width: 126px;
  height: 30px;
  padding: 0 28px 0 9px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--surface);
  color: var(--charcoal);
  font-size: 13px;
}

.date-control select:disabled {
  background: var(--surface-soft);
  color: var(--steel);
}

.date-range-controls {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.table-scroll {
  overflow-x: auto;
}

.price-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.price-table th,
.price-table td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--hairline-soft);
  color: var(--charcoal);
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  vertical-align: middle;
}

.price-table th {
  background: var(--surface-soft);
  color: var(--steel);
  font-size: 12px;
  font-weight: 600;
}

.price-table tr:last-child td {
  border-bottom: 0;
}

.own-hotel-row td {
  background: #f6f4ff;
  color: var(--ink);
  font-weight: 600;
}

.row-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  margin-left: 10px;
  padding: 0 8px;
  border: 1px solid #d8d2ff;
  border-radius: 99px;
  background: #ffffff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

.table-positive {
  color: #b42318 !important;
}

.table-negative {
  color: #176b2c !important;
}

.table-empty {
  margin: 16px 18px;
  padding: 18px;
  border: 1px dashed var(--hairline);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--steel);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 980px) {
  .login-page {
    padding: 24px;
  }

  .login-frame {
    width: min(520px, calc(100vw - 48px));
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .visual-panel {
    display: none;
  }

  .form-panel {
    padding: 36px;
  }

  .dashboard-app {
    grid-template-columns: 1fr;
  }

  .side-nav {
    position: static;
    height: auto;
    min-height: 0;
    gap: 12px;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
  }

  .dashboard-main {
    width: 100%;
    padding: 14px;
  }

  .overview-grid,
  .price-grid,
  .risk-grid,
  .price-summary-grid,
  .trend-summary-grid {
    grid-template-columns: 1fr;
    height: auto;
  }

  .price-grid {
    margin-bottom: 0;
  }

  .trend-header {
    flex-direction: column;
  }

  .trend-panel-header,
  .competitor-modal-header,
  .trend-card-header {
    flex-direction: column;
  }

  .trend-meta-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .trend-controls {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .trend-actions {
    width: 100%;
  }

  .range-button {
    flex: 1;
  }

  .modal-backdrop {
    align-items: end;
    padding: 16px;
  }

  .competitor-modal {
    width: 100%;
    max-height: calc(100vh - 32px);
  }

  .competitor-modal-actions {
    flex-wrap: wrap;
  }

  .trend-chart-grid {
    grid-template-columns: 1fr;
  }

  .status-cell {
    min-height: 44px;
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
  }

  .status-cell:last-child {
    border-bottom: 0;
  }

  .dashboard-page .side-nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 14px;
  }

  .dashboard-page .side-subtitle {
    margin-bottom: 8px;
  }

  .dashboard-page .side-hotel-card {
    min-height: 50px;
    margin-bottom: 10px;
    padding: 8px 10px;
  }

  .dashboard-page .nav-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .dashboard-page .nav-item {
    min-height: 36px;
    justify-content: center;
    padding: 0 6px;
    text-align: center;
  }

  .dashboard-page .side-account {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 10px;
    padding-top: 10px;
  }

  .dashboard-page .side-account span,
  .dashboard-page .side-account p {
    margin: 0;
  }

  .dashboard-page .side-account .text-button {
    grid-row: 1 / span 2;
    grid-column: 2;
  }

  .dashboard-page .dashboard-header {
    align-items: flex-start;
    flex-direction: row;
    gap: 12px;
  }

  .dashboard-page .header-actions {
    align-items: flex-end;
    flex-direction: column;
    gap: 8px;
  }

  .dashboard-page .dashboard-subtitle {
    max-width: 220px;
  }

  .dashboard-page .status-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 50px;
  }

  .dashboard-page .status-cell {
    min-height: 50px;
    gap: 6px;
    padding: 6px 8px;
    border-right: 1px solid var(--hairline);
    border-bottom: 0;
  }

  .dashboard-page .status-cell:last-child {
    border-right: 0;
  }

  .dashboard-page .status-cell p {
    margin-bottom: 3px;
    font-size: 11px;
  }

  .dashboard-page .status-cell strong {
    font-size: 12px;
  }

  .dashboard-page .trend-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .dashboard-page .trend-summary-item {
    min-height: 54px;
    padding: 8px;
  }

  .dashboard-page .trend-summary-item p,
  .dashboard-page .trend-summary-item span {
    font-size: 11px;
  }

  .dashboard-page .trend-summary-item strong {
    font-size: 16px;
  }
}
