/* Login V2: gate dan UI sesi saja. Tidak mengubah ilustrasi bed/rail/audio. */
#authGate{min-height:100vh;display:grid;place-items:center;padding:24px;background:#f6f9fb;color:#17384c;font-family:Inter,"Segoe UI",Arial,sans-serif}
.auth-gate-card{width:min(100%,450px);padding:30px;border:1px solid #dce9e4;border-radius:20px;background:#fff;box-shadow:0 12px 30px #17384c0c}
.auth-gate-card h1{font-size:25px;line-height:1.3;margin:0 0 12px}
.auth-gate-card p{font-size:14px;line-height:1.75;margin:0 0 22px}
.auth-gate-links{display:flex;gap:15px;flex-wrap:wrap}
.auth-gate-links a{padding:10px 15px;border:1px solid #c7e3d9;border-radius:9px;text-decoration:none;color:#087f78;font-weight:600}
.auth-remember{display:flex;align-items:center;gap:9px;font-size:12px;color:#536d7c;margin:2px 0 18px;cursor:pointer}
.auth-remember input{width:17px;height:17px;accent-color:#0f9f8d}
.auth-login-note{margin:0 0 22px;padding:12px 14px;border-radius:10px;border:1px solid #d8e9df;background:#f0f8f3;color:#365d53;font-size:12px;line-height:1.7}
.form-feedback[data-kind="info"]{color:#087f78}
.session-logout{border:0;background:transparent;width:100%;text-align:left;cursor:pointer}
.session-logout:hover{background:#f3f7fc}
.session-tag{font-size:12px;color:#536d7c}
.auth-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
html[data-auth-required] [data-admin-only][hidden]{display:none!important}

/* Security hardening V1: auth gate dipindahkan dari inline <style> agar CSP tidak memerlukan unsafe-inline. */
html[data-auth-required]:not([data-auth-state="ready"]) body > :not(#authGate){display:none!important}
html[data-auth-state="ready"] #authGate{display:none!important}

/* ================================================================
   RSCM IoMT — Instant Dashboard Shell A v1.0 (Auth Gate UI only)
   Pre-authorization: always show PUBLIC, INERT visual placeholders.
   NEVER expose protected DOM, clinical states or patient data before
   verified Firebase Auth + server profile. Existing critical CSS,
   requireNakesAccess(), realtime subscriptions and alarm stay intact.
   ================================================================ */
html[data-auth-required]:is([data-auth-state="checking"],[data-auth-state="ready"][data-control-bootstrap="loading"]) #authGate.rscm-dashboard-auth-gate {
  display:block;
  min-height:100svh;
  width:100%;
  padding:0;
  place-items:normal;
  background:#fff;
  color:#17384c;
}
html[data-auth-required]:is([data-auth-state="checking"],[data-auth-state="ready"][data-control-bootstrap="loading"]) #authGate .rscm-instant-shell {
  display:block;
  width:100%;
  min-width:0;
}
html[data-auth-required]:is([data-auth-state="checking"],[data-auth-state="ready"][data-control-bootstrap="loading"]) #authGate .rscm-instant-error {
  display:none !important;
}
html[data-auth-required][data-auth-state="error"] #authGate .rscm-instant-shell {
  display:none !important;
}
html[data-auth-required][data-auth-state="error"] #authGate .rscm-instant-error {
  display:block;
}
#authGate.rscm-dashboard-auth-gate .rscm-instant-shell,
#authGate.rscm-dashboard-auth-gate .rscm-instant-shell * {
  box-sizing:border-box;
}
#authGate .rscm-instant-sidebar {
  position:fixed;
  inset:12px auto 12px 12px;
  display:flex;
  flex-direction:column;
  width:clamp(256px,18vw,290px);
  padding:24px 16px 16px;
  overflow:hidden;
  border:1px solid #e1eaf1;
  border-radius:18px;
  background:#fff;
  box-shadow:2px 2px 5px rgba(49,82,112,.04),7px 10px 19px rgba(58,96,128,.10),16px 21px 37px rgba(85,121,154,.10),inset 0 1px 0 #fff;
}
#authGate .rscm-instant-brand {display:flex;align-items:center;gap:6px;min-height:48px;margin:0 -6px 25px;}
#authGate .rscm-instant-product {display:flex;align-items:center;gap:5px;min-width:0;flex:1 1 auto;}
#authGate .rscm-instant-product > img {width:37px;height:37px;flex:0 0 37px;object-fit:contain;}
#authGate .rscm-instant-brand-text {display:flex;flex-direction:column;min-width:0;gap:2px;}
#authGate .rscm-instant-brand-text strong {display:flex;align-items:center;gap:3px;font-size:14px;font-weight:800;line-height:1;color:#17384c;white-space:nowrap;}
#authGate .rscm-instant-brand-text em {color:#0b8b85;font-style:normal;}
#authGate .rscm-instant-brand-divider {height:13px;width:1px;background:#ccd8df;}
#authGate .rscm-instant-brand-text small {font-size:5.6px;font-weight:700;letter-spacing:.075em;color:#728793;white-space:nowrap;}
#authGate .rscm-instant-logo-divider {height:31px;width:1px;flex:0 0 1px;background:#cad3d9;}
#authGate .rscm-instant-institution {display:flex;align-items:flex-start;flex-direction:column;justify-content:center;flex:0 1 112px;max-width:112px;min-width:0;gap:2px;}
#authGate .rscm-instant-institution small {font-size:8px;font-weight:800;color:#617b8a;line-height:1.1;}
#authGate .rscm-instant-institution img {display:block;width:100%;max-height:35px;object-fit:contain;object-position:left center;}
#authGate .rscm-instant-nav-title {color:#728a88;font-size:10px;font-weight:800;letter-spacing:.12em;margin:1px 13px 13px;}
#authGate .rscm-instant-nav {display:flex;flex-direction:column;gap:7px;}
#authGate .rscm-instant-nav-item {display:flex;align-items:center;gap:11px;min-height:43px;width:100%;padding:10px 12px;border:1px solid #dfe8ee;border-radius:12px;background:#fff;color:#385b6e;box-shadow:3px 5px 12px rgba(83,112,143,.075),inset 0 1px 0 #fff;font-size:12px;font-weight:650;white-space:nowrap;}
#authGate .rscm-instant-nav-item i {display:grid;place-items:center;width:20px;height:20px;flex:0 0 20px;color:#0b8b85;font-size:17px;font-family:"RSCM Sidebar Classic Solid","Font Awesome 7 Pro",sans-serif;font-weight:900;font-style:normal;}
#authGate .rscm-instant-nav-item.is-current {color:#fff;border-color:#6bbfb4;background:linear-gradient(180deg,#1aa69e,#0b8b85 70%,#087b76);box-shadow:0 5px 10px rgba(2,72,68,.16),inset 0 1px 0 rgba(255,255,255,.32);}
#authGate .rscm-instant-nav-item.is-current i {color:#fff;}
#authGate .rscm-instant-sidebar-bottom {display:flex;flex-direction:column;gap:8px;margin-top:auto;padding-top:16px;border-top:1px solid #e2e9e5;}
#authGate .rscm-instant-copyright {color:#8299a8;font-size:9px;line-height:1.45;text-align:center;margin-top:13px;}
#authGate .rscm-instant-workspace {min-width:0;min-height:100svh;margin-left:calc(clamp(256px,18vw,290px) + 24px);padding:12px 12px 24px;}
#authGate .rscm-instant-topbar {display:flex;align-items:center;justify-content:space-between;gap:22px;min-height:89px;padding:16px clamp(15px,2.2vw,30px);border:1px solid #e1eaf1;border-radius:18px;background:#fff;box-shadow:0 2px 5px rgba(52,86,116,.045),0 9px 18px rgba(57,93,125,.095),0 19px 34px rgba(82,117,148,.10),inset 0 1px 0 #fff;}
#authGate .rscm-instant-topbar-start {display:flex;align-items:center;gap:10px;min-width:0;}
#authGate .rscm-instant-topbar-start > div {display:flex;flex-direction:column;min-width:0;gap:4px;}
#authGate .rscm-instant-topbar-start strong {color:#087b76;font-size:21px;font-weight:800;line-height:1.2;}
#authGate .rscm-instant-topbar-start small {color:#6d8395;font-size:12px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#authGate .rscm-instant-topbar-end {display:flex;align-items:center;gap:9px;flex:0 0 auto;}
#authGate .rscm-instant-connect-dot {width:7px;height:7px;border-radius:50%;background:#a8bdc2;}
#authGate .rscm-instant-connection-text {font-size:11px;font-weight:700;color:#7a929f;}
#authGate .rscm-instant-account {display:flex;align-items:center;gap:10px;padding:6px 9px 6px 12px;min-height:46px;margin-left:15px;border:1px solid #e8eef3;border-radius:12px;box-shadow:4px 6px 14px rgba(82,112,146,.08);}
#authGate .rscm-instant-avatar {width:33px;height:33px;flex:0 0 33px;border-radius:50%;background:#e7f3ef;border:2px solid #f7fbfa;}
#authGate .rscm-instant-menu-icon {display:none;}
#authGate .rscm-instant-content {max-width:1540px;margin:0 auto;padding:23px clamp(16px,2.2vw,34px) 0;}
#authGate .rscm-instant-panel,
#authGate .rscm-instant-stat {background:#fff;border:1px solid #e3ebf1;border-radius:18px;box-shadow:0 3px 7px rgba(52,86,116,.04),0 10px 22px rgba(82,117,148,.07),inset 0 1px 0 #fff;}
#authGate .rscm-instant-shimmer {display:block;flex-shrink:0;height:11px;border-radius:999px;background:linear-gradient(105deg,#e8efef 0%,#e8efef 32%,#f5f8f8 47%,#e8efef 64%,#e8efef 100%);background-size:230% 100%;animation:rscm-instant-wave 2s ease-in-out infinite;}
@keyframes rscm-instant-wave {0%{background-position:180% 0}100%{background-position:-90% 0}}
#authGate .rscm-instant-stats {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px;margin-bottom:19px;}
#authGate .rscm-instant-stat {position:relative;display:flex;align-items:flex-start;justify-content:space-between;gap:8px;min-height:112px;padding:18px 17px 28px;}
#authGate .rscm-instant-stat-copy {display:flex;flex-direction:column;gap:10px;min-width:0;flex:1 1 auto;}
#authGate .rscm-instant-stat-copy > span:first-child {font-size:12px;color:#617a8b;font-weight:700;line-height:1.35;}
#authGate .rscm-instant-number {height:24px;}
#authGate .rscm-instant-stat-symbol {width:38px;height:38px;flex:0 0 38px;border-radius:11px;background:#edf7f4;}
#authGate .rscm-instant-stat-foot {position:absolute;bottom:10px;left:17px;height:7px;}
#authGate .rscm-instant-overview {display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:18px;align-items:stretch;}
#authGate .rscm-instant-panel {padding:18px;min-width:0;}
#authGate .rscm-instant-section-head {display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:18px;}
#authGate .rscm-instant-section-head > strong {font-size:16px;font-weight:800;color:#17384c;}
#authGate .rscm-instant-selector {height:31px;border-radius:9px;}
#authGate .rscm-instant-two-cols {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
#authGate .rscm-instant-info {display:flex;flex-direction:column;gap:12px;padding:15px 13px;border:1px solid #e3ebee;border-radius:12px;min-width:0;}
#authGate .rscm-instant-info > small {font-size:10px;color:#708899;font-weight:800;letter-spacing:.04em;}
#authGate .rscm-instant-bed-visual {position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:13px;min-height:226px;margin:15px 0;padding:32px 20px;overflow:hidden;border:1px solid #e9eff1;border-radius:13px;background:#fbfdfd;}
#authGate .rscm-instant-visual-halo {position:absolute;width:205px;height:125px;border-radius:50%;background:radial-gradient(ellipse at center,#eaf4f1 0%,transparent 70%);}
#authGate .rscm-instant-bed-visual-core {z-index:1;height:59px;border-radius:15px;transform:skew(-20deg);opacity:.55;}
#authGate .rscm-instant-bed-visual-base {z-index:1;height:13px;opacity:.75;}
#authGate .rscm-instant-rail-placeholders {margin-top:14px;}
#authGate .rscm-instant-rail-placeholders > div {display:flex;flex-direction:column;gap:9px;padding:12px;border:1px solid #e6eef0;border-radius:10px;}
#authGate .rscm-instant-rail-placeholders small {font-size:11px;color:#698292;font-weight:700;}
#authGate .rscm-instant-rail-placeholders .rscm-instant-shimmer {height:26px;border-radius:7px;}
#authGate .rscm-instant-filter-placeholders {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-bottom:14px;}
#authGate .rscm-instant-filter-placeholders .rscm-instant-shimmer {height:34px;border-radius:9px;}
#authGate .rscm-instant-directory-list {display:flex;flex-direction:column;gap:8px;max-height:490px;overflow:hidden;}
#authGate .rscm-instant-bed-row {display:flex;flex-direction:column;gap:11px;min-height:89px;padding:13px;border:1px solid #e6edf0;border-radius:11px;}
#authGate .rscm-instant-bed-row-top {display:flex;align-items:center;justify-content:space-between;}
#authGate .rscm-instant-bed-row-rails {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;}
#authGate .rscm-instant-bed-row-rails .rscm-instant-shimmer {height:19px;border-radius:6px;}
#authGate .rscm-instant-monitor-toolbar {display:flex;justify-content:space-between;align-items:center;min-height:74px;margin-bottom:16px;}
#authGate .rscm-instant-monitor-filters {max-width:560px;margin-bottom:16px;gap:9px;}
#authGate .rscm-instant-monitor-filters .rscm-instant-shimmer {height:38px;}
#authGate .rscm-instant-monitor-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px;}
#authGate .rscm-instant-monitor-card {padding:14px;}
#authGate .rscm-instant-monitor-card .rscm-instant-info {padding:11px 9px;gap:9px;}
#authGate .rscm-instant-monitor-card .rscm-instant-info small {font-size:8px;}
#authGate .rscm-instant-monitor-visual {display:flex;justify-content:center;align-items:center;min-height:130px;margin-top:10px;background:#fafdfc;border-radius:10px;}
#authGate .rscm-instant-monitor-visual .rscm-instant-shimmer {height:45px;}
#authGate .rscm-instant-inventory {padding:0;overflow:hidden;}
#authGate .rscm-instant-inventory > .rscm-instant-section-head {margin:0;padding:19px 20px;}
#authGate .rscm-instant-inventory-scroll {overflow:hidden;}
#authGate .rscm-instant-inventory-inner {min-width:720px;}
#authGate .rscm-instant-inventory-header,
#authGate .rscm-instant-inventory-row {display:grid;grid-template-columns:1.3fr .8fr 1.2fr .9fr .9fr;gap:14px;align-items:center;padding:15px 20px;}
#authGate .rscm-instant-inventory-header {background:linear-gradient(180deg,#46b6ad,#218b85);color:#fff;font-size:12px;font-weight:800;}
#authGate .rscm-instant-inventory-row {min-height:60px;border-bottom:1px solid #edf1f4;}
#authGate .rscm-instant-noscript {padding:16px;margin:12px 24px;border:1px solid #e9cac5;border-radius:12px;background:#fff6f4;color:#96413a;}
@media(min-width:1021px) and (max-width:1250px) {
  #authGate .rscm-instant-sidebar {width:191px;padding:19px 10px;}
  #authGate .rscm-instant-workspace {margin-left:215px;}
  #authGate .rscm-instant-brand {gap:3px;}
  #authGate .rscm-instant-product > img {width:26px;height:26px;flex-basis:26px;}
  #authGate .rscm-instant-brand-text strong {font-size:10px;}
  #authGate .rscm-instant-brand-text small {font-size:3.8px;}
  #authGate .rscm-instant-institution {flex-basis:75px;max-width:75px;}
  #authGate .rscm-instant-institution small {font-size:6px;}
  #authGate .rscm-instant-nav-item {font-size:10.5px;padding:10px 8px;gap:7px;}
  #authGate .rscm-instant-stats {gap:11px;}
  #authGate .rscm-instant-stat {padding:15px 11px 28px;}
}
@media(min-width:761px) and (max-width:1020px) {
  #authGate .rscm-instant-sidebar {width:172px;padding:18px 7px;}
  #authGate .rscm-instant-workspace {margin-left:196px;}
  #authGate .rscm-instant-institution {display:none;}
  #authGate .rscm-instant-logo-divider {display:none;}
  #authGate .rscm-instant-stats {grid-template-columns:repeat(2,minmax(0,1fr));}
  #authGate .rscm-instant-overview {grid-template-columns:1fr;}
  #authGate .rscm-instant-monitor-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
  #authGate .rscm-instant-topbar-start small {max-width:320px;}
  #authGate .rscm-instant-nav-item {font-size:10px;gap:5px;padding-inline:7px;}
}
@media(max-width:760px) {
  #authGate .rscm-instant-sidebar {display:none;}
  #authGate .rscm-instant-workspace {margin:0;padding:0 0 20px;}
  #authGate .rscm-instant-topbar {min-height:73px;border-radius:0;border-top:0;border-left:0;border-right:0;padding:12px 16px;box-shadow:0 4px 13px rgba(52,86,116,.045);}
  #authGate .rscm-instant-menu-icon {display:grid;place-items:center;width:34px;height:34px;flex:0 0 34px;border:1px solid #e4eded;border-radius:9px;color:#2f857b;}
  #authGate .rscm-instant-topbar-start strong {font-size:17px;}
  #authGate .rscm-instant-topbar-start small {display:none;}
  #authGate .rscm-instant-connection-text {font-size:10px;}
  #authGate .rscm-instant-content {padding:19px 16px 0;}
  #authGate .rscm-instant-stats {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
  #authGate .rscm-instant-stat {min-height:105px;padding:14px 12px 24px;}
  #authGate .rscm-instant-overview {grid-template-columns:1fr;}
  #authGate .rscm-instant-monitor-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
}
@media(max-width:520px) {
  #authGate .rscm-instant-topbar {gap:8px;}
  #authGate .rscm-instant-account {margin-left:0;padding:5px;min-height:35px;}
  #authGate .rscm-instant-account .rscm-instant-shimmer {display:none;}
  #authGate .rscm-instant-avatar {width:28px;height:28px;flex-basis:28px;}
  #authGate .rscm-instant-topbar-start strong {font-size:15px;}
  #authGate .rscm-instant-connection-text {display:none;}
  #authGate .rscm-instant-stat-copy > span:first-child {font-size:10px;}
  #authGate .rscm-instant-stat-symbol {width:30px;height:30px;flex-basis:30px;}
  #authGate .rscm-instant-panel {padding:13px;}
  #authGate .rscm-instant-monitor-grid {grid-template-columns:1fr;}
  #authGate .rscm-instant-inventory {padding:0;}
}
@media(prefers-reduced-motion:reduce) {
  #authGate .rscm-instant-shimmer {animation:none;background:#e8efef;}
}


/* ================================================================
   RSCM IoMT — Instant Dashboard Shell A V2 / four protected pages
   Based on the byte-verified, user-approved Opsi A V1 auth.css.
   This ADDITIVE CSS applies ONLY to the inert #authGate placeholder.
   Do not modify Auth Guard, patient/controller rendering or sensor CSS.
   ================================================================ */
#authGate .rscm-instant-three-stats {grid-template-columns:repeat(3,minmax(0,1fr));}
#authGate .rscm-instant-form-section {padding:19px 20px;margin-top:13px;border:1px solid #e3ebf1;border-radius:13px;background:#fff;}
#authGate .rscm-instant-form-heading {display:flex;align-items:center;gap:11px;padding-bottom:13px;border-bottom:1px solid #e8eff2;}
#authGate .rscm-instant-form-heading > strong {font-size:14px;line-height:1.35;font-weight:800;color:#24475a;}
#authGate .rscm-instant-form-mark {display:grid;place-items:center;width:28px;height:28px;flex:0 0 28px;border-radius:8px;background:#eaf7f3;color:#087b76;font-size:11px;font-weight:800;}
#authGate .rscm-instant-form-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:17px;row-gap:16px;margin-top:17px;}
#authGate .rscm-instant-form-field {display:flex;flex-direction:column;gap:8px;min-width:0;color:#526f81;font-size:12px;font-weight:700;}
#authGate .rscm-instant-form-field > .rscm-instant-input {width:100%;height:43px;border-radius:10px;}
#authGate .rscm-instant-full-span {grid-column:1/-1;}
#authGate .rscm-instant-risk-placeholders {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;}
#authGate .rscm-instant-risk-placeholder {display:flex;flex-direction:column;gap:11px;min-width:0;padding:14px;border:1px solid #e7eff1;border-radius:10px;}
#authGate .rscm-instant-risk-placeholder > .rscm-instant-shimmer:nth-child(n+2) {border-radius:8px;}
#authGate .rscm-instant-notes > .rscm-instant-input {height:76px;}
#authGate .rscm-instant-form-footer {display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:19px 0 2px;}
#authGate .rscm-instant-form-footer > .rscm-instant-shimmer {border-radius:10px;}
#authGate .rscm-instant-registration > .rscm-instant-section-head {margin-bottom:18px;}
#authGate .rscm-instant-table-panel {overflow:hidden;padding:0;}
#authGate .rscm-instant-table-intro {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px 24px 14px;}
#authGate .rscm-instant-table-intro > div {display:flex;flex-direction:column;gap:11px;min-width:0;}
#authGate .rscm-instant-table-intro strong {color:#17384c;font-size:17px;font-weight:800;}
#authGate .rscm-instant-table-intro > .rscm-instant-shimmer {border-radius:10px;}
#authGate .rscm-instant-table-filters {display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:5px 24px 19px;}
#authGate .rscm-instant-table-filters .rscm-instant-shimmer {border-radius:10px;}
#authGate .rscm-instant-table-scroll {width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:thin;}
#authGate .rscm-instant-table-inner {min-width:860px;}
#authGate .rscm-instant-patient-management .rscm-instant-table-inner {min-width:1080px;}
#authGate .rscm-instant-table-header,
#authGate .rscm-instant-table-row {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));align-items:center;gap:13px;padding:15px 18px;}
#authGate .rscm-instant-patient-management .rscm-instant-table-header,
#authGate .rscm-instant-patient-management .rscm-instant-table-row {grid-template-columns:1.1fr 1.15fr 1fr 1.2fr 1.4fr 1.1fr .65fr .75fr;}
#authGate .rscm-instant-table-header {background:linear-gradient(180deg,#46b6ad,#218b85);color:#fff;font-size:11px;font-weight:750;}
#authGate .rscm-instant-table-header > span {min-width:0;line-height:1.35;}
#authGate .rscm-instant-table-row {min-height:63px;border-bottom:1px solid #edf1f4;}
#authGate .rscm-instant-table-row > .rscm-instant-shimmer {max-width:100%;}
#authGate .rscm-instant-table-bottom {padding:15px 23px;}
#authGate .rscm-instant-admin-secondary {margin-top:18px;}
#authGate .rscm-instant-admin-blocks {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;}
#authGate .rscm-instant-admin-blocks > div {display:flex;flex-direction:column;gap:14px;padding:16px;border:1px solid #e7eef1;border-radius:11px;}
#authGate .rscm-instant-admin-blocks .rscm-instant-shimmer:not(:first-child) {border-radius:9px;}
#authGate .rscm-instant-profile-grid {display:grid;grid-template-columns:minmax(240px,320px) minmax(0,1fr);gap:19px;align-items:start;}
#authGate .rscm-instant-profile-photo {display:flex;flex-direction:column;align-items:center;gap:13px;min-height:365px;padding:27px 19px;}
#authGate .rscm-instant-profile-photo > strong {color:#17384c;font-size:19px;font-weight:800;}
#authGate .rscm-instant-profile-portrait {width:150px;height:150px;border-radius:50%;background:linear-gradient(115deg,#e6f1ee,#f4f8f6,#e6f1ee);border:6px solid #fff;box-shadow:0 0 0 1px #e1eaf1,0 9px 17px rgba(53,95,101,.08);}
#authGate .rscm-instant-profile-photo-actions {display:flex;align-items:center;justify-content:center;gap:8px;width:100%;margin-top:4px;}
#authGate .rscm-instant-profile-photo-actions .rscm-instant-shimmer {border-radius:10px;}
#authGate .rscm-instant-profile-form {padding:25px 26px;}
#authGate .rscm-instant-profile-form .rscm-instant-form-fields {margin-top:19px;}
#authGate .rscm-instant-profile-account-info {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:22px;}
#authGate .rscm-instant-profile-account-info > div {display:flex;flex-direction:column;gap:12px;min-width:0;padding:14px;border:1px solid #e4ebf1;border-radius:11px;background:#fff;color:#72899a;font-size:11px;font-weight:700;}
@media (max-width:1020px) {
  #authGate .rscm-instant-three-stats {gap:11px;}
  #authGate .rscm-instant-profile-grid {grid-template-columns:minmax(205px,250px) minmax(0,1fr);gap:14px;}
  #authGate .rscm-instant-profile-form {padding:20px;}
  #authGate .rscm-instant-profile-account-info {grid-template-columns:1fr;}
}
@media (max-width:760px) {
  #authGate .rscm-instant-three-stats {grid-template-columns:1fr;gap:10px;}
  #authGate .rscm-instant-three-stats .rscm-instant-stat {min-height:88px;}
  #authGate .rscm-instant-profile-grid {grid-template-columns:1fr;gap:14px;}
  #authGate .rscm-instant-profile-photo {min-height:315px;}
  #authGate .rscm-instant-table-intro {padding:18px 16px 13px;}
  #authGate .rscm-instant-table-filters {padding:5px 16px 15px;}
  #authGate .rscm-instant-form-section {padding:14px 13px;}
  #authGate .rscm-instant-risk-placeholders {grid-template-columns:1fr;}
}
@media (max-width:520px) {
  #authGate .rscm-instant-form-fields {grid-template-columns:1fr;row-gap:13px;}
  #authGate .rscm-instant-registration > .rscm-instant-section-head {align-items:flex-start;}
  #authGate .rscm-instant-registration .rscm-instant-section-head > strong {font-size:15px;}
  #authGate .rscm-instant-table-intro > .rscm-instant-shimmer {width:68px!important;}
  #authGate .rscm-instant-table-filters {gap:7px;}
  #authGate .rscm-instant-table-filters .rscm-instant-shimmer {max-width:47%;}
  #authGate .rscm-instant-admin-blocks {grid-template-columns:1fr;}
  #authGate .rscm-instant-profile-portrait {width:132px;height:132px;}
  #authGate .rscm-instant-profile-form {padding:18px 15px;}
  #authGate .rscm-instant-profile-account-info {grid-template-columns:1fr;}
  #authGate .rscm-instant-profile-photo-actions {flex-wrap:wrap;}
}
 
/* ===========================================================================
   RSCM IoMT V1.1 — INSTANT CONTROL PANEL NAV, SAME FRAME / ZERO LAYOUT JUMP
   Only UI: static checking shell and inert API-permission placeholders.
   Firebase Auth, RBAC, server capabilities, all original controller actions,
   IoMT sensor / audio / clinical data remain unchanged and fail-closed.
   =========================================================================== */
/* The original Control Panel main is a centered .container (80px gutters),
   not the general Dashboard shell's full-width content. Match its geometry. */
html:is([data-auth-state="checking"],[data-auth-state="ready"][data-control-bootstrap="loading"]) body.control-page #authGate.rscm-dashboard-auth-gate .rscm-instant-content.rscm-instant-control-menu {
  width:calc(100% - 56px);
  max-width:1540px;
  padding:17px clamp(22px,2.2vw,35px) 0;
}
#authGate .rscm-instant-permission-placeholder .rscm-instant-shimmer {max-width:100%;height:11px;}
/* Exactly the same nav frame as the real .control-workspace-nav-track.
   No links/buttons are created before Firebase/server verification. */
html:is([data-auth-state="checking"],[data-auth-state="ready"][data-control-bootstrap="loading"]) body.control-page #authGate.rscm-dashboard-auth-gate .rscm-instant-control-nav {
  display:flex;
  align-items:stretch;
  gap:12px;
  width:100%;
  min-width:0;
  max-width:100%;
  margin:0 0 16px;
  padding:3px 3px 10px;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
  scrollbar-color:#c4d8d5 transparent;
  overscroll-behavior-x:contain;
}
html:is([data-auth-state="checking"],[data-auth-state="ready"][data-control-bootstrap="loading"]) body.control-page #authGate.rscm-dashboard-auth-gate .rscm-instant-control-nav > span.rscm-instant-control-card,
body.control-page #controlWorkspaceNav .control-workspace-pending-card {
  display:flex;
  position:relative;
  align-items:center;
  box-sizing:border-box;
  flex:1 0 190px;
  min-width:190px;
  min-height:96px;
  gap:13px;
  padding:18px 16px;
  border:1px solid #e2eaf0;
  border-radius:17px;
  background:#fff;
  color:#17384c;
  box-shadow:0 3px 7px rgba(52,86,116,.04),0 9px 19px rgba(58,96,128,.085),0 16px 28px rgba(85,121,154,.065),inset 0 1px 0 #fff;
  cursor:default;
  pointer-events:none;
}
#authGate .rscm-instant-control-card-icon,
body.control-page #controlWorkspaceNav .control-workspace-pending-card-icon {
  display:grid;
  place-items:center;
  flex:0 0 41px;
  width:41px;
  height:41px;
  border:1px solid #d5eae5;
  border-radius:12px;
  background:#e8f6f1;
  color:#16887d;
  font-size:19px;
}
html:is([data-auth-state="checking"],[data-auth-state="ready"][data-control-bootstrap="loading"]) body.control-page #authGate.rscm-dashboard-auth-gate .rscm-instant-control-nav .rscm-instant-control-card-icon > i,
body.control-page #controlWorkspaceNav .control-workspace-pending-card-icon > i {
  display:inline-block;
  width:auto;
  height:auto;
  min-width:0;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:inherit;
  font-size:inherit;
  box-shadow:none;
}
#authGate .rscm-instant-control-card-copy,
body.control-page #controlWorkspaceNav .control-workspace-pending-card-copy {
  display:flex;
  flex:1 1 auto;
  flex-direction:column;
  gap:5px;
  min-width:0;
}
html:is([data-auth-state="checking"],[data-auth-state="ready"][data-control-bootstrap="loading"]) body.control-page #authGate.rscm-dashboard-auth-gate .rscm-instant-control-nav .rscm-instant-control-card-copy > strong,
body.control-page #controlWorkspaceNav .control-workspace-pending-card-copy > strong {
  display:block;
  font-size:13px;
  line-height:1.32;
  font-weight:800;
  color:#17384c;
  white-space:normal;
}
#authGate .rscm-instant-control-card-copy > small,
body.control-page #controlWorkspaceNav .control-workspace-pending-card-copy > small {
  display:block;
  font-size:10.5px;
  line-height:1.4;
  font-weight:550;
  color:#71879a;
  white-space:normal;
}
#authGate .rscm-instant-control-card-chevron,
body.control-page #controlWorkspaceNav .control-workspace-pending-card-chevron {
  flex:0 0 auto;
  margin-left:auto;
  color:#87a0a4;
  font-size:12px;
}
/* Earlier control-panel.css V1 styled EVERY <i> in the preview as a box.
   The chevron must remain the same simple glyph as in the live menu. */
html:is([data-auth-state="checking"],[data-auth-state="ready"][data-control-bootstrap="loading"]) body.control-page #authGate.rscm-dashboard-auth-gate .rscm-instant-control-nav > .rscm-instant-control-card > i.rscm-instant-control-card-chevron {
  display:inline-block;
  flex:0 0 auto;
  width:auto;
  min-width:0;
  height:auto;
  min-height:0;
  margin-left:auto;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  color:#87a0a4;
  font-size:12px;
  font-weight:900;
}
/* Align the neutral connection strip with the actual #reconnectApi row. */
html:is([data-auth-state="checking"],[data-auth-state="ready"][data-control-bootstrap="loading"]) body.control-page #authGate.rscm-dashboard-auth-gate .rscm-instant-control-connection {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  box-sizing:border-box;
  min-height:66px;
  margin:0 0 19px;
  padding:14px 20px;
  border:1px solid #e1eaf1;
  border-radius:18px;
  background:#fff;
  box-shadow:8px 12px 28px rgba(82,112,146,.12),-7px -7px 23px rgba(255,255,255,.98),0 2px 5px rgba(81,110,140,.035),inset 0 1px 0 #fff;
}
#authGate .rscm-instant-control-connection > .rscm-instant-shimmer {max-width:65%;}
/* Second-stage bridge: Firebase verified, backend capability check ongoing.
   Reserve all four card positions without revealing/activating admin buttons.
   Native CSS :has responds synchronously to the existing API status badge;
   no change to the real administration controller or its hidden attributes. */
body.control-page #controlWorkspaceNav .control-workspace-pending-track {display:none;}
html[data-auth-state="ready"] body.control-page.control-workspace-enabled:has(#controlPanelStage.pill-neutral) #controlWorkspaceNav .control-workspace-nav-track {
  display:none!important;
}
html[data-auth-state="ready"] body.control-page.control-workspace-enabled:has(#controlPanelStage.pill-neutral) #controlWorkspaceNav .control-workspace-pending-track {
  display:flex;
  align-items:stretch;
  gap:12px;
  width:100%;
  max-width:100%;
  min-width:0;
  margin:0;
  padding:3px 3px 10px;
  overflow-x:auto;
  overflow-y:hidden;
  overscroll-behavior-x:contain;
  scrollbar-width:thin;
  scrollbar-color:#c4d8d5 transparent;
}
@media(min-width:761px) and (max-width:1250px) {
  html:is([data-auth-state="checking"],[data-auth-state="ready"][data-control-bootstrap="loading"]) body.control-page #authGate.rscm-dashboard-auth-gate .rscm-instant-control-nav,
  html[data-auth-state="ready"] body.control-page.control-workspace-enabled:has(#controlPanelStage.pill-neutral) #controlWorkspaceNav .control-workspace-pending-track {gap:10px;}
  html:is([data-auth-state="checking"],[data-auth-state="ready"][data-control-bootstrap="loading"]) body.control-page #authGate.rscm-dashboard-auth-gate .rscm-instant-control-nav > span.rscm-instant-control-card,
  body.control-page #controlWorkspaceNav .control-workspace-pending-card {flex-basis:184px;min-width:184px;min-height:90px;gap:9px;padding:14px 12px;}
  #authGate .rscm-instant-control-card-icon,
  body.control-page #controlWorkspaceNav .control-workspace-pending-card-icon {flex-basis:36px;width:36px;height:36px;font-size:17px;}
  html:is([data-auth-state="checking"],[data-auth-state="ready"][data-control-bootstrap="loading"]) body.control-page #authGate.rscm-dashboard-auth-gate .rscm-instant-control-nav .rscm-instant-control-card-copy > strong,
  body.control-page #controlWorkspaceNav .control-workspace-pending-card-copy > strong {font-size:11.5px;}
  #authGate .rscm-instant-control-card-copy > small,
  body.control-page #controlWorkspaceNav .control-workspace-pending-card-copy > small {font-size:9.5px;}
  #authGate .rscm-instant-control-card-chevron,
  body.control-page #controlWorkspaceNav .control-workspace-pending-card-chevron {font-size:10px;}
}
@media(max-width:1020px) {
  html:is([data-auth-state="checking"],[data-auth-state="ready"][data-control-bootstrap="loading"]) body.control-page #authGate.rscm-dashboard-auth-gate .rscm-instant-content.rscm-instant-control-menu {padding-inline:0;}
}
@media(max-width:760px) {
  html:is([data-auth-state="checking"],[data-auth-state="ready"][data-control-bootstrap="loading"]) body.control-page #authGate.rscm-dashboard-auth-gate .rscm-instant-content.rscm-instant-control-menu {width:calc(100% - 36px);padding-top:14px;}
  html:is([data-auth-state="checking"],[data-auth-state="ready"][data-control-bootstrap="loading"]) body.control-page #authGate.rscm-dashboard-auth-gate .rscm-instant-control-nav,
  html[data-auth-state="ready"] body.control-page.control-workspace-enabled:has(#controlPanelStage.pill-neutral) #controlWorkspaceNav .control-workspace-pending-track {gap:9px;padding-bottom:9px;}
  html:is([data-auth-state="checking"],[data-auth-state="ready"][data-control-bootstrap="loading"]) body.control-page #authGate.rscm-dashboard-auth-gate .rscm-instant-control-nav > span.rscm-instant-control-card,
  body.control-page #controlWorkspaceNav .control-workspace-pending-card {flex:0 0 205px;min-width:205px;min-height:83px;padding:12px;gap:10px;border-radius:13px;}
  #authGate .rscm-instant-control-card-icon,
  body.control-page #controlWorkspaceNav .control-workspace-pending-card-icon {flex-basis:35px;width:35px;height:35px;font-size:16px;}
  html:is([data-auth-state="checking"],[data-auth-state="ready"][data-control-bootstrap="loading"]) body.control-page #authGate.rscm-dashboard-auth-gate .rscm-instant-control-nav .rscm-instant-control-card-copy > strong,
  body.control-page #controlWorkspaceNav .control-workspace-pending-card-copy > strong {font-size:11.5px;}
  #authGate .rscm-instant-control-card-copy > small,
  body.control-page #controlWorkspaceNav .control-workspace-pending-card-copy > small {font-size:9px;}
}


/* ===========================================================================
   RSCM IoMT V1.9 — TWO-STAGE CONTROL PANEL BOOTSTRAP / FAIL-CLOSED
   Auth verified is NOT the same as a fully initialized admin workspace.
   This applies ONLY to control-panel.html with data-control-bootstrap.
   No clinical data, real controls, or backend permission states are exposed.
   =========================================================================== */
/* Keep the real page inaccessible until BOTH Auth and the controller have
   confirmed readiness. This is visual protection, not an RBAC replacement. */
html[data-auth-required="admin"][data-control-bootstrap]:not([data-control-bootstrap="ready"])
body > :not(#authGate) {display:none!important;}

/* Auth's existing ready->hide rule is overridden only for this one page.
   The EXACT same inert V1 Instant Shell stays up during API initialization. */
html[data-auth-required="admin"][data-auth-state="ready"][data-control-bootstrap="loading"]
#authGate.rscm-dashboard-auth-gate {
  display:block!important;
  min-height:100svh;
  width:100%;
  padding:0;
  background:#fff;
  color:#17384c;
}
html[data-auth-required="admin"][data-auth-state="ready"][data-control-bootstrap="loading"]
#authGate .rscm-instant-shell {display:block!important;}
html[data-auth-required="admin"][data-auth-state="ready"][data-control-bootstrap="loading"]
#authGate .rscm-instant-error {display:none!important;}

/* Failed core initialization is a terminal, actionable state (not an endless
   skeleton). Auth is still enforced and every protected DOM node stays hidden. */
html[data-auth-required="admin"][data-auth-state="ready"][data-control-bootstrap="error"]
#authGate.rscm-dashboard-auth-gate {
  display:grid!important;
  place-items:center;
  min-height:100svh;
  padding:24px;
  background:#f6f9fb;
}
html[data-auth-required="admin"][data-auth-state="ready"][data-control-bootstrap="error"]
#authGate .rscm-instant-shell {display:none!important;}
html[data-auth-required="admin"][data-auth-state="ready"][data-control-bootstrap="error"]
#authGate .rscm-instant-error {display:block!important;}


/* ===========================================================================
   RSCM IoMT V2.4 — ATOMIC SIDEBAR / SPA VISUAL HANDOFF
   - Existing Instant Shell stays visible until the verified page can show a
     fully mounted sidebar. On the three SPA entrypoints, the 3 view templates
     and initial dashboard DOM must also be ready.
   - CSS only controls presentation. Auth Gate / RBAC still owns authorization.
   - No sensor values, session data, audio, API calls or network waits added.
   - Sidebar's existing failed-load fallback is a terminal state, not a spinner.
   - Scoped exclusively to the 7 approved Instant Shell pages; legacy gates
     are not modified. Chromium, Firefox and Safari support :has().
   =========================================================================== */
/* Sidebar template fetch is asynchronous. Before it resolves, never expose an
   empty authenticated sidebar. The CSS selector reacts immediately when the
   existing sidebar.js sets data-sidebar-state="ready" or "error". */
html[data-auth-required][data-auth-state="ready"]:not([data-control-bootstrap="error"]):has(body > #authGate.rscm-dashboard-auth-gate):has(#sidebar[data-sidebar-component="rscm-v432"]:not([data-sidebar-state="ready"]):not([data-sidebar-state="error"]))
body > :not(#authGate) {display:none!important;}

/* The SPA route also waits for safe view mounting and one synchronous initial
   paint pass. Actual Firestore sensor data continues loading asynchronously. */
html[data-auth-required][data-auth-state="ready"][data-dashboard-bootstrap="loading"]
body > :not(#authGate) {display:none!important;}

/* Shared visual holding predicate: authorisation is ready but UI is not. */
html[data-auth-required][data-auth-state="ready"]:not([data-control-bootstrap="error"]):has(body > #authGate.rscm-dashboard-auth-gate):has(#sidebar[data-sidebar-component="rscm-v432"]:not([data-sidebar-state="ready"]):not([data-sidebar-state="error"]))
#authGate.rscm-dashboard-auth-gate,
html[data-auth-required][data-auth-state="ready"][data-dashboard-bootstrap="loading"]
#authGate.rscm-dashboard-auth-gate {
  display:block!important;
  min-height:100svh;
  width:100%;
  padding:0;
  place-items:normal;
  background:#fff;
  color:#17384c;
}
html[data-auth-required][data-auth-state="ready"]:not([data-control-bootstrap="error"]):has(body > #authGate.rscm-dashboard-auth-gate):has(#sidebar[data-sidebar-component="rscm-v432"]:not([data-sidebar-state="ready"]):not([data-sidebar-state="error"]))
#authGate .rscm-instant-shell,
html[data-auth-required][data-auth-state="ready"][data-dashboard-bootstrap="loading"]
#authGate .rscm-instant-shell {display:block!important;}

html[data-auth-required][data-auth-state="ready"]:not([data-control-bootstrap="error"]):has(body > #authGate.rscm-dashboard-auth-gate):has(#sidebar[data-sidebar-component="rscm-v432"]:not([data-sidebar-state="ready"]):not([data-sidebar-state="error"]))
#authGate .rscm-instant-error,
html[data-auth-required][data-auth-state="ready"][data-dashboard-bootstrap="loading"]
#authGate .rscm-instant-error {display:none!important;}


/* Registrasi Pasien Wizard V1 — matching four-stage shell (no PHI). */
#authGate.rscm-dashboard-auth-gate .rscm-instant-registration-steps {
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px;
}
#authGate .rscm-instant-registration-step {
  display:flex;align-items:center;gap:12px;min-height:76px;min-width:0;padding:14px 13px;
  border:1px solid #dfe8ee;border-radius:14px;background:#fff;color:#526d7b;
  box-shadow:0 3px 8px rgba(52,86,116,.045),0 10px 20px rgba(82,117,148,.065),inset 0 1px 0 #fff;
}
#authGate .rscm-instant-registration-step > b {display:grid;place-items:center;flex:0 0 37px;width:37px;height:37px;border:1px solid #d6e8e3;border-radius:11px;background:#ecf7f3;color:#168478;font-size:12px;font-weight:800;}
#authGate .rscm-instant-registration-step > span {display:flex;flex-direction:column;gap:4px;min-width:0;font-size:13px;font-weight:780;line-height:1.27;}
#authGate .rscm-instant-registration-step small {color:#7d91a0;font-size:10px;line-height:1.35;font-weight:500;}
#authGate .rscm-instant-registration-step.is-active {color:#fff;border-color:#62b7af;background:radial-gradient(ellipse at 50% -12%,rgba(255,255,255,.13),transparent 66%),linear-gradient(180deg,#1aa69e 0%,#129a93 30%,#0b8b85 62%,#087b76 100%);box-shadow:0 6px 13px rgba(2,72,68,.14),0 11px 19px rgba(2,72,68,.10),inset 0 2px 0 rgba(190,255,247,.36),inset 0 -4px 9px rgba(0,57,53,.12);}
#authGate .rscm-instant-registration-step.is-active > b {background:rgba(255,255,255,.16);border-color:rgba(255,255,255,.29);color:#fff;}
#authGate .rscm-instant-registration-step.is-active small {color:#e9fffb;}
#authGate .rscm-instant-registration .rscm-instant-form-section[hidden] {display:none!important;}
@media(max-width:1200px){
  #authGate .rscm-instant-registration-steps {gap:9px;}
  #authGate .rscm-instant-registration-step {min-height:74px;gap:9px;padding:12px 10px;}
  #authGate .rscm-instant-registration-step > b {width:32px;height:32px;flex-basis:32px;}
  #authGate .rscm-instant-registration-step > span {font-size:11.5px;}
  #authGate .rscm-instant-registration-step small {font-size:9px;}
}
@media(max-width:900px){
  #authGate .rscm-instant-registration-steps {display:flex;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;}
  #authGate .rscm-instant-registration-step {flex:0 0 205px;}
}

/* Wizard shell's card/stepper frame follows the approved real form geometry. */
#authGate .rscm-instant-panel.rscm-instant-registration {padding:0;overflow:hidden;}
#authGate .rscm-instant-registration-steps {padding:22px 24px 17px;margin:0;border-bottom:1px solid #e7edf2;background:#fff;}
#authGate .rscm-instant-registration > .rscm-instant-form-section {margin:22px 24px 11px;}
#authGate .rscm-instant-registration > .rscm-instant-form-footer {margin-top:12px;padding:18px 24px 22px;border-top:1px solid #e4ebf1;}
@media(max-width:1200px){#authGate .rscm-instant-registration-steps {padding:18px 18px 15px;}}
@media(max-width:760px){
  #authGate .rscm-instant-registration-steps {padding:14px 14px 12px;}
  #authGate .rscm-instant-registration > .rscm-instant-form-section {margin:18px 18px 10px;}
  #authGate .rscm-instant-registration > .rscm-instant-form-footer {padding:17px 18px 20px;}
}


/* ============================================================================
   RSCM IoMT — Registration Wizard V1.2 / MATCHING INSTANT SHELL STEP TRACK
   Keep the pre-auth preview geometrically identical to the real wizard.
   No patient data / interactive control is inserted into #authGate.
   ============================================================================ */
#authGate.rscm-dashboard-auth-gate .rscm-instant-registration-steps {
  /* Same full-width, 26px inner gutters as the real registration wizard. */
  --rscm-registration-step-gap:28px;
  width:100%;
  max-width:none;
  margin-inline:0;
  padding-inline:26px;
  column-gap:var(--rscm-registration-step-gap);
}
#authGate .rscm-instant-registration > .rscm-instant-form-section {
  margin-inline:26px;
}
#authGate .rscm-instant-registration-step {
  position:relative;
  isolation:isolate;
}
#authGate .rscm-instant-registration-step:not(:last-child)::after {
  content:"";
  position:absolute;
  top:50%;
  left:calc(100% + 1px);
  width:calc(var(--rscm-registration-step-gap) - 2px);
  height:2px;
  border-radius:999px;
  background:#c9dedb;
  transform:translateY(-50%);
  pointer-events:none;
  z-index:-1;
}
@media (max-width:1200px) {
  #authGate.rscm-dashboard-auth-gate .rscm-instant-registration-steps {
    --rscm-registration-step-gap:24px;
    padding-inline:26px;
    column-gap:var(--rscm-registration-step-gap);
  }
}
@media (max-width:760px) {
  #authGate.rscm-dashboard-auth-gate .rscm-instant-registration-steps {
    padding-inline:18px;
  }
  #authGate .rscm-instant-registration > .rscm-instant-form-section {
    margin-inline:18px;
  }
}
@media (max-width:900px) {
  #authGate.rscm-dashboard-auth-gate .rscm-instant-registration-steps {
    --rscm-registration-step-gap:22px;
    max-width:none;
    column-gap:var(--rscm-registration-step-gap);
  }
  #authGate.rscm-dashboard-auth-gate .rscm-instant-registration-steps {
    display:flex;
    overflow-x:auto;
    overflow-y:hidden;
    overscroll-behavior-x:contain;
    scroll-snap-type:x proximity;
  }
  #authGate.rscm-dashboard-auth-gate .rscm-instant-registration-steps > .rscm-instant-registration-step {
    flex:0 0 190px;
    min-width:190px;
    scroll-snap-align:start;
  }
}


/* ========================================================================
   RSCM IoMT — INSTANT SHELL TOPBAR ACCOUNT PARITY V1
   Keep #authGate and authentication fail-closed. Preview stays inert.
   Mirrors the verified profile-chip; no user identity is ever guessed.
   ======================================================================== */
html body #authGate.rscm-dashboard-auth-gate .rscm-instant-topbar-end {
  margin-left:auto;
  justify-content:flex-end;
  gap:0;
}
/* The neutral badge/text is not part of the intended topbar composition. */
html body #authGate.rscm-dashboard-auth-gate .rscm-instant-connect-dot,
html body #authGate.rscm-dashboard-auth-gate .rscm-instant-connection-text {
  display:none !important;
}
html body #authGate.rscm-dashboard-auth-gate .rscm-instant-topbar-end > .rscm-instant-account {
  display:flex !important;
  flex-direction:row-reverse; /* DOM: shimmer, avatar -> visual: avatar, shimmer */
  align-items:center;
  justify-content:flex-end;
  flex:0 0 auto;
  gap:10px;
  box-sizing:border-box;
  width:172px;
  min-width:172px;
  max-width:172px;
  height:48px;
  min-height:48px;
  padding:5px 12px;
  margin:0;
  border:1px solid #e8eef3;
  border-radius:12px;
  background:#fff;
  box-shadow:5px 7px 17px rgba(82,112,146,.105),
            -5px -5px 16px rgba(255,255,255,.99),
            inset 0 1px 0 #fff;
}
html body #authGate.rscm-dashboard-auth-gate .rscm-instant-account > .rscm-instant-avatar {
  width:36px;
  height:36px;
  flex:0 0 36px;
  border:3px solid #f5f9fe;
}
/* Two neutral text bars instead of a guessed name/role. */
html body #authGate.rscm-dashboard-auth-gate .rscm-instant-account > .rscm-instant-shimmer {
  position:relative;
  box-sizing:border-box;
  display:block;
  flex:0 0 auto;
  width:79px !important;
  max-width:79px;
  height:8px;
  margin-top:-11px;
}
html body #authGate.rscm-dashboard-auth-gate .rscm-instant-account > .rscm-instant-shimmer::after {
  content:"";
  position:absolute;
  left:0;
  top:14px;
  width:57px;
  height:7px;
  border-radius:999px;
  background:#e8efef;
}
@media (max-width:1020px) {
  html body #authGate.rscm-dashboard-auth-gate .rscm-instant-topbar-end > .rscm-instant-account {
    width:46px;
    min-width:46px;
    max-width:46px;
    height:46px;
    min-height:46px;
    padding:4px;
    gap:0;
    justify-content:center;
  }
  html body #authGate.rscm-dashboard-auth-gate .rscm-instant-account > .rscm-instant-shimmer {
    display:none !important;
  }
}
@media (max-width:760px) {
  html body #authGate.rscm-dashboard-auth-gate .rscm-instant-topbar-end > .rscm-instant-account {
    width:40px;
    min-width:40px;
    max-width:40px;
    height:40px;
    min-height:40px;
    padding:3px;
  }
  html body #authGate.rscm-dashboard-auth-gate .rscm-instant-account > .rscm-instant-avatar {
    width:32px;
    height:32px;
    flex-basis:32px;
  }
}

/* On phone the real topbar uses an 18px right inset, whereas the legacy
   preview reserves 24px. Align only the account's horizontal anchor. */
@media (max-width:760px) {
  html body #authGate.rscm-dashboard-auth-gate .rscm-instant-topbar-end {
    margin-right:-6px;
  }
}
