/* Commission & payroll module */
.cm-bar { margin: -6px 0 16px; }
.cm-big { font-size: 1.05rem; font-weight: 700; color: var(--brand); margin: 6px 0 10px; }
.cm-rule-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.cm-rule-grid h2 { margin: 0; font-size: 1.02rem; }
.cm-pick { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; min-width: 0; }
.cm-pick legend { padding: 0 4px; }
.cm-pick .chips { margin: 6px 0 0; }
.cm-pick label.chip { font-weight: 500; }
.cm-pick summary { padding: 2px 0; }
.cm-absent { display: flex; flex-direction: column; gap: 2px; }
.cm-check { flex-direction: row; align-items: center; gap: 8px; }
.cm-help:empty { display: none; }
.cm-del { margin: -4px 0 16px; text-align: right; }
.cm-hidden { display: none !important; }

.cm-head { margin-bottom: 8px; }
.cm-head h2 { margin: 0; }
.cm-sum { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 12px; }
.cm-total small { display: block; color: var(--muted); }
.cm-total b { display: block; font-size: 1.7rem; font-variant-numeric: tabular-nums; margin: 2px 0 4px; }
.cm-rules-sum { margin: 0; }
.cm-rules-sum dt { min-width: 0; overflow-wrap: anywhere; }
.cm-class { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.cm-class > summary { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; background: #fafbfa; color: var(--ink); }
.cm-class > summary .cm-cl { flex: 1 1 160px; font-weight: 700; min-width: 0; }
.cm-class[open] > summary { border-bottom: 1px solid var(--line); }
.cm-lines td, .cm-lines th { padding: 7px 12px; }
tr.cm-on td { background: var(--info-bg); }

.cm-lines-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.cm-line h3 { margin: 0; font-size: 1rem; }
.cm-line dl.kv { margin: 8px 0; }
.cm-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; margin: 6px 0 10px; }
.cm-inputs .cm-wide { grid-column: 1 / -1; }
.cm-inputs input { min-height: 36px; padding: 6px 9px; }
.cm-result { border-top: 1px dashed var(--line); padding-top: 8px; }
.row > label.cm-paydate { flex: 0 1 200px; }
.cm-sum-table tfoot td { background: #fafbfa; font-weight: 600; }
.cm-note ul { margin: 6px 0 0; padding-left: 18px; }
.cm-note li { margin-bottom: 4px; }

.cm-slip-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.cm-net { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; border: 2px solid var(--brand); border-radius: 10px; padding: 8px 16px; margin: 16px 0; }
.cm-net span { font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .06em; }
.cm-net .big-amount { margin: 0; }
.cm-slip .doc-table { margin-bottom: 12px; }
.cm-slip .doc-table th:first-child { white-space: normal; }
.cm-card dl.kv { margin-bottom: 0; }
.cm-card h2 { margin: 0; }

@media (max-width: 700px) {
  .cm-sum { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .cm-overview th:nth-child(4), .cm-overview td:nth-child(4) { display: none; }
  .cm-overview td:first-child { min-width: 130px; }
  .cm-overview td, .cm-overview th { padding-left: 10px; padding-right: 10px; }
  .cm-slip-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .cm-net .big-amount { font-size: 1.6rem; }
}
@media print {
  .cm-slip-grid { grid-template-columns: 1fr 1fr; }
}
