:root {
  --bg: #f4f7f6;
  --panel: #ffffff;
  --panel-soft: #f8fbfa;
  --line: #e0e7e5;
  --line-strong: #cdd9d6;
  --ink: #23282b;
  --muted: #6f7b80;
  --green: #0c8a55;
  --green-dark: #063d32;
  --green-deep: #021d19;
  --green-soft: #e7f5ee;
  --blue: #2f80ed;
  --amber: #d48a27;
  --red: #dc4c4c;
  --shadow: 0 10px 26px rgba(18, 36, 31, 0.06);
  --shadow-strong: 0 18px 42px rgba(18, 36, 31, 0.1);
  --radius: 10px;
  --radius-lg: 14px;
  --sans: "Avenir Next", "PingFang SC", "Noto Sans CJK SC", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
}

body {
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 12px;
  background:
    linear-gradient(180deg, rgba(2, 31, 26, 0.98), rgba(0, 48, 39, 0.98)),
    url("./assets/generated/platform-bg.png") left center / cover;
  color: rgba(238, 249, 244, 0.9);
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: auto;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-mark {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(70, 214, 146, 0.18));
}

.brand-block h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0.08em;
}

.brand-block p {
  margin: 4px 0 0;
  color: rgba(238, 249, 244, 0.72);
  font-size: 11px;
  line-height: 1.25;
  letter-spacing: 0.08em;
}

.main-nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  height: 46px;
  padding: 0 12px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: rgba(238, 249, 244, 0.74);
  cursor: pointer;
  text-align: left;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

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

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, #079451, #086b43);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 24px;
}

.nav-icon img {
  width: 23px;
  height: 23px;
  object-fit: contain;
  opacity: 0.82;
}

.nav-item.active .nav-icon img {
  opacity: 1;
  transform: scale(1.05);
}

.nav-item span:last-child {
  font-size: 14px;
  font-weight: 700;
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px 10px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.collapse-button {
  width: 100%;
  min-height: 38px;
  color: rgba(238, 249, 244, 0.68);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.workspace {
  min-width: 0;
  display: grid;
  grid-template-rows: 70px 1fr;
}

.topbar {
  height: 70px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: rgba(255, 255, 255, 0.88);
  background:
    linear-gradient(90deg, rgba(7, 24, 28, 0.98), rgba(11, 30, 35, 0.96)),
    url("./assets/generated/platform-bg.png") center / cover;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.menu-button,
.bell-button,
.user-button,
.top-select {
  height: 38px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.menu-button {
  width: 38px;
  font-size: 20px;
}

.top-select {
  padding: 0 16px;
  min-width: 180px;
  text-align: left;
}

.top-spacer {
  flex: 1;
}

.status-meter {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  min-height: 34px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
}

.status-meter strong {
  color: #fff;
  font-size: 13px;
}

.status-meter span {
  font-size: 12px;
}

.status-meter.online {
  color: #5fe38f;
}

.bell-button {
  position: relative;
  min-width: 40px;
}

.bell-button em {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ff4d4f;
  color: #fff;
  font-size: 12px;
  font-style: normal;
  line-height: 20px;
}

.user-button {
  padding: 0 12px;
  color: #fff;
}

.view {
  display: none;
  padding: 20px 22px 16px;
}

.view.active {
  display: block;
}

.page-toolbar {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
}

.page-toolbar h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.page-toolbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.toolbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stage-tabs {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.stage-tabs span {
  color: #4e5b60;
  font-weight: 700;
}

.stage-tab {
  min-width: 116px;
  height: 38px;
  padding: 0 18px;
  border-radius: 8px;
  color: #5e6a6f;
  background: #fff;
  border: 1px solid var(--line);
  cursor: pointer;
  font-weight: 750;
}

.stage-tab.active {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(12, 138, 85, 0.4);
  box-shadow: inset 0 0 0 1px rgba(12, 138, 85, 0.14);
}

.primary-button,
.ghost-button,
.prompt-chip {
  min-height: 36px;
  padding: 0 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 750;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(180deg, #0d9b5a, #087643);
  box-shadow: 0 8px 16px rgba(8, 118, 67, 0.22);
}

.ghost-button {
  color: #4b5b60;
  background: #fff;
  border: 1px solid var(--line);
}

.mini-button {
  min-height: 30px;
  padding: 0 10px;
}

.full-width {
  width: 100%;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-title-row.tight {
  margin-bottom: 12px;
}

.panel h3,
.chart-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.model-label,
.panel-title-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.medium-board {
  display: grid;
  grid-template-columns: 330px minmax(260px, 1fr) minmax(260px, 1fr) minmax(360px, 0.92fr);
  grid-template-rows: minmax(390px, auto) 380px 660px 360px;
  gap: 10px;
}

#mediumView .params-panel {
  grid-column: 1;
  grid-row: 1;
}

#mediumView .result-panel {
  grid-column: 2 / span 2;
  grid-row: 1;
}

#mediumView .ai-panel {
  grid-column: 4;
  grid-row: 1;
}

#mediumView .curve-card {
  grid-column: 1;
  grid-row: 2;
}

#mediumView .heatmap-card {
  grid-column: 2;
  grid-row: 2;
}

#mediumView .cube-card {
  grid-column: 1 / span 4;
  grid-row: 3;
}

#mediumView .multi-curve-card {
  grid-column: 1 / span 4;
  grid-row: 4;
}

#mediumView .comparison-panel {
  grid-column: 3 / span 2;
  grid-row: 2;
}

.params-panel {
  padding: 16px 18px;
}

.result-panel {
  padding: 18px 20px;
}

.ai-panel {
  padding: 18px 20px;
}

.chart-card,
.comparison-panel {
  padding: 16px 18px;
  min-width: 0;
}

.compact-field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.compact-field span,
.param-row span {
  color: #4d5b60;
  font-size: 13px;
  font-weight: 750;
}

.compact-field select,
.compact-field input,
.mini-select,
.param-row input[type="number"],
.param-row select,
.composer textarea,
.field-block select {
  height: 34px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  outline: none;
}

.mini-select {
  height: 30px;
  color: #6a777c;
  font-size: 12px;
}

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

.param-row {
  display: grid;
  grid-template-columns: 96px minmax(90px, 1fr) 74px;
  gap: 10px;
  align-items: center;
}

.param-row input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

.param-row input[type="number"] {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.form-actions {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px;
  margin-top: 12px;
}

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

.metric-card {
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fbfdfc);
}

.metric-card p {
  margin: 0 0 13px;
  color: #56646a;
  font-size: 14px;
  font-weight: 700;
}

.metric-card strong {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: #272d30;
  font-size: 34px;
  line-height: 1;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.metric-card strong span {
  color: #4d575c;
  font-size: 16px;
  font-weight: 700;
}

.metric-quality {
  margin-top: 10px;
  color: var(--green);
  font-weight: 800;
}

.metric-range {
  margin-top: 8px;
  color: #8a9498;
  font-size: 12px;
}

.metric-card.risk strong {
  color: var(--amber);
}

.metric-card.score strong,
.metric-card.score .metric-quality {
  color: var(--green);
}

.result-summary {
  margin-top: 22px;
  padding: 13px 16px;
  border-radius: 8px;
  color: #3b7c61;
  background: linear-gradient(90deg, #e8f6ef, #f3fbf7);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
}

.explain-copy {
  color: #4e5d62;
  font-size: 13px;
  line-height: 1.9;
}

.explain-copy h2,
.explain-copy h3 {
  margin: 14px 0 8px;
  color: var(--green);
  font-size: 15px;
  font-weight: 850;
}

.explain-copy p {
  margin: 8px 0;
}

.explain-copy ul,
.explain-copy ol {
  padding-left: 18px;
  margin: 8px 0;
}

.explain-copy li + li {
  margin-top: 4px;
}

.explain-copy strong {
  color: var(--green);
}

.ai-panel .ghost-button {
  margin-top: 14px;
}

.line-chart,
.heatmap,
.surface-plot {
  height: 260px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background:
    linear-gradient(rgba(20, 40, 35, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 40, 35, 0.04) 1px, transparent 1px),
    #fff;
  background-size: 32px 32px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 10px;
}

.chart-controls {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

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

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

.chart-controls.multi-controls {
  grid-template-columns: minmax(220px, 0.36fr) minmax(0, 1fr);
  align-items: end;
}

.chart-controls label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.chart-controls span {
  color: #4d5b60;
  font-size: 12px;
  font-weight: 800;
}

.chart-controls .mini-select {
  width: 100%;
}

.multi-metric-field {
  align-self: stretch;
}

.metric-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 34px;
  align-content: start;
}

.metric-chip {
  border: 1px solid rgba(12, 72, 50, 0.14);
  border-radius: 999px;
  background: #f8faf7;
  color: #4d5b60;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 8px 10px;
  transition: all 0.16s ease;
}

.metric-chip:hover {
  border-color: rgba(13, 124, 89, 0.42);
  color: var(--green);
}

.metric-chip.active {
  background: #e8f6ef;
  border-color: rgba(13, 124, 89, 0.45);
  color: var(--green);
  box-shadow: inset 0 0 0 1px rgba(13, 124, 89, 0.08);
}

.cube-card {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
}

.cube-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr)) minmax(180px, 0.8fr);
  gap: 10px;
  align-items: end;
}

.cube-controls label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.cube-controls span {
  color: #4d5b60;
  font-size: 12px;
  font-weight: 800;
}

.cube-controls .mini-select {
  width: 100%;
}

.density-control input[type="range"] {
  width: 100%;
  accent-color: #ff4d4f;
}

.density-control strong {
  color: #ff4d4f;
}

.cube-plot {
  min-height: 560px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
}

.line-chart svg {
  width: 100%;
  height: 100%;
}

.axis {
  stroke: rgba(35, 40, 43, 0.18);
  stroke-width: 1.3;
}

.grid-line {
  stroke: rgba(35, 40, 43, 0.07);
  stroke-width: 1;
}

.axis-label {
  fill: #7a8589;
  font-size: 10px;
}

.axis-title {
  fill: #425157;
  font-size: 11px;
  font-weight: 800;
}

.surface-grid {
  stroke: rgba(255, 255, 255, 0.42);
  stroke-width: 1;
}

.heat-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(var(--heat-cols), minmax(12px, 1fr));
  gap: 2px;
}

.heat-cell {
  display: grid;
  place-items: center;
  min-height: 18px;
  border-radius: 2px;
  color: rgba(18, 30, 26, 0.78);
  font-size: 10px;
  font-weight: 800;
}

.heatmap-chart {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 32px;
  grid-template-rows: minmax(0, 1fr) 30px;
  gap: 6px;
  align-items: stretch;
}

.heat-y-title {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: #425157;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.heatmap-chart .heat-grid {
  min-height: 0;
}

.heat-area {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 5px;
  min-width: 0;
  min-height: 0;
}

.heat-y-ticks {
  display: grid;
  grid-template-rows: repeat(var(--heat-rows), minmax(0, 1fr));
  align-items: center;
  justify-items: end;
  color: #7a8589;
  font-size: 9px;
  font-weight: 800;
}

.heat-grid-stack {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 16px;
  gap: 4px;
  min-width: 0;
  min-height: 0;
}

.heat-x-ticks {
  display: grid;
  grid-template-columns: repeat(var(--heat-cols), minmax(0, 1fr));
  color: #7a8589;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
}

.heat-legend {
  grid-column: 3;
  grid-row: 1;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 5px;
  align-items: center;
  justify-items: center;
  color: #637176;
  font-size: 10px;
  font-weight: 800;
}

.heat-legend span {
  writing-mode: vertical-rl;
  max-height: 72px;
  overflow: hidden;
}

.heat-legend i {
  width: 11px;
  height: 100%;
  min-height: 76px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ef6945, #e4d957, #18b77a);
}

.heat-x-title {
  grid-column: 2 / span 2;
  grid-row: 2;
  color: #425157;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.surface-plot {
  perspective: 760px;
  background:
    linear-gradient(transparent 31px, rgba(30, 45, 41, 0.08) 32px),
    linear-gradient(90deg, transparent 31px, rgba(30, 45, 41, 0.08) 32px),
    #fff;
}

.surface-svg {
  width: 100%;
  height: 100%;
}

.surface-face {
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 0.8;
}

.surface-label-bg {
  fill: rgba(255, 255, 255, 0.82);
  stroke: rgba(12, 138, 85, 0.14);
}

.comparison-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.comparison-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  table-layout: fixed;
}

.comparison-table th,
.comparison-table td {
  padding: 10px 6px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  white-space: normal;
}

.comparison-table th {
  color: #637176;
  background: #f7faf9;
  font-weight: 800;
}

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

.comparison-table tr.current td {
  color: var(--green);
  background: #edf9f2;
  font-weight: 850;
}

.data-note {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  color: #7a8589;
  font-size: 12px;
}

.overview-grid,
.environment-board,
.model-agent-layout,
.migration-layout,
.assistant-layout {
  display: grid;
  gap: 12px;
}

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

.summary-card {
  min-height: 154px;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.summary-card img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.summary-card p {
  margin: 10px 0 4px;
  color: var(--green);
  font-size: 13px;
  font-weight: 850;
}

.summary-card strong {
  display: block;
  font-size: 22px;
}

.summary-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.compact-panel {
  margin-top: 12px;
  padding: 18px;
}

.toolbar-select {
  display: inline-grid;
  gap: 3px;
  min-width: 100px;
}

.toolbar-select span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.environment-board {
  display: grid;
  grid-template-columns: 330px minmax(260px, 1fr) minmax(260px, 1fr) minmax(360px, 0.92fr);
  grid-template-rows: minmax(360px, auto) minmax(230px, auto) 360px 360px 640px;
  align-items: stretch;
}

#environmentView .params-panel {
  grid-column: 1;
  grid-row: 1;
}

#environmentView .result-panel {
  grid-column: 2 / span 2;
  grid-row: 1;
}

#environmentView .ai-panel {
  grid-column: 4;
  grid-row: 1;
}

#environmentView .environment-plan-panel {
  grid-column: 1 / span 4;
  grid-row: 2;
  align-self: start;
}

#environmentView .env-single-card {
  grid-column: 1 / span 2;
  grid-row: 3;
}

#environmentView .env-multi-card {
  grid-column: 3 / span 2;
  grid-row: 3;
}

#environmentView .env-heatmap-card {
  grid-column: 1 / span 4;
  grid-row: 4;
}

#environmentView .env-cube-card {
  grid-column: 1 / span 4;
  grid-row: 5;
}

.environment-board .chart-card {
  min-height: 0;
}

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

.day-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.day-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.day-card h4 {
  margin: 0;
  font-size: 18px;
}

.day-card-head strong {
  color: var(--green);
  font-size: 31px;
}

.day-card-head strong span {
  color: var(--muted);
  font-size: 13px;
}

.grade-pill {
  display: inline-flex;
  margin: 9px 0;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 850;
}

.mini-metric-list {
  display: grid;
  gap: 7px;
}

.mini-metric-list div {
  display: flex;
  justify-content: space-between;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.mini-metric-list span {
  color: var(--muted);
}

.mini-metric-list strong {
  color: var(--ink);
}

.assistant-layout {
  grid-template-columns: 310px minmax(520px, 1fr) 360px;
  align-items: start;
}

.model-agent-layout {
  grid-template-columns: 330px minmax(560px, 1fr) 380px;
  align-items: stretch;
}

.migration-step-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.migration-step-strip article {
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #f8fbfa);
  box-shadow: var(--shadow);
}

.migration-step-strip strong {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-right: 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  font-size: 13px;
}

.migration-step-strip span {
  color: var(--ink);
  font-weight: 850;
}

.migration-step-strip p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.migration-layout {
  grid-template-columns: 330px minmax(560px, 1fr) 380px;
  grid-template-areas:
    "batch guide result"
    "agent chat tools";
  align-items: stretch;
}

.initial-test-panel {
  margin-bottom: 12px;
  padding: 18px;
}

.initial-plan-note {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  padding: 11px 12px;
  border-radius: 9px;
  border: 1px solid rgba(47, 128, 237, 0.16);
  background: linear-gradient(90deg, rgba(47, 128, 237, 0.08), #fbfdfc);
}

.initial-plan-note strong {
  color: var(--blue);
  white-space: nowrap;
}

.initial-plan-note span {
  color: #53656c;
  font-size: 12px;
  line-height: 1.55;
}

.current-sop-card {
  margin-bottom: 12px;
}

.current-sop-empty,
.current-sop-summary {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fbf7, #fff);
}

.current-sop-empty {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
}

.current-sop-empty strong {
  color: var(--green);
}

.current-sop-empty span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.current-sop-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
}

.current-sop-summary p,
.current-sop-summary h4,
.current-sop-summary span {
  margin: 0;
}

.current-sop-summary p {
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.current-sop-summary h4 {
  margin: 4px 0;
  font-size: 17px;
}

.current-sop-summary span {
  color: var(--muted);
  font-size: 12px;
}

.current-sop-prediction {
  min-width: 132px;
  padding: 10px 12px;
  border-radius: 11px;
  text-align: right;
  background: #ecf8f1;
}

.current-sop-prediction b,
.current-sop-prediction span {
  display: block;
  color: var(--green);
  font-size: 11px;
}

.current-sop-prediction strong {
  display: block;
  margin: 2px 0;
  color: var(--ink);
  font-size: 24px;
}

.sop-tags {
  margin-top: 8px;
}

.initial-plan-output {
  display: grid;
  gap: 12px;
}

.initial-basis-grid,
.initial-groups-grid,
.initial-range-grid {
  display: grid;
  gap: 10px;
}

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

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

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

.initial-basis-card,
.initial-range-card,
.initial-group-card,
.initial-ai-advice,
.initial-record-requirements {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.initial-basis-card {
  padding: 13px;
}

.initial-basis-card p,
.initial-range-card p,
.initial-ai-advice p,
.initial-record-requirements p {
  margin: 0 0 9px;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.initial-basis-card div,
.initial-param-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.initial-basis-card span,
.initial-param-tags span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 5px 7px;
  border-radius: 999px;
  background: #f3f7f5;
  color: #4d5b60;
  font-size: 11px;
}

.initial-basis-card b {
  color: var(--green);
}

.initial-range-card {
  padding: 12px;
  background: linear-gradient(180deg, #fff, #f9fcfa);
}

.initial-range-card div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(16, 88, 57, 0.1);
  color: var(--muted);
  font-size: 11px;
}

.initial-range-card div:last-of-type {
  border-bottom: 0;
}

.initial-range-card b {
  color: var(--ink);
  text-align: right;
}

.initial-range-card small {
  display: block;
  margin-top: 8px;
  color: #66776e;
  font-size: 11px;
  line-height: 1.55;
}

.initial-group-card {
  padding: 13px;
  display: grid;
  gap: 10px;
}

.initial-group-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.initial-group-head > strong {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(180deg, #0d9b5a, #087643);
  flex: 0 0 auto;
}

.initial-group-head h4 {
  margin: 0 0 4px;
  font-size: 15px;
}

.initial-group-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.initial-prediction {
  padding: 9px 10px;
  border-radius: 8px;
  background: #f8fbfa;
  border: 1px solid var(--line);
}

.initial-prediction b {
  color: var(--ink);
  font-size: 12px;
}

.initial-prediction ul,
.initial-record-requirements ul {
  margin: 7px 0 0;
  padding-left: 17px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.initial-group-edit {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 9px;
  border: 1px solid rgba(13, 124, 89, 0.12);
  background: #fbfdfc;
}

.initial-name-field,
.initial-param-edit-grid label {
  display: grid;
  gap: 4px;
}

.initial-name-field span,
.initial-param-edit-grid span {
  color: #66776e;
  font-size: 11px;
  font-weight: 750;
}

.initial-name-field input,
.initial-param-edit-grid input,
.initial-param-edit-grid select {
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 12px;
}

.initial-param-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.initial-group-actions {
  display: grid;
  grid-template-columns: 1fr 0.72fr;
  gap: 8px;
}

.initial-group-status {
  min-height: 16px;
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
}

.initial-ai-advice,
.initial-record-requirements {
  padding: 14px;
}

.migration-form-panel {
  grid-area: batch;
}

.migration-guide-panel {
  grid-area: guide;
}

.migration-result-panel {
  grid-area: result;
}

.migration-agent-panel {
  grid-area: agent;
}

.migration-chat-panel {
  grid-area: chat;
}

.migration-tools-panel {
  grid-area: tools;
}

.migration-form-panel,
.migration-guide-panel,
.migration-result-panel,
.migration-agent-panel {
  padding: 18px;
}

.migration-form {
  display: grid;
  gap: 0;
}

.two-col-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.compact-field textarea {
  min-height: 92px;
  padding: 9px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  resize: vertical;
}

.migration-checklist {
  margin-top: 4px;
  padding: 12px;
  border-radius: 9px;
  border: 1px solid rgba(12, 138, 85, 0.18);
  background: #f4fbf7;
}

.checklist-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.checklist-head strong {
  color: var(--green);
  font-size: 20px;
}

.checklist-head span,
.migration-checklist li {
  color: #4f625c;
  font-size: 12px;
  line-height: 1.6;
}

.migration-checklist ul {
  margin: 0;
  padding-left: 18px;
}

.migration-checklist .warn {
  color: var(--amber);
}

.inline-actions {
  margin-left: 0;
}

.migration-trust-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 11px 12px;
  border-radius: 9px;
  color: #315f50;
  background: linear-gradient(90deg, #e8f6ee, #f8fbfa);
  border: 1px solid rgba(12, 138, 85, 0.16);
}

.migration-trust-banner strong {
  color: var(--green);
}

.migration-trust-banner span {
  color: #587069;
  font-size: 12px;
  line-height: 1.5;
}

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

.migration-guide-grid .empty-state,
.migration-ai-card {
  grid-column: 1 / -1;
}

.migration-summary-card,
.migration-ai-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.migration-summary-card p,
.migration-ai-card p {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.migration-summary-card strong {
  display: block;
  min-height: 42px;
  color: var(--ink);
  line-height: 1.45;
}

.migration-summary-card ul {
  margin: 10px 0 0;
  padding-left: 17px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.migration-summary-card.batch-card {
  background: linear-gradient(180deg, #fff, #f8fbfa);
}

.migration-summary-card.medium-card {
  border-color: rgba(12, 138, 85, 0.22);
}

.migration-summary-card.environment-card {
  border-color: rgba(47, 128, 237, 0.22);
}

.compact-tools {
  margin-top: 12px;
  max-height: 260px;
}

.migration-result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 2px 0 12px;
}

.migration-review .message-body {
  max-height: 360px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
}

.model-agent-control,
.model-agent-tools {
  padding: 18px;
}

.model-agent-chat {
  display: grid;
  grid-template-rows: minmax(540px, calc(100vh - 268px)) auto;
  overflow: hidden;
}

.model-agent-log {
  overflow: auto;
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 12px;
  background:
    radial-gradient(circle at 12% 8%, rgba(13, 124, 89, 0.07), transparent 30%),
    linear-gradient(180deg, #fbfdfc, #fff);
}

.agent-scope-note {
  margin: 10px 0 16px;
  padding: 12px;
  border: 1px solid rgba(13, 124, 89, 0.18);
  border-radius: 8px;
  color: #2d6d55;
  background: #edf9f2;
  font-size: 12px;
  line-height: 1.7;
  font-weight: 750;
}

.vertical-prompts {
  display: grid;
}

.vertical-prompts .prompt-chip {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  line-height: 1.35;
  padding: 10px 12px;
}

.tool-run-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 190px);
  overflow: auto;
}

.tool-run-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: linear-gradient(180deg, #fff, #fbfdfc);
}

.tool-run-card p {
  margin: 0 0 5px;
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tool-run-card h4 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 15px;
}

.tool-run-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.tool-run-inputs span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  border-radius: 999px;
  color: #4d5b60;
  background: #f3f7f5;
  font-size: 11px;
}

.tool-run-inputs b {
  color: var(--green);
}

.tool-run-summary {
  color: #4e5d62;
  font-size: 12px;
  line-height: 1.65;
}

.tool-run-summary strong {
  display: block;
  color: var(--ink);
  margin-bottom: 6px;
}

.tool-run-summary ul {
  margin: 6px 0;
  padding-left: 17px;
}

.tool-run-summary em {
  display: block;
  color: #58746a;
  font-style: normal;
}

.assistant-panel,
.context-panel {
  padding: 18px;
}

.assistant-avatar {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.assistant-profile {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.assistant-profile p {
  margin: 0;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.assistant-profile h3 {
  margin: 4px 0;
  font-size: 18px;
}

.assistant-profile span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prompt-chip {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--green);
}

.chat-panel {
  display: grid;
  grid-template-rows: minmax(470px, calc(100vh - 270px)) auto;
  overflow: hidden;
}

.chat-log {
  overflow: auto;
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.message {
  max-width: min(76ch, 100%);
  display: grid;
  gap: 6px;
}

.message.user {
  margin-left: auto;
}

.message-role {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.message-body {
  padding: 12px 14px;
  border-radius: 10px;
  line-height: 1.72;
  overflow-wrap: anywhere;
}

.message.user .message-body {
  color: #fff;
  background: var(--green);
  white-space: pre-wrap;
}

.message.assistant .message-body {
  background: #fff;
  border: 1px solid var(--line);
}

.message-body > :first-child {
  margin-top: 0;
}

.message-body > :last-child {
  margin-bottom: 0;
}

.message-body h2,
.message-body h3,
.message-body h4 {
  margin: 11px 0 6px;
  color: var(--green);
  font-size: 15px;
}

.message-body p {
  margin: 7px 0;
}

.message-body ul,
.message-body ol {
  margin: 7px 0;
  padding-left: 18px;
}

.message-body strong,
.message-body code {
  color: var(--green);
}

.message-body .markdown-table-wrap {
  width: 100%;
  margin: 8px 0 12px;
  overflow-x: auto;
  border: 1px solid rgba(196, 214, 207, 0.88);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
}

.message-body .markdown-table-wrap table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 11px;
}

.message-body .markdown-table-wrap th,
.message-body .markdown-table-wrap td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(211, 224, 219, 0.8);
  text-align: left;
  vertical-align: top;
}

.message-body .markdown-table-wrap th {
  color: #315348;
  background: #eef7f2;
  font-weight: 850;
}

.message-body .markdown-table-wrap tbody tr:last-child td {
  border-bottom: 0;
}

.composer {
  padding: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.composer textarea {
  width: 100%;
  min-height: 78px;
  padding: 10px 12px;
  resize: vertical;
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.composer-footer button {
  min-height: 36px;
  padding: 0 16px;
  border-radius: 6px;
  color: #fff;
  background: var(--green);
  cursor: pointer;
}

.context-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 190px);
  overflow: auto;
}

.context-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.context-meta {
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.55;
}

.context-preview {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.context-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--green);
  text-decoration: none;
  font-weight: 850;
}

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

.record-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.record-card p {
  margin: 0 0 4px;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.record-card h4 {
  margin: 0 0 3px;
  font-size: 16px;
}

.record-card span {
  color: var(--muted);
  font-size: 13px;
}

.record-card time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.danger-button {
  color: var(--red);
  border-color: rgba(220, 76, 76, 0.24);
}

#recordsView {
  min-height: calc(100vh - 70px);
  padding: 14px 20px 2px;
  background:
    radial-gradient(circle at 78% 12%, rgba(85, 171, 122, 0.12), transparent 30%),
    linear-gradient(180deg, #f5f8f6 0%, #eef5f1 100%);
}

#recordsView .page-toolbar {
  min-height: 38px;
  align-items: center;
  margin-bottom: 10px;
}

#recordsView .page-toolbar h2 {
  font-size: 21px;
  letter-spacing: -0.03em;
}

#recordsView .page-toolbar p {
  max-width: 680px;
  color: #65756f;
  font-size: 12px;
  line-height: 1.35;
}

#recordsView .toolbar-actions .ghost-button {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(25, 54, 45, 0.05);
}

#recordsView .primary-button,
#recordsView .ghost-button {
  min-height: 32px;
  border-radius: 7px;
  font-size: 12px;
}

#recordsView .compact-field {
  gap: 4px;
  margin-bottom: 0;
}

#recordsView .compact-field span {
  font-size: 10.5px;
  white-space: nowrap;
}

#recordsView .compact-field input,
#recordsView .compact-field select {
  height: 30px;
  border-radius: 7px;
  font-size: 11.5px;
}

#recordsView .panel-title-row.tight {
  margin-bottom: 8px;
}

.experiment-dashboard {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.experiment-kpi-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid rgba(198, 214, 207, 0.82);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 252, 249, 0.96)),
    radial-gradient(circle at 100% 0%, rgba(12, 138, 85, 0.08), transparent 45%);
  box-shadow: 0 10px 22px rgba(22, 52, 43, 0.055);
  position: relative;
  overflow: hidden;
}

.experiment-kpi-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -38px;
  width: 70px;
  height: 70px;
  border-radius: 999px;
  background: rgba(12, 138, 85, 0.055);
}

.kpi-glyph {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  border-radius: 10px;
  color: #0b7a4d;
  background: linear-gradient(180deg, #e4f6ee, #f5fbf8);
  border: 1px solid rgba(12, 138, 85, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.kpi-glyph svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.experiment-dashboard p,
.experiment-dashboard span {
  margin: 0;
  color: #74827e;
  font-size: 10.5px;
  font-weight: 760;
  line-height: 1.25;
  white-space: nowrap;
}

.experiment-dashboard strong {
  display: block;
  margin: 1px 0;
  color: #087844;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.migration-center-layout {
  display: grid;
  grid-template-columns: 330px minmax(620px, 1fr) 300px;
  gap: 12px;
  align-items: start;
}

.migration-simulation-panel {
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 17px;
  border-color: rgba(178, 207, 196, 0.95);
  background:
    radial-gradient(circle at 0 0, rgba(15, 124, 80, 0.14), transparent 33%),
    radial-gradient(circle at 100% 0, rgba(247, 193, 96, 0.16), transparent 31%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(244, 251, 247, 0.95));
  box-shadow: 0 18px 44px rgba(17, 49, 39, 0.1);
}

.migration-sim-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 12px;
}

.migration-sim-hero h3,
.migration-sim-hero p,
.migration-sim-hero span {
  margin: 0;
}

.migration-sim-hero .eyebrow {
  color: #0a8550;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.migration-sim-hero h3 {
  margin-top: 4px;
  color: #17251f;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.migration-sim-hero span {
  display: block;
  margin-top: 6px;
  max-width: 860px;
  color: #5d6d66;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.5;
}

.migration-sim-badge {
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: 15px;
  color: #fff;
  background:
    radial-gradient(circle at 30% 15%, rgba(255, 255, 255, 0.24), transparent 36%),
    linear-gradient(160deg, #0da366, #075c3b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 13px 30px rgba(9, 119, 73, 0.2);
}

.migration-sim-badge b,
.migration-sim-badge span,
.migration-sim-badge small {
  display: block;
  margin: 0;
}

.migration-sim-badge b {
  font-size: 36px;
  line-height: 0.92;
  letter-spacing: -0.08em;
}

.migration-sim-badge span {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 930;
}

.migration-sim-badge small {
  color: rgba(255, 255, 255, 0.76);
  font-size: 10px;
  font-weight: 760;
}

.migration-sim-chain {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.migration-sim-chain > article {
  position: relative;
  min-width: 0;
  min-height: 248px;
  padding: 12px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(194, 217, 208, 0.92);
  box-shadow: 0 12px 28px rgba(35, 56, 48, 0.065);
}

.migration-sim-chain > article::after {
  content: "";
  position: absolute;
  top: 24px;
  right: -10px;
  width: 10px;
  height: 2px;
  background: linear-gradient(90deg, rgba(13, 141, 86, 0.45), transparent);
}

.migration-sim-chain > article:last-child::after {
  display: none;
}

.migration-sim-chain i {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 9px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(180deg, #12a96b, #087343);
  font-size: 12px;
  font-weight: 950;
  font-style: normal;
  box-shadow: 0 8px 18px rgba(13, 141, 86, 0.18);
}

.migration-sim-chain p,
.migration-sim-chain h4,
.migration-sim-chain span {
  margin: 0;
}

.migration-sim-chain p {
  color: #0b8b54;
  font-size: 10.5px;
  font-weight: 950;
  letter-spacing: 0.02em;
}

.migration-sim-chain h4 {
  margin-top: 3px;
  color: #1b2b24;
  font-size: 15px;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.migration-sim-chain > article > span {
  display: block;
  margin-top: 7px;
  color: #5f716b;
  font-size: 11px;
  font-weight: 720;
  line-height: 1.55;
}

.migration-sim-mini-kpis {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.migration-sim-mini-kpis article {
  padding: 7px 8px;
  border-radius: 10px;
  background: #f3faf6;
  border: 1px solid rgba(12, 138, 85, 0.11);
}

.migration-sim-mini-kpis span,
.migration-sim-mini-kpis small,
.migration-sim-mini-kpis strong {
  display: block;
  margin: 0;
}

.migration-sim-mini-kpis span,
.migration-sim-mini-kpis small {
  color: #72817b;
  font-size: 9.5px;
  font-weight: 780;
  line-height: 1.2;
}

.migration-sim-mini-kpis strong {
  margin: 2px 0;
  color: #087844;
  font-size: 17px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.migration-sim-callout {
  display: grid;
  gap: 3px;
  margin-top: 9px;
  padding: 8px;
  border-radius: 11px;
  color: #0b6f47;
  background: #eef9f3;
  border: 1px solid rgba(12, 138, 85, 0.13);
}

.migration-sim-callout.warning {
  color: #8b5817;
  background: #fff7e8;
  border-color: rgba(193, 120, 31, 0.15);
}

.migration-sim-callout strong,
.migration-sim-callout small {
  display: block;
  margin: 0;
}

.migration-sim-callout strong {
  font-size: 11px;
  font-weight: 940;
}

.migration-sim-callout small {
  color: inherit;
  opacity: 0.78;
  font-size: 9.5px;
  font-weight: 780;
  line-height: 1.35;
}

.migration-sim-evidence-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  gap: 10px;
  margin-top: 10px;
}

.migration-sim-evidence-card {
  min-width: 0;
  padding: 12px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(203, 221, 214, 0.86);
}

.migration-sim-table-scroll {
  max-height: none;
  margin-top: 8px;
  overflow: visible;
}

.migration-sim-evidence-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.migration-sim-evidence-card th,
.migration-sim-evidence-card td {
  padding: 7px 8px;
  border-bottom: 1px solid rgba(223, 233, 229, 0.9);
  text-align: left;
  white-space: nowrap;
}

.migration-sim-evidence-card th {
  color: #0b7a4d;
  background: #f3faf6;
}

.migration-sim-evidence-card .positive {
  color: #0b7a4d;
  font-weight: 900;
}

.migration-sim-evidence-card .negative {
  color: #c16a23;
  font-weight: 900;
}

.migration-sim-profile {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 8px;
}

.migration-sim-profile span {
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 10px;
  color: #087844;
  background: #eff8f3;
  border: 1px solid rgba(12, 138, 85, 0.11);
  font-size: 13px;
  font-weight: 920;
}

.migration-sim-profile b {
  color: #708078;
  font-size: 9.5px;
  font-weight: 820;
}

.migration-sim-next-list {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.migration-sim-next-list section {
  display: grid;
  gap: 4px;
  padding: 9px;
  border-radius: 11px;
  background: rgba(248, 252, 250, 0.94);
  border: 1px solid rgba(205, 222, 216, 0.86);
}

.migration-sim-next-list strong,
.migration-sim-next-list small,
.migration-sim-next-list em {
  display: block;
  margin: 0;
  line-height: 1.35;
}

.migration-sim-next-list strong {
  color: #20302a;
  font-size: 12px;
  font-weight: 940;
}

.migration-sim-next-list small,
.migration-sim-next-list em {
  color: #66766f;
  font-size: 10px;
  font-weight: 760;
  font-style: normal;
}

.migration-select-panel,
.migration-center-analysis-panel,
.migration-task-history-panel {
  min-width: 0;
  border-radius: 15px;
  border-color: rgba(190, 213, 204, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 252, 249, 0.92)),
    radial-gradient(circle at 100% 0, rgba(12, 138, 85, 0.09), transparent 42%);
  box-shadow: 0 14px 34px rgba(20, 45, 38, 0.075);
}

.migration-select-panel,
.migration-task-history-panel {
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 116px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
}

.migration-center-analysis-panel {
  padding: 12px;
}

.migration-selection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.migration-experiment-picker,
.migration-task-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding-right: 2px;
}

.migration-experiment-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(207, 222, 217, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.migration-experiment-option:hover,
.migration-experiment-option.selected {
  border-color: rgba(12, 138, 85, 0.45);
  box-shadow: 0 10px 24px rgba(12, 138, 85, 0.08);
  transform: translateY(-1px);
}

.migration-experiment-option input {
  width: 16px;
  height: 16px;
  accent-color: #0b8c55;
}

.migration-experiment-option strong,
.migration-experiment-option small {
  display: block;
  min-width: 0;
}

.migration-experiment-option strong {
  color: #20302a;
  font-size: 12.5px;
  font-weight: 920;
  line-height: 1.25;
}

.migration-experiment-option small {
  margin-top: 4px;
  color: #6d7b76;
  font-size: 10.5px;
  font-weight: 760;
  line-height: 1.45;
}

.migration-evaluation-panel {
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 251, 247, 0.94)),
    radial-gradient(circle at 100% 0, rgba(12, 138, 85, 0.12), transparent 42%);
  border-color: rgba(190, 213, 204, 0.9);
  box-shadow: 0 14px 34px rgba(20, 45, 38, 0.075);
}

.migration-evaluation-empty,
.migration-evaluation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.migration-evaluation-empty h3,
.migration-evaluation-head h3 {
  margin: 0;
  color: #20302a;
  font-size: 18px;
  letter-spacing: -0.035em;
}

.migration-evaluation-empty p,
.migration-evaluation-head p {
  margin: 0 0 3px;
  color: #72817b;
  font-size: 11px;
  font-weight: 780;
}

.migration-evaluation-actions {
  display: flex;
  gap: 8px;
}

.migration-evaluation-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.migration-evaluation-kpis article {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(203, 221, 214, 0.82);
}

.migration-evaluation-kpis span,
.migration-evaluation-kpis small {
  display: block;
  margin: 0;
  color: #74827e;
  font-size: 10.5px;
  font-weight: 780;
  line-height: 1.25;
}

.migration-evaluation-kpis strong {
  display: block;
  margin: 3px 0;
  color: #087844;
  font-size: 21px;
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.migration-flow-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.migration-flow-strip article {
  display: grid;
  grid-template-columns: 26px 1fr;
  column-gap: 8px;
  align-items: center;
  min-height: 54px;
  padding: 8px 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(237, 248, 242, 0.9), rgba(255, 255, 255, 0.82));
  border: 1px solid rgba(12, 138, 85, 0.12);
}

.migration-flow-strip b {
  grid-row: span 2;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, #0d9b5a, #087643);
  font-size: 12px;
}

.migration-flow-strip strong,
.migration-flow-strip span {
  display: block;
  margin: 0;
  line-height: 1.2;
}

.migration-flow-strip strong {
  color: #20302a;
  font-size: 12px;
  font-weight: 900;
}

.migration-flow-strip span {
  color: #72817b;
  font-size: 10px;
  font-weight: 760;
}

.migration-evaluation-body {
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(420px, 1.12fr);
  gap: 10px;
  margin-top: 10px;
}

.migration-ai-summary,
.migration-table-card,
.next-target-card {
  min-width: 0;
  padding: 11px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(203, 221, 214, 0.82);
}

.migration-ai-summary > p,
.migration-table-card > p {
  margin: 0 0 7px;
  color: #20302a;
  font-size: 13px;
  font-weight: 900;
}

.migration-ai-summary .message-body {
  padding: 0;
  color: #43524d;
  font-size: 12px;
  line-height: 1.65;
}

.migration-range-note {
  display: grid;
  gap: 3px;
  margin-top: 8px;
  padding: 8px;
  border-radius: 10px;
  color: #0b6f47;
  background: #edf8f2;
  border: 1px solid rgba(12, 138, 85, 0.12);
  font-size: 11px;
  font-weight: 780;
}

.migration-range-note strong,
.migration-range-note span {
  display: block;
}

.migration-table-scroll {
  max-height: 172px;
}

.migration-table-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.migration-table-card th,
.migration-table-card td {
  padding: 6px 7px;
  border-bottom: 1px solid rgba(224, 233, 230, 0.9);
  text-align: left;
  white-space: nowrap;
}

.migration-table-card th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #0b7a4d;
  background: #f4faf7;
}

.migration-table-card .positive {
  color: #0b7a4d;
  font-weight: 900;
}

.migration-table-card .negative {
  color: #c76a24;
  font-weight: 900;
}

.migration-task-card {
  display: grid;
  gap: 8px;
  padding: 11px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(204, 220, 214, 0.9);
}

.migration-task-card p,
.migration-task-card h4,
.migration-task-card small {
  margin: 0;
}

.migration-task-card p,
.migration-task-card small {
  color: #74827e;
  font-size: 10.5px;
  font-weight: 780;
  line-height: 1.35;
}

.migration-task-card h4 {
  color: #20302a;
  font-size: 15px;
  font-weight: 940;
  letter-spacing: -0.03em;
}

.migration-task-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.migration-task-metrics span {
  min-width: 0;
  padding: 7px;
  border-radius: 10px;
  color: #62736d;
  background: #f3faf6;
  border: 1px solid rgba(12, 138, 85, 0.1);
  font-size: 10px;
  font-weight: 780;
}

.migration-task-metrics b {
  display: block;
  margin-top: 2px;
  color: #087844;
  font-size: 13px;
}

.migration-task-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.next-target-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.next-target-card {
  display: grid;
  gap: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.93), rgba(248, 253, 250, 0.9)),
    radial-gradient(circle at 0 0, rgba(12, 138, 85, 0.1), transparent 44%);
}

.next-target-card span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(180deg, #0d9b5a, #087643);
  font-size: 13px;
  font-weight: 900;
}

.next-target-card h4,
.next-target-card p,
.next-target-card small {
  margin: 0;
}

.next-target-card h4 {
  margin-top: 5px;
  color: #20302a;
  font-size: 14px;
  line-height: 1.2;
}

.next-target-card p,
.next-target-card small {
  color: #64746e;
  font-size: 10.5px;
  font-weight: 760;
  line-height: 1.45;
}

.next-target-card .initial-param-tags {
  gap: 5px;
}

.next-target-card .initial-param-tags span {
  width: auto;
  height: auto;
  display: inline-flex;
  place-items: unset;
  color: #5f716b;
  background: #eef7f2;
  font-size: 10px;
}

.experiment-library-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 0;
}

.experiment-list-panel {
  height: calc(100vh - 236px);
  min-height: 640px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(199, 216, 210, 0.86);
  box-shadow: 0 10px 26px rgba(20, 45, 38, 0.07);
  backdrop-filter: blur(16px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
}

.experiment-list-panel .panel-title-row {
  min-width: 0;
  padding: 0 2px 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.experiment-list-panel .panel-title-row h3 {
  min-width: 0;
  font-size: 16px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.experiment-list-panel .panel-title-row > span {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  color: #61736c;
  background: #eef6f2;
  font-size: 9.5px;
  font-weight: 820;
  white-space: nowrap;
}

.experiment-list {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: none;
  overflow: auto;
  padding-right: 2px;
}

.experiment-list-item {
  position: relative;
  width: 100%;
  min-height: 108px;
  padding: 11px 12px 9px 14px;
  border: 1px solid rgba(209, 222, 217, 0.95);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(19, 45, 38, 0.035);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
  overflow: hidden;
}

.experiment-list-item:hover {
  transform: translateY(-1px);
  border-color: rgba(13, 124, 89, 0.28);
  box-shadow: 0 14px 28px rgba(19, 45, 38, 0.08);
}

.experiment-list-item.active {
  border-color: rgba(13, 124, 89, 0.5);
  background:
    linear-gradient(180deg, rgba(244, 253, 248, 0.98), rgba(255, 255, 255, 0.96)),
    radial-gradient(circle at right top, rgba(12, 138, 85, 0.16), transparent 48%);
  box-shadow: 0 16px 34px rgba(13, 124, 89, 0.12);
}

.experiment-active-rail {
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  border-radius: 0 99px 99px 0;
  background: transparent;
}

.experiment-list-item.active .experiment-active-rail {
  background: linear-gradient(180deg, #0ca363, #066c43);
}

.experiment-list-item p,
.experiment-list-item h4,
.experiment-list-item span,
.experiment-list-item small {
  margin: 0;
}

.experiment-list-card-body {
  min-width: 0;
}

.experiment-list-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #0b8755;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.experiment-list-code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.experiment-list-card-head > em {
  flex: 0 0 auto;
  min-width: 50px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #087844;
  background: #e8f6ef;
  font-size: 10px;
  font-style: normal;
  text-align: center;
}

.experiment-list-item h4 {
  margin: 5px 0 4px;
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.experiment-list-param-tags {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.experiment-list-param-tags > span {
  min-width: 0;
  min-height: 21px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  border-radius: 6px;
  color: #52645d;
  background: #f1f7f4;
  font-size: 9px;
  line-height: 1;
  overflow: hidden;
}

.experiment-list-param-tags b,
.experiment-list-param-tags em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

.experiment-list-param-tags b {
  color: #83908b;
  font-weight: 760;
}

.experiment-list-param-tags em {
  color: #40524b;
  font-weight: 880;
}

.experiment-list-card-foot {
  min-width: 0;
  margin-top: 7px !important;
  padding-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid rgba(211, 223, 218, 0.78);
  color: #7a8984;
  font-size: 9.5px;
  line-height: 1.2;
}

.experiment-list-card-foot span,
.experiment-list-card-foot strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.experiment-list-card-foot strong {
  flex: 0 0 auto;
  color: #087844;
  font-weight: 880;
}

.experiment-list-summary {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  padding-top: 4px;
  align-self: stretch;
}

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

.summary-metrics div,
.summary-activity {
  min-width: 0;
  padding: 9px 8px;
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(240, 249, 245, 0.92), rgba(255, 255, 255, 0.86));
  border: 1px solid rgba(12, 138, 85, 0.12);
}

.experiment-list-summary p,
.experiment-list-summary span,
.experiment-list-summary small {
  margin: 0;
  color: #77847f;
  font-size: 10px;
  font-weight: 760;
}

.summary-metrics strong {
  display: block;
  margin: 2px 0;
  color: #087844;
  font-size: 14px;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-activity {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 10px;
}

.summary-activity p {
  color: #193b2e;
  font-size: 11px;
  font-weight: 900;
}

.summary-activity span {
  min-width: 0;
}

.summary-activity .summary-activity-row {
  min-height: 42px;
  padding: 6px 8px;
  display: grid;
  gap: 3px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(207, 222, 216, 0.6);
}

.summary-activity-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.summary-activity em {
  min-width: 0;
  display: block;
  color: #0b7a4d;
  font-size: 10px;
  font-style: normal;
  font-weight: 880;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-activity-row > strong {
  min-width: 0;
  color: #20302a;
  font-size: 10.5px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-activity-meta small {
  flex: 0 0 auto;
  color: #87938f;
  font-size: 9px;
  white-space: nowrap;
}

.summary-activity small {
  text-align: right;
}

.experiment-detail-panel {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.experiment-detail-shell {
  display: grid;
  grid-template-columns: minmax(620px, 1fr) minmax(340px, 370px);
  grid-template-areas:
    "plan daily"
    "ai daily"
    "charts daily"
    "table daily";
  gap: 10px;
  align-items: start;
}

.experiment-work-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(199, 216, 210, 0.9);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(20, 45, 38, 0.065);
  backdrop-filter: blur(18px);
}

.experiment-plan-card {
  grid-area: plan;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(250, 253, 251, 0.94)),
    radial-gradient(circle at 0 0, rgba(12, 138, 85, 0.12), transparent 40%);
}

.daily-log-form {
  grid-area: daily;
  position: sticky;
  top: 82px;
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 10px;
  max-height: calc(100vh - 236px);
  overflow: auto;
}

.experiment-ai-card {
  grid-area: ai;
  display: grid;
  gap: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(244, 251, 247, 0.92)),
    radial-gradient(circle at 0 0, rgba(12, 138, 85, 0.12), transparent 42%);
}

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

.experiment-ai-head p,
.experiment-ai-head h4,
.experiment-ai-head span {
  margin: 0;
}

.experiment-ai-head p {
  color: #0b8755;
  font-size: 10.5px;
  font-weight: 920;
  letter-spacing: 0.03em;
}

.experiment-ai-head h4 {
  margin-top: 3px;
  color: #20302a;
  font-size: 16px;
  letter-spacing: -0.025em;
}

.experiment-ai-head span {
  display: block;
  margin-top: 3px;
  color: #74827e;
  font-size: 10.5px;
  font-weight: 760;
}

.experiment-ai-controls {
  display: flex;
  gap: 7px;
  align-items: center;
  flex: 0 0 auto;
}

.experiment-ai-controls select {
  height: 32px;
  min-width: 112px;
  padding: 0 8px;
  border: 1px solid rgba(202, 217, 211, 0.92);
  border-radius: 8px;
  background: #fff;
  color: #43524d;
  font-size: 11px;
  font-weight: 780;
}

.experiment-ai-body {
  min-height: 86px;
  border: 1px solid rgba(207, 222, 216, 0.74);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  overflow: hidden;
}

.experiment-ai-body .message-body {
  padding: 12px 14px;
  color: #3f504a;
  font-size: 12px;
  line-height: 1.65;
}

.experiment-chart-grid {
  grid-area: charts;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.daily-log-table {
  grid-area: table;
}

.experiment-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 9px;
  border-bottom: 1px solid rgba(207, 222, 216, 0.82);
}

.experiment-detail-header p,
.experiment-detail-header h3,
.experiment-detail-header span {
  margin: 0;
}

.experiment-detail-header p {
  color: #0c8554;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.experiment-detail-header h3 {
  margin: 4px 0 3px;
  font-size: 20px;
  line-height: 1.16;
  letter-spacing: -0.045em;
  max-width: 560px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.experiment-detail-header span {
  color: #697872;
  font-size: 11px;
  font-weight: 720;
  line-height: 1.3;
}

.experiment-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 0 0;
}

.experiment-chip-row span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: #6e7d78;
  background: #f0f7f3;
  border: 1px solid rgba(12, 138, 85, 0.12);
  font-size: 10.5px;
  font-weight: 780;
}

.experiment-chip-row strong {
  color: #087844;
  font-size: 11px;
}

.experiment-meta-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(207, 222, 216, 0.72);
  border-radius: 12px;
  background: rgba(250, 253, 251, 0.72);
}

.form-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 0;
}

.form-section-title strong {
  color: #20302a;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.form-section-title span {
  color: #77847f;
  font-size: 10.5px;
  font-weight: 720;
  line-height: 1.25;
  text-align: right;
  max-width: 360px;
}

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

.experiment-param-grid label,
.daily-field-grid label {
  display: grid;
  gap: 4px;
}

.daily-field-grid label small {
  color: #8a9792;
  font-size: 9.5px;
  font-weight: 760;
  line-height: 1;
}

.experiment-param-grid span,
.daily-field-grid span,
.daily-log-form .field-block span {
  color: #63746e;
  font-size: 10.5px;
  font-weight: 850;
  white-space: nowrap;
}

.experiment-param-grid input,
.experiment-param-grid select,
.daily-field-grid input,
.daily-field-grid select,
.daily-log-form textarea,
.daily-log-form .field-block textarea {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border: 1px solid rgba(202, 217, 211, 0.92);
  border-radius: 7px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  font: inherit;
  font-size: 11.5px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.daily-field-grid input[readonly] {
  color: #667670;
  background: rgba(244, 249, 247, 0.9);
}

.daily-field-grid input.manual-override {
  color: var(--ink);
  background: #fff;
}

.experiment-param-grid input:focus,
.experiment-param-grid select:focus,
.daily-field-grid input:focus,
.daily-log-form textarea:focus {
  border-color: rgba(12, 138, 85, 0.46);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(12, 138, 85, 0.09);
}

.daily-fieldset {
  display: grid;
  gap: 5px;
  padding: 7px;
  border: 1px solid rgba(207, 222, 216, 0.72);
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(250, 253, 251, 0.82), rgba(255, 255, 255, 0.8));
}

.daily-fieldset p {
  margin: 0;
  color: #193b2e;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

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

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

.daily-field-grid.dense-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.daily-field-grid .inline-check {
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid rgba(202, 217, 211, 0.72);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.7);
}

.daily-field-grid .inline-check input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.daily-field-grid .inline-check small {
  grid-column: 1 / -1;
}

.auto-score-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(12, 138, 85, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(232, 248, 239, 0.92), rgba(255, 255, 255, 0.88)),
    radial-gradient(circle at 0 0, rgba(12, 138, 85, 0.12), transparent 42%);
}

.auto-score-panel div {
  display: grid;
  gap: 2px;
}

.auto-score-panel span,
.auto-score-panel small,
.auto-score-panel p {
  margin: 0;
  color: #697872;
  font-size: 10px;
  font-weight: 760;
  line-height: 1.35;
}

.auto-score-panel strong {
  color: #087844;
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.auto-score-panel p {
  grid-column: 1 / -1;
}

.daily-log-form .field-block {
  margin: 0;
}

.daily-log-form textarea {
  height: 46px;
  min-height: 46px;
  resize: vertical;
}

.daily-log-form h4,
.daily-log-table h4,
.experiment-chart-card h4 {
  margin: 0;
  color: #20302a;
  font-size: 15px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.experiment-chart-card {
  padding: 11px 11px 8px;
}

.experiment-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.experiment-chart-head h4,
.experiment-chart-head span {
  margin: 0;
}

.experiment-chart-head span {
  display: block;
  margin-top: 2px;
  color: #77847f;
  font-size: 10px;
  font-weight: 760;
  line-height: 1.2;
  white-space: nowrap;
}

.experiment-chart-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.experiment-chart-controls select {
  height: 24px;
  max-width: 84px;
  padding: 0 6px;
  border: 1px solid rgba(202, 217, 211, 0.92);
  border-radius: 6px;
  background: #fff;
  color: #43524d;
  font-size: 10px;
  font-weight: 750;
}

.metric-toggle-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  margin-bottom: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.metric-toggle-row button {
  flex: 0 0 auto;
  min-height: 23px;
  padding: 0 8px;
  border: 1px solid rgba(202, 217, 211, 0.92);
  border-radius: 999px;
  color: #667670;
  background: rgba(255, 255, 255, 0.88);
  font-size: 10px;
  font-weight: 820;
  cursor: pointer;
}

.metric-toggle-row button.active {
  color: #0b7a4d;
  border-color: rgba(12, 138, 85, 0.35);
  background: #e9f7ef;
  box-shadow: inset 0 0 0 1px rgba(12, 138, 85, 0.12);
}

.experiment-chart {
  min-height: 150px;
  border: 1px solid rgba(207, 222, 216, 0.76);
  border-radius: 11px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 252, 250, 0.9)),
    repeating-linear-gradient(90deg, transparent, transparent 46px, rgba(12, 138, 85, 0.03) 47px);
  overflow: hidden;
}

.daily-log-table {
  display: grid;
  gap: 8px;
  padding: 11px;
  overflow-x: auto;
}

.table-scroll {
  max-height: 120px;
  overflow: auto;
  border: 1px solid rgba(207, 222, 216, 0.78);
  border-radius: 10px;
  background: #fff;
}

.table-scroll.migration-sim-table-scroll {
  max-height: none;
  overflow: visible;
}

.daily-log-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.daily-log-table th,
.daily-log-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(224, 233, 230, 0.9);
  text-align: left;
  white-space: nowrap;
}

.daily-log-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #0b7a4d;
  font-weight: 900;
  background: #f4faf7;
}

.daily-log-table td {
  color: #41504b;
}

.daily-log-table tr:hover td {
  background: #fbfdfc;
}

.recent-record-panel {
  display: none;
}

/* Experiment workspace v2: explicit records workflow with one main content column. */
.danger-actions-menu {
  position: relative;
}

.danger-actions-menu summary {
  min-width: 104px;
  height: 36px;
  padding: 0 14px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: #50605b;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.danger-actions-menu summary::-webkit-details-marker {
  display: none;
}

.danger-actions-menu > div {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  width: 180px;
  padding: 8px;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-strong);
}

.experiment-library-layout {
  grid-template-columns: clamp(320px, 24vw, 360px) minmax(0, 1fr);
  gap: 14px;
}

.experiment-list-panel {
  position: sticky;
  top: 82px;
  height: calc(100vh - 100px);
  min-height: 620px;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.experiment-list-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 6px;
}

.experiment-list-tools input,
.experiment-list-tools select {
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border: 1px solid rgba(202, 217, 211, 0.92);
  border-radius: 8px;
  color: #34443f;
  background: rgba(255, 255, 255, 0.94);
  font-size: 11px;
  outline: none;
}

.experiment-list-tools input:focus,
.experiment-list-tools select:focus {
  border-color: rgba(12, 138, 85, 0.48);
  box-shadow: 0 0 0 3px rgba(12, 138, 85, 0.08);
}

.experiment-list-item {
  min-height: 108px;
  padding: 11px 11px 9px 13px;
}

.experiment-list-item h4 {
  font-size: 13px;
}

.summary-activity {
  max-height: 150px;
  overflow: auto;
}

.summary-metrics div {
  min-width: 0;
  padding: 8px 7px;
}

.summary-metrics p,
.summary-metrics span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.experiment-detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: none;
  gap: 12px;
}

.experiment-workspace-header {
  padding: 14px 16px 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 253, 251, 0.96)),
    radial-gradient(circle at 0 0, rgba(12, 138, 85, 0.1), transparent 38%);
}

.experiment-detail-header {
  padding-bottom: 10px;
}

.experiment-detail-header h3 {
  max-width: 720px;
  font-size: 21px;
}

.experiment-detail-header span {
  font-size: 12px;
}

.experiment-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.experiment-status-pill {
  min-height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #087844 !important;
  background: #e7f6ee;
  font-size: 11px !important;
  font-weight: 900 !important;
}

.experiment-workspace-switcher {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(197, 214, 208, 0.9);
  border-radius: 13px;
  background: #f3f8f5;
}

.experiment-workspace-switcher-head {
  min-width: 0;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.experiment-workspace-switcher-head > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.experiment-workspace-switcher-head p,
.experiment-workspace-switcher-head span,
.experiment-workspace-switcher-head small {
  margin: 0;
}

.experiment-workspace-switcher-head p {
  color: #20322b;
  font-size: 12px;
  font-weight: 900;
}

.experiment-workspace-switcher-head span {
  color: #71817b;
  font-size: 10.5px;
  font-weight: 720;
}

.experiment-workspace-switcher-head > small {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  color: #087844;
  background: #e2f3ea;
  font-size: 10px;
  font-weight: 880;
}

.experiment-workspace-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.experiment-workspace-tab {
  min-width: 0;
  min-height: 64px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(194, 211, 205, 0.96);
  border-radius: 10px;
  color: #687873;
  background: #fff;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 4px 10px rgba(24, 53, 44, 0.035);
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.experiment-tab-index {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(190, 208, 201, 0.9);
  border-radius: 8px;
  color: #70817a;
  background: #f4f8f6;
  font-size: 9.5px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.experiment-tab-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.experiment-tab-copy strong {
  color: #35453f;
  font-size: 13px;
  line-height: 1.15;
}

.experiment-tab-copy small {
  color: #76857f;
  font-size: 9.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.experiment-workspace-tab > em {
  padding: 3px 6px;
  border-radius: 999px;
  color: #82908b;
  background: #f1f5f3;
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
}

.experiment-workspace-tab:hover {
  border-color: rgba(12, 138, 85, 0.38);
  background: #f8fcfa;
  box-shadow: 0 7px 15px rgba(20, 63, 48, 0.08);
  transform: translateY(-1px);
}

.experiment-workspace-tab.active {
  border-color: #087c4d;
  color: #fff;
  background: #0b8755;
  box-shadow: 0 9px 18px rgba(11, 126, 79, 0.2);
}

.experiment-workspace-tab.active .experiment-tab-index {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.experiment-workspace-tab.active .experiment-tab-copy strong,
.experiment-workspace-tab.active .experiment-tab-copy small {
  color: #fff;
}

.experiment-workspace-tab.active > em {
  color: #087844;
  background: #fff;
}

.experiment-workspace-tab:focus-visible {
  outline: 3px solid rgba(12, 138, 85, 0.22);
  outline-offset: 2px;
}

.experiment-tab-content {
  padding: 10px;
  border: 1px solid rgba(199, 216, 210, 0.86);
  border-radius: 14px;
  background: rgba(250, 253, 251, 0.78);
}

.experiment-tab-context {
  min-width: 0;
  min-height: 40px;
  margin-bottom: 9px;
  padding: 0 4px 8px;
  display: flex;
  align-items: baseline;
  gap: 9px;
  border-bottom: 1px solid rgba(207, 222, 216, 0.86);
}

.experiment-tab-context span,
.experiment-tab-context strong,
.experiment-tab-context small {
  margin: 0;
}

.experiment-tab-context span {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  color: #087844;
  background: #e6f5ed;
  font-size: 9.5px;
  font-weight: 860;
}

.experiment-tab-context strong {
  flex: 0 0 auto;
  color: #20322b;
  font-size: 14px;
}

.experiment-tab-context small {
  min-width: 0;
  color: #74827d;
  font-size: 10.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.experiment-tab-content,
.experiment-records-panel,
.experiment-trends-panel,
.experiment-ai-panel,
.experiment-overview-grid {
  min-width: 0;
}

.experiment-overview-grid,
.experiment-records-panel,
.experiment-trends-panel,
.experiment-ai-panel {
  display: grid;
  gap: 12px;
}

.experiment-overview-grid .experiment-plan-card,
.experiment-records-panel .record-navigator,
.experiment-records-panel .daily-log-form,
.experiment-records-panel .daily-log-table,
.experiment-trends-panel .experiment-chart-grid,
.experiment-ai-panel .experiment-ai-card {
  grid-area: auto;
}

.experiment-overview-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.experiment-overview-metrics article {
  min-width: 0;
  padding: 14px;
  display: grid;
  gap: 3px;
  border: 1px solid rgba(199, 216, 210, 0.9);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 18px rgba(20, 45, 38, 0.05);
}

.experiment-overview-metrics span,
.experiment-overview-metrics small {
  color: #77847f;
  font-size: 11px;
  font-weight: 760;
}

.experiment-overview-metrics strong {
  color: #087844;
  font-size: 22px;
  line-height: 1.1;
}

.experiment-model-source-card {
  display: grid;
  grid-template-columns: minmax(230px, 0.8fr) minmax(300px, 1fr) minmax(420px, 1.45fr);
  gap: 14px;
  align-items: center;
  padding: 13px 15px;
  border-color: rgba(10, 139, 85, 0.3);
  background: linear-gradient(105deg, rgba(234, 249, 241, 0.96), rgba(255, 255, 255, 0.96));
}

.experiment-model-source-head,
.experiment-model-source-head > div,
.experiment-model-source-copy,
.experiment-model-source-copy p {
  display: grid;
  gap: 3px;
}

.experiment-model-source-head p,
.experiment-model-source-head h4,
.experiment-model-source-copy p {
  margin: 0;
}

.experiment-model-source-head p,
.experiment-model-source-copy strong,
.experiment-model-source-metrics span {
  color: #73827c;
  font-size: 10px;
  font-weight: 820;
}

.experiment-model-source-head h4 {
  color: #087844;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.experiment-model-source-head > span {
  width: max-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: #087844;
  background: rgba(10, 139, 85, 0.1);
  font-size: 10px;
  font-weight: 850;
}

.experiment-model-source-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.experiment-model-source-metrics article {
  display: grid;
  gap: 2px;
  padding: 8px 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(10, 139, 85, 0.13);
}

.experiment-model-source-metrics strong {
  color: #17392c;
  font-size: 15px;
}

.experiment-model-source-copy {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.experiment-model-source-copy span {
  color: #40534b;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.45;
}

.experiment-meta-identity {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 10px;
}

.experiment-param-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.experiment-param-grid span,
.daily-field-grid span,
.daily-log-form .field-block span {
  font-size: 11.5px;
}

.experiment-param-grid input,
.experiment-param-grid select,
.daily-field-grid input,
.daily-field-grid select,
.daily-log-form textarea,
.daily-log-form .field-block textarea {
  height: 36px;
  border-radius: 8px;
  font-size: 12.5px;
}

.form-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.form-action-row .primary-button {
  min-width: 190px;
}

.record-navigator {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
}

.record-navigator p,
.record-navigator span {
  margin: 0;
}

.record-navigator p {
  color: #20302a;
  font-size: 14px;
  font-weight: 900;
}

.record-navigator > div:first-child > span {
  display: block;
  margin-top: 2px;
  color: #788681;
  font-size: 10.5px;
  line-height: 1.35;
}

.record-date-strip {
  min-width: 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: thin;
}

.record-date-strip button {
  flex: 0 0 auto;
  min-width: 84px;
  min-height: 42px;
  padding: 6px 9px;
  display: grid;
  gap: 1px;
  border: 1px solid rgba(202, 217, 211, 0.92);
  border-radius: 9px;
  color: #51615c;
  background: #fff;
  cursor: pointer;
}

.record-date-strip button strong {
  color: #244038;
  font-size: 11.5px;
}

.record-date-strip button span {
  color: #81908a;
  font-size: 9.5px;
}

.record-date-strip button:hover,
.record-date-strip button.active {
  border-color: rgba(12, 138, 85, 0.48);
  background: #eaf7f0;
}

.record-date-empty {
  color: #82908b;
  font-size: 11px;
}

.record-new-button {
  min-width: 102px;
}

.daily-log-form {
  position: static;
  max-height: none;
  overflow: visible;
  gap: 12px;
  padding: 14px;
}

.daily-log-form.is-editing {
  border-color: rgba(212, 138, 39, 0.48);
  box-shadow: 0 12px 30px rgba(139, 91, 29, 0.09);
}

.daily-form-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(207, 222, 216, 0.76);
}

.daily-form-header p,
.daily-form-header h4,
.daily-form-header span {
  margin: 0;
}

.daily-form-header p {
  color: #0b8755;
  font-size: 11px;
  font-weight: 900;
}

.daily-form-header h4 {
  margin-top: 3px;
  font-size: 17px;
  white-space: normal;
}

.daily-form-header span {
  display: block;
  margin-top: 3px;
  color: #74827e;
  font-size: 11px;
}

.daily-form-message {
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 780;
}

.daily-form-message[hidden] {
  display: none;
}

.daily-form-message.is-success {
  color: #087844;
  border: 1px solid rgba(12, 138, 85, 0.22);
  background: #eaf7f0;
}

.daily-form-message.is-warning {
  color: #8b5a1f;
  border: 1px solid rgba(212, 138, 39, 0.3);
  background: #fff8eb;
}

.daily-form-message.is-error {
  color: #b13d3d;
  border: 1px solid rgba(220, 76, 76, 0.28);
  background: #fff1f1;
}

.daily-fieldset {
  gap: 9px;
  padding: 12px;
}

.daily-fieldset p {
  font-size: 13px;
}

.daily-fieldset-heading {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.daily-fieldset-heading .compact-action {
  min-height: 28px;
  padding: 4px 10px;
  border-color: rgba(10, 137, 82, 0.2);
  color: #087844;
  font-size: 10px;
  white-space: nowrap;
}

.daily-field-grid.time-grid {
  grid-template-columns: 1fr 1fr 0.8fr 1fr 1fr;
  gap: 9px;
}

.daily-form-sections {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 10px;
  align-items: stretch;
}

.daily-field-grid.dense-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.daily-field-grid label small {
  min-height: 11px;
  font-size: 10px;
}

.daily-observation-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 10px;
  align-items: stretch;
}

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

.auto-score-panel {
  padding: 13px;
  align-content: center;
}

.auto-score-panel span,
.auto-score-panel small,
.auto-score-panel p {
  font-size: 11px;
}

.auto-score-panel strong {
  font-size: 23px;
}

.daily-note-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.daily-note-row textarea,
.daily-log-form textarea {
  height: 72px;
  min-height: 72px;
  padding: 9px 10px;
}

.daily-form-actions {
  padding-top: 2px;
}

.revision-history {
  border: 1px solid rgba(212, 138, 39, 0.24);
  border-radius: 10px;
  background: #fffaf1;
}

.revision-history summary {
  padding: 9px 11px;
  color: #80521e;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.revision-history > div {
  padding: 0 11px 9px;
  display: grid;
  gap: 5px;
}

.revision-history p {
  margin: 0;
  display: flex;
  gap: 10px;
  color: #6d665c;
  font-size: 10.5px;
}

.daily-log-table {
  padding: 14px;
  overflow: hidden;
}

.daily-log-table .panel-title-row p {
  margin: 3px 0 0;
  color: #74827e;
  font-size: 11px;
}

.daily-history-scroll {
  max-height: 440px;
  overflow: auto;
}

.daily-log-table table {
  min-width: 1420px;
  font-size: 11.5px;
}

.daily-log-table th,
.daily-log-table td {
  padding: 8px 9px;
}

.daily-log-table td:first-child strong,
.daily-log-table td:first-child small {
  display: block;
}

.daily-log-table td:first-child strong {
  color: #087844;
}

.daily-log-table td:first-child small {
  margin-top: 2px;
  color: #a06b29;
  font-size: 9px;
}

.daily-log-table tr.is-editing td {
  background: #fff8eb;
}

.table-edit-button {
  min-width: 48px;
  min-height: 28px;
  border: 1px solid rgba(12, 138, 85, 0.28);
  border-radius: 7px;
  color: #087844;
  background: #eef9f3;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.table-edit-button:hover,
.table-edit-button:focus-visible {
  border-color: #0c8a55;
  outline: 3px solid rgba(12, 138, 85, 0.1);
}

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

.experiment-chart-card {
  padding: 14px;
}

.experiment-chart {
  min-height: 300px;
}

.trend-source-legend {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(199, 216, 210, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: #64736e;
  font-size: 11px;
}

.trend-source-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
}

.trend-source-legend i {
  width: 22px;
  height: 3px;
  border-radius: 99px;
  background: #0c8a55;
}

.trend-source-legend i.estimated {
  background: repeating-linear-gradient(90deg, #8fbca5 0 4px, transparent 4px 7px);
}

.trend-source-legend i.planned {
  height: 2px;
  background: repeating-linear-gradient(90deg, #d08a2f 0 7px, transparent 7px 11px);
}

.trend-source-legend p {
  margin: 0 0 0 auto;
}

.experiment-ai-panel .experiment-ai-card {
  min-height: 360px;
}

.summary-current-group {
  min-width: 0;
  padding: 8px 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(199, 216, 210, 0.8);
  border-radius: 9px;
  background: #f7fbf9;
}

.summary-current-group span {
  flex: 0 0 auto;
  color: #7a8983;
  font-size: 9.5px;
  font-weight: 800;
}

.summary-current-group strong {
  min-width: 0;
  overflow: hidden;
  color: #233a32;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.experiment-actions-menu > div {
  width: 160px;
}

.experiment-actions-menu .danger-button {
  width: 100%;
}

.record-navigator-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.record-navigator-actions select {
  width: 132px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid rgba(202, 217, 211, 0.92);
  border-radius: 8px;
  color: #53645e;
  background: #fff;
  font-size: 10.5px;
}

.daily-inherit-notice {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(208, 138, 47, 0.28);
  border-radius: 10px;
  background: #fff9ef;
}

.daily-inherit-notice > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.daily-inherit-notice strong {
  color: #80541d;
  font-size: 11.5px;
}

.daily-inherit-notice span {
  color: #89745a;
  font-size: 10.5px;
  line-height: 1.4;
}

.daily-inherit-notice button {
  flex: 0 0 auto;
}

.daily-fieldset .fieldset-help {
  margin-top: 8px;
  color: #7b8984;
  font-size: 10px;
  font-weight: 650;
}

.field-source {
  min-height: 15px !important;
  display: inline-flex;
  align-items: center;
  color: #82908b;
  font-size: 9px !important;
  font-weight: 780;
}

.field-source.source-carried {
  color: #98631e;
}

.field-source.source-planned {
  color: #55766b;
}

.field-source.source-manual {
  color: #087844;
}

.daily-advanced-fields {
  border: 1px solid rgba(199, 216, 210, 0.9);
  border-radius: 11px;
  background: rgba(250, 253, 251, 0.94);
}

.daily-advanced-fields summary {
  min-height: 42px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #294039;
  cursor: pointer;
  list-style-position: inside;
}

.daily-advanced-fields summary span {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
}

.daily-advanced-fields summary small {
  min-width: 0;
  color: #7b8984;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-advanced-fields[open] summary {
  border-bottom: 1px solid rgba(207, 222, 216, 0.8);
}

.advanced-measure-grid {
  padding: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.daily-form-actions {
  position: sticky;
  z-index: 8;
  bottom: 0;
  margin: 0 -14px -14px;
  padding: 10px 14px;
  align-items: center;
  border-top: 1px solid rgba(204, 220, 214, 0.92);
  border-radius: 0 0 12px 12px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -8px 18px rgba(22, 50, 41, 0.05);
  backdrop-filter: blur(10px);
}

.daily-save-summary {
  min-width: 0;
  margin-right: auto;
  color: #6f7f79;
  font-size: 10.5px;
  font-weight: 760;
}

.daily-table-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.daily-table-view-switch {
  padding: 3px;
  display: flex;
  gap: 2px;
  border-radius: 8px;
  background: #eef4f1;
}

.daily-table-view-switch button {
  min-height: 26px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  color: #6d7c77;
  background: transparent;
  font-size: 10px;
  font-weight: 820;
  cursor: pointer;
}

.daily-table-view-switch button.active {
  color: #087844;
  background: #fff;
  box-shadow: 0 2px 7px rgba(23, 61, 48, 0.1);
}

.daily-record-table {
  min-width: 880px !important;
}

.table-view-environment .daily-record-table,
.table-view-growth .daily-record-table {
  min-width: 980px !important;
}

.table-view-all .daily-record-table {
  min-width: 1420px !important;
}

.daily-note-cell {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.experiment-ai-readiness {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.experiment-ai-readiness article {
  min-width: 0;
  padding: 11px;
  display: grid;
  gap: 2px;
  border: 1px solid rgba(199, 216, 210, 0.88);
  border-radius: 10px;
  background: #f8fcfa;
}

.experiment-ai-readiness span,
.experiment-ai-readiness small {
  color: #75847e;
  font-size: 9.5px;
}

.experiment-ai-readiness strong {
  color: #087844;
  font-size: 16px;
}

@media (min-width: 1181px) and (max-width: 1500px) {
  .experiment-library-layout {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  .experiment-list {
    max-height: none;
  }

  .experiment-detail-shell {
    grid-template-columns: minmax(0, 1fr);
  }

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

@media (max-width: 1180px) {
  .experiment-library-layout {
    grid-template-columns: 1fr;
  }

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

  .experiment-list-panel {
    position: static;
    height: auto;
    min-height: 0;
  }

  .experiment-list {
    max-height: 320px;
  }

  .daily-form-sections,
  .daily-observation-row,
  .experiment-chart-grid {
    grid-template-columns: 1fr;
  }

  .advanced-measure-grid,
  .experiment-ai-readiness {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .experiment-workspace-tabs {
    grid-template-columns: 1fr;
  }

  .experiment-workspace-switcher-head,
  .experiment-tab-context {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 1500px) {
  .experiment-dashboard {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .migration-center-layout {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .migration-task-history-panel {
    grid-column: 2;
    position: static;
    max-height: none;
  }

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

  .experiment-model-source-card {
    grid-template-columns: minmax(220px, 0.8fr) minmax(300px, 1fr);
  }

  .experiment-model-source-copy {
    grid-column: 1 / -1;
  }

  .migration-evaluation-kpis,
  .migration-flow-strip,
  .next-target-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .migration-evaluation-body {
    grid-template-columns: 1fr;
  }

}

/* 2026-07-23: premium desktop layout and overflow hardening. */
:root {
  --bg: #edf3f0;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-soft: #f6faf8;
  --line: #d9e5df;
  --line-strong: #c5d7cf;
  --ink: #1d2b25;
  --muted: #697a73;
  --green: #087f4d;
  --green-dark: #07543c;
  --shadow: 0 10px 30px rgba(18, 53, 40, 0.065);
  --shadow-strong: 0 22px 58px rgba(11, 48, 35, 0.12);
  --radius: 14px;
  --radius-lg: 18px;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 88% 2%, rgba(215, 234, 224, 0.74), transparent 26%),
    linear-gradient(180deg, #f4f8f6 0, var(--bg) 100%);
}

.app-shell {
  width: 100%;
  max-width: 100%;
  overflow: clip;
}

.workspace {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  grid-template-rows: 64px 1fr;
  overflow: clip;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  min-width: 0;
  height: 64px;
  padding: 0 18px;
  gap: 10px;
  background:
    linear-gradient(100deg, rgba(5, 28, 29, 0.985), rgba(8, 37, 38, 0.96)),
    url("./assets/generated/platform-bg.png") center 41% / cover;
  box-shadow: 0 8px 24px rgba(5, 32, 27, 0.16);
  backdrop-filter: blur(18px);
}

.topbar > * {
  min-width: 0;
}

.menu-button,
.bell-button,
.user-button,
.top-select {
  height: 36px;
  border-radius: 9px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.065);
}

.top-select {
  min-width: 0;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-meter {
  min-width: 0;
  min-height: 32px;
  gap: 5px;
  padding: 0 10px;
}

.status-kicker {
  padding: 3px 6px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 9px !important;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.bell-button {
  width: auto;
  min-width: 46px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 800;
}

.user-button {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view {
  width: 100%;
  max-width: 1900px;
  min-width: 0;
  margin: 0 auto;
  padding: 18px clamp(14px, 1.7vw, 28px) 24px;
  overflow: clip;
}

.view.active {
  animation: viewReveal 280ms ease both;
}

@keyframes viewReveal {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-toolbar {
  position: relative;
  min-width: 0;
  min-height: 58px;
  margin-bottom: 14px;
  padding: 12px 15px;
  flex-wrap: wrap;
  column-gap: 16px;
  row-gap: 9px;
  overflow: hidden;
  border: 1px solid rgba(195, 216, 206, 0.88);
  border-radius: 16px;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.985) 0 58%, rgba(242, 250, 246, 0.88) 100%),
    url("./assets/generated/platform-bg.png") right 38% / cover;
  background-blend-mode: normal, soft-light;
  box-shadow: 0 10px 28px rgba(19, 55, 42, 0.065);
}

.page-toolbar::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, #0a8a54, rgba(213, 165, 72, 0.62), transparent 80%);
}

.page-toolbar > * {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.page-toolbar h2 {
  color: #173328;
  font-size: clamp(18px, 1.35vw, 22px);
  letter-spacing: -0.025em;
}

.page-toolbar p {
  max-width: 760px;
  font-size: 12px;
  line-height: 1.55;
}

.toolbar-actions {
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.stage-tabs {
  min-width: min(100%, 380px);
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.stage-tab {
  min-width: 102px;
  height: 34px;
  padding: 0 13px;
  border-radius: 9px;
  font-size: 12px;
}

.panel {
  min-width: 0;
  border-color: rgba(202, 219, 211, 0.92);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-title-row {
  min-width: 0;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.panel-title-row > * {
  min-width: 0;
}

.panel h3,
.chart-card h3 {
  color: #20372e;
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.model-label,
.panel-title-row span {
  max-width: 100%;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.primary-button,
.ghost-button,
.prompt-chip {
  border-radius: 9px;
  font-size: 12px;
}

.primary-button:focus-visible,
.ghost-button:focus-visible,
.prompt-chip:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(10, 139, 85, 0.16);
  outline-offset: 1px;
}

.compact-field select,
.compact-field input,
.mini-select,
.param-row input[type="number"],
.param-row select,
.composer textarea,
.field-block select {
  min-width: 0;
  border-radius: 9px;
  border-color: #d5e1dc;
}

.chart-card,
.comparison-panel {
  position: relative;
  min-width: 0;
  padding: 15px;
  overflow: hidden;
  isolation: isolate;
}

.chart-card::before,
.comparison-panel::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 42px;
  background: linear-gradient(180deg, rgba(232, 245, 238, 0.58), transparent);
  pointer-events: none;
}

.chart-controls,
.cube-controls {
  min-width: 0;
}

.chart-controls.two-controls {
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.chart-controls.three-controls {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.chart-controls.multi-controls {
  grid-template-columns: minmax(160px, 0.32fr) minmax(0, 1fr);
}

.cube-controls {
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
}

.cube-controls .density-control {
  min-width: 170px;
}

.line-chart,
.heatmap,
.surface-plot {
  width: 100%;
  min-width: 0;
  height: clamp(280px, 27vw, 360px);
  padding: 8px;
  border-radius: 12px;
  background-size: 28px 28px;
}

.cube-plot {
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: clamp(480px, 48vw, 620px);
  border-radius: 12px;
}

.medium-board,
.environment-board {
  min-width: 0;
  grid-template-rows: none;
  grid-auto-rows: auto;
  gap: 14px;
}

.medium-board > *,
.environment-board > * {
  min-width: 0;
  grid-row: auto !important;
}

.summary-card {
  position: relative;
  min-width: 0;
  min-height: 138px;
  padding: 17px;
  overflow: hidden;
  border-radius: 16px;
  border-color: rgba(199, 218, 209, 0.9);
  background:
    radial-gradient(circle at 100% 0, rgba(224, 243, 234, 0.86), transparent 42%),
    rgba(255, 255, 255, 0.96);
}

.summary-card img {
  width: 42px;
  height: 42px;
}

.summary-card strong {
  font-size: 20px;
}

.overview-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.data-note {
  gap: 12px;
  padding: 10px 2px 0;
  flex-wrap: wrap;
  font-size: 10.5px;
  line-height: 1.5;
}

.assistant-layout {
  min-width: 0;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr) minmax(260px, 320px);
  gap: 14px;
}

.assistant-layout > * {
  min-width: 0;
}

.chat-panel {
  position: relative;
  grid-template-rows: minmax(420px, calc(100vh - 292px)) auto;
  isolation: isolate;
}

.chat-panel::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: 210px;
  height: 210px;
  opacity: 0.035;
  transform: translate(-50%, -58%);
  background: url("./assets/generated/icon-assistant.png") center / contain no-repeat;
}

.context-panel,
.assistant-panel {
  overflow: hidden;
}

.experiment-dashboard {
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
}

.experiment-kpi-card {
  min-width: 0;
  min-height: 66px;
}

.experiment-kpi-card > div:last-child {
  min-width: 0;
}

.experiment-dashboard p,
.experiment-dashboard span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.experiment-dashboard strong {
  font-size: 21px;
}

.experiment-library-layout,
.experiment-detail-shell,
.migration-center-layout {
  min-width: 0;
}

.experiment-list-item,
.experiment-work-card,
.migration-center-layout > * {
  min-width: 0;
}

.experiment-list-item p,
.experiment-list-item span,
.experiment-list-item h4 {
  max-width: 100%;
}

.migration-step-strip,
.closed-loop-strip {
  min-width: 0;
}

.migration-step-strip article,
.closed-loop-strip article {
  min-width: 0;
}

.empty-state {
  border-radius: 11px;
  border-color: #c8d9d1;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 250, 247, 0.94));
}

@media (min-width: 1401px) {
  .medium-board {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    grid-template-areas:
      "params params params result result result result result result ai ai ai"
      "curve curve curve curve curve curve compare compare compare compare compare compare"
      "multi multi multi multi multi multi heat heat heat heat heat heat"
      "cube cube cube cube cube cube cube cube cube cube cube cube";
    align-items: stretch;
  }

  #mediumView .params-panel {
    grid-area: params !important;
  }

  #mediumView .result-panel {
    grid-area: result !important;
  }

  #mediumView .ai-panel {
    grid-area: ai !important;
  }

  #mediumView .curve-card {
    grid-area: curve !important;
  }

  #mediumView .heatmap-card {
    grid-area: heat !important;
  }

  #mediumView .comparison-panel {
    grid-area: compare !important;
  }

  #mediumView .multi-curve-card {
    grid-area: multi !important;
  }

  #mediumView .cube-card {
    grid-area: cube !important;
  }

  #mediumView .curve-card,
  #mediumView .comparison-panel,
  #mediumView .multi-curve-card,
  #mediumView .heatmap-card,
  #mediumView .cube-card {
    width: 100%;
    min-width: 0;
    align-self: stretch;
  }

  #mediumView .line-chart,
  #mediumView .heatmap {
    height: clamp(290px, 23vw, 350px);
  }

  #mediumView .cube-plot {
    height: clamp(520px, 43vw, 620px);
  }

  .environment-board {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    grid-template-areas:
      "params params params result result result result result result ai ai ai"
      "plan plan plan plan plan plan plan plan plan plan plan plan"
      "single single single single single single multi multi multi multi multi multi"
      "heat heat heat heat heat heat cube cube cube cube cube cube";
  }

  #environmentView .params-panel {
    grid-area: params;
  }

  #environmentView .result-panel {
    grid-area: result;
  }

  #environmentView .ai-panel {
    grid-area: ai;
  }

  #environmentView .environment-plan-panel {
    grid-area: plan;
  }

  #environmentView .env-single-card {
    grid-area: single;
  }

  #environmentView .env-multi-card {
    grid-area: multi;
  }

  #environmentView .env-heatmap-card {
    grid-area: heat;
  }

  #environmentView .env-cube-card {
    grid-area: cube;
  }
}

@media (max-width: 1400px) {
  .medium-board,
  .environment-board {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #mediumView .params-panel,
  #mediumView .result-panel,
  #mediumView .curve-card,
  #mediumView .heatmap-card {
    grid-column: auto !important;
  }

  #mediumView .ai-panel,
  #mediumView .comparison-panel,
  #mediumView .multi-curve-card,
  #mediumView .cube-card {
    grid-column: 1 / -1 !important;
  }

  #environmentView .params-panel,
  #environmentView .result-panel,
  #environmentView .env-single-card,
  #environmentView .env-multi-card {
    grid-column: auto !important;
  }

  #environmentView .ai-panel,
  #environmentView .environment-plan-panel,
  #environmentView .env-heatmap-card,
  #environmentView .env-cube-card {
    grid-column: 1 / -1 !important;
  }

  .assistant-layout {
    grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  }

  .assistant-layout .context-panel {
    grid-column: 1 / -1;
  }

  .context-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
  }
}

@media (max-width: 1280px) {
  .app-shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .sidebar {
    padding-inline: 10px;
  }

  .brand-block h1 {
    font-size: 21px;
  }

  .nav-item {
    padding-inline: 10px;
  }

  .nav-item span:last-child {
    font-size: 13px;
  }

  .top-select {
    max-width: 190px;
  }

  .status-meter:not(.online) {
    display: none;
  }

  .experiment-library-layout {
    grid-template-columns: minmax(260px, 31%) minmax(0, 1fr) !important;
  }

  .experiment-list-panel {
    position: sticky;
    top: 78px;
    height: calc(100vh - 96px);
    min-height: 560px;
  }

  .experiment-list {
    max-height: none;
  }

  .experiment-detail-shell {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas: none !important;
  }

  .daily-log-form {
    position: static;
    max-height: none;
  }

  .migration-center-layout {
    grid-template-columns: minmax(260px, 31%) minmax(0, 1fr) !important;
  }

  .migration-task-history-panel {
    grid-column: 2 !important;
  }
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 176px minmax(0, 1fr);
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-block {
    gap: 7px;
    padding-inline: 6px;
  }

  .brand-block h1 {
    font-size: 19px;
  }

  .brand-block p {
    font-size: 9px;
  }

  .topbar {
    padding-inline: 12px;
  }

  .topbar > .top-select:nth-of-type(3) {
    display: none;
  }

  .status-meter.online span:last-child {
    display: none;
  }

  .page-toolbar {
    padding: 11px 13px;
  }

  .line-chart,
  .heatmap,
  .surface-plot {
    height: 310px;
  }

  .cube-plot {
    height: 510px;
  }

  .chart-controls.multi-controls {
    grid-template-columns: 1fr;
  }

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

  .experiment-library-layout {
    grid-template-columns: minmax(250px, 30%) minmax(0, 1fr) !important;
  }
}

@media (max-width: 920px) {
  .medium-board,
  .environment-board,
  .assistant-layout,
  .experiment-library-layout,
  .migration-center-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .medium-board > *,
  .environment-board > *,
  .assistant-layout > *,
  .migration-center-layout > * {
    grid-column: 1 !important;
  }

  .experiment-list-panel {
    position: static;
    height: auto;
    min-height: 0;
  }

  .experiment-list {
    max-height: 360px;
  }

  .migration-task-history-panel {
    grid-column: 1 !important;
  }
}

@media (hover: hover) {
  .primary-button:hover,
  .ghost-button:hover,
  .prompt-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(13, 82, 57, 0.12);
  }

  .panel,
  .summary-card {
    transition: border-color 180ms ease, box-shadow 180ms ease;
  }

  .summary-card:hover {
    border-color: rgba(10, 139, 85, 0.3);
    box-shadow: var(--shadow-strong);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 900px) {
  .experiment-dashboard,
  .migration-center-layout,
  .migration-task-list,
  .migration-evaluation-kpis,
  .migration-flow-strip,
  .next-target-grid,
  .experiment-param-grid,
  .daily-field-grid,
  .daily-field-grid.three,
  .daily-field-grid.dense-three,
  .daily-field-grid.time-grid,
  .qualitative-grid,
  .experiment-overview-metrics,
  .experiment-meta-identity,
  .experiment-workspace-tabs,
  .record-navigator {
    grid-template-columns: 1fr;
  }

  .advanced-measure-grid,
  .experiment-ai-readiness {
    grid-template-columns: 1fr;
  }

  .migration-evaluation-empty,
  .migration-evaluation-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .migration-select-panel,
  .migration-task-history-panel {
    position: static;
    max-height: none;
  }
}

.empty-state {
  padding: 14px;
  border-radius: 8px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  background: #fff;
  line-height: 1.7;
}

.error-state {
  color: var(--red);
  background: rgba(220, 76, 76, 0.08);
  border-color: rgba(220, 76, 76, 0.3);
}

@media (max-width: 1400px) {
  .medium-board,
  .environment-board,
  .model-agent-layout,
  .migration-layout,
  .assistant-layout {
    grid-template-columns: 320px minmax(500px, 1fr);
  }

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

  .initial-basis-grid,
  .initial-groups-grid,
  .initial-range-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .migration-layout {
    grid-template-areas:
      "batch guide"
      "result guide"
      "agent chat"
      "tools tools";
  }

  .migration-guide-grid {
    grid-template-columns: 1fr;
  }

  #mediumView .params-panel,
  #mediumView .result-panel,
  #mediumView .ai-panel,
  #mediumView .curve-card,
  #mediumView .multi-curve-card,
  #mediumView .heatmap-card,
  #mediumView .cube-card,
  #mediumView .comparison-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .ai-panel,
  .cube-card,
  .comparison-panel,
  .model-agent-tools,
  .migration-tools-panel {
    grid-column: 1 / -1;
  }
}

/* Production data -> daily report -> calibrated version -> next round. */
.closed-loop-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
  padding: 9px;
  border: 1px solid rgba(178, 207, 196, 0.78);
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(249, 253, 251, 0.98), rgba(239, 248, 244, 0.94));
}

.closed-loop-strip article {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.78);
}

.closed-loop-strip article:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -7px;
  width: 6px;
  height: 1px;
  background: #9ab8ab;
}

.closed-loop-strip b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: #fff;
  background: #0a8550;
  font-size: 12px;
}

.closed-loop-strip strong,
.closed-loop-strip span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.closed-loop-strip strong {
  color: #20352c;
  font-size: 12px;
  line-height: 1.4;
}

.closed-loop-strip span {
  margin-top: 2px;
  color: #728079;
  font-size: 10px;
}

.daily-report-card {
  padding: 14px;
  border-left: 4px solid #179560;
  background: linear-gradient(135deg, #ffffff, #f1faf6);
}

.daily-report-card.level-warning {
  border-left-color: #d89520;
  background: linear-gradient(135deg, #fff, #fff9ea);
}

.daily-report-card.level-critical {
  border-left-color: #d75b54;
  background: linear-gradient(135deg, #fff, #fff2f0);
}

.daily-report-head,
.experiment-completion-card,
.calibration-version-head,
.calibration-next-head {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.daily-report-head p,
.daily-report-head h4,
.daily-report-head span,
.experiment-completion-card p,
.experiment-completion-card h4,
.experiment-completion-card span,
.calibration-version-head p,
.calibration-version-head h3,
.calibration-version-head span {
  margin: 0;
}

.daily-report-head p,
.experiment-completion-card p {
  color: #0a8550;
  font-size: 11px;
  font-weight: 900;
}

.daily-report-head h4,
.experiment-completion-card h4 {
  margin-top: 3px;
  color: #20332b;
  font-size: 17px;
  letter-spacing: -0.025em;
}

.daily-report-head > div > span,
.experiment-completion-card > div > span {
  display: block;
  margin-top: 4px;
  color: #6c7c75;
  font-size: 11px;
}

.daily-report-actions,
.completion-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.daily-report-status {
  padding: 5px 9px;
  border-radius: 999px;
  color: #087844;
  background: #e6f6ee;
  font-size: 11px;
  font-weight: 900;
}

.level-warning .daily-report-status {
  color: #986410;
  background: #fff0c9;
}

.level-critical .daily-report-status {
  color: #b53a34;
  background: #fee6e3;
}

.daily-report-kpis,
.calibration-metric-grid {
  display: grid;
  gap: 8px;
  margin-top: 11px;
}

.daily-report-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.daily-report-kpis article,
.calibration-metric-grid article {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(203, 222, 214, 0.82);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
}

.daily-report-kpis span,
.daily-report-kpis strong,
.daily-report-kpis small,
.calibration-metric-grid span,
.calibration-metric-grid strong,
.calibration-metric-grid small {
  display: block;
}

.daily-report-kpis span,
.calibration-metric-grid span {
  color: #75837d;
  font-size: 10px;
  font-weight: 800;
}

.daily-report-kpis strong,
.calibration-metric-grid strong {
  margin: 2px 0;
  color: #0a8050;
  font-size: 18px;
}

.daily-report-kpis small,
.calibration-metric-grid small {
  overflow: hidden;
  color: #83908a;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-report-findings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}

.daily-report-findings article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.9fr);
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(213, 225, 220, 0.9);
  background: #fff;
}

.daily-report-findings strong,
.daily-report-findings span {
  display: block;
}

.daily-report-findings strong {
  color: #273a32;
  font-size: 11px;
}

.daily-report-findings span,
.daily-report-findings p {
  margin: 2px 0 0;
  color: #718078;
  font-size: 10px;
  line-height: 1.45;
}

.daily-report-findings p {
  padding-left: 10px;
  border-left: 1px solid #dfe9e4;
}

.daily-report-ai {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.85);
}

.daily-report-ai summary {
  color: #176c48;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.experiment-completion-card {
  padding: 13px 15px;
  border-left: 4px solid #d49b30;
  background: linear-gradient(135deg, #fffdf6, #fff7df);
}

.experiment-completion-card.is-finished {
  border-left-color: #0a8b55;
  background: linear-gradient(135deg, #fff, #ebf8f1);
}

.completion-actions {
  flex-direction: column;
  align-items: flex-end;
}

.completion-actions small {
  color: #74827b;
  font-size: 10px;
}

.calibration-version-panel {
  margin-bottom: 12px;
  padding: 15px;
  border-radius: 16px;
  border-color: rgba(168, 205, 189, 0.92);
  background:
    radial-gradient(circle at 100% 0, rgba(239, 188, 83, 0.16), transparent 30%),
    linear-gradient(135deg, #fff, #f0faf5);
  box-shadow: 0 16px 38px rgba(19, 61, 45, 0.09);
}

.calibration-version-panel.is-empty {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calibration-version-head h3 {
  margin-top: 4px;
  color: #18362a;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.calibration-version-head > div > span {
  display: block;
  max-width: 920px;
  margin-top: 5px;
  color: #61736b;
  font-size: 11px;
  line-height: 1.5;
}

.calibration-version-badge {
  min-width: 130px;
  padding: 10px 13px;
  border-radius: 13px;
  color: #fff;
  text-align: center;
  background: linear-gradient(155deg, #12a66b, #075a3a);
}

.calibration-version-badge strong,
.calibration-version-badge span,
.calibration-version-badge small {
  display: block;
}

.calibration-version-badge strong {
  font-size: 24px;
}

.calibration-version-badge span,
.calibration-version-badge small {
  font-size: 9px;
  opacity: 0.88;
}

.calibration-feature-line {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-top: 9px;
  padding: 8px 10px;
  border-radius: 9px;
  color: #53675e;
  background: rgba(224, 243, 234, 0.72);
  font-size: 10px;
}

.calibration-feature-line small {
  margin-left: auto;
  color: #6b7d74;
}

.calibration-next-head {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(194, 216, 207, 0.85);
}

.calibration-next-head h3,
.calibration-next-head p,
.calibration-next-head span {
  margin: 0;
}

.calibration-next-head h3 {
  margin-top: 2px;
  color: #263b32;
  font-size: 16px;
}

.calibration-next-head span {
  display: block;
  margin-top: 3px;
  color: #6f7f77;
  font-size: 10px;
}

.calibration-next-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.calibration-next-grid > article {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(192, 216, 206, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.calibration-next-grid h4,
.calibration-next-grid p {
  margin: 0;
}

.calibration-next-grid h4 {
  padding-right: 30px;
  color: #20372d;
  font-size: 13px;
}

.calibration-next-grid p,
.calibration-next-grid small {
  color: #6b7b73;
  font-size: 10px;
  line-height: 1.45;
}

.calibration-rank {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  color: #fff;
  background: #0a8b55;
  font-size: 11px;
  font-weight: 900;
}

.calibration-score-row {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 8px;
  color: #687870;
  background: #f2f8f5;
  font-size: 10px;
}

.calibration-score-row strong {
  color: #087844;
  font-size: 12px;
}

.calibration-score-row em {
  margin-left: auto;
  color: #3f6454;
  font-style: normal;
  font-weight: 900;
}

.calibration-error {
  margin: 9px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  color: #b33d37;
  background: #feecea;
  font-size: 11px;
}

.calibration-history-card.active {
  border-color: rgba(10, 139, 85, 0.45);
  background: #f0faf5;
}

.next-target-wait {
  display: block;
  padding: 7px 9px;
  border-radius: 8px;
  color: #6f7e77;
  background: #f0f5f2;
  font-size: 10px;
  text-align: center;
}

@media (max-width: 1500px) {
  .closed-loop-strip,
  .daily-report-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

/* Keep the analytical cards in explicit rows after legacy breakpoint rules. */
@media (max-width: 1400px) and (min-width: 921px) {
  .medium-board {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-areas:
      "params result"
      "ai ai"
      "curve compare"
      "multi heat"
      "cube cube";
  }

  #mediumView .params-panel {
    grid-area: params !important;
  }

  #mediumView .result-panel {
    grid-area: result !important;
  }

  #mediumView .ai-panel {
    grid-area: ai !important;
  }

  #mediumView .curve-card {
    grid-area: curve !important;
  }

  #mediumView .comparison-panel {
    grid-area: compare !important;
  }

  #mediumView .heatmap-card {
    grid-area: heat !important;
  }

  #mediumView .multi-curve-card {
    grid-area: multi !important;
  }

  #mediumView .cube-card {
    grid-area: cube !important;
  }

  .environment-board {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-areas:
      "params result"
      "ai ai"
      "plan plan"
      "single multi"
      "heat heat"
      "cube cube";
  }

  #environmentView .params-panel {
    grid-area: params !important;
  }

  #environmentView .result-panel {
    grid-area: result !important;
  }

  #environmentView .ai-panel {
    grid-area: ai !important;
  }

  #environmentView .environment-plan-panel {
    grid-area: plan !important;
  }

  #environmentView .env-single-card {
    grid-area: single !important;
  }

  #environmentView .env-multi-card {
    grid-area: multi !important;
  }

  #environmentView .env-heatmap-card {
    grid-area: heat !important;
  }

  #environmentView .env-cube-card {
    grid-area: cube !important;
  }

  .assistant-layout {
    grid-template-columns: minmax(230px, 280px) minmax(0, 1fr) !important;
  }

  .assistant-layout .context-panel {
    grid-column: 1 / -1 !important;
  }
}

.density-control input[type="range"] {
  width: calc(100% - 6px);
  min-width: 0;
  max-width: 100%;
  margin-inline: 3px;
}

.cube-controls .density-control {
  min-width: 0;
}

/* 2026-07-23: SenShan executive agritech visual system. */
:root {
  --forest-950: #041f19;
  --forest-900: #073129;
  --forest-800: #07513b;
  --champagne: #c9aa68;
  --champagne-soft: #f4ead2;
  --surface-ivory: #fbfcf9;
  --surface-mint: #f0f7f3;
  --ink: #182922;
  --muted: #667871;
  --line: #d4e1da;
  --shadow: 0 12px 32px rgba(11, 48, 35, 0.075);
  --shadow-strong: 0 24px 64px rgba(5, 38, 29, 0.15);
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(circle at 76% -8%, rgba(194, 218, 205, 0.74), transparent 30%),
    radial-gradient(circle at 12% 88%, rgba(229, 239, 233, 0.8), transparent 34%),
    #eef4f0;
}

* {
  scrollbar-color: rgba(27, 94, 68, 0.36) transparent;
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

*::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(27, 94, 68, 0.28);
}

.sidebar {
  border-right: 1px solid rgba(202, 170, 104, 0.2);
  background:
    radial-gradient(circle at 12% 6%, rgba(56, 129, 93, 0.3), transparent 24%),
    linear-gradient(180deg, rgba(3, 31, 25, 0.995), rgba(3, 48, 38, 0.99)),
    url("./assets/generated/platform-bg.png") left center / cover;
  box-shadow: 10px 0 34px rgba(4, 32, 25, 0.13);
}

.brand-block {
  position: relative;
  padding-bottom: 19px;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.brand-block::after {
  content: "";
  position: absolute;
  left: 10px;
  bottom: -1px;
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, var(--champagne), transparent);
}

.brand-mark {
  padding: 5px;
  border: 1px solid rgba(217, 193, 139, 0.5);
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(255, 253, 244, 0.98), rgba(239, 244, 235, 0.96));
  filter: drop-shadow(0 10px 18px rgba(201, 170, 104, 0.2));
}

.brand-block h1 {
  color: #fffef8;
  font-weight: 780;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
}

.brand-block p {
  color: rgba(234, 241, 237, 0.62);
  letter-spacing: 0.11em;
}

.nav-item {
  position: relative;
  height: 48px;
  border: 1px solid transparent;
  border-radius: 10px;
}

.nav-item.active {
  border-color: rgba(218, 188, 124, 0.4);
  background:
    linear-gradient(90deg, rgba(10, 151, 88, 0.98), rgba(8, 104, 69, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 12px 25px rgba(0, 0, 0, 0.2);
}

.nav-item.active::after {
  content: "";
  position: absolute;
  inset: 7px auto 7px -1px;
  width: 3px;
  border-radius: 0 99px 99px 0;
  background: #f1d68f;
  box-shadow: 0 0 14px rgba(241, 214, 143, 0.58);
}

.nav-icon img {
  filter: drop-shadow(0 4px 7px rgba(0, 0, 0, 0.16));
}

.topbar {
  border-bottom: 1px solid rgba(207, 178, 114, 0.18);
  background:
    linear-gradient(100deg, rgba(4, 29, 27, 0.995), rgba(8, 42, 39, 0.97)),
    url("./assets/generated/platform-bg.png") center 42% / cover;
  box-shadow: 0 10px 30px rgba(4, 31, 25, 0.2);
}

.topbar::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(222, 190, 122, 0.5), transparent);
}

.menu-button,
.bell-button,
.user-button,
.top-select {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.status-kicker {
  border-color: rgba(214, 183, 117, 0.22);
  color: rgba(235, 211, 157, 0.76);
  background: rgba(198, 161, 88, 0.06);
}

.view {
  padding-top: 19px;
}

.page-toolbar {
  min-height: 88px;
  padding: 15px 18px;
  color: #fff;
  border: 1px solid rgba(218, 188, 124, 0.32);
  background:
    linear-gradient(90deg, rgba(3, 29, 24, 0.99) 0%, rgba(5, 50, 41, 0.95) 50%, rgba(4, 42, 35, 0.5) 78%, rgba(3, 31, 26, 0.22) 100%),
    url("./assets/generated/dendrobium-dashboard-hero.png") 74% center / cover;
  background-blend-mode: normal;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 18px 42px rgba(5, 44, 33, 0.17);
}

.page-toolbar::after {
  height: 2px;
  background: linear-gradient(90deg, var(--champagne), rgba(231, 210, 158, 0.34), transparent 78%);
}

.page-toolbar h2 {
  color: #fff;
  font-size: clamp(20px, 1.55vw, 25px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.22);
}

.page-toolbar h2::before {
  display: block;
  margin-bottom: 6px;
  color: #d9bf83;
  font-size: 8.5px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

#dashboardView .page-toolbar h2::before {
  content: "SENSHAN AGRI INTELLIGENCE";
}

#mediumView .page-toolbar h2::before {
  content: "TISSUE CULTURE FORMULATION";
}

#environmentView .page-toolbar h2::before {
  content: "SEEDLING ENVIRONMENT MODEL";
}

#recordsView .page-toolbar h2::before {
  content: "EXPERIMENT OPERATIONS";
}

#migrationCenterView .page-toolbar h2::before {
  content: "MODEL CALIBRATION LOOP";
}

#assistantView .page-toolbar h2::before {
  content: "ENTERPRISE KNOWLEDGE AI";
}

.page-toolbar p,
#recordsView .page-toolbar p {
  color: rgba(239, 247, 243, 0.72);
  font-size: 11.5px;
}

.page-toolbar .toolbar-select > span,
.page-toolbar .stage-tabs > span {
  color: rgba(238, 244, 241, 0.76);
}

.page-toolbar .ghost-button,
.page-toolbar .primary-button,
.page-toolbar .mini-select,
.page-toolbar .stage-tab {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.page-toolbar .ghost-button,
.page-toolbar .stage-tab {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.09);
}

.page-toolbar .ghost-button:hover,
.page-toolbar .stage-tab:hover {
  border-color: rgba(224, 194, 128, 0.42);
  background: rgba(255, 255, 255, 0.15);
}

.page-toolbar .stage-tab.active {
  color: #183328;
  border-color: rgba(241, 218, 163, 0.68);
  background: linear-gradient(180deg, #fff7e5, #e8d29d);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.page-toolbar .primary-button {
  color: #fff;
  background: linear-gradient(180deg, #14a567, #087248);
  box-shadow: 0 10px 24px rgba(1, 20, 14, 0.28);
}

.page-toolbar .mini-select {
  color: #17372b;
  background: rgba(255, 255, 255, 0.93);
}

#dashboardView .page-toolbar {
  min-height: 118px;
  padding: 20px 22px;
  background-position: 72% 49%;
}

#dashboardView .page-toolbar h2 {
  font-size: clamp(25px, 2vw, 31px);
}

#dashboardView .page-toolbar p {
  max-width: 560px;
  margin-top: 8px;
  font-size: 12.5px;
}

.panel {
  border-color: rgba(193, 212, 202, 0.9);
  background: rgba(255, 255, 255, 0.945);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 12px 34px rgba(9, 51, 37, 0.07);
  backdrop-filter: blur(18px);
}

.params-panel,
.result-panel,
.ai-panel {
  position: relative;
  overflow: hidden;
}

.params-panel {
  border-top: 3px solid #0b8552;
  background:
    radial-gradient(circle at 0 0, rgba(207, 232, 219, 0.62), transparent 28%),
    rgba(255, 255, 255, 0.96);
}

.result-panel {
  border-top: 3px solid #1a684c;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 18px 42px rgba(8, 58, 40, 0.09);
}

.ai-panel {
  border-top: 3px solid var(--champagne);
  border-color: rgba(211, 186, 132, 0.65);
  background:
    radial-gradient(circle at 100% 0, rgba(239, 222, 184, 0.46), transparent 34%),
    linear-gradient(145deg, #fffefb, #faf6eb);
}

.panel h3,
.chart-card h3 {
  color: #19362b;
  font-weight: 850;
  letter-spacing: -0.025em;
}

.metric-grid {
  gap: 10px;
}

.metric-card {
  position: relative;
  min-height: 104px;
  padding: 15px;
  overflow: hidden;
  border-color: rgba(196, 214, 205, 0.88);
  border-radius: 13px;
  background:
    radial-gradient(circle at 100% 0, rgba(221, 239, 229, 0.52), transparent 43%),
    linear-gradient(180deg, #fff, #f9fcfa);
  box-shadow: 0 8px 20px rgba(12, 54, 40, 0.045);
}

.metric-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 54px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(13, 124, 79, 0.55));
}

.metric-card p {
  margin-bottom: 10px;
  color: #5d6f67;
  font-size: 12px;
}

.metric-card strong {
  color: #172a22;
  font-size: 30px;
  font-weight: 720;
}

.metric-card.score {
  border-color: rgba(11, 104, 69, 0.7);
  background:
    radial-gradient(circle at 100% 0, rgba(209, 177, 105, 0.25), transparent 42%),
    linear-gradient(145deg, #0a5e42, #07372b);
  box-shadow: 0 14px 30px rgba(4, 54, 37, 0.2);
}

.metric-card.score p,
.metric-card.score strong,
.metric-card.score strong span,
.metric-card.score .metric-quality {
  color: #fff;
}

.metric-card.score .metric-range {
  color: rgba(240, 247, 243, 0.65);
}

.metric-card.risk {
  border-color: rgba(205, 151, 69, 0.42);
  background: linear-gradient(145deg, #fffdf8, #fcf3df);
}

.result-summary {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(12, 129, 79, 0.14);
  border-left: 3px solid #0b8552;
  border-radius: 10px;
  color: #276f50;
  background: linear-gradient(90deg, #e8f6ee, rgba(249, 253, 251, 0.92));
}

.chart-card,
.comparison-panel {
  border-color: rgba(191, 211, 201, 0.9);
  box-shadow:
    inset 0 1px 0 #fff,
    0 16px 38px rgba(11, 52, 39, 0.075);
}

.chart-card::before,
.comparison-panel::before {
  height: 54px;
  background: linear-gradient(180deg, rgba(224, 240, 231, 0.74), transparent);
}

.chart-card .panel-title-row,
.comparison-panel .panel-title-row {
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(204, 219, 212, 0.7);
}

.chart-card .panel-title-row > span,
.comparison-panel .panel-title-row > span {
  padding: 4px 8px;
  border: 1px solid rgba(11, 125, 78, 0.11);
  border-radius: 999px;
  color: #507064;
  background: rgba(238, 247, 242, 0.84);
  font-size: 9.5px;
}

.line-chart,
.heatmap,
.surface-plot,
.cube-plot {
  border-color: rgba(193, 211, 202, 0.88);
  background-color: #fcfdfb;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 0 26px rgba(32, 91, 68, 0.025);
}

.summary-card {
  min-height: 150px;
  padding: 18px;
  border-color: rgba(187, 209, 198, 0.9);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 247, 0.95));
  box-shadow:
    inset 0 1px 0 #fff,
    0 15px 34px rgba(10, 54, 39, 0.08);
}

.summary-card::after {
  content: "";
  position: absolute;
  inset: auto 18px 0;
  height: 2px;
  background: linear-gradient(90deg, var(--champagne), rgba(11, 129, 79, 0.34), transparent);
}

.summary-card img {
  width: 46px;
  height: 46px;
  padding: 7px;
  border: 1px solid rgba(12, 128, 79, 0.12);
  border-radius: 13px;
  background: linear-gradient(145deg, #e7f4ed, #fff);
  box-shadow: 0 8px 18px rgba(9, 77, 51, 0.1);
}

.summary-card p {
  color: #0a7c4d;
  letter-spacing: 0.05em;
}

.experiment-kpi-card {
  min-height: 72px;
  border-color: rgba(188, 209, 198, 0.88);
  background:
    radial-gradient(circle at 100% 0, rgba(207, 231, 219, 0.55), transparent 44%),
    linear-gradient(145deg, #fff, #f6faf8);
  box-shadow:
    inset 0 1px 0 #fff,
    0 12px 28px rgba(12, 54, 40, 0.065);
}

.experiment-kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, rgba(12, 139, 85, 0.65), rgba(202, 170, 104, 0.5), transparent);
}

.kpi-glyph {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
  border-color: rgba(11, 126, 78, 0.18);
  background: linear-gradient(145deg, #e1f2e9, #fff);
}

.experiment-workspace-tabs {
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(184, 207, 196, 0.9);
  border-radius: 14px;
  background: linear-gradient(145deg, #e7f1ec, #f6faf8);
  box-shadow: inset 0 1px 3px rgba(7, 58, 40, 0.05);
}

.experiment-workspace-tab {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: none;
}

.experiment-workspace-tab.active {
  border-color: rgba(221, 194, 134, 0.4);
  background:
    radial-gradient(circle at 100% 0, rgba(213, 180, 109, 0.22), transparent 48%),
    linear-gradient(145deg, #0b744d, #075039);
  box-shadow: 0 10px 24px rgba(6, 70, 46, 0.19);
}

.experiment-list-panel,
.experiment-work-card {
  border-color: rgba(189, 210, 200, 0.9);
  box-shadow:
    inset 0 1px 0 #fff,
    0 14px 34px rgba(12, 53, 40, 0.075);
}

.experiment-list-item.active {
  border-color: rgba(9, 118, 73, 0.62);
  box-shadow:
    inset 0 1px 0 #fff,
    0 15px 30px rgba(7, 91, 57, 0.15);
}

.daily-fieldset,
.record-navigator,
.experiment-chart-card {
  border-color: rgba(195, 214, 205, 0.9);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 249, 0.95));
}

.migration-step-strip {
  padding: 7px;
  border: 1px solid rgba(207, 177, 112, 0.28);
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0, rgba(202, 170, 104, 0.2), transparent 38%),
    linear-gradient(105deg, #073b30, #062820);
  box-shadow: 0 16px 36px rgba(5, 44, 33, 0.18);
}

.migration-step-strip article {
  min-height: 78px;
  padding: 11px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.migration-step-strip strong {
  color: #173328;
  background: linear-gradient(145deg, #ead39f, #b58e45);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.migration-step-strip span {
  color: #fff;
}

.migration-step-strip p {
  color: rgba(229, 240, 234, 0.64);
}

.calibration-version-panel {
  border-color: rgba(190, 211, 201, 0.94);
  background:
    radial-gradient(circle at 100% 0, rgba(207, 177, 111, 0.2), transparent 31%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.99), rgba(239, 248, 243, 0.96));
  box-shadow:
    inset 0 1px 0 #fff,
    0 20px 46px rgba(7, 59, 41, 0.12);
}

.calibration-version-badge {
  border: 1px solid rgba(231, 205, 150, 0.34);
  background:
    radial-gradient(circle at 100% 0, rgba(224, 188, 111, 0.28), transparent 42%),
    linear-gradient(155deg, #0d8d5b, #064631);
  box-shadow: 0 15px 30px rgba(5, 70, 45, 0.22);
}

.calibration-next-grid > article {
  border-color: rgba(186, 209, 198, 0.9);
  box-shadow: 0 10px 24px rgba(10, 53, 39, 0.065);
}

.assistant-panel {
  overflow: hidden;
  border-color: rgba(197, 175, 126, 0.42);
  background:
    radial-gradient(circle at 0 0, rgba(217, 189, 127, 0.16), transparent 34%),
    linear-gradient(150deg, #fffefb, #f4f9f6);
}

.assistant-profile {
  margin: -2px -2px 16px;
  padding: 14px;
  border-radius: 13px;
  background:
    radial-gradient(circle at 100% 0, rgba(215, 181, 105, 0.25), transparent 38%),
    linear-gradient(145deg, #0b6548, #06372c);
  box-shadow: 0 12px 26px rgba(5, 60, 40, 0.17);
}

.assistant-profile p,
.assistant-profile span {
  color: rgba(240, 247, 243, 0.72);
}

.assistant-profile h3 {
  color: #fff;
}

.assistant-avatar {
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.22));
}

.chat-panel {
  border-color: rgba(185, 208, 197, 0.9);
  background:
    linear-gradient(rgba(252, 254, 253, 0.965), rgba(252, 254, 253, 0.965)),
    url("./assets/generated/platform-bg.png") center / cover;
  box-shadow: 0 20px 48px rgba(7, 49, 36, 0.1);
}

.chat-panel::before {
  opacity: 0.028;
}

.composer {
  border-top-color: rgba(192, 211, 202, 0.88);
  background: rgba(248, 252, 250, 0.93);
  backdrop-filter: blur(18px);
}

.composer textarea {
  border-color: rgba(186, 207, 197, 0.95);
  box-shadow: inset 0 1px 3px rgba(10, 51, 38, 0.035);
}

.context-panel {
  border-color: rgba(195, 214, 204, 0.9);
  background: linear-gradient(145deg, #fff, #f5faf7);
}

@media (max-width: 1280px) {
  .page-toolbar {
    min-height: 82px;
    background-position: 79% center;
  }

  #dashboardView .page-toolbar {
    min-height: 108px;
  }

  .metric-card {
    padding: 13px;
  }

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

@media (max-width: 1080px) {
  .page-toolbar {
    background-position: 86% center;
  }

  .page-toolbar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(90deg, rgba(3, 29, 24, 0.18), rgba(3, 29, 24, 0.44));
    pointer-events: none;
  }

  .page-toolbar > * {
    z-index: 1;
  }

  .experiment-kpi-card {
    min-height: 66px;
  }
}

.closed-loop-strip {
  padding: 7px;
  border: 1px solid rgba(211, 180, 115, 0.3);
  background:
    radial-gradient(circle at 100% 0, rgba(204, 173, 106, 0.2), transparent 35%),
    linear-gradient(105deg, #073c30, #06281f);
  box-shadow: 0 16px 36px rgba(5, 44, 33, 0.17);
}

.closed-loop-strip article {
  min-height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.closed-loop-strip article:not(:last-child)::after {
  background: linear-gradient(90deg, rgba(223, 194, 132, 0.42), rgba(223, 194, 132, 0.9));
}

.closed-loop-strip b {
  color: #163228;
  background: linear-gradient(145deg, #edd9aa, #b68e45);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.closed-loop-strip strong {
  color: #fff;
}

.closed-loop-strip span {
  color: rgba(229, 240, 234, 0.64);
}

.chat-log::after {
  content: "森宇知识检索已就绪  ·  请输入参数、SOP、异常或员工答疑问题";
  width: min(430px, calc(100% - 48px));
  margin: clamp(70px, 15vh, 150px) auto 0;
  padding: 13px 16px;
  border: 1px solid rgba(185, 207, 197, 0.72);
  border-radius: 999px;
  color: #678078;
  background: rgba(247, 251, 249, 0.84);
  box-shadow: 0 12px 30px rgba(10, 53, 39, 0.06);
  font-size: 10.5px;
  font-weight: 780;
  text-align: center;
  backdrop-filter: blur(12px);
}

.chat-log:has(.message:nth-child(2))::after {
  display: none;
}

/* Enterprise sign-in */
body.login-page {
  min-width: 1120px;
  min-height: 100svh;
  overflow: auto;
  color: #173129;
  background: #06251e;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.52fr) minmax(440px, 0.78fr);
  min-height: 100svh;
  background: #f6f5ef;
}

.login-visual {
  position: relative;
  isolation: isolate;
  min-height: 720px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(2, 35, 28, 0.42), rgba(3, 41, 31, 0.02)),
    url("./assets/generated/senyu-login-hero-v1.png") center / cover no-repeat;
}

.login-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(3, 26, 22, 0.28), transparent 30%, rgba(2, 25, 20, 0.68)),
    radial-gradient(circle at 74% 42%, transparent 0 22%, rgba(2, 27, 22, 0.16) 58%, rgba(2, 26, 21, 0.54) 100%);
}

.login-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.13;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(90deg, #000, transparent 62%);
}

.login-visual-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(1, 35, 28, 0.34), transparent 50%);
  pointer-events: none;
}

.login-visual-brand {
  position: absolute;
  top: 42px;
  left: 52px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.login-visual-brand img {
  width: 64px;
  height: 64px;
  padding: 8px;
  border: 1px solid rgba(239, 215, 159, 0.65);
  border-radius: 13px;
  object-fit: contain;
  background: linear-gradient(145deg, rgba(255, 253, 244, 0.97), rgba(235, 242, 233, 0.95));
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.login-visual-brand div {
  display: grid;
  gap: 4px;
}

.login-visual-brand strong {
  font-family: "STSong", "Songti SC", serif;
  font-size: 19px;
  letter-spacing: 0.12em;
}

.login-visual-brand span {
  color: rgba(238, 246, 240, 0.66);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.2em;
}

.login-visual-copy {
  position: absolute;
  left: clamp(52px, 6vw, 96px);
  bottom: clamp(112px, 15vh, 170px);
  width: min(620px, 69%);
}

.login-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ead49f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.19em;
}

.login-eyebrow::before {
  content: "";
  width: 38px;
  height: 1px;
  background: linear-gradient(90deg, #d2ae65, #f0ddb1);
}

.login-visual-copy h1 {
  margin: 22px 0 18px;
  font-family: "STSong", "Songti SC", "Noto Serif CJK SC", serif;
  font-size: clamp(44px, 4.4vw, 68px);
  font-weight: 580;
  line-height: 1.22;
  letter-spacing: 0.035em;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
}

.login-visual-copy p {
  width: min(560px, 96%);
  margin: 0;
  color: rgba(239, 246, 241, 0.78);
  font-size: 14px;
  line-height: 1.9;
  letter-spacing: 0.04em;
}

.login-capability-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 30px;
}

.login-capability-row span {
  padding: 8px 13px;
  border: 1px solid rgba(235, 214, 163, 0.26);
  border-radius: 999px;
  color: rgba(248, 244, 228, 0.86);
  background: rgba(8, 53, 41, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 10px;
  font-weight: 740;
  letter-spacing: 0.09em;
  backdrop-filter: blur(10px);
}

.login-visual-foot {
  position: absolute;
  right: 34px;
  bottom: 30px;
  left: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 17px;
  border-top: 1px solid rgba(255, 255, 255, 0.17);
  color: rgba(235, 243, 238, 0.58);
  font-size: 9.5px;
  font-weight: 760;
  letter-spacing: 0.12em;
}

.login-visual-foot span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(246, 241, 220, 0.8);
}

.login-visual-foot i,
.login-secure-status i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #62d78d;
  box-shadow: 0 0 0 4px rgba(98, 215, 141, 0.12);
}

.login-auth {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 720px;
  padding: 46px clamp(44px, 4vw, 72px);
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 8%, rgba(207, 181, 118, 0.16), transparent 26%),
    linear-gradient(145deg, #fbfaf6 0%, #f4f4ee 100%);
}

.login-auth::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: rgba(211, 186, 130, 0.56);
  box-shadow: -14px 0 34px rgba(0, 32, 24, 0.16);
}

.login-auth-glow {
  position: absolute;
  top: -120px;
  right: -120px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: 1px solid rgba(191, 160, 94, 0.16);
  box-shadow:
    0 0 0 44px rgba(191, 160, 94, 0.04),
    0 0 0 88px rgba(191, 160, 94, 0.025);
  pointer-events: none;
}

.login-panel {
  position: relative;
  width: min(420px, 100%);
  animation: login-panel-in 600ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.login-panel-head {
  position: relative;
  margin-bottom: 30px;
}

.login-panel-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.login-panel-brand img {
  width: 54px;
  height: 54px;
  padding: 7px;
  border: 1px solid rgba(183, 150, 80, 0.36);
  border-radius: 11px;
  object-fit: contain;
  background: linear-gradient(145deg, #fffef8, #eef4ed);
  box-shadow: 0 9px 22px rgba(28, 71, 53, 0.1);
}

.login-panel-brand div {
  display: grid;
  gap: 4px;
}

.login-panel-brand strong {
  color: #173d30;
  font-family: "STSong", "Songti SC", serif;
  font-size: 18px;
  letter-spacing: 0.12em;
}

.login-panel-brand span {
  color: #a38548;
  font-size: 8px;
  font-weight: 820;
  letter-spacing: 0.16em;
}

.login-secure-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  padding: 7px 11px;
  border: 1px solid rgba(9, 113, 70, 0.14);
  border-radius: 999px;
  color: #39705a;
  background: rgba(230, 243, 236, 0.76);
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0.06em;
}

.login-kicker {
  margin: 0 0 12px !important;
  color: #ae8d4a !important;
  font-size: 9px !important;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.login-panel-head h2 {
  margin: 0;
  color: #14342a;
  font-family: "STSong", "Songti SC", "Noto Serif CJK SC", serif;
  font-size: 36px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.login-panel-head > p:last-child {
  margin: 10px 0 0;
  color: #71817a;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.login-form {
  display: grid;
  gap: 20px;
}

.login-field {
  display: grid;
  gap: 9px;
}

.login-field > span {
  color: #314b41;
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.05em;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-wrap input {
  width: 100%;
  height: 52px;
  padding: 0 58px 0 48px;
  border: 1px solid #d8ded9;
  border-radius: 10px;
  outline: none;
  color: #183a2e;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 20px rgba(23, 56, 44, 0.035);
  font-size: 13px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.login-input-wrap input::placeholder {
  color: #a4aea9;
}

.login-input-wrap input:focus {
  border-color: rgba(7, 128, 75, 0.62);
  background: #fff;
  box-shadow:
    0 0 0 4px rgba(7, 128, 75, 0.08),
    0 12px 26px rgba(23, 56, 44, 0.06);
}

.login-input-icon {
  position: absolute;
  left: 14px;
  z-index: 1;
  width: 24px;
  height: 24px;
  object-fit: contain;
  opacity: 0.9;
  filter: drop-shadow(0 2px 3px rgba(30, 70, 53, 0.08));
}

.password-toggle {
  position: absolute;
  right: 9px;
  z-index: 1;
  min-width: 45px;
  height: 34px;
  border-radius: 7px;
  color: #678177;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 760;
}

.password-toggle:hover {
  color: #087747;
  background: #edf6f1;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -3px;
  color: #87938e;
  font-size: 10px;
}

.remember-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #587067;
  cursor: pointer;
}

.remember-control input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #087b49;
}

.login-error {
  display: none;
  min-height: 0;
  margin: -4px 0 -2px;
  padding: 9px 11px;
  border: 1px solid rgba(193, 63, 55, 0.18);
  border-radius: 8px;
  color: #ac3e38;
  background: #fff1ef;
  font-size: 11px;
  line-height: 1.5;
}

.login-error.visible {
  display: block;
}

.login-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 54px;
  margin-top: 2px;
  padding: 0 18px 0 22px;
  border: 1px solid rgba(227, 200, 139, 0.2);
  border-radius: 10px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 0, rgba(80, 191, 127, 0.2), transparent 34%),
    linear-gradient(115deg, #07583e, #087a49);
  box-shadow:
    0 16px 28px rgba(5, 90, 57, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  cursor: pointer;
  font-size: 13px;
  font-weight: 820;
  letter-spacing: 0.08em;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.login-submit i {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  color: #143e2e;
  background: linear-gradient(145deg, #f1dfb6, #c8a75f);
  font-family: sans-serif;
  font-size: 16px;
  font-style: normal;
}

.login-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow:
    0 20px 34px rgba(5, 90, 57, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.76;
}

.login-submit.busy i {
  color: transparent;
  border: 2px solid rgba(19, 62, 46, 0.22);
  border-top-color: #174936;
  background: rgba(236, 220, 179, 0.9);
  animation: login-spin 700ms linear infinite;
}

.login-culture-card {
  position: relative;
  overflow: hidden;
  margin-top: 28px;
  padding: 17px 18px 15px;
  border: 1px solid rgba(184, 155, 93, 0.25);
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 0, rgba(209, 183, 121, 0.18), transparent 36%),
    linear-gradient(135deg, rgba(250, 248, 239, 0.96), rgba(239, 245, 239, 0.78));
  box-shadow: inset 3px 0 0 #b99956;
}

.login-culture-card > div,
.login-culture-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.login-culture-card span {
  color: #9b7c3e;
  font-size: 8.5px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.login-culture-card strong {
  color: #1d503b;
  font-family: "STSong", "Songti SC", serif;
  font-size: 15px;
  letter-spacing: 0.06em;
}

.login-culture-card p {
  margin: 10px 0 12px;
  color: #64776e;
  font-size: 10px;
  line-height: 1.65;
  letter-spacing: 0.035em;
}

.login-culture-card footer {
  padding-top: 11px;
  border-top: 1px solid rgba(147, 162, 153, 0.22);
}

.login-culture-card b {
  color: #315f4d;
  font-size: 9.5px;
  letter-spacing: 0.08em;
}

@keyframes login-panel-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes login-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1280px) {
  body.login-page {
    min-width: 960px;
  }

  .login-shell {
    grid-template-columns: minmax(0, 1.15fr) minmax(430px, 0.85fr);
  }

  .login-visual-copy {
    width: min(560px, 80%);
  }

  .login-visual-copy h1 {
    font-size: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-panel,
  .login-submit.busy i {
    animation: none;
  }
}

/* Authenticated account menu */
.user-menu-shell {
  position: relative;
  flex: 0 0 auto;
}

.user-menu-shell .user-button {
  min-width: 122px;
  padding: 0 13px;
  text-align: left;
}

.user-menu-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 120;
  width: 224px;
  padding: 10px;
  border: 1px solid rgba(181, 198, 190, 0.7);
  border-radius: 12px;
  color: #1b352c;
  background: rgba(252, 253, 250, 0.98);
  box-shadow: 0 22px 48px rgba(5, 34, 26, 0.2);
  backdrop-filter: blur(16px);
}

.user-menu-popover[hidden] {
  display: none;
}

.user-menu-identity {
  display: grid;
  gap: 3px;
  padding: 9px 10px 11px;
  border-bottom: 1px solid #e2e8e4;
}

.user-menu-identity strong {
  color: #173a2d;
  font-size: 12px;
}

.user-menu-identity span {
  color: #819089;
  font-size: 9px;
}

.logout-button {
  width: 100%;
  height: 36px;
  margin-top: 8px;
  border-radius: 8px;
  color: #8f3d36;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 760;
  text-align: left;
  padding: 0 10px;
}

.logout-button:hover {
  background: #fff0ee;
}
