@font-face{font-family:localui;src:local('Malgun Gothic')}*{box-sizing:border-box}body{margin:0;background:#f8f5ef;color:#362e2a;font-family:localui,'Segoe UI',sans-serif;font-size:14px}button,input,select{font:inherit}button{cursor:pointer}aside{position:fixed;width:230px;inset:0 auto 0 0;background:#4c2b25;color:#f0e2d1;padding:34px 22px;display:flex;flex-direction:column}.brand{display:flex;gap:12px;align-items:center;font-size:24px;font-weight:700;letter-spacing:2px}.mark{border:1px solid #b38b46;border-radius:12px;padding:7px 10px;color:#e3c46c}.brand small{display:block;font-size:11px;font-weight:400;letter-spacing:1px;margin-top:5px;color:#ddc5a5}.nav-label{font-size:10px;letter-spacing:2px;color:#c6a982;margin:48px 12px 16px}nav button{display:flex;gap:14px;text-align:left;width:100%;border:0;background:none;color:#e3cfb6;padding:16px;border-radius:8px;margin-bottom:8px}nav button.active{background:#754335;color:white}nav button:hover{background:#62372d}.upcoming{margin:36px 12px;color:#d7bc99;font-size:12px}.upcoming p{font-size:12px;line-height:2.2;color:#b99c7d}.aside-bottom{margin-top:auto;font-size:10px;color:#d6bb97}.dot{display:inline-block;width:6px;height:6px;background:#d7b75c;border-radius:50%;margin-right:5px}main{margin-left:230px;padding:0 38px;max-width:1800px}header{height:77px;border-bottom:1px solid #e8e5e1;display:flex;justify-content:space-between;align-items:center;font-size:12px;color:#847666}header span{margin:0 13px;color:#c5bdb3}.trial-banner{margin-top:25px;background:#f0eeec;color:#6b6053;padding:12px 16px;border:1px solid #e4e0dc;border-radius:8px;font-size:12px;line-height:1.7}.trial-banner strong{margin-right:12px;color:#804832}.page-title{display:flex;justify-content:space-between;align-items:center;padding:32px 0 28px}.eyebrow{font-size:10px;font-weight:700;letter-spacing:2px;color:#978978}h1{font-size:30px;letter-spacing:-1px;margin:8px 0 9px}p{color:#928372;margin:0;line-height:1.7}button{border-radius:6px;padding:10px 16px;transition:background .15s}.primary{background:#8d402c;color:white;border:1px solid #8d402c;font-weight:600}.primary:hover{background:#733121}.secondary{border:1px solid #e4e0dc;background:white;color:#5f5549}.secondary:hover{background:#f5f3f1}button:disabled{opacity:.4;cursor:default}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:17px;margin-bottom:28px}.stats>div{padding:22px;background:white;border:1px solid #eae7e3;border-radius:10px}.stats span{display:block;font-size:12px;color:#91816f}.stats strong{display:block;font-size:28px;margin:12px 0 8px;letter-spacing:-1px;font-weight:600}.stats small{font-size:10px;color:#a69a8c}.panel{background:white;border:1px solid #e8e5e1;border-radius:10px;overflow:hidden}.panel-head{padding:24px;display:flex;justify-content:space-between;gap:20px;align-items:center}h2{font-size:17px;margin:0 0 7px}.panel-head h2 span{font-size:12px;color:#8e7f6d;font-weight:400;margin-left:8px}.panel-head p{font-size:11px}form#search-form{display:flex;gap:8px}input,select{border:1px solid #e2ded9;border-radius:6px;padding:10px 12px;background:white;color:#38322a;min-width:0}input:focus,select:focus{outline:2px solid #ba8b32;outline-offset:1px}#search{width:250px}table{width:100%;border-collapse:collapse;white-space:nowrap}th{font-weight:500;color:#9a8c7c;background:#faf9f8;text-align:left;font-size:11px;padding:14px 22px;border-top:1px solid #f1efec;border-bottom:1px solid #f1efec}td{padding:15px 22px;border-bottom:1px solid #f2f1ef;font-size:12px}td:first-child{font-weight:600}tbody tr:hover{background:#fbfbfa}.badge{font-size:10px;color:#8a7c6b;background:#f4f2f0;padding:4px 7px;border-radius:4px}.badge.trial{color:#956b2d;background:#fff5df}.detail-btn{padding:5px 10px;font-size:11px;border:1px solid #e7e4e0;background:white;color:#675a4b}.pagination{display:flex;justify-content:space-between;align-items:center;padding:18px 24px;color:#a19485;font-size:11px}.pagination button{padding:7px 13px;margin-left:5px}footer{padding:23px 0;color:#a09383;font-size:10px;display:flex;justify-content:space-between}.hidden{display:none!important}dialog{border:0;border-radius:14px;width:min(920px,94vw);max-height:88vh;padding:28px;box-shadow:0 20px 100px #173c3a40;color:#362e2a}dialog::backdrop{background:#122d3266}.dialog-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}.dialog-head h2{font-size:25px;margin-top:8px}.close{background:#f5f3f1;border:0;font-size:23px;padding:2px 12px;color:#7d7061}.info-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;background:#f8f8f7;padding:17px;border-radius:8px;margin-bottom:22px}.info-grid span{font-size:10px;color:#9b8d7c;display:block;margin-bottom:6px}.info-grid strong{font-size:13px;font-weight:500}h3{font-size:14px;margin:0 0 7px}.checkin-box{border:1px solid #e8e4e0;padding:20px;border-radius:8px}.checkin-box p{font-size:11px}label{display:block;font-size:12px;color:#76695a}label input,label select{display:block;margin-top:7px;width:100%}#checkin-form{margin-top:15px}#visit-date{width:180px}fieldset{border:0;padding:0;margin:18px 0}legend{font-size:11px;color:#8c7d6c;margin-bottom:10px}.chips{display:flex;flex-wrap:wrap;gap:7px}.chips label{display:flex;align-items:center;gap:5px;background:#f6f5f4;padding:6px 9px;border-radius:5px;font-size:11px}.chips input{width:auto;margin:0;accent-color:#8d402c}.history-heading{display:flex;justify-content:space-between;margin:25px 0 10px}.history-heading span{font-size:11px;color:#9f9282}.history-item{padding:17px 5px;border-bottom:1px solid #eeece9}.history-item .top{display:flex;gap:10px;align-items:center;font-size:12px}.history-item p{font-size:12px;margin-top:8px;white-space:pre-wrap}.tags{font-size:11px;color:#847666;margin-top:8px}.empty{padding:50px 20px;text-align:center;color:#a19485}.register-form{display:grid;grid-template-columns:1fr 1fr;gap:18px}.register-form .help,.register-form>button{grid-column:1/-1}.help{font-size:11px;margin-bottom:20px}.register-form em{font-style:normal;color:#ba7551}#register-dialog{width:min(560px,94vw)}#toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);padding:15px 25px;background:#683424;color:white;border-radius:9px;box-shadow:0 5px 30px #0002;z-index:1000;max-width:90vw}.today-row{padding:20px 24px;border-top:1px solid #f1efed;display:flex;justify-content:space-between;align-items:center}.today-row strong{font-size:13px}.today-row small{display:block;color:#a29586;margin-top:6px}.table-wrap{overflow:auto}@media(max-width:1050px){aside{width:180px;padding:25px 15px}main{margin-left:180px;padding:0 22px}.panel-head{align-items:flex-start;flex-direction:column}.stats{gap:10px}.stats>div{padding:16px}td,th{padding:13px}}@media(max-width:700px){aside{position:static;width:auto;padding:15px;display:block}.brand{font-size:18px}.brand small,.nav-label,.upcoming,.aside-bottom{display:none}nav{display:flex;margin-top:15px}nav button{margin:0}main{margin:0;padding:0 15px}.stats{grid-template-columns:1fr 1fr}.page-title{gap:10px}.page-title p{font-size:11px}h1{font-size:25px}.page-title button{font-size:11px;padding:10px}.trial-banner{font-size:10px}footer{line-height:1.8;display:block}.info-grid{grid-template-columns:1fr 1fr}#search{width:190px}}

.badge.new{background:#f7f5f2;color:#795143}#search-form{flex-wrap:wrap}#record-source{font-size:12px;max-width:210px}

.finance-toolbar{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:18px}.finance-toolbar>div{display:flex;gap:12px;align-items:end}.finance-note{background:#fff8e9;color:#836d43;border:1px solid #f0e3c5;border-radius:8px;padding:13px 16px;font-size:11px;line-height:1.8;margin-bottom:20px}.finance-stats{grid-template-columns:repeat(4,1fr)}.finance-stats strong{font-size:23px}.money{text-align:right;font-variant-numeric:tabular-nums}.refund-amount{color:#b46754}tfoot{background:#f5f3f1;font-weight:600}tfoot td{padding:16px 22px}.cash-log{margin-top:24px}.cash-summary{padding:0 24px 20px;font-size:12px;color:#847665;line-height:1.9}.cash-row{display:flex;justify-content:space-between;padding:15px 24px;border-top:1px solid #f1efed;font-size:12px}.billing-box{border:1px solid #e8e4e0;border-radius:8px;padding:20px;margin-bottom:22px;background:#fdfcfb}.billing-box .history-heading{margin-top:0}.charge-form{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:10px;margin-bottom:14px}.charge-form button{grid-column:1/-1;justify-self:end}.bill-item{border-top:1px solid #e8e5e2;padding:17px 0;display:flex;gap:15px;flex-wrap:wrap;justify-content:space-between}.bill-item strong{font-size:12px}.bill-item p{font-size:11px;margin-top:8px}.bill-actions{display:flex;gap:6px;align-items:start}.bill-actions button{font-size:11px;padding:8px 12px}.payment-history{flex-basis:100%;display:flex;gap:8px;flex-wrap:wrap}.payment-history span{font-size:10px;background:#f3f1ef;padding:6px 9px;border-radius:4px}.text-link{border:0;background:transparent;color:#8d402c;padding:0;font-weight:600}.text-link:hover{text-decoration:underline}#payment-dialog,#cash-dialog{width:min(600px,94vw)}@media(max-width:1000px){.finance-stats{grid-template-columns:1fr 1fr}.finance-toolbar{align-items:stretch;flex-direction:column}.charge-form{grid-template-columns:1fr 1fr}}@media(max-width:650px){.finance-toolbar>div{flex-wrap:wrap}.finance-stats strong{font-size:19px}}

.completed-heading{background:#f6f4f1;border-top:1px solid #e5e2de}.today-actions{display:flex;align-items:center;gap:14px}.payment-state{font-size:11px;color:#9a7643}.payment-state.paid{color:#80442d;background:#f5f2ef;padding:6px 10px;border-radius:5px}

.today-table .paid-amount{font-weight:700;color:#8d402c}.amount-origin{display:block;font-size:9px;color:#9c7c4c;margin-top:4px}.today-table td{padding:16px 14px}.today-table th{padding:14px}.today-table td:first-child{font-weight:400;color:#806d5b}

/* Compact spreadsheet layout for reception and completed payments. */
#today-view{border-radius:3px;border-color:#d0cac3}
#today-view .panel-head{padding:14px 16px;background:#f6f5f3}
#today-view .panel-head h2{font-size:14px;margin-bottom:4px}
#today-view .panel-head p{font-size:10px}
#today-view .table-wrap{max-height:460px;overflow:auto}
.today-table{table-layout:fixed;min-width:1000px;border-collapse:separate;border-spacing:0;font-size:12px}
.today-table th,.today-table td{border-right:1px solid #ddd8d3;border-bottom:1px solid #ddd8d3;padding:7px 9px;height:35px;vertical-align:middle;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.today-table th{position:sticky;top:0;z-index:1;background:#eeece9;color:#64503e;font-size:11px;font-weight:600;border-top:1px solid #d0cac3;text-align:center;height:33px}
.today-table th:last-child,.today-table td:last-child{border-right:0}
.today-table th:nth-child(1){width:105px}.today-table th:nth-child(2){width:165px}.today-table th:nth-child(3){width:165px}.today-table th:nth-child(4),.today-table th:nth-child(5),.today-table th:nth-child(6){width:110px}.today-table th:nth-child(7){width:130px}.today-table th:nth-child(8){width:110px}
.today-table tbody tr:nth-child(even){background:#faf9f8}
.today-table tbody tr:hover{background:#f1efec}
.today-table td:first-child{text-align:center;color:#6d5948;font-variant-numeric:tabular-nums}
.today-table td:nth-child(2) strong{font-size:12px;font-weight:500}
.today-table td:nth-child(7),.today-table td:last-child{text-align:center}
.today-table .money{font-variant-numeric:tabular-nums;text-align:right}
.today-table .paid-amount{background:#f4f2ef;color:#85432c;font-weight:600}
.today-table .badge{padding:2px 4px;font-size:9px;margin-left:4px}
.today-table .amount-origin{display:inline;margin-left:5px;font-size:9px}
.today-table .payment-state{font-size:10px}
.today-table .payment-state.paid{padding:3px 5px;border-radius:2px}
.today-table .detail-btn{border-radius:2px;font-size:10px;padding:3px 7px}
#today-view .completed-heading{border-top:2px solid #c2a16a;background:#efedea}
#today-view .empty{padding:25px 15px;font-size:12px}

.trial-visit-note{display:block;margin-top:5px;color:#9b773e;font-size:10px}

/* Daeseon identity: terracotta, antique gold and warm ivory. */
:root{--brand-earth:#8d402c;--brand-gold:#af8828;--brand-ivory:#f8f5ef}
.brand{flex-direction:column;align-items:flex-start;gap:12px;letter-spacing:0}
.brand-logo{display:block;width:100%;height:auto;background:white;border-radius:5px;padding:7px 5px;border:1px solid #c4a15b}
.brand-caption{display:flex;align-items:baseline;gap:10px;font-size:23px;letter-spacing:2px;color:#fff6e8}
.brand-caption small{display:inline;font-size:11px;color:#d8bd8c;letter-spacing:1px;margin:0}
nav button.active{box-shadow:inset 3px 0 0 #d3b058;color:#fff8e8}
.primary{background:var(--brand-earth);border-color:var(--brand-earth)}
.primary:hover{background:#733121;border-color:#733121}
input:focus,select:focus{outline-color:#ba8b32}
.trial-banner{border-left:3px solid var(--brand-gold)}
.today-table .paid-amount{color:#813d2b;background:#faf0e3}
.today-table tbody tr:hover{background:#fbf2e4}
#today-view .completed-heading{border-top-color:#b48a3c;background:#f2e9d7}
@media(max-width:700px){.brand{flex-direction:row;align-items:center;gap:15px}.brand-logo{width:170px}.brand-caption{font-size:20px}.brand-caption small{display:inline}}

/* Softer terracotta theme; text-only brand. */
:root{--brand-earth:#a46451;--brand-gold:#b8994b;--brand-ivory:#fbf8f4}
body{background:var(--brand-ivory)}
aside{background:#b47d69;color:#fffaf4}
.brand{padding:4px 10px 8px}
.brand-caption{color:#fff;font-size:25px}
.brand-caption small{color:#fff4e4}
.nav-label{color:#fff0df}
nav button{color:#fffaf5}
nav button.active{background:#965e4d;color:#fff;box-shadow:inset 3px 0 0 #ead4a0}
nav button:hover{background:#9e6855}
.upcoming,.upcoming p,.aside-bottom{color:#fff5e8}
.dot{background:#f3dfaa}
.primary{background:#a46451;border-color:#a46451;color:#fff}
.primary:hover{background:#8e5140;border-color:#8e5140}
#toast{background:#925d4b}

/* Defined button hierarchy with deeper brand accents. */
button{border-radius:5px;transition:background .15s,border-color .15s,box-shadow .15s,transform .1s}
.primary{background:#803e2d;border:1px solid #803e2d;color:#fff;font-weight:600;box-shadow:0 2px 3px #48251912}
.primary:hover{background:#693021;border-color:#693021;box-shadow:0 3px 7px #48251922}
.secondary{background:#fff;border:1px solid #bba18d;color:#69412f;font-weight:500;box-shadow:0 1px 2px #48251908}
.secondary:hover{background:#f5eee7;border-color:#8f644b;color:#542f20}
.detail-btn,.today-table .detail-btn{background:#fff;border:1px solid #b89a80;color:#74432d;border-radius:4px;font-weight:500;padding:5px 10px}
.detail-btn:hover,.today-table .detail-btn:hover{background:#803e2d;border-color:#803e2d;color:#fff}
.close{background:#fff;border:1px solid #d4c8bd;color:#744b39;box-shadow:none}
.close:hover{background:#f1e8df;border-color:#b79b84}
nav button{background:transparent;border:1px solid transparent;box-shadow:none;border-radius:5px;color:#fffaf5}
nav button.active{background:#764333;border-color:#764333;color:#fff;box-shadow:inset 3px 0 0 #e8cc8c}
nav button:hover{background:#89523e;border-color:#89523e;color:#fff}
.text-link{background:none;border:0;box-shadow:none;color:#803e2d;padding:0}
button:focus-visible{outline:2px solid #9b751d;outline-offset:3px}
button:active:not(:disabled){transform:translateY(1px)}
button:disabled{opacity:.45;box-shadow:none}

#cash-open{display:none}
.cash-strip-wrap{margin:0 0 20px;border:1px solid #cdbda9;background:#fff;border-radius:5px;overflow-x:auto}
.cash-strip-caption{display:flex;align-items:center;gap:12px;padding:10px 14px;background:#f4eee5;border-bottom:1px solid #d8cbbb;font-size:12px}
.cash-strip{display:grid;grid-template-columns:1.25fr 1fr 1.2fr 1fr;min-width:780px}
.cash-strip-item{padding:13px 16px;border-right:1px solid #ded3c5;display:flex;flex-direction:column;gap:8px;justify-content:center}
.cash-strip-item:last-child{border-right:0}.cash-strip-item>span,.cash-strip-item>label{font-size:11px;color:#806750}
.cash-strip-item strong{font-size:20px;font-variant-numeric:tabular-nums;color:#5f3f2f;white-space:nowrap}
.cash-inline-entry{display:flex;gap:7px;align-items:center;justify-content:space-between}.cash-inline-entry input{width:120px;text-align:right;font-variant-numeric:tabular-nums;padding:7px}.cash-inline-entry>span{font-size:11px}
.cash-inline-entry button{font-size:11px;padding:6px 9px;white-space:nowrap}.cash-strip-total{background:#faf1e2}.cash-strip-total strong{color:#803e2d}.cash-strip-item small{font-size:10px;color:#9a6951}
.monthly-group{margin-bottom:38px}.monthly-heading{display:flex;justify-content:space-between;align-items:center;margin:0 0 16px}.monthly-heading>span{font-size:11px;color:#886e58}.monthly-methods{margin-bottom:22px}.monthly-days td,.monthly-days th{padding:10px 16px;border-right:1px solid #e1d8ce}.monthly-days tbody tr:nth-child(even){background:#fcfaf7}.monthly-days progress{width:100%;max-width:200px;height:9px;accent-color:#a66946}.monthly-days progress::-webkit-progress-bar{background:#f0e9e0;border-radius:4px}.monthly-days progress::-webkit-progress-value{background:#ad7c47;border-radius:4px}.monthly-days th:nth-child(2){width:23%}

#monthly-groups{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:22px}
.monthly-total-card{background:#fff;border:1px solid #d8cbbb;border-top:3px solid #ab8246;border-radius:7px;padding:30px}
.monthly-total-label{font-size:12px;color:#8e7965;margin-bottom:24px}.monthly-total-card h2{font-size:16px;font-weight:500;color:#725846;margin-bottom:12px}.monthly-total-card>strong{font-size:38px;font-weight:650;letter-spacing:-1px;color:#803e2d;font-variant-numeric:tabular-nums}.monthly-total-card p{font-size:11px;margin-top:15px;color:#958471}

.sales-toolbar{display:flex;align-items:end;flex-wrap:wrap;gap:10px;background:#f1e9dd;border:1px solid #d5c5b0;padding:14px;margin-bottom:16px;border-radius:3px}.sales-toolbar label{font-size:10px}.sales-toolbar input,.sales-toolbar select{padding:7px 8px;font-size:12px;max-width:160px}.sales-toolbar .range-divider{align-self:center;color:#8d7460;padding-top:18px}.sales-toolbar button{padding:8px 18px}.sales-panel{border-radius:3px;max-width:1000px}.sales-table{table-layout:fixed;min-width:600px;border-collapse:separate;border-spacing:0}.sales-table th,.sales-table td{padding:9px 14px;border-right:1px solid #d9cfc3;border-bottom:1px solid #d9cfc3;font-size:12px}.sales-table th{background:#eee7dd;text-align:center;color:#725840;font-weight:500}.sales-table th:last-child,.sales-table td:last-child{border-right:0}.sales-table th:last-child{width:24%}.sales-table td{text-align:center;font-weight:400}.sales-table .money{text-align:right;font-variant-numeric:tabular-nums}.sales-table tbody tr:nth-child(even){background:#fcfaf7}.sales-table tfoot{background:#f1e6d6}.sales-table tfoot td{font-weight:600}.sales-caption{font-size:11px;line-height:1.8;margin-top:14px;color:#917c67}

.register-form .sms-consent{grid-column:1/-1;display:flex;align-items:center;gap:8px}.sms-consent input{width:auto;margin:0}.sms-consent small{font-size:10px;color:#94714d}

.sales-chart-panel{margin-top:22px;max-width:1000px;border-radius:4px}.sales-chart-panel .panel-head{padding:18px 20px 5px}.sales-chart-panel .panel-head h2{font-size:14px}.sales-chart-panel .panel-head p{font-size:10px}.sales-chart-scroll{overflow-x:auto;width:100%;padding-bottom:5px}.sales-chart-scroll svg{display:block;font-family:localui,'Segoe UI',sans-serif}.sales-grid-line{stroke:#e7dfd5;stroke-width:1}.sales-axis-text{fill:#96816d;font-size:10px}.sales-month-text{fill:#735c48;font-size:11px}.sales-bar{fill:#a36c46}.sales-bar-group:hover .sales-bar{fill:#803e2d}.sales-bar-value{fill:#68442f;font-size:10px;font-weight:600}
.medicine-top{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:18px}.medicine-counts{display:flex;gap:22px;flex-wrap:wrap;font-size:12px;color:#8b705b}.medicine-counts strong{color:#803e2d;margin-left:5px;font-size:17px}.medicine-filters{display:flex;align-items:end;flex-wrap:wrap;gap:10px;padding:15px;background:#f1e9dd;border:1px solid #d8c5b1;border-radius:4px}.medicine-filters label{font-size:10px}.medicine-filters input,.medicine-filters select{padding:7px;font-size:12px;max-width:180px}.medicine-filters button{padding:8px 14px}.medicine-hint{font-size:11px;color:#957b63;margin:12px 0}.medicine-panel{border-radius:3px}.medicine-table{table-layout:fixed;min-width:1480px;border-collapse:separate;border-spacing:0}.medicine-table th,.medicine-table td{padding:8px 9px;border-right:1px solid #dbd0c4;border-bottom:1px solid #dbd0c4;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.medicine-table th{background:#eee5d9;text-align:center;font-weight:500}.medicine-table th:nth-child(1){width:100px}.medicine-table th:nth-child(2){width:90px}.medicine-table th:nth-child(3){width:90px}.medicine-table th:nth-child(4){width:175px}.medicine-table th:nth-child(5){width:48px}.medicine-table th:nth-child(6){width:75px}.medicine-table th:nth-child(7){width:180px}.medicine-table th:nth-child(8){width:108px}.medicine-table th:nth-child(9){width:85px}.medicine-table th:nth-child(10){width:126px}.medicine-table th:nth-child(11){width:160px}.medicine-table th:nth-child(12){width:75px}.medicine-table tbody tr:nth-child(even){background:#fcfaf7}.medicine-table .badge{font-size:9px;padding:3px 4px}.medicine-table td:first-child{font-weight:400}.medicine-table small{display:block;font-size:9px;color:#a27c55}.medicine-delivered-cell{display:flex;gap:5px;align-items:center;font-size:10px}.medicine-delivered-cell input{width:auto;margin:0;accent-color:#803e2d}.medicine-brew-quick{font-size:10px;padding:4px 7px;background:#fff8e9;border:1px solid #c8ad72;color:#896326}.medicine-form{display:grid;grid-template-columns:1fr 1fr;gap:16px}.medicine-form label{font-size:12px}.medicine-full{grid-column:1/-1}.medicine-form textarea{width:100%;font:inherit;display:block;margin-top:7px;border:1px solid #d7caba;border-radius:5px;padding:10px;resize:vertical}.medicine-checkbox{display:flex;align-items:center;gap:7px}.medicine-checkbox input{width:auto;margin:0;accent-color:#803e2d}.medicine-legacy-info{font-size:11px;color:#8e7862;white-space:pre-wrap;background:#f7f2ea;padding:12px;line-height:1.9}.medicine-form-footer{display:flex;align-items:center;justify-content:space-between;gap:12px}.medicine-form-footer>span{font-size:10px;color:#9c826a}.medicine-edit-patient{background:#f4ece1;padding:12px;font-size:13px;color:#76503b;margin-bottom:20px}.medicine-patient-search{display:flex;gap:9px;margin-bottom:12px}.medicine-patient-search input{flex:1}#medicine-patient-results{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px;max-height:160px;overflow:auto}#medicine-patient-results button{font-size:11px;padding:7px 9px}#medicine-new-dialog,#medicine-edit-dialog{width:min(730px,94vw)}.patient-medicine-shortcut{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0 20px;font-size:13px}.patient-medicine-shortcut button{font-size:11px;padding:8px 12px}@media(max-width:700px){.medicine-top{align-items:start;flex-direction:column}.medicine-counts{gap:12px}.medicine-form{grid-template-columns:1fr}.medicine-full{grid-column:auto}}

.medicine-table{min-width:1560px}.medicine-table th:nth-child(4){width:85px}.medicine-table th:nth-child(5){width:175px}.medicine-table th:nth-child(6){width:48px}.medicine-table th:nth-child(7){width:75px}.medicine-table th:nth-child(8){width:180px}.medicine-table th:nth-child(9){width:108px}.medicine-table th:nth-child(10){width:85px}.medicine-table th:nth-child(11){width:126px}.medicine-table th:nth-child(12){width:160px}.medicine-table th:nth-child(13){width:75px}

.medicine-table{min-width:1480px}.medicine-table th:nth-child(4){width:175px}.medicine-table th:nth-child(5){width:48px}.medicine-table th:nth-child(6){width:75px}.medicine-table th:nth-child(7){width:180px}.medicine-table th:nth-child(8){width:108px}.medicine-table th:nth-child(9){width:85px}.medicine-table th:nth-child(10){width:126px}.medicine-table th:nth-child(11){width:160px}.medicine-table th:nth-child(12){width:75px}

.medicine-table{min-width:1350px}.medicine-table th:nth-child(10){width:160px}.medicine-table th:nth-child(11){width:75px}

.medicine-table td:has(.medicine-inline){padding:0;overflow:visible}.medicine-table .medicine-inline{display:block;width:100%;min-width:0;border:1px solid transparent;border-radius:0;background:transparent;padding:9px 7px;margin:0;color:inherit;font:inherit;font-size:11px;box-sizing:border-box}.medicine-table .medicine-inline:hover{background:#fff6e7;border-color:#d1b88b}.medicine-table .medicine-inline:focus{outline:0;border-color:#a36b45;background:#fff;box-shadow:inset 0 0 0 1px #a36b45}.medicine-table input[type=number].medicine-inline{text-align:right;padding-right:3px}.medicine-table input[type=date].medicine-inline{font-size:10px;padding-left:3px;padding-right:2px}.medicine-table .medicine-inline-memo{resize:vertical;min-height:34px;line-height:16px;white-space:pre-wrap}.medicine-table .medicine-inline.saving{background:#f1eadf;color:#9c8871}.medicine-table .medicine-inline.saved{background:#f5ebd0}.medicine-table th:nth-child(5){width:68px}.medicine-table th:nth-child(6){width:95px}.medicine-table th:nth-child(8){width:132px}

.medicine-table th:nth-child(9){width:110px}

.checkin-rx-toggle{display:flex;align-items:center;gap:8px;font-size:12px;margin:8px 0 15px}.checkin-rx-toggle input{width:auto;margin:0;accent-color:#803e2d}.checkin-rx-panel{display:grid;grid-template-columns:1fr 1fr;gap:12px;background:#faf3e8;padding:15px;margin-bottom:15px;border:1px solid #e0ceb6;border-radius:5px}.checkin-rx-panel label{font-size:11px}.checkin-rx-memo,.checkin-rx-panel p{grid-column:1/-1}.checkin-rx-panel p{font-size:10px;color:#927858}.reception-actions{display:flex;gap:6px;justify-content:center}.today-table th:last-child{width:178px}.today-table{min-width:1070px}

.reception-search{padding:18px 16px;background:#fffdf9;border-bottom:2px solid #d2b68e}.reception-search h2{font-size:14px;margin-bottom:12px}#reception-search-form{display:flex;gap:9px}#reception-search-query{width:310px;max-width:70%;font-size:12px}.reception-search-count{font-size:11px;color:#8e735c;margin:13px 0 8px}.reception-results-table{margin-top:10px;min-width:580px}.reception-results-table th,.reception-results-table td{padding:8px 12px;font-size:12px;border:1px solid #e0d4c4}.reception-results-table th{background:#f3ebdf}#reception-search-results:empty{display:none}#reception-search-results{font-size:12px;color:#766351}

#quick-checkout-dialog{width:min(540px,94vw)}.quick-patient-label{padding:12px;background:#f4ebde;color:#734e36;font-size:13px;margin-bottom:10px}.quick-charge-fields{display:grid;grid-template-columns:1fr 1fr;gap:15px;margin:14px 0}.quick-charge-fields input{text-align:right;font-variant-numeric:tabular-nums}.quick-insurance{font-size:11px;color:#8d7660;margin:12px 0}.quick-insurance summary{cursor:pointer}.quick-insurance label{margin-top:10px}.quick-amount-summary{display:grid;grid-template-columns:1fr 1fr 1fr;padding:16px 10px;background:#faf5ed;border-top:1px solid #e3d7c6;border-bottom:1px solid #e3d7c6;gap:10px}.quick-amount-summary span{display:block;font-size:10px;color:#977f66;margin-bottom:7px}.quick-amount-summary strong{font-size:16px;color:#78452f;font-variant-numeric:tabular-nums}.quick-date-label{margin-top:12px}.quick-date-label input{max-width:190px}.quick-buttons{display:flex;justify-content:flex-end;gap:8px;margin-top:22px}#quick-refund-area{text-align:right;margin-top:16px;font-size:11px}

.profile-search{display:flex;gap:10px;margin-bottom:16px}.profile-search input{width:340px;max-width:72%;font-size:13px}#profile-search-results{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:18px}#profile-search-results p{flex-basis:100%;font-size:12px}#profile-search-results button{font-size:12px;padding:8px 11px}.profile-overview{padding:24px;margin-bottom:24px}.profile-identity{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:20px}.profile-identity h2{font-size:26px;margin:9px 0}.profile-actions{display:flex;gap:8px}.profile-actions button{font-size:12px}.profile-overview .info-grid{margin:0;background:#faf6ef;grid-template-columns:repeat(3,1fr)}.profile-tabs{display:flex;gap:6px;margin-bottom:12px;flex-wrap:wrap}.profile-tabs button{background:#fff;border:1px solid #d4c2ad;color:#836349;padding:11px 19px;font-size:12px}.profile-tabs button.active{background:#803e2d;color:#fff;border-color:#803e2d}.profile-history-table{min-width:800px}.profile-history-table th,.profile-history-table td{font-size:12px;padding:11px 14px;border-right:1px solid #e1d6c8}.profile-history-table th{background:#f1e9dd}.profile-history-table .money{text-align:right}.profile-history-table td:first-child{font-weight:400;white-space:nowrap}.profile-history-table td{white-space:normal;line-height:1.7}.profile-note-cell{max-width:280px;white-space:pre-wrap!important}.profile-history-table tbody tr:nth-child(even){background:#fcfaf7}@media(max-width:700px){.profile-identity{align-items:start;flex-direction:column}.profile-overview{padding:16px}.profile-overview .info-grid{grid-template-columns:1fr 1fr}}

.profile-family{margin:0 0 24px}.profile-family .panel-head{padding:17px 20px;background:#faf6ef}.profile-family .panel-head h2{font-size:14px}.profile-family .panel-head p{font-size:10px}.profile-family-table{min-width:700px}.profile-family-table th,.profile-family-table td{padding:10px 14px;font-size:12px;border-right:1px solid #e2d8cb}.profile-family-table th{background:#f2eade}.profile-family-self{background:#faf3e5}.profile-family-table .badge{font-size:9px}.profile-family .empty{padding:22px;font-size:12px}

.profile-family-table{min-width:930px}.reception-results-table{min-width:800px}

/* Top navigation and shared patient/reception workdesk. */
aside{position:sticky;inset:auto;top:0;width:100%;min-height:65px;z-index:200;display:flex;flex-direction:row;align-items:center;gap:24px;padding:10px 24px;background:#9b6957;box-shadow:0 2px 8px #563b2c18}
aside .brand{padding:0;flex-direction:row;flex-shrink:0}.brand-caption{font-size:24px;letter-spacing:2px}.brand-caption small{display:none}
aside .nav-label,aside .upcoming,aside .aside-bottom{display:none}
aside nav{display:flex;flex:1;gap:5px;overflow-x:auto;margin:0;align-items:center}
aside nav button{width:auto;display:flex;flex-shrink:0;gap:8px;margin:0;padding:11px 15px;white-space:nowrap;font-size:12px;border-radius:4px}
aside nav button.active{background:#73402f;border-color:#73402f;box-shadow:inset 0 -3px 0 #e6c679}
main{margin-left:0;padding:0 24px;max-width:none}header{height:43px}.trial-banner{margin-top:12px;padding:7px 12px;font-size:11px}.page-title{padding:20px 0 18px}.page-title h1{font-size:25px}.page-title p{font-size:12px}
.workdesk{display:grid;grid-template-columns:minmax(360px,4fr) minmax(600px,6fr);gap:18px;align-items:start}
.workdesk>*{min-width:0}.workdesk #today-view{position:sticky;top:83px}.workdesk .reception-search{display:none}
.workdesk .profile-search{gap:7px;margin-bottom:10px}.workdesk .profile-search input{flex:1;width:auto;max-width:none;padding:9px;font-size:12px}.workdesk .profile-search button{font-size:11px;padding:9px 12px}
.workdesk #profile-search-results{max-height:210px;overflow:auto;gap:6px}.workspace-search-hit{display:flex;width:100%;align-items:center;justify-content:space-between;border:1px solid #dbcbbb;background:white;border-radius:4px;gap:8px;padding:5px 9px}
.workspace-patient-choice{flex:1;text-align:left;border:0;background:transparent;padding:4px;color:#694530;box-shadow:none}.workspace-patient-choice strong{display:block;font-size:12px;font-weight:600}.workspace-patient-choice span{display:block;font-size:10px;margin-top:4px;color:#91785e}
.workdesk .profile-overview{padding:16px;margin-bottom:13px}.workdesk .profile-identity{margin-bottom:13px;gap:8px}.workdesk .profile-identity h2{font-size:22px;margin:7px 0}.workdesk .profile-actions{gap:5px}.workdesk .profile-actions button{padding:7px 9px;font-size:10px}
.workdesk .profile-overview .info-grid{padding:12px;gap:12px;grid-template-columns:repeat(3,minmax(0,1fr))}.workdesk .info-grid span{font-size:9px}.workdesk .info-grid strong{font-size:11px;overflow-wrap:anywhere}
.workdesk .profile-family{margin-bottom:15px}.workdesk .profile-family .panel-head{padding:11px 13px}.workdesk .profile-family .panel-head p{display:none}.workdesk #profile-family-list{max-height:200px;overflow:auto}.workdesk .profile-family-table{min-width:540px}.workdesk .profile-family-table th,.workdesk .profile-family-table td{padding:7px 8px;font-size:10px}.workdesk .profile-family-table th:nth-child(6),.workdesk .profile-family-table td:nth-child(6){display:none}
.workdesk .profile-tabs{margin-bottom:8px;gap:4px}.workdesk .profile-tabs button{font-size:10px;padding:8px 10px}.workdesk #profile-content>.panel:last-child .panel-head{padding:12px;gap:10px;flex-wrap:wrap}.workdesk #profile-content>.panel:last-child .panel-head h2{font-size:13px}.workdesk #profile-content>.panel:last-child .panel-head p{font-size:10px}
.workdesk .profile-history-table{min-width:620px}.workdesk .profile-history-table th,.workdesk .profile-history-table td{padding:7px 9px;font-size:10px}.workdesk #profile-content>.panel:last-child .table-wrap{max-height:360px;overflow:auto}
.workdesk .today-table{min-width:760px}.workdesk .today-table th,.workdesk .today-table td{font-size:10px;padding:7px 6px}.workdesk .today-table th:nth-child(1){width:76px}.workdesk .today-table th:nth-child(2){width:105px}.workdesk .today-table th:nth-child(3){width:90px}.workdesk .today-table th:nth-child(4),.workdesk .today-table th:nth-child(5){width:91px}.workdesk .today-table th:nth-child(6){width:78px}.workdesk .today-table th:nth-child(7){width:106px}.workdesk .today-table th:nth-child(8){width:150px}.workdesk .today-table .text-link{font-size:11px}.workdesk .today-table .detail-btn{padding:4px 6px;font-size:10px}.workdesk #today-view .table-wrap{max-height:310px}.workdesk .today-table tbody tr{cursor:pointer}.workdesk .today-table tbody tr.selected-patient{background:#f2e1c6;box-shadow:inset 3px 0 0 #9e6b36}
.sales-panel,.sales-chart-panel{max-width:none}.medicine-panel,.sales-panel{width:100%}
@media(min-width:1750px){.workdesk .today-table{min-width:0}.workdesk .profile-family-table{min-width:0}.workdesk .profile-history-table{min-width:0}}
@media(max-width:1150px){.workdesk{grid-template-columns:minmax(320px,4fr) minmax(470px,6fr);gap:12px}main{padding:0 15px}.workdesk .profile-overview .info-grid{grid-template-columns:1fr 1fr}aside{padding:9px 15px;gap:16px}aside nav button{padding:10px 11px;font-size:11px}}
@media(max-width:850px){.workdesk{grid-template-columns:1fr}.workdesk #today-view{position:static}.workdesk .profile-history-table{min-width:620px}.workdesk #profile-content>.panel:last-child .table-wrap{max-height:260px}aside{gap:12px;padding:8px 12px;min-height:56px}.brand-caption{font-size:20px}aside nav{margin:0}main{margin-left:0;padding:0 12px}.page-title{padding:16px 0}.page-title h1{font-size:22px}}

/* Separate patient management: information and family left, clinical history right. */
.profile-columns{display:grid;grid-template-columns:minmax(340px,4fr) minmax(500px,6fr);gap:20px;align-items:start}.profile-left-column,.profile-right-column{min-width:0}.profile-left-column .profile-overview{padding:18px;margin-bottom:18px}.profile-left-column .profile-identity{flex-wrap:wrap;margin-bottom:16px}.profile-left-column .profile-identity h2{font-size:24px}.profile-left-column .profile-actions button{padding:8px 10px;font-size:11px}.profile-left-column .info-grid{grid-template-columns:repeat(2,minmax(0,1fr));padding:13px;gap:14px}.profile-left-column .info-grid strong{font-size:12px;overflow-wrap:anywhere}.profile-left-column .profile-family-table{min-width:650px}.profile-left-column .profile-family-table td,.profile-left-column .profile-family-table th{padding:8px 9px;font-size:11px}.profile-left-column .profile-family .panel-head{padding:13px;gap:8px;flex-wrap:wrap}.profile-right-column .profile-tabs{margin-bottom:12px}.profile-right-column .profile-history-table{min-width:700px}.profile-right-column .profile-history-table td,.profile-right-column .profile-history-table th{padding:9px 10px;font-size:11px}.profile-right-column .panel-head{padding:17px;flex-wrap:wrap;gap:8px}.profile-right-column .table-wrap{max-height:650px;overflow:auto}.profile-right-column .profile-history-table thead th{position:sticky;top:0;z-index:1}.profile-right-column .profile-note-cell{max-width:220px}#today-view .reception-search{display:block}
@media(max-width:1100px){.profile-columns{grid-template-columns:minmax(310px,4fr) minmax(420px,6fr);gap:14px}}
@media(max-width:800px){.profile-columns{grid-template-columns:1fr}.profile-right-column .table-wrap{max-height:450px}}

/* Compact patient search results, independent of the previous workspace layout. */
#profile-search-results:not(:empty){display:flex;flex-direction:column;flex-wrap:nowrap;gap:0;width:560px;max-width:100%;max-height:180px;overflow-y:auto;margin:0 0 15px;border:1px solid #d7c7b3;border-radius:4px;background:#fff}
#profile-search-results>p{flex-basis:auto;margin:0;padding:6px 10px;background:#f5efe5;border-bottom:1px solid #e4d9ca;font-size:10px;line-height:1.5}
#profile-search-results .workspace-search-hit{width:100%;border:0;border-bottom:1px solid #eee5d8;border-radius:0;padding:3px 8px;gap:7px;min-height:36px}
#profile-search-results .workspace-search-hit:last-child{border-bottom:0}
#profile-search-results .workspace-search-hit:hover{background:#faf4e9}
#profile-search-results .workspace-patient-choice{padding:3px 2px;font-size:11px;display:flex;align-items:center;gap:12px;min-width:0}
#profile-search-results .workspace-patient-choice strong{display:inline;font-size:11px;white-space:nowrap;font-weight:600}
#profile-search-results .workspace-patient-choice span{display:inline;margin:0;font-size:10px;white-space:nowrap;color:#92785e}
#profile-search-results button.detail-btn{padding:4px 9px;font-size:10px;flex-shrink:0}
#profile-search-results .badge{font-size:9px;padding:2px 4px}
@media(max-width:550px){#profile-search-results .workspace-patient-choice{display:block}#profile-search-results .workspace-patient-choice span{display:block;margin-top:3px}}

/* Slightly larger table text with tighter cell padding across all screens. */
body table th,body table td{font-size:13px;padding:7px 10px}
body table th{font-weight:600}
body .today-table th,body .today-table td{font-size:12px;padding:6px 8px;height:32px}
body .today-table td:nth-child(2) strong,body .today-table .text-link{font-size:13px}
body .medicine-table th,body .medicine-table td{font-size:12px;padding:6px 7px}
body .medicine-table td:has(.medicine-inline){padding:0}
body .medicine-table .medicine-inline{font-size:12px;padding:6px 5px}
body .medicine-table input[type=date].medicine-inline{font-size:11px;padding:6px 2px}
body .medicine-table .medicine-inline-memo{min-height:30px;line-height:17px}
body .profile-right-column .profile-history-table th,body .profile-right-column .profile-history-table td,body .profile-left-column .profile-family-table th,body .profile-left-column .profile-family-table td{font-size:13px;padding:7px 9px;line-height:1.5}
body .profile-family-table th,body .profile-family-table td,body .reception-results-table th,body .reception-results-table td{font-size:13px;padding:7px 9px}
body .sales-table th,body .sales-table td,body .monthly-days th,body .monthly-days td{font-size:13px;padding:7px 10px}
body table tfoot td{padding:8px 10px}
body table .badge{font-size:10px;padding:2px 4px}
body table .detail-btn{font-size:11px;padding:4px 7px}

/* Align general interface text to the table reading size. */
body{font-size:13px}
body p,body label,body legend,body input,body select,body textarea,body button,body header,body footer{font-size:13px}
body aside nav button,body .secondary,body .primary,body .detail-btn{font-size:13px}
body .page-title p,body .trial-banner,body .help,body .finance-note,body .medicine-hint,body .sales-caption,body .panel-head p{font-size:13px;line-height:1.55}
body .info-grid span,body .profile-left-column .info-grid span{font-size:13px}
body .info-grid strong,body .profile-left-column .info-grid strong{font-size:13px}
body .profile-actions button,body .profile-tabs button,body .profile-family .panel-head p,body .profile-history-note,body .pagination{font-size:13px}
body .stats span,body .stats small,body .cash-strip-item>span,body .cash-strip-item>label,body .cash-strip-item small,body .cash-inline-entry>span,body .cash-inline-entry button{font-size:13px}
body .medicine-filters label,body .medicine-filters input,body .medicine-filters select,body .medicine-form label,body .medicine-form-footer>span,body .medicine-legacy-info,body .medicine-counts,body .sales-toolbar label,body .sales-toolbar input,body .sales-toolbar select{font-size:13px}
body .payment-history span,body .bill-item p,body .quick-insurance,body .quick-amount-summary span,body .cash-row,body .cash-summary,body .checkin-box p,body .chips label,body .checkin-rx-panel label,body .checkin-rx-panel p,body .sms-consent small{font-size:13px}
body #profile-search-results>p,body #profile-search-results .workspace-patient-choice,body #profile-search-results .workspace-patient-choice strong,body #profile-search-results .workspace-patient-choice span,body #profile-search-results button.detail-btn{font-size:13px}
body .profile-search input,body .profile-search button,body .reception-search-count,body #reception-search-query,body .medicine-patient-search input,body #medicine-patient-results button,body .patient-medicine-shortcut button{font-size:13px}
body .eyebrow{font-size:11px}body .badge{font-size:11px}

#profile-search-results .workspace-patient-choice{flex-wrap:wrap;row-gap:3px}#profile-search-results .workspace-patient-choice span{white-space:normal;overflow-wrap:anywhere}

/* Medication category colors remain visible in the editable cell. */
body .medicine-table select[data-field="category"][data-category="일반약"]{background:#e3f2e4;color:#315a38}
body .medicine-table select[data-field="category"][data-category="비만약"]{background:#fbe4ec;color:#87465d}
body .medicine-table select[data-field="category"][data-category="보약"]{background:#e3eefb;color:#355d87}
body .medicine-table select[data-field="category"]{font-weight:600}
body .medicine-table select[data-field="category"] option{background:#fff;color:#3d332b;font-weight:400}
body .medicine-table select[data-field="category"][data-category="기타"]{background:#eee5f7;color:#6b4b88}
.medicine-top .medicine-counts{display:none}.medicine-top{justify-content:flex-end}

/* Consistent compact grid, based on the prescription management table. */
body .table-wrap>table,body .reception-results-table{border-collapse:separate;border-spacing:0;width:100%}
body .table-wrap>table th,body .table-wrap>table td,body .reception-results-table th,body .reception-results-table td{border:0;border-right:1px solid #dbd0c4;border-bottom:1px solid #dbd0c4;padding:6px 8px;font-size:13px;line-height:1.45;vertical-align:middle}
body .table-wrap>table th,body .reception-results-table th{background:#eee5d9;color:#725840;text-align:center;font-weight:600;border-top:1px solid #dbd0c4}
body .table-wrap>table th:last-child,body .table-wrap>table td:last-child{border-right:0}
body .table-wrap>table tbody tr:nth-child(even){background:#fcfaf7}
body .table-wrap>table tbody tr:hover{background:#f8efdf}
body .table-wrap>table .money{text-align:right;font-variant-numeric:tabular-nums}
body .table-wrap>table .detail-btn{font-size:11px;padding:4px 7px;border-radius:3px}
body .table-wrap>table .badge{font-size:10px;padding:2px 4px}
#patients-view{border-radius:3px;border-color:#d7c9b9}#patients-view .panel-head{padding:15px 16px}#patients-view .pagination{padding:11px 16px}#patients-view table td:first-child{font-weight:400}#patients-view table td:nth-child(2),#patients-view table td:nth-child(3),#patients-view table td:nth-child(4),#patients-view table td:nth-child(6),#patients-view table td:nth-child(7){text-align:center}
body .table-wrap>.medicine-table td:has(.medicine-inline){padding:0}
body .table-wrap>.medicine-table .medicine-inline{padding:6px 5px;font-size:13px}
body .table-wrap>.medicine-table input[type=date].medicine-inline{padding:6px 2px;font-size:11px}
body .table-wrap>.medicine-table .medicine-inline-memo{line-height:17px;min-height:30px}
body .table-wrap>.today-table tbody tr.selected-patient{background:#f2e1c6}
body .table-wrap>.profile-family-table tbody tr.profile-family-self{background:#faf3e5}

/* Patient identity hierarchy */
body #profile-chart{display:block;font-size:18px;font-weight:800;letter-spacing:0;color:#362e2a;line-height:1.4}
body #profile-name .profile-age-sex{display:inline-block;font-size:13px;font-weight:400;color:#75675e;vertical-align:middle;margin-left:5px;line-height:1.5}

.today-fields-editor summary{cursor:pointer;color:#803e2d;text-decoration:underline;text-underline-offset:3px}.today-fields-editor>div{display:flex;flex-wrap:wrap;gap:8px;max-width:320px;padding:8px 0}.today-fields-editor label{display:inline-flex;align-items:center;gap:3px;white-space:nowrap}.today-fields-editor input{width:auto}

.today-field-select{font-size:13px;padding:5px 7px;min-width:110px;max-width:220px;width:100%}

/* Completed receipts: 20 compact rows plus the column heading. */
body #completed-list .table-wrap{max-height:634px;overflow:auto}
body #completed-list .today-table th,body #completed-list .today-table td{height:30px;padding:2px 8px;font-size:13px;line-height:20px;white-space:nowrap}
body #completed-list .today-table thead th{position:sticky;top:0;z-index:1}
body #completed-list .today-table button,body #completed-list .today-table .today-field-select{height:24px;min-height:0;padding:1px 6px;font-size:13px;line-height:20px}
body #completed-list .today-table .badge{padding:1px 4px;line-height:18px}
body #completed-list .today-table .trial-visit-note{display:inline;margin-left:5px;font-size:11px;line-height:18px}

body .today-table .due-amount-edit{font-size:13px;font-variant-numeric:tabular-nums;text-decoration:underline;text-underline-offset:3px;white-space:nowrap}

body .today-table .paid-method{display:inline-block;min-width:28px;margin-left:5px;font-size:12px;font-weight:400;color:#75675e;white-space:nowrap}

body .today-table .payment-state.trial-paid{color:#956b2d;background:#fff5df}

.profile-sms-control label{display:flex;align-items:center;gap:6px;font-weight:600}.profile-sms-control input{width:auto}.profile-sms-control small{display:block;margin-top:5px;color:#75675e;font-size:12px}

.profile-inline-edit{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;background:#faf6ef;border:1px solid #e2d6c8;padding:13px;border-radius:6px}
.profile-inline-edit label{display:flex;flex-direction:column;gap:5px;font-size:13px}
.profile-inline-edit input,.profile-inline-edit select{width:100%;padding:7px 9px;font-size:13px}
.profile-inline-buttons{grid-column:1/-1;display:flex;justify-content:flex-end;gap:7px}

body .profile-inplace{width:100%;max-width:240px;font-size:13px;padding:4px 7px;height:30px;vertical-align:middle}
body #profile-name .profile-inplace{font-size:24px;font-weight:700;width:160px;height:38px}
body #profile-chart .profile-inplace{font-size:18px;font-weight:800;width:140px;height:30px}
body #profile-edit-buttons{white-space:nowrap}

.family-add-box{padding:12px;background:#faf6ef;border-top:1px solid #dbd0c4}.family-search-line{display:flex;gap:6px}.family-search-line input{flex:1;width:100px}.family-result{display:flex;justify-content:space-between;align-items:center;gap:6px;padding:7px 0;border-bottom:1px solid #e2d6c8;font-size:13px}#family-results{max-height:210px;overflow:auto}#family-choice{padding-top:10px}#family-choice label{display:block;margin:8px 0}#family-choice input{margin-left:6px}.family-link-entry{padding:7px 12px;font-size:12px;background:#fff5df;border-top:1px solid #e2d6c8}.family-link-entry button{margin-left:10px}

/* Taller family roster panel. */
body #profile-family-list{min-height:320px;max-height:560px;overflow:auto}
body #profile-family-list .table-wrap{overflow:visible}
body #profile-family-list thead th{position:sticky;top:0;z-index:1}

/* More room for patient details and family; compact visit prescription column. */
@media(min-width:801px){body .profile-columns{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}}
body .profile-right-column .profile-history-table[data-section="visits"]{min-width:0;table-layout:fixed;width:100%}
body .profile-history-table[data-section="visits"] th:nth-child(1){width:90px}
body .profile-history-table[data-section="visits"] th:nth-child(2){width:80px}
body .profile-history-table[data-section="visits"] th:nth-child(3){width:76px}
body .profile-history-table[data-section="visits"] th:nth-child(4){width:110px}
body .profile-history-table[data-section="visits"] th:nth-child(5){width:40px}
body .profile-history-table[data-section="visits"] th:nth-child(6){width:74px}
body .profile-history-table[data-section="visits"] td:nth-child(4){white-space:normal;overflow-wrap:anywhere}

/* Patient search remains visible beside the top navigation on every tab. */
body aside{gap:12px}
body aside .global-patient-search{display:flex;flex:0 0 270px;gap:5px;margin:0;align-items:center}
body aside .global-patient-search input{width:210px;max-width:none;min-width:0;flex:1;padding:7px 8px;font-size:13px;height:34px}
body aside .global-patient-search button{padding:7px 9px;font-size:13px;height:34px;white-space:nowrap}
body aside nav{min-width:0}
@media(max-width:1050px){body aside{flex-wrap:wrap}body aside nav{flex-basis:100%}body aside .global-patient-search{flex-basis:300px}}
@media(max-width:500px){body aside .global-patient-search{flex:1 1 220px}}

/* Clearer patient basic information. */
body #profile-facts>div>span{font-size:14px;font-weight:400;color:#95867b}
body #profile-facts>div>strong{font-size:15px;font-weight:700;color:#362e2a;line-height:1.6}
body #profile-facts .profile-sms-control label{font-size:15px;font-weight:700}
body #profile-facts .profile-inplace{font-size:15px;font-weight:600;height:33px}

body aside>#new-patient{flex-shrink:0;white-space:nowrap;height:34px;padding:7px 10px;font-size:13px}

body .today-table .cancel-checkin{color:#a24e3c;border-color:#d8b5a9;white-space:nowrap}

body #quick-charge-only{background:#ead9c2;border-color:#c5a67d;color:#66482e;font-weight:600}
body #quick-charge-only:hover{background:#dfc7a7;border-color:#ad8655}

body .today-table .paid-split{font-size:12px;white-space:nowrap;color:#675449}

.quick-payment-breakdown{margin-top:12px;padding:12px;background:#faf6ef;border:1px solid #e2d6c8;border-radius:5px;font-size:13px}.quick-payment-breakdown>strong{display:block;margin-bottom:6px;font-weight:600;color:#75675e}.quick-payment-breakdown>div{display:flex;justify-content:space-between;gap:16px;padding:3px 0}.quick-payment-breakdown b{font-variant-numeric:tabular-nums}

/* Keep the receipt amount and method labels visible without ellipsis. */
body .today-table{min-width:1240px}
body .today-table th:nth-child(5){width:200px}
body .today-table td.paid-amount{text-overflow:clip;overflow:visible}
body .today-table th:last-child{width:250px}
body .today-table .paid-amount .due-amount-edit{padding-left:0;padding-right:0}

/* Align all receipt amounts independently from method label length. */
body .today-table .receipt-amount-line{display:grid;grid-template-columns:minmax(0,1fr) 90px;align-items:center;column-gap:7px}
body .today-table .receipt-amount-line>.due-amount-edit{justify-self:end;text-align:right;margin:0}
body .today-table .receipt-amount-line>.paid-method{grid-column:2;text-align:left;margin:0;min-width:0}

body .today-table th:nth-child(3){width:135px}
body .today-table .today-field-select{min-width:0;max-width:100%;padding-left:5px;padding-right:5px}

/* Reception proceeds through three clearly separated stages. */
body #today-view.reception-flow{background:transparent;border:0;border-radius:0;overflow:visible}
.reception-stage{background:#fff;border:1px solid #d9cbbd;border-radius:7px;overflow:hidden;box-shadow:0 2px 5px #563b2c06}
body #today-view .reception-search{padding:16px 18px;border:0;background:#fffdf9}
body #today-view .reception-search h2{display:flex;align-items:center;gap:8px;font-size:16px;margin:0 0 5px}
body #today-view .reception-stage-help{font-size:13px;margin:0 0 12px;color:#8b7969}
body #today-view .panel-head{padding:13px 18px;background:#f4eee5;border:0}
body #today-view .panel-head h2{display:flex;align-items:center;gap:8px;font-size:16px;margin:0 0 4px}
body #today-view .panel-head p{font-size:13px;color:#8b7969}
body #today-view .reception-step{display:inline-flex;align-items:center;justify-content:center;flex:0 0 25px;width:25px;height:25px;border-radius:50%;background:#956550;color:#fff;font-size:13px;font-weight:700;margin:0}
body #today-view .reception-stage-completed{border-color:#c8d0bd}
body #today-view .reception-stage-completed .completed-heading{background:#eef1e8;border:0}
body #today-view .reception-stage-completed .reception-step{background:#6a7c57}
.reception-flow-arrow{height:28px;display:flex;align-items:center;justify-content:center;font-size:23px;line-height:1;color:#b39b83}
body #today-view .reception-stage .empty{padding:20px 16px}

.settlement-method-totals{padding:14px 16px;background:#faf6ef;border-top:1px solid #d9cbbd}.settlement-method-totals section+section{margin-top:14px}.method-total-caption{font-size:13px;color:#75675e;margin-bottom:7px}.method-total-caption small{font-size:12px;font-weight:400;margin-left:8px;color:#998a7d}.method-total-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.method-total-row>div{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;background:#fff;border:1px solid #dfd2c3;border-radius:4px;font-size:13px}.method-total-row strong{font-size:16px;color:#754733;font-variant-numeric:tabular-nums}.method-total-unknown{font-size:12px;margin-top:6px}@media(max-width:650px){.method-total-row{grid-template-columns:1fr}}

body .table-wrap>.medicine-table input[type=date].medicine-inline[data-field="brew_date"]{font-size:13px;padding:6px 3px;color:#362e2a}

body .medicine-table select[data-field="category"][data-category="보험첩약"]{background:#fff1bd;color:#735b1d}

body #medicine-view .table-wrap{max-height:none;overflow-x:auto}

/* Responsive top bar: every menu remains visible without horizontal scrolling. */
body aside{display:grid;grid-template-columns:48px minmax(180px,270px) max-content minmax(0,1fr);align-items:center;gap:9px;padding:10px 16px;background:#986b59;border-bottom:1px solid #825542;box-shadow:0 3px 10px #563b2c18}
body aside .brand{grid-column:1;min-width:0;padding:0}
body aside .brand-caption{font-size:21px;letter-spacing:1px}
body aside .global-patient-search{grid-column:2;display:flex;width:100%;min-width:0;max-width:270px;flex:none;gap:5px}
body aside .global-patient-search input{width:0;flex:1;border-color:#e0d3c8;background:#fffdf9;border-radius:5px}
body aside .global-patient-search button{background:#fff4e6;border-color:#d8bd9a;color:#684734}
body aside>#new-patient{grid-column:3;margin:0;font-size:12px;padding:7px 9px;background:#704536;border-color:#704536;color:#fff8ed;border-radius:5px}
body aside nav{grid-column:4;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;min-width:0;width:100%;margin:0;overflow:visible;flex:none}
body aside nav button{display:flex;align-items:center;justify-content:center;width:100%;min-width:0;margin:0;padding:9px 4px;gap:0;font-size:0;line-height:1.35;white-space:normal;background:#ffffff0d;border:1px solid #ffffff24;border-radius:5px;color:#fff8ef;box-shadow:none;transition:background .15s,color .15s}
body aside nav button span{font-size:12px;line-height:1.4;letter-spacing:-.35px;word-break:keep-all}
body aside nav button:hover{background:#ffffff24}
body aside nav button.active{background:#fff5e6;color:#704432;border-color:#f3dfbe;box-shadow:inset 0 -3px 0 #cba864;font-weight:700}
body aside nav button:focus-visible{outline:2px solid #f3d18a;outline-offset:2px}
@media(max-width:1499px){body aside{grid-template-columns:48px minmax(180px,270px) max-content minmax(0,1fr);row-gap:9px}body aside nav{grid-column:1/-1}body aside nav button{padding:8px 5px}body aside nav button span{font-size:13px}}
@media(max-width:650px){body aside{grid-template-columns:42px minmax(0,1fr);padding:9px 10px;gap:8px}body aside .global-patient-search{grid-column:2;max-width:none}body aside>#new-patient{grid-column:2;justify-self:end;height:30px;padding:5px 9px}body aside nav{grid-column:1/-1;grid-template-columns:repeat(4,minmax(0,1fr))}body aside nav button span{font-size:12px}}
@media(max-width:360px){body aside nav{grid-template-columns:repeat(2,minmax(0,1fr))}}

body #today-view.reception-flow>.reception-stage+.reception-stage{margin-top:20px}

/* D aesun wordmark badge. */
body aside .brand{width:48px;height:48px;display:flex;align-items:center;justify-content:center;padding:0;background:#fff4df;border:1px solid #dec498;border-radius:13px;box-shadow:inset 0 0 0 3px #fffaf0,0 2px 5px #51322220}
body aside .brand-caption{font-size:18px;font-weight:800;color:#80513d;letter-spacing:-1px;line-height:1;white-space:nowrap}
@media(max-width:650px){body aside .brand{width:42px;height:42px;border-radius:11px}body aside .brand-caption{font-size:16px}}

body aside .brand[role="button"]{cursor:pointer;transition:background .15s,box-shadow .15s}body aside .brand[role="button"]:hover{background:#ffead0;box-shadow:inset 0 0 0 3px #fff8eb,0 3px 8px #51322235}body aside .brand[role="button"]:focus-visible{outline:2px solid #f3d18a;outline-offset:3px}

.legacy-cash-details{margin-top:8px;padding:10px 12px;border:1px solid #e2d6c8;background:#fff;font-size:13px}.legacy-cash-details summary{cursor:pointer;color:#75675e}.legacy-cash-details>div{display:flex;justify-content:space-between;gap:12px;padding-top:8px}.legacy-cash-note{font-size:12px;margin-top:6px}

.method-total-row{grid-template-columns:repeat(4,minmax(0,1fr))}.method-total-row>div:first-child{background:#efe2cf;border-color:#c9ac86}.method-total-row>div:first-child strong{font-weight:800}@media(max-width:850px){.method-total-row{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:500px){.method-total-row{grid-template-columns:1fr}}

.finance-cash-bottom{margin-top:20px}.finance-cash-bottom .cash-strip-wrap{margin-bottom:14px}

body #patients-view>.table-wrap{max-height:650px;overflow:auto}body #patients-view>.table-wrap thead th{position:sticky;top:0;z-index:1}

/* Show roughly thirty patient rows before the table scrolls. */
body #patients-view>.table-wrap{max-height:1056px;overflow:auto}
body #patients-view>.table-wrap th,body #patients-view>.table-wrap td{height:34px;padding:3px 8px;line-height:20px}
body #patients-view>.table-wrap .detail-btn{height:26px;padding:2px 7px;line-height:20px}

/* Compact patient overview and twenty visible patient rows. */
body main>section.stats{gap:12px;margin-bottom:16px}
body main>section.stats>div{padding:11px 16px;border-radius:6px}
body main>section.stats span{font-size:12px;line-height:1.3}
body main>section.stats strong{font-size:23px;margin:5px 0 3px;line-height:1.2}
body main>section.stats small{font-size:11px;line-height:1.3}
body #patients-view>.table-wrap{max-height:716px;overflow:auto}

/* Keep the expense list compact with an internal scroll. */
body #expenses-view .table-wrap{max-height:716px;overflow:auto}
body #expenses-view .table-wrap th,body #expenses-view .table-wrap td{height:34px;padding:3px 10px;line-height:20px}
body #expenses-view .table-wrap thead th{position:sticky;top:0;z-index:1}

body .profile-family-table .family-detach{white-space:nowrap;color:#96513f;border-color:#d3b2a5}

.profile-local-search{display:flex;align-items:center;gap:8px;padding:13px 16px;margin-bottom:12px;background:#f5eee4;border:1px solid #dacbb9;border-radius:6px}.profile-local-search>label{font-size:13px;font-weight:600;color:#79604b;white-space:nowrap}.profile-local-search>input{width:310px;max-width:55%;font-size:13px;padding:8px 10px}.profile-local-search>button{font-size:13px;padding:8px 13px}@media(max-width:600px){.profile-local-search{flex-wrap:wrap}.profile-local-search>input{flex:1;min-width:140px;max-width:none}}

/* Keep the patient list and paging controls within the available screen height. */
body #patients-view>.table-wrap{max-height:clamp(220px,calc(100dvh - 450px),560px);overflow:auto}
body #patients-view>.table-wrap th,body #patients-view>.table-wrap td{height:30px;padding:2px 8px;line-height:20px}
body #patients-view>.table-wrap .detail-btn{height:24px;padding:1px 7px;line-height:20px}
@media(max-height:760px){body #patients-view>.table-wrap{max-height:clamp(150px,calc(100dvh - 410px),350px)}}

/* Fixed card / cash / bank positions beside each receipt amount. */
body .today-table .receipt-amount-line>.paid-method-columns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;width:90px;text-align:center}
body .today-table .paid-method-columns>span{display:block;min-width:0;text-align:center;line-height:20px;font-size:12px}
body .today-table .paid-method-columns .paid-method-unknown{grid-column:1/-1;text-align:center;font-size:11px;line-height:18px}

.completed-totals{padding:12px 16px;background:#f1f4eb;border-top:1px solid #c6d0b9}.completed-total-row{display:grid;grid-template-columns:1.15fr repeat(3,minmax(0,1fr));align-items:center;gap:14px;font-size:13px}.completed-total-row+.completed-total-row{margin-top:10px;padding-top:10px;border-top:1px solid #d5ddca}.completed-total-row strong{color:#52683e}.completed-total-row small{font-size:12px;font-weight:400;margin-left:5px}.completed-total-row>div{display:flex;justify-content:space-between;gap:8px}.completed-total-row span{color:#7b856e}.completed-total-row b{font-variant-numeric:tabular-nums;color:#4f5c43}.completed-total-row .completed-total-paid b{font-size:16px;font-weight:800}@media(max-width:750px){.completed-total-row{grid-template-columns:1fr 1fr;gap:9px}}

/* Receipt totals follow the exact amount / card / cash / bank grid. */
body .today-table th:nth-child(5){width:330px}
body .today-table .receipt-amount-line{grid-template-columns:minmax(90px,1fr) 210px}
body .today-table .receipt-amount-line>.paid-method-columns{width:210px}
body .today-table .receipt-totals-foot td{background:#f1f4eb;border-top:2px solid #bac7ad;padding:10px 8px;vertical-align:top}
body .today-table .receipt-totals-foot .receipt-sum{justify-self:end;color:#4f653d;font-size:15px}
body .today-table .receipt-method-totals{margin-top:8px}
body .today-table .receipt-method-totals small,body .today-table .receipt-method-totals b{display:block;text-align:center;font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap}
body .today-table .receipt-method-totals small{color:#73806b;font-weight:400}
body .today-table .receipt-unclassified{display:block;margin-top:5px;color:#8b6b44}

body aside nav.top-primary-nav{grid-template-columns:repeat(6,minmax(0,1fr))}#outstanding-view .table-wrap{max-height:600px;overflow:auto}#outstanding-view th{position:sticky;top:0}#outstanding-filter{display:flex;gap:8px;flex-wrap:wrap}@media(max-width:650px){body aside nav.top-primary-nav{grid-template-columns:repeat(3,minmax(0,1fr))}}

.medicine-patient-lookup{position:relative}
.medicine-patient-suggestions{position:absolute;top:100%;left:0;width:min(440px,85vw);max-height:310px;overflow:auto;z-index:30;background:#fff;border:1px solid #c6ad98;border-radius:6px;box-shadow:0 6px 18px #39271c25;margin-top:4px}
.medicine-suggestion-caption{padding:9px 12px;color:#796759;font-size:12px;line-height:1.5}
.medicine-patient-suggestions button{display:block;width:100%;text-align:left;border:0;border-top:1px solid #eee4da;border-radius:0;background:white;padding:9px 12px;color:#3f332c}
.medicine-patient-suggestions button:hover,.medicine-patient-suggestions button:focus{background:#f4ebdd}
.medicine-patient-suggestions strong,.medicine-patient-suggestions small{display:block;font-size:13px;line-height:1.6}
.medicine-patient-suggestions small{color:#827265;font-weight:400}

/* Patient candidates remain in the page, not an overlay. */
#medicine-view .medicine-patient-suggestions{position:static;width:100%;max-height:240px;margin:10px 0 14px;box-shadow:none;border:1px solid #d6c4b3;background:#fffdf9;display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0;z-index:auto}
#medicine-view .medicine-patient-suggestions.hidden{display:none}
#medicine-view .medicine-suggestion-caption{grid-column:1/-1;background:#f1e8dc;font-weight:600}
#medicine-view .medicine-patient-suggestions button{border-right:1px solid #eee4da}
#medicine-view .medicine-patient-suggestions button.selected{background:#eadac3;box-shadow:inset 3px 0 #966340}

/* Center only the completed receipts amount heading. */
body #completed-list .today-table thead th:nth-child(5){text-align:center}

/* Use the reception search table in patient management. */
body #profile-search-results{display:block;max-height:none;overflow:visible}
body #profile-search-results:empty{display:none}
body #profile-search-results .table-wrap{max-height:280px;overflow:auto;border:1px solid #ded1c4;border-radius:5px;margin-bottom:14px}
body #profile-search-results .reception-results-table{width:100%;table-layout:auto}
body #profile-search-results th{position:sticky;top:0;z-index:1}
body #profile-search-results th,body #profile-search-results td{padding:5px 9px;font-size:13px;white-space:nowrap}
body #profile-search-results .reception-search-count{margin:8px 0;font-size:13px}

/* Full-width patient search results, matching reception. */
body #profile-view #profile-search-results:not(:empty){display:block;width:100%;max-width:none;max-height:none;overflow:visible;border:0;border-radius:0;background:transparent;margin:0 0 16px}
body #profile-view #profile-local-search{width:100%;max-width:none}
body #profile-view #profile-search-results .table-wrap{width:100%;max-width:100%;margin-bottom:0}
body #profile-view #profile-search-results .reception-results-table{width:100%;margin-top:0}

body #medicine-view .medicine-patient-suggestions{display:block;width:100%;max-height:none;overflow:visible;border:0;background:transparent;margin:10px 0 14px}
body #medicine-view .medicine-patient-suggestions.hidden{display:none}
body #medicine-view .medicine-patient-suggestions .table-wrap{max-height:280px;overflow:auto;border:1px solid #d6c4b3;border-radius:5px}
body #medicine-view .medicine-patient-suggestions table{width:100%;margin-top:0}
body #medicine-view .medicine-patient-suggestions th{position:sticky;top:0;z-index:1}
body #medicine-view .medicine-patient-suggestions td,body #medicine-view .medicine-patient-suggestions th{padding:5px 9px;font-size:13px;white-space:nowrap}
body #medicine-view .medicine-patient-suggestions button{display:inline-block;width:auto;padding:4px 9px;border:1px solid #dfcfbd;border-radius:4px}
body #medicine-view .medicine-patient-suggestions button.text-link{border:0;background:transparent;padding:0}
.medicine-family-shortcuts{margin:10px 0 16px;padding:12px 16px;border:1px solid #d8c8b4;border-radius:6px;background:#f8f3eb}
.medicine-family-caption{font-size:13px;color:#80674e;margin-bottom:9px}
.medicine-family-buttons{display:flex;gap:8px;flex-wrap:wrap}
.medicine-family-buttons button{font-size:13px;padding:7px 13px}
.medicine-family-buttons button.active{background:#875540;color:#fff;border-color:#875540}
.medicine-family-shortcuts>small{display:block;color:#8f8072;margin-top:8px}

.medicine-family-shortcuts .table-wrap{max-height:280px;overflow:auto;background:#fff;border:1px solid #ddcfbf;border-radius:4px}
.medicine-family-shortcuts .medicine-family-table{width:100%;margin-top:0}
.medicine-family-shortcuts .medicine-family-table td,.medicine-family-shortcuts .medicine-family-table th{padding:5px 9px;font-size:13px;white-space:nowrap}
.medicine-family-shortcuts .medicine-family-table th{position:sticky;top:0;z-index:1}
.medicine-family-shortcuts .medicine-family-table tr.selected-patient td{background:#f0e4d2}

.medicine-family-tiles{display:flex;flex-wrap:wrap;gap:9px}
.medicine-family-tiles .medicine-family-tile{display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-width:240px;max-width:100%;padding:11px 14px;border:1px solid #d6c5af;border-radius:7px;background:white;color:#514235;text-align:left;font-size:13px;line-height:1.5}
.medicine-family-tiles .medicine-family-tile:hover{background:#f6eddf;border-color:#b59470}
.medicine-family-tiles .medicine-family-tile.active{background:#efe1cc;border-color:#a77a4d;box-shadow:inset 3px 0 #94623e}
.medicine-family-tile-heading{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.medicine-family-tile-heading strong{font-size:15px}.medicine-family-tile-heading b{font-size:13px}
.medicine-family-selected{font-size:11px;padding:1px 5px;border-radius:4px;background:#8c6143;color:#fff}
.medicine-family-tile small{font-size:12px;color:#8a7765}

.medicine-family-sheet{overflow:auto;border:1px solid #d4c5b3;border-radius:4px;background:#fff}
.medicine-family-sheet-head,.medicine-family-sheet .medicine-family-sheet-row{display:grid;grid-template-columns:110px minmax(110px,1fr) 100px 100px 65px 150px 100px 110px;min-width:845px;width:100%;gap:0;align-items:stretch;text-align:left}
.medicine-family-sheet-head{background:#eee5d8;color:#79634e;font-size:12px}
.medicine-family-sheet .medicine-family-sheet-row{padding:0;border:0;border-top:1px solid #dfd3c4;border-radius:0;background:#fff;color:#514235;font-size:13px;line-height:22px}
.medicine-family-sheet-head>span,.medicine-family-sheet-row>*{padding:5px 9px;border-right:1px solid #e0d4c6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.medicine-family-sheet-row>*:last-child,.medicine-family-sheet-head>span:last-child{border-right:0}
.medicine-family-sheet .medicine-family-sheet-row:hover{background:#f8f1e6}
.medicine-family-sheet .medicine-family-sheet-row.active{background:#efe1cc;box-shadow:inset 3px 0 #966340}
.medicine-family-sheet-row small{font-size:11px;font-weight:400;color:#966340;margin-left:4px}

/* Family uses the original compact two-line candidate tiles. */
.medicine-family-candidate-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:0;border:1px solid #d6c4b3;border-radius:5px;overflow:hidden;background:#fff}
.medicine-family-candidate-tiles .medicine-family-candidate{display:block;width:100%;text-align:left;border:0;border-right:1px solid #eee4da;border-bottom:1px solid #eee4da;border-radius:0;background:white;padding:9px 12px;color:#3f332c}
.medicine-family-candidate strong,.medicine-family-candidate small{display:block;font-size:13px;line-height:1.6}
.medicine-family-candidate small{color:#827265;font-weight:400}
.medicine-family-candidate strong>span{font-size:11px;color:#94623e;font-weight:400;margin-left:5px}
.medicine-family-candidate-tiles .medicine-family-candidate:hover,.medicine-family-candidate-tiles .medicine-family-candidate:focus-visible{background:#f4ebdd}
.medicine-family-candidate-tiles .medicine-family-candidate.active{background:#eadac3;box-shadow:inset 3px 0 #966340}
@media(max-width:380px){.medicine-family-candidate-tiles{grid-template-columns:1fr}}

/* Clear boundaries between pending reception and completed receipts. */
body #today-view .reception-stage-pending{border:2px solid #a77b58;box-shadow:0 2px 7px #75503912}
body #today-view .reception-stage-pending>.panel-head{border-bottom:1px solid #c4a586;background:#eee1d1}
body #today-view .reception-stage-completed{border:2px solid #81936b;box-shadow:0 2px 7px #4c623b12}
body #today-view .reception-stage-completed>.completed-heading{border-bottom:1px solid #a8b797;background:#e4ebda}

/* Strong outline for the daily settlement receipt panel. */
body #finance-view .panel:has(#settlement-body){border:2px solid #a77b58;box-shadow:0 2px 7px #75503912}
body #finance-view .panel:has(#settlement-body)>.panel-head{background:#eee1d1;border-bottom:1px solid #c4a586}

/* Larger type for reception patient search results. */
body #reception-search-results .reception-results-table th,body #reception-search-results .reception-results-table td{font-size:15px;line-height:1.5}
body #reception-search-results .reception-results-table .detail-btn{font-size:14px}
body #reception-search-results .reception-search-count{font-size:14px}

/* Keep the last visit below the first visit and consent on one line. */
body #profile-facts{grid-template-columns:repeat(3,minmax(0,1fr))}
body #profile-facts>.profile-first-visit{grid-column:1;grid-row:2}
body #profile-facts>.profile-last-visit{grid-column:1;grid-row:3}
body #profile-facts>.profile-sms-line{grid-column:2/-1;grid-row:3;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
body #profile-facts>.profile-sms-line>span{display:inline-block;margin:0}
body #profile-facts>.profile-sms-line label{display:flex;align-items:center;gap:6px;white-space:nowrap}
body #profile-facts>.profile-sms-line input{width:auto;margin:0}
body #profile-facts>.profile-sms-line small{margin:0;font-size:12px}
@media(max-width:700px){body #profile-facts{grid-template-columns:repeat(2,minmax(0,1fr))}body #profile-facts>.profile-first-visit{grid-column:1;grid-row:3}body #profile-facts>.profile-last-visit{grid-column:1;grid-row:4}body #profile-facts>.profile-sms-line{grid-column:1/-1;grid-row:5}}

body #profile-view .profile-tabs{justify-content:flex-end}

/* Patient information and history begin on the same top border. */
body #profile-content.profile-columns{align-items:start}
body #profile-view .profile-overview,body #profile-view .profile-family,body #profile-view .profile-right-column>.panel{border:2px solid #a77b58;border-radius:7px;box-shadow:0 2px 7px #75503910}
body #profile-view .profile-right-column>.panel>.profile-tabs{margin:0;padding:12px 14px;justify-content:flex-end;background:#eee1d1;border-bottom:1px solid #c4a586}
body #profile-view .profile-right-column>.panel>.panel-head{background:#faf6ef;border-bottom:1px solid #e0d1bf}
body #profile-view .profile-family>.panel-head{background:#eee1d1;border-bottom:1px solid #c4a586}
body #profile-view .profile-overview{border-top:3px solid #956746}

/* Bookmark tabs attached to the history panel. */
body #profile-view .profile-right-column>.panel>.profile-tabs{justify-content:flex-start;align-items:stretch;gap:5px;padding:10px 12px 0;background:#eee1d1;border-bottom:1px solid #b99573;flex-wrap:wrap}
body #profile-view .profile-tabs button{position:relative;margin:0 0 -1px;padding:10px 15px;border:1px solid #c5ad94;border-bottom:1px solid #b99573;border-radius:7px 7px 0 0;background:#e4d4c0;color:#80684f;font-size:13px;line-height:1.5;box-shadow:none}
body #profile-view .profile-tabs button:hover{background:#f2e6d5;color:#61452f}
body #profile-view .profile-tabs button.active{background:#faf6ef;color:#704432;border-color:#b99573;border-top:3px solid #956746;border-bottom-color:#faf6ef;padding-top:8px;font-weight:700}
body #profile-view .profile-right-column>.panel>.panel-head{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:4px;padding:15px 17px;background:#faf6ef;text-align:left}
body #profile-view #profile-history-title{margin:0;font-size:17px;color:#654936}
body #profile-view #profile-history-note{margin:0;font-size:12px;text-align:left}
@media(max-width:500px){body #profile-view .profile-tabs button{padding:9px 10px;font-size:12px}body #profile-view .profile-tabs button.active{padding-top:7px}}

/* Restore separate history buttons. */
body #profile-view .profile-right-column>.panel>.profile-tabs{justify-content:flex-end;gap:6px;padding:12px 14px;background:#eee1d1;border-bottom:1px solid #c4a586}
body #profile-view .profile-tabs button{position:static;margin:0;padding:10px 15px;border:1px solid #d4c2ad;border-radius:6px;background:#fff;color:#836349;font-size:13px;line-height:1.5;box-shadow:none}
body #profile-view .profile-tabs button:hover{background:#f5ebdf;color:#61452f}
body #profile-view .profile-tabs button.active{padding:10px 15px;border:1px solid #803e2d;border-radius:6px;background:#803e2d;color:#fff;font-weight:600}
@media(max-width:500px){body #profile-view .profile-tabs button,body #profile-view .profile-tabs button.active{padding:9px 10px;font-size:12px}}

body #profile-view .profile-right-column>.panel>.profile-tabs{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:6px}
body #profile-view .profile-tabs>#profile-history-title{margin:0 auto 0 0;font-size:17px;line-height:1.5;color:#654936;font-weight:700}
body #profile-view .profile-right-column>.panel>.panel-head{padding:8px 17px}
body #profile-view .profile-right-column>.panel>.panel-head:has(#profile-history-note:empty){display:none}

body #profile-name .profile-age-sex{font-size:15px;font-weight:700;color:#514137}

body #today-view .today-table thead th:nth-child(5){text-align:center}

/* Clear cash-on-hand section below daily receipts. */
body #finance-view .finance-cash-bottom{margin-top:26px;padding-top:18px;border-top:2px solid #c1ad91}
body #finance-view .cash-strip-wrap{border:2px solid #87966c;border-radius:7px;background:#fff;box-shadow:0 2px 7px #4c623b12}
body #finance-view .cash-strip-caption{background:#e4ebda;border-bottom:1px solid #acba96;padding:12px 15px;font-size:15px;color:#4d623a}
body #finance-view .cash-strip-item{border-right:1px solid #d3ddc6}
body #finance-view .cash-strip-total{background:#eef3e6;border-right:0}
body #finance-view .cash-strip-total>strong{color:#4d6634;font-weight:800}

body #profile-view .profile-history-table[data-section="messages"]{min-width:650px;width:100%;table-layout:fixed}
body #profile-view .profile-history-table[data-section="messages"] th:nth-child(1){width:100px}
body #profile-view .profile-history-table[data-section="messages"] th:nth-child(2){width:55px}
body #profile-view .profile-history-table[data-section="messages"] th:nth-child(3){width:125px}
body #profile-view .profile-history-table[data-section="messages"] th:nth-child(5){width:75px}
body #profile-view .profile-message-content{white-space:pre-wrap;overflow-wrap:anywhere}

body #today-view .today-table .reception-actions button{font-size:13px;line-height:1.5;font-weight:500}

body #today-view .today-table thead th:first-child,body #today-view .today-table tbody td:first-child{text-align:left}
body #today-view .today-table tbody td:first-child .today-sms-check{margin-left:0;vertical-align:middle}

/* Separate recipient selection from the completed reception panel. */
body #today-view .today-sms-recipients{margin-top:20px;padding:15px 17px;border:2px solid #b69a79;border-radius:7px;background:#faf5ec;box-shadow:0 2px 7px #75503910}
body #today-view .today-sms-recipient-head{padding-bottom:10px;border-bottom:1px solid #e0d0bc}
body #today-view .today-sms-recipient-head strong{color:#79583b}

body #reception-search-results .reception-results-table th,body #reception-search-results .reception-results-table td{font-size:14px}
body #reception-search-results .reception-results-table .detail-btn,body #reception-search-results .reception-search-count{font-size:13px}

body .medicine-table select[data-field="category"][data-category="자보"]{background:#ffe2c4;color:#8a4b16}
