/* Explain: Styles for billing and invoice components, including layout for grouped slips and compact table rows. */
/* ---------- Billing & invoice ---------- */
.bill-controls { display: grid; gap: 1rem; grid-template-columns: 1fr; }

@media (min-width: 720px) {
    .bill-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1080px) {
    .bill-controls { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.bill-controls .form-field--wide { grid-column: 1 / -1; }

.slip-picker { margin-top: 1.1rem; }
.slip-picker table { min-width: 760px; }
.slip-picker th.tag-cell,
.slip-picker td.tag-cell { width: 46px; text-align: center; }

.slip-picker input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.bill-summary { display: grid; gap: 1.25rem; }

@media (min-width: 900px) {
    .bill-summary { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
}

.bill-summary .rep-table { font-size: .84rem; }

.bill-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }

.rep-table tfoot td {
    border-top: 2px solid var(--primary-color);
    border-bottom: 0;
    background: var(--primary-tint);
    font-family: var(--font-heading);
    font-weight: 700;
}

.bill-note {
    margin: 0;
    padding: .75rem .9rem;
    border-radius: var(--radius-md);
    background: var(--surface-color);
    border: 1px dashed var(--border-color);
    font-size: .82rem;
    color: var(--text-muted);
}

.bill-summary > .bill-note { grid-column: 1 / -1; }

.bill-controls .form-field--half { grid-column: span 2; }

/* ---------- Grouped slip rows ---------- */
.slip-group td {
    background: var(--primary-soft);
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-heading);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--primary-color);
    padding: .45rem .8rem;
}

.slip-group td span {
    float: right;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-muted);
}

.slip-group__total td {
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-color);
}

.rep-table .slip-group td,
.rep-table .slip-group__total td { padding: .4rem .6rem; }

/* ---------- Invoice slip table — compact rows ---------- */
.bill-slip-table { font-size: .74rem; }

.bill-slip-table th {
    font-size: .6rem;
    padding: .35rem .4rem;
}

.bill-slip-table td {
    padding: .3rem .4rem;
    line-height: 1.3;
}

.bill-slip-table .slip-group td,
.bill-slip-table .slip-group__total td {
    padding: .28rem .4rem;
    font-size: .66rem;
}