:root{--red:#9f1728;--red2:#bd2435;--red-dark:#66101e;--red-pale:#fff1f2;--canvas:#f7f8fb;--ink:#1e2735;--muted:#6d7683;--border:#e8e9ef;--white:#fff;--blue:#2766b1;--green:#16794b;--amber:#9a630c;--shadow:0 10px 38px rgba(38,30,46,.055);color-scheme:light}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;background:var(--canvas);color:var(--ink);font-size:14px}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}a{color:inherit}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:3px solid #fda4af;outline-offset:2px}.small{font-size:12px}.muted{color:var(--muted)}.strong{font-weight:800}.only-mobile{display:none}
.loading-root{min-height:100vh;display:grid;place-content:center;text-align:center}.loading-mark{margin:auto;display:grid;place-items:center;width:62px;height:62px;border-radius:20px;background:var(--red);color:white;font-size:28px}.loading-root h2{margin:18px 0 4px}.loading-root p{color:var(--muted)}
.login-page{min-height:100vh;display:grid;grid-template-columns:minmax(0,1.07fr) minmax(460px,.93fr);background:white}.login-hero{position:relative;isolation:isolate;overflow:hidden;padding:64px clamp(32px,7vw,112px);background:linear-gradient(146deg,#7d1023 0%,#a41931 56%,#c53746 100%);color:#fff;display:flex;flex-direction:column;justify-content:space-between}.login-hero:before,.login-hero:after{content:"";position:absolute;z-index:-1;border:1px solid #ffffff35;border-radius:50%}.login-hero:before{width:540px;height:540px;right:-210px;bottom:-220px;background:radial-gradient(circle,#ffffff12,transparent 70%)}.login-hero:after{width:350px;height:350px;right:0;top:30%;background:#ffffff09}.brand{display:flex;align-items:center;gap:13px}.brand-mark{display:grid;place-items:center;background:#ffffff26;border:1px solid #ffffff48;color:white;border-radius:15px;font-size:25px;width:52px;height:52px;box-shadow:0 4px 10px #38081415}.brand-copy b{display:block;font-size:18px;letter-spacing:-.03em}.brand-copy small{display:block;color:#ffffffc3;margin-top:4px;font-size:11px;letter-spacing:.12em;text-transform:uppercase}.hero-content{max-width:600px;margin:50px 0}.eyebrow{display:inline-flex;gap:8px;align-items:center;border:1px solid #ffffff40;background:#ffffff1b;color:#fff;border-radius:99px;padding:8px 13px;font-size:11px;text-transform:uppercase;letter-spacing:.12em;font-weight:800}.hero-content h1{font-size:clamp(38px,4.2vw,65px);letter-spacing:-.055em;line-height:1.1;margin:24px 0 20px}.hero-content p{font-size:17px;line-height:1.75;color:#ffe6ea;max-width:490px}.hero-numbers{display:flex;gap:20px;flex-wrap:wrap}.hero-numbers div{border-top:1px solid #ffffff45;padding-top:16px;min-width:120px}.hero-numbers b{display:block;font-size:28px;letter-spacing:-.05em}.hero-numbers span{color:#ffffffb8;font-size:12px}.hero-foot{color:#ffffff90;font-size:11px}.login-right{display:grid;place-items:center;padding:40px 28px}.login-box{width:min(100%,420px)}.login-box .redline{width:48px;height:5px;border-radius:99px;background:var(--red);margin-bottom:27px}.login-box h2{font-size:30px;margin:0 0 8px;letter-spacing:-.045em}.login-box .subtitle{color:var(--muted);line-height:1.7;margin-bottom:34px}.field{display:flex;flex-direction:column;gap:7px}.field label{font-weight:700;font-size:12px;color:#404957}.field input,.field select,.field textarea,.searchbox input,.filter-select{border:1px solid #dfe1e8;background:white;border-radius:11px;padding:12px 13px;width:100%;color:var(--ink);transition:border .2s,box-shadow .2s;min-height:44px}.field input:focus,.field select:focus,.field textarea:focus{border-color:#c72f43;box-shadow:0 0 0 4px #c72f4314;outline:none}.field textarea{resize:vertical;min-height:98px}.form-stack{display:grid;gap:17px}.btn{border:1px solid transparent;padding:10px 16px;min-height:42px;border-radius:11px;font-weight:760;display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;transition:background .15s,transform .15s}.btn:hover:not(:disabled){transform:translateY(-1px)}.btn-red{background:var(--red);color:white;box-shadow:0 5px 16px #9f172820}.btn-red:hover:not(:disabled){background:var(--red-dark)}.btn-light{background:#fff;color:var(--ink);border-color:#dde0e8}.btn-soft{background:#fff1f3;color:var(--red);border-color:#ffd5db}.btn-ghost{background:transparent;color:var(--muted)}.btn-block{width:100%}.login-note{font-size:12px;color:var(--muted);line-height:1.7;margin-top:20px}.alert{border:1px solid #f6d5af;color:#794b12;background:#fffaef;padding:12px 14px;border-radius:12px;font-size:12px;line-height:1.65}.alert-danger{border-color:#fecaca;background:#fff1f2;color:#a31c32}.alert-info{border-color:#bfd6fa;background:#f1f6ff;color:#365a8e}.alert-success{border-color:#b4e5ce;background:#f0fdf4;color:#146c45}
.app-layout{min-height:100vh;display:grid;grid-template-columns:255px minmax(0,1fr)}.sidebar{background:linear-gradient(175deg,#941a2d 0%,#731222 85%,#5b0b1b 100%);color:white;position:sticky;top:0;height:100vh;padding:27px 16px;display:flex;flex-direction:column;gap:20px}.sidebar .brand{padding:0 10px 20px;border-bottom:1px solid #ffffff24}.sidebar .brand-mark{width:43px;height:43px;font-size:19px}.sidebar .brand-copy b{font-size:15px}.sidebar .brand-copy small{font-size:10px}.side-label{font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:#ffbdc6;font-weight:800;margin:13px 12px 2px}.nav-list{display:grid;gap:5px}.nav-item{background:transparent;border:0;border-radius:11px;display:flex;align-items:center;text-align:left;color:#ffe8ea;gap:12px;padding:13px 13px;width:100%;font-size:13px;font-weight:650}.nav-item .ic{width:20px;font-size:17px;text-align:center}.nav-item:hover{background:#ffffff16}.nav-item.active{background:#fff;color:var(--red);box-shadow:0 5px 14px #35041025}.sidebar-footer{margin-top:auto;border-top:1px solid #ffffff27;padding:19px 9px 4px;display:flex;align-items:center;gap:10px}.avatar{border:1px solid #ffffff5c;background:#ffffff31;color:white;width:38px;height:38px;display:grid;place-items:center;border-radius:13px;font-weight:800}.sidebar-footer .who{min-width:0;flex:1}.sidebar-footer strong{font-size:12px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar-footer small{color:#ffd6dc;font-size:10px}.nav-logout{border:0;background:#ffffff13;color:white;border-radius:8px;padding:8px 10px}
.main{min-width:0}.topbar{height:83px;background:#fff;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center;padding:0 clamp(18px,3vw,46px);gap:16px}.breadcrumb{display:flex;gap:9px;align-items:center;color:var(--muted);font-size:12px}.breadcrumb strong{color:var(--ink)}.top-actions{display:flex;align-items:center;gap:14px}.live-pill{font-size:11px;border:1px solid #d9eee2;background:#f2fbf5;color:#16794b;border-radius:99px;padding:8px 11px;font-weight:800}.live-pill.demo{border-color:#f2d6a4;background:#fffbf1;color:#8a5a0d}.top-date{font-size:12px;color:var(--muted)}.content{max-width:1720px;margin:0 auto;padding:30px clamp(18px,3vw,46px) 66px}.pagehead{display:flex;justify-content:space-between;align-items:end;gap:18px;flex-wrap:wrap;margin-bottom:22px}.pagehead h1{margin:4px 0 6px;font-size:29px;letter-spacing:-.045em}.pagehead p{color:var(--muted);font-size:12px;margin:0;line-height:1.6}.section-eyebrow{font-weight:900;color:var(--red);font-size:10px;letter-spacing:.18em;text-transform:uppercase}.toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;margin-bottom:14px}.toolbar-left,.toolbar-right{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.searchbox{position:relative;min-width:230px}.searchbox input{padding-left:37px;min-height:40px}.searchbox span{position:absolute;left:12px;top:11px;color:#9299a6}.filter-select{width:auto;min-width:150px;padding:9px 12px;min-height:40px}.table-card,.panel{background:#fff;border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow);overflow:hidden}.card-title{padding:19px 21px;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center;gap:14px}.card-title h3{font-size:14px;margin:0}.card-title small{color:var(--muted)}.scroll-table{overflow:auto;max-width:100%}table.data{border-collapse:separate;border-spacing:0;min-width:1080px;width:100%;font-size:12px}table.data th{text-align:left;position:sticky;top:0;background:#fff8f8;color:#7f3542;border-bottom:1px solid #f4e4e7;font-weight:800;font-size:11px;white-space:nowrap;padding:13px 13px;z-index:1}table.data td{border-bottom:1px solid #f0f1f4;padding:12px 13px;white-space:nowrap;vertical-align:middle}table.data tr:hover td{background:#fffbfb}table.data tr:last-child td{border-bottom:0}.patient-name{font-weight:800;color:#253041}.patient-sub{color:#8c96a5;font-size:10px;margin-top:4px}.cell-action{border:1px solid #e3e7ed;background:#fff;min-width:62px;padding:8px 8px;border-radius:8px;font-size:10px;font-weight:800;line-height:1.15}.cell-action:hover{border-color:#ba3042}.cell-action.success{background:#edf9f2;border-color:#d1efdc;color:#16794b}.cell-action.draft{background:#fff8e7;border-color:#ffde93;color:#90600c}.cell-action.overdue{background:#fff0f0;border-color:#ffc9cc;color:#c32b3c}.cell-action.future{background:#f0f6fe;border-color:#d6e5fa;color:#4775aa}.cell-action.neutral{background:#f7f8fa;border-color:#e9ebef;color:#828c99}.cell-action.warning{background:#fff8e6;border-color:#ffe8aa;color:#95640d}.cell-action.risk{background:#fff1f2;border-color:#ffcdd4;color:#b91c35}.cell-action.subtle{background:#f8f8fa;border-color:#e7e8ef;color:#777}.pill{display:inline-block;font-weight:800;font-size:10px;border-radius:99px;padding:6px 10px;background:#f5f6f8;color:#5a6470;white-space:nowrap}.pill.red{background:#fff0f2;color:#af2336}.pill.green{background:#e8f7ee;color:#1a7448}.pill.amber{background:#fff5db;color:#996610}.pill.blue{background:#ecf4ff;color:#2871ad}.pill.gray{background:#f3f4f7;color:#7b818b}.tiny-link{font-size:11px;color:var(--red);background:none;border:none;font-weight:800;text-decoration:underline;text-underline-offset:3px}.empty-state{text-align:center;padding:65px 25px;color:var(--muted)}.empty-state .big-icon{font-size:38px;margin-bottom:14px}.empty-state h3{font-size:17px;color:var(--ink);margin:0 0 8px}.hint-strip{display:flex;flex-wrap:wrap;gap:15px;margin:12px 0 24px;color:#7e8794;font-size:11px}.hint-strip b{display:inline-block;width:9px;height:9px;margin-right:5px;border-radius:50%;background:#8e9aab}.hint-strip .completed b{background:#20a66d}.hint-strip .working b{background:#e5ae3d}.hint-strip .missed b{background:#d44752}.hint-strip .future b{background:#5f99d5}.demo-strip{background:#fff2d9;border-bottom:1px solid #f5d6a1;padding:12px 22px;font-size:12px;color:#745021;text-align:center}.view-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.report-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin-bottom:20px}.report-tile{padding:20px;border:1px solid var(--border);border-radius:15px;background:#fff;box-shadow:var(--shadow)}.report-tile b{display:block;font-size:13px}.report-tile p{font-size:11px;line-height:1.6;color:var(--muted);margin:9px 0 0}.report-emoji{font-size:25px;margin-bottom:11px}.panel-body{padding:24px}.filters-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}.user-mini{display:flex;align-items:center;gap:10px}.user-mini .avatar{color:var(--red);background:#fff1f3;border:1px solid #f7d0d6}.section-heading{font-size:14px;margin:0 0 16px}
.modal-overlay{position:fixed;inset:0;background:#13202ca8;z-index:60;display:flex;justify-content:flex-end;animation:fade-in .15s ease}.modal-sheet{height:100%;width:min(100%,650px);background:white;box-shadow:-20px 0 90px #16233322;display:flex;flex-direction:column;animation:slide-in .2s ease}.modal-head{flex-shrink:0;border-bottom:1px solid var(--border);padding:21px 24px;display:flex;justify-content:space-between;gap:15px;align-items:flex-start}.modal-eyebrow{color:var(--red);font-size:10px;font-weight:800;letter-spacing:.13em;text-transform:uppercase}.modal-head h2{font-size:20px;line-height:1.25;margin:5px 0;letter-spacing:-.03em}.modal-head p{font-size:11px;color:var(--muted);margin:5px 0 0}.close-btn{border:1px solid var(--border);color:var(--muted);background:white;width:37px;height:37px;display:grid;place-items:center;border-radius:10px;font-size:20px}.modal-body{padding:23px 25px;overflow-y:auto;min-height:0;flex:1}.modal-foot{flex-shrink:0;padding:15px 23px;border-top:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff}.modal-foot .btn{flex-shrink:0}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.form-grid .field.wide{grid-column:1/-1}.form-grid .field label{line-height:1.4}.form-section{display:flex;align-items:center;justify-content:space-between;margin:6px 0 17px;padding-bottom:11px;border-bottom:1px solid var(--border)}.form-section h4{font-size:13px;margin:0}.save-status{display:flex;gap:7px;align-items:center;color:var(--muted);font-size:11px;line-height:1.5}.save-status.ok{color:var(--green)}.save-status.pending{color:var(--amber)}.save-status.error{color:#ba263c}.form-help{font-size:11px;line-height:1.7;background:#f8f9fb;border-radius:10px;padding:12px;margin-bottom:18px;color:#6b7582}.list-card{border:1px solid var(--border);padding:16px;border-radius:13px;margin-bottom:12px;background:white}.list-card strong{display:block;font-size:13px}.list-card small{color:var(--muted)}.list-card .foot{display:flex;gap:8px;justify-content:flex-end;margin-top:12px}.tabs-small{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 16px}.tab-pill{border:1px solid #e7e6ed;border-radius:9px;padding:8px 10px;background:white;color:#78828f;font-weight:800;font-size:11px}.tab-pill.active{background:#fff0f2;border-color:#f4c4cd;color:var(--red)}.setup-card{padding:22px;border-radius:16px;background:white;border:1px solid var(--border);box-shadow:var(--shadow)}.setup-card p{font-size:12px;line-height:1.7;color:var(--muted)}.detail-panels{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.detail-panels .item{border:1px solid #ecedf3;border-radius:12px;padding:16px}.detail-panels .item small{color:var(--muted);display:block;margin-bottom:7px}.detail-panels .item b{font-size:14px}
@keyframes slide-in{from{transform:translateX(24px);opacity:.8}to{transform:translateX(0);opacity:1}}@keyframes fade-in{from{opacity:0}to{opacity:1}}
@media(max-width:1100px){.app-layout{grid-template-columns:215px minmax(0,1fr)}.sidebar{padding:22px 11px}.nav-item{padding:11px 10px}.content{padding:24px 22px 55px}.topbar{padding:0 22px}}
@media(max-width:760px){.login-page{grid-template-columns:1fr}.login-hero{min-height:270px;padding:27px 23px;display:block}.login-hero .brand{margin-bottom:28px}.hero-content{margin:0}.hero-content h1{font-size:32px;margin:14px 0}.hero-content p{font-size:13px;line-height:1.5;margin:0}.hero-numbers,.hero-foot{display:none}.login-right{padding:33px 24px 70px;display:block}.login-box{width:100%}.login-box h2{font-size:25px}.login-box .subtitle{margin-bottom:20px}.app-layout{display:block}.sidebar{height:auto;position:relative;border-radius:0;padding:12px 16px 14px;gap:8px}.sidebar .brand{padding:0 0 10px;border-bottom:0}.sidebar .brand-mark{width:36px;height:36px;font-size:17px}.sidebar .brand-copy b{font-size:13px}.sidebar .brand-copy small{font-size:9px}.side-label,.sidebar-footer{display:none}.nav-list{display:flex;overflow:auto;gap:7px;scrollbar-width:none}.nav-list::-webkit-scrollbar{display:none}.nav-item{width:auto;flex-shrink:0;padding:9px 11px;border:1px solid #ffffff30;border-radius:10px;font-size:11px}.nav-item .ic{font-size:14px;width:15px}.topbar{height:58px;padding:0 17px}.breadcrumb{font-size:11px}.top-date{display:none}.content{padding:21px 15px 60px}.pagehead h1{font-size:24px}.pagehead{align-items:start}.pagehead .btn{font-size:11px;padding:8px 11px}.toolbar-left,.toolbar-right{width:100%}.toolbar-left .searchbox{flex:1;min-width:0}.toolbar-left .filter-select{max-width:140px;min-width:0}.card-title{padding:15px}.modal-sheet{width:100%}.modal-head{padding:15px 17px}.modal-head h2{font-size:18px}.modal-body{padding:16px 17px}.modal-foot{padding:14px 17px}.modal-foot .btn{font-size:11px;padding:9px 12px}.form-grid{grid-template-columns:1fr}.form-grid .field.wide{grid-column:auto}.filters-grid{grid-template-columns:1fr}.view-grid,.detail-panels{grid-template-columns:1fr}.only-mobile{display:initial}.only-desktop{display:none}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}



/* Kompak Klaster 2: toolbar, tabel, pemeriksaan popup */
.pagehead{margin-bottom:13px}.pagehead h1{font-size:23px;margin:3px 0}.pagehead p{font-size:11px;margin:3px 0 0}.content{padding-top:16px}.toolbar{margin:0 0 10px;gap:8px}.toolbar-left{gap:7px}.searchbox input,.filter-select{height:34px;min-height:34px;font-size:11px}.searchbox input{padding-top:6px;padding-bottom:6px}.searchbox span{top:8px}.card-title{padding:11px 14px}.scroll-table{max-height:min(72vh,740px);overflow:auto;overscroll-behavior:contain}table.data{font-size:11px}table.data th{padding:7px 8px;top:0;z-index:2}table.data td{padding:6px 8px}.patient-sub{margin-top:1px}.cell-action{padding:5px 6px;min-width:53px;font-size:10px}.pill{padding:4px 7px}.hint-strip{margin:7px 0 12px;font-size:10px}.modal-head{padding:12px 17px}.modal-body{padding:14px 17px}.modal-foot{padding:10px 17px}.form-grid{gap:10px}.form-help{margin-bottom:10px;padding:9px}.form-section{margin-bottom:10px}.form-grid input,.form-grid select,.form-grid textarea{min-height:35px}.report-grid{gap:9px;margin-bottom:11px}.report-tile{padding:14px}.report-tile p{margin:3px 0 0}.panel-body{padding:15px}@media(max-width:760px){.content{padding:13px 10px 45px}.pagehead h1{font-size:20px}.pagehead .section-eyebrow,.pagehead p{display:none}.toolbar-left .searchbox{min-width:120px}.toolbar-right{display:none}.card-title{padding:9px 12px}.card-title small{font-size:10px}.scroll-table{max-height:68vh}.form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.form-grid .field.wide{grid-column:span 2}.form-grid .field label{font-size:10px}.modal-body{padding:12px}.modal-head h2{font-size:16px}}


/* v1.3: Mobile patient-first compact interface. Prevent 17-column desktop tables from widening viewport. */
html,body,#app{max-width:100%;min-width:0}
body{overflow-x:clip}
.main,.content,.table-card,.panel,.view-grid,.report-grid,.panel-body,.pagehead,.toolbar,.toolbar-left,.toolbar-right{min-width:0}
.mobile-patient-list,.mp-count{display:none}
@media (min-width:761px){.desktop-patient-table{display:block}.content{padding-top:14px}.sidebar{gap:11px;padding-top:16px}.topbar{height:52px}.pagehead h1{font-size:21px}.pagehead{margin-bottom:9px}.pagehead p{line-height:1.35}.toolbar{margin-bottom:8px}.nav-item{padding:9px 11px}.card-title{padding:8px 12px}.scroll-table{max-height:calc(100vh - 206px)}table.data{font-size:10.5px}table.data th{padding:6px 7px}table.data td{padding:5px 7px}.cell-action{padding:4px 5px;font-size:9px;min-width:43px}.patient-sub{font-size:9px}}
@media (max-width:760px){
 body{overflow-x:clip}.app-layout,.main,.content{width:100%;min-width:0;max-width:100%}
 .sidebar{padding:7px 10px 6px;gap:3px}.sidebar>.brand{display:none}.nav-list{gap:4px;overflow-x:auto}.nav-item{padding:7px 9px;line-height:1.2;border-radius:7px;white-space:nowrap}.nav-item .ic{font-size:12px;width:13px}
 .topbar{height:44px;min-height:44px;padding:0 9px;gap:5px;overflow:hidden}.breadcrumb{min-width:0;flex:1;gap:4px;font-size:10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.breadcrumb strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.top-actions{flex:0 0 auto;min-width:0;gap:4px}.live-pill{display:none}.topbar #demoRole{height:29px!important;min-height:29px!important;width:108px!important;min-width:0!important;max-width:108px!important;padding:3px 16px 3px 5px;font-size:10px;border-radius:7px}.topbar .btn{min-height:28px;padding:3px 6px!important;font-size:10px}
 .content{padding:8px 7px 26px!important}.pagehead{display:flex;align-items:center;flex-wrap:nowrap;justify-content:space-between;gap:8px;margin:0 0 7px!important;min-width:0}.pagehead>div{min-width:0}.pagehead h1{margin:0;font-size:17px!important;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pagehead .btn{min-height:29px;padding:5px 9px!important;border-radius:8px;flex-shrink:0;font-size:11px}
 .toolbar{margin:0 0 7px!important;display:block}.toolbar-left{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(90px,130px);width:100%;gap:5px!important}.searchbox{min-width:0!important;width:100%}.searchbox input,.filter-select{border-radius:7px!important;min-height:31px!important;height:31px!important;padding:5px 7px;font-size:11px}.searchbox input{padding-left:26px}.searchbox span{top:5px;left:8px;font-size:16px}.toolbar-left .filter-select{width:100%;max-width:none!important;min-width:0!important}.toolbar-right{display:none!important}
 .table-card{border-radius:10px}.card-title{padding:7px 10px!important;gap:5px}.card-title h3{font-size:11px}.card-title small{font-size:9px!important;text-align:right}.mp-count{display:inline-flex;background:#fff0f2;color:var(--red);padding:2px 5px;border-radius:6px;font-size:10px;margin-left:4px}
 .desktop-patient-table{display:none!important}.mobile-patient-list{display:grid;gap:0;width:100%}.mp-card{min-width:0;padding:8px 9px 6px;border-bottom:1px solid #ebe7e9;background:white}.mp-card:last-child{border-bottom:0}.mp-card-head{display:grid;grid-template-columns:18px minmax(0,1fr) auto;gap:5px;align-items:start;min-width:0}.mp-row-number{font-size:10px;font-weight:800;color:#979ba5;padding-top:2px}.mp-person{min-width:0;display:grid;gap:3px}.mp-person strong{font-size:12px;line-height:1.2;color:#293342;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mp-person span{font-size:9px;color:#7a8391;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.mp-hpht{font-size:9px;color:#838a97;text-align:right;line-height:1.2;white-space:nowrap;padding-left:5px}.mp-hpht b{font-size:10px;color:#454957}
 .mp-anc{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px;margin:7px 0 3px;min-width:0}.mp-check{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:0;width:100%;height:33px;border-radius:7px;border:1px solid #e9edf2;background:#f7f8fa;color:#79818c;padding:2px 0;font-weight:750}.mp-check b{font-size:10px;font-weight:850;letter-spacing:-.02em;white-space:nowrap}.mp-check small{font-size:11px;font-weight:900;line-height:1;white-space:nowrap}.mp-check.success{background:#e6f7ed;border-color:#c9ead8;color:#16794b}.mp-check.draft{background:#fff6df;border-color:#ffe2ad;color:#8d5d0b}.mp-check.overdue,.mp-check.risk{background:#fff0f1;border-color:#f8d5d8;color:#a91d33}.mp-check.warning{background:#fff7e9;border-color:#f3e1bc;color:#956511}.mp-check.future{background:#edf5ff;border-color:#d6e4f7;color:#537fa8}.mp-check.mp-off{color:#adb3bb;background:#fafafa}.mp-anc button:focus-visible,.mp-details summary:focus-visible{outline:2px solid var(--red);outline-offset:1px}
 .mp-details{margin:0}.mp-details summary{display:flex;align-items:center;justify-content:space-between;gap:4px;cursor:pointer;list-style:none;padding:3px 1px;color:#9c4656;font-size:9px;font-weight:700;line-height:1.3;min-height:19px}.mp-details summary::-webkit-details-marker{display:none}.mp-chevron{display:inline-block;font-size:15px;line-height:1;transition:transform .15s}.mp-details[open] .mp-chevron{transform:rotate(180deg)}.mp-extra{display:flex;flex-wrap:wrap;gap:6px;align-items:center;padding:6px 0 4px}.mp-extra .cell-action{font-size:10px;min-height:28px;padding:6px;border-radius:7px}.mp-extra .tiny-link{padding:6px;font-size:10px}
 .hint-strip{font-size:9px;margin:6px 0 0;gap:7px}.hint-strip b{width:6px;height:6px}.empty-state{padding:28px 12px}.empty-state h3{font-size:14px}
 .demo-strip{padding:5px 8px;font-size:10px;line-height:1.35}.patient-name{font-size:12px}.report-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin-bottom:7px}.report-tile{padding:9px;border-radius:9px}.report-tile .report-emoji{font-size:17px;margin-bottom:4px}.report-tile b{font-size:10px}.report-tile p{font-size:9px;line-height:1.3;margin:3px 0 0}.filters-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.filters-grid .field{min-width:0}.view-grid,.detail-panels{grid-template-columns:1fr}.setup-card{padding:12px;border-radius:9px}.setup-card h3{margin:5px 0;font-size:14px}
 .modal-overlay{width:100vw;max-width:100%;overflow:hidden;align-items:stretch}.modal-sheet{width:100%;max-width:100vw;min-width:0;height:100dvh;height:100vh;border-radius:0}.modal-head{padding:8px 11px}.modal-head h2{font-size:15px}.modal-head p{font-size:10px}.close-btn{width:29px;height:29px;border-radius:8px;font-size:17px;flex-shrink:0}.modal-body{padding:9px 11px}.form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.form-grid>.field{min-width:0;gap:3px}.form-grid .field label{font-size:10px;line-height:1.2}.form-grid .field input,.form-grid .field select,.form-grid .field textarea{min-width:0;width:100%;height:34px;min-height:34px;padding:5px 7px;font-size:12px;border-radius:7px}.form-grid .field textarea{min-height:58px;height:60px}.form-grid .field.wide{grid-column:1 / -1}.form-help{margin-bottom:7px;padding:7px 8px;font-size:10px;line-height:1.4}.form-section{margin:4px 0 8px;padding-bottom:6px}.form-section h4{font-size:11px}.modal-foot{padding:7px 9px;min-width:0;display:flex;flex-wrap:wrap;gap:5px}.modal-foot .save-status{flex:1;min-width:0;font-size:10px;line-height:1.25}.modal-foot>div:last-child{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:4px!important}.modal-foot .btn{min-height:32px;font-size:10px;padding:6px 8px;border-radius:7px}.modal-foot .btn-red{white-space:normal;text-align:center}
}
@media(max-width:359px){.mp-card{padding:6px 6px 4px}.mp-anc{gap:2px}.mp-check{height:31px}.mp-check b{font-size:9px}.mp-check small{font-size:10px}.toolbar-left{grid-template-columns:minmax(0,1fr) 98px}.modal-foot .save-status{flex-basis:100%}.form-grid{grid-template-columns:1fr}.form-grid .field.wide{grid-column:auto}}

/* Imported visits must never appear final before clinical verification */
.cell-action.imported{background:#f3efff;border-color:#e2d6fa;color:#68449d}.hint-strip .imported b{background:#9572bb}
@media(max-width:760px){.mp-check.imported{background:#f2effb;border-color:#dfd7f2;color:#68449d}.mp-check{min-height:36px}.mp-anc{margin-top:6px}.hint-strip{gap:6px}}
/* Login demonstrasi: lima akun sintetis, terpisah sepenuhnya dari sesi produksi. */
.demo-access-panel{margin-top:22px;padding:13px;border:1px solid #edcbd2;border-radius:15px;background:#fff9fa;max-width:100%;min-width:0}
.demo-access-header{margin:0 0 10px}
.demo-access-kicker{display:block;color:var(--red);font-size:10px;font-weight:900;letter-spacing:.12em;margin-bottom:4px}
.demo-access-header h3{font-size:16px;margin:0 0 3px;letter-spacing:-.025em;color:var(--red-dark)}
.demo-access-header p{font-size:11px;line-height:1.4;margin:0;color:var(--muted)}
.demo-access-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.demo-access-card{display:flex;align-items:center;gap:7px;text-align:left;border:1px solid #f0dbe0;border-radius:11px;padding:9px 7px;background:white;color:var(--ink);min-width:0;max-width:100%;overflow:hidden}
.demo-access-card:hover{background:#fff2f5;border-color:#d78b9b}
.demo-access-card:active{transform:scale(.99)}
.demo-access-card:last-child:nth-child(odd){grid-column:1/-1}
.demo-access-icon{font-size:17px;background:#fff0f2;color:var(--red);width:27px;height:27px;display:grid;place-items:center;flex:none;border-radius:8px}
.demo-access-copy{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.demo-access-copy strong{font-size:11px;line-height:1.2}
.demo-access-copy small{font-size:10px;line-height:1.2;color:#687383}
.demo-access-credential{font-size:9px;color:#805c64;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;overflow-wrap:anywhere}
.demo-access-go{font-size:19px;color:#a74b60;flex:none}
.demo-manual{margin-top:10px;border-top:1px solid #f2dce2;padding-top:9px}
.demo-manual summary{cursor:pointer;font-size:11px;color:var(--red);font-weight:800}
.demo-manual-form{display:grid;gap:9px;margin-top:11px}
.demo-manual-form .field input{min-height:35px;height:35px;padding:8px;font-size:12px}
.demo-manual-form .btn{min-height:35px}
.demo-login-error{color:#b91c1c;font-size:11px;line-height:1.4;margin:0}
@media(max-width:760px){
 .login-hero{min-height:0;padding:13px 16px}
 .login-hero .brand{margin:0}
 .login-hero .brand-mark{width:36px;height:36px;font-size:18px}
 .login-hero .brand-copy b{font-size:15px}
 .login-hero .brand-copy small{font-size:9px}
 .login-hero .hero-content,.login-hero .hero-numbers,.login-hero .hero-foot{display:none}
 .login-right{padding:18px 12px 28px}
 .login-box .redline{margin-bottom:10px}
 .login-box h2{font-size:22px}
 .login-box .subtitle{font-size:12px;line-height:1.45;margin-bottom:12px}
 .login-box .form-stack{gap:10px}
 .login-box .field input{min-height:39px}
 .login-box .login-note{margin-top:8px;font-size:10px;line-height:1.4}
 .demo-access-panel{margin-top:15px;padding:10px}
}
@media(max-width:389px){
 .demo-access-grid{grid-template-columns:1fr;gap:5px}
 .demo-access-card:last-child:nth-child(odd){grid-column:auto}
 .demo-access-card{padding:6px 8px}
 .demo-access-copy strong{font-size:11px}
}

.report-readiness{display:flex;align-items:flex-start;gap:6px;flex-wrap:wrap;line-height:1.55;padding:10px 14px;margin:0 0 12px;background:#fff8ef;border:1px solid #f5d8b0;border-radius:10px;font-size:11px;color:#75490a}.report-readiness strong{color:#7b3d10}.report-readiness span{flex-basis:100%}@media(max-width:760px){.report-readiness{font-size:10px;padding:9px 11px}}

/* Maternal identity editing and non-destructive >42wk history. */
.patient-name-link{display:inline-block;max-width:100%;padding:0;border:0;background:transparent;text-align:left;color:inherit;font:inherit;font-weight:750;cursor:pointer;text-decoration:underline;text-decoration-color:#cda6b2;text-underline-offset:3px;overflow-wrap:anywhere}
.patient-name-link:hover,.patient-name-link:focus-visible{color:#991a36;text-decoration-color:currentColor}
.maternal-husband{display:block;overflow-wrap:anywhere;font-size:10px;color:#815e69}
.maternal-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
.maternal-tabs button{border:1px solid #e5cbd3;border-radius:9px;background:#fff;color:#81364d;padding:7px 9px;font-size:11px;font-weight:700;cursor:pointer}
.maternal-tabs button.active{background:#991b36;border-color:#991b36;color:white}
.maternal-tabs b{font-variant-numeric:tabular-nums}
.maternal-hint{font-size:10px;line-height:1.5;color:#765965;margin:2px 0 10px}
@media(max-width:480px){.maternal-tabs{gap:4px}.maternal-tabs button{font-size:10px;padding:6px}.maternal-hint{font-size:9px}}


/* K visit summary: baseline register entries are recorded visits, not unverified imports. */
.anc-progress-badge{display:inline-flex;flex-direction:column;align-items:flex-start;gap:2px;width:max-content;max-width:100%;padding:5px 9px;border:1px solid #c4e8d5;border-radius:9px;background:#eef9f3;color:#17673e;white-space:normal;vertical-align:middle}
.anc-progress-badge b{font-size:12px;font-weight:900;line-height:1.1}
.anc-progress-badge small{font-size:9px;color:#357451;line-height:1.15}
.anc-progress-badge.no-record{background:#f7f8fa;border-color:#e0e4ea;color:#596272}
.anc-progress-badge.no-record small{color:#77808e}
.cell-action.recorded{background:#eaf7f2;border-color:#cae9dc;color:#17673e}
.hint-strip .recorded b{background:#2e9971}
.mp-check.recorded{background:#eaf7f2;border-color:#cae9dc;color:#17673e}
.mp-person>.anc-progress-badge{justify-self:start;white-space:normal;overflow:visible;text-overflow:clip}
.mp-person>.anc-progress-badge b{font-size:11px}
@media(max-width:760px){.anc-progress-badge{padding:4px 7px}.mp-person>.anc-progress-badge small{font-size:9px}}

/* Compact mother identity: exactly one identity line and one supporting data line. */
.desktop-patient-table .compact-patient-meta{display:block;max-width:245px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.desktop-patient-table td:nth-child(3) .anc-progress-badge{padding:3px 7px;flex-direction:row;align-items:center;white-space:nowrap}
.desktop-patient-table td:nth-child(3) .anc-progress-badge small{display:none}
.mp-person .mp-meta{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mp-person .patient-name-link{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;overflow-wrap:normal}
.mp-hpht{display:flex;flex-direction:column;gap:3px;align-items:flex-end;max-width:115px;min-width:0}
.mp-hpht>.anc-progress-badge{align-items:center;max-width:110px;padding:3px 6px;white-space:nowrap}
.mp-hpht>.anc-progress-badge small{display:none}
.mp-hpht>small{font-size:9px;white-space:nowrap;color:#777}
.mp-card-head .mp-person{grid-auto-rows:min-content;gap:3px}
.mp-card .audit-tools,.mp-card .audit-profile,.mp-card .audit-risk-row,.desktop-patient-table .audit-tools,.desktop-patient-table .audit-profile,.desktop-patient-table .audit-risk-row{display:none!important}
/* Animate the NEXT suggested K only, not completed history or unrelated slots. */
@keyframes kia-current-k-pulse{
  0%,100%{background-color:#fff7e6;border-color:#f0c16f;box-shadow:0 0 0 0 rgba(194,47,70,.16)}
  50%{background-color:#ffd7a0;border-color:#ba233e;box-shadow:0 0 0 4px rgba(194,47,70,.18)}
}
.is-current-k{animation:kia-current-k-pulse 1.8s ease-in-out infinite;position:relative;z-index:0}
.is-current-k:hover,.is-current-k:focus-visible{animation-play-state:paused;outline:2px solid #971c37;outline-offset:2px}
@media(prefers-reduced-motion:reduce){.is-current-k{animation:none!important;background:#fff0d9!important;border:2px solid #b42540!important}}
@media(max-width:760px){.mp-card{padding:6px 8px 5px}.mp-anc{margin-top:5px}.mp-person .mp-meta{font-size:9px}.mp-hpht>.anc-progress-badge b{font-size:10px}}

/* ANC record integrity: pulse the first missing K slot; a solid K6 check is shown
   only when all K1-K6 have source records. Never infer clinical discharge from K6 alone. */
@keyframes kia-record-gap-pulse {
  0%,100% {background-color:#fff4d8;border-color:#a11f3f;box-shadow:0 0 0 1px rgba(155,30,56,.30)}
  50% {background-color:#fbbd79;border-color:#a11f3f;box-shadow:0 0 0 5px rgba(155,30,56,.27)}
}
.mp-check.is-current-k,.cell-action.is-current-k{
  animation:kia-record-gap-pulse 1.55s ease-in-out infinite;
  border:2px solid #a11f3f;
  font-weight:900;
}
.mp-check.is-anc-complete,.cell-action.is-anc-complete{
  background:#087545!important;border:2px solid #08643b!important;color:#fff!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.38);
  animation:none!important;
}
.mp-check.is-anc-complete small{color:#fff}
@media (prefers-reduced-motion:reduce){
 .mp-check.is-current-k,.cell-action.is-current-k{
  animation:none!important;
  background:#ffdeaa!important;border:2px solid #a11f3f!important;
  box-shadow:0 0 0 3px rgba(155,30,56,.26)!important;
 }
}

/* Buku KIA maternal: one concise K1–K6 visit sheet, one-time profile at the top. */
.anc-profile-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:10px 0 4px}
.anc-profile-strip>span{display:grid;gap:3px;min-width:0;padding:9px;border:1px solid #e7dce0;background:#fcf9fa;border-radius:9px}
.anc-profile-strip small{font-size:10px;color:#79626b}
.anc-profile-strip b{font-size:12px;color:#522c39;overflow-wrap:anywhere}
.anc-profile-help{font-size:10px;color:#765866;line-height:1.5;margin:5px 0 12px}
.anc-age-line{background:#f1f8f4;border:1px solid #d1e8d9;border-radius:8px;padding:9px 11px;margin-bottom:11px;font-size:11px;color:#345d43}
.anc-age-line strong{color:#16633f}
.anc-optional-details,.anc-legacy-details{margin-top:10px;border:1px solid #e6dce0;border-radius:9px;overflow:hidden}
.anc-optional-details>summary,.anc-legacy-details>summary{padding:11px 12px;font-size:12px;font-weight:750;cursor:pointer;background:#fbf6f8;color:#87233a;display:flex;justify-content:space-between;align-items:center}
.anc-optional-details summary small,.anc-legacy-details summary small{color:#8d7880;font-size:10px}
.anc-optional-details>.form-grid,.anc-legacy-details>.form-grid{padding:10px 12px 14px}
.anc-section-note{padding:0 12px;font-size:10px;line-height:1.5;color:#776971}
.anc-legacy-list{padding:11px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.anc-legacy-list>div{padding:8px;background:#fbf9fa;border-radius:7px;display:grid;gap:3px;min-width:0}
.anc-legacy-list small{font-size:10px;color:#82707a}
.anc-legacy-list b{font-size:11px;color:#41343a;overflow-wrap:anywhere}
@media(max-width:760px){.anc-profile-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.anc-legacy-list{grid-template-columns:1fr}.anc-optional-details>summary,.anc-legacy-details>summary{font-size:11px}}

/* Delivery / neonatal service reports use independent scrollable tables and responsive filters. */
.service-report{display:grid;gap:12px;min-width:0}
.service-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;background:#fff;border:1px solid #e6e5e9;border-radius:11px;padding:10px}
.service-toolbar select,.service-toolbar input{font:inherit;border:1px solid #dedfe5;border-radius:7px;background:#fff;color:#293342;min-height:34px;padding:6px 8px;min-width:100px}
.service-toolbar input[type=search]{flex:1 1 175px;min-width:140px}
.service-toolbar input[type=number]{max-width:100px}
.service-toolbar button,.service-form-action{border:1px solid #a0283e;background:#a0283e;color:#fff;border-radius:8px;min-height:32px;padding:6px 10px;font-weight:700;cursor:pointer;font-size:11px}
.service-toolbar button:disabled{opacity:.45;cursor:not-allowed}
.service-context{font-size:11px;line-height:1.6;color:#67525b;background:#faf5f7;padding:10px 12px;border-left:3px solid #b22840;border-radius:7px;margin:0}
.service-categories{display:flex;gap:7px;flex-wrap:wrap}
.service-categories button{font:inherit;font-size:11px;padding:8px 10px;border:1px solid #e0d5da;border-radius:8px;background:#fff;color:#805666;cursor:pointer}
.service-categories button.active{border-color:#8b0e1f;background:#8b0e1f;color:#fff;font-weight:700}
.service-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:9px}
.service-metric{border:1px solid #e6e2e6;border-radius:10px;background:white;padding:13px 12px;display:flex;flex-direction:column;gap:4px;min-width:0}
.service-metric small{color:#775865;font-size:10px;font-weight:700}
.service-metric b{font-size:24px;font-weight:900;color:#8b0e1f;line-height:1.1}
.service-metric span{font-size:10px;color:#737782;line-height:1.4}
.service-table-scroll{overflow:auto;max-width:100%;border:1px solid #e4e2e6;background:white;border-radius:10px;max-height:72vh}
.service-table{width:100%;border-collapse:separate;border-spacing:0;font-size:11px;min-width:950px}
.service-table th{position:sticky;top:0;background:#faf4f6;color:#80354a;font-weight:800;z-index:1;border-bottom:1px solid #eddae1;padding:10px 9px;text-align:left;white-space:nowrap}
.service-table td{border-bottom:1px solid #f0edef;vertical-align:top;padding:9px;line-height:1.45;min-width:78px}
.service-table tr:last-child td{border-bottom:0}
.service-secondary{display:block;color:#7b7f89;font-size:10px;margin-top:2px;white-space:nowrap}
.service-status{display:inline-flex;align-items:center;white-space:nowrap;border-radius:6px;font-size:10px;font-weight:700;padding:4px 7px;margin:2px}
.service-status.final{background:#e5f7eb;color:#12693e}
.service-status.recorded{background:#f0ecfa;color:#69449c}
.service-status.draft{background:#fff0d9;color:#916015}
.service-status.missing{background:#f1f3f6;color:#66717e}
.service-kf{display:flex;flex-direction:column;gap:4px}
.service-kf>span:before{content:attr(title) " · ";font-size:10px;color:#795d69}
.service-actions{display:flex;gap:5px;flex-wrap:wrap;min-width:160px}
.service-form-action{background:white;color:#8b0e1f;min-height:28px;padding:5px 8px}
.service-alert{font-size:10px;color:#a02540;font-weight:800}
.service-outcome{font-weight:750}
.service-empty{border:1px dashed #dbccd2;background:white;padding:24px;border-radius:10px;color:#755a66;font-size:12px}
.service-locked{font-size:11px;color:#815b67;background:#fff6f7;border-radius:8px;padding:8px 9px}
.service-toolbar select:focus-visible,.service-toolbar input:focus-visible,.service-form-action:focus-visible,.service-categories button:focus-visible{outline:2px solid #8b0e1f;outline-offset:2px}
@media(max-width:760px){.service-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.service-toolbar select,.service-toolbar input,.service-toolbar button{width:100%;min-width:0;max-width:none}.service-toolbar input[type=search]{grid-column:1/-1}.service-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.service-metric{padding:10px}.service-metric b{font-size:21px}.service-table{font-size:10px}.service-context{font-size:10px}.service-categories button{font-size:10px}.service-toolbar button{grid-column:1/-1}}
