.project-service-overview {
  width: 100%;
  min-height: 66px;
  margin: -8px 0 18px;
  padding: 10px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #d8e3e8;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 3px 10px rgb(24 57 72 / 5%);
}

.project-service-overview:hover,
.project-service-overview:focus-visible {
  border-color: #50a886;
  background: #eefaf5;
  outline: none;
}

.project-service-overview:focus-visible { box-shadow: 0 0 0 3px rgb(32 166 118 / 17%); }
.project-service-overview-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: #dff5ec; color: #087354; font-size: 9px; font-weight: 950; }
.project-service-overview-copy { min-width: 0; }
.project-service-overview-copy strong, .project-service-overview-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-service-overview-copy strong { font-size: 11px; }
.project-service-overview-copy small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.project-service-overview-count { min-width: 25px; height: 25px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: #dff5ec; color: #087354; font-size: 9px; font-weight: 900; }

.compact-action-buttons { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.compact-action-buttons .open-project-detail { width: auto; }
.unconfigured-project-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.unconfigured-project-actions .button { margin-top: 0; }

.service-report-dialog {
  width: min(1500px, calc(100vw - 24px));
  height: calc(100vh - 24px);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #f8fafb;
  color: var(--ink);
  box-shadow: 0 30px 100px rgb(13 42 57 / 42%);
  overflow: hidden;
}

.service-report-dialog::backdrop { background: rgb(13 35 47 / 64%); backdrop-filter: blur(3px); }
.service-report-shell { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.service-report-header { min-height: 94px; padding: 17px 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, #e8f8f2, #f9fcfb); }
.service-report-header h2 { margin: 3px 0 2px; color: #083b4c; font-size: 24px; letter-spacing: -.03em; }
.service-report-header > div > p:last-child { margin: 0; color: var(--muted); font-size: 10px; }
.service-report-close { width: 38px; height: 38px; flex: none; border: 0; border-radius: 8px; background: #dcebe6; color: #4d6a62; font-size: 25px; line-height: 1; cursor: pointer; }
.service-report-close:hover { background: #cfe3dc; color: #163b31; }
.service-report-layout { min-height: 0; display: grid; grid-template-columns: 330px minmax(0, 1fr); }
.service-report-sidebar { min-height: 0; padding: 16px; border-right: 1px solid var(--line); background: #f4f8f7; overflow: auto; }
.service-report-create-actions { display: grid; gap: 8px; }
.service-report-create-actions button { min-height: 68px; padding: 10px; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 2px 10px; align-items: center; border: 1px solid #cfe0da; border-radius: 10px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.service-report-create-actions button:hover, .service-report-create-actions button:focus-visible { border-color: #50a886; background: #eefaf5; outline: none; }
.service-report-create-actions button > span { width: 36px; height: 36px; grid-row: 1 / 3; display: grid; place-items: center; border-radius: 9px; background: #dff5ec; color: #087354; font-size: 13px; font-weight: 950; }
.service-report-create-actions button:nth-child(2) > span { background: #e5f2fa; color: #0879be; }
.service-report-create-actions strong { align-self: end; font-size: 11px; }
.service-report-create-actions small { align-self: start; color: var(--muted); font-size: 8px; }
.service-report-list-head { margin: 22px 1px 9px; display: flex; align-items: baseline; justify-content: space-between; }
.service-report-list-head strong { font-size: 11px; }
.service-report-list-head small { min-width: 23px; padding: 3px 6px; border-radius: 999px; background: #dce7e3; color: #46665c; font-size: 8px; font-weight: 850; text-align: center; }
.service-report-list { display: grid; gap: 6px; }
.service-report-list > p { margin: 0; padding: 18px 9px; border: 1px dashed #c8d8d3; border-radius: 8px; color: var(--muted); font-size: 9px; line-height: 1.5; text-align: center; }
.service-report-list > p.service-report-list-error { border-color: #efb8b1; background: #fff5f4; color: var(--red); }
.service-report-list-item { width: 100%; min-height: 62px; padding: 8px; display: grid; grid-template-columns: 31px minmax(0, 1fr); gap: 4px 8px; align-items: center; border: 1px solid #d8e3df; border-radius: 8px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.service-report-list-item:hover, .service-report-list-item.active { border-color: #50a886; background: #eefaf5; }
.service-report-list-type { width: 31px; height: 31px; grid-row: 1 / 3; display: grid; place-items: center; border-radius: 7px; background: #dff5ec; color: #087354; font-size: 10px; font-weight: 950; }
.service-report-list-type.service { background: #e5f2fa; color: #0879be; }
.service-report-list-item strong, .service-report-list-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.service-report-list-item strong { font-size: 10px; }
.service-report-list-item small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.service-report-list-item em { width: fit-content; grid-column: 2; padding: 3px 6px; border-radius: 999px; font-size: 7px; font-style: normal; font-weight: 850; }
.service-report-list-item em.draft { background: #fff0c2; color: #7a5700; }
.service-report-list-item em.finalized { background: #dff5ec; color: #087354; }

.service-report-workspace { min-height: 0; padding: 0 26px 40px; background: #fff; overflow: auto; }
.service-report-empty { min-height: 100%; display: grid; align-content: center; justify-items: center; text-align: center; }
.service-report-empty > span { width: 66px; height: 66px; display: grid; place-items: center; border-radius: 18px; background: #dff5ec; color: #087354; font-size: 18px; font-weight: 950; }
.service-report-empty h3 { margin: 18px 0 7px; font-size: 19px; }
.service-report-empty p { max-width: 540px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.service-report-message { margin-top: 24px; padding: 16px; display: grid; gap: 4px; border-radius: 10px; }
.service-report-message.error { background: var(--red-soft); color: var(--red); }
.service-report-message strong { font-size: 12px; }
.service-report-message span { font-size: 10px; }

.service-report-form, .service-report-read { max-width: 1050px; margin: 0 auto; }
.service-report-form-head, .service-report-read-head { min-height: 104px; padding: 22px 0 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.service-report-form-head h3, .service-report-read-head h3 { margin: 3px 0; font-size: 22px; }
.service-report-form-head span, .service-report-read-head span { color: var(--muted); font-size: 9px; }
.service-report-draft-badge, .service-report-read-head em { flex: none; padding: 6px 9px; border-radius: 999px; background: #fff0c2; color: #7a5700; font-size: 8px; font-style: normal; font-weight: 900; text-transform: uppercase; }
.service-report-read-head em.finalized { background: #dff5ec; color: #087354; }
.service-report-draft-note { margin: 16px 0 0; padding: 11px 13px; display: grid; gap: 3px; border: 1px solid #e9cf83; border-left: 4px solid #d19a00; border-radius: 8px; background: #fffaf0; color: #715000; }
.service-report-draft-note strong { font-size: 9px; }
.service-report-draft-note span { font-size: 8px; line-height: 1.45; }
.service-report-form-section { padding: 22px 0; border-bottom: 1px solid var(--line); }
.service-report-section-title { margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.service-report-section-title > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: #e5f2fa; color: #0879be; font-size: 10px; font-weight: 950; }
.service-report-section-title h4 { margin: 0; font-size: 14px; }
.service-report-section-title p { margin: 2px 0 0; color: var(--muted); font-size: 8px; }
.service-report-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.service-report-field { min-width: 0; display: grid; gap: 5px; color: #3f5964; font-size: 8px; font-weight: 850; }
.service-report-field.wide { grid-column: 1 / -1; }
.service-report-field input, .service-report-field select, .service-report-field textarea, .service-task-row input, .service-task-row select, .service-report-mail-panel input { width: 100%; border: 1px solid #bfd0d6; border-radius: 7px; background: #fff; color: var(--ink); font: inherit; font-size: 10px; }
.service-report-field input, .service-report-field select, .service-task-row input, .service-task-row select, .service-report-mail-panel input { height: 38px; padding: 0 10px; }
.service-report-field textarea { min-height: 92px; padding: 10px; line-height: 1.5; resize: vertical; }
.service-report-field input[readonly] { background: #f3f6f7; color: var(--muted); }
.service-report-field input:focus, .service-report-field select:focus, .service-report-field textarea:focus, .service-task-row input:focus, .service-task-row select:focus, .service-report-mail-panel input:focus { border-color: #329bcf; outline: 3px solid rgb(50 155 207 / 13%); }
.service-task-list { display: grid; gap: 7px; }
.service-task-row { min-height: 60px; padding: 8px 9px; display: grid; grid-template-columns: minmax(220px, 1fr) 150px minmax(180px, .8fr); align-items: center; gap: 9px; border: 1px solid #dce6e9; border-radius: 8px; background: #fbfdfd; }
.service-task-row strong, .service-task-row small { display: block; }
.service-task-row strong { font-size: 9px; }
.service-task-row small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.signature-section { border-bottom: 0; }
.service-signature-wrap { min-height: 230px; position: relative; border: 2px dashed #9db7c0; border-radius: 12px; background: linear-gradient(#fff, #fbfdfd); overflow: hidden; }
.service-signature-wrap canvas { width: 100%; height: 220px; display: block; touch-action: none; cursor: crosshair; }
.service-signature-line { position: absolute; right: 12%; bottom: 34px; left: 12%; padding-bottom: 3px; border-bottom: 1px solid #a9bbc1; color: #84969d; font-size: 8px; text-align: center; pointer-events: none; }
.service-signature-wrap button { position: absolute; top: 9px; right: 9px; min-height: 29px; padding: 0 9px; border: 1px solid #cad8dc; border-radius: 6px; background: rgb(255 255 255 / 92%); color: #526b75; font-size: 8px; font-weight: 850; cursor: pointer; }
.service-signature-note { margin: 7px 2px 0; color: var(--muted); font-size: 8px; }
.service-report-form-status { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; font-size: 9px; font-weight: 800; }
.service-report-form-status.loading { background: #eef7fb; color: #08669e; }
.service-report-form-status.error { background: var(--red-soft); color: var(--red); }
.service-report-form-actions { padding: 0 0 26px; display: flex; justify-content: flex-end; gap: 8px; }

.service-report-read-meta { margin: 16px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.service-report-read-meta > div { padding: 10px; border: 1px solid #dce6e9; border-radius: 8px; background: #f8fbfc; }
.service-report-read-meta dt { color: var(--muted); font-size: 7px; font-weight: 850; text-transform: uppercase; }
.service-report-read-meta dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 10px; font-weight: 750; }
.service-report-read-section { padding: 18px 0; border-bottom: 1px solid var(--line); }
.service-report-read-section h4 { margin: 0 0 9px; font-size: 12px; }
.service-report-read-section > p { margin: 0; color: #36505b; font-size: 10px; line-height: 1.6; }
.service-report-read-tasks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.service-report-read-tasks > div { padding: 8px; display: grid; grid-template-columns: 25px minmax(0, 1fr); align-items: center; gap: 8px; border: 1px solid #dce6e9; border-radius: 7px; background: #fbfdfd; }
.service-report-read-tasks > div > span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: #fff0c2; color: #7a5700; font-size: 10px; font-weight: 950; }
.service-report-read-tasks > div > span.done { background: #dff5ec; color: #087354; }
.service-report-read-tasks > div > span.not_applicable { background: #e8eef1; color: #5b7079; }
.service-report-read-tasks p { margin: 0; min-width: 0; }
.service-report-read-tasks strong, .service-report-read-tasks small { display: block; }
.service-report-read-tasks strong { font-size: 8px; }
.service-report-read-tasks small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.service-report-signature-confirmed { margin: 18px 0; padding: 12px; display: flex; align-items: center; gap: 10px; border: 1px solid #a9d8c7; border-radius: 9px; background: #eefaf5; color: #087354; }
.service-report-signature-confirmed > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: #cdeedf; font-size: 15px; font-weight: 950; }
.service-report-signature-confirmed strong, .service-report-signature-confirmed small { display: block; }
.service-report-signature-confirmed strong { font-size: 10px; }
.service-report-signature-confirmed small { margin-top: 2px; font-size: 8px; }
.service-report-read-actions { display: flex; justify-content: flex-end; gap: 8px; }
.service-report-read-actions a { text-decoration: none; }
.service-report-mail-panel { margin: 18px 0 28px; padding: 14px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, auto); gap: 10px 20px; border: 1px solid #b9d9eb; border-radius: 10px; background: #f3faff; }
.service-report-mail-panel h4 { margin: 0; font-size: 12px; }
.service-report-mail-panel p { margin: 3px 0 0; color: #53707c; font-size: 8px; }
.service-report-mail-panel form { display: grid; grid-template-columns: minmax(190px, 1fr) auto; gap: 7px; }
.service-report-mail-panel [data-service-report-email-status] { grid-column: 1 / -1; padding: 8px; border-radius: 6px; font-size: 8px; font-weight: 800; }
.service-report-mail-panel [data-service-report-email-status].loading { background: #e5f2fa; color: #0879be; }
.service-report-mail-panel [data-service-report-email-status].error { background: var(--red-soft); color: var(--red); }
.service-report-deliveries { grid-column: 1 / -1; display: grid; gap: 4px; }
.service-report-deliveries span { padding: 6px 8px; border-radius: 6px; background: #e7f5ef; color: #087354; font-size: 8px; }
.service-report-deliveries span.failed { background: var(--red-soft); color: var(--red); }

@media (max-width: 900px) {
  .service-report-dialog { width: 100vw; height: 100vh; border-radius: 0; }
  .service-report-header { min-height: 82px; padding: 13px 14px; }
  .service-report-header h2 { font-size: 19px; }
  .service-report-layout { display: block; overflow: auto; }
  .service-report-sidebar { max-height: 300px; border-right: 0; border-bottom: 1px solid var(--line); }
  .service-report-workspace { overflow: visible; padding: 0 14px 30px; }
  .service-task-row { grid-template-columns: 1fr; }
  .service-report-fields, .service-report-read-meta, .service-report-read-tasks { grid-template-columns: 1fr; }
  .service-report-mail-panel { grid-template-columns: 1fr; }
  .service-report-mail-panel form { grid-template-columns: 1fr; }
  .service-report-form-actions { align-items: stretch; flex-direction: column; }
  .compact-action-buttons { grid-template-columns: 1fr; }
}
