.planning-intro { color: var(--muted); line-height: 1.9; font-size: 12px; margin: -8px 0 26px; }
.planning-actions, .row-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.planning-actions { justify-content: flex-end; }
.planning-budget-links { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 16px 20px; margin-bottom: 24px; background: #e6ebfa; border: 1px solid var(--line); color: var(--blue); font-size: 12px; }
.planning-empty { padding: 55px 22px; border: 1px dashed var(--line); background: var(--surface); text-align: center; }
.planning-empty h3 { font-size: 16px; font-weight: 600; }
.planning-empty p { font-size: 12px; color: var(--muted); line-height: 1.9; margin: 13px auto 20px; max-width: 460px; }
.selection-layout { display: grid; grid-template-columns: 155px minmax(0,1fr); gap: 23px; align-items: start; }
.selection-categories { display: flex; flex-direction: column; gap: 8px; }
.selection-category { padding: 15px 13px; border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; }
.selection-category span { font-size: 13px; overflow-wrap: anywhere; }
.selection-category small { font-size: 10px; background: var(--paper); color: var(--ink); padding: 2px 5px; }
.selection-category.selected { background: var(--blue); border-color: var(--blue); color: white; }
.selection-category:not(.selected):hover { background: var(--yellow); color: var(--ink); }
.selection-panel { border-top: 3px solid var(--blue); }
.selection-panel .section-heading { align-items: flex-start; }
.selection-panel .section-heading h2 { font-size: 17px; line-height: 1.8; overflow-wrap: anywhere; }
.selection-panel .section-heading h2 small { display: block; margin: 4px 0 0; font-size: 11px; }
.planning-search { width: 100%; max-width: 330px; margin-bottom: 23px; }
.selection-table { min-width: 590px; }
.selection-table td { vertical-align: top; }
.selection-table th:first-child { width: 24%; }
.selection-table th:nth-child(3) { width: 29%; }
.selection-table .row-actions { min-width: 140px; max-width: 165px; }
.quote-price { white-space: nowrap; font-size: 15px; font-weight: 650; color: var(--blue); }
.quote-price small { display: block; font-size: 11px; font-weight: 400; }
.quote-note { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.9; font-size: 12px; }
.plan-tabs { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 22px; }
.plan-tab { background: var(--surface); border: 1px solid var(--line); padding: 12px 17px; display: flex; align-items: center; gap: 15px; text-align: left; overflow-wrap: anywhere; max-width: 100%; }
.plan-tab small { font-size: 10px; white-space: nowrap; }
.plan-tab.selected { background: var(--blue); border-color: var(--blue); color: white; }
.plan-tab:not(.selected):hover { background: var(--yellow); color: var(--ink); }
.plan-editor { border-top: 3px solid var(--blue); }
.plan-heading { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.plan-heading > div:first-child { min-width: 0; }
.plan-heading h2 { font-size: 20px; overflow-wrap: anywhere; }
.plan-heading p { color: var(--muted); font-size: 12px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 10px; }
.plan-heading .planning-actions { flex-shrink: 0; }
.plan-total-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--paper); padding: 22px; margin-bottom: 20px; }
.plan-total-bar > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.plan-total-bar span { font-size: 12px; color: var(--muted); }
.plan-total-bar strong { font-size: 29px; font-variant-numeric: tabular-nums; }
.plan-total-bar small { font-size: 11px; color: var(--muted); }
.plan-items { min-width: 740px; }
.plan-items td { vertical-align: top; }
.plan-items th:first-child { width: 29%; }
.plan-items td:first-child > b { display: block; margin-top: 8px; }
.plan-items .row-actions { min-width: 130px; max-width: 155px; }
.plan-items .quote-status { color: var(--blue); }
.comparison-controls { display: flex; gap: 20px; justify-content: space-between; align-items: start; }
.compare-choices { display: flex; flex-wrap: wrap; gap: 12px; }
.compare-choices label { display: flex; align-items: center; gap: 9px; font-size: 12px; padding: 8px 10px; background: var(--paper); border: 1px solid var(--line); overflow-wrap: anywhere; }
.compare-choices input { accent-color: var(--blue); width: 16px; height: 16px; flex-shrink: 0; }
.baseline-label { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.baseline-label select { padding: 8px; max-width: 170px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.compare-note { margin: 16px 0; }
table.comparison-table { table-layout: fixed; min-width: 640px; }
.table-scroll-hint { display: none; }
.comparison-table th:first-child { width: 110px; }
.comparison-table th { font-weight: 600; color: var(--ink); font-size: 12px; overflow-wrap: anywhere; }
.comparison-table thead th { border-bottom: 2px solid var(--ink); }
.comparison-table thead .tag { display: inline-block; margin-left: 7px; font-size: 9px; background: var(--yellow); color: var(--ink); }
.comparison-table td, .comparison-table tbody th { vertical-align: top; padding: 18px 13px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.comparison-table tbody th { background: var(--surface); }
.comparison-table td:last-child { border-right: 0; }
.comparison-total td { background: #edf0f9; }
.comparison-total strong { font-size: 20px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.plan-difference, .category-difference { color: var(--blue); font-size: 11px; }
.comparison-table ul { list-style: none; padding: 0; margin: 15px 0 0; }
.comparison-table li { margin-top: 12px; font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; }
.comparison-table li span { display: block; color: var(--muted); font-size: 10px; }
.picked-quote { color: var(--blue)!important; padding: 12px; border-left: 3px solid var(--blue); background: #edf0f9; white-space: pre-wrap; overflow-wrap: anywhere; }
.line-preview { background: var(--yellow); border: 1px solid var(--ink); padding: 15px; display: flex; justify-content: space-between; gap: 15px; align-items: center; }
.line-preview span { font-size: 12px; }
.line-preview output { font-size: 23px; font-weight: 700; }
.sidebar { overflow-y: auto; }
.sidebar nav { flex-shrink: 0; }
@media (max-width: 1150px) {
  .selection-layout { grid-template-columns: minmax(0,1fr); gap: 15px; }
  .selection-categories { flex-direction: row; flex-wrap: wrap; }
  .selection-category { padding: 10px 13px; }
  .plan-heading { flex-wrap: wrap; }
  .plan-total-bar > div { flex-direction: column; gap: 7px; }
}
@media (max-width: 640px) {
  body { padding-bottom: 122px; }
  .sidebar { height: 122px; padding: 7px; }
  .sidebar nav { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 4px; }
  .sidebar .nav-item { width: 100%; padding: 6px 2px; }
  #toast { bottom: 138px; }
  .page-heading:has(.planning-actions) { align-items: flex-start; flex-direction: column; gap: 16px; }
  .planning-intro { font-size: 11px; margin-top: -6px; }
  .planning-actions { justify-content: flex-start; gap: 7px; }
  .planning-actions .btn { padding: 9px 10px; font-size: 11px; }
  .selection-panel .section-heading { flex-wrap: wrap; }
  .selection-panel { padding: 18px 13px; }
  .planning-empty { padding: 35px 15px; }
  .plan-tab { padding: 10px 12px; font-size: 12px; }
  .plan-total-bar { flex-wrap: wrap; padding: 18px; gap: 16px; }
  .plan-total-bar strong { font-size: 26px; }
  .comparison-controls { flex-direction: column; gap: 14px; }
  .plan-comparison .section-heading { align-items: flex-start; flex-direction: column; }
  .planning-budget-links { gap: 10px; padding: 15px; }
  .planning-budget-links > span { flex-basis: 100%; }
  .table-scroll-hint { display: block; font-size: 10px; color: var(--blue); margin-bottom: 10px; }
  .table-wrap table.selection-table, .table-wrap table.plan-items { display: block; min-width: 0; }
  .selection-table thead, .plan-items thead { display: none; }
  .selection-table tbody, .plan-items tbody { display: block; }
  .selection-table tr, .plan-items tr { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 0 14px; border-bottom: 1px solid var(--line); padding: 12px 0; }
  .selection-table td, .plan-items td { display: block; border: 0; padding: 10px 0; white-space: normal; overflow-wrap: anywhere; }
  .selection-table td:first-child, .selection-table td:last-child, .plan-items td:first-child, .plan-items td:last-child { grid-column: 1 / -1; }
  .selection-table td[data-label]::before, .plan-items td[data-label]::before { content: attr(data-label); display: block; font-size: 10px; font-weight: 400; color: var(--muted); margin-bottom: 7px; }
  .selection-table .row-actions, .plan-items .row-actions { min-width: 0; max-width: none; }
}
