:root {
  --log-deep: #102b26;
  --log-paper: #f7f6f2;
  --log-border: #d7ddd4;
  --log-muted: #485d54;
}
body { background: var(--log-paper); color: var(--log-deep); }
.log-container { width: min(1080px, calc(100% - 32px)); margin-inline: auto; }
.log-header { background: #fff; border-bottom: 1px solid var(--log-border); }
.log-header .log-container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; align-items: center; }
.log-header a { display: inline-flex; align-items: center; min-height: 48px; text-underline-offset: 4px; }
.log-brand { font-weight: 700; text-decoration: none; }
.log-intro { margin-block: 24px 18px; }
.log-intro h1 { font: 400 clamp(34px, 8vw, 58px)/1.04 Georgia, serif; letter-spacing: -.035em; margin: 0 0 8px; }
.log-intro p, .log-footer p { color: var(--log-muted); line-height: 1.5; margin: 0; }
.log-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-block: 0 12px; }
.log-totals > div { min-width: 0; border: 1px solid var(--log-border); padding: 10px 7px; background: #fff; border-radius: 5px; }
.log-totals .log-balance { background: #e2ebe1; }
.log-totals span, .log-totals strong { display: block; }
.log-totals span { font-size: 12px; margin-bottom: 5px; }
.log-totals strong { font-size: clamp(14px, 4vw, 25px); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.log-layout { display: grid; gap: 12px; }
.log-panel { min-width: 0; background: #fff; border: 1px solid var(--log-border); border-radius: 6px; padding: 14px; }
.log-panel h2 { font: 400 clamp(24px, 5vw, 32px)/1.12 Georgia, serif; margin: 0 0 12px; }
#entry-fields { padding: 0; border: 0; margin: 0; min-width: 0; display: grid; gap: 12px; }
#entry-fields legend, #entry-fields label, .log-receipt > p { font-size: 14px; font-weight: 650; }
#entry-fields legend { margin-bottom: 5px; }
.log-types, .log-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
/* Keep native iOS date picker within its column without clipping the picker. */
.log-field-row > label { min-width: 0; }
.log-panel input[type="date"] { display: block; box-sizing: border-box; min-width: 0; max-width: 100%; width: 100%; }
.log-panel input[type="date"]::-webkit-date-and-time-value { min-width: 0; text-align: left; }
@media (max-width: 520px) {
  .log-field-row { grid-template-columns: minmax(0, 1fr); }
}

.log-types label { display: flex; align-items: center; gap: 7px; min-height: 44px; border: 1px solid var(--log-border); border-radius: 4px; padding: 6px 8px; }
.log-types label:has(:checked) { background: #e2ebe1; border-color: #7b9885; }
.log-types input { accent-color: var(--log-deep); }
.log-panel input:not([type=radio], [type=file]) { width: 100%; min-width: 0; min-height: 44px; margin-top: 4px; border: 1px solid #a9b8ad; border-radius: 4px; padding: 8px; color: var(--log-deep); background: #fff; font: inherit; font-size: 16px; }
.log-optional { color: var(--log-muted); font-size: 13px; font-weight: 400; }
.log-receipt > p { margin: 0 0 5px; }
.log-attachment-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.log-button, .log-secondary, .log-file, .log-plain { font: inherit; min-height: 44px; cursor: pointer; border-radius: 4px; padding: 7px 11px; }
.log-button { background: var(--log-deep); color: #fff; border: 1px solid var(--log-deep); font-weight: 700; }
.log-secondary, .log-file { background: #f6f8f4; color: var(--log-deep); border: 1px solid #a9b8ad; font-weight: 650; }
.log-file { position: relative; display: inline-flex; align-items: center; }
.log-file:focus-within { outline: 2px solid var(--log-deep); outline-offset: 2px; }
.log-file input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.log-plain { background: transparent; color: var(--log-deep); border: 0; text-decoration: underline; text-underline-offset: 3px; }
.log-panel :disabled { opacity: .65; cursor: default; }
#receipt-name, .log-entries li { overflow-wrap: anywhere; }
.log-status { min-height: 1.4em; margin: 8px 0 0; color: var(--log-muted); font-size: 14px; }
.log-status[data-error] { color: #95241f; }
.log-timeline-head { display: flex; justify-content: space-between; align-items: center; gap: 5px 12px; flex-wrap: wrap; }
.log-timeline-head h2 { margin: 0; }
.log-entries { margin: 12px 0; padding: 0; list-style: none; }
.log-entries li { border-top: 1px solid var(--log-border); padding-top: 12px; }
.log-entry-line { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.log-entry-note { margin: 5px 0; }
.log-entry-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.log-footer { display: grid; gap: 8px; padding-block: 16px 28px; font-size: 13px; }
.log-footer a { width: fit-content; display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 4px; }
.log-next-step {display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:16px;margin:0 0 30px;padding:20px;border:1px solid #bdc9be;border-left:3px solid #9b8353;border-radius:4px;background:#fff;}
.log-next-step > div {flex:1 1 320px;min-width:0;}
.log-next-step-label {margin:0 0 5px;color:#4b5a51;font-size:11px;font-weight:750;letter-spacing:.08em;}
.log-next-step h2 {margin:0 0 8px;font:400 clamp(22px,4.5vw,29px)/1.2 Georgia,serif;}
.log-next-step p:not(.log-next-step-label) {max-width:65ch;margin:0;color:#43554a;font-size:14px;line-height:1.6;}
.log-next-step .log-next-step-note {margin-top:6px!important;font-size:12px!important;}
.log-next-step-link {display:inline-flex;align-items:center;justify-content:center;min-height:44px;max-width:100%;padding:11px 14px;border-radius:3px;background:#102b26;color:#fff;font-size:14px;font-weight:700;text-align:center;text-decoration:none;white-space:normal;}
.log-next-step-link:hover {background:#1f4a3c;}
.log-next-step-link:focus-visible {outline:3px solid #a38a51;outline-offset:3px;}
@media(max-width:520px){.log-next-step {padding:16px}.log-next-step-link {width:100%;}}

@media (min-width: 700px) {
  .log-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; }
  .log-panel { padding: 22px; }
  .log-totals { gap: 12px; }
  .log-totals > div { padding: 14px 16px; }
}
