.service-workspace { width: min(1160px, calc(100vw - 32px)); }
.service-workspace .modal-body { min-height: 0; }
.service-action-bar { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface, #fff); }
.service-action-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.service-action-total { text-align: right; flex-shrink: 0; }
.service-action-total small, .service-action-total strong { display: block; }
.service-action-total small { color: var(--muted); font-size: 11px; }
.service-action-total strong { font-size: 18px; }
.service-workspace .own-service-line > .service-line-assignment { display: none; }
.service-workspace .billing-line-labels, .service-workspace .billing-line-row { grid-template-columns: minmax(150px, 1fr) minmax(200px, 1.5fr) 65px 110px 72px 72px; }
.service-workspace .price-information-line-head, .service-workspace .price-information-line { grid-template-columns: minmax(130px, 1fr) minmax(170px, 1.4fr) 60px 70px 90px 65px 95px 72px; }
.service-workspace .billing-line-row { border-radius: 0; border-width: 0 0 1px; background: transparent; }
.service-workspace .line-editor { gap: 0; }
.service-row-actions { display: flex; gap: 4px; align-items: center; grid-column: -2 / -1; }
.service-row-actions .icon-button { width: 32px; height: 34px; flex-shrink: 0; }
.service-row-actions .icon-button:last-child { color: #96424c; }
.service-line-details { grid-column: 1 / -1; min-width: 0; }
.service-line-details summary { cursor: pointer; color: var(--muted); font-size: 12px; padding: 4px 0; overflow-wrap: anywhere; }
.service-workspace .service-line-details .service-line-assignment { margin: 8px 0; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); padding: 8px; }
.service-line-details .service-line-assignment > span, .service-line-details .service-line-assignment > small { display: none; }
.service-line-details label { min-width: 0; }
.service-workspace .service-line-added { background: #edf7f3; box-shadow: inset 3px 0 #38856a; }
.service-catalog { width: min(940px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 6px; color: var(--text, #29373b); background: var(--surface, #fff); }
.service-catalog[open] { display: flex; flex-direction: column; }
.service-catalog::backdrop { background: rgb(25 31 35 / 45%); }
.service-catalog header, .service-catalog footer { display: flex; align-items: center; gap: 10px; padding: 14px 18px; flex-shrink: 0; }
.service-catalog header { justify-content: space-between; border-bottom: 1px solid var(--line); }
.service-catalog h2 { margin: 0; font-size: 18px; }
.service-catalog footer { border-top: 1px solid var(--line); flex-wrap: wrap; }
.service-catalog footer > span { margin-right: auto; font-size: 13px; }
.service-catalog-filters { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; padding: 12px 18px; }
.service-catalog label { font-size: 12px; min-width: 0; }
.service-catalog input:not([type="checkbox"]), .service-catalog select { display: block; width: 100%; min-width: 0; min-height: 40px; padding: 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface, #fff); color: inherit; }
.service-catalog-list { overflow-y: auto; min-height: 0; height: min(460px, 52dvh); padding: 0 18px; overscroll-behavior: contain; }
.service-catalog-item { display: grid; grid-template-columns: minmax(0, 1fr) 130px 72px; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.service-catalog-item > label:first-child { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.service-catalog-item strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.service-catalog-item small { display: block; font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.service-catalog-image { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; background: #eff4f2; border-radius: 4px; }
.service-catalog-image img { width: 100%; height: 100%; object-fit: contain; }
.service-catalog-image svg { width: 20px; height: 20px; color: #487467; }
.service-catalog-price { text-align: right; font-size: 14px; }
.service-catalog input[type="checkbox"] { width: 18px; height: 18px; flex-shrink: 0; }
@media (max-width: 800px) {
  .service-workspace .billing-line-labels, .service-workspace .price-information-line-head { display: none; }
  .service-workspace .billing-line-row, .service-workspace .price-information-line { grid-template-columns: repeat(2, minmax(0, 1fr)) 72px; }
  .service-workspace [data-line-item], .service-workspace [data-line-description], .service-workspace [data-price-item], .service-workspace [data-price-description] { grid-column: 1 / -1; }
  .service-workspace .service-line-details .service-line-assignment { grid-template-columns: 1fr; }
  .service-workspace .service-row-actions { grid-column: 3; }
  .service-action-bar { align-items: stretch; padding: 10px 12px; flex-wrap: wrap; }
  .service-action-buttons { display: grid; grid-template-columns: 1fr 1fr; flex: 1 1 100%; }
  .service-action-buttons > :first-child { grid-column: 1 / -1; }
  .service-action-buttons .button { justify-content: center; }
  .service-action-total { display: flex; width: 100%; justify-content: space-between; align-items: center; }
  .service-catalog-filters { grid-template-columns: 1fr; gap: 8px; }
  .service-catalog-item { grid-template-columns: minmax(0, 1fr) 72px; gap: 8px; }
  .service-catalog-item > label:first-child { grid-column: 1 / -1; }
  .service-catalog-price { text-align: left; padding-left: 30px; }
  .service-catalog footer { padding: 10px; }
  .service-catalog footer > span { flex-basis: 100%; }
}
