.ld-workspace { min-width: 0; color: #243851; }
.ld-topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.ld-topbar-title { display: grid; gap: 5px; min-width: 0; }
.ld-topbar-title small { color: #718196; font-size: 11px; }
.ld-topbar-title strong { color: #243851; font-size: 16px; }
.ld-topbar-actions { display: flex; align-items: center; justify-content: end; gap: 10px; flex-wrap: wrap; min-width: 0; }
.ld-topbar-actions .profile-name, .ld-topbar-actions .profile-role { overflow-wrap: anywhere; white-space: normal; }
.ld-inline-filter { max-width: 300px; margin-bottom: 14px; }
.ld-workspace *, .ld-modal * { box-sizing: border-box; }
.ld-heading { display: flex; justify-content: space-between; align-items: start; gap: 24px; margin: 22px 0; }
.ld-heading h2 { font-size: 28px; margin: 6px 0; letter-spacing: -.5px; }
.ld-heading p, .ld-note { font-size: 13px; color: #64748b; line-height: 1.6; }
.ld-heading p { margin: 6px 0; }
.ld-heading > .btn { flex-shrink: 0; }
.ld-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.ld-tabs .btn { white-space: normal; text-align: left; }
.ld-toolbar { display: grid; grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(130px, 1fr)); gap: 12px; margin: 20px 0; }
.ld-workspace .field, .ld-modal .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 12px; }
.ld-workspace input, .ld-workspace select, .ld-modal input, .ld-modal select, .ld-modal textarea { font: inherit; font-size: 14px; color: #243851; width: 100%; min-width: 0; max-width: 100%; min-height: 44px; background: #fff; border: 1px solid #dce5ee; border-radius: 9px; padding: 10px 12px; }
.ld-modal textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
.ld-modal select[multiple] { min-height: 110px; }
.ld-modal input[type=file] { white-space: normal; padding: 9px; }
.ld-modal .ld-checkbox { flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 10px; }
.ld-checkbox input[type=checkbox] { width: 20px; min-height: 20px; height: 20px; accent-color: #2d6dc4; }
.ld-workspace button:focus-visible, .ld-workspace a:focus-visible, .ld-workspace input:focus-visible, .ld-workspace select:focus-visible, .ld-modal textarea:focus-visible, .ld-workspace summary:focus-visible { outline: 3px solid #719ddd; outline-offset: 2px; }
.ld-workspace .btn, .ld-modal .btn { min-height: 42px; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.ld-workspace button:disabled, .ld-modal button:disabled { cursor: not-allowed; opacity: .6; }
.ld-summary { display: flex; align-items: center; gap: 30px; padding: 20px 22px; background: #f1f6fd; border: 1px solid #dce7f5; border-radius: 12px; }
.ld-summary > div { display: grid; gap: 3px; flex-shrink: 0; }
.ld-summary strong { font-size: 28px; color: #214c84; }
.ld-summary span, .ld-summary p { color: #526780; font-size: 13px; line-height: 1.5; }
.ld-summary p { margin-left: auto; max-width: 430px; }
.ld-counters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 14px 0 20px; }
.ld-counter { display: grid; gap: 7px; text-align: left; padding: 18px; border: 1px solid #dce5ee; border-top: 3px solid #7399c7; border-radius: 12px; background: #fff; cursor: pointer; color: #243851; font: inherit; }
.ld-counter:hover { box-shadow: 0 3px 12px #2438510d; background: #fcfdff; }
.ld-counter strong { font-size: 26px; }
.ld-counter span { font-size: 13px; line-height: 1.4; }
.ld-counter small { font-size: 11px; color: #64748b; }
.ld-counter.ld-overdue { border-top-color: #c85667; }
.ld-counter.ld-unconfirmed { border-top-color: #d5a04b; }
.ld-counter.ld-no_next_action { border-top-color: #9b85b9; }
.ld-callout { border-left: 3px solid #d5a04b; background: #fffbf2; padding: 12px 16px; }
.ld-section { margin-top: 26px; }
.ld-section h3 { font-size: 17px; margin: 0 0 14px; }
.ld-section-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin: 12px 0 16px; }
.ld-section-heading > div { min-width: 0; }
.ld-section-heading .field { min-width: min(250px, 100%); }
.ld-section-heading h2 { margin: 12px 0 6px; font-size: 24px; overflow-wrap: anywhere; }
.ld-section-heading h3, .ld-section-heading p { margin: 0; }
.ld-section-heading p { margin-top: 7px; }
.ld-table-wrap { overflow: hidden; border: 1px solid #dce5ee; border-radius: 12px; background: #fff; }
.ld-table { border-collapse: collapse; table-layout: fixed; width: 100%; }
.ld-table th, .ld-table td { text-align: left; vertical-align: top; padding: 15px 13px; border-bottom: 1px solid #e6ecf3; overflow-wrap: anywhere; word-break: normal; white-space: normal; font-size: 13px; line-height: 1.5; }
.ld-table thead th { font-size: 11px; color: #65768b; background: #f7f9fc; font-weight: 600; }
.ld-table tbody th { font-weight: 500; }
.ld-table th strong { font-weight: 650; }
.ld-table small { display: block; margin-top: 5px; color: #718196; font-weight: 400; font-size: 12px; }
.ld-table tr:last-child td, .ld-table tr:last-child th { border-bottom: 0; }
.ld-records thead th:nth-child(1) { width: 21%; }
.ld-records thead th:nth-child(2) { width: 17%; }
.ld-records thead th:nth-child(3) { width: 14%; }
.ld-records thead th:nth-child(4) { width: 17%; }
.ld-records thead th:nth-child(5) { width: 20%; }
.ld-records thead th:nth-child(6) { width: 11%; }
.ld-control-table thead th:nth-child(1) { width: 22%; }
.ld-control-table thead th:nth-child(2) { width: 28%; }
.ld-control-table thead th:nth-child(3) { width: 32%; }
.ld-control-table thead th:nth-child(4) { width: 18%; }
.ld-actions .btn { width: 100%; font-size: 12px; padding-inline: 10px; }
.ld-badge { display: inline-block; padding: 5px 8px; border-radius: 7px; background: #edf2f8; color: #526780; font-size: 11px; line-height: 1.4; font-weight: 600; margin-top: 4px; overflow-wrap: anywhere; }
.ld-badge.ld-overdue { background: #fff0f2; color: #ae3f50; }
.ld-badge.ld-upcoming { background: #edf4ff; color: #3267a6; }
.ld-badge.ld-unconfirmed { background: #fff4df; color: #96621d; }
.ld-badge.ld-no_next_action { background: #f3eff8; color: #7c5b9b; }
.ld-badge.ld-done { background: #eaf6ef; color: #2c7b54; }
.ld-badge.ld-review { background: #fff4df; color: #96621d; }
.ld-badge.ld-planned { background: #edf4ff; color: #3267a6; }
.ld-badge.ld-undated { background: #f3eff8; color: #7c5b9b; }
.ld-empty { padding: 28px 20px; border: 1px dashed #cbd7e5; border-radius: 12px; color: #6b7b91; background: #fbfcfe; font-size: 13px; line-height: 1.6; text-align: center; }
.ld-card { padding: 24px; margin-top: 14px; border: 1px solid #dce5ee; border-radius: 14px; background: #fff; min-width: 0; }
.ld-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 24px 0; }
.ld-facts dt { color: #718196; font-size: 12px; margin-bottom: 6px; }
.ld-facts dd { margin: 0; color: #243851; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.ld-description { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; font-size: 13px; }
.ld-next-action { padding: 16px 20px; border-radius: 10px; background: #f4f7fb; border-left: 3px solid #7899c2; }
.ld-next-action h3 { margin: 0; font-size: 13px; color: #61748e; }
.ld-next-action p { margin: 8px 0; font-size: 15px; overflow-wrap: anywhere; }
.ld-next-action strong { font-size: 13px; }
.ld-button-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: start; }
.ld-task-list, .ld-document-list, .ld-audit { list-style: none; margin: 0; padding: 0; }
.ld-task-list > li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(110px, 220px); gap: 20px; padding: 16px; border: 1px solid #e1e8f0; border-radius: 10px; margin-bottom: 10px; background: #fff; }
.ld-task-list h4 { margin: 8px 0; font-size: 14px; overflow-wrap: anywhere; }
.ld-task-list p { font-size: 13px; line-height: 1.5; margin: 6px 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.ld-task-list small, .ld-document-list small, .ld-audit small { display: block; color: #718196; font-size: 12px; line-height: 1.5; margin-top: 5px; overflow-wrap: anywhere; }
.ld-task-list .ld-button-group { justify-content: end; }
.ld-text-button { border: 0; padding: 8px 0 0; color: #376ca6; background: none; cursor: pointer; font: inherit; font-size: 12px; text-align: left; overflow-wrap: anywhere; }
.ld-document-list li { padding: 13px 0; border-bottom: 1px solid #e6ecf3; overflow-wrap: anywhere; }
.ld-document-list a { color: #3267a6; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.ld-audit li { padding: 14px 0 14px 18px; border-left: 2px solid #dce7f4; margin-left: 3px; font-size: 13px; overflow-wrap: anywhere; }
.ld-audit details { margin-top: 9px; }
.ld-audit summary { color: #64748b; cursor: pointer; }
.ld-audit pre { font-size: 11px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; background: #f7f9fc; padding: 12px; border-radius: 8px; max-height: 350px; overflow-y: auto; }
.ld-message, .ld-error, .ld-warning { padding: 13px 16px; border-radius: 10px; margin: 14px 0; line-height: 1.5; font-size: 13px; overflow-wrap: anywhere; }
.ld-message { background: #ecf8f1; color: #2b7b52; border: 1px solid #cce8d8; }
.ld-error { background: #fff1f3; color: #aa3b4a; border: 1px solid #efcdd3; }
.ld-warning { background: #fff8e9; color: #92641f; border: 1px solid #ebddb8; }
.ld-modal-backdrop { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 20px; background: #172c4770; }
.ld-modal { width: min(640px, 100%); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 24px; border-radius: 16px; background: #fff; color: #243851; box-shadow: 0 20px 70px #172c4740; }
.ld-modal-wide { width: min(960px, 100%); }
.ld-modal > header { display: flex; justify-content: space-between; align-items: start; gap: 18px; margin-bottom: 22px; }
.ld-modal h2 { margin: 0; font-size: 21px; overflow-wrap: anywhere; }
.ld-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; border: 0; min-width: 0; }
.ld-form-grid .ld-wide { grid-column: 1 / -1; }
.ld-modal .field > small { color: #718196; line-height: 1.5; font-size: 11px; }
.ld-multiselect { border: 1px solid #dce5ee; border-radius: 10px; padding: 12px; }
.ld-search-label { font-size: 11px; color: #64748b; margin-top: 4px; }
.ld-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-height: 30px; }
.ld-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 5px 7px 5px 10px; border-radius: 999px; background: #edf4ff; color: #315f96; overflow-wrap: anywhere; }
.ld-chip.ld-legacy { background: #fff4df; color: #8a5b1a; }
.ld-chip button { width: 24px; height: 24px; min-height: 24px; flex: 0 0 24px; border: 0; border-radius: 50%; background: #dbe9fa; color: inherit; cursor: pointer; }
.ld-multi-options { max-height: 180px; overflow-y: auto; display: grid; gap: 3px; border: 1px solid #e4eaf2; border-radius: 8px; padding: 6px; }
.ld-multi-option { display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 5px 7px; border-radius: 6px; cursor: pointer; }
.ld-multi-option:hover { background: #f4f7fb; }
.ld-multi-option input[type=checkbox] { width: 19px; min-height: 19px; height: 19px; flex: 0 0 19px; accent-color: #2d6dc4; }
.ld-danger { background: #fff1f3; border-color: #e7b8c0; color: #a43647; }
.ld-modal footer { display: flex; justify-content: end; gap: 10px; flex-wrap: wrap; position: sticky; bottom: -24px; background: #fff; padding: 18px 0 0; margin-top: 22px; border-top: 1px solid #e6ecf3; }
@media (max-width: 1100px) { .ld-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ld-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ld-card .ld-section-heading { flex-direction: column; } }
@media (max-width: 760px) {
  .ld-topbar { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px 18px; }
  .ld-topbar-actions { justify-content: start; }
  .ld-topbar-actions .profile { flex: 1 1 170px; }
  .ld-heading { flex-direction: column; gap: 10px; }
  .ld-heading h2 { font-size: 24px; }
  .ld-tabs { gap: 7px; }
  .ld-tabs .btn { flex: 1 1 auto; font-size: 12px; padding: 10px; }
  .ld-counters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ld-summary { flex-wrap: wrap; gap: 14px 24px; }
  .ld-summary p { margin: 0; width: 100%; max-width: none; }
  .ld-counter { padding: 14px; }
  .ld-table-wrap { border: 0; overflow: visible; background: transparent; }
  .ld-table, .ld-table tbody { display: block; }
  .ld-table thead { display: none; }
  .ld-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; border: 1px solid #dce5ee; border-radius: 12px; background: #fff; padding: 16px; margin-bottom: 12px; }
  .ld-table th, .ld-table td { display: block; border: 0; padding: 0; min-width: 0; }
  .ld-table tbody th { grid-column: 1 / -1; font-size: 15px; }
  .ld-table td[data-label]::before { content: attr(data-label); display: block; color: #718196; font-size: 11px; margin-bottom: 6px; }
  .ld-table .ld-actions { grid-column: 1 / -1; }
  .ld-table .ld-actions .btn { min-height: 44px; }
  .ld-table td:nth-last-child(2) { grid-column: 1 / -1; }
  .ld-section-heading { flex-direction: column; gap: 12px; }
  .ld-section-heading .field { width: 100%; }
  .ld-card { padding: 18px; }
  .ld-task-list > li { grid-template-columns: 1fr; gap: 14px; }
  .ld-task-list .ld-button-group { justify-content: start; }
  .ld-modal-backdrop { padding: 8px; }
  .ld-modal { padding: 18px; max-height: calc(100dvh - 16px); }
  .ld-modal footer { bottom: -18px; }
}
@media (max-width: 480px) { .ld-toolbar, .ld-facts, .ld-form-grid { grid-template-columns: 1fr; } .ld-card { padding: 14px; } .ld-modal footer .btn { flex: 1 1 auto; } }
