:root{--teal:#008E95;--orange:#FAAE1F;--ink:#173435;--muted:#6c7d7d;--bg:#f4f8f8;--card:#fff;--line:#dbe7e7;--danger:#c93b3b;--shadow:0 12px 35px rgba(20,58,60,.08);--radius:20px}*{box-sizing:border-box}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--ink)}a{color:inherit;text-decoration:none}.app{display:grid;grid-template-columns:270px 1fr;min-height:100vh}.sidebar{background:#073f42;color:#fff;padding:22px 16px;position:sticky;top:0;height:100vh}.brand{display:flex;gap:12px;align-items:center;padding:8px 8px 22px}.brand-mark{width:46px;height:46px;border-radius:14px;background:linear-gradient(145deg,var(--orange),#ffd06a);display:grid;place-items:center;color:#073f42;font-weight:1000;font-size:22px}.brand h2{font-size:16px;margin:0}.brand small{opacity:.75}.nav a{display:flex;gap:10px;align-items:center;padding:12px 13px;border-radius:12px;margin:4px 0;color:#d7eeee}.nav a:hover,.nav a.active{background:#ffffff16;color:#fff}.nav .section{font-size:11px;text-transform:uppercase;letter-spacing:.12em;opacity:.5;padding:18px 12px 5px}.main{min-width:0}.topbar{height:72px;background:#ffffffdd;backdrop-filter:blur(10px);display:flex;align-items:center;justify-content:space-between;padding:0 26px;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:5}.topbar .title{font-weight:900;font-size:20px}.content{padding:26px;max-width:1500px}.grid{display:grid;gap:18px}.stats{grid-template-columns:repeat(5,minmax(0,1fr))}.card{background:var(--card);border:1px solid #e5eeee;border-radius:var(--radius);box-shadow:var(--shadow);padding:20px}.stat .num{font-size:32px;font-weight:950;line-height:1}.stat .label{color:var(--muted);margin-top:8px;font-size:13px}.stat.orange{border-top:5px solid var(--orange)}.stat.teal{border-top:5px solid var(--teal)}.toolbar{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-bottom:16px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:12px;padding:11px 15px;font-weight:850;cursor:pointer;background:#eaf2f2;color:var(--ink)}.btn.primary{background:var(--teal);color:#fff}.btn.accent{background:var(--orange);color:#173435}.btn.danger{background:#ffe8e8;color:#8b2929}.btn.small{padding:8px 10px;font-size:13px}.table-wrap{overflow:auto;border-radius:16px;border:1px solid var(--line)}table{width:100%;border-collapse:collapse;min-width:760px;background:#fff}th,td{padding:13px 14px;border-bottom:1px solid #edf2f2;text-align:left;font-size:14px}th{background:#f7fbfb;color:#557171;font-size:12px;text-transform:uppercase;letter-spacing:.05em}tr:hover td{background:#fbfefe}.pill{display:inline-flex;padding:6px 9px;border-radius:999px;background:#e7f7f6;color:#096e72;font-size:12px;font-weight:800}.pill.orange{background:#fff1d5;color:#855b00}.pill.red{background:#ffeded;color:#992e2e}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.field label{display:block;font-size:13px;font-weight:850;margin-bottom:7px}.field input,.field select,.field textarea{width:100%;border:1px solid #cfe0e0;border-radius:12px;background:#fff;padding:12px 13px;font:inherit;outline:none}.field textarea{min-height:105px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--teal);box-shadow:0 0 0 3px #008e9518}.req{color:#d33}.muted{color:var(--muted)}.flash{padding:12px 14px;border-radius:12px;margin-bottom:14px}.flash.success{background:#e9fbf5;color:#176547}.flash.error{background:#fff0f0;color:#8b2f2f}.profile{display:grid;grid-template-columns:110px 1fr;gap:18px;align-items:center}.avatar{width:96px;height:96px;border-radius:24px;object-fit:cover;background:#dceaea;display:grid;place-items:center;font-weight:900;color:#4f6f70;font-size:26px}.split{display:grid;grid-template-columns:1.1fr .9fr;gap:18px}.login-shell{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at top left,#008e9521,transparent 40%),radial-gradient(circle at bottom right,#faae1f33,transparent 40%),#f7fbfb;padding:20px}.login-card{width:min(440px,100%);background:#fff;border:1px solid #e2eded;border-radius:26px;box-shadow:0 28px 80px #153c3c18;padding:30px}.login-card .logo{width:68px;height:68px;background:var(--orange);border-radius:20px;display:grid;place-items:center;font-size:28px;font-weight:950;color:#073f42}.login-card h1{margin:18px 0 4px}.footer-note{font-size:12px;color:#789;margin-top:20px}.mobile-nav{display:none}.empty{text-align:center;padding:36px;color:var(--muted)}@media(max-width:1100px){.stats{grid-template-columns:repeat(3,1fr)}.split{grid-template-columns:1fr}}@media(max-width:820px){.app{display:block}.sidebar{display:none}.topbar{padding:0 16px;height:64px}.content{padding:16px 14px 86px}.stats{grid-template-columns:repeat(2,1fr)}.form-grid{grid-template-columns:1fr}.mobile-nav{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;bottom:0;left:0;right:0;background:#073f42;color:#e8ffff;z-index:10;padding:7px 4px max(7px,env(safe-area-inset-bottom));box-shadow:0 -8px 30px #0002}.mobile-nav a{text-align:center;font-size:10px;padding:5px}.mobile-nav b{display:block;font-size:18px}.topbar .title{font-size:17px}}@media(max-width:500px){.stats{grid-template-columns:1fr 1fr}.stat .num{font-size:26px}.card{padding:16px;border-radius:17px}.toolbar{align-items:stretch}.toolbar .btn{flex:1}.profile{grid-template-columns:76px 1fr}.avatar{width:72px;height:72px;border-radius:18px}}
.report-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.report-heading{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:16px}.report-heading h2{margin:0 0 4px}.report-range{text-align:right;line-height:1.5}.report-table{min-width:1200px}.report-table td,.report-table th{white-space:nowrap}.report-table td:nth-child(11){white-space:normal;min-width:220px}@media(max-width:1100px){.report-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:620px){.report-filter-grid{grid-template-columns:1fr}.report-heading{display:block}.report-range{text-align:left;margin-top:10px}}
@media print{body{background:#fff;color:#000}.sidebar,.topbar,.mobile-nav,.no-print{display:none!important}.app{display:block}.content{padding:0;max-width:none}.main{display:block}.report-print{box-shadow:none;border:0;padding:0;margin:0!important}.report-heading{margin:0 0 12px}.table-wrap{overflow:visible;border:0}.report-table{min-width:0;width:100%;font-size:9px}.report-table th,.report-table td{padding:5px 6px;font-size:9px;border:1px solid #bbb;white-space:normal}.report-table th{background:#eee!important;color:#000;-webkit-print-color-adjust:exact;print-color-adjust:exact}.report-table td:nth-child(11){min-width:0}@page{size:landscape;margin:10mm}}
/* V1.2 — 2026 responsive clinic UX */
.wide{width:100%}.tiny{font-size:12px;margin-top:5px}.full{grid-column:1/-1}.login-brand{display:flex;gap:18px;align-items:center;margin-bottom:22px}.login-brand img{width:88px;height:88px;object-fit:contain;border-radius:18px}.login-brand h1{margin:0 0 4px}.brand-logo{width:54px;height:54px;object-fit:contain;border-radius:14px;background:#fff}.brand{padding-top:4px}.user-chip{display:flex;align-items:center;gap:10px}.user-chip small{display:block;color:var(--muted);font-size:11px}.user-dot{width:36px;height:36px;border-radius:12px;background:#e7f7f6;color:#067276;display:grid;place-items:center;font-weight:950}.user-dot.large{width:44px;height:44px;border-radius:14px}.hero{background:linear-gradient(135deg,#006c72,#008E95 55%,#06aab2);border-radius:28px;color:#fff;padding:30px;display:flex;align-items:center;justify-content:space-between;gap:28px;box-shadow:0 20px 55px rgba(0,104,111,.18);overflow:hidden;position:relative}.hero:after{content:"";position:absolute;width:260px;height:260px;border-radius:50%;background:#ffffff10;right:-80px;top:-120px}.hero h1{font-size:32px;line-height:1.1;margin:6px 0 9px}.hero p{margin:0;color:#d8ffff}.eyebrow{font-size:11px;font-weight:900;letter-spacing:.16em;color:#ffe3a0}.hero-logo{width:140px;height:140px;object-fit:contain;background:#fff;border-radius:28px;padding:7px;z-index:1;box-shadow:0 12px 32px #00474b33}.hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}.hero-secondary{background:#ffffff1c!important;color:#fff!important;border:1px solid #ffffff38}.modern-stats{margin-top:18px}.stat{position:relative;overflow:hidden}.stat-icon{position:absolute;right:14px;top:14px;width:40px;height:40px;border-radius:13px;display:grid;place-items:center;background:#f1f8f8;font-size:12px;font-weight:950;color:var(--teal)}.patient-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px}.patient-mini{display:grid;grid-template-columns:46px 1fr auto;align-items:center;gap:12px;border:1px solid var(--line);border-radius:16px;padding:11px 12px;background:#fbfefe}.patient-mini:hover{border-color:#9fcfd0;box-shadow:0 8px 20px #003c3c0b}.patient-mini img,.mini-avatar{width:46px;height:46px;border-radius:13px;object-fit:cover}.mini-avatar{background:#dff2f1;display:grid;place-items:center;font-weight:950;color:#08767b}.patient-mini small{display:block;color:var(--muted);margin-top:3px}.searchbar{display:flex;gap:8px;flex:1;max-width:720px}.searchbar input{width:100%;border:1px solid #cfe0e0;border-radius:12px;padding:12px 13px;font:inherit}.patient-list{display:grid;gap:9px}.patient-row{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:13px;background:#fff;border:1px solid #e2eded;border-radius:16px;padding:12px 14px;box-shadow:0 5px 20px #003c3c08}.patient-row:hover{border-color:#a7d4d5;transform:translateY(-1px)}.patient-row img{width:48px;height:48px;border-radius:14px;object-fit:cover}.patient-row-main small{display:block;color:var(--muted);margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.patient-row-meta{display:flex;gap:8px;align-items:center;color:var(--muted);font-size:12px}.register-layout{grid-template-columns:.78fr 1.22fr}.suggestions{display:grid;gap:8px;margin-top:12px}.suggestion{display:grid;grid-template-columns:1fr auto;gap:10px;padding:12px;border:1px solid var(--line);border-radius:14px;background:#fbfefe}.suggestion b{display:block}.suggestion small{display:block;color:var(--muted);margin-top:3px}.camera-box{border:1px dashed #acd0d1;border-radius:18px;padding:14px;background:#f8fcfc;margin-bottom:18px}.camera-preview-wrap{width:min(360px,100%);aspect-ratio:1/1;border-radius:18px;overflow:hidden;background:#0f2d2f;margin:auto;position:relative}.camera-preview-wrap video,.camera-preview-wrap img{width:100%;height:100%;object-fit:cover}.camera-placeholder{position:absolute;inset:0;display:grid;place-items:center;color:#b7cccc;font-weight:800}.camera-actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:12px}.camera-note{text-align:center;font-size:12px;margin-top:9px}.patient-head{display:flex;align-items:center;justify-content:space-between;gap:18px}.patient-title{display:flex;align-items:center;gap:13px;min-width:0}.patient-title h2{margin:0 0 7px}.patient-title.compact h2{font-size:20px}.avatar-small{width:64px;height:64px;border-radius:17px;object-fit:cover;flex:0 0 auto}.avatar-fallback{background:#dfeeee;display:grid;place-items:center;font-weight:950;color:#0b7377}.patient-tags{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:6px}.patient-actions{display:flex;gap:8px;flex-wrap:wrap}.patient-summary{grid-template-columns:repeat(4,minmax(0,1fr));margin-top:18px}.patient-summary .card{padding:16px}.patient-summary span{display:block;color:var(--muted);font-size:12px;margin-bottom:5px}.patient-summary b{font-size:18px}.timeline{display:grid;gap:0}.timeline-item{display:grid;grid-template-columns:150px 1fr;gap:22px;position:relative;padding:16px 0}.timeline-item:not(:last-child){border-bottom:1px solid #edf2f2}.timeline-date{font-weight:900}.timeline-date small{display:block;font-weight:500;color:var(--muted);margin-top:4px}.timeline-top{display:flex;justify-content:space-between;align-items:center;gap:10px}.timeline-body p{margin:10px 0}.fee-chip{display:inline-flex;padding:6px 10px;border-radius:999px;background:#fff2d4;color:#7a5500;font-size:12px;font-weight:900}.money-input{display:flex;align-items:center;border:1px solid #cfe0e0;border-radius:12px;background:#fff;overflow:hidden}.money-input span{padding:0 0 0 13px;font-weight:900}.money-input input{border:0!important;box-shadow:none!important}.segmented{display:flex;background:#eaf3f3;border-radius:14px;padding:4px;gap:4px}.segmented a{padding:9px 12px;border-radius:10px;font-weight:800;font-size:13px}.segmented a.active{background:#fff;box-shadow:0 4px 14px #1233;color:var(--teal)}.followup-grid{grid-template-columns:repeat(auto-fit,minmax(320px,1fr))}.followup-card .patient-title{display:grid;grid-template-columns:56px 1fr auto}.button-row{display:flex;gap:8px;flex-wrap:wrap}.followup-form{margin-top:13px}.followup-form .two{display:grid;grid-template-columns:1fr 1fr;gap:8px}.followup-form select,.followup-form input{width:100%;padding:10px;border:1px solid #cfe0e0;border-radius:10px;margin-bottom:8px;background:white}.doctor-list,.user-cards{display:grid;gap:9px}.doctor-row,.user-card{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:14px;padding:10px;background:#fbfefe;flex-wrap:wrap}.doctor-avatar{width:42px;height:42px;border-radius:13px;background:#e5f6f5;color:#087277;display:grid;place-items:center;font-weight:950}.doctor-main,.user-card-main{flex:1;min-width:160px}.doctor-main small,.user-card-main small{display:block;color:var(--muted);margin-top:3px}.reset-box{width:100%;border-top:1px solid #e8eeee;padding-top:7px}.reset-box summary{cursor:pointer;color:var(--muted);font-size:12px}.reset-box form{display:flex;gap:8px;margin-top:8px}.reset-box input{flex:1;padding:9px;border:1px solid #cfe0e0;border-radius:10px}.settings-grid{display:grid;grid-template-columns:1.25fr .75fr;gap:18px;align-items:start}.settings-logo{width:70px;height:70px;object-fit:contain}.check-label{display:flex!important;gap:8px;align-items:center}.check-label input{width:auto!important}.users-layout{grid-template-columns:1.3fr .7fr}
@media(max-width:1100px){.patient-summary{grid-template-columns:repeat(2,1fr)}.settings-grid,.users-layout,.register-layout{grid-template-columns:1fr}}
@media(max-width:820px){.hero{padding:22px;border-radius:22px}.hero h1{font-size:25px}.hero-logo{width:92px;height:92px;border-radius:12px}.patient-head{align-items:flex-start;flex-direction:column}.patient-actions{width:100%}.patient-actions .btn{flex:1}.patient-row{grid-template-columns:48px 1fr}.patient-row-meta{grid-column:2;justify-content:flex-start;flex-wrap:wrap}.timeline-item{grid-template-columns:1fr;gap:8px}.patient-summary{grid-template-columns:1fr 1fr}.login-brand{align-items:flex-start}.login-brand img{width:72px;height:72px}}
@media(max-width:520px){.hero-logo{display:none}.hero-actions .btn{flex:1}.patient-summary{grid-template-columns:1fr 1fr}.camera-actions .btn{flex:1 1 45%}.followup-form .two{grid-template-columns:1fr}.reset-box form{flex-direction:column}}


/* =========================================================
   V1.3 FINAL UI — professional responsive shell
   ========================================================= */
html{scroll-behavior:smooth}body{overflow-x:hidden}.app{display:flex!important;min-height:100vh;width:100%;align-items:stretch}.sidebar{flex:0 0 248px!important;width:248px!important;min-width:248px!important;max-width:248px!important;padding:18px 14px!important;position:sticky!important;top:0;height:100vh;overflow-y:auto;overflow-x:hidden;z-index:50;background:linear-gradient(180deg,#063f42 0%,#06494c 100%);box-shadow:10px 0 32px rgba(5,63,66,.08)}.main{flex:1 1 auto!important;width:auto!important;min-width:0!important;overflow-x:hidden}.content{width:100%!important;max-width:none!important;padding:24px clamp(18px,2.2vw,34px) 34px!important}.brand{display:flex!important;align-items:center!important;gap:11px!important;padding:4px 6px 16px!important;min-width:0}.sidebar .brand-logo{display:block!important;flex:0 0 52px!important;width:52px!important;height:64px!important;max-width:52px!important;max-height:64px!important;object-fit:contain!important;object-position:center!important;background:#fff!important;border:1px solid rgba(250,174,31,.72)!important;border-radius:8px!important;padding:3px!important;box-shadow:0 8px 22px rgba(0,0,0,.13)}.brand>div{min-width:0}.brand h2{font-size:14px!important;line-height:1.25!important;margin:0 0 3px!important;white-space:normal!important;word-break:normal!important}.brand small{display:block;font-size:11px;line-height:1.3;opacity:.74;white-space:normal}.nav{padding-bottom:20px}.nav a{min-height:43px;font-weight:650;transition:background .16s ease,transform .16s ease,color .16s ease}.nav a:hover{transform:translateX(2px)}.nav a.active{background:rgba(255,255,255,.13);box-shadow:inset 3px 0 0 var(--orange)}.nav .section{padding-top:17px!important}.topbar{height:70px!important;padding:0 clamp(18px,2.2vw,34px)!important;z-index:40!important;box-shadow:0 1px 0 rgba(12,61,63,.04)}.topbar .title{font-size:19px!important;line-height:1.2}.user-chip{max-width:min(46vw,360px);min-width:0;padding:6px 9px;border:1px solid #e5eeee;border-radius:14px;background:#fff;box-shadow:0 4px 14px rgba(12,61,63,.04)}.user-chip>div:last-child{min-width:0}.user-chip b{display:block;font-size:13px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-chip small{margin-top:2px}.card{min-width:0!important;border-color:#e3eded!important;box-shadow:0 10px 30px rgba(22,70,72,.065)!important}.grid>*{min-width:0}.users-layout{display:grid!important;grid-template-columns:minmax(0,1.15fr) minmax(330px,.85fr)!important;gap:18px!important;align-items:start!important}.users-layout>.card{width:100%;overflow:visible}.user-cards{min-width:0}.user-card{min-width:0!important;padding:12px 13px!important;background:linear-gradient(180deg,#fff,#fbfefe)!important}.user-card-main{min-width:0!important}.user-card-main b,.user-card-main small{overflow-wrap:anywhere}.reset-box form{min-width:0}.reset-box input{min-width:0}.settings-grid>*{min-width:0}.settings-logo{display:block!important;width:58px!important;height:70px!important;max-width:58px!important;max-height:70px!important;object-fit:contain!important;background:#fff;border:1px solid #e4eded;border-radius:8px;padding:3px}.hero{min-height:210px}.hero-logo{display:block!important;width:118px!important;height:142px!important;max-width:118px!important;max-height:142px!important;object-fit:contain!important;padding:5px!important;border:1px solid rgba(250,174,31,.5)!important}.login-brand img{display:block!important;width:76px!important;height:92px!important;max-width:76px!important;max-height:92px!important;object-fit:contain!important;background:#fff!important;border:1px solid rgba(250,174,31,.55)!important;border-radius:10px!important;padding:4px!important}.login-card{width:min(470px,100%)!important}.btn{transition:transform .14s ease,box-shadow .14s ease,filter .14s ease}.btn:hover{transform:translateY(-1px);filter:saturate(1.04)}.btn.primary:hover{box-shadow:0 8px 18px rgba(0,142,149,.18)}.field input,.field select,.field textarea,.searchbar input{transition:border-color .15s ease,box-shadow .15s ease;background:#fff}.patient-row,.patient-mini{transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease}.avatar-small,.patient-row img,.patient-mini img{background:#edf5f5}.camera-preview-wrap{max-width:310px!important}.camera-box{background:linear-gradient(180deg,#fbfefe,#f5fbfb)!important}.report-filter-grid>*{min-width:0}

@media(max-width:1180px){.sidebar{flex-basis:226px!important;width:226px!important;min-width:226px!important;max-width:226px!important}.users-layout{grid-template-columns:1fr!important}.stats{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:900px){.sidebar{display:none!important}.main{width:100%!important}.topbar{height:64px!important;padding:0 15px!important}.content{padding:15px 13px 88px!important}.mobile-nav{display:grid!important}.user-chip{max-width:52vw;padding:4px 7px}.user-dot{width:32px;height:32px;border-radius:10px}.user-chip b{font-size:12px}.topbar .title{font-size:16px!important}.hero{padding:22px!important;min-height:0}.hero-logo{width:82px!important;height:98px!important}.users-layout{display:grid!important;grid-template-columns:1fr!important}.settings-grid,.register-layout{grid-template-columns:1fr!important}}
@media(max-width:620px){.content{padding-left:11px!important;padding-right:11px!important}.topbar .title{max-width:45vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-chip{border:0;box-shadow:none;background:transparent;padding:0}.user-chip small{display:none}.user-chip b{max-width:130px}.stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}.hero h1{font-size:23px!important}.hero-logo{display:none!important}.card{border-radius:16px!important;padding:15px!important}.patient-summary{grid-template-columns:1fr 1fr!important}.login-brand{gap:13px!important}.login-brand img{width:62px!important;height:76px!important}.login-brand h1{font-size:23px}.camera-preview-wrap{max-width:280px!important}}
@media(max-width:390px){.stats{grid-template-columns:1fr!important}.patient-summary{grid-template-columns:1fr!important}.topbar .title{max-width:38vw}.user-chip b{max-width:112px}}
@media print{.sidebar{display:none!important}.main{width:100%!important}.content{padding:0!important}}
/* V1.4 workflow usability */
.global-search{display:flex;gap:8px;align-items:center;flex:1;max-width:520px;margin:0 24px}.global-search input{min-width:0;width:100%;height:40px;border:1px solid #d9e7e7;border-radius:12px;padding:0 13px;background:#f8fbfb}.summary-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-top:14px}.summary-strip>div{padding:14px;border:1px solid #e7eeee;border-radius:14px;background:#fbfdfd}.summary-strip b{display:block;font-size:22px;color:#163a3c}.summary-strip span{display:block;font-size:12px;color:#6a7f80;margin-top:4px}.daily-summary{overflow:hidden}@media(max-width:900px){.global-search{order:3;max-width:none;width:100%;margin:10px 0 0}.topbar{flex-wrap:wrap;height:auto;min-height:64px;padding-top:10px;padding-bottom:10px}.summary-strip{grid-template-columns:repeat(2,1fr)}.summary-strip>div:last-child{grid-column:span 2}}@media(max-width:520px){.global-search button{display:none}.summary-strip{grid-template-columns:repeat(2,1fr)}}

/* V1.5 staff profiles + slightly larger navigation icons */
.nav a>span{width:24px;min-width:24px;height:24px;display:inline-grid;place-items:center;font-size:19px;line-height:1;font-weight:900}
.mobile-nav b{font-size:21px!important;line-height:1.05;margin-bottom:2px}
.staff-photo{width:48px;height:48px;border-radius:14px;object-fit:cover;flex:0 0 48px;background:#edf5f5;border:1px solid #dce8e8}
.staff-profile-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.staff-profile-form .full{grid-column:1/-1}
.staff-profile-form input[type=file]{padding:10px;background:#fbfefe}
@media(max-width:760px){.staff-profile-form{grid-template-columns:1fr}.staff-profile-form .full{grid-column:auto}.nav a>span{font-size:20px}}

/* V1.6 profile/photo refinements */
.user-chip-photo{width:36px;height:36px;border-radius:12px;object-fit:cover;flex:0 0 36px;border:1px solid #dceaea;background:#edf5f5}.doctor-photo{width:42px;height:42px;border-radius:13px;object-fit:cover;flex:0 0 42px;border:1px solid #dce8e8;background:#edf5f5}.doctor-photo-preview{display:flex;justify-content:center;margin:0 0 14px}.doctor-photo-preview img,.owner-profile-preview img{width:96px;height:96px;border-radius:22px;object-fit:cover;border:1px solid #dce8e8;background:#edf5f5}.owner-profile-preview{display:flex;justify-content:flex-start;margin:8px 0 14px}.smtp-test-row{display:flex;gap:10px;align-items:center;margin-top:16px;padding-top:16px;border-top:1px solid #e7eeee}.smtp-test-row input{flex:1;min-width:0;padding:11px 12px;border:1px solid #cfe0e0;border-radius:12px;font:inherit}.suggestion{grid-template-columns:46px minmax(0,1fr) auto}.suggestion-photo{width:46px;height:46px;border-radius:13px;object-fit:cover}.btn.danger{background:#fff0f0!important;color:#a11!important;border-color:#efc5c5!important}.patient-actions form{margin:0}@media(max-width:620px){.smtp-test-row{flex-direction:column;align-items:stretch}.suggestion{grid-template-columns:44px minmax(0,1fr)}.suggestion>a{grid-column:2}}

/* V1.7 WhatsApp Campaigns */
.consent-box{padding:13px 14px;border:1px solid #dceaea;border-radius:14px;background:#f7fbfb}.compact-check{margin-top:9px;font-size:13px}.campaign-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(300px,.7fr);gap:18px;align-items:start}.campaign-filter{display:grid;grid-template-columns:2fr repeat(7,minmax(110px,1fr));gap:8px;margin:14px 0}.campaign-filter input,.campaign-filter select,.campaign-compose input,.campaign-compose select,.campaign-compose textarea{width:100%;padding:10px 11px;border:1px solid #cfe0e0;border-radius:11px;background:#fff;font:inherit}.campaign-compose{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:14px;border:1px solid #e2eded;border-radius:16px;background:#fbfefe;margin-bottom:12px}.campaign-compose .full{grid-column:1/-1}.selection-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 2px}.campaign-patient-list{display:grid;gap:8px;max-height:620px;overflow:auto;padding-right:4px}.campaign-patient{display:grid;grid-template-columns:24px 46px minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px 11px;border:1px solid #e0ebeb;border-radius:14px;background:#fff;cursor:pointer}.campaign-patient:hover{border-color:#a9d2d3;background:#fbfefe}.campaign-patient>input{width:18px;height:18px}.campaign-patient img{width:46px;height:46px;border-radius:13px;object-fit:cover}.campaign-patient-main small{display:block;color:var(--muted);margin-top:3px}.campaign-patient-meta{font-size:11px;color:var(--muted);text-align:right;line-height:1.5}.campaign-history{display:grid;gap:8px}.campaign-history a{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;padding:11px;border:1px solid #e3eded;border-radius:12px;background:#fbfefe}.campaign-history a small{color:var(--muted)}.campaign-history a span{grid-row:1/3;grid-column:2;align-self:center;font-size:12px;font-weight:900;color:var(--teal)}.campaign-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:16px}.campaign-stats>div{border:1px solid #e3eded;border-radius:14px;padding:14px;background:#fbfefe}.campaign-stats b{display:block;font-size:22px}.campaign-stats span{display:block;font-size:12px;color:var(--muted);margin-top:3px}.campaign-preview{display:grid;grid-template-columns:180px minmax(0,1fr);gap:16px;align-items:start;margin-top:16px;padding:14px;border:1px solid #e2eded;border-radius:16px;background:#fbfefe}.campaign-preview img{width:180px;max-height:180px;object-fit:cover;border-radius:12px}.campaign-preview h3{margin:0 0 8px}.campaign-preview p{margin:0;white-space:normal}.pill.red{background:#ffe5e5;color:#a12727}@media(max-width:1250px){.campaign-filter{grid-template-columns:repeat(4,minmax(0,1fr))}.campaign-filter input:first-of-type{grid-column:span 2}}@media(max-width:980px){.campaign-grid{grid-template-columns:1fr}.campaign-filter{grid-template-columns:repeat(2,minmax(0,1fr))}.campaign-compose{grid-template-columns:1fr}.campaign-compose .full{grid-column:auto}}@media(max-width:620px){.campaign-filter{grid-template-columns:1fr}.campaign-filter input:first-of-type{grid-column:auto}.campaign-patient{grid-template-columns:22px 42px minmax(0,1fr)}.campaign-patient img,.campaign-patient .mini-avatar{width:42px;height:42px}.campaign-patient-meta{grid-column:3;text-align:left}.campaign-stats{grid-template-columns:repeat(2,1fr)}.campaign-preview{grid-template-columns:1fr}.campaign-preview img{width:100%;max-height:260px}.selection-toolbar{align-items:flex-start;flex-direction:column}}

/* V1.8 patient UX */
.nav-icon{width:20px;height:20px;display:inline-grid;place-items:center;flex:0 0 20px}.nav-icon svg{width:19px;height:19px;display:block}.whatsapp-nav-icon{color:#d7eeee}
.patient-profile-photo{width:96px;height:96px;border-radius:22px;object-fit:cover;display:grid;place-items:center;flex:0 0 96px;border:1px solid #dce8e8;background:#edf5f5;font-size:30px;font-weight:900;color:#4f6f70}
.patient-head .patient-title{align-items:center}.patient-head .patient-title>div:last-child{min-width:0}
.next-opd-summary{position:relative}.inline-edit{margin-top:8px}.inline-edit summary{cursor:pointer;color:var(--teal);font-size:12px;font-weight:850;list-style:none}.inline-edit summary::-webkit-details-marker{display:none}.inline-edit form{display:flex;gap:8px;align-items:center;margin-top:8px}.inline-edit input[type=date]{min-width:0;border:1px solid #cfe0e0;border-radius:10px;padding:8px 9px;font:inherit}.inline-edit.compact{display:inline-block;margin:0 0 0 8px}.inline-edit.compact form{padding-top:4px}.timeline-next-opd{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.camera-box{border:1px dashed #8fc1c3;border-radius:18px;padding:16px;background:linear-gradient(180deg,#fbfefe,#f5fbfb);overflow:hidden}.camera-preview-wrap{width:min(100%,310px);aspect-ratio:1/1;margin:0 auto;position:relative;border-radius:20px;overflow:hidden;background:#103a3c}.camera-preview-wrap video,.camera-preview-wrap img{width:100%;height:100%;object-fit:cover;display:block}.camera-placeholder{position:absolute;inset:0;display:grid;place-items:center;color:#dceeee;font-weight:800}.camera-actions{display:flex;justify-content:center;gap:9px;flex-wrap:wrap;margin-top:12px}.camera-status{text-align:center;min-height:20px;margin-top:8px;font-size:12px;font-weight:750}.camera-status.success{color:#08756f}.camera-status.error{color:#a12f2f}.camera-note{text-align:center;margin-top:4px;font-size:12px}.register-layout>.card{min-width:0}.register-layout .form-grid{align-items:start}.register-layout .field{min-width:0}.register-layout .field input,.register-layout .field select{min-height:46px}.register-layout .field textarea{min-height:96px}
@media(max-width:620px){
 .patient-profile-photo{width:84px;height:84px;flex-basis:84px;border-radius:19px}.patient-head .patient-title{align-items:flex-start}.patient-head .patient-title h2{font-size:22px;margin-top:2px}.patient-actions{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.patient-actions .btn,.patient-actions form,.patient-actions form .btn{width:100%}.patient-actions form{display:block!important}.camera-box{padding:12px}.camera-preview-wrap{width:min(100%,270px);border-radius:18px}.camera-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.camera-actions .btn{width:100%;padding:11px 8px}.camera-actions #usePhoto{grid-column:1/-1}.register-layout{gap:12px!important}.register-layout .card{padding:14px!important}.register-layout .form-grid{gap:12px!important}.register-layout .field input,.register-layout .field select,.register-layout .field textarea{width:100%!important;max-width:100%!important;margin:0!important}.register-layout .field label{margin-bottom:6px}.inline-edit form{flex-wrap:wrap}.inline-edit input[type=date]{width:100%}.inline-edit.compact{display:block;margin:7px 0 0}.inline-edit.compact form{width:100%}
}

/* V1.8.1 refinements */
.hero-logo{border-radius:24px!important;}
.edit-current-photo{display:flex;align-items:center;gap:14px;padding:14px 16px;margin:14px 0 12px;border:1px solid #dfeaea;border-radius:18px;background:#fbfefe;position:relative;min-height:118px}.edit-current-photo-label{position:absolute;top:10px;right:14px;font-size:11px;font-weight:850;color:var(--muted)}.edit-current-photo img,.edit-current-photo-fallback{width:92px;height:92px;flex:0 0 92px;border-radius:20px;object-fit:cover;border:1px solid #d7e5e5;background:#edf5f5}.edit-current-photo-fallback{display:grid;place-items:center;font-size:30px;font-weight:900;color:#08767b}.edit-current-photo b{display:block;font-size:16px}.edit-current-photo small{display:block;color:var(--muted);margin-top:5px;line-height:1.4}.edit-camera-box .camera-preview-wrap:has(video[hidden]){display:none}.edit-camera-box:has(.camera-preview-wrap[style*="display: none"]){padding-top:12px}
@media(max-width:820px){.hero-logo{border-radius:20px!important}}
@media(max-width:620px){.edit-current-photo{align-items:flex-start;padding:14px}.edit-current-photo img,.edit-current-photo-fallback{width:82px;height:82px;flex-basis:82px;border-radius:18px}.edit-current-photo-label{position:static;display:none}.edit-current-photo small{font-size:11px}}


/* V1.10 Mobile UX & workflow refinements */
.mobile-search-toggle{display:none;border:1px solid #d9e6e6;background:#f4f9f9;color:#16393a;width:42px;height:42px;border-radius:13px;font-size:26px;line-height:1;align-items:center;justify-content:center;cursor:pointer}
.nav a>span:not(.nav-icon){font-size:20px;width:23px;flex:0 0 23px;text-align:center}.nav-icon{width:23px!important;flex-basis:23px!important}.nav-icon svg{width:21px!important;height:21px!important}
.native-camera-actions{display:none}.registration-success{max-width:850px;margin-bottom:14px;display:flex;align-items:center;justify-content:space-between;gap:14px;border-left:5px solid var(--teal)}.registration-success>div:first-child{display:flex;flex-direction:column;gap:3px}.registration-success>div:first-child b{font-size:18px;color:#08767b}.registration-success-actions{display:flex;gap:8px;flex-wrap:wrap}
.consent-box{overflow:hidden}.consent-box .check-label{display:flex;align-items:flex-start;gap:10px;max-width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere;word-break:normal;line-height:1.45}.consent-box .check-label input{flex:0 0 auto;margin-top:3px;width:18px!important;height:18px!important;min-height:18px!important}
.followup-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:16px}.followup-summary-card{background:#fff;border:1px solid #dce8e8;border-radius:18px;padding:16px 18px;text-decoration:none;color:inherit;box-shadow:0 6px 20px rgba(4,58,60,.04)}.followup-summary-card b{display:block;font-size:27px;color:#173f40}.followup-summary-card span{display:block;color:var(--muted);font-weight:750;margin-top:2px}.followup-summary-card.active{border-color:#008e95;box-shadow:0 0 0 2px rgba(0,142,149,.12)}.followup-summary-card.overdue.active{border-color:#c95252;box-shadow:0 0 0 2px rgba(201,82,82,.10)}.professional-followups{grid-template-columns:repeat(2,minmax(0,1fr))}.professional-card{display:flex;flex-direction:column;gap:11px}.followup-patient-info{min-width:0;flex:1}.followup-disease{min-height:24px}.followup-actions{margin-top:2px}.followup-reschedule,.followup-log{border-top:1px solid #e6eeee;padding-top:9px}.followup-reschedule summary,.followup-log summary{cursor:pointer;color:#08767b;font-weight:850;font-size:13px;list-style:none}.followup-reschedule summary::-webkit-details-marker,.followup-log summary::-webkit-details-marker{display:none}.followup-reschedule form{display:flex;gap:8px;margin-top:10px}.followup-reschedule input{min-width:0;flex:1}.followup-log .followup-form{margin-top:10px}.followup-empty{grid-column:1/-1}
.report-easy{overflow:visible}.report-export-actions,.report-filter-actions{display:flex;gap:8px;flex-wrap:wrap}.report-quick-row{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0 10px}.report-quick{padding:10px 14px;border-radius:999px;border:1px solid #d7e5e5;background:#f5f9f9;color:#193d3e;text-decoration:none;font-weight:800;font-size:13px}.report-quick.active{background:#008e95;color:#fff;border-color:#008e95}.report-current-range{display:flex;gap:7px;align-items:center;flex-wrap:wrap;padding:10px 12px;border-radius:12px;background:#f3f8f8;color:#5f7374;font-size:13px}.report-current-range b{color:#173f40}.report-advanced{margin-top:12px;border-top:1px solid #e0eaea;padding-top:12px}.report-advanced>summary{cursor:pointer;font-weight:850;color:#08767b;list-style:none}.report-advanced>summary::-webkit-details-marker{display:none}.report-advanced form{margin-top:14px}.simplified-report-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.report-filter-actions{margin-top:14px}
@media(max-width:820px){
 .topbar{grid-template-columns:minmax(0,1fr) auto auto;gap:8px;padding:10px 14px}.topbar .title{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:20px}.mobile-search-toggle{display:flex}.global-search{display:none;position:absolute;top:68px;left:12px;right:12px;z-index:40;background:#fff;padding:10px;border:1px solid #dce8e8;border-radius:16px;box-shadow:0 12px 32px rgba(3,46,48,.18)}.global-search.mobile-open{display:flex}.global-search input{width:100%;min-width:0}.user-chip{max-width:150px;padding:5px 8px}.user-chip>div:last-child{min-width:0}.user-chip b{display:block;max-width:88px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-chip small{display:none}.user-chip-photo,.user-dot{width:38px;height:38px;flex:0 0 38px}
 .register-layout{display:block!important}.register-layout>.card{width:100%;max-width:100%;margin-bottom:12px}.register-layout .form-grid{grid-template-columns:1fr!important}.register-layout .field.full{grid-column:1!important}.desktop-camera-actions{display:none!important}.native-camera-actions{display:block;margin-top:12px}.native-camera-actions{display:grid!important;grid-template-columns:1fr;gap:8px}.native-camera-btn,.native-retake-btn{width:100%;min-height:48px}.camera-preview-wrap{display:none}.camera-box.has-native-preview .camera-preview-wrap{display:block}.camera-box.has-native-preview #capturedPreview{display:block!important}.camera-box.has-native-preview #cameraPlaceholder,.camera-box.has-native-preview #cameraVideo{display:none!important}.camera-note{line-height:1.4}.consent-box{padding:14px!important;border-radius:16px}.consent-box .check-label{font-size:14px}.registration-success{flex-direction:column;align-items:stretch}.registration-success-actions{display:grid;grid-template-columns:1fr}.registration-success-actions .btn{width:100%}
 .professional-followups{grid-template-columns:1fr}.followup-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.followup-summary-card{padding:12px 8px;text-align:center;border-radius:15px}.followup-summary-card b{font-size:23px}.followup-summary-card span{font-size:11px}.followup-toolbar{align-items:flex-start}.followup-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))}.followup-actions .btn{width:100%}.followup-actions .btn:last-child{grid-column:1/-1}.followup-reschedule form{display:grid;grid-template-columns:1fr}.followup-reschedule .btn{width:100%}
 .simplified-report-grid{grid-template-columns:1fr!important}.report-quick-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.report-quick{text-align:center;padding:11px 8px}.report-export-actions{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.report-export-actions .btn{padding:10px 5px;font-size:12px}.report-current-range{font-size:12px}.report-summary{grid-template-columns:1fr!important}
}
@media(max-width:460px){.topbar .title{font-size:18px}.user-chip{max-width:92px}.user-chip b{max-width:46px}.user-chip-photo,.user-dot{width:36px;height:36px;flex-basis:36px}.mobile-search-toggle{width:40px;height:40px}.content{padding-left:12px!important;padding-right:12px!important}.followup-summary-card span{font-size:10px}.checkin-card{padding:14px!important}}


/* V1.10.1 — unified professional icon system + compact mobile header */
.ui-icon,.nav-svg,.mobile-nav-svg,.header-search-icon,.user-fallback-icon{
  width:1.08em;height:1.08em;display:inline-block;vertical-align:-.16em;fill:none;
  stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto;
}
.btn .ui-icon{width:17px;height:17px;margin-right:5px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:4px}
.nav a{display:flex;align-items:center;gap:11px}
.nav-svg{width:21px;height:21px;stroke-width:2.05;flex:0 0 21px}
.mobile-nav a{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:3px}
.mobile-nav-svg{width:23px;height:23px;stroke-width:2.05}
.topbar-right{display:flex;align-items:center;gap:9px;margin-left:auto;min-width:0}
.mobile-search-toggle{border:0!important;background:transparent!important;box-shadow:none!important;padding:0!important}
.header-search-icon{width:25px;height:25px;stroke-width:2.35}
.mobile-search-toggle:hover{background:#eef7f7!important;border-radius:11px!important}
.user-fallback-icon{width:20px;height:20px}
.user-dot{display:grid;place-items:center}
.followup-reschedule summary,.followup-log summary,.inline-edit summary{display:flex;align-items:center;gap:6px}
.followup-reschedule summary .ui-icon,.followup-log summary .ui-icon,.inline-edit summary .ui-icon{width:16px;height:16px}
.report-export-actions{display:flex;gap:8px;flex-wrap:wrap}
.patient-actions .btn,.followup-actions .btn{gap:5px}
.hero-actions .btn .ui-icon{width:18px;height:18px}

@media(max-width:900px){
  .topbar{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;flex-wrap:nowrap!important}
  .topbar-right{grid-column:2;grid-row:1;gap:7px}
  .global-search{grid-column:1/-1;grid-row:2;margin:8px 0 0!important}
  .user-chip{display:flex!important;align-items:center!important;gap:7px!important;max-width:170px!important}
  .user-chip b{max-width:102px!important;font-size:12px!important}
  .mobile-search-toggle{width:38px!important;height:38px!important;display:grid!important;place-items:center!important}
}
@media(max-width:520px){
  .topbar .title{max-width:none!important;font-size:17px!important}
  .topbar-right{gap:5px}
  .user-chip{max-width:132px!important}
  .user-chip b{max-width:72px!important}
  .user-chip-photo,.user-dot{width:34px!important;height:34px!important;flex:0 0 34px!important}
  .header-search-icon{width:24px;height:24px}
}
@media(max-width:390px){
  .topbar .title{font-size:16px!important}
  .user-chip{max-width:115px!important}
  .user-chip b{max-width:58px!important}
}

/* V1.10.2 — user supplied exact SVG icon shapes */
.ui-icon path,.nav-svg path,.mobile-nav-svg path{vector-effect:non-scaling-stroke}

/* V1.10.3 — fix native 640x640 filled SVGs supplied by user */
.filled-svg-icon{
  fill:currentColor!important;
  stroke:none!important;
}
.filled-svg-icon path{
  fill:currentColor!important;
  stroke:none!important;
  vector-effect:non-scaling-stroke;
}


/* V1.10.4 SAFE DATE PATCH */
.form-grid,.field{min-width:0}
.field input,.field select,.field textarea{max-width:100%;box-sizing:border-box}
.kp-date-field{position:relative;width:100%;min-width:0;max-width:100%;box-sizing:border-box}
.kp-date-display{display:block;width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;padding-right:52px!important;background:#fff!important;cursor:pointer}
.kp-date-trigger{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:38px;height:38px;border:0;border-radius:11px;display:grid;place-items:center;cursor:pointer;background:#edf7f7;color:#087d82}
.kp-date-trigger svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.kp-date-overlay{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:16px;box-sizing:border-box;background:rgba(5,37,39,.38);backdrop-filter:blur(3px)}
.kp-date-overlay[hidden]{display:none!important}
.kp-date-card{width:min(390px,100%);box-sizing:border-box;padding:16px;border:1px solid #d9e7e7;border-radius:22px;background:#fff;box-shadow:0 28px 80px rgba(0,48,51,.24)}
.kp-date-header{display:grid;grid-template-columns:42px minmax(0,1fr) 42px;gap:8px;align-items:center;margin-bottom:14px}
.kp-date-selects{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,.85fr);gap:8px;min-width:0}
.kp-date-month,.kp-date-year{width:100%;min-width:0;height:42px;padding:0 9px;box-sizing:border-box;border:1px solid #d6e5e5;border-radius:12px;background:#f8fbfb;color:#17393a;font:inherit;font-weight:800}
.kp-date-nav{width:42px;height:42px;border:0;border-radius:12px;background:#edf7f7;color:#087d82;font-size:28px;line-height:1;cursor:pointer}
.kp-date-week,.kp-date-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}
.kp-date-week{margin-bottom:6px}.kp-date-week span{text-align:center;font-size:10px;font-weight:900;color:#718485;text-transform:uppercase}
.kp-date-day{aspect-ratio:1;min-width:0;border:0;border-radius:11px;background:transparent;color:#17393a;font:inherit;font-weight:750;cursor:pointer}
.kp-date-day:hover{background:#edf7f7}.kp-date-day.outside{color:#bcc8c8}.kp-date-day.today{color:#008e95;box-shadow:inset 0 0 0 1.5px #008e95}.kp-date-day.selected{background:#008e95;color:#fff;box-shadow:none}
.kp-date-footer{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}
body.kp-date-open{overflow:hidden}
@media(max-width:820px){.field,.field.full{min-width:0;max-width:100%}.kp-date-card{border-radius:20px;padding:14px}}
@media(max-width:520px){.kp-date-overlay{padding:10px}.kp-date-card{width:100%;border-radius:18px}.kp-date-header{grid-template-columns:38px minmax(0,1fr) 38px}.kp-date-nav{width:38px;height:38px}.kp-date-month,.kp-date-year{height:40px;font-size:13px}.kp-date-day{border-radius:9px}}


/* V1.10.5 SAFE HEADER + SELF PROFILE */
.user-menu-wrap{position:relative;display:flex;align-items:center;min-width:0}
.user-chip-button{font:inherit;color:inherit;cursor:pointer;text-align:left}
.user-popover{position:absolute;right:0;top:calc(100% + 10px);width:min(340px,calc(100vw - 24px));background:#fff;border:1px solid #dfeaea;border-radius:18px;box-shadow:0 20px 55px rgba(7,58,60,.18);padding:14px;z-index:180}
.user-popover[hidden]{display:none!important}
.user-popover-head{display:flex;align-items:center;gap:11px;padding-bottom:12px;border-bottom:1px solid #edf2f2}
.user-popover-head img,.user-popover-fallback{width:50px;height:50px;border-radius:14px;object-fit:cover;background:#e8f5f5;display:grid;place-items:center;color:var(--teal)}
.user-popover-head b{display:block}.user-popover-head span{display:block;color:var(--muted);font-size:12px;margin-top:3px}
.user-popover-meta{display:grid;gap:9px;padding:12px 2px}
.user-popover-meta div{display:flex;justify-content:space-between;gap:12px;font-size:12px}
.user-popover-meta span{color:var(--muted)}.user-popover-meta b{max-width:205px;text-align:right;overflow-wrap:anywhere}
.user-popover-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}

.profile-page-grid{display:grid;grid-template-columns:minmax(260px,.72fr) minmax(0,1.28fr);gap:18px;align-items:start;max-width:1080px}
.profile-overview-card{text-align:center}
.profile-big-avatar{width:118px;height:118px;margin:0 auto 12px;border-radius:28px;overflow:hidden;background:#eaf5f5;color:var(--teal);display:grid;place-items:center}
.profile-big-avatar img{width:100%;height:100%;object-fit:cover}
.profile-fallback-svg{width:48px;height:48px}
.profile-overview-card h2{margin:4px 0 8px}
.profile-designation{margin-top:8px}
.profile-readonly-list{display:grid;gap:8px;margin:18px 0;text-align:left}
.profile-readonly-list div{padding:10px 12px;border:1px solid #e5eeee;border-radius:12px;background:#fbfefe}
.profile-readonly-list span{display:block;color:var(--muted);font-size:11px}
.profile-readonly-list b{display:block;margin-top:3px}
.profile-password-box{margin-top:16px;border:1px solid #e5eeee;border-radius:14px;padding:12px}
.profile-password-box summary{cursor:pointer;font-weight:800;display:flex;align-items:center;gap:7px}

/* Make inline Next OPD editor use the same modern rounded date block as normal form fields */
.timeline-next-opd .inline-edit form,
.next-opd-summary .inline-edit form{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  flex-wrap:wrap!important;
  margin-top:10px!important;
}
.timeline-next-opd .inline-edit .kp-date-field,
.next-opd-summary .inline-edit .kp-date-field{
  width:260px!important;
  max-width:100%!important;
  flex:0 1 260px!important;
}
.timeline-next-opd .inline-edit .kp-date-display,
.next-opd-summary .inline-edit .kp-date-display{
  height:52px!important;
  min-height:52px!important;
  border:1px solid #cfe0e0!important;
  border-radius:15px!important;
  padding:0 54px 0 15px!important;
  font-size:16px!important;
  background:#fff!important;
  box-shadow:none!important;
}
.timeline-next-opd .inline-edit .kp-date-trigger,
.next-opd-summary .inline-edit .kp-date-trigger{
  right:7px!important;
  width:40px!important;
  height:40px!important;
  border-radius:11px!important;
}
.timeline-next-opd .inline-edit .btn,
.next-opd-summary .inline-edit .btn{min-height:44px!important}

/* Mobile/tablet: only avatar; search appears only after lens tap */
@media(max-width:900px){
 .topbar{position:relative!important;grid-template-columns:minmax(0,1fr) auto!important}
 .topbar-right{grid-column:2!important;grid-row:1!important}
 .user-chip-button{border:0!important;background:transparent!important;box-shadow:none!important;padding:0!important}
 .user-chip-text{display:none!important}
 .user-chip{max-width:none!important}
 .user-chip-photo,.user-dot{width:38px!important;height:38px!important;flex:0 0 38px!important;border-radius:12px!important}
 .global-search{display:none!important;position:fixed!important;top:72px!important;left:12px!important;right:12px!important;width:auto!important;max-width:none!important;margin:0!important;z-index:170!important;background:#fff!important;padding:10px!important;border:1px solid #dce8e8!important;border-radius:15px!important;box-shadow:0 14px 34px rgba(3,46,48,.2)!important}
 .global-search.mobile-open{display:flex!important}
 .user-popover{position:fixed;right:12px;top:72px;width:min(340px,calc(100vw - 24px))}
 .profile-page-grid{grid-template-columns:1fr}
}
@media(max-width:560px){
 .timeline-next-opd .inline-edit form,
 .next-opd-summary .inline-edit form{display:grid!important;grid-template-columns:1fr!important}
 .timeline-next-opd .inline-edit .kp-date-field,
 .next-opd-summary .inline-edit .kp-date-field{width:100%!important;flex-basis:auto!important}
 .timeline-next-opd .inline-edit .btn,
 .next-opd-summary .inline-edit .btn{width:100%!important}
 .user-popover-actions{grid-template-columns:1fr}
}


/* V1.10.6 SAFE CAMERA PATCH */
.camera-simple-box{padding:18px!important}
.camera-idle{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}
.camera-help{width:100%;text-align:center;margin-top:2px}
.camera-primary-action{min-width:170px}
.camera-workspace{max-width:430px;margin:14px auto 0}
.camera-workspace[hidden]{display:none!important}
.camera-preview-wrap{width:min(100%,400px)!important;max-width:400px!important;margin:0 auto}
.camera-preview-wrap video,.camera-preview-wrap img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:18px}
.camera-live-actions{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:14px}
.camera-live-actions[hidden],.camera-review-actions[hidden]{display:none!important}
.camera-shutter{width:72px;height:72px;border-radius:50%;border:6px solid #dff1f1;background:var(--orange);color:#173435;display:grid;place-items:center;cursor:pointer;box-shadow:0 7px 20px rgba(0,0,0,.12)}
.camera-shutter-svg{width:29px;height:29px;fill:currentColor!important;stroke:none!important}
.camera-review-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}
.camera-review-actions .btn{min-height:48px}
.camera-status{margin-top:10px;text-align:center}
.camera-status.success{color:#087d52}
.camera-status.error{color:#b42318}

@media(max-width:900px){
 .camera-simple-box{padding:14px!important}
 .camera-idle{display:grid;grid-template-columns:1fr;gap:8px}
 .camera-idle .btn{width:100%;min-height:50px}
 .camera-workspace{max-width:100%}
 .camera-live-actions{display:none!important}
}
@media(max-width:520px){
 .camera-review-actions{grid-template-columns:1fr 1fr}
 .camera-preview-wrap video,.camera-preview-wrap img{border-radius:16px}
}

/* V1.10.7 mobile/tablet photo reliability */
@media(max-width:900px){
 .camera-status.success{font-weight:700}
 .camera-review-actions .btn{min-height:50px}
}


/* V1.10.8 same-area patient photo preview */
.camera-preview-wrap{
  position:relative;
  overflow:hidden;
  background:#eef7f7;
  border:1px solid rgba(0,142,149,.18);
  border-radius:18px;
}
.camera-preview-wrap video,
.camera-preview-wrap img,
.camera-placeholder{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  display:block;
}
.camera-placeholder{
  display:grid;
  place-items:center;
  min-height:260px;
  color:#648181;
  font-weight:600;
}
.camera-status.success{
  margin-top:10px;
  padding:8px 12px;
  border-radius:10px;
  background:rgba(0,142,149,.08);
}
.camera-status.error{
  margin-top:10px;
  padding:8px 12px;
  border-radius:10px;
  background:rgba(180,35,24,.07);
}
@media(max-width:900px){
  .camera-workspace{margin-top:12px}
  .camera-preview-wrap{max-width:420px!important}
  .camera-review-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr;
    gap:10px;
  }
}


/* V1.10.9 — inline expanding header search + reliable captured-photo preview */
@media(max-width:900px){
  /* Normal state remains title + lens + avatar */
  .topbar{
    min-height:64px!important;
    height:64px!important;
    padding:0 14px!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
    gap:8px!important;
  }

  /* When lens is tapped, the Dashboard/title area itself becomes the search field */
  .topbar.search-expanded .title{
    display:none!important;
  }
  .topbar.search-expanded .global-search{
    display:flex!important;
    position:static!important;
    grid-column:1!important;
    grid-row:1!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:44px!important;
    margin:0!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    z-index:auto!important;
  }
  .topbar.search-expanded .global-search input{
    width:100%!important;
    height:44px!important;
    min-width:0!important;
    padding:0 14px!important;
    border:1px solid #cfe1e1!important;
    border-radius:14px!important;
    background:#f6fafa!important;
    font-size:15px!important;
    outline:none!important;
    box-shadow:0 0 0 0 transparent!important;
  }
  .topbar.search-expanded .global-search input:focus{
    border-color:#008E95!important;
    box-shadow:0 0 0 3px rgba(0,142,149,.12)!important;
    background:#fff!important;
  }
  .topbar.search-expanded .global-search button{
    display:none!important;
  }
  .topbar.search-expanded .mobile-search-toggle{
    display:none!important;
  }
  .topbar.search-expanded .topbar-right{
    grid-column:2!important;
    grid-row:1!important;
  }

  /* Critical fix: old mobile CSS hid the preview frame.
     Workspace itself remains hidden until a photo is captured/selected. */
  .camera-simple-box .camera-workspace:not([hidden]) .camera-preview-wrap{
    display:block!important;
  }
  .camera-simple-box.has-captured-preview .camera-preview-wrap{
    display:block!important;
  }
  .camera-simple-box.has-captured-preview #capturedPreview{
    display:block!important;
  }
  .camera-simple-box.has-captured-preview #cameraVideo,
  .camera-simple-box.has-captured-preview #cameraPlaceholder{
    display:none!important;
  }
}

/* All screens: captured image stays in the exact camera frame until patient form is saved */
.camera-simple-box.has-captured-preview .camera-preview-wrap{
  display:block!important;
}
.camera-simple-box.has-captured-preview #capturedPreview{
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
}


/* V1.10.10 — captured patient photo preview visible on ALL devices */
.camera-simple-box.has-captured-preview .camera-workspace,
.camera-workspace.preview-active{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
}

.camera-simple-box.has-captured-preview .camera-preview-wrap,
.camera-workspace.preview-active .camera-preview-wrap{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  width:min(100%,400px)!important;
  max-width:400px!important;
  margin:0 auto!important;
  aspect-ratio:1/1!important;
  overflow:hidden!important;
}

.camera-simple-box.has-captured-preview #capturedPreview,
.camera-workspace.preview-active #capturedPreview{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  width:100%!important;
  height:100%!important;
  aspect-ratio:1/1!important;
  object-fit:cover!important;
  border-radius:18px!important;
}

.camera-simple-box.has-captured-preview #cameraVideo,
.camera-simple-box.has-captured-preview #cameraPlaceholder,
.camera-workspace.preview-active #cameraVideo,
.camera-workspace.preview-active #cameraPlaceholder{
  display:none!important;
}

@media(min-width:901px){
  .camera-workspace.preview-active,
  .camera-simple-box.has-captured-preview .camera-workspace{
    max-width:430px!important;
    margin:14px auto 0!important;
  }

  .camera-workspace.preview-active .camera-preview-wrap,
  .camera-simple-box.has-captured-preview .camera-preview-wrap{
    display:block!important;
    width:400px!important;
    max-width:100%!important;
  }

  .camera-workspace.preview-active #capturedPreview,
  .camera-simple-box.has-captured-preview #capturedPreview{
    display:block!important;
    width:100%!important;
    height:auto!important;
    aspect-ratio:1/1!important;
  }
}


/* V1.10.11 — Sunday disabled only for Next OPD scheduling */
.kp-date-day.sunday-disabled,
.kp-date-day.sunday-disabled:hover{
  opacity:.34!important;
  cursor:not-allowed!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#8a9898!important;
  text-decoration:line-through;
}


/* V1.10.12 low-memory camera safety */
.camera-status.processing{font-weight:600}
.camera-help{line-height:1.35}


/* V1.10.13 — in-app live camera controls must remain visible on phones/tablets */
@media(max-width:900px){
  .camera-workspace:not([hidden]) .camera-live-actions:not([hidden]){
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:10px!important;
    flex-wrap:wrap!important;
    margin-top:14px!important;
  }

  .camera-workspace:not([hidden]) #cameraVideo:not([hidden]){
    display:block!important;
    width:100%!important;
    aspect-ratio:1/1!important;
    object-fit:cover!important;
    background:#101818!important;
    border-radius:18px!important;
  }

  .camera-shutter{
    flex:0 0 72px!important;
  }
}


/* V1.10.14 — pediatric age + latest follow-up refinement */
.age-input-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 132px;
  gap:10px;
}
.age-input-row input,.age-input-row select{width:100%}
.current-followup-badge{
  margin-left:8px;
  background:rgba(0,142,149,.11)!important;
  color:#00777d!important;
  border-color:rgba(0,142,149,.18)!important;
}
@media(max-width:520px){
  .age-input-row{grid-template-columns:minmax(0,1fr) 118px}
}


/* V1.10.16 overdue quick actions + bulk close */
.followup-bulk-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.followup-select{display:flex;align-items:center;gap:7px;margin:0 0 10px;font-size:13px;font-weight:700;color:#527070;cursor:pointer}
.followup-select input{width:17px;height:17px;accent-color:#008E95}
.followup-quick-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:10px}
.followup-quick-row form{margin:0}
.btn.danger{background:#fff0f0!important;border-color:#efc8c8!important;color:#b42318!important}
.btn.danger:hover{background:#ffe4e4!important}
.quick-visited{background:#edf9f4!important;border-color:#bfe6d4!important;color:#087d52!important}
@media(max-width:700px){.followup-bulk-tools{width:100%;justify-content:space-between}.followup-quick-row{display:grid;grid-template-columns:1fr 1fr}.followup-quick-row .btn{width:100%}}


/* V1.10.17 — follow-up bulk actions + modern reschedule calendar */
.followup-bulk-tools .bulk-status-select{
  width:auto;
  min-width:190px;
  min-height:40px;
  padding:8px 36px 8px 12px;
  border-radius:12px;
  background:#fff;
}
.followup-reschedule form{
  align-items:center;
}
.followup-reschedule .kp-date-field{
  flex:1 1 auto;
  min-width:0;
}
.followup-reschedule .kp-date-display{
  min-height:46px!important;
  border-radius:14px!important;
}
.followup-reschedule .kp-date-trigger{
  border-radius:11px!important;
}
.kp-date-day.past-disabled,
.kp-date-day.past-disabled:hover{
  opacity:.28!important;
  cursor:not-allowed!important;
  background:transparent!important;
  color:#8a9898!important;
  box-shadow:none!important;
  text-decoration:line-through;
}
@media(max-width:700px){
  .followup-bulk-tools{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    align-items:center;
  }
  .followup-bulk-tools .check-label{
    grid-column:1/-1;
  }
  .followup-bulk-tools .bulk-status-select,
  .followup-bulk-tools .btn{
    width:100%;
    min-width:0;
  }
  .followup-reschedule form{
    display:grid!important;
    grid-template-columns:1fr!important;
  }
  .followup-reschedule .kp-date-field,
  .followup-reschedule .btn{
    width:100%!important;
  }
}


/* V1.10.18 — professional report actions + brand header */
.report-export-actions .report-icon-btn{
  min-height:46px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
}
.report-export-actions .report-icon-btn img{
  width:19px;
  height:19px;
  display:block;
}
.report-export-actions .report-icon-btn.primary img{
  filter:brightness(0) invert(1);
}
.report-brand-inline{
  display:flex;
  align-items:center;
  gap:12px;
}
.report-inline-logo{
  width:54px;
  height:54px;
  object-fit:contain;
  border:1px solid rgba(250,174,31,.45);
  border-radius:11px;
  padding:4px;
  background:#fff;
}
@media(max-width:700px){
  .report-export-actions{
    display:grid!important;
    grid-template-columns:repeat(3,1fr);
    gap:8px!important;
    width:100%;
  }
  .report-export-actions .report-icon-btn{
    width:100%;
    padding-left:8px;
    padding-right:8px;
  }
  .report-inline-logo{
    width:46px;
    height:46px;
  }
}


/* V1.10.19 — WhatsApp utility automation settings */
.utility-wa-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-top:16px;
}
.utility-wa-box{
  border:1px solid #dce9e9;
  border-radius:16px;
  padding:16px;
  background:#fbfdfd;
}
.utility-wa-box h4{margin:0 0 12px;color:#173a3b}
.utility-wa-box .field{margin-top:12px}
.utility-wa-box textarea{min-height:112px}
.utility-wa-note{
  margin-top:14px;
  padding:12px 14px;
  border-radius:12px;
  background:#eff7f7;
}
.utility-log-details{margin-top:16px;border-top:1px solid #e0ebeb;padding-top:12px}
.utility-log-details summary{cursor:pointer;font-weight:800;color:#007d82}
.utility-log-table{min-width:760px;margin-top:12px}
@media(max-width:1000px){
  .utility-wa-grid{grid-template-columns:1fr}
}


/* V1.10.20 — Professional Settings organization */
.settings-pro-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:14px;
}
.settings-pro-head h2{margin:0 0 5px}
.settings-status-strip{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.settings-status-item{
  display:flex;
  align-items:center;
  gap:7px;
  padding:7px 9px 7px 11px;
  background:#fff;
  border:1px solid #dce9e9;
  border-radius:13px;
  box-shadow:0 2px 8px rgba(16,56,57,.04);
  font-size:12px;
}
.settings-tabs{
  position:sticky;
  top:68px;
  z-index:20;
  display:flex;
  gap:7px;
  padding:7px;
  margin-bottom:10px;
  border:1px solid #d9e7e7;
  border-radius:15px;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(12px);
  box-shadow:0 4px 15px rgba(16,56,57,.06);
  overflow-x:auto;
  scrollbar-width:none;
}
.settings-tabs::-webkit-scrollbar{display:none}
.settings-tab{
  flex:0 0 auto;
  min-height:40px;
  padding:8px 15px;
  border:0;
  border-radius:11px;
  background:transparent;
  color:#526c6d;
  font-weight:800;
  cursor:pointer;
  white-space:nowrap;
}
.settings-tab.active{
  background:#008E95;
  color:#fff;
  box-shadow:0 5px 12px rgba(0,142,149,.18);
}
.settings-tab-note{
  font-size:12px;
  color:#6b8081;
  margin:0 2px 12px;
}
.settings-section-card[hidden]{display:none!important}
.settings-section-card{
  animation:settingsFade .16s ease-out;
}
@keyframes settingsFade{from{opacity:.5;transform:translateY(3px)}to{opacity:1;transform:none}}
.settings-connection-label{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#668081;
  margin-bottom:7px;
}
@media(max-width:900px){
  .settings-pro-head{align-items:flex-start;flex-direction:column}
  .settings-status-strip{justify-content:flex-start;width:100%}
  .settings-tabs{top:62px}
}
@media(max-width:560px){
  .settings-status-strip{
    display:grid;
    grid-template-columns:1fr;
  }
  .settings-status-item{justify-content:space-between}
  .settings-tab{padding-left:13px;padding-right:13px}
}


/* V1.10.21 — OPD visit date + doctor completion time */
.visit-date-time{
  font-weight:500;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
@media(max-width:560px){
  .visit-date-time{font-size:13px}
}


/* V1.10.21.1 — responsive OPD completion date/time
   Mobile: 13 Sep 2026 | 05:42 PM
   Tablet/Laptop: 13 Sep 2026
                  05:42 PM */
.visit-datetime-responsive{
  display:inline-flex;
  align-items:baseline;
  gap:0;
  font-weight:500;
  font-variant-numeric:tabular-nums;
  line-height:1.25;
  white-space:nowrap;
}
.visit-date-part,.visit-time-part{display:inline}
.visit-datetime-sep{display:inline;padding:0 5px;color:var(--muted,#6a7f80)}
@media(min-width:768px){
  .visit-datetime-responsive{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:2px;
    white-space:normal;
  }
  .visit-datetime-sep{display:none}
  .visit-date-part,.visit-time-part{display:block}
}
@media(max-width:767.98px){
  .visit-datetime-responsive{
    max-width:100%;
    font-size:13px;
  }
}


/* V1.10.21.2 — restore bold OPD date/time visibility */
.visit-datetime-responsive,
.visit-date-part,
.visit-time-part{
  font-weight:700;
}

/* V1.10.21.3: bold responsive OPD date/time retained unchanged. */


/* V1.10.22 — Patient Vitals */
.vitals-panel{margin-top:20px;padding:18px;border:1px solid #d8e8e8;border-radius:16px;background:#f8fbfb}
.vitals-heading{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:14px}
.vitals-heading h3{margin:0;font-size:16px}.vitals-heading p{margin:4px 0 0;color:#667b7c;font-size:13px}
.optional-tag{font-size:11px;font-weight:700;color:#607778;background:#eaf2f2;border-radius:999px;padding:4px 8px;vertical-align:2px}
.vitals-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.vital-pair,.unit-input{display:flex;align-items:center;gap:7px}
.vital-pair input{min-width:0;width:72px}.vital-pair small,.unit-input span{color:#63797a;font-size:12px;white-space:nowrap}
.unit-input input{min-width:0;width:100%}
.case-vitals{display:flex;flex-wrap:wrap;gap:7px;margin:10px 0 8px}
.case-vitals>span{display:inline-flex;align-items:baseline;gap:4px;padding:6px 9px;border-radius:9px;background:#eef7f7;border:1px solid #dceeee;font-size:12px;white-space:nowrap}
.case-vitals b{font-weight:700;color:#123f40}.case-vitals small{font-size:10px;color:#617879}
@media(max-width:900px){.vitals-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.vitals-panel{padding:14px}.vitals-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.vital-pair{gap:4px}.vital-pair input{width:58px}.case-vitals{gap:5px}.case-vitals>span{padding:5px 7px;font-size:11px}}

/* V1.10.23 Today OPD */
.stat-link{text-decoration:none;color:inherit}.stat-sub{font-size:11px;margin-top:4px;opacity:.82}
.today-opd-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}.today-opd-stats .card{padding:16px}.today-opd-stats b{display:block;font-size:24px}.today-opd-stats span{font-size:12px;color:#647a7b}
.today-opd-card{padding:0;overflow:hidden}.today-opd-mini-summary{display:flex;gap:20px;flex-wrap:wrap;padding:14px 16px;border-bottom:1px solid #e4eeee;background:#f8fbfb;font-size:12px}
.today-patient{display:flex;align-items:center;gap:10px;min-width:190px}.today-patient img{width:38px;height:38px;border-radius:50%;object-fit:cover}.today-patient div{display:flex;flex-direction:column}.today-patient small{color:#718485;font-size:11px}.fee-paid{font-weight:700;color:#087d52;white-space:nowrap}.fee-free{font-weight:700;color:#65797a;white-space:nowrap}.arrived-today-badge{display:inline-block;margin:4px 0 0;padding:3px 7px;border-radius:999px;background:#e6f7ef;color:#087d52;font-size:10px;font-weight:700}
@media(max-width:900px){.today-opd-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:620px){.today-opd-stats{gap:8px}.today-opd-stats .card{padding:12px}.today-opd-table th:nth-child(3),.today-opd-table td:nth-child(3){display:none}}

/* V1.10.24 — Fee Collection + uploaded medical navigation icons */
.nav-upload-icon{width:19px!important;height:19px!important;object-fit:contain;display:block;filter:brightness(0) invert(1)!important;opacity:.92}
.fee-collection-panel{border-top:3px solid #008E95}.fee-total{text-align:right}.fee-total span{display:block;font-size:11px;color:#6a7f80}.fee-total b{font-size:26px;color:#008E95}
.fee-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:14px}.fee-summary-grid>div{background:#f7fbfb;border:1px solid #e0eded;border-radius:12px;padding:13px}.fee-summary-grid b{display:block;font-size:19px}.fee-summary-grid span{font-size:11px;color:#65797a}
@media(max-width:800px){.fee-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:520px){.fee-total{text-align:left}.fee-summary-grid{grid-template-columns:1fr 1fr}}

/* V1.10.25 */
.clinical-photo-panel{border:1px solid #dbe9e9;background:#f8fbfb;border-radius:14px;padding:16px}.clinical-photo-panel h3{margin:0}.clinical-photo-panel p{color:#65797a;font-size:12px}.clinical-photo-inputs{display:grid;grid-template-columns:1fr 1fr;gap:12px}.clinical-history-photos{margin-top:12px}.clinical-photo-list{display:flex;gap:9px;flex-wrap:wrap;margin-top:7px}.clinical-photo-blur{position:relative;width:116px;height:86px;border:1px solid #d7e5e5;border-radius:12px;overflow:hidden;background:#e7eeee;cursor:pointer;padding:0}.photo-blur-mask{position:absolute;inset:0;background:linear-gradient(135deg,#d4dfdf,#edf3f3,#cbdada);filter:blur(7px)}.photo-eye{position:absolute;left:50%;top:42%;transform:translate(-50%,-50%);font-size:22px;background:#ffffffe6;border-radius:999px;padding:5px 8px}.clinical-photo-blur small{position:absolute;left:0;right:0;bottom:0;background:#0d3a3bd1;color:white;padding:5px;font-size:10px}.clinical-photo-modal{display:none;position:fixed;inset:0;z-index:99999;background:#04191ae8;padding:20px;align-items:center;justify-content:center}.clinical-photo-modal.open{display:flex}.clinical-photo-modal-card{position:relative;max-width:900px;width:100%;background:white;border-radius:16px;padding:14px}.clinical-photo-modal-card img{display:block;max-width:100%;max-height:80vh;margin:auto;border-radius:10px}.clinical-photo-modal-title{font-weight:800;padding:3px 42px 10px 3px}.clinical-photo-close{position:absolute;right:10px;top:8px;border:0;border-radius:50%;width:34px;height:34px;font-size:24px}@media(max-width:620px){.clinical-photo-inputs{grid-template-columns:1fr}.clinical-photo-modal{padding:8px}}

/* V1.10.25.1 — max 3 clinical photos, strict <=20KB storage */
.clinical-photo-slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:12px}
.clinical-photo-slot{border:1px solid #e0ebeb;background:#fff;border-radius:12px;padding:12px}
.clinical-photo-slot>b{display:block;color:#008E95;margin-bottom:8px}
.clinical-photo-slot .field{margin-bottom:9px}
@media(max-width:800px){.clinical-photo-slots{grid-template-columns:1fr}}

/* V1.10.25.2 — one shared optional clinical-photo label */
.clinical-shared-label{max-width:520px;margin-top:12px;margin-bottom:12px}

/* V1.10.25.4 permanent inline icons — independent of external SVG asset files */
.inline-nav-icon{width:19px!important;height:19px!important;display:block;flex:0 0 19px}
.inline-report-icon{width:19px;height:19px;display:inline-block;vertical-align:middle;flex:0 0 19px}
.pdf-action-btn .inline-report-icon{width:18px;height:18px}
@media(max-width:700px){.inline-report-icon{width:20px;height:20px}.pdf-action-btn .inline-report-icon{width:20px;height:20px}}

/* V1.10.25.5 — faster protected clinical-photo viewer */
body.clinical-photo-open{overflow:hidden}
.clinical-photo-modal-card{touch-action:pan-y}
.clinical-photo-swipe-hint{display:none;text-align:center;color:#6c7f80;font-size:11px;padding-top:9px}
@media(max-width:700px){
 .clinical-photo-close{width:42px;height:42px;right:8px;top:7px;font-size:29px;line-height:38px;z-index:2}
 .clinical-photo-modal-title{padding-right:50px}
 .clinical-photo-swipe-hint{display:block}
}

/* V1.10.25.6 permanent report icons */
.inline-report-icon{width:18px!important;height:18px!important;display:inline-block!important;vertical-align:-3px;flex:0 0 18px;color:inherit;overflow:visible}
.pdf-action-btn .inline-report-icon{width:22px!important;height:22px!important}
@media(max-width:700px){.inline-report-icon{width:20px!important;height:20px!important;flex-basis:20px}.pdf-action-btn .inline-report-icon{width:24px!important;height:24px!important}}

/* V1.10.25.7 — locked user-supplied SVG icon set.
   Geometry is embedded in PHP; currentColor keeps each icon identical to its button/nav text color. */
.kp-fixed-icon{display:inline-block;vertical-align:middle;color:inherit;overflow:visible}
.kp-fixed-icon path{fill:currentColor!important}
.kp-fixed-nav-icon{width:19px!important;height:19px!important;flex:0 0 19px}
.inline-report-icon.kp-fixed-icon{width:18px!important;height:18px!important;flex:0 0 18px}
.pdf-action-btn .inline-report-icon.kp-fixed-icon{width:22px!important;height:22px!important}
@media(max-width:700px){
 .inline-report-icon.kp-fixed-icon{width:20px!important;height:20px!important;flex-basis:20px}
 .pdf-action-btn .inline-report-icon.kp-fixed-icon{width:24px!important;height:24px!important}
}

/* V1.10.25.12 — original uploaded SVG files.
   The SVG files are rendered as <img>, so no app CSS can alter their path/fill/stroke geometry.
   Only display dimensions and white sidebar tint are applied. */
.sidebar .kp-original-svg-icon{
 width:19px!important;
 height:19px!important;
 min-width:19px!important;
 max-width:19px!important;
 flex:0 0 19px!important;
 display:block!important;
 object-fit:contain!important;
 transform:none!important;
 opacity:1!important;
 filter:brightness(0) invert(1)!important;
}

/* V1.10.25.13 — mobile operational navigation.
   Desktop sidebar untouched. Five equal mobile slots; Today OPD gets direct access. */
@media(max-width:900px){
 .mobile-nav>a{min-width:0}
 .mobile-nav>a span{white-space:nowrap}
}
@media(max-width:390px){
 .mobile-nav>a{font-size:11px}
 .mobile-nav .mobile-nav-svg{width:22px;height:22px}
}

/* V1.10.25.14 — owner mobile management shortcuts only.
   Existing navigation/icon geometry remains untouched. */
@media(max-width:900px){
 .user-popover-actions .btn{justify-content:center}
}

/* V1.10.25.15 — Owner desktop Management dropdown.
   Mobile avatar menu and all existing icon geometry remain untouched. */
.nav-management{margin:0;padding:0}
.nav-management>summary{
 list-style:none;cursor:pointer;display:flex;align-items:center;gap:12px;
 padding:11px 12px;border-radius:10px;color:inherit;user-select:none;
}
.nav-management>summary::-webkit-details-marker{display:none}
.nav-management>summary:hover,.nav-management>summary.active{background:rgba(255,255,255,.10)}
.nav-management-chevron{margin-left:auto;font-size:15px;line-height:1;transition:transform .18s ease}
.nav-management[open] .nav-management-chevron{transform:rotate(180deg)}
.nav-management-items{padding:3px 0 3px 12px}
.nav-management-items>a{padding-left:12px}
@media(max-width:900px){
 .nav-management{display:none!important}
}

/* V1.10.25.16 — Avatar Doctors/Users use the same locked original SVG files.
   SVG geometry/path/fill/stroke is not modified. */
.user-popover-actions .avatar-menu-svg{
 width:22px;height:22px;display:inline-block;object-fit:contain;flex:0 0 22px;
 filter:brightness(0) saturate(100%);
 opacity:.88;
}
.user-popover-actions .btn.primary .avatar-menu-svg{
 filter:brightness(0) invert(1);
 opacity:1;
}

/* V1.10.26 — Owner-controlled operational access + staff lifecycle. */
.permission-panel{margin-top:20px;padding:18px;border:1px solid #dbe8e8;border-radius:18px;background:#f8fbfb}
.permission-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}
.permission-panel-head h3{margin:0 0 4px;color:#173a3b}
.permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.permission-switch{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 13px;border:1px solid #dce8e8;border-radius:14px;background:#fff;cursor:pointer}
.permission-switch>span{display:flex;flex-direction:column;gap:2px;min-width:0}.permission-switch small{font-size:11px}.permission-switch input{position:absolute;opacity:0;pointer-events:none}
.permission-switch i{width:44px;height:26px;border-radius:999px;background:#cbd7d7;position:relative;flex:0 0 44px;transition:.18s ease}
.permission-switch i:after{content:"";position:absolute;width:20px;height:20px;left:3px;top:3px;border-radius:50%;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.18);transition:.18s ease}
.permission-switch input:checked+i{background:#008E95}.permission-switch input:checked+i:after{transform:translateX(18px)}
.permission-switch input:focus-visible+i{outline:3px solid rgba(0,142,149,.22);outline-offset:2px}
.permission-lock-note{display:flex;gap:9px;align-items:flex-start;margin-top:14px;padding:12px;border-radius:13px;background:#eaf4f4;color:#355859;font-size:13px;line-height:1.45}.permission-lock-note svg{flex:0 0 18px;margin-top:1px}
.staff-status-legend{display:flex;gap:7px;flex-wrap:wrap}
@media(max-width:760px){.permission-grid{grid-template-columns:1fr}.permission-panel{padding:14px}.permission-panel-head{flex-direction:column}.permission-panel-head .btn{width:100%}}

/* Mobile/browser print hardening: print layout uses physical A4 dimensions, never viewport width. */
@media print{
 @page{size:A4 landscape;margin:7mm}
 .report-print{width:283mm!important;max-width:283mm!important;min-width:283mm!important;margin:0 auto!important;overflow:visible!important}
 .report-print .table-wrap{width:100%!important;max-width:283mm!important;overflow:visible!important}
 .report-print .report-table{width:100%!important;max-width:283mm!important;min-width:0!important;table-layout:fixed!important;font-size:6.6pt!important}
 .report-print .report-table th,.report-print .report-table td{padding:1.5mm .8mm!important;font-size:6.1pt!important;white-space:normal!important;overflow-wrap:anywhere!important}
}

/* V1.10.26.1 — logo reliability + login white integration only. */
.login-card,.login-brand{background:#fff}
.login-brand img{
  background:#fff!important;
  object-fit:contain!important;
  object-position:center!important;
  image-rendering:auto;
}

/* V1.10.26.2 — A4 landscape print hardening; visual report design unchanged. */
@media print{
  @page{size:A4 landscape;margin:7mm}
  @page kpReportLandscape{size:297mm 210mm;margin:7mm}
  html,body{width:297mm!important;max-width:none!important}
}


/* =========================================================
   V1.10.33 — SAFE CSS RESTORE + UNIFIED CALENDAR FIELD
   Restores V1.10.18–V1.10.26.2 styles that were accidentally
   missing from the later app.css. Calendar logic is unchanged.
   Only the enhanced date field shell is normalized here.
   ========================================================= */
.kp-date-field{
  position:relative!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}
.kp-date-display{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  height:48px!important;
  min-height:48px!important;
  box-sizing:border-box!important;
  margin:0!important;
  padding:0 54px 0 14px!important;
  border:1px solid #cfe0e0!important;
  border-radius:14px!important;
  background:#fff!important;
  color:#173435!important;
  -webkit-text-fill-color:#173435!important;
  font:inherit!important;
  font-size:15px!important;
  font-weight:600!important;
  line-height:46px!important;
  text-align:left!important;
  opacity:1!important;
  cursor:pointer!important;
}
.kp-date-display:focus{
  outline:none!important;
  border-color:#008E95!important;
  box-shadow:0 0 0 3px rgba(0,142,149,.10)!important;
}
.kp-date-trigger{
  right:6px!important;
  width:38px!important;
  height:38px!important;
  border-radius:11px!important;
}
.kp-date-overlay{z-index:2200!important}
@media(max-width:820px){
  .kp-date-display{
    height:50px!important;
    min-height:50px!important;
    line-height:48px!important;
    padding-right:56px!important;
    font-size:16px!important;
  }
  .kp-date-trigger{right:5px!important;width:40px!important;height:40px!important}
}
/* Clinic-wide responsive confirmation dialog: replaces browser confirm() UI. */
.kp-confirm-dialog{width:min(440px,calc(100vw - 28px));max-width:440px;border:0;border-radius:18px;padding:0;background:transparent;color:#173b3d}.kp-confirm-dialog::backdrop{background:rgba(8,35,37,.48);backdrop-filter:blur(2px)}.kp-confirm-card{background:#fff;border-radius:18px;box-shadow:0 24px 70px rgba(10,49,52,.24);padding:22px}.kp-confirm-icon{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#fff3d6;color:#a76500;font-size:22px;font-weight:900;margin-bottom:13px}.kp-confirm-copy h3{margin:0 0 7px;font-size:20px}.kp-confirm-copy p{margin:0;color:#5e7779;line-height:1.5;white-space:pre-line}.kp-confirm-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.kp-confirm-actions .btn{min-width:105px}.kp-confirm-actions .danger{background:#c92a2a;color:#fff;border-color:#c92a2a}@media(max-width:520px){.kp-confirm-dialog{width:calc(100vw - 22px)}.kp-confirm-card{padding:19px}.kp-confirm-actions{display:grid;grid-template-columns:1fr 1fr}.kp-confirm-actions .btn{width:100%;min-width:0}}

/* v1.5 unified responsive action modal */
html.kp-modal-open{scrollbar-gutter:stable}
.kp-action-dialog{position:fixed!important;inset:0!important;margin:auto!important;width:min(520px,calc(100vw - 32px))!important;max-width:520px!important;height:max-content!important;max-height:calc(100dvh - 32px)!important;padding:0!important;border:0!important;border-radius:20px!important;background:transparent!important;overflow:visible!important;color:#173b3d!important}
.kp-action-dialog::backdrop{background:rgba(12,35,37,.38);backdrop-filter:blur(3px)}
.kp-action-card{background:#fff;border:1px solid #d8e7e8;border-radius:20px;box-shadow:0 22px 70px rgba(13,54,57,.22);padding:24px}
.kp-action-head{display:grid;grid-template-columns:48px minmax(0,1fr);gap:16px;align-items:start}
.kp-action-icon{width:48px;height:48px;border-radius:14px;display:grid;place-items:center;background:#e7f7f7;color:#008e95;font-size:23px;font-weight:900}
.kp-action-dialog.is-danger .kp-action-icon{background:#fff0f0;color:#c62828}.kp-action-dialog.is-success .kp-action-icon{background:#eaf8f1;color:#16845b}
.kp-action-copy h3{margin:1px 0 7px;font-size:20px;line-height:1.25;color:#15383a}.kp-action-copy p{margin:0;color:#5e7476;font-size:14.5px;line-height:1.55;white-space:pre-line;overflow-wrap:anywhere}
.kp-action-buttons{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.kp-action-buttons .btn{min-width:112px;justify-content:center}.kp-action-buttons .danger{background:#c92a2a!important;color:#fff!important;border-color:#c92a2a!important}
.kp-server-notice{display:none!important}
@media(max-width:600px){.kp-action-dialog{width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px)!important}.kp-action-card{padding:20px;border-radius:18px}.kp-action-head{grid-template-columns:42px minmax(0,1fr);gap:13px}.kp-action-icon{width:42px;height:42px;border-radius:12px;font-size:20px}.kp-action-copy h3{font-size:18px}.kp-action-copy p{font-size:14px}.kp-action-buttons{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:20px}.kp-action-buttons .btn{width:100%;min-width:0}.kp-action-buttons .kp-action-cancel[hidden]+.kp-action-ok{grid-column:1/-1}}
@media(max-width:360px){.kp-action-buttons{grid-template-columns:1fr}.kp-action-buttons .kp-action-cancel[hidden]+.kp-action-ok{grid-column:auto}}

/* v1.6 Multi-Doctor Profile — additive */
.doctor-management{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(420px,.95fr);gap:18px;align-items:start}
.doctor-profile-grid{display:grid;grid-template-columns:180px minmax(0,1fr);gap:18px;align-items:start;margin-top:14px}
.doctor-fields-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.doctor-media-box{display:grid;gap:12px}
.doctor-print-panel{margin-top:18px;border:1px solid #cfe2e3;border-radius:18px;padding:16px;background:#f8fcfc}
.doctor-print-head{display:flex;justify-content:space-between;gap:16px;align-items:center}.doctor-print-head h4{margin:0 0 4px;font-size:17px}.doctor-print-head p{margin:0;color:#64787b;font-size:13px}
.doctor-master-toggle{display:flex;align-items:center;gap:8px;font-weight:800;white-space:nowrap}.doctor-master-toggle input,.doctor-print-options input{accent-color:#008e95}
.doctor-print-options{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}.doctor-print-options label{display:flex;align-items:center;gap:7px;border:1px solid #d5e5e6;background:#fff;border-radius:12px;padding:9px 11px;font-weight:700}.doctor-print-options.is-disabled{opacity:.48}
.doctor-signature-field{margin-top:14px}.doctor-signature-preview{display:block;max-width:180px;max-height:72px;object-fit:contain;background:#fff;border:1px solid #d8e5e6;border-radius:10px;padding:6px;margin:6px 0 10px}
.doctor-print-note{margin-top:14px;padding:11px 12px;border-radius:12px;background:#eaf7f7;color:#35585c;font-size:13px;line-height:1.45}.doctor-main small{display:block}
@media(max-width:1100px){.doctor-management{grid-template-columns:1fr}.doctor-profile-grid{grid-template-columns:150px minmax(0,1fr)}}
@media(max-width:720px){.doctor-profile-grid,.doctor-fields-grid{grid-template-columns:1fr}.doctor-print-head{align-items:flex-start;flex-direction:column}.doctor-master-toggle{white-space:normal}.doctor-print-options{display:grid;grid-template-columns:1fr 1fr}.doctor-row{align-items:flex-start;flex-wrap:wrap}}
@media(max-width:420px){.doctor-print-options{grid-template-columns:1fr}}

/* v1.8 Doctor Consultation + Hindi Digital Rx — additive */
.rx-consult-panel{margin-top:4px;border:1px solid #cfe2e3;border-radius:18px;padding:18px;background:#f9fcfc}.rx-section-title h3,.rx-builder-head h3{margin:0 0 4px;color:#173b3d}.rx-section-title p,.rx-builder-head p{margin:0;color:#647b7d;font-size:13px}.rx-consult-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:14px}.rx-builder{margin-top:16px;border-top:1px solid #dbe9e9;padding-top:16px}.rx-builder-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.rx-row{display:grid;grid-template-columns:1.4fr .7fr 1fr .8fr 1.8fr 38px;gap:8px;margin-top:10px;align-items:center}.rx-row input,.rx-row select{min-width:0}.rx-hi{font-family:"Noto Sans Devanagari","Nirmala UI","Mangal",sans-serif!important}.rx-remove{height:42px;border:0;border-radius:10px;background:#fff0f0;color:#bd2525;font-size:22px;cursor:pointer}.rx-save-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap}@media(max-width:1000px){.rx-row{grid-template-columns:1.3fr .7fr 1fr}.rx-row .rx-hi{grid-column:1/3}.rx-remove{grid-column:3}}@media(max-width:720px){.rx-consult-grid{grid-template-columns:1fr}.rx-builder-head{align-items:flex-start;flex-direction:column}.rx-row{grid-template-columns:1fr 1fr}.rx-row .rx-hi{grid-column:1/-1}.rx-remove{grid-column:auto}.rx-row input,.rx-row select{font-size:16px}.rx-consult-panel{padding:14px}}


/* v1.98 — consistent mobile/PWA option sheet for app-wide single-select controls */
html.kp-select-open,html.kp-select-open body{overflow:hidden!important}
.kp-select-sheet{position:fixed;inset:0;z-index:2147483000;pointer-events:none;font-family:inherit}.kp-select-sheet.open{pointer-events:auto}
.kp-select-backdrop{position:absolute;inset:0;background:rgba(12,31,33,.42);opacity:0;transition:opacity .18s ease;backdrop-filter:blur(1.5px)}.kp-select-sheet.open .kp-select-backdrop{opacity:1}
.kp-select-panel{position:absolute;left:0;right:0;bottom:0;background:#fff;border-radius:22px 22px 0 0;padding:8px 14px calc(14px + env(safe-area-inset-bottom));box-shadow:0 -14px 42px rgba(14,47,49,.18);transform:translateY(105%);transition:transform .2s ease;max-height:min(76dvh,620px);display:flex;flex-direction:column}.kp-select-sheet.open .kp-select-panel{transform:translateY(0)}
.kp-select-grab{width:42px;height:4px;border-radius:99px;background:#c9d7d8;margin:1px auto 8px}.kp-select-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:2px 2px 10px;border-bottom:1px solid #e6eeee}.kp-select-head strong{font-size:17px;color:#173b3d;line-height:1.25}.kp-select-x{border:0;background:#eef6f6;color:#355b5e;width:36px;height:36px;border-radius:50%;font-size:24px;line-height:1;display:grid;place-items:center}
.kp-select-options{overflow:auto;-webkit-overflow-scrolling:touch;padding:7px 0;overscroll-behavior:contain}.kp-select-option{width:100%;min-height:50px;border:0;border-bottom:1px solid #edf2f2;background:#fff;color:#1f3f42;display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;padding:11px 12px;font:inherit;font-size:16px;font-weight:650;border-radius:10px}.kp-select-option:last-child{border-bottom:0}.kp-select-option.selected{background:#eaf7f7;color:#007f86;font-weight:800}.kp-select-option:disabled{opacity:.42}.kp-select-check{font-size:18px;color:#008e95;opacity:0}.kp-select-option.selected .kp-select-check{opacity:1}.kp-select-cancel{border:1px solid #d7e5e6;background:#f7fafa;color:#315659;border-radius:13px;min-height:46px;font:inherit;font-weight:800;margin-top:5px}
@media(min-width:901px) and (pointer:fine){.kp-select-sheet{display:none!important}}

/* v1.99 - persistent follow-up closure reason in patient history */
.kp-followup-close-reason{margin-top:6px;font-size:12px;line-height:1.4;color:#526d6f;overflow-wrap:anywhere}.kp-followup-close-reason-summary{max-width:100%}.kp-followup-closed-history{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap;margin-top:8px}.kp-followup-closed-badge{display:inline-flex;align-items:center;min-height:24px;padding:3px 9px;border-radius:999px;background:#e8f7f1;color:#167b5b;font-size:12px;font-weight:800}.kp-followup-closed-reason{display:inline-block;padding:3px 0;color:#526d6f;font-size:12px;line-height:1.45;overflow-wrap:anywhere}@media(max-width:600px){.kp-followup-closed-history{display:grid;gap:4px}.kp-followup-closed-badge{width:max-content;max-width:100%}}

/* v2.02 unified follow-up close UX */
.kp-quick-close-dialog{width:min(500px,calc(100vw - 28px));border:0;border-radius:18px;padding:0;box-shadow:0 24px 70px rgba(10,49,52,.24);color:#15383a}.kp-quick-close-dialog::backdrop{background:rgba(10,35,37,.50);backdrop-filter:blur(3px)}.kp-followup-modal-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}.kp-followup-modal-actions .btn{justify-content:center;min-height:44px}.kp-close-history-note{padding:10px 12px;border-radius:11px;background:#eef8f5;color:#367064;font-size:12px;line-height:1.4}.kp-followup-closed-history{display:grid!important;grid-template-columns:max-content minmax(0,1fr);align-items:start;column-gap:9px;row-gap:3px;margin-top:7px}.kp-followup-closed-reason{padding:3px 0!important}.kp-followup-close-reason-summary{margin-top:5px!important}.next-opd-summary .pill{width:max-content;max-width:100%}.next-opd-summary .kp-followup-close-reason{font-weight:500}.kp-followup-closed-badge{white-space:nowrap}@media(max-width:600px){.kp-quick-close-dialog{width:calc(100vw - 24px);max-height:calc(100dvh - 28px);border-radius:20px}.kp-followup-closed-history{grid-template-columns:1fr!important}.kp-followup-modal-actions{grid-template-columns:1fr 1fr}.kp-quick-close-dialog .kp-followup-modal-head{padding:20px 18px 14px}.kp-quick-close-dialog .kp-followup-section{padding:18px}.kp-open-close-followup{width:100%}}

/* v2.03 — shared polished Follow-up modal UI on every page/device */
.kp-followup-modal{width:min(500px,calc(100vw - 32px));max-width:500px;border:0!important;outline:0;border-radius:20px;padding:0!important;background:#fff;color:#15383a;box-shadow:0 28px 80px rgba(9,44,47,.26);overflow:hidden}
.kp-followup-modal::backdrop{background:rgba(10,35,37,.48);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
.kp-followup-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:22px 24px 17px;border-bottom:1px solid #e2eeee;background:#fff}
.kp-followup-modal-head h3{margin:0 0 5px;font-size:21px;line-height:1.2;color:#15383a}.kp-followup-modal-head p{margin:0;color:#667d7f;font-size:13.5px;line-height:1.45}
.kp-followup-modal-x{flex:0 0 auto;width:36px;height:36px;border:0;border-radius:50%;background:#edf6f6;color:#31585a;font-size:25px;line-height:1;display:grid;place-items:center;cursor:pointer}
.kp-followup-modal-x:hover{background:#dfeeee}.kp-followup-section{padding:20px 24px}.kp-followup-stack{display:grid;gap:10px}.kp-followup-stack>label,.kp-followup-stack div>label{font-size:12.5px;font-weight:800;color:#4d686a;margin:0 0 1px}
.kp-followup-stack input,.kp-followup-stack select{width:100%;min-height:48px;border:1px solid #cbdedf;border-radius:12px;padding:10px 13px;background:#fff;color:#173b3d;box-sizing:border-box;font:inherit;font-size:15px;outline:none}.kp-followup-stack input:focus,.kp-followup-stack select:focus{border-color:#008e95;box-shadow:0 0 0 3px rgba(0,142,149,.11)}
.kp-close-history-note{display:flex;align-items:flex-start;gap:7px;padding:11px 13px;border-radius:12px;background:#eef8f5;color:#367064;font-size:12.5px;line-height:1.45;margin-top:2px}
.kp-followup-modal-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:7px}.kp-followup-modal-actions .btn{width:100%;justify-content:center;min-height:46px;border-radius:12px;font-weight:800}.kp-followup-modal-actions .danger{background:#fff0f0;color:#bd2525;border-color:#ffe0e0}.kp-followup-modal-actions .danger:hover{background:#c92a2a;color:#fff;border-color:#c92a2a}
@media(max-width:600px){.kp-followup-modal{width:100%;max-width:none;margin:auto 0 0!important;border-radius:22px 22px 0 0;max-height:min(88dvh,760px);overflow:auto}.kp-followup-modal-head{padding:20px 18px 15px;position:sticky;top:0;z-index:2}.kp-followup-section{padding:18px 18px calc(18px + env(safe-area-inset-bottom))}.kp-followup-modal-actions{position:sticky;bottom:0;background:#fff;padding-top:5px}.kp-followup-stack input,.kp-followup-stack select{font-size:16px;min-height:50px}}
@media(min-width:601px) and (max-width:1024px){.kp-followup-modal{width:min(520px,calc(100vw - 48px))}}

/* v2.04 — app-wide mobile modal viewport/safe-area hardening */
@media (max-width:600px){
  dialog:not(.kp-date-card){box-sizing:border-box;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);}
  .kp-followup-modal,.kp-quick-close-dialog{box-sizing:border-box!important;width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important;margin:auto auto 8px!important;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain;border-radius:22px 22px 14px 14px!important;}
  .kp-followup-modal-head{position:sticky!important;top:0;z-index:5;background:#fff;padding-top:max(18px,env(safe-area-inset-top));}
  .kp-followup-modal-foot{position:sticky;bottom:0;z-index:5;background:#fff;padding-bottom:calc(16px + env(safe-area-inset-bottom))!important;}
  .kp-followup-modal-actions{position:sticky;bottom:0;z-index:4;background:#fff;padding-bottom:env(safe-area-inset-bottom);}
  .clinical-photo-modal-card{box-sizing:border-box;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);overflow:auto;}
  .kp-select-panel{box-sizing:border-box;max-width:100vw;overflow-x:hidden;}
}

/* v2.07.5 global read-only rack finder */
.kp-rack-fab{display:none}.kp-rack-overlay[hidden]{display:none!important}.kp-rack-overlay{position:fixed;inset:0;z-index:99990;background:rgba(5,25,30,.52);backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);display:flex;justify-content:center;align-items:center;padding:18px;box-sizing:border-box}.kp-rack-dialog{background:#fff;border-radius:19px;width:min(610px,100%);max-height:min(85dvh,720px);display:flex;flex-direction:column;box-shadow:0 22px 80px #002e3650;overflow:hidden}.kp-rack-dialog-head{background:linear-gradient(115deg,#07575a,#009ca2);color:#fff;padding:18px 21px;display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.kp-rack-dialog-head h2{margin:0;font-size:20px;color:#fff}.kp-rack-dialog-head p{margin:5px 0 0;color:#d8f4f4;font-size:13px}.kp-rack-close{border:1px solid #ffffff70;background:#ffffff20;color:#fff;border-radius:10px;font-size:25px;cursor:pointer;width:37px;height:37px}.kp-rack-dialog-body{padding:20px;overflow:auto;overscroll-behavior:contain}.kp-rack-dialog-body label{display:block;font-weight:700;margin-bottom:8px}.kp-rack-dialog-body input{width:100%;box-sizing:border-box;padding:13px;border:1px solid #cbd9db;border-radius:11px;font-size:16px;outline-color:#008e95}.kp-rack-results{margin-top:14px;max-height:52dvh;overflow:auto}.kp-rack-result{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px;border:1px solid #e3ecee;border-radius:12px;margin-bottom:9px}.kp-rack-result strong{display:block;font-size:15px}.kp-rack-meta{font-size:12px;color:#63777b;margin-top:4px;overflow-wrap:anywhere}.kp-rack-number{background:#ffd54a;color:#141414;border:1px solid #e8b72a;border-radius:9px;padding:9px 11px;font-weight:800;min-width:62px;text-align:center;overflow-wrap:anywhere}.kp-rack-number small{display:block;font-size:10px;letter-spacing:.06em}.kp-rack-status{color:#64787d;font-size:13px;padding:10px 0}@media(max-width:767px){.kp-rack-nav-trigger{display:none!important}.kp-rack-fab{display:flex;position:fixed;right:16px;bottom:calc(78px + env(safe-area-inset-bottom));z-index:9500;align-items:center;gap:7px;background:#ffc12e;color:#111;border:1px solid #e6a719;border-radius:40px;padding:12px 15px;box-shadow:0 5px 19px #0003;font-weight:800;cursor:pointer}.kp-rack-fab svg{width:19px;height:19px}.kp-rack-overlay{align-items:flex-end;padding:0}.kp-rack-dialog{border-radius:19px 19px 0 0;width:100%;max-height:calc(94dvh - env(safe-area-inset-top));padding-bottom:env(safe-area-inset-bottom)}.kp-rack-dialog-body{padding:16px}.kp-rack-results{max-height:55dvh}}body.kp-rack-open{overflow:hidden}body.kp-rack-open .kp-rack-fab{display:none!important}

/* v2.07.6: universal animated yellow FAB, circular at rest. */
body .kp-rack-fab{display:flex!important;position:fixed!important;right:clamp(14px,2vw,24px)!important;left:auto!important;bottom:calc(22px + env(safe-area-inset-bottom))!important;top:auto!important;z-index:9500!important;box-sizing:border-box!important;width:56px!important;height:56px!important;min-width:56px!important;max-width:56px!important;padding:0!important;align-items:center!important;justify-content:center!important;gap:0!important;overflow:hidden!important;white-space:nowrap!important;border-radius:999px!important;background:#ffc42e!important;color:#111!important;border:1px solid #e6a719!important;box-shadow:0 6px 22px rgba(0,0,0,.23)!important;cursor:pointer!important;transition:max-width .23s ease,width .23s ease,box-shadow .23s ease,transform .23s ease!important;}
body .kp-rack-fab svg{width:23px!important;height:23px!important;min-width:23px!important;flex-shrink:0!important;color:#111!important;stroke:#111!important;}
body .kp-rack-fab span{display:block!important;opacity:0!important;max-width:0!important;overflow:hidden!important;font-size:14px!important;font-weight:800!important;color:#111!important;transition:opacity .16s ease,max-width .23s ease!important;}
@media(hover:hover) and (pointer:fine){body .kp-rack-fab:hover{width:174px!important;max-width:174px!important;gap:9px!important;box-shadow:0 9px 28px rgba(0,0,0,.27)!important;transform:translateY(-2px)!important;}body .kp-rack-fab:hover span{max-width:115px!important;opacity:1!important;}}
body .kp-rack-fab:focus-visible{outline:3px solid #07575a!important;outline-offset:3px!important;}
body.kp-rack-open .kp-rack-fab,body:has(.kp-rack-overlay:not([hidden])) .kp-rack-fab{display:none!important;}
@media(max-width:767px){body .kp-rack-fab{right:16px!important;bottom:calc(84px + env(safe-area-inset-bottom))!important;}body .kp-rack-fab span{display:none!important;}}
@media(prefers-reduced-motion:reduce){body .kp-rack-fab,body .kp-rack-fab span{transition:none!important;}}

/* v2.07.8: polished golden gradient, consistent compact Rx rack location */
body .kp-rack-fab{background:linear-gradient(135deg,#ffe584 0%,#ffca38 51%,#e9a900 100%)!important;border-color:#dba100!important;box-shadow:0 7px 22px rgba(80,58,0,.26),inset 0 1px 0 rgba(255,255,255,.45)!important;}
body .kp-rack-fab svg{stroke-width:2.6px!important;}
body .kp-rack-fab span{font-weight:700!important;}
@media(hover:hover) and (pointer:fine){body .kp-rack-fab:hover{box-shadow:0 12px 30px rgba(80,58,0,.33),inset 0 1px 0 rgba(255,255,255,.5)!important;}}
.kp-rack-number,.rx-rack-badge,.kp-rx-rack-tag{background:linear-gradient(135deg,#ffe584,#ffc42e 65%,#e9a900)!important;color:#141414!important;border:1px solid #dfad1d!important;font-weight:750!important;}
.kp-rx-rack-tag:not([hidden]){display:inline-flex;align-items:center;border-radius:7px;padding:2px 8px;margin-top:4px;font-size:11px;line-height:1.5;max-width:100%;overflow-wrap:anywhere;}
/* Only truly visible dialogs should suppress the shortcut. A dialog inside a hidden overlay is NOT open. */
body:has(dialog[open]) .kp-rack-fab,body:has(.kp-date-overlay:not([hidden])) .kp-rack-fab,body:has(.kp-rack-overlay:not([hidden])) .kp-rack-fab{visibility:hidden!important;pointer-events:none!important;}
@media(max-width:767px){.kp-rx-rack-tag:not([hidden]){font-size:10px;padding:2px 6px;}}
/* v2.08: password visibility toggle, all account roles and password forms */
.kp-password-eye-wrap{position:relative;display:block;width:100%;min-width:0}
.kp-password-eye-wrap>input{padding-right:49px!important;width:100%;box-sizing:border-box}
.kp-password-eye-toggle{position:absolute;right:5px;top:50%;transform:translateY(-50%);width:39px;height:39px;border:0;border-radius:10px;background:transparent;color:#416066;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:1;transition:background .15s ease,color .15s ease}
.kp-password-eye-toggle:hover{background:#e6f3f3;color:#007f88}
.kp-password-eye-toggle:focus-visible{outline:2px solid #008e95;outline-offset:1px}

/* v2.09.0 additive Quick OPD dashboard: all screen sizes */
.kp-quick-opd{margin-top:18px;margin-bottom:18px}.kp-quick-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.kp-quick-head h2{margin:0 0 5px;font-size:1.2rem}.kp-quick-head p{margin:0}.kp-quick-search{margin:16px 0}.kp-quick-search label{display:block;font-weight:650;margin-bottom:7px}.kp-quick-search-row{display:flex;gap:10px}.kp-quick-search-row input{min-width:0;flex:1}.kp-quick-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:15px}.kp-quick-stats a{display:flex;flex-direction:column;align-items:center;gap:4px;padding:12px 6px;background:var(--surface,#f5f7f8);border:1px solid var(--border,#e4e7e8);border-radius:12px;text-decoration:none;color:inherit}.kp-quick-stats b{font-size:1.4rem}.kp-quick-stats span{font-size:.82rem}.kp-quick-actions{display:flex;flex-wrap:wrap;gap:9px;margin-bottom:12px}.kp-quick-opd small{display:block;line-height:1.5}@media(max-width:600px){.kp-quick-search-row{flex-direction:column}.kp-quick-search-row .btn{width:100%;justify-content:center}.kp-quick-actions .btn{flex:1 1 100%;justify-content:center}.kp-quick-stats{gap:6px}.kp-quick-stats a{padding:10px 3px}.kp-quick-stats span{font-size:.73rem}}

/* v2.09.1: compact dashboard actions; existing global search remains the single search */
.kp-dashboard-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:14px 0 16px}.kp-dashboard-actions-label{font-weight:700;color:#244749;font-size:.88rem;margin-right:3px}.kp-dashboard-actions .btn{min-height:40px}@media(max-width:600px){.kp-dashboard-actions{gap:8px;margin:12px 0}.kp-dashboard-actions-label{width:100%}.kp-dashboard-actions .btn{flex:1 1 auto;justify-content:center}}

/* v2.09.2: Dashboard declutter. All workflows remain accessible from their existing pages. */
.kp-summary-details{padding:0!important;overflow:hidden}
.kp-summary-details>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;padding:17px 20px;font-weight:750;color:#193c3d;list-style:none}
.kp-summary-details>summary::-webkit-details-marker{display:none}
.kp-summary-details>summary:after{content:'⌄';font-size:20px;line-height:1}
.kp-summary-details[open]>summary:after{content:'⌃'}
.kp-summary-details>summary span{font-size:13px;font-weight:450;color:#708586;margin-left:auto}
.kp-summary-details .kp-summary-body{padding:0 20px 20px}
@media(max-width:600px){.kp-summary-details>summary{padding:15px}.kp-summary-details .kp-summary-body{padding:0 15px 15px}.kp-summary-details>summary span{font-size:11px}}

/* v2.09.5: accessible-size, centered disclosure chevron on every viewport */
.kp-summary-details>summary{position:relative;min-height:58px;gap:12px}
.kp-summary-details>summary::after{content:""!important;display:block!important;flex:0 0 11px;width:11px;height:11px;box-sizing:border-box;border-right:3px solid #23494b;border-bottom:3px solid #23494b;transform:rotate(45deg);margin:0 3px 5px 8px;line-height:normal;font-size:initial;transition:transform .18s ease,margin .18s ease}
.kp-summary-details[open]>summary::after{content:""!important;transform:rotate(225deg);margin-top:7px;margin-bottom:0}
.kp-summary-details>summary span{margin-left:auto;text-align:right}
@media(max-width:600px){.kp-summary-details>summary{min-height:58px}.kp-summary-details>summary::after{flex-basis:11px}}
/* v2.09.6: identical, centered chevron in both disclosure states */
.kp-summary-details>summary{display:flex!important;align-items:center!important;gap:12px!important;min-height:60px;outline-offset:-3px}
.kp-summary-details>summary::after{content:""!important;display:block!important;position:static!important;align-self:center!important;flex:0 0 14px!important;width:14px!important;height:14px!important;box-sizing:border-box!important;border:0!important;border-right:3px solid #23494b!important;border-bottom:3px solid #23494b!important;border-radius:1px!important;transform:rotate(45deg)!important;margin:-7px 3px 0 4px!important;transition:transform .16s ease,margin .16s ease!important}
.kp-summary-details[open]>summary::after{transform:rotate(225deg)!important;margin:7px 3px 0 4px!important}
.kp-summary-details>summary span{margin-left:auto!important;text-align:right}
.kp-summary-details>summary:focus:not(:focus-visible){outline:none}
.kp-summary-details>summary:focus-visible{outline:2px solid #1688cc;border-radius:12px}
@media(max-width:600px){.kp-summary-details>summary{min-height:60px!important}.kp-summary-details>summary::after{flex-basis:14px!important;width:14px!important;height:14px!important}}

/* v2.09.7: one SVG icon rotates between disclosure states, no font glyph or border arrows */
.kp-summary-details > summary::after, .kp-summary-details[open] > summary::after {content:none!important;display:none!important;}
.kp-summary-details > summary .kp-summary-trailing {display:inline-flex!important;align-items:center!important;justify-content:flex-end!important;gap:12px!important;margin-left:auto!important;flex:0 1 auto!important;min-width:0;}
.kp-summary-details > summary .kp-summary-hint {margin:0!important;font-size:13px;font-weight:450;color:#708586;text-align:right;}
.kp-summary-details > summary .kp-summary-chevron {display:block!important;flex:0 0 20px!important;width:20px!important;height:20px!important;color:#23494b;transform:rotate(0deg);transform-origin:50% 50%;transition:transform .16s ease;}
.kp-summary-details[open] > summary .kp-summary-chevron {transform:rotate(180deg);}
@media(max-width:600px){.kp-summary-details > summary .kp-summary-hint {font-size:11px;}.kp-summary-details > summary .kp-summary-trailing {gap:8px!important;}}
@media(prefers-reduced-motion:reduce){.kp-summary-details > summary .kp-summary-chevron{transition:none;}}

/* v2.10: dashboard follow-up filters and patient timeline entry, all screen sizes */
.kp-followup-quicklinks{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}
.kp-followup-quicklinks a{display:inline-flex;align-items:center;min-height:34px;padding:6px 12px;border-radius:10px;background:#eaf3f3;color:#17494a;font-size:13px;font-weight:700;text-decoration:none}
.kp-followup-quicklinks a:hover,.kp-followup-quicklinks a:focus-visible{background:#d5e9e9;outline-offset:2px}
@media(max-width:600px){.kp-followup-quicklinks{gap:6px}.kp-followup-quicklinks a{flex:1 1 auto;justify-content:center;min-height:42px}}

/* v2.10.1: consistent follow-up filter controls on every screen */
nav.kp-followup-quicklinks{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;align-items:center!important;gap:8px!important;margin:10px 0 2px!important;padding:0!important;}
nav.kp-followup-quicklinks>a{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;min-height:36px!important;padding:8px 13px!important;border:1px solid #d9e8e8!important;border-radius:10px!important;background:#eaf3f3!important;color:#17494a!important;font-size:13px!important;font-weight:700!important;line-height:1.25!important;text-decoration:none!important;white-space:nowrap!important;}
nav.kp-followup-quicklinks>a:hover{background:#d5e9e9!important;}
nav.kp-followup-quicklinks>a:focus-visible{outline:2px solid #1688cc!important;outline-offset:2px!important;}
@media(max-width:600px){nav.kp-followup-quicklinks{gap:7px!important}nav.kp-followup-quicklinks>a{min-height:42px!important;white-space:normal!important;text-align:center!important;}}
/* v2.10.1: remove all legacy CSS disclosure arrows; only SVG is rendered */
.kp-summary-details>summary::after,.kp-summary-details[open]>summary::after,.kp-summary-details>summary::before,.kp-summary-details[open]>summary::before{content:none!important;display:none!important;border:0!important;background:none!important;}
.kp-summary-details>summary::-webkit-details-marker{display:none!important;}
.kp-summary-details>summary{list-style:none!important;}
.kp-summary-details>summary .kp-summary-trailing{display:inline-flex!important;align-items:center!important;gap:12px!important;margin-left:auto!important;}
.kp-summary-details>summary .kp-summary-chevron{display:block!important;flex:0 0 20px!important;width:20px!important;height:20px!important;transform:rotate(0deg)!important;}
.kp-summary-details[open]>summary .kp-summary-chevron{transform:rotate(180deg)!important;}

/* v2.11.11: tidy case-history actions without changing permissions */
.timeline-item .button-row,.timeline-item .followup-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.timeline-item .button-row form,.timeline-item .followup-actions form{display:inline-flex;align-items:center;margin:0}
.timeline-item .button-row .btn,.timeline-item .followup-actions .btn{display:inline-flex;align-items:center;justify-content:center;min-height:34px;vertical-align:middle}
@media(max-width:620px){.timeline-item .button-row,.timeline-item .followup-actions{align-items:stretch}.timeline-item .button-row .btn,.timeline-item .followup-actions .btn{min-height:40px}}

/* v2.11.14: Keep medicine row controls top-aligned when a rack/mix badge adds a second line. */
#rxRows .rx-row{align-items:start!important;}
#rxRows .rx-row>.rx-dose-wrap,#rxRows .rx-row>select[name="rx_frequency[]"],#rxRows .rx-row>input[name="rx_duration[]"],#rxRows .rx-row>.rx-trans-wrap,#rxRows .rx-row>.rx-remove{align-self:start!important;}
#rxRows .rx-row .rx-med-wrap{align-self:start!important;}
#rxRows .rx-row .kp-mix-linked{display:block;margin-top:3px;line-height:14px;}
@media(max-width:700px){#rxRows .rx-row{align-items:start!important;}}

/* v2.11.15: anchor every Rx control to the first grid track.
   Medicine badges remain below their own input without shifting adjacent columns. */
#rxRows .rx-row{align-items:start!important;grid-auto-rows:min-content!important;}
#rxRows .rx-row>.rx-med-wrap,#rxRows .rx-row>.rx-dose-wrap,#rxRows .rx-row>select[name="rx_frequency[]"],#rxRows .rx-row>input[name="rx_duration[]"],#rxRows .rx-row>.rx-trans-wrap,#rxRows .rx-row>.rx-remove{align-self:start!important;margin-top:0!important;}
#rxRows .rx-row>.rx-med-wrap{display:flex!important;flex-direction:column!important;justify-content:flex-start!important;gap:3px!important;}
#rxRows .rx-row>.rx-med-wrap>.rx-med-input{flex:none!important;margin:0!important;}
#rxRows .rx-row .kp-mix-linked{position:static!important;display:block!important;margin:0!important;line-height:14px!important;}
#rxRows .rx-row .kp-rx-rack-tag:not([hidden]){position:static!important;align-self:flex-start!important;}
#rxRows .rx-row .kp-mix-inline .kp-mix-quick{top:50%!important;}

/* v2.11.17: native hidden attribute must override .btn display rules for notice-only modals. */
.kp-action-dialog .kp-action-cancel[hidden]{display:none!important}
.kp-action-dialog .kp-action-buttons:has(.kp-action-cancel[hidden]){justify-content:flex-end}
@media(max-width:600px){.kp-action-dialog .kp-action-buttons .kp-action-cancel[hidden]+.kp-action-ok{grid-column:1/-1}}

/* v2.11.23: Doctor OPD dropdown arrow — stable desktop/tablet/mobile alignment. */
#doctorOpdForm #opdDoctor{
  -webkit-appearance:none;appearance:none;box-sizing:border-box;
  padding-right:44px!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23234749' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 16px center;background-size:18px 18px;
}
#doctorOpdForm #opdDoctor:disabled{opacity:1;cursor:not-allowed;background-color:#f2f7f7;color:#496669;}
@media(max-width:600px){#doctorOpdForm #opdDoctor{background-position:right 14px center;padding-right:42px!important;}}

/* Today OPD: compact patient cards on phone, no sideways scrolling to Open */
@media(max-width:620px){
 .today-opd-card .table-wrap{overflow-x:visible!important}
 .today-opd-table,.today-opd-table tbody,.today-opd-table tr,.today-opd-table td{display:block!important;width:100%!important;min-width:0!important;box-sizing:border-box}
 .today-opd-table thead{display:none!important}
 .today-opd-table tr{position:relative;border:1px solid #dce8e9;border-radius:14px;padding:12px;margin:0 0 12px;background:#fff}
 .today-opd-table td{padding:5px 0!important;border:0!important;white-space:normal!important}
 .today-opd-table td:nth-child(3){display:block!important;color:#64797a;font-size:12px}
 .today-opd-table td:nth-child(3):before{content:'Doctor: ';font-weight:600}
 .today-opd-table td:nth-child(2),.today-opd-table td:nth-child(4),.today-opd-table td:nth-child(5){display:inline-block!important;width:auto!important;margin-right:10px}
 .today-opd-table td:last-child{display:block!important;margin-top:8px}
 .today-opd-table td:last-child .btn{display:block;width:100%;text-align:center;box-sizing:border-box}
 .today-opd-table .today-patient{min-width:0!important;width:100%;align-items:center}
 .today-opd-table .today-patient>div{min-width:0;overflow-wrap:anywhere}
 .today-opd-table .today-patient small{overflow-wrap:anywhere}
}

/* Today OPD compact mobile cards — v2.11.41. Desktop table unchanged. */
@media(max-width:620px){
 .today-opd-card{padding:10px!important;overflow:visible!important}
 .today-opd-card .table-wrap{overflow:visible!important}
 .today-opd-mini-summary{padding:10px 8px!important;gap:8px!important;justify-content:space-between;font-size:11px!important;border-radius:10px;margin-bottom:10px}
 .today-opd-mini-summary span{white-space:nowrap}
 .today-opd-table{border-spacing:0!important}
 .today-opd-table tr{display:flex!important;flex-wrap:wrap;align-items:center;column-gap:10px;row-gap:6px;padding:12px 14px!important;margin-bottom:9px!important;border-radius:13px!important;box-shadow:0 1px 3px rgba(16,60,60,.04)}
 .today-opd-table td{margin:0!important;padding:0!important;line-height:1.35}
 .today-opd-table td:first-child{flex:0 0 100%;padding-right:25px!important}
 .today-opd-table .today-patient{gap:10px!important}
 .today-opd-table .today-patient img,.today-opd-table .today-patient .mini-avatar{width:42px!important;height:42px!important;flex:0 0 42px;border-radius:9px!important}
 .today-opd-table .today-patient b{font-size:15px;line-height:1.25}
 .today-opd-table .today-patient small{font-size:11px;line-height:1.35}
 .today-opd-table td:nth-child(3){order:1;flex:0 0 100%;font-size:11px!important;line-height:1.25}
 .today-opd-table td:nth-child(2){order:2;flex:0 0 auto}
 .today-opd-table td:nth-child(4){order:3;flex:0 0 auto}
 .today-opd-table td:nth-child(5){order:4;flex:1 1 auto;text-align:right;font-size:12px}
 .today-opd-table .pill{font-size:11px;padding:5px 8px}
 .today-opd-table td:last-child{position:static!important;order:5;flex:0 0 0;width:0!important;height:0;margin:0!important;padding:0!important}
 .today-opd-table td:last-child .btn{position:absolute;inset:0;z-index:1;width:100%!important;height:100%;margin:0!important;padding:0!important;border:0!important;border-radius:13px!important;background:transparent!important;color:transparent!important;font-size:0!important;box-shadow:none!important}
 .today-opd-table tr:after{content:'›';position:absolute;right:13px;top:13px;font-size:27px;line-height:1;color:#729092;pointer-events:none}
 .today-opd-table tr:focus-within{outline:2px solid #258c90;outline-offset:2px}
 .today-opd-table tr:active{background:#f1f9f9}
}

/* v2.11.42 — Today OPD: one clean border per patient, all patient counts. */
@media(max-width:620px){
 .today-opd-card{border:0!important;box-shadow:none!important;background:transparent!important;padding:0!important;overflow:visible!important}
 .today-opd-card .table-wrap{border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;padding:0!important;overflow:visible!important}
 .today-opd-table,.today-opd-table tbody{border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;border-radius:0!important;padding:0!important;margin:0!important}
 .today-opd-table{border-collapse:separate!important;border-spacing:0!important}
 .today-opd-table tr{border:1px solid #dce8e9!important;outline:0;box-shadow:none!important;margin:0 0 9px!important;background:#fff!important;border-radius:14px!important}
 .today-opd-table tr:last-child{margin-bottom:0!important}
 .today-opd-table td{border:0!important;box-shadow:none!important}
 .today-opd-mini-summary{background:#f4f8f8;border:1px solid #e4eeee;border-radius:12px!important;margin:0 0 10px!important;padding:11px 9px!important;display:flex;flex-wrap:wrap;justify-content:space-between;gap:7px 10px}
}

/* v2.11.43 — Today OPD: balanced, compact three-count mobile summary only. */
@media (max-width:620px){
 .today-opd-mini-summary{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  align-items:center!important;
  gap:4px!important;
  padding:8px 6px!important;
  margin-bottom:10px!important;
  font-size:clamp(10px,2.7vw,12px)!important;
  line-height:1.25!important;
  text-align:center!important;
 }
 .today-opd-mini-summary span{
  display:block!important;
  min-width:0!important;
  white-space:normal!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
 }
 .today-opd-mini-summary span + span{border-left:1px solid #dce8e9;padding-left:4px!important}
}

/* v2.11.45: isolated Today OPD mobile borders and duplicate notice appearance. */
@media(max-width:620px){
 .today-opd-card,.today-opd-card .table-wrap,.today-opd-table,.today-opd-table tbody{border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important}
 .today-opd-card{padding:0!important}
 .today-opd-table tr{border:1px solid #dce8e9!important;box-shadow:none!important;outline:0!important}
 .today-opd-table td{border:0!important;box-shadow:none!important}
}
.kp-action-dialog.is-warning .kp-action-icon{background:#fff3d6!important;color:#9a6500!important}
.kp-action-dialog.is-warning .kp-action-ok{background:#008e95!important;color:#fff!important;border-color:#008e95!important}
.kp-action-dialog.is-warning .kp-action-ok:focus:not(:focus-visible){outline:none!important;box-shadow:none!important}
.kp-action-dialog.is-warning .kp-action-ok:focus-visible{outline:2px solid #008e95!important;outline-offset:3px!important}

/* v2.11.51: stable confirmation modal sizing; no layout transition/flicker */
.kp-action-dialog,.kp-action-dialog .kp-action-card{transition:none!important;animation:none!important;transform:none!important;}
.kp-action-dialog{box-sizing:border-box!important;contain:layout style!important;}
.kp-action-dialog .kp-action-card{box-sizing:border-box!important;width:100%!important;min-height:146px!important;}
.kp-action-dialog .kp-action-copy{min-width:0!important;}
.kp-action-dialog .kp-action-buttons{min-height:38px!important;}

/* v2.11.58: consistent native select chevrons throughout application */
select:not([multiple]):not([size]){appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23234e52' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;background-size:15px 15px;padding-right:31px!important}
.kp-date-month,.kp-date-year{background-position:right 8px center!important;background-size:13px 13px!important;padding-right:26px!important}

/* V2.11.92.50: calendar bounds use same muted disabled appearance across devices. */
.kp-date-day.future-disabled,.kp-date-day.future-disabled:hover{color:#8a9898!important;background:transparent!important;cursor:not-allowed!important;opacity:.28!important;box-shadow:none!important;text-decoration:line-through!important}
.kp-date-footer .today:disabled{opacity:.45;cursor:not-allowed}

/* V2.11.92.52: prevent scroll chaining from modal content into the page. */
dialog[open],.kp-modal.open,.kp-modal.show,.kp-date-overlay.open,.kp-rack-overlay.open,.clinical-photo-modal.open{overscroll-behavior:contain}
dialog[open] > *, .kp-modal.open > *, .kp-date-overlay.open .kp-date-card{overscroll-behavior:contain}


/* V2.11.92.62: avoid animated jumps on save/modal transitions. */
html{scroll-behavior:auto!important}
body.kp-global-modal-scroll-locked{overscroll-behavior:none!important}

/* V2.11.92.63 — all date pickers: disabled dates are muted text, never tiles. */
.kp-date-grid .kp-date-day:disabled,
.kp-date-grid .kp-date-day:disabled:hover,
.kp-date-grid .kp-date-day:disabled:focus,
.kp-date-grid .kp-date-day.future-disabled,
.kp-date-grid .kp-date-day.past-disabled,
.kp-date-grid .kp-date-day.sunday-disabled{
  background:transparent!important;
  background-color:transparent!important;
  background-image:none!important;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  filter:none!important;
  transform:none!important;
  cursor:not-allowed!important;
  color:#aebaba!important;
  opacity:.58!important;
  -webkit-appearance:none!important;
  appearance:none!important;
}
.kp-date-grid .kp-date-day:disabled::before,
.kp-date-grid .kp-date-day:disabled::after{content:none!important;display:none!important}

/* V2.11.92.64: disabled calendar dates are text only, no rounded tile.
   Covers alternate :disabled classes and :hover/:focus specificity. */
.kp-date-overlay .kp-date-card .kp-date-grid button.kp-date-day:disabled,
.kp-date-overlay .kp-date-card .kp-date-grid button.kp-date-day:disabled:is(:hover,:focus,:active),
.kp-date-overlay .kp-date-card .kp-date-grid button.kp-date-day:is(.future-disabled,.past-disabled,.sunday-disabled){
 background:transparent!important;
 background-color:transparent!important;
 background-image:none!important;
 border:none!important;
 border-radius:0!important;
 box-shadow:none!important;
 outline:none!important;
 opacity:.56!important;
 color:#aab7b7!important;
 text-decoration:none!important;
 pointer-events:none!important;
}

/* V2.11.92.68 - modern accessible OPD history pagination */
.kp-visits-top{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:18px}
.kp-visits-top h2{margin:0 0 4px;font-size:1.15rem}
.kp-visits-top p{margin:0}
.kp-visits-count{display:flex;flex-direction:column;align-items:flex-end;background:#eff9f7;border:1px solid #d9eeea;border-radius:14px;padding:10px 16px;color:#12685c}
.kp-visits-count strong{font-size:1.15rem;font-variant-numeric:tabular-nums}
.kp-visits-count span{font-size:.75rem}
.kp-visits-pagination{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;border-top:1px solid #e7edec;padding-top:17px;margin-top:14px}
.kp-visits-range{font-size:.84rem;color:#687775}
.kp-visits-pages{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.kp-visits-pages a{text-decoration:none}
.kp-visits-num,.kp-visits-nav,.kp-visits-dots{min-width:35px;height:36px;padding:0 9px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;font-size:.86rem;font-weight:600;color:#3d5754;border:1px solid transparent}
.kp-visits-num:hover,.kp-visits-nav:not(.disabled):hover{background:#edf7f5;border-color:#d6e8e4}
.kp-visits-num.active{background:#117e72;color:white;box-shadow:0 3px 9px #117e7226}
.kp-visits-nav{border-color:#e1e9e7;padding:0 12px;gap:5px}
.kp-visits-nav.disabled{opacity:.38;cursor:not-allowed}
.kp-visits-dots{min-width:18px;padding:0;color:#84908e}
@media(max-width:680px){.kp-visits-pagination{justify-content:center}.kp-visits-range{width:100%;text-align:center}.kp-visits-nav{padding:0 8px}.kp-visits-top{align-items:flex-start}}

/* V2.11.92.73: keep floating Rack Finder from covering pagination controls.
   Reserve space for 56px FAB plus its right offset; no FAB behavior changes. */
.kp-visits-pagination,
.kp-campaign-pagination,
.kp-patients-pagination,
.kp-patient-pagination { padding-right:76px!important; }
@media(max-width:767px){
 .kp-visits-pagination,.kp-campaign-pagination,.kp-patients-pagination,.kp-patient-pagination{
  padding-right:0!important;padding-bottom:72px!important;
 }
}

/* V2.11.92.74 Follow-up pagination spacing and floating action clearance */
.kp-followups-pagination{margin:20px 0 28px;padding-right:72px}
@media(max-width:680px){.kp-followups-pagination{padding-right:0;padding-bottom:76px}}

/* V2.11.92.88 — consistent pagination across clinic modules */
.kp-visits-pagination,.kp-backup-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;border-top:1px solid #e3edeb;padding:15px 76px 14px 0;margin-top:14px}
.kp-visits-pages{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.kp-visits-num,.kp-visits-nav,.kp-visits-dots{box-sizing:border-box;min-width:36px;min-height:36px;border-radius:10px;font-size:13px;font-weight:650}
.kp-visits-num.active,.kp-visits-num[aria-current="page"]{background:#087f79;color:#fff;border-color:#087f79}
.kp-visits-nav.disabled{opacity:.4;pointer-events:none}
@media(max-width:767px){.kp-visits-pagination,.kp-backup-pagination{padding-right:0!important;padding-bottom:72px!important}.kp-visits-pages{justify-content:center}}

/* V2.23.3: Today OPD empty-state only. Preserve existing patient card layout. */
@media(max-width:820px){
 .today-opd-table tr:has(>td.empty){display:block!important;position:relative!important;width:100%!important;min-height:78px!important;padding:0!important;box-sizing:border-box!important}
 .today-opd-table tr:has(>td.empty)::after{content:none!important}
 .today-opd-table tr>td.empty[colspan]{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;min-width:0!important;max-width:100%!important;min-height:78px!important;flex:none!important;margin:0!important;padding:16px!important;text-align:center!important;white-space:normal!important;overflow-wrap:normal!important;word-break:normal!important;font-size:14px!important;line-height:1.5!important}
}

/* Match avatar actions to standard app typography. */
.user-popover-actions .btn{font-family:inherit;font-size:14px;font-weight:600;line-height:1.4;letter-spacing:normal;min-height:40px;gap:8px}



/* B109.2 restore original inline expand-on-tap header search; scoped to screen */
@media screen and (max-width:900px){
 .topbar,.topbar.search-expanded{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:64px!important;height:64px!important;min-height:64px!important;max-height:64px!important;padding:0 14px!important;gap:8px!important;overflow:visible!important;position:sticky!important;top:0!important;z-index:110!important;background:#fff!important}
 .topbar .title{display:block!important;grid-column:1!important;grid-row:1!important;min-width:0!important}
 .topbar .topbar-right,.topbar.search-expanded .topbar-right{grid-column:2!important;grid-row:1!important;z-index:1!important}
 .topbar #globalSearch{display:none!important}
 .topbar .mobile-search-toggle{display:grid!important;place-items:center!important}
 .topbar.search-expanded .title{display:none!important}
 .topbar.search-expanded #globalSearch,.topbar.search-expanded #globalSearch.mobile-open{display:flex!important;position:relative!important;grid-column:1!important;grid-row:1!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;inset:auto!important;transform:none!important;width:100%!important;max-width:none!important;min-width:0!important;height:44px!important;min-height:44px!important;margin:0!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;z-index:200!important}
 .topbar.search-expanded #globalSearch input{width:100%!important;height:44px!important;min-width:0!important;padding:0 13px!important;background:#fff!important;font-size:16px!important;border:1px solid #cfe0e0!important;border-radius:13px!important}
 .topbar.search-expanded #globalSearch>button,.topbar.search-expanded .mobile-search-toggle{display:none!important}
 .topbar #globalSearch .kp-patient-suggest{position:absolute!important;top:calc(100% + 6px)!important;left:0!important;right:0!important;width:100%!important;min-width:0!important;max-height:50dvh!important;z-index:3000!important;background:#fff!important;overflow:auto!important;box-shadow:0 12px 30px #163c3d30!important}
 .topbar #globalSearch .kp-patient-suggest[hidden]{display:none!important}
}
@media screen and (min-width:901px){#globalSearch{position:relative!important;overflow:visible!important}.topbar{overflow:visible!important}.kp-patient-suggest{z-index:3000!important}}
@media print{.topbar{display:none!important}}


/* KHAGA Clinic — consolidated visual polish, 2026-11. Screen-only.
   No navigation, display modes, element order, sizes, JS or print overrides. */
@media screen {
  :root { --shadow:0 8px 28px rgba(12,61,65,.075); --line:#d7e5e5; --muted:#566d70; }
  body { -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility; }
  .card { border-color:var(--line); box-shadow:0 5px 19px rgba(15,67,70,.055); }
  .card h2,.card h3,.content h1,.content h2 { letter-spacing:-.015em; }
  .field label, label { text-underline-offset:2px; }
  input:not([type=checkbox]):not([type=radio]):not([type=file]), textarea, select {
    border-color:#c8d9db;
  }
  input:not([type=checkbox]):not([type=radio]):not([type=file]):focus-visible,
  textarea:focus-visible,select:focus-visible,button:focus-visible,a:focus-visible {
    outline:2px solid #087f87;outline-offset:2px;
  }
  .muted,small,.empty { color:var(--muted); }
  table th { letter-spacing:.01em; }
  table td,table th { border-color:#e1eaea; }
  .btn { font-weight:650; }
}
@media screen and (max-width:600px) {
  /* Readability only: preserve all existing mobile navigation and placements. */
  body { -webkit-text-size-adjust:100%; }
  .content p,.content li,.card p,.card li { line-height:1.52; }
  .field label { line-height:1.4; }
  .muted,small,.empty { line-height:1.45; }
  input:not([type=checkbox]):not([type=radio]):not([type=file]),textarea,select { font-size:max(16px,1em); }
  table td,table th { line-height:1.4; }
}

/* KHAGA Phase 2 — safe screen-only premium finish.
   Existing layout, navigation, sizing, actions and print styles untouched. */
@media screen {
  :root { --kp-premium-stroke:#d9e7e7; --kp-premium-focus:#087f87; }
  .sidebar { box-shadow:2px 0 18px rgba(3,49,53,.07); }
  .sidebar a { text-underline-offset:3px; }
  .topbar { border-bottom-color:#dbe9e9; }
  .hero { box-shadow:0 10px 26px rgba(0,104,110,.11); }
  .card,.stat { border-color:var(--kp-premium-stroke); box-shadow:0 6px 20px rgba(15,67,70,.065); }
  .card,.stat,.hero,.btn { transition:box-shadow .18s ease,border-color .18s ease,filter .18s ease; }
  .card:hover,.stat:hover { box-shadow:0 9px 23px rgba(15,67,70,.09); }
  .btn:hover { filter:brightness(.985); }
  .btn:focus-visible,.sidebar a:focus-visible { outline:2px solid var(--kp-premium-focus);outline-offset:2px; }
  .table-wrap { border-color:var(--kp-premium-stroke); }
  table tbody tr:hover { background-color:rgba(0,126,133,.035); }
  table thead th { color:#47676a; }
  .muted,small { letter-spacing:.005em; }
  input::placeholder,textarea::placeholder { color:#73898c;opacity:1; }
}
@media screen and (max-width:767px) {
  .card p,.stat p,.hero p { line-height:1.5; }
  .card h2,.card h3,.hero h1,.hero h2 { overflow-wrap:break-word; }
  table th,table td { line-height:1.45; }
  .btn { -webkit-tap-highlight-color:transparent; }
}
@media screen and (prefers-reduced-motion:reduce) {
  .card,.stat,.hero,.btn { transition:none; }
}

/* KHAGA Clinic: sidebar tagline contrast-only correction */
.sidebar .brand small { color: #ffffff !important; opacity: 1 !important; }

/* Management sidebar emphasis: label only; retain menu geometry. */
.nav-management > summary{font-weight:800!important;}
.nav-management > summary .nav-management-chevron{font-weight:700;}

/* KHAGA UI B136 — Today OPD screen-only border refinement.
   No markup, actions, patient data, or print rules changed. */
@media screen and (min-width:621px){
  .today-opd-card{padding:0!important;overflow:hidden!important;border:1px solid #d9e7e7!important;border-radius:18px!important;background:#fff!important}
  .today-opd-card>.today-opd-mini-summary{margin:0!important;padding:14px 16px!important;border:0!important;border-bottom:1px solid #e3eded!important;border-radius:0!important;background:#f7fbfb!important}
  .today-opd-card>.table-wrap{margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow-x:auto}
  .today-opd-card .today-opd-table{width:100%;margin:0!important;border:0!important;border-collapse:collapse!important;border-spacing:0!important}
  .today-opd-card .today-opd-table th{border-top:0!important}
  .today-opd-card .today-opd-table tbody tr:last-child td{border-bottom:0!important}
}
@media screen and (max-width:620px){
  .today-opd-card>.today-opd-mini-summary{box-shadow:none!important}
  .today-opd-card>.table-wrap{border:0!important;box-shadow:none!important}
  .today-opd-card .today-opd-table tbody tr{box-shadow:none!important}
}

/* B138: Today OPD seamless summary and table, scoped to this page only. */
.today-opd-card.card{overflow:hidden!important;border:1px solid #d9e7e8!important;border-radius:18px!important;padding:0!important;background:#fff!important;box-shadow:0 8px 22px rgba(9,67,70,.045)!important}
.today-opd-card>.today-opd-mini-summary{display:flex!important;align-items:center!important;gap:22px!important;margin:0!important;padding:15px 19px!important;background:#f7fbfb!important;border:0!important;border-bottom:1px solid #d9e7e8!important;border-radius:0!important;box-shadow:none!important}
.today-opd-card>.table-wrap{margin:0!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow-x:auto!important;background:#fff!important}
.today-opd-card .today-opd-table{width:100%!important;margin:0!important;border:0!important;border-spacing:0!important;border-collapse:collapse!important;box-shadow:none!important}
.today-opd-card .today-opd-table thead{background:#f4f9f9!important}
.today-opd-card .today-opd-table th{border-top:0!important;border-bottom:1px solid #dce8e9!important}
.today-opd-card .today-opd-table tbody tr{box-shadow:none!important}
.today-opd-card .today-opd-table tbody tr:last-child td{border-bottom:0!important}
@media(max-width:620px){.today-opd-card>.today-opd-mini-summary{gap:0!important;padding:12px 10px!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important}.today-opd-card>.today-opd-mini-summary span{font-size:12px!important;text-align:center!important}.today-opd-card .today-opd-table tbody tr{box-shadow:none!important}}

/* B140: centered delayed loading overlay. Not shown for fast navigation. */
#kp-b140-nav-overlay{position:fixed;inset:0;z-index:2147483000;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:13px;background:rgba(244,249,249,.65);-webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .16s ease,visibility .16s ease}
#kp-b140-nav-overlay.kp-b140-visible{opacity:1;visibility:visible;pointer-events:auto;touch-action:none}
#kp-b140-nav-overlay .kp-b140-loader{position:relative;display:grid;place-items:center;width:90px;height:90px;border-radius:24px;background:rgba(255,255,255,.97);border:1px solid #e0ebea;box-shadow:0 12px 35px rgba(0,54,55,.12)}
#kp-b140-nav-overlay .kp-b140-ring{position:absolute;width:76px;height:76px;animation:kp-b140-rotate 1.05s linear infinite}
#kp-b140-nav-overlay .kp-b140-ring circle{fill:none;stroke-width:3.1;stroke-linecap:round}
#kp-b140-nav-overlay .kp-b140-track{stroke:#fff1cf}
#kp-b140-nav-overlay .kp-b140-arc{stroke:url(#kp-b140-ring-grad);stroke-dasharray:120 170;transform-origin:center}
#kp-b140-nav-overlay img{width:38px;height:38px;object-fit:contain;border-radius:7px}
#kp-b140-nav-overlay .kp-b140-label{font-size:13px;line-height:1.4;font-weight:650;color:#16494a;letter-spacing:.01em}
html.kp-b140-busy,html.kp-b140-busy body{cursor:progress!important}
@keyframes kp-b140-rotate{to{transform:rotate(360deg)}}
@media(max-width:620px){#kp-b140-nav-overlay .kp-b140-loader{width:82px;height:82px}#kp-b140-nav-overlay .kp-b140-ring{width:70px;height:70px}}
@media(prefers-reduced-motion:reduce){#kp-b140-nav-overlay .kp-b140-ring{animation-duration:2.4s}}
@media print{#kp-b140-nav-overlay{display:none!important}}

/* B141: no legacy top-edge progress indicators anywhere in the Clinic. */
.kp-b117-nav-progress,.kp-b117-netbar{display:none!important;visibility:hidden!important;animation:none!important}

/* B142: transparent favicon, close-fitting thin rotating gradient stroke. */
#kp-b140-nav-overlay .kp-b140-loader{
  width:64px!important;height:64px!important;
  border:0!important;border-radius:0!important;
  background:transparent!important;box-shadow:none!important;
}
#kp-b140-nav-overlay .kp-b140-ring{
  width:60px!important;height:60px!important;
  overflow:visible!important;
  animation:kp-b140-rotate 1.05s linear infinite!important;
}
#kp-b140-nav-overlay .kp-b140-ring circle{
  stroke-width:1.65!important;stroke-linecap:round!important;
}
#kp-b140-nav-overlay .kp-b140-track{stroke:transparent!important}
#kp-b140-nav-overlay .kp-b140-arc{stroke-dasharray:105 170!important}
#kp-b140-nav-overlay .kp-b140-loader img{
  width:44px!important;height:44px!important;
  border:0!important;background:transparent!important;
  box-shadow:none!important;border-radius:50%!important;
}
@media(max-width:620px){
 #kp-b140-nav-overlay .kp-b140-loader{width:64px!important;height:64px!important}
 #kp-b140-nav-overlay .kp-b140-ring{width:60px!important;height:60px!important}
}

/* B143: tight logo-outline orbit, slim fading arc and dark-yellow leading dot. */
#kp-b140-nav-overlay .kp-b140-loader{width:54px!important;height:54px!important;overflow:visible!important;}
#kp-b140-nav-overlay .kp-b140-ring{width:52px!important;height:52px!important;overflow:visible!important;}
#kp-b140-nav-overlay .kp-b140-ring .kp-b140-arc{stroke-width:1.9!important;stroke-dasharray:88 195!important;stroke-linecap:round!important;}
#kp-b140-nav-overlay .kp-b140-ring .kp-b143-leading-dot{fill:#d99500!important;stroke:#d99500!important;stroke-width:.35!important;}
#kp-b140-nav-overlay .kp-b140-loader img{width:44px!important;height:44px!important;object-fit:contain!important;}
@media(max-width:620px){#kp-b140-nav-overlay .kp-b140-loader{width:54px!important;height:54px!important;}#kp-b140-nav-overlay .kp-b140-ring{width:52px!important;height:52px!important;}}

/* B144: true clockwise leading-edge gradient; dot diameter exactly matches 2.5px stroke. */
#kp-b140-nav-overlay .kp-b140-ring{animation:kp-b140-rotate 1.05s linear infinite!important;transform-origin:50% 50%!important;}
#kp-b140-nav-overlay .kp-b140-ring .kp-b140-arc{stroke-width:2.5!important;stroke-dasharray:90 195!important;stroke-linecap:butt!important;transform:rotate(-90deg)!important;transform-origin:32px 32px!important;}
#kp-b140-nav-overlay .kp-b140-ring .kp-b143-leading-dot{r:1.25;fill:#d99500!important;stroke:none!important;stroke-width:0!important;}

/* B145: single leading dot, continuous one-sided tail, smooth clockwise rotation. */
#kp-b140-nav-overlay .kp-b140-ring{animation:kp-b140-rotate 1.8s linear infinite!important;transform-origin:center center!important;}
#kp-b140-nav-overlay .kp-b140-ring .kp-b140-arc{stroke-width:3.2!important;stroke-dasharray:none!important;stroke-linecap:butt!important;transform:none!important;fill:none!important;}
#kp-b140-nav-overlay .kp-b140-ring .kp-b143-leading-dot{fill:#d99500!important;stroke:none!important;stroke-width:0!important;}
