.client-progress { min-width: 0; margin-top: 18px; }
.client-progress [hidden] { display: none !important; }
.progress-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; padding: 5px; margin: 0 0 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.progress-tabs button { min-height: 46px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 650; }
.progress-tabs button[aria-selected="true"] { background: rgba(var(--accent-rgb),.12); border-color: rgba(var(--accent-rgb),.35); color: var(--cyan); }
.client-progress button:focus-visible,.client-progress a:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.progress-local-note,.progress-help { color: var(--muted); font-size: 12px; line-height: 1.65; }
.progress-local-note { margin: 0 0 18px; }
.progress-help { margin: 8px 0 15px; }
.progress-panel { margin: 0 0 18px; padding: 18px 16px; }
.progress-panel h2,.progress-history h2,.progress-empty h2 { font-size: 18px; line-height: 1.35; }
.progress-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px 12px; }
.progress-label { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0 0 3px; color: var(--text); font-size: 12px; line-height: 1.5; }
.progress-label>span { min-height: 18px; }
.progress-label .field { width: 100%; min-width: 0; font-size: 16px; padding: 11px 12px; }
.progress-label textarea.field { min-height: 76px; resize: vertical; }
.progress-wide { grid-column: 1/-1; }
.progress-panel form>.progress-label,.progress-panel form>.progress-wide { margin: 0 0 15px; }
.progress-pair { min-width: 0; border: 0; border-top: 1px solid var(--line); padding: 14px 0 0; margin: 20px 0; }
.progress-pair legend { padding: 0 9px 0 0; font-size: 13px; font-weight: 650; color: var(--text); }
.progress-save { width: 100%; margin-top: 8px; min-height: 50px; }
.progress-summary { margin: 16px 0 0; }
.progress-summary>div { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.progress-summary>div:last-child { border-bottom: 0; padding-bottom: 0; }
.progress-summary dt { font-size: 13px; }
.progress-summary dd { margin: 0; text-align: right; font-size: 16px; }
.progress-summary small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.5; font-weight: 400; }
.progress-summary strong span { font-size: 12px; font-weight: 400; color: var(--muted); }
.progress-empty { padding: 20px 16px; margin: 0 0 18px; border: 1px dashed var(--line); border-radius: 16px; }
.progress-empty p { color: var(--muted); font-size: 13px; margin-top: 8px; }
.progress-record { padding: 0 15px; margin: 12px 0; overflow: hidden; }
.progress-record summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 58px; cursor: pointer; font-size: 13px; }
.progress-record summary>span { color: var(--muted); font-size: 12px; }
.progress-record summary::after { content: '+'; font-size: 19px; color: var(--cyan); }
.progress-record[open] summary::after { content: '−'; }
.progress-record summary>strong { margin-right: auto; }
.progress-record-values { margin: 0 0 16px; }
.progress-record-values>div { display: flex; justify-content: space-between; gap: 15px; padding: 6px 0; font-size: 12px; }
.progress-record-values dt { color: var(--muted); }
.progress-record-values dd { margin: 0; white-space: nowrap; }
.progress-note { margin: 12px 0 16px; padding: 12px; border-radius: 10px; background: var(--surface2); color: var(--muted); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.progress-draft-note { padding: 12px; margin: 14px 0; border: 1px solid rgba(var(--accent-rgb),.4); border-radius: 12px; background: rgba(var(--accent-rgb),.06); }
.progress-draft-note p { font-size: 12px; line-height: 1.6; color: var(--muted); }
.progress-draft-note .text-button { text-align: left; white-space: normal; line-height: 1.5; margin-top: 4px; padding-inline: 0; }
.progress-error { margin: 12px 0; padding: 12px; color: #ffced6; background: #3b2029; border: 1px solid #8a4857; border-radius: 10px; font-size: 12px; line-height: 1.6; }
.progress-status { min-height: 20px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.progress-mode { margin: 18px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; min-width: 0; border: 0; }
.progress-mode legend { margin-bottom: 8px; font-size: 12px; color: var(--muted); }
.progress-mode label { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 11px; background: var(--surface2); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.progress-mode input { accent-color: var(--accent); width: 17px; height: 17px; margin: 0; }
.progress-percent-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.progress-percent-grid .progress-label .field { padding-inline: 10px; }
.progress-calculate { width: 100%; margin: 17px 0 4px; }
.progress-formula-help { margin: 15px 0; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; }
.progress-formula-help summary { cursor: pointer; min-height: 46px; padding: 12px 0; color: var(--cyan); font-size: 12px; }
.progress-formula-help p { margin: 0 0 12px; font-size: 12px; line-height: 1.7; color: var(--muted); }
.progress-formula-help a { color: var(--cyan); text-underline-offset: 3px; }
.progress-nutrition-result { margin: 15px 0; }
.progress-nutrition-result h3 { font-size: 14px; margin-bottom: 14px; }
.progress-macros { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 0; }
.progress-macros>div { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(var(--accent-rgb),.04); }
.progress-macros dt { color: var(--muted); font-size: 12px; }
.progress-macros dd { margin: 5px 0 0; color: var(--text); font-size: 21px; font-weight: 700; overflow-wrap: anywhere; }
.progress-macros small { display: block; margin-top: 2px; font-size: 11px; font-weight: 400; color: var(--muted); }
.progress-energy { margin: 0 0 15px; }
.progress-energy>div { display: flex; justify-content: space-between; gap: 12px; margin: 9px 0; font-size: 12px; line-height: 1.6; }
.progress-energy dt { color: var(--muted); }
.progress-energy dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
@media (min-width: 700px) {
  .progress-panel { padding: 22px; }
  .progress-macros { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) { .client-progress * { scroll-behavior: auto; } }
