:root {
  color-scheme: light;

  /* ===== 极简科技配色盘 ===== */
  /* 背景 */
  --bg: #F8FAFC;           /* 页面主背景：极浅雾灰 */
  --panel: #FFFFFF;        /* 卡片/面板：纯白 */
  --panel-border: #E2E8F0; /* 卡片边框：极淡蓝灰 */
  --panel-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);

  /* 文字 */
  --ink: #0F172A;          /* 主文字：深板岩 */
  --muted: #64748B;        /* 次要文字：石板灰 */
  --subtle: #94A3B8;       /* 辅助文字：浅石板灰 */
  --line: #E2E8F0;         /* 分割线：极淡蓝灰 */
  --line-strong: #CBD5E1;  /* 强调分割线 */

  /* 主色 */
  --primary: #4F46E5;      /* 主色：高调靛蓝 Indigo */
  --primary-2: #EEF2FF;    /* 主色浅底 */
  --primary-soft: rgba(79, 70, 229, 0.10);
  --primary-hover: #4338CA;

  /* 侧边栏（深色极简） */
  --sidebar-bg: #FFFFFF;   /* 纯白极简 */
  --sidebar-bg-2: #F8FAFC; /* hover 浅灰 */
  --sidebar-ink: #4F46E5;  /* 选中/高亮文字：靛蓝 */
  --sidebar-muted: #64748B; /* 默认文字：中灰 */
  --sidebar-active: #EEF2FF; /* 选中项背景：淡靛蓝胶囊 */
  --sidebar-border: #E2E8F0;

  /* 涨跌色 */
  --positive: #10B981;     /* 上升：翠绿 */
  --negative: #EF4444;     /* 下降：珊瑚红 */
  --positive-soft: rgba(16, 185, 129, 0.1);
  --negative-soft: rgba(239, 68, 68, 0.1);

  /* 分析图表色 */
  --analysis-meta: #4F46E5;
  --analysis-google: #0EA5E9;
  --analysis-profit: #10B981;
  --analysis-ink: #0F172A;
  --analysis-soft: rgba(15, 23, 42, 0.06);

  /* 流量渠道色 */
  --traffic-direct: #4F46E5;
  --traffic-social: #EC4899;
  --traffic-organic: #10B981;
  --traffic-paid: #F59E0B;
  --traffic-referral: #6366F1;

  /* 阴影 */
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);

  /* 字体 */
  --display-font: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  --body-font: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Helvetica Neue", system-ui, sans-serif;
  --mono-font: "SF Mono", "Fira Code", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--body-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

input {
  font: inherit;
}

.app-shell {
  height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  background: var(--bg);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100vh;
  overflow: visible;
  padding: 20px 14px 16px;
  color: var(--sidebar-muted);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  margin: 0;
  box-shadow: none;
  position: relative;
  isolation: isolate;
  z-index: 10;
}

.sidebar::before,
.sidebar::after {
  display: none !important;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 1px 8px 3px;
  text-align: center;
}

.sidebar-wordmark {
  display: block;
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-decoration: none;
  cursor: pointer;
}

.sidebar-wordmark span {
  display: inline-block;
  color: #0F172A;
  font-family: var(--display-font);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.sidebar-brand-copy {
  margin: 0;
  color: var(--sidebar-muted);
  font-family: var(--body-font);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: none;
}

.eyebrow,
.section-label {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  font-weight: 800;
}

.brand-link {
  color: inherit;
}

.store-switch {
  display: grid;
  gap: 2px;
  margin: 0 8px 2px;
  padding: 2px 18px 0 8px;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  position: relative;
}

.store-switch select {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: #3d2f23;
  font-family: var(--body-font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 0;
}

.store-switch option {
  background: #faf8f5;
  color: #3d2f23;
  font-size: 12px;
}

.store-switch::after {
  content: "▾";
  position: absolute;
  right: 2px;
  top: calc(50% + 2px);
  transform: translateY(-50%);
  color: rgba(72, 55, 40, 0.52);
  font-size: 16px;
  line-height: 1;
  pointer-events: none;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
  padding: 4px 4px 0;
  position: relative;
  margin-bottom: auto;
}

.sidebar-footer {
  padding: 4px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: auto;
}

.store-switch-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px 14px;
  border-radius: 24px;
  background: rgba(72, 55, 40, 0.06);
  border: 1px solid rgba(72, 55, 40, 0.1);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
  position: relative;
}

.store-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  border: 1px solid rgba(72, 55, 40, 0.08);
  padding: 4px;
  z-index: 100;
}

.store-menu.show { display: block; }

.store-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 100ms ease;
}

.store-menu-item:hover { background: rgba(72, 55, 40, 0.05); }

.store-menu-platform {
  font-size: 11px;
  font-weight: 800;
  color: #3d2f23;
  letter-spacing: 0.03em;
}

.store-menu-name {
  font-size: 11px;
  font-weight: 600;
  color: rgba(72, 55, 40, 0.6);
}

.store-switch-pill:hover {
  background: rgba(72, 55, 40, 0.1);
  border-color: rgba(72, 55, 40, 0.16);
}

.store-switch-platform {
  font-size: 11px;
  font-weight: 800;
  color: #3d2f23;
  letter-spacing: 0.03em;
}

.store-switch-name {
  font-size: 11px;
  font-weight: 600;
  color: rgba(72, 55, 40, 0.6);
}

.store-switch-arrow {
  margin-left: auto;
  font-size: 9px;
  color: rgba(72, 55, 40, 0.5);
}

.version-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 0 8px;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  text-align: left;
}

.version-chip span {
  color: rgba(72, 55, 40, 0.56);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--sidebar-muted);
  font-family: var(--body-font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 150ms ease, color 150ms ease;
}

/*  Hover  active  */
.sidebar-link:hover:not(.active) {
  background: var(--sidebar-bg-2) !important;
  color: var(--sidebar-ink) !important;
  transform: none !important;
}

.sidebar-link:active:not(.active) {
  transform: scale(0.98) !important;
}

.sidebar-link.active {
  background: var(--sidebar-active) !important;
  color: var(--sidebar-ink) !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  position: relative !important;
  z-index: 50 !important;
  box-shadow: none !important;
  transform: none !important;
  font-weight: 600 !important;
}

.sidebar-link.active::before {
  content: none !important;
  display: none !important;
}

.sidebar-link.active::after {
  content: none !important;
  display: none !important;
}

.sidebar-link.active .sidebar-icon {
  position: relative;
  color: var(--primary) !important;
}

.sidebar-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  color: var(--sidebar-muted);
}

.sidebar-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke: currentColor;
  fill: none;
}

.sidebar-link:hover .sidebar-icon {
  color: var(--sidebar-ink) !important;
}

.main-shell {
  height: 100vh;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  font-size: 13px;
  color: var(--ink);
  background: var(--bg);
}

.workspace-shell {
  position: relative;
  min-height: calc(100vh - 56px);
  min-width: 0;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 28px 32px;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  animation: none;
}

.workspace-shell::before,
.workspace-shell::after {
  display: none;
}

@keyframes workspaceBreath {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-4px);
  }
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 6px 6px 16px;
}

.topbar h2 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 22px;
  line-height: 1.03;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #3f3022;
}

.topbar .eyebrow {
  color: rgba(77, 59, 41, 0.52);
}

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

.date-switch {
  position: relative;
  min-width: 340px;
}

.overview-head .date-switch {
  min-width: 0;
  width: auto;
}

.date-switch > summary {
  list-style: none;
}

.date-switch > summary::-webkit-details-marker {
  display: none;
}

.date-switch-summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(101, 82, 61, 0.04);
  color: #3d2f23;
  cursor: pointer;
}

.overview-head .date-switch-summary {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.40);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
  border: 1px solid rgba(101, 82, 61, 0.04);
}

.date-switch-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 14px;
  color: rgba(72, 55, 40, 0.78);
}

.date-switch-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.date-switch-title {
  flex: 1;
  min-width: 0;
  color: rgba(77, 59, 41, 0.84);
  font-family: var(--body-font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.date-switch-arrow {
  color: rgba(72, 55, 40, 0.45);
  font-size: 11px;
  line-height: 1;
  transition: transform 140ms ease;
}

.date-switch[open] .date-switch-arrow {
  transform: rotate(180deg);
}

.date-switch-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: min(660px, calc(100vw - 24px));
  max-height: calc(100vh - 250px);
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr);
  gap: 0;
  padding: 4px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(101, 82, 61, 0.05);
  box-shadow:
    0 12px 24px rgba(88, 69, 49, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.76);
  backdrop-filter: none;
  overflow: auto;
  z-index: 30;
}

.overview-head .date-switch-panel {
  left: auto;
  right: 0;
  width: min(660px, calc(100vw - 24px));
}

.date-switch-presets {
  display: grid;
  gap: 1px;
  padding: 1px 4px 1px 0;
  border-right: 1px solid rgba(101, 82, 61, 0.015);
  background: #ffffff;
  border-radius: 12px;
}

.date-option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 23px;
  padding: 3px 6px;
  border-radius: 8px;
  color: #3d2f23;
  font-family: var(--body-font);
  font-size: 8px;
  font-weight: 600;
  text-decoration: none;
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.date-option:hover:not(.active) {
  background: rgba(101, 82, 61, 0.05);
}

.date-option:active {
  transform: scale(0.97);
}

.date-option.active {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(101, 82, 61, 0.03);
}

.date-switch-picker {
  display: grid;
  gap: 4px;
  padding-left: 6px;
  min-width: 0;
}

.date-switch-picker-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.date-switch-month-nav {
  display: inline-flex;
  gap: 4px;
}

.date-switch-month-nav button {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.62);
  color: #5c4835;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(101, 82, 61, 0.08);
  transition: background 0.15s ease, transform 0.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.date-switch-month-nav button:hover {
  background: rgba(255, 255, 255, 0.85);
}

.date-switch-month-nav button:active {
  transform: scale(0.92);
}

.date-switch-custom-head {
  display: grid;
  gap: 1px;
}

.date-switch-custom-head span {
  color: rgba(77, 59, 41, 0.56);
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.date-switch-custom-head strong {
  color: #3d2f23;
  font-family: var(--display-font);
  font-size: 10px;
  line-height: 1.05;
}

.date-switch-calendar-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4px;
}

.date-month {
  display: grid;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(101, 82, 61, 0.04);
}

.date-month-title {
  color: #3d2f23;
  font-family: var(--display-font);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.date-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  color: rgba(77, 59, 41, 0.48);
  font-size: 5px;
  font-weight: 700;
  text-align: center;
}

.date-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
}

.date-day {
  height: 20px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #3d2f23;
  font: inherit;
  font-size: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, transform 0.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.date-day:hover:not(.is-empty):not(.is-start):not(.is-end):not(.is-in-range) {
  background: rgba(101, 82, 61, 0.06);
}

.date-day:active:not(.is-empty) {
  transform: scale(0.94);
}

.date-day.is-empty {
  pointer-events: none;
  opacity: 0;
}

.date-day.is-outside {
  color: rgba(77, 59, 41, 0.28);
}

.date-day.is-in-range {
  background: rgba(169, 134, 90, 0.08);
  color: #3d2f23;
}

.date-day.is-start,
.date-day.is-end {
  background: #3d2f23;
  color: #faf8f5;
  box-shadow: 0 6px 14px rgba(61, 47, 35, 0.16);
}

.date-day.is-start.is-end {
  background: linear-gradient(135deg, #8f74ff, #3d2f23);
}

.date-switch-footer {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  padding-top: 1px;
}

.date-switch-footer button {
  min-width: 56px;
  min-height: 26px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.date-switch-footer button:hover {
  filter: brightness(0.98);
}

.date-switch-footer button:active {
  transform: scale(0.96);
}

.date-switch-footer button[data-date-cancel] {
  background: rgba(255, 255, 255, 0.18);
  color: #3d2f23;
  box-shadow: inset 0 0 0 1px rgba(101, 82, 61, 0.08);
}

.date-switch-footer .date-switch-confirm {
  background: #3d2f23;
  color: #faf8f5;
}

.date-switch-range-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.date-switch-range-arrow {
  color: rgba(72, 55, 40, 0.55);
  font-size: 18px;
  line-height: 1;
  padding-bottom: 10px;
}

.icon-chip {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  border: 0;
  font-weight: 800;
  color: #3d2f23;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #3d2f23;
  margin-top: 4px;
  cursor: pointer;
  transition: background 180ms cubic-bezier(0.16, 1, 0.3, 1), transform 120ms cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-chip:hover {
  background: rgba(255, 255, 255, 0.06);
}

.profile-chip:active {
  transform: scale(0.98);
}

.profile-chip-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  line-height: 1.2;
}

.profile-chip-text strong {
  font-size: 14px;
  font-weight: 700;
  color: #3d2f23;
  letter-spacing: -0.01em;
}

.profile-chip-text span {
  font-size: 12px;
  color: rgba(77, 59, 41, 0.5);
  margin-top: 1px;
}

.avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.avatar.shopify-avatar {
  background: transparent;
  border-radius: 10px;
}

/* 店铺选择器 */
.profile-chip {
  cursor: pointer;
  position: relative;
}

.store-chevron {
  margin-left: auto;
  color: rgba(77, 59, 41, 0.35);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.profile-chip:active .store-chevron {
  transform: scale(0.9);
}

.store-selector-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(101, 82, 61, 0.08);
  box-shadow: 0 12px 40px rgba(88, 69, 49, 0.10), 0 2px 8px rgba(88, 69, 49, 0.04);
  padding: 6px;
  z-index: 100;
  animation: selectorSlideUp 0.2s ease;
}

.store-selector-menu.show {
  display: block;
}

@keyframes selectorSlideUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.store-selector-header {
  padding: 10px 12px 6px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(77, 59, 41, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.store-selector-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  min-height: 68px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s cubic-bezier(0.16, 1, 0.3, 1);
  background: transparent;
}

.store-selector-item:hover {
  background: rgba(101, 82, 61, 0.04);
}

.store-selector-item:active {
  transform: scale(0.985);
}

.store-selector-item.active {
  background: rgba(90, 158, 62, 0.07);
}

.store-selector-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  flex-shrink: 0;
}

.shopify-bg,
.amazon-bg,
.walmart-bg,
.etsy-bg {
  background: transparent;
}

.avatar.amazon-avatar,
.avatar.walmart-avatar,
.avatar.etsy-avatar {
  background: transparent;
  border-radius: 10px;
}

.store-selector-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  gap: 1px;
}

.store-selector-name {
  font-size: 14px;
  font-weight: 600;
  color: #3d2f23;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.store-selector-platform {
  font-size: 12px;
  color: rgba(77, 59, 41, 0.45);
  line-height: 1.3;
}

.store-selector-check {
  flex-shrink: 0;
  opacity: 0.9;
}

.page-content {
  min-width: 0;
  display: grid;
  gap: 14px;
  color: var(--ink);
  position: relative;
  z-index: 1;
  padding: 4px 4px 0;
  margin-top: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

.page-content::before,
.page-content::after {
  display: none;
}

.hero,
.panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #3d2f23;
  position: relative;
  overflow: visible;
}

.hero::before,
.panel::before {
  display: none;
}

.hero {
  display: grid;
  gap: 14px;
  padding: 0;
}

.hero-home,
.hero-list,
.hero-detail {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}

.hero-home {
  align-items: stretch;
  grid-template-columns: 1fr;
}

.hero-copy {
  display: grid;
  gap: 10px;
  align-content: start;
}

.hero-copy h2,
.panel-head h3,
h3 {
  margin: 0;
}

.hero-copy h2 {
  font-family: var(--display-font);
  font-size: clamp(24px, 2.6vw, 30px);
  line-height: 1.06;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #3d2f23;
}

.hero .muted,
.panel .muted {
  color: rgba(77, 59, 41, 0.54);
}

.hero-note {
  display: grid;
  gap: 6px;
  max-width: 360px;
  padding: 16px 18px;
  border-radius: 18px;
  background: transparent;
  border: 0;
  color: #3d2f23;
  backdrop-filter: none;
}

.hero-note-label {
  color: rgba(77, 59, 41, 0.52);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
}

.hero-copy-compact {
  max-width: 420px;
}

.hero-note-tight {
  max-width: 320px;
}

.overview-module {
  display: grid;
  gap: 16px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.overview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.overview-head h2 {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1;
  letter-spacing: 0.008em;
  color: #3d2f23;
}

.overview-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1.12fr);
  gap: 16px;
  align-items: stretch;
}

.overview-stats-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.overview-stats-panel .overview-stat {
  min-height: 132px;
  padding: 14px 14px 13px;
  align-content: start;
}

.overview-stats-panel .overview-stat strong {
  font-size: clamp(30px, 3.4vw, 44px);
}

.overview-stats-panel .overview-stat p {
  margin: 0;
  color: rgba(77, 59, 41, 0.54);
  font-size: 12px;
  line-height: 1.45;
}

.overview-trend-panel {
  min-height: 100%;
  padding: 14px 15px 12px;
}

.overview-trend-panel .trend-chart-wrap {
  min-height: 196px;
}

.overview-trend-panel .trend-chart {
  height: 196px;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.76fr) minmax(0, 2.20fr);
  gap: 16px;
  align-items: stretch;
}

.overview-stat {
  display: grid;
  gap: 8px;
  padding: 12px 11px 11px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(250, 248, 245, 0.08));
  border: 1px solid rgba(101, 82, 61, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.44);
  min-height: 136px;
  align-content: center;
}

.overview-stat span {
  color: rgba(77, 59, 41, 0.56);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.overview-stat strong {
  font-family: var(--display-font);
  font-size: clamp(34px, 4.1vw, 54px);
  line-height: 1;
  color: #3d2f23;
}

.overview-stat p {
  margin: 0;
  color: rgba(77, 59, 41, 0.58);
}

.overview-stat-strong {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.30), rgba(250, 248, 245, 0.12));
}

.overview-stat p {
  max-width: 220px;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.analysis-card {
  appearance: none;
  position: relative;
  overflow: hidden;
  font: inherit;
  border: 1px solid rgba(101, 82, 61, 0.10);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(250, 248, 245, 0.94));
  border-radius: 22px;
  box-shadow: 0 10px 24px rgba(88, 69, 49, 0.045);
  padding: 15px;
  display: grid;
  gap: 16px;
  text-align: left;
  color: var(--analysis-ink);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.analysis-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(88, 69, 49, 0.06);
}

.analysis-card:active {
  transform: translateY(-1px) scale(0.99);
}

.analysis-card.is-active {
  color: #fefbf6;
  border-color: rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.18), rgba(255, 249, 242, 0.04)),
    url("/static/assets/sidebar-wood.png");
  background-repeat: no-repeat, no-repeat;
  background-size: cover, cover;
  background-position: center, center;
  background-blend-mode: soft-light, normal;
  box-shadow: 0 16px 34px rgba(88, 69, 49, 0.10);
}

.analysis-card.is-active::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(61, 47, 35, 0.08), rgba(61, 47, 35, 0.20));
  pointer-events: none;
}

.analysis-card > * {
  position: relative;
  z-index: 1;
}

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

.analysis-card-head span {
  display: block;
}

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

.analysis-card-head > div > span {
  color: rgba(77, 59, 41, 0.58);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.analysis-card.is-active .analysis-card-head > div > span,
.analysis-card.is-active .analysis-card-tag,
.analysis-card.is-active .analysis-list,
.analysis-card.is-active .analysis-row span,
.analysis-card.is-active .analysis-row em,
.analysis-card.is-active .analysis-row strong {
  color: #fefbf6;
}

.analysis-card-head strong {
  font-family: var(--display-font);
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1;
  color: inherit;
}

.analysis-card-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(169, 134, 90, 0.10);
  color: #8b6841;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.analysis-card.is-active .analysis-card-tag {
  background: rgba(255, 255, 255, 0.16);
}

.analysis-card-body {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.analysis-card-body-geo {
  align-items: start;
}

.ring-chart {
  --ring-gradient: conic-gradient(var(--analysis-meta) 0 50%, var(--analysis-google) 50% 100%);
  --ring-bg: rgba(101, 82, 61, 0.08);
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: var(--ring-gradient);
  display: grid;
  place-items: center;
  position: relative;
  flex: 0 0 104px;
}

.ring-chart::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: rgba(250, 248, 245, 0.92);
  box-shadow: inset 0 0 0 1px rgba(101, 82, 61, 0.06);
}

.analysis-card.is-active .ring-chart::before {
  background: rgba(255, 251, 245, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.ring-chart-inner {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 4px;
  text-align: center;
  color: var(--analysis-ink);
}

.analysis-card.is-active .ring-chart-inner {
  color: #fefbf6;
}

.ring-chart-inner strong {
  font-family: var(--display-font);
  font-size: 24px;
  line-height: 1;
}

.ring-chart-inner span {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: inherit;
}

.analysis-list {
  display: grid;
  gap: 10px;
}

.analysis-list-geo {
  max-height: 244px;
  overflow: auto;
  padding-right: 4px;
}

.analysis-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: inset 0 0 0 1px rgba(101, 82, 61, 0.06);
  color: var(--analysis-ink);
}

.analysis-card.is-active .analysis-row {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.analysis-row span {
  font-size: 12px;
  font-weight: 700;
}

.analysis-row strong {
  font-family: var(--display-font);
  font-size: 15px;
  line-height: 1;
}

.analysis-row em {
  font-style: normal;
  color: rgba(77, 59, 41, 0.58);
  font-size: 11px;
  font-weight: 700;
}

.analysis-row-country {
  grid-template-columns: minmax(0, 1.2fr) auto auto;
}

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

.analysis-list-geo .analysis-row {
  background: rgba(255, 255, 255, 0.66);
}

.analysis-card.is-active .analysis-list-geo .analysis-row {
  background: rgba(255, 255, 255, 0.10);
}

.trend-card {
  display: grid;
  gap: 10px;
  padding: 12px 13px 10px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(250, 248, 245, 0.05));
  border: 1px solid rgba(101, 82, 61, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.trend-card-inline {
  min-height: 150px;
}

.trend-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #3d2f23;
  font-size: 12.5px;
  font-weight: 700;
}

.trend-card-head span:last-child {
  color: rgba(77, 59, 41, 0.58);
}

.version-page {
  display: grid;
  gap: 16px;
  min-height: calc(100vh - 76px);
}

.version-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 4px 0;
}

.version-page-head h2 {
  margin: 2px 0 6px;
  font-family: var(--display-font);
  font-size: clamp(28px, 2.8vw, 36px);
  line-height: 1;
}

.version-page-head .muted {
  max-width: 620px;
}

.version-page-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(101, 82, 61, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  color: #3d2f23;
  font-size: 13px;
  font-weight: 700;
}

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

.version-card {
  display: grid;
  gap: 14px;
  padding: 18px 18px 16px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(250, 248, 245, 0.08));
  border: 1px solid rgba(101, 82, 61, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
  min-height: 520px;
}

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

.version-card-head span {
  font-family: var(--display-font);
  font-size: clamp(24px, 2.2vw, 30px);
  line-height: 1;
}

.version-card-head em {
  color: rgba(77, 59, 41, 0.56);
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.version-editable {
  min-height: 100%;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(101, 82, 61, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.70);
  color: #3d2f23;
  line-height: 1.75;
  font-size: 15px;
  white-space: pre-wrap;
  outline: none;
}

.version-editable:focus {
  border-color: rgba(169, 134, 90, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 0 0 3px rgba(169, 134, 90, 0.10);
}

.version-editable ul {
  margin: 0;
  padding-left: 18px;
}

.version-editable li + li {
  margin-top: 8px;
}

.version-muted {
  color: rgba(77, 59, 41, 0.56);
  font-size: 13px;
}

.trend-chart-wrap {
  width: 100%;
  min-height: 184px;
}

.trend-card-inline .trend-chart-wrap {
  min-height: 132px;
}

.trend-chart {
  width: 100%;
  height: 184px;
  overflow: visible;
}

.trend-card-inline .trend-chart {
  height: 132px;
}

.insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.insight-card {
  display: grid;
  gap: 12px;
  padding: 19px 21px 18px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(250, 248, 245, 0.08));
  border: 1px solid rgba(101, 82, 61, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
  min-height: 196px;
}

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

.insight-card-head span {
  display: block;
}

.insight-card-head > div {
  display: grid;
  gap: 4px;
}

.insight-card-head > div > span {
  color: rgba(77, 59, 41, 0.56);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.insight-card-head strong {
  font-family: var(--display-font);
  font-size: clamp(22px, 2.15vw, 28px);
  line-height: 1.02;
}

.insight-card-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(169, 134, 90, 0.10);
  color: #8b6841;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.product-list {
  display: grid;
  gap: 2px;
}

.product-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 4px 0 5px;
  position: relative;
}

.product-row::after {
  content: "";
  position: absolute;
  left: 34px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(101, 82, 61, 0.12), rgba(101, 82, 61, 0.04));
}

.product-row:last-child::after {
  display: none;
}

.product-thumb {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
  color: #3d2f23;
  font-size: 17px;
  line-height: 1;
}

.product-thumb-1 {
  background: linear-gradient(135deg, #a9865a, #c79a6a);
}

.product-thumb-2 {
  background: linear-gradient(135deg, #d7b78d, #be9d72);
}

.product-thumb-3 {
  background: linear-gradient(135deg, #b7a087, #8f785f);
}

.product-copy strong {
  display: block;
  color: #3d2f23;
  font-size: 12px;
  font-weight: 800;
}

.product-copy p {
  margin: 2px 0 0;
  color: rgba(77, 59, 41, 0.58);
  font-size: 10px;
}

.product-value {
  font-family: var(--display-font);
  font-size: 15px;
  color: #3d2f23;
}

.traffic-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

.traffic-list {
  display: grid;
  gap: 5px;
  align-content: start;
}

.traffic-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 7px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.36);
  box-shadow: inset 0 0 0 1px rgba(101, 82, 61, 0.05);
}

.traffic-thumb {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.traffic-thumb-direct {
  background: linear-gradient(135deg, #a9865a, #c79a6a);
}

.traffic-thumb-facebook {
  background: linear-gradient(135deg, #1877f2, #4a90ff);
}

.traffic-thumb-instagram {
  background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af);
}

.traffic-thumb-google {
  background: linear-gradient(135deg, #4285f4, #6aa5ff);
}

.traffic-thumb-youtube {
  background: linear-gradient(135deg, #ff0000, #ff6b6b);
}

.traffic-thumb-tiktok {
  background: linear-gradient(135deg, #111111, #ff0050);
}

.traffic-thumb-pinterest {
  background: linear-gradient(135deg, #e60023, #ff4667);
}

.traffic-thumb-x {
  background: linear-gradient(135deg, #111111, #3d3d3d);
}

.traffic-thumb-email {
  background: linear-gradient(135deg, #7a6d60, #a18f7f);
}

.traffic-thumb-affiliate {
  background: linear-gradient(135deg, #8b6841, #b98c5a);
}

.traffic-row span {
  display: block;
  color: #3d2f23;
  font-size: 12px;
  font-weight: 800;
}

.traffic-row p {
  margin: 2px 0 0;
  color: rgba(77, 59, 41, 0.58);
  font-size: 10px;
}

.traffic-row strong {
  font-family: var(--display-font);
  font-size: 15px;
  color: #3d2f23;
}

.traffic-row em {
  font-style: normal;
  color: rgba(77, 59, 41, 0.58);
  font-size: 10px;
  font-weight: 700;
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ops-card {
  display: grid;
  gap: 8px;
  padding: 14px 18px 14px;
  min-height: 166px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(250, 248, 245, 0.08));
  border: 1px solid rgba(101, 82, 61, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
  align-content: start;
}

.ops-card-emphasis {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(250, 248, 245, 0.12));
}

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

.ops-card-head span {
  color: rgba(77, 59, 41, 0.58);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ops-card-head em {
  font-style: normal;
  color: rgba(77, 59, 41, 0.54);
  font-size: 11px;
  font-weight: 700;
}

.ops-card strong {
  font-family: var(--display-font);
  font-size: clamp(29px, 3.05vw, 42px);
  line-height: 1;
  color: #3d2f23;
}

.ops-formula {
  color: rgba(77, 59, 41, 0.52);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ops-formula-profit {
  color: #6f5cff;
}

.ops-meter {
  width: 100%;
  height: 18px;
  border-radius: 999px;
  background: rgba(169, 134, 90, 0.12);
  overflow: visible;
  position: relative;
  margin-top: 12px;
}

.ops-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--analysis-meta), var(--analysis-google));
}

.ops-meter em {
  position: absolute;
  top: 50%;
  left: clamp(18px, calc(var(--meter) - 18px), calc(100% - 16px));
  transform: translate(-50%, -50%);
  color: rgba(61, 47, 35, 0.92);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-style: normal;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.92);
  line-height: 1;
}

.ops-meter-meta em {
  color: #fff;
}

.ops-meter-soft em {
  color: #fff;
}

.ops-meter-profit em {
  color: #fff;
}

.ops-meter-soft span {
  background: linear-gradient(90deg, #b7a087, #d5c0a4);
}

.ops-meter-profit span {
  background: linear-gradient(90deg, #6f5cff, #a69cff);
}

.ops-lines {
  display: grid;
  gap: 8px;
  margin-top: 1px;
}

.ops-lines div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  color: #3d2f23;
  font-size: 13px;
  line-height: 1.15;
}

.ops-lines span {
  color: rgba(77, 59, 41, 0.58);
  font-weight: 700;
}

.ops-lines strong {
  font-family: var(--display-font);
  font-size: 14px;
  color: #3d2f23;
}

.trend-chart line {
  stroke: rgba(101, 82, 61, 0.08);
  stroke-width: 0.8;
}

.trend-chart polyline {
  fill: none;
  stroke: #6f5cff;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-chart circle {
  fill: #6f5cff;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 1.2;
}

.trend-axis {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  color: rgba(77, 59, 41, 0.52);
  font-size: 11px;
  text-align: center;
}

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

.metric-grid-dashboard {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric-grid-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.table-card,
.task-item,
.line-item,
.summary-list > div,
.empty-state {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  box-shadow: none;
  backdrop-filter: none;
}

.card-hero {
  background: transparent;
  border-color: transparent;
  color: #3d2f23;
  box-shadow: none;
}

.card-hero::before {
  display: none;
}

.card-hero span,
.card-hero .card-note {
  color: rgba(77, 59, 41, 0.72);
}

.card-hero strong {
  color: #3d2f23;
}

.card {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 16px 16px 14px;
  overflow: hidden;
}

.card::before {
  display: none;
}

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

.spend-card {
  display: grid;
  gap: 8px;
  padding: 18px 18px 16px;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.spend-card span {
  color: rgba(77, 59, 41, 0.58);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}

.spend-card strong {
  font-family: var(--display-font);
  font-size: 30px;
  letter-spacing: 0.02em;
  color: #3d2f23;
}

.spend-card .muted {
  line-height: 1.45;
}

.card span,
.table-card h4,
.summary-list span,
.muted {
  color: rgba(77, 59, 41, 0.58);
}

.card strong {
  font-family: var(--display-font);
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: 0.02em;
}

.card-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.panel {
  padding: 18px;
}

.panel + .panel {
  margin-top: 0;
}

.panel-head,
.task-item,
.order-row,
.line-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.panel-head {
  margin-bottom: 16px;
  color: #3d2f23;
}

.order-list,
.task-list,
.line-item-list,
.stack {
  display: grid;
  gap: 12px;
}

.order-row,
.table-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto auto auto;
  gap: 14px;
  padding: 16px 18px;
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  transition: none;
}

.order-row:hover,
.table-row:hover {
  box-shadow: none;
  transform: none;
}

.order-main,
.order-side {
  display: grid;
  gap: 6px;
}

.order-side {
  justify-items: end;
}

.table-shell {
  display: grid;
  gap: 10px;
}

.table-head {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto auto auto;
  gap: 14px;
  padding: 0 8px;
  color: rgba(77, 59, 41, 0.54);
  font-size: 11px;
  font-weight: 700;
}

.table-row {
  color: var(--ink);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 20px;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.status-pill,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(169, 134, 90, 0.12), rgba(169, 134, 90, 0.06));
  color: #8b6841;
  font-size: 11px;
  font-weight: 800;
}

.tag-muted {
  background: rgba(214, 202, 186, 0.18);
  color: #6e5a45;
}

.line-item {
  align-items: flex-start;
  padding: 16px;
}

.line-item-meta {
  display: grid;
  gap: 8px;
  justify-items: end;
  min-width: 150px;
  color: var(--muted);
  font-size: 12px;
}

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

.summary-list > div {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
}

ul,
ol {
  margin: 0;
  padding-left: 18px;
}

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

.task-item {
  align-items: flex-start;
  padding: 16px;
}

.empty-state {
  padding: 18px;
  color: var(--muted);
  border-radius: 0;
}

.text-link {
  color: #8b6841;
  font-weight: 800;
}

.text-link:hover {
  color: #6e5233;
}

.table-card h4,
.card span,
.summary-list span,
.muted {
  color: rgba(77, 59, 41, 0.58);
}

.workspace-shell::before,
.workspace-shell::after,
.sidebar::before,
.sidebar::after {
  animation: floatBlob 14s ease-in-out infinite alternate;
}

@keyframes floatBlob {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(0, -10px, 0) scale(1.04);
  }
}

/* ========== Large screen tuning (fullscreen optimization) ========== */
@media (min-width: 1440px) {
  .workspace-shell {
    padding: 22px 28px 26px 24px;
    gap: 20px;
  }

  .overview-grid {
    gap: 18px;
  }

  .overview-summary {
    gap: 18px;
  }

  .metric-grid-dashboard {
    gap: 14px;
  }

  .analysis-grid {
    gap: 18px;
  }

  .ops-grid {
    gap: 18px;
  }
}

@media (min-width: 1800px) {
  .workspace-shell {
    padding: 26px 36px 30px 28px;
  }
}

@media (max-width: 1100px) {
  body {
    height: auto;
    overflow: auto;
  }

  .app-shell {
    height: auto;
    grid-template-columns: 1fr;
  }

  .sidebar {
    height: auto;
    overflow: visible;
    border-radius: 0 0 24px 24px;
  }

  .main-shell {
    height: auto;
    overflow: visible;
  }

  .workspace-shell {
    min-height: auto;
  }

  .page-content {
    border-radius: 26px;
  }

  .hero-home,
  .hero-list,
  .hero-detail,
  .detail-grid,
  .overview-grid {
    grid-template-columns: 1fr;
  }

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

  .version-page-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .task-list {
    grid-template-columns: 1fr;
  }

  .overview-side {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 860px) {
  .main-shell {
    padding: 16px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .metric-grid,
  .table-grid,
  .metric-grid-compact {
    grid-template-columns: 1fr 1fr;
  }

  .metric-grid-dashboard,
  .spend-grid {
    grid-template-columns: 1fr 1fr;
  }

  .overview-summary {
    grid-template-columns: 1fr;
  }

  .overview-stats-panel {
    grid-template-columns: 1fr 1fr;
  }

  .overview-side {
    grid-template-columns: 1fr;
  }

  .version-card {
    min-height: 0;
  }

  .version-editable {
    min-height: 340px;
  }

  .panel-head,
  .task-item,
  .line-item,
  .order-row,
  .table-row {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .order-side,
  .line-item-meta {
    justify-items: start;
  }

  .date-switch {
    min-width: 0;
    width: 100%;
  }

  .date-switch-panel {
    width: min(520px, calc(100vw - 32px));
    grid-template-columns: 1fr;
  }

  .date-switch-presets {
    border-right: 0;
    padding-right: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(101, 82, 61, 0.08);
  }

  .date-switch-custom {
    padding-left: 0;
  }
}

@media (max-width: 640px) {
  .sidebar {
    height: auto;
    padding: 18px 14px;
  }

  .page-content {
    padding: 14px;
  }

  .version-page {
    gap: 12px;
  }

  .version-card {
    padding: 16px 15px 14px;
    border-radius: 24px;
  }

  .metric-grid,
  .table-grid,
  .metric-grid-compact {
    grid-template-columns: 1fr;
  }

  .metric-grid-dashboard,
  .spend-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .panel {
    padding: 16px;
  }

  .card strong {
    font-size: 26px;
  }

  .overview-module {
    padding: 18px;
  }

  .overview-stats-panel {
    grid-template-columns: 1fr;
  }

  .overview-side {
    grid-template-columns: 1fr;
  }

  .analysis-card-body {
    grid-template-columns: 1fr;
  }

  .ring-chart {
    width: 92px;
    height: 92px;
    flex-basis: 92px;
  }

  .trend-chart {
    height: 190px;
  }
}

/* ========== SPA Page Transition Animations ========== */
.page-content {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.page-content.is-exiting {
  opacity: 0;
  transform: translateX(-20px);
  pointer-events: none;
}

.page-content.is-entering {
  animation: slideInRight 0.3s ease forwards;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Prevent FOUC during SPA transitions */
.page-content.is-exiting * {
  pointer-events: none;
}

/* ========== Product Page Grid (2-column) ========== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #F0ECE4;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
}
.product-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.product-card:active {
  transform: translateY(-1px) scale(0.99);
}
.product-card-img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: #faf8f5;
  border-bottom: 1px solid #F0ECE4;
}
.product-card-body {
  padding: 12px 16px;
}
.product-card-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1a1a1a;
}
.product-card-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.product-card-price {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
}
.product-card-compare {
  font-size: 13px;
  color: #9ca3af;
  text-decoration: line-through;
}
.product-card-stock {
  font-size: 12px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.stock-ok { color: #22c55e; }
.stock-ok .stock-dot { background: #22c55e; }
.stock-low { color: #f59e0b; }
.stock-low .stock-dot { background: #f59e0b; }
.stock-out { color: #ef4444; }
.stock-out .stock-dot { background: #ef4444; }
.no-img-placeholder {
  width: 100%;
  height: 200px;
  background: #faf8f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: 36px;
  border-bottom: 1px solid #F0ECE4;
}
.product-grid-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  color: #8b949e;
  font-size: 13px;
}
.product-grid-loading .spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e8e5e0;
  border-top-color: #1A362B;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== Product Detail Modal ========== */
.product-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.product-modal {
  background: #fff;
  border-radius: 16px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
  animation: slideUp 0.2s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.product-modal-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  transition: background 0.15s, transform 0.1s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}
.product-modal-close:hover {
  background: #e5e7eb;
}
.product-modal-close:active {
  transform: scale(0.92);
}
.product-modal-img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 16px;
  background: #faf8f5;
}
.product-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 8px;
}
.product-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.product-modal-meta-item {
  font-size: 12px;
  color: #8b949e;
  font-weight: 500;
}
.product-modal-meta-item strong {
  color: #1a1a1a;
  font-weight: 600;
}
.product-modal-price {
  font-size: 24px;
  font-weight: 800;
  color: #1A362B;
  margin-bottom: 16px;
}
.product-modal-price .compare-price {
  font-size: 16px;
  font-weight: 400;
  color: #9ca3af;
  text-decoration: line-through;
  margin-left: 8px;
}
.product-modal-desc {
  font-size: 13px;
  line-height: 1.6;
  color: #8b949e;
  margin-bottom: 16px;
}
.product-modal-desc img {
  max-width: 100%;
  border-radius: 6px;
}
.product-modal-variants {
  margin-top: 12px;
}
.product-modal-variants h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8b949e;
  margin: 0 0 8px;
}
.variant-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.variant-table th {
  text-align: left;
  padding: 6px 8px;
  font-weight: 600;
  color: #8b949e;
  border-bottom: 1px solid #e8e5e0;
}
.variant-table td {
  padding: 6px 8px;
  color: #1a1a1a;
  border-bottom: 1px solid #e8e5e0;
}
.variant-table tr:last-child td {
  border-bottom: none;
}

/* ========== Task Progress Module ========== */
.task-module {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 12px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
}
.task-module-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8b949e;
}
.task-item-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.task-item-label {
  font-size: 11px;
  font-weight: 600;
  color: #555;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.task-item-label .task-pct {
  color: #2e6be6;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.task-bar {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e5e7eb;
  overflow: hidden;
}
.task-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: #2e6be6;
  transition: width 0.4s ease;
}

/* ========== Date Preset Buttons ========== */
.date-presets {
  display: flex;
  gap: 6px;
  align-items: center;
}
.date-presets-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  background: #fff;
  color: #666;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.date-presets-btn:hover {
  border-color: #2e6be6;
  color: #2e6be6;
}
.date-presets-btn:active {
  transform: scale(0.97);
}
.date-presets-btn.active {
  background: #2e6be6;
  border-color: #2e6be6;
  color: #fff;
}
