:root {
  --bg-1: #0f172a;
  --bg-2: #1e293b;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.18);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-2: #2563eb;
  --success: #0f766e;
  --danger: #f87171;
  --shadow: 0 25px 60px rgba(15, 23, 42, 0.35);
  --glass-blur: blur(18px);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --transition: 220ms ease;
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  color: var(--text-primary);
}

body {
  position: relative;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: none;
}

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

.app-shell {
  position: relative;
  width: 100%;
  height: 100%;
}

.background-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 1) 35%, rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
  z-index: 0;
}

.admin-entry {
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 6px;
  align-self: flex-start;
  color: #e5edf6;
  text-decoration: none;
  background: transparent;
  font-size: 15px;
  font-weight: 800;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.admin-entry i {
  font-size: 19px;
}

.admin-entry:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-bottom-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sidebar-db-status {
  min-height: 34px;
  padding: 0 10px;
  background: rgba(236, 253, 245, 0.08);
  border-color: rgba(153, 246, 228, 0.32);
  color: #99f6e4;
  font-size: 12px;
}

.login-page,
.front-page,
.admin-page {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.login-page {
  overflow: hidden;
}

.login-backdrop,
.login-background-image,
.login-background-mask,
.login-background-glow {
  position: absolute;
  inset: 0;
}

.login-background-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.88) blur(1px);
  transform: scale(1.03);
}

.login-background-mask {
  background:
    linear-gradient(90deg, rgba(44, 68, 55, 0.52) 0%, rgba(113, 145, 124, 0.26) 34%, rgba(255, 251, 245, 0.42) 68%, rgba(255, 252, 248, 0.64) 100%),
    rgba(255, 255, 255, 0.06);
}

.login-background-glow {
  background:
    radial-gradient(circle at 70% 18%, rgba(255, 255, 255, 0.38), transparent 26%),
    radial-gradient(circle at 55% 52%, rgba(226, 232, 240, 0.16), transparent 22%);
}

.login-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.user-login-card {
  width: min(380px, calc(100vw - 48px));
  padding: 34px 32px 28px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.15));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(60, 82, 67, 0.18), 0 12px 30px rgba(59, 130, 246, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #435045;
}

.user-login-logo {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #b73c3c;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.user-login-eyebrow {
  margin: 14px 0 0;
  font-size: 12px;
  letter-spacing: 0.24em;
  color: rgba(67, 80, 69, 0.72);
}

.user-login-title {
  margin: 12px 0 0;
  font-size: 40px;
  line-height: 1.1;
  font-weight: 800;
  color: #4a4f45;
}

.user-login-subtitle {
  margin: 12px 0 0;
  font-size: 15px;
  color: rgba(74, 79, 69, 0.72);
}

.user-login-fields {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 28px;
}

.user-login-input {
  width: 100%;
  height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.34);
  color: #4c5347;
  padding: 0 18px;
  outline: none;
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.1);
}

.user-login-input::placeholder {
  color: rgba(87, 95, 86, 0.62);
}

.user-login-input:focus {
  border-color: rgba(90, 123, 98, 0.52);
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 0 0 4px rgba(105, 140, 113, 0.12);
}

.user-login-submit {
  margin-top: 24px;
  min-width: 120px;
  height: 48px;
  padding: 0 28px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(105, 118, 96, 0.94), rgba(83, 97, 77, 0.98));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(71, 85, 68, 0.2);
  transition: all var(--transition);
}

.user-login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(71, 85, 68, 0.26);
}

.user-login-helper,
.user-login-message,
.user-login-footer {
  width: 100%;
}

.user-login-helper {
  margin: 20px 0 0;
  font-size: 14px;
  color: rgba(67, 80, 69, 0.64);
}

.user-login-message {
  min-height: 18px;
  margin-top: 10px;
  color: #a63f3f;
}

.user-login-divider {
  width: 100%;
  height: 1px;
  margin: 22px 0 18px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
}

.user-login-footer {
  min-width: 250px;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(67, 80, 69, 0.72);
  font-size: 14px;
}

.front-page {
  display: flex;
  flex-direction: column;
}

.banner-section {
  position: relative;
  height: 40vh;
  min-height: 320px;
  overflow: hidden;
}

.banner-image-wrap,
.banner-image,
.banner-overlay {
  position: absolute;
  inset: 0;
}

.banner-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-overlay {
  background: rgba(0, 0, 0, 0.3);
}

.banner-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  height: 100%;
  text-align: center;
  padding: 24px;
}

.banner-eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.38em;
  color: rgba(226, 232, 240, 0.92);
}

.banner-title {
  margin: 0;
  font-size: 48px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.03em;
}

.banner-subtitle {
  margin: 0;
  font-size: 20px;
  color: #dbe2ea;
}

.portal-section {
  position: relative;
  height: 60vh;
  min-height: 440px;
  padding: 32px 40px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-grid {
  width: min(1280px, 100%);
  height: min(100%, 100%);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  grid-auto-rows: minmax(150px, 1fr);
  gap: 24px;
}

.portal-card,
.option-card,
.sort-item,
.glass-panel,
.editor-block,
.direct-link-card,
.nested-card {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow);
}

.portal-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
}

.portal-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -50% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.22), transparent 72%);
  pointer-events: none;
}

.portal-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(96, 165, 250, 0.45);
  box-shadow: 0 24px 48px rgba(37, 99, 235, 0.28);
}

.portal-card-test {
  border-color: rgba(52, 211, 153, 0.28);
}

.portal-card-test::after {
  background: radial-gradient(circle, rgba(52, 211, 153, 0.24), transparent 72%);
}

.portal-card-icon {
  font-size: 34px;
  color: #7dd3fc;
}

.portal-card-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
}

.portal-card-description {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.dashboard-page {
  display: grid;
  grid-template-columns: 204px minmax(0, 1fr);
  background:
    linear-gradient(90deg, #0f172a 0, #0f172a 204px, #f6f7f9 204px, #f6f7f9 100%);
  color: #172033;
  overflow: hidden;
}

.dashboard-sidebar {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 28px 16px;
  background: #101820;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
}

.brand-block > div {
  min-width: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #f8fafc;
  object-fit: cover;
  display: block;
}

.brand-kicker {
  margin: 0 0 5px;
  color: #94a3b8;
  font-size: 11px;
  letter-spacing: 0.14em;
}

.brand-block h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1;
}

.dashboard-nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: 8px;
  color: #cbd5e1;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-item.active i {
  color: #34d399;
}

.sidebar-status {
  margin-top: auto;
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 10px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.sidebar-status strong {
  display: block;
  color: #fff;
  font-size: 14px;
}

.sidebar-status p {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

.status-dot {
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.14);
}

.dashboard-main {
  height: 100%;
  overflow-y: auto;
  padding: 18px 28px 28px;
  background:
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    #f6f7f9;
  background-size: 24px 24px;
}

.dashboard-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 20px;
  margin-bottom: 10px;
}

.dashboard-topbar .banner-eyebrow,
.hero-label,
.section-kicker {
  margin: 0 0 8px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.dashboard-topbar .banner-title {
  margin: 0;
  color: #111827;
  font-size: 32px;
  line-height: 1.18;
  letter-spacing: 0;
}

.dashboard-topbar .banner-subtitle {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 15px;
}

.topbar-actions,
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.icon-btn,
.filter-pill,
.status-pill,
.primary-link,
.secondary-link,
.text-link {
  min-height: 38px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
}

.icon-btn {
  width: 38px;
  color: #334155;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.filter-pill {
  padding: 0 14px;
  color: #475569;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.filter-pill.active {
  color: #fff;
  background: #111827;
  border-color: #111827;
}

.status-pill {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #d7dde5;
  color: #475569;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

.status-pill.ready {
  color: #0f766e;
  border-color: #99f6e4;
  background: #ecfdf5;
}

.command-hero {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(420px, 0.95fr);
  gap: 18px;
  margin-bottom: 18px;
}

.hero-copy,
.hero-metrics,
.metrics-overview,
.owner-briefing,
.dashboard-grid-section,
.database-catalog-panel,
.promo-panel {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.hero-copy {
  min-height: 280px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(16, 24, 32, 0.94), rgba(15, 118, 110, 0.86)),
    #101820;
  color: #fff;
}

.hero-copy h3 {
  max-width: 780px;
  margin: 0;
  font-size: 34px;
  line-height: 1.18;
}

.hero-copy p:last-of-type {
  max-width: 700px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.8;
}

.hero-actions {
  margin-top: 24px;
}

.primary-link {
  padding: 0 16px;
  color: #0f172a;
  background: #fff;
  font-weight: 800;
}

.secondary-link {
  padding: 0 16px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: #e2e8f0;
}

.metric-tile {
  min-height: 138px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #fff;
}

.metric-tile span,
.metric-tile em {
  color: #64748b;
  font-size: 13px;
  font-style: normal;
}

.metric-tile strong {
  color: #111827;
  font-size: 30px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.metric-tile.strong strong {
  color: #0f766e;
}

.metrics-overview {
  position: relative;
  z-index: 3;
  display: block;
  padding: 22px;
  background: rgba(255, 255, 255, 0.94);
  overflow: visible;
}

.metrics-overview-head {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.metrics-overview-head h3 {
  margin: 0;
  color: #111827;
  font-size: 26px;
  line-height: 1.18;
}

.metrics-overview-head span {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.metric-filter-bar {
  position: relative;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.metric-filter-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.metric-filter-control > span {
  color: #111827;
  font-size: 14px;
  font-weight: 800;
}

.metric-filter-btn {
  min-width: 168px;
  height: 38px;
  padding: 0 36px 0 13px;
  border: 1px solid #d7dde5;
  border-radius: 6px;
  color: #334155;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.metric-filter-btn {
  position: relative;
  cursor: pointer;
}

.metric-filter-btn::after {
  content: "\f107";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

.metric-filter-control.compact .metric-month-input {
  min-width: 138px;
  padding-right: 10px;
}

.time-filter-btn {
  min-width: 142px;
}

.metric-filter-panel {
  position: fixed;
  top: 118px;
  right: 48px;
  z-index: 9999;
  width: min(980px, calc(100vw - 430px));
  height: min(560px, calc(100vh - 150px));
  min-height: 300px;
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.metric-filter-panel.product-panel {
  grid-template-columns: repeat(3, minmax(210px, 1fr));
  width: min(840px, calc(100vw - 430px));
}

.time-filter-panel {
  position: fixed;
  top: 118px;
  right: 48px;
  z-index: 9999;
  width: min(920px, calc(100vw - 430px));
  min-height: 320px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.time-filter-tabs {
  height: 52px;
  display: flex;
  justify-content: center;
  gap: 34px;
  border-bottom: 1px solid #e5e7eb;
}

.time-filter-tabs button {
  position: relative;
  color: #111827;
  font-size: 16px;
  font-weight: 800;
  background: transparent;
  cursor: pointer;
}

.time-filter-tabs button.active {
  color: #2563eb;
}

.time-filter-tabs button.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: #3b82f6;
}

.time-filter-display {
  margin: 12px 16px 10px;
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #d7dde5;
  border-radius: 7px;
  color: #111827;
  font-size: 15px;
  font-weight: 700;
}

.time-filter-body {
  padding: 0 16px 16px;
}

.day-range-display {
  height: 36px;
  display: grid;
  grid-template-columns: minmax(170px, 1fr) 32px minmax(170px, 1fr) 28px;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 0 12px;
  border: 1px solid #d7dde5;
  border-radius: 8px;
  color: #111827;
  font-size: 15px;
  font-weight: 700;
}

.day-range-display i {
  color: #a3a8b1;
  text-align: center;
}

.day-picker-shell {
  display: grid;
  grid-template-columns: 132px 1fr;
  min-height: 330px;
  border: 1px solid #e1e5eb;
  border-radius: 8px;
  overflow: hidden;
}

.day-picker-shell .time-shortcuts {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  margin: 0;
  padding: 14px 12px;
  border-right: 1px solid #e5e7eb;
}

.day-picker-shell .time-shortcuts button {
  justify-content: flex-start;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  color: #111827;
  background: transparent;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
}

.day-picker-shell .time-shortcuts button:hover {
  background: #f1f5f9;
}

.day-calendar-panel {
  min-width: 0;
  background: #fff;
}

.day-calendar-toolbar {
  height: 42px;
  display: grid;
  grid-template-columns: 34px 34px 1fr 34px 34px;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid #e5e7eb;
}

.day-calendar-toolbar button {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: #8b949e;
  background: transparent;
  cursor: pointer;
}

.day-calendar-toolbar button:hover {
  color: #2563eb;
  background: #eef4ff;
}

.day-calendar-double {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 24px;
  padding: 14px 20px 18px;
}

.day-calendar-title {
  margin-bottom: 12px;
  color: #111827;
  text-align: center;
  font-size: 17px;
  font-weight: 900;
}

.day-weekdays,
.day-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.day-weekdays span {
  height: 26px;
  color: #111827;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
}

.day-calendar-grid {
  gap: 6px 0;
}

.day-cell {
  position: relative;
  height: 30px;
  border-radius: 0;
  color: #111827;
  background: #f8fafc;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.day-cell:hover:not(:disabled) {
  color: #2563eb;
  background: #eef4ff;
}

.day-cell.in-range {
  background: #eaf2ff;
}

.day-cell.range-start,
.day-cell.range-end {
  color: #fff;
  background: #3f6fe5;
}

.day-cell.range-start {
  border-radius: 7px 0 0 7px;
}

.day-cell.range-end {
  border-radius: 0 7px 7px 0;
}

.day-cell.range-start.range-end {
  border-radius: 7px;
}

.day-cell.muted,
.day-cell.disabled {
  color: #b7b7b7;
  background: #f3f4f6;
}

.day-cell:disabled {
  cursor: not-allowed;
}

.time-year-row {
  height: 48px;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  text-align: center;
}

.time-year-row button {
  color: #94a3b8;
  background: transparent;
  cursor: pointer;
}

.time-grid {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 0 0 8px 8px;
}

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

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

.time-grid button,
.time-shortcuts button {
  min-height: 36px;
  border-radius: 6px;
  color: #111827;
  background: #f8fafc;
  font-weight: 700;
  cursor: pointer;
}

.time-grid button.active,
.time-shortcuts button.active {
  color: #fff;
  background: #3b82f6;
}

.time-grid button:disabled {
  color: #a3a3a3;
  background: #f5f5f5;
  cursor: not-allowed;
}

.time-shortcuts {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.time-shortcuts button {
  padding: 0 12px;
}

.filter-column {
  min-width: 0;
  max-height: 100%;
  overflow-y: auto;
  border-right: 1px solid #e2e8f0;
  background: #fff;
}

.filter-column:last-child {
  border-right: 0;
}

.filter-column > strong {
  display: block;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  color: #1f2937;
  font-size: 15px;
}

.filter-option {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  color: #111827;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.filter-option:hover,
.filter-option.active {
  background: #eef8fb;
}

.filter-option.active {
  color: #2563eb;
  font-weight: 800;
}

.filter-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-check {
  width: 14px;
  height: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  display: grid;
  place-items: center;
  background: #fff;
  color: #fff;
  font-size: 9px;
}

.filter-option.active .filter-check {
  border-color: #3b82f6;
  background: #3b82f6;
}

.filter-option.active .fa-chevron-right {
  color: #3b82f6;
}

.business-metric-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.business-metric-card {
  width: 100%;
  min-height: 168px;
  padding: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #fff;
  overflow: hidden;
  color: inherit;
  font: inherit;
  text-align: left;
  appearance: none;
}

button.business-metric-card {
  cursor: pointer;
}

button.business-metric-card:hover {
  border-color: #bfd0e3;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

button.business-metric-card:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 3px;
}

.metric-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.business-metric-card span {
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.metric-card-head small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.metric-card-head small b {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 5px;
  color: #2563eb;
  background: #e8eefc;
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.business-metric-card strong {
  margin: 18px 0 14px;
  color: #0f172a;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.metric-comparisons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
}

.metric-compare {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 4px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.2;
  font-style: normal;
  white-space: nowrap;
}

.metric-compare:nth-child(2) {
  justify-self: end;
}

.metric-compare b {
  color: #94a3b8;
  font-weight: 700;
}

.metric-compare i {
  color: inherit;
  font-style: normal;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.metric-compare .fa-solid {
  font-size: 10px;
}

.metric-compare.positive {
  color: #b91c1c;
}

.metric-compare.negative {
  color: #2f855a;
}

.metric-compare.neutral {
  color: #94a3b8;
}

.business-metric-card.metric-tone-1 {
  border-top: 4px solid #0f766e;
}

.business-metric-card.metric-tone-2 {
  border-top: 4px solid #334155;
}

.business-metric-card.metric-tone-3 {
  border-top: 4px solid #b45309;
}

.business-metric-card.metric-tone-4 {
  border-top: 4px solid #7c3aed;
}

.business-metric-card.metric-tone-5 {
  border-top: 4px solid #be123c;
}

.business-metric-card.is-loading {
  color: transparent;
  background:
    linear-gradient(90deg, rgba(226, 232, 240, 0.45), rgba(248, 250, 252, 0.95), rgba(226, 232, 240, 0.45)),
    #fff;
  background-size: 220% 100%;
  animation: metricPulse 1.2s ease-in-out infinite;
}

.business-metric-card.is-loading span,
.business-metric-card.is-loading strong,
.business-metric-card.is-loading small {
  color: transparent;
}

.business-trend-loading {
  min-height: 330px;
  display: grid;
  place-items: center;
  color: #64748b;
  font-size: 14px;
  font-weight: 900;
}

@keyframes metricPulse {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.achievement-panel {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid #e5edf4;
}

.achievement-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.achievement-head p {
  margin: 0 0 6px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.22em;
}

.achievement-head h4 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
  letter-spacing: 0;
}

.achievement-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 16px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.achievement-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.achievement-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.achievement-legend .target {
  background: #16a37a;
}

.achievement-legend .sales {
  background: #33465a;
}

.achievement-legend .rate {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #84bfa6;
}

.achievement-chart {
  min-height: 330px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.74), rgba(255, 255, 255, 0.98));
  overflow: hidden;
}

.chart-loading {
  min-height: 330px;
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
}

.achievement-svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-grid-line {
  stroke: #e7edf3;
  stroke-width: 1;
}

.chart-axis-line {
  stroke: #d7e0ea;
  stroke-width: 1;
}

.chart-axis-label,
.chart-month {
  fill: #94a3b8;
  font-size: 12px;
  font-weight: 800;
}

.chart-bar.target {
  fill: url(#targetGradient);
}

.chart-bar.sales {
  fill: url(#salesGradient);
}

.chart-value {
  font-size: 11px;
  font-weight: 800;
}

.chart-value.target {
  fill: #168466;
}

.chart-value.sales {
  fill: #33465a;
}

.chart-rate-line {
  stroke: #83bfa5;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-rate-dot {
  fill: #83bfa5;
  stroke: #fff;
  stroke-width: 2;
}

.chart-rate-label {
  fill: #74ad95;
  font-size: 12px;
  font-weight: 900;
}

.dashboard-grid-section {
  padding: 22px;
  margin-bottom: 18px;
}

.platform-filter-group,
.product-filter-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
  flex-wrap: wrap;
}

.platform-view-tabs {
  display: flex;
  gap: 18px;
  margin-top: 16px;
  border-bottom: 1px solid #e8eef5;
}

.platform-view-tabs button {
  position: relative;
  height: 34px;
  padding: 0 0 10px;
  border: 0;
  color: #718096;
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.platform-view-tabs button:hover {
  color: #0f172a;
}

.platform-view-tabs button:active {
  transform: translateY(1px);
}

.platform-view-tabs button.active {
  color: #0f766e;
}

.platform-view-tabs button.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 999px;
  background: #0f766e;
}

.platform-period-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(62px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid #dbe5ee;
  border-radius: 8px;
  background: #f6f8fb;
}

.platform-period-toggle button {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  color: #64748b;
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform 180ms ease,
    color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.platform-period-toggle button:hover {
  color: #0f172a;
}

.platform-period-toggle button:active {
  transform: translateY(1px);
}

.platform-period-toggle button.active {
  color: #0f766e;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.platform-period-select {
  width: 136px;
  height: 42px;
  padding: 0 34px 0 14px;
  border: 1px solid #dbe5ee;
  border-radius: 8px;
  color: #142033;
  background: #fff;
  font-size: 13px;
  font-weight: 900;
  outline: none;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

#productPlatformSelect {
  width: 126px;
}

.platform-period-select:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.platform-analysis-panel {
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.25fr);
  gap: 14px;
}

.platform-analysis-loading {
  grid-column: 1 / -1;
  min-height: 330px;
  display: grid;
  place-items: center;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #94a3b8;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 900;
}

.platform-share-card,
.platform-progress-card {
  min-width: 0;
  border: 1px solid #e1e9f1;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.78));
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.055);
}

.platform-card-head {
  min-height: 74px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid #e8eef5;
}

.platform-card-head div {
  display: grid;
  gap: 6px;
}

.platform-card-head span {
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.platform-card-head strong {
  color: #0f172a;
  font-size: 18px;
  line-height: 1.2;
}

.platform-card-head em {
  color: #7b8ca3;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.platform-share-body {
  min-height: 278px;
  display: grid;
  grid-template-columns: minmax(174px, 0.75fr) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 20px 18px 18px;
}

.platform-donut {
  width: min(100%, 214px);
  aspect-ratio: 1;
  justify-self: center;
  display: grid;
  place-items: center;
  border-radius: 50%;
  position: relative;
  box-shadow:
    inset 0 0 0 1px rgba(15, 23, 42, 0.04),
    0 18px 34px rgba(15, 23, 42, 0.08);
}

.platform-donut::before {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: #fbfdff;
  box-shadow: inset 0 0 0 1px #e5edf4;
}

.platform-donut div {
  position: relative;
  z-index: 1;
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  text-align: center;
}

.platform-donut strong {
  color: #0f172a;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0;
}

.platform-donut span {
  color: #8494a8;
  font-size: 12px;
  font-weight: 900;
}

.platform-share-list {
  display: grid;
  gap: 9px;
}

.platform-share-row {
  display: grid;
  grid-template-columns: 10px minmax(68px, 1fr) auto 46px;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 7px 8px;
  border-radius: 8px;
  color: #475569;
  background: rgba(255, 255, 255, 0.72);
}

.platform-share-row i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.platform-share-row span,
.platform-share-row strong,
.platform-share-row em {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.platform-share-row span {
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.platform-share-row strong {
  color: #0f172a;
  font-size: 13px;
}

.platform-share-row em {
  justify-self: end;
  color: #7b8ca3;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.platform-progress-list {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.platform-progress-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.72fr) minmax(180px, 1.3fr) minmax(92px, 0.48fr);
  align-items: center;
  gap: 14px;
  min-height: 54px;
}

.platform-progress-meta,
.platform-progress-rate {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.platform-progress-meta strong,
.platform-progress-rate strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-progress-meta span,
.platform-progress-rate span {
  overflow: hidden;
  color: #7b8ca3;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-progress-rate {
  text-align: right;
}

.platform-progress-track {
  height: 12px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(226, 232, 240, 0.72), rgba(241, 245, 249, 0.94));
  position: relative;
  overflow: hidden;
}

.platform-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b95e59, #d4954b);
}

.platform-progress-row.near .platform-progress-track i {
  background: linear-gradient(90deg, #d4954b, #b8a85d);
}

.platform-progress-row.over .platform-progress-track i {
  background: linear-gradient(90deg, #0f766e, #22ab83);
}

.platform-progress-row.no-target .platform-progress-track i {
  background: #cbd5e1;
}

.platform-progress-row.loss .platform-progress-track i {
  background: linear-gradient(90deg, #a75d5d, #c86d63);
}

.profit-donut::before {
  background: #fcfdfb;
}

.platform-progress-track b {
  position: absolute;
  top: -5px;
  bottom: -5px;
  width: 1px;
  background: rgba(15, 23, 42, 0.32);
}

.database-catalog-panel {
  padding: 22px;
  margin-bottom: 18px;
}

.database-tree {
  display: grid;
  gap: 12px;
}

.tree-folder {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.tree-folder.level-one {
  border-color: #cbd5e1;
}

.tree-folder.level-two,
.tree-folder.level-three {
  margin-top: 10px;
  background: #fbfcfe;
}

.tree-node,
.tree-leaf,
.tree-loading {
  display: grid;
  align-items: center;
  gap: 12px;
  min-height: 38px;
}

.tree-node {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  padding: 12px 14px;
}

.tree-node.is-root {
  background: #101820;
  color: #fff;
}

.tree-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #0f766e;
  background: #ccfbf1;
}

.tree-node.is-root .tree-icon {
  color: #101820;
  background: #f8fafc;
}

.tree-label {
  min-width: 0;
  color: #111827;
  font-weight: 900;
}

.tree-node.is-root .tree-label {
  color: #fff;
}

.tree-meta {
  padding: 5px 8px;
  border-radius: 8px;
  color: #64748b;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.tree-node.is-root .tree-meta {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.1);
}

.tree-children {
  padding: 0 14px 14px 34px;
}

.tree-leaf {
  grid-template-columns: minmax(120px, 0.75fr) minmax(140px, 1fr) auto;
  padding: 10px 12px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.tree-leaf:first-child {
  border-top: 0;
}

.tree-leaf-name {
  color: #111827;
  font-weight: 800;
}

.tree-leaf-table {
  min-width: 0;
  overflow: hidden;
  color: #64748b;
  font-family: "SFMono-Regular", "Consolas", monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-leaf-status {
  justify-self: end;
  padding: 5px 8px;
  border-radius: 8px;
  color: #64748b;
  background: #f1f5f9;
  font-size: 11px;
  font-weight: 900;
}

.tree-leaf.is-ready .tree-leaf-status {
  color: #0f766e;
  background: #ccfbf1;
}

.tree-loading {
  padding: 0 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  background: #f8fafc;
}

.product-analysis-panel {
  padding: 34px 22px 22px;
  margin-bottom: 18px;
  border: 1px solid #dbe5ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.04);
}

.product-analysis-grid {
  display: grid;
  gap: 14px;
}

.product-analysis-summary {
  margin: -6px 0 14px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.product-analysis-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.product-analysis-kpis article,
.product-analysis-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.product-analysis-kpis article {
  min-height: 86px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-analysis-kpis span,
.product-card-title em,
.product-rank-meta,
.product-risk-row span,
.product-diagnosis-table td span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.product-analysis-kpis strong {
  color: #0f172a;
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.product-analysis-main,
.product-analysis-secondary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.product-analysis-secondary {
  grid-auto-rows: clamp(620px, 62vh, 760px);
}

.product-analysis-card {
  min-width: 0;
  padding: 16px;
}

.product-analysis-secondary .product-analysis-card {
  display: flex;
  flex-direction: column;
}

.product-card-title,
.product-rank-head,
.product-rank-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.product-card-title {
  margin-bottom: 14px;
}

.product-detail-title {
  align-items: flex-start;
}

.product-card-title span {
  color: #0f766e;
  font-size: 14px;
  font-weight: 900;
}

.product-detail-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.product-detail-select,
.product-detail-search {
  height: 38px;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  color: #0f172a;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  outline: none;
}

.product-detail-select {
  width: 128px;
  padding: 0 28px 0 10px;
}

.product-detail-search {
  width: 190px;
  padding: 0 12px;
}

.product-detail-select:focus,
.product-detail-search:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.product-detail-tools em {
  min-width: 58px;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.product-rank-list,
.product-structure-list,
.product-risk-list {
  display: grid;
  gap: 12px;
}

.product-structure-list {
  flex: 1;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
}

.product-rank-row {
  display: grid;
  gap: 7px;
}

.product-rank-head span {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.product-rank-head b {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 5px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 11px;
}

.product-rank-head strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.product-rank-meta {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.product-rank-track,
.product-structure-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

.product-rank-track i,
.product-structure-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #22ab83);
}

.product-analysis-main .product-analysis-card:nth-child(2) .product-rank-track i {
  background: linear-gradient(90deg, #2f4054, #0f766e);
}

.product-structure-head {
  display: grid;
  grid-template-columns: minmax(170px, 0.95fr) minmax(180px, 1.35fr) 82px;
  gap: 18px;
  margin-bottom: 14px;
  padding-right: 8px;
}

.product-structure-head span,
.product-structure-head strong {
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}

.product-structure-head strong {
  grid-column: 3;
  text-align: right;
}

.product-structure-scroll {
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-gutter: stable;
}

.product-structure-scroll::-webkit-scrollbar {
  width: 6px;
}

.product-structure-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #d6dee8;
}

.product-structure-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.product-structure-rows {
  display: grid;
  gap: 16px;
}

.product-structure-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.95fr) minmax(180px, 1.35fr) 82px;
  align-items: center;
  gap: 18px;
}

.product-structure-row span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.product-structure-row b {
  min-width: 0;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-structure-row em {
  color: #708198;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.product-structure-row strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.product-risk-row {
  padding: 12px;
  border-radius: 8px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.product-risk-row strong {
  display: block;
  color: #9a3412;
  font-size: 14px;
}

.product-risk-row span {
  display: block;
  margin-top: 6px;
  color: #9a3412;
  line-height: 1.5;
}

.product-table-wrap {
  max-height: 640px;
  overflow: auto;
  scrollbar-gutter: stable;
}

.product-diagnosis-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.product-diagnosis-table th,
.product-diagnosis-table td {
  padding: 11px 10px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.product-diagnosis-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  background: #f8fafc;
}

.product-diagnosis-table td {
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.product-diagnosis-table td strong,
.product-diagnosis-table td span {
  display: block;
}

.product-status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 5px;
  color: #0f766e;
  background: #ccfbf1;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.owner-briefing {
  position: relative;
  display: grid;
  grid-template-columns: minmax(420px, 1.15fr) minmax(0, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-bottom: 18px;
  background: #e2e8f0;
}

.agent-pending-badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
  border-radius: 999px;
  color: #9a3412;
  background: #fff7ed;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.agent-pending-badge i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #f97316;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.briefing-lead,
.briefing-card {
  background: #fff;
}

.briefing-lead {
  min-height: 170px;
  padding: 24px;
}

.briefing-lead-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.briefing-lead h3 {
  margin: 0;
  color: #111827;
  font-size: 28px;
  line-height: 1.18;
}

.briefing-lead p {
  margin: 12px 0 0;
  color: #64748b;
  line-height: 1.7;
}

.briefing-lead .section-kicker {
  margin: 0;
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.22em;
}

#briefingConclusionNote {
  color: #475569;
  font-weight: 700;
}

#briefingConclusionNote,
#briefingRiskNote,
#briefingActionNote {
  white-space: pre-line;
}

.briefing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: #e2e8f0;
}

.briefing-card {
  min-height: 170px;
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.briefing-card span {
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.briefing-card strong {
  margin-top: 18px;
  color: #111827;
  font-size: 24px;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.briefing-card p {
  margin: auto 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.65;
}

.section-line {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-line h3,
.promo-panel h3 {
  margin: 0;
  color: #111827;
  font-size: 22px;
}

.section-line span,
.promo-panel p {
  color: #64748b;
}

.module-grid {
  width: 100%;
  height: auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  grid-auto-rows: auto;
  gap: 12px;
}

.module-card {
  min-height: 112px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: none;
  color: #111827;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 12px;
}

.module-card::after {
  display: none;
}

.module-card:hover {
  transform: translateY(-2px);
  background: #f8fafc;
  border-color: #99f6e4;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
}

.module-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #0f766e;
  background: #ccfbf1;
}

.report-card .module-icon {
  color: #2563eb;
  background: #dbeafe;
}

.module-card.is-pending {
  background: #fbfcfe;
}

.module-meta {
  min-width: 0;
  display: grid;
  gap: 5px;
  text-align: left;
}

.module-meta strong {
  overflow: hidden;
  color: #111827;
  font-size: 16px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.module-meta em {
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.module-arrow {
  color: #94a3b8;
}

.module-status {
  justify-self: end;
  min-width: 62px;
  padding: 5px 8px;
  border-radius: 8px;
  color: #64748b;
  background: #f1f5f9;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.module-status.ready,
.module-card.is-ready .module-status {
  color: #0f766e;
  background: #ccfbf1;
}

.promo-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(320px, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 22px;
}

.promo-panel p {
  margin: 8px 0 0;
  line-height: 1.7;
}

.promo-rows {
  display: grid;
  gap: 10px;
}

.promo-row {
  display: grid;
  grid-template-columns: 82px minmax(120px, 1fr) 42px;
  align-items: center;
  gap: 12px;
  color: #334155;
  font-size: 13px;
}

.promo-bar {
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: #e2e8f0;
}

.promo-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.promo-row strong {
  color: #111827;
  text-align: right;
}

.promo-row-loading .promo-bar {
  position: relative;
  overflow: hidden;
}

.promo-row-loading .promo-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.82), transparent);
  animation: shimmer 1.2s infinite;
  transform: translateX(-100%);
}

.empty-inline {
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  background: #f8fafc;
}

.empty-inline.error {
  color: #991b1b;
  border-color: #fecaca;
  background: #fef2f2;
}

.text-link {
  min-width: 154px;
  padding: 0 14px;
  color: #fff;
  background: #0f766e;
  font-weight: 800;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.6);
  padding: 20px;
}

.modal-panel {
  width: min(600px, 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.64);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.45);
  padding: 24px;
}

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

.modal-title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

.modal-subtitle {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.modal-close,
.modal-back,
.secondary-btn,
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition);
}

.modal-close {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.modal-close:hover,
.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.modal-back {
  margin-bottom: 12px;
  border: none;
  background: transparent;
  color: #93c5fd;
  padding: 0;
}

.modal-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-height: 140px;
}

.option-card {
  position: relative;
  min-height: 100px;
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition);
}

.option-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(96, 165, 250, 0.5);
}

.option-card.is-pending {
  opacity: 0.72;
}

.option-card.is-pending:hover {
  border-color: rgba(148, 163, 184, 0.32);
}

.option-status {
  align-self: flex-start;
  padding: 4px 7px;
  border-radius: 999px;
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.14);
  font-size: 11px;
  font-weight: 800;
}

.option-card.is-ready .option-status {
  color: #99f6e4;
  background: rgba(20, 184, 166, 0.16);
}

.option-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.option-card-description {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.admin-page {
  display: grid;
  grid-template-columns: minmax(0, 1120px);
  justify-content: center;
  gap: 24px;
  padding: 24px;
}

.glass-panel {
  border-radius: 20px;
}

.admin-sidebar {
  padding: 24px;
  min-height: 0;
}

.admin-sidebar {
  overflow-y: auto;
}

.admin-sidebar-header,
.admin-toolbar,
.section-heading,
.sort-item-header,
.nested-header,
.direct-link-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: #7dd3fc;
}

.admin-title,
.section-heading h2 {
  margin: 0;
}

.admin-subtitle,
.section-heading p,
.form-hint {
  margin: 8px 0 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.admin-preview-link {
  color: #bfdbfe;
  text-decoration: none;
}

.admin-login-card,
.editor-section {
  margin-top: 24px;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.44);
}

.editor-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-editor {
  margin-top: 20px;
}

.admin-toolbar {
  margin-bottom: 20px;
}

.primary-btn {
  border: 1px solid rgba(56, 189, 248, 0.55);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.9), rgba(37, 99, 235, 0.92));
  color: #fff;
  padding: 12px 18px;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.35);
}

.secondary-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  padding: 12px 18px;
}

.form-label {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.form-input,
.form-textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.62);
  color: #fff;
  padding: 12px 14px;
  outline: none;
}

.form-textarea {
  min-height: 90px;
  resize: vertical;
}

.form-input:focus,
.form-textarea:focus {
  border-color: rgba(56, 189, 248, 0.72);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.file-input {
  padding: 10px;
}

.form-message {
  color: #93c5fd;
  font-size: 13px;
}

.form-message.error {
  color: var(--danger);
}

.section-sorter,
.config-tree {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sort-item,
.editor-block,
.direct-link-card,
.nested-card {
  border-radius: 14px;
  padding: 16px;
}

.sort-item {
  cursor: grab;
}

.sort-item.dragging {
  opacity: 0.45;
}

.sort-item-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.18);
  color: #bae6fd;
  font-size: 12px;
}

.editor-block,
.nested-card {
  background: rgba(2, 6, 23, 0.26);
}

.nested-list,
.direct-links-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.config-grid-2,
.config-grid-3 {
  display: grid;
  gap: 12px;
}

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

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

.small-note {
  font-size: 12px;
  color: var(--text-muted);
}

.direct-link-header,
.nested-header,
.sort-item-header {
  margin-bottom: 12px;
}

.direct-link-title,
.nested-title {
  font-size: 16px;
  font-weight: 700;
}

.admin-page {
  grid-template-columns: minmax(0, 1180px);
  justify-content: center;
  gap: 18px;
  padding: 18px;
  background:
    linear-gradient(rgba(148, 163, 184, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.055) 1px, transparent 1px),
    #0b1118;
  background-size: 22px 22px;
  color: #e5edf6;
}

.admin-sidebar {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(15, 23, 32, 0.92);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.28);
}

.admin-sidebar {
  padding: 0;
}

.admin-sidebar-header {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 22px 22px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 32, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.admin-title {
  color: #f8fafc;
  font-size: 28px;
  line-height: 1.12;
  font-weight: 900;
}

.admin-kicker {
  color: #34d399;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.admin-subtitle {
  max-width: 38rem;
  color: #9aa7b7;
  font-size: 13px;
}

.admin-preview-link {
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  color: #d9e5f3;
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  font-weight: 800;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.admin-preview-link:hover,
.secondary-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(52, 211, 153, 0.42);
  background: rgba(52, 211, 153, 0.09);
}

.admin-login-card,
.admin-editor {
  margin: 22px;
}

.admin-toolbar {
  position: sticky;
  top: 94px;
  z-index: 3;
  align-items: center;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 10px;
  background: rgba(9, 14, 20, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.admin-config-nav {
  position: sticky;
  top: 164px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 10px;
  background: rgba(9, 14, 20, 0.78);
}

.admin-config-nav button {
  min-height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.035);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.admin-config-nav button.active {
  color: #042f2e;
  border-color: rgba(20, 184, 166, 0.7);
  background: #99f6e4;
}

.primary-btn,
.secondary-btn {
  min-height: 38px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.primary-btn {
  border-color: rgba(16, 185, 129, 0.78);
  background: #0f766e;
  box-shadow: none;
}

.primary-btn:hover {
  background: #0b6b63;
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.22);
}

.secondary-btn {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.045);
}

.editor-section {
  display: none;
  margin-top: 14px;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.045);
}

.editor-section.active {
  display: flex;
}

.section-heading {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.section-heading h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f8fafc;
  font-size: 18px;
  line-height: 1.2;
}

.section-heading p,
.form-hint,
.small-note {
  color: #9aa7b7;
}

.form-label {
  color: #cbd6e2;
  font-size: 12px;
  font-weight: 800;
}

.form-input,
.form-textarea {
  min-height: 40px;
  border-radius: 8px;
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(2, 6, 23, 0.34);
  color: #f8fafc;
  font-size: 13px;
}

.form-input:focus,
.form-textarea:focus {
  border-color: rgba(52, 211, 153, 0.66);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12);
}

.sort-item,
.editor-block,
.direct-link-card,
.nested-card {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.24);
}

.sort-item {
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
}

.sort-item:hover {
  transform: translateY(-1px);
  border-color: rgba(52, 211, 153, 0.32);
  background: rgba(8, 47, 73, 0.18);
}

.sort-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sort-item-tag,
.sort-item-status,
.link-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.sort-item-tag {
  min-width: auto;
  background: rgba(52, 211, 153, 0.14);
  color: #99f6e4;
}

.sort-item-status {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
}

.sort-item-title {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f8fafc;
  font-size: 17px;
  font-weight: 900;
}

.sort-item-title i {
  color: #34d399;
}

.editor-block {
  padding: 18px;
}

.nested-card {
  padding: 14px;
  background: rgba(15, 23, 42, 0.48);
}

.direct-link-card {
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.direct-link-header,
.nested-header {
  align-items: center;
}

.direct-link-title,
.nested-title {
  color: #f8fafc;
  font-size: 15px;
  font-weight: 900;
}

.link-state.is-ready {
  color: #99f6e4;
  background: rgba(20, 184, 166, 0.16);
}

.link-state.is-empty {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.12);
}

.purchase-dashboard-page {
  display: grid;
  gap: 16px;
}

.purchase-dashboard-page.hidden {
  display: none;
}

.tmall-shelf-page {
  display: grid;
  gap: 16px;
}

.tmall-shelf-page.hidden {
  display: none;
}

.tmall-metrics-overview {
  position: relative;
  z-index: 3;
  display: block;
  padding: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  overflow: visible;
}

.purchase-page-head,
.tmall-shelf-head,
.purchase-card,
.purchase-kpi,
.tmall-shelf-kpi-grid article,
.tmall-module-card {
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #fff;
}

.purchase-page-head,
.tmall-shelf-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 30px;
}

.tmall-metrics-overview .tmall-shelf-head {
  position: relative;
  z-index: 30;
  align-items: flex-start;
  padding: 0;
  margin-bottom: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.purchase-page-head h3,
.tmall-shelf-head h3 {
  margin-top: 8px;
  color: #0f172a;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 900;
}

.tmall-metrics-overview .tmall-shelf-head h3 {
  margin: 0;
  color: #111827;
  font-size: 26px;
  line-height: 1.18;
}

.purchase-page-head p:last-child,
.tmall-shelf-head p:last-child {
  margin-top: 10px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.tmall-metrics-overview .tmall-shelf-head p:last-child {
  display: none;
}

.purchase-filter-bar,
.purchase-table-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.purchase-search-input {
  width: 330px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  color: #0f172a;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  outline: none;
}

.purchase-search-input:focus,
.purchase-filter-bar select:focus,
.purchase-table-tools select:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

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

.tmall-shelf-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.tmall-shelf-kpi-grid.tmall-traffic-view {
  grid-template-columns: 1fr;
  gap: 0;
}

.tmall-shelf-kpi-grid.tmall-promotion-view {
  grid-template-columns: 1fr;
  gap: 0;
}

.tmall-shelf-kpi-grid.tmall-traffic-view > .tmall-traffic-panel,
.tmall-shelf-kpi-grid.tmall-promotion-view > .tmall-promotion-panel {
  min-height: 0;
  padding: 0;
  border: 0;
  border-top: 0;
  border-radius: 0;
  background: transparent;
}

.purchase-kpi {
  min-height: 100px;
  padding: 16px;
  border-top: 4px solid #0f766e;
}

.tmall-shelf-kpi-grid article {
  min-height: 112px;
  padding: 16px;
  border-top: 4px solid #0f766e;
}

.purchase-kpi span,
.tmall-shelf-kpi-grid span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.purchase-kpi strong,
.tmall-shelf-kpi-grid strong {
  display: block;
  margin-top: 18px;
  color: #0f172a;
  font-size: 25px;
  line-height: 1;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.tmall-shelf-kpi-grid em {
  display: block;
  margin-top: 10px;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.tmall-shelf-modules {
  display: grid;
  grid-template-columns: minmax(480px, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
}

.tmall-module-card {
  min-width: 0;
  padding: 20px;
}

.tmall-module-card:first-child {
  grid-column: span 2;
}

.tmall-module-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.tmall-module-head span {
  color: #0f766e;
  font-size: 18px;
  font-weight: 950;
}

.tmall-module-head p {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 800;
}

.tmall-module-head i {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #0f766e;
  background: #e6fffb;
}

.tmall-module-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.tmall-module-stats div {
  min-height: 72px;
  padding: 12px;
  border-radius: 8px;
  background: #f6f9fc;
}

.tmall-module-stats span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.tmall-module-stats strong {
  display: block;
  margin-top: 10px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.1;
  font-weight: 950;
}

.tmall-module-action {
  margin: 16px 0 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.7;
  font-weight: 850;
}

.tmall-filter-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.tmall-view-tabs {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 22px 0 16px;
  padding: 0 0 10px;
  border-bottom: 1px solid #e2e8f0;
}

.tmall-view-tabs button {
  position: relative;
  min-height: 34px;
  padding: 0 2px;
  border: 0;
  color: #64748b;
  background: transparent;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.tmall-view-tabs button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -11px;
  height: 3px;
  border-radius: 999px;
  background: transparent;
  transition: background var(--transition), transform var(--transition);
  transform: scaleX(0.4);
}

.tmall-view-tabs button:hover {
  color: #0f766e;
}

.tmall-view-tabs button.active {
  color: #0f766e;
}

.tmall-view-tabs button.active::after {
  background: #0f766e;
  transform: scaleX(1);
}

.tmall-filter-panel {
  width: min(380px, calc(100vw - 430px));
  height: auto;
  min-height: auto;
  grid-template-columns: 1fr;
  padding: 12px;
}

.tmall-kpi-card {
  min-height: 168px;
  border-width: 1px;
  text-align: left;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.tmall-kpi-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.tmall-kpi-card:active {
  transform: translateY(0);
}

.tmall-kpi-card strong {
  font-size: 24px;
}

.tmall-shelf-kpi-grid .business-metric-card span {
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.tmall-shelf-kpi-grid .business-metric-card strong {
  display: block;
  margin: 18px 0 14px;
  color: #0f172a;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 950;
}

.tmall-quick-date-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.tmall-quick-date-row button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  color: #334155;
  background: #f1f5f9;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.tmall-quick-date-row button.active {
  color: #fff;
  background: #3b82f6;
}

.tmall-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
}

.tmall-target-panel {
  grid-column: span 1;
}

.tmall-link-panel {
  grid-column: 1 / -1;
}

.tmall-traffic-panel {
  grid-column: 1 / -1;
  padding: 0;
  border: 0;
  background: transparent;
}

.tmall-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #fff;
}

.tmall-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.tmall-panel-head span {
  display: block;
  color: #0f766e;
  font-size: 13px;
  font-weight: 950;
}

.tmall-panel-head strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 20px;
  font-weight: 950;
}

.tmall-panel-head em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.tmall-target-main {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border-radius: 8px;
  background: #f6f9fc;
}

.tmall-target-ring {
  width: 128px;
  height: 128px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 58%, transparent 59%),
    conic-gradient(#0f766e calc(var(--rate) * 1%), #e2e8f0 0);
}

.tmall-target-ring strong,
.tmall-target-ring span {
  grid-area: 1 / 1;
}

.tmall-target-ring strong {
  color: #0f172a;
  font-size: 28px;
  font-weight: 950;
}

.tmall-target-ring span {
  margin-top: 54px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.tmall-target-copy strong,
.tmall-target-copy span {
  display: block;
}

.tmall-target-copy strong {
  color: #0f172a;
  font-size: clamp(18px, 1.08vw, 21px);
  line-height: 1.2;
  font-weight: 950;
  white-space: nowrap;
}

.tmall-target-copy span {
  margin-top: 10px;
  color: #64748b;
  font-size: 16px;
  font-weight: 850;
}

.tmall-target-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.tmall-target-row {
  display: grid;
  grid-template-columns: 112px minmax(120px, 0.72fr) minmax(210px, 1fr);
  align-items: center;
  gap: 12px;
}

.tmall-target-row span,
.tmall-target-row strong {
  color: #334155;
  font-size: 14px;
  font-weight: 900;
}

.tmall-target-row strong {
  white-space: nowrap;
}

.tmall-target-row div {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7eef6;
}

.tmall-target-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0f766e;
}

.tmall-traffic-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.82fr);
  gap: 18px;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.tmall-traffic-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 12px;
  min-width: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.tmall-traffic-stats > div,
.tmall-link-detail-grid div {
  padding: 16px 18px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #fff;
}

.tmall-traffic-stats > div {
  padding: 14px 18px;
}

.tmall-traffic-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.tmall-traffic-stat-head span,
.tmall-link-detail-grid span {
  display: block;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tmall-traffic-stat-head em {
  flex: 0 0 auto;
  padding: 4px 6px;
  border-radius: 5px;
  color: #0f766e;
  background: #ecf8f5;
  font-size: 11px;
  line-height: 1;
  font-style: normal;
  font-weight: 900;
}

.tmall-traffic-stats > div > strong,
.tmall-link-detail-grid strong {
  display: block;
  margin-top: 14px;
  color: #0f172a;
  font-size: clamp(22px, 1.3vw, 28px);
  line-height: 1;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: visible;
}

.tmall-traffic-stats > div > strong {
  margin-top: 12px;
}

.tmall-traffic-stat-card {
  min-width: 0;
  min-height: 122px;
}

.tmall-traffic-stat-card .metric-comparisons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.tmall-traffic-stat-card .metric-compare {
  justify-content: center;
  width: 100%;
  min-width: 0;
  gap: 3px;
  padding: 5px 6px;
  border-radius: 6px;
  background: #f8fafc;
  font-size: 11px;
  line-height: 1;
}

.tmall-traffic-stat-card .metric-compare:nth-child(2) {
  justify-self: stretch;
}

.tmall-traffic-stat-card .metric-compare b {
  font-size: 11px;
}

.tmall-traffic-stat-card .metric-compare i {
  font-size: 11px;
}

.tmall-traffic-stat-card .metric-compare .fa-solid {
  font-size: 9px;
}

.tmall-promotion-panel {
  width: 100%;
}

.tmall-promotion-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(420px, 0.84fr);
  gap: 16px;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.tmall-promotion-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
  min-width: 0;
}

.tmall-promotion-stat-grid .business-metric-card {
  width: 100%;
  min-width: 0;
  min-height: 154px;
  padding: 18px;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.tmall-promotion-stat-grid .business-metric-card strong {
  margin: 16px 0 12px;
  font-size: clamp(20px, 1.35vw, 26px);
  white-space: nowrap;
  overflow: visible;
}

.tmall-promotion-stat-grid .metric-comparisons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: nowrap;
}

.tmall-promotion-stat-grid .metric-compare {
  flex: 1 1 0;
  justify-content: center;
  gap: 3px;
  padding: 4px 5px;
  border-radius: 6px;
  background: #f8fafc;
  font-size: 10px;
  letter-spacing: 0;
}

.tmall-promotion-stat-grid .metric-compare:nth-child(2) {
  justify-self: auto;
}

.tmall-promotion-stat-grid .metric-compare b,
.tmall-promotion-stat-grid .metric-compare i {
  flex: 0 0 auto;
}

.tmall-promotion-ring-panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 486px;
  display: flex;
  flex-direction: column;
  padding: 22px 24px 20px;
  border: 1px solid #dce6f1;
  border-radius: 8px;
  background:
    radial-gradient(circle at 72% 24%, rgba(15, 118, 110, 0.08), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  overflow: hidden;
}

.tmall-promotion-ring-panel::before {
  content: "";
  position: absolute;
  inset: auto 44px 20px 44px;
  height: 54px;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.12), transparent 70%);
  filter: blur(18px);
  opacity: 0.58;
  pointer-events: none;
}

.tmall-promotion-ring-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.tmall-promotion-ring-head h4 {
  margin: 0;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 950;
}

.tmall-promotion-ring-head p {
  margin: 7px 0 0;
  color: #64748b;
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 800;
}

.tmall-promotion-ring-head > strong {
  display: grid;
  justify-items: end;
  color: #0f172a;
  font-size: 22px;
  line-height: 1;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tmall-promotion-ring-head > strong span {
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.tmall-promotion-channel-list {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 14px;
}

.tmall-promotion-channel-list button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  color: #475569;
  background: rgba(255, 255, 255, 0.78);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.tmall-promotion-channel-list button i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--channel);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--channel) 16%, transparent);
}

.tmall-promotion-channel-list button b {
  color: #0f172a;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.tmall-promotion-channel-list button:hover,
.tmall-promotion-channel-list button:focus-visible,
.tmall-promotion-channel-list button.active {
  color: #0f172a;
  border-color: color-mix(in srgb, var(--channel) 48%, #d8e3ee);
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.tmall-promotion-ring-stage {
  position: relative;
  z-index: 1;
  flex: 1;
  display: block;
  min-height: 0;
  height: 272px;
  margin-top: 8px;
  --promo-anchor-left: 58%;
  --promo-anchor-top: 52%;
}

.tmall-promotion-ring-visual {
  position: absolute;
  inset: 0 0 -4px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
}

.tmall-promotion-ring-svg {
  width: min(94%, 720px);
  height: auto;
  max-height: 264px;
  overflow: visible;
  transform: translateY(-12px) scale(1.04);
  transform-origin: 50% 58%;
  filter: drop-shadow(0 22px 28px rgba(15, 23, 42, 0.12));
}

.tmall-promotion-ring-links {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  display: none;
}

.tmall-promotion-ring-link {
  fill: none;
  stroke: var(--promo-active-color);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.86;
  filter: drop-shadow(0 8px 14px color-mix(in srgb, var(--promo-active-color) 18%, transparent));
}

.tmall-promotion-ring-link-dot {
  stroke-width: 3;
  filter: drop-shadow(0 8px 14px color-mix(in srgb, var(--promo-active-color) 20%, transparent));
}

.tmall-promotion-ring-floor {
  fill: rgba(226, 232, 240, 0.58);
}

.tmall-promotion-ring-hole {
  fill: rgba(255, 255, 255, 0.94);
  stroke: rgba(203, 213, 225, 0.7);
  stroke-width: 1;
}

.tmall-promotion-ring-shadow,
.tmall-promotion-ring-segment {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 180ms ease-out, opacity 180ms ease-out, filter 180ms ease-out;
}

.tmall-promotion-ring-shadow {
  opacity: 0.34;
}

.tmall-promotion-ring-segment {
  cursor: pointer;
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 2;
  opacity: 0.88;
}

.tmall-promotion-ring-segment.is-muted {
  opacity: 0.58;
  filter: saturate(0.78);
}

.tmall-promotion-ring-segment:hover,
.tmall-promotion-ring-segment:focus,
.tmall-promotion-ring-segment.is-active {
  transform: translateY(-14px) scale(1.015);
  opacity: 1;
  filter: drop-shadow(0 20px 20px rgba(15, 23, 42, 0.22));
  outline: none;
}

.tmall-promotion-ring-shadow.is-active {
  transform: translateY(-8px) scale(1.012);
  opacity: 0.5;
}

.tmall-promotion-ring-shadow.is-muted {
  opacity: 0.22;
}

.tmall-promotion-ring-tooltip {
  display: none;
}

.tmall-promotion-ring-tooltip::before {
  display: none;
}

.tmall-promotion-ring-tooltip::after {
  display: none;
}

.tmall-promotion-ring-tooltip > i {
  display: block;
  width: 10px;
  height: 34px;
  margin: 0;
  border-radius: 999px;
  background: var(--promo-active-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--promo-active-color) 14%, transparent);
}

.tmall-promotion-ring-tooltip > span {
  display: block;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 950;
  white-space: nowrap;
}

.tmall-promotion-ring-tooltip dl {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  margin: 0;
}

.tmall-promotion-ring-tooltip dl div {
  display: grid;
  grid-template-columns: auto;
  justify-items: end;
  gap: 4px;
}

.tmall-promotion-ring-tooltip dt,
.tmall-promotion-ring-tooltip dd {
  margin: 0;
}

.tmall-promotion-ring-tooltip dt {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.tmall-promotion-ring-tooltip dd {
  color: #0f172a;
  font-size: 17px;
  line-height: 1;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.tmall-funnel-panel {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 22px;
  border: 1px solid #dce6f1;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tmall-funnel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.tmall-funnel-panel h4 {
  margin: 0;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 900;
}

.tmall-funnel-head p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 800;
}

.tmall-funnel-head > strong {
  display: grid;
  justify-items: center;
  flex: 0 0 auto;
  min-width: 110px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f1f8f6;
  color: #0f766e;
  font-size: 28px;
  line-height: 1;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.tmall-funnel-head > strong span {
  margin-top: 7px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.tmall-classic-funnel {
  display: grid;
  gap: 0;
  flex: 1;
  align-content: center;
  padding: 6px 4px 4px;
}

.tmall-classic-funnel-title {
  margin: 0 0 22px 108px;
  color: #475569;
  font-size: 22px;
  line-height: 1;
  font-weight: 950;
  text-align: center;
}

.tmall-classic-funnel-row,
.tmall-classic-bridge-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.tmall-classic-funnel-row {
  min-height: 44px;
}

.tmall-classic-stage-label {
  color: #64748b;
  font-size: 15px;
  font-weight: 850;
  text-align: right;
  white-space: nowrap;
}

.tmall-classic-bar-wrap,
.tmall-classic-bridge-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.tmall-classic-bar {
  width: var(--funnel-width);
  min-width: 72px;
  max-width: calc(100% - 8px);
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  background: var(--tone);
  box-shadow: inset 0 -10px 18px rgba(15, 23, 42, 0.16);
}

.tmall-shelf-kpi-grid .tmall-classic-bar strong {
  display: block;
  margin: 0;
  color: #fff;
  font-size: 17px;
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.tmall-classic-bridge-row {
  min-height: 30px;
}

.tmall-classic-bridge {
  width: var(--bridge-width);
  min-width: 72px;
  max-width: calc(100% - 8px);
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e5e7eb;
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--bridge-inset)) 100%, var(--bridge-inset) 100%);
}

.tmall-shelf-kpi-grid .tmall-classic-bridge span {
  display: block;
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.tmall-category-ranking-panel {
  min-height: 520px;
}

.tmall-ranking-segment {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid #dbe5ef;
  border-radius: 10px;
  background: #f7fafc;
}

.tmall-ranking-segment button {
  min-width: 64px;
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  color: #64748b;
  background: transparent;
  font-size: 14px;
  font-weight: 950;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.tmall-ranking-segment button.active {
  color: #0f766e;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.tmall-ranking-summary-card {
  display: grid;
  grid-template-columns: minmax(220px, 1.55fr) minmax(126px, 0.9fr) minmax(108px, 0.8fr) minmax(104px, 0.78fr);
  column-gap: 22px;
  row-gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 14px 20px 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fbfdff;
  overflow: hidden;
}

.tmall-ranking-store {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.tmall-ranking-store > div {
  min-width: 0;
}

.tmall-ranking-logo {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dbe5ef;
  border-radius: 50%;
  color: #0f766e;
  background: #fff;
  font-size: 14px;
  font-weight: 950;
}

.tmall-ranking-store span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.tmall-ranking-store strong {
  display: block;
  margin-top: 5px;
  color: #2563eb;
  font-size: 14px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tmall-ranking-summary-stat {
  min-width: 0;
}

.tmall-ranking-summary-stat:last-child {
  justify-self: end;
  min-width: 96px;
}

.tmall-ranking-summary-stat span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.tmall-ranking-summary-stat strong {
  display: inline-block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 17px;
  line-height: 1;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.tmall-ranking-summary-stat.primary em {
  margin-left: 8px;
  color: #dc2626;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.tmall-category-ranking-table {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.tmall-category-ranking-head,
.tmall-category-ranking-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 104px 112px;
  gap: 12px;
  align-items: center;
}

.tmall-category-ranking-head {
  padding: 12px 16px;
  color: #64748b;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 950;
}

.tmall-category-ranking-head span:nth-child(3) {
  text-align: center;
}

.tmall-category-ranking-head span:nth-child(4) {
  text-align: right;
}

.tmall-category-ranking-scroll {
  max-height: 356px;
  overflow-y: auto;
}

.tmall-category-ranking-scroll::-webkit-scrollbar {
  width: 8px;
}

.tmall-category-ranking-scroll::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.tmall-category-ranking-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd5e1;
}

.tmall-category-ranking-row {
  min-height: 68px;
  padding: 12px 16px;
  border-top: 1px solid #edf2f7;
}

.tmall-rank-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tmall-rank-cell i {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

.tmall-rank-cell em {
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.tmall-rank-cell em.up {
  color: #dc2626;
}

.tmall-rank-cell em.down {
  color: #16a34a;
}

.tmall-rank-cell em.flat {
  color: #64748b;
}

.tmall-rank-name {
  min-width: 0;
}

.tmall-rank-name strong,
.tmall-rank-name span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tmall-rank-name strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 950;
}

.tmall-rank-name span {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.tmall-rank-value {
  color: #0f172a;
  font-size: 14px;
  font-weight: 950;
  text-align: right;
  white-space: nowrap;
}

.tmall-category-ranking-row .tmall-rank-value:nth-child(3) {
  text-align: center;
}

.tmall-regional-panel {
  grid-column: 1 / -1;
  padding: 0;
  border: 0;
  background: transparent;
}

.tmall-regional-grid {
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
  grid-template-rows: 300px 540px;
  gap: 14px;
}

.tmall-region-rank-card,
.tmall-hourly-card,
.tmall-map-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #fff;
}

.tmall-region-rank-card {
  grid-row: 1 / span 2;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  max-height: 854px;
}

.tmall-region-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.tmall-region-card-head span {
  display: block;
  color: #0f172a;
  font-size: 15px;
  font-weight: 950;
}

.tmall-region-card-head span small {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 5px;
  border-radius: 4px;
  color: #2563eb;
  background: #eff6ff;
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
  vertical-align: middle;
}

.tmall-region-card-head em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.tmall-region-rank-list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.tmall-region-rank-list::-webkit-scrollbar {
  width: 6px;
}

.tmall-region-rank-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd5e1;
}

.tmall-region-rank-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #edf2f7;
}

.tmall-region-rank-row:last-child {
  border-bottom: 0;
}

.tmall-region-rank-row > i {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

.tmall-region-rank-row div {
  min-width: 0;
}

.tmall-region-rank-row strong,
.tmall-region-rank-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tmall-region-rank-row strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 950;
}

.tmall-region-rank-row span {
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
}

.tmall-region-rank-row b {
  display: block;
  height: 6px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef3f8;
}

.tmall-region-rank-row u {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #38bdf8);
  text-decoration: none;
}

.tmall-region-rank-row > em {
  color: #0f172a;
  font-size: 13px;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.tmall-hourly-card {
  min-height: 0;
}

.tmall-hourly-chart {
  display: block;
  width: 100%;
  height: 220px;
  min-height: 0;
}

.tmall-hourly-grid {
  stroke: #e7edf5;
  stroke-width: 1;
}

.tmall-hourly-label {
  fill: #94a3b8;
  font-size: 12px;
  font-weight: 850;
}

.tmall-hourly-axis {
  stroke: #dbe5ef;
  stroke-width: 2;
}

.tmall-hourly-hour-tick {
  stroke: #cbd5e1;
  stroke-width: 1;
}

.tmall-hourly-hour-label {
  fill: #94a3b8;
  font-size: 9.5px;
  font-weight: 850;
}

.tmall-hourly-bar {
  fill: #eaf2ff;
}

.tmall-hourly-line {
  stroke: #2f6fbd;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 8px 10px rgba(47, 111, 189, 0.24));
}

.tmall-hourly-dot {
  fill: #fff;
  stroke: #2f6fbd;
  stroke-width: 2;
}

.tmall-hourly-hover-line,
.tmall-hourly-hover-dot,
.tmall-hourly-tooltip-box,
.tmall-hourly-tooltip-label,
.tmall-hourly-tooltip-value {
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.tmall-hourly-hover-line {
  stroke: #93c5fd;
  stroke-width: 1.2;
  stroke-dasharray: 4 5;
}

.tmall-hourly-hover-dot {
  fill: #fff;
  stroke: #2563eb;
  stroke-width: 3;
  filter: drop-shadow(0 6px 12px rgba(37, 99, 235, 0.28));
}

.tmall-hourly-tooltip-box {
  fill: #0f172a;
  filter: drop-shadow(0 12px 24px rgba(15, 23, 42, 0.2));
}

.tmall-hourly-tooltip-label {
  fill: #cbd5e1;
  font-size: 12px;
  font-weight: 850;
}

.tmall-hourly-tooltip-value {
  fill: #fff;
  font-size: 12px;
  font-weight: 950;
}

.tmall-hourly-hit {
  fill: transparent;
  cursor: crosshair;
  pointer-events: all;
}

.tmall-hourly-hover:hover .tmall-hourly-hover-line,
.tmall-hourly-hover:hover .tmall-hourly-hover-dot,
.tmall-hourly-hover:hover .tmall-hourly-tooltip-box,
.tmall-hourly-hover:hover .tmall-hourly-tooltip-label,
.tmall-hourly-hover:hover .tmall-hourly-tooltip-value {
  opacity: 1;
}

.tmall-map-card {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding-bottom: 16px;
}

.tmall-map-card .tmall-region-card-head {
  margin-bottom: 10px;
}

.tmall-map-shell {
  position: relative;
  height: 100%;
  min-height: 0;
  align-self: stretch;
  margin-top: -2px;
}

.tmall-map-shell.has-back {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 6px;
}

.tmall-map-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 30px;
}

.tmall-map-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  color: #0f766e;
  background: #fff;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.tmall-map-back:hover {
  border-color: #99f6e4;
  background: #f0fdfa;
  transform: translateY(-1px);
}

.tmall-region-map {
  width: 100%;
  height: 100%;
  min-height: 440px;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
  cursor: grab;
  touch-action: none;
}

.tmall-region-map:active {
  cursor: grabbing;
}

.tmall-map-shell.has-back .tmall-region-map {
  min-height: 400px;
}

.tmall-map-legend {
  position: absolute;
  left: 22px;
  bottom: 22px;
  z-index: 4;
  display: grid;
  gap: 8px;
  min-width: 172px;
  padding: 12px 13px;
  border: 1px solid rgba(219, 229, 239, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.tmall-map-legend-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.tmall-map-legend-row span {
  color: #334155;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.15;
  text-align: left;
  white-space: nowrap;
}

.tmall-map-legend-row i {
  display: block;
  width: 24px;
  height: 16px;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.tmall-map-controls {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 5;
  display: grid;
  overflow: hidden;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
}

.tmall-map-controls button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
  background: transparent;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.tmall-map-controls button:last-child {
  border-bottom: 0;
}

.tmall-map-controls button:hover {
  color: #0f766e;
  background: #f0fdfa;
}

.tmall-map-controls button:active {
  background: #ccfbf1;
}

.tmall-map-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #64748b;
  background: rgba(248, 250, 252, 0.88);
  font-size: 13px;
  font-weight: 900;
  pointer-events: none;
}

.tmall-map-status.hidden {
  display: none;
}

.tmall-echarts-tooltip {
  min-width: 158px;
  padding: 12px 13px;
  border-radius: 8px;
  color: #fff;
  background: rgba(32, 31, 29, 0.96);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.26);
}

.tmall-echarts-tooltip strong {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 950;
}

.tmall-echarts-tooltip span {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.8;
  font-weight: 850;
}

.tmall-echarts-tooltip b {
  color: #fff;
  font-weight: 950;
}

.tmall-product-detail-panel {
  padding: 22px 24px 24px;
}

.tmall-product-detail-head {
  margin-bottom: 12px;
}

.tmall-product-detail-head strong {
  color: #111827;
  font-size: 26px;
  line-height: 1.18;
  font-weight: 950;
}

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

.tmall-detail-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 4px;
  border: 1px solid #dbe5ef;
  border-radius: 10px;
  background: #f7fafc;
  flex: 0 0 auto;
}

.tmall-detail-tabs button {
  min-width: 88px;
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  color: #64748b;
  background: transparent;
  font-size: 14px;
  font-weight: 950;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.tmall-detail-tabs button.active {
  color: #0f766e;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.tmall-link-table-wrap,
.tmall-spu-table-wrap {
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.tmall-link-table-wrap {
  scrollbar-gutter: stable both-edges;
}

.tmall-link-table-wrap::-webkit-scrollbar,
.tmall-spu-table-wrap::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

.tmall-link-table-wrap::-webkit-scrollbar-track,
.tmall-spu-table-wrap::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.tmall-link-table-wrap::-webkit-scrollbar-thumb,
.tmall-spu-table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid #f1f5f9;
  border-radius: 999px;
  background: #94a3b8;
}

.tmall-link-table {
  width: max-content;
  min-width: 3582px;
  border-collapse: collapse;
}

.tmall-link-name-col {
  width: 230px;
}

.tmall-link-base-col {
  width: 92px;
}

.tmall-link-metric-col {
  width: 136px;
}

.tmall-link-action-col {
  width: 88px;
}

.tmall-link-table th,
.tmall-link-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

.tmall-link-table th {
  color: #64748b;
  font-size: 12px;
  background: #f8fafc;
}

.tmall-link-table thead tr:first-child th {
  border-bottom-color: #d8e3ef;
}

.tmall-link-table thead tr:nth-child(2) th {
  top: 41px;
}

.tmall-link-table th[rowspan="2"] {
  vertical-align: middle;
}

.tmall-link-table .tmall-link-base-head {
  color: #475569;
  background: #f8fafc;
}

.tmall-link-table .tmall-link-metric-group {
  height: 42px;
  color: #0f766e;
  background: #f4f9f8;
  font-size: 13px;
  font-weight: 950;
  text-align: center;
  border-left: 2px solid #b6c7d9;
  border-right: 2px solid #b6c7d9;
  box-shadow: inset 0 -1px 0 #d8e3ef;
}

.tmall-link-table .tmall-link-group-1 {
  background: #f0faf8;
}

.tmall-link-table .tmall-link-group-2 {
  background: #eef6ff;
  color: #2563eb;
}

.tmall-link-table .tmall-link-group-3 {
  background: #fff7ed;
  color: #b45309;
}

.tmall-link-table .tmall-link-group-4 {
  background: #f5f3ff;
  color: #7c3aed;
}

.tmall-link-table .tmall-link-metric-name {
  height: 44px;
  color: #334155;
  background: #fbfdff;
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

.tmall-link-table .is-group-start {
  border-left: 2px solid #b6c7d9;
}

.tmall-link-table thead tr:first-child th:last-child,
.tmall-link-table tbody td:last-child {
  border-left: 2px solid #b6c7d9;
}

.tmall-link-table tbody tr:last-child td {
  border-bottom: 0;
}

.tmall-link-table td:first-child,
.tmall-link-table th:first-child {
  text-align: left;
}

.tmall-link-table thead .tmall-link-metric-name,
.tmall-link-table thead tr:nth-child(2) th:first-child {
  text-align: center;
}

.tmall-link-table td:first-child strong,
.tmall-link-table td:first-child span {
  display: block;
}

.tmall-link-table td:first-child strong {
  color: #0f172a;
  font-size: 14px;
}

.tmall-link-table td:first-child span {
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.tmall-link-table td:not(:first-child) {
  white-space: nowrap;
}

.tmall-link-metric-cell {
  background: #fff;
}

.tmall-link-table .tmall-link-metric-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: 900;
  line-height: 1.1;
  cursor: pointer;
  transition: color 0.14s ease, background-color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.tmall-link-table .tmall-link-metric-button:hover {
  color: #0f766e;
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.tmall-link-table .tmall-link-metric-button:focus-visible {
  outline: none;
  color: #0f766e;
  background: #ecfdf5;
  border-color: #99f6e4;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.tmall-link-table tbody tr:hover td {
  background: #f8fbff;
}

.tmall-link-status {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
  font-style: normal;
  white-space: nowrap;
}

.tmall-link-table button {
  height: 34px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.tmall-link-table button:hover {
  color: #fff;
  border-color: #0f766e;
  background: #0f766e;
}

.tmall-link-table-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.tmall-link-pagination {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: #4b5563;
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.tmall-link-pagination-total {
  margin-right: 2px;
  color: #71717a;
  white-space: nowrap;
}

.tmall-link-page-arrow,
.tmall-link-page-number,
.tmall-link-page-size {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  color: #52525b;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.tmall-link-page-arrow {
  color: #71717a;
}

.tmall-link-page-arrow:disabled {
  color: #a1a1aa;
  cursor: not-allowed;
}

.tmall-link-page-number.active {
  color: #2563eb;
  background: #e8f0ff;
}

.tmall-link-page-number:not(.active):hover,
.tmall-link-page-arrow:not(:disabled):hover,
.tmall-link-page-size:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.tmall-link-page-ellipsis {
  min-width: 24px;
  color: #52525b;
  text-align: center;
}

.tmall-link-page-size {
  gap: 8px;
  min-width: 118px;
  padding: 0 10px;
  white-space: nowrap;
}

.tmall-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
  margin: 0;
  flex: 1 1 auto;
}

.tmall-detail-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.tmall-detail-search {
  width: 300px;
  max-width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  color: #0f172a;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  outline: none;
}

.tmall-detail-search:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.tmall-detail-tools em {
  min-width: 72px;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.tmall-spu-table-wrap {
  max-height: 640px;
  scrollbar-gutter: stable;
}

.tmall-spu-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.tmall-spu-table th,
.tmall-spu-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
  text-align: left;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

.tmall-spu-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #64748b;
  font-size: 12px;
  background: #f8fafc;
}

.tmall-spu-table tbody tr:last-child td {
  border-bottom: 0;
}

.tmall-spu-table td:first-child {
  min-width: 220px;
}

.tmall-spu-table td:not(:first-child) {
  white-space: nowrap;
}

.tmall-spu-table td:first-child strong,
.tmall-spu-table td:first-child span {
  display: block;
}

.tmall-spu-table td:first-child strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 950;
}

.tmall-spu-table td:first-child span {
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.tmall-table-empty {
  padding: 28px 12px !important;
  color: #64748b !important;
  text-align: center !important;
}

.tmall-trend-modal.hidden {
  display: none;
}

.tmall-trend-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15, 23, 42, 0.38);
}

.tmall-trend-dialog {
  position: relative;
  width: min(780px, 90vw);
  max-height: 78vh;
  overflow: auto;
  padding: 22px 22px 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.2);
}

.tmall-trend-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  color: #0f172a;
  background: #fff;
  cursor: pointer;
}

.tmall-trend-head span {
  color: #0f766e;
  font-size: 12px;
  font-weight: 950;
}

.tmall-trend-head strong {
  display: block;
  margin-top: 6px;
  padding-right: 48px;
  color: #0f172a;
  font-size: 25px;
  line-height: 1.2;
  font-weight: 950;
}

.tmall-trend-head p {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.tmall-trend-chart {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.12), inset 0 0 0 1px #eef2f7;
}

.tmall-trend-line {
  width: 100%;
  height: auto;
  min-height: 260px;
  display: block;
}

.tmall-trend-chart-title {
  fill: #64748b;
  font-size: 15px;
  font-weight: 900;
}

.tmall-trend-grid-line {
  stroke: #edf2f7;
  stroke-width: 1;
}

.tmall-trend-axis-line {
  stroke: #dbe5ef;
  stroke-width: 2;
}

.tmall-trend-axis-label {
  fill: #94a3b8;
  font-size: 11px;
  font-weight: 800;
}

.tmall-trend-main-line {
  stroke: #3b6fb6;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tmall-trend-main-line.underlay {
  stroke: #eef6ff;
  stroke-width: 7;
  filter: none;
}

.tmall-trend-dot,
.tmall-trend-hover-dot {
  fill: #fff;
  stroke: #7fa7de;
  stroke-width: 3;
}

.tmall-trend-value-label {
  fill: #94a3b8;
  font-size: 13px;
  font-weight: 900;
}

.tmall-trend-hover-line,
.tmall-trend-hover-dot,
.tmall-trend-tooltip-box,
.tmall-trend-tooltip-date,
.tmall-trend-tooltip-value {
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.tmall-trend-hover-line {
  stroke: #93c5fd;
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.tmall-trend-tooltip-box {
  fill: #0f172a;
  filter: drop-shadow(0 10px 20px rgba(15, 23, 42, 0.18));
}

.tmall-trend-tooltip-date {
  fill: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
}

.tmall-trend-tooltip-value {
  fill: #fff;
  font-size: 14px;
  font-weight: 950;
}

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

.tmall-trend-hover:hover .tmall-trend-hover-line,
.tmall-trend-hover:hover .tmall-trend-hover-dot,
.tmall-trend-hover:hover .tmall-trend-tooltip-box,
.tmall-trend-hover:hover .tmall-trend-tooltip-date,
.tmall-trend-hover:hover .tmall-trend-tooltip-value {
  opacity: 1;
}

.tmall-trend-notes,
.tmall-link-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.tmall-trend-notes div {
  padding: 13px;
  border-radius: 8px;
  background: #f6f9fc;
}

.tmall-trend-notes span,
.tmall-trend-notes strong {
  display: block;
}

.tmall-trend-notes span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.tmall-trend-notes strong {
  margin-top: 8px;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 900;
}

.tmall-link-dialog {
  width: min(820px, 90vw);
}

@keyframes tmall-card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.purchase-kpi.danger {
  border-top-color: #be123c;
}

.purchase-kpi.warning {
  border-top-color: #d97706;
}

.purchase-kpi.excess {
  border-top-color: #334155;
}

.purchase-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.purchase-dashboard-grid.is-main {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
  align-items: stretch;
}

.purchase-card {
  min-width: 0;
  padding: 18px;
}

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

.purchase-card-head span {
  color: #0f766e;
  font-size: 15px;
  font-weight: 950;
}

.purchase-card-head em {
  color: #64748b;
  font-size: 12px;
  font-style: italic;
  font-weight: 900;
}

.purchase-status-stack {
  display: flex;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

.purchase-status-stack i {
  display: block;
  height: 100%;
}

.purchase-status-legend {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.purchase-status-legend-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  text-align: left;
}

.purchase-status-legend-item i {
  display: block;
  width: 18px;
  height: 5px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.purchase-status-legend span,
.purchase-action-metrics span,
.purchase-list-row span,
.purchase-table td span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.purchase-status-legend strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 950;
}

.purchase-action-panel {
  display: grid;
  gap: 14px;
}

.purchase-action-panel strong {
  color: #0f172a;
  font-size: 24px;
  font-weight: 950;
}

.purchase-action-panel p {
  max-width: 620px;
  color: #475569;
  font-size: 14px;
  line-height: 1.7;
  font-weight: 800;
}

.purchase-action-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.purchase-action-metrics span {
  padding: 8px 10px;
  border-radius: 8px;
  background: #f1f5f9;
}

.purchase-priority-card,
.purchase-slow-card {
  display: flex;
  flex-direction: column;
  min-height: 560px;
}

.purchase-priority-list,
.purchase-slow-list {
  flex: 1;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  padding-right: 8px;
}

.purchase-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #0f766e;
  border-radius: 8px;
  background: #fff;
}

.purchase-list-row.danger {
  border-left-color: #be123c;
  background: #fff1f2;
}

.purchase-list-row.warning {
  border-left-color: #d97706;
  background: #fff7ed;
}

.purchase-list-row.excess,
.purchase-list-row.silent {
  border-left-color: #334155;
  background: #f8fafc;
}

.purchase-list-row strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-list-row em {
  color: #0f172a;
  font-size: 15px;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.purchase-table-card {
  padding-bottom: 10px;
}

.purchase-table-tools {
  margin-left: auto;
}

.purchase-table-tools em {
  min-width: 72px;
  text-align: right;
}

.purchase-table-wrap {
  max-height: 520px;
  overflow: auto;
}

.purchase-table {
  width: 100%;
  border-collapse: collapse;
}

.purchase-table th,
.purchase-table td {
  padding: 13px 10px;
  border-bottom: 1px solid #e5edf5;
  text-align: left;
  vertical-align: middle;
}

.purchase-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #64748b;
  background: #fff;
  font-size: 12px;
  font-weight: 950;
}

.purchase-table-status-filter {
  width: 120px;
  height: 38px;
  padding: 0 28px 0 10px;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  color: #0f172a;
  background: #fff;
  font-size: 12px;
  font-weight: 950;
  outline: none;
}

.purchase-table-status-filter:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.purchase-table td {
  color: #0f172a;
  font-size: 13px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.purchase-table td strong {
  display: block;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-status {
  display: inline-block;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

.purchase-status.danger {
  color: #9f1239;
  background: #ffe4e6;
}

.purchase-status.warning {
  color: #9a3412;
  background: #ffedd5;
}

.purchase-status.healthy {
  color: #0f766e;
  background: #ccfbf1;
}

.purchase-status.excess,
.purchase-status.silent {
  color: #334155;
  background: #e2e8f0;
}

.sandbox-page {
  display: grid;
  gap: 16px;
}

.sandbox-page.hidden {
  display: none;
}

.sandbox-head,
.sandbox-scope-bar,
.sandbox-library,
.sandbox-canvas-card,
.sandbox-control-card,
.sandbox-result-card,
.sandbox-diagnosis-card {
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #fff;
}

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

.sandbox-head h3 {
  margin-top: 8px;
  color: #0f172a;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 950;
}

.sandbox-head p:last-child {
  margin-top: 10px;
  color: #64748b;
  font-size: 13px;
  font-weight: 850;
}

.sandbox-ghost-btn,
.sandbox-reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid #cbd8e6;
  border-radius: 8px;
  color: #0f766e;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.sandbox-ghost-btn:hover,
.sandbox-reset-btn:hover {
  border-color: #0f766e;
  background: #ecfdf5;
}

.sandbox-ghost-btn:active,
.sandbox-reset-btn:active {
  transform: translateY(1px);
}

.sandbox-scope-bar {
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) minmax(280px, 1.4fr) minmax(160px, 0.7fr) minmax(240px, 1fr);
  gap: 12px;
  padding: 16px;
}

.sandbox-scope-bar label,
.sandbox-base-chip {
  display: grid;
  gap: 7px;
}

.sandbox-scope-bar span,
.sandbox-base-chip span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.sandbox-scope-bar select {
  height: 42px;
  min-width: 0;
  padding: 0 34px 0 12px;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  color: #0f172a;
  background: #fff;
  font-size: 13px;
  font-weight: 850;
  outline: none;
}

.sandbox-scope-bar select:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.sandbox-base-chip {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.sandbox-base-chip strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sandbox-workbench {
  display: grid;
  grid-template-columns: minmax(210px, 0.55fr) minmax(560px, 1.55fr) minmax(300px, 0.82fr);
  gap: 14px;
  align-items: stretch;
}

.sandbox-library,
.sandbox-canvas-card,
.sandbox-control-card,
.sandbox-result-card,
.sandbox-diagnosis-card {
  min-width: 0;
  padding: 18px;
}

.sandbox-control-card,
.sandbox-library {
  min-height: 620px;
}

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

.sandbox-panel-title span {
  color: #0f766e;
  font-size: 15px;
  font-weight: 950;
}

.sandbox-panel-title em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  text-align: right;
}

.sandbox-library-group {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.sandbox-library-group strong {
  color: #0f172a;
  font-size: 12px;
  font-weight: 950;
}

.sandbox-library-group button {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 11px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #0f172a;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.sandbox-library-group button:hover {
  transform: translateY(-1px);
  border-color: #99d4cc;
  background: #f0fdfa;
}

.sandbox-library-group button.active {
  border-color: #0f766e;
  background: #ecfdf5;
}

.sandbox-library-group button span {
  font-size: 13px;
  font-weight: 950;
}

.sandbox-library-group button em {
  color: #64748b;
  font-size: 11px;
  line-height: 1.45;
  font-style: normal;
  font-weight: 800;
}

.sandbox-canvas {
  display: grid;
  gap: 30px;
  min-height: 560px;
  align-content: center;
  overflow-x: auto;
  padding: 10px 0 4px;
}

.sandbox-flow-row {
  display: flex;
  align-items: center;
  min-width: max-content;
}

.sandbox-flow-item {
  display: inline-flex;
  align-items: center;
}

.sandbox-node {
  display: grid;
  gap: 8px;
  width: 124px;
  min-height: 100px;
  padding: 12px;
  border: 1px solid #dbe5ef;
  border-top: 4px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 24px -22px rgba(15, 23, 42, 0.5);
}

.sandbox-node.is-active {
  border-color: #8bd8d0;
  border-top-color: #0f766e;
  background: #f0fdfa;
}

.sandbox-node.up {
  border-top-color: #0f766e;
}

.sandbox-node.down {
  border-top-color: #d97706;
}

.sandbox-node span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.sandbox-node strong {
  color: #0f172a;
  font-size: 17px;
  line-height: 1.1;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.sandbox-node em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.sandbox-node.up em {
  color: #0f766e;
}

.sandbox-node.down em {
  color: #b45309;
}

.sandbox-flow-arrow {
  margin: 0 10px;
  color: #94a3b8;
  font-size: 13px;
}

.sandbox-variable-panel {
  display: grid;
  gap: 12px;
  max-height: 560px;
  overflow-y: auto;
  padding-right: 6px;
}

.sandbox-variable {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.sandbox-variable-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.sandbox-variable-head div {
  display: grid;
  gap: 4px;
}

.sandbox-variable-head span {
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
}

.sandbox-variable-head em {
  color: #64748b;
  font-size: 11px;
  line-height: 1.45;
  font-style: normal;
  font-weight: 800;
}

.sandbox-variable-head button {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  color: #64748b;
  background: #e2e8f0;
  cursor: pointer;
}

.sandbox-variable-value strong {
  color: #0f766e;
  font-size: 22px;
  line-height: 1;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.sandbox-variable input[type="range"] {
  width: 100%;
  accent-color: #0f766e;
}

.sandbox-variable-range {
  display: flex;
  justify-content: space-between;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 850;
}

.sandbox-output-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 14px;
}

.sandbox-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.sandbox-result-grid article {
  min-height: 112px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.sandbox-result-grid span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.sandbox-result-grid strong {
  display: block;
  margin-top: 17px;
  color: #0f172a;
  font-size: 22px;
  line-height: 1;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.sandbox-result-grid em {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.sandbox-result-grid article.up em {
  color: #0f766e;
}

.sandbox-result-grid article.down em {
  color: #b45309;
}

.sandbox-diagnosis {
  display: grid;
  gap: 12px;
}

.sandbox-diagnosis div {
  padding: 13px 14px;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #0f766e;
  border-radius: 8px;
  background: #f8fafc;
}

.sandbox-diagnosis span {
  color: #0f766e;
  font-size: 13px;
  font-weight: 950;
}

.sandbox-diagnosis p {
  margin-top: 8px;
  color: #334155;
  font-size: 13px;
  line-height: 1.7;
  font-weight: 800;
}

.sandbox-loading {
  display: grid;
  min-height: 140px;
  place-items: center;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-parent {
  grid-template-columns: 24px 1fr;
}

.nav-parent[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-parent[aria-expanded="true"] i {
  color: #34d399;
}

.nav-subitems {
  display: grid;
  gap: 5px;
  padding: 0 0 4px 38px;
}

.nav-subitem {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 7px;
  color: #94a3b8;
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.nav-subitem:hover,
.nav-subitem.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.project-workspace-page {
  display: grid;
  gap: 16px;
}

.project-workspace-page.hidden {
  display: none;
}

.project-workspace-panel {
  display: grid;
  gap: 16px;
}

.project-page-head,
.project-card,
.project-kpi-grid article {
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #fff;
}

.project-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 30px;
}

.project-page-head h3 {
  margin-top: 8px;
  color: #0f172a;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 950;
}

.project-page-head p:last-child {
  margin-top: 10px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.project-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-head-actions button,
.project-form-actions button,
.project-card form button,
.project-row-btn {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #c9d7e6;
  border-radius: 8px;
  color: #0f172a;
  background: #fff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.project-head-actions button.active,
.project-form-actions button:first-child,
.project-card form button[type="submit"] {
  border-color: #0f766e;
  color: #fff;
  background: #0f766e;
}

.project-filter-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #fff;
}

.project-filter-bar label,
.project-card form label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.project-filter-bar span,
.project-card form label > span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.project-filter-bar select,
.project-filter-bar input,
.project-card form input,
.project-card form select,
.project-card form textarea,
.meeting-topic-row select {
  width: 100%;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  color: #0f172a;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  outline: none;
}

.project-card form textarea {
  padding-top: 10px;
  line-height: 1.5;
  resize: vertical;
}

.project-filter-bar select:focus,
.project-filter-bar input:focus,
.project-card form input:focus,
.project-card form select:focus,
.project-card form textarea:focus,
.meeting-topic-row select:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

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

.project-kpi-grid article {
  min-height: 102px;
  padding: 16px;
}

.project-kpi-grid span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.project-kpi-grid strong {
  display: block;
  margin-top: 16px;
  color: #0f172a;
  font-size: 26px;
  line-height: 1;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.project-kpi-grid em {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.project-kpi-grid .risk strong {
  color: #be123c;
}

.project-kpi-grid .late strong {
  color: #b45309;
}

.project-overview-grid,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.project-board-grid,
.project-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.project-main-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.65fr);
}

.meeting-stack {
  display: grid;
  gap: 14px;
}

.project-maintenance-grid {
  grid-template-columns: minmax(320px, 0.78fr) minmax(420px, 1fr);
  align-items: start;
}

.project-card {
  min-width: 0;
  padding: 18px;
}

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

.project-card-head span {
  color: #0f766e;
  font-size: 15px;
  font-weight: 950;
}

.project-card-head em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.project-mini-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 92px;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #edf2f7;
}

.project-mini-row span,
.project-mini-row strong,
.project-table td,
.meeting-topic-row span,
.account-row span {
  color: #334155;
  font-size: 13px;
  font-weight: 850;
}

.project-mini-track,
.project-progress-track {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef5;
}

.project-mini-track i,
.project-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0f766e;
}

.project-table-wrap {
  max-height: 620px;
  overflow: auto;
}

.project-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

.project-table th,
.project-table td {
  padding: 16px 12px;
  border-bottom: 1px solid #e5edf5;
  text-align: center;
  vertical-align: middle;
}

.project-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #64748b;
  background: #fff;
  font-size: 12px;
  font-weight: 950;
}

.project-table th:first-child,
.project-table td.project-name-cell,
.project-table td.project-week-cell {
  text-align: left;
}

.project-week-heading {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.project-week-heading em {
  color: #94a3b8;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.project-table td strong,
.project-table td span,
.project-table td b {
  display: block;
}

.project-table td strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 950;
}

.project-table td b {
  margin-top: 5px;
  color: #9a3412;
  font-size: 12px;
  font-weight: 900;
}

.project-status {
  display: inline-flex;
  min-width: 64px;
  justify-content: center;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

.project-status.active {
  color: #0f766e;
  background: #ccfbf1;
}

.project-status.risk {
  color: #be123c;
  background: #ffe4e6;
}

.project-status.late {
  color: #9a3412;
  background: #ffedd5;
}

.project-status.done {
  color: #166534;
  background: #dcfce7;
}

.project-status.review,
.project-status.paused {
  color: #334155;
  background: #e2e8f0;
}

.project-progress {
  display: grid;
  grid-template-columns: 42px 120px;
  align-items: center;
  gap: 8px;
  width: 170px;
  height: 22px;
  margin: 0 auto;
}

.project-progress span {
  color: #0f172a;
  font-size: 12px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.project-progress-track {
  height: 14px;
}

.project-week-cell {
  max-width: 340px;
  line-height: 1.55;
}

.project-week-cell span,
.project-week-cell b {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.milestone-cell {
  display: grid;
  width: 100%;
  min-width: 190px;
  min-height: 62px;
  align-content: center;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid #dbe7f1;
  border-radius: 8px;
  background: #fff;
  text-align: center;
  cursor: pointer;
}

.milestone-cell strong,
.milestone-cell em {
  display: block;
}

.milestone-cell strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
}

.milestone-cell em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

.milestone-cell:hover {
  border-color: #0f766e;
  background: #f0fdfa;
}

.milestone-cell.empty {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 900;
}

.project-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
}

.project-milestone-modal {
  width: min(920px, 96vw);
  max-height: min(780px, 88vh);
  overflow: auto;
  padding: 22px;
  border: 1px solid #dbe5ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
}

.project-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5edf5;
}

.project-modal-head h3 {
  margin: 4px 0 6px;
  color: #0f172a;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 950;
}

.project-modal-head span {
  color: #64748b;
  font-size: 13px;
  font-weight: 850;
}

.project-modal-head button {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid #cbd8e6;
  border-radius: 8px;
  color: #0f172a;
  background: #fff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.milestone-modal-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.milestone-modal-summary article {
  padding: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.milestone-modal-summary span,
.milestone-modal-summary strong {
  display: block;
}

.milestone-modal-summary span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.milestone-modal-summary strong {
  margin-top: 8px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 950;
}

.milestone-modal-list {
  display: grid;
  gap: 12px;
}

.milestone-modal-group {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dbe5ef;
  border-radius: 10px;
  background: #f8fafc;
}

.milestone-modal-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.milestone-modal-group-head strong {
  color: #0f766e;
  font-size: 16px;
  font-weight: 950;
}

.milestone-modal-group-head span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.milestone-modal-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.milestone-modal-row.is-late {
  border-color: #fecdd3;
  background: #fff7f7;
}

.milestone-modal-index {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 12px;
  font-weight: 950;
}

.milestone-modal-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.milestone-modal-title strong {
  color: #0f172a;
  font-size: 16px;
  font-weight: 950;
}

.milestone-modal-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.milestone-modal-meta span {
  padding: 8px 10px;
  border-radius: 7px;
  color: #334155;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 850;
}

.milestone-modal-body p {
  margin: 10px 0 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 800;
}

.milestone-modal-body p b {
  display: inline-block;
  margin-right: 8px;
  color: #64748b;
}

.milestone-modal-body p.risk,
.milestone-modal-body p.risk b {
  color: #9a3412;
}

.project-save-toast {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.3);
}

.project-save-toast > div {
  min-width: 220px;
  padding: 18px 24px;
  border: 1px solid #dbe5ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  text-align: center;
}

.project-save-toast span {
  color: #0f172a;
  font-size: 18px;
  font-weight: 950;
}

.project-save-toast.saving span::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 10px;
  border: 2px solid #cbd5e1;
  border-top-color: #0f766e;
  border-radius: 999px;
  vertical-align: -1px;
  animation: project-save-spin 0.8s linear infinite;
}

.project-save-toast.success span {
  color: #0f766e;
}

.project-save-toast.error span {
  color: #be123c;
}

@keyframes project-save-spin {
  to {
    transform: rotate(360deg);
  }
}

.project-editor-card form,
.meeting-form-card form,
.settings-grid form {
  display: grid;
  gap: 12px;
}

.project-form-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.project-check {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.project-check input {
  width: 18px;
  min-height: 18px;
}

.project-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-form-actions .project-danger-btn {
  margin-left: auto;
  border-color: #fecaca;
  color: #b91c1c;
  background: #fff7f7;
}

.project-form-actions .project-danger-btn:hover {
  border-color: #fca5a5;
  background: #fee2e2;
}

.project-settings-side,
.milestone-edit-list {
  display: grid;
  gap: 14px;
}

.milestone-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dbe7f1;
  border-radius: 8px;
  background: #f8fafc;
}

.milestone-editor-head,
.milestone-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.milestone-editor-actions,
.subproject-milestone-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.milestone-editor-head strong,
.milestone-row-head strong,
.subproject-row-head strong,
.subproject-milestone-head span {
  color: #0f766e;
  font-size: 14px;
  font-weight: 950;
}

.milestone-editor-head span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.milestone-editor-head button,
.milestone-row-head button,
.subproject-row-head button,
.subproject-milestone-head button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #cbd8e6;
  border-radius: 8px;
  color: #0f172a;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.milestone-row-head button,
.subproject-row-head button {
  color: #9a3412;
}

.subproject-edit-list {
  display: grid;
  gap: 12px;
}

.subproject-edit-row {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid #cfe0ee;
  border-radius: 8px;
  background: #fff;
}

.subproject-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e2e8f0;
}

.subproject-milestone-head {
  justify-content: space-between;
}

.milestone-edit-row {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.milestone-timeline {
  display: grid;
  gap: 10px;
}

.milestone-timeline-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.milestone-timeline-row.is-late {
  border-color: #fecdd3;
  background: #fff7f7;
}

.milestone-dot {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 12px;
  font-weight: 950;
}

.milestone-timeline-row strong,
.milestone-timeline-row span,
.milestone-timeline-row p,
.milestone-timeline-row b,
.milestone-timeline-row em {
  display: block;
}

.milestone-timeline-row strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
}

.milestone-timeline-row span {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.milestone-timeline-row p {
  margin: 6px 0 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 800;
}

.milestone-timeline-row b {
  margin-top: 5px;
  color: #be123c;
  font-size: 12px;
  font-weight: 950;
}

.milestone-timeline-row em {
  color: #0f172a;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
  text-align: right;
}

.meeting-topic-list,
.project-risk-strip,
.account-list,
.project-setting-list,
.admin-account-list {
  display: grid;
  gap: 10px;
}

.project-setting-list button {
  width: 100%;
  padding: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.project-setting-list button.active {
  border-color: #0f766e;
  background: #f0fdfa;
}

.project-setting-list strong,
.project-setting-list span {
  display: block;
}

.project-setting-list strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 950;
}

.project-setting-list span {
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.meeting-topic-row,
.account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 14px;
  align-items: center;
  padding: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.meeting-topic-row strong,
.account-row strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
  font-weight: 950;
}

.meeting-topic-row p {
  margin-top: 6px;
  color: #475569;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 800;
}

.meeting-date-filter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meeting-date-filter input {
  height: 36px;
  padding: 0 10px;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  font-weight: 850;
}

.project-risk-strip {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.project-risk-strip button {
  padding: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.project-risk-strip strong,
.project-risk-strip span {
  display: block;
}

.project-risk-strip strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 950;
}

.project-risk-strip span {
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.account-row em {
  justify-self: end;
  padding: 5px 8px;
  border-radius: 7px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

.account-form {
  margin-top: 14px;
}

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

.admin-project-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.24);
}

.admin-project-card form,
.admin-account-form {
  display: grid;
  gap: 12px;
}

.admin-project-card label span {
  display: inline-block;
  margin-bottom: 8px;
  color: #cbd6e2;
  font-size: 12px;
  font-weight: 800;
}

.admin-account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.admin-account-row strong,
.admin-account-row span {
  display: block;
}

.admin-account-row strong {
  color: #f8fafc;
  font-size: 14px;
  font-weight: 950;
}

.admin-account-row span {
  margin-top: 5px;
  color: #9aa7b7;
  font-size: 12px;
  font-weight: 850;
}

.admin-account-row em {
  padding: 5px 8px;
  border-radius: 7px;
  color: #99f6e4;
  background: rgba(20, 184, 166, 0.16);
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

.admin-project-loading {
  display: grid;
  min-height: 80px;
  place-items: center;
  color: #9aa7b7;
  font-size: 13px;
  font-weight: 900;
}

.admin-project-loading.error {
  color: #fca5a5;
}

.project-loading,
.project-empty-inline {
  display: grid;
  min-height: 120px;
  place-items: center;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}

@media (max-width: 1400px) {
  .admin-page {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .admin-config-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    position: static;
  }

  .command-hero,
  .owner-briefing,
  .promo-panel {
    grid-template-columns: 1fr;
  }

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

  .platform-analysis-panel {
    grid-template-columns: 1fr;
  }

  .product-analysis-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-analysis-main,
  .product-analysis-secondary {
    grid-template-columns: 1fr;
  }

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

  .tmall-shelf-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tmall-shelf-modules {
    grid-template-columns: 1fr;
  }

  .tmall-module-card:first-child {
    grid-column: auto;
  }

  .purchase-dashboard-grid,
  .purchase-dashboard-grid.is-main {
    grid-template-columns: 1fr;
  }

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

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

  .project-main-grid,
  .project-overview-grid,
  .settings-grid,
  .project-maintenance-grid,
  .admin-project-grid {
    grid-template-columns: 1fr;
  }

  .sandbox-workbench {
    grid-template-columns: minmax(180px, 0.58fr) minmax(460px, 1.42fr);
  }

  .sandbox-control-card {
    grid-column: 1 / -1;
    min-height: auto;
  }

  .sandbox-variable-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }

  .sandbox-scope-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .module-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }
}

@media (max-width: 980px) {
  .portal-grid,
  .modal-options,
  .config-grid-3,
  .config-grid-2 {
    grid-template-columns: 1fr;
  }

  .banner-title {
    font-size: 38px;
  }

  .portal-section {
    padding-inline: 24px;
  }

  .dashboard-page {
    grid-template-columns: 1fr;
    background: #f6f7f9;
    overflow-y: auto;
  }

  .dashboard-sidebar {
    height: auto;
  }

  .dashboard-main {
    height: auto;
    overflow: visible;
    padding: 20px;
  }

  .dashboard-topbar,
  .section-line {
    display: grid;
  }

  .platform-filter-group,
  .product-filter-group,
  .purchase-filter-bar,
  .purchase-table-tools {
    justify-self: start;
  }

  .purchase-page-head,
  .tmall-shelf-head {
    display: grid;
  }

  .project-page-head {
    display: grid;
    padding: 22px;
  }

  .project-filter-bar,
  .project-kpi-grid,
  .project-form-pair,
  .meeting-topic-row,
  .account-row {
    grid-template-columns: 1fr;
  }

  .project-mini-row {
    grid-template-columns: 1fr;
  }

  .purchase-kpi-grid,
  .tmall-shelf-kpi-grid,
  .tmall-module-stats,
  .purchase-status-legend {
    grid-template-columns: 1fr;
  }

  .sandbox-workbench,
  .sandbox-output-grid,
  .sandbox-scope-bar,
  .sandbox-result-grid,
  .sandbox-variable-panel {
    grid-template-columns: 1fr;
  }

  .sandbox-head {
    display: grid;
  }

  .sandbox-library,
  .sandbox-control-card {
    min-height: auto;
  }

  .sandbox-canvas {
    min-height: 360px;
  }

  .purchase-filter-bar,
  .purchase-table-tools {
    width: 100%;
    display: grid;
  }

  .purchase-search-input {
    width: 100%;
  }

  .platform-period-select {
    width: 142px;
  }

  .dashboard-topbar .banner-title,
  .hero-copy h3 {
    font-size: 28px;
  }

  .hero-metrics,
  .briefing-grid,
  .business-metric-grid,
  .module-grid {
    grid-template-columns: 1fr;
  }

  .platform-share-body,
  .platform-progress-row {
    grid-template-columns: 1fr;
  }

  .platform-progress-rate {
    text-align: left;
  }

  .product-analysis-kpis {
    grid-template-columns: 1fr;
  }

  .product-detail-title,
  .product-detail-tools {
    display: grid;
    justify-content: stretch;
  }

  .product-detail-select,
  .product-detail-search {
    width: 100%;
  }

  .product-structure-head,
  .product-structure-row {
    grid-template-columns: minmax(130px, 0.85fr) minmax(120px, 1fr) 72px;
    gap: 10px;
  }

  .metrics-overview-head {
    display: grid;
  }

  .achievement-head {
    display: grid;
  }

  .achievement-legend {
    justify-content: flex-start;
  }

  .achievement-chart,
  .chart-loading {
    min-height: 240px;
  }

  .metric-filter-panel,
  .metric-filter-panel.product-panel,
  .time-filter-panel {
    left: 16px;
    right: 16px;
    width: auto;
  }

  .day-picker-shell {
    grid-template-columns: 1fr;
  }

  .day-picker-shell .time-shortcuts {
    flex-direction: row;
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
  }

  .day-calendar-double {
    grid-template-columns: 1fr;
  }

  .tree-node,
  .tree-leaf {
    grid-template-columns: 1fr;
  }

  .tree-children {
    padding-left: 14px;
  }

  .tree-leaf-status,
  .tree-meta {
    justify-self: start;
  }

  .module-card {
    grid-template-columns: 38px minmax(0, 1fr) 18px;
  }

  .module-status {
    grid-column: 2;
    justify-self: start;
  }

  .promo-row {
    grid-template-columns: 72px minmax(80px, 1fr) 38px;
  }
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

@media (max-width: 1280px) {
  .tmall-filter-bar {
    min-width: 0;
    width: 100%;
  }

  .tmall-overview-grid,
  .tmall-traffic-grid,
  .tmall-promotion-grid,
  .tmall-regional-grid {
    grid-template-columns: 1fr;
  }

  .tmall-regional-grid {
    grid-template-rows: auto;
  }

  .tmall-region-rank-card {
    grid-row: auto;
    min-height: auto;
    max-height: none;
  }

  .tmall-hourly-chart {
    height: 220px;
    min-height: 0;
  }

  .tmall-region-map {
    height: 340px;
    min-height: 340px;
  }

  .tmall-ranking-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .tmall-filter-bar,
  .tmall-target-row,
  .tmall-traffic-stats,
  .tmall-promotion-stat-grid,
  .tmall-regional-grid,
  .tmall-ranking-grid,
  .tmall-trend-notes,
  .tmall-link-detail-grid {
    grid-template-columns: 1fr;
  }

  .tmall-target-main {
    display: grid;
  }

  .tmall-traffic-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .tmall-promotion-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .tmall-promotion-ring-head,
  .tmall-promotion-grid {
    display: grid;
  }

  .tmall-promotion-ring-head > strong {
    justify-items: start;
  }

  .tmall-promotion-ring-stage {
    height: 240px;
    min-height: 240px;
  }

  .tmall-promotion-ring-visual {
    inset: 0 8px;
  }

  .tmall-promotion-ring-svg {
    width: min(92%, 600px);
    max-height: 226px;
    transform: translateY(-8px) scale(1);
  }

  .tmall-promotion-ring-tooltip::before,
  .tmall-promotion-ring-tooltip::after {
    display: none;
  }

  .tmall-traffic-stats > div {
    padding: 14px;
  }

  .tmall-traffic-stats strong {
    font-size: 20px;
  }

  .tmall-funnel-head {
    display: grid;
  }

  .tmall-funnel-head > strong {
    justify-items: start;
    width: max-content;
  }

  .tmall-classic-funnel-title {
    margin-left: 0;
  }

  .tmall-classic-funnel-row,
  .tmall-classic-bridge-row {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
  }

  .tmall-classic-stage-label {
    font-size: 13px;
  }

  .tmall-classic-bar,
  .tmall-classic-bridge {
    min-width: 56px;
  }

  .tmall-product-detail-panel {
    padding: 18px;
  }

  .tmall-region-rank-card,
  .tmall-hourly-card,
  .tmall-map-card {
    padding: 16px;
  }

  .tmall-region-card-head {
    display: grid;
  }

  .tmall-region-map {
    height: 320px;
    min-height: 320px;
  }

  .tmall-map-legend {
    left: 12px;
    bottom: 12px;
    min-width: 142px;
    padding: 10px;
  }

  .tmall-map-legend-row span {
    font-size: 12px;
  }

  .tmall-map-controls {
    right: 12px;
    bottom: 12px;
  }

  .tmall-region-rank-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .tmall-region-rank-row > em {
    grid-column: 2;
  }

  .tmall-product-detail-head strong {
    font-size: 22px;
  }

  .tmall-detail-controls,
  .tmall-detail-toolbar,
  .tmall-detail-tools {
    display: grid;
    justify-content: stretch;
  }

  .tmall-detail-tabs {
    width: 100%;
  }

  .tmall-detail-tabs button {
    flex: 1;
  }

  .tmall-detail-search {
    width: 100%;
  }

  .tmall-detail-tools em {
    text-align: left;
  }
}
