/* Pare de Ligar: David Milanez's dark-and-gold identity, refined for casework. */
.service-notice { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 16px; margin-block: 0 24px; padding: 20px; border: 1px solid var(--dm-danger); border-radius: var(--workspace-radius); background: var(--dm-danger-soft); color: var(--dm-ink); }
.service-notice[hidden], .service-notice [hidden] { display: none; }
.app-body .service-notice { margin-block-start: 24px; }
.service-notice-icon { align-self: start; width: 22px; height: 22px; color: var(--dm-danger); }
.service-notice-copy { min-width: 0; }
.service-notice-copy > strong { display: block; color: var(--dm-danger); font-size: 17px; font-weight: 600; line-height: 1.4; }
.service-notice-copy > p { max-width: 72ch; margin: 6px 0 0; color: var(--dm-ink); font-size: 14px; line-height: 1.5; overflow-wrap: break-word; }
.service-notice-action { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 9px 14px; border: 1px solid var(--dm-gold-dark); border-radius: var(--workspace-control-radius); background: var(--dm-gold-soft); color: var(--dm-ink); font-size: 13px; font-weight: 600; text-decoration: none; }
.service-notice-action:hover { background: var(--dm-surface); }
.service-notice-action:focus-visible { outline: 3px solid var(--dm-gold-dark); outline-offset: 3px; }
.service-notice-action > svg { width: 16px; height: 16px; flex-shrink: 0; }
.service-notice .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 720px) {
  .service-notice { grid-template-columns: 22px minmax(0, 1fr); align-items: start; gap: 12px; padding: 16px; margin-block-end: 20px; }
  .service-notice-copy > strong { font-size: 16px; }
  .app-body .service-notice { margin-block-start: 16px; }
  .service-notice-action { grid-column: 2; justify-self: start; }
}
@font-face { font-family: Newsreader; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/newsreader-500.ttf') format('truetype'); }
:root {
  --workspace-gap: 24px;
  --workspace-radius: 12px;
  --workspace-control-radius: 7px;
  --brand-dark: #29180f;
  --brand-dark-hover: #362216;
  --brand-gold: #d3a24e;
  --brand-light: #f9f0df;
  --brand-muted: #dcc9a9;
  --product-mark: #b8883b;
  --primary-action: #b8883b;
  --primary-hover: #a97b31;
  --brand-type: Newsreader, Georgia, serif;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
}
body.app-body, body.admin-body { margin: 0; background: var(--dm-bg); font-size: 14px; -webkit-font-smoothing: antialiased; }
.app-body::before, .admin-body::before { display: none; }
::selection { background: var(--dm-gold-soft); color: var(--dm-ink); }
html { scrollbar-color: var(--dm-line-strong) var(--dm-bg); scrollbar-width: thin; }
input, select { caret-color: var(--dm-gold-dark); }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
a { text-underline-offset: 3px; }
.skip-link { position: fixed; top: -60px; left: 24px; z-index: 100; padding: 12px 18px; border-radius: 8px; background: var(--dm-ink); color: white; }
.skip-link:focus { top: 12px; }
.product-mark { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; color: var(--product-mark); }
.product-mark svg { width: 29px; height: 29px; }
.app-body .shell { display: block; width: min(1280px, calc(100% - 64px)); padding: 0 0 44px; }
.app-body .topbar { min-height: 120px; padding: 20px 0; margin: 0; border-bottom: 1px solid var(--dm-line-strong); gap: 20px; }
.app-body .identity { gap: 18px; }
.app-body .identity .app-name { font-family: var(--brand-type); font-size: 34px; font-weight: 500; letter-spacing: -.025em; line-height: 1.1; white-space: nowrap; }
.app-body .identity p { margin-top: 5px; color: var(--dm-text); font-size: 12px; }
.app-body .identity .account-office { margin-top: 5px; }
.app-body .account-office span { text-transform: none; letter-spacing: 0; }
.app-body .top-actions { gap: 8px; }
.app-body .privacy { padding: 6px 10px; border: 0; background: transparent; font-size: 12px; font-weight: 400; }
.app-body .privacy::before { width: 6px; height: 6px; background: var(--dm-success); box-shadow: none; }
.app-body .admin-link, .app-body .logout { min-height: 34px; padding: 7px 10px; border: 1px solid var(--dm-line); border-radius: 6px; background: var(--dm-surface); color: var(--dm-text); font-size: 12px; }
.app-body .admin-link:hover, .app-body .logout:hover { border-color: var(--dm-line-strong); background: var(--dm-surface-soft); transform: none; }
.app-body .captcha-credit-chip { min-height: 34px; padding: 5px 8px; border-color: var(--dm-line); background: transparent; border-radius: 6px; box-shadow: none; }
.app-body .captcha-credit-dot { width: 5px; height: 5px; box-shadow: none; }
.app-body .captcha-credit-copy span { font-size: 11px; }
.app-body .captcha-credit-copy strong { font-size: 12px; font-weight: 500; }
.app-body .app-tabs { position: static; display: flex; flex-direction: row; align-items: stretch; gap: 26px; margin: 0 0 30px; padding: 0; border-bottom: 1px solid var(--dm-line); overflow: visible; }
.nav-caption { margin: 0 10px 12px; color: var(--dm-muted); font-size: 12px; }
.app-body .app-tab { position: relative; display: flex; justify-content: flex-start; align-items: center; gap: 9px; min-height: 58px; padding: 14px 2px; border: 0; border-radius: 0; color: var(--dm-text); background: transparent; text-align: left; font-size: 13px; font-weight: 500; white-space: nowrap; }
.app-body .app-tab svg { flex: 0 0 18px; width: 18px; height: 18px; }
.app-body .app-tab::after { display: block; position: absolute; inset: auto 0 -1px; height: 2px; border-radius: 0; background: transparent; content: ''; }
.app-body .app-tab:hover { background: transparent; color: var(--dm-gold-dark); }
.app-body .app-tab.active { background: transparent; color: var(--dm-ink); }
.app-body .app-tab.active::after { background: var(--dm-gold); }
.nav-footer { display: flex; gap: 10px; align-items: center; margin: 46px 10px 0; padding-top: 20px; border-top: 1px solid var(--dm-line); }
.nav-footer img { border-radius: 5px; object-fit: cover; }
.nav-footer span { color: var(--dm-text); font-size: 12px; line-height: 1.6; }
.nav-footer strong { display: block; color: var(--dm-muted); font-size: 11px; font-weight: 400; }
.app-body .app-view { min-width: 0; }
.app-body .workspace { grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.app-body .card, .admin-body .card { border-color: var(--dm-line); border-radius: var(--workspace-radius); background: var(--dm-surface); box-shadow: none; }
.app-body .primary { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
.app-body .primary::before { display: none; }
.app-body #upload-title { max-width: none; margin: 0; font-size: 27px; font-weight: 600; line-height: 1.25; letter-spacing: -.025em; }
.app-body .lead { max-width: 65ch; margin: 9px 0 24px; color: var(--dm-text); font-size: 14px; line-height: 1.65; }
.app-body .analysis-office-context { margin: -12px 0 22px; font-size: 12px; }
.app-body #upload-form { display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--dm-line); border-radius: var(--workspace-radius); background: var(--dm-surface); }
.upload-section-heading { display: flex; order: 0; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 15px; }
.app-body .upload-section-heading h2 { max-width: none; margin: 0; font-size: 14px; font-weight: 600; letter-spacing: -.015em; line-height: 1.5; }
.upload-section-heading > span { color: var(--dm-muted); font-size: 12px; }
.app-body #upload-form .dropzone { order: 1; }
.app-body #upload-form .selected-files { order: 2; }
.app-body #upload-form .case-identification { order: 3; }
.app-body #upload-form .portal-options { order: 4; }
.app-body #upload-form #submit-button { order: 5; }
.app-body #upload-form .submit-hint { order: 6; }
.app-body .dropzone { min-height: 205px; padding: 24px 16px; border: 1px dashed #96733c; border-radius: 8px; background: var(--brand-dark); color: var(--brand-light); transition: border-color 150ms ease, background 150ms ease; }
.app-body .dropzone:hover, .app-body .dropzone:focus-within, .app-body .dropzone.dragging { border-color: var(--brand-gold); background: var(--brand-dark-hover); transform: none; }
.app-body .dropzone:focus-within { outline: 2px solid var(--dm-focus); outline-offset: 3px; }
.app-body .upload-icon { width: 32px; height: 32px; margin: 0 auto 12px; border: 0; border-radius: 0; color: var(--brand-gold); background: none; box-shadow: none; }
.app-body .upload-icon svg { width: 26px; height: 26px; }
.app-body .dropzone strong { color: var(--brand-light); font-size: 16px; font-weight: 500; }
.app-body .dropzone .file-picker-affordance { display: inline-block; margin-top: 10px; color: var(--brand-gold); font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.app-body .dropzone .file-types { margin-top: 18px; color: var(--brand-muted); font-size: 12px; }
.app-body .dropzone .file-limit { display: inline; margin: 0 0 0 8px; padding-left: 10px; border-left: 1px solid #80643f; color: var(--brand-muted); font-size: inherit; }
.app-body .upload-icon svg { color: var(--brand-gold); }
.app-body .case-identification { margin: 23px 0 0; padding: 0 0 22px; border: 0; border-bottom: 1px solid var(--dm-line); border-radius: 0; background: transparent; }
.app-body .case-identification-heading { margin-bottom: 12px; }
.app-body .case-identification-heading h2 { max-width: none; margin: 0; font-size: 13px; font-weight: 600; line-height: 1.5; }
.app-body .case-identification-heading > span { padding: 2px 7px; border-radius: 4px; background: var(--dm-surface-muted); color: var(--dm-muted); font-size: 11px; font-weight: 400; }
.app-body .case-fields { grid-template-columns: minmax(0, 1fr); max-width: 310px; }
.app-body .case-fields label { font-size: 13px; font-weight: 500; color: var(--dm-text); }
.app-body .case-fields input { min-height: 42px; border-color: var(--dm-line-strong); border-radius: var(--workspace-control-radius); font-size: 13px; }
.app-body .case-fields input:focus { border-color: var(--dm-gold); box-shadow: none; outline: 2px solid var(--dm-gold-soft); }
.app-body .case-identification > p { margin-top: 8px; font-size: 12px; }
.app-body .portal-options { margin-top: 21px; }
.app-body .portal-options legend { margin-bottom: 11px; font-size: 13px; font-weight: 600; }
.app-body .portal-grid { gap: 10px; }
.app-body .portal-choice { min-width: 0; min-height: 69px; gap: 10px; padding: 12px; border: 1px solid var(--dm-line); border-radius: 8px; background: var(--dm-surface); color: var(--dm-text); }
.app-body .portal-choice:has(input:checked) { border-color: #bc985e; background: var(--dm-gold-soft); box-shadow: none; }
.app-body .portal-choice::after { display: none; }
.app-body .portal-choice:hover { border-color: var(--dm-gold); }
.app-body .portal-choice input { flex: 0 0 16px; width: 16px; height: 16px; margin: 0; accent-color: var(--dm-gold-dark); }
.portal-copy { display: grid; gap: 4px; }
.portal-copy strong { color: var(--dm-ink); font-size: 13px; font-weight: 500; line-height: 1.4; }
.portal-copy small { color: var(--dm-muted); font-size: 12px; font-weight: 400; line-height: 1.4; }
.app-body .action, .admin-body button, .admin-body .button { min-height: 46px; border-color: var(--primary-action); border-radius: var(--workspace-control-radius); background: var(--primary-action); color: #22170b; font-weight: 600; font-size: 13px; transition: background 140ms ease, border-color 140ms ease; }
.app-body .action:hover:not(:disabled), .admin-body button:hover:not(:disabled), .admin-body .button:hover { border-color: var(--primary-hover); background: var(--primary-hover); transform: none; }
.app-body .action:active:not(:disabled), .admin-body button:active:not(:disabled) { transform: scale(.995); }
.app-body .action:disabled, .admin-body button:disabled { opacity: 1; border-color: var(--dm-line); background: var(--dm-surface-muted); color: var(--dm-text); transform: none; }
.app-body #submit-button { margin-top: 24px; }
.submit-hint { margin: 10px 0 0; color: var(--dm-muted); text-align: center; font-size: 12px; line-height: 1.5; }
.app-body .side { margin-top: 111px; padding: 0; border: 1px solid var(--dm-line); border-radius: var(--workspace-radius); background: var(--dm-surface); overflow: hidden; }
.app-body .side > h2 { max-width: none; margin: 0; padding: 21px 22px 7px; border: 0; background: var(--brand-dark); color: var(--brand-light); font-size: 15px; font-weight: 500; line-height: 1.5; letter-spacing: -.015em; }
.app-body .upload-guard h2 { margin: 0; max-width: none; color: #603600; font-size: 15px; line-height: 1.4; }
.steps-intro { margin: 0 0 22px; padding: 0 22px 20px; background: var(--brand-dark); color: var(--brand-muted); font-size: 12px; }
.app-body .steps { padding: 0 22px; }
.app-body .steps li { position: relative; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; padding: 0 0 23px; border: 0; }
.app-body .steps li:not(:last-child)::before { content: ''; position: absolute; left: 11px; top: 28px; bottom: 5px; width: 1px; background: var(--dm-line); }
.app-body .step-number { width: 24px; height: 24px; border: 1px solid var(--dm-line-strong); border-radius: 50%; background: var(--dm-gold-soft); color: var(--dm-gold-dark); font-size: 11px; font-weight: 500; }
.app-body .steps strong { padding-top: 2px; font-size: 13px; font-weight: 500; }
.app-body .steps p { margin-top: 5px; font-size: 12px; line-height: 1.6; }
.app-body .step-duration { display: none; margin-top: 6px; padding: 0; border-radius: 0; color: var(--dm-muted); background: transparent; font-size: 11px; font-weight: 400; }
.app-body .steps li.active, .app-body .steps li.completed { margin: 0; padding: 0 0 23px; border-radius: 0; background: transparent; }
.app-body .steps li.active .step-number { border-color: var(--dm-gold); background: var(--dm-gold); color: var(--brand-dark); }
.app-body .steps li.active .step-duration, .app-body .steps li.completed .step-duration { display: inline; background: transparent; }
.report-delivery { display: flex; gap: 11px; margin-top: 2px; padding: 19px 22px; border-top: 1px solid var(--dm-line); background: var(--dm-surface-soft); }
.report-delivery svg { flex: 0 0 22px; width: 22px; height: 22px; color: var(--dm-muted); }
.report-delivery strong { display: block; font-size: 12px; font-weight: 500; }
.report-delivery p { margin: 5px 0 0; color: var(--dm-muted); font-size: 12px; line-height: 1.65; }
.app-body .bulk-upload-item { border-color: var(--dm-line); background: var(--dm-surface-soft); box-shadow: none; }
.app-body .bulk-selection-summary { color: var(--dm-text); }
.app-body .bulk-upload-item.is-uploading, .app-body .bulk-upload-item.is-authorizing { border-color: var(--dm-gold); background: var(--dm-gold-soft); }
.app-body .bulk-upload-item input { border-color: var(--dm-line-strong); color: var(--dm-ink); }
.app-body .bulk-upload-state, .app-body .bulk-file-progress { background: var(--dm-bg-soft); }
.app-body .status-panel, .app-body .process-detail-header, .app-body .result { padding: 24px; border: 1px solid var(--dm-line); border-radius: var(--workspace-radius); background: var(--dm-surface); }
.app-body .timing-grid > div, .app-body .stage-timing-summary, .app-body .portal-progress, .app-body .portal-result-item { border-color: var(--dm-line); background: var(--dm-surface-soft); }
.app-body .metrics { gap: 0; border-block: 1px solid var(--dm-line); }
.app-body .metric { border: 0; border-radius: 0; background: transparent; }
.app-body .metric strong { font-weight: 500; }
.app-body .downloads .action.pdf, .app-body .downloads .action:not(.pdf) { border: 1px solid var(--dm-line-strong); }
.app-body .retry-button { border-color: var(--dm-line-strong); background: var(--dm-surface); }
.app-body .history-view { padding: 0; border: 0; border-radius: 0; background: transparent; }
.app-body .history-header h1 { font-size: 28px; font-weight: 600; }
.app-body .history-office-scope { border-color: var(--dm-line); background: var(--dm-surface); }
.app-body .history-office-scope { padding: 16px; border: 1px solid var(--dm-line); border-radius: 8px; }
.app-body .history-new { border-color: var(--primary-action); background: var(--primary-action); color: #22170b; font-weight: 600; }
.app-body .history-new:hover { background: var(--primary-hover); transform: none; }
.app-body .history-list { max-height: none; }
.app-body .history-item { padding: 18px; border-color: var(--dm-line); background: var(--dm-surface); box-shadow: none; }
.app-body .history-item:hover { border-color: var(--dm-line-strong); background: var(--dm-surface); transform: none; }
.app-body .history-meta > span { color: var(--dm-muted); }
.app-body .history-meta > .history-office-tag { color: var(--dm-gold-dark); }
.app-body .history-meta > .history-attention-reason { color: var(--dm-danger); }
.app-body .history-empty { min-height: 230px; border-style: solid; border-color: var(--dm-line); background: var(--dm-surface); }
.app-body .history-open, .app-body .history-delete, .app-body .history-stop { border-color: var(--dm-line); font-weight: 500; }
.app-body .auth-screen, .admin-body .auth { gap: 0; width: min(1060px, calc(100% - 64px)); grid-template-columns: minmax(0, 1fr) minmax(380px, 470px); }
.app-body .auth-screen::before { display: none; }
.admin-body .auth::before { max-width: 470px; font-family: var(--brand-type); color: var(--dm-gold-dark); font-size: clamp(36px, 4vw, 54px); font-weight: 500; letter-spacing: -.025em; line-height: 1.12; }
.auth-brand-panel { display: flex; flex-direction: column; align-items: flex-start; align-self: stretch; justify-content: center; padding: 52px; border-radius: 14px 0 0 14px; background: var(--brand-dark); }
.auth-brand-panel > img { width: 132px; height: 132px; margin-bottom: 42px; border-radius: 9px; }
.app-body .auth-brand-panel > h2 { margin: 0; max-width: none; color: var(--brand-light); font-family: var(--brand-type); font-size: 51px; font-weight: 500; line-height: 1.07; letter-spacing: -.025em; }
.auth-brand-panel > p { max-width: 34ch; margin: 22px 0 45px; color: var(--brand-muted); font-size: 14px; line-height: 1.75; }
.auth-brand-panel > span { color: var(--brand-gold); font-size: 11px; }
.auth-brand-panel > span > span { padding-inline: 8px; color: var(--brand-muted); }
.app-body .auth-screen { min-height: 0; padding: 0; margin-block: max(50px, calc((100dvh - 640px) / 2)); align-items: stretch; }
.app-body .auth-card { border-radius: 0 14px 14px 0; }
.admin-body .auth::before { content: 'Seu escritório.\A Tudo em ordem.'; }
.app-body .auth-card, .admin-body .auth-card { padding: 34px; box-shadow: none; }
.app-body .auth-card h2, .admin-body .auth-card h2 { font-size: 23px; font-weight: 600; }
.app-body .auth-card .identity h1 { font-family: var(--brand-type); font-size: 27px; font-weight: 500; }
.brand-logo { border: 1px solid #b58b46; box-shadow: none; }
.brand-logo-auth { width: 66px; height: 66px; border-radius: 9px; }
.brand-logo-header { width: 78px; height: 78px; border-radius: 10px; }
.app-body .auth-card .password-toggle, .admin-body .auth-card .password-toggle { color: var(--dm-gold-dark); }
.app-body .auth-card .password-toggle:hover, .admin-body .auth-card .password-toggle:hover:not(:disabled) { color: var(--dm-ink); }
.admin-body .shell { width: min(1320px, calc(100% - 64px)); padding-top: 24px; }
.admin-body header { border-color: var(--dm-line); }
.admin-body .grid { gap: 0; padding: 20px 0; margin-block: 10px 24px; border-block: 1px solid var(--dm-line); }
.admin-body .metric { display: flex; flex-direction: column; justify-content: flex-start; min-height: 0; gap: 8px; padding: 4px 22px; border: 0; border-right: 1px solid var(--dm-line); border-radius: 0; background: transparent; }
.admin-body .metric:first-child { padding-left: 0; }
.admin-body .metric:last-child { border-right: 0; }
.admin-body .metric strong { order: 2; font-size: 27px; font-weight: 500; }
.admin-body .metric span { order: 1; margin: 0; font-size: 12px; }
.admin-body .panel { padding: 23px; }
.admin-body .panel-head { margin: -23px -23px 20px; padding: 18px 23px; border-color: var(--brand-dark); background: var(--brand-dark); }
.admin-body .panel-head h2 { color: var(--brand-light); font-weight: 500; }
.admin-body .panel-head button.secondary { border-color: #80643f; background: transparent; color: var(--brand-light); }
.admin-body .service-meter { border-color: var(--dm-line); background: var(--dm-surface); }
.admin-body th { background: transparent; text-transform: none; letter-spacing: 0; font-weight: 500; }
.admin-body td, .admin-body th { border-color: var(--dm-line); }
.admin-body th:nth-last-child(-n+2), .admin-body td:nth-last-child(-n+2) { font-variant-numeric: tabular-nums; }
.admin-body button.secondary, .admin-body .button.secondary { border-color: var(--dm-line-strong); background: var(--dm-surface); color: var(--dm-text); }
.admin-body tr.selectable:hover, .admin-body tr.selected { background: var(--dm-surface-soft); }
.app-body .auth-fields input:focus, .admin-body input:focus, .admin-body select:focus { border-color: var(--dm-gold); box-shadow: none; outline: 2px solid var(--dm-gold-soft); }
.admin-body dialog { border-color: var(--dm-line); border-radius: var(--workspace-radius); background: var(--dm-surface); color: var(--dm-ink); box-shadow: 0 20px 60px rgb(32 38 46 / 18%); }
.admin-body dialog::backdrop { background: rgb(32 38 46 / 38%); backdrop-filter: none; }
@media (min-width: 961px) { .admin-body .mobile-menu-toggle { display: none; } }
@media (min-width: 1500px) { .app-body .workspace { grid-template-columns: minmax(0, 1fr) 290px; } }
@media (max-width: 1190px) and (min-width: 961px) {
  .app-body .shell { grid-template-columns: 170px minmax(0, 1fr); column-gap: 24px; width: calc(100% - 40px); }
  .app-body .workspace { grid-template-columns: minmax(0, 1fr) 230px; gap: 20px; }
  .app-body #upload-form { padding: 20px; }
  .app-body .side { padding-left: 0; }
  .app-body .portal-grid { grid-template-columns: 1fr; }
  .app-body .top-actions { gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
  .app-body .user-email { max-width: 140px; }
}
@media (max-width: 960px) {
  .app-body .shell { display: block; width: calc(100% - 40px); }
  .app-body .topbar { min-height: 80px; margin: 0; padding: 18px 0; }
  .app-body:not(.cloud-mode) .topbar { flex-direction: row; align-items: center; }
  .app-body .app-tabs { position: static; display: flex; flex-direction: row; margin: 0 0 26px; gap: 25px; }
  .app-body .nav-caption, .app-body .nav-footer { display: none; }
  .app-body .workspace { grid-template-columns: minmax(0, 1fr) 240px; gap: 24px; }
  .app-body .mobile-menu-toggle, .admin-body .mobile-menu-toggle { border-color: var(--dm-line-strong); background: var(--dm-surface); color: var(--dm-text); }
  .app-body.cloud-mode .top-actions, .admin-body header .top-actions { background: var(--dm-surface); border-color: var(--dm-line); box-shadow: 0 10px 30px rgb(32 38 46 / 10%); }
  .app-body .side { margin-top: 111px; }
  .app-body .steps-mobile-toggle { display: none; }
  .app-body .side .steps { display: block; }
  .app-body .portal-grid { grid-template-columns: 1fr; }
  .app-body .portal-copy strong { font-size: 12px; }
}
@media (max-width: 720px) {
  .app-body .shell { width: min(100% - 32px, 1180px); padding: env(safe-area-inset-top) 0 36px; }
  .app-body.cloud-mode .shell { padding-bottom: calc(95px + env(safe-area-inset-bottom)); }
  .app-body .topbar, .app-body:not(.cloud-mode) .topbar { min-height: 76px; flex-direction: row; align-items: center; gap: 10px; }
  .app-body .identity { gap: 12px; }
  .brand-logo-header { width: 54px; height: 54px; border-radius: 7px; }
  .app-body .identity .app-name { font-size: 27px; }
  .app-body .identity p { font-size: 11px; }
  .product-mark { flex-basis: 30px; width: 30px; }
  .product-mark svg { width: 25px; height: 25px; }
  .app-body:not(.cloud-mode) .privacy { max-width: 90px; padding: 0; font-size: 11px; white-space: normal; line-height: 1.5; }
  .app-body:not(.cloud-mode) .app-tabs { margin: 0 0 24px; }
  .app-body:not(.cloud-mode) .app-tab { min-height: 48px; font-size: 12px; }
  .app-body.cloud-mode .app-tabs { position: fixed; top: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 5px; right: 16px; left: 16px; bottom: max(10px, env(safe-area-inset-bottom)); border: 1px solid var(--dm-line); border-radius: 12px; background: var(--dm-surface); box-shadow: 0 4px 18px rgb(32 38 46 / 10%); }
  .app-body.cloud-mode .app-tab { justify-content: center; gap: 7px; min-height: 48px; padding: 8px; font-size: 12px; }
  .app-body.cloud-mode .app-tab.active { background: var(--dm-bg-soft); color: var(--dm-ink); }
  .app-body.cloud-mode #analysis-view, .app-body.cloud-mode #history-view { margin-top: 26px; }
  .app-body .workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .app-body .primary, .app-body .history-view { padding: 0; }
  .app-body #upload-title, .app-body .history-header h1 { max-width: none; font-size: 26px; }
  .app-body .lead { margin-bottom: 21px; font-size: 13px; }
  .app-body #upload-form { padding: 19px 16px; }
  .upload-section-heading { align-items: baseline; gap: 8px; }
  .app-body .upload-section-heading h2 { font-size: 14px; }
  .upload-section-heading > span { font-size: 11px; }
  .app-body .dropzone { min-height: 185px; padding: 20px 10px; }
  .app-body .dropzone strong { font-size: 14px; }
  .app-body .dropzone .file-picker-affordance { display: none; }
  .app-body .dropzone .file-types { margin-top: 13px; font-size: 11px; }
  .app-body .dropzone .file-limit { display: block; margin: 5px 0 0; padding: 0; border: 0; }
  .app-body .case-identification { margin-top: 22px; padding: 0 0 20px; }
  .app-body .case-fields { max-width: none; }
  .app-body .case-fields input { min-height: 44px; font-size: 16px; }
  .app-body .portal-grid { grid-template-columns: 1fr; gap: 8px; }
  .app-body .portal-choice { min-height: 62px; }
  .app-body .portal-copy strong { font-size: 12px; }
  .app-body .portal-copy small { font-size: 12px; }
  .app-body .side { margin: 0; padding: 0; border: 1px solid var(--dm-line); border-radius: var(--workspace-radius); background: var(--dm-surface); }
  .app-body .side > h2 { display: block; padding: 18px 20px 5px; font-size: 15px; }
  .steps-intro { margin-bottom: 0; padding: 0 20px 17px; }
  .app-body .steps-mobile-toggle { display: flex; width: calc(100% - 40px); margin: 8px 20px; padding: 10px 0; border: 0; background: transparent; color: var(--dm-gold-dark); font-size: 12px; font-weight: 500; }
  .app-body .side .steps { display: none; margin-top: 18px; }
  .app-body .side .steps.mobile-open { display: block; }
  .report-delivery { margin-top: 0; padding: 17px 20px; }
  .app-body .auth-screen, .admin-body .auth { display: flex; width: calc(100% - 32px); min-height: calc(100dvh - 48px); margin: 24px auto; justify-content: center; align-items: center; padding: 0; }
  .auth-brand-panel { display: none; }
  .app-body .auth-screen::before, .admin-body .auth::before { display: none; }
  .app-body .auth-card, .admin-body .auth-card { padding: 27px 23px; border-radius: 12px; }
  .admin-body .shell { width: calc(100% - 32px); }
  .admin-body .grid { gap: 18px 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-body .metric { padding: 0 16px; }
  .admin-body .metric:nth-child(odd) { padding-left: 0; }
  .admin-body .metric:nth-child(even) { border-right: 0; }
  .admin-body .metric strong { font-size: 24px; }
  .admin-body .metric span { font-size: 12px; }
  .admin-body .panel-head { margin: -23px -23px 16px; padding: 16px 23px; }
  .admin-body tbody td { grid-template-columns: 94px minmax(0, 1fr); }
  .admin-body tbody td[data-label]::before { overflow-wrap: normal; word-break: normal; }
}
@media (max-width: 420px) {
  .app-body:not(.cloud-mode) .topbar { flex-wrap: wrap; gap: 8px; }
  .app-body:not(.cloud-mode) .topbar .identity { flex: 1 0 100%; }
  .app-body:not(.cloud-mode) .top-actions { margin-left: 66px; }
  .app-body:not(.cloud-mode) .privacy { max-width: none; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) { .app-body *, .admin-body * { transition: none !important; animation: none !important; } }
