.service-records-page { padding-bottom: 42px; }
.service-records-app { display: grid; gap: 18px; }
.service-records-intro, .service-records-notice, .service-records-panel, .service-print-sheet { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.service-records-intro, .service-records-notice, .service-records-panel { padding: 20px; }
.service-records-notice { border-color: #e9d9ab; background: #fff9e9; color: #594816; }
.service-records-notice p { margin: 5px 0 0; }
.service-records-toolbar, .service-records-actions, .service-records-row-actions, .service-line-heading { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.service-records-toolbar { justify-content: space-between; margin-bottom: 14px; }
.service-records-toolbar label { flex: 1 1 220px; }
.service-records-panel h2 { margin: 0 0 12px; }
.service-records-form { display: grid; gap: 16px; }
.service-records-fields, .service-records-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.service-records-fields label, .service-records-toolbar label, .service-line-item label { display: grid; gap: 6px; color: var(--ink); font-size: .92rem; font-weight: 650; }
.service-records-fields input, .service-records-fields select, .service-records-fields textarea, .service-records-toolbar input, .service-records-search, .service-line-item input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; }
.service-records-fields textarea { min-height: 84px; resize: vertical; }
.service-records-wide { grid-column: 1 / -1; }
.service-records-help { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.service-records-separator { padding-top: 14px; border-top: 1px solid var(--line); }
.service-line-list { display: grid; gap: 9px; }
.service-line-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, .34fr) auto; align-items: end; gap: 10px; }
.service-records-total { margin: 0; font-size: 1.12rem; font-weight: 750; text-align: right; }
.service-records-actions .button, .service-records-row-actions .button { min-height: 42px; }
.service-records-row-actions .button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.service-records-toolbar .service-records-actions { max-width: 100%; }
.service-records-toolbar .service-records-actions > * { max-width: 100%; }
.service-records-list { display: grid; gap: 12px; }
.service-record-card { display: grid; gap: 10px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.service-record-card h3, .service-record-card p { margin: 0; }
.service-record-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.service-record-badge { display: inline-flex; padding: 4px 9px; border-radius: 999px; background: #eaf3ed; color: #24563b; font-size: .8rem; font-weight: 700; }
.service-record-meta { display: flex; flex-wrap: wrap; gap: 7px 14px; color: var(--muted); font-size: .9rem; }
.service-record-empty { padding: 20px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
.service-print-sheet { display: none; }
.service-print-sheet h1 { margin: 0 0 6px; }
.service-print-sheet h2 { margin: 20px 0 8px; font-size: 1rem; }
.service-print-sheet p { margin: 5px 0; }
.service-print-sheet table { width: 100%; border-collapse: collapse; }
.service-print-sheet th, .service-print-sheet td { padding: 8px 6px; border-bottom: 1px solid #d8dee3; text-align: left; }
.service-print-controls { display: flex; gap: 10px; margin: 14px 0; }
.service-records-danger { color: #8b2525; }
@media (max-width: 680px) {
  .service-records-intro, .service-records-notice, .service-records-panel { padding: 15px; }
  .service-records-toolbar { align-items: stretch; }
  .service-records-toolbar > div:first-child { width: 100%; }
  .service-records-actions { width: 100%; }
  .service-records-actions .button { flex: 1 1 100%; justify-content: center; }
  .service-records-row-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .service-records-row-actions .button { width: 100%; min-width: 0; padding-inline: 8px; font-size: .82rem; }
  .service-records-fields, .service-records-grid { grid-template-columns: 1fr; }
  .service-records-wide { grid-column: auto; }
  .service-line-item { grid-template-columns: minmax(0, 1fr) minmax(100px, .4fr); }
  .service-line-item [data-remove-line] { grid-column: 1 / -1; justify-self: end; }
  .service-record-card-head { display: grid; }
}
@media print {
  body.service-print-mode > *:not(main), body.service-print-mode main > :not(#service-print-sheet) { display: none !important; }
  body.service-print-mode #service-print-sheet { display: block; border: 0; box-shadow: none; color: #111; font: 11pt/1.45 Arial, sans-serif; }
  body.service-print-mode .service-print-controls { display: none !important; }
  body.service-print-mode .service-records-page { width: auto; max-width: none; padding: 0; margin: 0; }
  body.service-print-mode .service-print-sheet table { page-break-inside: avoid; }
}
