.ws-detail-trigger {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; min-height: 40px; padding: 8px; border-radius: 6px;
    color: var(--kl-muted, #737373);
}
.ws-detail-trigger:hover { background: var(--kl-canvas, #f7f7f4); color: var(--kl-ink, #111); }
.ws-detail-modal { background: var(--kl-surface, #fff); color: var(--kl-ink, #111); }
.modal--center .modal-container.ws-detail-modal { max-width: 960px !important; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.ws-detail-modal .modal-header { padding: 20px 24px; }
.ws-detail-modal .modal-body { padding: 0 24px 24px; }
.ws-details { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.ws-details > section { padding: 20px 0; border-bottom: 1px solid var(--kl-border, #e7e5e4); }
.ws-details > section:last-child { border-bottom: 0; padding-bottom: 0; }
.ws-details :is(h3,h4,h5,p,dl,ol) { margin-top: 0; }
.ws-details h3 { margin-bottom: 4px; font-size: 14px; font-weight: 500; letter-spacing: -.01em; }
.ws-details h4, .ws-details h5 { margin-bottom: 4px; font-size: 13px; font-weight: 500; }
.ws-details :is(button,summary):focus-visible, .ws-detail-trigger:focus-visible { outline: 2px solid var(--kl-action, #111); outline-offset: 3px; }
.ws-muted, .ws-section-heading p, .ws-overview-title p, .ws-event-heading p, .ws-explanation { color: var(--kl-muted, #737373); font-size: 13px; }
.ws-overview-title, .ws-section-heading, .ws-event-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.ws-overview-title h3 { margin: 2px 0 4px; font-size: 18px; font-weight: 600; }
.ws-eyebrow { color: var(--kl-muted, #737373); font-size: 12px; font-weight: 500; }
.ws-status, .ws-version-tag, .ws-registration-type {
    display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px;
    border: 1px solid var(--kl-border, #e7e5e4); border-radius: 6px;
    background: var(--kl-canvas, #f7f7f4); color: var(--kl-muted, #737373);
    font-size: 12px; font-weight: 500; white-space: nowrap;
}
.ws-status--approved { border-color: #bbd4b7; background: #eef4eb; color: #3f6339; }
.ws-status--rejected { border-color: #dfbeb7; background: #f8eeec; color: #864b42; }
.ws-status--pending, .ws-status--proposed, .ws-status--in_review, .ws-status--changes_requested, .ws-status--reopened { border-color: #dfcfb0; background: #f6f0e5; color: #725b31; }
.ws-fields { margin-bottom: 0; }
.ws-fields > div { display: grid; grid-template-columns: minmax(120px,1fr) minmax(0,2fr); gap: 16px; padding: 3px 0; }
.ws-fields dt { color: var(--kl-muted, #737373); }
.ws-fields dd { margin: 0; white-space: pre-wrap; }
.ws-overview-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 32px; margin-top: 12px; }
.ws-section-heading > span { color: var(--kl-muted, #737373); font-size: 12px; }
.ws-time-table { margin-top: 12px; overflow: hidden; border: 1px solid var(--kl-border, #e7e5e4); border-radius: 8px; }
.ws-time-row { display: grid; grid-template-columns: minmax(150px,1.25fr) repeat(4,minmax(105px,1fr)); border-top: 1px solid var(--kl-border, #e7e5e4); }
.ws-time-row:first-child { border-top: 0; }
.ws-time-row > span { min-width: 0; padding: 9px 12px; }
.ws-time-row > span:first-child { font-weight: 500; }
.ws-time-head { background: var(--kl-canvas, #f7f7f4); color: var(--kl-muted, #737373); font-size: 12px; }
.ws-time-head > span:first-child { font-weight: 400; }
.ws-financial { display: flex; justify-content: flex-end; margin-top: 8px; }
.ws-financial-fields { display: flex; gap: 24px; }
.ws-financial-fields > div { display: flex; grid-template-columns: none; gap: 8px; }
.ws-notes { margin-top: 8px; border-top: 1px solid var(--kl-border, #e7e5e4); }
.ws-note { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--kl-border, #e7e5e4); }
.ws-note:last-child { border-bottom: 0; }
.ws-note time { display: block; color: var(--kl-muted, #737373); font-size: 12px; }
.ws-note p { margin-bottom: 0; white-space: pre-wrap; }
.ws-version { margin-top: 8px; overflow: hidden; border: 1px solid var(--kl-border, #e7e5e4); border-radius: 8px; }
.ws-version > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 8px 12px; cursor: pointer; list-style: none; }
.ws-version > summary::-webkit-details-marker { display: none; }
.ws-version > summary::before { content: '›'; flex: 0 0 auto; color: var(--kl-muted, #737373); font-size: 18px; transition: transform .15s ease; }
.ws-version[open] > summary::before { transform: rotate(90deg); }
.ws-version > summary > span:first-of-type { min-width: 0; margin-right: auto; }
.ws-version > summary strong, .ws-version > summary small { display: block; }
.ws-version > summary small { margin-top: 2px; color: var(--kl-muted, #737373); font-size: 12px; font-weight: 400; }
.ws-version-state { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.ws-version-body { padding: 12px; border-top: 1px solid var(--kl-border, #e7e5e4); background: var(--kl-canvas, #f7f7f4); }
.ws-version-meta, .ws-calculation-fields, .ws-metadata { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 24px; }
.ws-human-detail { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--kl-border, #e7e5e4); }
.ws-human-detail h5 { margin-bottom: 8px; }
.ws-change-list { margin-bottom: 0; }
.ws-change-list > div { display: grid; grid-template-columns: 130px minmax(0,1fr); gap: 16px; padding: 5px 0; }
.ws-change-list dt { color: var(--kl-muted, #737373); }
.ws-change-list dd { display: flex; align-items: center; gap: 8px; margin: 0; }
.ws-change-list dd span { color: var(--kl-muted, #737373); text-decoration: line-through; }
.ws-timeline { position: relative; margin: 12px 0 0 5px; padding: 0 0 0 20px; border-left: 1px solid var(--kl-border, #e7e5e4); list-style: none; }
.ws-timeline > li { position: relative; padding: 0 0 20px; }
.ws-timeline > li:last-child { padding-bottom: 0; }
.ws-timeline-marker { position: absolute; top: 6px; left: -25px; width: 9px; height: 9px; border: 2px solid var(--kl-surface,#fff); border-radius: 50%; background: var(--kl-muted,#737373); }
.ws-event-heading time { color: var(--kl-muted, #737373); font-size: 12px; white-space: nowrap; }
.ws-event-description { margin: 6px 0; }
.ws-event-fields, .ws-event-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 24px; margin-top: 4px; }
.dark .ws-detail-modal { background: var(--kl-surface, #18181b); color: var(--kl-ink, #f4f4f5); }
.dark :is(.ws-status,.ws-version-tag,.ws-registration-type,.ws-time-head,.ws-version-body) { background: #202022; }
.dark .ws-status--approved { border-color: #3f6339; background: rgba(63,99,57,.2); color: #b9d5b4; }
.dark .ws-status--rejected { border-color: #864b42; background: rgba(134,75,66,.2); color: #e5bbb4; }
.dark :is(.ws-status--pending,.ws-status--proposed,.ws-status--in_review,.ws-status--changes_requested,.ws-status--reopened) { border-color: #725b31; background: rgba(114,91,49,.2); color: #dfcfb0; }
@media (max-width: 760px) {
    .ws-detail-modal :is(.modal-header,.modal-body) { padding-left: 16px; padding-right: 16px; }
    .ws-overview-title, .ws-section-heading, .ws-event-heading { gap: 12px; }
    .ws-overview-facts, .ws-version-meta, .ws-calculation-fields, .ws-metadata, .ws-event-fields, .ws-event-facts { grid-template-columns: 1fr; }
    .ws-time-table { border: 0; border-radius: 0; }
    .ws-time-head { display: none; }
    .ws-time-row { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px 16px; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--kl-border,#e7e5e4); border-radius: 8px; }
    .ws-time-row > span { padding: 0; }
    .ws-time-row > span:first-child { grid-column: 1/-1; margin-bottom: 4px; }
    .ws-time-row > span:nth-child(n+2)::before { display: block; color: var(--kl-muted,#737373); font-size: 11px; }
    .ws-time-row > span:nth-child(2)::before { content: 'Start'; }
    .ws-time-row > span:nth-child(3)::before { content: 'Slut'; }
    .ws-time-row > span:nth-child(4)::before { content: 'Pause'; }
    .ws-time-row > span:nth-child(5)::before { content: 'Arbejdstid'; }
    .ws-financial, .ws-financial-fields { display: block; }
    .ws-financial-fields > div { display: grid; margin-top: 4px; }
    .ws-note { grid-template-columns: 1fr; gap: 4px; }
    .ws-version > summary { align-items: flex-start; flex-wrap: wrap; }
    .ws-version-state { width: 100%; justify-content: flex-start; padding-left: 24px; }
    .ws-change-list > div, .ws-fields > div { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) { .ws-version > summary::before { transition: none; } }
