:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #eef3ef; color: #15241d; }
* { box-sizing: border-box; }
body { margin: 0; }
main { width: min(920px, 100%); margin: 0 auto; padding: 28px 16px 64px; }
header { padding: 20px 4px; }
header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
header .eyebrow, header h1 { flex-basis: 100%; }
h1 { margin: 4px 0 10px; font-size: clamp(1.8rem, 7vw, 3rem); }
h2 { margin-top: 24px; }
.eyebrow { margin: 0; color: #287251; font-weight: 700; letter-spacing: .05em; }
.card { margin-top: 18px; padding: 20px; background: white; border-radius: 18px; box-shadow: 0 8px 28px #18392b12; }
.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
form label, .form-grid label { display: grid; gap: 6px; margin-bottom: 14px; font-weight: 650; }
input, select, textarea { width: 100%; max-width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid #aab9b0; border-radius: 8px; background: white; font: inherit; }
textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 0 14px; }
.form-grid label { min-width: 0; }
.check { display: flex; align-items: center; grid-template-columns: auto 1fr; }
.check input { min-height: auto; }
nav { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0; background: #eef3efee; backdrop-filter: blur(8px); }
.nav-button { flex: 1 1 140px; background: #dce7e0; color: #18392b; }
.nav-button.active { background: #18392b; color: white; }
.status { padding: 10px 12px; border-radius: 10px; background: #edf0ee; }
.status.ok { background: #dff5e7; color: #17623f; }
.status.warn { background: #fff0cf; color: #6a4b08; }
.picker { display: block; margin-top: 18px; padding: 22px; border: 2px dashed #7a9a89; border-radius: 14px; text-align: center; font-weight: 700; }
.picker input { display: block; width: 100%; margin-top: 14px; }
.hint { color: #5b685f; font-size: .9rem; }
button { width: 100%; min-height: 50px; border: 0; border-radius: 12px; background: #18392b; color: white; font-size: 1rem; font-weight: 700; }
button:disabled { opacity: .5; }
.secondary { margin-top: 10px; background: #dce7e0; color: #18392b; }
#save { margin-top: 18px; }
.danger { background: #922f2f; color: white; }
.compact { width: auto; min-height: 36px; padding: 5px 10px; font-size: .85rem; }
.message { margin-top: 14px; color: #8b2424; }
#userbar { display: flex; align-items: center; gap: 10px; }
#message { margin-top: 14px; }
.hidden, #userbar.hidden { display: none; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 8px; border-bottom: 1px solid #dce4df; text-align: left; white-space: nowrap; }
td input { min-width: 170px; }
td input.number { min-width: 90px; width: 100px; }
th { color: #536259; font-size: .85rem; }
.confidence-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; font-size: .78rem; }
.confidence-legend span { padding: 5px 8px; border-radius: 7px; }
.legend-high, input.confidence-high { background: #dff5e7; border-color: #65a981; }
.legend-medium, input.confidence-medium { background: #fff0c9; border-color: #d2a94d; }
.legend-low, input.confidence-low { background: #fde0e0; border-color: #d87979; }
details { margin-top: 18px; }
summary { cursor: pointer; font-weight: 700; }
pre { max-height: 420px; overflow: auto; padding: 14px; border-radius: 10px; background: #101713; color: #eaf2ed; white-space: pre-wrap; word-break: break-word; }
.receipt-row { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid #dce4df; }
.receipt-row div { display: grid; gap: 6px; }
.receipt-row div:last-child { justify-items: end; }
.receipt-row small { color: #627067; }
.corrected { display: block; color: #9a6500; font-size: .72rem; }
.receipt-summary { display: grid; justify-items: end; gap: 8px; }
.receipt-actions { display: flex !important; align-items: center; justify-content: flex-end; gap: 8px; }
.button-link { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; margin-top: 0; padding: 5px 12px; border-radius: 12px; text-decoration: none; font-weight: 700; }
.monthly-controls { display: grid; grid-template-columns: minmax(150px, 1fr) auto auto; align-items: end; gap: 8px; margin-bottom: 12px; }
.monthly-controls label { display: grid; gap: 6px; font-weight: 650; }
.monthly-controls .secondary { margin-top: 0; }
.month-summary { margin: 10px 0 16px; padding: 10px 12px; border-radius: 9px; background: #edf3ef; font-weight: 700; }
.settings-section { min-width: 0; margin: 18px 0; padding: 16px; border: 1px solid #ccd9d1; border-radius: 12px; background: #f7faf8; }
.settings-section legend { padding: 0 7px; color: #18392b; font-size: 1.05rem; font-weight: 750; }
.settings-section > label { display: grid; gap: 6px; margin-bottom: 16px; font-weight: 650; }
.settings-section > label:last-child { margin-bottom: 0; }
.report-settings #send-monthly-email { margin-top: 18px; }
@media (max-width: 520px) {
  .monthly-controls { grid-template-columns: 1fr 1fr; }
  .monthly-controls label { grid-column: 1 / -1; }
}
