:root{font-family:'Yu Gothic','Hiragino Kaku Gothic ProN',sans-serif;color:#213941;background:#f3f6f8;font-size:16px;line-height:1.7;--brand:#0b5362}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible{outline:3px solid #db8b26;outline-offset:3px}header{background:white;border-bottom:1px solid #dce5e9;padding:20px max(24px,calc((100% - 1100px)/2));display:flex;align-items:center;justify-content:space-between}.brand{display:flex;gap:12px;align-items:center}.mark{display:grid;place-items:center;background:var(--brand);color:white;width:48px;height:48px;border-radius:14px;font-size:26px}.brand small{display:block;font-size:12px;letter-spacing:.1em}.brand strong{font-size:24px;letter-spacing:.12em}.badge{background:#e8f2f5;border:1px solid #b9d1d9;border-radius:30px;padding:3px 14px;font-size:14px}main{max-width:1100px;margin:auto;padding:24px}.notice{padding:14px 18px;border-left:4px solid #ba7928;background:#fff5df;font-size:14px;display:grid;gap:3px}nav{display:flex;gap:8px;border-bottom:1px solid #cfdee3;margin-top:24px}nav button{border:0;background:transparent;padding:16px 18px;color:#556d75;font-weight:bold}nav button[aria-pressed=true]{color:var(--brand);border-bottom:3px solid var(--brand)}#count{background:#e1eaf0;padding:2px 8px;border-radius:20px;font-size:14px}.heading{padding:28px 0 24px}.heading p{margin:4px 0}h1{font-size:30px;line-height:1.5;letter-spacing:.02em;margin:6px 0 12px}h2{font-size:18px;margin:0 0 20px}.eyebrow{font-size:14px;color:var(--brand);font-weight:bold;letter-spacing:.15em}.layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:28px}.card{background:white;border:1px solid #dde6eb;border-radius:14px;padding:28px;margin-bottom:20px}h2>span{display:inline-grid;place-items:center;background:#e5f0f3;color:var(--brand);width:30px;height:30px;border-radius:50%;margin-right:10px;font-size:14px}.choices{display:grid;grid-template-columns:1fr 1fr;gap:12px}.choices label{display:flex;gap:10px;align-items:center;border:1px solid #c6d6de;border-radius:10px;padding:16px;cursor:pointer}.choices label:has(:checked){border:2px solid var(--brand);padding:15px;background:#f0f7f9}.choices input{accent-color:var(--brand);width:18px;height:18px}.choices small{display:block;color:#536b74;font-size:14px}.hint{font-size:14px;color:#5c7078;margin-top:16px}.field{display:grid;gap:8px;font-weight:bold}.field input{min-width:0;width:100%;padding:12px 14px;border:1px solid #b9ccd6;border-radius:8px;background:white;color:#213941}.slots{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.slots button{border:1px solid #9ebdc8;border-radius:8px;background:#fff;padding:10px 4px;color:var(--brand);font-weight:bold}.slots button[aria-pressed=true]{background:var(--brand);color:white}.slots button:disabled{color:#9caab0;background:#f3f5f6;border-color:#e4e9ed;text-decoration:line-through;cursor:not-allowed}.summary{align-self:start;background:#e8f0f4;padding:24px;border-radius:14px;position:sticky;top:20px}.summary dl{margin:0}.summary dl>div{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #cddde4;padding:14px 0;font-size:14px}.summary dd{margin:0;font-weight:bold;text-align:right}.trialSettings{border-top:1px solid #c8d8df;margin-top:24px;padding-top:18px;font-size:14px}.trialSettings p{margin-bottom:0}.primary{background:var(--brand);color:white;border:1px solid var(--brand);border-radius:8px;padding:13px 20px;font-weight:bold}.wide{width:100%}.secondary{background:white;border:1px solid #b6ccd6;border-radius:8px;color:var(--brand);padding:10px 16px}.rules{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.rules>div{background:#e6f0f4;padding:20px;border-radius:10px}.rules small{display:block;font-size:14px}.rules b{display:block;font-size:26px}.listHeading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.listHeading h2{margin:0}.booking{border-top:1px solid #dbe5ea;padding:20px 0;display:flex;gap:16px;justify-content:space-between;flex-wrap:wrap}.booking:first-child{margin-top:20px}.booking h3{font-size:17px;margin:0 0 8px}.booking p{margin:4px 0;font-size:14px}.timeline{border-left:3px solid #2a7e92;padding-left:14px}.booking .secondary{align-self:center}.success{text-align:center;max-width:700px;margin:40px auto}.successIcon{display:inline-grid;place-items:center;background:#e3f2ec;color:#146947;border-radius:50%;width:64px;height:64px;font-size:32px}.success button{margin:8px}footer{max-width:1100px;margin:36px auto;padding:24px;border-top:1px solid #d8e2e7;font-size:14px;color:#58727d;display:flex;justify-content:space-between;gap:10px}dialog{border:0;border-radius:16px;max-width:520px;width:calc(100% - 32px);padding:30px;box-shadow:0 24px 80px #102f3a40}dialog::backdrop{background:#102f3a88}#confirmText{white-space:pre-line}.dialogActions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}#error{color:#a22b25}[hidden]{display:none!important}.mobile{display:none}@media(max-width:760px){main{padding:16px}header{padding:16px}.layout{grid-template-columns:1fr;gap:20px}.summary{position:static;grid-row:1;padding:20px}.summary .hint,.trialSettings{display:none}.summary h2{margin-bottom:8px}.summary dl{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}.summary dl>div{display:block;padding:6px 0}.summary dd{text-align:left}.card{padding:20px}.heading{padding:20px 0}.heading h1{font-size:25px}.choices{grid-template-columns:1fr}.rules{grid-template-columns:1fr 1fr;gap:10px}.rules>div{padding:14px}nav button{padding:12px 8px;font-size:14px}footer{flex-direction:column}.mobile{display:block}.slots{grid-template-columns:repeat(3,1fr)}}

/* Weekly availability */
.layout>form{min-width:0}.week-nav{display:flex;align-items:center;justify-content:space-between;gap:8px}.week-nav strong{font-size:14px;text-align:center}.week-nav button{font-size:14px;padding:8px 10px;white-space:nowrap}.week-nav button:disabled{opacity:.4;cursor:default}
.slots{display:block;max-height:540px;overflow:auto;border:1px solid #cbd7df;border-radius:8px;scrollbar-gutter:stable}
.availability-table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;text-align:center;font-size:14px}
.availability-table th,.availability-table td{border-right:1px solid #dce3ea;border-bottom:1px solid #dce3ea;padding:0}
.availability-table th:last-child,.availability-table td:last-child{border-right:0}.availability-table th:first-child{width:64px}
.availability-table thead th{position:sticky;top:0;z-index:2;background:#eef2f6;padding:8px 2px}
.availability-table th small{display:block;font-size:12px}.availability-table tbody th{background:#eef2f6;position:sticky;left:0;font-weight:bold}
.availability-table .saturday{color:#086bd5}.availability-table .sunday{color:#cc3349}
.slots button{width:100%;min-height:40px;display:block;border:0;border-radius:0;padding:4px 0;background:white;color:#087df1;font-size:22px;font-weight:500;line-height:1.4}
.slots button:disabled{background:#f6f7f9;color:#a0a9b2;text-decoration:none}
.slots button:not(:disabled):hover{background:#e5f2ff}.slots button[aria-pressed=true],.slots button[aria-pressed=true]:hover{background:#0b5362;color:white;box-shadow:inset 0 0 0 2px #083d49}
.slots button:focus-visible{outline-offset:-3px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:760px){.slots{max-height:480px;scrollbar-gutter:auto}.availability-table th:first-child{width:49px}.availability-table{font-size:12px}.availability-table th small{font-size:12px}.slots button{min-height:42px;font-size:20px}.week-nav{flex-wrap:wrap}.week-nav strong{font-size:13px}.week-nav button{font-size:13px;padding:7px}.availability-table thead th{padding:8px 0}}
/* Practitioner appointment ledger */
body:has(#manageView:not([hidden])) main{max-width:1440px}.admin-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:28px 0 12px}.admin-heading p{margin:0}.admin-heading a{text-decoration:none;font-size:14px;white-space:nowrap}.admin-note{font-size:13px;color:#5c7078}.admin-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:20px 0}.admin-stats>div{background:white;border:1px solid #dce5e9;border-radius:10px;padding:14px 20px;font-size:14px}.admin-stats strong{display:block;font-size:28px;color:var(--brand)}.new-bookings{border:1px solid #a6d8ca;background:#edf9f3;padding:16px;border-radius:10px;margin-bottom:20px;display:flex;align-items:center;gap:12px;flex-wrap:wrap}.new-bookings button{background:white;border:1px solid #a6d8ca;color:#145441;border-radius:6px;padding:6px 10px;font-size:13px}.ledger{background:white;border:1px solid #d5e1e7;border-radius:12px;overflow:hidden}.ledger-toolbar{padding:20px;display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap}.date-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.date-controls label{font-size:14px}.date-controls input{padding:8px;border:1px solid #b6ccd6;border-radius:6px;color:#213941}.mode-controls{display:flex;align-items:center}.mode-controls button{padding:9px 22px;background:white;border:1px solid #b6ccd6;color:var(--brand)}.mode-controls button:first-child{border-radius:7px 0 0 7px}.mode-controls button:last-child{border-radius:0 7px 7px 0}.mode-controls button[aria-pressed=true]{background:var(--brand);color:white}.ledger-title{padding:0 20px 12px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.ledger-title h2{margin:0}.ledger-title span{font-size:13px;color:#5c7078}.legend{display:flex;gap:18px;flex-wrap:wrap;padding:0 20px 16px;font-size:12px;color:#526a73}.legend-first:before,.legend-repeat:before{content:'';display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:6px;background:#dcefe9}.legend-first:before{background:#dceafb}.calendar-scroll{max-height:680px;overflow:auto;border-top:1px solid #d5e1e7}.calendar-grid{display:grid;grid-template-columns:64px repeat(var(--days),minmax(126px,1fr));min-width:946px}.calendar-grid.one-day{min-width:300px}.calendar-corner,.calendar-day{position:sticky;top:0;z-index:3;background:#f3f7fa;border:0;border-bottom:1px solid #d5e1e7;border-right:1px solid #d5e1e7;padding:10px 4px;text-align:center;color:#334e59;font-size:14px}.calendar-corner{left:0;z-index:4;font-size:12px;display:grid;place-items:center}.calendar-day strong,.calendar-day small{display:block}.calendar-day small{color:#617b84;font-size:12px}.calendar-day.is-today{background:#e4f1f3;box-shadow:inset 0 3px var(--brand)}.time-axis{position:sticky;left:0;z-index:2;background:#f3f7fa;height:1220px;font-size:11px;color:#5c7078;border-right:1px solid #d5e1e7}.time-axis span{position:absolute;right:8px;transform:translateY(2px)}.time-axis .axis-end{top:1200px}.calendar-column{height:1220px;position:relative;border-right:1px solid #dde6eb;background:repeating-linear-gradient(to bottom,transparent 0px,transparent 19px,#edf1f5 19px,#edf1f5 20px),repeating-linear-gradient(to bottom,#fff 0px,#fff 119px,#d5e1e7 119px,#d5e1e7 120px)}.appointment{position:absolute;left:4px;right:4px;width:calc(100% - 8px);text-align:left;display:flex;flex-direction:column;gap:2px;padding:8px;border-radius:5px;border:1px solid #bdd6cb;border-left:4px solid #348568;background:#e5f3ed;color:#214d3d;overflow:auto;font-size:12px;line-height:1.5}.appointment.first{background:#e7f0fc;border-color:#c5d9f2;border-left-color:#5485bd;color:#244969}.appointment:hover{filter:brightness(.97)}.appointment strong{font-size:13px;overflow-wrap:anywhere}.calendar-empty{padding:0 20px;color:#61747d;font-size:14px}.calendar-empty:empty{display:none}.admin-list{padding:0 20px}.admin-list-row{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;background:white;border:0;border-bottom:1px solid #dce5e9;padding:20px 0;text-align:left;color:#213941;font-size:14px}.detail-top{display:flex;justify-content:space-between;align-items:center;gap:12px}.detail-top h2{margin:0}#detailBody p{border-bottom:1px solid #e1e8ec;padding-bottom:10px}#detailBody small{display:block;color:#61747d}#detailBody strong{overflow-wrap:anywhere}#adminError,#detailError{color:#a22b25}.danger{background:#a22b25;border:0;color:white;border-radius:8px;padding:10px 16px}#cancelCheck{margin-top:20px;padding:12px;background:#fff1ed;border-radius:8px}
@media(max-width:760px){.admin-heading{align-items:flex-start;flex-direction:column}.admin-stats{gap:8px}.admin-stats>div{padding:12px 10px;font-size:12px}.admin-stats strong{font-size:24px}.ledger-toolbar{padding:14px}.date-controls{gap:6px}.date-controls label{width:100%;margin-top:4px}.admin-list-row{flex-direction:column;align-items:flex-start;gap:4px}.legend{gap:10px}.calendar-scroll{max-height:560px}}
body:has(#manageView:not([hidden])) header{padding-top:10px;padding-bottom:10px}body:has(#manageView:not([hidden])) main{padding-top:16px}body:has(#manageView:not([hidden])) nav{margin-top:10px}body:has(#manageView:not([hidden])) .notice{padding:8px 14px;font-size:12px}.admin-heading{padding-top:16px;padding-bottom:0}.admin-heading h1{margin:0;font-size:28px}.admin-heading .eyebrow{font-size:12px}.admin-heading p:not(.eyebrow){font-size:13px}.admin-note{margin:8px 0}.admin-stats{margin:12px 0}.admin-stats>div{padding:8px 16px}.admin-stats strong{font-size:24px}.ledger-toolbar{padding:14px 20px}

.first-menu{margin-top:20px;padding:18px;background:#f3f7fa;border:1px solid #dde6eb;border-radius:8px;font-size:14px}.first-menu h3{margin:0 0 8px;color:var(--brand);font-size:17px}.first-menu p{margin:8px 0}.first-menu p:last-child{margin-bottom:0}
#textEditor{max-width:1400px;width:calc(100% - 24px);max-height:94vh;overflow:auto;padding:24px}.editor-layout{display:grid;grid-template-columns:minmax(250px,360px) minmax(0,1fr);gap:24px}#textFields .field{margin:0 0 14px;font-size:14px}textarea{font:inherit;padding:10px;border:1px solid #b9ccd6;border-radius:8px;width:100%;resize:vertical}.editor-actions{display:flex;flex-wrap:wrap;gap:10px;position:sticky;bottom:0;background:white;padding:12px 0}.editor-preview{min-width:0}.preview-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px}.preview-controls button[aria-pressed=true]{background:var(--brand);color:white}.preview-scroll{overflow:auto;border:1px solid #cbd7df;background:#e5edf2;padding:12px;max-height:680px}#textPreview{display:block;width:390px;height:620px;border:0;background:white;margin:auto}#editorStatus{padding:10px;background:#edf7f1;min-height:44px}.editor-error{color:#a22b25}.text-preview nav,.text-preview .notice,.text-preview footer{display:none}.text-preview .trialSettings{display:none}[data-copy]{white-space:pre-wrap;overflow-wrap:anywhere}button:disabled{cursor:not-allowed;opacity:.6}@media(max-width:760px){.editor-layout{grid-template-columns:1fr}#textEditor{padding:16px}.preview-scroll{padding:4px}.admin-heading{flex-wrap:wrap}}
.patient-section fieldset{border:0;padding:0;margin:20px 0}.patient-section legend{font-weight:bold;margin-bottom:8px}.name-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}.required{color:#a22b25;font-size:12px;font-weight:normal}.optional{font-size:12px;color:#61747d}.patient-section>.field{margin-top:20px}.gender-options{display:flex;gap:12px;flex-wrap:wrap}.gender-options label{padding:10px 12px;border:1px solid #b9ccd6;border-radius:8px;cursor:pointer}.gender-options input{accent-color:var(--brand)}#confirmDialog{max-height:90vh;overflow:auto}#confirmText{overflow-wrap:anywhere}#detailBody strong{white-space:pre-wrap}.patient-section .field{gap:5px}
.legend-block:before{content:'';display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:6px;background:#e4e7ec}.schedule-slot{position:absolute;left:0;right:0;top:0;width:100%;height:20px;padding:0;border:0;background:transparent;cursor:pointer}.schedule-slot:hover,.schedule-slot:focus-visible{background:#e4eef5}.appointment{z-index:1}.appointment.block{background:#e4e7ec;border-color:#d4d9e0;border-left-color:#88929e;color:#334452;padding:2px 6px;gap:0;font-size:11px;line-height:1.4}.appointment.block strong{font-size:12px}.appointment.block>span:last-child{display:none}#scheduleEditor{max-height:90vh;overflow:auto}#scheduleEditor .field{margin:16px 0 10px}.schedule-times{display:grid;grid-template-columns:1fr 1fr;gap:16px}#scheduleEditor select{font:inherit;width:100%;padding:10px;border:1px solid #b9ccd6;border-radius:8px;background:white}#scheduleError{color:#a22b25}#scheduleDeleteCheck{margin-top:20px;background:#fff1ed;padding:12px;border-radius:8px}
#receptionList{max-width:920px;max-height:92vh;overflow:auto}#receptionEdit{max-width:620px;max-height:90vh;overflow:auto}.reception-toolbar,.reception-presets{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:16px 0}.reception-table-wrap{max-height:55vh;overflow:auto;border:1px solid #d5e1e7}.reception-table{border-collapse:separate;border-spacing:0;width:100%;font-size:14px}.reception-table th{position:sticky;top:0;background:#edf4f7;text-align:left;z-index:1}.reception-table th,.reception-table td{padding:12px;border-bottom:1px solid #d5e1e7}.reception-table input[type=checkbox]{width:18px;height:18px}.reception-date{border:0;background:none;color:var(--brand);font:inherit;text-decoration:underline;white-space:nowrap}.reception-interval{display:flex;align-items:end;gap:12px;margin:14px 0}.reception-interval label{display:grid;gap:5px;flex:1}#receptionEdit select,#receptionMonth{font:inherit;padding:8px;border:1px solid #b9ccd6;border-radius:6px;background:white;max-width:100%}#receptionError{color:#a22b25}#receptionDates{overflow-wrap:anywhere;max-height:100px;overflow:auto}.reception-shade{position:absolute;left:0;right:0;width:100%;z-index:1;border:0;background:#e4e7ec;color:#64717e;text-align:left;padding:2px 6px;font-size:11px;overflow:hidden}.appointment{z-index:2}@media(max-width:600px){#receptionList,#receptionEdit{padding:16px}.reception-table th,.reception-table td{padding:8px 5px}.reception-interval{gap:6px}.reception-interval .secondary{padding:8px}.reception-presets button{font-size:13px}}
/* Thirty-minute landmarks and a shared ten-minute pointer guide. */
.legend-beauty:before{content:'';display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:6px;background:#eddef4}
.appointment.repeatBeauty{background:#f4edf8;border-color:#dcc8e8;border-left-color:#9762b2;color:#59366c}
.appointment.repeat8000{background:#fff6df;border-color:#ead6a4;border-left-color:#b78321;color:#664b17}
.legend-repeat-8000:before{content:'';display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:6px;background:#fff0ce}
.appointment.repeat7000{background:#fff0e8;border-color:#edc8b2;border-left-color:#bd6b3f;color:#6b3822}
.legend-repeat-7000:before{content:'';display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:6px;background:#ffe2d3}
.appointment.repeatPlus{background:#eef2ff;border-color:#cdd5f2;border-left-color:#6574bb;color:#354174}
.legend-repeat-plus:before{content:'';display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:6px;background:#dfe5ff}
.calendar-column{background:repeating-linear-gradient(to bottom,transparent 0px,transparent 59px,#c8d8e1 59px,#c8d8e1 60px),repeating-linear-gradient(to bottom,#fff 0px,#fff 19px,#edf1f5 19px,#edf1f5 20px)}
.has-time-guide .calendar-column:after{content:'';position:absolute;top:var(--guide-top);left:0;right:0;height:20px;box-sizing:border-box;border-top:2px solid #39899b;background:#39899b0d;z-index:3;pointer-events:none}
.time-axis{z-index:4}.calendar-day{z-index:5}.calendar-corner{z-index:6}
.time-axis .time-guide-label{right:3px;min-width:56px;padding:1px 4px;transform:none;background:#0b5362;color:#fff;border-radius:4px;font-size:13px;font-weight:700;line-height:18px;text-align:center;z-index:1;pointer-events:none;box-shadow:0 1px 4px #12384425}
#manualBookingEditor{max-width:580px;max-height:92vh;overflow:auto}#manualBookingEditor .field{margin:14px 0;gap:5px}.manual-pair{display:grid;grid-template-columns:1fr 1fr;gap:14px}#manualBookingEditor select{font:inherit;width:100%;padding:10px;border:1px solid #b9ccd6;border-radius:8px;background:white;color:#213941}.manual-time-summary{font-size:18px;font-weight:bold;background:#e8f2f5;padding:10px 14px;border-radius:8px;margin:10px 0}.manual-unavailable,#manualBookingError{color:#a22b25}#manualAvailability{font-size:13px}#manualReviewBody dt{font-size:13px;color:#61747d;margin-top:12px}#manualReviewBody dd{margin:0;padding-bottom:10px;border-bottom:1px solid #e1e8ec;white-space:pre-wrap;overflow-wrap:anywhere}#manualName[readonly]{background:#f3f6f8}.entry-choices{display:grid;gap:14px;margin:20px 0}#adminStatus:empty{display:none}#adminStatus{background:#edf7f1;padding:10px 14px;border-radius:8px;color:#145441}@media(max-width:500px){#manualBookingEditor{padding:20px}.manual-pair{gap:10px}#manualBookingEditor input[type=date]{padding:10px 5px;font-size:14px}}

/* Searchable patient directory and selection in manual reservations. */
.owner-access{max-width:560px;margin:32px auto}.owner-access .field{margin:20px 0}.owner-controls{display:flex;gap:8px;flex-wrap:wrap}.backup-download{display:inline-block;text-decoration:none;margin:12px 0}#backupDialog{max-width:680px;max-height:92vh;overflow:auto}#backupDialog input[type=file]{font-size:14px}#restoreConfirmation{display:block;margin:18px 0}#ownerLoginError,#backupError{color:#a22b25}
#patientDirectory{max-width:850px;max-height:92vh;overflow:auto}#directoryPatientEditor{max-width:560px;max-height:90vh;overflow:auto}
#directoryPatientEditor .field{margin:18px 0}.directory-toolbar{display:flex;align-items:end;gap:14px;margin:20px 0}.directory-toolbar .field{flex:1;min-width:160px}
.directory-list{max-height:290px;overflow:auto;border-block:1px solid #d5e1e7}.directory-row{display:grid;grid-template-columns:75px 1fr 1fr 1.25fr;gap:12px;align-items:center;text-align:left;width:100%;padding:14px 12px;border:0;border-bottom:1px solid #e1e8ec;background:white;color:#213941;overflow-wrap:anywhere}.directory-row:hover,.directory-row[aria-pressed=true]{background:#e8f2f5}.patient-number{font-size:13px;color:#536b74}.patient-email{font-size:13px;color:#536b74}.save-success:not(:empty){background:#eaf6ef;color:#145441;padding:10px 14px;border-radius:8px}.directory-detail-heading{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}#directoryDetail{margin-top:24px;border-top:2px solid #b9d1d9;padding-top:12px;overflow-wrap:anywhere}
.directory-history-row{width:100%;text-align:left;display:grid;gap:4px;border:0;border-bottom:1px solid #d5e1e7;padding:14px 8px;background:white;color:var(--brand);overflow-wrap:anywhere}.directory-history-row:hover{background:#f0f7f9}.directory-history-row span{font-size:13px;color:#536b74}
#directoryError,#directoryEditError{color:#a22b25}.directory-duplicate:not(:empty){background:#fff5df;padding:12px;border-radius:6px;font-size:14px}
.email-actions{margin-top:20px;padding:14px;background:#f1f7f9;border:1px solid #cfdee4;border-radius:10px}.email-actions h3{margin:0 0 8px}.email-actions>p{overflow-wrap:anywhere}.email-actions>div{display:flex;gap:8px;flex-wrap:wrap}.email-actions button{font-size:13px}
#emailTemplateEditor{max-width:820px;max-height:94vh;overflow:auto}#emailTemplateEditor .field{margin:16px 0}.email-template-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}.email-template-tabs [aria-pressed=true]{background:var(--brand);color:#fff}#emailTemplateBody{min-height:440px;white-space:pre-wrap;font-family:inherit;line-height:1.6}#emailTemplateStatus:not(:empty){padding:10px 14px;background:#edf7f1;border-radius:8px}#emailTemplateStatus.editor-error{background:#fff1ed;color:#a22b25}
.patient-mode-controls{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}.patient-mode-controls [aria-pressed=true]{background:var(--brand);color:white}.patient-candidates{display:grid;gap:6px;max-height:220px;overflow:auto;margin:8px 0 12px}.patient-candidate{display:grid;gap:2px;width:100%;border:1px solid #c4d7df;border-radius:8px;padding:10px 14px;text-align:left;background:#f4f9fb;color:#213941;overflow-wrap:anywhere}.patient-candidate:hover{background:#e1eff3}.patient-candidate span{font-size:13px;color:#536b74}.selected-patient{background:#eaf5ef;border:1px solid #b4d6c2;border-radius:8px;padding:12px 16px;margin-top:18px}.selected-patient p{margin:0 0 8px;white-space:pre-wrap;overflow-wrap:anywhere;font-weight:bold}#manualCreatePatient{font-size:14px}
#visitRecordEditor{max-width:560px;max-height:90vh;overflow:auto}#visitRecordEditor .field{margin:18px 0}#visitRecordEditor select,#visitRecordEditor input{font:inherit;padding:10px;border:1px solid #b9ccd6;border-radius:8px;background:white}#completedVisitFields{display:grid;grid-template-columns:1fr 1fr;gap:16px}#visitRecordError{color:#a22b25}
#analyticsDashboard{width:min(1280px,calc(100% - 24px));max-width:none;max-height:94vh;overflow:auto;padding:24px}.analytics-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:18px 0}.analytics-toolbar input{font:inherit;padding:9px;border:1px solid #b9ccd6;border-radius:7px}.analytics-note{background:#eef5f7;padding:10px 14px;border-radius:8px}.analytics-cards{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:12px;margin:16px 0}.analytics-card{display:flex;flex-direction:column;gap:5px;background:#fff;border:1px solid #d7e2e7;border-radius:10px;padding:16px}.analytics-card>span{font-size:13px;color:#536b74}.analytics-card>strong{font-size:26px;color:var(--brand)}.analytics-card>small{color:#61747d}.analytics-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.analytics-panel{border:1px solid #d7e2e7;border-radius:10px;padding:18px;margin:16px 0;background:#fff}.analytics-panel h3{margin-top:0}.analytics-panel #continuationMetrics{display:grid;grid-template-columns:1fr 1fr;gap:12px}.analytics-table-wrap{overflow:auto}.analytics-table{width:100%;border-collapse:collapse;font-size:14px}.analytics-table th,.analytics-table td{padding:10px;border-bottom:1px solid #d7e2e7;text-align:right;white-space:nowrap}.analytics-table th:first-child,.analytics-table td:first-child{text-align:left}@media(max-width:850px){.analytics-cards{grid-template-columns:repeat(2,1fr)}.analytics-grid{grid-template-columns:1fr}}@media(max-width:520px){#analyticsDashboard{padding:14px}.analytics-cards{grid-template-columns:1fr 1fr;gap:8px}.analytics-card{padding:12px}.analytics-card>strong{font-size:21px}#completedVisitFields{grid-template-columns:1fr}}
#visitListDialog{width:min(1380px,calc(100% - 24px));max-width:none;max-height:94vh;overflow:auto;padding:24px}.visit-list-toolbar{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin:18px 0}.visit-list-toolbar label{display:grid;gap:4px;font-weight:bold;font-size:14px}.visit-list-toolbar input,.visit-list-toolbar select{font:inherit;padding:9px;border:1px solid #b9ccd6;border-radius:7px;background:white}.visit-list-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));border:1px solid #d7e2e7;margin:16px 0}.visit-list-summary p{display:flex;justify-content:space-between;gap:10px;margin:0;padding:12px;border-right:1px solid #d7e2e7}.visit-list-table th,.visit-list-table td{text-align:left}.visit-list-table tbody tr{cursor:pointer}.visit-list-table tbody tr:hover,.visit-list-table tbody tr:focus{background:#eef7f9;outline:2px solid var(--brand);outline-offset:-2px}#visitListError{color:#a22b25}@media(max-width:600px){#visitListDialog{padding:14px}.visit-list-toolbar{align-items:stretch}.visit-list-toolbar label{width:calc(50% - 8px)}.visit-list-toolbar button{flex:1}.visit-list-summary{grid-template-columns:1fr 1fr}}
.trend-legend{display:flex;gap:18px;font-size:13px}.trend-legend span:before{content:'';display:inline-block;width:12px;height:8px;margin-right:5px;background:#2e78b9}.trend-legend span+span:before{background:#e7b55b}.sales-trend{display:grid;gap:7px;margin-top:14px;max-height:360px;overflow:auto}.trend-row{display:grid;grid-template-columns:48px minmax(120px,1fr) 210px;gap:10px;align-items:center;font-size:12px}.trend-row>div{display:grid;gap:2px}.trend-row i{display:block;height:8px;min-width:1px;border-radius:4px}.trend-actual{background:#2e78b9}.trend-planned{background:#e7b55b}.trend-row small{text-align:right}@media(max-width:600px){.trend-row{grid-template-columns:40px 1fr}.trend-row small{grid-column:2;text-align:left}}
.breakdown-list p{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #e1e8ec;padding:8px 0;margin:0}.breakdown-list strong{white-space:nowrap}#cancelCheck .field{margin:14px 0}#cancelCheck select{font:inherit;width:100%;padding:10px;border:1px solid #b9ccd6;border-radius:8px;background:white}
@media(max-width:600px){#patientDirectory,#directoryPatientEditor{padding:20px}.directory-toolbar{align-items:stretch;flex-direction:column}.directory-row{grid-template-columns:65px 1fr;gap:4px 10px}.directory-row>span:not(.patient-number),.directory-row>strong{grid-column:2}.patient-mode-controls button{font-size:14px;padding:8px 12px}}
.reservation-access{margin:1rem auto;padding:1rem;max-width:34rem;border:2px solid #b8d8d3;border-radius:12px;background:#f4fbf9}.reservation-access strong{font-size:1.25rem;letter-spacing:.08em;overflow-wrap:anywhere}.audit-entry{padding:.8rem 0;border-bottom:1px solid #dbe4e2}.audit-entry p{margin:.35rem 0 0}#auditEntries{max-height:55vh;overflow:auto}

#deliveryReview button,#deliveryReview select{min-height:44px;margin:4px 4px 4px 0}#deliveryReview section label{display:flex;gap:8px;align-items:flex-start}#deliveryReview input[type=checkbox]{width:20px;height:20px;flex:none;margin-top:3px}#deliveryReview h3{overflow-wrap:anywhere}

/* A completed visit uses one color across all treatment menus. */
.appointment.is-completed,.admin-list-row.is-completed{background:#e5e7eb;border-color:#c4c9d0;border-left:4px solid #7b8491;color:#374151}
.appointment.is-completed>span:last-child{font-size:11px}
.admin-list-row.is-completed{padding-left:12px;padding-right:12px}
.legend-completed:before{content:"";display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:6px;background:#e5e7eb;border:1px solid #7b8491}

/* Weekly period selection with an optional direct date jump. */
.date-controls .week-picker-field{display:flex;align-items:center;gap:8px;max-width:100%}
.week-picker-field select{font:inherit;font-size:14px;padding:10px 28px 10px 10px;border:1px solid #b6ccd6;border-radius:7px;color:#213941;background:white;min-width:275px;max-width:100%}
.date-controls .date-jump-toggle{font-size:13px;padding:9px 12px}
.date-controls [hidden]{display:none!important}
@media(max-width:760px){.date-controls .week-picker-field{width:100%}.week-picker-field select{flex:1;min-width:0}.date-controls .date-jump-field{width:auto}}

#patientDirectory.customer-workspace{max-width:1400px;width:calc(100% - 32px)}
.customer-workspace .directory-list{max-height:260px}
.customer-table-scroll{max-width:100%;overflow:auto}
.customer-table{width:100%;border-collapse:collapse;font-size:14px;text-align:left}
.customer-table th{position:sticky;top:0;background:#edf4f7;color:#345561;white-space:nowrap;z-index:1}
.customer-table th,.customer-table td{padding:10px 12px;border-bottom:1px solid #dce5e9;vertical-align:top}
.customer-table td{min-width:90px;max-width:280px;overflow-wrap:anywhere}
.customer-table tbody tr:nth-child(even){background:#f7fafb}
.customer-name{display:block;min-width:210px;max-width:290px;border:0;background:transparent;color:var(--brand);text-align:left;padding:0;text-decoration:underline;overflow-wrap:anywhere}
.customer-name[aria-pressed=true]{font-weight:bold;background:#deedf2}
.customer-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;background:#dce5e9;border:1px solid #dce5e9;margin:14px 0 20px}
.customer-facts>div{display:grid;gap:4px;background:white;padding:10px 14px;overflow-wrap:anywhere}
.customer-facts strong{font-size:12px;color:#59717a}
@media(max-width:760px){#patientDirectory.customer-workspace{width:calc(100% - 16px);padding:12px}.customer-facts{grid-template-columns:1fr 1fr}.customer-table th,.customer-table td{padding:8px}.customer-workspace .directory-list{max-height:210px}}
.customer-detail-columns{display:grid;grid-template-columns:300px minmax(0,1fr);gap:24px}
.customer-profile .customer-facts{grid-template-columns:1fr}
.customer-profile p{margin:4px 0;overflow-wrap:anywhere}
.customer-visits{min-width:0}.customer-visits h3:first-child{margin-top:0}
#legacyHistory .customer-table-scroll,#directoryHistory{max-height:410px;overflow:auto}
@media(max-width:760px){.customer-detail-columns{grid-template-columns:1fr;gap:16px}.customer-profile .customer-facts{grid-template-columns:1fr 1fr}}
/* Customer search, profile and next booking */
.customer-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.customer-other-actions{position:relative;font-size:13px}.customer-other-actions summary{cursor:pointer;padding:8px}.customer-other-actions button{margin-top:6px}
.customer-upcoming{padding:16px;background:#edf6f2;border:1px solid #c7ded2;border-radius:12px;margin-bottom:20px}
.customer-workspace .directory-row{display:block;width:100%;text-align:left;line-height:1.6;white-space:normal;overflow-wrap:anywhere;padding:12px}
.customer-workspace .directory-toolbar select{font:inherit;min-height:48px;border:1px solid #cedbdf;border-radius:8px;padding:8px;background:white}
#directoryUpcoming{max-height:220px;overflow:auto}#directoryDetail{margin-top:20px;border-top:2px solid #dce5e9;padding-top:18px;outline:none}
.customer-profile .customer-facts span{white-space:pre-wrap}#directoryPatientEditor textarea{width:100%;box-sizing:border-box;font:inherit}
@media(max-width:760px){.customer-actions{width:100%}.customer-actions>.primary{width:100%}.customer-profile .customer-facts{grid-template-columns:1fr}.customer-workspace .directory-toolbar{flex-wrap:wrap}}

/* Patient visit and cancellation tables */
.patient-history-table{margin-bottom:14px;max-height:480px;overflow:auto}
.patient-history-table .customer-table th,.patient-history-table .customer-table td{border:1px solid #d9e1ed;padding:9px 10px;white-space:nowrap;min-width:0}
.patient-history-table .customer-table th{background:#f4f5fa}
.patient-history-totals{white-space:pre-line;line-height:1.8;font-weight:600}
.patient-history-date{border:0;background:transparent;padding:0;color:var(--brand);text-decoration:underline;font:inherit;cursor:pointer}

/* Daily chart access: large touch targets and flexible tablet layout. */
.day-charts{width:min(850px,94vw);max-width:94vw;max-height:90dvh;overflow:auto}
.day-charts-controls{display:flex;flex-wrap:wrap;gap:12px;align-items:end}
.day-charts-controls .field{margin:0;min-width:180px}
.day-charts-rows{display:grid;gap:12px}
.day-chart-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px;border:1px solid #d2e3e7;border-radius:12px}
.day-chart-row p{margin:6px 0 0}.day-chart-row button{min-height:48px;flex-shrink:0}
#openDayCharts{min-height:48px;white-space:nowrap}
@media(max-width:600px){.day-chart-row{align-items:stretch;flex-direction:column}.day-chart-row button{width:100%}}
