:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Noto Sans TC","PingFang TC",sans-serif;color:#253c38;background:#f5f7f6;font-synthesis:none;font-size:16px}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:default}button,a,input,textarea,select{outline-offset:4px}button{transition:background .15s}button:hover{filter:brightness(.97)}.sidebar{width:244px;position:fixed;inset:0 auto 0 0;background:#fff;border-right:1px solid #e4eae7;padding:32px 20px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:12px;color:#234d40;text-decoration:none;font-size:25px;font-weight:750;letter-spacing:2px}.logo{background:#285b49;color:#fff;border-radius:13px;font-size:34px;width:45px;height:47px;text-align:center;line-height:47px}.brand-en{display:block;font-size:14px;letter-spacing:1.4px;margin-top:4px}.clinic{margin:36px 0 30px;padding:14px 8px;display:flex;gap:9px;align-items:center;border-block:1px solid #ecf0ed;font-size:14px;font-weight:600}.clinic small,.profile small{display:block;font-size:14px;color:#8c9993;margin-top:7px;font-weight:400}.clinic-icon{background:#edf3ef;padding:8px;border-radius:8px;color:#4e7662}.nav-label{font-size:14px;letter-spacing:1.8px;color:#9ba69f;margin:0 15px 14px}.nav-item{width:100%;display:flex;align-items:center;gap:14px;border:0;background:none;text-align:left;padding:14px 15px;margin-bottom:7px;color:#73827a;border-radius:8px;font-weight:550;font-size:14px}.nav-item>span{font-size:20px;width:20px}.nav-item.active{color:#315d49;background:#eaf2ec}.nav-item b{font-size:14px;letter-spacing:1px;margin-left:auto;background:#d5e6d9;padding:4px;border-radius:3px}.sidebar-bottom{margin-top:auto}.integration{border:1px solid #e8ece9;padding:13px;border-radius:8px;font-size:14px;color:#78857e}.integration small{display:block;font-size:14px;color:#a5aea8;margin:8px 0 0 14px}.dot{width:6px;height:6px;border-radius:50%;display:inline-block;background:#6b9c7b;margin-right:6px}.dot.gray{background:#aaa}.profile{display:flex;align-items:center;gap:10px;margin-top:23px;font-size:14px}.avatar{background:#f0e9dd;color:#8f7e5c;border-radius:50%;padding:10px}.main{margin-left:244px}header{height:76px;background:#fff;border-bottom:1px solid #e8ece9;display:flex;justify-content:space-between;align-items:center;padding:0 36px;font-size:14px}.breadcrumb{color:#8c9992}.breadcrumb span{margin:0 15px;color:#c4cec8}.breadcrumb strong{color:#53685d;font-weight:500}.header-right{display:flex;align-items:center;color:#7f8b83;gap:7px}.demo-dot{height:6px;width:6px;background:#6f9977;border-radius:100%}.divider{height:16px;width:1px;background:#e0e6e1;margin:0 14px}main{padding:34px 36px 0;max-width:1650px;margin:auto}.title-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:27px}.eyebrow{color:#8a9c90;font-size:14px;letter-spacing:2.2px;margin-bottom:9px}h1{font-size:28px;letter-spacing:1px;font-weight:650;margin:0 0 10px}.title-row p{font-size:14px;color:#8b9990;margin:0}.title-row p span{margin:0 8px}.primary{background:#315d49;color:#fff;border:1px solid #315d49;border-radius:7px;padding:11px 18px;font-size:14px}.secondary{background:#fff;color:#53685b;border:1px solid #dce4de;border-radius:7px;padding:11px 17px;font-size:14px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:17px;margin-bottom:27px}.stat{border:1px solid #e4eae5;background:white;border-radius:10px;padding:18px 21px}.stat>div{display:flex;justify-content:space-between;align-items:center;font-size:14px;color:#839086}.stat-symbol{font-size:17px;border-radius:8px;padding:5px 9px}.mint{color:#5f8970;background:#eff5ef}.blue{color:#7c97a4;background:#f0f5f7}.peach{color:#bb9d79;background:#fbf4eb}.purple{color:#a197af;background:#f5f1f8}.stat strong{display:block;font-size:30px;line-height:1.2;font-weight:550;letter-spacing:-1px;margin:4px 0 9px}.stat small{font-size:14px;color:#9aa49d}.workspace{display:grid;grid-template-columns:minmax(300px,.82fr) minmax(450px,1.45fr);gap:22px;align-items:start}.panel{border:1px solid #e1e8e2;border-radius:11px;background:#fff;overflow:hidden}.panel-heading{display:flex;align-items:center;justify-content:space-between;padding:21px 21px 18px;gap:10px}.panel-heading h2{margin:0;font-size:14px;font-weight:600}.panel-heading h2>span{font-size:14px;color:#7d9584;background:#f0f4ef;border-radius:5px;margin-left:7px;padding:3px 7px}.panel-heading>span{color:#97a398;font-size:14px}.live{font-size:14px;color:#9aa69b}.search{display:flex;gap:9px;align-items:center;margin:0 20px 16px;border:1px solid #e8ece8;border-radius:6px;background:#fafbf9;padding:9px 12px;color:#96a297}.search input{border:0;background:none;font-size:14px;width:100%;color:#4b6555;outline:none}.tabs{display:flex;gap:16px;padding:0 20px;border-bottom:1px solid #edf0ed}.tabs button{border:0;background:none;font-size:14px;color:#8f9d92;padding:2px 0 12px;white-space:nowrap}.tabs .chosen{color:#42674f;border-bottom:2px solid #42674f}.patient-row{display:flex;align-items:start;text-align:left;width:100%;padding:21px 17px;border:0;border-bottom:1px solid #edf0ec;background:white;gap:13px;min-height:111px;color:#364e40}.patient-row.selected{background:#f1f6ef;border-left:3px solid #698c66;padding-left:14px}.queue-number{font-size:14px;color:#96a18f;padding-top:3px}.patient-row>div{flex:1}.patient-name{font-size:14px;font-weight:600}.patient-name small{font-size:14px;color:#9aa494;margin-left:6px;font-weight:400}.patient-row p{font-size:14px;color:#8f998b;margin:8px 0}.tiny-tag{font-size:14px;border:1px solid #e4e9df;border-radius:3px;padding:2px 5px;color:#98a28f}.badge{font-size:14px;padding:5px 7px;border-radius:4px;white-space:nowrap;display:inline-block}.s0{background:#f1f3ed;color:#929c82}.s1{background:#e2eee3;color:#5d8361}.s2{background:#fbf1e3;color:#b29261}.s3{background:#eef0f3;color:#8a929b}.queue-footer{display:flex;justify-content:space-between;padding:16px 20px;font-size:14px;color:#a7afa3}.patient-heading{padding:21px 24px;display:flex;align-items:center;justify-content:space-between}.identity{display:flex;gap:12px;align-items:center}.patient-avatar{background:#edf2e9;border-radius:10px;padding:13px;color:#708267;font-size:19px}.identity h2{margin:0 0 8px;font-size:18px;font-weight:600}.identity h2 span{font-size:14px;color:#94a08f;margin-left:8px;font-weight:400}.identity small{font-size:14px;color:#9ba793}.identity small span{margin:0 8px}.allergy{margin:0 24px 18px;padding:10px 13px;background:#fcf6eb;color:#b79b70;font-size:14px;border:1px solid #f2e7d3;border-radius:5px}.allergy strong{font-weight:500;margin:0 10px}.encounter-tabs{padding:0 24px;border-bottom:1px solid #e9eee7;display:flex;gap:25px;color:#a4ad9d;font-size:14px}.encounter-tabs span{padding:0 0 13px}.encounter-tabs .selected{border-bottom:2px solid #648563;color:#5c7657}.encounter-body{padding:21px 24px}.section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.section-title h3{font-size:14px;font-weight:600;margin:0}.section-title>span{font-size:14px;color:#a7b19f}.chief{background:#f7f9f5;padding:12px;border-radius:5px;font-size:14px;color:#85937c;margin-bottom:16px}.chief span{color:#a6b19d;margin-right:16px;font-size:14px}.field-label{display:block;font-size:14px;color:#8e9c84;margin-bottom:9px}textarea{width:100%;resize:vertical;min-height:93px;border:1px solid #e2e9dc;border-radius:6px;padding:12px;font-size:14px;line-height:1.9;color:#50634a;background:#fff}textarea::placeholder{color:#b0b9a8}.ai-card{border:1px solid #e0e9d9;border-radius:7px;background:linear-gradient(120deg,#f3f7ee,#fafcf7);padding:17px;margin:18px 0 22px}.ai-heading{display:flex;gap:11px;align-items:center}.spark{font-size:29px;color:#90a37a}.ai-heading strong{font-size:14px;font-weight:550;color:#6b815d}.ai-heading p{font-size:14px;color:#9bab8d;margin:7px 0}.ai-button{width:100%;text-align:left;border:1px solid #dbe5d0;background:#fff;color:#748a61;border-radius:5px;padding:10px 12px;font-size:14px;margin-top:10px}.ai-button span{float:right}.ai-card>small{display:block;font-size:14px;color:#a5b399;margin-top:9px;text-align:center}.draft-label{font-size:14px;color:#a8b399;background:#f5f7f0;padding:3px 5px;margin-left:7px;font-weight:400}.note{min-height:160px}.encounter-actions{border-top:1px solid #ecf0e7;padding:17px 24px;display:flex;gap:10px;align-items:center;background:#fdfefb}.encounter-actions>span{font-size:14px;color:#abb69f;margin-right:auto}.encounter-actions button{font-size:14px;padding:10px 12px}footer{display:flex;justify-content:space-between;gap:10px;padding:25px 0;font-size:14px;color:#a7b09f}.empty{padding:55px 20px;text-align:center;color:#a1ad99;font-size:14px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left}th,td{padding:18px 20px;border-top:1px solid #eef1ea;font-size:14px}th{color:#94a28a;font-weight:500;background:#fafbf8}.text-button{border:0;background:none;color:#66845d;font-size:14px}.billing-row{display:flex;align-items:center;gap:25px;padding:22px;border-top:1px solid #edf1e8}.billing-row>div{margin-right:auto}.billing-row h3{margin:0 0 6px;font-size:14px}.billing-row small{color:#9ca891;font-size:14px}.billing-row label{color:#91a083;font-size:14px}.billing-row input{display:block;width:110px;margin-top:8px}.audit-row{padding:17px 24px;border-top:1px solid #eef1e9;font-size:14px}.audit-row time{color:#9ba88e;margin-right:25px}.settings{padding:25px}.settings h2{font-size:18px}.settings p{color:#94a287;font-size:14px;line-height:1.8}.setting-row{display:flex;gap:30px;justify-content:space-between;padding:22px 0;border-bottom:1px solid #edf1e7;font-size:14px}.setting-row span{color:#97a78b;text-align:right}.settings>button{margin-top:25px}.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#315d49;color:#fff;padding:15px 25px;border-radius:8px;box-shadow:0 5px 25px #1d392333;z-index:100;font-size:14px}dialog{border:1px solid #e0e8d9;border-radius:12px;width:480px;max-width:94vw;padding:24px;color:#48613e}dialog::backdrop{background:#18301e66}dialog .panel-heading{padding:0}dialog p{font-size:14px;color:#96a58b}dialog label{display:block;font-size:14px;margin:18px 0;color:#7f9470}input,select{border:1px solid #dce5d2;border-radius:5px;padding:10px;background:#fff;color:#536c46}dialog input,dialog select{display:block;width:100%;margin-top:8px}.form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}dialog .primary{width:100%;margin-top:12px}@media(min-width:1500px){main{padding-top:42px}.workspace{grid-template-columns:390px 1fr}.patient-row{min-height:118px}.note{min-height:190px}}@media(max-width:1150px){.sidebar{width:200px;padding:25px 14px}.main{margin-left:200px}main{padding:25px 22px 0}header{padding:0 22px}.workspace{grid-template-columns:290px minmax(340px,1fr);gap:16px}.stat{padding:15px}.patient-row{gap:8px}.encounter-actions>span{display:none}.stats{gap:12px}.identity h2 span{display:block;margin:5px 0 0}}@media(max-width:940px){.sidebar{width:80px;padding:25px 12px}.brand>span:last-child,.clinic,.nav-label,.nav-item b,.sidebar-bottom{display:none}.brand{justify-content:center;margin-bottom:35px}.nav-item{font-size:0;justify-content:center;padding:14px}.nav-item>span{font-size:23px}.main{margin-left:80px}.workspace{grid-template-columns:1fr}.patient-list{max-height:300px;overflow:auto}.stats{grid-template-columns:repeat(2,1fr)}.patient-row{min-height:95px}.identity h2 span{display:inline;margin-left:8px}footer>span:last-child{display:none}.billing-row{flex-wrap:wrap;gap:15px}}@media(max-width:560px){.sidebar{position:static;width:100%;padding:12px 15px;border-right:0;border-bottom:1px solid #e4eae7;display:block}.brand{justify-content:start;margin:0}.brand>span:last-child{display:block;font-size:18px}.logo{width:33px;height:33px;font-size:25px;line-height:33px}.brand-en{font-size:14px}.sidebar nav{display:flex;overflow:auto;margin-top:15px;gap:6px}.nav-item{flex:0 0 auto;width:auto;font-size:14px;padding:8px;gap:5px;margin:0}.nav-item>span{font-size:16px;width:auto}.main{margin-left:0}header{height:48px;padding:0 16px}.header-right{font-size:14px}.header-right .divider,.header-right>span:last-child{display:none}main{padding:24px 15px 0}.title-row{gap:10px}h1{font-size:23px}.title-row p{font-size:14px;line-height:1.7;max-width:215px}.title-row .primary{padding:10px;white-space:nowrap;font-size:14px}.eyebrow{font-size:14px}.stat strong{font-size:27px}.stat small{font-size:14px}.stats{margin-bottom:18px}.patient-heading,.encounter-body{padding:18px}.allergy{margin:0 18px 18px}.encounter-actions{padding:15px 18px;justify-content:flex-end}.identity h2 span{display:block;margin:5px 0 0}.setting-row{flex-direction:column;gap:12px}.setting-row span{text-align:left}.billing-row label input{width:90px}footer{font-size:14px;line-height:1.8}footer>span:nth-child(2){max-width:170px;text-align:right}}
.nhi .panel-heading{padding:0 0 20px}.nhi-notice{background:#f1f6ec;padding:16px;border-radius:8px;color:#607451;font-size:14px;line-height:1.8}.nhi-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:22px}.nhi h3{font-size:14px;margin:12px 0}.nhi p,.nhi small{color:#6c7e62;line-height:1.8}.nhi label{display:block;font-size:14px;color:#65785a;margin:15px 0}.nhi label input{display:block;width:100%;margin-top:7px}.nhi-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.nhi-actions button{font-size:14px}.nhi-section{border-top:1px solid #e4ebdd;margin-top:24px;padding-top:16px}.nhi pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:320px;overflow:auto;padding:18px;background:#f4f7ef;border-radius:8px;font-size:14px;line-height:1.8}.nhi-links{display:flex;gap:22px;flex-wrap:wrap}.nhi-links a{color:#486d3a;font-size:14px}.nhi textarea{min-height:100px}@media(max-width:940px){.nhi-grid{grid-template-columns:1fr}.nhi .form-grid{grid-template-columns:1fr}}
.auth-shell{display:grid;grid-template-columns:1.05fr 1fr;min-height:100vh;background:#fff}.auth-story{background:#183e35;color:#eff5ed;padding:48px 64px;display:flex;flex-direction:column;justify-content:space-between;gap:60px;position:relative;overflow:hidden}.auth-story:after{content:'';position:absolute;width:450px;height:450px;border:1px solid #ffffff12;border-radius:50%;right:-250px;bottom:-140px;box-shadow:0 0 0 60px #ffffff03,0 0 0 120px #ffffff03;pointer-events:none}.auth-brand{display:flex;gap:14px;align-items:center;color:#eff5ed;text-decoration:none;font-size:36px}.auth-brand>span{font-size:27px;letter-spacing:3px;font-weight:600}.auth-brand small{font-size:14px;letter-spacing:1px;font-weight:400;margin-left:12px;color:#b1c6ba}.auth-kicker{display:block;font-size:14px;letter-spacing:2px;color:#8ea99a;margin-bottom:22px}.auth-story h1{font-size:48px;line-height:1.5;font-weight:500;letter-spacing:3px;margin:0 0 25px}.auth-story p{font-size:14px;line-height:2.1;color:#b6cbbd}.auth-story>small{font-size:14px;letter-spacing:1px;color:#8ca99a}.auth-preview{padding:25px;border:1px solid #ffffff20;border-radius:14px;background:#ffffff08;margin-top:42px;max-width:420px}.auth-preview>span{display:block;font-size:14px;color:#aac2b1}.auth-preview strong{display:block;margin:14px 0 22px;font-size:19px;font-weight:400}.auth-preview div{display:flex;gap:8px;align-items:center;font-size:14px;color:#b9ccbf}.auth-preview i{width:5px;height:5px;background:#b5d7a4;border-radius:50%;margin-left:7px}.auth-form-panel{display:flex;align-items:center;justify-content:center;padding:50px 40px}.auth-form-wrap{max-width:380px;width:100%}.auth-form-wrap h2{font-size:29px;font-weight:600;margin:0 0 12px;color:#283e34}.auth-form-wrap>p{color:#7f8d84;font-size:14px;line-height:1.8}.google-login{width:100%;background:#fff;border:1px solid #dbe3dc;border-radius:8px;padding:14px;color:#3b4d40;font-size:14px;margin-top:24px}.google-login b{font-size:19px;color:#4285f4;margin-right:12px}.auth-hint{display:block;font-size:14px;color:#879585;line-height:1.8;margin:10px 0}.auth-or{display:flex;align-items:center;gap:14px;font-size:14px;color:#9ea99e;margin:25px 0}.auth-or span{height:1px;flex:1;background:#e6ebe3}.auth-form-wrap form label{display:block;font-size:14px;color:#53694f;margin:20px 0 9px}.auth-form-wrap input{width:100%;font-size:14px;padding:13px;border-color:#dce4d7;background:#fdfefb}.password-field{position:relative}.password-field input{padding-right:58px}.password-field button{position:absolute;right:9px;top:9px;border:0;background:none;padding:5px;color:#7a8d6e;font-size:14px}.auth-submit{width:100%;padding:14px;margin-top:8px}.auth-switch{text-align:center;margin:22px 0}.auth-switch button{border:0;background:none;color:#315d49;font-weight:600}.auth-footnote{border-top:1px solid #e9eee4;padding-top:22px;color:#9aa58f;font-size:14px;line-height:1.9;margin-top:35px}#auth-error{min-height:18px;color:#b34c3e;font-size:14px;line-height:1.7}.profile{overflow:hidden}.profile>div{min-width:0}.profile small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-width:1000px){.auth-story{padding:40px}.auth-story h1{font-size:35px}.auth-preview{padding:20px}}@media(max-width:700px){.auth-shell{grid-template-columns:1fr}.auth-story{padding:24px 28px;gap:20px}.auth-story>div,.auth-story>small{display:none}.auth-form-panel{padding:35px 28px}.auth-brand{font-size:28px}.auth-brand>span{font-size:22px}}
:root{color-scheme:light;--theme-bg:#fff;--theme-fg:#53685b;--theme-border:#dce4de}
:root[data-theme="dark"]{color-scheme:dark;--theme-bg:#171b18;--theme-fg:#d4e2d8;--theme-border:#3b5044;background:#080a09;color:#e0ebe3}
theme-switcher{display:inline-flex;flex-shrink:0}
.theme-control{display:flex;align-items:center;gap:3px;padding:0 8px;border:1px solid var(--theme-border);border-radius:7px;background:var(--theme-bg);color:var(--theme-fg)}
.theme-control>span{font-size:18px}
.theme-control select{border:0;background:transparent;color:inherit;font-size:14px;min-height:34px;padding:6px 3px;cursor:pointer;max-width:112px}
.theme-control:focus-within{outline:2px solid #6d9a7c;outline-offset:3px}
.header-demo{display:inline-flex;align-items:center;gap:6px;margin-left:8px}
.auth-form-panel{position:relative;padding-top:85px}
.auth-theme{position:absolute;top:26px;right:32px}

/* Dark palette keeps clinical status colors distinct and all form surfaces readable. */
[data-theme="dark"] .sidebar,[data-theme="dark"] header,[data-theme="dark"] .stat,[data-theme="dark"] .panel,[data-theme="dark"] .auth-shell,[data-theme="dark"] dialog{background:#111412;color:#e0ebe3;border-color:#2d342f}
[data-theme="dark"] .brand{color:#d4e9d9}
[data-theme="dark"] .logo{background:#3b6c51}
[data-theme="dark"] .clinic,[data-theme="dark"] .integration,[data-theme="dark"] .tabs,[data-theme="dark"] .patient-row,[data-theme="dark"] .encounter-tabs,[data-theme="dark"] .encounter-actions,[data-theme="dark"] th,[data-theme="dark"] td,[data-theme="dark"] .billing-row,[data-theme="dark"] .audit-row,[data-theme="dark"] .setting-row,[data-theme="dark"] .nhi-section,[data-theme="dark"] .auth-footnote{border-color:#2d342f}
[data-theme="dark"] .nav-item,[data-theme="dark"] .breadcrumb,[data-theme="dark"] .header-right,[data-theme="dark"] .clinic small,[data-theme="dark"] .profile small,[data-theme="dark"] .integration,[data-theme="dark"] .integration small,[data-theme="dark"] .nav-label,[data-theme="dark"] .eyebrow,[data-theme="dark"] .title-row p,[data-theme="dark"] .stat>div,[data-theme="dark"] .stat small,[data-theme="dark"] .panel-heading>span,[data-theme="dark"] .live,[data-theme="dark"] .tabs button,[data-theme="dark"] .patient-name small,[data-theme="dark"] .patient-row p,[data-theme="dark"] .queue-number,[data-theme="dark"] .queue-footer,[data-theme="dark"] .identity h2 span,[data-theme="dark"] .identity small,[data-theme="dark"] .encounter-tabs,[data-theme="dark"] .section-title>span,[data-theme="dark"] .chief span,[data-theme="dark"] .field-label,[data-theme="dark"] .ai-heading p,[data-theme="dark"] .ai-card>small,[data-theme="dark"] .encounter-actions>span,[data-theme="dark"] footer,[data-theme="dark"] .empty,[data-theme="dark"] th,[data-theme="dark"] .billing-row small,[data-theme="dark"] .billing-row label,[data-theme="dark"] .audit-row time,[data-theme="dark"] .settings p,[data-theme="dark"] .setting-row span,[data-theme="dark"] dialog p,[data-theme="dark"] dialog label,[data-theme="dark"] .nhi p,[data-theme="dark"] .nhi small,[data-theme="dark"] .nhi label,[data-theme="dark"] .auth-form-wrap>p,[data-theme="dark"] .auth-hint,[data-theme="dark"] .auth-or,[data-theme="dark"] .auth-footnote{color:#b0bdb3}
[data-theme="dark"] .breadcrumb strong,[data-theme="dark"] .auth-form-wrap h2{color:#e0ebe3}
[data-theme="dark"] .breadcrumb span{color:#738d7a}
[data-theme="dark"] .divider,[data-theme="dark"] .auth-or span{background:#2d342f}
[data-theme="dark"] .nav-item.active,[data-theme="dark"] .clinic-icon,[data-theme="dark"] .panel-heading h2>span,[data-theme="dark"] .patient-avatar{background:#233428;color:#b8d6bf}
[data-theme="dark"] .nav-item b{background:#3b5843;color:#d4e9d9}
[data-theme="dark"] .avatar{background:#453e2d;color:#e4cea4}
[data-theme="dark"] .primary,[data-theme="dark"] .toast{background:#36644b;border-color:#6c9677;color:#f3faf5}
[data-theme="dark"] .secondary,[data-theme="dark"] .ai-button,[data-theme="dark"] .google-login{background:#1b211d;color:#d4e5d7;border-color:#435747}
[data-theme="dark"] .mint{background:#294333;color:#aad8b8}
[data-theme="dark"] .blue{background:#263d49;color:#b3d2e4}
[data-theme="dark"] .peach{background:#453b2a;color:#e7c492}
[data-theme="dark"] .purple{background:#3b3148;color:#d1bfeb}
[data-theme="dark"] .search,[data-theme="dark"] .chief,[data-theme="dark"] th,[data-theme="dark"] .nhi-notice,[data-theme="dark"] .nhi pre{background:#171e19;color:#c1d3c3;border-color:#354438}
[data-theme="dark"] .search input{color:#e0ebe3}
[data-theme="dark"] .patient-row{background:#111412;color:#e0ebe3}
[data-theme="dark"] .patient-row.selected{background:#1e3023;border-left-color:#a0c796}
[data-theme="dark"] .tiny-tag{border-color:#506249;color:#b9c9ad}
[data-theme="dark"] .tabs .chosen,[data-theme="dark"] .encounter-tabs .selected{color:#b7d6aa;border-bottom-color:#9cbd8e}
[data-theme="dark"] .s0{background:#39412e;color:#d1dcba}
[data-theme="dark"] .s1{background:#284b34;color:#b6dfbd}
[data-theme="dark"] .s2{background:#493d27;color:#f0ce92}
[data-theme="dark"] .s3{background:#333e49;color:#c2d0dd}
[data-theme="dark"] .allergy{background:#3b3324;color:#edcd96;border-color:#665438}
[data-theme="dark"] input,[data-theme="dark"] select,[data-theme="dark"] textarea,[data-theme="dark"] .auth-form-wrap input{background:#090d0a;color:#e0ebe3;border-color:#3a493d}
[data-theme="dark"] input::placeholder,[data-theme="dark"] textarea::placeholder{color:#9bad9e;opacity:1}
[data-theme="dark"] .theme-control select{background:transparent;color:inherit}
[data-theme="dark"] .ai-card{background:linear-gradient(120deg,#1d2c1d,#121b14);border-color:#45613d}
[data-theme="dark"] .spark,[data-theme="dark"] .ai-heading strong,[data-theme="dark"] .text-button,[data-theme="dark"] .nhi-links a,[data-theme="dark"] .auth-switch button{color:#b8eda5}
[data-theme="dark"] .draft-label{background:#35432c;color:#c4d7af}
[data-theme="dark"] .encounter-actions{background:#121813}
[data-theme="dark"] dialog::backdrop{background:#030b07b3}
[data-theme="dark"] .auth-story{background:#080b09}
[data-theme="dark"] .auth-form-wrap form label,[data-theme="dark"] .password-field button{color:#bbd0b6}
[data-theme="dark"] #auth-error{color:#ffa999}
[data-theme="dark"] button:hover:not(:disabled){filter:brightness(1.12)}
@media(max-width:700px){.auth-form-panel{padding-top:85px}.auth-theme{right:28px;top:24px}}
@media(max-width:560px){.header-demo{display:none}.header-right{gap:8px}.breadcrumb span{margin:0 6px}.theme-control select{font-size:14px;max-width:101px}.theme-control{padding:0 5px}}

/* Black + light green brand palette, shared by both appearance modes. */
:root{--brand-lime:#b8eda5;--brand-ink:#10170e}
.primary,.logo{background:var(--brand-lime);border-color:#a3d78f;color:var(--brand-ink)}
.brand{color:#1c2b19}.nav-item.active{background:#e5f5dc;color:#2b5121}
.patient-row.selected{background:#f0f9e9;border-left-color:#90bd74}
.auth-story{background:#090d0a}.auth-brand,.auth-preview strong{color:#c6f2b5}
.auth-preview{background:#b8eda509;border-color:#b8eda526}
.auth-preview i{background:var(--brand-lime)}
.auth-story:after{border-color:#b8eda519;box-shadow:0 0 0 60px #b8eda503,0 0 0 120px #b8eda503}
.theme-control:focus-within{outline-color:#8abf72}
[data-theme="dark"] .primary,[data-theme="dark"] .logo{background:var(--brand-lime);border-color:#b8eda5;color:var(--brand-ink)}
[data-theme="dark"] .brand,[data-theme="dark"] .auth-brand{color:#c6f2b5}
[data-theme="dark"] .nav-item.active{background:#263b22;color:#c6f2b5}
[data-theme="dark"] .patient-row.selected{background:#1e2c1c;border-left-color:#b8eda5}
[data-theme="dark"] .tabs .chosen,[data-theme="dark"] .encounter-tabs .selected{color:#c6f2b5;border-bottom-color:#b8eda5}
[data-theme="dark"] .toast{background:#b8eda5;border-color:#b8eda5;color:#10170e}

/* Sex is taken from the record, never inferred from the patient's name. */
.sex-badge,.identity h2 .sex-badge{display:inline-block;font-size:14px;font-weight:500;line-height:1.4;padding:2px 6px;border-radius:4px;margin:0;vertical-align:middle}
.sex-badge.sex-male,.patient-avatar.sex-male{background:#e5f1ff;color:#235c9c}
.sex-badge.sex-female,.patient-avatar.sex-female{background:#fce7f1;color:#a12e65}
.sex-badge.sex-neutral,.patient-avatar.sex-neutral{background:#edf0ed;color:#55635a}
[data-theme="dark"] .sex-badge.sex-male,[data-theme="dark"] .patient-avatar.sex-male{background:#203b58;color:#a9d1ff}
[data-theme="dark"] .sex-badge.sex-female,[data-theme="dark"] .patient-avatar.sex-female{background:#492739;color:#ffc1dd}
[data-theme="dark"] .sex-badge.sex-neutral,[data-theme="dark"] .patient-avatar.sex-neutral{background:#303932;color:#c1ccc3}

.subscription-panel .panel-heading{padding:0 0 20px}.subscription-plan{padding:26px;border:1px solid #d5e7cb;border-radius:10px;background:#f1f8ed}.subscription-plan>span{font-size:14px;color:#56754a}.subscription-plan h3{font-size:28px;line-height:1.4;margin:14px 0}.subscription-plan small{color:#64765c}.subscription-actions{display:flex;gap:12px;flex-wrap:wrap;margin:25px 0}.subscription-note{padding:20px;border-top:1px solid #dce4d8;font-size:14px}.subscription-note p{margin-bottom:0}#billing-message{min-height:22px}[data-theme="dark"] .subscription-plan{background:#182315;border-color:#384c2f}[data-theme="dark"] .subscription-plan>span,[data-theme="dark"] .subscription-plan small{color:#bdd6ad}[data-theme="dark"] .subscription-note{border-color:#34432e}

/* Readable clinical workspace: larger text and stronger contrast in both themes. */
:root{--readable-text:#18251c;--readable-muted:#4b5c50;--readable-line:#aebdb0;color:var(--readable-text);line-height:1.6}
:root[data-theme="dark"]{--readable-text:#f0f5f1;--readable-muted:#c2cec5;--readable-line:#687d6c;color:var(--readable-text)}
.nav-item,.primary,.secondary,.text-button,.search input,.tabs button,.patient-name,.patient-row p,.chief,.ai-button,th,td,.audit-row,.setting-row,.settings p,.nhi p,.nhi label,.nhi button,dialog label,dialog input,dialog select,.auth-form-wrap input,.auth-form-wrap form label,.google-login,.auth-switch button{font-size:16px}
textarea,.note{font-size:18px;line-height:1.85;min-height:150px}.note{min-height:240px}
.panel-heading h2,.section-title h3,.ai-heading strong{font-size:18px}.identity h2{font-size:22px}
.patient-name small,.identity h2 span,.identity h2 .sex-badge,.sex-badge{font-size:14px;font-weight:600}.badge{font-size:14px;font-weight:600}
.nav-item,.breadcrumb,.header-right,.clinic small,.profile small,.integration,.integration small,.nav-label,.eyebrow,.title-row p,.stat>div,.stat small,.panel-heading>span,.live,.tabs button,.patient-name small,.patient-row p,.queue-number,.queue-footer,.identity h2 span,.identity small,.encounter-tabs,.section-title>span,.chief,.chief span,.field-label,.ai-heading p,.ai-card>small,.encounter-actions>span,footer,.empty,th,.billing-row small,.billing-row label,.audit-row time,.settings p,.setting-row span,dialog p,dialog label,.nhi p,.nhi small,.nhi label,.auth-form-wrap>p,.auth-hint,.auth-or,.auth-footnote{color:var(--readable-muted)}
:root:not([data-theme="dark"]) .tiny-tag{color:#4c6045;border-color:#a9b99e}
:root:not([data-theme="dark"]) .allergy{color:#77551a;border-color:#c9b17e}
:root:not([data-theme="dark"]) .s0{color:#4c593a}:root:not([data-theme="dark"]) .s1{color:#2f6035}:root:not([data-theme="dark"]) .s2{color:#79531c}:root:not([data-theme="dark"]) .s3{color:#45556a}
:root:not([data-theme="dark"]) .draft-label{color:#4b613d}
:root:not([data-theme="dark"]) .ai-heading strong,:root:not([data-theme="dark"]) .ai-button,:root:not([data-theme="dark"]) .text-button{color:#355b28}
input,select,textarea,.search{border-color:var(--readable-line)}input::placeholder,textarea::placeholder{color:#596b5b;opacity:1}
.sidebar{width:264px;padding:24px 16px;overflow-y:auto}.main{margin-left:264px}.clinic{margin:22px 0}.sidebar-bottom{padding-top:20px}.profile small{white-space:normal;overflow-wrap:anywhere}.nav-item{padding:12px;gap:12px}.nav-item b{display:none}
.workspace{grid-template-columns:minmax(360px,1fr) minmax(450px,1.4fr)}.patient-row{flex-wrap:wrap;gap:10px}.patient-row .badge{margin-left:auto}.encounter-actions{flex-wrap:wrap}.header-right{flex-wrap:wrap}header{height:auto;min-height:76px;padding-block:12px;gap:16px}.brand-en{font-size:12px}.stat small{font-size:14px}.title-row p{font-size:15px}
.migration-notice{padding:16px 20px;background:#edf6e7;border:1px solid #b4c9a8;border-radius:8px}.migration-notice p{margin-bottom:0}.migration-actions{display:flex;flex-wrap:wrap;gap:12px;margin:22px 0}.migration-form{display:grid;grid-template-columns:2fr 1fr 2fr;gap:16px}.migration-form label,.mapping-grid label{display:flex;flex-direction:column;gap:8px;font-size:16px}.migration-form input,.migration-form select,.mapping-grid select{width:100%;min-width:0;font-size:16px}.mapping-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.import-confirm{display:flex;align-items:center;gap:10px;margin:24px 0;font-size:16px}.import-confirm input{width:20px;height:20px}.migration-summary{display:flex;flex-wrap:wrap;gap:20px;padding:16px;background:#edf6e7;border-radius:8px}.migration-panel h3{margin-top:30px;font-size:20px}.history-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:32px}.history-record{padding:18px 0;border-top:1px solid var(--readable-line)}.history-record summary,.migration-guide summary{cursor:pointer;font-size:17px}.history-record pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;padding:16px;border:1px solid var(--readable-line);border-radius:6px}.migration-guide{margin-top:30px}.migration-guide li{margin:12px 0}.migration-panel .table-wrap{max-height:430px;overflow:auto}
[data-theme="dark"] .migration-notice,[data-theme="dark"] .migration-summary{background:#1e3020;border-color:#66815b}
@media(max-width:1180px){.workspace{grid-template-columns:1fr}.patient-list{max-height:400px;overflow:auto}}
@media(max-width:940px){.sidebar{width:200px}.main{margin-left:200px}.brand>span:last-child{display:block;font-size:21px}.brand{justify-content:flex-start}.nav-item{font-size:16px;justify-content:flex-start}.migration-form,.mapping-grid{grid-template-columns:1fr 1fr}.auth-story h1{font-size:32px}}
@media(max-width:700px){.sidebar{position:static;width:100%;display:block;padding:16px}.main{margin-left:0}.brand{margin:0}.sidebar nav{display:flex;overflow-x:auto;gap:8px;margin-top:16px}.nav-item{width:auto;flex:0 0 auto;margin:0;padding:10px;font-size:15px}.nav-item>span{font-size:19px}.clinic,.sidebar-bottom,.nav-label{display:none}header{align-items:flex-start}.breadcrumb{display:none}.header-right{width:100%;justify-content:flex-end}.header-demo{display:none}.title-row{flex-wrap:wrap}.title-row .primary{font-size:16px}.title-row p{max-width:none}.workspace{grid-template-columns:minmax(0,1fr)}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.stat{padding:14px}.stat>div{font-size:15px}.stat-symbol{display:none}.migration-form,.mapping-grid{grid-template-columns:1fr}.history-heading{align-items:stretch;flex-direction:column}.patient-heading{flex-wrap:wrap;gap:12px}.theme-control select{font-size:14px;max-width:none}.encounter-actions button{font-size:16px}.settings{padding:20px}footer{font-size:14px;flex-wrap:wrap}th,td{padding:14px}.patient-name small{display:block;margin-left:0}.panel-heading{flex-wrap:wrap}.auth-form-wrap{max-width:440px}}

/* Patient-facing intake and authenticated reception review. */
.check-in-page{background:#f3f6f1}.check-in-shell{max-width:1000px;padding:30px 24px 60px;margin:auto}.check-in-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:26px}.check-in-shell .settings{padding:32px}.check-in-shell h1{font-size:32px}.check-in-shell p{font-size:17px;line-height:1.8}.check-in-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;margin:24px 0}.check-in-fields label{display:flex;flex-direction:column;gap:10px;font-size:18px;font-weight:600}.check-in-fields input,.check-in-fields select{font-size:20px;padding:14px;min-height:54px;width:100%;min-width:0}.check-in-fields textarea{font-size:20px;min-height:120px}.intake-check{display:flex;align-items:flex-start;gap:12px;font-size:18px;line-height:1.6;margin:22px 0}.intake-check input{flex:0 0 auto;width:24px;height:24px;margin-top:4px}.intake-notice,.handwriting-help{padding:20px;border:1px solid var(--readable-line);border-radius:10px;margin:22px 0;background:#f0f8ea}.handwriting-help summary{cursor:pointer;font-size:18px;font-weight:600}#patient-ink,#intake-ink{display:block;max-width:100%;width:100%;height:auto;background:white;border:2px solid #698265;border-radius:8px}#patient-ink{touch-action:none}.check-in-shell button,.check-in-shell .primary{font-size:19px;min-height:52px}.check-in-success{text-align:center}.check-in-success>span{display:block;font-size:48px;color:#355b28}#patient-error{color:#962d26;font-size:18px}.intake-desk .panel-heading{padding:0;flex-wrap:wrap}.intake-review-grid{display:grid;grid-template-columns:260px minmax(0,1fr);gap:28px}.intake-review-grid>div>label{display:flex;flex-direction:column;gap:8px}.intake-row{display:block;text-align:left;width:100%;padding:16px;background:transparent;border:1px solid var(--readable-line);border-radius:8px;margin:12px 0;color:var(--readable-text);font-size:17px}.intake-row span,.intake-row small{display:block;font-size:14px;margin-top:6px;color:var(--readable-muted)}.intake-row.selected{background:#e5f5dc}.intake-review-grid fieldset{border:0;padding:0;margin:0;min-width:0}.intake-review-grid .check-in-fields label{font-size:16px}.intake-review-grid .check-in-fields input,.intake-review-grid .check-in-fields select,.intake-review-grid .check-in-fields textarea{font-size:17px}.intake-original{margin-top:24px}.intake-original summary{cursor:pointer}.intake-link{padding:20px;border:1px solid var(--readable-line);border-radius:8px}.intake-link input{width:100%;font-size:16px}.intake-link a{text-decoration:none}.intake-original td{white-space:pre-wrap;overflow-wrap:anywhere}[data-theme="dark"] .check-in-page{background:#080a09}[data-theme="dark"] .intake-notice,[data-theme="dark"] .handwriting-help,[data-theme="dark"] .intake-row.selected{background:#20311d}[data-theme="dark"] #patient-error{color:#ffb9b2}[data-theme="dark"] .check-in-success>span{color:#b8eda5}
@media(max-width:1350px){.intake-review-grid{grid-template-columns:1fr}.intake-review-grid .check-in-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.check-in-shell{padding:20px 12px 40px}.check-in-shell .settings{padding:22px 18px}.check-in-shell h1{font-size:28px}.check-in-fields,.intake-review-grid .check-in-fields{grid-template-columns:1fr}.check-in-shell .brand{font-size:24px}.check-in-shell .migration-actions{flex-direction:column}}

/* Compact daily summary and self-pay workflows. */
.summary-header{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;padding:12px 28px;min-height:78px}.summary-stat{display:flex;align-items:center;justify-content:center;gap:15px;border-right:1px solid var(--readable-line)}.summary-stat:last-child{border:0}.summary-stat span{font-size:15px;color:var(--readable-muted)}.summary-stat strong{font-size:24px;color:var(--readable-text);white-space:nowrap}.sidebar-logout{margin-top:14px;width:100%}.clinic-settings form{max-width:650px;display:grid;gap:10px}.clinic-settings form button{margin-top:18px}.clinic-settings input,.clinic-settings select,.practice input,.practice select{font-size:17px;min-width:0;width:100%;padding:12px}.clinic-settings h3{margin-top:30px}.practice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:30px}.practice label{display:flex;flex-direction:column;gap:8px;margin:16px 0}.practice label.intake-check{flex-direction:row}.practice label.intake-check input{width:24px}.practice form{margin-bottom:28px}.practice textarea{width:100%;min-height:110px}.practice h3{font-size:20px;margin:24px 0 14px}.practice-ledger article{padding:18px 0;border-top:1px solid var(--readable-line)}.practice figure{margin:18px 0}.practice figure img{display:block;width:100%;max-height:480px;object-fit:contain;background:#edf0ed;border:1px solid var(--readable-line);border-radius:8px}.practice figcaption{padding:10px 0}.practice hr{border:0;border-top:1px solid var(--readable-line);margin:30px 0}.practice .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.practice select{max-width:100%}.auth-form-wrap select{width:100%;padding:12px;font-size:16px;margin-bottom:16px}
@media(max-width:1100px){.summary-stat{flex-direction:column;gap:0}.practice-grid{grid-template-columns:1fr}}
@media(max-width:700px){.summary-header{padding:12px}.summary-stat span{font-size:13px}.summary-stat strong{font-size:18px}.sidebar-bottom{display:flex;align-items:center;gap:12px;padding-top:12px}.sidebar-bottom .integration{display:none}.sidebar-bottom .profile{margin:0;flex:1}.sidebar-logout{width:auto;margin:0}.practice .form-grid{grid-template-columns:1fr}}

.evidence-hash{overflow-wrap:anywhere;font-size:14px}.monitor details{margin:22px 0}.monitor summary{cursor:pointer}.monitor li{margin:12px 0}
/* Order entry and support: readable, high contrast, compact on tablets. */
.operations-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px}.operations-grid section{min-width:0}.operations-grid label{display:block;margin:12px 0 6px}.operations-grid input:not([type=checkbox]),.operations-grid select,.operations-grid textarea{width:100%;font:inherit;padding:10px;border:1px solid var(--theme-border);border-radius:8px;color:var(--theme-fg);background:var(--theme-bg)}.catalog-item,.feedback-ticket{display:block;text-align:left;width:100%;margin:8px 0;white-space:normal;line-height:1.5}.catalog-item span,.feedback-ticket span{display:block;font-size:14px}.feedback-reply{border-left:3px solid #4c9b60;padding:12px 16px;margin:12px 0}.feedback-reply small{display:block}.feedback-reply p{white-space:pre-wrap;overflow-wrap:anywhere}.sidebar nav{overflow-y:auto;min-height:0}.sidebar{height:100dvh}.settings.orders,.settings.statistics,.settings.feedback{max-width:none}#catalog-results{max-height:500px;overflow-y:auto}@media(max-width:1000px){.operations-grid{grid-template-columns:1fr}}@media(max-width:700px){.sidebar{height:auto;position:static}}

#claims-input{width:100%;min-height:380px;font-family:ui-monospace,monospace;font-size:16px}#claims-result{white-space:pre-wrap;overflow-wrap:anywhere}#claims-result pre{white-space:pre-wrap;max-height:400px;overflow:auto}

@media(min-width:701px) and (max-height:800px){.sidebar{padding:14px 16px}.sidebar .clinic{margin:12px 0;padding:8px}.sidebar .nav-label{margin-bottom:8px}.sidebar .integration{display:none}.sidebar .profile{margin-top:8px}.sidebar-bottom{padding-top:10px}.sidebar-logout{margin-top:8px;padding:8px}.sidebar nav{flex:1}.nav-item{padding:10px;margin-bottom:4px}}
