body{background:#f8f7fa}.patient-shell{max-width:1000px;margin:auto;padding:24px}.patient-shell header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 0 30px}.patient-shell header strong{font-size:20px}.patient-shell .card{margin:20px 0}.patient-tabs{display:flex;gap:10px;overflow:auto;margin:24px 0}.patient-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 0;border-bottom:1px solid #eee}.patient-row small{display:block;margin:5px 0}.patient-balance{display:flex;gap:30px}.patient-balance strong{display:block;font-size:24px}.patient-form fieldset{border:1px solid #ddd4df;border-radius:12px;padding:18px;margin:18px 0}.patient-form label{display:block;padding:8px 0}.patient-form input[type=radio],.patient-form input[type=checkbox]{margin-right:10px;width:20px;height:20px;vertical-align:middle}.patient-form textarea{width:100%;min-height:90px;padding:12px;font:inherit}.patient-form .modal-footer{position:sticky;bottom:0;background:white}.patient-dialog{width:min(760px,95vw);max-height:92dvh;padding:0;border:0;border-radius:16px}.patient-shell h1{font-size:32px}#patient-dialog::backdrop{background:#231a2a70}.patient-dialog .modal-header{position:sticky;top:0;background:white;z-index:2}@media(max-width:600px){.patient-shell{padding:14px}.patient-shell h1{font-size:28px}.patient-row{align-items:flex-start;flex-wrap:wrap}.patient-dialog{width:100%;max-height:100dvh;border-radius:0;margin:0;height:100dvh}.patient-tabs .btn{white-space:nowrap}.patient-balance{gap:20px}}
.survey-patient-form .modal-footer{display:flex;gap:12px;flex-wrap:wrap}.survey-patient-form .modal-footer .btn{min-height:44px;flex:1}.survey-patient-form .modal-body{overflow-wrap:anywhere}
.survey-patient-form .survey-scale label{display:flex;align-items:center;justify-content:center;padding:8px}.survey-patient-form .survey-scale input[type=radio]{width:100%;height:100%;margin:0}@media(max-width:600px){.patient-dialog{width:100vw;max-width:100vw;box-sizing:border-box}}
.survey-patient-form .survey-scale input[type=radio],.survey-patient-form .survey-scale input[type=radio]:disabled{opacity:0}@media(max-width:600px){#patient-dialog.patient-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;left:0;right:0;margin:0}}
.patient-shell{max-width:1100px}.patient-tabs{flex-wrap:wrap;overflow:visible;gap:8px;margin:24px 0}.patient-tabs .btn{min-height:44px}.patient-tabs [aria-current=page]{box-shadow:0 0 0 2px #fff,0 0 0 4px #a33179}.patient-shell footer{padding:28px 0;color:#76657a;font-size:13px}.patient-next{display:flex;align-items:center;justify-content:space-between;gap:20px;border-left:5px solid #c52987}.patient-next h2{margin:6px 0}.patient-shortcuts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.patient-shortcuts button{position:relative;text-align:left;padding:20px 30px 20px 18px;background:#fff;border:1px solid #d8c5d9;border-radius:14px;color:#392b3c;cursor:pointer;min-height:100px;font:inherit}.patient-shortcuts button:hover{border-color:#b82c81;background:#fff7fc}.patient-shortcuts small{display:block;margin-top:8px;color:#76657a}.patient-shortcuts span{position:absolute;right:15px;top:22px;color:#b82c81}.patient-row{flex-wrap:wrap}.patient-row>span:first-child{flex:1 1 240px}.patient-row-actions{display:flex;gap:10px;flex-wrap:wrap}.patient-shell .btn,.patient-dialog .btn{min-height:44px}.patient-status{display:inline-block;font-size:12px;font-weight:700;background:#f9edf4;color:#8c2869;padding:6px 10px;border-radius:20px;white-space:nowrap}.patient-status.done{background:#e8f4ee;color:#2e6a53}.patient-empty{padding:26px 10px;color:#76657a}.patient-filters{display:flex;gap:12px;flex-wrap:wrap;align-items:end;padding:18px;border:1px solid #e0d2e0;border-radius:12px;background:#fff}.patient-filters label{display:flex;flex:1 1 160px;flex-direction:column;gap:6px;font-size:13px;color:#68526d}.patient-filters input,.patient-filters select{width:100%;min-height:44px;padding:10px;border:1px solid #cdb7d1;border-radius:8px;font:inherit;background:#fff;color:#392b3c;box-sizing:border-box}.patient-shell input:focus-visible,.patient-shell select:focus-visible,.patient-shell button:focus-visible{outline:3px solid #a52e80;outline-offset:3px}.patient-membership{padding:16px 0;border-bottom:1px solid #eee}.patient-invoices small{display:block;margin-top:6px}.patient-dialog .modal-footer{display:flex;gap:12px;justify-content:flex-end;flex-wrap:wrap}.patient-dialog .summary-copy{overflow-wrap:anywhere}.patient-dialog .modal-header h2{font-size:21px}.patient-shell .card{overflow-wrap:anywhere}.patient-shell header strong{overflow-wrap:anywhere}.patient-invoices{min-width:0;width:100%}@media(max-width:800px){.patient-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr))}.patient-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.patient-tabs .btn{white-space:normal}.patient-next{align-items:flex-start;flex-direction:column}.patient-next .btn{width:100%}}@media(max-width:600px){.patient-row>span:first-child{flex-basis:100%}.patient-row-actions{width:100%}.patient-row-actions .btn{flex:1}.patient-invoices thead{display:none}.patient-invoices,.patient-invoices tbody,.patient-invoices tr,.patient-invoices td{display:block;width:100%;box-sizing:border-box}.patient-invoices tr{padding:14px 0;border-bottom:1px solid #ddd}.patient-invoices td{border:0;padding:7px 0}.patient-invoices td:before{content:attr(data-label);display:inline-block;font-size:12px;font-weight:700;color:#76657a;margin-right:12px;min-width:90px}.patient-invoices td:last-child:before{display:none}.patient-shortcuts button{padding:18px 28px 18px 14px}.patient-balance{flex-wrap:wrap}.patient-shell h1{font-size:29px}}
.patient-dialog.invoice-dialog[open]{display:flex;flex-direction:column;overflow:hidden;height:min(920px,92dvh)}.patient-dialog.invoice-dialog>.modal-header,.patient-dialog.invoice-dialog>.modal-footer{flex-shrink:0;background:#fff}.patient-dialog.invoice-dialog>.modal-body{min-height:0;overflow:auto;flex:1}.patient-dialog.invoice-dialog>.modal-footer{border-top:1px solid #e5dbe5}@media(max-width:600px){.patient-dialog.invoice-dialog[open]{height:100dvh;max-height:100dvh}}

.patient-tools{display:flex;justify-content:space-between;gap:14px;align-items:end}.patient-mobile-nav{display:none}.patient-access{max-width:620px}.patient-access .card{padding:28px}.patient-access .btn{margin:6px 6px 6px 0}a[aria-busy=true]{opacity:.6;pointer-events:none}@media(max-width:600px){.patient-mobile-nav{display:flex;flex:1;flex-direction:column;gap:6px}.patient-mobile-nav select{width:100%;min-height:44px;padding:10px;font:inherit;border:1px solid #cdb7d1;border-radius:8px;background:#fff}.patient-tabs{display:none}.patient-tools>.btn{max-width:45%}.patient-access .card{padding:20px}}

.patient-more{position:relative}.patient-more>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;padding:10px 16px;border:1px solid #cdb7d1;border-radius:8px;background:#fff;color:#6d2758;font-weight:600}.patient-more>div{display:flex;gap:8px;flex-wrap:wrap;padding:12px;border:1px solid #e0d2e0;border-radius:10px;background:#fff;margin-top:8px}.patient-more[open]{flex-basis:100%}
@media(max-width:600px){.patient-dialog .invoice-paper table{min-width:0;width:100%}.patient-dialog .invoice-paper th,.patient-dialog .invoice-paper td{padding:8px 4px;overflow-wrap:anywhere;white-space:normal;font-size:11px}.patient-dialog .invoice-paper th:last-child,.patient-dialog .invoice-paper td:last-child{white-space:nowrap;width:74px}}

/* Patient portal: consistent branding, compact navigation and vertical phone layouts. */
.patient-shell{max-width:1120px;padding:28px 24px 48px;color:#302c33}.patient-shell header{padding:8px 0 26px;border-bottom:1px solid #e7e2e6;margin-bottom:28px}.patient-brand{display:flex;flex-direction:column;gap:7px;text-decoration:none;color:#736873;max-width:260px;min-width:0}.patient-brand img{display:block;width:230px;max-width:100%;height:auto}.patient-brand span{font-size:12px;letter-spacing:.04em}.patient-shell .card{background:#fff;border:1px solid #e7e1e6;border-radius:16px;box-shadow:0 2px 5px #34253303;padding:26px}.patient-shell h2{font-size:21px;line-height:1.35}.patient-shell p{line-height:1.6}.patient-shell .patient-status{max-width:100%;white-space:normal}.patient-shell .btn{text-decoration:none}.patient-shell .patient-tabs{align-items:center}.patient-more[open]{flex:0 0 auto}.patient-more>summary{gap:16px;list-style:none}.patient-more>summary::-webkit-details-marker{display:none}.patient-more>div{position:absolute;right:0;top:100%;z-index:12;width:230px;max-width:calc(100vw - 40px);display:grid;grid-template-columns:minmax(0,1fr);gap:5px;padding:8px;box-shadow:0 12px 30px #34253320}.patient-more>div>.btn{text-align:left;justify-content:flex-start;border-color:transparent}.patient-appointment-intro{display:flex;align-items:center;justify-content:space-between;gap:24px}.patient-appointment-intro h2{margin:0 0 6px}.patient-appointment-intro p{margin:0;color:#736873}.patient-appointment-intro>.btn{flex-shrink:0}.patient-row>.paperwork-form-title{flex:1 1 300px;min-width:0}.patient-row b{font-size:15px;line-height:1.5}.patient-row small{line-height:1.5;color:#756c77}.patient-row{padding:20px 0;gap:16px}.patient-shell>*{min-width:0}.patient-shell .table-scroll{max-width:100%}.patient-shell footer{margin-top:32px;padding-top:22px;color:#817783;font-size:12px;border-top:1px solid #ece7eb}
.invoice-logo{display:block;width:235px;max-width:100%;height:auto}.invoice-brand-caption{display:block;font-size:11px;letter-spacing:.14em;color:#776b77;margin-top:7px}.invoice-paper{background:#fff;padding:30px;color:#302c33}.invoice-brand{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;border-bottom:2px solid #b52c79;padding-bottom:24px}.invoice-brand>div:last-child{text-align:right}.invoice-brand h2{font-size:27px;margin:0 0 10px}.invoice-location{color:#796d7a;font-size:13px;line-height:1.6;margin:18px 0}.invoice-parties{display:grid;grid-template-columns:1fr 1fr;gap:25px;padding:16px 0 24px}.invoice-parties h3{font-size:18px;margin:7px 0}.invoice-parties p{font-size:13px;overflow-wrap:anywhere}.invoice-parties small{font-size:10px;letter-spacing:.12em;color:#796d7a}.invoice-parties dl{display:grid;grid-template-columns:1fr 1fr;gap:10px;font-size:12px;margin:0}.invoice-parties dt{color:#796d7a}.invoice-parties dd{text-align:right;margin:0;overflow-wrap:anywhere}.invoice-paper table{width:100%;border-collapse:collapse;min-width:0}.invoice-paper th{background:#f5f2f5;font-size:11px;color:#726474;text-align:left;padding:12px 10px}.invoice-paper td{padding:15px 10px;border-bottom:1px solid #ece7eb;font-size:13px}.invoice-paper th:last-child,.invoice-paper td:last-child{text-align:right}.invoice-totals{width:360px;max-width:100%;margin:24px 0 28px auto}.invoice-totals>div{display:flex;justify-content:space-between;gap:20px;padding:9px 0;font-size:13px}.invoice-totals>div:last-child{border-top:2px solid #e7dbe3;font-size:17px;margin-top:8px;padding-top:16px}.invoice-paper footer{text-align:center;border-top:1px solid #e7e1e6;padding-top:20px;color:#817783;font-size:11px}
@media(max-width:800px){.patient-more>div{left:0;right:auto}.patient-appointment-intro{align-items:flex-start}}
@media(max-width:600px){.patient-shell{padding:18px 16px 32px;width:100%;box-sizing:border-box}.patient-shell .card{padding:20px 16px}.patient-shell header{gap:16px}.patient-brand{max-width:195px}.patient-brand img{width:190px}.patient-shell h1{font-size:27px}.patient-tools{align-items:stretch}.patient-tools>*{min-width:0}.patient-row{display:flex;flex-direction:column;align-items:stretch;gap:12px}.patient-row>.paperwork-form-title{flex-basis:auto;width:100%}.patient-row>.btn{width:100%;box-sizing:border-box}.patient-row>.patient-status{align-self:flex-start}.patient-row-actions{gap:8px}.patient-row-actions .btn{white-space:normal;min-width:0}.patient-appointment-intro{flex-direction:column;gap:18px}.patient-appointment-intro>.btn{width:100%;box-sizing:border-box;text-align:center}.patient-filters{padding:14px}.patient-filters label{flex-basis:100%;min-width:0}.patient-shell .table-scroll{overflow:visible}.patient-shell table{min-width:0;table-layout:fixed;width:100%}.patient-shell th,.patient-shell td{overflow-wrap:anywhere;white-space:normal}.invoice-paper{padding:16px 4px}.invoice-brand{gap:18px}.invoice-logo{width:170px}.invoice-brand h2{font-size:20px}.invoice-parties{grid-template-columns:minmax(0,1fr);gap:20px}.invoice-parties dl{max-width:100%}.invoice-paper .table-scroll{overflow:visible}.invoice-totals{width:100%}.patient-dialog .invoice-paper th,.patient-dialog .invoice-paper td{padding:10px 5px;font-size:11px;overflow-wrap:anywhere}.patient-dialog .invoice-paper th:last-child,.patient-dialog .invoice-paper td:last-child{width:auto}.patient-shortcuts{gap:10px}.patient-shortcuts button{min-width:0}}
.patient-more>summary::after{display:none}.patient-offer small{display:block;line-height:1.5;color:#76657a;margin-top:12px}

/* Per-practice portal colors; control text stays readable on light and dark brands. */
.patient-shell .btn.primary,.patient-dialog .btn.primary{background:var(--portal-primary,#b92d7a);border-color:var(--portal-primary,#b92d7a);color:var(--portal-on-primary,#fff)}
.patient-shell .patient-tabs>.btn.primary{outline-color:var(--portal-primary,#b92d7a)}
.patient-shell .btn.secondary,.patient-shell .patient-more>summary{color:var(--portal-link,#6d2758)}
.patient-shell .patient-shortcuts>button:hover,.patient-shell .btn.secondary:hover{border-color:var(--portal-accent,#eb2c8a);background:var(--portal-soft,#b92d7a12)}
.patient-shell .patient-shortcuts>button:after,.patient-shell .patient-shortcuts>button>span:last-child{color:var(--portal-link,#6d2758)}
.patient-shell button:focus-visible,.patient-shell a:focus-visible,.patient-shell input:focus-visible,.patient-shell select:focus-visible{outline-color:var(--portal-link,#6d2758)}
.patient-shell .patient-status:not(.done){color:var(--portal-link,#6d2758);background:var(--portal-soft,#b92d7a12)}
