/* Patient editor — current Nodly visual language. Scoped to this modal only. */
body.authenticated .modal.patient-edit-modal{
  box-sizing:border-box;width:min(980px,calc(100vw - 32px));height:min(90dvh,860px);max-height:calc(100dvh - 32px);
  padding:0;overflow:hidden;border:1px solid #d8dee8;border-radius:24px;background:#fffdf8;
  box-shadow:0 28px 80px rgba(24,36,57,.24);
}
body.authenticated .patient-edit-modal>#modalContent{display:flex;flex:1;min-width:0;min-height:0;height:100%}
body.authenticated .patient-edit-modal .patient-edit-shell{display:flex;flex:1;min-width:0;min-height:0;flex-direction:column;overflow:hidden;background:#f5f2eb}

body.authenticated .patient-edit-modal .modal-close{
  position:absolute;z-index:30;top:17px;right:17px;display:grid;width:40px;height:40px;place-items:center;padding:0;
  border:1px solid #d8dee8;border-radius:13px;background:#fffdf8;color:#405f8f;font:500 22px/1 Inter,sans-serif;
  box-shadow:0 5px 14px rgba(31,45,68,.08);transform:none!important;
}
body.authenticated .patient-edit-modal .modal-close:hover{border-color:#aebbd0;background:#eef2f8;color:#2f466e}
body.authenticated .patient-edit-modal .modal-close:focus-visible{outline:3px solid rgba(64,95,143,.22);outline-offset:2px}

body.authenticated .patient-edit-modal .patient-edit-head{
  position:relative;display:flex;flex:none;align-items:center;justify-content:space-between;gap:24px;min-height:128px;
  padding:24px 78px 24px 30px;border-bottom:1px solid #d8dee8;background:#fffdf8!important;color:#25334a;box-shadow:none;overflow:hidden;
}
body.authenticated .patient-edit-modal .patient-edit-head:before{
  position:absolute;inset:0 auto 0 0;width:5px;background:#405f8f;content:"";
}
body.authenticated .patient-edit-modal .patient-edit-head:after{
  position:absolute;right:104px;bottom:-70px;width:205px;height:132px;border:1px solid rgba(64,95,143,.14);
  border-radius:57% 43% 64% 36%/44% 61% 39% 56%;background:rgba(226,199,118,.13);content:"";transform:rotate(-8deg);pointer-events:none;
}
body.authenticated .patient-edit-modal .patient-edit-head-copy{position:relative;z-index:1;display:grid;grid-template-columns:54px minmax(0,1fr);align-items:center;gap:15px;min-width:0}
body.authenticated .patient-edit-modal .patient-edit-head-bloop{
  position:relative;display:grid;width:52px;height:52px;place-items:center;border:1px solid #b8c4d7;
  border-radius:43% 57% 48% 52%/55% 43% 57% 45%;background:#e9eef7;color:#405f8f;
}
body.authenticated .patient-edit-modal .patient-edit-head-bloop:after{position:absolute;right:-5px;bottom:5px;width:9px;height:9px;border:3px solid #fffdf8;border-radius:50%;background:#d4ae4f;content:""}
body.authenticated .patient-edit-modal .patient-edit-head-bloop svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
body.authenticated .patient-edit-modal .patient-edit-head .eyebrow{color:#405f8f!important;font-size:10px!important;font-weight:800;letter-spacing:.12em}
body.authenticated .patient-edit-modal .patient-edit-head h2{margin:5px 0 5px;color:#25334a!important;font-family:"DM Serif Display",serif;font-size:29px;font-weight:400;line-height:1.08;letter-spacing:-.02em}
body.authenticated .patient-edit-modal .patient-edit-head p{margin:0;color:#5d6878!important;font-size:13px!important;line-height:1.5!important}
body.authenticated .patient-edit-modal .patient-edit-status{
  position:relative;z-index:1;display:inline-flex;align-items:center;gap:8px;margin:0;padding:7px 11px;border:1px solid #cde1d8;
  border-radius:999px;background:#edf5f1;color:#256956;font-size:11px;font-weight:750;white-space:nowrap;
}
body.authenticated .patient-edit-modal .patient-edit-status>i{width:8px;height:8px;border-radius:50%;background:#358166;box-shadow:0 0 0 4px rgba(53,129,102,.1)}

body.authenticated .patient-edit-modal .patient-edit-form{display:flex;flex:1;min-width:0;min-height:0;flex-direction:column}
body.authenticated .patient-edit-modal .patient-edit-scroll{
  flex:1;min-width:0;min-height:0;padding:18px 26px 24px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;
  scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#8f9db2 transparent;
}
body.authenticated .patient-edit-modal .patient-edit-scroll::-webkit-scrollbar{width:9px}
body.authenticated .patient-edit-modal .patient-edit-scroll::-webkit-scrollbar-track{background:transparent}
body.authenticated .patient-edit-modal .patient-edit-scroll::-webkit-scrollbar-thumb{border:2px solid #f5f2eb;border-radius:99px;background:#8f9db2}

body.authenticated .patient-edit-modal .patient-edit-section{
  position:relative;margin:0 0 14px;padding:20px 21px 21px 24px;border:1px solid #d8dee8;border-left:3px solid #d3b35e;
  border-radius:17px;background:#fff;box-shadow:0 8px 22px rgba(31,45,68,.045);
}
body.authenticated .patient-edit-modal .patient-edit-section:last-child{margin-bottom:0}
body.authenticated .patient-edit-modal .patient-edit-section-title{display:grid;grid-template-columns:40px minmax(0,1fr);align-items:center;gap:12px;padding:0 0 14px;border-bottom:1px solid #e4e8ee}
body.authenticated .patient-edit-modal .patient-edit-section-icon{
  position:relative;display:grid;width:38px;height:38px;place-items:center;border:1px solid #d3dbea;
  border-radius:44% 56% 49% 51%/55% 44% 56% 45%;background:#edf1f8;color:#405f8f;
}
body.authenticated .patient-edit-modal .patient-edit-section-icon:after{position:absolute;right:-4px;bottom:3px;width:7px;height:7px;border:2px solid #fff;border-radius:50%;background:#d3b35e;content:""}
body.authenticated .patient-edit-modal .patient-edit-section-icon svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
body.authenticated .patient-edit-modal .patient-edit-section-title strong{display:block;color:#27364d;font-size:15px!important;line-height:1.3}
body.authenticated .patient-edit-modal .patient-edit-section-title small{display:block;margin-top:3px;color:#647083;font-size:11.5px!important;line-height:1.45!important}
body.authenticated .patient-edit-modal .patient-edit-section .form-grid{gap:15px 16px;margin-top:17px}
body.authenticated .patient-edit-modal .form-group{gap:7px}
body.authenticated .patient-edit-modal .form-group label{color:#344156;font-size:12px!important;font-weight:700;line-height:1.35}
body.authenticated .patient-edit-modal :is(.form-group input,.form-group select,.form-group textarea){
  box-sizing:border-box;width:100%;min-height:46px;padding:11px 13px;border:1px solid #d5dae3;border-radius:11px;background:#fdfcf8;color:#25334a;
  font:500 13px/1.4 Inter,sans-serif;box-shadow:0 1px 0 rgba(31,45,68,.025);transition:border-color .16s ease,box-shadow .16s ease,background-color .16s ease;
}
body.authenticated .patient-edit-modal .form-group textarea{min-height:96px;resize:vertical}
body.authenticated .patient-edit-modal :is(.form-group input,.form-group select,.form-group textarea)::placeholder{color:#8a929e;opacity:1}
body.authenticated .patient-edit-modal :is(.form-group input,.form-group select,.form-group textarea):hover{border-color:#bbc4d2}
body.authenticated .patient-edit-modal :is(.form-group input,.form-group select,.form-group textarea):focus{border-color:#405f8f;background:#fff;box-shadow:0 0 0 3px rgba(64,95,143,.14);outline:0}
body.authenticated .patient-edit-modal .patient-tax-input{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px}
body.authenticated .patient-edit-modal .patient-tax-input .secondary-button{min-height:46px;border-color:#b9c4d5;background:#f4f6fa;color:#334e7b;white-space:nowrap}
body.authenticated .patient-edit-modal [data-cuit-help],body.authenticated .patient-edit-modal .field-help{color:#667286;font-size:11px!important;line-height:1.45!important}
body.authenticated .patient-edit-modal [data-cuit-help].error{color:#a44642;font-weight:650}
body.authenticated .patient-edit-modal .cuit-suggestions{border-color:#d6deea;background:#f5f7fb}
body.authenticated .patient-edit-modal .cuit-suggestions button{border-color:#c3cddd;background:#fff;color:#344e78}
body.authenticated .patient-edit-modal .patient-messaging-permission{border-color:#d9dfe8;background:#f6f8fb}
body.authenticated .patient-edit-modal .patient-messaging-permission strong{color:#2c3a50}
body.authenticated .patient-edit-modal .patient-messaging-permission small{color:#687487!important}

body.authenticated .patient-edit-modal .patient-edit-actions{
  flex:none;display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0;padding:14px 26px calc(14px + env(safe-area-inset-bottom,0px));
  border-top:1px solid #d8dee8;background:rgba(255,253,248,.98);box-shadow:0 -9px 24px rgba(31,45,68,.06);backdrop-filter:blur(8px);
}
body.authenticated .patient-edit-modal .patient-edit-actions>span{color:#657083;font-size:11.5px;line-height:1.4}
body.authenticated .patient-edit-modal .patient-edit-actions>span.error{color:#a44642;font-weight:700}
body.authenticated .patient-edit-modal .patient-edit-actions>div{display:flex;gap:9px}
body.authenticated .patient-edit-modal .patient-edit-actions button{min-width:122px;min-height:44px;border-radius:11px;font-size:12px!important;transform:none!important}
body.authenticated .patient-edit-modal .patient-edit-actions .secondary-button{border:1px solid #cdd4df;background:#fffdf8;color:#3b4658}
body.authenticated .patient-edit-modal .patient-edit-actions .primary-button{min-width:164px;border:1px solid #405f8f;background:#405f8f;color:#fff;box-shadow:0 7px 16px rgba(64,95,143,.18)}
body.authenticated .patient-edit-modal .patient-edit-actions .primary-button:hover{border-color:#33445e;background:#33445e}
body.authenticated .patient-edit-modal .patient-edit-actions button:focus-visible{outline:3px solid rgba(64,95,143,.22);outline-offset:2px}
body.authenticated .patient-edit-modal .patient-edit-actions button:disabled{cursor:wait;opacity:.7}

html[data-nodly-theme="dark"] body.authenticated .modal.patient-edit-modal{border-color:#4b5667;background:#2b313a;box-shadow:0 30px 90px rgba(0,0,0,.42)}
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal .patient-edit-shell,
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal .patient-edit-scroll{background:#242a32}
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal .modal-close{border-color:#566173;background:#323a45;color:#d8e2f2;box-shadow:none}
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal .patient-edit-head{border-color:#4b5667;background:#2b313a!important}
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal .patient-edit-head-bloop{border-color:#697790;background:#3b4658;color:#d9e3f4}
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal .patient-edit-head-bloop:after{border-color:#2b313a}
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal .patient-edit-head .eyebrow{color:#e6ca79!important}
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal .patient-edit-head h2{color:#f5f0e7!important}
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal .patient-edit-head p{color:#c6ced9!important}
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal .patient-edit-status{border-color:#49675f;background:#30433f;color:#cde3dc}
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal .patient-edit-section{border-color:#46505e;border-left-color:#bfa85e;background:#2f363f;box-shadow:none}
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal .patient-edit-section-title{border-color:#47515f}
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal .patient-edit-section-icon{border-color:#5b687d;background:#3a4557;color:#dce5f4}
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal .patient-edit-section-icon:after{border-color:#2f363f}
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal .patient-edit-section-title strong{color:#f3eee5}
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal .patient-edit-section-title small{color:#bdc6d1}
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal .form-group label{color:#d9e0e9}
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal :is(.form-group input,.form-group select,.form-group textarea){border-color:#535e6d;background:#262c34;color:#f2ede5;box-shadow:none}
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal :is(.form-group input,.form-group select,.form-group textarea):focus{border-color:#94a9c9;background:#2b323b;box-shadow:0 0 0 3px rgba(148,169,201,.18)}
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal [data-cuit-help],html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal .field-help{color:#b9c2ce}
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal .patient-tax-input .secondary-button{border-color:#66748a;background:#3a4557;color:#edf2fa}
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal .patient-messaging-permission{border-color:#505b6a;background:#29313a}
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal .patient-messaging-permission strong{color:#f2ede5}
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal .patient-messaging-permission small{color:#bac4d0!important}
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal .patient-edit-actions{border-color:#4b5667;background:rgba(43,49,58,.98);box-shadow:0 -9px 24px rgba(0,0,0,.16)}
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal .patient-edit-actions>span{color:#bcc6d2}
html[data-nodly-theme="dark"] body.authenticated .patient-edit-modal .patient-edit-actions .secondary-button{border-color:#5d697a;background:#323a45;color:#edf1f7}

@media(max-width:760px){
  body.authenticated .modal.patient-edit-modal{width:calc(100vw - 12px);height:calc(100dvh - 12px);max-height:none;border-radius:19px}
  body.authenticated .patient-edit-modal .modal-close{top:13px;right:13px;width:38px;height:38px;border-radius:12px}
  body.authenticated .patient-edit-modal .patient-edit-head{min-height:0;padding:18px 58px 17px 18px}
  body.authenticated .patient-edit-modal .patient-edit-head:after{right:48px;bottom:-78px}
  body.authenticated .patient-edit-modal .patient-edit-head-copy{grid-template-columns:43px minmax(0,1fr);gap:11px}
  body.authenticated .patient-edit-modal .patient-edit-head-bloop{width:42px;height:42px}
  body.authenticated .patient-edit-modal .patient-edit-head-bloop svg{width:21px;height:21px}
  body.authenticated .patient-edit-modal .patient-edit-head h2{font-size:23px!important}
  body.authenticated .patient-edit-modal .patient-edit-head p{margin-top:4px;font-size:12px!important;line-height:1.4!important}
  body.authenticated .patient-edit-modal .patient-edit-status{display:none}
  body.authenticated .patient-edit-modal .patient-edit-scroll{padding:11px!important;overflow-x:hidden!important;overflow-y:auto!important}
  body.authenticated .patient-edit-modal .patient-edit-section{padding:16px 14px 17px 16px!important;border-radius:15px}
  body.authenticated .patient-edit-modal .patient-edit-section-title{grid-template-columns:38px minmax(0,1fr);gap:10px;padding-bottom:12px}
  body.authenticated .patient-edit-modal .patient-edit-section-title strong{font-size:14px!important}
  body.authenticated .patient-edit-modal .patient-edit-section-title small{font-size:11px!important}
  body.authenticated .patient-edit-modal .patient-edit-section .form-grid{grid-template-columns:1fr;gap:13px;margin-top:14px}
  body.authenticated .patient-edit-modal .patient-edit-section .form-group.full{grid-column:auto}
  body.authenticated .patient-edit-modal :is(input,select,textarea){font-size:16px!important}
  body.authenticated .patient-edit-modal .patient-tax-input{grid-template-columns:1fr}
  body.authenticated .patient-edit-modal .patient-tax-input button{width:100%;min-height:44px}
  body.authenticated .patient-edit-modal .patient-edit-actions{display:grid;grid-template-columns:1fr 1.35fr;gap:9px;padding:10px 11px calc(10px + env(safe-area-inset-bottom,0px))!important}
  body.authenticated .patient-edit-modal .patient-edit-actions>span{display:none}
  body.authenticated .patient-edit-modal .patient-edit-actions>div{display:contents}
  body.authenticated .patient-edit-modal .patient-edit-actions button,body.authenticated .patient-edit-modal .patient-edit-actions .primary-button{width:100%;min-width:0;min-height:48px}
}

@media(max-width:420px){
  body.authenticated .patient-edit-modal .patient-edit-head-copy{grid-template-columns:1fr}
  body.authenticated .patient-edit-modal .patient-edit-head-bloop{display:none}
  body.authenticated .patient-edit-modal .patient-edit-head h2{font-size:22px!important}
  body.authenticated .patient-edit-modal .patient-edit-actions{grid-template-columns:.9fr 1.35fr}
  body.authenticated .patient-edit-modal .patient-edit-actions button{padding-inline:9px;white-space:normal}
}

@media(prefers-reduced-motion:reduce){body.authenticated .patient-edit-modal *{scroll-behavior:auto!important;transition:none!important}}
