/* Shared base + Renewals Register: rules specific to this product. Shared look lives in theme.css. */

.primary-btn { color: var(--accent-ink); background: var(--accent); text-decoration: none; font-weight: 600; padding: 8px 14px; border-radius: var(--radius-pill); min-height: 40px; display: inline-flex; align-items: center; white-space: nowrap; }
.logo-preview { height: 40px; display: block; margin: 6px 0; }
.swatch { display: inline-block; width: 1.2em; height: 1.2em; border-radius: 4px; vertical-align: middle; border: 1px solid var(--line-strong); }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
label.check input { width: 22px; height: 22px; min-height: 0; margin: 0; }
.nowrap { white-space: nowrap; }
pre.mail { white-space: pre-wrap; font: inherit; font-size: 0.9rem; margin: 8px 0 0; color: var(--ink); }
details.card summary { cursor: pointer; min-height: 32px; }
code { background: var(--paper); padding: 1px 5px; border-radius: 4px; font-size: 0.9em; }

/* contracts */
.due { border-left: 5px solid var(--line-strong); }
.due.soon { border-left-color: var(--warn); }
.due.urgent, .due.overdue { border-left-color: var(--bad); }
.due.ok { border-left-color: var(--ok); }
.days { font-family: var(--font-head); font-size: 1.2rem; font-weight: 600; white-space: nowrap; text-align: right; min-width: 4.5em; line-height: 1.1; }
.days span { display: block; font-family: var(--font-body); font-size: 0.72rem; color: var(--muted); font-weight: 500; }
.days.overdue { color: var(--bad); }
.days.urgent { color: var(--bad); }
.days.soon { color: var(--warn); }
span.type { display: inline-block; }
.type::first-letter { text-transform: uppercase; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; }
.kv dt { color: var(--muted); font-size: 0.9rem; }
.kv dd { margin: 0; }
.files li { align-items: center; }
.files .meta { font-size: 0.8rem; }
.inline-form { display: flex; gap: 8px; align-items: center; margin: 8px 0 0; }
.inline-form input[type=file] { flex: 1; }
.outcome-form .conditional { display: none; }
.outcome-form.keep .conditional { display: block; }
.saving { color: var(--ok); font-weight: 600; }
.saving.neg { color: var(--bad); }
.filters { display: flex; gap: 8px; margin: 8px 0 12px; }
.filters select { width: auto; flex: 1; }
.total-row td { font-weight: 600; background: var(--paper); }

/* inventory */
.actions-row { align-items: stretch; }
.actions-row .card { margin: 0; }
.actions-row h3 { margin-top: 0; }
@media (max-width: 520px) { .actions-row { flex-direction: column; } }
.count-list li { align-items: center; }
.count-list form { flex: 0 0 auto; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.range label { display: inline-flex; align-items: center; gap: 8px; }
.range select { width: auto; }

/* quotes & invoices */
.badge.state-overdue, .badge.state-expired, .badge.state-declined { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge.state-paid, .badge.state-accepted { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge.state-part-paid { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.state-sent { background: var(--info-soft); color: var(--info); border-color: transparent; }
.due.info { border-left-color: var(--info); }
h1 .badge { font-size: 0.8rem; vertical-align: middle; }
.lines { list-style: none; margin: 10px 0 0; padding: 0; }
.lines li { border-top: 1px dashed var(--line); padding: 8px 0; }
.lines li:first-child { border-top: 0; }
.lines .desc { font-weight: 600; }
.lines .row { margin-top: 6px; align-items: center; }
.lines .line-total { flex: 1; text-align: right; font-weight: 600; white-space: nowrap; }
.lines .unit { flex: 0 0 auto; }
.totals { display: flex; justify-content: flex-end; gap: 16px; margin-top: 10px; font-size: 1.05rem; }
.doc-lines .grand td { font-size: 1.05rem; }
.save-row > button { flex: 1; }
.history { margin: 10px 0 0; padding-left: 0; list-style: none; font-size: 0.9rem; color: var(--muted); }
.history li { padding: 3px 0; }
.history .when { display: inline-block; min-width: 9.5em; }

/* admin: bill check screen */
.check-layout { display: flex; gap: 14px; align-items: flex-start; }
.check-layout > * { flex: 1; min-width: 0; }
.doc-image img { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 760px) { .check-layout { flex-direction: column; } .doc-image img { max-height: 42vh; width: auto; max-width: 100%; } }
.uncertain { border-color: var(--warn) !important; background: var(--warn-soft) !important; }
.bill-line { margin-top: 6px; }
.bill-line input, .bill-line select { min-height: 40px; padding: 6px 8px; font-size: 0.95rem; }
fieldset:disabled input, fieldset:disabled select { background: var(--paper); color: var(--muted); }

/* orders: lines coloured by status */
.line { border-left: 5px solid var(--muted); }
.line.status-requested { border-left-color: var(--bad); }
.line.status-ordered { border-left-color: var(--warn); }
.line.status-arrived { border-left-color: var(--info); }
.line.stock.status-requested { border-left-color: var(--warn); }
.line.status-collected { border-left-color: var(--ok); }
.line.status-cancelled { border-left-color: var(--line-strong); opacity: 0.7; }
.line-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.line .actions { margin-top: 10px; }
.line .actions form { margin: 0; }
.line .actions details { margin-top: 8px; }
.line .actions summary { color: var(--muted); cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.totals { font-weight: 600; }
.line-entry { padding: 10px 0; border-top: 1px dashed var(--line); }
.line-entry:first-of-type { border-top: 0; padding-top: 0; }
.slip { max-width: 30rem; }
.slip table td, .slip table th { padding: 6px 8px; }
.slip .sum { text-align: right; font-weight: 600; }
.slip footer { margin-top: 16px; color: var(--muted); font-size: 0.85rem; }

/* bookings */
.diary-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .diary-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }
.diary-grid h3 { margin: 6px 0; }
.slot-chips { flex-wrap: wrap; overflow: visible; }
.hours-row input { min-height: 38px; padding: 4px 8px; }
.hours { margin: 6px 0; }
label.chip { border: 1px solid var(--line-strong); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }

/* your numbers, explained */
.card.explained ul { margin: 0; padding-left: 1.1em; }
.card.explained li { margin: 6px 0; line-height: 1.45; }
.card.explained li::marker { color: var(--accent); }

/* orders: when chips, whole-order buttons, pick list */
.when-chips { margin: 8px 0; }
.when-chips form { display: inline; margin: 0; }
.when-chips select { margin-top: 8px; }
details.inline { display: inline-block; }
details.inline > summary { list-style: none; cursor: pointer; }
details.inline > summary::-webkit-details-marker { display: none; }
details.inline[open] > summary { margin-bottom: 8px; }
details.inline .chips form { display: inline; }
.more-details > summary { color: var(--muted); cursor: pointer; min-height: 40px; display: flex; align-items: center; }
.line-entry .more { margin-top: 6px; }
.list .actions form.row { gap: 6px; }
.list .actions form.row input { min-height: 40px; width: 5.5em; padding: 6px 8px; }
.chips.when-row { align-items: center; }
.chips.when-row input[type=date] { min-height: 34px; padding: 2px 6px; font-size: 0.9rem; border: 0; background: transparent; width: 9.5em; }
a.chip { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; color: inherit; }
a.chip.picked { color: #fff; }
.list.pick li { flex-wrap: wrap; }
.list.pick li .actions { flex-basis: 100%; justify-content: flex-end; margin-top: 6px; }
a.chip.picked .meta { color: rgba(255,255,255,.8); }
