:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #263446;
  background: #f3f5f8;
  font-synthesis: none;
  --nav: #111e2e;
  --muted: #627083;
  --line: #e2e7ee;
  --teal: #087c72;
  --teal-dark: #06665e;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.5; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: inherit; }
button, input, a { touch-action: manipulation; }
:focus-visible { outline: 3px solid #128fbe; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { color: #142236; font-size: clamp(27px, 3vw, 34px); line-height: 1.25; font-weight: 650; letter-spacing: -.9px; }
h2 { color: #1b2c41; font-size: 17px; font-weight: 650; }
h3 { color: #243449; font-size: 16px; }
.icon { display: inline-flex; width: 20px; height: 20px; flex: 0 0 20px; align-items: center; justify-content: center; }
.icon svg { width: 100%; height: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -60px; left: 16px; z-index: 100; padding: 12px 20px; border-radius: 8px; background: white; color: #142236; }
.skip-link:focus { top: 12px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 238px; padding: 32px 18px 20px; background: var(--nav); color: #bac7d6; display: flex; flex-direction: column; z-index: 10; overflow-y: auto; overscroll-behavior: contain; }
.brand { display: flex; align-items: center; gap: 13px; padding: 0 12px; text-decoration: none; color: #fff; font-size: 26px; font-weight: 700; letter-spacing: 1px; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: #12b7a6; color: #082d32; font-size: 32px; line-height: 1; }
.brand-caption { display: block; font-size: 9px; font-weight: 500; letter-spacing: 1.8px; color: #acbcca; margin-top: 1px; }
.workspace-label { margin: 30px 10px 34px; display: flex; align-items: center; gap: 9px; font-size: 12px; color: #bdcad8; padding: 12px 0; border-block: 1px solid #293849; }
.workspace-dot { width: 7px; height: 7px; border-radius: 50%; background: #55d3c1; }
.nav-label { font-size: 10px; letter-spacing: 1.7px; color: #93a6bb; padding: 0 14px; margin-bottom: 12px; }
#navigation { display: grid; gap: 7px; }
.nav-link { min-height: 46px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 7px; text-decoration: none; font-size: 13px; font-weight: 550; transition: background .15s; }
.nav-link:hover { background: #1e3043; color: #fff; }
.export-detail { padding: 24px; margin: 20px 0; overflow-wrap: anywhere; }
.retrieval-detail { padding: 24px; margin: 20px 0; overflow-wrap: anywhere; }
.view-switch { display: flex; gap: 8px; margin: 18px 0 10px; }
.retrieval-detail h2 { margin-top: 0; }
.retrieval-detail .heading-actions { margin: 18px 0; }
.retrieval-detail table { min-width: 780px; }
.retrieval-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); gap: 12px; margin: 20px 0; }
.retrieval-counts > div { display: flex; flex-direction: column; gap: 9px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
.retrieval-counts strong { font-size: 22px; }
.retrieval-lookup label { flex: 1 1 310px; max-width: 440px; }
.export-create { padding: 24px; margin: 20px 0; overflow-wrap: anywhere; }
.export-create .heading-actions { margin: 16px 0; }
.export-create input, .export-create select { width: 100%; max-width: 640px; min-width: 0; font: inherit; min-height: 42px; padding: 9px 12px; border: 1px solid #c9d3df; border-radius: 6px; background: #fff; color: #263446; }
.export-create .field-label { display: block; margin-top: 16px; }
.export-detail .heading-actions { margin: 18px 0; }
.export-lookup { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 20px 0; }
.export-lookup label { display: grid; gap: 8px; min-width: 0; }
.export-lookup label:nth-child(2) { flex: 1 1 310px; max-width: 440px; }
.export-lookup input, .export-lookup select { font: inherit; min-height: 42px; padding: 9px 12px; border: 1px solid #c9d3df; border-radius: 6px; background: #fff; color: #263446; }
.export-lookup input { width: 100%; min-width: 0; }
.export-confirm, .export-notice { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #f3f7fa; }
.nav-link[aria-current="page"] { background: #143e43; color: #87efde; box-shadow: inset 3px 0 #38cab5; }
.sidebar-footer { margin-top: auto; padding: 24px 10px 0; }
.sidebar-note { display: flex; gap: 10px; align-items: flex-start; color: #d3dde6; font-size: 12px; }
.sidebar-note .icon { color: #61b9b4; }
.sidebar-note small { display: block; margin-top: 4px; color: #9fb0c2; font-size: 10px; }
.sidebar-version { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 26px; padding-top: 16px; border-top: 1px solid #293849; font-size: 10px; color: #9cacc0; }
.app-shell { margin-left: 238px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { min-height: 74px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 36px; }
.breadcrumb, .topbar-actions { display: flex; align-items: center; gap: 16px; }
.breadcrumb { color: var(--muted); font-size: 12px; }
.breadcrumb strong { color: #34445b; font-weight: 550; }
main { flex: 1; min-width: 0; padding: 34px 36px 20px; }
#view { display: grid; gap: 22px; max-width: 1640px; margin: 0 auto; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 3px; }
.eyebrow { color: var(--teal); font-size: 10px; font-weight: 750; letter-spacing: 1.7px; margin-bottom: 9px; }
.page-description { margin-top: 9px; color: var(--muted); font-size: 13px; }
.heading-actions, .dialog-actions, .pagination-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.heading-actions { flex-shrink: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 15px; border-radius: 7px; border: 1px solid transparent; font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.button-primary { color: #fff; background: var(--teal); border-color: var(--teal); box-shadow: 0 2px 3px #163b4210; }
.button-primary:hover:not(:disabled) { background: var(--teal-dark); }
.button-outline { background: white; border-color: #d8e0e9; color: #42516a; }
.button-outline:hover:not(:disabled) { border-color: #9facba; background: #f4f7fa; }
.button-danger { color: #fff; background: #a83232; border-color: #a83232; }
.button-danger:hover:not(:disabled) { background: #842525; }
.button-small { min-height: 34px; padding: 6px 10px; font-size: 11px; }
.button-small .icon { width: 16px; height: 16px; flex-basis: 16px; }
.button-quiet { background: transparent; color: var(--teal); }
.button-quiet:hover { background: #eaf6f4; }
.icon-button { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--muted); }
.icon-button:hover { background: #f1f5f9; }
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 20px; padding: 4px 9px; font-size: 11px; font-weight: 550; line-height: 1.6; background: #eef1f5; color: #526075; overflow-wrap: anywhere; }
.status-dot { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: currentColor; }
.badge.success { color: #086e53; background: #e5f5ef; }
.badge.danger { color: #a33237; background: #fceced; }
.badge.warning { color: #82520f; background: #fff3da; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.metric { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 20px; min-width: 0; box-shadow: 0 2px 4px #1b2c411f; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }
.metric-top .icon { color: #7f91a6; width: 18px; height: 18px; }
.metric-value { display: block; margin: 12px 0 6px; color: #23354b; font-size: 25px; line-height: 1.2; font-weight: 600; letter-spacing: -.7px; overflow-wrap: anywhere; }
.metric-detail { color: var(--muted); font-size: 10px; }
.card { min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 3px 8px #1b2c4105; overflow: hidden; }
.card-heading { padding: 21px 24px 18px; border-bottom: 1px solid var(--line); }
.card-heading h2 { display: flex; align-items: center; gap: 10px; }
.card-heading .icon { color: var(--teal); }
.card-heading p, .archive-toolbar p { margin-top: 4px; color: var(--muted); font-size: 11px; }
.archive-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.subtle-chip { display: inline-block; border: 1px solid var(--line); padding: 4px 9px; border-radius: 5px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.search-area { padding: 20px 24px 16px; }
.search-form { display: flex; gap: 10px; }
.search-input { position: relative; flex: 1; min-width: 0; }
.search-input > .icon { position: absolute; left: 13px; top: 11px; width: 18px; height: 18px; color: #8291a3; }
input[type="search"], input[type="password"] { width: 100%; min-height: 42px; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; padding: 10px 12px; color: #263446; font-size: 12px; }
.token-input-row { display: flex; align-items: center; gap: 8px; }
.token-input-row input { min-width: 0; }
.token-input-row button { flex: 0 0 auto; }
.connection-dialog #token { width: 100%; min-height: 42px; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; padding: 10px 12px; color: #263446; font-size: 12px; }
input[type="search"] { padding-left: 40px; background: #fafbfd; }
input::placeholder { color: #67758a; opacity: 1; }
.field-help { color: var(--muted); font-size: 11px; margin-top: 9px; line-height: 1.6; }
.form-error { color: #aa333c; font-size: 12px; margin-top: 8px; }
.form-error:empty { display: none; }
.table-scroll { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
th { background: #f8fafc; color: #607088; font-size: 10px; font-weight: 650; letter-spacing: .3px; padding: 12px 16px; border-block: 1px solid var(--line); white-space: nowrap; }
td { padding: 17px 16px; border-bottom: 1px solid #edf0f4; vertical-align: middle; }
td .badge { white-space: nowrap; overflow-wrap: normal; }
th:first-child, td:first-child { padding-left: 24px; }
th:last-child, td:last-child { padding-right: 24px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f9fcfc; }
.cell-primary { display: block; color: #273c54; font-size: 12px; font-weight: 550; }
.cell-secondary { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.study-metadata { max-width: 44ch; line-height: 1.45; overflow-wrap: anywhere; }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 11px; }
.uid { overflow-wrap: anywhere; max-width: 280px; }
.table-scroll .uid { max-width: none; overflow-wrap: normal; white-space: nowrap; }
.hash { display: block; overflow-wrap: anywhere; max-width: 160px; font-size: 9px; }
.nowrap { white-space: nowrap; }
.numeric { font-variant-numeric: tabular-nums; }
.modality-list { display: flex; gap: 4px; flex-wrap: wrap; min-width: 35px; }
.modality { border-radius: 4px; border: 1px solid #dce5ef; background: #f0f5fa; padding: 2px 6px; color: #49647e; font-size: 9px; font-weight: 650; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 15px 24px; color: var(--muted); font-size: 11px; }
.footnote { display: flex; align-items: flex-start; justify-content: center; gap: 7px; color: var(--muted); font-size: 10px; padding: 0 12px; }
.footnote .icon { width: 14px; height: 14px; flex-basis: 14px; }
.state-panel { min-height: 300px; padding: 48px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.state-illustration { display: grid; place-items: center; width: 64px; height: 64px; background: #eef5f6; color: #3b8889; border: 1px solid #dae9ea; border-radius: 18px; margin-bottom: 19px; box-shadow: 0 0 0 8px #f7fafb; }
.state-illustration .icon { width: 29px; height: 29px; flex-basis: 29px; }
.state-panel h3 { margin-bottom: 8px; }
.state-panel p { max-width: 440px; color: var(--muted); font-size: 12px; }
.state-panel .button { margin-top: 20px; }
.state-error .state-illustration { color: #a44243; border-color: #efd7d7; background: #fcf1f1; }
.state-loading .state-illustration .icon { animation: spin 2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.definition-list { margin: 0; padding: 8px 24px 14px; }
.definition-list > div { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding: 14px 0; border-bottom: 1px solid #eef1f5; }
.definition-list > div:last-child { border-bottom: 0; }
dt { flex: 0 0 42%; color: var(--muted); font-size: 12px; }
dd { margin: 0; text-align: right; color: #283c53; font-size: 12px; overflow-wrap: anywhere; }
.card-copy { padding: 22px 24px; }
.card-copy .definition-list { padding: 0 0 15px; }
.card-copy > p { color: var(--muted); margin-top: 14px; font-size: 12px; }
.migration-source-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.migration-source-count { display: grid; justify-items: start; gap: 6px; }
.migration-source-controls label { display: grid; gap: 6px; color: #34445b; font-size: 12px; font-weight: 600; }
.migration-source-controls select { min-width: 220px; min-height: 42px; padding: 9px 11px; border: 1px solid #c9d3df; border-radius: 7px; background: #fff; color: #263446; font: inherit; }
.migration-replay { display: grid; min-width: 190px; gap: 8px; }
.migration-replay label { display: grid; gap: 4px; color: #34445b; font-size: 11px; font-weight: 600; }
.migration-replay input { width: 100%; min-height: 36px; padding: 7px 9px; border: 1px solid #c9d3df; border-radius: 6px; background: #fff; color: #263446; font: inherit; }
.migration-replay [role="status"] { max-width: 240px; color: #34445b; font-size: 12px; overflow-wrap: anywhere; }
.migration-batch-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.migration-batch-controls [role="status"] { flex: 1 1 100%; margin: 0; color: #34445b; font-size: 13px; overflow-wrap: anywhere; }
.migration-source-json { max-width: min(76vw, 900px); max-height: 32rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.instance-metadata { margin-top: 8px; font-size: 12px; }
.instance-metadata summary { cursor: pointer; color: var(--teal); }
.metadata-output { max-width: min(70vw, 760px); max-height: 24rem; overflow: auto; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: #f7f8fa; white-space: pre-wrap; overflow-wrap: anywhere; }
.capability-list { padding: 8px 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; }
.capability { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.capability:last-child { border-bottom: 0; }
.capability .badge { flex-shrink: 0; white-space: nowrap; overflow-wrap: normal; }
.notice { display: flex; gap: 15px; padding: 21px 24px; border: 1px solid #cbdfe4; border-radius: 9px; background: #eaf3f6; color: #34566d; }
.notice .icon { margin-top: 2px; }
.notice strong { font-size: 13px; }
.notice p { font-size: 12px; margin-top: 5px; }
.page-footer { display: flex; justify-content: space-between; gap: 16px; margin: 10px 36px 0; padding: 18px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.dialog { border: 1px solid #d6dfe8; border-radius: 14px; padding: 28px; width: min(540px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow: auto; color: #263446; background: #fff; box-shadow: 0 24px 80px #081b3345; }
.dialog::backdrop { background: #07182db3; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; margin-bottom: 18px; }
.dialog-heading h2 { font-size: 23px; letter-spacing: -.5px; overflow-wrap: anywhere; }
.dialog-heading .eyebrow { font-size: 9px; }
.muted { color: var(--muted); font-size: 12px; line-height: 1.7; }
.patient-comments { white-space: pre-wrap; }
.field-label { display: block; margin: 22px 0 8px; font-size: 12px; font-weight: 650; }
.checkbox-label { display: flex; align-items: flex-start; gap: 9px; margin-top: 22px; font-size: 12px; cursor: pointer; }
input[type="checkbox"] { accent-color: var(--teal); width: 16px; height: 16px; margin: 2px 0 0; flex: 0 0 16px; }
.dialog-actions { justify-content: flex-end; border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; }
.file-drop { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 22px; padding: 28px 20px; border: 1px dashed #a1c6c3; border-radius: 9px; background: #f3faf9; color: #365e62; cursor: pointer; }
.file-drop > .icon { width: 28px; height: 28px; }
.file-drop strong { font-size: 13px; }
.file-drop > span:last-of-type { font-size: 11px; }
.file-drop input { max-width: 100%; font-size: 11px; margin-top: 8px; }
.file-drop input::file-selector-button { border: 1px solid #b9d2d0; background: white; color: var(--teal); border-radius: 5px; padding: 7px 10px; margin-right: 8px; cursor: pointer; }
.upload-status { border: 1px solid var(--line); border-radius: 7px; padding: 12px; margin-top: 18px; background: #f8fafc; font-size: 12px; line-height: 1.7; }
.upload-results { display: grid; gap: 7px; max-height: 180px; overflow: auto; margin: 10px 0 0; padding: 0; list-style: none; }
.upload-results li { display: grid; grid-template-columns: minmax(120px, 1fr) auto; gap: 3px 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: white; font-size: 11px; overflow-wrap: anywhere; }
.upload-results li > span:last-child { grid-column: 1 / -1; color: var(--muted); }
.upload-result-accepted { color: #14734d; font-weight: 650; }
.upload-result-rejected, .upload-result-outcome-unknown { color: #a33434; font-weight: 650; }
progress { width: 100%; height: 8px; margin-top: 18px; accent-color: var(--teal); }
.study-dialog { width: min(1120px, calc(100vw - 32px)); }
.preview-dialog { width: min(900px, calc(100vw - 32px)); background: #111820; color: #e8eef5; border-color: #34404b; }
.preview-dialog .dialog-heading h2 { color: #f0f5fa; }
.preview-dialog .muted, .preview-dialog .field-help { color: #b5c1ce; }
.preview-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; margin: 12px 0; color: #d5dee8; font-size: 12px; }
.preview-controls > span { align-self: center; }
.preview-controls label { display: grid; gap: 4px; }
.preview-controls select { max-width: 260px; border: 1px solid #536171; border-radius: 5px; padding: 7px 8px; background: #1c2732; color: #f0f5fa; }
.preview-controls input { width: 112px; border: 1px solid #536171; border-radius: 5px; padding: 7px 8px; background: #1c2732; color: #f0f5fa; }
.preview-controls .button-outline { background: #1c2732; color: #e4edf5; border-color: #536171; }
.preview-stage { display: grid; place-items: center; min-height: 220px; max-height: min(70vh, 760px); overflow: auto; background: #050709; border: 1px solid #35414c; border-radius: 8px; }
.preview-stage canvas { display: block; width: min(100%, 640px); height: auto; max-width: 100%; max-height: 68vh; image-rendering: pixelated; }
.preview-stage canvas[hidden] { display: none; }
.study-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; padding: 0; }
.study-summary dd { max-width: 60%; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }
#study-content > .field-help { margin-bottom: 18px; }
.study-permissions-card { padding: 18px; margin-bottom: 18px; }
.study-permissions-card .card-heading { padding: 0 0 12px; border-bottom: 0; }
.study-permission-form { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(140px, .7fr) auto; align-items: end; gap: 10px; margin: 18px 0; }
.study-permission-form label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; }
.study-permission-form input, .study-permission-form select { min-width: 0; }
.study-permission-form button { align-self: end; }
.archive5-network-migration-form { display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: end; gap: 10px; margin: 18px 0; }
.archive5-network-migration-form label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; }
.archive5-network-migration-form input { min-width: 0; }
.archive5-network-migration-form button { align-self: end; }
.study-permissions-card .table-scroll { margin-top: 14px; }
#study-content .table-scroll { border: 1px solid var(--line); border-radius: 7px; }
#study-content .pagination { padding-inline: 0; }
.notification { position: fixed; bottom: 24px; left: calc(50% + 119px); transform: translateX(-50%); z-index: 50; background: #182e42; color: #fff; box-shadow: 0 8px 30px #0a213740; padding: 14px 20px; border-radius: 9px; max-width: min(560px, calc(100vw - 32px)); font-size: 12px; }
.noscript { position: fixed; inset: 80px 20px auto; z-index: 100; background: white; border: 1px solid #d8e0e9; padding: 24px; border-radius: 8px; text-align: center; }
@media (min-width: 1500px) { main { padding-top: 42px; } .metric { padding: 23px; } }
@media (max-width: 1180px) {
  .sidebar { width: 210px; padding-inline: 12px; }
  .app-shell { margin-left: 210px; }
  main { padding: 28px 24px 20px; }
  .topbar { padding-inline: 24px; }
  .page-footer { margin-inline: 24px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 18px; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notification { left: calc(50% + 105px); }
}
@media (max-width: 760px) {
  .sidebar { position: static; width: 100%; padding: 18px 16px 12px; }
  .brand { font-size: 21px; padding: 0 4px; gap: 10px; }
  .brand-mark { width: 34px; height: 34px; font-size: 26px; }
  .brand-caption { font-size: 8px; }
  .workspace-label, .nav-label, .sidebar-footer { display: none; }
  #navigation { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 17px; }
  .nav-link { flex-direction: column; gap: 6px; justify-content: center; padding: 10px 4px; font-size: 10px; text-align: center; }
  .nav-link[aria-current="page"] { box-shadow: inset 0 -2px #38cab5; }
  .nav-link .icon { width: 18px; height: 18px; }
  .app-shell { margin-left: 0; min-height: calc(100vh - 155px); }
  .topbar { min-height: 62px; padding: 12px 16px; gap: 12px; }
  .breadcrumb { gap: 8px; font-size: 10px; }
  .topbar-actions { gap: 8px; }
  .topbar-actions .badge { font-size: 10px; padding: 3px 7px; }
  .topbar-actions .button { padding-inline: 9px; }
  main { padding: 26px 16px 16px; }
  #view { gap: 18px; }
  h1 { font-size: 29px; }
  .page-description { font-size: 12px; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; }
  .metrics-grid { gap: 10px; }
  .metric { padding: 15px; }
  .metric-value { font-size: 22px; }
  .metric-top { font-size: 10px; }
  .metric-detail { font-size: 9px; }
  .two-column { grid-template-columns: 1fr; gap: 18px; }
  .card-heading, .archive-toolbar { padding: 18px; }
  .search-area { padding: 16px 18px; }
  .search-form { gap: 8px; }
  .search-form .button { padding-inline: 12px; }
  .field-help { font-size: 10px; }
  .state-panel { min-height: 270px; padding: 38px 20px; }
  .pagination { padding: 14px 18px; }
  .definition-list { padding-inline: 18px; }
  .card-copy, .notice { padding: 18px; }
  .capability-list { grid-template-columns: 1fr; padding-inline: 18px; }
  .page-footer { margin-inline: 16px; flex-direction: column; gap: 5px; }
  .dialog { padding: 22px; max-height: calc(100dvh - 32px); }
  .study-summary { grid-template-columns: 1fr; }
  .study-permission-form { grid-template-columns: 1fr; }
  .archive5-network-migration-form { grid-template-columns: 1fr; }
  .study-summary > div { gap: 12px; }
  .notification { left: 50%; width: calc(100vw - 32px); bottom: 16px; }
}
@media (max-width: 400px) {
  .breadcrumb > span:first-child, .breadcrumb > span:nth-child(2) { display: none; }
  .topbar-actions .button .icon { display: none; }
  .pagination { align-items: flex-start; flex-direction: column; }
  .metric-top .icon { display: none; }
  .nav-link { font-size: 9px; }
}
.search-modes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.result-context { padding: 0 24px; }
.discovery-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 16px; margin-top: 18px; }
.discovery-controls label, .discovery-filter { display: flex; flex-direction: column; gap: 8px; min-width: 0; font-size: 12px; }
.discovery-controls label { flex: 1 1 240px; }
.discovery-controls input { width: 100%; min-width: 0; font-size: 12px; }
.discovery-controls input::file-selector-button { margin-right: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 7px; background: #f3f5f8; color: #263446; font: inherit; cursor: pointer; }
.discovery-review .mono, .discovery-summary dd { overflow-wrap: anywhere; }
.discovery-summary .definition-list { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.coverage-summary { border: 1px solid var(--line); border-radius: 10px; background: #f7f9fc; padding: 16px; margin: 18px 0; }
.coverage-summary h3 { margin: 0 0 8px; font-size: 14px; }
.coverage-summary p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.coverage-summary dl { display: grid; grid-template-columns: minmax(170px, 1fr) 2fr; gap: 8px 14px; margin-top: 12px; }
.coverage-summary dt { color: #263446; font-weight: 600; }
.coverage-summary dd { margin: 0; overflow-wrap: anywhere; }
.discovery-summary details { margin: 18px 0; color: var(--muted); font-size: 12px; }
.discovery-summary summary { cursor: pointer; color: #263446; font-weight: 600; }
.discovery-summary ul { padding-left: 22px; margin-top: 10px; display: grid; gap: 6px; }
.discovery-filter select, .discovery-filter input { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 7px; padding: 9px 12px; background: white; color: inherit; }
.discovery-filters, .discovery-search { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; }
.discovery-filters > label { flex: 1 1 200px; }
.discovery-search { flex: 2 1 320px; }
.discovery-search label { flex: 1 1 200px; }
.discovery-search .button { flex-shrink: 0; }
@media (max-width: 700px) { .discovery-summary .definition-list { grid-template-columns: 1fr; } .coverage-summary dl { grid-template-columns: 1fr; } }
.discovery-review table { min-width: 680px; }
.destination-note { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0 0 20px; }
.destination-editor { padding: 24px; margin-bottom: 20px; }
.destination-editor h2 { margin: 0 0 12px; font-size: 18px; }
.destination-editor .mono, .destination-list .mono { overflow-wrap: anywhere; }
.destination-editor fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.destination-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; margin-bottom: 18px; }
.destination-grid label { display: flex; flex-direction: column; gap: 7px; min-width: 0; font-size: 13px; }
.destination-grid input, .destination-grid select, .destination-grid textarea { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; background: white; color: inherit; font: inherit; }
.destination-list table { min-width: 760px; }
.destination-list td { max-width: 320px; overflow-wrap: anywhere; }
.destination-editor :disabled { opacity: .65; }
.discovery-review td { max-width: 340px; overflow-wrap: anywhere; }
.dicom-search-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.dicom-search-grid > .dicom-code-context { grid-column: 1 / -1; }
.dicom-code-context > summary { cursor: pointer; color: var(--accent); font-size: 13px; font-weight: 650; }
.dicom-code-context > .field-help { margin: 10px 0; }
.dicom-search-grid label { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 13px; }
.dicom-search-grid input { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; background: white; color: #172033; }
.worklist-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; padding: 22px 24px 24px; }
.worklist-code-editor { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; min-width: 0; margin: 0 0 18px; padding: 18px; border: 1px solid #d8e0e9; border-radius: 8px; }
.worklist-code-editor legend { padding: 0 8px; color: #263446; font-size: 13px; font-weight: 650; }
.worklist-code-editor > .muted, .worklist-code-editor > .button { grid-column: 1 / -1; }
.worklist-code-entry { display: contents; }
.worklist-code-entry-heading { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 4px; }
.worklist-code-editor > .button { justify-self: start; }
.worklist-create > summary { cursor: pointer; list-style: none; padding: 20px 24px; font-size: 18px; font-weight: 700; }
.worklist-create > summary::-webkit-details-marker { display: none; }
.worklist-create > summary::after { content: '+'; float: right; color: var(--muted); font-size: 22px; line-height: 1; }
.worklist-create[open] > summary { border-bottom: 1px solid var(--line); }
.worklist-create[open] > summary::after { content: '−'; }
.worklist-form .field-label { display: grid; gap: 6px; min-width: 0; margin: 0 0 16px; color: #34445b; font-size: 12px; }
.worklist-form input, .worklist-form textarea, .worklist-filters input, .worklist-filters select { width: 100%; min-width: 0; min-height: 42px; padding: 9px 11px; border: 1px solid #c9d3df; border-radius: 7px; background: #fff; color: #263446; font: inherit; }
.worklist-form input:focus, .worklist-form textarea:focus, .worklist-filters input:focus, .worklist-filters select:focus { border-color: #087c72; outline: 3px solid #087c7226; outline-offset: 1px; }
.worklist-form textarea { min-height: 100px; resize: vertical; }
.tenant-compression-rules { width: 100%; min-width: 0; min-height: 150px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: white; color: inherit; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; }
.ups-codes { grid-column: 1 / -1; min-width: 0; }
.ups-code { min-width: 0; margin: 12px 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
.ups-code select { width: 100%; min-width: 0; padding: 9px; font: inherit; }
.ups-reason-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.worklist-form > .heading-actions { grid-column: 1 / -1; margin-top: 4px; }
.worklist-form > .heading-actions .button { min-height: 46px; }
.worklist-filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; align-items: end; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.worklist-filters label { display: grid; gap: 6px; min-width: 0; color: #34445b; font-size: 12px; font-weight: 600; }
.worklist-filters .button { min-height: 42px; }
@media (max-width: 760px) {
  .worklist-form { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .worklist-code-editor { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .worklist-create > summary { padding: 18px; }
  .worklist-form > .heading-actions { width: 100%; }
  .worklist-form > .heading-actions .button { width: 100%; }
  .worklist-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px 18px; }
  .worklist-filters .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
