/* DormOS design tokens: all assets are served from this installation. */
:root {
  --bg:#f5f7fa; --surface:#fff; --surface-alt:#fafbfc; --text:#172b3a;
  --muted:#72808f; --line:#e6ebef; --accent:#168167; --accent-hover:#106c56;
  --sidebar:#122b2c; --sidebar-muted:#91aaa8; --green-bg:#e8f5ef; --blue-bg:#edf3fd;
  --purple-bg:#f1edfb; --orange-bg:#fff3e5; --radius:13px; --sidebar-width:244px;
  font-family:"Segoe UI",system-ui,-apple-system,BlinkMacSystemFont,Arial,sans-serif;
  color:var(--text); background:var(--bg); line-height:1.5; font-synthesis:none;
}
[data-theme="dark"] {
  --bg:#101d25; --surface:#192932; --surface-alt:#1d303b; --text:#e1ebee;
  --muted:#a2b1ba; --line:#2d414c; --green-bg:#203f35; --blue-bg:#23394f;
  --purple-bg:#363049; --orange-bg:#443827;
}
* { box-sizing:border-box; }
body { margin:0; }
a { color:inherit; text-decoration:none; }
button,input,select { font:inherit; }
button,a,input,select,summary { -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; }
button:disabled { cursor:default; opacity:.45; }
[hidden] { display:none !important; }
h1,h2,h3,p { margin-top:0; }
h1 { font-size:30px; line-height:1.2; letter-spacing:-1.1px; font-weight:650; margin-bottom:8px; }
h2 { font-size:15px; font-weight:650; letter-spacing:-.2px; margin:0; }
h3 { font-size:14px; margin:20px 0 12px; }
.icon { flex-shrink:0; vertical-align:middle; }
.small { font-size:11px !important; }
.muted { color:var(--muted); }
.eyebrow { color:#65877b; font-size:9px; letter-spacing:1.7px; font-weight:700; margin-bottom:9px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skip-link { position:fixed; top:-100px; left:12px; background:var(--surface); padding:12px; z-index:100; }
.skip-link:focus { top:12px; }
:focus-visible { outline:3px solid #42b99a; outline-offset:3px; }
.sidebar { position:fixed; inset:0 auto 0 0; width:var(--sidebar-width); background:var(--sidebar); color:#c3d2d0; z-index:40; display:flex; flex-direction:column; padding:25px 16px 14px; overflow-y:auto; }
.brand { display:flex; align-items:center; gap:10px; margin:0 9px 25px; color:#f1f7f4; font-size:25px; font-weight:700; letter-spacing:-.8px; }
.brand-mark { width:37px; height:39px; border-radius:10px; background:#bef0d6; display:grid; place-items:center; color:#153e32; }
.brand-mark .icon { width:24px; height:24px; }
.brand-os { color:#a9ddc4; }
.brand small { display:block; color:#91aaa8; font-size:7px; letter-spacing:1.7px; font-weight:600; margin-top:0; }
.workspace-label { display:flex; gap:10px; align-items:center; margin:0 1px 14px; padding:12px 10px; background:#1c3636; border:1px solid #2c4443; border-radius:9px; font-size:12px; font-weight:600; }
.workspace-avatar { width:30px; height:30px; border-radius:7px; color:#d1e6da; background:#3a5450; display:grid; place-items:center; }
.workspace-label .nav-copy { min-width:0; overflow-wrap:anywhere; }
.workspace-label small { display:block; font-weight:400; color:var(--sidebar-muted); font-size:10px; }
.nav-tail { margin-left:auto; width:12px; }
.navigation { flex:1; }
.nav-group { margin-bottom:15px; }
.nav-heading { color:var(--sidebar-muted); font-size:9px; text-transform:uppercase; letter-spacing:1.5px; margin:16px 12px 8px; }
.nav-link { position:relative; display:flex; align-items:center; gap:12px; padding:9px 12px; border-radius:7px; font-size:12px; margin-bottom:3px; min-height:38px; }
.nav-link .icon { width:18px; height:18px; color:#93aca7; }
.nav-link:hover { background:#203c3a; color:#fff; }
.nav-link.active { background:#c6edda; color:#154b3c; font-weight:650; }
.nav-link.active .icon { color:#18533f; }
.nav-count { margin-left:auto; background:#2c4845; color:#bdd2c9; font-size:9px; min-width:19px; padding:1px 5px; text-align:center; border-radius:4px; }
.sidebar-bottom { margin-top:20px; }
.local-card { display:flex; gap:10px; align-items:center; padding:13px 9px; border:1px solid #2a4441; border-radius:8px; }
.local-card>.icon { color:#9ad0b6; width:19px; }
.local-card strong { font-size:10px; color:#d8e9e1; display:block; font-weight:600; }
.local-card span { color:var(--sidebar-muted); font-size:9px; }
.collapse-button { border:0; background:none; color:#9fb6b0; width:100%; display:flex; align-items:center; gap:12px; font-size:11px; padding:16px 12px 5px; }
.app-content { margin-left:var(--sidebar-width); min-width:0; }
.topbar { height:73px; padding:0 32px; border-bottom:1px solid var(--line); background:var(--surface); display:flex; align-items:center; justify-content:space-between; gap:15px; }
.topbar-left,.topbar-right { display:flex; align-items:center; gap:17px; }
.breadcrumb { color:var(--muted); font-size:11px; }
.breadcrumb span { margin:0 10px; color:#b5bfc5; }
.breadcrumb strong { color:var(--text); font-weight:500; }
.local-indicator { font-size:10px; color:var(--muted); white-space:nowrap; }
.status-dot { width:6px; height:6px; display:inline-block; margin-right:5px; border-radius:50%; background:#24a479; }
.demo-pill { border:1px solid #dce8df; background:var(--green-bg); color:#4b7966; padding:5px 8px; font-size:8px; letter-spacing:.7px; font-weight:650; border-radius:5px; white-space:nowrap; }
.icon-button { display:inline-grid; place-items:center; color:var(--muted); background:transparent; border:1px solid var(--line); width:32px; height:32px; border-radius:8px; }
.icon-button:hover { background:var(--surface-alt); }
.icon-button .icon { width:16px; height:16px; }
.mobile-menu { display:none; }
.user-menu { position:relative; }
.user-menu summary { list-style:none; display:flex; align-items:center; gap:8px; cursor:pointer; }
.user-menu summary::-webkit-details-marker { display:none; }
.avatar { width:32px; height:32px; border-radius:50%; display:inline-grid; place-items:center; background:#e6eee9; color:#476958; font-size:11px; font-weight:650; flex-shrink:0; }
.user-caption { font-size:11px; min-width:50px; }
.user-caption small { display:block; font-size:9px; color:var(--muted); }
.user-dropdown { position:absolute; right:0; top:46px; z-index:30; min-width:230px; padding:18px; background:var(--surface); border:1px solid var(--line); box-shadow:0 10px 30px #102b2917; border-radius:10px; font-size:12px; }
.user-dropdown p { color:var(--muted); font-size:11px; margin:8px 0 15px; }
main { max-width:1700px; margin:auto; padding:31px 32px 18px; }
.page-heading { display:flex; justify-content:space-between; align-items:center; gap:18px; margin-bottom:24px; }
.page-heading p { font-size:12px; color:var(--muted); margin:0; }
.heading-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.button { display:inline-flex; align-items:center; justify-content:center; gap:7px; background:var(--surface); border:1px solid var(--line); color:var(--text); border-radius:7px; padding:9px 13px; font-size:11px; font-weight:600; line-height:1.5; min-height:35px; white-space:nowrap; }
.button .icon { width:15px; height:15px; }
.button:hover { background:var(--surface-alt); border-color:#b1c4ba; }
.button.primary { background:var(--accent); color:#fff; border-color:var(--accent); }
.button.primary:hover { background:var(--accent-hover); }
.button.quiet { background:transparent; }
.button.small { padding:5px 9px; min-height:29px; font-size:10px; }
.date-range { display:flex; align-items:center; gap:6px; font-size:10px; border:1px solid var(--line); border-radius:7px; background:var(--surface); padding:9px; color:var(--muted); }
.date-range .icon { width:14px; height:14px; }
.demo-notice { display:flex; align-items:center; gap:10px; padding:12px 15px; font-size:10px; color:#527665; background:var(--green-bg); border:1px solid #d9e9df; border-radius:8px; margin-bottom:22px; }
.demo-notice>.icon { width:17px; height:17px; }
.demo-notice>span:last-child.micro-demo { margin-left:auto; }
.micro-demo { display:inline-block; color:#718b80; background:var(--green-bg); border:1px solid #cfdfd5; border-radius:3px; font-size:7px; letter-spacing:.5px; font-weight:650; padding:1px 4px; vertical-align:middle; white-space:nowrap; }
.stats-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:17px; margin-bottom:26px; }
.stats-grid.three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.stat-card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:19px 20px 17px; box-shadow:0 2px 3px #213d3402; min-width:0; }
.stat-top { display:flex; align-items:center; justify-content:space-between; gap:5px; color:var(--muted); font-size:11px; }
.stat-icon { display:inline-grid; place-items:center; border-radius:9px; width:34px; height:34px; flex-shrink:0; }
.stat-icon .icon { width:18px; height:18px; }
.green { background:var(--green-bg); color:#228868; }
.blue { background:var(--blue-bg); color:#5c8cc7; }
.purple { background:var(--purple-bg); color:#9573c2; }
.orange { background:var(--orange-bg); color:#cd9758; }
.stat-value { font-size:29px; font-weight:650; letter-spacing:-.7px; margin:9px 0 6px; line-height:1.2; }
.stat-card p { color:var(--muted); font-size:9px; margin:0; }
.section-title { display:flex; justify-content:space-between; align-items:center; margin:0 0 14px; gap:12px; }
.section-title h2 { font-size:14px; }
.two-column { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; margin-bottom:20px; }
.panel { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); min-width:0; overflow:hidden; margin-bottom:20px; }
.two-column>.panel,.dashboard-lower>.panel { margin-bottom:0; }
.panel-heading { padding:20px 22px 17px; display:flex; align-items:center; justify-content:space-between; gap:14px; }
.panel-heading p { font-size:10px; color:var(--muted); margin:5px 0 0; }
.panel-heading h2 .micro-demo { margin-left:5px; }
.chart-summary { display:flex; align-items:baseline; gap:10px; padding:0 22px 2px; }
.chart-summary strong { font-size:23px; font-weight:650; letter-spacing:-.4px; }
.chart-summary small { color:var(--muted); font-size:11px; font-weight:500; }
.chart-summary>span { font-size:9px; color:var(--muted); }
.chart-key { font-size:9px; color:var(--muted); display:flex; align-items:center; gap:6px; }
.chart-key:before { content:""; width:7px; height:7px; background:#42aa88; border-radius:50%; }
.chart-key.water:before { background:#6a9fdb; }
.chart { padding:6px 16px 12px 8px; min-height:178px; }
.chart svg { width:100%; height:auto; max-height:210px; display:block; overflow:visible; }
.chart-grid { stroke:var(--line); stroke-dasharray:3 5; }
.chart-label { font-family:inherit; font-size:9px; fill:var(--muted); }
.chart-line { fill:none; stroke-width:2.5; stroke-linejoin:round; stroke-linecap:round; }
.chart-point { stroke:var(--surface); stroke-width:2; }
.text-link { display:inline-flex; align-items:center; gap:4px; font-size:10px; font-weight:600; color:var(--accent); white-space:nowrap; }
.text-link:hover { text-decoration:underline; }
.text-link .icon { width:13px; height:13px; }
.dashboard-lower { display:grid; grid-template-columns:1.1fr 1fr; gap:20px; margin-bottom:20px; }
.allocation-layout { display:flex; gap:20px; align-items:center; padding:0 22px 22px; }
.donut-wrap { position:relative; width:150px; height:150px; flex-shrink:0; }
.donut { width:100%; height:100%; }
.donut-track,.donut-fill { fill:none; stroke-width:15; }
.donut-track { stroke:var(--line); }
.donut-fill { stroke:#4da989; stroke-linecap:round; }
.donut-label { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.donut-label strong { font-size:25px; font-weight:650; }
.donut-label span { font-size:9px; color:var(--muted); }
.allocation-legend { flex:1; font-size:10px; color:var(--muted); }
.allocation-legend>div { display:flex; align-items:center; gap:7px; margin:14px 0; }
.allocation-legend strong { color:var(--text); margin-left:auto; font-size:12px; }
.legend-dot { width:7px; height:7px; border-radius:50%; flex-shrink:0; background:#4da989; }
.legend-dot.gray { background:#d9e1e6; }
.legend-total { border-top:1px solid var(--line); padding-top:13px; }
.device-summary { padding:0 22px; display:flex; align-items:baseline; gap:12px; }
.device-summary>strong { font-size:30px; font-weight:600; }
.device-summary small { font-size:17px; font-weight:400; color:var(--muted); }
.device-summary>span { font-size:10px; color:var(--accent); }
.device-strip { display:flex; gap:5px; margin:14px 22px 20px; }
.device-segment { height:8px; border-radius:3px; background:#50af8f; flex:1; }
.device-segment.offline { background:#d5a466; }
.device-segment.unconfigured { background:#d5dde1; }
.mini-metrics { display:flex; padding:0 22px 20px; gap:18px; justify-content:space-between; }
.mini-metrics span { display:block; font-size:9px; color:var(--muted); margin-bottom:5px; }
.mini-metrics strong { font-size:15px; font-weight:600; }
.alert-row { display:flex; align-items:center; gap:12px; padding:15px 22px; border-top:1px solid var(--line); }
.alert-row>div { flex:1; }
.alert-row strong { font-size:10px; font-weight:600; }
.alert-row p { color:var(--muted); font-size:9px; margin:4px 0 0; }
.alert-row>.icon { color:var(--muted); width:12px; }
.alert-icon { border-radius:8px; padding:8px; }
.alert-icon .icon { width:16px; height:16px; }
.activity-list { padding:0 22px 12px; max-height:260px; overflow-y:auto; }
.activity-row { display:flex; gap:12px; margin:8px 0 16px; }
.activity-dot { width:7px; height:7px; background:#7caa97; border:3px solid var(--green-bg); border-radius:50%; box-sizing:content-box; margin-top:4px; flex-shrink:0; }
.activity-row p { margin:0 0 2px; font-size:11px; }
.activity-row time { font-size:9px; color:var(--muted); }
.badge { display:inline-flex; align-items:center; font-size:9px; font-weight:500; white-space:nowrap; color:var(--muted); background:var(--surface-alt); border:1px solid var(--line); padding:3px 7px; border-radius:5px; }
.badge-online,.badge-active,.badge-available,.badge-connected,.badge-completed { color:#327e61; background:var(--green-bg); border-color:#d6e9dd; }
.badge-offline,.badge-pending,.badge-disconnected { color:#9e7841; background:var(--orange-bg); border-color:#ecdcc2; }
.badge-full { color:#6d70a0; background:var(--purple-bg); border-color:#e1dcf0; }
.table-tools { padding:0 22px 17px; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.table-tools>.small { margin-left:auto; font-size:9px !important; }
.search-field { display:flex; gap:8px; align-items:center; border:1px solid var(--line); border-radius:7px; padding:0 10px; background:var(--surface); min-width:230px; }
.search-field .icon { width:14px; color:var(--muted); }
.search-field input { border:0; background:none; padding:9px 0; min-width:0; width:100%; font-size:11px; color:var(--text); }
input::placeholder { color:var(--muted); }
.table-tools select { padding:8px 28px 8px 10px; font-size:11px; }
.table-scroll { overflow-x:auto; }
table { border-collapse:collapse; width:100%; text-align:left; white-space:nowrap; font-size:11px; }
th,td { border-bottom:1px solid var(--line); padding:13px 22px; }
thead { background:var(--surface-alt); }
thead th { color:var(--muted); font-size:9px; font-weight:600; }
thead button { border:0; padding:0; background:none; color:inherit; font:inherit; }
tbody th { font-weight:600; }
tbody td { color:var(--muted); }
tbody tr:hover { background:var(--surface-alt); }
.table-icon { display:inline-grid; place-items:center; background:var(--green-bg); color:#618e7d; width:29px; height:29px; border-radius:6px; }
.table-icon .icon { width:16px; height:16px; }
.room-name,.account-name { display:flex; align-items:center; gap:10px; }
.occupancy-cell { display:flex; align-items:center; gap:10px; font-size:10px; }
progress { width:65px; height:4px; border:0; border-radius:4px; background:var(--line); accent-color:#68ac91; }
progress::-webkit-progress-bar { background:var(--line); border-radius:4px; }
progress::-webkit-progress-value { background:#68ac91; border-radius:4px; }
.table-footer { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:14px 22px; color:var(--muted); font-size:10px; min-height:58px; }
.pagination { display:flex; align-items:center; gap:10px; }
.small-avatar { width:28px; height:28px; font-size:10px; }
.cell-note { display:block; margin-top:3px; font-size:8px; color:var(--muted); font-weight:400; }
.device-table th,.device-table td { padding:13px 16px; font-size:10px; }
.device-table .badge { font-size:8px; }
.empty-state { padding:30px 22px; text-align:center; color:var(--muted); font-size:12px; }
.empty-state.large { display:flex; flex-direction:column; align-items:center; padding:60px 22px; gap:12px; }
.empty-state.large>.icon { width:34px; height:34px; color:var(--accent); }
.empty-state p { margin:0; max-width:550px; }
.empty-state h1,.empty-state h2 { color:var(--text); }
.back-link { display:inline-block; font-size:11px; color:var(--accent); margin-bottom:18px; }
.form-panel { max-width:690px; }
.form-stack { padding:0 22px 24px; }
.form-stack label { display:flex; flex-direction:column; gap:7px; color:var(--text); font-weight:600; font-size:11px; margin-bottom:18px; }
input,select { color:var(--text); background:var(--surface); border:1px solid var(--line); border-radius:7px; padding:10px 12px; min-width:0; }
.form-stack input,.form-stack select { width:100%; font-size:12px; font-weight:400; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.form-actions { display:flex; justify-content:flex-end; align-items:center; gap:10px; border-top:1px solid var(--line); padding-top:20px; margin-top:25px; }
.help-text { font-size:10px; color:var(--muted); margin:-5px 0 18px; font-weight:400; }
.form-error,.success-notice { padding:13px 17px; margin:0 22px 20px; border-radius:7px; background:#fff0eb; border:1px solid #f1d7ce; color:#a64f3b; font-size:12px; }
.success-notice { display:flex; gap:9px; align-items:center; margin:0 0 20px; background:var(--green-bg); border-color:#d0e4d8; color:var(--accent); }
.simulation-banner { display:flex; gap:14px; padding:18px 20px; border:1px solid #e8d8bd; border-radius:10px; background:var(--orange-bg); color:#92703f; margin-bottom:22px; }
.simulation-banner strong { font-size:12px; }
.simulation-banner p { font-size:11px; margin:5px 0 0; }
.simple-list { padding:0 22px 20px; }
.simple-list>div { display:flex; align-items:center; gap:10px; padding:12px 0; border-top:1px solid var(--line); font-size:11px; flex-wrap:wrap; }
.simple-list .text-link { margin-left:auto; }
.access-card { padding:25px; display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
.access-illustration { background:var(--green-bg); color:var(--accent); display:grid; place-items:center; width:64px; height:72px; border-radius:12px; }
.access-illustration .icon { width:32px; height:32px; }
.access-card p { font-size:11px; margin:6px 0 12px; }
.access-details { width:100%; border-top:1px solid var(--line); padding-top:20px; display:grid; grid-template-columns:1fr 1fr; row-gap:12px; font-size:11px; color:var(--muted); }
.access-details strong { color:var(--text); text-align:right; font-weight:500; }
.settings-layout { display:grid; grid-template-columns:1.7fr 1fr; gap:22px; align-items:start; }
fieldset { padding:0; border:0; margin:0; min-width:0; }
fieldset:disabled { opacity:.7; }
.settings-info { padding:24px; }
.settings-info h2 { margin:20px 0 10px; }
.settings-info p { font-size:11px; color:var(--muted); }
hr { border:0; border-top:1px solid var(--line); margin:23px 0; }
dl { font-size:11px; margin:0 0 25px; }
dt { color:var(--muted); margin-bottom:4px; }
dd { margin:0 0 15px; }
footer { display:flex; justify-content:space-between; gap:16px; max-width:1700px; margin:auto; padding:14px 32px 23px; color:var(--muted); font-size:9px; }
.footer-dot { margin:0 7px; color:#b7c3c6; }
.toast { position:fixed; bottom:24px; right:24px; padding:12px 18px; border:1px solid var(--line); background:var(--surface); color:var(--text); border-radius:8px; box-shadow:0 5px 30px #0001; font-size:12px; z-index:80; }
body.nav-collapsed { --sidebar-width:76px; }
.nav-collapsed .brand-text,.nav-collapsed .nav-copy,.nav-collapsed .nav-heading,.nav-collapsed .workspace-label,.nav-collapsed .local-card { display:none; }
.nav-collapsed .brand { margin-left:3px; }
.nav-collapsed .sidebar { padding-left:14px; padding-right:14px; }
.nav-collapsed .nav-link { justify-content:center; padding:10px; }
.nav-collapsed .nav-group { margin-bottom:18px; }
.nav-collapsed .collapse-button { justify-content:center; padding-left:0; padding-right:0; }
.nav-backdrop { display:none; }
.login-body { background:#eef3f0; }
.login-shell { max-width:1080px; min-height:620px; margin:8vh auto; padding:0; display:grid; grid-template-columns:1fr 1fr; background:var(--surface); border:1px solid #e0e8e1; border-radius:18px; overflow:hidden; box-shadow:0 20px 80px #173d3110; }
.login-story { background:#153331; color:#eaf3eb; padding:46px; display:flex; flex-direction:column; align-items:flex-start; }
.login-story .brand { margin:0 0 55px; }
.login-story .demo-pill { background:#2c4b41; color:#a9d4bb; border-color:#3a5b4b; font-size:8px; }
.login-story h1 { font-size:43px; line-height:1.15; margin:24px 0; letter-spacing:-1.7px; }
.login-story>p { color:#a9c1b6; font-size:13px; line-height:1.9; }
.login-visual { display:flex; gap:12px; margin:25px 0 45px; }
.login-visual>span { width:54px; height:54px; border:1px solid #456055; border-radius:14px; display:grid; place-items:center; color:#c5e5cc; background:#28483e; }
.login-story>small { font-size:9px; color:#8eafa0; margin-top:auto; letter-spacing:.6px; }
.login-form-wrap { padding:70px 45px 40px; align-self:center; }
.login-form-wrap h2 { font-size:26px; margin:5px 0 12px; letter-spacing:-.8px; }
.login-form-wrap>.muted { font-size:12px; margin-bottom:32px; }
.login-form-wrap .form-stack { padding:0; }
.login-form-wrap .button { width:100%; margin-top:8px; padding:12px; }
.login-form-wrap .form-error { margin:0 0 20px; }
.login-help { display:flex; align-items:flex-start; gap:10px; margin:26px 0 20px; padding:14px; border:1px solid var(--line); background:var(--surface-alt); border-radius:8px; }
.login-help .icon { color:var(--accent); width:17px; margin-top:3px; }
.login-help p { font-size:10px; margin:0; color:var(--muted); overflow-wrap:anywhere; }
code { font-size:10px; }
@media(min-width:1550px) { .stat-card { padding:24px; } .chart { min-height:210px; } }
@media(max-width:1200px) {
  :root { --sidebar-width:218px; }
  .sidebar { padding-left:12px; padding-right:12px; }
  main { padding:26px 24px 16px; } .topbar { padding:0 24px; }
  .local-indicator { display:none; } .heading-actions .date-range { display:none; }
  .stat-card { padding:16px; } .stat-top { font-size:10px; } .stat-icon { width:30px; height:30px; }
  .stat-value { font-size:26px; } .stats-grid { gap:12px; }
  .allocation-layout { gap:8px; } .donut-wrap { width:125px; height:125px; }
  .brand { font-size:24px; } .brand small { font-size:6px; }
}
@media(max-width:1000px) {
  .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .two-column,.dashboard-lower { gap:15px; } .panel-heading { padding:18px; }
  .allocation-layout { flex-direction:column; } .allocation-legend { width:100%; }
  .mini-metrics { flex-wrap:wrap; } .settings-layout { grid-template-columns:1fr; }
  .panel-heading h2 { font-size:13px; } .chart-summary { padding-left:18px; }
  .topbar-right { gap:10px; } .user-caption { display:none; }
  .page-heading { align-items:flex-start; } .section-title>.small { display:none; }
}
@media(max-width:800px) {
  :root,body.nav-collapsed { --sidebar-width:244px; }
  .sidebar { transform:translateX(-100%); padding:24px 16px 15px; }
  .app-content { margin-left:0; }
  .mobile-menu { display:inline-grid; }
  .nav-open .sidebar { transform:translateX(0); }
  .nav-open { overflow:hidden; }
  .nav-open .nav-backdrop { display:block; position:fixed; inset:0; z-index:35; background:#0c222b80; border:0; width:100%; height:100%; }
  .nav-collapsed .brand-text,.nav-collapsed .nav-copy,.nav-collapsed .nav-heading,.nav-collapsed .workspace-label,.nav-collapsed .local-card { display:revert; }
  .nav-collapsed .nav-link { justify-content:flex-start; padding:9px 12px; }
  .nav-collapsed .workspace-label,.nav-collapsed .local-card { display:flex; }
  .collapse-button { display:none; }
  .topbar { height:66px; padding:0 20px; }
  .topbar-left { gap:10px; }
  .breadcrumb { font-size:10px; } .breadcrumb>span { margin:0 7px; }
  main { padding:25px 20px 12px; }
  .login-shell { margin:25px; min-height:unset; }
  .login-story { padding:30px; } .login-story h1 { font-size:34px; }
  .login-form-wrap { padding:40px 28px; }
  .login-visual { gap:8px; } .login-visual>span { width:40px; height:45px; }
}
@media(max-width:550px) {
  .topbar { padding:0 16px; } .breadcrumb { display:none; } .topbar-right { gap:10px; }
  .demo-pill { font-size:7px; } .user-caption { display:none; } .user-dropdown { right:-3px; }
  main { padding:23px 16px 12px; } h1 { font-size:27px; }
  .page-heading { flex-direction:column; gap:15px; margin-bottom:20px; }
  .page-heading p { font-size:11px; } .heading-actions { width:100%; }
  .demo-notice { align-items:flex-start; font-size:10px; padding:12px; }
  .demo-notice>.micro-demo { display:none; }
  .stats-grid,.stats-grid.three { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:22px; }
  .stats-grid.three .stat-card:last-child { grid-column:1 / -1; }
  .stat-card { padding:15px 13px; } .stat-top { font-size:10px; gap:3px; align-items:flex-start; }
  .stat-top .micro-demo { display:block; width:max-content; margin-top:3px; }
  .stat-icon { width:27px; height:27px; border-radius:7px; } .stat-icon .icon { width:15px; }
  .stat-value { font-size:27px; } .stat-card p { font-size:9px; line-height:1.6; }
  .two-column,.dashboard-lower { grid-template-columns:1fr; gap:16px; margin-bottom:16px; }
  .panel-heading { padding:18px; } .panel-heading p { font-size:10px; }
  .panel-heading h2 { font-size:14px; }
  .chart { min-height:160px; }
  .allocation-layout { flex-direction:row; gap:14px; padding:0 18px 20px; }
  .donut-wrap { width:130px; height:130px; }
  .allocation-legend { width:auto; min-width:0; font-size:9px; }
  .device-summary { padding-left:18px; } .device-strip { margin-left:18px; margin-right:18px; }
  .mini-metrics { padding-left:18px; padding-right:18px; }
  .table-tools { padding-left:18px; padding-right:18px; gap:10px; }
  .search-field { min-width:0; width:100%; }
  .table-tools>.small { display:none; }
  .table-tools select { width:100%; }
  th,td { padding:12px 18px; } .table-footer { padding:14px; flex-wrap:wrap; }
  .pagination { margin-left:auto; gap:7px; }
  .form-grid { grid-template-columns:1fr; gap:0; }
  .form-stack { padding-left:18px; padding-right:18px; }
  .form-actions { flex-wrap:wrap; }
  .simulation-banner { padding:15px; gap:10px; }
  .simulation-banner p { font-size:10px; }
  .access-card { padding:20px; }
  footer { padding:12px 16px 22px; flex-direction:column; gap:5px; }
  .login-shell { display:block; margin:15px; border-radius:13px; }
  .login-story { padding:28px; }
  .login-story .brand { margin-bottom:20px; }
  .login-story h1 { font-size:30px; margin:20px 0 10px; }
  .login-story h1 br { display:none; }
  .login-story>p,.login-visual { display:none; }
  .login-story>small { margin-top:18px; }
  .login-form-wrap { padding:32px 26px; }
}
@media(prefers-reduced-motion:no-preference) {
  .sidebar,.app-content { transition:width .18s,margin-left .18s,transform .18s; }
  .button,.nav-link { transition:background .12s; }
}

/* Preserve readable status/link contrast in the dark theme. */
[data-theme="dark"] .text-link,
[data-theme="dark"] .back-link,
[data-theme="dark"] .device-summary>span { color:#8ed4b8; }
[data-theme="dark"] .badge-online,
[data-theme="dark"] .badge-active,
[data-theme="dark"] .badge-available,
[data-theme="dark"] .badge-connected,
[data-theme="dark"] .badge-completed { color:#98d3b5; border-color:#36594b; }
[data-theme="dark"] .badge-offline,
[data-theme="dark"] .badge-pending,
[data-theme="dark"] .badge-disconnected { color:#e0bd86; border-color:#685435; }
[data-theme="dark"] .badge-full { color:#c7bce6; border-color:#564a73; }
[data-theme="dark"] .micro-demo { color:#a6ccb9; border-color:#3c5c4c; }
[data-theme="dark"] .demo-notice,
[data-theme="dark"] .demo-pill { color:#acd3bc; border-color:#3a594b; }
[data-theme="dark"] .simulation-banner { color:#e0c294; border-color:#665334; }
/* Language controls retain the existing layout and wrap on narrow screens. */
.language-switcher{display:flex;align-items:center;gap:.3rem;flex-wrap:wrap;margin:0}
.language-switcher select{width:auto;min-width:6.5rem;max-width:9rem;padding:.4rem .6rem;font:inherit;border:1px solid var(--line);border-radius:.5rem;color:inherit;background:var(--surface)}
.display-timezone{font-size:.75rem;color:var(--muted)}
@media(max-width:640px){.topbar-right{flex-wrap:wrap}.language-switcher .button{padding:.3rem}.language-switcher select{min-width:5.5rem}}

/* Longer translations wrap without truncating navigation or language controls. */
.topbar{height:auto;min-height:73px;flex-wrap:wrap;padding-top:10px;padding-bottom:10px}
.topbar-right{min-width:0;margin-left:auto;flex-wrap:wrap;justify-content:flex-end;gap:10px}
.js .language-switcher button{display:none}
.stat-value{overflow-wrap:anywhere}
@media(max-width:800px){.topbar{min-height:66px}}

/* Compact local bed controls remain inside the existing horizontally scrollable table. */
.bed-controls { display:flex; align-items:center; gap:8px; margin:0; }
.bed-controls select { width:auto; max-width:190px; min-width:120px; }
.bed-controls .button { white-space:nowrap; }

.form-stack .currency-option { flex-direction:row; align-items:center; gap:10px; }
.form-stack .currency-option input { width:auto; margin:0; }

/* Staff accommodation and rent workflow. */
.rent-profile-nav{margin-bottom:20px;flex-wrap:wrap}
.rent-profile-nav [aria-current="page"]{border-color:var(--accent);font-weight:700}
.rent-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin:12px 0}
.rent-facts dt{color:var(--muted);font-size:.85rem;margin-bottom:6px}
.rent-facts dd{margin:0;font-size:1.05rem;font-weight:600;overflow-wrap:anywhere}
.rent-advanced>summary,.rent-payment summary{cursor:pointer;font-weight:600;padding:8px 0}
.rent-advanced[open]>summary{margin-bottom:16px}
.rent-payment{padding:18px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
.rent-payment:last-child{border-bottom:0}
.rent-checkbox{display:flex!important;flex-direction:row!important;align-items:flex-start;gap:10px}
.rent-checkbox input{width:auto!important;flex-shrink:0}
@media(max-width:800px){.rent-facts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){.rent-facts{grid-template-columns:1fr}.rent-overview .panel-heading{flex-wrap:wrap;gap:12px}}

.rent-workflow>.panel{padding:22px}
.rent-workflow .panel-heading{padding:0 0 16px}
.rent-profile-nav{justify-content:flex-start}
.rent-workflow .badge{font-size:.85rem}

.rent-single-save{max-width:880px;padding:24px;gap:24px}
.rent-single-save section{display:grid;gap:16px;min-width:0}
.rent-single-save section+section{border-top:1px solid var(--line);padding-top:24px}
.rent-single-save h2{margin:0 0 6px}
.rent-single-save p{margin:0}
.rent-single-save .form-actions{justify-content:flex-start}

/* Student profiles share status-first facts and three navigation tabs. */
/* Profile cards share the local design system; semantic tones always include text/icons. */
.profile-toolbar{margin:0 0 16px;display:flex;justify-content:space-between}
.student-profile-summary{display:grid;grid-template-columns:minmax(260px,1fr) minmax(0,1.6fr);gap:20px;margin-bottom:22px;--profile-muted:#586a79}
[data-theme="dark"] .student-profile-summary{--profile-muted:#b1c0ca}
.student-profile-summary .panel{padding:24px;min-width:0;position:relative;overflow:hidden;border:1px solid var(--line);box-shadow:0 3px 14px rgba(18,43,44,.035)}
.profile-tone-good{--status-ink:#196344;--status-wash:#edf8f1;--status-line:#c6e5d3;--status-edge:#408668}
.profile-tone-attention{--status-ink:#7a5309;--status-wash:#fff6e5;--status-line:#ebd7ab;--status-edge:#c69535}
.profile-tone-danger{--status-ink:#a12c39;--status-wash:#fff0f1;--status-line:#efcbd0;--status-edge:#bf5664}
.profile-tone-neutral{--status-ink:#526575;--status-wash:#f0f4f7;--status-line:#d9e2e9;--status-edge:#91a3b0}
[data-theme="dark"] .profile-tone-good{--status-ink:#a5e3bf;--status-wash:#203c32;--status-line:#3c6250;--status-edge:#73b594}
[data-theme="dark"] .profile-tone-attention{--status-ink:#f0cf8a;--status-wash:#3c3321;--status-line:#665536;--status-edge:#d4aa5a}
[data-theme="dark"] .profile-tone-danger{--status-ink:#ffb5bf;--status-wash:#402a31;--status-line:#73424d;--status-edge:#d78493}
[data-theme="dark"] .profile-tone-neutral{--status-ink:#c2d1dc;--status-wash:#243844;--status-line:#405967;--status-edge:#6d8797}
.student-profile-summary .panel:before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:var(--status-edge)}
.profile-card-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:22px}
.profile-person,.profile-title{display:flex;align-items:center;gap:12px;min-width:0}
.profile-card-heading h2{margin:0;font-size:1.07rem;line-height:1.3;overflow-wrap:anywhere}
.profile-person h2{font-size:1.28rem;letter-spacing:-.025em}
.profile-symbol{display:grid;place-items:center;flex:none;width:42px;height:42px;border:1px solid var(--status-line);border-radius:12px;background:var(--status-wash);color:var(--status-ink)}
.profile-symbol .icon{width:23px;height:23px}
.profile-eyebrow{display:block;font-size:.72rem;font-weight:650;color:var(--profile-muted);margin-bottom:3px}
.profile-status{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:20px;padding:6px 10px;font-size:.78rem;font-weight:650;color:var(--text);line-height:1.3;max-width:100%}
.student-profile-summary .profile-status{color:var(--status-ink);background:var(--status-wash);border-color:var(--status-line)}
.profile-status .icon{width:15px;height:15px;flex:none}
.profile-home{display:flex;align-items:center;gap:10px}
.profile-home>.icon{color:var(--profile-muted);width:24px;height:24px;flex:none}
.profile-location{margin:0;font-size:1.22rem;line-height:1.4;font-weight:700;letter-spacing:-.02em;overflow-wrap:anywhere}
.profile-location span{font-size:.9rem;font-weight:500;color:var(--profile-muted);display:block;margin-top:2px}
.profile-location small{display:block;font-size:.8rem;font-weight:400;color:var(--profile-muted)}
.profile-place{font-size:.84rem;color:var(--profile-muted);margin:12px 0 18px}
.profile-place>span{padding:0 5px}
.profile-stay{padding-top:15px;border-top:1px solid var(--line);font-size:.83rem}
.profile-stay>span{display:flex;align-items:center;gap:7px;font-weight:600}
.profile-stay .icon{width:16px;height:16px;color:var(--profile-muted)}
.profile-stay p{color:var(--profile-muted);margin:7px 0 0;font-variant-numeric:tabular-nums}
.profile-period{display:flex;justify-content:space-between;gap:6px 15px;flex-wrap:wrap;font-size:.81rem;color:var(--profile-muted);margin:0 0 16px}
.profile-period>span{font-weight:550;color:var(--text);font-variant-numeric:tabular-nums}
.profile-amounts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0}
.profile-amounts>div{padding:16px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface-alt);min-width:0}
.profile-amounts>.profile-remaining{background:var(--status-wash);border-color:var(--status-line)}
.student-profile-summary dt{color:var(--profile-muted);font-size:.76rem;margin-bottom:8px}
.student-profile-summary dd{margin:0;font-weight:700;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.student-profile-summary .profile-amounts dd{font-size:clamp(.95rem,1.5vw,1.3rem);line-height:1.4;letter-spacing:-.02em}
.profile-remaining dd{color:var(--status-ink)}
.profile-dates{display:flex;flex-wrap:wrap;gap:14px 32px;margin:18px 0 0;padding-top:15px;border-top:1px solid var(--line)}
.profile-dates dt{display:flex;align-items:center;gap:6px;margin-bottom:5px}
.profile-dates .icon{width:14px;height:14px}
.student-profile-summary .profile-dates dd{font-size:.88rem}
.profile-restricted{display:flex;gap:9px;align-items:center;padding:18px 0;color:var(--profile-muted);font-size:.9rem}
.profile-restricted .icon{flex:none}
.student-profile-navigation{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 24px;padding:6px;background:var(--surface);border:1px solid var(--line);border-radius:12px}
.profile-tabs{display:flex;gap:5px;flex:1;flex-wrap:wrap;min-width:0}
.profile-tabs a{display:flex;align-items:center;justify-content:center;gap:8px;padding:12px 15px;border:1px solid transparent;border-radius:8px;color:var(--muted);font-size:.88rem;text-decoration:none;font-weight:600;line-height:1.4}
.profile-tabs a>.icon{width:18px;height:18px;flex:none}
.profile-tabs a:hover{background:var(--surface-alt);color:var(--text)}
.profile-tabs a[aria-current="page"]{color:#17664e;background:#e8f5ef;border-color:#cde4d9;box-shadow:0 1px 2px rgba(20,70,52,.05)}
[data-theme="dark"] .profile-tabs a[aria-current="page"]{color:#b4e8d1;background:#254738;border-color:#426653}
.profile-secondary{font-size:.8rem;padding:10px 12px;color:var(--muted);text-decoration:underline;text-underline-offset:3px}
.profile-note{padding:12px 16px;border:1px solid var(--line);border-radius:10px;background:var(--surface);font-size:.88rem}
.profile-directory-filter{display:flex;gap:12px;align-items:flex-end;padding:0 22px 15px;flex-wrap:wrap}
.profile-directory-filter label{display:grid;gap:6px;font-size:.85rem}
.profile-directory-filter select{padding:9px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:inherit}
.profile-status.profile-state-paid{color:#196344;background:#edf8f1;border-color:#c6e5d3}
.profile-status.profile-state-partial,.profile-status.profile-state-due{color:#7a5309;background:#fff6e5;border-color:#ebd7ab}
.profile-status.profile-state-overdue{color:#a12c39;background:#fff0f1;border-color:#efcbd0}
[data-theme="dark"] .profile-status.profile-state-paid{color:#a5e3bf;background:#203c32;border-color:#3c6250}
[data-theme="dark"] .profile-status.profile-state-partial,[data-theme="dark"] .profile-status.profile-state-due{color:#f0cf8a;background:#3c3321;border-color:#665536}
[data-theme="dark"] .profile-status.profile-state-overdue{color:#ffb5bf;background:#402a31;border-color:#73424d}
@media(max-width:1000px){.student-profile-summary{grid-template-columns:1fr 1.35fr;gap:16px}.student-profile-summary .panel{padding:20px}.profile-person h2{font-size:1.12rem}.profile-amounts>div{padding:13px 9px}}
@media(max-width:850px){.student-profile-summary{grid-template-columns:1fr}.profile-card-heading{margin-bottom:18px}.student-profile-summary .profile-amounts dd{font-size:1.25rem}.profile-secondary{padding:5px 10px 8px}.profile-tabs a{padding:11px 12px}}
@media(max-width:480px){.student-profile-summary{gap:14px}.student-profile-summary .panel{padding:19px 16px}.profile-card-heading{gap:10px}.profile-symbol{width:36px;height:36px;border-radius:10px}.profile-card-heading h2{font-size:1.02rem}.profile-person h2{font-size:1.14rem}.profile-status{font-size:.73rem}.profile-amounts{gap:6px}.profile-amounts>div{padding:12px 8px}.student-profile-summary .profile-amounts dd{font-size:1.03rem}.student-profile-summary dt{font-size:.72rem}.profile-tabs{width:100%;flex:0 0 100%;display:grid;grid-template-columns:repeat(auto-fit,minmax(68px,1fr));gap:3px}.profile-tabs a{padding:10px 5px;flex-direction:column;gap:5px;font-size:.75rem}.student-profile-navigation{gap:2px}.profile-secondary{margin-left:auto}.profile-dates{gap:12px 20px}}
@media(prefers-reduced-motion:reduce){.student-profile-summary *,.profile-tabs *,.bed-options *{scroll-behavior:auto;transition:none}}


/* A single, progressively enhanced destination selector. */
.room-move-panel{--room-muted:#586a79;overflow:visible;padding:22px!important}
.room-move-panel>h2{margin:0 0 18px;font-size:1rem}
.room-transfer-grid{display:grid;grid-template-columns:minmax(190px,.8fr) minmax(0,1.5fr);gap:24px;align-items:start}
.current-accommodation{padding:16px;border:1px solid var(--line);border-radius:10px;background:var(--surface-alt);min-width:0}
.current-accommodation-title{display:flex;align-items:center;gap:7px;font-size:.74rem;font-weight:550;color:var(--room-muted);margin-bottom:9px}
.current-accommodation-title .icon{width:17px;height:17px;flex:none}
.current-accommodation>strong{display:block;font-size:1rem;font-weight:650;overflow-wrap:anywhere}
.current-accommodation p{font-size:.79rem;margin:5px 0 0;color:var(--room-muted);overflow-wrap:anywhere}
.room-transfer-form{min-width:0;margin:0}
.room-transfer-form label{display:block;font-size:.79rem;font-weight:600;margin:0 0 7px}
.bed-autocomplete{position:relative;min-width:0}
.bed-combobox-field{position:relative;display:flex;align-items:center}
.bed-combobox-field>.icon{position:absolute;left:13px;color:var(--room-muted);width:18px;height:18px;pointer-events:none}
.bed-combobox-field input{display:block;width:100%;height:46px;min-width:0;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--text);padding:10px 38px!important;font-size:.9rem;line-height:1.4}
.bed-combobox-field input::placeholder{color:var(--room-muted);opacity:1;font-size:.83rem}
.bed-combobox-mark{position:absolute;right:12px;color:var(--room-muted);pointer-events:none;display:flex}
.bed-combobox-mark .icon{width:15px;height:15px;transform:rotate(90deg)}
.has-selection .bed-combobox-field input{border-color:#75a891}
.has-selection .bed-combobox-mark:before{content:"✓";font-size:16px;color:#26734f;font-weight:700}
.has-selection .bed-combobox-mark .icon{display:none}
.bed-combobox-field input:focus-visible{outline:3px solid #378771;outline-offset:2px}
.bed-popup{position:absolute;top:calc(100% + 6px);left:0;right:0;z-index:30;background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:0 8px 24px rgba(16,38,44,.14);padding:4px;overflow:hidden}
.bed-options{list-style:none;margin:0;padding:0;max-height:min(330px,40vh);overflow-y:auto;overscroll-behavior:contain;scroll-padding:4px}
.bed-option{position:relative;padding:9px 32px 9px 12px;min-height:54px;cursor:pointer;border:1px solid transparent;border-radius:7px;overflow-wrap:anywhere}
.bed-option+ .bed-option{margin-top:2px}
.bed-option strong{display:block;font-size:.86rem;line-height:1.4;font-weight:600}
.bed-option>span{display:block;margin-top:3px;font-size:.74rem;line-height:1.35;color:var(--room-muted)}
.bed-option>span:before{content:"";display:inline-block;width:5px;height:5px;border-radius:50%;background:#428564;margin-right:6px;vertical-align:middle}
.bed-option:hover,.bed-option.is-active{background:var(--surface-alt);border-color:#9cb8ac}
.bed-option[aria-selected="true"]{background:var(--green-bg)}
.bed-option[aria-selected="true"]:after{content:"✓";position:absolute;right:12px;top:12px;color:#26734f;font-weight:700}
.bed-no-results{margin:0;padding:17px 12px;font-size:.85rem;color:var(--room-muted)}
.bed-destination-meta{min-height:15px;margin:5px 0 0;font-size:.74rem;line-height:1.35;color:var(--room-muted)}
.room-transfer-advanced{margin:9px 0 0;font-size:.76rem;color:var(--room-muted)}
.room-transfer-advanced summary{cursor:pointer;display:list-item}
.room-transfer-advanced[open] summary{margin-bottom:12px}
.room-transfer-advanced label{font-size:.76rem;color:var(--text);margin-top:8px}
.room-transfer-advanced input,.room-transfer-form select{width:100%;padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--text);font:inherit}
.room-transfer-advanced p{font-size:.76rem;margin:7px 0}
.room-transfer-actions{display:flex;justify-content:flex-end;margin:16px 0 0;padding:0}
.room-transfer-actions .button{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:42px;padding:10px 17px;font-size:.83rem;border-radius:8px}
.room-transfer-actions .icon{width:16px;height:16px}
.room-transfer-unavailable{font-size:.85rem;color:var(--room-muted);margin:12px 0}
[data-theme="dark"] .has-selection .bed-combobox-field input{border-color:#6a9f85}
[data-theme="dark"] .has-selection .bed-combobox-mark:before,[data-theme="dark"] .bed-option[aria-selected="true"]:after{color:#a5e3bf}
[data-theme="dark"] .bed-combobox-field input:focus-visible{outline-color:#9cdec4}
[data-theme="dark"] .bed-option>span:before{background:#91c6a9}
[data-theme="dark"] .bed-option.is-active,[data-theme="dark"] .bed-option:hover{border-color:#6a9581}
@media(max-width:700px){.room-transfer-grid{grid-template-columns:1fr;gap:19px}.room-move-panel{padding:18px!important}.current-accommodation{padding:13px 14px}.room-transfer-actions .button{width:100%}.bed-options{max-height:min(300px,38vh)}}
.bed-autocomplete.opens-up .bed-popup{top:auto;bottom:calc(100% + 6px)}

[data-theme="dark"] .room-move-panel{--room-muted:#b1c0ca}
.bed-option.is-active{border-color:#4e806b}
[data-theme="dark"] .bed-option.is-active{border-color:#8cbda3}

/* Task 11: scoped location navigation, reusing the shared theme tokens. */
.building-floor { border:1px solid var(--line); border-radius:var(--radius); margin:14px 0; padding:16px; }
.building-floor>summary { cursor:pointer; padding:3px 0 14px; font-size:14px; }
.location-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:12px; }
.location-card { display:flex; flex-direction:column; align-items:flex-start; gap:7px; min-height:112px; padding:16px; border:1px solid var(--line); border-radius:10px; background:var(--surface-alt); }
.location-card:hover { border-color:var(--accent); background:var(--green-bg); }
.location-card h3 { font-size:18px; margin:0; color:var(--text); }
.location-card small { color:var(--muted); }
@media(max-width:600px) { .location-grid { grid-template-columns:1fr; } .building-floor { padding:12px; } }

.registry-info,.location-card { overflow-wrap:anywhere; }

/* Read-only room overview and current registry devices. */
.room-view-tabs { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:18px; }
.room-view-tabs>.text-link { margin-left:auto; font-size:12px; }
.room-view-filter { display:flex; align-items:flex-end; gap:14px; padding:16px; }
.room-view-filter label { flex:1; min-width:0; }
.room-floor { margin:18px 0 6px; }
.room-floor h3 { margin:0 0 12px; color:var(--muted); }
.room-card-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:12px; }
.room-overview-card { padding:16px; border:1px solid var(--line); border-top:3px solid var(--accent); border-radius:11px; background:var(--surface-alt); display:flex; flex-direction:column; gap:10px; min-width:0; }
.room-overview-card:hover { border-color:var(--accent); box-shadow:0 4px 14px #122b2c0c; }
.room-card-top { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.room-card-number { font-size:23px; font-weight:700; overflow-wrap:anywhere; }
.room-card-state { display:flex; gap:4px; align-items:center; font-size:11px; color:var(--muted); }
.room-card-state .icon { width:14px; height:14px; }
.room-card-free { font-size:14px; }
.room-overview-card>small { color:var(--muted); font-size:11px; }
.room-overview-card progress { width:100%; height:5px; accent-color:var(--accent); }
.room-tone-full { border-top-color:#d56d63; } .room-tone-full progress { accent-color:#d56d63; }
.room-tone-partial { border-top-color:#d6a454; } .room-tone-partial progress { accent-color:#d6a454; }
.room-tone-unavailable { border-top-color:var(--muted); }
.room-device-entry { display:flex; gap:10px; align-items:center; padding:13px 0; border-bottom:1px solid var(--line); min-width:0; }
.room-device-copy { flex:1; min-width:0; overflow-wrap:anywhere; }
.room-device-copy small,.room-device-value small { display:block; color:var(--muted); font-size:11px; }
.room-device-value { text-align:right; font-size:12px; max-width:50%; overflow-wrap:anywhere; }
.room-inline-devices>.button { margin-top:14px; }
@media(max-width:600px) { .room-view-filter { flex-wrap:wrap; } .room-view-filter label { flex-basis:100%; } .room-card-grid { grid-template-columns:1fr; } .room-view-tabs>.text-link { margin-left:0; } .room-device-entry { flex-wrap:wrap; } .room-device-value { max-width:100%; text-align:left; margin-left:44px; } }

.room-building .room-floor { padding:0 18px 8px; }
.room-tone-full progress::-webkit-progress-value { background:#d56d63; }
.room-tone-full progress::-moz-progress-bar { background:#d56d63; }
.room-tone-partial progress::-webkit-progress-value { background:#d6a454; }
.room-tone-partial progress::-moz-progress-bar { background:#d6a454; }
.room-inline-devices>.button { margin:0 22px 20px; }
.room-availability-line { padding:0 22px; margin-bottom:16px; }
.room-device-entry { display:grid; grid-template-columns:30px minmax(0,1fr) minmax(0,1fr) 16px; }
@media(max-width:600px) {
  .room-device-entry { grid-template-columns:30px minmax(0,1fr) 16px; }
  .room-device-value { grid-column:2; grid-row:2; margin-left:0; }
  .room-device-entry>.icon { grid-column:3; grid-row:1; }
}
/* Staff-only Requests & Issues; shared local theme tokens. */
.issue-panel { padding:20px; margin-bottom:18px; }
.issue-panel .panel-heading { padding:0 0 14px; flex-wrap:wrap; gap:10px; }
.issue-panel h2 { margin:0 0 12px; font-size:16px; }
.issue-panel .panel-heading h2 { margin:0; }
.issue-create-title { cursor:pointer; font-weight:650; }
.issue-form { display:grid; gap:14px; margin-top:16px; }
.issue-form textarea { width:100%; resize:vertical; background:var(--surface); color:var(--text); border:1px solid var(--line); border-radius:8px; padding:10px; font:inherit; }
.issue-form-grid,.issue-actions-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.issue-filter { display:flex; flex-wrap:wrap; gap:12px; align-items:end; padding-bottom:18px; }
.issue-filter label { flex:1 1 150px; min-width:0; }
.issue-form label { min-width:0; }
.issue-form select,.issue-filter select,.issue-filter input { width:100%; }
.issue-list { display:grid; }
.issue-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; padding:14px 0; border-top:1px solid var(--line); overflow-wrap:anywhere; }
.issue-row:hover strong { color:var(--accent); }
.issue-row small,.issue-history small { display:block; color:var(--muted); font-size:11px; margin-top:5px; }
.issue-row-status { text-align:right; }
.issue-state { font-size:11px; padding:4px 8px; border-radius:6px; background:var(--surface-alt); color:var(--text); white-space:nowrap; }
.issue-new,.issue-in_progress,.issue-attention { color:#ad7022; background:var(--surface-alt); }
.issue-resolved,.issue-closed { color:var(--accent); }
.issue-attention { display:inline-flex; align-items:center; gap:4px; font-size:11px; }
.issue-attention .icon { width:13px; height:13px; }
.issue-summary { display:flex; flex-wrap:wrap; gap:14px; color:var(--muted); font-size:12px; margin-bottom:14px; }
.issue-summary strong { color:var(--text); }
.issue-note { white-space:pre-wrap; overflow-wrap:anywhere; }
.issue-history { padding-left:20px; }
.issue-history li { padding:12px 0; border-top:1px solid var(--line); }
@media(max-width:700px) { .issue-actions-grid,.issue-form-grid { grid-template-columns:1fr; } .issue-row { grid-template-columns:1fr; } .issue-row-status { text-align:left; } .issue-panel { padding:16px; } }
.issue-new,.issue-in_progress,.issue-attention { color:#875514; }
[data-theme="dark"] .issue-new,[data-theme="dark"] .issue-in_progress,[data-theme="dark"] .issue-attention { color:#ecc57e; }
.issue-form label,.issue-filter label { display:grid; gap:6px; font-size:12px; }
.issue-form input { width:100%; }
.issue-form>.button { justify-self:start; }
.modbus-value { font-size:12px; overflow-wrap:anywhere; }
.modbus-value small { display:block; color:var(--muted); margin:5px 0; }
.modbus-value p { margin:6px 0; }

/* Focused student portal account settings. */
.account-access{max-width:1040px}.account-access .panel{margin-bottom:18px}.account-access .field-error{color:var(--text);font-weight:600;border-left:3px solid #c34141;padding-left:8px}.account-access [aria-invalid="true"]{border-color:#c34141}.account-password-action{display:flex;align-items:center;justify-content:space-between;gap:18px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:18px 0;margin-top:8px}.account-password-action h3,.account-password-action p{margin:0}.account-password-action p{margin-top:5px}.credential-copy{display:flex;gap:8px;align-items:center}.credential-copy input{min-width:0;letter-spacing:.12em;font-weight:700}.credentials-card{border-color:var(--accent)}.account-access details summary{cursor:pointer;font-weight:600}.account-access .form-grid{align-items:start}
@media(max-width:640px){.account-password-action{align-items:flex-start;flex-direction:column}.account-password-action .button{width:100%}.credential-copy .button{flex:none}.account-access .form-actions .primary{width:100%}}

.account-access .back-link>.icon{transform:rotate(180deg)}

.account-access .credentials-card{padding:22px}.credentials-card h2{margin:0 0 8px}.credentials-card label{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:600}.credentials-card input{width:100%;font-size:14px}.credentials-card .form-grid{align-items:end;gap:18px}.credentials-card .form-grid>div>label{margin-bottom:7px}.account-access details>summary{padding:18px 22px}
/* Request cards and activity: shared staff/student presentation, no operational state. */
.request-card{display:flex;align-items:flex-start;gap:14px;padding:17px 0;border-top:1px solid var(--line);min-width:0;color:var(--text)}
.request-category{display:inline-flex;flex:0 0 38px;width:38px;height:38px;align-items:center;justify-content:center;border-radius:12px;background:var(--surface-alt);color:var(--accent)}
.request-card-body{flex:1;min-width:0}.request-title{display:inline-block;color:var(--text);font-weight:650;font-size:14px;text-decoration:none;overflow-wrap:anywhere}.request-title:hover{color:var(--accent)}
.request-title:focus-visible,.request-card:focus-visible{outline:2px solid var(--accent);outline-offset:4px}.request-card-end{display:grid;justify-items:end;gap:10px;flex-shrink:0}
.request-meta{display:flex;align-items:center;flex-wrap:wrap;gap:6px 14px;color:var(--muted);font-size:12px;line-height:1.6;margin:5px 0;overflow-wrap:anywhere}.request-meta>span{display:inline-flex;align-items:center;gap:5px}.request-meta .icon{width:15px;height:15px}
.request-unread{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:600;color:var(--accent);margin-top:6px}.request-unread>span{width:6px;height:6px;border-radius:50%;background:currentColor}
.issue-state{display:inline-flex;align-items:center;gap:5px;font-weight:650;border-radius:20px;padding:5px 10px}.issue-state .icon{width:13px;height:13px}.issue-new{background:#fff0e8;color:#a94b13}.issue-in_progress{background:#fff5d7;color:#805800}.issue-resolved{background:#dcf5e6;color:#17623d}.issue-closed{background:var(--surface-alt);color:var(--muted)}
[data-theme="dark"] .issue-new{background:#3e281d;color:#ffc194}[data-theme="dark"] .issue-in_progress{background:#3d331b;color:#f5d475}[data-theme="dark"] .issue-resolved{background:#193c31;color:#9de3bb}
.request-detail{max-width:1000px}.request-detail-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:12px}.request-detail-heading h2{flex:1;min-width:180px;font-size:23px;letter-spacing:-.03em;line-height:1.3;overflow-wrap:anywhere;margin:0}
.request-report{background:var(--surface-alt);border-radius:12px;padding:16px 18px;margin:20px 0}.request-report p:last-child{margin-bottom:0}.request-report p:first-child{margin-top:0}.request-manage{scroll-margin-top:85px}.request-manage h3,.request-composers h3,.request-activity-heading h3{font-size:14px;margin:0}
.request-quick-form{margin-top:12px;gap:7px}.request-quick-form input{width:100%}.request-quick-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:5px}.request-quick-actions .button{flex:1;min-height:42px;justify-content:center}.button.request-resolve{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:650}.button.request-resolve:hover{background:var(--accent-hover);border-color:var(--accent-hover)}
.request-assignment .issue-form{display:flex;align-items:end;gap:10px;margin-top:18px}.request-assignment label{flex:1}.request-composers{display:grid;gap:20px;margin:22px 0;padding-top:20px;border-top:1px solid var(--line)}.request-composers .issue-form{gap:9px;margin-top:10px}.request-composers .button{justify-self:end}.request-internal summary{display:flex;gap:7px;align-items:center;cursor:pointer;color:var(--muted);font-size:13px;font-weight:600}.request-internal summary .icon{width:15px;height:15px}
.request-activity-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;border-top:1px solid var(--line);padding-top:20px;margin:24px 0 15px}.request-activity-heading h3{display:flex;align-items:center;gap:7px}
.request-timeline{list-style:none;padding:0;margin:0}.request-timeline>li{position:relative;display:grid;grid-template-columns:30px minmax(0,1fr);gap:12px;padding-bottom:22px}.request-timeline>li:not(:last-child):before{content:"";position:absolute;left:14px;top:29px;bottom:0;width:1px;background:var(--line)}.request-timeline-dot{display:flex;align-items:center;justify-content:center;width:30px;height:30px;border:1px solid var(--line);border-radius:50%;color:var(--accent);background:var(--surface)}.request-timeline-dot .icon{width:16px;height:16px}.request-timeline-heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:13px}.request-timeline .issue-state{font-size:10px;padding:3px 8px}.request-reply,.request-private{padding:10px 12px;border-radius:8px;margin-top:9px;background:var(--surface-alt)}.request-reply{border-left:3px solid var(--accent)}.request-private .icon{width:12px;height:12px}.request-private p,.request-reply p{margin:5px 0 0}.request-reference{font-size:11px;color:var(--muted);overflow-wrap:anywhere}
.request-empty{text-align:center;padding:30px 15px;color:var(--muted)}.request-empty>.icon{width:30px;height:30px;color:var(--accent)}.request-report-hero{display:flex;align-items:center;flex-wrap:wrap;gap:14px}.request-report-hero>div{flex:1;min-width:180px}.request-report-hero h2{margin:0 0 5px;font-size:17px}.request-report-hero p{margin:0;font-size:13px}.request-section-title{font-size:15px;margin:24px 0 12px}.portal-request-list .request-card{margin-bottom:0;padding:18px}.portal-request-list .request-card h2{margin:0;font-size:15px;line-height:1.4;overflow-wrap:anywhere}.portal-request-list .request-card>.icon{width:15px;margin-top:5px;color:var(--muted)}
.issue-filter{gap:10px}.issue-filter label{font-size:11px}.issue-filter input,.issue-filter select{padding:8px 10px}
@media(max-width:640px){.request-card{gap:10px;flex-wrap:wrap}.request-category{flex-basis:32px;width:32px;height:32px;border-radius:9px}.request-card-body{flex-basis:calc(100% - 50px)}.request-card-end{display:flex;align-items:center;justify-content:space-between;width:100%;padding-left:42px}.request-detail-heading h2{font-size:20px;min-width:150px}.request-detail-heading>.issue-state{margin-left:44px}.request-assignment .issue-form{flex-wrap:wrap}.request-assignment .button{width:100%}.request-report{padding:14px}.request-timeline>li{gap:9px}.portal-request-list .request-card>.issue-state{margin-left:42px}.request-report-hero>.button{width:100%;justify-content:center}}
.portal-request-list .request-card{display:flex}
.portal-main h3.request-activity-heading{justify-content:flex-start;gap:8px;font-size:14px}
/* Software entitlements only; status never represents physical equipment state. */
.entitlement-panel{padding:20px;margin-bottom:16px}.entitlement-panel .panel-heading{padding:0 0 12px}.entitlement-panel .panel-heading p{font-size:12px;color:var(--muted)}.entitlement-actions,.entitlement-actions form{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.entitlement-actions input[type=date]{max-width:160px;padding:8px}.entitlement-panel td>small{display:block;margin-top:5px}.entitlement-panel summary{cursor:pointer;font-weight:600}.entitlement-panel td strong{display:flex;align-items:center;gap:8px}.access-available{background:var(--green-bg);color:var(--text)}.access-restricted{background:var(--orange-bg);color:var(--text)}.access-unavailable{background:var(--surface-alt);color:var(--muted)}.entitlement-student-list{display:grid;gap:10px}.entitlement-student-card{display:flex;gap:12px;align-items:flex-start;padding:16px 0;border-top:1px solid var(--line)}.entitlement-student-card>div{flex:1;min-width:0}.entitlement-student-card h3{margin:0;font-size:15px;overflow-wrap:anywhere}.entitlement-student-card p{margin:5px 0}@media(max-width:640px){.entitlement-student-card{flex-wrap:wrap}.entitlement-student-card>.badge{margin-left:44px}.entitlement-panel{padding:14px}}

.entitlement-actions{min-width:260px}.entitlement-actions input[type=date]{width:140px}
@media(max-width:640px){.entitlement-panel [data-table] .table-scroll{overflow:visible}.entitlement-panel [data-table] table,.entitlement-panel [data-table] tbody{display:block;width:100%;min-width:0}.entitlement-panel [data-table] thead:not(:focus-within){position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.entitlement-panel [data-table] tr[data-row]{display:block;border:1px solid var(--line);border-radius:10px;padding:10px 12px;margin-bottom:10px}.entitlement-panel [data-table] tr[data-row][hidden]{display:none}.entitlement-panel [data-table] td{display:block;border:0;padding:7px 0;white-space:normal;max-width:100%;overflow-wrap:anywhere}.entitlement-panel [data-table] td[data-label]:before{display:block;content:attr(data-label);font-size:11px;color:var(--muted);margin-bottom:5px}.entitlement-actions{min-width:0;max-width:100%}.entitlement-panel td strong{align-items:flex-start}.entitlement-panel td strong .icon{flex-shrink:0}}

.master-shell { max-width:1100px; margin:auto; padding:clamp(1rem,4vw,3rem); }
.master-shell > .panel-heading .brand { color:var(--text); margin:0; }
.mfa-panel { max-width:42rem; margin-inline:auto; }
.mfa-panel code { overflow-wrap:anywhere; }
.mfa-panel form { display:grid; gap:1rem; margin-block:1rem; }
.mfa-panel input { max-width:100%; }
