/* SITUS v6 — calm surfaces, system typography and immediate feedback.
   Loaded last, after the existing structural styles. No remote assets. */
:root {
  --bg: #f5f5f7;
  --ink: #202c40;
  --muted: #637084;
  --line: #e5e8ee;
  --surface: #fff;
  --surface-secondary: #f7f8fa;
  --radius: 1.25rem;
  --shadow: 0 2px 4px #17685e03, 0 10px 32px #17685e05;
  --focus: #267c6b;
  --bs-body-color: var(--ink);
  --bs-secondary-color: var(--muted);
  --bs-border-color: var(--line);
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: .9375rem;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--ink);
  letter-spacing: 0;
}
::selection { background: #267c6b22; color: #66102b; }
h1, h2, h3 { font-weight: 650; text-wrap: balance; }
h1 { font-size: clamp(1.875rem, 2.5vw, 2.4rem); line-height: 1.15; letter-spacing: -.04em; }
h2 { letter-spacing: -.025em; line-height: 1.3; }
h3 { letter-spacing: -.02em; }
p { line-height: 1.65; }
.text-muted { color: var(--muted) !important; }
.eyebrow { font-size: .65rem; letter-spacing: .14em; line-height: 1.6; }
.ui-icon { width: 1.25rem; height: 1.25rem; flex: 0 0 auto; }
.btn, a, summary, input, select, textarea { -webkit-tap-highlight-color: transparent; }
.btn {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .65rem 1.05rem;
  border-radius: .8rem;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: -.01em;
  white-space: normal;
  line-height: 1.4;
  transition: background-color 140ms, border-color 140ms, box-shadow 140ms, transform 160ms;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--navy); border-color: var(--navy); box-shadow: inset 0 1px 0 #ffffff1c, 0 3px 6px #17685e13; }
.btn-primary:hover { background: #2f4a71; border-color: #2f4a71; box-shadow: 0 4px 12px #17685e22; }
.btn-outline-primary, .btn-outline-secondary { background: #ffffffc9; border-color: #d9dee6; color: #33465f; box-shadow: 0 1px 2px #17685e04; }
.btn-outline-primary:hover, .btn-outline-secondary:hover { color: var(--navy); border-color: #b8c4d3; background: #edf1f6; }
.btn-light { background: #fff; color: var(--navy); border-color: #ffffffb3; }
.btn-sm { min-height: 2.35rem; font-size: .75rem; padding: .5rem .8rem; border-radius: .65rem; }
.btn:active:not(:disabled), .workflow-card:active, .nav-item:active { transform: scale(.98); transition-duration: 65ms; }
.btn:disabled { opacity: .55; box-shadow: none; cursor: wait; }
:where(a, button, summary):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.form-control, .form-select {
  min-height: 2.875rem;
  border-radius: .75rem;
  border-color: #dce1e8;
  background-color: #fafbfc;
  color: var(--ink);
  font-size: .875rem;
  padding: .7rem .85rem;
  transition: border-color 140ms, background-color 140ms, box-shadow 140ms;
}
.form-control::placeholder { color: #717d8e; opacity: 1; }
.form-select { padding-right: 2.25rem; }
.form-control:focus, .form-select:focus { background-color: #fff; border-color: #8c9eb5; box-shadow: 0 0 0 4px #17685e0b; outline: 2px solid var(--navy); outline-offset: 1px; }
.form-control:disabled, .form-select:disabled { background-color: #edf0f4; color: #657084; }
.form-label { font-size: .8125rem; color: #435169; margin-bottom: .5rem; }
.form-check-input { width: 1.125rem; height: 1.125rem; border-color: #9aa8bb; }
.form-check-label { font-size: .8125rem; line-height: 1.65; }
textarea.form-control { min-height: 7rem; }
input[type="file"] { padding: .5rem; }
input[type="file"]::file-selector-button { margin: -.5rem .75rem -.5rem -.5rem; padding: .85rem; background: #edf0f5; color: #33465f; }
.panel, .stat-card, .workflow-card, .role-cards article { border: 1px solid #e7e9ee; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel-heading { padding: 1.5rem 1.65rem 1.15rem; }
.panel-heading h2 { font-size: 1.0625rem; }
.panel-heading p { font-size: .8125rem; margin-top: .25rem; }
.panel-heading > a { font-size: .75rem; font-weight: 600; }
.form-panel { padding: 1.75rem; }
.form-panel h2 { font-size: 1.125rem; }
.form-panel hr { border-color: #d7dce4; margin: 1.75rem 0; }
.badge { font-size: .6875rem; line-height: 1.3; font-weight: 600; padding: .4rem .65rem; border-radius: .5rem; letter-spacing: .005em; }
.estado-abierta { color: #216446; background: #eaf5ef; }
.estado-cerrada { color: #4f6077; background: #edf0f5; }
.estado-derivada { color: #79531b; background: #fcf2df; }
.estado-anulada { color: #267c6b; background: #f8e9ef; }
.table { font-size: .8125rem; line-height: 1.55; }
.table th { font-size: .625rem; letter-spacing: .08em; color: #5f6f84; background: #f8f9fb; padding: 1rem 1.5rem; border-bottom-color: #e4e8ee; }
.table td { padding: 1.2rem 1.5rem; border-color: #eef0f4; }
.table td small { font-size: .75rem; line-height: 1.7; }
.table tbody tr { transition: background-color 120ms; }
.table tbody tr:hover { background: #f8fafd; }
.table tbody tr:last-child td { border-bottom: 0; }
.table-link { font-weight: 600; color: #263c5d; }
.table-link:hover { color: #267c6b; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.filter-bar { padding: 1.25rem 1.5rem; gap: .75rem; }
.panel-pagination { padding: 1.125rem 1.5rem; }
.pagination { --bs-pagination-color: var(--navy); --bs-pagination-active-bg: var(--navy); --bs-pagination-active-border-color: var(--navy); --bs-pagination-focus-box-shadow: 0 0 0 3px #17685e16; --bs-pagination-border-radius: .65rem; gap: .25rem; }
.page-link { border-radius: .5rem; }
.alert { border-radius: .85rem; padding: 1rem 1.25rem; font-size: .875rem; }
.alert-success { color: #205a42; background: #eef8f2; border-color: #d6eadf; }
.alert-danger { color: #85253f; background: #fcf0f3; border-color: #eed5de; }
.alert-info { color: #355b7e; background: #edf4fb; border-color: #dbe7f3; }
details { border-color: #e3e7ed; background: #f8f9fb; border-radius: .85rem; padding: 1rem; }
summary { font-size: .8125rem; cursor: pointer; min-height: 1.5rem; }
summary::marker { color: #7b899a; }
details[open] > summary { color: var(--navy); }
dt { font-size: .75rem; color: #637084; }
dd { font-size: .875rem; }
.demo-banner { font-size: .625rem; letter-spacing: .035em; color: #5d6b7c; background: #edf0f4; border: 0; border-radius: .6rem; padding: .5rem .8rem; margin-bottom: 1.75rem; }
.page-footer { font-size: .6875rem; line-height: 1.6; color: #657285; margin-top: 2.5rem; padding-top: 1.25rem; }
/* Heavy structural region; the only translucent surface is the floating toolbar. */
.situs-app .sidebar {
  width: 16.25rem;
  padding: 1.75rem .85rem 1.25rem;
  background: linear-gradient(170deg, #17685e 0%, #192e4c 65%, #162841 100%);
  border-right: 1px solid #162944;
  scrollbar-color: #5e7391 #1c3150;
  scrollbar-width: thin;
}
.situs-app .brand { gap: .75rem; margin: 0 .85rem 1.9rem; font-size: 1.65rem; letter-spacing: .045em; }
.brand-mark { background: linear-gradient(145deg,#a52249,#7c1234); width: 2.65rem; height: 2.65rem; border-radius: .85rem; box-shadow: inset 0 1px 0 #ffffff27, 0 4px 12px #00000012; }
.brand small { font-size: .5rem; letter-spacing: .13em; line-height: 1.8; }
.situs-app .sidebar-label { color: #b7c6db; font-size: .6rem; letter-spacing: .13em; margin: 0 .9rem .65rem; }
.nav-group-label { color: #a8b9d0; font-size: .6rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; margin: 1.25rem .95rem .45rem; }
.situs-app .nav-item { min-height: 2.75rem; margin: .2rem 0; padding: .65rem .9rem; border: 1px solid transparent; border-radius: .8rem; gap: .8rem; font-size: .78125rem; line-height: 1.4; color: #d0dbeb; transition: background-color 140ms, color 140ms, transform 140ms; }
.situs-app .nav-icon { display: grid; place-items: center; width: 1.35rem; height: 1.35rem; border: 0; color: #b0c2db; background: none; }
.situs-app .nav-item:hover { color: #fff; background: #ffffff0c; }
.situs-app .nav-item.active { color: #fff; background: #ffffff16; border-color: #ffffff11; box-shadow: inset 3px 0 #d7819d, 0 2px 5px #10203810; }
.situs-app .active .nav-icon { color: #f0b8c9; border: 0; background: none; }
.situs-app .nav-item:focus-visible { outline-color: #f0b8c9; outline-offset: -3px; }
.situs-app .sidebar-footer { margin: 1.75rem .9rem 0; padding-top: 1.15rem; font-size: .75rem; color: #d2ddec; border-color: #ffffff1a; }
.situs-app .sidebar-footer small { font-size: .65rem; color: #afc0d6; }
.situs-app .app-shell { margin-left: 16.25rem; }
.situs-app .topbar { position: sticky; top: 0; z-index: 1020; height: 4.5rem; min-height: 4.5rem; padding: .6rem 2.25rem; background: #ffffffed; border-bottom: 1px solid #e5e8edbb; box-shadow: 0 4px 20px #17685e03; font-size: .75rem; }
@supports (backdrop-filter: blur(20px)) {
  .situs-app .topbar { background: #ffffffd9; backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%); }
}
.situs-app .topbar strong { font-weight: 600; color: #3e4d63; }
.user-block { gap: .75rem; }
.avatar { background: #f2e6eb; color: #267c6b; width: 2.25rem; height: 2.25rem; border-radius: .8rem; box-shadow: inset 0 0 0 1px #267c6b08; }
.user-name { font-size: .75rem; }
.user-name small { font-size: .625rem; color: #64738a; margin-top: .15rem; }
.situs-app .main-content { padding: 2rem 2.25rem; max-width: 1560px; }
.page-heading { margin-bottom: 1.75rem; align-items: center; gap: 1.5rem; }
.page-heading h1 { margin: .6rem 0 .65rem; }
.page-heading p { font-size: .875rem; color: #637084; max-width: 45rem; }
.heading-actions { gap: .625rem; }
.date-pill { font-size: .75rem; border-radius: 2rem; padding: .65rem 1rem; box-shadow: 0 2px 4px #17685e03; }
.welcome-banner { border-radius: 1.5rem; background: radial-gradient(ellipse at 95% 5%,#42608680,transparent 60%), linear-gradient(115deg,#243d60,#1b3150); padding: 1.5rem 2.25rem; min-height: 15rem; border: 1px solid #324a6e; box-shadow: 0 8px 24px #17685e12; }
.welcome-banner h2 { font-size: clamp(1.75rem,2.1vw,2rem); font-weight: 600; letter-spacing: -.035em; margin: .65rem 0; line-height: 1.15; }
.welcome-banner p { font-size: .8125rem; color: #c9d6e8; margin-bottom: 1rem; }
.welcome-banner .eyebrow { color: #c0d0e5; font-size: .625rem; }
.welcome-banner .btn { font-size: .8125rem; }
.care-ring { border-color: #b0c4dd50; background: #ffffff05; box-shadow: 0 0 0 22px #ffffff03,0 0 0 23px #ffffff0d,0 0 0 46px #ffffff02,0 0 0 47px #ffffff08; }
.care-ring span { color: #eef3fa; text-shadow: 5px 6px 0 #a44868; }
.care-label { font-size: .5625rem; color: #c1d0e3; }
.stats-grid { gap: 1rem; margin-bottom: 1.75rem; }
.stat-card { padding: 1.25rem 1.5rem; gap: .5rem; }
.stat-card strong { font-size: 2.25rem; letter-spacing: -.045em; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-label, .stat-card > span { font-size: .8125rem; color: #53667f; }
.stat-card small, .stat-caption { font-size: .75rem; color: #637084; }
.alert-item { gap: .8rem; padding: 1rem 1.5rem; }
.alert-item strong { font-size: .8125rem; }
.alert-item small { font-size: .75rem; }
.alert-symbol { border-radius: .65rem; }
.panel-bottom-link { font-size: .8125rem; font-weight: 600; padding: 1.1rem 1.5rem; }
.help-card { border-radius: var(--radius); background: #f2e9ef; border: 1px solid #e9dde5; padding: 1.5rem; }
.help-card .eyebrow { font-size: .6rem; }
.help-card p, .help-card a { font-size: .8125rem; color: #725566; }
.help-card h3 { font-size: 1.2rem; }
.workflow-cards { gap: 1rem; margin-bottom: 1.75rem; }
.workflow-card { min-height: 10rem; padding: 1.4rem 1.5rem; gap: .65rem; transition: border-color 140ms, background-color 140ms, transform 140ms; }
.workflow-card > span:not(.step-index) { font-size: .8125rem; font-weight: 600; }
.workflow-card strong { font-size: 2.3rem; line-height: 1.2; letter-spacing: -.045em; font-weight: 600; font-variant-numeric: tabular-nums; }
.workflow-card small { font-size: .75rem; color: #637084; }
.workflow-card.selected { border-color: #dcb8c7; background: linear-gradient(130deg,#fff,#fcf5f8); box-shadow: inset 0 3px 0 #267c6b, var(--shadow); }
.workflow-card.selected strong { color: #267c6b; }
.step-index { color: #6b7a8d; font-size: .625rem; top: 1.25rem; right: 1.3rem; }
.assignment-editor { border-radius: .65rem; padding: .5rem .7rem; }
.assignment-editor summary { font-size: .75rem; }
.workflow-summary { padding: 1.65rem; }
.workflow-rail { gap: 1.5rem; margin-top: 1.75rem; }
.workflow-rail strong { font-size: .8125rem; }
.workflow-rail small, .workflow-meta { font-size: .75rem; }
.rail-dot { border: 0; width: 2.35rem; height: 2.35rem; font-size: .8125rem; }
.rail-dot.done { box-shadow: inset 0 0 0 1px #cfe5d8; }
.person-avatar { border-radius: .85rem; width: 2.75rem; height: 2.75rem; background: linear-gradient(140deg,#f6edf2,#eee4ed); font-size: .8125rem; }
.person-avatar-large { width: 4.5rem; height: 4.5rem; border-radius: 1.4rem; font-size: 1.5rem; }
.patient-hero { border-radius: 1.4rem; padding: 2rem; border: 1px solid #e6e3ea; border-top: 3px solid #267c6b; background: radial-gradient(ellipse at top right,#eef2f9,transparent 60%),#fff; box-shadow: var(--shadow); }
.patient-hero h2 { font-size: clamp(1.4rem,2.2vw,1.9rem); letter-spacing: -.035em; }
.patient-hero p { font-size: .8125rem; color: #5d6d83; }
.profile-details dt { font-size: .75rem; }
.profile-details dd { font-size: .875rem; margin-bottom: 1.4rem; }
.contact-value { font-size: 1.5rem !important; letter-spacing: -.02em; }
.latest-request { border-left-width: 3px; padding: 1.5rem 1.75rem; }
.latest-request h2 { font-size: 1.15rem; }
.latest-request p { font-size: .8125rem; }
.context-note, .reconciliation, .privacy-note { border-radius: 1rem; background: #f6f8fb; }
.context-note small, .reconciliation .table th, .reconciliation .table td { font-size: .75rem; }
.measurement-grid { gap: .8rem; }
.measurement-grid > div { border: 1px solid #e9edf3; border-radius: 1rem; padding: 1.25rem; background: #f7f9fc; }
.measurement-grid small { font-size: .75rem; color: #5f6f85; }
.measurement-grid strong { font-size: 1.6rem; letter-spacing: -.03em; }
.inventory-overview { gap: 1rem; }
.stock-number { font-size: 1.5rem; letter-spacing: -.035em; }
.import-steps { gap: .65rem; }
.import-steps span { font-size: .75rem; padding: .65rem 1rem; border-radius: 2rem; background: #e9edf3; color: #53647c; }
.import-steps .active { box-shadow: 0 3px 8px #17685e13; background: #17685e; color: #fff; }
.upload-zone { padding: 1.75rem; border-radius: 1rem; border-color: #b9c4d5; background: #f8fafd; }
.upload-zone small { font-size: .8125rem; }
.upload-mark { border-radius: .85rem; }
.instruction-list { font-size: .875rem; line-height: 1.8; color: #58697f; }
.empty-state h2 { font-size: 1.125rem; }
.empty-state p { font-size: .875rem; }
/* Public forms and sign-in use the same visual language as the workspace. */
.portal-header { padding: 1.5rem max(1.25rem,6vw); background: linear-gradient(115deg,#17685e,#1a2e4c); }
.portal-header .brand { font-size: 1.5rem; }
.portal-main { max-width: 1000px; padding: 2.75rem 1.5rem; }
.portal-intro h1 { font-size: clamp(2rem,4vw,2.75rem); letter-spacing: -.04em; }
.portal-intro p { font-size: .9375rem; color: #5e6e83; }
.portal-identity { border-radius: 1.15rem; padding: 1.5rem; box-shadow: var(--shadow); }
.portal-identity small { font-size: .8125rem; }
.portal-access { max-width: 31rem; }
.otp-value { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.portal-share-box { background: #f3f6fb; border-color: #dbe3ef; border-radius: 1rem; }
.privacy-note { font-size: .8125rem; color: #51637c; padding: 1.25rem; }
.portal-success { border-radius: 1.5rem; }
.login-page { background: #f5f5f7; }
.login-story { padding: clamp(2rem,4vw,4rem); background: radial-gradient(ellipse at top right,#49638666,transparent 65%),linear-gradient(150deg,#17685e,#162941); }
.login-story .brand { font-size: 1.75rem; }
.story-content h1 { font-size: clamp(2.5rem,4vw,4rem); letter-spacing: -.045em; font-weight: 600; line-height: 1.1; }
.story-content h1 em { color: #e0a2b6; }
.story-content p { font-size: .9375rem; color: #c0cee1; line-height: 1.8; }
.story-content .eyebrow, .story-line, .login-story > small { color: #b6c7de; }
.story-line { font-size: .625rem; }
.login-story > small { font-size: .75rem; }
.login-form-panel { padding: 3rem; }
.login-card { max-width: 25rem; }
.login-card h2 { font-size: 2rem; letter-spacing: -.035em; margin-top: 1rem; }
.login-card > p { font-size: .875rem; }
.login-card .form-control { height: 3.2rem; background: #fff; }
.login-card .form-label { font-size: .8125rem; }
.login-privacy { font-size: .75rem; color: #67758b; }
.ai-panel { border-radius: 1.25rem; background: radial-gradient(ellipse at top right,#f1ebff,transparent 60%),#fff; border-color: #e0d9ed; }
.ai-response { font-size: .875rem; border-radius: 1rem; background: #f7f8fc; line-height: 1.85; }
.ai-note { font-size: .75rem; color: #607089; }
.ai-loading-overlay .ai-orb { animation: none; box-shadow: 0 0 60px #a68be948; }
@media (hover: hover) and (pointer: fine) {
  .workflow-card:hover { border-color: #b6c2d2; background-color: #fbfcfe; }
  .workflow-card.selected:hover { border-color: #b67b94; }
}
@media (max-width: 1199px) {
  .situs-app .main-content { padding: 1.75rem; }
  .situs-app .topbar { padding-inline: 1.75rem; }
  .workflow-card { padding: 1.25rem; }
  .workflow-card > span:not(.step-index) { max-width: 80%; }
  .workflow-card small { font-size: .6875rem; }
}
@media (max-width: 991px) {
  .situs-app .app-shell { margin-left: 0; }
  .situs-app .sidebar { width: min(19rem,85vw); box-shadow: 15px 0 60px #10203733; transition: transform 280ms cubic-bezier(.2,.7,.2,1); }
  .situs-app .sidebar.is-open { transform: translateX(0); }
  .situs-app .nav-item { min-height: 2.9rem; font-size: .875rem; }
  .situs-app .sidebar-backdrop { background: #18283c70; backdrop-filter: blur(3px); }
  .login-grid { grid-template-columns: 1fr 1fr; }
  .story-content h1 { font-size: 2.5rem; }
  .login-form-panel { padding: 2rem; }
  .workflow-card { min-height: 10rem; }
}
@media (max-width: 650px) {
  .situs-app .topbar { padding: .75rem 1rem; min-height: 4.5rem; height: auto; flex-wrap: nowrap; gap: .5rem; }
  .situs-app .topbar > div:first-child { display: flex; align-items: center; gap: .5rem; min-width: 0; }
  .situs-app .topbar > div:first-child > .text-muted { display: none; }
  .situs-app .topbar strong { max-width: 42vw; line-height: 1.35; font-size: .75rem; }
  .situs-app .topbar .user-block { gap: .4rem; flex-shrink: 0; }
  .situs-app .topbar .avatar { display: none; }
  .situs-app .topbar .btn { min-width: 2.75rem; min-height: 2.75rem; margin: 0 !important; padding: .6rem .7rem; }
  .situs-app .main-content { padding: 1.5rem 1rem; }
  .page-heading { gap: 1rem; margin-bottom: 1.5rem; }
  .page-heading h1 { font-size: 1.875rem; }
  .page-heading p { font-size: .875rem; }
  .heading-actions { width: 100%; gap: .5rem; }
  .heading-actions .btn { flex: 1 1 8rem; }
  .panel, .stat-card, .workflow-card { border-radius: 1rem; }
  .panel-heading { padding: 1.25rem; align-items: flex-start; }
  .form-panel { padding: 1.5rem 1.25rem; }
  .form-control, .form-select { font-size: 1rem; min-height: 3rem; }
  .form-label { font-size: .875rem; }
  .btn-sm { min-height: 2.75rem; }
  .filter-bar { padding: 1.125rem; gap: .625rem; }
  .filter-bar .btn { flex-grow: 1; }
  .workflow-cards { gap: .75rem; }
  .workflow-card { min-height: 9.5rem; padding: 1.15rem; gap: .6rem; }
  .workflow-card > span:not(.step-index) { max-width: 90%; min-height: 2.5em; font-size: .8125rem; line-height: 1.35; }
  .workflow-card strong { font-size: 2rem; }
  .workflow-card small { font-size: .6875rem; }
  .step-index { font-size: .5625rem; top: .65rem; right: .75rem; }
  .table th, .table td { padding: 1rem 1.125rem; }
  .person-cell { gap: .75rem; min-width: 15rem; }
  .welcome-banner { padding: 1.75rem 1.5rem; border-radius: 1.15rem; }
  .welcome-banner h2 { font-size: 2rem; }
  .welcome-banner p { font-size: .8125rem; }
  .welcome-banner .btn { margin-top: .5rem; }
  .stat-card { padding: 1.25rem; }
  .stat-card strong { font-size: 2rem; }
  .patient-hero { padding: 1.5rem 1.25rem; gap: 1rem; }
  .patient-hero h2 { font-size: 1.5rem; }
  .patient-hero > div { min-width: min(11rem,100%); }
  .patient-hero > .badge { margin-left: 0 !important; }
  .person-avatar-large { width: 3.5rem; height: 3.5rem; border-radius: 1.1rem; font-size: 1.25rem; }
  .workflow-summary, .latest-request { padding: 1.5rem 1.25rem; }
  .workflow-summary-heading { gap: .75rem; flex-wrap: wrap; }
  .inventory-overview .stat-card { min-height: 6.5rem; }
  .inventory-overview .stat-card strong { top: 1.65rem; }
  .inventory-overview .stat-card small { max-width: 75%; }
  .upload-zone { padding: 1.25rem; }
  .import-steps { gap: .5rem; }
  .import-steps span { font-size: .6875rem; padding: .6rem .85rem; }
  .portal-header { padding: 1.25rem; }
  .portal-main { padding: 1.75rem 1rem; }
  .portal-intro h1 { font-size: 2rem; }
  .portal-identity { padding: 1.25rem; }
  .measurement-grid > div { padding: 1rem; }
  .login-grid { display: block; }
  .login-story { min-height: 16rem; padding: 1.5rem; }
  .login-story .brand { font-size: 1.4rem; }
  .story-content { padding: 1.5rem 0 0; }
  .story-content h1 { font-size: 1.9rem; margin: .65rem 0; }
  .login-form-panel { padding: 2rem 1.5rem; }
  .login-card h2 { font-size: 1.75rem; }
}
@media (prefers-reduced-transparency: reduce) {
  .situs-app .topbar { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .situs-app .sidebar-backdrop { background: #18283cbb; backdrop-filter: none; }
  .ai-loading-overlay { background: #1d2c47; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --muted: #3e506a; --line: #8594a8; }
  .situs-app .topbar { background: #fff; backdrop-filter: none; border-bottom-color: #7b8da5; }
  .panel, .stat-card, .workflow-card, .patient-hero, .form-control, .form-select, .btn-outline-primary, .btn-outline-secondary { border-color: #7c8ca3; }
  .situs-app .nav-item { color: #fff; }
  .situs-app .nav-item.active { border-color: #d6e1ef; }
  .workflow-card.selected { border-color: #267c6b; }
  .badge { box-shadow: inset 0 0 0 1px currentColor; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .btn:active:not(:disabled), .workflow-card:active, .nav-item:active { transform: none; }
}
@media (forced-colors: active) {
  .panel, .stat-card, .workflow-card, .patient-hero { border: 1px solid CanvasText; }
  .nav-item.active { outline: 2px solid Highlight; outline-offset: -3px; }
  .workflow-card.selected { outline: 2px solid Highlight; }
}
@media print {
  .sidebar, .topbar, .sidebar-backdrop { display: none !important; }
  .situs-app .app-shell { margin: 0; }
  .situs-app .main-content { padding: 0; }
  .panel, .stat-card, .workflow-card { box-shadow: none; break-inside: avoid; }
}
