/* 季中 / 季末估产工作台：沿用监测模块规范，只随作物切换主题色。 */
#yieldEstimationPanel {
  --yield-accent: #16a34a;
  --yield-accent-soft: color-mix(in srgb, var(--yield-accent) 9%, white);
  --yield-border: #e2e8f0;
  --yield-ink: #0f172a;
  --yield-muted: #64748b;
}

#yieldEstimationPanel .monitoring-panel-body {
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--yield-accent) 7%, transparent), transparent 260px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent 180px);
}

#yieldEstimationPanel .section-header {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 64px;
  border-bottom: 1px solid #eef2f7;
  color: var(--yield-ink);
  background: linear-gradient(180deg, #fff, #fbfdff);
  font-size: var(--ui-label-size, 14px);
  font-weight: 760;
}

#yieldEstimationPanel .section-header > i {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: var(--yield-accent) !important;
  background: var(--yield-accent-soft);
  font-size: 13px;
}

#yieldEstimationPanel .yield-section-meta {
  margin-left: auto;
  padding: 4px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #64748b;
  background: #f8fafc;
  font-size: var(--ui-note-size, 13px);
  font-style: normal;
  font-weight: 650;
  letter-spacing: 0;
}

/* 首页概览 */
#yieldEstimationPanel .yield-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 18px;
}

#yieldEstimationPanel .yield-overview-item {
  min-width: 0;
  min-height: 70px;
  padding: 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.045);
}

#yieldEstimationPanel .yield-overview-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: var(--yield-accent);
  background: var(--yield-accent-soft);
  font-size: 13px;
}

#yieldEstimationPanel .yield-overview-item > div {
  min-width: 0;
}

#yieldEstimationPanel .yield-overview-item small,
#yieldEstimationPanel .yield-overview-item strong {
  display: block;
}

#yieldEstimationPanel .yield-overview-item small {
  overflow: hidden;
  color: var(--ui-muted, #59697a);
  font-size: var(--ui-note-size, 13px);
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#yieldEstimationPanel .yield-overview-item strong {
  margin-top: 3px;
  color: #1e293b;
  font-size: var(--ui-body-size, 15px);
  line-height: 1.2;
  font-weight: 760;
}

#yieldEstimationPanel .yield-overview-item strong em {
  color: var(--ui-muted, #59697a);
  font-size: var(--ui-note-size, 13px);
  font-style: normal;
  font-weight: 600;
}

#yieldEstimationPanel .yield-overview-item.is-warning .yield-overview-icon {
  color: #b45309;
  background: #fef3c7;
}

#yieldEstimationPanel .yield-overview-item.is-ready .yield-overview-icon {
  color: #15803d;
  background: #dcfce7;
}

/* 模式选择 */
#yieldEstimationPanel .yield-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#yieldEstimationPanel .yield-mode-card {
  position: relative;
  min-height: 236px;
  padding: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border: 1px solid #dbe3ed;
  border-radius: 14px;
  color: #334155;
  background: linear-gradient(155deg, #fff 0%, #fbfdff 72%, var(--yield-accent-soft) 145%);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.045);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

#yieldEstimationPanel .yield-mode-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--mw-crop-gradient);
  opacity: 0;
  transform: scaleX(0.55);
  transition: opacity 180ms ease, transform 220ms ease;
}

#yieldEstimationPanel .yield-mode-card:hover,
#yieldEstimationPanel .yield-mode-card:focus-visible {
  border-color: color-mix(in srgb, var(--yield-accent) 60%, #dbe3ed);
  outline: none;
  box-shadow: 0 14px 28px color-mix(in srgb, var(--yield-accent) 13%, rgba(15, 23, 42, 0.08));
  transform: translateY(-2px);
}

#yieldEstimationPanel .yield-mode-card:hover::before,
#yieldEstimationPanel .yield-mode-card:focus-visible::before {
  opacity: 1;
  transform: scaleX(1);
}

#yieldEstimationPanel .yield-mode-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

#yieldEstimationPanel .yield-mode-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  color: var(--yield-accent);
  background: var(--yield-accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--yield-accent) 9%, transparent);
  font-size: 17px;
}

#yieldEstimationPanel .yield-mode-number {
  color: #d7dee8;
  font-size: 25px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.06em;
}

#yieldEstimationPanel .yield-mode-title {
  margin-top: 13px;
  color: var(--yield-ink);
  font-size: var(--ui-body-size, 16px);
  line-height: 1.3;
  font-weight: 780;
}

#yieldEstimationPanel .yield-mode-description {
  margin-top: 6px;
  flex: 1;
  color: #64748b;
  font-size: var(--ui-note-size, 13px);
  line-height: 1.6;
}

#yieldEstimationPanel .yield-mode-meta {
  margin: 12px 0 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px 9px;
  color: #708096;
  font-size: var(--ui-note-size, 13px);
}

#yieldEstimationPanel .yield-mode-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

#yieldEstimationPanel .yield-mode-meta i {
  color: color-mix(in srgb, var(--yield-accent) 78%, #64748b);
}

#yieldEstimationPanel .yield-status-badge,
#yieldEstimationPanel .yield-inline-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  border-radius: 999px;
  font-weight: 700;
}

#yieldEstimationPanel .yield-status-badge {
  padding: 5px 8px;
  border: 1px solid #fde68a;
  color: #92400e;
  background: #fffbeb;
  font-size: var(--ui-note-size, 13px);
}

#yieldEstimationPanel .yield-status-badge.is-ready {
  border-color: #bbf7d0;
  color: #166534;
  background: #f0fdf4;
}

#yieldEstimationPanel .yield-history-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 13px;
  border: 1px solid #dbe3ed;
  border-radius: 12px;
  color: #334155;
  background: linear-gradient(135deg, #fff, #f8fafc);
  cursor: pointer;
  text-align: left;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

#yieldEstimationPanel .yield-history-card:hover,
#yieldEstimationPanel .yield-history-card:focus-visible {
  border-color: color-mix(in srgb, var(--yield-accent) 45%, #dbe3ed);
  outline: none;
  box-shadow: 0 9px 20px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

#yieldEstimationPanel .yield-history-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  color: var(--yield-accent);
  background: var(--yield-accent-soft);
  font-size: 17px;
}

#yieldEstimationPanel .yield-history-copy {
  min-width: 0;
}

#yieldEstimationPanel .yield-history-copy strong,
#yieldEstimationPanel .yield-history-copy small {
  display: block;
}

#yieldEstimationPanel .yield-history-copy strong {
  overflow: hidden;
  color: #1e293b;
  font-size: var(--ui-note-size, 13px);
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#yieldEstimationPanel .yield-history-copy small {
  margin-top: 4px;
  color: var(--ui-muted, #59697a);
  font-size: var(--ui-note-size, 13px);
  line-height: 1.45;
}

#yieldEstimationPanel .yield-history-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--yield-accent);
  font-size: var(--ui-note-size, 13px);
  font-weight: 750;
}

#yieldEstimationPanel .yield-history-action i {
  font-size: var(--ui-note-size, 13px);
  transition: transform 180ms ease;
}

#yieldEstimationPanel .yield-history-card:hover .yield-history-action i {
  transform: translateX(2px);
}

#yieldEstimationPanel .yield-history-card:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* 配置页 */
#yieldEstimationPanel .yield-context-banner,
#yieldEstimationPanel .yield-readiness-summary,
#yieldEstimationPanel .yield-task-result {
  position: relative;
  margin-bottom: 18px;
  padding: 15px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--yield-accent) 18%, #e2e8f0);
  border-radius: 14px;
  background: linear-gradient(135deg, #fff, var(--yield-accent-soft));
  box-shadow: 0 7px 20px rgba(15, 23, 42, 0.055);
}

#yieldEstimationPanel .yield-context-icon,
#yieldEstimationPanel .yield-readiness-summary-icon,
#yieldEstimationPanel .yield-task-result-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  color: #fff;
  background: var(--mw-crop-gradient);
  box-shadow: 0 7px 14px color-mix(in srgb, var(--yield-accent) 20%, transparent);
}

#yieldEstimationPanel .yield-context-banner small,
#yieldEstimationPanel .yield-context-banner strong,
#yieldEstimationPanel .yield-context-banner p,
#yieldEstimationPanel .yield-readiness-summary small,
#yieldEstimationPanel .yield-readiness-summary strong,
#yieldEstimationPanel .yield-readiness-summary p,
#yieldEstimationPanel .yield-task-result small,
#yieldEstimationPanel .yield-task-result strong,
#yieldEstimationPanel .yield-task-result p {
  display: block;
  margin: 0;
}

#yieldEstimationPanel .yield-context-banner small,
#yieldEstimationPanel .yield-readiness-summary small,
#yieldEstimationPanel .yield-task-result small {
  color: var(--ui-muted, #59697a);
  font-size: var(--ui-note-size, 13px);
  font-weight: 650;
}

#yieldEstimationPanel .yield-context-banner strong,
#yieldEstimationPanel .yield-readiness-summary strong,
#yieldEstimationPanel .yield-task-result strong {
  margin-top: 2px;
  color: var(--yield-ink);
  font-size: var(--ui-label-size, 14px);
  line-height: 1.35;
  font-weight: 770;
}

#yieldEstimationPanel .yield-context-banner p,
#yieldEstimationPanel .yield-readiness-summary p,
#yieldEstimationPanel .yield-task-result p {
  margin-top: 4px;
  color: #64748b;
  font-size: var(--ui-note-size, 13px);
  line-height: 1.5;
}

#yieldEstimationPanel .yield-context-tag,
#yieldEstimationPanel .yield-readiness-summary-tag {
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--yield-accent) 18%, transparent);
  border-radius: 999px;
  color: var(--yield-accent);
  background: rgba(255, 255, 255, 0.82);
  font-size: var(--ui-note-size, 13px);
  font-weight: 760;
}

#yieldEstimationPanel .yield-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 14px;
}

#yieldEstimationPanel .yield-form-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

#yieldEstimationPanel .yield-form-field.is-wide,
#yieldEstimationPanel .yield-form-divider,
#yieldEstimationPanel .yield-date-fields,
#yieldEstimationPanel .yield-mask-fields {
  grid-column: 1 / -1;
}

#yieldEstimationPanel .yield-date-fields,
#yieldEstimationPanel .yield-mask-fields {
  min-width: 0;
  display: grid;
  align-items: start;
}

#yieldEstimationPanel .yield-date-fields {
  grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr);
  gap: 8px;
}

#yieldEstimationPanel .yield-mask-fields {
  grid-template-columns: minmax(0, 2fr) minmax(138px, 1fr);
  gap: 14px;
}

#yieldEstimationPanel .yield-date-connector {
  width: 26px;
  height: 44px;
  margin-top: 23px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a3afbf;
  font-size: var(--ui-note-size, 13px);
}

#yieldEstimationPanel .yield-form-field label {
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #3f4d61;
  font-size: var(--ui-note-size, 13px);
  line-height: 1.4;
  font-weight: 720;
}

#yieldEstimationPanel .yield-form-field label b {
  color: #dc2626;
  font-size: var(--ui-note-size, 13px);
}

#yieldEstimationPanel .yield-form-field label em {
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-size: var(--ui-note-size, 13px);
  font-style: normal;
  font-weight: 700;
}

#yieldEstimationPanel .yield-form-field > small {
  margin-top: 5px;
  display: block;
  color: #8a97a9;
  font-size: var(--ui-note-size, 13px);
  line-height: 1.45;
}

#yieldEstimationPanel .yield-form-field input,
#yieldEstimationPanel .yield-form-field select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 11px;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  color: #1e293b;
  background: #fff;
  font-size: var(--ui-note-size, 13px);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.025);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

#yieldEstimationPanel .yield-form-field select {
  padding-right: 36px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 15px;
  cursor: pointer;
}

#yieldEstimationPanel .yield-form-field input:hover,
#yieldEstimationPanel .yield-form-field select:hover {
  border-color: #aebdce;
}

#yieldEstimationPanel .yield-form-field input:focus,
#yieldEstimationPanel .yield-form-field select:focus {
  border-color: var(--yield-accent);
  outline: 3px solid color-mix(in srgb, var(--yield-accent) 11%, transparent);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--yield-accent) 7%, transparent);
}

#yieldEstimationPanel .yield-form-field input.is-readonly,
#yieldEstimationPanel .yield-form-field input:disabled {
  color: #64748b;
  border-color: #e2e8f0;
  background: #f6f8fb;
  cursor: not-allowed;
}

#yieldEstimationPanel .yield-form-divider {
  margin-top: 4px;
  padding: 12px 0 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px dashed #dce4ee;
}

#yieldEstimationPanel .yield-form-divider span {
  color: #334155;
  font-size: var(--ui-note-size, 13px);
  font-weight: 750;
}

#yieldEstimationPanel .yield-form-divider span i {
  margin-right: 5px;
  color: var(--yield-accent);
}

#yieldEstimationPanel .yield-form-divider small {
  color: var(--ui-muted, #59697a);
  font-size: var(--ui-note-size, 13px);
}

#yieldEstimationPanel .yield-cutoff-notice,
#yieldEstimationPanel .yield-reference-note,
#yieldEstimationPanel .yield-result-notice {
  margin-top: 13px;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: var(--ui-note-size, 13px);
  line-height: 1.5;
}

#yieldEstimationPanel .yield-cutoff-notice {
  color: #78350f;
  border-color: #fde7ae;
  background: #fffbeb;
}

#yieldEstimationPanel .yield-reference-note {
  color: #475569;
  border-color: #e2e8f0;
  background: #f8fafc;
}

#yieldEstimationPanel .yield-result-notice.is-ready {
  color: #166534;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

#yieldEstimationPanel .yield-result-notice.is-blocked {
  color: #991b1b;
  border-color: #fecaca;
  background: #fef2f2;
}

#yieldEstimationPanel .yield-cutoff-notice > span,
#yieldEstimationPanel .yield-reference-note > span,
#yieldEstimationPanel .yield-result-notice > span {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

#yieldEstimationPanel .yield-cutoff-notice strong,
#yieldEstimationPanel .yield-reference-note strong,
#yieldEstimationPanel .yield-result-notice strong {
  display: block;
  font-size: var(--ui-note-size, 13px);
}

#yieldEstimationPanel .yield-cutoff-notice p,
#yieldEstimationPanel .yield-reference-note p,
#yieldEstimationPanel .yield-result-notice p {
  margin: 2px 0 0;
  color: currentColor;
  opacity: 0.85;
}

/* 就绪检查 */
#yieldEstimationPanel .yield-readiness-summary.is-ready {
  border-color: #bbf7d0;
  background: linear-gradient(135deg, #fff, #f0fdf4);
}

#yieldEstimationPanel .yield-readiness-summary.is-ready .yield-readiness-summary-icon {
  background: linear-gradient(135deg, #16a34a, #15803d);
}

#yieldEstimationPanel .yield-readiness-summary.is-ready .yield-readiness-summary-tag {
  color: #166534;
  border-color: #bbf7d0;
}

#yieldEstimationPanel .yield-readiness-summary.is-blocked {
  border-color: #fecaca;
  background: linear-gradient(135deg, #fff, #fef2f2);
}

#yieldEstimationPanel .yield-readiness-summary.is-blocked .yield-readiness-summary-icon {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 7px 14px rgba(239, 68, 68, 0.18);
}

#yieldEstimationPanel .yield-readiness-summary.is-blocked .yield-readiness-summary-tag {
  color: #b91c1c;
  border-color: #fecaca;
}

#yieldEstimationPanel .yield-readiness-list,
#yieldEstimationPanel .yield-task-list {
  display: grid;
  gap: 9px;
}

#yieldEstimationPanel .yield-readiness-item,
#yieldEstimationPanel .yield-task-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

#yieldEstimationPanel .yield-readiness-item {
  border-left-width: 3px;
}

#yieldEstimationPanel .yield-readiness-item.is-ready { border-left-color: #22c55e; }
#yieldEstimationPanel .yield-readiness-item.is-missing { border-left-color: #ef4444; }
#yieldEstimationPanel .yield-readiness-item.is-warning { border-left-color: #f59e0b; }

#yieldEstimationPanel .yield-readiness-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #64748b;
  background: #e2e8f0;
  font-size: var(--ui-note-size, 13px);
}

#yieldEstimationPanel .yield-readiness-item.is-ready .yield-readiness-icon,
#yieldEstimationPanel .yield-task-item.is-ready .yield-readiness-icon,
#yieldEstimationPanel .yield-task-item.is-completed .yield-readiness-icon {
  color: #166534;
  background: #dcfce7;
}

#yieldEstimationPanel .yield-readiness-item.is-missing .yield-readiness-icon,
#yieldEstimationPanel .yield-task-item.is-blocked .yield-readiness-icon {
  color: #991b1b;
  background: #fee2e2;
}

#yieldEstimationPanel .yield-readiness-item.is-warning .yield-readiness-icon,
#yieldEstimationPanel .yield-task-item.is-running .yield-readiness-icon {
  color: #92400e;
  background: #fef3c7;
}

#yieldEstimationPanel .yield-item-title {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: #1e293b;
  font-size: var(--ui-note-size, 13px);
  font-weight: 750;
}

#yieldEstimationPanel .yield-item-detail {
  margin-top: 3px;
  color: #748196;
  font-size: var(--ui-note-size, 13px);
  line-height: 1.45;
}

#yieldEstimationPanel .yield-item-value {
  color: #56657a;
  font-size: var(--ui-note-size, 13px);
  font-weight: 700;
  text-align: right;
}

#yieldEstimationPanel .yield-check-metric {
  min-width: 72px;
  max-width: 128px;
  text-align: right;
}

#yieldEstimationPanel .yield-check-metric small,
#yieldEstimationPanel .yield-check-metric strong {
  display: block;
}

#yieldEstimationPanel .yield-check-metric small {
  color: var(--ui-muted, #59697a);
  font-size: var(--ui-note-size, 13px);
  font-weight: 700;
}

#yieldEstimationPanel .yield-check-metric strong {
  margin-top: 2px;
  overflow-wrap: anywhere;
  color: #334155;
  font-size: var(--ui-note-size, 13px);
  font-weight: 760;
}

#yieldEstimationPanel .yield-check-metric strong em {
  color: var(--ui-muted, #59697a);
  font-size: var(--ui-note-size, 13px);
  font-style: normal;
  font-weight: 600;
}

/* 任务列表与结果 */
#yieldEstimationPanel .yield-task-item {
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

#yieldEstimationPanel .yield-task-item:hover,
#yieldEstimationPanel .yield-task-item:focus-visible {
  border-color: color-mix(in srgb, var(--yield-accent) 45%, #e2e8f0);
  outline: none;
  background: #fff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

#yieldEstimationPanel .yield-inline-status {
  padding: 2px 6px;
  color: #64748b;
  background: #e2e8f0;
  font-size: var(--ui-note-size, 13px);
}

#yieldEstimationPanel .yield-inline-status.is-ready,
#yieldEstimationPanel .yield-inline-status.is-completed {
  color: #166534;
  background: #dcfce7;
}

#yieldEstimationPanel .yield-inline-status.is-blocked {
  color: #991b1b;
  background: #fee2e2;
}

#yieldEstimationPanel .yield-inline-status.is-running {
  color: #92400e;
  background: #fef3c7;
}

#yieldEstimationPanel .yield-task-summary {
  display: flex;
  align-items: center;
  gap: 7px;
}

#yieldEstimationPanel .yield-task-arrow {
  color: #b4bfcd;
  font-size: var(--ui-note-size, 13px);
}

#yieldEstimationPanel .yield-task-cancel {
  width: 27px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fecaca;
  border-radius: 7px;
  color: #b91c1c;
  background: #fff;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

#yieldEstimationPanel .yield-task-cancel:hover,
#yieldEstimationPanel .yield-task-cancel:focus-visible {
  color: #fff;
  outline: none;
  background: #dc2626;
  transform: scale(1.04);
}

#yieldEstimationPanel .yield-task-result.is-ready {
  border-color: #bbf7d0;
  background: linear-gradient(135deg, #fff, #f0fdf4);
}

#yieldEstimationPanel .yield-task-result.is-ready .yield-task-result-icon {
  background: linear-gradient(135deg, #16a34a, #15803d);
}

#yieldEstimationPanel .yield-task-result.is-blocked {
  border-color: #fecaca;
  background: linear-gradient(135deg, #fff, #fef2f2);
}

#yieldEstimationPanel .yield-task-result.is-blocked .yield-task-result-icon {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

#yieldEstimationPanel .yield-task-result.is-cancelled {
  border-color: #dbe3ed;
  background: linear-gradient(135deg, #fff, #f8fafc);
}

#yieldEstimationPanel .yield-task-result.is-cancelled .yield-task-result-icon {
  background: linear-gradient(135deg, #64748b, #475569);
}

#yieldEstimationPanel .yield-missing-group {
  margin: 14px 0;
  padding: 11px 12px;
  border: 1px dashed #fecaca;
  border-radius: 10px;
  background: #fffafa;
}

#yieldEstimationPanel .yield-missing-group > small {
  display: block;
  margin-bottom: 7px;
  color: #991b1b;
  font-size: var(--ui-note-size, 13px);
  font-weight: 750;
}

#yieldEstimationPanel .yield-missing-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#yieldEstimationPanel .yield-missing-group span {
  padding: 4px 7px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 7px;
  color: #9f1239;
  background: #fff1f2;
  font-size: var(--ui-note-size, 13px);
  font-weight: 650;
}

#yieldEstimationPanel .yield-missing-group i {
  font-size: 4px;
}

#yieldEstimationPanel .yield-task-details {
  margin: 14px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#yieldEstimationPanel .yield-task-details > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e7edf4;
  border-radius: 9px;
  background: #f8fafc;
}

#yieldEstimationPanel .yield-task-details > div.is-wide {
  grid-column: 1 / -1;
}

#yieldEstimationPanel .yield-task-details dt {
  color: #8491a3;
  font-size: var(--ui-note-size, 13px);
  font-weight: 650;
}

#yieldEstimationPanel .yield-task-details dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  color: #243247;
  font-size: var(--ui-note-size, 13px);
  line-height: 1.4;
  font-weight: 680;
}

#yieldEstimationPanel .yield-empty-state,
#yieldEstimationPanel .yield-page-state {
  min-height: 164px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  text-align: center;
}

#yieldEstimationPanel .yield-empty-state.is-compact {
  min-height: 126px;
}

#yieldEstimationPanel .yield-empty-state > span,
#yieldEstimationPanel .yield-page-state > span {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--yield-accent);
  background: var(--yield-accent-soft);
  font-size: var(--ui-body-size, 16px);
}

#yieldEstimationPanel .yield-empty-state strong,
#yieldEstimationPanel .yield-page-state strong {
  margin-top: 10px;
  color: #334155;
  font-size: var(--ui-note-size, 13px);
  font-weight: 750;
}

#yieldEstimationPanel .yield-empty-state small,
#yieldEstimationPanel .yield-page-state small {
  max-width: 360px;
  margin-top: 4px;
  color: #8491a3;
  font-size: var(--ui-note-size, 13px);
  line-height: 1.55;
}

#yieldEstimationPanel .yield-page-state {
  min-height: 260px;
  border: 1px dashed #dbe3ed;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

#yieldEstimationPanel .yield-page-state.is-warning > span {
  color: #b45309;
  background: #fef3c7;
}

#yieldEstimationPanel .yield-page-state.is-error > span {
  color: #b91c1c;
  background: #fee2e2;
}

/* 底部操作区 */
#yieldEstimationPanel .yield-panel-actions {
  position: sticky;
  z-index: 3;
  bottom: -22px;
  margin: 20px -22px -22px;
  padding: 14px 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(10px);
}

#yieldEstimationPanel .yield-panel-actions [data-yield-home],
#yieldEstimationPanel .yield-panel-actions [data-yield-back] {
  margin-right: auto;
}

#yieldEstimationPanel .yield-btn {
  min-height: 40px;
  padding: 9px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  color: #475569;
  background: #fff;
  cursor: pointer;
  font-size: var(--ui-note-size, 13px);
  font-weight: 720;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.035);
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

#yieldEstimationPanel .yield-btn:hover,
#yieldEstimationPanel .yield-btn:focus-visible {
  border-color: color-mix(in srgb, var(--yield-accent) 45%, #cbd5e1);
  color: var(--yield-accent);
  outline: none;
  box-shadow: 0 7px 14px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

#yieldEstimationPanel .yield-btn.is-primary {
  border-color: transparent;
  color: #fff;
  background: var(--mw-crop-gradient);
  box-shadow: 0 7px 14px color-mix(in srgb, var(--yield-accent) 20%, transparent);
}

#yieldEstimationPanel .yield-btn.is-primary:hover,
#yieldEstimationPanel .yield-btn.is-primary:focus-visible {
  color: #fff;
  box-shadow: 0 9px 18px color-mix(in srgb, var(--yield-accent) 28%, transparent);
}

#yieldEstimationPanel .yield-btn.is-danger {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fff;
}

#yieldEstimationPanel .yield-btn.is-danger:hover,
#yieldEstimationPanel .yield-btn.is-danger:focus-visible {
  color: #fff;
  border-color: #dc2626;
  background: #dc2626;
}

#yieldEstimationPanel .yield-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

#yieldEstimationPanel .yield-overview-grid,
#yieldEstimationPanel .yield-context-banner,
#yieldEstimationPanel .yield-readiness-summary,
#yieldEstimationPanel .monitoring-section-card {
  animation: yield-rise 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

#yieldEstimationPanel .monitoring-section-card:nth-of-type(2) { animation-delay: 35ms; }
#yieldEstimationPanel .monitoring-section-card:nth-of-type(3) { animation-delay: 70ms; }

@keyframes yield-rise {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  #yieldEstimationPanel .yield-mode-grid,
  #yieldEstimationPanel .yield-form-grid {
    grid-template-columns: 1fr;
  }

  #yieldEstimationPanel .yield-form-field.is-wide,
  #yieldEstimationPanel .yield-form-divider,
  #yieldEstimationPanel .yield-date-fields,
  #yieldEstimationPanel .yield-mask-fields {
    grid-column: auto;
  }

  #yieldEstimationPanel .yield-date-fields,
  #yieldEstimationPanel .yield-mask-fields {
    grid-template-columns: 1fr;
  }

  #yieldEstimationPanel .yield-date-connector {
    display: none;
  }

  #yieldEstimationPanel .yield-mode-card {
    min-height: 210px;
  }

  #yieldEstimationPanel .yield-panel-actions {
    bottom: -14px;
    margin: 18px -14px -14px;
    padding: 12px 14px;
  }

  #yieldEstimationPanel .yield-readiness-item {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  #yieldEstimationPanel .yield-check-metric {
    grid-column: 2;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    text-align: left;
  }
}

@media (max-width: 520px) {
  #yieldEstimationPanel .yield-overview-grid {
    grid-template-columns: 1fr;
  }

  #yieldEstimationPanel .yield-overview-item {
    min-height: 58px;
  }

  #yieldEstimationPanel .yield-history-card,
  #yieldEstimationPanel .yield-context-banner,
  #yieldEstimationPanel .yield-readiness-summary,
  #yieldEstimationPanel .yield-task-result {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  #yieldEstimationPanel .yield-history-action,
  #yieldEstimationPanel .yield-context-tag,
  #yieldEstimationPanel .yield-readiness-summary-tag {
    grid-column: 2;
    justify-self: start;
  }

  #yieldEstimationPanel .yield-task-item {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  #yieldEstimationPanel .yield-task-summary {
    grid-column: 2;
    justify-content: space-between;
  }

  #yieldEstimationPanel .yield-task-details {
    grid-template-columns: 1fr;
  }

  #yieldEstimationPanel .yield-task-details > div.is-wide {
    grid-column: auto;
  }

  #yieldEstimationPanel .yield-panel-actions .yield-btn {
    flex: 1 1 calc(50% - 5px);
  }

  #yieldEstimationPanel .yield-panel-actions [data-yield-home],
  #yieldEstimationPanel .yield-panel-actions [data-yield-back] {
    margin-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #yieldEstimationPanel .yield-overview-grid,
  #yieldEstimationPanel .yield-context-banner,
  #yieldEstimationPanel .yield-readiness-summary,
  #yieldEstimationPanel .monitoring-section-card {
    animation: none;
  }
}
