:root {
  --navy: #062f69;
  --navy-dark: #04234f;
  --blue: #1766d5;
  --blue-light: #eaf3ff;
  --lime: #b9f14a;
  --ink: #10243c;
  --muted: #607086;
  --line: #d9e3ee;
  --line-soft: #eaf0f6;
  --surface: #f5f8fc;
  --white: #fff;
  --danger: #c42b2b;
  --success: #168451;
  --warning: #a66800;
  --display: "Barlow Condensed", Impact, sans-serif;
  --body: "Manrope", Arial, sans-serif;
  --header-height: 74px;
  --sidebar-width: 264px;
  --shadow: 0 24px 70px rgba(4, 35, 79, .15);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--surface); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); font-family: var(--body); background: var(--surface); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 1000; padding: .75rem 1rem; background: white; color: var(--navy); }
.skip-link:focus { top: 1rem; }
.kicker { margin: 0 0 .7rem; color: var(--blue); font-size: .65rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }

.login-screen { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr); background: white; }
.login-brand { min-height: 100svh; padding: clamp(2rem, 5vw, 5.5rem); position: relative; overflow: hidden; display: flex; flex-direction: column; color: white; background: linear-gradient(135deg, var(--navy-dark), var(--navy)); }
.login-brand::before { content: ""; position: absolute; inset: 0; opacity: .24; background-image: linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px); background-size: 78px 78px; mask-image: linear-gradient(135deg, black, transparent 80%); }
.login-brand::after { content: ""; width: 520px; height: 520px; position: absolute; right: -220px; bottom: -230px; border: 115px solid rgba(255,255,255,.04); border-radius: 50%; }
.portal-logo { width: 104px; height: 86px; position: relative; z-index: 1; display: grid; place-items: center; overflow: hidden; background: white; border-radius: 8px; }
.portal-logo img { width: 100px; }
.login-message { max-width: 700px; margin: auto 0; position: relative; z-index: 1; }
.login-message .kicker { color: #93c4ff; }
.login-message h1 { margin: 0; font: 800 clamp(4.4rem, 8vw, 8.5rem)/.8 var(--display); letter-spacing: -.025em; text-transform: uppercase; }
.login-message h1 em { color: #82baff; font-style: normal; }
.login-message > p:last-child { max-width: 540px; margin: 2rem 0 0; color: rgba(255,255,255,.7); font-size: .95rem; line-height: 1.8; }
.login-points { position: relative; z-index: 1; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.18); list-style: none; }
.login-points li { padding: 1.25rem .8rem 0 0; color: rgba(255,255,255,.66); font-size: .7rem; }
.login-points span { display: block; color: var(--lime); font: 700 .78rem var(--display); }
.login-panel { min-height: 100svh; padding: 3rem clamp(2rem, 6vw, 6rem); display: grid; place-items: center; background: #f7faff; }
.login-card { width: min(100%, 440px); }
.secure-chip { display: inline-flex; padding: .4rem .65rem; color: #0b6c3d; background: #eaf8f1; font-size: .61rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.login-number { margin: 3rem 0 .4rem; color: #5e7188; font: 700 .72rem var(--display); letter-spacing: .13em; }
.login-card h2 { margin: 0; color: var(--navy); font: 800 clamp(3rem, 6vw, 4.5rem)/.9 var(--display); text-transform: uppercase; }
.login-card > p:not(.login-number) { margin: 1rem 0 2rem; color: var(--muted); font-size: .84rem; line-height: 1.7; }
.login-card form { display: grid; gap: .8rem; }
.login-card label { color: #405268; font-size: .64rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.login-card input { width: 100%; height: 58px; padding: 0 1rem; border: 1px solid #bdccdc; background: white; color: var(--navy); font-size: 1rem; font-weight: 800; letter-spacing: .09em; outline: none; text-transform: uppercase; transition: border-color .2s, box-shadow .2s; }
.login-card input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(23,102,213,.12); }
.role-picker { display: grid; gap: .55rem; }
.role-option { min-height: 66px; padding: .8rem .9rem; display: grid; grid-template-columns: 28px minmax(0, 1fr) 24px; grid-template-rows: auto auto; align-items: center; column-gap: .7rem; border: 1px solid #bdccdc; background: white; color: var(--navy); text-align: left; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s; }
.role-option:hover, .role-option:focus-visible { border-color: var(--blue); box-shadow: 0 8px 26px rgba(6,47,105,.09); transform: translateY(-1px); outline: none; }
.role-option > span { grid-row: 1 / 3; color: var(--blue); font: 700 .72rem var(--display); }
.role-option strong { align-self: end; font: 800 1.05rem var(--display); letter-spacing: .02em; text-transform: uppercase; }
.role-option small { align-self: start; color: var(--muted); font-size: .62rem; line-height: 1.35; }
.role-option i { grid-column: 3; grid-row: 1 / 3; color: var(--blue); font-style: normal; font-size: 1.1rem; }
.primary-button, .secondary-button, .danger-button, .ghost-button { min-height: 48px; padding: .82rem 1.15rem; display: inline-flex; align-items: center; justify-content: center; gap: .7rem; border: 1px solid transparent; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: transform .2s, background .2s, border-color .2s; }
.primary-button { background: var(--blue); color: white; }
.primary-button:hover { background: #0f58bc; transform: translateY(-1px); }
.secondary-button { background: var(--navy); color: white; }
.ghost-button { border-color: var(--line); background: white; color: var(--navy); }
.danger-button { background: #fff1f1; border-color: #f3caca; color: var(--danger); }
button:disabled { opacity: .55; cursor: wait; transform: none !important; }
.form-message { min-height: 1.2rem; margin: 0; color: var(--danger); font-size: .7rem; }
.security-note { margin-top: 2rem; padding: 1rem; display: grid; grid-template-columns: auto 1fr; gap: .8rem; background: white; border: 1px solid var(--line); }
.security-note > span { color: var(--blue); }
.security-note p { margin: 0; color: var(--muted); font-size: .69rem; line-height: 1.6; }
.security-note strong { color: var(--ink); }
.back-link { display: inline-block; margin-top: 1.5rem; color: var(--blue); font-size: .68rem; font-weight: 800; text-decoration: none; text-transform: uppercase; letter-spacing: .07em; }

.portal-app { min-height: 100svh; }
.portal-header { height: var(--header-height); position: fixed; inset: 0 0 auto; z-index: 90; padding: 0 1.3rem; display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.header-left, .header-status, .header-brand, .profile-button { display: flex; align-items: center; }
.header-left { gap: .9rem; }
.menu-button { width: 44px; height: 44px; display: none; place-content: center; border: 1px solid var(--line); background: white; cursor: pointer; }
.menu-button span { width: 20px; height: 2px; grid-area: 1 / 1; display: block; background: var(--navy); transition: transform .2s; }
.menu-button span:first-child { transform: translateY(-6px); }
.menu-button span:last-child { transform: translateY(6px); }
.header-brand { gap: .6rem; color: var(--navy); text-decoration: none; }
.header-brand img { width: 66px; height: 58px; object-fit: contain; }
.header-brand > span { display: grid; line-height: .9; }
.header-brand strong { font: 800 1.45rem var(--display); letter-spacing: .05em; }
.header-brand small { font-size: .52rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.header-status { gap: 1.3rem; }
.live-indicator { display: flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .63rem; font-weight: 700; }
.live-indicator i { width: 7px; height: 7px; border-radius: 50%; background: #34b36c; box-shadow: 0 0 0 4px rgba(52,179,108,.12); }
.profile-button { gap: .65rem; padding: .35rem .45rem; border: 0; background: transparent; text-align: left; cursor: pointer; }
.profile-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: white; font: 700 .8rem var(--display); }
.profile-button > span:last-child { display: grid; line-height: 1.25; }
.profile-button strong { color: var(--navy); font-size: .71rem; }
.profile-button small { color: var(--muted); font-size: .58rem; text-transform: capitalize; }

.portal-sidebar { width: var(--sidebar-width); position: fixed; inset: var(--header-height) auto 0 0; z-index: 80; padding: 1.6rem 1rem 1rem; display: flex; flex-direction: column; background: var(--navy-dark); color: white; overflow-y: auto; }
.sidebar-role { padding: .2rem .65rem 1.3rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.sidebar-role p { margin: 0; color: #83a7d0; font-size: .55rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.sidebar-role strong { font: 700 1.5rem var(--display); text-transform: uppercase; }
.portal-sidebar nav { display: grid; gap: .25rem; margin-top: 1rem; }
.nav-button { width: 100%; min-height: 46px; padding: .7rem .75rem; display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: .55rem; border: 0; border-left: 3px solid transparent; background: transparent; color: rgba(255,255,255,.66); text-align: left; cursor: pointer; transition: .2s; }
.nav-button:hover { color: white; background: rgba(255,255,255,.06); }
.nav-button.active { border-left-color: var(--lime); background: rgba(255,255,255,.09); color: white; }
.nav-button .nav-icon { color: #88b6ea; font-size: .78rem; }
.nav-button strong { font-size: .7rem; }
.nav-button small { padding: .18rem .4rem; border-radius: 99px; background: rgba(255,255,255,.1); font-size: .55rem; }
.sidebar-footer { margin-top: auto; padding: 1rem .65rem 0; display: grid; gap: .75rem; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-footer a, .sidebar-footer button { padding: 0; border: 0; background: transparent; color: #8fb2d8; font-size: .63rem; font-weight: 700; text-align: left; text-decoration: none; cursor: pointer; }
.sidebar-footer button { color: #ffaaaa; }
.sidebar-backdrop { position: fixed; inset: var(--header-height) 0 0; z-index: 70; border: 0; background: rgba(4,24,54,.5); }
.portal-main { min-height: 100svh; margin-left: var(--sidebar-width); padding: calc(var(--header-height) + 2.2rem) 2rem 3rem; }
.view-shell { width: min(1260px, 100%); margin-inline: auto; }
.loading-state { min-height: 60vh; display: grid; place-content: center; justify-items: center; gap: 1rem; color: var(--muted); font-size: .72rem; }
.loading-state span { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.view-header { margin-bottom: 2rem; display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.view-header h1 { margin: 0; color: var(--navy); font: 800 clamp(3.3rem, 6vw, 5.5rem)/.85 var(--display); text-transform: uppercase; letter-spacing: -.015em; }
.view-header > div > p:last-child { max-width: 650px; margin: .8rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.7; }
.view-actions { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: .6rem; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.metric-card { min-height: 150px; padding: 1.25rem; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; background: white; border: 1px solid var(--line-soft); }
.metric-card::after { content: ""; width: 90px; height: 90px; position: absolute; right: -40px; top: -40px; border: 18px solid var(--blue-light); border-radius: 50%; }
.metric-card span { color: var(--muted); font-size: .6rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.metric-card strong { color: var(--navy); font: 800 3.2rem/1 var(--display); }
.metric-card small { color: var(--muted); font-size: .62rem; }
.content-grid { margin-top: 1rem; display: grid; grid-template-columns: 1.45fr .75fr; gap: 1rem; }
.panel { padding: 1.35rem; background: white; border: 1px solid var(--line-soft); }
.panel-head { margin-bottom: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.panel-head h2 { margin: 0; color: var(--navy); font: 700 1.35rem var(--display); text-transform: uppercase; }
.panel-head p { margin: .2rem 0 0; color: var(--muted); font-size: .62rem; }
.text-button { padding: .3rem 0; border: 0; background: transparent; color: var(--blue); font-size: .61rem; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; text-transform: uppercase; cursor: pointer; }
.quick-actions { display: grid; gap: .65rem; }
.quick-action { min-height: 68px; padding: .85rem; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: .7rem; border: 1px solid var(--line); background: white; text-align: left; cursor: pointer; transition: border-color .2s, transform .2s; }
.quick-action:hover { border-color: var(--blue); transform: translateX(2px); }
.quick-action > span:first-child { width: 38px; height: 38px; display: grid; place-items: center; background: var(--blue-light); color: var(--blue); font: 700 .78rem var(--display); }
.quick-action strong { display: block; color: var(--navy); font-size: .7rem; }
.quick-action small { color: var(--muted); font-size: .58rem; }
.quick-action > span:last-child { color: var(--blue); }

.data-panel { overflow: hidden; background: white; border: 1px solid var(--line-soft); }
.data-toolbar { padding: 1rem 1.15rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-bottom: 1px solid var(--line-soft); }
.search-box { width: min(360px, 100%); position: relative; }
.search-box input { width: 100%; height: 42px; padding: 0 .9rem 0 2.3rem; border: 1px solid var(--line); outline: none; }
.search-box::before { content: "⌕"; position: absolute; left: .8rem; top: .55rem; color: var(--muted); }
.data-count { color: var(--muted); font-size: .62rem; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: .8rem 1rem; background: #f8fafc; color: #6e7e91; font-size: .56rem; font-weight: 800; letter-spacing: .09em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: .9rem 1rem; border-top: 1px solid var(--line-soft); color: #405268; font-size: .68rem; vertical-align: middle; }
.data-table strong { color: var(--navy); }
.data-table small { display: block; color: var(--muted); }
.table-actions { display: flex; gap: .35rem; justify-content: flex-end; }
.icon-button { min-width: 34px; min-height: 32px; padding: .35rem .55rem; border: 1px solid var(--line); background: white; color: var(--blue); font-size: .57rem; font-weight: 800; cursor: pointer; }
.status-badge { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .5rem; background: #eff4f9; color: #52677e; font-size: .56rem; font-weight: 800; text-transform: capitalize; white-space: nowrap; }
.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #7c8c9c; }
.status-badge.available::before, .status-badge.active::before, .status-badge.uploaded::before { background: #31a767; }
.status-badge.rented::before, .status-badge.scheduled::before, .status-badge.reserved::before { background: var(--blue); }
.status-badge.maintenance::before, .status-badge.cleaning::before, .status-badge.urgent::before { background: #f0a127; }
.status-badge.inactive::before, .status-badge.cancelled::before { background: #d44b4b; }
.empty-state { min-height: 260px; padding: 2rem; display: grid; place-content: center; justify-items: center; text-align: center; }
.empty-state span { width: 54px; height: 54px; display: grid; place-items: center; background: var(--blue-light); color: var(--blue); font: 700 1rem var(--display); }
.empty-state h3 { margin: 1rem 0 .35rem; color: var(--navy); font: 700 1.4rem var(--display); text-transform: uppercase; }
.empty-state p { max-width: 380px; margin: 0; color: var(--muted); font-size: .7rem; }
.workflow-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-bottom: 1rem; }
.workflow-card { min-height: 148px; padding: 1rem; display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--line); background: white; cursor: pointer; transition: .2s; }
.workflow-card:hover { border-color: var(--blue); box-shadow: 0 10px 28px rgba(4,35,79,.08); transform: translateY(-2px); }
.workflow-card span { color: var(--blue); font: 700 .72rem var(--display); }
.workflow-card strong { margin-top: auto; color: var(--navy); font: 700 1.15rem var(--display); text-transform: uppercase; }
.workflow-card small { color: var(--muted); font-size: .58rem; line-height: 1.45; }
.timeline { display: grid; }
.timeline-item { padding: 1rem 0 1rem 1.4rem; position: relative; border-left: 1px solid var(--line); }
.timeline-item::before { content: ""; width: 9px; height: 9px; position: absolute; left: -5px; top: 1.25rem; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px white; }
.timeline-item strong { display: block; color: var(--navy); font-size: .69rem; }
.timeline-item span { color: var(--muted); font-size: .58rem; }

.portal-modal { width: min(760px, calc(100% - 24px)); max-width: none; max-height: calc(100svh - 24px); padding: 0; border: 0; background: transparent; overflow: visible; }
.portal-modal::backdrop { background: rgba(3,25,56,.66); backdrop-filter: blur(3px); }
.modal-card { max-height: calc(100svh - 24px); display: flex; flex-direction: column; background: white; box-shadow: var(--shadow); }
.modal-header { padding: 1.2rem 1.4rem; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; color: var(--navy); font: 800 2.1rem/.9 var(--display); text-transform: uppercase; }
.modal-header .kicker { margin-bottom: .35rem; }
.modal-close { width: 40px; height: 40px; border: 1px solid var(--line); background: white; color: var(--navy); font-size: 1.5rem; cursor: pointer; }
.modal-body { padding: 1.35rem; overflow-y: auto; }
.portal-form { display: grid; gap: 1rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.field { display: grid; gap: .38rem; }
.field.full { grid-column: 1 / -1; }
.field label, .upload-field > label { color: #43566b; font-size: .59rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.field input, .field select, .field textarea { width: 100%; min-height: 46px; padding: .72rem .8rem; border: 1px solid #cbd7e3; background: white; color: var(--ink); outline: none; border-radius: 0; font-size: .75rem; }
.field textarea { min-height: 105px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,102,213,.1); }
.field small { color: var(--muted); font-size: .58rem; }
.form-section { padding-top: .4rem; }
.form-section-title { margin: 0 0 .7rem; padding-bottom: .55rem; border-bottom: 1px solid var(--line); color: var(--navy); font: 700 1rem var(--display); text-transform: uppercase; }
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.upload-field { min-width: 0; display: grid; gap: .4rem; }
.upload-drop { min-height: 92px; padding: .8rem; display: grid; place-content: center; justify-items: center; border: 1px dashed #9eb4cb; background: #f8fbff; color: var(--muted); text-align: center; cursor: pointer; }
.upload-drop:hover { border-color: var(--blue); background: var(--blue-light); }
.upload-drop input { position: absolute; opacity: 0; pointer-events: none; }
.upload-drop strong { color: var(--blue); font-size: .66rem; }
.upload-drop span { font-size: .56rem; }
.file-summary { min-height: 18px; color: var(--muted); font-size: .58rem; }
.signature-wrap { display: grid; gap: .45rem; }
.signature-canvas { width: 100%; height: 150px; display: block; border: 1px solid #9eb4cb; background: #fbfdff; touch-action: none; cursor: crosshair; }
.signature-controls { display: flex; justify-content: space-between; align-items: center; }
.signature-controls span { color: var(--muted); font-size: .58rem; }
.signature-controls button { padding: .3rem; border: 0; background: transparent; color: var(--blue); font-size: .58rem; font-weight: 800; cursor: pointer; }
.form-submit-row { padding-top: .9rem; display: flex; justify-content: flex-end; gap: .65rem; border-top: 1px solid var(--line); }
.upload-progress { display: none; gap: .5rem; align-items: center; color: var(--muted); font-size: .65rem; }
.upload-progress.visible { display: flex; }
.progress-track { flex: 1; height: 5px; background: var(--line-soft); }
.progress-track i { width: 0; height: 100%; display: block; background: var(--blue); transition: width .2s; }
.code-reveal { padding: 1.2rem; border: 1px solid #b9d2ee; background: var(--blue-light); text-align: center; }
.code-reveal p { margin: 0 0 .5rem; color: var(--muted); font-size: .65rem; }
.code-reveal strong { display: block; color: var(--navy); font: 800 clamp(1.5rem, 6vw, 2.3rem) var(--display); letter-spacing: .06em; }
.code-reveal small { display: block; margin-top: .6rem; color: var(--danger); font-size: .58rem; }
.media-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
.media-gallery figure { margin: 0; border: 1px solid var(--line); }
.media-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface); }
.media-gallery figcaption { padding: .5rem; color: var(--muted); font-size: .58rem; text-transform: capitalize; }
.toast-region { position: fixed; right: 1rem; bottom: 1rem; z-index: 200; display: grid; gap: .6rem; pointer-events: none; }
.toast { min-width: min(340px, calc(100vw - 2rem)); padding: .9rem 1rem; display: grid; grid-template-columns: auto 1fr; gap: .65rem; background: var(--navy); color: white; box-shadow: var(--shadow); font-size: .68rem; animation: toast-in .25s ease; }
.toast.error { background: #8e2020; }
.toast.success > span:first-child { color: var(--lime); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 1080px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .workflow-grid { grid-template-columns: 1fr 1fr; }
  .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  :root { --header-height: 66px; }
  .login-screen { grid-template-columns: 1fr; }
  .login-brand { min-height: auto; padding: 1.2rem 1.2rem 2rem; }
  .portal-logo { width: 82px; height: 68px; }
  .portal-logo img { width: 78px; }
  .login-message { margin: 3.5rem 0 2.5rem; }
  .login-message h1 { font-size: clamp(3.9rem, 16vw, 6.2rem); }
  .login-message > p:last-child { margin-top: 1.4rem; font-size: .8rem; }
  .login-points li { font-size: .61rem; }
  .login-panel { min-height: auto; padding: 3rem 1.2rem 4rem; }
  .login-number { margin-top: 2rem; }
  .menu-button { display: grid; }
  .header-brand > span { display: none; }
  .header-status { gap: .5rem; }
  .live-indicator { display: none; }
  .profile-button strong { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .portal-sidebar { transform: translateX(-100%); transition: transform .28s cubic-bezier(.22,1,.36,1); }
  .portal-sidebar.open { transform: translateX(0); }
  .portal-main { margin-left: 0; padding: calc(var(--header-height) + 1.4rem) 1rem 2.5rem; }
  .view-header { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .view-header h1 { font-size: clamp(3.1rem, 15vw, 4.8rem); }
  .view-actions { width: 100%; }
  .view-actions > button { flex: 1; }
}

@media (max-width: 560px) {
  .portal-header { padding: 0 .75rem; }
  .header-left { gap: .4rem; }
  .header-brand img { width: 58px; }
  .profile-button { padding-inline: .2rem; }
  .profile-avatar { width: 34px; height: 34px; }
  .profile-button small { display: none; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: .65rem; }
  .metric-card { min-height: 124px; padding: 1rem; }
  .metric-card strong { font-size: 2.6rem; }
  .workflow-grid { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .workflow-card { min-height: 132px; padding: .85rem; }
  .data-toolbar { align-items: flex-start; flex-direction: column; }
  .form-grid, .upload-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: 1; }
  .modal-body { padding: 1rem; }
  .modal-header { padding: 1rem; }
  .form-submit-row { flex-direction: column-reverse; }
  .form-submit-row button { width: 100%; }
  .media-gallery { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition-duration: .01ms !important; }
}
