:root {
  --rd-ink: #073f3d;
  --rd-ink-2: #0a5651;
  --rd-teal: #0f9f91;
  --rd-mint: #20b8a7;
  --rd-mint-soft: #dff7f3;
  --rd-bg: #f4f7f7;
  --rd-panel: #ffffff;
  --rd-line: #dce7e6;
  --rd-line-strong: #cadbd9;
  --rd-text: #112f35;
  --rd-muted: #6d8184;
  --rd-amber: #e59a13;
  --rd-orange: #e95c2b;
  --rd-red: #e24b3c;
  --rd-blue: #377ed8;
}

body.redesign-mode {
  background: var(--rd-bg);
  color: var(--rd-text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.redesign-mode .app-shell {
  grid-template-columns: 216px minmax(980px, 1fr);
  min-width: 1180px;
  height: 100vh;
  overflow: hidden;
}

.redesign-mode .sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 14px 14px;
  gap: 20px;
  background: #063f3d;
  box-shadow: none;
}

.redesign-mode .brand {
  gap: 11px;
  padding: 0 4px 6px;
  font-size: 18px;
  letter-spacing: -.01em;
}

.redesign-mode .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  color: #063f3d;
  background: #28d4c4;
  box-shadow: none;
}

.redesign-mode .nav-label {
  margin: 18px 10px 7px;
  color: rgba(225, 255, 251, .5);
  font-size: 11px;
  letter-spacing: .04em;
}

.redesign-mode .nav-item {
  height: 42px;
  margin-bottom: 3px;
  padding: 0 12px;
  gap: 11px;
  border-radius: 7px;
  color: rgba(255,255,255,.8);
  font-size: 14px;
  font-weight: 600;
}

.redesign-mode .nav-item:hover {
  background: rgba(24, 190, 173, .12);
}

.redesign-mode .nav-item.active {
  color: #fff;
  background: #0a756d;
  box-shadow: inset 3px 0 #3ee0cb;
}

.redesign-mode .nav-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  flex-basis: 18px;
  font-size: 18px;
}

.redesign-mode .nav-icon::before,
.redesign-mode .nav-icon::after {
  position: static;
  box-sizing: content-box;
}

.redesign-mode .sidebar-footer {
  padding: 14px 2px 0;
  font-size: 11px;
  line-height: 1.55;
}

.redesign-mode .logout-button {
  height: 36px;
  border-color: rgba(255,255,255,.22);
  color: #eafffc;
  background: rgba(255,255,255,.04);
}

.redesign-mode .workspace {
  height: 100vh;
  overflow: auto;
  background: var(--rd-bg);
}

.redesign-mode .topbar {
  height: 74px;
  padding: 0 20px;
  border-bottom: 1px solid var(--rd-line);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
}

.redesign-mode .topbar h1 {
  color: var(--rd-text);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.redesign-mode .topbar p {
  margin-top: 5px;
  color: var(--rd-muted);
  font-size: 13px;
}

.redesign-mode .toolbar {
  gap: 10px;
  align-items: center;
}

.redesign-mode select,
.redesign-mode button,
.redesign-mode input[type="date"],
.redesign-mode .control-static {
  min-height: 36px;
  border-color: var(--rd-line-strong);
  border-radius: 6px;
  color: #244e51;
  background: #fff;
  font: inherit;
  font-size: 13px;
}

.redesign-mode select:focus,
.redesign-mode button:focus-visible,
.redesign-mode input:focus,
.redesign-mode textarea:focus {
  outline: 0;
  border-color: var(--rd-mint);
  box-shadow: 0 0 0 3px rgba(32, 184, 167, .12);
}

.redesign-mode .update-control {
  gap: 6px;
  border: 0;
  color: var(--rd-muted);
  background: transparent;
}

.redesign-mode .content {
  padding: 16px 20px 26px;
}

.redesign-mode .panel,
.redesign-mode .kpi-card,
.redesign-mode .recommendation,
.redesign-mode .period-card,
.redesign-mode .behavior-panel {
  border: 1px solid var(--rd-line);
  border-radius: 7px;
  background: var(--rd-panel);
  box-shadow: none;
}

.redesign-mode .panel {
  padding: 14px 16px;
}

.redesign-mode .panel-head {
  margin-bottom: 12px;
}

.redesign-mode .panel-head h2,
.redesign-mode .panel h2 {
  color: #153a40;
  font-size: 15px;
  font-weight: 750;
}

.redesign-mode .panel-head p {
  margin: 4px 0 0;
  color: var(--rd-muted);
  font-size: 12px;
}

.redesign-mode .panel-head span {
  color: var(--rd-muted);
}

.rd-command-band {
  display: grid;
  grid-template-columns: minmax(600px, 1.25fr) minmax(440px, 1fr);
  margin-bottom: 14px;
  border: 1px solid var(--rd-line);
  border-radius: 7px;
  background: #fff;
}

.rd-command-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rd-kpi {
  min-width: 0;
  padding: 15px 17px;
  border-right: 1px solid var(--rd-line);
}

.rd-kpi:last-child { border-right: 0; }
.rd-kpi small { display: block; min-height: 18px; color: var(--rd-muted); font-size: 12px; }
.rd-kpi strong { display: block; margin-top: 8px; color: #102f35; font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; }
.rd-kpi span { display: block; margin-top: 10px; color: var(--rd-muted); font-size: 11px; }
.rd-kpi.positive span, .rd-kpi.positive strong:last-of-type { color: var(--rd-teal); }
.rd-kpi.negative strong, .rd-kpi.negative span { color: var(--rd-red); }

.rd-decision-strip {
  display: grid;
  grid-template-columns: 1.25fr repeat(3, minmax(92px, 1fr));
  align-items: stretch;
  border-left: 1px solid var(--rd-line);
}

.rd-decision-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 12px 14px;
  color: #274e51;
  font-size: 12px;
  font-weight: 700;
}

.rd-decision-label small { color: var(--rd-muted); font-weight: 500; }
.rd-decision { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; margin: 9px 6px; border: 1px solid var(--rd-line); border-radius: 6px; font-size: 12px; }
.rd-decision i { font-size: 20px; }
.rd-decision.scale { color: #087a70; background: #ecfbf8; border-color: #c8eee8; }
.rd-decision.observe { color: #aa7000; background: #fffaf0; border-color: #f2e1b8; }
.rd-decision.stop { color: #c84c29; background: #fff5f1; border-color: #f1d5ca; }

.rd-chart-layout {
  display: grid;
  grid-template-columns: minmax(680px, 1fr) 270px;
  gap: 14px;
  margin-bottom: 14px;
}

.rd-main-chart { min-width: 0; }
.redesign-mode .rd-main-chart .combo-chart { height: 260px; }
.redesign-mode .rd-main-chart .combo-plot { height: 190px; padding: 28px 18px 34px; }
.redesign-mode .rd-main-chart .combo-bar { border-radius: 3px 3px 0 0; background: #4bcbbb; }
.redesign-mode .rd-main-chart .combo-bar b { display: none; }
.redesign-mode .rd-main-chart .roas-line { inset: 25px 18px auto; height: 150px; }
.redesign-mode .rd-main-chart .roas-line path { stroke: #0b5a56; stroke-width: 2.4; }
.redesign-mode .rd-main-chart .roas-line circle { fill: #fff; stroke: #0b5a56; stroke-width: 2; }

.rd-chart-footer {
  display: flex;
  gap: 24px;
  padding: 10px 12px;
  border-radius: 5px;
  color: var(--rd-muted);
  background: #f7faf9;
  font-size: 11px;
}
.rd-chart-footer strong { margin-left: auto; color: var(--rd-teal); }

.rd-action-rail { min-width: 0; }
.rd-action-summary { display: grid; gap: 9px; }
.rd-action { position: relative; padding: 12px 12px 11px 42px; border: 1px solid var(--rd-line); border-radius: 6px; background: #fff; }
.rd-action b { display: flex; align-items: center; gap: 8px; color: #24464a; font-size: 13px; }
.rd-action b > span { position: absolute; left: 12px; top: 12px; width: 21px; height: 21px; display: grid; place-items: center; border-radius: 5px; color: #fff; font-size: 11px; }
.rd-action p { margin: 8px 0 5px; color: var(--rd-muted); font-size: 11px; line-height: 1.55; }
.rd-action a { color: var(--rd-teal); text-decoration: none; font-size: 11px; font-weight: 700; }
.rd-action.scale b > span { background: var(--rd-teal); }
.rd-action.observe b > span { background: var(--rd-amber); }
.rd-action.stop b > span { background: var(--rd-orange); }

.redesign-mode .rd-rank-grid { gap: 14px; }
.redesign-mode .rank-row { min-height: 38px; grid-template-columns: 48px 1.2fr .8fr .55fr .7fr; border-radius: 0; border-bottom: 1px solid #edf2f1; background: #fff; }
.redesign-mode .rank-row.head { background: #f5faf9; border-bottom-color: var(--rd-line); }
.redesign-mode .rank-no { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 5px; color: #08786f; background: #dff7f3; }
.rd-more { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; color: var(--rd-teal); text-decoration: none; font-size: 12px; font-weight: 700; }

.rd-insight {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 0 14px;
  border: 1px solid #cfe7e3;
  border-radius: 6px;
  color: #496467;
  background: #f3fbf9;
  font-size: 12px;
}
.rd-insight > i { color: var(--rd-teal); font-size: 18px; }
.rd-insight b { color: #24484b; }
.rd-insight-time { margin-left: auto; color: var(--rd-muted); }
.rd-insight button { margin-left: auto; min-width: 32px; border: 0; background: transparent; }

.rd-behavior-kpis,
.rd-platform-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 14px;
  border: 1px solid var(--rd-line);
  border-radius: 7px;
  background: #fff;
}
.rd-platform-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.rd-behavior-kpis .rd-kpi strong { font-size: 22px; }

.behavior-layout { grid-template-columns: minmax(720px, 1fr) 290px; }
.rd-behavior-chart { height: 242px; }
.rd-behavior-chart svg { width: 100%; height: 100%; overflow: visible; }
.rd-behavior-chart .grid { stroke: #e7eeee; stroke-width: 1; }
.rd-behavior-chart .zero { stroke: #bccdcb; stroke-width: 1.2; }
.rd-behavior-chart polyline { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.rd-behavior-chart .spend-line { stroke: #0ba28f; }
.rd-behavior-chart .revenue-line { stroke: var(--rd-blue); }
.rd-behavior-chart .spend-dot { fill: #fff; stroke: #0ba28f; stroke-width: 2; }
.rd-behavior-chart .revenue-dot { fill: #fff; stroke: var(--rd-blue); stroke-width: 2; }
.rd-behavior-chart .profit { fill: #f08a3d; opacity: .9; }
.rd-behavior-chart .today { stroke: #19a997; stroke-dasharray: 5 5; }
.rd-behavior-chart .axis-label { fill: #7b8d90; font-size: 11px; }
.rd-behavior-chart .today-label { fill: #07887d; font-size: 11px; font-weight: 700; }
.rd-behavior-chart .annotation rect { fill: #fff8ed; stroke: #efbd70; }
.rd-behavior-chart .annotation text { fill: #a65f09; font-size: 10px; }
.chart-legend .revenue-key { background: var(--rd-blue) !important; }
.chart-legend .profit-key { background: #f08a3d !important; }

.rd-behavior-table-panel { padding-top: 0 !important; }
.rd-tabs { display: flex; gap: 6px; margin: 0 -16px 12px; padding: 8px 16px 0; border-bottom: 1px solid var(--rd-line); }
.rd-tabs button { position: relative; min-width: 78px; height: 38px; border: 1px solid transparent; border-bottom: 0; border-radius: 7px 7px 0 0; color: var(--rd-muted); background: transparent; cursor: pointer; transition: color .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.rd-tabs button:hover { color: #08796f; background: #eef9f7; }
.rd-tabs button:active { transform: translateY(1px); }
.rd-tabs button.active { color: #056b63; border-color: #8fded4; background: #dff7f3; box-shadow: inset 0 -3px var(--rd-teal), 0 -2px 10px rgba(15, 159, 145, .10); font-weight: 800; }
.rd-table-actions { display: flex; gap: 5px; }
.rd-table-actions button { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; border: 0; color: var(--rd-muted); background: transparent; }
.rd-data-table-wrap { overflow: auto; border: 1px solid var(--rd-line); border-radius: 5px; }
.rd-data-table { width: 100%; min-width: 1080px; border-collapse: collapse; font-size: 11px; }
.rd-data-table th { height: 36px; padding: 0 9px; color: #355b5e; background: #f6faf9; font-weight: 700; text-align: right; white-space: nowrap; }
.rd-data-table td { height: 33px; padding: 0 9px; border-top: 1px solid #e7eeee; color: #345256; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rd-data-table th:nth-child(-n+2), .rd-data-table td:nth-child(-n+2) { text-align: left; }
.rd-data-table tr.selected td { background: #effaf8; }
.rd-data-table td.negative { color: var(--rd-red); }
.rd-data-table td.positive { color: var(--rd-teal); }
.rd-radio { width: 13px; height: 13px; display: inline-block; border: 1px solid #9db2b1; border-radius: 50%; }
.selected .rd-radio { border: 4px solid var(--rd-teal); }
.rd-pagination { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding-top: 10px; color: var(--rd-muted); font-size: 11px; }
.rd-pagination button { width: 28px; min-height: 28px; padding: 0; }
.rd-pagination button.active { color: #fff; border-color: var(--rd-teal); background: var(--rd-teal); }
.rd-creative-action-table tbody tr { cursor: pointer; }
.rd-creative-action-table tbody tr:hover td { background: #f3faf8; }

.rd-platform-bars { display: grid; gap: 16px; padding: 15px 4px 8px; }
.rd-platform-bar { display: grid; grid-template-columns: 140px minmax(0, 1fr) 74px; align-items: center; gap: 14px; }
.rd-platform-name { display: flex; justify-content: space-between; color: #315154; font-size: 12px; }
.rd-platform-name span { color: var(--rd-muted); }
.rd-track { position: relative; height: 18px; border-radius: 3px; background: #eaf2f1; }
.rd-track i { display: block; height: 100%; border-radius: 3px; background: #45c7b7; }
.rd-roas-value { height: 30px; display: grid; grid-template-columns: 1fr; place-content: center; padding: 2px 8px; border: 1px solid #bfe3df; border-radius: 6px; color: #0d6963; background: #effaf8; text-align: center; font-variant-numeric: tabular-nums; }
.rd-roas-value span { font-size: 8px; line-height: 1; letter-spacing: .05em; opacity: .72; }
.rd-roas-value b { font-size: 11px; line-height: 1.2; }

.funnel-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.funnel-layout { grid-template-columns: minmax(680px, 1fr) 310px; }
.rd-funnel { display: grid; gap: 11px; padding: 6px 0; }
.rd-funnel-row { display: grid; grid-template-columns: 52px 1fr 100px 115px 90px; align-items: center; gap: 12px; color: var(--rd-muted); font-size: 11px; }
.rd-funnel-row > span { color: #315357; font-weight: 700; }
.rd-funnel-row > div { height: 28px; background: #eff5f4; }
.rd-funnel-row i { display: block; height: 100%; background: #42c6b5; }
.rd-funnel-row strong { color: #173b40; font-size: 15px; font-variant-numeric: tabular-nums; }
.rd-funnel-row em { color: #3b6265; font-style: normal; }
.rd-funnel-diagnosis h3 { margin: 22px 0 4px; color: var(--rd-muted); font-size: 12px; }
.rd-funnel-diagnosis > strong { color: var(--rd-orange); font-size: 34px; }
.rd-funnel-diagnosis p { color: #526c6f; font-size: 12px; line-height: 1.7; }
.rd-funnel-diagnosis ul { margin: 18px 0; padding-left: 18px; color: #496467; font-size: 12px; line-height: 1.9; }

/* Existing material, source, rule and review flows receive the same selected visual system. */
.redesign-mode .rd-library-page,
.redesign-mode .rd-sources-page,
.redesign-mode .rd-knowledge-page { display: grid; gap: 14px; }
.rd-library-toolbar { display: flex; align-items: center; gap: 7px; margin: -2px 0 14px; }
.rd-search { min-width: 320px; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--rd-line-strong); border-radius: 6px; background: #fff; }
.rd-search i { color: var(--rd-muted); }
.rd-search input { width: 100%; border: 0; outline: 0; color: var(--rd-text); }
.rd-library-toolbar button { min-height: 32px; border: 0; background: transparent; }
.rd-library-toolbar button.active { color: var(--rd-teal); background: #e9f8f5; }
.redesign-mode .material-upload-panel { order: 0; }
.redesign-mode .material-upload-form { grid-template-columns: minmax(150px,1fr) minmax(150px,1fr) minmax(150px,1fr) minmax(220px,1.2fr) 120px; }
.redesign-mode .material-asset-grid { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
.redesign-mode .material-asset-card { border-radius: 6px; background: #fff; }
.redesign-mode .creative-library { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.redesign-mode .creative-card { min-height: 116px; padding: 14px; border-color: var(--rd-line); border-radius: 6px; background: #fff; }
.redesign-mode .creative-card:hover { border-color: var(--rd-mint); box-shadow: 0 8px 24px rgba(7, 63, 61, .08); }

.redesign-mode .view-grid.four { gap: 10px; }
.redesign-mode .connection-card { min-height: 112px; }
.redesign-mode .source-import-box { border: 1px solid var(--rd-line); border-radius: 6px; background: #f8fbfa; }
.redesign-mode .source-import-row,
.redesign-mode .source-import-head { min-height: 40px; border-color: var(--rd-line); }
.redesign-mode .settings-list div { border-color: var(--rd-line); border-radius: 6px; background: #f8fbfa; }

.redesign-mode .knowledge-summary { gap: 0; margin-bottom: 0; border: 1px solid var(--rd-line); border-radius: 7px; background: #fff; }
.redesign-mode .knowledge-summary .kpi-card { border: 0; border-right: 1px solid var(--rd-line); border-radius: 0; }
.redesign-mode .knowledge-summary .kpi-card:last-child { border-right: 0; }
.rd-knowledge-workspace { display: grid; grid-template-columns: minmax(460px, 1.15fr) minmax(440px, .85fr); gap: 14px; align-items: start; }
.redesign-mode .knowledge-form-panel { position: sticky; top: 90px; }
.redesign-mode .knowledge-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.redesign-mode .knowledge-form .span-2 { grid-column: 1 / -1; }
.redesign-mode .knowledge-form label { color: #38595c; }
.redesign-mode .knowledge-form input:not([type="checkbox"]),
.redesign-mode .knowledge-form select,
.redesign-mode .knowledge-form textarea,
.redesign-mode .review-complete-form input,
.redesign-mode .review-complete-form select,
.redesign-mode .review-complete-form textarea { border-color: var(--rd-line-strong); border-radius: 5px; background: #fff; }
.redesign-mode .primary-action,
.redesign-mode .import-button,
.redesign-mode .review-complete-form button { color: #fff; border-color: var(--rd-teal); background: var(--rd-teal); }
.redesign-mode .rule-card,
.redesign-mode .review-card { border-color: var(--rd-line); border-radius: 6px; background: #fff; }
.redesign-mode .knowledge-list { gap: 8px; }
.redesign-mode .status-pill { border-radius: 4px; }

/* Existing dashboard and plan pages: same command-center hierarchy without changing logic. */
.redesign-mode body[data-view="dashboard"] .recommendation,
body.redesign-mode[data-view="dashboard"] .recommendation { min-height: 44px; align-items: center; border-color: #cfe7e3; background: #f3fbf9; }
body.redesign-mode[data-view="dashboard"] .kpi-grid { gap: 0; border: 1px solid var(--rd-line); border-radius: 7px; overflow: hidden; background: #fff; }
body.redesign-mode[data-view="dashboard"] .kpi-card { min-height: 94px; border: 0; border-right: 1px solid var(--rd-line); border-radius: 0; }
body.redesign-mode[data-view="dashboard"] .dashboard-grid { grid-template-columns: .8fr 1.6fr; }
body.redesign-mode[data-view="dashboard"] .lower-grid { grid-template-columns: 1.25fr .75fr; }
body.redesign-mode[data-view="dashboard"] .table-row { min-height: 40px; border-radius: 0; border-bottom: 1px solid #e7eeee; background: #fff; }
body.redesign-mode[data-view="dashboard"] .table-row.header { background: #f5faf9; }
body.redesign-mode[data-view="dashboard"] .funnel-chart { height: 220px; }

body.redesign-mode[data-view="plans"] .content { display: grid; gap: 14px; }
body.redesign-mode[data-view="plans"] .plan-filter-panel { margin: 0; }
body.redesign-mode[data-view="plans"] .local-filters { align-items: end; }
body.redesign-mode[data-view="plans"] .view-grid.four { gap: 0; border: 1px solid var(--rd-line); border-radius: 7px; overflow: hidden; background: #fff; }
body.redesign-mode[data-view="plans"] .view-grid.four .kpi-card { min-height: 86px; padding: 11px 14px; border: 0; border-right: 1px solid var(--rd-line); border-radius: 0; }
body.redesign-mode[data-view="plans"] .view-grid.four .kpi-card strong { margin: 5px 0 2px; }
body.redesign-mode[data-view="plans"] .panel:has(.plan-view-table) { scroll-margin-top: 12px; }
body.redesign-mode[data-view="plans"] .metric-picker { border-color: var(--rd-line); border-radius: 6px; background: #f8fbfa; }
body.redesign-mode[data-view="plans"] .metric-group label { border-color: var(--rd-line-strong); border-radius: 5px; }
body.redesign-mode[data-view="plans"] .view-row { border-radius: 0; background: #fff; }
body.redesign-mode[data-view="plans"] .view-head { background: #f4faf8; }
body.redesign-mode[data-view="plans"] .breakdown-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.redesign-mode[data-view="plans"] .breakdown-panel { min-height: 310px; }

/* Approved secondary-page set: funnel, library, sources and reviews. */
.rd-page-tabs { min-height: 44px; display: flex; align-items: flex-end; gap: 22px; padding: 0 12px; border-bottom: 1px solid var(--rd-line); background: #fff; }
.rd-page-tabs button { position: relative; min-width: auto; height: 44px; padding: 0 2px; border: 0; border-radius: 0; color: var(--rd-muted); background: transparent; cursor: pointer; }
.rd-page-tabs button:hover { color: var(--rd-teal); }
.rd-page-tabs button.active { color: #06786f; font-weight: 800; }
.rd-page-tabs button.active::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--rd-mint); }

.rd-funnel-design-grid { display: grid; grid-template-columns: minmax(620px, 1.35fr) minmax(360px, .85fr); gap: 14px; }
.rd-funnel-visual-panel { min-height: 470px; }
.rd-funnel-column-head { display: grid; grid-template-columns: minmax(0, 1fr) 120px 100px; gap: 12px; margin: 14px 10px 0; padding-bottom: 8px; border-bottom: 1px solid var(--rd-line); color: var(--rd-muted); font-size: 11px; text-align: center; }
.rd-funnel-visual { min-height: 290px; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 8px 10px; }
.rd-funnel-stage-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 100px; align-items: center; gap: 12px; min-height: 50px; }
.rd-funnel-stage-row > strong, .rd-funnel-stage-row > span { text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rd-funnel-stage-row > strong { color: #153e42; font-size: 14px; }
.rd-funnel-stage-row > span { color: #526f72; font-size: 12px; }
.rd-funnel-segment { min-height: 50px; display: grid; place-items: center; justify-self: center; padding: 0 28px; color: #164d50; background: #c8ebe7; clip-path: polygon(4% 0, 96% 0, 88% 100%, 12% 100%); }
.rd-funnel-segment:nth-child(2) { background: #b5e3de; }
.rd-funnel-segment:nth-child(3) { background: #9fdad4; }
.rd-funnel-segment:nth-child(4) { background: #88d0c8; }
.rd-funnel-segment:nth-child(5) { background: #6ec3b9; color: #073f3d; }
.rd-funnel-segment b { text-align: center; }
.rd-funnel-segment b { font-size: 14px; }
.rd-funnel-kpi-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.rd-funnel-kpi-pair .rd-kpi { min-height: 84px; }
.rd-funnel-diagnosis-card { min-height: 470px; display: flex; flex-direction: column; }
.rd-funnel-diagnosis-card dl { margin: 10px 0 0; }
.rd-funnel-diagnosis-card dl > div { min-height: 52px; display: grid; grid-template-columns: 130px 1fr; align-items: center; border-bottom: 1px solid #e7eeee; }
.rd-funnel-diagnosis-card dt { color: var(--rd-muted); }
.rd-funnel-diagnosis-card dd { margin: 0; color: #21484b; font-size: 15px; font-weight: 800; }
.rd-diagnosis-note { margin-top: 18px; padding: 14px; border: 1px solid #d9e9e7; border-radius: 6px; background: #f7fbfa; }
.rd-diagnosis-note p { margin: 8px 0 0; color: #597174; font-size: 12px; line-height: 1.7; }
.rd-next-action { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 18px; border-top: 1px solid #e7eeee; color: var(--rd-muted); }
.rd-drop-table { margin-top: 14px; }
.rd-drop-row { grid-template-columns: 1.25fr .8fr .8fr 1fr .8fr; }
.rd-drop-row .negative { color: var(--rd-red); font-weight: 700; }

.rd-products-page { display: grid; gap: 14px; }
.rd-product-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.rd-product-summary article { min-height: 92px; display: flex; align-items: center; gap: 16px; padding: 14px 18px; border: 1px solid var(--rd-line); border-radius: 7px; background: #fff; }
.rd-product-summary article > i { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 48px; border-radius: 50%; font-size: 25px; }
.rd-product-summary article > i.teal { color: #0c9c8e; background: #e4f7f4; }
.rd-product-summary article > i.green { color: #16b75a; background: #e3f8ea; }
.rd-product-summary article > i.orange { color: #ed8b0b; background: #fff1df; }
.rd-product-summary article > i.blue { color: #4d74e3; background: #eaf0ff; }
.rd-product-summary span { display: grid; gap: 4px; color: var(--rd-muted); font-size: 13px; }
.rd-product-summary b { color: #102f35; font-size: 24px; line-height: 1; }
.rd-product-command { display: flex; align-items: center; justify-content: space-between; }
.rd-product-command > label { width: 300px; height: 42px; display: grid; grid-template-columns: 32px 1fr; align-items: center; padding: 0 8px; border: 1px solid var(--rd-line-strong); border-radius: 6px; background: #fff; }
.rd-product-command img { width: 26px; height: 26px; border-radius: 5px; object-fit: cover; }
.rd-product-command select { width: 100%; border: 0; font-size: 15px; font-weight: 700; }
.rd-product-command > div { display: flex; gap: 10px; }
.rd-product-command button { display: inline-flex; align-items: center; gap: 6px; padding: 0 16px; }
.rd-product-identity { min-height: 180px; display: grid; grid-template-columns: 140px minmax(180px, 1fr) repeat(4, minmax(110px, .8fr)); align-items: center; gap: 16px; }
.rd-product-identity > img { width: 112px; height: 112px; border-radius: 18px; object-fit: cover; }
.rd-product-name h2 { margin: 0 0 10px; font-size: 25px; }
.rd-product-name span { color: #456467; font-size: 13px; }
.rd-product-name span i { width: 9px; height: 9px; display: inline-block; margin-right: 7px; border-radius: 50%; background: #0d9b7e; }
.rd-product-identity dl { margin: 0; }
.rd-product-identity dt { margin-bottom: 14px; color: var(--rd-muted); font-size: 12px; }
.rd-product-identity dd { margin: 0; color: #173d41; font-size: 15px; font-weight: 700; }
.rd-product-workspace { display: grid; grid-template-columns: minmax(650px, 1.35fr) minmax(340px, .85fr); gap: 14px; align-items: start; }
.rd-product-profile { padding-top: 0; }
.rd-product-sections { padding: 0 4px; }
.rd-product-sections > section { padding: 22px 0; border-bottom: 1px solid var(--rd-line); }
.rd-product-sections > section:last-child { border-bottom: 0; }
.rd-section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.rd-section-title h3 { margin: 0; font-size: 15px; }
.rd-section-title button { min-height: 28px; padding: 0; border: 0; color: var(--rd-teal); background: transparent; }
.rd-product-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 28px; }
.rd-product-fields > div { min-width: 0; display: grid; gap: 8px; }
.rd-product-fields span { color: var(--rd-muted); font-size: 11px; }
.rd-product-fields strong { overflow: hidden; color: #1b4145; font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.rd-product-fields input { width: 100%; min-height: 34px; padding: 0 9px; }
.rd-product-side { display: grid; gap: 14px; }
.rd-health-card .panel-head strong { color: var(--rd-teal); font-size: 28px; }
.rd-health-track { height: 8px; margin: 14px 0 18px; overflow: hidden; border-radius: 999px; background: #e4eceb; }
.rd-health-track i { height: 100%; display: block; border-radius: inherit; background: var(--rd-teal); }
.rd-health-card p { min-height: 40px; display: grid; grid-template-columns: 20px 1fr 18px; align-items: center; margin: 0; color: #496669; border-bottom: 1px solid #edf2f1; font-size: 12px; }
.rd-health-card p .ti-circle-check-filled { color: #0d967f; }
.rd-operating-summary h2, .rd-linked-platforms h2 { margin: 0 0 18px; font-size: 15px; }
.rd-operating-summary > div { display: grid; grid-template-columns: repeat(4, 1fr); }
.rd-operating-summary dl { margin: 0; text-align: center; border-right: 1px solid var(--rd-line); }
.rd-operating-summary dl:last-child { border-right: 0; }
.rd-operating-summary dt { color: var(--rd-muted); font-size: 10px; }
.rd-operating-summary dd { margin: 9px 0 0; color: #173d41; font-size: 19px; font-weight: 800; }
.rd-operating-summary a { display: inline-flex; align-items: center; gap: 5px; margin-top: 20px; color: var(--rd-teal); font-weight: 700; }
.rd-linked-platforms > div { display: flex; flex-wrap: wrap; gap: 8px; }
.rd-linked-platforms span { padding: 7px 10px; border: 1px solid var(--rd-line); border-radius: 5px; color: #36575a; background: #fff; font-size: 11px; }
.rd-product-secondary { display: grid; padding: 12px 4px; }
.rd-product-secondary p { min-height: 58px; display: flex; align-items: center; justify-content: space-between; margin: 0; border-bottom: 1px solid var(--rd-line); }
.rd-product-secondary span { color: var(--rd-muted); }

.rd-library-page { display: grid; gap: 12px; }
.rd-library-command { display: grid; grid-template-columns: minmax(420px, 1fr) auto; gap: 12px; align-items: center; }
.rd-library-command .rd-search { width: 100%; min-width: 0; }
.rd-library-command .primary-action { min-width: 110px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.rd-library-filters { display: flex; gap: 10px; align-items: center; }
.rd-library-filters select { min-width: 185px; }
.rd-library-filters button { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; }
.redesign-mode .rd-upload-drawer { margin: 0; }
.rd-material-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rd-material-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--rd-line); border-radius: 7px; background: #fff; cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.rd-material-card:hover { transform: translateY(-2px); border-color: #79d6cb; box-shadow: 0 10px 24px rgba(7, 63, 61, .09); }
.rd-material-card > img { width: 100%; aspect-ratio: 16 / 9; display: block; object-fit: cover; background: #eaf3f2; }
.rd-material-card-body { position: relative; padding: 10px 11px 12px; }
.rd-material-card h3 { margin: 0; color: #08746c; font-size: 13px; }
.rd-material-card p { min-height: 30px; margin: 6px 0 8px; color: var(--rd-muted); font-size: 10px; line-height: 1.45; }
.rd-material-card dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; margin: 0; }
.rd-material-card dl div { display: flex; justify-content: space-between; gap: 4px; font-size: 10px; }
.rd-material-card dt { color: var(--rd-muted); }
.rd-material-card dd { margin: 0; color: #244b4e; font-weight: 700; }
.rd-material-card .badge { position: absolute; right: 10px; bottom: 10px; }

.rd-sources-page { display: grid; gap: 14px; }
.rd-source-panel { display: none; }
.rd-source-panel.active { display: grid; gap: 14px; }
.rd-source-grid { display: grid; grid-template-columns: minmax(620px, 1fr) 300px; gap: 14px; }
.rd-source-status-head,
.rd-source-status-row { display: grid; grid-template-columns: 1.7fr .65fr .8fr .7fr; align-items: center; gap: 12px; }
.rd-source-status-head { min-height: 34px; padding: 0 10px; color: var(--rd-muted); background: #f5faf9; font-size: 10px; font-weight: 700; }
.rd-source-status-row { min-height: 62px; padding: 0 10px; border-bottom: 1px solid #e7eeee; color: #426164; font-size: 11px; }
.rd-source-status-row > span:first-child { display: grid; gap: 4px; }
.rd-source-status-row small { color: var(--rd-muted); }
.rd-source-status-row b { color: #183f43; font-size: 13px; }
.rd-source-ok { color: #098576 !important; font-weight: 700; }
.rd-source-ok i { margin-right: 4px; }
.rd-import-flow { min-height: 320px; }
.rd-flow-step { position: relative; min-height: 62px; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.rd-flow-step > b { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--rd-teal); font-size: 11px; }
.rd-flow-step:not(:last-of-type)::after { content: ""; position: absolute; left: 11px; top: 27px; bottom: 2px; width: 1px; background: #b8dcd8; }
.rd-flow-step span { display: grid; gap: 4px; }
.rd-flow-step small { color: var(--rd-muted); }
.rd-import-trigger { min-height: 36px; display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; cursor: pointer; }
.rd-source-task-table { min-width: 0; }
.rd-import-row { grid-template-columns: 1.35fr 1fr .9fr .65fr .75fr .75fr 52px; }
.rd-mapping-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rd-mapping-grid > div { min-height: 54px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--rd-line); border-radius: 6px; background: #f8fbfa; }
.rd-mapping-grid span { color: var(--rd-muted); }
.rd-mapping-grid b { color: #0a736b; }
.rd-log-list p { min-height: 48px; display: flex; align-items: center; gap: 18px; margin: 0; border-bottom: 1px solid #e7eeee; color: #496568; }

.rd-reviews-page { display: grid; gap: 14px; }
.rd-review-tabbar { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--rd-line); background: #fff; }
.rd-review-tabbar .rd-page-tabs { flex: 1; border-bottom: 0; }
.rd-review-tabbar > .primary-action { margin-right: 12px; display: inline-flex; align-items: center; gap: 5px; }
.rd-review-panel { display: none; }
.rd-review-panel.active { display: block; }
.rd-review-design-grid { display: grid; grid-template-columns: 350px minmax(0, 1fr); gap: 14px; align-items: start; }
.rd-decision-timeline { min-height: 650px; }
.rd-decision-timeline article { min-height: 104px; display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid #e7eeee; }
.rd-decision-timeline article > b { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 5px; color: #fff; font-size: 10px; }
.rd-decision-timeline article > b.scale { background: #159e91; }
.rd-decision-timeline article > b.observe { background: #e9a318; }
.rd-decision-timeline article > b.stop { background: #e65932; }
.rd-decision-timeline article div { min-width: 0; }
.rd-decision-timeline time { color: var(--rd-muted); font-size: 10px; }
.rd-decision-timeline article strong { float: right; color: #31585b; font-size: 10px; }
.rd-decision-timeline h3 { margin: 6px 0 3px; color: #193f43; font-size: 12px; }
.rd-decision-timeline p { margin: 0; color: var(--rd-muted); font-size: 10px; line-height: 1.5; }
.rd-decision-timeline > a { display: inline-block; margin-top: 14px; color: var(--rd-teal); font-size: 11px; }
.rd-review-main { display: grid; gap: 14px; }
.rd-review-comparison { min-height: 450px; }
.rd-review-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 12px 0 8px; border: 1px solid var(--rd-line); border-radius: 6px; overflow: hidden; }
.rd-review-metrics .rd-kpi { min-height: 88px; border: 0; border-right: 1px solid var(--rd-line); border-radius: 0; }
.rd-review-metrics .rd-kpi:last-child { border-right: 0; }
.rd-review-chart-wrap { height: 245px; padding: 8px; }
.rd-review-chart-wrap canvas { width: 100%; height: 100%; display: block; }
.rd-conclusion-card p { margin: 8px 0; padding: 10px 12px; border: 1px solid #e3eceb; border-radius: 5px; color: #526d70; background: #fafcfc; font-size: 11px; }
.rd-conclusion-card a { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; color: var(--rd-teal); font-size: 11px; }
.rd-pending-card { padding: 14px; border-bottom: 1px solid var(--rd-line); }
.rd-pending-card h3 { margin: 0 0 7px; }
.rd-pending-card p { color: var(--rd-muted); }
.rd-learning-list { display: grid; gap: 8px; }
.rd-learning-list p { margin: 0; padding: 14px; border: 1px solid var(--rd-line); border-radius: 6px; background: #f8fbfa; }
.rd-review-panel[data-review-panel="records"] { display: none; gap: 14px; }
.rd-review-panel[data-review-panel="records"].active { display: grid; }
.rd-review-panel[data-review-panel="records"] .knowledge-summary { order: 0; }
.rd-review-panel[data-review-panel="records"] > .panel:not(.knowledge-form-panel) { order: 1; }
.rd-review-panel[data-review-panel="records"] .knowledge-form-panel { position: static; order: 2; }

@media (max-width: 1320px) {
  .rd-material-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rd-funnel-design-grid { grid-template-columns: minmax(560px, 1.2fr) minmax(340px, .8fr); }
}

.redesign-mode .badge { border-radius: 4px; }
.redesign-mode .badge.warn,
.redesign-mode .badge.stop { color: var(--rd-orange); background: #fff1eb; }

@media (max-width: 1280px) {
  .redesign-mode .app-shell { grid-template-columns: 204px minmax(960px, 1fr); }
  .rd-command-band { grid-template-columns: 1fr; }
  .rd-decision-strip { border-top: 1px solid var(--rd-line); border-left: 0; }
  .rd-chart-layout, .behavior-layout, .funnel-layout { grid-template-columns: minmax(650px, 1fr) 260px; }
}
