:root {
  --navy: #102c38;
  --navy-2: #183d49;
  --ink: #172b33;
  --muted: #66777d;
  --paper: #f4f2ec;
  --white: #fffefa;
  --line: #dcded9;
  --teal: #1f756d;
  --teal-soft: #dcece8;
  --gold: #c69b58;
  --rose: #a94442;
  --rose-soft: #f6e4e1;
  --shadow: 0 18px 50px rgba(16, 44, 56, .12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--paper); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.is-hidden { display: none !important; }

.permission-note { margin: 18px 0; padding: 12px 14px; border: 1px solid #d8e1e3; border-radius: 10px; background: #f5f8f8; color: #53666c; font-size: .9rem; }
.activity-modal { width: min(760px, calc(100vw - 32px)); }
.activity-list { display: grid; gap: 10px; max-height: 58vh; overflow: auto; margin-top: 18px; padding-right: 4px; }
.activity-row { display: grid; grid-template-columns: 34px 1fr; gap: 11px; align-items: start; padding: 12px; border: 1px solid #dfe7e8; border-radius: 10px; background: #fbfcfc; }
.activity-row strong, .activity-row small { display: block; }
.activity-row small { margin-top: 3px; color: #687a80; }
.activity-row p { margin: 5px 0 0; color: #40565d; font-size: .85rem; overflow-wrap: anywhere; }
.activity-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #e5f1ee; color: #146351; font-weight: 700; }
.user-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.role-control { display: flex; align-items: center; gap: 7px; font-size: .78rem; color: #62747a; }
.role-control select { min-width: 145px; padding: 8px 10px; border: 1px solid #cbd8da; border-radius: 8px; background: white; }
.role-chip { display: inline-flex; align-items: center; min-height: 34px; padding: 0 10px; border-radius: 999px; background: #e6f2ef; color: #125b4d; font-size: .8rem; font-weight: 700; }
.permission-grid { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 6px 12px; margin-top: 10px; color: #425960; font-size: .8rem; }
.permission-grid label { display: flex; align-items: center; gap: 6px; }
.verification-notice { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 380px); gap: 22px; align-items: center; margin-bottom: 20px; padding: 20px; border: 1px solid #e2b957; border-left: 5px solid #c58216; border-radius: 14px; background: #fff9e9; box-shadow: 0 8px 24px rgba(109, 76, 18, .08); }
.verification-copy h2 { margin: 2px 0 8px; color: #6c4511; }
.verification-copy p { margin: 0; color: #644f30; }
.verification-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.verification-actions span { color: #7b6849; font-size: .82rem; }
.verification-screenshot { width: 100%; max-height: 250px; object-fit: contain; border: 1px solid #ddca9c; border-radius: 10px; background: white; }
@media (max-width: 800px) { .verification-notice { grid-template-columns: 1fr; } }
.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; }
.eyebrow { margin: 0 0 7px; color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }

.brand-lockup { display: flex; align-items: center; gap: 12px; color: var(--navy); }
.brand-lockup strong, .brand-lockup small { display: block; }
.brand-lockup strong { font-family: Georgia, "Times New Roman", serif; font-size: 19px; letter-spacing: -.02em; }
.brand-lockup small { margin-top: 2px; color: var(--muted); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(16, 44, 56, .3); border-radius: 50%; font-family: Georgia, serif; font-size: 15px; font-weight: 700; letter-spacing: -.05em; }
.brand-lockup-light { color: #fff; }
.brand-lockup-light small { color: #aabcc1; }
.brand-mark-light { border-color: rgba(255,255,255,.4); }

.access-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 44%) 1fr; background: var(--white); }
.access-card { width: min(460px, calc(100% - 64px)); margin: auto; padding: 52px 0; }
.access-card > .brand-lockup { margin-bottom: clamp(64px, 10vh, 120px); }
.access-card h1 { margin: 0; font: 500 clamp(36px, 5vw, 58px)/.98 Georgia, "Times New Roman", serif; letter-spacing: -.045em; color: var(--navy); }
.access-copy { max-width: 430px; margin: 22px 0 34px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.access-form { display: grid; gap: 10px; }
.access-form label, .case-form label > span { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 750; letter-spacing: .04em; }
.access-form > .text-button { position: static; justify-self: center; transform: none; padding: 8px; }
.key-field { position: relative; }
.key-field input { padding-right: 74px; }
input, select { width: 100%; min-height: 48px; border: 1px solid #cfd6d5; border-radius: 8px; background: #fff; color: var(--ink); padding: 0 14px; outline: none; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(31,117,109,.12); }
.text-button { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--teal); font-size: 12px; font-weight: 750; }
.form-error { min-height: 20px; margin: 8px 0; color: var(--rose); font-size: 12px; }
.button { min-height: 42px; padding: 0 17px; border: 1px solid transparent; border-radius: 7px; font-size: 13px; font-weight: 750; transition: transform .16s, background .16s, opacity .16s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .55; transform: none; }
.button-primary { background: var(--teal); color: #fff; }
.button-primary:hover { background: #17655e; }
.button-secondary { border-color: #c8d1cf; background: #fff; color: var(--navy); }
.button-ghost { background: transparent; color: var(--muted); }
.button-wide { width: 100%; min-height: 50px; }
.privacy-note { display: flex; align-items: center; gap: 8px; margin-top: 22px; color: var(--muted); font-size: 11px; }
.privacy-note span { color: var(--teal); font-size: 8px; }
.key-fallback { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.key-fallback summary { cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 700; }
.key-fallback .access-form { margin-top: 14px; }
.users-list { display: grid; gap: 10px; max-height: 52vh; overflow: auto; }
.user-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
.user-row strong, .user-row small { display: block; }
.user-row small { margin-top: 4px; color: var(--muted); }
.user-row > div:last-child { display: flex; gap: 8px; }
.access-art { position: relative; min-height: 100%; overflow: hidden; background: var(--navy); }
.access-art::before, .access-art::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.access-art::before { width: 620px; height: 620px; right: -180px; top: -220px; }
.access-art::after { width: 420px; height: 420px; left: -100px; bottom: -170px; }
.art-copy { position: absolute; left: clamp(50px, 9vw, 140px); right: 60px; bottom: 13vh; z-index: 1; color: #fff; }
.art-kicker { color: #accbc5; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.art-copy blockquote { max-width: 620px; margin: 26px 0 34px; font: 400 clamp(38px, 5vw, 68px)/1.05 Georgia, serif; letter-spacing: -.045em; }
.art-rule { width: 72px; height: 2px; background: var(--gold); }
.art-copy p { color: #afc0c4; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 240px; z-index: 20; display: flex; flex-direction: column; padding: 28px 20px 22px; background: var(--navy); color: #fff; }
.primary-nav { display: grid; gap: 7px; margin-top: 60px; }
.nav-item { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: #b9c8cb; text-align: left; font-size: 13px; }
.nav-item:hover, .nav-item.is-active { background: rgba(255,255,255,.09); color: #fff; }
.nav-item > span:first-child { color: #76aaa1; font-size: 17px; }
.nav-badge { min-width: 21px; padding: 2px 6px; border-radius: 999px; background: #b5655f; color: #fff !important; font-size: 10px !important; text-align: center; }
.sidebar-status { display: flex; align-items: center; gap: 11px; margin-top: auto; padding: 15px 10px; border-top: 1px solid rgba(255,255,255,.1); border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-status strong, .sidebar-status small { display: block; }
.sidebar-status strong { font-size: 12px; }
.sidebar-status small { margin-top: 3px; color: #91a9ae; font-size: 10px; text-transform: capitalize; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(198,155,88,.12); }
.status-dot.is-online { background: #5fb29e; box-shadow: 0 0 0 4px rgba(95,178,158,.12); }
.lock-button { margin-top: 14px; border: 0; background: transparent; color: #93a8ad; font-size: 11px; text-align: left; }
.lock-button:hover { color: #fff; }

.main-content { grid-column: 2; min-width: 0; padding: 36px clamp(24px, 4vw, 58px) 60px; }
.topbar { display: flex; align-items: center; gap: 24px; }
.topbar h1 { margin: 0; font: 500 clamp(28px, 3.2vw, 42px)/1.05 Georgia, serif; letter-spacing: -.04em; color: var(--navy); }
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.last-updated { margin-right: 8px; color: var(--muted); font-size: 11px; }
.menu-button { display: none; }
.notice { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 28px; padding: 14px 17px; border: 1px solid #c9ddd8; border-radius: 8px; background: #edf6f3; color: var(--navy); font-size: 12px; }
.notice div { display: flex; gap: 7px; }
.notice span { color: var(--muted); }
.mode-pill { padding: 5px 9px; border-radius: 999px; background: var(--teal-soft); color: var(--teal) !important; font-weight: 750; white-space: nowrap; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 28px 0 20px; }
.metric-card { min-height: 142px; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,254,250,.72); }
.metric-card-featured { background: var(--navy); border-color: var(--navy); color: #fff; }
.metric-label { display: block; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.metric-card-featured .metric-label, .metric-card-featured small { color: #adc0c4; }
.metric-card strong { display: block; margin: 15px 0 4px; font: 500 40px/1 Georgia, serif; letter-spacing: -.04em; }
.metric-card small { color: var(--muted); font-size: 11px; }

.workspace-card { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--white); box-shadow: 0 8px 30px rgba(16,44,56,.04); }
.workspace-toolbar { display: flex; align-items: flex-end; gap: 24px; padding: 24px 26px 20px; border-bottom: 1px solid #e5e6e1; }
.workspace-toolbar h2, .modal h2, .drawer-header h2 { margin: 0; font: 500 25px/1.1 Georgia, serif; letter-spacing: -.025em; color: var(--navy); }
.toolbar-controls { display: flex; gap: 9px; margin-left: auto; }
.search-field { display: flex; align-items: center; gap: 7px; width: min(280px, 34vw); min-height: 42px; padding-left: 12px; border: 1px solid #d1d6d4; border-radius: 7px; background: #fff; color: var(--muted); }
.search-field input { min-height: 40px; border: 0; box-shadow: none; padding-left: 2px; }
.toolbar-controls select { width: 145px; min-height: 42px; }
#case-sort { width: 170px; }
.hearing-alerts { padding: 20px 26px; border-bottom: 1px solid #ead7b7; background: #fffbf2; }
.alert-center-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.alert-center-head h3 { margin: 0; color: var(--navy); font: 500 20px Georgia, serif; }
.hearing-alert-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 9px; }
.hearing-alert-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; min-width: 0; padding: 11px 12px; border: 1px solid #ead7b7; border-radius: 8px; background: #fff; }
.hearing-alert-item.is-urgent { border-color: #e3b3ae; background: #fff8f7; }
.hearing-alert-item > div:nth-child(2) { min-width: 0; }
.hearing-alert-item > div:nth-child(2) strong, .hearing-alert-item > div:nth-child(2) span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hearing-alert-item > div:nth-child(2) strong { color: var(--navy); font-size: 12px; }
.hearing-alert-item > div:nth-child(2) span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.alert-date { display: grid; min-width: 46px; min-height: 46px; place-items: center; align-content: center; border-radius: 7px; background: #f5ead7; color: #795a2e; }
.is-urgent .alert-date { background: var(--rose-soft); color: var(--rose); }
.alert-date strong, .alert-date span { display: block; line-height: 1.1; }
.alert-date strong { font-size: 11px; }
.alert-date span { margin-top: 3px; font-size: 9px; }
.table-wrap { overflow-x: auto; }
.case-table { width: 100%; border-collapse: collapse; }
.case-table th { padding: 13px 18px; background: #f7f6f1; color: #6c797d; font-size: 10px; letter-spacing: .08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.sort-button { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 750; letter-spacing: inherit; text-transform: inherit; }
.sort-button:hover, .sort-button.is-active { color: var(--teal); }
.sort-button span { font-size: 12px; }
.case-table td { padding: 17px 18px; border-top: 1px solid #e8e8e3; color: #405159; font-size: 12px; vertical-align: middle; }
.case-table tbody tr { transition: background .15s; }
.case-table tbody tr:hover { background: #fafaf6; }
.client-cell { display: flex; align-items: center; gap: 11px; min-width: 170px; }
.client-avatar { display: grid; flex: 0 0 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--teal-soft); color: var(--teal); font-family: Georgia, serif; font-weight: 700; }
.client-cell strong, .client-cell small, .court-cell strong, .court-cell small { display: block; }
.client-cell strong, .court-cell strong { color: var(--ink); font-size: 12px; }
.client-cell small, .court-cell small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.hearing-date { color: var(--navy); font-weight: 750; white-space: nowrap; }
.a-number { color: var(--navy); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; font-weight: 750; white-space: nowrap; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); font-size: 10px; font-weight: 750; white-space: nowrap; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill.alert { background: var(--rose-soft); color: var(--rose); }
.status-pill.urgent { background: var(--rose-soft); color: var(--rose); }
.status-pill.upcoming { background: #f5ead7; color: #795a2e; }
.row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.icon-button { min-width: 34px; min-height: 34px; border: 1px solid #d8dcda; border-radius: 6px; background: #fff; color: var(--navy); font-size: 11px; font-weight: 750; }
.icon-button:hover { border-color: var(--teal); color: var(--teal); }
.table-footer { display: flex; justify-content: space-between; padding: 13px 20px; border-top: 1px solid #e8e8e3; color: var(--muted); font-size: 10px; }
.state-panel { display: grid; min-height: 260px; place-items: center; align-content: center; gap: 12px; padding: 36px; color: var(--muted); text-align: center; }
.state-panel p { max-width: 440px; margin: 0; line-height: 1.6; }
.state-panel strong { color: var(--navy); font: 500 24px Georgia, serif; }
.spinner { width: 28px; height: 28px; border: 2px solid #d5dfdc; border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-monogram { display: grid; width: 64px; height: 64px; place-items: center; border: 1px solid #cadad6; border-radius: 50%; color: var(--teal); font: 600 19px Georgia, serif; }
.case-cards { display: none; }

.modal-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(9,29,36,.55); backdrop-filter: blur(2px); }
.modal { position: fixed; left: 50%; top: 50%; z-index: 50; width: min(520px, calc(100% - 32px)); max-height: calc(100vh - 40px); overflow-y: auto; transform: translate(-50%, -50%); border-radius: 12px; background: var(--white); padding: 30px; box-shadow: var(--shadow); }
.modal-close { border: 0; background: transparent; color: var(--muted); font-size: 28px; line-height: 1; }
.modal > .modal-close { position: absolute; right: 22px; top: 20px; }
.modal-intro { margin: 12px 0 25px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.case-form { display: grid; gap: 16px; }
.case-form small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.case-form em { color: var(--muted); font-size: 10px; font-style: normal; font-weight: 500; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 5px; }

.import-modal { width: min(880px, calc(100% - 32px)); }
.import-dropzone { display: grid; min-height: 180px; place-items: center; align-content: center; gap: 7px; border: 1px dashed #9bbab4; border-radius: 10px; background: #f4f9f7; color: var(--navy); text-align: center; transition: border-color .15s, background .15s; }
.import-dropzone.is-dragging { border-color: var(--teal); background: var(--teal-soft); }
.import-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.import-dropzone small { color: var(--muted); font-size: 10px; }
.upload-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: var(--teal); color: #fff; font-size: 20px; }
.import-progress { margin: 18px 0; }
.import-progress div, .review-summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; font-size: 11px; }
.import-progress span, .review-summary span { color: var(--muted); }
.import-progress progress { width: 100%; height: 7px; accent-color: var(--teal); }
.folder-sync { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.folder-sync strong, .folder-sync small { display: block; }
.folder-sync strong { color: var(--navy); font-size: 12px; }
.folder-sync small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.folder-sync-status { margin-top: 9px; padding: 10px 12px; border-radius: 7px; background: var(--teal-soft); color: var(--teal); font-size: 11px; }
.import-review { margin-top: 18px; }
.import-results { max-height: 380px; overflow-y: auto; display: grid; gap: 8px; padding-right: 4px; }
.import-row { display: grid; grid-template-columns: 24px minmax(140px, 1.2fr) repeat(4, minmax(105px, 1fr)); gap: 8px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.import-row > input[type="checkbox"] { width: 16px; min-height: 16px; margin-top: 13px; accent-color: var(--teal); }
.import-file { min-width: 0; padding-top: 2px; }
.import-file strong, .import-file small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-file strong { font-size: 11px; }
.import-file small { margin-top: 5px; color: var(--muted); font-size: 9px; }
.import-row input[type="text"] { min-height: 40px; font-size: 11px; }
.import-status { color: var(--teal) !important; }
.import-status.review { color: var(--rose) !important; }
.document-type { display: inline-block; margin-top: 5px; padding: 2px 6px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.case-drawer { position: fixed; inset: 0 0 0 auto; z-index: 60; width: min(520px, 100%); background: var(--white); box-shadow: -18px 0 50px rgba(16,44,56,.18); transform: translateX(105%); transition: transform .25s ease; }
.case-drawer.is-open { transform: translateX(0); }
.drawer-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 26px 28px; border-bottom: 1px solid var(--line); }
.drawer-body { height: calc(100vh - 94px); overflow-y: auto; padding: 26px 28px 46px; }
.detail-hero { padding: 21px; border-radius: 10px; background: var(--navy); color: #fff; }
.detail-hero small { color: #aec0c4; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.detail-hero strong { display: block; margin-top: 10px; font: 500 26px Georgia, serif; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 28px; }
.detail-item { min-height: 86px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
.detail-item span, .history-item span { display: block; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.detail-item strong { display: block; margin-top: 7px; color: var(--ink); font-size: 12px; line-height: 1.45; }
.drawer-section { margin-top: 26px; }
.drawer-section h3 { margin: 0 0 12px; color: var(--navy); font: 500 18px Georgia, serif; }
.history-list { display: grid; gap: 9px; }
.history-item { padding: 13px 14px; border-left: 2px solid #bfd7d1; background: #f7f7f2; }
.history-item strong { display: block; margin-top: 5px; font-size: 11px; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 80; max-width: calc(100% - 32px); transform: translate(-50%, 150%); padding: 12px 18px; border-radius: 7px; background: var(--navy); color: #fff; box-shadow: var(--shadow); font-size: 12px; transition: transform .2s; }
.toast.is-visible { transform: translate(-50%, 0); }

@media (max-width: 1060px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .last-updated { display: none; }
  .case-table th:nth-child(6), .case-table td:nth-child(6) { display: none; }
}

@media (max-width: 780px) {
  .access-screen { grid-template-columns: 1fr; }
  .access-art { display: none; }
  .access-card { width: min(460px, calc(100% - 40px)); }
  .app-shell { display: block; }
  .sidebar { transform: translateX(-105%); transition: transform .2s; box-shadow: var(--shadow); }
  .sidebar.is-open { transform: translateX(0); }
  .main-content { padding: 24px 16px 45px; }
  .menu-button { display: inline-flex; align-items: center; min-height: 38px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--navy); }
  .topbar { align-items: flex-start; }
  .topbar .eyebrow { display: none; }
  .topbar h1 { font-size: 25px; margin-top: 6px; }
  #refresh-all { display: none; }
  #sensitive-toggle { display: none; }
  #open-import { font-size: 0; }
  #open-import::after { content: "Import"; font-size: 13px; }
  .topbar-actions .button-primary { padding: 0 12px; }
  .notice div { display: block; }
  .notice div span { display: block; margin-top: 3px; }
  .workspace-toolbar { display: block; padding: 20px 18px; }
  .toolbar-controls { margin-top: 16px; }
  .search-field { width: 100%; }
  .toolbar-controls select { width: 125px; }
  #case-sort { width: 155px; }
  .hearing-alerts { padding: 16px 18px; }
  .table-wrap { display: none !important; }
  .case-cards:not(.is-hidden) { display: grid; gap: 10px; padding: 14px; }
  .case-card { padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
  .case-card-head, .case-card-foot { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
  .case-card-body { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 17px 0; }
  .case-card-body span { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; }
  .case-card-body strong { display: block; margin-top: 4px; font-size: 11px; }
  .import-row { grid-template-columns: 24px 1fr; }
  .import-row > input[type="text"] { grid-column: 2; }
}

@media (max-width: 520px) {
  .metrics { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric-card { min-height: 118px; padding: 15px; }
  .metric-card strong { font-size: 32px; }
  .topbar { gap: 10px; }
  .topbar-actions { gap: 0; }
  .toolbar-controls { display: grid; }
  .toolbar-controls select { width: 100%; }
  #case-sort { width: 100%; }
  .alert-center-head { align-items: flex-start; }
  .alert-center-head .button { min-height: 36px; padding: 0 10px; }
  .hearing-alert-list { grid-template-columns: 1fr; }
  .notice { align-items: flex-start; }
  .mode-pill { display: none; }
  .table-footer span:last-child { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
}
