:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", Inter, system-ui, sans-serif;
  --ink: #25273a;
  --muted: #7c8498;
  --surface: #ffffff;
  --line: #e6e8ef;
  --purple: #6657e8;
  --green: #18a875;
  --red: #dc4c61;
  --orange: #ed8a19;
  --yellow: #ffd84b;
  --shadow: 0 15px 46px rgba(35, 39, 73, 0.075);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 1080px;
  margin: 0;
  background: #f4f6fa;
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.login-page {
  min-width: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 12% 10%, rgba(102, 87, 232, 0.16), transparent 28rem),
    radial-gradient(circle at 88% 90%, rgba(255, 184, 45, 0.16), transparent 26rem),
    #f4f6fa;
}

.login-shell {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid #e1e3ec;
  border-radius: 28px;
  background: white;
  box-shadow: 0 30px 90px rgba(35, 39, 73, 0.15);
}

.login-brand {
  min-height: 470px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 54px;
  background:
    radial-gradient(circle at 85% 15%, rgba(239, 91, 158, 0.24), transparent 16rem),
    linear-gradient(145deg, #211b43, #3b2152);
  color: white;
}

.login-brand .brand-mark {
  width: 54px;
  height: 54px;
  margin-bottom: 36px;
  font-size: 18px;
}

.login-brand .eyebrow {
  color: #ff76b4;
}

.login-brand h1 {
  margin: 0;
  font-size: 38px;
}

.login-brand p {
  margin: 12px 0 0;
  color: #c9c9df;
}

.login-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: 54px;
}

.login-card > div > span,
.login-card label span {
  color: #6657e8;
  font-size: 11px;
  font-weight: 900;
}

.login-card h2 {
  margin: 8px 0;
  font-size: 25px;
}

.login-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

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

.login-card input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #dadde7;
  border-radius: 12px;
  outline: none;
}

.login-card input:focus {
  border-color: #7769eb;
  box-shadow: 0 0 0 3px rgba(102, 87, 232, 0.12);
}

.login-card .login-error {
  min-height: 18px;
  color: #d94358;
}

.login-card .button {
  min-height: 48px;
}

.app-shell {
  width: min(100% - 42px, 1460px);
  margin: 0 auto;
  padding-bottom: 34px;
}

.topbar {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.top-actions,
.footer-actions,
.product-filters {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(140deg, #725ff1, #4c3bc8);
  color: white;
  font-weight: 950;
  box-shadow: 0 9px 22px rgba(91, 75, 218, 0.28);
}

.brand > div {
  display: grid;
  gap: 3px;
}

.brand strong {
  font-size: 15px;
}

.brand span {
  color: var(--muted);
  font-size: 10px;
}

.button {
  min-height: 42px;
  padding: 0 17px;
  border: 0;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: linear-gradient(135deg, #ffcf26, #ff9d28);
  color: #3c2b14;
  box-shadow: 0 10px 24px rgba(255, 166, 31, 0.23);
}

.button.secondary {
  border: 1px solid #dde0e9;
  background: white;
  color: #585f72;
}

.button.export {
  border: 1px solid #e4dc96;
  background: #fff9d9;
  color: #725a00;
}

.button.small {
  min-height: 36px;
}

.hero {
  min-height: 230px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 36px;
  align-items: center;
  padding: 34px 42px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 81% 15%, rgba(239, 91, 158, 0.22), transparent 25rem),
    radial-gradient(circle at 57% 110%, rgba(255, 197, 45, 0.13), transparent 20rem),
    linear-gradient(125deg, #211b43 0%, #2b2355 56%, #392050 100%);
  box-shadow: 0 24px 70px rgba(31, 24, 71, 0.22);
  color: white;
  overflow: hidden;
}

.eyebrow {
  display: block;
  margin-bottom: 10px;
  color: #7669df;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.hero .eyebrow {
  color: #ff77b4;
}

.hero h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.16;
  letter-spacing: -0.035em;
}

.hero h1 em {
  color: #ffd44d;
  font-style: normal;
}

.hero p {
  max-width: 750px;
  margin: 18px 0 0;
  color: #c8c8df;
  font-size: 15px;
  line-height: 1.8;
}

.hero-controls {
  width: 350px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px);
}

.hero-controls label {
  display: grid;
  gap: 7px;
}

.hero-controls label > span {
  color: #b8bad2;
  font-size: 12px;
}

.hero-controls select,
.product-filters select,
.product-filters input,
.field-row input {
  height: 44px;
  padding: 0 12px;
  border: 1px solid #dde0e9;
  border-radius: 11px;
  background: white;
  color: var(--ink);
  outline: none;
}

.hero-controls select {
  width: 100%;
  border-color: rgba(255, 255, 255, 0.12);
  background: #2b2850;
  color: white;
}

.hero-controls .date-control {
  margin-top: 12px;
  transition: opacity 0.18s ease;
}

.hero-controls .date-control.is-disabled {
  opacity: 0.42;
}

.hero-controls select:disabled {
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.08);
  background: #626076;
  color: #dedee7;
}

.report-range {
  display: grid;
  gap: 7px;
}

.report-range > span,
.report-range > small {
  color: #b8bad2;
  font-size: 11px;
}

.report-range > small {
  min-height: 16px;
  color: #dad9ea;
}

.report-range-toggle {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(12, 10, 31, 0.32);
}

.report-range-toggle button {
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #aaaac5;
  font-size: 12px;
  font-weight: 800;
}

.report-range-toggle button.active {
  background: #fff;
  color: #5145c9;
  box-shadow: 0 5px 15px rgba(15, 12, 39, 0.2);
}

.metric-toggle {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  margin-top: 12px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(12, 10, 31, 0.32);
}

.metric-toggle button {
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #aaaac5;
  font-size: 13px;
  font-weight: 750;
}

.metric-toggle button.active {
  background: #ffbd2f;
  color: #38280d;
  box-shadow: 0 6px 16px rgba(255, 189, 47, 0.22);
}

.feedback {
  min-height: 35px;
  display: flex;
  align-items: center;
  margin: 6px 2px 0;
  color: #5e667d;
  font-size: 13px;
}

.drop-zone {
  min-height: 76px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 13px;
  align-items: center;
  margin: 15px 0 8px;
  padding: 13px 17px;
  border: 1.5px dashed #bcb5ef;
  border-radius: 16px;
  background: linear-gradient(135deg, #fbfaff, #f5f3ff);
  color: #4f477e;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.drop-zone:hover,
.drop-zone:focus-visible,
.drop-zone.dragging {
  border-color: #6758e5;
  background: #efedff;
  transform: translateY(-1px);
}

.drop-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #6859e7;
  color: white;
  font-size: 21px;
  font-weight: 900;
}

.drop-zone > div {
  display: grid;
  gap: 4px;
}

.drop-zone strong {
  font-size: 13px;
}

.drop-zone p {
  margin: 0;
  color: #858aa0;
  font-size: 10px;
}

.drop-action {
  padding: 8px 11px;
  border-radius: 9px;
  background: white;
  color: #6254db;
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 3px 12px rgba(72, 61, 165, 0.08);
}

.feedback span {
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--purple);
}

.feedback.success span {
  background: var(--green);
}

.feedback.error {
  color: var(--red);
}

.feedback.error span {
  background: var(--red);
}

.reminder-banner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding: 13px 17px;
  border: 1px solid #f4d68e;
  border-radius: 16px;
  background: #fff9e7;
  box-shadow: 0 8px 28px rgba(209, 152, 25, 0.08);
}

.reminder-banner.hidden {
  display: none;
}

.reminder-banner > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reminder-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #ffbf2d;
  color: #4c3500;
  font-weight: 950;
}

.reminder-banner strong,
.reminder-banner p {
  display: block;
}

.reminder-banner p {
  margin: 4px 0 0;
  color: #8c7540;
  font-size: 11px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 13px;
  margin: 0 0 22px;
}

.kpi-card {
  position: relative;
  min-height: 145px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(31, 37, 66, 0.045);
  overflow: hidden;
}

.kpi-card::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -28px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(98, 84, 231, 0.07);
}

.kpi-card > span:first-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.kpi-card strong {
  margin: 12px 0 7px;
  font-size: clamp(23px, 2.35vw, 33px);
  line-height: 1;
  letter-spacing: -0.035em;
}

.kpi-card small {
  color: #8b92a6;
  font-size: 11px;
}

.kpi-card .change-badge {
  margin-top: 10px;
}

.kpi-card.featured {
  border-color: #d7d2ff;
  background: linear-gradient(145deg, #ffffff, #f2f0ff);
}

.kpi-card.featured strong,
.kpi-card.product strong {
  color: var(--purple);
}

.kpi-card.sales strong {
  color: #168a5e;
  font-size: clamp(20px, 2vw, 29px);
}

.kpi-card.new-product {
  border-color: #f3dec1;
  background: #fffaf2;
}

.kpi-card.new-product strong {
  color: #d87812;
}

.change-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 7px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.change-badge.up,
.change-badge.new {
  background: #eaf9f3;
  color: #168a5e;
}

.change-badge.down {
  background: #fff0f2;
  color: #d6455a;
}

.change-badge.flat {
  background: #f0f2f6;
  color: #7d8598;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(320px, 0.85fr);
  gap: 20px;
  align-items: stretch;
}

.ranking-panel,
.insight-panel {
  height: 100%;
}

.ranking-panel,
.insight-panel,
.detail-section,
.product-section,
.analysis-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.ranking-panel,
.insight-panel,
.detail-section,
.product-section,
.analysis-panel {
  padding: 26px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-heading.compact {
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.025em;
}

.section-date {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  margin-left: 7px;
  padding: 4px 9px;
  border-radius: 8px;
  background: #f0f1f6;
  color: #737b8e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  vertical-align: middle;
  white-space: nowrap;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.podium {
  min-height: 430px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  padding: 10px 0 0;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 209, 58, 0.12), transparent 13rem),
    linear-gradient(160deg, #211a43, #171d3b);
  overflow: hidden;
}

.podium-place {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 12px 0;
  color: white;
  text-align: center;
}

.podium-place.rank-1 {
  padding-top: 10px;
}

.podium-place .medal {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 6px solid #52a8d9;
  border-radius: 50%;
  background: var(--yellow);
  color: #5c4314;
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.podium-place.rank-2 .medal {
  background: #d8e1ed;
}

.podium-place.rank-3 .medal {
  background: #ff9b29;
}

.podium-place .rank-move {
  position: absolute;
  top: 20px;
  right: 14px;
}

.podium-place.rank-1 .rank-move {
  top: 10px;
}

.podium-place h3 {
  max-width: 100%;
  margin: 14px 0 8px;
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-place > strong {
  color: #ffe64c;
  font-size: clamp(20px, 2.4vw, 30px);
  letter-spacing: -0.03em;
}

.podium-place > span:not(.rank-move):not(.change-badge):not(.medal) {
  margin-top: 6px;
  color: #aeb7d4;
  font-size: 11px;
}

.podium-place .podium-product-stats {
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  line-height: 1.45;
}

.podium-place .podium-product-stats b {
  color: #ffd859;
  font-weight: 850;
}

.podium-place .change-badge {
  margin-top: 10px;
}

.podium-block {
  width: 100%;
  height: 140px;
  display: grid;
  place-items: center;
  margin-top: 18px;
  border-radius: 13px 13px 0 0;
  color: white;
  font-size: 62px;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}

.rank-1 .podium-block {
  height: 180px;
  background: linear-gradient(145deg, #ffe315, #e8bd06);
}

.rank-2 .podium-block {
  height: 120px;
  background: linear-gradient(145deg, #e4edf4, #a8bdce);
}

.rank-3 .podium-block {
  height: 90px;
  background: linear-gradient(145deg, #ffb23e, #ed8012);
}

.ranking-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.ranking-row {
  min-height: 68px;
  display: grid;
  grid-template-columns: 36px minmax(130px, 1fr) 46px minmax(130px, auto);
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid #eceef4;
  border-radius: 14px;
  background: #fafbfe;
}

.rank-number,
.table-rank {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #edeff7;
  color: #606981;
  font-size: 12px;
  font-weight: 900;
}

.store-name,
.row-metric {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.store-name strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-name span {
  color: var(--muted);
  font-size: 10px;
}

.row-metric {
  justify-items: end;
}

.row-metric strong {
  font-size: 14px;
}

.rank-move {
  min-width: 30px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 900;
}

.rank-move.up,
.rank-move.new {
  background: #eaf9f3;
  color: #168a5e;
}

.rank-move.down {
  background: #fff0f2;
  color: #d6455a;
}

.rank-move.flat {
  background: #eef0f5;
  color: #858da1;
}

.upload-summary {
  padding: 14px;
  border: 1px solid #e6e8ef;
  border-radius: 16px;
  background: #fafbfe;
}

.upload-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 13px;
  border-bottom: 1px solid #e5e7ee;
}

.upload-status > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-weight: 950;
}

.upload-status.complete > span {
  background: #e5f8f0;
  color: #168a5e;
}

.upload-status.waiting > span {
  background: #fff0dc;
  color: #dc7b13;
}

.upload-status div {
  display: grid;
  gap: 3px;
}

.upload-status small,
.upload-summary dt {
  color: var(--muted);
  font-size: 10px;
}

.upload-status strong {
  font-size: 13px;
}

.upload-summary dl {
  display: grid;
  gap: 8px;
  margin: 13px 0 0;
}

.upload-summary dl div {
  min-width: 0;
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 8px;
}

.upload-summary dd {
  margin: 0;
  overflow: hidden;
  color: #5e667b;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trend-card {
  margin-top: 13px;
  padding: 15px 15px 8px;
  border: 1px solid #e5e3f8;
  border-radius: 16px;
  background: linear-gradient(145deg, #fbfaff, #f6f5ff);
}

.trend-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.trend-heading div {
  display: grid;
  gap: 4px;
}

.trend-heading span,
.trend-heading small {
  color: var(--muted);
  font-size: 10px;
}

.trend-heading strong {
  color: #584bc9;
  font-size: 20px;
}

#trend-chart {
  position: relative;
  height: 104px;
  margin-top: 4px;
}

.trend-hit {
  cursor: crosshair;
  pointer-events: all;
}

.trend-hit:hover {
  fill: rgba(255, 189, 47, 0.25);
  stroke: #ffbd2f;
  stroke-width: 2;
}

.trend-tooltip {
  position: absolute;
  z-index: 3;
  display: grid;
  gap: 2px;
  min-width: 92px;
  padding: 7px 9px;
  border: 1px solid #dfdcf6;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.97);
  color: #2f3146;
  box-shadow: 0 8px 22px rgba(35, 31, 78, 0.18);
  transform: translate(-50%, calc(-100% - 10px));
  pointer-events: none;
  white-space: nowrap;
}

.trend-tooltip[hidden] {
  display: none;
}

.trend-tooltip strong {
  font-size: 10px;
}

.trend-tooltip span {
  color: #6457df;
  font-size: 11px;
  font-weight: 850;
}

#trend-chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.insight-list {
  display: grid;
}

.insight-list article {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #eceef4;
}

.insight-icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 900;
}

.insight-icon.positive {
  background: #e7f8f1;
  color: #12845a;
}

.insight-icon.danger {
  background: #fff0f2;
  color: #d8475b;
}

.insight-icon.new {
  background: #fff1df;
  color: #dd7811;
}

.insight-icon.neutral {
  background: #eeecff;
  color: #6254e7;
}

.insight-list article div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.insight-list small,
.insight-list p {
  color: var(--muted);
  font-size: 10px;
}

.insight-list strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insight-list p {
  margin: 0;
}

.definition-note {
  margin-top: 17px;
  padding: 15px;
  border: 1px solid #e3e0fb;
  border-radius: 14px;
  background: #f7f6ff;
}

.definition-note strong {
  color: #5247bd;
  font-size: 12px;
}

.definition-note p {
  margin: 6px 0 0;
  color: #6d7290;
  font-size: 11px;
  line-height: 1.65;
}

.empty-state {
  min-height: 390px;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 40px;
  border: 1px dashed #d8dce8;
  border-radius: 17px;
  background: #fafbfe;
  text-align: center;
}

.empty-state > span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: #eeecff;
  color: var(--purple);
  font-size: 26px;
}

.empty-state h3 {
  margin: 14px 0 5px;
}

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

.detail-section,
.product-section {
  margin-top: 20px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid #eceef4;
  text-align: left;
  font-size: 12px;
}

th {
  color: #7a8297;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

tbody tr:hover {
  background: #fafbfe;
}

.table-rank.top-1 {
  background: #fff1a8;
  color: #865d00;
}

.table-rank.top-2 {
  background: #e4eaf0;
  color: #526477;
}

.table-rank.top-3 {
  background: #ffe0bd;
  color: #a65400;
}

.up-text {
  color: #168a5e;
  font-weight: 800;
}

.down-text {
  color: var(--red);
  font-weight: 800;
}

.new-count {
  display: inline-flex;
  min-width: 28px;
  justify-content: center;
  padding: 4px 7px;
  border-radius: 8px;
  background: #fff0dd;
  color: #d77610;
  font-weight: 850;
}

.product-heading {
  align-items: flex-end;
}

.product-filters {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.product-filters select {
  min-width: 135px;
}

.product-filters input[type="search"] {
  width: 230px;
}

.product-export-button {
  min-height: 44px;
  white-space: nowrap;
}

.check-filter {
  height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid #dde0e9;
  border-radius: 11px;
  background: #fafbfe;
  color: #656d82;
  font-size: 11px;
}

.check-filter input {
  accent-color: var(--purple);
}

.title-cell {
  max-width: 620px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.new-tag,
.normal-tag {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 800;
}

.new-tag {
  background: #fff0dd;
  color: #d77610;
}

.normal-tag {
  background: #eef1f5;
  color: #727b8e;
}

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

.product-pagination {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto minmax(210px, 1fr);
  align-items: center;
  gap: 16px;
  padding: 20px 4px 2px;
  color: var(--muted);
  font-size: 12px;
}

.pagination-pages,
.pagination-jump {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.pagination-jump {
  justify-content: flex-end;
}

.product-pagination button,
.product-pagination input {
  min-width: 34px;
  height: 36px;
  border: 1px solid #dfe2ed;
  border-radius: 9px;
  background: #fff;
  color: #555f75;
  font: inherit;
  font-weight: 800;
}

.product-pagination button {
  padding: 0 11px;
  cursor: pointer;
}

.product-pagination button:hover:not(:disabled),
.product-pagination button.active {
  border-color: #8175ef;
  background: #6657e8;
  color: #fff;
}

.product-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.product-pagination input {
  width: 62px;
  padding: 0 8px;
  text-align: center;
}

.pagination-ellipsis {
  min-width: 18px;
  text-align: center;
}

@media (max-width: 1180px) {
  .product-pagination {
    grid-template-columns: 1fr;
  }

  .pagination-summary,
  .pagination-jump {
    justify-self: center;
  }
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 4px 0;
  color: var(--muted);
}

footer > div:first-child {
  display: grid;
  gap: 4px;
}

footer strong {
  color: #545c70;
  font-size: 12px;
}

footer span,
.footer-link {
  font-size: 10px;
}

.footer-link {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6759df;
}

.settings-dialog {
  width: min(540px, calc(100% - 40px));
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: transparent;
  box-shadow: 0 30px 100px rgba(25, 28, 52, 0.35);
}

.settings-dialog::backdrop {
  background: rgba(17, 20, 36, 0.62);
  backdrop-filter: blur(5px);
}

.dialog-shell {
  padding: 25px;
  border-radius: 22px;
  background: white;
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.dialog-header h2 {
  margin: 0;
  font-size: 22px;
}

.dialog-header p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: #f0f2f6;
  color: #6b7285;
  font-size: 22px;
}

.switch-row,
.field-row {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid #eceef3;
}

.switch-row > div {
  display: grid;
  gap: 4px;
}

.switch-row strong,
.field-row > span {
  font-size: 13px;
}

.switch-row span {
  color: var(--muted);
  font-size: 10px;
}

.switch-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--purple);
}

.field-row input {
  width: 140px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
}

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

.analytics-grid .analysis-panel {
  min-width: 0;
  margin-top: 0;
}

.analytics-heading {
  align-items: flex-end;
}

.analytics-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.analytics-controls select,
.price-band-panel select {
  height: 38px;
  min-width: 140px;
  padding: 0 11px;
  border: 1px solid #dde0e9;
  border-radius: 10px;
  background: white;
  color: var(--ink);
}

.range-toggle {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  background: #f0f1f7;
}

.range-toggle button {
  min-width: 56px;
  height: 31px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #72798c;
  font-size: 11px;
  font-weight: 850;
}

.range-toggle button.active {
  background: white;
  color: #5548ce;
  box-shadow: 0 4px 12px rgba(58, 53, 113, 0.1);
}

.alert-list,
.score-list {
  display: grid;
  gap: 9px;
}

.alert-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 12px;
  border: 1px solid #f0dadd;
  border-radius: 13px;
  background: #fff9fa;
}

.alert-item.high {
  border-color: #f4c7ce;
  background: #fff3f5;
}

.alert-item .alert-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #ffe3e7;
  color: #d94257;
  font-size: 18px;
  font-weight: 950;
}

.alert-item > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.alert-item strong {
  font-size: 13px;
}

.alert-item p,
.alert-item small {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.alert-item > b {
  color: #d94257;
  font-size: 15px;
}

.analysis-empty {
  display: grid;
  place-items: center;
  min-height: 114px;
  padding: 20px;
  border: 1px dashed #dfe3ec;
  border-radius: 13px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.score-row {
  display: grid;
  grid-template-columns: 42px minmax(82px, 1fr) minmax(120px, 1.6fr) 42px;
  gap: 10px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid #e8e9f1;
  border-radius: 12px;
}

.score-position {
  color: #8a91a3;
  font-size: 11px;
  font-weight: 850;
}

.score-row strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-progress {
  width: 100%;
  height: 8px;
  appearance: none;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #eeeef5;
}

.score-progress::-webkit-progress-bar {
  border-radius: 999px;
  background: #eeeef5;
}

.score-progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, #6a5be9, #35b98a);
}

.score-value {
  width: 42px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #eeecff;
  color: #5c4edb;
  font-size: 13px;
  font-weight: 950;
}

.score-value.grade-A {
  background: #e6f8f0;
  color: #13855a;
}

.score-value.grade-D {
  background: #fff0f2;
  color: #d44459;
}

.trend-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.trend-metric-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid #e6e5f5;
  border-radius: 15px;
  background: linear-gradient(145deg, #fbfaff, #f7f8ff);
}

.trend-metric-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.trend-metric-card header > div {
  display: grid;
  gap: 4px;
}

.trend-metric-card small {
  color: var(--muted);
  font-size: 10px;
}

.trend-metric-card strong {
  font-size: 21px;
}

.trend-sparkline {
  height: 70px;
  margin-top: 8px;
}

.trend-sparkline svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.operations-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.75fr);
}

.heatmap-wrap {
  overflow-x: auto;
  padding-bottom: 5px;
}

.peak-time-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 17px;
}

.peak-time-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 4px 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e6e7f1;
  border-radius: 13px;
  background: linear-gradient(145deg, #fbfaff, #f5f5ff);
}

.peak-time-card > span {
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #6657e8;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
}

.peak-time-card.rank-1 > span {
  background: #ffb52a;
  color: #49310b;
}

.peak-time-card.rank-2 > span {
  background: #8a7ff0;
}

.peak-time-card strong {
  font-size: 13px;
}

.peak-time-card b {
  color: #5b4fe0;
  font-size: 13px;
  text-align: right;
}

.peak-time-card small {
  grid-column: 2 / span 2;
  color: var(--muted);
  font-size: 9px;
}

.heatmap-grid {
  min-width: 940px;
  display: grid;
  grid-template-columns: 90px repeat(24, 29px) 54px;
  gap: 4px;
  align-items: center;
}

.heatmap-label,
.heatmap-total {
  overflow: hidden;
  color: #656d80;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heatmap-hour {
  color: #9298a8;
  font-size: 8px;
  text-align: center;
}

.heatmap-cell {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: #332a63;
  font-size: 8px;
  font-weight: 850;
}

.heatmap-cell.heat-0 { background: rgba(102, 87, 232, 0.06); }
.heatmap-cell.heat-1 { background: rgba(102, 87, 232, 0.14); }
.heatmap-cell.heat-2 { background: rgba(102, 87, 232, 0.22); }
.heatmap-cell.heat-3 { background: rgba(102, 87, 232, 0.30); }
.heatmap-cell.heat-4 { background: rgba(102, 87, 232, 0.38); }
.heatmap-cell.heat-5 { background: rgba(102, 87, 232, 0.46); }
.heatmap-cell.heat-6 { background: rgba(102, 87, 232, 0.54); color: #fff; }
.heatmap-cell.heat-7 { background: rgba(102, 87, 232, 0.62); color: #fff; }
.heatmap-cell.heat-8 { background: rgba(102, 87, 232, 0.70); color: #fff; }
.heatmap-cell.heat-9 { background: rgba(102, 87, 232, 0.82); color: #fff; }

.heatmap-cell.peak {
  outline: 2px solid #ffb52a;
  outline-offset: 1px;
}

.price-band-list {
  display: grid;
  gap: 12px;
}

.price-average-summary {
  display: grid;
  grid-template-columns: minmax(115px, 1fr) auto;
  gap: 2px 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #6657e8, #8777ee);
  color: #fff;
}

.price-average-summary > span {
  display: grid;
  gap: 2px;
  font-size: 12px;
  font-weight: 850;
}

.price-average-summary > span small,
.price-average-summary > small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 9px;
  font-weight: 500;
}

.price-average-summary > strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  font-size: 21px;
}

.price-band-card {
  padding: 14px;
  border: 1px solid #e7e9f0;
  border-radius: 14px;
  background: #fafbfe;
}

.price-band-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.price-band-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 12px;
}

.price-band-card header strong {
  font-size: 13px;
}

.price-band-card header span {
  color: #6356dc;
  font-size: 11px;
  font-weight: 850;
}

.price-band-progress {
  width: 100%;
  height: 8px;
  margin: 11px 0;
  appearance: none;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #eceef3;
}

.price-band-progress::-webkit-progress-bar {
  border-radius: 999px;
  background: #eceef3;
}

.price-band-progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, #695ae9, #ffb732);
}

.price-band-metrics div {
  display: grid;
  gap: 3px;
  padding: 7px 8px;
  border-radius: 9px;
  background: #f2f3f8;
}

.price-band-metrics small {
  color: var(--muted);
  font-size: 9px;
}

.price-band-metrics b {
  font-size: 12px;
}

.mover-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.mover-column {
  min-width: 0;
  padding: 16px;
  border: 1px solid #e7e9f0;
  border-radius: 16px;
  background: #fafbfe;
}

.mover-column h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 15px;
}

.mover-column h3 span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #e7f8f1;
  color: #13865a;
}

.mover-column.falling h3 span {
  background: #fff0f2;
  color: #d54559;
}

.mover-item {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) 92px;
  gap: 12px;
  align-items: start;
  padding: 13px 0;
  border-bottom: 1px solid #e9ebf1;
}

.mover-item:last-child {
  border-bottom: 0;
}

.mover-rank {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: white;
  color: #737b8e;
  font-size: 10px;
  font-weight: 900;
}

.mover-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.mover-copy strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mover-copy small {
  color: var(--muted);
  font-size: 9px;
}

.mover-baseline {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 3px;
}

.mover-baseline span {
  padding: 4px 7px;
  border-radius: 7px;
  background: #f0f1f6;
  color: #737b8e;
  font-size: 9px;
}

.mover-baseline b {
  color: #2a2e40;
  font-size: 10px;
}

.mover-metrics {
  display: grid;
  gap: 2px;
  text-align: right;
}

.mover-metrics b {
  font-size: 13px;
}

.mover-metrics small {
  color: var(--muted);
  font-size: 9px;
}

.mover-metrics span {
  font-size: 10px;
  font-weight: 850;
}

@media (max-width: 1240px) {
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .analytics-grid,
  .operations-grid {
    grid-template-columns: 1fr;
  }

  .insight-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 0 20px;
  }
}

@media (max-width: 700px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand {
    display: none;
  }

  .login-card {
    min-height: 440px;
    padding: 34px;
  }
}
