.p2 { background: #dce8f5; color: #38658f; }
.p3 { background: #dfece2; color: #487252; }
.priority-reason { display: block; margin-top: 5px; color: #8a7558; font-size: 8px; line-height: 1.45; }
.sales-cadence-strip { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 12px; padding: 13px 16px; border: 1px solid #d7c4a6; background: linear-gradient(90deg, #f2e7d6, #fffdf8); }
.sales-cadence-strip span, .sales-cadence-strip strong { display: block; }
.sales-cadence-strip span { color: #8c714e; font-size: 9px; letter-spacing: .08em; }
.sales-cadence-strip strong { margin-top: 4px; font-size: 11px; }
.sales-cadence-strip p { max-width: 620px; margin: 0; color: #6d6257; font-size: 10px; line-height: 1.6; }
.queue-tools { display: flex; align-items: flex-end; gap: 7px; }
.queue-tools label, .queue-tools label span { display: block; }
.queue-tools label span { margin-bottom: 4px; color: #8b7d6e; font-size: 8px; }
.queue-tools select { max-width: 130px; height: 28px; padding: 0 24px 0 8px; border: 1px solid var(--line); background: #fff; color: #51483f; font-size: 9px; }
.analytics-range-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); background: var(--card); }
.analytics-range-bar > div { display: flex; flex-wrap: wrap; gap: 6px; }
.analytics-range-bar button { min-height: 32px; padding: 0 11px; border: 1px solid var(--line); background: #fffaf2; color: #655a4f; cursor: pointer; font-size: 9px; }
.analytics-range-bar button.selected { border-color: #8f7149; background: #8f7149; color: #fff; }
.analytics-range-bar form { display: flex; align-items: center; gap: 6px; }
.analytics-range-bar input { height: 32px; padding: 0 6px; border: 1px solid var(--line); background: #fff; font-size: 9px; }
.analytics-range-bar form span { color: var(--muted); font-size: 9px; }
.refund-reason-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.refund-reason-list div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 12px; background: #f7f1e8; }
.refund-reason-list strong { font-size: 10px; }
.refund-reason-list span { flex: 0 0 auto; color: #856538; font-size: 9px; }
.warning-review-list { padding-left: 0; list-style: none; }
.warning-review-list li, .reviewed-warnings li { padding: 10px 12px; border: 1px solid #e2d8cb; background: #fbf7f0; }
.warning-review-list label, .reviewed-warnings label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.warning-review-list input, .reviewed-warnings input { margin-top: 3px; accent-color: #8f7149; }
.warning-review-list b, .reviewed-warnings b { display: block; margin-bottom: 4px; color: #8b6c43; font-size: 8px; }
.reviewed-warnings { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.reviewed-warnings summary { cursor: pointer; color: #776a5b; font-size: 10px; }
.reviewed-warnings ol { display: grid; gap: 7px; margin: 10px 0 0; padding: 0; list-style: none; }
.reviewed-warnings li { opacity: .68; }
.task-row > strong { font-size: 12px; }
.task-row p, .detail-head p, .detail-section p { font-size: 10px; }
.panel-head small, .task-row .relation, .task-row .state { font-size: 9px; }

@media (max-width: 800px) {
  .workspace { padding: 16px 12px 86px; }
  .topbar h1 { font-size: 24px; }
  .notice { font-size: 11px; line-height: 1.55; }
  .metrics article { min-height: 100px; }
  .metrics span, .metrics small { font-size: 10px; }
  .categories { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
  .category { min-width: 155px; scroll-snap-align: start; }
  .sales-cadence-strip { align-items: flex-start; flex-direction: column; gap: 7px; }
  .task-layout { display: block; }
  .panel-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .queue-tools { width: 100%; align-items: flex-end; }
  .queue-tools label { flex: 1; }
  .queue-tools select { width: 100%; max-width: none; }
  .task-list { max-height: 460px; overflow: auto; }
  .task-row { padding: 15px 13px; }
  .task-row > strong { font-size: 14px; }
  .task-row p, .task-row .relation, .task-row .state, .priority-reason { font-size: 11px; }
  .priority, .category-name, .time { font-size: 9px; }
  .task-detail { margin-top: 12px; }
  .detail-section h3 { font-size: 13px; }
  .detail-head p, .detail-section p { font-size: 12px; line-height: 1.75; }
  .right-rail { display: none; }
  .analytics-range-bar { align-items: flex-start; flex-direction: column; }
  .analytics-range-bar form { width: 100%; flex-wrap: wrap; }
  .analytics-range-bar input { flex: 1; min-width: 125px; }
  .refund-reason-list { grid-template-columns: 1fr; }
  .signal-grid span, .audit-grid span { font-size: 11px; }
  .signal-grid small, .audit-grid small { font-size: 10px; line-height: 1.5; }
}

@media (max-width: 520px) {
  .analytics-range-bar form span { display: none; }
  .analytics-range-bar form button { width: 100%; }
  .snapshot-badge { min-width: 0; }
  .history-table > div { min-width: 560px; }
  .action-bar { position: static; }
}
