/* Finance Hub: extra styles on top of app.css (the Operations Hub's design system) */
.kpis-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpi-value.bad, .tbl td.bad { color: var(--serious); }
.segbtn { display: inline-flex; align-items: center; background: var(--surface-2); color: var(--text-secondary); padding: 7px 12px; text-decoration: none; font-size: 14px; }
.segbtn + .segbtn { border-left: 1px solid var(--border); }
.segbtn.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.segbtn:hover { color: var(--text-primary); }
.filters .grow { flex: 1; min-width: 160px; }
.filters .grow input { width: 100%; }
.check-inline { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--text-secondary); padding-bottom: 7px; }
.check-inline input { accent-color: var(--accent); }

/* cutoff bar */
.cutoff-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.cutoff-bar h2 { font-size: 17px; }
.cutoff-state { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cutoff-state form { margin: 0; }
.st { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.st svg, .btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.st.live { background: #e3f6ef; color: #13805a; }
.st.final { background: var(--accent-soft); color: var(--accent); }
:root[data-theme="dark"] .st.live { background: #142e25; color: #6fd4ae; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-no { background: var(--err-bg); border-color: #f0b4b4; color: var(--err-fg); }

/* tables */
.who { display: flex; align-items: center; gap: 10px; }
.who .av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--accent-soft); color: var(--accent); flex: none; }
.who a { color: var(--text-primary); text-decoration: none; }
.who a:hover { text-decoration: underline; }
.sub-line { display: block; font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.sum-tbl tbody tr { cursor: pointer; }
.sum-tbl td, .sum-tbl th { white-space: normal; }
.sum-tbl th.num { min-width: 70px; }
.tbl tfoot td { border-top: 2px solid var(--border); background: var(--surface-2); }
.tbl tr.hol td { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.mini { color: var(--text-muted); font-size: 12px; }
.flags { display: flex; flex-wrap: wrap; gap: 4px; }
.flag { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.flag.warn { color: var(--warn-fg); background: var(--warn-bg); }
.flag.info { color: var(--info-fg); background: var(--info-bg); }
.flag.muted { color: var(--text-muted); background: var(--surface-2); }
.stt { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-secondary); white-space: nowrap; }
.stt.bad { background: var(--err-bg); color: var(--err-fg); }
.stt.warn { background: var(--warn-bg); color: var(--warn-fg); }
.stt.good { background: #e3f6ef; color: #13805a; }
.rules-note { margin: 12px 2px 0; line-height: 1.6; max-width: 1100px; }
.count-pill { display: inline-block; min-width: 24px; padding: 1px 8px; margin-left: 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; text-align: center; vertical-align: 2px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.inline-form { display: inline; margin: 0; }
.you { font-size: 11px; color: var(--accent); margin-left: 6px; font-weight: 600; }

/* settings */
.settings-card { margin-bottom: 14px; max-width: 900px; }
.set-grid { display: grid; gap: 14px; }
.set-grid .field input:not([type=number]), .set-grid .field select { max-width: 560px; width: 100%; }
.inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--text-secondary); }
.inline input[type=number] { width: 80px; }
.hint { font-size: 12px; color: var(--text-muted); }
.set-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.test-box { margin-top: 16px; border-radius: 12px; padding: 14px 16px; border: 1px solid var(--border); }
.test-box.good { background: #eefaf4; border-color: #a6dcc5; }
.test-box.bad { background: var(--err-bg); border-color: #f0b4b4; }
:root[data-theme="dark"] .test-box.good { background: #10241d; border-color: #1f4a3a; }
.test-title { font-weight: 600; margin: 0 0 8px; }
.test-steps { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 6px; font-size: 13px; }
.test-steps li { display: grid; gap: 1px; }
.test-steps li.ok b { color: #13805a; }
.test-steps li.no b { color: var(--serious); }
:root[data-theme="dark"] .test-steps li.ok b { color: #6fd4ae; }
.test-steps span { color: var(--text-secondary); padding-left: 18px; }

/* setup */
.setup-card { width: min(460px, 100%); }
.step-h { display: flex; gap: 8px; align-items: center; font-size: 14px; margin-top: 6px; }
.step-h span { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 12px; }

/* print / save as PDF */
.print-only { display: none; }
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body { background: #fff; font-size: 11px; }
  .sidebar, .no-print, .filters, .topbar .actions, #themeBtn { display: none !important; }
  .print-only { display: flex; }
  .print-head { gap: 12px; align-items: center; margin-bottom: 10px; border-bottom: 2px solid #04415e; padding-bottom: 8px; }
  .print-head img { width: 60px; }
  .main { padding: 0; }
  .card, .kpi { box-shadow: none; break-inside: avoid; }
  .kpis-6 { grid-template-columns: repeat(6, 1fr); }
  .tbl { font-size: 10px; }
  .tbl th, .tbl td { padding: 4px 6px; }
  .sum-tbl tbody tr { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
@media (max-width: 1100px) { .kpis-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .kpis-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sum-tbl td.num { white-space: nowrap; }
