#reports { --an-accent: var(--green-dark); }
#settings [data-settings-pane="sales"] > h3 { font-size: 19px; color: var(--ink); margin: 0 0 8px; }
#settings [data-settings-pane="sales"] > p { font-size: 14px; color: var(--ink-2); line-height: 1.6; margin: 0 0 20px; }
#sales-plan-form, #sales-digest-form { display: grid; gap: 16px; margin-bottom: 20px; }
#sales-plan-form .form-row, #sales-digest-form .form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
#sales-plan-form label, #sales-digest-form label { display: grid; gap: 7px; min-width: 0; font-size: 13px; font-weight: 600; color: var(--ink-2); }
#sales-plan-form input, #sales-plan-form select, #sales-digest-form select, #sales-digest-form input:not([type="checkbox"]) { width: 100%; min-width: 0; height: 42px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper-soft); color: var(--ink); font: inherit; }
#sales-digest-form > label, #sales-digest-users label { display: flex; align-items: center; gap: 10px; font-weight: 400; line-height: 1.5; overflow-wrap: anywhere; }
#sales-digest-form input[type="checkbox"] { width: 17px; height: 17px; flex-shrink: 0; accent-color: var(--green); }
#sales-digest-form fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
#sales-digest-form legend { font-size: 13px; color: var(--ink-2); padding: 0 6px; }
#sales-digest-users { display: grid; gap: 12px; max-height: 260px; overflow: auto; }
#sales-plan-form button, #sales-digest-form button { justify-self: start; }
#sales-plan-list { margin: 20px 0 28px; }
#sales-plan-list .settings-card { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; min-height: 0; padding: 14px 16px; margin-bottom: 8px; }
#sales-plan-list .settings-card b { font-size: 14px; }
#sales-plan-list .settings-card span { font-size: 13px; }
#sales-digest-status { overflow-wrap: anywhere; }
#sales-plan-form :focus-visible, #sales-digest-form :focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (max-width: 640px) {
  #sales-plan-form .form-row, #sales-digest-form .form-row { grid-template-columns: minmax(0, 1fr); }
}
#reports [hidden] { display: none !important; }
#reports button, #reports input, #reports select { font-family: inherit; }
#reports button:focus-visible, #reports summary:focus-visible, #reports input:focus-visible, #reports select:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.an-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 18px; }
.an-topline p, .an-status { color: var(--muted); font-size: 13px; line-height: 1.6; }
.an-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.an-tabs button { background: transparent; color: var(--muted); border: 0; border-bottom: 3px solid transparent; padding: 12px 2px; font-size: 15px; font-weight: 700; cursor: pointer; }
.an-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--green); }
.an-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.an-toolbar label { display: grid; flex: 1 1 130px; gap: 7px; min-width: 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.an-toolbar input, .an-toolbar select { width: 100%; min-width: 0; height: 42px; padding: 8px 10px; color: var(--ink); background: var(--paper-soft); border: 1px solid var(--line); border-radius: 9px; font-size: 13px; }
.an-toolbar button { height: 42px; }
.an-status { margin: 14px 2px 20px; }
.an-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.an-kpi { display: flex; flex-direction: column; gap: 10px; text-align: left; padding: 20px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 16px; cursor: pointer; min-width: 0; transition: border-color .15s, box-shadow .15s; }
.an-kpi:hover { border-color: var(--green); box-shadow: 0 4px 18px rgba(0,0,0,.06); }
.an-kpi-label { font-size: 13px; font-weight: 600; line-height: 1.45; min-height: 38px; }
.an-kpi strong { font-size: clamp(21px, 1.8vw, 30px); letter-spacing: -.6px; font-weight: 750; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.an-delta { font-size: 12px; color: var(--ink-2); }
.an-kpi-hint { font-size: 12px; line-height: 1.5; color: var(--muted); }
.an-kpi-open { margin-top: auto; padding-top: 6px; font-size: 12px; color: var(--an-accent); }
.an-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.an-panel { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 22px; color: var(--ink); }
#reports .an-panel > header { display: block; position: static; padding: 0; margin: 0 0 20px; border: 0; min-height: 0; }
.an-panel h3 { margin: 0; font-size: 17px; line-height: 1.4; color: var(--ink); }
.an-panel header p { margin: 6px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.an-wide { grid-column: 1 / -1; }
.an-explanation { font-size: 13px; line-height: 1.7; color: var(--ink-2); margin: 0 0 14px; }
.an-explanation:last-child { margin-bottom: 0; }
.an-empty { padding: 26px 10px; color: var(--muted); font-size: 14px; line-height: 1.6; text-align: center; }
.an-legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 12px; color: var(--ink-2); }
.an-legend span { display: inline-flex; align-items: center; gap: 7px; }
.an-swatch { width: 10px; height: 10px; border-radius: 3px; }
.tone-0 { background: var(--green); }
.tone-1 { background: var(--blue); }
.an-chart-scroll { overflow-x: auto; padding: 32px 5px 6px; }
.an-chart { display: grid; grid-template-columns: repeat(var(--months), minmax(64px, 1fr)); gap: 12px; min-width: min-content; }
.an-month { min-width: 0; display: grid; gap: 12px; text-align: center; font-size: 11px; color: var(--muted); }
.an-bars { height: 160px; display: flex; align-items: end; justify-content: center; gap: 5px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0 39px, var(--line) 39px 40px); }
.an-bar { position: relative; width: 25%; max-width: 44px; height: max(3px, var(--height)); border: 0; border-radius: 4px 4px 0 0; padding: 0; cursor: pointer; }
.an-bar:hover, .an-bar:focus-visible { filter: brightness(1.12); }
.an-tooltip { display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--paper-soft); border: 1px solid var(--line); color: var(--ink); padding: 5px 8px; border-radius: 6px; font-size: 12px; white-space: nowrap; z-index: 2; }
.an-bar:hover .an-tooltip, .an-bar:focus-visible .an-tooltip { display: block; }
.an-chart-values { margin-top: 18px; font-size: 12px; color: var(--muted); }
.an-chart-values summary { padding: 6px 0; cursor: pointer; }
.an-table-wrap { overflow-x: auto; }
.an-table { border-collapse: collapse; width: 100%; font-size: 13px; text-align: left; }
.an-table th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--paper-soft); padding: 10px 12px; white-space: nowrap; }
.an-table td { padding: 12px; border-bottom: 1px solid var(--line); color: var(--ink); line-height: 1.5; font-variant-numeric: tabular-nums; }
.an-table tr:last-child td { border-bottom: 0; }
.an-table td:first-child { min-width: 130px; }
.an-table td:not(:first-child) { white-space: nowrap; }
.an-record-context { display: block; color: var(--muted); }
.an-table tbody tr:hover { background: var(--paper-soft); }
.an-link { background: none; color: var(--an-accent); border: 0; padding: 3px 0; text-align: left; font-size: inherit; line-height: inherit; cursor: pointer; }
.an-link:hover { text-decoration: underline; }
.an-funnel { display: grid; gap: 4px; }
.an-funnel > button { display: grid; grid-template-columns: minmax(115px, 1fr) minmax(35px, .5fr) 24px minmax(80px, auto); align-items: center; gap: 10px; width: 100%; padding: 10px 0; border: 0; background: transparent; color: var(--ink); font-size: 12px; text-align: left; cursor: pointer; }
.an-funnel > button:hover { background: var(--paper-soft); }
.an-funnel small { text-align: right; color: var(--ink-2); font-size: 12px; }
.an-funnel b { text-align: right; }
.an-track { display: block; height: 7px; background: var(--paper-soft); border-radius: 8px; overflow: hidden; }
.an-track i { display: block; height: 100%; background: var(--green); border-radius: inherit; }
.an-aging { display: grid; gap: 20px; }
.an-aging > div { display: grid; grid-template-columns: 1fr auto; gap: 8px; font-size: 13px; }
.an-aging .an-track { grid-column: 1 / -1; }
.an-facts { margin: 0 0 20px; }
.an-facts > div { display: flex; align-items: start; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.an-facts dt { color: var(--muted); line-height: 1.5; }
.an-facts dd { margin: 0; font-weight: 700; text-align: right; white-space: nowrap; }
.an-detail { margin-top: 24px; scroll-margin-top: 20px; }
#reports .an-panel > .an-detail-head { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 14px; }
.an-detail-head > div { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.an-detail .an-table td:first-child { max-width: 500px; overflow-wrap: anywhere; }
.an-action-form { margin: 0 0 20px; }
.an-action-form fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 16px; min-width: 0; }
.an-action-form legend { font-weight: 700; font-size: 14px; padding: 0 6px; }
.an-action-form p { font-size: 13px; color: var(--muted); line-height: 1.6; }
#reports .an-detail input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--green); cursor: pointer; }
.an-action-form button:disabled { opacity: .5; cursor: default; }
.an-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: end; gap: 12px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.an-pagination button:disabled { opacity: .4; cursor: default; }
@media (max-width: 1350px) {
  .an-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .an-layout { grid-template-columns: 1fr; }
  .an-kpi-label { min-height: 0; }
}
@media (max-width: 640px) {
  .an-action-form .an-toolbar label { flex-basis: 100%; }
  .an-topline { align-items: start; flex-direction: column; gap: 4px; }
  .an-tabs { gap: 16px; }
  .an-tabs button { font-size: 13px; }
  .an-kpis { grid-template-columns: 1fr; gap: 12px; }
  .an-toolbar label { flex-basis: calc(50% - 12px); }
  .an-panel { padding: 16px; }
  .an-funnel > button { grid-template-columns: minmax(100px, 1fr) 25px 85px; }
  .an-funnel .an-track { display: none; }
  .an-facts > div { flex-direction: column; gap: 6px; }
  .an-kpi strong { font-size: 27px; }
}
