:root {
  --crt-background: #f6f8fa;
  --crt-surface: #fff;
  --crt-surface-muted: #f8fafb;
  --crt-surface-hover: #edf3f5;
  --crt-border: #dce4e8;
  --crt-border-strong: #becbd1;
  --crt-text: #172a35;
  --crt-text-secondary: #48606d;
  --crt-text-muted: #667d89;
  --crt-primary: #116b78;
  --crt-primary-hover: #0d5661;
  --crt-success: #207449;
  --crt-warning: #a46419;
  --crt-danger: #b54042;
  --crt-radius-sm: 6px;
  --crt-radius-md: 8px;
  --crt-radius-lg: 10px;
  --crt-shadow-sm: 0 1px 3px rgb(23 42 53 / .06);
  --bs-body-font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bs-primary-rgb: 17, 107, 120;
  --bs-link-color-rgb: 17, 107, 120;
  --bs-border-color: var(--crt-border);
  --primary-color: var(--crt-primary);
  --primary-rgb: 17, 107, 120;
  --default-font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --default-body-bg-color: var(--crt-background);
  --default-text-color: var(--crt-text);
}
html { font-size: 14px; }
body { background: var(--crt-background); color: var(--crt-text); font-family: var(--bs-body-font-family); }
a { color: var(--crt-primary); }
a:hover { color: var(--crt-primary-hover); }
:focus-visible { outline: 2px solid var(--crt-primary) !important; outline-offset: 2px; }
.crt-shell { display: flex; min-height: 100vh; }
.crt-sidebar { position: sticky; top: 0; flex: 0 0 224px; width: 224px; height: 100vh; overflow-y: auto; background: var(--crt-surface); border-right: 1px solid var(--crt-border); z-index: 1030; }
.crt-brand, .crt-auth-brand { display: flex; align-items: center; gap: 10px; color: var(--crt-text); font-size: 16px; font-weight: 650; letter-spacing: -.02em; text-decoration: none; }
.crt-brand { height: 64px; padding: 0 20px; border-bottom: 1px solid var(--crt-border); }
.crt-brand:hover { color: var(--crt-text); }
.crt-brand-mark { display: inline-grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 7px; background: var(--crt-primary); color: white; font-size: 16px; font-weight: 650; }
.crt-navigation { display: flex; flex-direction: column; gap: 3px; padding: 20px 12px; }
.crt-nav-label { padding: 0 10px 8px; color: var(--crt-text-muted); font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.crt-nav-label-secondary { padding-top: 24px; }
.crt-nav-link { display: flex; align-items: center; gap: 11px; min-height: 38px; padding: 7px 10px; border-radius: var(--crt-radius-sm); color: var(--crt-text-secondary); text-decoration: none; font-weight: 500; }
.crt-nav-link i { font-size: 17px; line-height: 1; }
.crt-nav-link:hover { background: var(--crt-surface-hover); color: var(--crt-text); }
.crt-nav-link.active { background: #eaf3f4; color: var(--crt-primary); font-weight: 600; }
.crt-nav-count { margin-left: auto; min-width: 20px; padding: 1px 5px; border-radius: 5px; background: #fce9e9; color: var(--crt-danger); font-size: 11px; text-align: center; }
.crt-workspace { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.crt-topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 8px 28px; background: var(--crt-surface); border-bottom: 1px solid var(--crt-border); }
.crt-topbar-start, .crt-topbar-actions { display: flex; align-items: center; gap: 16px; }
.crt-topbar-title { color: var(--crt-text-secondary); font-weight: 600; }
.crt-language-form .form-select { width: 108px; }
.crt-menu-button { display: none; align-items: center; justify-content: center; width: 36px; height: 36px; background: transparent; border: 1px solid var(--crt-border); border-radius: var(--crt-radius-sm); color: var(--crt-text); font-size: 20px; }
.crt-user-button { display: flex; align-items: center; gap: 9px; padding: 3px 0; background: transparent; border: 0; color: var(--crt-text); text-align: left; }
.crt-avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #e8eef0; color: var(--crt-text-secondary); font-size: 13px; font-weight: 650; }
.crt-user-info { display: flex; flex-direction: column; line-height: 1.2; font-weight: 600; }
.crt-user-info small { margin-top: 2px; color: var(--crt-text-muted); font-size: 11px; font-weight: 400; }
.crt-user-menu { border: 1px solid var(--crt-border); border-radius: var(--crt-radius-md); box-shadow: var(--crt-shadow-sm); }
.crt-app .main-content.app-content { flex: 1; width: 100%; min-height: 0; margin: 0; padding: 24px 28px 36px; }
.crt-app .main-content .container-fluid { max-width: 1600px; padding: 0; }
.crt-app .footer { margin: 0; padding: 12px 24px !important; border-top: 1px solid var(--crt-border); background: var(--crt-surface) !important; font-size: 12px; }
.crt-app h1, .crt-auth h1 { color: var(--crt-text); font-weight: 650; letter-spacing: -.025em; }
.crt-app h2, .crt-app h3, .crt-app .card-title { color: var(--crt-text); font-weight: 600; letter-spacing: -.015em; }
.crt-app .card { border: 1px solid var(--crt-border); border-radius: var(--crt-radius-lg); box-shadow: none; background: var(--crt-surface); }
.crt-app .card-header { background: var(--crt-surface); border-bottom: 1px solid var(--crt-border); }
.crt-app .table { color: var(--crt-text); --bs-table-border-color: var(--crt-border); }
.crt-app .table th { padding: .65rem .75rem; background: var(--crt-surface-muted); color: var(--crt-text-secondary); font-size: 12px; font-weight: 650; white-space: nowrap; }
.crt-app .table td { padding: .65rem .75rem; vertical-align: middle; }
.crt-app .table tbody tr:hover td { background: var(--crt-surface-muted); }
.crt-app .badge { border-radius: 5px; font-weight: 550; letter-spacing: 0; }
.crt-app .badge.bg-light { border: 1px solid var(--crt-border); color: var(--crt-text-secondary) !important; }
.crt-app .bg-success, .crt-app .text-bg-success { background-color: var(--crt-success) !important; }
.crt-app .bg-warning, .crt-app .text-bg-warning { background-color: var(--crt-warning) !important; color: white !important; }
.crt-app .bg-danger, .crt-app .text-bg-danger { background-color: var(--crt-danger) !important; }
.crt-app .bg-primary, .crt-app .text-bg-primary { background-color: var(--crt-primary) !important; }
.btn { border-radius: var(--crt-radius-sm); font-weight: 550; }
.btn-primary { --bs-btn-bg: var(--crt-primary); --bs-btn-border-color: var(--crt-primary); --bs-btn-hover-bg: var(--crt-primary-hover); --bs-btn-hover-border-color: var(--crt-primary-hover); --bs-btn-active-bg: var(--crt-primary-hover); --bs-btn-active-border-color: var(--crt-primary-hover); --bs-btn-disabled-bg: var(--crt-primary); --bs-btn-disabled-border-color: var(--crt-primary); }
.form-label { color: var(--crt-text-secondary); font-weight: 550; }
.form-control, .form-select { border-color: var(--crt-border-strong); border-radius: var(--crt-radius-sm); color: var(--crt-text); }
.form-control:focus, .form-select:focus { border-color: var(--crt-primary); box-shadow: 0 0 0 3px rgb(17 107 120 / .14); }
.form-control:disabled, .form-select:disabled { background: var(--crt-surface-muted); color: var(--crt-text-muted); }
.form-text, .text-muted { color: var(--crt-text-muted) !important; }
.crt-auth { min-height: 100vh; }
.crt-auth-layout { display: grid; place-items: center; min-height: 100vh; padding: 32px 16px; }
.crt-auth-panel { width: min(100%, 420px); }
.crt-auth-brand { justify-content: center; margin-bottom: 26px; font-size: 20px; }
.crt-auth-brand .crt-brand-mark { width: 34px; height: 34px; font-size: 19px; }
.crt-auth-card { padding: 32px; background: var(--crt-surface); border: 1px solid var(--crt-border); border-radius: var(--crt-radius-lg); box-shadow: var(--crt-shadow-sm); }
.crt-auth-card h1 { margin: 0 0 4px; font-size: 23px; }
.crt-auth-intro { margin-bottom: 26px; color: var(--crt-text-muted); }
.crt-auth-footer { display: flex; justify-content: center; margin-top: 24px; }
.crt-auth-footer form { display: flex; align-items: center; gap: 10px; }
.crt-auth-footer .form-label { margin: 0; font-size: 12px; }
.crt-auth-footer .form-select { width: 120px; }
.crt-auth-return { margin-top: 20px; text-align: center; }
.crt-sidebar-backdrop[hidden] { display: none; }
@media (max-width: 991px) {
  .crt-sidebar { position: fixed; left: 0; transform: translateX(-100%); transition: transform .2s ease; }
  .crt-sidebar.is-open { transform: translateX(0); }
  .crt-sidebar-backdrop:not([hidden]) { position: fixed; inset: 0; z-index: 1025; display: block; background: rgb(23 42 53 / .35); }
  .crt-menu-button { display: inline-flex; }
  .crt-topbar { padding-inline: 16px; }
  .crt-app .main-content.app-content { padding: 20px 16px 32px; }
}
@media (max-width: 575px) {
  .crt-user-info { display: none; }
  .crt-auth-card { padding: 24px; }
  .crt-app .table-responsive { overflow-x: auto; }
}

/* Navigation and workspace context */
.crt-topbar-start { flex: 1; min-width: 0; }
.crt-topbar-title { overflow: hidden; max-width: 420px; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; }
.crt-topbar-actions { flex-shrink: 0; }
.crt-user-info > span { overflow: hidden; max-width: 220px; text-overflow: ellipsis; white-space: nowrap; }
.crt-nav-link i { flex: 0 0 18px; width: 18px; text-align: center; }
@media (max-width: 575px) {
  .crt-topbar-start { gap: 8px; }
  .crt-topbar-actions { gap: 12px; }
  .crt-topbar-title { display: block; max-width: 112px; font-size: 11px; }
  .crt-language-form .form-select { width: 88px; }
}

/* Dashboard and order work surfaces */
.crt-page-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 4px 0 24px; }
.crt-page-header h1 { margin: 0; font-size: clamp(23px, 2vw, 28px); line-height: 1.2; }
.crt-eyebrow { margin: 0 0 7px; color: var(--crt-text-muted); font-size: 11px; font-weight: 650; letter-spacing: .08em; line-height: 1.4; text-transform: uppercase; }
.crt-page-subtitle { margin: 7px 0 0; color: var(--crt-text-secondary); font-size: 13px; }
.crt-page-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.crt-page-actions .btn { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 7px 13px; white-space: nowrap; }
.crt-btn-secondary, .crt-sort-button { background: var(--crt-surface); border: 1px solid var(--crt-border-strong); color: var(--crt-text-secondary); }
.crt-btn-secondary:hover, .crt-sort-button:hover { background: var(--crt-surface-hover); border-color: var(--crt-border-strong); color: var(--crt-text); }
.crt-text-link { display: inline-flex; align-items: center; gap: 5px; color: var(--crt-primary); font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.crt-text-link:hover { color: var(--crt-primary-hover); text-decoration: underline; }
.crt-dashboard-lead { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 28px; border: 1px solid var(--crt-border); border-left: 3px solid var(--crt-primary); border-radius: var(--crt-radius-lg); background: var(--crt-surface); }
.crt-dashboard-lead h2 { margin: 0; font-size: 18px; }
.crt-dashboard-lead-copy > p:not(.crt-eyebrow) { margin: 7px 0 15px; color: var(--crt-text-secondary); font-size: 13px; }
.crt-dashboard-lead-count { color: var(--crt-text); font-size: 40px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.05em; line-height: 1; }
.crt-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto auto; margin: 16px 0 24px; border: 1px solid var(--crt-border); border-radius: var(--crt-radius-lg); background: var(--crt-surface); }
.crt-metric { display: grid; grid-template-rows: subgrid; grid-row: span 3; min-height: 116px; padding: 20px 24px; }
.crt-metric + .crt-metric { border-left: 1px solid var(--crt-border); }
.crt-metric > span { line-height: 1.4; color: var(--crt-text-secondary); font-size: 12px; font-weight: 550; }
.crt-metric > strong { margin: 4px 0 1px; color: var(--crt-text); font-size: 27px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.035em; line-height: 1.2; }
.crt-metric > small { color: var(--crt-text-muted); font-size: 11px; }
.crt-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); align-items: start; gap: 16px; margin-bottom: 16px; }
.crt-panel { min-width: 0; border: 1px solid var(--crt-border); border-radius: var(--crt-radius-lg); background: var(--crt-surface); }
.crt-panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; min-height: 70px; padding: 18px 22px 15px; border-bottom: 1px solid var(--crt-border); }
.crt-panel-heading h2 { margin: 0; font-size: 15px; line-height: 1.3; }
.crt-panel-heading .crt-eyebrow { margin-bottom: 4px; }
.crt-case-list { margin: 0; padding: 0; list-style: none; }
.crt-case-list li + li { border-top: 1px solid var(--crt-border); }
.crt-case-link { display: flex; align-items: center; gap: 14px; min-height: 66px; padding: 12px 22px; color: var(--crt-text); text-decoration: none; }
.crt-case-link:hover { background: var(--crt-surface-muted); color: var(--crt-text); }
.crt-case-identity { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.crt-case-identity strong { overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.crt-case-meta { overflow: hidden; color: var(--crt-text-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.crt-case-state { display: flex; flex-direction: column; align-items: end; gap: 3px; white-space: nowrap; }
.crt-case-state time { color: var(--crt-text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.crt-case-link > i { color: var(--crt-text-muted); font-size: 17px; }
.crt-panel--note > p { max-width: 32ch; margin: 20px 22px 16px; color: var(--crt-text-secondary); line-height: 1.55; }
.crt-panel--note > .btn { margin: 0 22px 22px; }
.crt-trend .crt-panel-heading { align-items: center; }
.crt-chart { min-height: 240px; padding: 14px 16px 4px; }
.crt-periods { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.crt-periods a { padding: 5px 8px; border-radius: var(--crt-radius-sm); color: var(--crt-text-muted); font-size: 11px; font-weight: 550; text-decoration: none; white-space: nowrap; }
.crt-periods a:hover { background: var(--crt-surface-hover); color: var(--crt-text); }
.crt-periods a[aria-current] { background: #eaf3f4; color: var(--crt-primary); }
.crt-status { display: inline-flex; align-items: center; max-width: 100%; padding: 3px 7px; border: 1px solid var(--crt-border); border-radius: 5px; background: var(--crt-surface-muted); color: var(--crt-text-secondary); font-size: 11px; font-weight: 600; line-height: 1.25; white-space: nowrap; }
.crt-status--progress { border-color: #cce2e5; background: #eaf3f4; color: var(--crt-primary); }
.crt-status--attention { border-color: #efdcbf; background: #fff8eb; color: var(--crt-warning); }
.crt-status--success { border-color: #cce8d4; background: #edf7f0; color: var(--crt-success); }
.crt-status--danger { border-color: #f2d2d2; background: #fdf0f0; color: var(--crt-danger); }
.crt-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 220px; padding: 28px; text-align: center; }
.crt-empty-state--compact { min-height: 210px; }
.crt-empty-state > i { color: var(--crt-text-muted); font-size: 23px; }
.crt-empty-state h2, .crt-empty-state h3 { margin: 10px 0 4px; font-size: 15px; font-weight: 600; }
.crt-empty-state p { margin: 0 0 16px; color: var(--crt-text-muted); font-size: 12px; }
.crt-orders { overflow: hidden; border: 1px solid var(--crt-border); border-radius: var(--crt-radius-lg); background: var(--crt-surface); }
.crt-orders-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; }
.crt-search { display: flex; align-items: center; gap: 8px; width: min(100%, 490px); }
.crt-search > i { position: absolute; z-index: 1; margin-left: 12px; color: var(--crt-text-muted); font-size: 16px; pointer-events: none; }
.crt-search .form-control { min-width: 0; height: 38px; padding-left: 36px; font-size: 12px; }
.crt-search .btn, .crt-sort-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 38px; padding: 7px 12px; font-size: 12px; }
.crt-sort-menu { max-height: min(70vh, 32rem); min-width: 190px; overflow-y: auto; border-color: var(--crt-border); box-shadow: var(--crt-shadow-sm); }
.crt-sort-menu .dropdown-item { padding: 7px 12px; font-size: 12px; }
.crt-orders-tabs { display: flex; gap: 20px; overflow-x: auto; padding: 0 20px; border-bottom: 1px solid var(--crt-border); }
.crt-tab { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 1px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--crt-text-muted); font-size: 12px; font-weight: 550; white-space: nowrap; }
.crt-tab:hover { color: var(--crt-text); }
.crt-tab.active { border-bottom-color: var(--crt-primary); color: var(--crt-primary); font-weight: 650; }
.crt-tab span { padding: 1px 5px; border-radius: 4px; background: var(--crt-surface-muted); color: var(--crt-text-muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.crt-list-meta { padding: 12px 20px; color: var(--crt-text-muted); font-size: 11px; }
.crt-table-scroll { width: 100%; overflow-x: auto; }
.crt-table { width: 100%; margin: 0; border-collapse: collapse; color: var(--crt-text); font-size: 12px; }
.crt-table th { padding: 10px 14px; border-top: 1px solid var(--crt-border); border-bottom: 1px solid var(--crt-border); background: var(--crt-surface-muted); color: var(--crt-text-secondary); font-size: 11px; font-weight: 650; text-align: left; white-space: nowrap; }
.crt-table td { max-width: 230px; padding: 11px 14px; border-bottom: 1px solid var(--crt-border); vertical-align: middle; }
.crt-table tbody tr:last-child td { border-bottom: 0; }
.crt-order-row { cursor: pointer; }
.crt-order-row:hover td { background: var(--crt-surface-muted); }
.crt-order-id { color: var(--crt-text); font-weight: 650; font-variant-numeric: tabular-nums; text-decoration: none; white-space: nowrap; }
.crt-order-id:hover { color: var(--crt-primary); text-decoration: underline; }
.crt-mobile-identity { display: none; }
.crt-cell-primary { display: block; overflow: hidden; max-width: 230px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.crt-attention-label { display: block; margin-top: 3px; color: var(--crt-warning); font-size: 10px; font-weight: 600; white-space: nowrap; }
.crt-priority-high { color: var(--crt-danger); font-weight: 600; }
.crt-date { color: var(--crt-text-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.crt-date span { display: block; color: var(--crt-text-muted); font-size: 11px; }
.crt-row-action { width: 38px; text-align: right; }
.crt-row-action a { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--crt-radius-sm); color: var(--crt-text-muted); font-size: 17px; text-decoration: none; }
.crt-row-action a:hover { background: #eaf3f4; color: var(--crt-primary); }
.crt-file-separator { color: var(--crt-text-muted); }
@media (max-width: 1199px) {
  .crt-col-tertiary { display: none; }
  .crt-dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .crt-page-header { align-items: start; flex-direction: column; gap: 14px; }
  .crt-metrics { grid-template-columns: 1fr; }
  .crt-metric { min-height: 0; padding: 15px 20px; }
  .crt-metric + .crt-metric { border-top: 1px solid var(--crt-border); border-left: 0; }
  .crt-dashboard-lead { padding: 20px; }
  .crt-dashboard-lead-count { font-size: 34px; }
  .crt-col-secondary, .crt-col-date, .crt-col-person { display: none; }
  .crt-orders-controls { flex-wrap: wrap; padding: 14px; }
  .crt-orders-tabs { gap: 16px; padding: 0 14px; }
  .crt-search { flex: 1 1 100%; max-width: none; }
  .crt-table { table-layout: fixed; min-width: 0; }
  .crt-table th, .crt-table td { padding: 10px 8px; }
  .crt-table th:first-child, .crt-table td:first-child { width: 49%; padding-left: 14px; }
  .crt-table th:last-child, .crt-table td:last-child { width: 36px; padding-right: 10px; }
  .crt-table td { max-width: 0; }
  .crt-order-id, .crt-mobile-identity { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .crt-mobile-identity { color: var(--crt-text-secondary); font-size: 11px; }
  .crt-status { overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: normal; }
  .crt-panel-heading { flex-wrap: wrap; }
}

/* Dashboard polish */
.crt-dashboard-grid--single { grid-template-columns: 1fr; }
.crt-dashboard-grid .crt-empty-state--compact { min-height: 144px; }
.crt-trend .crt-empty-state--compact { min-height: 144px; }
.crt-attention { margin-top: 16px; }
.crt-attention .crt-panel-heading { align-items: center; min-height: 56px; padding: 16px 20px; }
.crt-attention-total { color: var(--crt-text-muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.crt-attention-list { margin: 0; padding: 0; list-style: none; }
.crt-attention-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px 16px 32px; }
.crt-attention-row + .crt-attention-row { border-top: 1px solid var(--crt-border); }
.crt-attention-row::before { position: absolute; top: 20px; left: 20px; width: 3px; height: 24px; border-radius: 2px; background: var(--crt-text-muted); content: ""; }
.crt-attention-row--error::before { background: var(--crt-danger); }
.crt-attention-row--warning::before { background: var(--crt-warning); }
.crt-attention-category { color: var(--crt-text-muted); font-size: 11px; font-weight: 600; }
.crt-attention-row p { margin: 4px 0 0; color: var(--crt-text); font-size: 12px; line-height: 1.5; }
.crt-attention-empty { margin: 0; padding: 16px 20px; color: var(--crt-text-secondary); font-size: 12px; }
.crt-queue-count { font-size: 27px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.crt-queue-body { padding: 20px; }
.crt-queue-body p { max-width: 42ch; margin: 0 0 16px; color: var(--crt-text-secondary); font-size: 13px; line-height: 1.6; }
.crt-queue-body .btn { display: inline-flex; align-items: center; gap: 8px; }
.crt-count-list { margin: 0; padding: 8px 20px; }
.crt-count-list > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 0; }
.crt-count-list > div + div { border-top: 1px solid var(--crt-border); }
.crt-count-list dt { color: var(--crt-text-secondary); font-size: 12px; font-weight: 500; }
.crt-count-list dd { margin: 0; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.crt-workflow-context { color: var(--crt-text-muted); font-size: 11px; white-space: nowrap; }
.crt-dashboard-aside { display: grid; gap: 16px; }
.crt-dashboard-aside .crt-attention { margin-top: 0; }
.crt-org-metrics { margin-top: 0; }
.crt-org-context { padding: 20px; }
.crt-org-context h2 { margin: 0 0 8px; font-size: 15px; }
.crt-org-context p { margin: 0 0 16px; color: var(--crt-text-secondary); font-size: 12px; line-height: 1.6; }
@media (max-width: 575px) {
  .crt-case-link { display: grid; grid-template-columns: minmax(0, 1fr) auto 16px; gap: 8px; padding-inline: 16px; }
  .crt-case-state time { font-size: 10px; }
  .crt-attention-row { align-items: start; flex-wrap: wrap; gap: 8px; }
  .crt-attention-row > .crt-text-link { margin-left: auto; }
}

/* Platform administrator dashboard */
.crt-platform-dashboard .crt-page-header { align-items: center; margin-bottom: 24px; }
.crt-platform-dashboard .crt-page-header h1 { font-size: 26px; }
.crt-platform-dashboard .crt-platform-header-end { display: grid; justify-items: end; gap: 8px; }
.crt-platform-dashboard .crt-platform-version { color: var(--crt-text-muted); font-size: 10px; }
.crt-platform-dashboard .crt-platform-version > span { margin-left: 8px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.crt-platform-dashboard .crt-platform-meta { color: var(--crt-text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.crt-platform-dashboard .crt-platform-overview { overflow: hidden; margin-bottom: 24px; border-radius: var(--crt-radius-md); }
.crt-platform-dashboard .crt-platform-status { padding: 16px 20px; border-bottom: 1px solid var(--crt-border); background: var(--crt-surface-muted); scroll-margin-top: 88px; }
.crt-platform-dashboard .crt-platform-status-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 12px; }
.crt-platform-dashboard .crt-platform-status-heading h2 { margin: 0; color: var(--crt-text); font-size: 14px; font-weight: 600; line-height: 20px; }
.crt-platform-dashboard .crt-platform-services { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; margin: 0; }
.crt-platform-dashboard .crt-platform-service { display: grid; grid-template-rows: minmax(20px, 1fr) auto; gap: 4px; min-width: 0; }
.crt-platform-dashboard .crt-platform-service + .crt-platform-service { padding-left: 14px; border-left: 1px solid var(--crt-border); }
.crt-platform-dashboard .crt-platform-service dt { margin: 0; padding-right: 12px; color: var(--crt-text); font-size: 13px; font-weight: 600; line-height: 20px; }
.crt-platform-dashboard .crt-platform-service dd { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--crt-text-secondary); font-size: 12px; font-weight: 500; line-height: 18px; }
.crt-platform-dashboard .crt-platform-service dd::before { flex: 0 0 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--crt-success); content: ""; }
.crt-platform-dashboard .crt-platform-service.is-neutral dd::before { background: var(--crt-text-muted); }
.crt-platform-dashboard .crt-platform-service.is-warning dd { color: var(--crt-warning); font-weight: 600; }
.crt-platform-dashboard .crt-platform-service.is-error dd { color: var(--crt-danger); font-weight: 600; }
.crt-platform-dashboard .crt-platform-service.is-warning dd::before { background: var(--crt-warning); }
.crt-platform-dashboard .crt-platform-service.is-error dd::before { background: var(--crt-danger); }
.crt-platform-dashboard .crt-platform-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border: 0; border-radius: 0; }
.crt-platform-dashboard .crt-platform-kpis .crt-metric { min-height: 96px; padding: 16px 20px; }
.crt-platform-dashboard .crt-platform-kpis .crt-metric > strong { font-size: 27px; }
.crt-platform-dashboard .crt-platform-metric--issue > strong { color: var(--crt-danger); }
.crt-platform-dashboard .crt-platform-primary-grid, .crt-platform-dashboard .crt-platform-secondary-grid { display: grid; align-items: stretch; gap: 0; overflow: hidden; margin-bottom: 24px; border-radius: var(--crt-radius-md); }
.crt-platform-dashboard .crt-platform-primary-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.crt-platform-dashboard .crt-platform-secondary-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.crt-platform-dashboard .crt-platform-primary-grid > .crt-panel, .crt-platform-dashboard .crt-platform-secondary-grid > .crt-panel { min-width: 0; border: 0; border-radius: 0; }
.crt-platform-dashboard .crt-platform-primary-grid > .crt-platform-attention, .crt-platform-dashboard .crt-platform-secondary-grid > .crt-platform-users { border-left: 1px solid var(--crt-border); }
.crt-platform-dashboard .crt-panel-heading { align-items: center; min-height: 48px; padding: 12px 20px; }
.crt-platform-dashboard .crt-panel-heading h2 { font-size: 15px; }
.crt-platform-dashboard .crt-platform-counts { margin: 0; padding: 0 20px; }
.crt-platform-dashboard .crt-platform-counts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 8px 0; }
.crt-platform-dashboard .crt-platform-counts > div + div { border-top: 1px solid var(--crt-border); }
.crt-platform-dashboard .crt-platform-counts dt { color: var(--crt-text-secondary); font-size: 13px; font-weight: 500; }
.crt-platform-dashboard .crt-platform-counts dd { margin: 0; min-width: 32px; text-align: right; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.crt-platform-dashboard .crt-platform-attention-list { margin: 0; padding: 0; list-style: none; }
.crt-platform-dashboard .crt-platform-attention-item { position: relative; padding: 16px 20px 16px 32px; }
.crt-platform-dashboard .crt-platform-attention-item + li { border-top: 1px solid var(--crt-border); }
.crt-platform-dashboard .crt-platform-attention-item::before { position: absolute; top: 16px; bottom: 16px; left: 20px; width: 2px; border-radius: 2px; background: var(--crt-text-muted); content: ""; }
.crt-platform-dashboard .crt-platform-attention-item--error::before { background: var(--crt-danger); }
.crt-platform-dashboard .crt-platform-attention-item--warning::before { background: var(--crt-warning); }
.crt-platform-dashboard .crt-platform-attention-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.crt-platform-dashboard .crt-platform-attention-heading h3, .crt-platform-dashboard .crt-platform-attention-clear h3 { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.4; }
.crt-platform-dashboard .crt-platform-attention-heading strong { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.crt-platform-dashboard .crt-platform-attention-detail { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: 8px; }
.crt-platform-dashboard .crt-platform-attention-detail p { max-width: 36ch; margin: 0; color: var(--crt-text-secondary); font-size: 12px; line-height: 1.5; }
.crt-platform-dashboard .crt-platform-attention-detail .crt-text-link { flex-shrink: 0; }
.crt-platform-dashboard .crt-platform-attention-clear { padding: 24px 20px; }
.crt-platform-dashboard .crt-platform-attention-clear h3 { display: flex; align-items: baseline; gap: 8px; }
.crt-platform-dashboard .crt-platform-attention-clear h3::before { flex: 0 0 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--crt-success); content: ""; }
.crt-platform-dashboard .crt-platform-attention-clear p { margin: 8px 0 0 13px; color: var(--crt-text-muted); font-size: 12px; line-height: 1.5; }
.crt-platform-dashboard .crt-platform-org-list { margin: 0; padding: 0; list-style: none; }
.crt-platform-dashboard .crt-platform-org-list li + li { border-top: 1px solid var(--crt-border); }
.crt-platform-dashboard .crt-platform-org-list a { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px; color: var(--crt-text); text-decoration: none; }
.crt-platform-dashboard .crt-platform-org-list a:hover { background: var(--crt-surface-muted); }
.crt-platform-dashboard .crt-platform-org-identity { display: grid; min-width: 0; gap: 4px; }
.crt-platform-dashboard .crt-platform-org-identity strong { overflow-wrap: anywhere; font-size: 13px; font-weight: 600; }
.crt-platform-dashboard .crt-platform-org-identity small { overflow-wrap: anywhere; color: var(--crt-text-muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.crt-platform-dashboard .crt-platform-org-state { display: flex; flex-shrink: 0; align-items: center; gap: 16px; }
.crt-platform-dashboard .crt-platform-org-state i { color: var(--crt-text-muted); font-size: 14px; line-height: 1; }
.crt-platform-dashboard .crt-platform-processing, .crt-platform-dashboard .crt-platform-recent { overflow: hidden; margin-bottom: 24px; scroll-margin-top: 88px; }
.crt-platform-dashboard .crt-table { table-layout: auto; }
.crt-platform-dashboard .crt-table th, .crt-platform-dashboard .crt-table td { width: auto; max-width: none; padding: 12px 20px; }
.crt-platform-dashboard .crt-table th { padding-block: 8px; }
.crt-platform-dashboard .crt-table td:first-child { white-space: nowrap; }
.crt-platform-dashboard .crt-platform-action-col { text-align: right; }
.crt-platform-dashboard .crt-platform-processing-action { display: flex; min-height: 32px; align-items: center; justify-content: end; gap: 20px; }
.crt-platform-dashboard .crt-platform-row-state { min-width: 112px; text-align: right; color: var(--crt-warning); font-size: 11px; }
.crt-platform-dashboard .crt-platform-row-state.is-error { color: var(--crt-danger); }
.crt-platform-dashboard .crt-platform-clinician { display: block; overflow: hidden; max-width: 24ch; color: var(--crt-text-secondary); text-overflow: ellipsis; white-space: nowrap; }
.crt-platform-dashboard .crt-platform-date-col { width: 128px; }
.crt-platform-dashboard .crt-platform-table-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; border-top: 1px solid var(--crt-border); color: var(--crt-text-muted); font-size: 11px; }
.crt-platform-dashboard .crt-platform-empty { padding: 24px 20px !important; }
.crt-platform-dashboard .crt-platform-empty strong { display: block; font-size: 13px; font-weight: 600; }
.crt-platform-dashboard .crt-platform-empty p { margin: 8px 0 0; color: var(--crt-text-muted); font-size: 12px; }
@media (max-width: 1099px) {
  .crt-platform-dashboard .crt-platform-primary-grid, .crt-platform-dashboard .crt-platform-secondary-grid { grid-template-columns: 1fr; }
  .crt-platform-dashboard .crt-platform-attention { grid-row: 1; }
  .crt-platform-dashboard .crt-platform-service + .crt-platform-service { padding-left: 12px; }
  .crt-platform-dashboard .crt-platform-primary-grid > .crt-platform-attention, .crt-platform-dashboard .crt-platform-secondary-grid > .crt-platform-users { border-left: 0; }
  .crt-platform-dashboard .crt-platform-primary-grid > .crt-platform-workflow, .crt-platform-dashboard .crt-platform-secondary-grid > .crt-platform-users { border-top: 1px solid var(--crt-border); }
  .crt-platform-dashboard .crt-platform-kpis .crt-metric { padding-inline: 16px; }
}
@media (max-width: 767px) {
  .crt-platform-dashboard .crt-platform-services { grid-template-columns: 1fr; }
  .crt-platform-dashboard .crt-platform-service { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 0; }
  .crt-platform-dashboard .crt-platform-service + .crt-platform-service { padding-left: 0; border-top: 1px solid var(--crt-border); border-left: 0; }
}
@media (max-width: 575px) {
  .crt-platform-dashboard .crt-page-header { align-items: start; }
  .crt-platform-dashboard .crt-page-header h1 { font-size: 24px; }
  .crt-platform-dashboard .crt-platform-header-end { justify-items: start; }
  .crt-platform-dashboard .crt-platform-status { padding: 16px; }
  .crt-platform-dashboard .crt-platform-services { grid-template-columns: 1fr; }
  .crt-platform-dashboard .crt-platform-service { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 0; }
  .crt-platform-dashboard .crt-platform-service + .crt-platform-service { padding-left: 0; border-top: 1px solid var(--crt-border); border-left: 0; }
  .crt-platform-dashboard .crt-platform-service:first-child { padding-top: 0; }
  .crt-platform-dashboard .crt-platform-service:last-child { padding-bottom: 0; }
  .crt-platform-dashboard .crt-platform-service dt { padding-right: 0; }
  .crt-platform-dashboard .crt-platform-service dd { flex-shrink: 0; }
  .crt-platform-dashboard .crt-platform-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crt-platform-dashboard .crt-platform-kpis .crt-metric { min-height: 96px; padding: 12px 16px; }
  .crt-platform-dashboard .crt-platform-kpis .crt-metric + .crt-metric { border-top: 0; border-left: 1px solid var(--crt-border); }
  .crt-platform-dashboard .crt-platform-kpis .crt-metric:nth-child(3) { border-left: 0; }
  .crt-platform-dashboard .crt-platform-kpis .crt-metric:nth-child(n+3) { border-top: 1px solid var(--crt-border); }
  .crt-platform-dashboard .crt-panel-heading { gap: 12px; padding-inline: 16px; }
  .crt-platform-dashboard .crt-platform-attention-item { padding-right: 16px; }
  .crt-platform-dashboard .crt-platform-attention-detail { flex-wrap: wrap; gap: 8px; }
  .crt-platform-dashboard .crt-platform-attention-detail .crt-text-link { margin-left: auto; }
  .crt-platform-dashboard .crt-platform-org-list a { padding-inline: 16px; }
  .crt-platform-dashboard .crt-platform-counts { padding-inline: 16px; }
  .crt-platform-dashboard .crt-table th, .crt-platform-dashboard .crt-table td { padding: 12px; }
  .crt-platform-dashboard .crt-table th { padding-block: 8px; }
  .crt-platform-dashboard .crt-table th:first-child, .crt-platform-dashboard .crt-table td:first-child { padding-left: 16px; }
  .crt-platform-dashboard .crt-table th:last-child, .crt-platform-dashboard .crt-table td:last-child { padding-right: 16px; }
  .crt-platform-dashboard .crt-platform-material-col, .crt-platform-dashboard .crt-platform-clinician-col, .crt-platform-dashboard .crt-platform-date-col { display: none; }
  .crt-platform-dashboard .crt-platform-processing-action { flex-direction: column; align-items: end; gap: 4px; }
  .crt-platform-dashboard .crt-platform-row-state { white-space: nowrap; font-size: 10px; }
  .crt-platform-dashboard .crt-platform-recent-table .crt-status { max-width: 144px; white-space: normal; }
  .crt-platform-dashboard .crt-platform-recent-table td:nth-child(2), .crt-platform-dashboard .crt-platform-recent-table th:nth-child(2) { text-align: right; }
  .crt-platform-dashboard .crt-platform-table-footer { padding-inline: 16px; }
}

/* Organization administrator dashboard */
.crt-org-admin-dashboard .crt-page-header { align-items: center; margin-bottom: 24px; }
.crt-org-admin-dashboard .crt-page-header h1 { font-size: 26px; }
.crt-org-admin-dashboard .crt-org-admin-overview { overflow: hidden; margin-bottom: 24px; border-radius: var(--crt-radius-md); }
.crt-org-admin-dashboard .crt-org-admin-identity { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; padding: 16px 20px; border-bottom: 1px solid var(--crt-border); }
.crt-org-admin-dashboard .crt-org-admin-identity h2 { margin: 0; overflow-wrap: anywhere; font-size: 18px; font-weight: 600; }
.crt-org-admin-dashboard .crt-org-admin-identity-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 8px; color: var(--crt-text-muted); font-size: 11px; }
.crt-org-admin-dashboard .crt-org-admin-code { margin-left: 4px; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.crt-org-admin-dashboard .crt-org-admin-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border: 0; border-radius: 0; }
.crt-org-admin-dashboard .crt-org-admin-metrics .crt-metric { min-height: 96px; padding: 16px 20px; }
.crt-org-admin-dashboard .crt-org-admin-metrics .crt-metric > strong { font-size: 27px; }
.crt-org-admin-dashboard .crt-org-admin-primary-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; gap: 20px; margin-bottom: 24px; }
.crt-org-admin-dashboard .crt-org-admin-primary-grid > .crt-panel, .crt-org-admin-dashboard .crt-org-admin-workflow { overflow: hidden; border-radius: var(--crt-radius-md); }
.crt-org-admin-dashboard .crt-panel-heading { align-items: center; min-height: 48px; padding: 12px 20px; }
.crt-org-admin-dashboard .crt-panel-heading h2 { font-size: 15px; }
.crt-org-admin-dashboard .crt-org-admin-meta { color: var(--crt-text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.crt-org-admin-dashboard .crt-org-admin-member-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: 12px 20px; }
.crt-org-admin-dashboard .crt-org-admin-member-groups > dl + dl { padding-left: 20px; border-left: 1px solid var(--crt-border); }
.crt-org-admin-dashboard .crt-org-admin-counts { margin: 0; }
.crt-org-admin-dashboard .crt-org-admin-counts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; }
.crt-org-admin-dashboard .crt-org-admin-counts > div + div { border-top: 1px solid var(--crt-border); }
.crt-org-admin-dashboard .crt-org-admin-counts dt { color: var(--crt-text-secondary); font-size: 13px; font-weight: 500; }
.crt-org-admin-dashboard .crt-org-admin-counts dd { margin: 0; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.crt-org-admin-dashboard .crt-org-admin-member-footer { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 12px 20px; border-top: 1px solid var(--crt-border); }
.crt-org-admin-dashboard .crt-org-admin-member-footer > a { margin-left: auto; }
.crt-org-admin-dashboard .crt-org-admin-attention-list { margin: 0; padding: 0; list-style: none; }
.crt-org-admin-dashboard .crt-org-admin-issue { display: grid; position: relative; gap: 8px; padding: 16px 20px 16px 32px; }
.crt-org-admin-dashboard .crt-org-admin-issue + li { border-top: 1px solid var(--crt-border); }
.crt-org-admin-dashboard .crt-org-admin-issue::before { position: absolute; top: 16px; bottom: 16px; left: 20px; width: 2px; border-radius: 2px; background: var(--crt-text-muted); content: ""; }
.crt-org-admin-dashboard .crt-org-admin-issue--error::before { background: var(--crt-danger); }
.crt-org-admin-dashboard .crt-org-admin-issue--warning::before { background: var(--crt-warning); }
.crt-org-admin-dashboard .crt-org-admin-issue-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.crt-org-admin-dashboard .crt-org-admin-issue-heading h3 { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.4; }
.crt-org-admin-dashboard .crt-org-admin-issue-heading strong { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.crt-org-admin-dashboard .crt-org-admin-issue p { margin: 0; color: var(--crt-text-secondary); font-size: 12px; line-height: 1.5; }
.crt-org-admin-dashboard .crt-org-admin-issue > a { justify-self: end; }
.crt-org-admin-dashboard .crt-org-admin-empty { padding: 24px 20px; }
.crt-org-admin-dashboard .crt-org-admin-empty h3 { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.5; }
.crt-org-admin-dashboard .crt-org-admin-empty p { margin: 8px 0 0; color: var(--crt-text-muted); font-size: 12px; line-height: 1.5; }
.crt-org-admin-dashboard .crt-org-admin-all-clear h3 { display: flex; align-items: baseline; gap: 8px; }
.crt-org-admin-dashboard .crt-org-admin-all-clear h3::before { flex: 0 0 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--crt-success); content: ""; }
.crt-org-admin-dashboard .crt-org-admin-all-clear p { margin-left: 13px; }
.crt-org-admin-dashboard .crt-org-admin-workflow { scroll-margin-top: 88px; }
.crt-org-admin-dashboard .crt-org-admin-activity { margin-top: 24px; border-radius: var(--crt-radius-md); scroll-margin-top: 88px; }
.crt-org-admin-dashboard .crt-org-admin-activity-copy p { margin: 4px 0 0; color: var(--crt-text-muted); font-size: 12px; }
.crt-org-admin-dashboard .crt-org-admin-workflow-counts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 0; padding: 20px; }
.crt-org-admin-dashboard .crt-org-admin-workflow-counts.has-pending { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.crt-org-admin-dashboard .crt-org-admin-workflow-counts > div { display: grid; grid-template-rows: minmax(20px, 1fr) auto; gap: 8px; }
.crt-org-admin-dashboard .crt-org-admin-workflow-counts > div + div { padding-left: 20px; border-left: 1px solid var(--crt-border); }
.crt-org-admin-dashboard .crt-org-admin-workflow-counts dt { padding-right: 12px; color: var(--crt-text-secondary); font-size: 12px; font-weight: 500; }
.crt-org-admin-dashboard .crt-org-admin-workflow-counts dd { margin: 0; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.crt-org-admin-dashboard .crt-org-admin-workflow-counts .is-issue dd { color: var(--crt-danger); }
@media (max-width: 1099px) {
  .crt-org-admin-dashboard .crt-org-admin-primary-grid { grid-template-columns: 1fr; }
  .crt-org-admin-dashboard .crt-org-admin-attention { grid-row: 1; }
  .crt-org-admin-dashboard .crt-org-admin-metrics .crt-metric { padding-inline: 16px; }
  .crt-org-admin-dashboard .crt-org-admin-workflow-counts > div + div { padding-left: 12px; }
}
@media (max-width: 575px) {
  .crt-org-admin-dashboard .crt-page-header { align-items: start; }
  .crt-org-admin-dashboard .crt-page-header h1 { font-size: 24px; }
  .crt-org-admin-dashboard .crt-org-admin-identity { padding: 16px; }
  .crt-org-admin-dashboard .crt-org-admin-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crt-org-admin-dashboard .crt-org-admin-metrics .crt-metric { min-height: 104px; padding: 12px 16px; }
  .crt-org-admin-dashboard .crt-org-admin-metrics .crt-metric + .crt-metric { border-top: 0; border-left: 1px solid var(--crt-border); }
  .crt-org-admin-dashboard .crt-org-admin-metrics .crt-metric:nth-child(3) { border-left: 0; }
  .crt-org-admin-dashboard .crt-org-admin-metrics .crt-metric:nth-child(n+3) { border-top: 1px solid var(--crt-border); }
  .crt-org-admin-dashboard .crt-panel-heading { padding-inline: 16px; }
  .crt-org-admin-dashboard .crt-org-admin-member-groups { grid-template-columns: 1fr; gap: 0; padding: 8px 16px; }
  .crt-org-admin-dashboard .crt-org-admin-member-groups > dl + dl { padding-left: 0; border-top: 1px solid var(--crt-border); border-left: 0; }
  .crt-org-admin-dashboard .crt-org-admin-member-footer { padding-inline: 16px; }
  .crt-org-admin-dashboard .crt-org-admin-issue { padding-right: 16px; }
  .crt-org-admin-dashboard .crt-org-admin-workflow-counts { display: block; padding: 8px 16px; }
  .crt-org-admin-dashboard .crt-org-admin-workflow-counts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 10px 0; }
  .crt-org-admin-dashboard .crt-org-admin-workflow-counts > div + div { padding-left: 0; border-top: 1px solid var(--crt-border); border-left: 0; }
  .crt-org-admin-dashboard .crt-org-admin-workflow-counts dt { padding-right: 0; font-size: 13px; }
  .crt-org-admin-dashboard .crt-org-admin-workflow-counts dd { font-size: 14px; }
  .crt-org-admin-dashboard .crt-org-admin-activity .crt-panel-heading { align-items: start; flex-direction: column; gap: 12px; }
}

/* Organization profile */
.crt-org-profile { max-width: 850px; }
.crt-org-profile .crt-page-header { margin-bottom: 24px; }
.crt-org-profile .crt-org-profile-details { overflow: hidden; border-radius: var(--crt-radius-md); }
.crt-org-profile .crt-org-profile-identity { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; border-bottom: 1px solid var(--crt-border); }
.crt-org-profile .crt-org-profile-identity h2 { margin: 0; overflow-wrap: anywhere; font-size: 18px; font-weight: 600; line-height: 1.4; }
.crt-org-profile .crt-org-profile-identity .crt-status { flex-shrink: 0; }
.crt-org-profile .crt-org-profile-fields { margin: 0; padding: 0 20px; }
.crt-org-profile .crt-org-profile-fields > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); align-items: baseline; gap: 24px; padding: 16px 0; }
.crt-org-profile .crt-org-profile-fields > div + div { border-top: 1px solid var(--crt-border); }
.crt-org-profile .crt-org-profile-fields dt { color: var(--crt-text-muted); font-size: 12px; font-weight: 500; }
.crt-org-profile .crt-org-profile-fields dd { margin: 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 500; }
.crt-org-profile .crt-org-profile-code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.crt-org-profile .crt-org-profile-context { display: block; margin-top: 4px; color: var(--crt-text-muted); font-size: 11px; font-weight: 400; }
@media (max-width: 575px) {
  .crt-org-profile .crt-org-profile-identity { align-items: start; padding: 16px; }
  .crt-org-profile .crt-org-profile-fields { padding-inline: 16px; }
  .crt-org-profile .crt-org-profile-fields > div { grid-template-columns: 1fr; gap: 4px; }
}

/* Clinical image workspace */
.crt-clinical-viewer { display: flex; flex-direction: column; min-height: calc(100dvh - 170px); border: 1px solid var(--crt-border); border-radius: var(--crt-radius-lg); overflow: hidden; background: var(--crt-surface); }
.crt-clinical-viewer__header { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 82px; padding: 12px 20px; border-bottom: 1px solid var(--crt-border); }
.crt-clinical-viewer__header .crt-case-back { margin-bottom: 4px; }
.crt-clinical-viewer__header h1 { margin: 0; font-size: 18px; }
.crt-clinical-viewer__header .crt-eyebrow { margin: 0 0 2px; }
.crt-clinical-viewer__current { margin: 0; max-width: 45%; color: var(--crt-text-secondary); font-size: 12px; overflow-wrap: anywhere; text-align: right; }
.crt-clinical-viewer__body { display: flex; flex: 1; min-height: 0; }
.crt-clinical-viewer__materials { width: 200px; flex: 0 0 200px; border-right: 1px solid var(--crt-border); padding: 16px 8px; }
.crt-clinical-viewer__materials h2 { display: flex; justify-content: space-between; padding: 0 10px 12px; margin: 0; color: var(--crt-text-muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.crt-clinical-viewer__material { display: flex; align-items: center; gap: 9px; padding: 10px; border-radius: var(--crt-radius-sm); color: var(--crt-text-secondary); font-size: 11px; text-decoration: none; }
.crt-clinical-viewer__material span { color: var(--crt-text-muted); }
.crt-clinical-viewer__material strong { min-width: 0; overflow-wrap: anywhere; font-weight: 550; }
.crt-clinical-viewer__material:hover, .crt-clinical-viewer__material.is-active { background: #eaf3f4; color: var(--crt-primary); }
.crt-clinical-viewer__workspace { position: relative; flex: 1; min-width: 0; min-height: 520px; background: #101920; }
.crt-clinical-viewer__canvas, .crt-clinical-viewer__canvas #openseadragon { position: absolute; inset: 0; width: 100%; height: 100%; }
.crt-clinical-viewer__canvas:fullscreen, .crt-clinical-viewer__canvas.is-fullpage { position: fixed; inset: 0; z-index: 2000; width: 100vw; height: 100dvh; background: #101920; }
.crt-clinical-viewer__message { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; color: #f5f8fa; background: #101920; text-align: center; }
.crt-clinical-viewer__message[hidden] { display: none; }
.crt-clinical-viewer__message strong, .crt-clinical-viewer__message h2 { margin: 0; font-size: 17px; font-weight: 600; }
.crt-clinical-viewer__message p { max-width: 380px; margin: 0; color: #bdcbd2; font-size: 13px; }
.crt-clinical-viewer__message a { color: #c2e8eb; }
.crt-clinical-viewer__message i { font-size: 28px; color: #8faeb9; }
.crt-clinical-viewer__controls { position: absolute; right: 18px; bottom: 18px; z-index: 3; display: flex; gap: 3px; padding: 4px; border: 1px solid #53646d; border-radius: var(--crt-radius-md); background: #21313add; }
.crt-clinical-viewer__controls button { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 4px; background: transparent; color: white; font-size: 20px; }
.crt-clinical-viewer__controls button:hover { background: #ffffff24; }
.crt-slide-regions { position: absolute; top: 16px; left: 16px; z-index: 3; width: 210px; max-height: min(45%, 300px); overflow-y: auto; padding: 10px; border: 1px solid #657780; border-radius: var(--crt-radius-md); background: #192932e8; color: #f5f8fa; box-shadow: 0 8px 26px #0004; }
.crt-slide-regions__heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 12px; }
.crt-slide-regions__heading span { color: #bdd0d9; }
.crt-slide-regions p { margin: 10px 0 0; color: #bdd0d9; font-size: 12px; }
.crt-slide-regions [hidden], .crt-slide-region-actions [hidden] { display: none !important; }
.crt-slide-regions ol { margin: 7px 0 0; padding: 0; list-style: none; }
.crt-slide-regions li { display: flex; align-items: center; gap: 3px; margin-top: 3px; }
.crt-slide-regions button { min-height: 31px; border: 0; border-radius: 4px; background: transparent; color: #f5f8fa; font-size: 12px; }
.crt-slide-regions button:hover, .crt-slide-regions button:focus-visible, .crt-slide-regions button.is-selected { background: #ffffff25; }
.crt-slide-regions__focus { flex: 1; text-align: left; }
.crt-slide-regions__delete { width: 31px; font-size: 20px !important; }
.crt-slide-region-actions { position: absolute; top: 16px; right: 16px; z-index: 3; display: flex; gap: 6px; }
.crt-slide-region-actions button { min-height: 35px; padding: 5px 11px; border: 1px solid #79929d; border-radius: var(--crt-radius-sm); background: #21313aeb; color: white; font-size: 12px; font-weight: 600; }
.crt-slide-region-actions button:hover, .crt-slide-region-actions button:focus-visible, .crt-slide-region-actions button[aria-pressed="true"] { background: #2b626b; }
.crt-slide-region-actions button:disabled { opacity: .5; }
.crt-slide-region-actions #region-review { display: flex; gap: 6px; }
.crt-slide-region-actions #save-area { border-color: #8bc8ce; background: #24727a; }
.crt-slide-region-overlay { box-sizing: border-box; border: 1px solid #9de6e9; background: #50c6cf19; pointer-events: none; }
.crt-slide-region-overlay.is-selected { border-width: 2px; border-color: #fff; background: #9de6e92a; }
.crt-slide-region-overlay.is-temporary { border: 2px dashed #f9cc77; background: #f9cc771f; }
.crt-clinical-viewer__canvas.is-marking #openseadragon, .crt-clinical-viewer__canvas.is-marking #openseadragon * { cursor: crosshair !important; }
@media (max-width: 767px) { .crt-slide-regions { top: 9px; left: 9px; width: 155px; max-height: 150px; } .crt-slide-region-actions { top: 9px; right: 9px; flex-direction: column; align-items: flex-end; } .crt-slide-region-actions #region-review { flex-direction: column; } }
@media (max-width: 767px) { .crt-clinical-viewer { min-height: calc(100dvh - 118px); } .crt-clinical-viewer__body { flex-direction: column; } .crt-clinical-viewer__materials { width: 100%; flex-basis: auto; display: flex; gap: 5px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--crt-border); padding: 6px; } .crt-clinical-viewer__materials h2 { display: none; } .crt-clinical-viewer__material { flex: 0 0 145px; } .crt-clinical-viewer__workspace { min-height: 60dvh; } .crt-clinical-viewer__current { display: none; } }

/* Case conversations and account pages */
.crt-chat-list { margin: 0; padding: 0; list-style: none; }
.crt-chat-list li + li { border-top: 1px solid var(--crt-border); }
.crt-chat-row { display: flex; align-items: center; gap: 16px; min-width: 0; padding: 17px 21px; color: var(--crt-text); text-decoration: none; }
.crt-chat-row:hover, .crt-chat-row.is-unread { background: var(--crt-surface-muted); color: var(--crt-text); }
.crt-chat-row__main { flex: 1; min-width: 0; }
.crt-chat-row__top { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.crt-chat-row__top strong { overflow-wrap: anywhere; font-size: 13px; }
.crt-chat-row__meta, .crt-chat-row__preview { overflow: hidden; margin: 5px 0 0; color: var(--crt-text-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.crt-chat-row__preview { color: var(--crt-text-secondary); }
.crt-chat-row__preview span { font-weight: 600; }
.crt-chat-row > time { color: var(--crt-text-muted); font-size: 11px; white-space: nowrap; }
.crt-chat-row > i { color: var(--crt-text-muted); font-size: 19px; }
.crt-chat-thread { max-width: 1050px; }
.crt-chat-panel { overflow: hidden; }
.crt-chat-messages { min-height: 260px; max-height: min(55dvh, 620px); overflow-y: auto; padding: 22px; }
.crt-chat-message { padding: 14px 0; border-bottom: 1px solid var(--crt-border); }
.crt-chat-message:first-child { padding-top: 0; }
.crt-chat-message:last-child { border-bottom: 0; padding-bottom: 0; }
.crt-chat-message header { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 5px 14px; }
.crt-chat-message strong { font-size: 12px; }
.crt-chat-message time { color: var(--crt-text-muted); font-size: 11px; }
.crt-chat-message p { margin: 6px 0 0; overflow-wrap: anywhere; color: var(--crt-text-secondary); line-height: 1.55; }
.crt-chat-message--own strong { color: var(--crt-primary); }
.crt-chat-empty { margin: 0; color: var(--crt-text-muted); font-size: 13px; }
.crt-chat-composer { padding: 18px 22px 20px; border-top: 1px solid var(--crt-border); background: var(--crt-surface-muted); }
.crt-chat-composer textarea { min-height: 95px; resize: vertical; }
.crt-chat-composer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 12px; }
.crt-chat-error { margin: 0; color: var(--crt-danger); font-size: 12px; }
.crt-chat-error[hidden] { display: none; }
.crt-chat-readonly { margin: 0; padding: 20px 22px; border-top: 1px solid var(--crt-border); color: var(--crt-text-secondary); font-size: 12px; }
.crt-account-page { max-width: 850px; }
.crt-account-summary, .crt-account-form, .crt-support-body { padding: 22px; }
.crt-account-name { display: flex; align-items: center; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--crt-border); }
.crt-account-name .crt-avatar { width: 42px; height: 42px; font-size: 16px; }
.crt-account-name > div { display: flex; flex-direction: column; }
.crt-account-name strong { font-size: 15px; }
.crt-account-name span:not(.crt-avatar) { color: var(--crt-text-muted); font-size: 12px; }
.crt-account-summary dl { margin: 0; }
.crt-account-summary dl > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 15px; padding: 13px 0; border-bottom: 1px solid var(--crt-border); }
.crt-account-summary dt { color: var(--crt-text-muted); font-weight: 500; }
.crt-account-summary dd { margin: 0; overflow-wrap: anywhere; font-weight: 550; }
.crt-account-form .crt-field { margin-bottom: 17px; }
.crt-account-form .form-control { width: min(100%, 540px); }
.crt-account-hint { margin: 14px 0 0; color: var(--crt-text-muted); font-size: 12px; }
.crt-account-actions { display: flex; justify-content: end; gap: 8px; padding-top: 20px; }
.crt-support-body p { margin: 0; color: var(--crt-text-secondary); line-height: 1.6; }
@media (max-width: 575px) { .crt-chat-row { align-items: start; padding: 15px; } .crt-chat-row > time { display: none; } .crt-chat-messages, .crt-chat-composer { padding-inline: 15px; } .crt-account-summary dl > div { grid-template-columns: 1fr; gap: 2px; } }

/* Remaining operational and legal surfaces */
.crt-min-w-0 { min-width: 0; }
.crt-terms-panel .card-title { margin: 0; font-size: 15px; }
.crt-terms-panel .card-header { display: flex; align-items: center; min-height: 58px; }
.terms-card { scroll-margin-top: 1.5rem; }
.terms-navigation { position: sticky; top: 84px; }
.terms-navigation .nav-link { padding: 8px 11px; border-radius: var(--crt-radius-sm); color: var(--crt-text-secondary); font-size: 12px; }
.terms-navigation .nav-link:hover, .terms-navigation .nav-link:focus { background: var(--crt-surface-hover); color: var(--crt-primary); }
.terms-content p, .terms-content li { line-height: 1.7; }
.terms-content h5 { margin-bottom: 1rem; }
@media (max-width: 1199px) { .terms-navigation { position: static; } }

/* Clinical case workspaces */
.crt-case-header { margin: 4px 0 20px; padding: 0 0 20px; border-bottom: 1px solid var(--crt-border); }
.crt-case-accept { margin: 0 0 20px; }
.crt-case-accept .btn { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 9px 15px; border-radius: 8px; font-size: 13px; font-weight: 600; line-height: 1.2; }
.crt-case-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; color: var(--crt-text-secondary); font-size: 12px; font-weight: 550; text-decoration: none; }
.crt-case-back:hover { color: var(--crt-primary); }
.crt-case-header-main { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.crt-case-heading { min-width: 0; }
.crt-case-heading h1 { margin: 0; overflow-wrap: anywhere; font-size: clamp(22px, 2vw, 28px); line-height: 1.2; }
.crt-case-subtitle { margin: 7px 0 0; color: var(--crt-text-secondary); font-size: 13px; }
.crt-case-header-main .crt-status { flex: 0 0 auto; margin-top: 18px; }
.crt-case-header-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 18px; margin-top: 16px; color: var(--crt-text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.crt-case-reference { overflow-wrap: anywhere; }
.crt-case-reference strong { color: var(--crt-text-secondary); font-weight: 600; }
.crt-case-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 325px); align-items: start; gap: 18px; }
.crt-case-layout--assessment { grid-template-columns: minmax(0, 1fr) minmax(320px, 350px); grid-template-areas: "main assessment" "main aside"; grid-template-rows: auto 1fr; }
.crt-case-layout--assessment .crt-case-main { grid-area: main; }
.crt-case-layout--assessment .crt-assessment-panel { grid-area: assessment; }
.crt-case-layout--assessment .crt-case-aside { grid-area: aside; }
.crt-case-main, .crt-case-aside { display: flex; flex-direction: column; min-width: 0; gap: 16px; }
.crt-section { min-width: 0; overflow: hidden; border: 1px solid var(--crt-border); border-radius: var(--crt-radius-lg); background: var(--crt-surface); }
.crt-section-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 16px 20px; border-bottom: 1px solid var(--crt-border); }
.crt-section-header .crt-eyebrow { margin-bottom: 3px; }
.crt-section-header h2 { margin: 0; font-size: 15px; line-height: 1.35; }
.crt-section-subtitle { margin: 5px 0 0; color: var(--crt-text-muted); font-size: 11px; line-height: 1.4; }
.crt-section-date { display: block; color: var(--crt-text-muted); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.crt-section-count { padding: 2px 6px; border: 1px solid var(--crt-border); border-radius: 5px; color: var(--crt-text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.crt-clinical-text { max-width: 80ch; overflow-wrap: anywhere; color: var(--crt-text); font-size: 13px; line-height: 1.65; }
.crt-conclusion > .crt-clinical-text { padding: 21px 22px 24px; }
.crt-conclusion-note { margin: 18px 22px 0; color: var(--crt-warning); font-size: 12px; font-weight: 600; }
.crt-conclusion-action { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 15px 20px; border-top: 1px solid var(--crt-border); background: var(--crt-surface-muted); }
.crt-conclusion-action p { margin: 0; color: var(--crt-text-secondary); font-size: 12px; }
.crt-conclusion-action .btn { display: inline-flex; align-items: center; gap: 5px; }
.crt-section-empty { padding: 28px 22px; color: var(--crt-text-secondary); }
.crt-section-empty strong { display: block; margin-bottom: 5px; color: var(--crt-text); font-size: 13px; font-weight: 600; }
.crt-section-empty p { margin: 0; font-size: 12px; line-height: 1.5; }
.crt-section-empty small { display: block; margin-top: 5px; color: var(--crt-text-muted); font-size: 11px; }
.crt-metadata { display: grid; gap: 0; margin: 0; padding: 4px 20px; }
.crt-metadata--two { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.crt-metadata__item { min-width: 0; padding: 11px 0; border-bottom: 1px solid var(--crt-border); }
.crt-metadata__item:last-child, .crt-metadata--two .crt-metadata__item:nth-last-child(-n+2) { border-bottom: 0; }
.crt-metadata dt { margin: 0 0 4px; color: var(--crt-text-muted); font-size: 11px; font-weight: 550; }
.crt-metadata dd { margin: 0; overflow-wrap: anywhere; color: var(--crt-text); font-size: 12px; font-weight: 550; line-height: 1.45; }
.crt-break-all { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.crt-clinical-note { padding: 16px 20px 20px; border-top: 1px solid var(--crt-border); }
.crt-clinical-note h3 { margin: 0 0 9px; font-size: 12px; }
.crt-clinical-note .crt-clinical-text { font-size: 12px; }
.crt-muted { margin: 0; color: var(--crt-text-muted); font-size: 12px; }
.crt-material-list { margin: 0; padding: 0; list-style: none; }
.crt-material-item { display: flex; align-items: center; gap: 13px; min-height: 66px; padding: 12px 20px; }
.crt-material-item + .crt-material-item { border-top: 1px solid var(--crt-border); }
.crt-material-icon { display: inline-grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border: 1px solid var(--crt-border); border-radius: var(--crt-radius-sm); background: var(--crt-surface-muted); color: var(--crt-text-secondary); font-size: 17px; }
.crt-material-info { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.crt-material-info strong { overflow-wrap: anywhere; font-size: 12px; font-weight: 600; }
.crt-material-info small { color: var(--crt-text-muted); font-size: 11px; }
.crt-material-actions { display: flex; align-items: center; justify-content: end; flex-wrap: wrap; gap: 7px; }
.crt-material-actions .btn { min-height: 34px; padding: 6px 10px; font-size: 11px; white-space: nowrap; }
.crt-material-unavailable { color: var(--crt-text-muted); font-size: 11px; }
.crt-activity-list { margin: 0; padding: 8px 20px 12px; list-style: none; }
.crt-activity-list li { display: flex; gap: 12px; min-height: 48px; padding: 9px 0; }
.crt-activity-list li + li { border-top: 1px solid var(--crt-border); }
.crt-activity-mark { flex: 0 0 7px; width: 7px; height: 7px; margin-top: 6px; border-radius: 50%; background: var(--crt-border-strong); }
.crt-activity-list li:first-child .crt-activity-mark { background: var(--crt-primary); }
.crt-activity-list li > div { display: flex; flex: 1; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 3px 16px; }
.crt-activity-list strong { font-size: 12px; font-weight: 550; }
.crt-activity-list time { color: var(--crt-text-muted); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.crt-communication { padding-bottom: 18px; }
.crt-communication > p { margin: 17px 20px 13px; color: var(--crt-text-secondary); font-size: 12px; line-height: 1.5; }
.crt-communication > .btn { display: inline-flex; align-items: center; gap: 6px; margin: 0 20px; }
.crt-assessment-body { padding: 18px 20px 20px; }
.crt-assessment-body > .crt-section-subtitle { margin: 0 0 16px; }
.crt-assessment-body .crt-clinical-text { margin-bottom: 13px; }
.crt-conclusion-input { min-height: 220px; resize: vertical; line-height: 1.55; }
.crt-assessment-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.crt-assessment-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 38px; }
.crt-assessment-actions .btn-primary { flex: 1; }
.crt-cytology-field { margin-bottom: 16px; }
.crt-cytology-field .errorlist { margin: 4px 0 0; padding-left: 18px; font-size: 12px; }
.crt-cytology-badge { display: inline; white-space: normal; line-height: 1.6; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.crt-cytology-badge strong { font-weight: 700; }
.crt-cytology-report { padding: 18px 22px; }
.crt-assessment-body .crt-cytology-report { padding: 0 0 18px; }
.crt-cytology-report .crt-metadata { margin-top: 14px; padding: 0; }
.crt-list-cytology { margin-top: 7px; line-height: 1.6; }
.crt-fragment-tools { margin-bottom: 10px; }
.crt-clinical-timing .crt-table { min-width: 680px; table-layout: auto; }
.crt-fragment-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.crt-fragment-actions a { font-size: 12px; }
.crt-fragment-picker { padding: 12px; margin-top: 10px; border: 1px solid var(--crt-border); border-radius: 6px; background: var(--crt-surface-muted); }
.crt-fragment-results { display: grid; gap: 7px; max-height: 260px; overflow-y: auto; }
.crt-fragment-choice, .crt-fragment-completion-button { width: 100%; min-width: 0; text-align: left; padding: 9px 11px; border: 1px solid var(--crt-border); border-radius: 5px; background: var(--crt-surface); color: var(--crt-text-secondary); font: inherit; font-size: 12px; overflow-wrap: anywhere; }
.crt-fragment-choice:hover, .crt-fragment-completion-button:hover { border-color: var(--crt-primary); }
.crt-fragment-choice strong, .crt-fragment-completion-button strong { display: block; color: var(--crt-text); font-size: 12px; margin-bottom: 3px; }
.crt-fragment-choice span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.crt-conclusion-editor { position: relative; }
.crt-conclusion-editor textarea { position: relative; z-index: 1; }
.crt-fragment-ghost { position: absolute; z-index: 2; inset: 0; box-sizing: border-box; border: 1px solid transparent; overflow: hidden; white-space: pre-wrap; overflow-wrap: break-word; color: transparent; pointer-events: none; }
.crt-fragment-ghost-text { color: var(--crt-text-muted); opacity: .8; cursor: pointer; pointer-events: auto; }
.crt-fragment-completion { margin-top: 9px; }
.crt-fragment-completion-button { max-height: 160px; overflow-y: auto; }
.crt-fragment-completion-button span { white-space: pre-wrap; color: var(--crt-text-muted); }
.crt-fragment-search { display: flex; gap: 10px; padding: 20px; }
.crt-fragment-card { padding: 20px; border-top: 1px solid var(--crt-border); }
.crt-fragment-card-heading { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.crt-fragment-card h2 { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.crt-fragment-card-actions { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; }
.crt-fragment-text { margin-top: 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.crt-fragment-pagination { display: flex; justify-content: center; gap: 20px; padding: 20px; border-top: 1px solid var(--crt-border); }
.crt-slide-workspace { overflow: hidden; }
.crt-viewer-controls { display: flex; align-items: center; gap: 5px; }
.crt-viewer-controls button { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--crt-border); border-radius: var(--crt-radius-sm); background: var(--crt-surface); color: var(--crt-text-secondary); font-size: 17px; }
.crt-viewer-controls button:hover { background: var(--crt-surface-hover); color: var(--crt-text); }
.crt-viewer-stage { position: relative; height: clamp(420px, 52vh, 660px); background: #111827; }
.crt-viewer-stage #openseadragon { width: 100%; height: 100%; }
.crt-viewer-message { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; background: #111827; color: #f8fafc; font-size: 13px; text-align: center; }
.crt-viewer-message[hidden] { display: none; }
.crt-slide-strip { display: flex; gap: 9px; overflow-x: auto; padding: 11px 14px; border-top: 1px solid var(--crt-border); }
.crt-slide-button { flex: 0 0 120px; width: 120px; min-width: 0; overflow: hidden; padding: 0; border: 1px solid var(--crt-border); border-radius: var(--crt-radius-sm); background: var(--crt-surface); color: var(--crt-text-secondary); text-align: left; }
.crt-slide-button:hover, .crt-slide-button.is-active { border-color: var(--crt-primary); color: var(--crt-primary); }
.crt-slide-button.is-active { box-shadow: 0 0 0 2px rgb(17 107 120 / .12); }
.crt-slide-button img { display: block; width: 100%; height: 67px; object-fit: cover; background: var(--crt-surface-muted); }
.crt-slide-button span { display: block; overflow: hidden; padding: 6px 7px; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1199px) {
  .crt-case-layout { grid-template-columns: 1fr; }
  .crt-case-layout--assessment { grid-template-columns: 1fr; grid-template-areas: "assessment" "main" "aside"; grid-template-rows: auto; }
}
@media (max-width: 575px) {
  .crt-case-header-main { flex-wrap: wrap; gap: 8px; }
  .crt-case-header-main .crt-status { margin-top: 0; }
  .crt-case-header-meta { flex-direction: column; align-items: start; gap: 5px; }
  .crt-section-header { align-items: start; flex-wrap: wrap; padding: 14px 16px; }
  .crt-metadata { padding-inline: 16px; }
  .crt-metadata--two { grid-template-columns: 1fr; }
  .crt-metadata--two .crt-metadata__item:nth-last-child(2) { border-bottom: 1px solid var(--crt-border); }
  .crt-material-item { align-items: start; flex-wrap: wrap; padding: 12px 16px; }
  .crt-material-actions { justify-content: start; width: 100%; padding-left: 49px; }
  .crt-conclusion > .crt-clinical-text, .crt-assessment-body, .crt-section-empty { padding: 18px 16px; }
  .crt-conclusion-action { padding: 14px 16px; }
  .crt-clinical-note { padding-inline: 16px; }
  .crt-activity-list { padding-inline: 16px; }
  .crt-assessment-actions .btn { flex: 1 1 100%; }
  .crt-viewer-stage { height: 340px; }
}

/* Clinical order submission */
.crt-case-messages { margin-bottom: 16px; }
.crt-case-message { padding: 12px 15px; border: 1px solid var(--crt-border); border-radius: var(--crt-radius-md); background: var(--crt-surface); color: var(--crt-text-secondary); font-size: 12px; }
.crt-case-message--success { border-color: #cce8d4; background: #edf7f0; color: var(--crt-success); }
.crt-form-page { width: min(100%, 1080px); margin: 0 auto; }
.crt-form-page-header { margin: 4px 0 22px; }
.crt-form-page-header .crt-case-back { margin-bottom: 18px; }
.crt-form-page-header h1 { margin: 0; font-size: clamp(23px, 2vw, 28px); line-height: 1.2; }
.crt-order-form { overflow: hidden; border: 1px solid var(--crt-border); border-radius: var(--crt-radius-lg); background: var(--crt-surface); }
.crt-form-section { padding: 26px 30px 30px; border-bottom: 1px solid var(--crt-border); }
.crt-form-section-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 22px; }
.crt-form-section-heading .crt-eyebrow { margin-bottom: 5px; }
.crt-form-section-heading h2 { margin: 0; font-size: 16px; line-height: 1.3; }
.crt-form-section-heading > p { margin: 0; color: var(--crt-text-muted); font-size: 11px; }
.crt-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.crt-field { min-width: 0; }
.crt-field .form-label { display: inline-block; margin-bottom: 7px; font-size: 12px; }
.crt-field .form-control, .crt-field .form-select { min-height: 40px; font-size: 13px; }
.crt-field .input-group-text { border-color: var(--crt-border-strong); background: var(--crt-surface-muted); color: var(--crt-text-secondary); font-size: 12px; }
.crt-field--wide { max-width: 860px; }
.crt-field textarea.crt-notes-input { min-height: 160px; resize: vertical; line-height: 1.55; }
.crt-required { color: var(--crt-danger); font-size: 12px; font-weight: 600; }
.crt-field .invalid-feedback { margin-top: 6px; font-size: 11px; line-height: 1.4; }
.crt-form-alert { margin-bottom: 16px; padding: 13px 16px; border: 1px solid #efd2d2; border-radius: var(--crt-radius-md); background: #fff7f7; color: var(--crt-danger); font-size: 12px; }
.crt-form-alert strong { display: block; font-weight: 650; }
.crt-form-alert p { margin: 4px 0 0; color: var(--crt-text-secondary); }
.crt-form-alert--success { border-color: #cce8d4; background: #edf7f0; color: var(--crt-success); }
.crt-help { margin: 0 0 12px; color: var(--crt-text-muted); font-size: 12px; line-height: 1.45; }
.crt-upload { max-width: 860px; }
.crt-upload > .form-label { margin-bottom: 6px; font-size: 12px; }
.crt-upload .filepond--root { margin-bottom: 6px; font-family: var(--bs-body-font-family); font-size: 12px; }
.crt-upload .filepond--panel-root { border: 1px dashed var(--crt-border-strong); border-radius: var(--crt-radius-md); background: var(--crt-surface-muted); }
.crt-upload .filepond--drop-label { min-height: 130px; color: var(--crt-text-secondary); }
.crt-upload .filepond--label-action { color: var(--crt-primary); font-weight: 600; text-decoration-color: var(--crt-primary); }
.crt-upload .filepond--item-panel { border: 1px solid var(--crt-border); background: #eaf0f2; }
.crt-upload .filepond--file { color: var(--crt-text); }
.crt-upload .filepond--file-action-button { background: var(--crt-surface); color: var(--crt-text-secondary); }
.crt-upload .filepond--file-info-sub, .crt-upload .filepond--file-status-sub { color: var(--crt-text-secondary); }
.crt-upload .filepond--file-status-main { color: var(--crt-text); }
.crt-upload .filepond--item[data-filepond-item-state*="error"] .filepond--item-panel { border-color: #e9b9b9; background: #fdf0f0; }
.crt-upload-status { min-height: 18px; margin: 5px 0 10px; color: var(--crt-text-muted); font-size: 11px; }
.crt-upload-status.is-busy { color: var(--crt-primary); }
.crt-upload-status.is-error { color: var(--crt-danger); font-weight: 600; }
.crt-form-footer { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 20px; padding: 22px 30px; background: var(--crt-surface-muted); }
.crt-confirm-field { flex: 1 1 340px; }
.crt-confirm-field .form-check { margin: 0; }
.crt-confirm-field .form-check-label { color: var(--crt-text-secondary); font-size: 12px; line-height: 1.5; }
.crt-form-actions { display: flex; justify-content: end; gap: 8px; }
.crt-form-actions .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 16px; white-space: nowrap; }
@media (max-width: 767px) {
  .crt-form-section { padding: 22px 18px 24px; }
  .crt-form-grid { grid-template-columns: 1fr; gap: 16px; }
  .crt-form-footer { align-items: stretch; padding: 20px 18px; }
  .crt-form-actions { width: 100%; }
  .crt-form-actions .btn { flex: 1; }
}

/* Unread case conversations remain visible throughout the clinical workspace. */
.crt-chat-shortcut { position: relative; flex-shrink: 0; text-decoration: none; }
.crt-chat-shortcut .crt-nav-count { position: absolute; top: -5px; right: -6px; min-width: 18px; padding: 2px 4px; font-size: 10px; }
[data-chat-unread-count][hidden], [data-chat-row-unread][hidden], [data-chat-inbox-update][hidden], .crt-chat-new-messages[hidden] { display: none; }
.crt-chat-new-messages { display: flex; justify-content: center; padding: 8px 16px; border-top: 1px solid var(--crt-border); background: var(--crt-surface-muted); }
.crt-chat-row.is-unread .crt-chat-row__top strong { color: var(--crt-primary); }
.crt-chat-shortcut { display: inline-flex; }
