/**
 * analysis-page.css — 智能分析页面样式
 * 比赛展示级 · 冷灰白基调 · 克制专业
 * 所有样式限定在 #page-analysis 内
 * ============================================================================
 */

/* ==========================================================================
   Layout
   ========================================================================== */

#page-analysis {
  background: var(--bg-page);
}

#page-analysis .ana-layout {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* ==========================================================================
   Sidebar (280px)
   ========================================================================== */

.ana-sidebar {
  width: 290px;
  min-width: 290px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #F4F6F9;
  border-right: 1px solid var(--border-subtle);
  overflow: hidden;
}

.ana-sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 18px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.ana-sidebar-header svg {
  color: var(--brand-blue);
  flex-shrink: 0;
}

/* Task Input */
.ana-task-area {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.ana-task-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.ana-task-input {
  width: 100%;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  font-family: inherit;
  resize: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  line-height: 1.6;
}

.ana-task-input:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.10);
}

/* 任务时间范围：与任务本身绑定，图表和报告使用同一时间段 */
.agent-task-range {
  margin-top: 10px;
  padding: 9px 10px;
  background: #F8FAFC;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
}

.agent-task-range-title {
  margin-bottom: 7px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
}

.agent-task-range-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
}

.agent-task-range-row label {
  width: 28px;
  flex: 0 0 28px;
  color: var(--text-muted);
  font-size: 10px;
}

.agent-task-range-row input {
  width: 100%;
  min-width: 0;
  padding: 4px 5px;
  border: 1px solid var(--border-default);
  border-radius: 4px;
  color: var(--text-primary);
  background: #fff;
  font: inherit;
  font-size: 10px;
}

.agent-task-range-presets {
  display: flex;
  gap: 5px;
  margin-top: 7px;
}

.agent-task-range-presets button {
  padding: 3px 7px;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
}

.agent-task-range-presets button:hover {
  color: var(--brand-blue);
  border-color: var(--brand-blue);
}

.agent-task-range-presets button.active {
  color: var(--brand-blue);
  border-color: var(--brand-blue);
  background: rgba(59, 130, 246, 0.08);
  font-weight: 700;
}

.agent-task-range-hint {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 9px;
  line-height: 1.4;
}

/* Preset buttons */
.ana-task-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.ana-preset-btn {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  background: #fff;
  border: 1px solid var(--border-default);
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  white-space: nowrap;
}

.ana-preset-btn:hover {
  color: var(--brand-blue);
  border-color: var(--brand-blue);
  background: rgba(59, 130, 246, 0.04);
}

.ana-preset-btn:active {
  transform: scale(0.96);
}

/* Start button */
.ana-btn-start {
  width: 100%;
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--brand-blue);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast);
  letter-spacing: -0.01em;
  font-family: inherit;
}

.ana-btn-start:hover {
  background: #2563EB;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.ana-btn-start:active {
  transform: scale(0.98);
}

.ana-btn-start:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

/* Back to overview button */
.ana-btn-back-overview {
  width: 100%;
  margin-top: 8px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.ana-btn-back-overview:hover {
  color: var(--brand-blue);
  border-color: var(--brand-blue);
  background: rgba(59, 130, 246, 0.04);
}

/* ==========================================================================
   Task Info Card (read-only, from TaskContext)
   ========================================================================== */

.ana-task-info-card {
  /* container */
}

.ana-task-info-empty {
  font-size: 11px;
  color: var(--text-muted);
  padding: 8px 10px;
  background: rgba(239, 68, 68, 0.04);
  border: 1px solid rgba(239, 68, 68, 0.12);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  line-height: 1.5;
}

.ana-task-info-content {
  padding: 8px 10px;
  background: rgba(59, 130, 246, 0.03);
  border: 1px solid rgba(59, 130, 246, 0.10);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.ana-task-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-size: 11px;
}

.ana-task-info-label {
  color: var(--text-muted);
  flex-shrink: 0;
  margin-right: 8px;
  font-weight: 500;
}

.ana-task-info-value {
  color: var(--text-primary);
  font-weight: 500;
  text-align: right;
  word-break: break-all;
}

.ana-task-info-value.mono {
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--brand-blue);
  font-weight: 600;
}

.ana-task-info-scenario-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.ana-scenario-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.08);
  color: var(--brand-blue);
  white-space: nowrap;
}

/* Read-only textarea as task info display */
.ana-task-input[readonly] {
  background: #FAFBFC;
  color: var(--text-primary);
  cursor: default;
  resize: none;
  border-color: var(--border-subtle);
  font-size: 12px;
  line-height: 1.55;
}

.ana-task-input[readonly]:focus {
  outline: none;
  border-color: var(--border-subtle);
  box-shadow: none;
}

/* History */
.ana-history-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.ana-history-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.ana-history-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid var(--border-default);
}

.ana-history-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px 12px;
}

.ana-history-list::-webkit-scrollbar {
  width: 3px;
}
.ana-history-list::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 2px;
}

.ana-history-item {
  padding: 10px 12px;
  margin-bottom: 6px;
  background: #fff;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.ana-history-item:hover {
  border-color: var(--border-default);
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.ana-history-item.active {
  border-color: var(--brand-blue);
  background: rgba(59, 130, 246, 0.03);
}

.ana-history-item-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ana-history-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  color: var(--text-muted);
}

.ana-history-badge {
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
}

.ana-history-badge.warning {
  background: rgba(245, 158, 11, 0.1);
  color: #D97706;
}

.ana-history-badge.normal {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.ana-history-badge.critical {
  background: rgba(239, 68, 68, 0.1);
  color: #DC2626;
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */

.ana-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 20px 20px;
  min-width: 0;
  gap: 14px;
}

.ana-main::-webkit-scrollbar {
  width: 5px;
}
.ana-main::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 3px;
}
.ana-main::-webkit-scrollbar-track {
  background: transparent;
}

/* ==========================================================================
   Agent Pipeline
   ========================================================================== */

.ana-pipeline-section {
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 14px 18px;
  flex-shrink: 0;
}

.ana-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ana-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.ana-section-title svg {
  color: var(--brand-blue);
}

.ana-pipeline-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ana-progress-bar {
  width: 120px;
  height: 4px;
  background: var(--bg-input);
  border-radius: 2px;
  overflow: hidden;
}

.ana-progress-fill {
  height: 100%;
  width: 100%;
  background: var(--brand-blue);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s ease;
}

.ana-progress-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 48px;
}

/* Pipeline steps */
.ana-pipeline-steps {
  display: flex;
  gap: 1px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.ana-pipeline-steps::-webkit-scrollbar {
  height: 3px;
}
.ana-pipeline-steps::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 2px;
}

.ana-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  transition: all 0.25s ease;
  font-size: 11.5px;
  cursor: default;
  position: relative;
}

.ana-step-item.waiting {
  color: var(--text-muted);
}

.ana-step-item.running {
  background: var(--brand-blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.ana-step-item.completed {
  color: var(--state-ok);
}

.ana-step-item.failed {
  color: var(--state-critical);
  background: rgba(239, 68, 68, 0.05);
}

.ana-step-indicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.ana-step-item.waiting .ana-step-indicator {
  border: 1.5px solid var(--border-default);
  color: transparent;
}

.ana-step-item.running .ana-step-indicator {
  border: 2px solid rgba(255,255,255,0.5);
  border-top-color: #fff;
  animation: anaSpin 0.7s linear infinite;
}

.ana-step-item.completed .ana-step-indicator {
  background: var(--state-ok);
  color: #fff;
}

.ana-step-item.failed .ana-step-indicator {
  background: var(--state-critical);
  color: #fff;
}

@keyframes anaSpin {
  to { transform: rotate(360deg); }
}

.ana-step-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ana-step-name {
  font-weight: 600;
  font-size: 11.5px;
  white-space: nowrap;
  line-height: 1.3;
}

.ana-step-tool {
  font-size: 9.5px;
  opacity: 0.65;
  white-space: nowrap;
}

.ana-step-duration {
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.ana-step-item.waiting .ana-step-duration {
  display: none;
}

/* Step connector */
.ana-step-connector {
  width: 12px;
  height: 1.5px;
  background: var(--border-default);
  flex-shrink: 0;
  align-self: center;
  transition: background 0.3s ease;
}

.ana-step-connector.done {
  background: var(--state-ok);
}

/* ==========================================================================
   Charts Section
   ========================================================================== */

.ana-charts-section {
  flex-shrink: 0;
}

.ana-charts-row {
  display: flex;
  gap: 12px;
}

.ana-chart-card {
  flex: 1;
  min-width: 0;
  height: 220px;
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  position: relative;
}

.ana-chart-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
}

/* ==========================================================================
   Results Grid (2 columns × 3 rows)
   ========================================================================== */

.ana-results-section {
  flex-shrink: 0;
}

.ana-results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Risk card spans 2 cols on wider layouts */
.ana-card-risk {
  /* grid-column: span 1; default */
}

.ana-result-card {
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ana-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.ana-card-header svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.ana-card-status {
  margin-left: auto;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
}

.ana-card-status.pending {
  background: var(--bg-input);
  color: var(--text-muted);
}

.ana-card-status.running {
  background: rgba(59, 130, 246, 0.08);
  color: var(--brand-blue);
}

.ana-card-status.done {
  background: rgba(16, 185, 129, 0.08);
  color: var(--state-ok);
}

.ana-card-body {
  padding: 14px;
  flex: 1;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.7;
  min-height: 80px;
}

.ana-card-wait {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 60px;
  color: var(--text-muted);
  font-size: 12px;
}

/* --- Net Load --- */
.ana-netload-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 10px;
}

.ana-netload-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ana-netload-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}

.ana-netload-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.ana-netload-stat-value.low {
  color: var(--state-critical);
}

.ana-netload-stat-value.warn {
  color: var(--state-warn);
}

.ana-netload-alert {
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.05);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--state-critical);
  font-weight: 600;
}

/* --- Storage --- */
.ana-storage-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ana-storage-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ana-storage-label {
  width: 80px;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
  flex-shrink: 0;
}

.ana-storage-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
}

.ana-storage-bar-fill {
  height: 100%;
  width: 100%;
  border-radius: 4px;
  transform-origin: left center;
  transition: transform 0.5s ease;
}

.ana-storage-bar-fill.normal {
  background: var(--state-ok);
}

.ana-storage-bar-fill.warning {
  background: var(--state-warn);
}

.ana-storage-bar-fill.critical {
  background: var(--state-critical);
}

.ana-storage-value {
  width: 50px;
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
  flex-shrink: 0;
}

/* --- Section --- */
.ana-section-gauge {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ana-section-meter {
  position: relative;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

.ana-section-meter svg {
  width: 100px;
  height: 100px;
}

.ana-section-meter-value {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.ana-section-meter-value.warning {
  color: var(--state-warn);
}

.ana-section-meter-value.critical {
  color: var(--state-critical);
}

.ana-section-meter-value.normal {
  color: var(--state-ok);
}

.ana-section-details {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.ana-section-details .limit-line {
  color: var(--state-warn);
  font-weight: 600;
}

.ana-section-details .limit-critical {
  color: var(--state-critical);
  font-weight: 600;
}

/* --- Risk --- */
.ana-risk-gauge-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 8px;
}

.ana-risk-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 6px solid var(--bg-input);
}

.ana-risk-content {
  display: flex;
  align-items: center;
  gap: 20px;
}

.ana-risk-badge-large {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ana-risk-badge-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.ana-risk-badge-circle.warning {
  background: rgba(245, 158, 11, 0.12);
  color: #D97706;
  border: 3px solid rgba(245, 158, 11, 0.25);
}

.ana-risk-badge-circle.critical {
  background: rgba(239, 68, 68, 0.12);
  color: #DC2626;
  border: 3px solid rgba(239, 68, 68, 0.25);
}

.ana-risk-badge-circle.normal {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 3px solid rgba(16, 185, 129, 0.25);
}

.ana-risk-badge-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.ana-risk-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ana-risk-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 11px;
}

.ana-risk-detail-label {
  color: var(--text-muted);
}

.ana-risk-detail-value {
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

/* --- Cause Chain --- */
.ana-cause-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.ana-cause-node {
  padding: 5px 10px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.ana-cause-node.root {
  background: rgba(239, 68, 68, 0.08);
  color: var(--state-critical);
}

.ana-cause-node.key {
  background: rgba(245, 158, 11, 0.08);
  color: #D97706;
}

.ana-cause-arrow {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
}

/* --- Suggestions --- */
.ana-suggest-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ana-suggest-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  transition: all var(--transition-fast);
}

.ana-suggest-item:hover {
  background: rgba(59, 130, 246, 0.04);
}

.ana-suggest-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ==========================================================================
   Review Section
   ========================================================================== */

.ana-review-section {
  flex-shrink: 0;
}

.ana-review-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.ana-review-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.ana-review-info svg {
  color: var(--state-warn);
}

.ana-review-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: flex-end;
}

.ana-review-comment {
  flex: 1;
  max-width: 300px;
  padding: 8px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-family: inherit;
  resize: none;
  color: var(--text-primary);
  transition: border-color var(--transition-fast);
}

.ana-review-comment:focus {
  outline: none;
  border-color: var(--brand-blue);
}

.ana-btn-reject,
.ana-btn-approve {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
  font-family: inherit;
  white-space: nowrap;
}

.ana-btn-reject {
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
}

.ana-btn-reject:hover:not(:disabled) {
  border-color: var(--state-critical);
  color: var(--state-critical);
  background: rgba(239, 68, 68, 0.04);
}

.ana-btn-approve {
  background: var(--brand-blue);
  color: #fff;
}

.ana-btn-approve:hover:not(:disabled) {
  background: #2563EB;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.ana-btn-reject:disabled,
.ana-btn-approve:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.ana-btn-approve:active:not(:disabled),
.ana-btn-reject:active:not(:disabled) {
  transform: scale(0.97);
}

/* Review result */
.ana-review-result {
  margin-top: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
}

.ana-review-result.approved {
  background: rgba(16, 185, 129, 0.06);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.ana-review-result.rejected {
  background: rgba(239, 68, 68, 0.06);
  color: #DC2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ==========================================================================
   Animations
   ========================================================================== */

.ana-fade-in {
  animation: anaFadeIn 0.35s ease;
}

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

.ana-pulse {
  animation: anaPulse 0.5s ease;
}

@keyframes anaPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .ana-step-item.running .ana-step-indicator {
    animation: none;
    border-top-color: rgba(255,255,255,0.5);
  }
  .ana-fade-in { animation: none; }
  .ana-pulse { animation: none; }
}
