.expense-entry {
    border-top: 1px solid var(--line);
    padding: 18px 0;
}

.expense-entry:first-child {
    border-top: 0;
    padding-top: 4px;
}

.expense-entry .row {
    margin-bottom: 14px;
}

.expense-saved {
    border-bottom: 1px solid var(--line);
}

.expense-saved .record-item {
    border-bottom: 0;
}

.expense-edit-form {
    background: var(--bg);
    border-radius: 12px;
    margin-bottom: 18px;
    padding: 16px;
}

.registration-input {
    text-transform: uppercase;
}

.report-section { margin-top: 20px; }
.report-filters { margin-bottom: 20px; }
.category-row { margin: 20px 0; }
.bar { background: var(--line); border-radius: 99px; height: 8px; margin-top: 8px; overflow: hidden; }
.bar span { background: var(--green); display: block; height: 100%; border-radius: inherit; }
.select-all { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.select-all input, .expense-check { width: 18px; height: 18px; }
.payment-bar { align-items: center; background: #edf5f0; border-radius: 14px; display: flex; justify-content: space-between; gap: 20px; margin-top: 22px; padding: 18px; }
.payment-bar strong { display: block; font: 800 28px Manrope; }
.invoice-item { border-bottom: 1px solid var(--line); padding: 18px 0; }
.invoice-item:last-child { border-bottom: 0; }
.notification-item { align-items: flex-start; border-bottom: 1px solid var(--line); color: inherit; display: flex; gap: 14px; padding: 18px; text-decoration: none; }
.notification-item.unread { background: #edf7f1; }
.notification-item p { margin: 3px 0; }
.notification-icon { font-size: 24px; }
.driver-filters { margin-bottom: 20px; }
.filter-actions { display: flex; gap: 10px; }
.passcode-card { align-items: center; background: #173e2d; border-radius: 18px; color: white; display: flex; justify-content: space-between; margin-bottom: 20px; padding: 24px; }
.passcode-card .eyebrow, .passcode-card p { color: #c9d6cf; }
.passcode-card strong { display: block; font: 800 38px Manrope; letter-spacing: .18em; margin: 8px 0; }
.passcode-card p { margin: 0; }
@media(max-width:760px) { .passcode-card { align-items: stretch; flex-direction: column; gap: 16px; } }
.passcode-inline { align-items: center; display: flex; gap: 8px; }
.passcode-inline code { background: var(--bg); border-radius: 7px; font-size: 15px; font-weight: 800; letter-spacing: .1em; padding: 7px; }
.totals-grid, .daily-results { display: grid; gap: 12px; grid-template-columns: repeat(2,1fr); margin: 18px 0; }
.totals-grid div, .daily-results div { background: var(--bg); border-radius: 10px; padding: 12px; }
.totals-grid span, .daily-results span { color: var(--muted); display: block; font-size: 12px; }
.totals-grid strong, .daily-results strong { display: block; font: 800 20px Manrope; margin-top: 3px; }
.daily-tabs { background: var(--card); border: 1px solid var(--line); border-radius: 15px; display: flex; gap: 6px; margin: 20px 0; padding: 6px; position: sticky; top: 126px; z-index: 20; box-shadow: 0 5px 18px rgba(22,53,36,.06); }
.daily-tab { background: transparent; color: var(--muted); flex: 1; }
.daily-tab.active { background: var(--green); color: white; }
.daily-panel { margin-top: 0 !important; }
.daily-panel[hidden] { display: none !important; }
.edit-lock { border-color: #efc56d; margin: 20px 0; }
.payment-calculation { max-width: none; width: 100%; }
.earnings-stats { margin-top: 20px; }
.earnings-primary { background: var(--green-950); color: white; }
.earnings-primary .eyebrow, .earnings-primary .hint { color: #bed1c6; }
.earnings-primary strong { color: var(--lime); }
.gst-notice { background: #fff7dc; color: #765400; margin: 20px 0 0; }
.earnings-mini { background: var(--bg); border-radius: 14px; padding: 16px; }
.earnings-mini span { color: var(--muted); display: block; font-size: 12px; font-weight: 700; }
.earnings-mini strong { display: block; font: 800 24px Manrope; margin-top: 4px; }
.driver-profile-link { color: inherit; text-decoration: none; }
.driver-profile-link:hover strong { color: var(--green-700); text-decoration: underline; }
.clickable-row { cursor: pointer; }
.clickable-row:hover { background: #f5f8f5; }
.driver-profile-hero .row { align-items: flex-start; }
.assignment-current { background: var(--bg); border-radius: 14px; margin: 16px 0; padding: 16px; }
.assignment-current h3 { margin: 4px 0 10px; }
.assignment-form { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
.assignment-form .field { margin-bottom: 12px; }
.completed-day-card h2 { margin-bottom: 20px; }
.completed-day-metrics { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.completed-day-metric { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.completed-day-metric span { color: var(--muted); display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.completed-day-metric strong { display: block; font: 800 25px Manrope; letter-spacing: -.03em; }
.completed-day-metric small { color: var(--muted); display: block; font-size: 12px; margin-top: 6px; }
.completed-day-metric.highlight { background: var(--green-950); border-color: var(--green-950); color: white; }
.completed-day-metric.highlight span, .completed-day-metric.highlight small { color: #bed1c6; }
.completed-day-metric.highlight strong { color: var(--lime); }
.driver-shortcuts { margin: -10px 0 20px; }
.print-only { display: none; }

@media print {
    @page { size: A4 portrait; margin: 14mm 12mm 16mm; }
    html, body { color: #17221c; font-family: Arial, sans-serif; font-size: 9.5pt; }
    .no-print, .report-heading, .report-filters, .driver-shortcuts { display: none !important; }
    .print-only { display: block !important; }
    .pdf-report-header { border-bottom: 2px solid #196c45; margin-bottom: 8mm; padding-bottom: 5mm; }
    .pdf-report-header > div:first-child { display: flex; align-items: baseline; justify-content: space-between; }
    .pdf-report-header > div:first-child strong { color: #196c45; font: 800 20pt Manrope, Arial; letter-spacing: -.04em; }
    .pdf-report-header > div:first-child span { color: #6f7f76; font-size: 11pt; font-weight: 700; }
    .pdf-report-meta { display: grid; gap: 2mm 5mm; grid-template-columns: 24mm 1fr 27mm 1fr; margin-top: 5mm; }
    .pdf-report-meta span { color: #6f7f76; font-size: 8pt; font-weight: 700; text-transform: uppercase; }
    .pdf-report-meta strong { font-size: 9pt; }
    .report-section { margin-top: 5mm !important; }
    .completed-day-metrics { gap: 3mm; grid-template-columns: repeat(4, 1fr); margin: 0; }
    .completed-day-metric { border: 1px solid #d9e2dc; border-radius: 2mm; padding: 3mm; }
    .completed-day-metric span { font-size: 7.5pt; margin-bottom: 1mm; }
    .completed-day-metric strong { font-size: 14pt; }
    .completed-day-metric.highlight { background: #123c2c !important; color: #fff !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .card { border: 1px solid #d9e2dc; border-radius: 2mm; padding: 4mm; }
    .card h2 { font-size: 13pt; margin: 0 0 2mm; }
    .calculation-row { min-height: 8mm; padding: 2mm 1mm; }
    .final-total { background: #edf6f0 !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .gst-notice { margin-top: 3mm; padding: 3mm; }
    .pdf-daily-breakdown { overflow: visible; }
    table { font-size: 7.5pt; width: 100%; }
    thead { display: table-header-group; }
    tr { break-inside: avoid; }
    th { background: #edf6f0 !important; color: #405048; padding: 2.5mm 2mm; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    td { padding: 2.5mm 2mm; }
    .pdf-daily-breakdown p { color: #6f7f76; font-size: 8pt; }
    .pdf-disclaimer { border-top: 1px solid #d9e2dc; color: #6f7f76; font-size: 7.5pt; margin-top: 5mm; padding-top: 3mm; }
    .container:after { bottom: 4mm; color: #7a877f; content: "RoadLedger - Driver report  |  Page " counter(page); font-size: 7pt; left: 12mm; position: fixed; right: 12mm; text-align: center; }
}
.completed-day-action { margin-top: 20px; }
@media(max-width:760px) {
    .completed-day-metrics { grid-template-columns: 1fr; }
    .completed-day-action { display: block; text-align: center; width: 100%; }
}
.calculation-row { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; padding: 14px 4px; }
.calculation-row strong { font: 800 18px Manrope; white-space: nowrap; }
.calculation-row.deduction strong { color: var(--red); }
.calculation-row.addition strong { color: var(--green); }
.calculation-row.subtotal { background: var(--bg); border-radius: 9px; margin: 6px 0; padding: 14px; }
.calculation-row.muted-row { color: var(--muted); }
.calculation-row.final-total { background: #173e2d; border: 0; border-radius: 12px; color: white; margin-top: 14px; padding: 18px; }
.calculation-row.final-total strong { color: var(--lime); font-size: 26px; }
.calculation-formula { font-size: 12px; margin: 14px 4px 0; text-align: right; }
@media(max-width:760px) {
    .drivers-heading p { margin-bottom: 2px; }
    .driver-filters { padding: 16px; }
    .driver-filters .grid { gap: 0; }
    .driver-filters .field { margin-bottom: 14px; }
    .filter-actions > * { flex: 1; }
    .daily-tabs { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; top: 68px; margin: 14px 0; scrollbar-width: none; }
    .daily-tabs::-webkit-scrollbar { display: none; }
    .daily-tab { flex: 0 0 auto; min-height: 44px; scroll-snap-align: start; white-space: nowrap; }
    .passcode-inline { justify-content: flex-end; }
    .passcode-inline code { font-size: 14px; }
    .expense-edit-form { margin-left: -6px; margin-right: -6px; }
    .calculation-row { align-items: flex-start; }
    .calculation-row span { font-size: 13px; }
    .calculation-row strong { font-size: 16px; }
    .calculation-row.final-total strong { font-size: 22px; }
}

@media(max-width:390px) {
    .filter-actions { flex-direction: column; }
    .filter-actions > * { width: 100%; }
    .calculation-row { gap: 12px; }
    .calculation-row span { max-width: 64%; }
}
.daily-results { grid-template-columns: repeat(5,1fr); margin-top: 20px; }
@media(max-width:760px) { .daily-results { grid-template-columns: repeat(2,1fr); } }

@media(max-width:760px) { .payment-bar { align-items: stretch; flex-direction: column; } }

@media print {
    header, nav, .report-filters, .report-heading .mobile-actions { display: none !important; }
    body { background: white; }
    .container { max-width: none; padding: 0; }
    .card { box-shadow: none; break-inside: avoid; }
    a { color: inherit; text-decoration: none; }
}
