/* Pregnomed MIS — one visual authority inspired by MedPlus' restrained workspace. */
:root{
  --mp-accent:#d61f69;--mp-accent-hover:#b91859;--mp-accent-soft:#fbe8f0;
  --mp-info:#2563a8;--mp-success:#27805b;--mp-warning:#a76612;--mp-danger:#b83a44;
  --mp-canvas:#f1f2f4;--mp-surface:#fff;--mp-surface-2:#f7f7f8;--mp-surface-3:#eceef1;
  --mp-line:#d9dde3;--mp-line-strong:#c3c8d0;--mp-text:#292c31;--mp-muted:#6e737c;
  --mp-sidebar:#333538;--mp-sidebar-hover:#414347;--mp-sidebar-text:#d9dadd;
  --mp-shadow:0 1px 3px rgba(20,22,26,.09);--mp-shadow-lg:0 10px 28px rgba(20,22,26,.14);
  --primary:var(--mp-accent);--primary-dark:var(--mp-accent-hover);--primary-light:var(--mp-accent-soft);
  --secondary:#6e737c;--sidebar-w:232px;--header-h:56px;--radius:8px;--radius-sm:6px
}
html[data-theme="dark"]{
  --mp-canvas:#202124;--mp-surface:#2a2c30;--mp-surface-2:#303237;--mp-surface-3:#383b40;
  --mp-line:#41444a;--mp-line-strong:#565a62;--mp-text:#f0f1f2;--mp-muted:#adb1b8;
  --mp-sidebar:#17181a;--mp-sidebar-hover:#292b2f;--mp-sidebar-text:#d7d9dc;
  --mp-accent-soft:#4a2637;--mp-shadow:0 1px 3px rgba(0,0,0,.32);--mp-shadow-lg:0 12px 30px rgba(0,0,0,.35);
  color-scheme:dark
}
html{font-size:13px;background:var(--mp-canvas)}
body[data-clinic-role]{font-family:Arial,"Helvetica Neue",sans-serif;background:var(--mp-canvas)!important;color:var(--mp-text)!important;line-height:1.45}
body[data-clinic-role] *{scrollbar-color:var(--mp-line-strong) var(--mp-surface-2)}
body[data-clinic-role] :where(button,a,input,select,textarea):focus-visible{outline:2px solid var(--mp-accent)!important;outline-offset:2px!important;box-shadow:none!important}

/* One compact application shell */
body[data-clinic-role] .sidebar{width:var(--sidebar-w);background:var(--mp-sidebar)!important;background-image:none!important;border-right:1px solid #1d1f22;box-shadow:none}
body[data-clinic-role] .sidebar-logo{min-height:62px;padding:12px 15px;border-bottom:1px solid rgba(255,255,255,.1)}
body[data-clinic-role] .sidebar-logo .logo-icon{width:34px;height:34px;border-radius:5px;background:var(--mp-accent)!important;background-image:none!important;box-shadow:none;color:#fff}
body[data-clinic-role] .sidebar-logo .logo-text h2{font:700 16px/1.15 Arial,sans-serif!important;color:#fff!important;background:none!important;-webkit-text-fill-color:#fff!important;letter-spacing:-.2px}
body[data-clinic-role] .sidebar-logo .logo-text span{font-size:10px;color:#aeb1b6}
body[data-clinic-role] .sidebar-nav{padding:9px 7px}
body[data-clinic-role] .nav-label{padding:13px 10px 5px;color:#85898f;font-size:9px;letter-spacing:.1em;font-weight:700}
body[data-clinic-role] .nav-item{min-height:36px;margin:1px 0;padding:8px 10px;border-radius:5px;color:var(--mp-sidebar-text);font-size:12px;font-weight:400;gap:8px;transform:none!important}
body[data-clinic-role] .nav-item i{width:17px;color:#aeb2b8}
body[data-clinic-role] .nav-item:hover{background:var(--mp-sidebar-hover)!important;color:#fff}
body[data-clinic-role] .nav-item.active{background:var(--mp-accent)!important;background-image:none!important;color:#fff;box-shadow:none;font-weight:700}
body[data-clinic-role] .nav-item.active i{color:#fff}
body[data-clinic-role] .nav-item .badge{background:#fff!important;color:var(--mp-accent)!important;border:1px solid rgba(255,255,255,.5);font-size:9px}
body[data-clinic-role] .sidebar-footer{padding:8px;border-top:1px solid rgba(255,255,255,.1)}
body[data-clinic-role] .user-card{padding:8px;background:#292b2e!important;border:1px solid #45484d;border-radius:6px}
body[data-clinic-role] .user-card .avatar{background:var(--mp-accent)!important;background-image:none!important}
body[data-clinic-role] .main-content{margin-left:var(--sidebar-w);min-width:0;background:var(--mp-canvas)!important}
body[data-clinic-role="registrar"] .main-content{margin-left:0}
body[data-clinic-role] .topbar{height:var(--header-h);padding:0 18px;background:var(--mp-surface)!important;background-image:none!important;border-bottom:1px solid var(--mp-line);box-shadow:var(--mp-shadow);backdrop-filter:none}
body[data-clinic-role] .topbar-title{font-size:16px;font-weight:700;color:var(--mp-text)!important}
body[data-clinic-role] .topbar-subtitle{color:var(--mp-muted)!important;font-size:10px}
body[data-clinic-role] .topbar-clock{padding:5px 9px;background:var(--mp-surface-2)!important;color:var(--mp-muted)!important;border:1px solid var(--mp-line);border-radius:5px}
body[data-clinic-role] .theme-toggle{background:var(--mp-surface-2)!important;color:var(--mp-muted)!important;border:1px solid var(--mp-line)!important;border-radius:5px;transform:none!important}
body[data-clinic-role] .lang-switcher{background:var(--mp-surface-2)!important;border:1px solid var(--mp-line)!important;border-radius:5px}
body[data-clinic-role] .lang-btn{color:var(--mp-muted)!important;border-radius:3px}
body[data-clinic-role] .lang-btn.active{background:var(--mp-surface)!important;color:var(--mp-accent)!important;box-shadow:var(--mp-shadow)}
body[data-clinic-role] .page-content{width:100%;max-width:1600px;margin-inline:auto;padding:18px 22px 36px;background:transparent!important}
body[data-clinic-role] .section{animation:none!important}

/* The same components in every role */
body[data-clinic-role] :where(.card,.stat-card,.table-container,.table-wrap,.chart-card,.form-card,.panel,.ah-board,.ah-recent,.ss-kpi,.close-kpi){background:var(--mp-surface)!important;background-image:none!important;border:1px solid var(--mp-line)!important;border-radius:8px!important;box-shadow:var(--mp-shadow)!important;color:var(--mp-text)!important;transform:none}
body[data-clinic-role] :where(.card,.stat-card,.ah-board,.ah-recent,.ss-kpi,.close-kpi):hover{transform:none!important;box-shadow:var(--mp-shadow)!important;border-color:var(--mp-line-strong)!important}
body[data-clinic-role] :where(.card-header,.card-footer,.table-header,.modal-header,.modal-footer,.ah-board-head){background:var(--mp-surface-2)!important;background-image:none!important;border-color:var(--mp-line)!important;color:var(--mp-text)!important}
body[data-clinic-role] :where(.card-title,.modal-title,.stat-value,.ah-board-title,.ah-count-val,.ah-row-name,.ah-row-val,.ss-val){color:var(--mp-text)!important}
body[data-clinic-role] :where(.text-muted,.stat-label,.ah-board-sub,.ah-row-meta,.ah-row-cnt){color:var(--mp-muted)!important}
body[data-clinic-role] .stat-card{padding:15px;min-height:88px;overflow:hidden}
body[data-clinic-role] .stat-card:after{display:none!important}
body[data-clinic-role] .stat-icon{border-radius:6px!important;background:var(--mp-accent-soft)!important;color:var(--mp-accent)!important}
body[data-clinic-role] .stats-grid{gap:10px}

body[data-clinic-role] :where(.btn,button[class*="btn-"]){min-height:36px;border-radius:5px!important;font-size:12px;font-weight:700;box-shadow:none!important;transform:none!important}
body[data-clinic-role] :where(.btn-primary,.btn-submit){background:var(--mp-accent)!important;background-image:none!important;border-color:var(--mp-accent)!important;color:#fff!important}
body[data-clinic-role] :where(.btn-primary,.btn-submit):hover{background:var(--mp-accent-hover)!important}
body[data-clinic-role] .btn-secondary{background:var(--mp-surface-2)!important;color:var(--mp-text)!important;border:1px solid var(--mp-line-strong)!important}
body[data-clinic-role] .btn-success{background:var(--mp-success)!important;background-image:none!important;color:#fff!important}
body[data-clinic-role] .btn-danger{background:var(--mp-danger)!important;background-image:none!important;color:#fff!important}
body[data-clinic-role] .btn-info{background:var(--mp-info)!important;background-image:none!important;color:#fff!important}

body[data-clinic-role] :where(.form-control,.search-box input,input:not([type="checkbox"]):not([type="radio"]),select,textarea){min-height:38px;background:var(--mp-surface)!important;color:var(--mp-text)!important;border:1px solid var(--mp-line-strong)!important;border-radius:5px!important;box-shadow:none!important}
body[data-clinic-role] :where(.form-control,input,select,textarea):focus{border-color:var(--mp-accent)!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--mp-accent) 16%,transparent)!important}
body[data-clinic-role] :where(input,textarea)::placeholder{color:var(--mp-muted)!important;opacity:.72}
body[data-clinic-role] .form-label,body[data-clinic-role] label{color:var(--mp-text)}
body[data-clinic-role] input[type="checkbox"]{accent-color:var(--mp-accent)!important}

body[data-clinic-role] table{width:100%;border-collapse:collapse;background:var(--mp-surface)!important;color:var(--mp-text)!important}
body[data-clinic-role] :where(th,thead th){height:39px;padding:8px 11px;background:var(--mp-surface-2)!important;color:var(--mp-muted)!important;border-bottom:1px solid var(--mp-line)!important;font-size:10px;font-weight:700;letter-spacing:.03em}
body[data-clinic-role] td{padding:9px 11px;color:var(--mp-text)!important;border-bottom:1px solid var(--mp-line)!important}
body[data-clinic-role] tbody tr:hover,body[data-clinic-role] tbody tr:hover td{background:var(--mp-surface-2)!important}
body[data-clinic-role] .modal-overlay{background:rgba(15,16,18,.62)!important;backdrop-filter:none!important}
body[data-clinic-role] .modal{background:var(--mp-surface)!important;color:var(--mp-text)!important;border:1px solid var(--mp-line-strong)!important;border-radius:9px!important;box-shadow:var(--mp-shadow-lg)!important}
body[data-clinic-role] .modal-close{background:transparent!important;color:var(--mp-muted)!important;border-radius:4px}
body[data-clinic-role] .tabs{border-bottom:1px solid var(--mp-line)!important;gap:1px}
body[data-clinic-role] .tab-btn{color:var(--mp-muted)!important;border-radius:4px 4px 0 0}
body[data-clinic-role] .tab-btn.active{color:var(--mp-accent)!important;border-bottom-color:var(--mp-accent)!important;background:var(--mp-accent-soft)!important}
body[data-clinic-role] :where(.queue-presets,.ss-seg){background:var(--mp-surface-3)!important;border-radius:5px!important}
body[data-clinic-role] :where(.qp-btn,.ss-seg button){color:var(--mp-muted)!important;border-radius:4px!important}
body[data-clinic-role] :where(.qp-btn.active,.ss-seg button.active){background:var(--mp-surface)!important;color:var(--mp-accent)!important;box-shadow:var(--mp-shadow)!important}

/* Semantic status only */
body[data-clinic-role] :where(.badge-primary,.badge-purple,.badge-info){background:#e8eef6!important;color:var(--mp-info)!important}
body[data-clinic-role] :where(.badge-success,.ah-st-completed,.ss-diff-ok){background:#e7f3ed!important;color:var(--mp-success)!important}
body[data-clinic-role] :where(.badge-warning,.ah-st-waiting){background:#fbf1df!important;color:var(--mp-warning)!important}
body[data-clinic-role] :where(.badge-danger,.ah-st-cancelled,.ss-diff-over){background:#f8e8ea!important;color:var(--mp-danger)!important}
html[data-theme="dark"] body[data-clinic-role] :where(.badge-primary,.badge-purple,.badge-info){background:#2d3c4f!important}
html[data-theme="dark"] body[data-clinic-role] :where(.badge-success,.ah-st-completed,.ss-diff-ok){background:#263e35!important}
html[data-theme="dark"] body[data-clinic-role] :where(.badge-warning,.ah-st-waiting){background:#463824!important}
html[data-theme="dark"] body[data-clinic-role] :where(.badge-danger,.ah-st-cancelled,.ss-diff-over){background:#482b30!important}

/* Admin: turn the former decorative hero into a compact MIS summary */
body[data-clinic-role="admin"] .ah-hero{padding:16px 18px;margin-bottom:14px;background:var(--mp-surface)!important;background-image:none!important;color:var(--mp-text)!important;border:1px solid var(--mp-line)!important;border-radius:8px;box-shadow:var(--mp-shadow)!important}
body[data-clinic-role="admin"] .ah-hero:before{display:none!important}
body[data-clinic-role="admin"] .ah-hero-greet h1{font-size:19px;color:var(--mp-text)!important}
body[data-clinic-role="admin"] .ah-hero-greet p{color:var(--mp-muted)!important}
body[data-clinic-role="admin"] .ah-hero-clock{background:var(--mp-surface-2)!important;color:var(--mp-muted)!important;border:1px solid var(--mp-line)!important;border-radius:5px;backdrop-filter:none}
body[data-clinic-role="admin"] .ah-hero-tiles{gap:8px;margin-top:13px}
body[data-clinic-role="admin"] .ah-tile{padding:10px 12px;background:var(--mp-surface-2)!important;color:var(--mp-text)!important;border:1px solid var(--mp-line)!important;border-radius:6px;backdrop-filter:none;transform:none!important}
body[data-clinic-role="admin"] .ah-tile-lbl{color:var(--mp-muted)!important;opacity:1}.ah-tile-val{color:var(--mp-text)!important}
body[data-clinic-role="admin"] .ah-count{background:var(--mp-surface)!important;border-color:var(--mp-line)!important;border-radius:7px!important}
body[data-clinic-role="admin"] .ah-count-ic,body[data-clinic-role="admin"] .ah-rank,body[data-clinic-role="admin"] .ah-section-title .ah-dot{background:var(--mp-accent)!important;background-image:none!important;color:#fff!important;box-shadow:none!important}
body[data-clinic-role="admin"] .ah-bar-fill{background:var(--mp-accent)!important;background-image:none!important}

/* Registrar: MedPlus-like single toolbar and two-pane workspace */
body[data-clinic-role="registrar"] .top-navbar{height:54px;max-width:100vw;padding:0 12px;background:var(--mp-surface)!important;background-image:none!important;border-bottom:1px solid var(--mp-line)!important;box-shadow:var(--mp-shadow)!important;overflow:hidden}
body[data-clinic-role="registrar"] .tn-left{min-width:0;flex:1}.tn-nav{min-width:0}
body[data-clinic-role="registrar"] .tn-logo{padding-right:11px;margin-right:5px;border-right:1px solid var(--mp-line)!important}
body[data-clinic-role="registrar"] .tn-logo-icon{width:31px;height:31px;border-radius:5px;background:var(--mp-accent)!important;background-image:none!important;box-shadow:none}
body[data-clinic-role="registrar"] .tn-logo-text{font-size:15px;color:var(--mp-text)!important;background:none!important;-webkit-text-fill-color:var(--mp-text)!important}
body[data-clinic-role="registrar"] .tn-item{min-height:34px;padding:7px 9px;border-radius:5px;color:var(--mp-muted)!important;font-weight:400;transform:none!important}
body[data-clinic-role="registrar"] .tn-item:hover{background:var(--mp-surface-2)!important;color:var(--mp-text)!important}
body[data-clinic-role="registrar"] .tn-item.active{background:var(--mp-accent)!important;background-image:none!important;color:#fff!important;box-shadow:none}
body[data-clinic-role="registrar"] .tn-right{gap:6px;flex-shrink:0}
body[data-clinic-role="registrar"] .tn-user{background:var(--mp-surface-2)!important;border:1px solid var(--mp-line)!important;border-radius:5px}
body[data-clinic-role="registrar"] .tn-user-avatar{background:var(--mp-accent)!important;background-image:none!important;box-shadow:none}
body[data-clinic-role="registrar"] .tn-user-name{color:var(--mp-text)!important}.tn-user-role{color:var(--mp-muted)!important}
body[data-clinic-role="registrar"] .top-navbar .lang-switcher,body[data-clinic-role="registrar"] .top-navbar .topbar-clock{background:var(--mp-surface-2)!important;border-color:var(--mp-line)!important;color:var(--mp-muted)!important}
body[data-clinic-role="registrar"] #sec-register>div{gap:12px!important}
body[data-clinic-role="registrar"] #sec-register [style*="border-top:3px"],body[data-clinic-role="registrar"] #sec-register .card{border-top:1px solid var(--mp-line)!important}
body[data-clinic-role="registrar"] #regCatFilter button{background:var(--mp-surface)!important;color:var(--mp-muted)!important;border-color:var(--mp-line-strong)!important;border-radius:5px!important}
body[data-clinic-role="registrar"] #regCatFilter button[style*="color:#fff"]{background:var(--mp-accent)!important;color:#fff!important;border-color:var(--mp-accent)!important}
body[data-clinic-role="registrar"] #regServiceList>div>div[style*="border-left:4px"]{background:var(--mp-surface-2)!important;border-left-color:var(--mp-accent)!important;border-radius:5px!important;color:var(--mp-text)!important}
body[data-clinic-role="registrar"] #regServiceList>div>div[style*="border-left:4px"] :where(i,span){color:var(--mp-accent)!important}
body[data-clinic-role="registrar"] #regServiceList label{background:var(--mp-surface)!important;border-color:var(--mp-line)!important;color:var(--mp-text)!important;border-radius:5px!important}

/* Doctor: stable queue + encounter workspace */
body[data-clinic-role="doctor"] #sec-my_patients>div[style*="grid-template-columns:420px"]{grid-template-columns:minmax(320px,380px) minmax(0,1fr)!important;gap:12px!important}
body[data-clinic-role="doctor"] #patientQueueList{background:var(--mp-surface)!important}
body[data-clinic-role="doctor"] #patientQueueList+.card{background:var(--mp-surface)!important}
body[data-clinic-role="doctor"] #sec-my_patients .card-header[style*="linear-gradient"]{background:var(--mp-surface-2)!important;background-image:none!important;color:var(--mp-text)!important}
body[data-clinic-role="doctor"] #sec-my_patients .card-header[style*="linear-gradient"] *{color:var(--mp-text)!important}
body[data-clinic-role="doctor"] #sec-my_patients .card-header button{background:var(--mp-surface)!important;color:var(--mp-accent)!important;border-color:var(--mp-line-strong)!important}
body[data-clinic-role="doctor"] #patientDetailPanel>div{background:var(--mp-surface-2)!important;background-image:none!important;border-color:var(--mp-line-strong)!important;color:var(--mp-muted)!important;border-radius:8px!important}

/* Inline legacy normalization within application data areas */
body[data-clinic-role]:not([data-clinic-role="login"]) :where(.section,.modal,.modal-overlay) [style*="linear-gradient"]{background-image:none!important}
body[data-clinic-role]:not([data-clinic-role="login"]) :where(.section,.modal) [style*="background:#fff"]{background-color:var(--mp-surface)!important}
body[data-clinic-role]:not([data-clinic-role="login"]) :where(.section,.modal) [style*="background:#f8fafc"],
body[data-clinic-role]:not([data-clinic-role="login"]) :where(.section,.modal) [style*="background:#f1f5f9"],
body[data-clinic-role]:not([data-clinic-role="login"]) :where(.section,.modal) [style*="background:#f5f3ff"]{background-color:var(--mp-surface-2)!important}
html[data-theme="dark"] body[data-clinic-role] :where(.section,.modal) [style*="color:#1e293b"],
html[data-theme="dark"] body[data-clinic-role] :where(.section,.modal) [style*="color:#0f172a"],
html[data-theme="dark"] body[data-clinic-role] :where(.section,.modal) [style*="color:#334155"],
html[data-theme="dark"] body[data-clinic-role] :where(.section,.modal) [style*="color:#475569"]{color:var(--mp-text)!important}
body[data-clinic-role]>div[style*="linear-gradient"],body[data-clinic-role] .app-layout>div[style*="linear-gradient"],body[data-clinic-role] .main-content>div[style*="linear-gradient"]{background:#3a3c40!important;background-image:none!important;border-bottom:1px solid #4b4e53!important}

/* Login: public MedPlus proportions, Pregnomed identity */
body[data-clinic-role="login"]{display:grid!important;place-items:center;min-height:100vh;background:#303030!important;background-image:repeating-linear-gradient(45deg,rgba(255,255,255,.015) 0 1px,transparent 1px 5px)!important;color:#333!important;padding:20px}
body[data-clinic-role="login"] .bg-art,body[data-clinic-role="login"] .left-panel{display:none!important}
body[data-clinic-role="login"] .right-panel{width:100%!important;max-width:610px!important;min-height:0!important;padding:10px!important;background:transparent!important;border:0!important;backdrop-filter:none!important}
body[data-clinic-role="login"] .login-box{width:100%!important;padding:28px 34px 34px!important;background:linear-gradient(#eee,#d6d6d6)!important;border:1px solid #777!important;border-radius:7px!important;box-shadow:0 0 0 10px rgba(255,255,255,.08),0 8px 26px rgba(0,0,0,.25)!important;color:#3c3c3c!important}
body[data-clinic-role="login"] .login-heading{text-align:left!important;border-bottom:1px solid #c7c7c7;padding-bottom:12px;margin-bottom:18px}
body[data-clinic-role="login"] .login-heading h3{font-size:22px!important;color:#333!important;margin-bottom:4px}
body[data-clinic-role="login"] .login-heading p{color:#666!important}
body[data-clinic-role="login"] .role-grid{gap:6px!important;margin-bottom:17px!important}
body[data-clinic-role="login"] .role-btn{min-height:48px!important;background:#f4f4f4!important;background-image:none!important;border:1px solid #bbb!important;border-radius:4px!important;color:#555!important;box-shadow:none!important}
body[data-clinic-role="login"] .role-btn.active{background:var(--mp-accent)!important;color:#fff!important;border-color:var(--mp-accent)!important}
body[data-clinic-role="login"] .field label{color:#555!important}
body[data-clinic-role="login"] .field-wrap input{min-height:42px!important;background:#fff!important;color:#333!important;border:1px solid #bbb!important;border-radius:3px!important}
body[data-clinic-role="login"] .field-wrap .fi,body[data-clinic-role="login"] .toggle-pass{color:#888!important}
body[data-clinic-role="login"] .btn-submit{min-height:40px!important;width:auto!important;padding:0 24px!important;border-radius:4px!important;margin-left:auto;background:#414348!important;color:#fff!important}
body[data-clinic-role="login"] .btn-submit:hover{background:var(--mp-accent)!important}
body[data-clinic-role="login"] .lang-switcher{background:#ddd!important;border-color:#bbb!important}
body[data-clinic-role="login"] .lang-btn{color:#666!important}.lang-btn.active{color:var(--mp-accent)!important;background:#fff!important}

/* Ward uses the same surfaces without removing its useful bed visualization. */
body[data-clinic-role="wards"]{background:var(--mp-canvas)!important}
body[data-clinic-role="wards"] .ward-topbar{min-height:56px;display:flex;align-items:center;gap:18px;padding:8px clamp(14px,3vw,34px);position:sticky;top:0;z-index:20;background:var(--mp-sidebar)!important;color:#fff;border-bottom:1px solid #1d1f22}
body[data-clinic-role="wards"] .ward-topbar>div:nth-child(2){flex:1}.ward-topbar span{display:block;color:#b5b8bd;font-size:10px}.ward-user{font-size:11px;color:#e8e9eb}.ward-back{display:inline-flex;align-items:center;gap:6px;color:#fff;text-decoration:none;background:#424449;border:1px solid #575a60;padding:7px 10px;border-radius:5px}
body[data-clinic-role="wards"] .ward-shell{max-width:1500px;margin:auto;padding:18px clamp(10px,2.5vw,32px) 36px}
body[data-clinic-role="wards"] .ward-hero{background:var(--mp-surface)!important;background-image:none!important;color:var(--mp-text)!important;border:1px solid var(--mp-line)!important;border-radius:8px!important;box-shadow:var(--mp-shadow)!important}
body[data-clinic-role="wards"] .ward-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:18px 20px;position:relative;overflow:hidden}.ward-hero:after{display:none}.ward-hero .eyebrow{font-size:9px;letter-spacing:.1em;color:var(--mp-accent);font-weight:700}.ward-hero h1{font-size:28px;line-height:1.1;margin:4px 0}.ward-hero p{color:var(--mp-muted)!important;margin:0}
body[data-clinic-role="wards"] .ward-kpis{display:grid;grid-template-columns:repeat(3,minmax(90px,1fr));gap:7px}.ward-kpi{padding:10px 12px;min-width:100px;background:var(--mp-surface-2)!important;border:1px solid var(--mp-line)!important;border-radius:6px!important}.ward-kpi span{color:var(--mp-muted)!important;font-size:9px}.ward-kpi strong{display:block;font-size:20px;color:var(--mp-text)}
body[data-clinic-role="wards"] .ward-toolbar{display:flex;justify-content:space-between;gap:10px;margin:13px 0}.ward-filters,.view-actions{display:flex;gap:5px;flex-wrap:wrap}.ward-toolbar button{min-height:34px;border:1px solid var(--mp-line);background:var(--mp-surface);padding:6px 11px;border-radius:5px;color:var(--mp-muted);cursor:pointer}.ward-toolbar button.active,.ward-toolbar button:hover{background:var(--mp-accent)!important;color:#fff;border-color:var(--mp-accent)}
body[data-clinic-role="wards"] .ward-scene{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:12px}.room-card{padding:13px;background:var(--mp-surface)!important;border:1px solid var(--mp-line)!important;border-radius:8px!important;box-shadow:var(--mp-shadow)!important;transform:none!important}.room-card header{display:flex;justify-content:space-between;align-items:center;margin-bottom:11px}.room-card header span{font-size:9px;font-weight:700;letter-spacing:.06em;color:var(--mp-accent)}.room-card h2{font-size:16px;margin:2px 0}.room-card header em{font-style:normal;background:var(--mp-accent-soft);color:var(--mp-accent);border-radius:4px;padding:5px 8px;font-weight:700}.bed-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
body[data-clinic-role="wards"] .bed-card{display:flex;align-items:center;gap:9px;padding:10px;min-height:76px;position:relative;overflow:hidden;background:var(--mp-surface)!important;border:1px solid var(--mp-line)!important;border-radius:6px!important}.bed-card:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--mp-success)}.bed-icon{width:34px;height:34px;border-radius:5px;display:grid;place-items:center;background:#e7f3ed;color:var(--mp-success)}.bed-info{min-width:0;display:flex;flex-direction:column}.bed-info b{font-size:11px}.bed-info span,.bed-info small{font-size:9px;color:var(--mp-muted)}.bed-info strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px;margin-top:2px}.status-occupied:before{background:var(--mp-danger)}.status-occupied .bed-icon{background:#f8e8ea;color:var(--mp-danger)}.status-reserved:before{background:var(--mp-warning)}.status-cleaning:before{background:var(--mp-info)}.status-maintenance:before{background:var(--mp-muted)}.bed-action{margin-left:auto;border:0;background:var(--mp-accent-soft);color:var(--mp-accent);padding:6px 7px;border-radius:4px;font-size:9px;font-weight:700;cursor:pointer}.bed-action.danger{background:#f8e8ea;color:var(--mp-danger)}.ward-loading,.ward-empty{grid-column:1/-1;text-align:center;padding:60px;color:var(--mp-muted)}.view-list{display:block}.view-list .room-card{margin-bottom:9px}.view-list .bed-grid{grid-template-columns:repeat(auto-fill,minmax(230px,1fr))}

@media(max-width:1500px){
  body[data-clinic-role="registrar"] .tn-item{padding-inline:7px;gap:4px}
  body[data-clinic-role="registrar"] .tn-user-info,body[data-clinic-role="registrar"] .top-navbar .topbar-clock{display:none}
}
@media(max-width:1024px){
  :root{--sidebar-w:210px}.page-content{padding:15px!important}
  body[data-clinic-role="registrar"] .tn-item span{display:none}
  body[data-clinic-role="registrar"] .tn-item{width:34px;justify-content:center}
}
@media(max-width:760px){
  :root{--header-h:52px}
  body[data-clinic-role] .main-content,body[data-clinic-role="registrar"] .main-content{margin-left:0!important;width:100%;min-width:0}
  body[data-clinic-role] .page-content{padding:9px 8px 28px!important;overflow-x:hidden}
  body[data-clinic-role] .topbar{padding-inline:10px}.topbar-subtitle,.topbar-clock{display:none!important}
  body[data-clinic-role] :where(.card,.stat-card,.table-container,.table-wrap,.chart-card,.form-card,.panel){border-radius:7px!important}
  body[data-clinic-role] .table-wrap,body[data-clinic-role] .table-container{overflow-x:auto;-webkit-overflow-scrolling:touch}
  body[data-clinic-role] table{min-width:620px}
  body[data-clinic-role] .modal{max-width:calc(100vw - 12px)!important;max-height:calc(100vh - 12px)!important;overflow:auto}
  body[data-clinic-role="doctor"] #sec-my_patients>div[style*="grid-template-columns:420px"]{grid-template-columns:minmax(0,1fr)!important;gap:9px!important}
  body[data-clinic-role="doctor"] #sec-my_patients>div[style*="grid-template-columns:420px"]>.card{position:relative!important;top:auto!important;width:100%!important;min-width:0}
  body[data-clinic-role="doctor"] .queue-presets{max-width:100%;overflow-x:auto}.queue-presets .qp-btn{flex:0 0 auto}
  body[data-clinic-role="doctor"] #patientDetailPanel{min-width:0;width:100%}
  body[data-clinic-role="registrar"] .top-navbar{height:52px!important;min-height:52px!important;padding-inline:6px;flex-wrap:nowrap!important}.tn-logo-text,.tn-right .lang-switcher{display:none!important}
  body[data-clinic-role="registrar"] .tn-left{flex:1 1 auto!important;max-width:calc(100% - 82px);overflow:hidden}
  body[data-clinic-role="registrar"] .tn-logo{padding-right:6px;margin-right:2px;flex:0 0 auto}.tn-nav{overflow-x:auto;flex:1 1 auto}.tn-right{width:auto!important;flex:0 0 auto!important;margin-left:4px}
  body[data-clinic-role="registrar"] #sec-register>div[style*="grid-template-columns:1fr 1fr"]{grid-template-columns:minmax(0,1fr)!important}
  body[data-clinic-role="registrar"] #sec-register [style*="grid-template-columns:1fr 1fr 1fr"]{grid-template-columns:minmax(0,1fr)!important}
  body[data-clinic-role="login"]{padding:8px}.login-box{padding:20px 14px!important}.role-grid{grid-template-columns:repeat(2,1fr)!important}
  body[data-clinic-role="wards"] .ward-hero{flex-direction:column;align-items:stretch}.ward-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.ward-scene{grid-template-columns:1fr}.bed-grid{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){body[data-clinic-role] *,body[data-clinic-role] *:before,body[data-clinic-role] *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

@media print{body[data-clinic-role],body[data-clinic-role] *{background:#fff!important;color:#000!important;box-shadow:none!important}.sidebar,.topbar,.top-navbar,.theme-toggle{display:none!important}.main-content{margin:0!important}.no-dark,.receipt-print,#printReceipt{background:#fff!important;color:#000!important}}
