:root{--cf-primary:#22b3a8;--cf-dark:#142432;--cf-bg:#f4f7f9;--cf-border:#1f2d36;--cf-muted:#6b7785;--cf-white:#fff;--cf-danger:#c0392b;--cf-success:#218c5b;--cf-warning:#b7791f}*{box-sizing:border-box}body{margin:0!important;background:var(--cf-bg)!important;font-family:Montserrat,Arial,sans-serif!important}.cf-app{min-height:100vh;display:flex;color:#172331}.cf-sidebar{position:fixed;inset:0 auto 0 0;width:250px;background:var(--cf-dark);color:#fff;display:flex;flex-direction:column;z-index:50}.cf-brand{height:78px;padding:14px 16px;display:flex;align-items:center;gap:11px;border-bottom:1px solid rgba(255,255,255,.15)}.cf-brand>span{width:42px;height:42px;border-radius:10px;background:var(--cf-primary);display:grid;place-items:center;font-weight:700}.cf-brand b,.cf-brand small{display:block}.cf-brand small{font-size:10px;opacity:.72;margin-top:3px}.cf-close{display:none;margin-left:auto;border:0;background:transparent;color:#fff;font-size:28px}.cf-sidebar nav{padding:12px 9px;overflow:auto}.cf-sidebar nav a{display:flex;align-items:center;gap:11px;color:#dce6eb;text-decoration:none;padding:11px 12px;border-radius:3px;margin:2px 0;font-size:13px;font-weight:500}.cf-sidebar nav a:hover,.cf-sidebar nav a.active{background:var(--cf-primary);color:#fff}.cf-sidebar nav a span{width:20px;text-align:center}.cf-sidebar-foot{margin-top:auto;padding:13px 18px;border-top:1px solid rgba(255,255,255,.12);font-size:11px;opacity:.7}.cf-main{margin-left:250px;width:calc(100% - 250px);min-width:0}.cf-topbar{min-height:78px;background:#fff;border-bottom:1px solid #d7e0e5;display:flex;align-items:center;padding:12px 24px;gap:14px;position:sticky;top:0;z-index:20}.cf-topbar h1{font-size:22px;margin:0;font-weight:600}.cf-topbar p{margin:4px 0 0;color:var(--cf-muted);font-size:12px}.cf-menu{display:none;border:1px solid #ccd7dc;background:#fff;padding:8px 10px;font-size:20px}.cf-top-actions{margin-left:auto}.cf-help{display:inline-block;background:var(--cf-dark);color:#fff!important;text-decoration:none;padding:9px 12px;font-size:12px;border-radius:3px}.cf-content{padding:22px}.cf-loading,.cf-empty{padding:30px;text-align:center;color:var(--cf-muted)}.cf-notice{position:fixed;right:24px;top:90px;background:var(--cf-success);color:#fff;padding:12px 16px;border-radius:4px;z-index:100;box-shadow:0 8px 25px rgba(0,0,0,.16);font-size:13px}.cf-notice.bad{background:var(--cf-danger)}.cf-panel{background:#fff;border:1px solid #bac6cc;padding:18px;margin-bottom:18px}.cf-panel h2,.cf-panel h3{margin:0 0 14px}.cf-panel-head{display:flex;align-items:center;gap:8px;margin-bottom:15px}.cf-panel-head h2{font-size:16px;margin:0}.spacer{flex:1}.cf-btn,.cf-icon-btn,.cf-secondary,.cf-row-actions button,.cf-quick-actions button,.cf-profile-actions button,.cf-training-step button{border:1px solid var(--cf-border);background:var(--cf-primary);color:#fff!important;text-decoration:none;padding:9px 12px;border-radius:3px;font-family:inherit;font-size:12px;font-weight:600;cursor:pointer}.cf-btn.dark{background:var(--cf-dark)}.cf-icon-btn{background:#fff;color:var(--cf-dark)!important}.cf-secondary{background:#fff;color:var(--cf-dark)!important}.cf-cards{display:grid;grid-template-columns:repeat(7,minmax(145px,1fr));gap:12px;margin-bottom:18px}.cf-card{min-height:96px;background:#fff;border:1px solid var(--cf-border);padding:15px;text-align:left;cursor:pointer}.cf-card span{display:block;font-size:11px;color:var(--cf-muted);min-height:31px}.cf-card b{display:block;font-size:23px;margin-top:7px}.cf-two,.cf-procedure-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.cf-quick-actions{display:flex;gap:9px;flex-wrap:wrap}.cf-quick-actions button{background:#fff;color:var(--cf-dark)!important}.cf-table-wrap{overflow:auto}.cf-table{width:100%;border-collapse:collapse;font-size:12px}.cf-table th,.cf-table td{border:1px solid var(--cf-border);padding:10px;vertical-align:top}.cf-table th{background:var(--cf-primary);color:#fff;text-align:left;text-transform:none}.cf-row-actions{display:flex;gap:5px;flex-wrap:wrap}.cf-row-actions button{padding:5px 7px;background:#fff;color:var(--cf-dark)!important;font-size:10px}.cf-modal{position:fixed;inset:0;background:rgba(10,20,28,.62);display:none;align-items:center;justify-content:center;padding:22px;z-index:100}.cf-modal.open{display:flex}.cf-modal-card{background:#fff;width:min(920px,100%);max-height:92vh;overflow:auto;border:1px solid var(--cf-border)}.cf-modal-head{display:flex;align-items:center;padding:15px 18px;border-bottom:1px solid #c8d2d7;position:sticky;top:0;background:#fff;z-index:2}.cf-modal-head h2{font-size:17px;margin:0}.cf-modal-close{margin-left:auto;border:0;background:var(--cf-danger);color:#fff;width:28px;height:28px;border-radius:50%;font-size:20px;line-height:20px}.cf-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:18px}.cf-field{display:flex;flex-direction:column;gap:6px}.cf-field input,.cf-field select,.cf-field textarea,.cf-lookup-search,.cf-lookup-option{font-size:14px;line-height:1.35}.cf-lookup-menu,.cf-lookup-search{font-size:14px}.cf-table td:first-child{white-space:nowrap}.cf-field.full{grid-column:1/-1}.cf-field label{font-size:12px;font-weight:600}.cf-field input,.cf-field select,.cf-field textarea{width:100%;border:1px solid #9baab2;padding:10px;font-family:inherit;font-size:13px;background:#fff}.cf-field textarea{min-height:95px;resize:vertical}.cf-field select[multiple]{min-height:120px}.cf-field small{font-size:10px;color:var(--cf-muted)}.cf-check{display:flex!important;flex-direction:row!important;align-items:center;gap:7px}.cf-check input{width:auto}.cf-form-actions{grid-column:1/-1;text-align:right;padding-top:5px}.cf-items{display:flex;flex-direction:column;gap:7px}.cf-item-row{display:grid;grid-template-columns:2fr .7fr 1fr 38px;gap:7px}.cf-remove{border:0;background:var(--cf-danger);color:#fff;font-size:20px}.cf-profile-head{background:#fff;border:1px solid var(--cf-border);padding:18px;display:flex;gap:16px;align-items:center;margin-bottom:15px}.cf-avatar{width:68px;height:68px;background:var(--cf-primary);color:#fff;border-radius:50%;display:grid;place-items:center;font-size:28px;font-weight:700}.cf-profile-head h2{margin:0}.cf-profile-head p{margin:5px 0;color:var(--cf-muted)}.cf-profile-actions{margin-left:auto;display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.cf-profile-actions button{background:#fff;color:var(--cf-dark)!important}.cf-alerts{display:flex;gap:6px;flex-wrap:wrap}.cf-alerts span{background:#fff3cd;border:1px solid #d5ad4f;padding:5px 7px;font-size:10px}.cf-tabs,.cf-report-tabs{display:flex;gap:5px;overflow:auto;margin-bottom:13px}.cf-tabs button,.cf-report-tabs button{white-space:nowrap;border:1px solid var(--cf-border);background:#fff;padding:9px 11px;font-family:inherit;font-size:12px;cursor:pointer}.cf-tabs button.active,.cf-report-tabs button.active{background:var(--cf-primary);color:#fff}.cf-compare{display:grid;grid-template-columns:1fr 1fr;gap:18px}.cf-compare>div{background:#fff;border:1px solid var(--cf-border);padding:15px}.cf-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px}.cf-gallery a{border:1px solid #bbc8ce;padding:5px;text-decoration:none;color:var(--cf-dark)}.cf-gallery img{width:100%;aspect-ratio:1/1;object-fit:cover;display:block}.cf-gallery small{display:block;padding:5px 2px 1px}.cf-checkline{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #dfe6e9}.cf-checkline b{font-size:11px}.cf-checkline .ok{color:var(--cf-success)}.cf-checkline .pending{color:var(--cf-warning)}.cf-consent-text{padding:15px;border:1px solid #cbd4d8;max-height:240px;overflow:auto;margin:18px}.cf-consent-text+ .cf-field{padding:0 18px}.cf-consent-text~.cf-form-actions{padding:18px}.cf-consent-text~.cf-field canvas{width:100%;height:160px;border:1px solid var(--cf-border);touch-action:none}.cf-training-summary{background:#fff;border:1px solid var(--cf-border);padding:17px;margin-bottom:14px}.cf-training-summary>div{height:9px;background:#dce4e8;margin-top:10px}.cf-training-summary span{height:100%;display:block;background:var(--cf-primary)}.cf-training-list{display:flex;flex-direction:column;gap:8px}.cf-training-step{background:#fff;border:1px solid #abb8bf;padding:13px;display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:12px}.cf-training-step.done{border-left:6px solid var(--cf-success)}.cf-training-step b,.cf-training-step small{display:block}.cf-training-step small{margin-top:5px;color:var(--cf-muted)}.cf-training-step label{font-size:11px}.cf-login{padding:40px;text-align:center;font-family:Montserrat,Arial}
@media(max-width:1280px){.cf-cards{grid-template-columns:repeat(4,1fr)}}
@media(max-width:900px){.cf-sidebar{transform:translateX(-100%);transition:.2s}.cf-sidebar.open{transform:translateX(0)}.cf-close,.cf-menu{display:block}.cf-main{margin-left:0;width:100%}.cf-cards{grid-template-columns:repeat(2,1fr)}.cf-two,.cf-procedure-grid,.cf-compare{grid-template-columns:1fr}.cf-profile-head{align-items:flex-start;flex-wrap:wrap}.cf-profile-actions{margin-left:0;width:100%;justify-content:flex-start}}
@media(max-width:620px){.cf-topbar{padding:10px 12px}.cf-topbar h1{font-size:17px}.cf-topbar p{display:none}.cf-help{display:none}.cf-content{padding:10px}.cf-cards{grid-template-columns:1fr 1fr;gap:8px}.cf-card{min-height:82px;padding:11px}.cf-grid{grid-template-columns:1fr;padding:12px}.cf-field.full,.cf-form-actions{grid-column:auto}.cf-item-row{grid-template-columns:1fr 1fr}.cf-item-row select{grid-column:1/-1}.cf-table thead{display:none}.cf-table,.cf-table tbody,.cf-table tr,.cf-table td{display:block;width:100%}.cf-table tr{border:1px solid var(--cf-border);margin-bottom:10px;background:#fff}.cf-table td{border:0;border-bottom:1px solid #dfe5e8;padding-left:42%;position:relative;min-height:38px}.cf-table td:before{content:attr(data-label);position:absolute;left:9px;top:10px;width:37%;font-weight:600}.cf-profile-head{padding:12px}.cf-avatar{width:52px;height:52px}.cf-training-step{grid-template-columns:1fr}.cf-modal{padding:6px}.cf-modal-card{max-height:98vh}}


/* Collapsible Masters menu */
.cf-menu-group{margin:2px 0;border:0}
.cf-menu-group summary{list-style:none;display:flex;align-items:center;gap:14px;padding:13px 18px;color:#fff;cursor:pointer;font-weight:600}
.cf-menu-group summary::-webkit-details-marker{display:none}
.cf-menu-group summary span{width:18px;text-align:center}
.cf-menu-group summary b{margin-left:auto;font-size:13px;transition:transform .2s ease}
.cf-menu-group[open] summary b{transform:rotate(180deg)}
.cf-submenu{padding:0 8px 6px 26px}
.cf-submenu a{padding:10px 14px!important;font-size:14px}
.cf-submenu a span{width:12px!important}
.cf-settings-panel{max-width:900px}
.cf-row-actions{display:flex;flex-wrap:wrap;gap:6px;min-width:250px}.cf-row-actions button{border:1px solid #122536;background:#fff;color:#122536;padding:6px 9px;border-radius:3px;cursor:pointer;font:inherit;font-size:12px}.cf-row-actions button:hover{background:#122536;color:#fff}.cf-row-actions .cf-action-edit{border-color:#1d6fa5;color:#1d6fa5}.cf-row-actions .cf-action-status{border-color:#b7791f;color:#8a5600}.cf-row-actions .cf-action-delete{border-color:#c5352b;color:#c5352b}.cf-row-actions .cf-action-delete:hover{background:#c5352b;color:#fff}.cf-view-table th{width:34%;text-align:left;background:#f3f6f8;color:#122536}.cf-view-table td{word-break:break-word}@media(max-width:768px){.cf-row-actions{min-width:0}.cf-row-actions button{flex:1 1 auto}}


/* Icon-only action buttons */
.cf-row-actions{display:flex;flex-wrap:wrap;gap:7px;min-width:0;align-items:center}
.cf-row-actions button{width:34px;height:34px;min-width:34px;padding:0!important;display:inline-flex;align-items:center;justify-content:center;border:1px solid #122536;background:#fff;color:#122536!important;border-radius:4px;cursor:pointer;transition:background .15s,color .15s,transform .15s}
.cf-row-actions button svg{width:17px;height:17px;display:block;fill:currentColor;pointer-events:none}
.cf-row-actions button:hover{background:#122536;color:#fff!important;transform:translateY(-1px)}
.cf-row-actions .cf-action-edit{border-color:#1d6fa5;color:#1d6fa5!important}
.cf-row-actions .cf-action-edit:hover{background:#1d6fa5;color:#fff!important}
.cf-row-actions .cf-action-status{border-color:#b7791f;color:#8a5600!important}
.cf-row-actions .cf-action-status:hover{background:#b7791f;color:#fff!important}
.cf-row-actions .cf-action-delete{border-color:#c5352b;color:#c5352b!important}
.cf-row-actions .cf-action-delete:hover{background:#c5352b;color:#fff!important}
.cf-row-actions .cf-action-appointments,.cf-row-actions .cf-action-assessments,.cf-row-actions .cf-action-quotations,.cf-row-actions .cf-action-payments,.cf-row-actions .cf-action-procedures,.cf-row-actions .cf-action-follow-ups,.cf-row-actions .cf-action-invoices,.cf-row-actions .cf-action-procedure-detail{border-color:var(--cf-primary);color:#148c84!important}
.cf-row-actions .cf-action-appointments:hover,.cf-row-actions .cf-action-assessments:hover,.cf-row-actions .cf-action-quotations:hover,.cf-row-actions .cf-action-payments:hover,.cf-row-actions .cf-action-procedures:hover,.cf-row-actions .cf-action-follow-ups:hover,.cf-row-actions .cf-action-invoices:hover,.cf-row-actions .cf-action-procedure-detail:hover{background:var(--cf-primary);color:#fff!important}
.screen-reader-text{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
@media(max-width:768px){.cf-row-actions{min-width:0}.cf-row-actions button{flex:0 0 34px}}

/* ClinicFlow 2.5.3 modal action fixes */
.cf-modal-close{
  margin-left:auto!important;
  flex:0 0 34px!important;
  width:34px!important;
  min-width:34px!important;
  max-width:34px!important;
  height:34px!important;
  min-height:34px!important;
  padding:0!important;
  display:inline-grid!important;
  place-items:center!important;
  border:0!important;
  border-radius:50%!important;
  background:var(--cf-danger)!important;
  color:#fff!important;
  font-size:20px!important;
  font-weight:600!important;
  line-height:1!important;
  opacity:1!important;
  visibility:visible!important;
  box-shadow:none!important;
  cursor:pointer!important;
}
.cf-modal-close:hover,.cf-modal-close:focus{
  background:#a93226!important;
  color:#fff!important;
  opacity:1!important;
  outline:2px solid rgba(192,57,43,.22)!important;
  outline-offset:2px!important;
}
.cf-form-actions .cf-btn,#cf-edit-from-view{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:74px!important;
  background:var(--cf-primary)!important;
  border:1px solid var(--cf-primary)!important;
  color:#fff!important;
  opacity:1!important;
  visibility:visible!important;
  text-shadow:none!important;
  box-shadow:none!important;
}
.cf-form-actions .cf-btn:hover,.cf-form-actions .cf-btn:focus,#cf-edit-from-view:hover,#cf-edit-from-view:focus{
  background:#16988f!important;
  border-color:#16988f!important;
  color:#fff!important;
  opacity:1!important;
}


/* ClinicFlow 2.5.4 header cleanup */
.cf-topbar p,#cf-subtitle{display:none!important}
.cf-top-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.cf-top-actions .cf-icon-btn,.cf-top-actions .cf-btn{margin:0;white-space:nowrap}
.cf-content>.cf-panel>.cf-panel-head:first-child{display:flex}
@media(max-width:620px){
  .cf-topbar{align-items:flex-start;flex-wrap:wrap}
  .cf-top-actions{width:100%;justify-content:flex-end}
}

/* ClinicFlow 2.5.6 universal search */
.cf-search-wrap{
  position:relative;
  display:flex;
  align-items:center;
  width:min(320px,34vw);
  min-width:210px;
  height:42px;
  background:#fff;
  border:1px solid #122536;
  border-radius:4px;
  overflow:hidden;
}
.cf-search-wrap:focus-within{
  border-color:var(--cf-primary);
  box-shadow:0 0 0 2px rgba(32,178,170,.15);
}
.cf-search-wrap svg{
  width:18px;
  height:18px;
  margin-left:12px;
  flex:0 0 18px;
  fill:#657381;
}
.cf-search-wrap input{
  width:100%;
  height:100%;
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  background:transparent!important;
  padding:0 36px 0 9px!important;
  font:inherit;
  color:#122536;
}
.cf-search-wrap input::-webkit-search-cancel-button{display:none}
.cf-search-wrap button{
  position:absolute;
  right:5px;
  top:50%;
  transform:translateY(-50%);
  width:28px;
  height:28px;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  color:#657381;
  font-size:20px;
  line-height:1;
  cursor:pointer;
  opacity:0;
  pointer-events:none;
}
.cf-search-wrap button.show{opacity:1;pointer-events:auto}
.cf-search-wrap button:hover{background:#eef3f5;color:#122536}
@media(max-width:900px){
  .cf-search-wrap{width:260px;min-width:180px}
}
@media(max-width:620px){
  .cf-search-wrap{order:10;width:100%;min-width:100%}
  .cf-top-actions{align-items:stretch}
}

/* ClinicFlow 2.5.7 compact borderless action icons */
.cf-table th,
.cf-table td{
  padding:6px 10px!important;
  line-height:1.25!important;
  vertical-align:middle!important;
}
.cf-table tbody tr{
  height:38px!important;
}
.cf-row-actions{
  display:flex!important;
  align-items:center!important;
  flex-wrap:nowrap!important;
  gap:8px!important;
  min-width:0!important;
  white-space:nowrap!important;
}
.cf-row-actions button{
  width:24px!important;
  min-width:24px!important;
  max-width:24px!important;
  height:24px!important;
  min-height:24px!important;
  padding:0!important;
  margin:0!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:0!important;
  outline:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  transform:none!important;
  cursor:pointer!important;
}
.cf-row-actions button svg{
  width:16px!important;
  height:16px!important;
  display:block!important;
  fill:currentColor!important;
}
.cf-row-actions button:hover,
.cf-row-actions button:focus{
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  transform:scale(1.12)!important;
}
.cf-row-actions .cf-action-view{color:#142432!important}
.cf-row-actions .cf-action-edit{color:var(--cf-primary)!important}
.cf-row-actions .cf-action-status{color:#b7791f!important}
.cf-row-actions .cf-action-delete{color:#c5352b!important}
.cf-row-actions .cf-action-appointments,
.cf-row-actions .cf-action-assessments,
.cf-row-actions .cf-action-quotations,
.cf-row-actions .cf-action-payments,
.cf-row-actions .cf-action-procedures,
.cf-row-actions .cf-action-follow-ups,
.cf-row-actions .cf-action-invoices,
.cf-row-actions .cf-action-procedure-detail{color:var(--cf-primary)!important}
.cf-table th:last-child,
.cf-table td:last-child{
  width:150px!important;
  min-width:150px!important;
}
@media(max-width:620px){
  .cf-table td{padding-top:7px!important;padding-bottom:7px!important}
  .cf-row-actions{gap:10px!important}
  .cf-row-actions button{flex:0 0 24px!important}
}


/* ClinicFlow 2.5.8 refinements */
.cf-row-actions button:hover,.cf-row-actions button:focus,.cf-row-actions button:focus-visible{color:#263746!important;background:transparent!important;outline:none!important;box-shadow:none!important}
.cf-row-actions .cf-action-delete:hover,.cf-row-actions .cf-action-delete:focus{color:#8f1f18!important}
.cf-row-actions .cf-action-status:hover,.cf-row-actions .cf-action-status:focus{color:#704500!important}
.cf-row-actions .cf-action-edit:hover,.cf-row-actions .cf-action-edit:focus,.cf-row-actions .cf-action-appointments:hover,.cf-row-actions .cf-action-assessments:hover,.cf-row-actions .cf-action-quotations:hover,.cf-row-actions .cf-action-payments:hover,.cf-row-actions .cf-action-procedures:hover,.cf-row-actions .cf-action-follow-ups:hover,.cf-row-actions .cf-action-invoices:hover,.cf-row-actions .cf-action-procedure-detail:hover{color:#0c625d!important}
.cf-searchable-lookup{position:relative}.cf-searchable-lookup .cf-native-lookup{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}.cf-searchable-lookup .cf-lookup-search{width:100%;min-height:42px;padding:9px 38px 9px 12px;border:1px solid #aab6c0;border-radius:4px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'%3E%3Cpath fill='%23334455' d='m7 10 5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 12px center;cursor:text}.cf-searchable-lookup .cf-lookup-search:focus{border-color:var(--cf-primary);box-shadow:0 0 0 1px var(--cf-primary);outline:none}.cf-searchable-lookup .cf-lookup-search:disabled{background-color:#edf1f4;color:#8a959e;cursor:not-allowed}.cf-lookup-menu{display:none;position:absolute;z-index:10020;left:0;right:0;top:calc(100% + 3px);max-height:220px;overflow:auto;background:#fff;border:1px solid #d6dde2;border-radius:4px;box-shadow:0 10px 24px rgba(18,38,51,.12)}.cf-searchable-lookup.open .cf-lookup-menu{display:block}.cf-lookup-option{display:block;width:100%;padding:10px 12px;border-bottom:1px solid #edf2f6;background:#fff;color:#182b3a;text-align:left;cursor:pointer}.cf-lookup-option:last-child{border-bottom:0}.cf-lookup-option:hover,.cf-lookup-option:focus,.cf-lookup-option.selected{background:#f8fbfd;color:#0c625d;outline:none}.cf-lookup-empty{padding:10px 12px;color:#74828d}

/* ClinicFlow 2.5.9 searchable dropdowns use one integrated input only. */

/* ClinicFlow 2.6.0 form searchable lookups */
.cf-lookup-filter{
  display:flex;
  align-items:center;
  gap:8px;
}
.cf-lookup-filter .cf-lookup-search-single{
  width:100%;
  flex:1 1 auto;
  min-height:42px;
  border:1px solid #aab6c0;
  border-radius:4px;
  background:#fff;
  color:#122536;
  font-family:inherit;
  font-size:14px;
  line-height:1.25;
  padding:9px 12px;
}
.cf-lookup-filter .cf-lookup-search-single:focus{
  border-color:var(--cf-primary);
  outline:none;
  box-shadow:0 0 0 1px var(--cf-primary);
}
.cf-lookup-filter .cf-lookup-add{
  flex:0 0 42px;
  width:42px;
  min-height:42px;
  border:1px solid var(--cf-primary);
  border-radius:4px;
  background:#fff;
  color:var(--cf-primary);
  font-size:20px;
  font-weight:700;
  line-height:1;
  cursor:pointer;
}
.cf-lookup-filter .cf-lookup-add:hover,.cf-lookup-filter .cf-lookup-add:focus{
  background:var(--cf-primary);
  color:#fff;
  outline:none;
}

.cf-multi-dropdown{
  position:relative;
}
.cf-multi-dropdown .cf-multi-toggle{
  width:100%;
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:0 12px;
  border:1px solid #aab6c0;
  border-radius:4px;
  background:#fff;
  color:#122536;
  cursor:pointer;
  font-family:inherit;
  font-size:14px;
  line-height:1.25;
  font-weight:400;
}
.cf-multi-dropdown .cf-multi-toggle:hover,
.cf-multi-dropdown .cf-multi-toggle:focus,
.cf-multi-dropdown .cf-multi-toggle:focus-visible{
  background:#fff!important;
  color:#122536!important;
  border-color:#aab6c0;
  outline:none;
  box-shadow:none;
}
.cf-multi-dropdown .cf-multi-toggle b{
  font-size:14px;
  line-height:1;
  color:#657381;
}
.cf-multi-dropdown .cf-multi-caret{
  margin-left:auto;
  font-size:14px;
  line-height:1;
  color:#657381;
  pointer-events:none;
}
.cf-multi-dropdown.open .cf-multi-toggle{
  border-color:#aab6c0;
  box-shadow:none;
}
.cf-multi-dropdown .cf-multi-menu{
  display:none;
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 4px);
  z-index:50;
  background:#fff;
  border:1px solid #d7e0e5;
  border-radius:8px;
  box-shadow:0 12px 30px rgba(18,36,50,.14);
  padding:10px;
}
.cf-multi-dropdown.open .cf-multi-menu{
  display:block;
}
.cf-multi-search{
  width:100%;
  min-height:38px;
  padding:8px 10px;
  border:1px solid #d7e0e5;
  border-radius:4px;
  background:#fff;
  color:#122536;
  font-family:inherit;
  font-size:14px;
  line-height:1.25;
  margin-bottom:8px;
}
.cf-multi-search:focus{
  outline:none;
  border-color:#aab6c0;
  box-shadow:none;
}
.cf-multi-lookup-list{
  display:grid;
  gap:0;
  max-height:220px;
  overflow:auto;
  overflow-x:hidden;
  padding-right:2px;
}
.cf-multi-option{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  width:100%;
  box-sizing:border-box;
  padding:8px 6px;
  border:0;
  border-radius:0;
  background:transparent;
  cursor:pointer;
  font-size:14px;
  line-height:1.2;
  white-space:nowrap;
  color:#122536;
}
.cf-multi-option:hover{
  background:#f4fbfa;
}
.cf-multi-text{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.cf-multi-option input{
  margin:0;
  justify-self:end;
  flex:0 0 auto;
}
.cf-multi-empty{
  padding:8px 6px;
  color:var(--cf-muted);
  font-size:13px;
}

/* Keep checkbox label typography aligned with form inputs */
.cf-check{
  font-size:14px;
  line-height:1.35;
  font-weight:400;
}

/* ClinicFlow line-item layout fix */
.cf-items{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.cf-items-head,
.cf-item-row{
  display:grid;
  grid-template-columns:minmax(180px,2.2fr) 70px 110px 110px minmax(120px,1.1fr) 110px 44px;
  gap:8px;
  align-items:center;
}
.cf-items-head{
  font-size:13px;
  font-weight:600;
  color:#233443;
}
.cf-items-head span{
  display:block;
  white-space:nowrap;
}
.cf-item-row select,
.cf-item-row input{
  width:100%;
  min-width:0;
}
.cf-item-row .cf-item-total{
  background:#f6f9fb;
}
.cf-item-row .cf-remove-item{
  width:34px;
  min-width:34px;
  height:34px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #ccd7de;
  border-radius:4px;
  background:#fff;
  color:#415464;
  line-height:1;
}
.cf-item-row .cf-remove-item:hover,
.cf-item-row .cf-remove-item:focus{
  background:#f0f4f7;
  color:#1f3242;
  border-color:#aebdca;
}

@media(max-width:900px){
  .cf-items-head{
    display:none;
  }
  .cf-item-row{
    grid-template-columns:1fr 1fr;
  }
  .cf-item-row .cf-item-service,
  .cf-item-row .cf-item-gst{
    grid-column:1 / -1;
  }
}


/* ClinicFlow 3.0.1 quotation items */
.cf-line-items-field{border:1px solid #b8c6cd;background:#f8fbfc;padding:14px;margin-top:2px}
.cf-line-items-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.cf-line-items-title strong{display:block;font-size:15px;color:#172331}
.cf-line-items-title small{display:block;margin-top:3px;color:var(--cf-muted);font-weight:400}
.cf-line-items-title #cf-add-item{white-space:nowrap}
.cf-items-head{background:#edf4f6;padding:8px;border:1px solid #c4d0d6;border-bottom:0}
#cf-items{display:flex;flex-direction:column;gap:7px}
.cf-item-row{background:#fff;border:1px solid #c4d0d6;padding:8px}
.cf-item-row select,.cf-item-row input{height:38px;border:1px solid #9baab2;padding:8px;font-family:inherit;font-size:13px;background:#fff}
.cf-item-row .cf-remove-item{border:0!important;background:transparent!important;color:#c0392b!important;font-size:23px;font-weight:700}
.cf-item-row .cf-remove-item:hover,.cf-item-row .cf-remove-item:focus{color:#7f1d1d!important;background:transparent!important}
@media(max-width:900px){.cf-line-items-title{align-items:flex-start}.cf-item-row{padding:10px}}

/* ClinicFlow 3.0.3: selected lookup names stay visible without expanding the control. */
.cf-multi-dropdown .cf-multi-label{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}.cf-multi-dropdown .cf-multi-toggle{min-width:0}.cf-multi-dropdown .cf-multi-toggle .cf-multi-label{flex:1}

.cf-top-actions{margin-left:0;flex:1;display:flex;align-items:center;gap:8px;flex-wrap:wrap}.cf-list-search,.cf-list-filter,.cf-filter-date input{border:1px solid #9baab2;background:#fff;padding:9px 10px;font-family:inherit;font-size:12px;min-height:36px}.cf-list-search{min-width:220px;flex:1;max-width:360px}.cf-filter-date{display:flex;align-items:center;gap:5px;font-size:10px;color:var(--cf-muted)}.cf-page-heading{display:flex;align-items:center;margin:0 0 14px}.cf-page-heading h1{font-size:21px;margin:0}.cf-summary-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-bottom:14px}.cf-summary-card{background:#fff;border:1px solid #bac6cc;padding:12px 14px;min-height:72px}.cf-summary-card span{display:block;color:var(--cf-muted);font-size:10px}.cf-summary-card b{display:block;font-size:20px;margin-top:7px}.cf-topbar{min-height:68px}.cf-topbar .cf-btn,.cf-topbar .cf-secondary{white-space:nowrap}@media(max-width:760px){.cf-top-actions{width:100%}.cf-list-search{max-width:none;min-width:100%}.cf-list-filter,.cf-filter-date{display:none}.cf-summary-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* Version 3.0.10: aligned list controls and theme-coloured borders */
.cf-top-actions{align-items:flex-start!important;width:100%}
.cf-filter-stack{display:flex;flex-direction:column;gap:10px;flex:1;min-width:0}
.cf-filter-row{display:flex;align-items:center;justify-content:flex-start;gap:10px;flex-wrap:wrap;width:100%}
.cf-filter-primary{justify-content:flex-start}
.cf-filter-dates{justify-content:flex-start}
.cf-add-wrap{margin-left:auto;display:flex;align-items:flex-start;justify-content:flex-end;min-width:max-content}
.cf-list-search,.cf-list-filter,.cf-filter-date input,.cf-secondary,#cf-add-record{border-color:var(--cf-primary)!important}
.cf-summary-card,.cf-card,.cf-tabs button,.cf-report-tabs button,.cf-quick-actions button,.cf-profile-actions button,.cf-training-summary,.cf-training-step{border-color:var(--cf-primary)!important}
.cf-dashboard .cf-panel,.cf-dashboard .cf-card{border-color:var(--cf-primary)!important}
.cf-filter-date{color:var(--cf-muted);white-space:nowrap}
@media(max-width:980px){.cf-add-wrap{width:auto}.cf-list-search{max-width:none}.cf-top-actions{flex-wrap:wrap}.cf-filter-stack{flex-basis:100%}.cf-add-wrap{margin-left:0}}
@media(max-width:760px){.cf-filter-row{display:flex}.cf-list-filter,.cf-filter-date{display:flex!important}.cf-add-wrap{width:100%;justify-content:flex-end}.cf-filter-date{width:100%}.cf-filter-date input{flex:1}.cf-list-filter{flex:1;min-width:145px}}


/* Version 3.0.15: settings save state and contained confirmation */
.cf-form-actions .cf-btn:disabled{opacity:.58;cursor:not-allowed;pointer-events:none}
.cf-form-actions .cf-btn.is-saving{filter:saturate(.75)}
.cf-settings-success{max-width:900px;background:var(--cf-success);color:#fff;border:1px solid var(--cf-success);padding:14px 18px;margin:0 0 18px;border-radius:4px;box-shadow:0 6px 18px rgba(0,0,0,.10);font-size:13px;font-weight:600}

/* v3.0.16 compact navigation */
.cf-menu-group summary{font-size:12px!important;padding:10px 12px!important}
.cf-sidebar nav>a{font-size:12px!important;padding:10px 12px!important}
.cf-submenu a{font-size:11px!important;padding:8px 14px 8px 38px!important}

.cf-form-notice{margin:0 0 18px;padding:14px 16px;border:1px solid var(--cf-theme,#21b3aa);background:#f7fffe;display:flex;flex-direction:column;gap:4px}.cf-form-notice strong{font-size:16px}.cf-form-notice span{font-size:13px;color:#52606d}
.cf-action-complete{font-weight:700}

/* v3.1.0 refinements */
.cf-menu-group>div a{padding-left:20px!important}
.cf-sidebar nav a:hover{background:color-mix(in srgb,var(--cf-primary) 55%,white)!important;color:var(--cf-primary)!important}
.cf-submenu a:hover,.cf-submenu a:focus{background:var(--cf-primary)!important;color:#fff!important}
.cf-sidebar nav a.active{background:var(--cf-primary)!important}
.required{color:#d93025;font-weight:700}
.cf-field>label{display:flex;align-items:center;gap:8px;justify-content:space-between}
.cf-inline-rx{font-size:10px!important;font-weight:500!important;color:var(--cf-muted);display:inline-flex!important;align-items:center;gap:5px;margin-left:auto}
.cf-inline-rx input{width:auto!important}
.cf-btn.danger{background:var(--cf-danger)!important;color:#fff!important}


/* v3.1.4 patient transaction history */
.cf-patient-history-modal .cf-modal-dialog{max-width:1380px;width:96vw}
.cf-patient-history-modal #cf-form{max-height:78vh;overflow:auto}
.cf-patient-history-cards{grid-template-columns:repeat(6,minmax(120px,1fr));margin:14px 0}
.cf-patient-history-cards .cf-card{min-height:76px;padding:12px 14px}
.cf-patient-history-section{margin-top:16px}
.cf-patient-history-section h3{margin:0 0 10px}
@media(max-width:900px){.cf-patient-history-cards{grid-template-columns:repeat(2,minmax(120px,1fr))}}

/* v3.1.13: patient history modal inner spacing */
.cf-patient-history-modal .cf-modal-card{
  width:min(1380px,96vw);
  max-width:1380px;
}
.cf-patient-history-modal #cf-form{
  max-height:78vh;
  overflow:auto;
  padding:20px 24px 26px;
}
.cf-patient-history-modal #cf-form > .cf-table-wrap,
.cf-patient-history-modal #cf-form > .cf-view-section{
  margin-left:0;
  margin-right:0;
}
@media(max-width:620px){
  .cf-patient-history-modal #cf-form{padding:14px 12px 18px}
}

/* ClinicFlow 3.1.16: scheduled appointment title and workflow action consistency */
.cf-list-page-heading{display:flex!important;visibility:visible!important;opacity:1!important;min-height:34px;margin:0 0 14px!important;align-items:center!important}
.cf-list-page-heading h1{display:block!important;visibility:visible!important;opacity:1!important;color:var(--cf-dark)!important;font-size:21px!important;line-height:1.25!important;margin:0!important;font-weight:600!important}
.cf-row-actions .cf-action-consult svg,.cf-row-actions .cf-action-session svg{width:17px!important;height:17px!important;display:block!important;fill:currentColor!important}

/* v3.1.17: guaranteed list-page heading visibility */
.cf-list-title-bar,
#cf-content > .cf-list-title-bar{display:block!important;visibility:visible!important;opacity:1!important;position:relative!important;z-index:2!important;min-height:38px!important;margin:0 0 18px!important;padding:0!important;overflow:visible!important}
.cf-list-title-bar h1,
#cf-content > .cf-list-title-bar h1{display:block!important;visibility:visible!important;opacity:1!important;color:#12263a!important;font-size:24px!important;line-height:1.3!important;font-weight:700!important;margin:0!important;padding:0!important;text-indent:0!important;clip:auto!important;clip-path:none!important;transform:none!important}

/* v3.1.19: keep required asterisks immediately beside field names */
.cf-field>label{justify-content:flex-start!important;gap:4px!important;flex-wrap:wrap}
.cf-field>label>.required{display:inline-block!important;margin:0!important;color:#d93025!important;font-weight:700!important;line-height:1!important}
.cf-field>label>.cf-inline-rx{margin-left:auto!important}
.cf-field-label{display:inline-flex!important;align-items:center!important;justify-content:flex-start!important;gap:4px!important}
.cf-field-label .required{margin:0!important}

/* v3.1.21: balanced spacing inside record-detail modals */
.cf-record-view-modal .cf-modal-card{
  width:min(960px,calc(100vw - 48px));
}
.cf-record-view-modal #cf-form{
  padding:20px 24px 22px;
}
.cf-record-view-modal #cf-form > .cf-table-wrap,
.cf-record-view-modal #cf-form > .cf-view-section{
  margin-left:0;
  margin-right:0;
}
.cf-record-view-modal .cf-view-section{
  margin-top:18px;
}
.cf-record-view-modal .cf-form-actions{
  padding:16px 0 0;
}
@media(max-width:620px){
  .cf-record-view-modal .cf-modal-card{width:calc(100vw - 12px)}
  .cf-record-view-modal #cf-form{padding:14px 12px 18px}
}

.cf-autofilled-field{background:#f3fbfa!important;border-color:#16a89f!important;}

/* v3.1.25: auto-filled source fields are visible but locked */
#cf-form .cf-locked-field {
  background-color: #eef9f8 !important;
  border-color: #20b2aa !important;
  color: #172b3a !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
}
#cf-form select.cf-locked-field {
  pointer-events: none !important;
  background-image: none !important;
  padding-right: 12px !important;
}
/* v3.1.27: keep consultation action icons separate and prevent overlap */
.cf-row-actions{display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:8px!important;min-width:230px!important;white-space:nowrap!important}
.cf-row-actions .cf-btn.small{display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 30px!important;width:30px!important;min-width:30px!important;height:30px!important;padding:5px!important;line-height:1!important}
.cf-row-actions .cf-btn.small svg{width:16px!important;height:16px!important;display:block!important;fill:currentColor!important}
.cf-row-actions .cf-action-invoice{color:var(--cf-primary)!important;border-color:var(--cf-primary)!important}
.cf-row-actions .cf-action-invoice:hover{background:var(--cf-primary)!important;color:#fff!important}
.cf-table th:last-child,.cf-table td:last-child{min-width:245px!important}
@media(max-width:900px){.cf-row-actions{flex-wrap:wrap!important;min-width:150px!important}.cf-table th:last-child,.cf-table td:last-child{min-width:170px!important}}

.cf-logout{margin-left:8px;border:1px solid #c7d1d6;background:#fff;color:var(--cf-dark)!important;text-decoration:none;padding:9px 12px;border-radius:3px;font-size:12px;font-weight:600;white-space:nowrap}
.cf-logout:hover{border-color:var(--cf-primary);color:var(--cf-primary)!important}
.cf-login-page{min-height:100vh;background:linear-gradient(135deg,#eef8f7 0%,#f7fafb 55%,#e8f3f4 100%);display:grid;place-items:center;padding:28px;color:#172331}
.cf-login-shell{width:min(1040px,100%);min-height:610px;background:#fff;display:grid;grid-template-columns:1.08fr .92fr;border:1px solid #c7d5da;box-shadow:0 24px 70px rgba(20,36,50,.16);overflow:hidden}
.cf-login-brand-panel{position:relative;padding:68px 62px;background:linear-gradient(155deg,#102431 0%,#143847 55%,#0b756f 150%);color:#fff;display:flex;flex-direction:column;justify-content:center;overflow:hidden}
.cf-login-brand-panel:before,.cf-login-brand-panel:after{content:"";position:absolute;border-radius:50%;border:1px solid rgba(255,255,255,.12)}
.cf-login-brand-panel:before{width:340px;height:340px;right:-170px;top:-120px}.cf-login-brand-panel:after{width:240px;height:240px;left:-120px;bottom:-90px}
.cf-login-logo,.cf-login-mobile-logo{width:64px;height:64px;border-radius:16px;background:var(--cf-primary);display:grid;place-items:center;font-size:25px;font-weight:700;box-shadow:0 10px 28px rgba(34,179,168,.28)}
.cf-login-eyebrow{font-size:11px;letter-spacing:2.1px;font-weight:700;color:#9ee2dc;margin:30px 0 10px}
.cf-login-brand-panel h1{font-size:38px;line-height:1.15;margin:0 0 18px;max-width:420px}.cf-login-copy{font-size:15px;line-height:1.8;color:#d2e1e6;max-width:430px;margin:0}
.cf-login-contact{display:flex;flex-direction:column;gap:8px;margin-top:38px;font-size:12px;color:#c4d7dc}.cf-login-contact span{display:block}
.cf-login-form-panel{padding:54px;display:grid;place-items:center;background:#fff}.cf-login-card{width:min(390px,100%)}.cf-login-mobile-logo{display:none;margin-bottom:25px}
.cf-login-card h2{font-size:29px;margin:0 0 8px;color:#142432}.cf-login-card>p{font-size:13px;color:#6b7785;margin:0 0 30px}.cf-login-card form>label{display:block;font-size:12px;font-weight:700;margin:17px 0 7px}.cf-login-card form>label span{color:#c0392b}
.cf-login-card input[type=text],.cf-login-card input[type=password]{width:100%;height:48px;border:1px solid #a7b7bf;background:#fff;padding:0 14px;font:inherit;font-size:14px;outline:none}.cf-login-card input:focus{border-color:var(--cf-primary);box-shadow:0 0 0 3px rgba(34,179,168,.12)}
.cf-password-wrap{position:relative}.cf-password-wrap input{padding-right:62px!important}.cf-password-toggle{position:absolute;right:8px;top:50%;transform:translateY(-50%);border:0;background:transparent;color:#087f77;font-weight:700;font-size:11px;cursor:pointer;padding:8px}
.cf-login-options{display:flex;justify-content:space-between;align-items:center;gap:15px;margin:16px 0 22px;font-size:11px}.cf-login-options a{color:#087f77;text-decoration:none;font-weight:600}.cf-remember{display:flex!important;align-items:center;gap:7px!important;margin:0!important;font-weight:500!important}.cf-remember input{margin:0}
.cf-login-submit{width:100%;height:49px;border:0;border-radius:3px;background:var(--cf-primary);color:#fff;font:inherit;font-size:14px;font-weight:700;cursor:pointer;box-shadow:0 9px 20px rgba(34,179,168,.22)}.cf-login-submit:hover{filter:brightness(.94)}
.cf-login-error,.cf-login-success{padding:12px 14px;margin:0 0 18px;border-left:4px solid;font-size:12px;line-height:1.5}.cf-login-error{background:#fff0ee;border-color:#c0392b;color:#85291f}.cf-login-success{background:#eaf8f1;border-color:#218c5b;color:#17633f}
.cf-login-footer{text-align:center!important;margin:25px 0 0!important;font-size:10px!important;color:#8a969d!important}
@media(max-width:760px){.cf-login-page{padding:16px}.cf-login-shell{display:block;min-height:0}.cf-login-brand-panel{display:none}.cf-login-form-panel{padding:38px 24px}.cf-login-mobile-logo{display:grid}.cf-login-card h2{font-size:25px}.cf-login-options{align-items:flex-start;flex-direction:column;gap:10px}.cf-logout{padding:7px 9px}}

/* Pagination */
.cf-pagination{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:16px 2px 2px;border-top:1px solid #d9e2e8;margin-top:14px}
.cf-page-info{font-size:13px;color:#334155}
.cf-page-controls{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.cf-page-size-label{display:flex;align-items:center;gap:8px;font-size:13px;color:#334155;margin-right:8px}
.cf-page-size-label select{height:36px;min-width:68px;padding:0 26px 0 10px;border:1px solid #16b3aa;background:#fff;color:#12263a}
.cf-page-btn{min-width:36px;height:36px;padding:0 10px;border:1px solid #16b3aa;background:#fff;color:#12263a;cursor:pointer;font-weight:600}
.cf-page-btn:hover:not(:disabled){background:#dff7f5}
.cf-page-btn.active{background:#20b2aa;color:#fff;border-color:#20b2aa}
.cf-page-btn:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:700px){.cf-pagination{align-items:flex-start}.cf-page-info{width:100%}.cf-page-controls{width:100%}}


/* v3.1.35: Invoice is teal text only; pagination retained */
.cf-action-invoice,
button.cf-action-invoice,
a.cf-action-invoice{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:auto!important;
  min-width:auto!important;
  height:auto!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#20b2aa!important;
  font-weight:700!important;
  line-height:1.4!important;
  text-decoration:none!important;
  cursor:pointer!important;
}
.cf-action-invoice:hover,
.cf-action-invoice:focus{
  background:transparent!important;
  border:0!important;
  color:#148f88!important;
  text-decoration:underline!important;
  transform:none!important;
  box-shadow:none!important;
}

/* v3.1.37: force Invoice action to remain plain teal text, including hover/focus */
.cf-row-actions .cf-btn.small.cf-action-invoice,
.cf-table td .cf-btn.small.cf-action-invoice,
button.cf-btn.small.cf-action-invoice {
  display:inline!important;
  width:auto!important;
  min-width:0!important;
  height:auto!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  background:none!important;
  background-color:transparent!important;
  box-shadow:none!important;
  color:#20b2aa!important;
  font-weight:700!important;
  line-height:normal!important;
  text-decoration:none!important;
  overflow:visible!important;
  white-space:nowrap!important;
  transform:none!important;
  appearance:none!important;
  -webkit-appearance:none!important;
}
.cf-row-actions .cf-btn.small.cf-action-invoice:hover,
.cf-row-actions .cf-btn.small.cf-action-invoice:focus,
.cf-row-actions .cf-btn.small.cf-action-invoice:active,
.cf-table td .cf-btn.small.cf-action-invoice:hover,
.cf-table td .cf-btn.small.cf-action-invoice:focus,
button.cf-btn.small.cf-action-invoice:hover,
button.cf-btn.small.cf-action-invoice:focus,
button.cf-btn.small.cf-action-invoice:active {
  width:auto!important;
  min-width:0!important;
  height:auto!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:none!important;
  background-color:transparent!important;
  box-shadow:none!important;
  color:#148f88!important;
  text-decoration:underline!important;
  transform:none!important;
  outline:none!important;
}

/* Completed Consultations: create quotation action */
.cf-action-quotation-text,
.cf-action-quotation-text:hover,
.cf-action-quotation-text:focus,
.cf-action-quotation-text:active {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: #16aeb0 !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
  min-width: auto !important;
}
.cf-action-quotation-text:hover,
.cf-action-quotation-text:focus {
  color: #0f8587 !important;
  text-decoration: underline;
}


/* v3.1.42: keep Completed Consultations quotation action separate and readable */
.cf-row-actions .cf-btn.small.cf-action-quotation-text,
.cf-table td .cf-btn.small.cf-action-quotation-text,
button.cf-btn.small.cf-action-quotation-text {
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 auto!important;
  width:auto!important;
  min-width:auto!important;
  height:auto!important;
  padding:0!important;
  margin:0 0 0 4px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#20b2aa!important;
  font-weight:700!important;
  line-height:1.4!important;
  white-space:nowrap!important;
  text-decoration:none!important;
  overflow:visible!important;
}
.cf-row-actions .cf-btn.small.cf-action-quotation-text:hover,
.cf-row-actions .cf-btn.small.cf-action-quotation-text:focus,
.cf-table td .cf-btn.small.cf-action-quotation-text:hover,
button.cf-btn.small.cf-action-quotation-text:hover,
button.cf-btn.small.cf-action-quotation-text:focus {
  background:transparent!important;
  color:#148f88!important;
  text-decoration:underline!important;
  box-shadow:none!important;
  transform:none!important;
}
/* Allow enough room for View, Edit, PDF, Rx and Quotation without collision. */
.cf-table th:last-child,
.cf-table td:last-child { min-width:285px!important; }
.cf-row-actions { min-width:270px!important; }


/* Session photo workflow */
.cf-session-photos{grid-column:1/-1;width:100%;border:1px solid #b9cbd0;background:#f8fbfc;padding:16px;margin-top:8px}
.cf-photo-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}
.cf-photo-head h3{margin:0 0 4px;font-size:17px;color:#10263a}.cf-photo-head p{margin:0;color:#42566a;font-size:12px}
.cf-photo-progress{white-space:nowrap;font-weight:700;color:#119f9a;font-size:12px}
.cf-photo-phase{margin-top:14px}.cf-photo-phase h4{margin:0 0 8px;font-size:14px;color:#10263a}
.cf-photo-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.cf-photo-slot{border:1px solid #bfd0d5;background:#fff;padding:9px;min-width:0}
.cf-photo-slot.has-photo{border-color:#19b3ad}.cf-photo-slot.is-uploading{opacity:.55;pointer-events:none}
.cf-photo-label{font-size:12px;font-weight:700;margin-bottom:7px;color:#10263a}
.cf-photo-preview{height:110px;background:#eef4f5;display:flex;align-items:center;justify-content:center;overflow:hidden;color:#6b7c89;font-size:12px}
.cf-photo-preview img{width:100%;height:100%;object-fit:cover;display:block}
.cf-photo-actions{display:flex;gap:6px;margin-top:8px;align-items:center;justify-content:center}.cf-photo-upload{cursor:pointer}
.cf-photo-empty{padding:18px;text-align:center;border:1px dashed #b9cbd0;background:#fff;color:#526675}
@media(max-width:1000px){.cf-photo-grid{grid-template-columns:repeat(2,minmax(140px,1fr))}}
@media(max-width:600px){.cf-photo-head{display:block}.cf-photo-progress{display:block;margin-top:8px}.cf-photo-grid{grid-template-columns:1fr}}

/* ClinicFlow 3.1.48: visible session photo gallery */
.cf-action-photos{background:transparent!important;border:0!important;color:#149c9a!important;font-weight:700!important;padding:3px 5px!important;box-shadow:none!important}
.cf-action-photos:hover,.cf-action-photos:focus{background:transparent!important;color:#0d7472!important;text-decoration:underline!important;box-shadow:none!important}
.cf-session-photo-view{padding:2px 10px 8px}
.cf-photo-view-summary{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:16px;padding:10px 12px;border:1px solid #d9e2e7;border-radius:8px;background:#f8fbfc}
.cf-photo-complete{color:#16835d;font-weight:600}.cf-photo-missing{color:#b45309;font-weight:600}
.cf-photo-view-grid .cf-photo-slot{min-height:180px}
.cf-photo-view-grid .cf-photo-preview{height:145px;display:flex;align-items:center;justify-content:center;overflow:hidden;border-radius:7px;background:#f2f5f7}
.cf-photo-view-grid .cf-photo-preview a{display:block;width:100%;height:100%}
.cf-photo-view-grid .cf-photo-preview img{width:100%;height:100%;object-fit:cover;display:block}
.cf-photo-view-grid .cf-photo-slot.is-missing .cf-photo-preview{border:1px dashed #c9d2d8;color:#79848b}
.cf-photo-gallery-loading,.cf-empty{padding:28px;text-align:center;color:#66737a}
@media(max-width:700px){.cf-photo-view-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.cf-photo-view-grid .cf-photo-preview{height:125px}}

.cf-photo-lightbox{position:fixed;inset:0;z-index:1600;background:rgba(6,12,20,.86);display:flex;align-items:center;justify-content:center;padding:24px}
.cf-photo-lightbox[hidden]{display:none!important}
.cf-photo-lightbox-image{max-width:min(92vw,1280px);max-height:90vh;width:auto;height:auto;display:block;border:1px solid rgba(255,255,255,.2);background:#0f1720}
.cf-photo-lightbox-close{position:absolute;top:16px;right:16px;width:40px;height:40px;border:0;border-radius:50%;background:#c93e2f;color:#fff;font-size:28px;line-height:1;cursor:pointer}
.cf-photo-lightbox-close:hover,.cf-photo-lightbox-close:focus{background:#ab3327}
body.cf-photo-lightbox-open{overflow:hidden}


/* ClinicFlow 3.1.55: quotation/invoice line-item columns */
.cf-items{overflow-x:auto;}
.cf-items-head,.cf-item-row{
  grid-template-columns:minmax(180px,2fr) 96px 92px 96px 108px 112px 126px 40px;
  min-width:920px;
  gap:8px;
}
.cf-item-row .cf-item-amount-before-tax,.cf-item-row .cf-item-total{background:#f6f9fb;}
@media(max-width:900px){
  .cf-items-head{display:grid;}
  .cf-item-row{grid-template-columns:minmax(180px,2fr) 96px 92px 96px 108px 112px 126px 40px;}
}

/* v3.1.61: prevent appointment defaults flashing before pending-session data is ready */
.cf-form-loading{min-height:220px;display:flex;align-items:center;justify-content:center;gap:12px;color:#334155;font-size:15px}
.cf-spinner{width:22px;height:22px;border:3px solid #cbd5e1;border-top-color:#0f9f9a;border-radius:50%;animation:cfSpin .7s linear infinite}
@keyframes cfSpin{to{transform:rotate(360deg)}}


/* v3.1.62: stable pending-session appointment preload and compact table action */
.cf-pending-session-form-body[aria-hidden="true"]{display:none!important;}
.cf-row-actions .cf-action-schedule{color:var(--cf-primary)!important;}
.cf-row-actions .cf-action-schedule:hover,
.cf-row-actions .cf-action-schedule:focus{color:#148f88!important;background:transparent!important;}
.cf-table[data-module="pending-sessions"] .cf-row-actions,
.cf-pending-sessions .cf-row-actions{min-width:38px!important;width:38px!important;}
.cf-table[data-module="pending-sessions"] th:last-child,
.cf-table[data-module="pending-sessions"] td:last-child{min-width:68px!important;width:68px!important;}
/* Pharmacy module */
.ph-items-field{grid-column:1/-1}.ph-line{display:grid;grid-template-columns:minmax(160px,2fr) repeat(7,minmax(90px,1fr)) 38px;gap:8px;align-items:center;margin:8px 0;padding:10px;border:1px solid #b9c7d3;background:#f8fbfc;min-width:1050px}.ph-items-field>#ph-items{overflow-x:auto}.ph-line input,.ph-line select{min-width:0;width:100%;height:40px}.ph-remove{height:36px;border:0;border-radius:4px;background:#c9362b;color:#fff;font-size:20px}.cf-table-wrap{overflow-x:auto}.cf-actions{white-space:nowrap}@media(max-width:768px){.ph-line{min-width:1000px}.cf-form-grid{grid-template-columns:1fr}}

/* ClinicFlow Pharmacy v3.2.2: persistent horizontal scrolling in every pharmacy view */
.cf-pharmacy-page .cf-content,
.cf-pharmacy-page .cf-panel,
.cf-pharmacy-page .cf-form-grid,
.cf-pharmacy-page .cf-modal-card{min-width:0;}
.cf-pharmacy-page .cf-table-wrap,

.cf-pharmacy-page .ph-items-field>#ph-items{
  display:block;
  width:100%;
  max-width:100%;
  overflow-x:scroll !important;
  overflow-y:visible;
  scrollbar-gutter:stable both-edges;
  -webkit-overflow-scrolling:touch;
  padding-bottom:8px;
}
 .cf-pharmacy-page .cf-table-wrap>.cf-table{
  width:max-content;
  min-width:100%;
}
.cf-pharmacy-page .cf-table th,
.cf-pharmacy-page .cf-table td{white-space:nowrap;}
.cf-pharmacy-page .cf-table td.wrap,
.cf-pharmacy-page .cf-table td[data-wrap="1"]{white-space:normal;min-width:220px;}
.cf-pharmacy-page .cf-table-wrap::-webkit-scrollbar,
.cf-pharmacy-page .cf-pharmacy-scroll::-webkit-scrollbar,
.cf-pharmacy-page .ph-items-field>#ph-items::-webkit-scrollbar{height:12px;}
.cf-pharmacy-page .cf-table-wrap::-webkit-scrollbar-track,
.cf-pharmacy-page .ph-items-field>#ph-items::-webkit-scrollbar-track{background:#e7eef1;border-radius:8px;}
.cf-pharmacy-page .cf-table-wrap::-webkit-scrollbar-thumb,
.cf-pharmacy-page .cf-pharmacy-scroll::-webkit-scrollbar-thumb,
.cf-pharmacy-page .ph-items-field>#ph-items::-webkit-scrollbar-thumb{background:var(--cf-primary);border:2px solid #e7eef1;border-radius:8px;}
.cf-pharmacy-page .cf-table-wrap,

.cf-pharmacy-page .ph-items-field>#ph-items{scrollbar-width:auto;scrollbar-color:var(--cf-primary) #e7eef1;}
@media(max-width:768px){
  .cf-pharmacy-page .cf-table-wrap,
  
  .cf-pharmacy-page .ph-items-field>#ph-items{padding-bottom:10px;}
}


/* ClinicFlow Pharmacy v3.2.3: functional horizontal scrolling */
.cf-pharmacy-page .cf-table-wrap.cf-pharmacy-scroll{
  position:relative;
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  touch-action:pan-x pan-y;
}
.cf-pharmacy-page .cf-table-wrap.cf-pharmacy-scroll > table.cf-table{
  width:auto!important;
  max-width:none!important;
  min-width:var(--ph-table-min-width,1200px)!important;
  table-layout:auto!important;
  margin:0!important;
}
.cf-pharmacy-page .cf-table-wrap.cf-pharmacy-scroll > table.cf-table th,
.cf-pharmacy-page .cf-table-wrap.cf-pharmacy-scroll > table.cf-table td{
  min-width:140px;
  white-space:nowrap!important;
}
.cf-pharmacy-page .cf-table-wrap.cf-pharmacy-scroll > table.cf-table th:last-child,
.cf-pharmacy-page .cf-table-wrap.cf-pharmacy-scroll > table.cf-table td:last-child{
  min-width:150px;
}
.cf-pharmacy-page .ph-items-field{
  min-width:0!important;
  overflow:hidden;
}
.cf-pharmacy-page .ph-items-field > #ph-items{
  width:100%!important;
  max-width:100%!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  touch-action:pan-x pan-y;
}
.cf-pharmacy-page .ph-items-field > #ph-items .ph-line{
  width:max-content!important;
  min-width:1200px!important;
}

/* ClinicFlow Pharmacy v3.2.4: guaranteed functional horizontal scrolling */
body.cf-pharmacy-page .cf-main,
body.cf-pharmacy-page .cf-content,
body.cf-pharmacy-page #cf-content,
body.cf-pharmacy-page .cf-panel{
  min-width:0!important;
  max-width:100%!important;
}
body.cf-pharmacy-page .cf-panel{
  overflow:hidden!important;
}
body.cf-pharmacy-page .cf-table-wrap.cf-pharmacy-scroll{
  display:block!important;
  width:100%!important;
  max-width:calc(100vw - 300px)!important;
  min-width:0!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  overscroll-behavior-x:contain;
  scrollbar-gutter:stable;
  border-bottom:0!important;
}
body.cf-pharmacy-page .cf-table-wrap.cf-pharmacy-scroll > table.cf-table{
  width:var(--ph-table-min-width,1200px)!important;
  min-width:var(--ph-table-min-width,1200px)!important;
  max-width:none!important;
  flex:none!important;
}
body.cf-pharmacy-page .cf-pharmacy-scrollbar{
  display:none;
  width:100%;
  max-width:calc(100vw - 300px);
  height:18px;
  overflow-x:scroll;
  overflow-y:hidden;
  background:#e7eef1;
  border:1px solid #c5d1d7;
  border-top:0;
  scrollbar-color:var(--cf-primary) #e7eef1;
  scrollbar-width:auto;
}
body.cf-pharmacy-page .cf-pharmacy-scrollbar.is-needed{display:block!important;}
body.cf-pharmacy-page .cf-pharmacy-scrollbar-inner{height:1px;min-width:1px;}
body.cf-pharmacy-page .cf-pharmacy-scrollbar::-webkit-scrollbar{height:14px;}
body.cf-pharmacy-page .cf-pharmacy-scrollbar::-webkit-scrollbar-track{background:#e7eef1;}
body.cf-pharmacy-page .cf-pharmacy-scrollbar::-webkit-scrollbar-thumb{background:var(--cf-primary);border:3px solid #e7eef1;border-radius:10px;}
body.cf-pharmacy-page .ph-items-field{max-width:100%!important;overflow:hidden!important;}
body.cf-pharmacy-page .ph-items-field > #ph-items{display:block!important;width:100%!important;max-width:100%!important;overflow-x:auto!important;overflow-y:hidden!important;}
@media(max-width:900px){
  body.cf-pharmacy-page .cf-table-wrap.cf-pharmacy-scroll,
  body.cf-pharmacy-page .cf-pharmacy-scrollbar{max-width:calc(100vw - 44px)!important;}
}

/* ClinicFlow Pharmacy v3.2.7: unified organised list views */
body.cf-pharmacy-page .cf-pharmacy-scrollbar{display:none!important;}
body.cf-pharmacy-page #cf-content{min-width:0!important;}
body.cf-pharmacy-page .ph-page-heading{margin:0 0 18px!important;}
body.cf-pharmacy-page .ph-page-heading h1{font-size:28px!important;line-height:1.2!important;margin:0!important;color:#12263a!important;}
body.cf-pharmacy-page .ph-toolbar{margin-bottom:18px!important;}
body.cf-pharmacy-page .ph-toolbar .cf-filter-primary{display:flex!important;align-items:center!important;gap:12px!important;flex-wrap:wrap!important;}
body.cf-pharmacy-page .ph-toolbar input[type="search"]{flex:1 1 360px!important;min-width:240px!important;max-width:560px!important;height:46px!important;}
body.cf-pharmacy-page .ph-toolbar select{height:46px!important;min-width:145px!important;}
body.cf-pharmacy-page .ph-add-btn{margin-left:auto!important;height:46px!important;white-space:nowrap!important;}
body.cf-pharmacy-page .ph-summary-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important;margin-bottom:18px!important;}
body.cf-pharmacy-page .ph-summary-cards .cf-summary-card{min-height:98px!important;padding:18px 20px!important;}
body.cf-pharmacy-page .ph-list-panel{padding:18px!important;overflow:hidden!important;}
body.cf-pharmacy-page .cf-table-wrap.cf-pharmacy-scroll{display:block!important;width:100%!important;max-width:100%!important;overflow-x:auto!important;overflow-y:hidden!important;border:1px solid #bdc9d1!important;padding:0!important;background:#fff!important;-webkit-overflow-scrolling:touch!important;scrollbar-gutter:auto!important;}
/* Dashboard: scheduled appointments need a compact, scannable view. */
.cf-upcoming-note{font-size:11px;color:var(--cf-muted)}
.cf-upcoming-appointments td b{display:block;font-size:12px;font-weight:600}
.cf-upcoming-service,.cf-upcoming-time{display:block;margin-top:3px;color:var(--cf-muted);font-size:11px}
.cf-status-badge{display:inline-block;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:600;line-height:1.1}
.cf-status-badge.scheduled{background:#e4f6f4;color:#126f68;border:1px solid #8fd6d0}
body.cf-pharmacy-page .cf-table-wrap.cf-pharmacy-scroll>.ph-table{width:max-content!important;min-width:100%!important;max-width:none!important;table-layout:auto!important;margin:0!important;border-collapse:collapse!important;}
body.cf-pharmacy-page .ph-table th,body.cf-pharmacy-page .ph-table td{min-width:120px!important;max-width:260px!important;padding:12px 14px!important;white-space:normal!important;vertical-align:middle!important;line-height:1.35!important;border:1px solid #263746!important;}
body.cf-pharmacy-page .ph-table th{background:var(--cf-primary)!important;color:#fff!important;font-weight:700!important;white-space:normal!important;}
body.cf-pharmacy-page .ph-table td[data-col="email"],body.cf-pharmacy-page .ph-table td[data-col="address"],body.cf-pharmacy-page .ph-table td[data-col="reason"],body.cf-pharmacy-page .ph-table td[data-col="remarks"]{min-width:190px!important;max-width:280px!important;overflow-wrap:anywhere!important;}
body.cf-pharmacy-page .ph-table th:last-child,body.cf-pharmacy-page .ph-table td:last-child{min-width:100px!important;}
body.cf-pharmacy-page .ph-actions{display:flex!important;align-items:center!important;gap:12px!important;white-space:nowrap!important;}
body.cf-pharmacy-page .cf-icon-action{border:0!important;background:transparent!important;color:var(--cf-primary)!important;font-size:20px!important;line-height:1!important;padding:5px!important;cursor:pointer!important;}
body.cf-pharmacy-page .cf-icon-action.danger{color:#d33b32!important;}
body.cf-pharmacy-page .cf-icon-action:hover{transform:scale(1.08);}
body.cf-pharmacy-page .ph-empty{text-align:center!important;color:#64748b!important;padding:28px!important;}
body.cf-pharmacy-page #ph-pagination{margin-top:14px!important;padding-top:14px!important;border-top:1px solid #d6dee3!important;}
body.cf-pharmacy-page .cf-table-wrap.cf-pharmacy-scroll::-webkit-scrollbar{height:10px!important;}
body.cf-pharmacy-page .cf-table-wrap.cf-pharmacy-scroll::-webkit-scrollbar-track{background:#edf2f4!important;}
body.cf-pharmacy-page .cf-table-wrap.cf-pharmacy-scroll::-webkit-scrollbar-thumb{background:#9baeb8!important;border:2px solid #edf2f4!important;border-radius:8px!important;}
body.cf-pharmacy-page .cf-table-wrap.cf-pharmacy-scroll{scrollbar-width:thin!important;scrollbar-color:#9baeb8 #edf2f4!important;}
@media(max-width:900px){
 body.cf-pharmacy-page .ph-page-heading h1{font-size:24px!important;}
 body.cf-pharmacy-page .ph-summary-cards{grid-template-columns:1fr!important;}
 body.cf-pharmacy-page .ph-toolbar .cf-filter-primary{align-items:stretch!important;}
 body.cf-pharmacy-page .ph-toolbar input[type="search"],body.cf-pharmacy-page .ph-toolbar select,body.cf-pharmacy-page .ph-toolbar button{flex:1 1 auto!important;max-width:none!important;}
 body.cf-pharmacy-page .ph-add-btn{margin-left:0!important;}
 body.cf-pharmacy-page .ph-list-panel{padding:12px!important;}
}


/* ClinicFlow Pharmacy v3.2.8: list controls in the common top bar */
body.cf-pharmacy-page .cf-topbar{align-items:center!important;}
body.cf-pharmacy-page #cf-top-actions{display:flex!important;align-items:center!important;gap:12px!important;flex:1 1 auto!important;justify-content:flex-end!important;min-width:0!important;}
body.cf-pharmacy-page #cf-top-actions .ph-top-search{height:46px!important;flex:1 1 360px!important;min-width:220px!important;max-width:560px!important;border:1px solid #8da0aa!important;padding:10px 12px!important;font:inherit!important;background:#fff!important;}
body.cf-pharmacy-page #cf-top-actions .ph-top-filter{height:46px!important;min-width:145px!important;border:1px solid #8da0aa!important;padding:0 12px!important;background:#fff!important;font:inherit!important;}
body.cf-pharmacy-page #cf-top-actions .cf-secondary,body.cf-pharmacy-page #cf-top-actions .cf-btn{height:46px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;white-space:nowrap!important;}
body.cf-pharmacy-page .ph-page-heading{margin-top:0!important;}
@media(max-width:900px){body.cf-pharmacy-page .cf-topbar{align-items:stretch!important;flex-wrap:wrap!important;}body.cf-pharmacy-page #cf-top-actions{order:2!important;width:100%!important;flex-wrap:wrap!important;justify-content:flex-start!important;}body.cf-pharmacy-page #cf-top-actions .ph-top-search{max-width:none!important;flex:1 1 100%!important;}body.cf-pharmacy-page #cf-top-actions .ph-top-filter,body.cf-pharmacy-page #cf-top-actions .cf-secondary,body.cf-pharmacy-page #cf-top-actions .cf-btn{flex:1 1 auto!important;}body.cf-pharmacy-page .cf-logout{margin-left:auto!important;}}

/* v3.2.11: Pending First Appointment header controls on one line */
.cf-filter-stack-singleline{flex:1 1 auto!important;width:auto!important;min-width:0!important;}
.cf-filter-singleline{display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:10px!important;width:100%!important;}
.cf-filter-singleline .cf-list-search{flex:1 1 360px!important;min-width:240px!important;max-width:none!important;}
.cf-filter-singleline .cf-list-filter{flex:0 0 150px!important;min-width:150px!important;}
.cf-filter-singleline .cf-filter-date{display:flex!important;flex:0 0 190px!important;min-width:190px!important;align-items:center!important;gap:6px!important;}
.cf-filter-singleline .cf-filter-date input{min-width:120px!important;width:100%!important;}
.cf-filter-singleline #cf-reset-filters{flex:0 0 auto!important;}
@media(max-width:1100px){.cf-filter-singleline{flex-wrap:wrap!important}.cf-filter-stack-singleline{width:100%!important}.cf-filter-singleline .cf-list-search{flex-basis:100%!important}}

/* v3.2.12: Pending First Appointment single-line date filter alignment */
.cf-filter-stack-singleline,
.cf-filter-stack-singleline .cf-filter-singleline{
  min-width:0!important;
}
.cf-filter-singleline .cf-filter-date{
  flex:0 1 220px!important;
  min-width:185px!important;
  max-width:220px!important;
  display:grid!important;
  grid-template-columns:max-content minmax(0,1fr)!important;
  align-items:center!important;
  column-gap:8px!important;
  overflow:hidden!important;
}
.cf-filter-singleline .cf-filter-date span{
  display:block!important;
  position:static!important;
  margin:0!important;
  white-space:nowrap!important;
  line-height:1.2!important;
}
.cf-filter-singleline .cf-filter-date input{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}
@media (min-width:1101px){
  .cf-filter-singleline .cf-list-search{flex:1 1 300px!important;min-width:220px!important;}
  .cf-filter-singleline .cf-list-filter{flex:0 1 160px!important;min-width:130px!important;}
}
@media (max-width:1100px){
  .cf-filter-singleline .cf-filter-date{max-width:none!important;}
}

/* ClinicFlow v3.2.15: action-name tooltips */
#cf-action-tooltip{
  position:fixed;
  z-index:2147483647;
  max-width:260px;
  padding:7px 10px;
  border-radius:5px;
  background:#12263a;
  color:#fff;
  font-family:Montserrat,Arial,sans-serif;
  font-size:12px;
  font-weight:600;
  line-height:1.3;
  white-space:nowrap;
  text-align:center;
  box-shadow:0 5px 16px rgba(15,35,52,.28);
  pointer-events:none;
  opacity:0;
  visibility:hidden;
  transform:translateY(3px);
  transition:opacity .12s ease,transform .12s ease,visibility .12s ease;
}
#cf-action-tooltip.is-visible{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
}
.cf-btn[data-action],.cf-icon-action,[data-action]{cursor:pointer;}

/* ClinicFlow 3.2.16 appointment follow-up */
.cf-action-followup{background:#fff!important;color:var(--cf-primary)!important;border:0!important;font-weight:800!important;min-width:24px;padding:5px 6px!important}
.cf-action-followup:hover,.cf-action-followup:focus{color:#147f78!important;background:transparent!important}

/* v3.2.19 dashboard pending tasks */
.cf-pending-task-panel{margin-top:18px;margin-bottom:18px}
.cf-pending-task-table th:nth-child(2),.cf-pending-task-table td:nth-child(2){width:110px;text-align:center}
.cf-pending-task-table th:nth-child(3),.cf-pending-task-table td:nth-child(3){width:130px;text-align:center}
.cf-task-action{min-width:86px;padding:7px 14px}
@media(max-width:700px){.cf-pending-task-table{min-width:560px}}

/* v3.2.21 dashboard pending tasks */
.cf-pending-tasks-panel{margin-top:22px}.cf-pending-tasks-table th:nth-child(2),.cf-pending-tasks-table td:nth-child(2){width:120px;text-align:center}.cf-pending-tasks-table th:nth-child(3),.cf-pending-tasks-table td:nth-child(3){width:150px;text-align:center}.cf-dashboard-task-action{display:inline-flex;align-items:center;justify-content:center;min-width:76px;text-decoration:none}

/* ClinicFlow 3.2.26: show calculated discount and GST amounts beside percentages */
.cf-items-head,.cf-item-row{grid-template-columns:minmax(180px,2fr) 88px 92px 96px 118px 108px 96px 112px 108px 126px 40px!important;min-width:1320px!important;gap:8px}
.cf-item-row .cf-item-discount-amount,.cf-item-row .cf-item-gst-amount,.cf-item-row .cf-item-amount-before-tax,.cf-item-row .cf-item-total{background:#f6f9fb}
.cf-item-row .cf-item-membership-discount.cf-membership-applied{background:#ecfbf4;border-color:#57b894;color:#0f5b40;font-weight:700}
.cf-view-items .cf-item-membership-note{margin-top:2px;font-size:11px;color:#2a7f67}
.cf-view-items table{min-width:1180px}
@media(max-width:900px){.cf-item-row{grid-template-columns:minmax(180px,2fr) 88px 92px 96px 118px 108px 96px 112px 108px 126px 40px!important}}

/* ClinicFlow 3.2.27: keep quotation forms above sticky filters and widen line-item layouts */
.cf-modal{z-index:1300!important}
.cf-form-modal .cf-modal-card{width:min(1240px,calc(100vw - 32px));max-width:1240px;max-height:calc(100vh - 32px)}
.cf-form-modal #cf-form{padding:20px 24px 24px;overflow:auto}
.cf-form-modal #cf-form .cf-session-photos,
.cf-record-view-modal #cf-form .cf-session-photos{
  width:auto;
  margin:8px 8px 0;
}
.cf-form-modal-quotations .cf-modal-card{width:min(1460px,calc(100vw - 32px));max-width:1460px}
.cf-form-modal-quotations .cf-items{overflow-x:auto;padding-bottom:6px}
.cf-form-modal-quotations .cf-items-head,.cf-form-modal-quotations .cf-item-row{grid-template-columns:minmax(220px,2.3fr) 88px 96px 116px minmax(170px,1.35fr) 128px 104px 92px 116px 132px 40px!important;min-width:1510px!important;gap:10px}
.cf-form-modal-quotations .cf-items-head span{white-space:normal;line-height:1.25}
@media(max-width:900px){.cf-form-modal .cf-modal-card{width:calc(100vw - 12px);max-width:none;max-height:calc(100vh - 12px)}.cf-form-modal #cf-form{padding:14px 12px 18px}.cf-form-modal #cf-form .cf-session-photos,.cf-record-view-modal #cf-form .cf-session-photos{margin-left:4px;margin-right:4px}.cf-form-modal-quotations .cf-items-head,.cf-form-modal-quotations .cf-item-row{grid-template-columns:minmax(220px,2.3fr) 88px 96px 116px minmax(170px,1.35fr) 128px 104px 92px 116px 132px 40px!important;min-width:1510px!important;gap:8px}}

/* ClinicFlow 3.2.30: prevent column label overlap in Edit Invoice items grid */
.cf-form-modal-invoices .cf-items{overflow-x:auto;padding-bottom:6px}
.cf-form-modal-invoices .cf-items-head,
.cf-form-modal-invoices .cf-item-row{
  grid-template-columns:minmax(210px,2.2fr) 90px 96px 104px 138px 128px 96px 92px 118px 132px 40px!important;
  min-width:1530px!important;
  gap:10px!important;
}
.cf-form-modal-invoices .cf-items-head span{
  white-space:normal;
  overflow-wrap:anywhere;
  line-height:1.22;
}
@media(max-width:900px){
  .cf-form-modal-invoices .cf-items-head,
  .cf-form-modal-invoices .cf-item-row{
    grid-template-columns:minmax(210px,2.2fr) 90px 96px 104px 138px 128px 96px 92px 118px 132px 40px!important;
    min-width:1530px!important;
    gap:8px!important;
  }
}

/* Clinic settings: logo picker and brand image */
.cf-brand-logo{background:transparent!important;overflow:visible!important;width:56px!important;height:56px!important;border-radius:0!important;flex:0 0 56px!important}
.cf-brand-logo img{display:block;width:100%;height:100%;object-fit:contain;background:transparent!important;border-radius:0!important}
.cf-logo-picker{display:flex;align-items:center;gap:14px;padding:12px;border:1px solid #c7d2d7;background:#f8fbfc}
.cf-logo-preview{width:84px;height:84px;border:1px dashed #9baab2;background:#fff;display:grid;place-items:center;overflow:hidden;color:var(--cf-muted);font-size:10px;text-align:center}
.cf-logo-preview img{width:100%;height:100%;object-fit:contain}
.cf-logo-picker>div:last-child{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.cf-logo-picker small{flex-basis:100%}

/* ClinicFlow 3.2.28: package assignment modal details */
.cf-form-modal-package-assignment .cf-modal-card{width:min(980px,calc(100vw - 36px));max-width:980px}
.cf-package-assign-grid .cf-form-actions{grid-column:1/-1}
.cf-package-intro{padding:10px 12px;border:1px solid #bfd3da;background:#eef8f8;color:#1c4750;border-radius:4px;font-size:13px}
.cf-package-meta{min-height:58px;padding:12px 14px;border:1px solid #bfd3da;background:#f7fbfc;color:#173042;border-radius:6px;line-height:1.55}
.cf-package-summary{display:flex;flex-direction:column;gap:4px}
.cf-package-summary-row{display:flex;align-items:flex-start;gap:8px}
.cf-package-summary-row strong{min-width:145px;font-weight:700;color:#15364a}
.cf-package-warning{margin-top:6px;padding:6px 8px;border-left:3px solid #e3a217;background:#fff8e8;color:#6e4a00;font-size:12px}
.cf-package-empty{color:#5a6b77}
.cf-form-modal-package-assignment .cf-form-actions{display:flex;justify-content:flex-end}
.cf-form-modal-package-assignment .cf-form-actions .cf-btn{min-width:154px}
@media(max-width:620px){.cf-package-summary-row{flex-direction:column;gap:2px}.cf-package-summary-row strong{min-width:0}}
.cf-login-logo img,.cf-login-mobile-logo img{width:100%;height:100%;object-fit:contain;border-radius:inherit;background:#fff}
@media(max-width:620px){.cf-logo-picker{align-items:flex-start}.cf-logo-picker>div:last-child{align-items:flex-start;flex-direction:column}}
.cf-followup-reschedule-choice{padding:11px 12px;border:1px solid #b9c9cf;background:#f5fbfb}
.cf-followup-reschedule-choice small{display:block;margin-top:6px}
.cf-followup-reschedule-fields{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:12px;border:1px solid #b9c9cf;background:#fbfdfd}
.cf-followup-reschedule-fields[hidden]{display:none!important}
@media(max-width:620px){.cf-followup-reschedule-fields{grid-template-columns:1fr}}

/* v3.2.28: compact and consistent list filter toolbar */
.cf-top-actions .cf-filter-stack{gap:8px!important}
.cf-top-actions .cf-filter-row{gap:8px!important}
.cf-top-actions .cf-list-search{height:40px!important;min-height:40px!important;max-width:460px!important}
.cf-top-actions .cf-list-filter{height:40px!important;min-height:40px!important;min-width:150px!important}
.cf-top-actions .cf-filter-date{font-size:11px!important}
.cf-top-actions .cf-filter-date input{height:40px!important;min-height:40px!important}
.cf-top-actions .cf-secondary,.cf-top-actions .cf-btn{height:40px!important;min-height:40px!important}
body.cf-pharmacy-page #cf-top-actions .ph-top-search{height:40px!important;min-height:40px!important}
body.cf-pharmacy-page #cf-top-actions .ph-top-filter{height:40px!important;min-height:40px!important}
@media(max-width:900px){
  .cf-top-actions .cf-list-search{max-width:none!important;flex:1 1 100%!important}
  .cf-top-actions .cf-list-filter{flex:1 1 160px!important;min-width:140px!important}
  .cf-top-actions .cf-filter-date{flex:1 1 170px!important;min-width:150px!important}
}

/* v3.2.29: sticky desktop filters and mobile funnel panel */
.cf-sidebar-foot{display:flex;flex-direction:column;gap:10px;opacity:.92}
.cf-sidebar-logout{margin-left:0!important;display:inline-flex;justify-content:center;width:100%;background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.3);color:#fff!important}
.cf-sidebar-logout:hover{background:rgba(255,255,255,.16);border-color:rgba(255,255,255,.45);color:#fff!important}
.cf-filter-shell,.ph-filter-shell{width:100%}
.cf-filter-toggle{display:none!important}
.cf-filter-extra{display:flex;align-items:center;gap:8px;min-width:0}
.cf-filter-toggle{position:relative!important;padding:0 10px!important;min-width:42px!important}
.cf-filter-toggle-icon{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px}
.cf-filter-toggle-icon svg{width:18px;height:18px;fill:currentColor}
.cf-filter-count{position:absolute;right:-5px;top:-6px;min-width:17px;height:17px;padding:0 4px;border-radius:999px;background:var(--cf-primary);color:#fff;font-size:10px;line-height:17px;font-weight:700;text-align:center}
.cf-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.cf-filter-singleline{display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:8px!important;width:100%!important}
.cf-filter-singleline .cf-list-search,.cf-filter-singleline .ph-top-search{flex:1 1 280px!important;min-width:180px!important;max-width:none!important}
.cf-filter-singleline .cf-list-filter,.cf-filter-singleline .ph-top-filter{flex:0 1 150px!important;min-width:120px!important}
.cf-filter-singleline .cf-filter-date{flex:0 1 200px!important;min-width:150px!important;display:grid!important;grid-template-columns:max-content minmax(0,1fr)!important;column-gap:8px!important}
.cf-filter-singleline .cf-filter-date input{width:100%!important;min-width:0!important}
@media (min-width:1025px){
  .cf-topbar{position:sticky;top:0;z-index:120;background:#fff;border-bottom:1px solid #d7e1e6}
}
@media (max-width:1024px){
  .cf-filter-toggle{display:inline-flex!important}
  .cf-filter-extra{display:none!important}
  .cf-filter-shell.open .cf-filter-extra,.ph-filter-shell.open .cf-filter-extra{display:flex!important;flex-wrap:wrap!important;width:100%;margin-top:8px}
  .cf-filter-singleline{flex-wrap:wrap!important}
  .cf-filter-singleline .cf-list-filter,.cf-filter-singleline .ph-top-filter,.cf-filter-singleline .cf-filter-date{flex:1 1 100%!important;max-width:none!important}
}

/* ClinicFlow 3.2.31: Pharmacy form UI redesign */
body.cf-pharmacy-page .ph-form-modal .cf-modal-card{width:min(860px,calc(100vw - 32px));max-height:88vh;overflow:hidden;display:flex;flex-direction:column;border-radius:8px;box-shadow:0 18px 55px rgba(10,25,35,.28)}
body.cf-pharmacy-page .ph-form-modal .cf-modal-head{flex:0 0 auto;padding:16px 20px;background:#fff}
body.cf-pharmacy-page .ph-form-modal .cf-modal-head h2{font-size:18px;font-weight:700;color:#173042}
body.cf-pharmacy-page .ph-form-modal .cf-modal-close{width:28px;height:28px;background:transparent!important;color:#63737d!important;border:0!important;font-size:24px;font-weight:500}
body.cf-pharmacy-page .ph-form-modal #cf-form{display:flex;flex-direction:column;min-height:0;overflow:hidden;padding:0!important}
body.cf-pharmacy-page .ph-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 18px;padding:20px;overflow-y:auto;background:#f7f9fa}
body.cf-pharmacy-page .ph-form-group{gap:7px!important;min-width:0}
body.cf-pharmacy-page .ph-form-group.full{grid-column:1/-1}
body.cf-pharmacy-page .ph-form-group>label{font-size:12px!important;font-weight:700!important;color:#263a46;line-height:1.3;margin:0}
body.cf-pharmacy-page .ph-form-group input,body.cf-pharmacy-page .ph-form-group select,body.cf-pharmacy-page .ph-form-group textarea{height:42px!important;min-height:42px!important;padding:9px 11px!important;border:1px solid #aebdc5!important;border-radius:4px!important;background:#fff!important;font-size:13px!important;line-height:1.3!important;box-shadow:none!important}
body.cf-pharmacy-page .ph-form-group textarea{height:auto!important;min-height:92px!important;resize:vertical}
body.cf-pharmacy-page .ph-form-group input:focus,body.cf-pharmacy-page .ph-form-group select:focus,body.cf-pharmacy-page .ph-form-group textarea:focus{outline:2px solid rgba(34,179,168,.18)!important;border-color:var(--cf-primary)!important}
body.cf-pharmacy-page .ph-form-group.ph-calculated input{background:#eef3f5!important;color:#43545e!important;cursor:not-allowed}
body.cf-pharmacy-page .ph-form-footer{display:flex!important;justify-content:flex-end!important;align-items:center;gap:10px;padding:14px 20px!important;border-top:1px solid #d5dfe4;background:#fff;position:sticky;bottom:0;z-index:4;text-align:right}
body.cf-pharmacy-page .ph-form-footer .cf-btn,body.cf-pharmacy-page .ph-form-footer .cf-secondary{min-width:112px;height:40px!important;padding:9px 18px!important}
body.cf-pharmacy-page .ph-toggle{display:inline-flex!important;align-items:center;gap:9px;min-height:42px;width:max-content;cursor:pointer}
body.cf-pharmacy-page .ph-toggle>input{position:absolute!important;opacity:0!important;width:1px!important;height:1px!important}
body.cf-pharmacy-page .ph-toggle-track{position:relative;width:42px;height:23px;border-radius:20px;background:#aab7be;transition:.18s}
body.cf-pharmacy-page .ph-toggle-track:after{content:"";position:absolute;width:17px;height:17px;left:3px;top:3px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:.18s}
body.cf-pharmacy-page .ph-toggle input:checked+.ph-toggle-track{background:var(--cf-primary)}
body.cf-pharmacy-page .ph-toggle input:checked+.ph-toggle-track:after{transform:translateX(19px)}
body.cf-pharmacy-page .ph-toggle-text{font-size:12px;font-weight:600;color:#43545e}
body.cf-pharmacy-page .ph-section-title{font-size:14px;font-weight:700;color:#173042;padding-bottom:9px;border-bottom:1px solid #cfd9de;margin-bottom:12px}
body.cf-pharmacy-page .ph-items-field{padding:15px;border:1px solid #c4d1d7;background:#fff;border-radius:5px}
body.cf-pharmacy-page #ph-items{display:flex;flex-direction:column;gap:10px;overflow-x:auto;padding-bottom:5px}
body.cf-pharmacy-page .ph-line{display:grid;grid-template-columns:minmax(190px,1.7fr) repeat(8,minmax(105px,1fr)) 36px;gap:8px;align-items:end;min-width:1180px;padding:10px;border:1px solid #d1dce1;background:#f9fbfc;border-radius:4px}
body.cf-pharmacy-page .ph-line-field{display:flex;flex-direction:column;gap:5px;min-width:0}
body.cf-pharmacy-page .ph-line-label{font-size:10px;font-weight:700;color:#52636d;white-space:nowrap}
body.cf-pharmacy-page .ph-line input,body.cf-pharmacy-page .ph-line select{height:38px!important;min-height:38px!important;width:100%;border:1px solid #aebdc5;border-radius:3px;background:#fff;padding:7px 8px;font:inherit;font-size:12px}
body.cf-pharmacy-page .ph-remove{width:34px;height:38px;border:0;border-radius:3px;background:#c0392b;color:#fff;font-size:21px;line-height:1;cursor:pointer}
body.cf-pharmacy-page .ph-add-line{margin-top:10px}
body.cf-pharmacy-page .ph-inline-check{height:38px;display:flex;align-items:center;gap:6px;font-size:12px;font-weight:600}
body.cf-pharmacy-page .ph-inline-check input{width:auto!important;height:auto!important;min-height:0!important}
body.cf-pharmacy-page .ph-form-purchases .cf-modal-card,body.cf-pharmacy-page .ph-form-issues .cf-modal-card,body.cf-pharmacy-page .ph-form-returns .cf-modal-card,body.cf-pharmacy-page .ph-form-stock-adjustments .cf-modal-card{width:min(1320px,calc(100vw - 24px));max-height:92vh}
@media(max-width:700px){
 body.cf-pharmacy-page .ph-form-modal{padding:6px!important;align-items:flex-start!important}
 body.cf-pharmacy-page .ph-form-modal .cf-modal-card{width:100%!important;max-height:calc(100vh - 12px)!important;border-radius:5px}
 body.cf-pharmacy-page .ph-form-grid{grid-template-columns:1fr;gap:13px;padding:14px 12px}
 body.cf-pharmacy-page .ph-form-group.full{grid-column:auto}
 body.cf-pharmacy-page .ph-form-footer{padding:10px 12px!important}
 body.cf-pharmacy-page .ph-form-footer .cf-secondary,body.cf-pharmacy-page .ph-form-footer .cf-btn{flex:1;min-width:0}
 body.cf-pharmacy-page .ph-items-field{padding:10px}
 body.cf-pharmacy-page #ph-items{overflow:visible}
 body.cf-pharmacy-page .ph-line{display:grid;grid-template-columns:1fr 1fr;min-width:0;gap:10px;padding:12px}
 body.cf-pharmacy-page .ph-line-field:first-child{grid-column:1/-1}
 body.cf-pharmacy-page .ph-remove{grid-column:1/-1;width:100%;height:36px;font-size:0}
 body.cf-pharmacy-page .ph-remove:after{content:"Remove Item";font-size:12px;font-weight:700}
}


/* ClinicFlow 3.2.32: Pharmacy opening quantity and purchase-item controls */
body.cf-pharmacy-page .ph-items-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
body.cf-pharmacy-page .ph-items-heading .ph-section-title{margin:0;padding:0;border:0}
body.cf-pharmacy-page .ph-items-help{font-size:12px;color:#60717b;margin-bottom:12px}
body.cf-pharmacy-page .ph-items-heading .ph-add-line{display:inline-flex!important;align-items:center;justify-content:center;visibility:visible!important;opacity:1!important;min-width:155px;height:38px!important;margin:0!important}
@media(max-width:700px){body.cf-pharmacy-page .ph-items-heading{align-items:stretch;flex-direction:column}body.cf-pharmacy-page .ph-items-heading .ph-add-line{width:100%}}


/* ClinicFlow 3.2.33: wider purchase form and compact quick-add controls */
body.cf-pharmacy-page .ph-form-purchases .cf-modal-card{width:calc(100vw - 16px)!important;max-width:1760px!important;max-height:94vh!important}
body.cf-pharmacy-page .ph-form-purchases .ph-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
body.cf-pharmacy-page .ph-form-purchases .ph-items-field{padding:14px 12px}
body.cf-pharmacy-page .ph-form-purchases #ph-items{overflow-x:visible!important}
body.cf-pharmacy-page .ph-form-purchases .ph-line{min-width:0!important;width:100%;grid-template-columns:minmax(220px,2.2fr) minmax(90px,.8fr) minmax(90px,.85fr) minmax(90px,.85fr) minmax(105px,.95fr) minmax(105px,.95fr) minmax(75px,.65fr) 34px;gap:7px;padding:10px 8px}
body.cf-pharmacy-page .ph-lookup-inline,body.cf-pharmacy-page .ph-item-select-inline{display:flex;align-items:stretch;gap:5px;min-width:0;width:100%}
body.cf-pharmacy-page .ph-lookup-inline select,body.cf-pharmacy-page .ph-item-select-inline select{flex:1 1 auto;min-width:0;width:auto!important}
body.cf-pharmacy-page .ph-quick-add{flex:0 0 34px;width:34px;min-width:34px;height:42px;border:1px solid var(--cf-primary);border-radius:4px;background:var(--cf-primary);color:#fff;font-size:20px;font-weight:700;line-height:1;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0!important}
body.cf-pharmacy-page .ph-item-select-inline .ph-quick-add{height:38px;flex-basis:32px;width:32px;min-width:32px}
body.cf-pharmacy-page .ph-quick-add:hover,body.cf-pharmacy-page .ph-quick-add:focus{filter:brightness(.94);outline:2px solid rgba(34,179,168,.2)}
body.cf-pharmacy-page .ph-quick-modal{position:fixed;inset:0;z-index:1800;background:rgba(17,32,42,.56);display:flex;align-items:center;justify-content:center;padding:16px}
body.cf-pharmacy-page .ph-quick-card{width:min(560px,calc(100vw - 24px));max-height:calc(100vh - 32px);overflow:auto;background:#fff;border-radius:7px;box-shadow:0 20px 65px rgba(0,0,0,.3)}
body.cf-pharmacy-page .ph-quick-head{display:flex;align-items:center;justify-content:space-between;padding:15px 18px;border-bottom:1px solid #d5dfe4}
body.cf-pharmacy-page .ph-quick-head h3{margin:0;font-size:17px;color:#173042}
body.cf-pharmacy-page .ph-quick-close{border:0;background:transparent;color:#657782;font-size:24px;line-height:1;cursor:pointer}
body.cf-pharmacy-page .ph-quick-body{display:grid;grid-template-columns:1fr 1fr;gap:14px 16px;padding:18px;background:#f7f9fa}
body.cf-pharmacy-page .ph-quick-body>label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:700;color:#263a46}
body.cf-pharmacy-page .ph-quick-body input,body.cf-pharmacy-page .ph-quick-body select{height:42px;border:1px solid #aebdc5;border-radius:4px;background:#fff;padding:8px 10px;font-size:13px}
body.cf-pharmacy-page .ph-quick-body>label:first-child{grid-column:1/-1}
body.cf-pharmacy-page .ph-quick-toggle{flex-direction:row!important;align-items:center!important;align-self:end;min-height:42px}
body.cf-pharmacy-page .ph-quick-toggle input{width:auto;height:auto}
body.cf-pharmacy-page .ph-quick-footer{display:flex;justify-content:flex-end;gap:10px;padding:13px 18px;border-top:1px solid #d5dfe4}
@media(max-width:1250px) and (min-width:701px){body.cf-pharmacy-page .ph-form-purchases .ph-line{grid-template-columns:minmax(185px,2fr) minmax(76px,.7fr) repeat(2,minmax(72px,.7fr)) repeat(2,minmax(88px,.82fr)) minmax(62px,.58fr) 32px;gap:5px}body.cf-pharmacy-page .ph-form-purchases .ph-line input,body.cf-pharmacy-page .ph-form-purchases .ph-line select{padding-left:6px;padding-right:6px;font-size:11px}}
@media(max-width:700px){body.cf-pharmacy-page .ph-form-purchases .cf-modal-card{width:100%!important}body.cf-pharmacy-page .ph-form-purchases .ph-line{grid-template-columns:1fr 1fr!important}body.cf-pharmacy-page .ph-form-purchases #ph-items{overflow:visible!important}body.cf-pharmacy-page .ph-quick-body{grid-template-columns:1fr}body.cf-pharmacy-page .ph-quick-body>label:first-child{grid-column:auto}}

/* ClinicFlow 3.2.34: consistent compact quick-add buttons for pharmacy masters */
.ph-lookup-inline.has-quick-add,
.ph-item-select-inline { align-items: stretch; }
.ph-lookup-inline.has-quick-add > select,
.ph-item-select-inline > select { min-width: 0; flex: 1 1 auto; }
.ph-quick-add { flex: 0 0 36px; width: 36px; min-width: 36px; padding: 0; }
.ph-quick-modal + .ph-quick-modal { z-index: 100003; }
@media (max-width: 640px){
 .ph-quick-add { flex-basis: 34px; width: 34px; min-width: 34px; }
}

/* Pharmacy v3.2.37: never hide save/validation errors behind the modal */
.ph-form-message{margin:0 18px 10px;padding:10px 12px;border:1px solid #cbd5e1;border-radius:6px;background:#f8fafc;font-size:13px;font-weight:600}
.ph-form-message.bad{border-color:#ef4444;background:#fef2f2;color:#991b1b}
.ph-form-message.good{border-color:#10b981;background:#ecfdf5;color:#065f46}
.ph-form-message[hidden]{display:none!important}

/* Pharmacy v3.2.38: keep required asterisk on the same line as quick-add field label */
body.cf-pharmacy-page .ph-quick-label{display:inline-flex;align-items:baseline;gap:3px;width:max-content;max-width:100%;line-height:1.25}
body.cf-pharmacy-page .ph-quick-label .cf-required{display:inline!important;width:auto!important;margin:0!important;line-height:inherit!important}


/* ClinicFlow Pharmacy v3.2.47: non-collapsing Purchase / Issue item entry rows */
body.cf-pharmacy-page .ph-form-purchases .ph-items-field,
body.cf-pharmacy-page .ph-form-issues .ph-items-field{overflow:visible!important;}
body.cf-pharmacy-page .ph-form-purchases #ph-items,
body.cf-pharmacy-page .ph-form-issues #ph-items{display:block!important;width:100%!important;max-width:100%!important;min-height:82px!important;height:auto!important;overflow:visible!important;padding:0!important;}
body.cf-pharmacy-page .ph-form-purchases #ph-items>.ph-line,
body.cf-pharmacy-page .ph-form-issues #ph-items>.ph-line{display:grid!important;visibility:visible!important;opacity:1!important;position:relative!important;height:auto!important;min-height:72px!important;max-height:none!important;overflow:visible!important;margin:10px 0 0!important;background:#f8fbfc!important;border:1px solid #cbd6dc!important;border-radius:4px!important;box-sizing:border-box!important;}
body.cf-pharmacy-page .ph-form-purchases #ph-items>.ph-line{grid-template-columns:minmax(210px,2fr) minmax(85px,.75fr) minmax(85px,.75fr) minmax(85px,.75fr) minmax(100px,.9fr) minmax(100px,.9fr) minmax(70px,.6fr) 34px!important;min-width:0!important;width:100%!important;}
body.cf-pharmacy-page .ph-form-issues #ph-items>.ph-line{grid-template-columns:minmax(240px,2fr) minmax(95px,.8fr) minmax(95px,.8fr) minmax(105px,.9fr) minmax(80px,.7fr) 34px!important;min-width:0!important;width:100%!important;}
body.cf-pharmacy-page .ph-form-purchases #ph-items>.ph-line .ph-line-field,
body.cf-pharmacy-page .ph-form-issues #ph-items>.ph-line .ph-line-field{display:flex!important;visibility:visible!important;opacity:1!important;min-height:52px!important;}
@media(max-width:700px){
 body.cf-pharmacy-page .ph-form-purchases #ph-items>.ph-line,
 body.cf-pharmacy-page .ph-form-issues #ph-items>.ph-line{grid-template-columns:1fr 1fr!important;min-height:0!important;}
 body.cf-pharmacy-page .ph-form-purchases #ph-items>.ph-line .ph-line-field:first-child,
 body.cf-pharmacy-page .ph-form-issues #ph-items>.ph-line .ph-line-field:first-child{grid-column:1/-1!important;}
}

/* Pharmacy v3.2.48: unified multi-item transaction container */
body.cf-pharmacy-page .ph-form-purchases .ph-items-help,
body.cf-pharmacy-page .ph-form-issues .ph-items-help{display:none!important;}
body.cf-pharmacy-page .ph-form-purchases #ph-items,
body.cf-pharmacy-page .ph-form-issues #ph-items{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-height:0!important;
  overflow:visible!important;
  padding:0!important;
  margin-top:12px!important;
  border:1px solid #cbd6dc!important;
  border-radius:5px!important;
  background:#fff!important;
}
body.cf-pharmacy-page .ph-form-purchases #ph-items>.ph-line,
body.cf-pharmacy-page .ph-form-issues #ph-items>.ph-line{
  margin:0!important;
  padding:10px 8px!important;
  border:0!important;
  border-bottom:1px solid #d9e2e7!important;
  border-radius:0!important;
  background:#fff!important;
  box-shadow:none!important;
}
body.cf-pharmacy-page .ph-form-purchases #ph-items>.ph-line:last-child,
body.cf-pharmacy-page .ph-form-issues #ph-items>.ph-line:last-child{
  border-bottom:0!important;
}
@media(max-width:700px){
  body.cf-pharmacy-page .ph-form-purchases #ph-items,
  body.cf-pharmacy-page .ph-form-issues #ph-items{padding:0!important;}
  body.cf-pharmacy-page .ph-form-purchases #ph-items>.ph-line,
  body.cf-pharmacy-page .ph-form-issues #ph-items>.ph-line{padding:12px 10px!important;}
}


/* Pharmacy Return form: issue-driven item table */
body.cf-pharmacy-page .ph-form-returns .ph-items-field{padding:14px 12px!important;overflow:visible!important;}
body.cf-pharmacy-page .ph-form-returns #ph-items{display:block!important;width:100%!important;max-width:100%!important;overflow:visible!important;padding:0!important;min-height:72px!important;}
body.cf-pharmacy-page .ph-form-returns #ph-items>.ph-line{display:grid!important;grid-template-columns:minmax(220px,2fr) minmax(85px,.7fr) repeat(4,minmax(95px,.8fr)) 34px!important;gap:8px!important;align-items:end!important;min-width:0!important;width:100%!important;margin:0!important;padding:10px 8px!important;border:0!important;border-bottom:1px solid #d7e0e5!important;border-radius:0!important;background:#fff!important;}
body.cf-pharmacy-page .ph-form-returns #ph-items>.ph-line:last-child{border-bottom:0!important;}
body.cf-pharmacy-page .ph-form-returns .ph-line-field{display:flex!important;flex-direction:column!important;gap:5px!important;min-width:0!important;}
body.cf-pharmacy-page .ph-form-returns .ph-line-label{font-size:11px!important;font-weight:700!important;color:#455863!important;}
body.cf-pharmacy-page .ph-form-returns .ph-line input{height:38px!important;min-height:38px!important;width:100%!important;border:1px solid #aebdc5!important;border-radius:3px!important;background:#fff!important;padding:7px 8px!important;}
body.cf-pharmacy-page .ph-form-returns .ph-line input[readonly]{background:#f4f7f8!important;color:#33454f!important;}
body.cf-pharmacy-page .ph-form-returns .ph-empty-items{padding:18px 12px;border:1px dashed #bccbd3;border-radius:4px;background:#fafcfd;color:#64757e;text-align:center;}
@media(max-width:700px){body.cf-pharmacy-page .ph-form-returns #ph-items>.ph-line{grid-template-columns:1fr 1fr!important;}body.cf-pharmacy-page .ph-form-returns #ph-items>.ph-line .ph-line-field:first-of-type{grid-column:1/-1!important;}}

/* v3.2.57: Return rows include removable item action; partial return quantities remain allowed. */
body.cf-pharmacy-page .ph-form-returns .ph-remove{align-self:end!important;width:34px!important;min-width:34px!important;height:38px!important;}
@media(max-width:700px){body.cf-pharmacy-page .ph-form-returns .ph-remove{grid-column:2!important;justify-self:end!important;}}

/* ClinicFlow 3.2.58: clear Stock Adjustment item table */
body.cf-pharmacy-page .ph-form-stock-adjustments .ph-items-field{padding:14px 12px!important;overflow:visible!important;}
body.cf-pharmacy-page .ph-form-stock-adjustments #ph-items{display:block!important;width:100%!important;max-width:100%!important;overflow:visible!important;padding:0!important;min-height:72px!important;}
body.cf-pharmacy-page .ph-form-stock-adjustments #ph-items>.ph-line{display:grid!important;grid-template-columns:minmax(240px,2fr) minmax(110px,.85fr) minmax(110px,.85fr) minmax(110px,.85fr) minmax(110px,.85fr) minmax(120px,.95fr) 34px!important;gap:8px!important;align-items:end!important;min-width:0!important;width:100%!important;margin:0!important;padding:10px 8px!important;border:0!important;border-bottom:1px solid #d7e0e5!important;border-radius:0!important;background:#fff!important;}
body.cf-pharmacy-page .ph-form-stock-adjustments #ph-items>.ph-line:last-child{border-bottom:0!important;}
body.cf-pharmacy-page .ph-form-stock-adjustments .ph-line-field{display:flex!important;flex-direction:column!important;gap:5px!important;min-width:0!important;}
body.cf-pharmacy-page .ph-form-stock-adjustments .ph-line-label{font-size:11px!important;font-weight:700!important;color:#455863!important;}
body.cf-pharmacy-page .ph-form-stock-adjustments .ph-line input[readonly]{background:#f4f7f8!important;color:#33454f!important;}
@media(max-width:700px){body.cf-pharmacy-page .ph-form-stock-adjustments #ph-items>.ph-line{grid-template-columns:1fr 1fr!important;}body.cf-pharmacy-page .ph-form-stock-adjustments #ph-items>.ph-line .ph-line-field:first-of-type{grid-column:1/-1!important;}}


/* Pharmacy v3.2.62 - expandable transaction item details */
body.cf-pharmacy-page .ph-expand-row{cursor:pointer;}
body.cf-pharmacy-page .ph-expand-row:hover>td{background:#f4fbfb;}
body.cf-pharmacy-page .ph-expand-row.is-expanded>td{background:#f1f9f9;}
body.cf-pharmacy-page .ph-row-chevron{display:inline-block;width:18px;margin-right:5px;font-size:18px;font-weight:700;line-height:1;vertical-align:-1px;color:#159e99;}
body.cf-pharmacy-page .ph-detail-row>td{padding:0!important;background:#f8fbfc!important;border-top:0!important;}
body.cf-pharmacy-page .ph-detail-panel{padding:12px 16px 16px 28px;border-left:3px solid #27b3ad;}
body.cf-pharmacy-page .ph-detail-scroll{overflow-x:auto;width:100%;}
body.cf-pharmacy-page .ph-detail-table{width:100%;border-collapse:collapse;background:#fff;font-size:12px;}
body.cf-pharmacy-page .ph-detail-table th{padding:9px 10px;text-align:left;font-size:11px;font-weight:700;white-space:nowrap;background:#eef7f7;border:1px solid #c8d8dc;color:#2e4652;}
body.cf-pharmacy-page .ph-detail-table td{padding:9px 10px!important;border:1px solid #d5e0e3!important;background:#fff!important;white-space:nowrap;}
body.cf-pharmacy-page .ph-detail-loading,body.cf-pharmacy-page .ph-detail-empty{padding:10px;color:#687b84;font-size:12px;}
@media(max-width:700px){
 body.cf-pharmacy-page .ph-detail-panel{padding:10px 8px 12px 14px;}
 body.cf-pharmacy-page .ph-detail-table,body.cf-pharmacy-page .ph-detail-table tbody,body.cf-pharmacy-page .ph-detail-table tr,body.cf-pharmacy-page .ph-detail-table td{display:block;width:100%;}
 body.cf-pharmacy-page .ph-detail-table thead{display:none;}
 body.cf-pharmacy-page .ph-detail-table tr{margin-bottom:10px;border:1px solid #d5e0e3;background:#fff;padding:5px 8px;}
 body.cf-pharmacy-page .ph-detail-table td{border:0!important;border-bottom:1px solid #edf1f2!important;padding:7px 4px!important;white-space:normal;}
 body.cf-pharmacy-page .ph-detail-table td:last-child{border-bottom:0!important;}
}


/* Pharmacy v3.2.63 - filters always visible; remove Show Filter button */
body.cf-pharmacy-page .ph-filter-shell .cf-filter-extra{display:flex!important;align-items:center!important;gap:8px!important;min-width:0!important}
body.cf-pharmacy-page .ph-filter-shell .cf-filter-toggle{display:none!important}
@media (max-width:1024px){
  body.cf-pharmacy-page .ph-filter-shell .cf-filter-extra{display:flex!important;flex-wrap:wrap!important;width:100%!important;margin-top:0!important}
}

/* v3.2.70 Sidebar clinic logo */
.cf-brand{min-height:84px;height:84px!important;padding:10px 14px!important;gap:10px!important}
.cf-brand>.cf-brand-logo{width:56px!important;height:56px!important;background:transparent!important;box-shadow:none!important}
.cf-brand>.cf-brand-logo img{width:56px!important;height:56px!important;object-fit:contain!important;background:transparent!important}
@media(max-width:760px){.cf-brand>.cf-brand-logo,.cf-brand>.cf-brand-logo img{width:52px!important;height:52px!important}.cf-brand{min-height:78px;height:78px!important}}

/* v3.2.78 simple login screen */
.cf-login-page-simple{min-height:100vh;background:#fff;display:flex;align-items:center;justify-content:center;padding:24px!important}
.cf-login-page-simple .cf-login-form-panel-simple{width:min(470px,100%);padding:0!important;background:transparent!important;display:block}
.cf-login-page-simple .cf-login-card{width:100%;margin:0 auto}
.cf-login-page-simple .cf-login-card h2{font-size:31px;margin-bottom:8px}
.cf-login-page-simple .cf-login-card>p{margin-bottom:30px}
.cf-login-page-simple .cf-login-mobile-logo,.cf-login-page-simple .cf-login-brand-panel{display:none!important}
@media(max-width:760px){
 .cf-login-page-simple{padding:20px!important;align-items:center}
 .cf-login-page-simple .cf-login-form-panel-simple{width:100%;max-width:430px}
 .cf-login-page-simple .cf-login-card h2{font-size:27px}
 .cf-login-page-simple .cf-login-options{flex-direction:row;align-items:center;gap:12px}
}
@media(max-width:420px){
 .cf-login-page-simple{padding:18px!important}
 .cf-login-page-simple .cf-login-options{font-size:11px}
}

/* v3.2.81: Sidebar hover/active visibility + top controls stay inline */
.cf-sidebar nav a:hover,
.cf-sidebar nav a:focus,
.cf-sidebar nav a.active,
.cf-submenu a:hover,
.cf-submenu a:focus,
.cf-submenu a.active {
  background: var(--cf-primary) !important;
  color: #fff !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.cf-sidebar nav a:hover *,
.cf-sidebar nav a:focus *,
.cf-sidebar nav a.active *,
.cf-submenu a:hover *,
.cf-submenu a:focus *,
.cf-submenu a.active * {
  color: #fff !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.cf-menu-group summary:hover,
.cf-menu-group summary:focus {
  background: var(--cf-primary) !important;
  color: #fff !important;
}
.cf-menu-group summary:hover *,
.cf-menu-group summary:focus * {
  color: #fff !important;
}
@media (min-width: 1025px) {
  #cf-top-actions,
  .cf-top-actions {
    flex-wrap: nowrap !important;
    align-items: center !important;
  }
  .cf-add-wrap {
    margin-left: 0 !important;
    width: auto !important;
    flex: 0 0 auto !important;
    justify-content: flex-start !important;
    align-items: center !important;
  }
}

/* v3.2.82: Pharmacy top-filter alignment fix (Purchase and other pharmacy lists) */
@media (min-width:1025px){
  body.cf-pharmacy-page #cf-top-actions{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:nowrap!important;min-width:0!important;width:100%!important;}
  body.cf-pharmacy-page #cf-top-actions .ph-filter-shell{width:auto!important;min-width:0!important;flex:1 1 auto!important;}
  body.cf-pharmacy-page #cf-top-actions .cf-filter-singleline{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:nowrap!important;min-width:0!important;}
  body.cf-pharmacy-page #cf-top-actions .ph-top-search{flex:1 1 260px!important;min-width:180px!important;max-width:none!important;}
  body.cf-pharmacy-page #cf-top-actions .cf-filter-extra{display:flex!important;align-items:center!important;gap:8px!important;flex:0 1 auto!important;min-width:0!important;flex-wrap:nowrap!important;}
  body.cf-pharmacy-page #cf-top-actions .ph-list-filter{flex:0 1 150px!important;min-width:125px!important;max-width:175px!important;}
  body.cf-pharmacy-page #cf-top-actions .cf-filter-date{display:flex!important;align-items:center!important;gap:6px!important;flex:0 1 190px!important;min-width:165px!important;white-space:nowrap!important;}
  body.cf-pharmacy-page #cf-top-actions .cf-filter-date span{flex:0 0 auto!important;white-space:nowrap!important;}
  body.cf-pharmacy-page #cf-top-actions .cf-filter-date input{flex:1 1 auto!important;width:125px!important;min-width:110px!important;max-width:140px!important;}
  body.cf-pharmacy-page #cf-top-actions .ph-add-btn{flex:0 0 auto!important;margin:0!important;height:40px!important;}
}
@media (min-width:1025px) and (max-width:1350px){
  body.cf-pharmacy-page #cf-top-actions{flex-wrap:wrap!important;}
  body.cf-pharmacy-page #cf-top-actions .ph-filter-shell{flex:1 1 calc(100% - 120px)!important;}
  body.cf-pharmacy-page #cf-top-actions .cf-filter-singleline{flex-wrap:wrap!important;}
  body.cf-pharmacy-page #cf-top-actions .ph-top-search{flex:1 1 260px!important;}
  body.cf-pharmacy-page #cf-top-actions .cf-filter-extra{flex:1 1 auto!important;flex-wrap:wrap!important;}
}


/* v3.2.83: Pharmacy Purchase top bar - compact, aligned and non-overlapping like Returns */
@media (min-width:1025px){
  body.cf-pharmacy-route-pharmacy-purchases .cf-topbar{
    padding-left:24px!important;
    padding-right:24px!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions{
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
    flex-wrap:nowrap!important;
    width:100%!important;
    min-width:0!important;
    justify-content:flex-start!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .ph-filter-shell{
    flex:1 1 auto!important;
    width:auto!important;
    min-width:0!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .cf-filter-singleline{
    display:grid!important;
    grid-template-columns:minmax(230px,1fr) auto!important;
    align-items:center!important;
    gap:10px!important;
    width:100%!important;
    min-width:0!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .ph-top-search{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:40px!important;
    margin:0!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .cf-filter-extra{
    display:grid!important;
    grid-template-columns:135px 145px 145px 166px 166px!important;
    align-items:center!important;
    gap:8px!important;
    width:auto!important;
    min-width:0!important;
    flex-wrap:nowrap!important;
    margin:0!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .ph-list-filter:not([type="date"]){
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:40px!important;
    padding:0 9px!important;
    text-overflow:ellipsis!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .cf-filter-date{
    display:grid!important;
    grid-template-columns:auto minmax(96px,1fr)!important;
    align-items:center!important;
    gap:6px!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    white-space:nowrap!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .cf-filter-date span{
    display:block!important;
    white-space:nowrap!important;
    font-size:11px!important;
    line-height:1!important;
    color:var(--cf-muted)!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .cf-filter-date input{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:40px!important;
    padding:7px 8px!important;
    margin:0!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .ph-add-btn{
    flex:0 0 auto!important;
    height:40px!important;
    margin:0!important;
    padding:0 14px!important;
    align-self:center!important;
  }
}

/* If available desktop width becomes too narrow, wrap as two clean rows rather than squeeze/overlap. */
@media (min-width:1025px) and (max-width:1180px){
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions{
    flex-wrap:wrap!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .ph-filter-shell{
    flex:1 1 100%!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .cf-filter-singleline{
    grid-template-columns:minmax(220px,1fr)!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .cf-filter-extra{
    grid-template-columns:repeat(3,minmax(135px,1fr)) repeat(2,minmax(160px,1fr))!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .ph-add-btn{
    margin-left:auto!important;
  }
}

/* v3.2.84: Pharmacy Purchases top bar compact single-line layout */
@media (min-width:1025px){
  body.cf-pharmacy-route-pharmacy-purchases .cf-topbar{
    padding:12px 18px!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
    column-gap:8px!important;
    width:100%!important;
    min-width:0!important;
    flex-wrap:nowrap!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .ph-filter-shell{
    min-width:0!important;
    width:100%!important;
    margin:0!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .cf-filter-singleline{
    display:grid!important;
    grid-template-columns:minmax(200px,1.65fr) minmax(105px,.78fr) minmax(115px,.82fr) minmax(115px,.82fr) minmax(130px,.95fr) minmax(130px,.95fr)!important;
    align-items:center!important;
    gap:7px!important;
    width:100%!important;
    min-width:0!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .ph-top-search,
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .ph-list-filter,
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .ph-add-btn{
    height:38px!important;
    min-height:38px!important;
    font-size:12px!important;
    line-height:1.2!important;
    box-sizing:border-box!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .ph-top-search{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    padding:7px 10px!important;
    margin:0!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .cf-filter-extra{
    display:contents!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .ph-list-filter:not([type="date"]){
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    padding:0 24px 0 8px!important;
    font-size:12px!important;
    text-overflow:ellipsis!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .cf-filter-date{
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr)!important;
    align-items:center!important;
    gap:4px!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    white-space:nowrap!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .cf-filter-date span{
    display:block!important;
    margin:0!important;
    font-size:10px!important;
    line-height:1!important;
    white-space:nowrap!important;
    color:var(--cf-muted)!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .cf-filter-date input{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:38px!important;
    padding:5px 6px!important;
    margin:0!important;
    font-size:11px!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .ph-add-btn{
    grid-column:2!important;
    grid-row:1!important;
    margin:0!important;
    padding:0 12px!important;
    min-width:96px!important;
    white-space:nowrap!important;
    align-self:center!important;
    font-size:12px!important;
  }
}

/* Only when the actual content area is too narrow, use two clean rows instead of overlap. */
@media (min-width:1025px) and (max-width:1120px){
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions{
    grid-template-columns:1fr auto!important;
    row-gap:7px!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .cf-filter-singleline{
    grid-template-columns:minmax(190px,1.4fr) repeat(3,minmax(105px,.8fr))!important;
  }
  body.cf-pharmacy-route-pharmacy-purchases #cf-top-actions .cf-filter-date{
    grid-column:auto!important;
  }
}

/* v3.2.86: consistent export controls for every main tabular list view */
.cf-table-export-bar{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:8px;
  margin:0 0 12px;
  flex-wrap:wrap;
}
.cf-table-export-bar .cf-btn{
  white-space:nowrap;
  min-height:34px;
  padding:7px 12px;
  font-size:12px;
}
@media (max-width:700px){
  .cf-table-export-bar{justify-content:flex-start;}
}

/* v3.2.87: visible export bar for every main table */
.cf-table-export-bar{display:flex!important;gap:8px!important;justify-content:flex-end!important;align-items:center!important;margin:0 0 10px!important;visibility:visible!important;opacity:1!important;}
.cf-table-export-bar .cf-btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:34px!important;white-space:nowrap!important;}
@media(max-width:700px){.cf-table-export-bar{justify-content:flex-start!important;flex-wrap:wrap!important;}}


/* ClinicFlow v3.2.90: Before & After comparison */
.cf-before-after-view{display:flex;flex-direction:column;gap:18px;padding:4px 2px 18px}
.cf-before-after-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-end;padding:14px 16px;border:1px solid #d9e7e6;border-radius:10px;background:#f8fbfb}
.cf-before-after-head>div{display:flex;flex-direction:column;gap:4px}.cf-before-after-head strong{font-size:18px}.cf-before-after-head span{color:#5f6d6d}
.cf-before-after-head label{font-size:12px;font-weight:600}.cf-before-after-head select{display:block;margin-top:5px;min-width:220px;height:38px;border:1px solid #a9c7c5;border-radius:7px;background:#fff;padding:0 10px}
.cf-before-after-meta{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:12px;color:#536564}
.cf-ba-angle{border:1px solid #dbe6e5;border-radius:10px;padding:14px}.cf-ba-angle h4{margin:0 0 12px;color:#087f7a}
.cf-ba-pair{display:grid;grid-template-columns:1fr 1fr;gap:16px}.cf-ba-card{position:relative;border:1px solid #e0e8e8;border-radius:9px;overflow:hidden;background:#f8fafa;min-height:220px}
.cf-ba-card img{display:block;width:100%;height:320px;object-fit:contain;background:#111}.cf-ba-label{position:absolute;z-index:2;top:10px;left:10px;background:#087f7a;color:#fff;font-size:12px;font-weight:700;padding:5px 9px;border-radius:20px}
.cf-ba-missing{height:220px;display:flex;align-items:center;justify-content:center;color:#879392}
@media(max-width:700px){.cf-before-after-head{align-items:stretch;flex-direction:column}.cf-before-after-head select{width:100%;min-width:0}.cf-ba-pair{grid-template-columns:1fr}.cf-ba-card img{height:260px}}

/* ClinicFlow 3.2.91: Before & After action alignment */
.cf-row-actions .cf-btn.small.cf-action-compare,
.cf-table td .cf-btn.small.cf-action-compare,
button.cf-btn.small.cf-action-compare{
  width:auto!important;
  min-width:86px!important;
  height:32px!important;
  padding:6px 12px!important;
  margin:2px 4px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  white-space:nowrap!important;
  background:#10263a!important;
  color:#fff!important;
  border:1px solid #10263a!important;
  border-radius:6px!important;
  line-height:1!important;
  box-shadow:none!important;
}
.cf-row-actions .cf-btn.small.cf-action-compare:hover,
.cf-row-actions .cf-btn.small.cf-action-compare:focus{
  background:#149c9a!important;
  border-color:#149c9a!important;
  color:#fff!important;
}
.cf-table td.cf-row-actions{padding-top:8px!important;padding-bottom:8px!important;vertical-align:middle!important;}

/* ClinicFlow 3.2.92: clean follow-up action spacing */
.cf-followup-grid .cf-form-actions{display:flex;justify-content:flex-end;align-items:center;gap:14px;padding-top:10px}.cf-followup-grid .cf-form-actions .cf-btn{margin:0;min-width:128px}

/* v3.3.00: keep full-text Quotation and Invoice actions separate and readable */
.cf-row-actions .cf-btn.small.cf-action-quotation-text,
.cf-row-actions .cf-btn.small.cf-action-invoice {
  width:auto!important;
  min-width:auto!important;
  max-width:none!important;
  height:auto!important;
  min-height:24px!important;
  padding:0 3px!important;
  margin:0!important;
  flex:0 0 auto!important;
  white-space:nowrap!important;
  line-height:1.35!important;
}
.cf-row-actions .cf-btn.small.cf-action-quotation-text {
  color:#20b2aa!important;
  font-weight:700!important;
}
.cf-row-actions .cf-btn.small.cf-action-invoice {
  color:#148f88!important;
  font-weight:700!important;
}
.cf-row-actions .cf-btn.small.cf-action-quotation-text + .cf-btn.small.cf-action-invoice {
  margin-left:10px!important;
}
.cf-table th:last-child,
.cf-table td:last-child {
  min-width:330px!important;
}
.cf-row-actions {
  column-gap:10px!important;
}
@media(max-width:768px){
  .cf-table th:last-child,
  .cf-table td:last-child{min-width:330px!important}
  .cf-row-actions{column-gap:10px!important}
}

/* v3.3.01: keep full-text Quotation action inside Actions cell */
.cf-row-actions .cf-btn.small.cf-action-quote,
.cf-table td .cf-btn.small.cf-action-quote,
button.cf-btn.small.cf-action-quote {
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 auto!important;
  width:auto!important;
  min-width:86px!important;
  max-width:none!important;
  height:auto!important;
  min-height:24px!important;
  padding:2px 10px!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#20b2aa!important;
  font-weight:700!important;
  line-height:1.35!important;
  white-space:nowrap!important;
  text-decoration:none!important;
  overflow:visible!important;
  transform:none!important;
}
.cf-row-actions .cf-btn.small.cf-action-quote:hover,
.cf-row-actions .cf-btn.small.cf-action-quote:focus,
.cf-table td .cf-btn.small.cf-action-quote:hover,
button.cf-btn.small.cf-action-quote:hover,
button.cf-btn.small.cf-action-quote:focus {
  background:transparent!important;
  color:#148f88!important;
  text-decoration:underline!important;
  box-shadow:none!important;
  transform:none!important;
}
.cf-table[data-module="pending-quotations"] td.cf-row-actions {
  padding-left:12px!important;
  padding-right:12px!important;
  min-width:130px!important;
}
.cf-table[data-module="pending-quotations"] th:last-child {
  min-width:130px!important;
}


/* v3.3.02: add a little breathing room between View and Due PDF actions only */
.cf-table[data-module="unpaid-invoices"] td.cf-row-actions,
.cf-table[data-module="partially-paid-invoices"] td.cf-row-actions {
  gap:12px!important;
}


/* v3.3.03: properly separate View and Due PDF in outstanding invoice views */
.cf-table[data-module="unpaid-invoices"] .cf-row-actions,
.cf-table[data-module="partially-paid-invoices"] .cf-row-actions {
  display:flex!important;
  align-items:center!important;
  flex-wrap:nowrap!important;
  gap:14px!important;
  min-width:170px!important;
}
.cf-table[data-module="unpaid-invoices"] .cf-row-actions .cf-action-pdf,
.cf-table[data-module="partially-paid-invoices"] .cf-row-actions .cf-action-pdf {
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 auto!important;
  width:auto!important;
  min-width:auto!important;
  height:auto!important;
  padding:3px 6px!important;
  margin:0!important;
  border:0!important;
  background:transparent!important;
  color:#263746!important;
  white-space:nowrap!important;
  line-height:1.4!important;
}
.cf-table[data-module="unpaid-invoices"] th:last-child,
.cf-table[data-module="unpaid-invoices"] td:last-child,
.cf-table[data-module="partially-paid-invoices"] th:last-child,
.cf-table[data-module="partially-paid-invoices"] td:last-child {
  min-width:190px!important;
}


/* v3.3.04: clearly separate View and Due PDF without a visual divider */
.cf-table[data-module="unpaid-invoices"] .cf-row-actions .cf-action-view-text,
.cf-table[data-module="partially-paid-invoices"] .cf-row-actions .cf-action-view-text {
  display:inline-flex!important;
  align-items:center!important;
  gap:5px!important;
  width:auto!important;
  min-width:auto!important;
  height:auto!important;
  padding:3px 4px!important;
  margin:0!important;
  border:0!important;
  background:transparent!important;
  white-space:nowrap!important;
  line-height:1.4!important;
}
.cf-table[data-module="unpaid-invoices"] .cf-row-actions .cf-action-view-text span,
.cf-table[data-module="partially-paid-invoices"] .cf-row-actions .cf-action-view-text span {
  display:inline-block!important;
  font-size:13px!important;
  font-weight:500!important;
}
.cf-table[data-module="unpaid-invoices"] .cf-row-actions,
.cf-table[data-module="partially-paid-invoices"] .cf-row-actions {
  gap:18px!important;
}

/* v3.3.05: definitive separation for outstanding invoice actions */
.cf-table[data-module="unpaid-invoices"] .cf-row-actions,
.cf-table[data-module="partially-paid-invoices"] .cf-row-actions {
  display:block!important;
  min-width:220px!important;
  white-space:nowrap!important;
}
.cf-table[data-module="unpaid-invoices"] .cf-outstanding-invoice-actions,
.cf-table[data-module="partially-paid-invoices"] .cf-outstanding-invoice-actions {
  display:inline-flex!important;
  align-items:center!important;
  gap:20px!important;
  white-space:nowrap!important;
}
.cf-table[data-module="unpaid-invoices"] .cf-outstanding-invoice-actions .cf-action-view-text,
.cf-table[data-module="partially-paid-invoices"] .cf-outstanding-invoice-actions .cf-action-view-text,
.cf-table[data-module="unpaid-invoices"] .cf-outstanding-invoice-actions .cf-action-due-pdf,
.cf-table[data-module="partially-paid-invoices"] .cf-outstanding-invoice-actions .cf-action-due-pdf {
  width:auto!important;
  min-width:0!important;
  height:auto!important;
  padding:4px 3px!important;
  margin:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  transform:none!important;
  white-space:nowrap!important;
  line-height:1.4!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
}
.cf-table[data-module="unpaid-invoices"] .cf-outstanding-invoice-actions .cf-action-view-text,
.cf-table[data-module="partially-paid-invoices"] .cf-outstanding-invoice-actions .cf-action-view-text {
  gap:6px!important;
  color:#142432!important;
}
.cf-table[data-module="unpaid-invoices"] .cf-outstanding-invoice-actions .cf-action-due-pdf,
.cf-table[data-module="partially-paid-invoices"] .cf-outstanding-invoice-actions .cf-action-due-pdf {
  color:var(--cf-primary)!important;
  font-size:12px!important;
  font-weight:600!important;
}
.cf-table[data-module="unpaid-invoices"] .cf-outstanding-invoice-actions button:hover,
.cf-table[data-module="partially-paid-invoices"] .cf-outstanding-invoice-actions button:hover {
  background:transparent!important;
  box-shadow:none!important;
  transform:none!important;
}
@media(max-width:768px){
  .cf-table[data-module="unpaid-invoices"] .cf-outstanding-invoice-actions,
  .cf-table[data-module="partially-paid-invoices"] .cf-outstanding-invoice-actions {
    gap:18px!important;
  }
}

/* v3.3.07: outstanding invoice actions - teal text and reliable spacing */
.cf-outstanding-invoice-actions {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  column-gap: 22px !important;
  white-space: nowrap !important;
}

.cf-outstanding-invoice-actions .cf-action-view-text,
.cf-outstanding-invoice-actions .cf-action-due-pdf {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 3px 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--cf-primary) !important;
  box-shadow: none !important;
  transform: none !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

.cf-outstanding-invoice-actions .cf-action-view-text {
  margin-right: 22px !important; /* fallback spacing for browsers/layout overrides */
}

.cf-outstanding-invoice-actions .cf-action-view-text span {
  color: var(--cf-primary) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

.cf-outstanding-invoice-actions .cf-action-view-text:hover,
.cf-outstanding-invoice-actions .cf-action-view-text:focus,
.cf-outstanding-invoice-actions .cf-action-due-pdf:hover,
.cf-outstanding-invoice-actions .cf-action-due-pdf:focus {
  background: transparent !important;
  color: var(--cf-primary) !important;
  border: 0 !important;
  box-shadow: none !important;
  transform: none !important;
  text-decoration: underline !important;
}

.cf-outstanding-invoice-actions .cf-action-view-text:hover span,
.cf-outstanding-invoice-actions .cf-action-view-text:focus span {
  color: var(--cf-primary) !important;
}

/* ClinicFlow 3.3.11: every native single-select is searchable inside the same dropdown box. */
.cf-integrated-search-select{position:relative;display:block;width:100%;min-width:0;font-family:inherit}
.cf-integrated-search-select .cf-integrated-native-select{position:absolute!important;left:0!important;bottom:0!important;width:1px!important;height:1px!important;min-width:1px!important;min-height:1px!important;opacity:0!important;pointer-events:none!important;padding:0!important;border:0!important}
.cf-integrated-select-input{display:block;width:100%;height:40px;min-height:40px;padding:8px 38px 8px 10px;border:1px solid #9baab2;border-radius:3px;background:#fff;color:#172331;font:inherit;font-size:13px;line-height:1.35;outline:none;box-shadow:none}
.cf-integrated-select-input:focus{border-color:var(--cf-primary)!important;box-shadow:0 0 0 1px var(--cf-primary)}
.cf-integrated-select-icon{position:absolute;right:10px;top:50%;width:17px;height:17px;transform:translateY(-50%);display:grid;place-items:center;pointer-events:auto;cursor:text;color:#53636e;z-index:2}
.cf-integrated-select-icon svg{display:block;width:17px;height:17px;fill:currentColor}
.cf-integrated-select-menu{display:none;position:absolute;z-index:10050;left:0;right:0;top:calc(100% + 3px);max-height:240px;overflow-y:auto;background:#fff;border:1px solid #c8d2d8;border-radius:4px;box-shadow:0 10px 24px rgba(18,38,51,.15)}
.cf-integrated-search-select.open .cf-integrated-select-menu{display:block}
.cf-integrated-select-option{display:block;width:100%;border:0;border-bottom:1px solid #edf1f3;background:#fff;color:#172331;text-align:left;padding:9px 11px;font:inherit;font-size:13px;line-height:1.35;cursor:pointer}
.cf-integrated-select-option:last-child{border-bottom:0}
.cf-integrated-select-option:hover,.cf-integrated-select-option.active{background:#edf9f8;color:#0d625d}
.cf-integrated-select-option.selected{font-weight:600;color:#0d716b}
.cf-integrated-select-option.disabled{opacity:.5;cursor:not-allowed}
.cf-integrated-select-empty{padding:10px 11px;color:var(--cf-muted);font-size:12px}
.cf-integrated-search-select.is-disabled .cf-integrated-select-input{background:#eef2f4;color:#7b8790;cursor:not-allowed}
.cf-field>.cf-integrated-search-select,.ph-form-group>.cf-integrated-search-select,.ph-lookup-inline>.cf-integrated-search-select,.ph-item-select-inline>.cf-integrated-search-select{width:100%}
.cf-filter-extra>.cf-integrated-search-select,.cf-filter-singleline>.cf-integrated-search-select{flex:0 1 150px;width:150px;min-width:120px}
.cf-integrated-page-size{display:inline-block;width:68px;min-width:68px}
.cf-integrated-page-size .cf-integrated-select-input{height:36px;min-height:36px;padding-left:10px;padding-right:30px;border-color:var(--cf-primary)}
.cf-item-row>.cf-integrated-search-select,.ph-line>.cf-integrated-search-select{min-width:0;width:100%}
body.cf-pharmacy-page .ph-toolbar .cf-integrated-search-select{flex:1 1 auto;width:auto;min-width:145px}
body.cf-pharmacy-page .ph-toolbar .cf-integrated-select-input{height:46px;min-height:46px}
@media(max-width:760px){
  .cf-filter-extra>.cf-integrated-search-select,.cf-filter-singleline>.cf-integrated-search-select{flex:1 1 100%;width:100%;max-width:none;min-width:0}
  .cf-item-row>.cf-integrated-search-select{grid-column:1/-1}
  .cf-integrated-select-menu{max-height:210px}
}

/* ClinicFlow 3.3.12: complete searchable native dropdown coverage, including multi-selects. */
.cf-integrated-multi-select .cf-integrated-select-option{display:flex;align-items:center;gap:8px}
.cf-integrated-option-check{display:inline-flex;align-items:center;justify-content:center;flex:0 0 18px;width:18px;height:18px;border:1px solid #b8c6cc;border-radius:3px;font-size:12px;line-height:1;color:var(--cf-primary);background:#fff}
.cf-integrated-multi-select .cf-integrated-select-option.selected .cf-integrated-option-check{border-color:var(--cf-primary);font-weight:700}


/* ClinicFlow 3.3.13 - integrated searchable native dropdown UI. */
.cf-native-search-source{display:none!important}
.cf-native-search-shell{position:relative;display:block;width:100%;min-width:0;font-family:inherit}
.cf-native-search-input{display:block;width:100%;height:40px;min-height:40px;box-sizing:border-box;padding:8px 38px 8px 12px;border:1px solid #9baab2;border-radius:3px;background:#fff;color:#172331;font:inherit;font-size:13px;line-height:1.35;outline:none;box-shadow:none}
.cf-native-search-input:focus{border-color:var(--cf-primary)!important;box-shadow:0 0 0 1px var(--cf-primary)!important}
.cf-native-search-icon{position:absolute;right:11px;top:20px;transform:translateY(-50%);width:17px;height:17px;display:grid;place-items:center;color:var(--cf-primary);cursor:text;z-index:2}
.cf-native-search-icon svg{width:17px;height:17px;display:block;fill:currentColor}
.cf-native-search-menu{display:none;position:absolute;left:0;right:0;top:calc(100% + 3px);z-index:10080;max-height:240px;overflow:auto;background:#fff;border:1px solid #c8d2d8;border-radius:4px;box-shadow:0 10px 24px rgba(18,38,51,.16)}
.cf-native-search-shell.is-open .cf-native-search-menu{display:block}
.cf-native-search-option{display:block;width:100%;box-sizing:border-box;border:0;border-bottom:1px solid #edf1f3;background:#fff;color:#172331;text-align:left;padding:10px 12px;font:inherit;font-size:13px;cursor:pointer}
.cf-native-search-option:last-child{border-bottom:0}.cf-native-search-option:hover,.cf-native-search-option:focus{background:#edf9f8;color:#0d625d;outline:none}.cf-native-search-option.is-selected{font-weight:600;color:var(--cf-primary)}
.cf-native-search-option[disabled]{opacity:.5;cursor:not-allowed}.cf-native-search-empty{padding:10px 12px;color:#74828d;font-size:12px}
.cf-native-search-shell.is-multiple .cf-native-search-option{display:flex;gap:8px;align-items:center}.cf-native-search-check{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;flex:0 0 18px;border:1px solid #b8c6cc;border-radius:3px;color:var(--cf-primary)}
.cf-native-search-shell.is-disabled .cf-native-search-input{background:#eef2f4;color:#7b8790;cursor:not-allowed}
.cf-page-size-label .cf-native-search-shell{display:inline-block;width:74px;vertical-align:middle}.cf-page-size-label .cf-native-search-input{height:36px;min-height:36px;padding-right:30px}.cf-page-size-label .cf-native-search-icon{top:18px}
@media(max-width:760px){.cf-native-search-menu{max-height:220px}}

/* ClinicFlow v3.3.24 - Refined professional pagination (visual only; logic unchanged). */
.cf-pagination{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  flex-wrap:wrap!important;
  margin-top:16px!important;
  padding:14px 16px!important;
  border:1px solid #e1e8ec!important;
  border-radius:8px!important;
  background:#fff!important;
  box-shadow:0 2px 8px rgba(18,38,58,.05)!important;
}
.cf-page-info{
  font-size:12px!important;
  line-height:1.4!important;
  font-weight:500!important;
  color:#64748b!important;
  white-space:nowrap!important;
}
.cf-page-controls{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:6px!important;
  flex-wrap:nowrap!important;
}
.cf-page-size-label{
  display:inline-flex!important;
  align-items:center!important;
  gap:8px!important;
  margin:0 8px 0 0!important;
  font-size:12px!important;
  font-weight:500!important;
  color:#64748b!important;
  white-space:nowrap!important;
}
.cf-page-size-label select{
  height:34px!important;
  min-width:64px!important;
  padding:0 25px 0 10px!important;
  border:1px solid #d6e0e5!important;
  border-radius:6px!important;
  background-color:#fff!important;
  color:#1e293b!important;
  font-family:inherit!important;
  font-size:12px!important;
  font-weight:600!important;
  outline:none!important;
  box-shadow:none!important;
  transition:border-color .18s ease, box-shadow .18s ease!important;
}
.cf-page-size-label select:focus{
  border-color:var(--cf-primary)!important;
  box-shadow:0 0 0 3px rgba(34,179,168,.12)!important;
}
.cf-page-btn{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:34px!important;
  width:34px!important;
  height:34px!important;
  padding:0!important;
  border:1px solid #d6e0e5!important;
  border-radius:6px!important;
  background:#fff!important;
  color:#475569!important;
  font-family:inherit!important;
  font-size:14px!important;
  line-height:1!important;
  font-weight:600!important;
  cursor:pointer!important;
  box-shadow:none!important;
  transition:background-color .18s ease,border-color .18s ease,color .18s ease,transform .12s ease!important;
}
.cf-page-btn:hover:not(:disabled):not(.active){
  background:#f0fbfa!important;
  border-color:var(--cf-primary)!important;
  color:#087f77!important;
}
.cf-page-btn:active:not(:disabled){
  transform:translateY(1px)!important;
}
.cf-page-btn.active{
  background:var(--cf-primary)!important;
  border-color:var(--cf-primary)!important;
  color:#fff!important;
  box-shadow:0 2px 6px rgba(34,179,168,.20)!important;
}
.cf-page-btn:disabled:not(.active){
  opacity:.38!important;
  cursor:default!important;
  background:#f8fafc!important;
  color:#94a3b8!important;
}
body.cf-pharmacy-page #ph-pagination{
  margin-top:16px!important;
  padding:14px 16px!important;
  border:1px solid #e1e8ec!important;
}


/* ClinicFlow v3.3.25 - Remove outer pagination box/border; keep pagination controls unchanged. */
.cf-pagination{
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:transparent!important;
  padding-left:0!important;
  padding-right:0!important;
}


/* ClinicFlow v3.3.26 - pagination accuracy + simplified footer. */
.cf-page-info { display:none !important; }
.cf-pagination-hidden { display:none !important; }
@media (max-width:700px) {
  .cf-table tbody > tr.cf-pagination-hidden,
  .cf-table.cf-mobile-card-table tbody > tr.cf-pagination-hidden {
    display:none !important;
  }
}

/* ClinicFlow v3.3.50 - Consent form upload alongside Session Photos */
.cf-consent-upload-section{margin-top:18px;padding-top:14px;border-top:1px solid #d8e2e7}.cf-consent-upload-section h4{margin:0 0 10px;font-size:14px}.cf-consent-file-card{border:1px solid #ccd8de;background:#fff;padding:12px;display:flex;align-items:center;gap:12px;flex-wrap:wrap}.cf-consent-file-preview{flex:1 1 220px;min-width:0;font-size:12px}.cf-consent-file-preview a{color:var(--cf-primary);font-weight:600;text-decoration:none;word-break:break-word}.cf-consent-file-status{font-size:11px;color:var(--cf-muted);min-width:90px}.cf-consent-file-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.cf-consent-upload{position:relative;overflow:hidden}.cf-consent-upload input[type=file]{pointer-events:auto!important}

/* ClinicFlow v3.3.52 - Desktop/tablet safeguard: keep native session-photo file inputs hidden.
   Mobile-responsive.css intentionally exposes the same input as an invisible overlay only on <=768px. */
.cf-session-photos .cf-photo-upload > input.cf-session-photo-input[type="file"] {
  display: none !important;
}


/* ClinicFlow v3.3.53 - Session photo controls: equal Replace/Remove button boxes. */
.cf-session-photos .cf-photo-actions{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
  align-items:stretch!important;
  justify-content:stretch!important;
}
.cf-session-photos .cf-photo-actions .cf-btn,
.cf-session-photos .cf-photo-actions .cf-photo-upload{
  width:100%!important;
  min-width:0!important;
  min-height:48px!important;
  height:48px!important;
  padding:0 10px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  line-height:1.2!important;
  box-sizing:border-box!important;
  margin:0!important;
}
.cf-session-photos .cf-photo-actions .cf-photo-delete{
  width:100%!important;
}
/* A slot without Remove still keeps Choose Photo as a normal single action. */
.cf-session-photos .cf-photo-actions > .cf-photo-upload:only-child{
  grid-column:1 / -1!important;
}

/* ClinicFlow v3.3.54 - show uploaded consent in completed-session Photos viewer. */
.cf-session-consent-view{margin-top:18px!important;border-top:1px solid var(--cf-border,#d5dee3);padding-top:16px!important;}
.cf-consent-view-card{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px;border:1px solid var(--cf-border,#d5dee3);background:#fff;}
.cf-consent-view-name{font-weight:600;min-width:0;overflow-wrap:anywhere;}
@media(max-width:700px){.cf-consent-view-card{align-items:stretch;flex-direction:column}.cf-consent-view-open{width:100%!important;justify-content:center!important;}}

/* ClinicFlow v3.3.60 - Pharmacy Filter trigger is mobile-only.
   Desktop/tablet widths above 700px keep Pharmacy filters visible directly. */
@media (min-width: 701px) {
  body.cf-pharmacy-page #cf-top-actions .ph-filter-shell .cf-filter-toggle,
  body.cf-pharmacy-page #cf-top-actions .ph-filter-shell #ph-filter-toggle {
    display: none !important;
  }

  body.cf-pharmacy-page #cf-top-actions .ph-filter-shell .cf-filter-extra {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    width: auto !important;
    margin-top: 0 !important;
  }
}


/* ClinicFlow v3.3.85 - Message template previews under Settings */
.cf-message-templates-panel{margin-top:18px}
.cf-message-destination{padding:11px 13px;margin:0 0 14px;border:1px solid #b9ddd9;background:#f2fbfa;border-radius:6px;font-size:12px;line-height:1.5}
.cf-message-template-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.cf-message-template-card{border:1px solid var(--cf-border);background:#fff;border-radius:7px;overflow:hidden}
.cf-message-template-head{padding:12px 14px;border-bottom:1px solid #dfe8eb;background:#f7fafb}
.cf-message-template-head>b{display:block;font-size:13px}
.cf-message-template-head small{display:block;margin-top:5px;color:var(--cf-muted);font-size:10px}
.cf-message-template-head code,.cf-message-template-vars code{font-family:monospace;background:#eef4f5;padding:2px 5px;border-radius:3px;color:#234}
.cf-message-template-body{padding:13px 14px;font-size:12px;line-height:1.6;color:#1c2f3a}
.cf-message-template-body p{margin:0 0 10px}.cf-message-template-body p:last-child{margin-bottom:0}
.cf-message-template-vars{border-top:1px solid #e5ecef;padding:11px 14px;font-size:11px}
.cf-message-template-vars>b{display:block;margin-bottom:7px}
.cf-message-template-vars>div{display:flex;gap:8px;align-items:flex-start;margin:5px 0}.cf-message-template-vars span{flex:1}
.cf-message-template-attachment{border-top:1px solid #e5ecef;padding:10px 14px;font-size:11px}
@media(max-width:760px){.cf-message-template-grid{grid-template-columns:1fr}.cf-message-destination{font-size:11px}.cf-message-template-card{border-radius:5px}}

/* ClinicFlow v3.3.86 - Standalone Templates view below Settings */
.cf-message-template-recipient{margin:0 0 14px;padding:9px 11px;border-left:3px solid var(--cf-primary,#12b8a6);background:rgba(18,184,166,.07);font-size:12px;line-height:1.45;color:#27424d}.cf-message-template-recipient b{color:#0d766b}.cf-message-templates-panel>.cf-panel-head h2{margin:0}.cf-message-destination{margin-bottom:16px}


/* ClinicFlow v3.3.87 - Meta WhatsApp settings section */
.cf-meta-whatsapp-settings{border-top:1px solid var(--cf-border,#d7e0e5);margin-top:8px;padding-top:20px!important}
.cf-settings-section-title h3{margin:0 0 14px;font-size:18px;color:var(--cf-dark,#12263a)}
.cf-settings-toggle{display:flex;align-items:center;gap:9px;margin:0 0 16px;font-weight:600;cursor:pointer}
.cf-settings-toggle input{width:18px;height:18px;margin:0;accent-color:var(--cf-primary,#20b2aa)}
.cf-meta-whatsapp-grid{margin-top:4px}
.cf-meta-whatsapp-settings input[type="password"]{font-family:inherit}
@media(max-width:700px){.cf-meta-whatsapp-settings{padding-top:16px!important}.cf-settings-section-title h3{font-size:16px}.cf-meta-whatsapp-grid{grid-template-columns:1fr!important}}

/* ClinicFlow v3.3.92 - Meta WhatsApp template testing */
.cf-template-testing{margin-top:22px;padding-top:18px;border-top:1px solid #d9e3e7}
.cf-template-testing .cf-settings-section-title{margin-bottom:12px}
.cf-template-testing-row{max-width:520px}
.cf-template-testing-row .cf-field{margin:0}
.cf-template-test-buttons{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.cf-meta-test-result{margin-top:12px;min-height:22px;font-size:13px;font-weight:600}
.cf-meta-test-result.success{color:#147a67}
.cf-meta-test-result.error{color:#b42318}
@media(max-width:700px){
  .cf-template-testing-row{max-width:none}
  .cf-template-test-buttons .cf-btn{flex:1 1 calc(50% - 8px)}
}


/* ClinicFlow v3.3.95 - Search inside every dropdown. Closed dropdown stays clean;
   search field appears only inside the opened dropdown. No search icon / no hint. */
.cf-search-select-v3396{position:relative;width:100%;min-width:0;box-sizing:border-box}
.cf-search-native-v3396{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important;clip:rect(0,0,0,0)!important}
.cf-search-select-trigger{width:100%;min-height:40px;border:1px solid #9baab2;border-radius:3px;background:#fff;color:#172331;padding:8px 34px 8px 10px;font:inherit;font-size:13px;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:8px;cursor:pointer;position:relative;box-sizing:border-box}
.cf-search-select-trigger:hover{border-color:#6f858f}
.cf-search-select-trigger:focus,.cf-search-select-v3396.open .cf-search-select-trigger{outline:none;border-color:var(--cf-primary)!important;box-shadow:0 0 0 1px var(--cf-primary)}
.cf-search-select-value{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1 1 auto}
.cf-search-select-chevron{position:absolute;right:11px;top:50%;width:7px;height:7px;border-right:1.5px solid #253746;border-bottom:1.5px solid #253746;transform:translateY(-67%) rotate(45deg);transition:transform .15s ease}
.cf-search-select-v3396.open .cf-search-select-chevron{transform:translateY(-30%) rotate(225deg)}
.cf-search-select-menu{display:none;position:absolute;z-index:10060;left:0;right:0;top:calc(100% + 3px);background:#fff;border:1px solid #c8d2d8;border-radius:4px;box-shadow:0 10px 24px rgba(18,38,51,.16);overflow:hidden}
.cf-search-select-v3396.open .cf-search-select-menu{display:block}
.cf-search-select-search{display:block!important;width:calc(100% - 16px)!important;height:38px!important;min-height:38px!important;margin:8px!important;padding:7px 9px!important;border:1px solid var(--cf-primary)!important;border-radius:3px!important;background:#fff!important;color:#172331!important;font:inherit!important;font-size:13px!important;box-shadow:none!important;outline:none!important;box-sizing:border-box!important;background-image:none!important}
.cf-search-select-search::placeholder{color:transparent!important}
.cf-search-select-options{max-height:235px;overflow-y:auto;-webkit-overflow-scrolling:touch}
.cf-search-select-option{display:block;width:100%;border:0;border-bottom:1px solid #edf1f3;background:#fff;color:#172331;text-align:left;padding:9px 11px;font:inherit;font-size:13px;line-height:1.35;cursor:pointer}
.cf-search-select-option:last-child{border-bottom:0}
.cf-search-select-option:hover,.cf-search-select-option.active{background:#edf9f8;color:#0d625d}
.cf-search-select-option.selected{font-weight:600;color:#0d716b}
.cf-search-select-option.disabled{opacity:.5;cursor:not-allowed}
.cf-search-select-empty{padding:10px 11px;color:var(--cf-muted);font-size:12px}
.cf-search-select-v3396.is-disabled .cf-search-select-trigger{background:#eef2f4;color:#7b8790;cursor:not-allowed}
.cf-search-select-v3396.is-filter{min-width:145px}
@media(max-width:700px){
  .cf-search-select-menu{max-height:300px}
  .cf-search-select-options{max-height:245px}
}

/* v3.3.96: searchable selects also cover modal/form dropdowns rendered outside .cf-app. */


/* ClinicFlow v3.3.97 - compact list summaries above filters (no large summary cards in list views). */
#cf-top-actions .cf-top-summary-zone{
  flex:1 0 100%;
  width:100%;
  min-width:0;
  margin:0 0 7px 0;
  padding:0;
}
#cf-top-actions .cf-summary-strip{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  min-height:22px;
  color:#12263a;
  font-size:12px;
  line-height:1.35;
}
#cf-top-actions .cf-summary-strip-item{display:inline-flex;align-items:baseline;gap:4px;white-space:nowrap;}
#cf-top-actions .cf-summary-strip-label{color:var(--cf-muted);font-weight:500;}
#cf-top-actions .cf-summary-strip-item b{color:#12263a;font-size:13px;font-weight:700;}
#cf-top-actions .cf-summary-strip-sep{color:#b6c2c8;font-weight:400;}

/* ClinicFlow v3.3.99 - Desktop list/master toolbar layout.
   Top row: Add New + PDF + Excel on the left, view name on the right.
   Second row: Search + filters only. */
@media (min-width: 901px) {
  #cf-top-actions.cf-desktop-list-topbar {
    width: 100% !important;
    flex: 1 1 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    min-height: 40px !important;
  }
  #cf-top-actions.cf-desktop-list-topbar .cf-add-wrap,
  #cf-top-actions.cf-desktop-list-topbar .ph-add-wrap {
    order: 1 !important;
    margin: 0 !important;
    width: auto !important;
    flex: 0 0 auto !important;
    justify-content: flex-start !important;
  }

  #cf-top-actions.cf-desktop-list-topbar > .cf-desktop-top-export-btn {
    order: 2 !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    height: 40px !important;
    min-height: 40px !important;
  }
  .cf-desktop-export-marker {
    display: none !important;
  }
  #cf-top-actions.cf-desktop-list-topbar .cf-desktop-view-name {
    order: 20 !important;
    margin-left: auto !important;
    color: var(--cf-dark, #12263a) !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    text-align: right !important;
  }
  #cf-top-actions.cf-desktop-list-topbar .cf-desktop-layout-hidden-summary {
    display: none !important;
  }
  .cf-desktop-source-heading-hidden {
    display: none !important;
  }
  .cf-desktop-filter-marker {
    display: none !important;
  }

  .cf-panel > .cf-table-export-bar.cf-desktop-filter-export-row {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 0 0 12px !important;
  }
  .cf-table-export-bar.cf-desktop-filter-export-row > .cf-filter-shell,
  .cf-table-export-bar.cf-desktop-filter-export-row > .ph-filter-shell {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-stack,
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-row,
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-singleline {
    width: 100% !important;
    min-width: 0 !important;
  }
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-singleline {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
  }
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-list-search,
  .cf-table-export-bar.cf-desktop-filter-export-row .ph-top-search {
    flex: 1 1 230px !important;
    min-width: 160px !important;
    max-width: 330px !important;
  }
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-extra {
    display: flex !important;
    align-items: center !important;
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-toggle,
  .cf-table-export-bar.cf-desktop-filter-export-row .ph-filter-toggle {
    display: none !important;
  }
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-list-filter,
  .cf-table-export-bar.cf-desktop-filter-export-row .ph-list-filter,
  .cf-table-export-bar.cf-desktop-filter-export-row .ph-top-filter {
    min-width: 120px !important;
    max-width: 190px !important;
    flex: 1 1 130px !important;
  }
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-date {
    flex: 0 1 175px !important;
    min-width: 145px !important;
  }
  .cf-table-export-bar.cf-desktop-filter-export-row > .cf-btn,
  .cf-table-export-bar.cf-desktop-filter-export-row > button.cf-btn {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }
}


/* ClinicFlow v3.4.00 - desktop list cleanup.
   1) Only the view name in the top toolbar is visible; duplicate content headings are hidden.
   2) Search/filter controls are arranged four per row on desktop. */
@media (min-width: 901px) {
  body.cf-desktop-list-layout-active #cf-content .cf-list-title-bar,
  body.cf-desktop-list-layout-active #cf-content .cf-page-heading,
  body.cf-desktop-list-layout-active #cf-content .ph-page-heading,
  body.cf-desktop-list-layout-active #cf-content .cf-desktop-source-heading-hidden {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-singleline {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
  }

  /* Let the real filter controls become grid items beside Search. */
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-extra {
    display: contents !important;
  }

  .cf-table-export-bar.cf-desktop-filter-export-row .cf-list-search,
  .cf-table-export-bar.cf-desktop-filter-export-row .ph-top-search,
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-list-filter,
  .cf-table-export-bar.cf-desktop-filter-export-row .ph-list-filter,
  .cf-table-export-bar.cf-desktop-filter-export-row .ph-top-filter,
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-date,
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-secondary,
  .cf-table-export-bar.cf-desktop-filter-export-row #cf-reset-filters {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: none !important;
    box-sizing: border-box !important;
  }

  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-date {
    display: grid !important;
    grid-template-columns: max-content minmax(0,1fr) !important;
    gap: 6px !important;
    align-items: center !important;
  }
}


/* ClinicFlow v3.4.01 - Desktop workspace controls.
   Search always visible. Filter button expands/collapses only the additional filters.
   Desktop menu button independently hides/shows the left navigation. */
@media (min-width: 901px) {
  /* Sidebar show/hide control */
  .cf-topbar > .cf-menu {
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:40px !important;
    height:40px !important;
    flex:0 0 40px !important;
    padding:0 !important;
    border:1px solid #ccd7dc !important;
    background:#fff !important;
    color:var(--cf-dark,#142432) !important;
    border-radius:4px !important;
    cursor:pointer !important;
  }
  body.cf-desktop-sidebar-collapsed .cf-sidebar {
    transform:translateX(-100%) !important;
    visibility:hidden !important;
    pointer-events:none !important;
  }
  body.cf-desktop-sidebar-collapsed .cf-main {
    margin-left:0 !important;
    width:100% !important;
  }
  .cf-sidebar,
  .cf-main {
    transition:transform .2s ease, margin-left .2s ease, width .2s ease !important;
  }

  /* Search + Filter are always the first visible line. */
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-singleline {
    display:grid !important;
    grid-template-columns:minmax(220px, 360px) auto minmax(0,1fr) !important;
    align-items:center !important;
    gap:8px !important;
    width:100% !important;
  }
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-list-search,
  .cf-table-export-bar.cf-desktop-filter-export-row .ph-top-search {
    grid-column:1 !important;
    grid-row:1 !important;
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
  }
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-toggle,
  .cf-table-export-bar.cf-desktop-filter-export-row .ph-filter-toggle {
    grid-column:2 !important;
    grid-row:1 !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:auto !important;
    min-width:94px !important;
    height:40px !important;
    min-height:40px !important;
    gap:7px !important;
    white-space:nowrap !important;
  }
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-toggle-icon {
    display:inline-flex !important;
    width:16px !important;
    height:16px !important;
  }
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-toggle-icon svg {
    width:16px !important;
    height:16px !important;
    fill:currentColor !important;
  }

  /* Additional filters stay hidden until Filter is clicked. */
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-extra {
    grid-column:1 / -1 !important;
    grid-row:2 !important;
    display:none !important;
    width:100% !important;
    min-width:0 !important;
    margin-top:2px !important;
  }
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-shell.open .cf-filter-extra,
  .cf-table-export-bar.cf-desktop-filter-export-row .ph-filter-shell.open .cf-filter-extra {
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    align-items:center !important;
    gap:8px !important;
  }

  /* Four additional controls per row, continuing onto the next line. */
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-extra .cf-list-filter,
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-extra .ph-list-filter,
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-extra .ph-top-filter,
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-extra .cf-filter-date,
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-extra .cf-secondary,
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-extra #cf-reset-filters {
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    box-sizing:border-box !important;
  }
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-extra .cf-filter-date {
    display:grid !important;
    grid-template-columns:max-content minmax(0,1fr) !important;
    gap:6px !important;
    align-items:center !important;
  }
}


/* ClinicFlow v3.4.03 - Filter trigger uses theme background colour. */
@media (min-width: 901px) {
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-toggle,
  .cf-table-export-bar.cf-desktop-filter-export-row .ph-filter-toggle,
  body.cf-pharmacy-page .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-toggle,
  body.cf-pharmacy-page .cf-table-export-bar.cf-desktop-filter-export-row .ph-filter-toggle {
    background: var(--cf-primary) !important;
    border-color: var(--cf-primary) !important;
    color: #fff !important;
  }
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-toggle:hover,
  .cf-table-export-bar.cf-desktop-filter-export-row .ph-filter-toggle:hover,
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-shell.open .cf-filter-toggle,
  .cf-table-export-bar.cf-desktop-filter-export-row .ph-filter-shell.open .ph-filter-toggle {
    background: var(--cf-primary) !important;
    color: #fff !important;
  }
}


/* ClinicFlow v3.4.04 - Searchable dropdown menus render above forms/tables,
   never clipped inside horizontal-scroll line-item containers. */
.cf-search-select-menu.cf-search-select-menu-portal{
  display:block!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
  background:#fff!important;
  border:1px solid #c8d2d8!important;
  border-radius:4px!important;
  box-shadow:0 12px 30px rgba(18,38,51,.22)!important;
}
.cf-search-select-menu-portal .cf-search-select-options{
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  max-height:calc(100% - 54px)!important;
}
.cf-search-select-menu-portal .cf-search-select-search{
  position:sticky!important;
  top:0!important;
  z-index:2!important;
}


/* ClinicFlow v3.4.05 - Desktop toolbar alignment.
   View name on the left; Add New + PDF + Excel on the right. */
@media (min-width: 901px) {
  #cf-top-actions.cf-desktop-list-topbar .cf-desktop-view-name {
    order: 1 !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    text-align: left !important;
  }

  #cf-top-actions.cf-desktop-list-topbar .cf-add-wrap,
  #cf-top-actions.cf-desktop-list-topbar .ph-add-wrap {
    order: 20 !important;
    margin-left: auto !important;
    margin-right: 0 !important;
  }

  #cf-top-actions.cf-desktop-list-topbar > .cf-desktop-top-export-btn {
    order: 21 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* ClinicFlow v3.4.12 - desktop filter reconciliation across all list views. */
@media (min-width:901px){
  /* Exactly one live filter shell is managed by desktop-list-layout-3412.js. */
  .cf-table-export-bar.cf-desktop-filter-export-row{
    display:block!important;
    width:100%!important;
  }
  .cf-table-export-bar.cf-desktop-filter-export-row > .cf-filter-shell,
  .cf-table-export-bar.cf-desktop-filter-export-row > .ph-filter-shell{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
  }
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-singleline{
    width:100%!important;
    grid-template-columns:minmax(260px,420px) auto minmax(0,1fr)!important;
  }
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-list-search,
  .cf-table-export-bar.cf-desktop-filter-export-row .ph-top-search{
    height:40px!important;
    min-height:40px!important;
  }
  /* Search is always visible; extra filters only after Filter click. */
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-extra{display:none!important;}
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-shell.open .cf-filter-extra,
  .cf-table-export-bar.cf-desktop-filter-export-row .ph-filter-shell.open .cf-filter-extra{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:8px!important;
    margin-top:8px!important;
  }
}


/* ClinicFlow v3.4.13 - Compact desktop date filters across all list views. */
@media (min-width:901px){
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-extra .cf-filter-date,
  body.cf-pharmacy-page .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-extra .cf-filter-date{
    width:auto!important;
    max-width:235px!important;
    min-width:0!important;
    justify-self:start!important;
    grid-template-columns:max-content 145px!important;
  }
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-extra .cf-filter-date input,
  body.cf-pharmacy-page .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-extra .cf-filter-date input{
    width:145px!important;
    min-width:145px!important;
    max-width:145px!important;
  }
}

/* v3.4.14: keep PDF/Excel only in the top header; never inside detail/item sections */
.cf-export-bar-relocated{display:none!important;}
.ph-detail-panel .cf-table-export-bar,
.ph-detail-row .cf-table-export-bar{display:none!important;}
#cf-top-actions > .cf-top-export-btn{margin-left:0!important;}


/* ClinicFlow v3.4.16 - Dashboard: no PDF/Excel export controls on any device. */
#clinicflow-app[data-route="dashboard"] #cf-top-actions .cf-top-export-btn,
#clinicflow-app[data-route="dashboard"] #cf-top-actions .cf-desktop-top-export-btn,
#clinicflow-app[data-route="dashboard"] #cf-top-actions .cf-mobile-export-proxy,
#clinicflow-app[data-route="dashboard"] #cf-content .cf-table-export-bar {
  display:none !important;
}


/* ClinicFlow v3.4.17 - Always-visible scrollbar inside searchable dropdown option lists. */
.cf-search-select-options,
.cf-search-select-menu-portal .cf-search-select-options{
  overflow-y:scroll!important;
  scrollbar-gutter:stable!important;
  scrollbar-width:thin;
  scrollbar-color:#93a3ab #eef3f5;
}
.cf-search-select-options::-webkit-scrollbar,
.cf-search-select-menu-portal .cf-search-select-options::-webkit-scrollbar{
  width:9px;
}
.cf-search-select-options::-webkit-scrollbar-track,
.cf-search-select-menu-portal .cf-search-select-options::-webkit-scrollbar-track{
  background:#eef3f5;
}
.cf-search-select-options::-webkit-scrollbar-thumb,
.cf-search-select-menu-portal .cf-search-select-options::-webkit-scrollbar-thumb{
  background:#93a3ab;
  border-radius:8px;
  border:2px solid #eef3f5;
}
.cf-search-select-options::-webkit-scrollbar-thumb:hover,
.cf-search-select-menu-portal .cf-search-select-options::-webkit-scrollbar-thumb:hover{
  background:#6f858f;
}


/* ClinicFlow v3.4.18 - Functional dropdown scroll viewport. */
.cf-search-select-menu.cf-search-select-menu-portal{
  display:flex!important;
  flex-direction:column!important;
  min-height:0!important;
}
.cf-search-select-menu-portal .cf-search-select-search{
  flex:0 0 38px!important;
}
.cf-search-select-menu-portal .cf-search-select-options{
  flex:0 1 auto!important;
  min-height:0!important;
  overflow-y:scroll!important;
  overscroll-behavior:contain!important;
  touch-action:pan-y!important;
}


/* ClinicFlow v3.4.29 - Actions columns use only the width their controls actually need. */
.cf-table.cf-compact-actions-table th:last-child,
.cf-table.cf-compact-actions-table td:last-child,
.ph-table.cf-compact-actions-table th:last-child,
.ph-table.cf-compact-actions-table td:last-child{
  width:1%!important;
  min-width:0!important;
  max-width:none!important;
  white-space:nowrap!important;
}
.cf-table.cf-compact-actions-table td:last-child .cf-row-actions,
.cf-table.cf-compact-actions-table td:last-child.cf-row-actions,
.cf-table.cf-compact-actions-table td:last-child.cf-actions,
.ph-table.cf-compact-actions-table td:last-child .cf-row-actions,
.ph-table.cf-compact-actions-table td:last-child.cf-actions{
  width:max-content!important;
  min-width:0!important;
  max-width:none!important;
  flex-wrap:nowrap!important;
  column-gap:6px!important;
  gap:6px!important;
}
@media(max-width:700px){
  .cf-table.cf-compact-actions-table th:last-child,
  .cf-table.cf-compact-actions-table td:last-child,
  .ph-table.cf-compact-actions-table th:last-child,
  .ph-table.cf-compact-actions-table td:last-child{
    width:1%!important;
    min-width:0!important;
  }
}


/* ClinicFlow v3.4.31 - Consultation service-wise session counts */
.cf-consultation-service-sessions{
  display:grid;
  gap:8px;
  margin-top:10px;
}
.cf-consultation-session-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 170px;
  gap:12px;
  align-items:center;
  padding:10px 12px;
  border:1px solid #d7e1e6;
  background:#f9fbfc;
  border-radius:5px;
}
.cf-consultation-session-service{
  font-weight:600;
  color:var(--cf-dark,#12263a);
  min-width:0;
  overflow-wrap:anywhere;
}
.cf-consultation-session-row label{
  display:grid;
  grid-template-columns:auto 72px;
  align-items:center;
  justify-content:end;
  gap:8px;
  margin:0;
  font-size:12px;
  font-weight:600;
  white-space:nowrap;
}
.cf-consultation-session-count{
  width:72px!important;
  min-width:72px!important;
  text-align:center;
}
@media(max-width:700px){
  .cf-consultation-session-row{grid-template-columns:1fr;gap:7px;}
  .cf-consultation-session-row label{justify-content:start;grid-template-columns:auto 76px;}
  .cf-consultation-session-count{width:76px!important;min-width:76px!important;}
}


/* v3.4.35 - Appointments Pending Payment: one clean action button only. */
body.cf-route-appointments-pending-payment .cf-table th:last-child,
body.cf-route-appointments-pending-payment .cf-table td:last-child {
  width: 142px !important;
  min-width: 142px !important;
  max-width: 142px !important;
  white-space: nowrap !important;
}
body.cf-route-appointments-pending-payment .cf-receive-payment-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 118px !important;
  padding: 7px 10px !important;
  white-space: nowrap !important;
}


/* v3.4.36 - Pending payment has exactly two compact icon actions. */
body.cf-route-appointments-pending-payment .cf-table th:last-child,
body.cf-route-appointments-pending-payment .cf-table td:last-child {
  width: 82px !important;
  min-width: 82px !important;
  max-width: 82px !important;
  white-space: nowrap !important;
}
body.cf-route-appointments-pending-payment .cf-row-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  flex-wrap: nowrap !important;
  width: auto !important;
}
body.cf-route-appointments-pending-payment .cf-row-actions .cf-btn {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 5px !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
body.cf-route-appointments-pending-payment .cf-row-actions .cf-btn svg {
  width: 16px !important;
  height: 16px !important;
}


/* v3.4.37 - definitive pending-payment action layout.
   The route attribute is on #clinicflow-app, not <body>. */
#clinicflow-app[data-route="appointments-pending-payment"] .cf-table th:last-child,
#clinicflow-app[data-route="appointments-pending-payment"] .cf-table td:last-child {
  width:76px!important;
  min-width:76px!important;
  max-width:76px!important;
  white-space:nowrap!important;
}
#clinicflow-app[data-route="appointments-pending-payment"] .cf-row-actions {
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  flex-wrap:nowrap!important;
  gap:6px!important;
  width:66px!important;
  min-width:66px!important;
}
#clinicflow-app[data-route="appointments-pending-payment"] .cf-row-actions .cf-btn {
  flex:0 0 28px!important;
  width:28px!important;
  min-width:28px!important;
  max-width:28px!important;
  height:28px!important;
  min-height:28px!important;
  padding:5px!important;
  margin:0!important;
  border:0!important;
  background:transparent!important;
}
#clinicflow-app[data-route="appointments-pending-payment"] .cf-row-actions .cf-btn svg {
  display:block!important;
  width:17px!important;
  height:17px!important;
  fill:currentColor!important;
}
#clinicflow-app[data-route="appointments-pending-payment"] .cf-action-payment {
  color:#148f88!important;
}


/* v3.4.41 - Scheduled Appointments: keep every action inside the Actions cell. */
#clinicflow-app[data-route="scheduled-appointments"] .cf-table-wrap {
  overflow-x:auto!important;
  overflow-y:visible!important;
}
#clinicflow-app[data-route="scheduled-appointments"] table.cf-table[data-module="scheduled-appointments"] {
  width:100%!important;
  min-width:1180px!important;
  table-layout:auto!important;
}
#clinicflow-app[data-route="scheduled-appointments"] table.cf-table[data-module="scheduled-appointments"] th:last-child,
#clinicflow-app[data-route="scheduled-appointments"] table.cf-table[data-module="scheduled-appointments"] td:last-child {
  width:180px!important;
  min-width:180px!important;
  max-width:180px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
}
#clinicflow-app[data-route="scheduled-appointments"] table.cf-table[data-module="scheduled-appointments"] td:last-child .cf-row-actions {
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  flex-wrap:nowrap!important;
  gap:8px!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  padding:0!important;
  margin:0!important;
}
#clinicflow-app[data-route="scheduled-appointments"] table.cf-table[data-module="scheduled-appointments"] td:last-child .cf-row-actions .cf-btn {
  flex:0 0 24px!important;
  width:24px!important;
  min-width:24px!important;
  max-width:24px!important;
  height:24px!important;
  min-height:24px!important;
  max-height:24px!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  background:transparent!important;
}
#clinicflow-app[data-route="scheduled-appointments"] table.cf-table[data-module="scheduled-appointments"] td:last-child .cf-row-actions .cf-btn svg {
  width:16px!important;
  height:16px!important;
  display:block!important;
}


/* v3.4.44 - Separate Consent Forms workflow. */
#clinicflow-app[data-route="consent-forms"] .cf-row-actions{
  display:inline-flex!important;
  flex-wrap:nowrap!important;
  gap:7px!important;
  align-items:center!important;
}
#clinicflow-app[data-route="consent-forms"] .cf-row-actions .cf-btn{
  width:30px!important;
  min-width:30px!important;
  height:30px!important;
  min-height:30px!important;
  padding:5px!important;
  border:0!important;
  background:transparent!important;
}
#clinicflow-app[data-route="consent-forms"] .cf-row-actions .cf-btn svg{
  width:17px!important;
  height:17px!important;
  fill:currentColor!important;
}
#clinicflow-app[data-route="consent-forms"] .cf-action-upload-consent{color:#16a39a!important;}
#clinicflow-app[data-route="consent-forms"] .cf-action-view-consent{color:#142432!important;}


/* ClinicFlow v3.4.46 - Pharmacy medicines in Consultation / Session forms */
.cf-medicines-field{gap:10px!important}
.cf-medicines-title{display:flex;align-items:center;justify-content:space-between;gap:12px}
.cf-medicines-title strong{display:block;font-size:13px}
.cf-medicines-title small{display:block;margin-top:3px;color:var(--cf-muted);font-size:11px}
.cf-medicines-list{display:grid;gap:8px}
.cf-medicine-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 135px 32px;
  gap:8px;
  align-items:end;
  padding:9px;
  border:1px solid #d7e1e6;
  background:#f9fbfc;
  border-radius:4px
}
.cf-medicine-select-wrap label,.cf-medicine-qty-wrap label{display:block;margin-bottom:4px;font-size:11px;font-weight:600}
.cf-medicine-select-wrap select,.cf-medicine-qty-wrap input{width:100%!important;min-height:38px}
.cf-medicine-remove{
  width:32px!important;min-width:32px!important;height:38px!important;
  padding:0!important;border:1px solid #d7e1e6!important;background:#fff!important;
  color:#c5352b!important;font-size:20px!important;line-height:1!important;cursor:pointer
}
.cf-medicine-view-table th:last-child,.cf-medicine-view-table td:last-child{width:160px!important;min-width:160px!important}
@media(max-width:700px){
  .cf-medicine-row{grid-template-columns:minmax(0,1fr) 95px 30px;gap:6px;padding:7px}
  .cf-medicine-remove{width:30px!important;min-width:30px!important}
}


/* ClinicFlow v3.4.47 - Medicine dosing + inventory usage */
.cf-medicine-row{
  grid-template-columns:minmax(190px,1.5fr) minmax(130px,.9fr) minmax(120px,.8fr) minmax(135px,.9fr) minmax(105px,.7fr) minmax(115px,.8fr) 95px 95px 32px!important;
  align-items:end!important;
}
.cf-medicine-row > div label{
  display:block;
  margin-bottom:4px;
  font-size:11px;
  font-weight:600;
}
.cf-medicine-row input,
.cf-medicine-row select{
  width:100%!important;
  min-height:38px!important;
}
.cf-medicine-inventory-wrap.is-hidden{
  visibility:hidden!important;
  pointer-events:none!important;
}
.cf-medicines-field .cf-medicines-list{
  overflow-x:auto;
  padding-bottom:2px;
}
.cf-medicine-row{
  min-width:1120px;
}
.cf-medicine-view-table{
  min-width:1050px!important;
}
@media(max-width:700px){
  .cf-medicine-row{
    min-width:1040px;
    grid-template-columns:180px 125px 115px 130px 100px 110px 90px 90px 30px!important;
  }
}


/* ClinicFlow v3.4.49 - Patient Advance Adjustment */
.cf-payment-advance-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(120px,1fr));
  gap:8px;
  margin:8px 0 2px;
}
.cf-payment-advance-summary>div{
  border:1px solid #d7e1e6;
  background:#f8fbfc;
  padding:9px 11px;
  border-radius:4px;
}
.cf-payment-advance-summary span{
  display:block;
  font-size:11px;
  color:var(--cf-muted);
  margin-bottom:3px;
}
.cf-payment-advance-summary strong{
  font-size:14px;
  color:#142432;
}
@media(max-width:700px){
  .cf-payment-advance-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
}


/* ClinicFlow v3.4.51 - Book next session from Session form */
.cf-next-session-help{
  display:block;
  margin-top:5px;
  color:var(--cf-muted);
  font-size:11px;
}


/* ClinicFlow v3.4.52 - Educational PDF per Service */
.cf-educational-pdf-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border:1px solid #d7e1e6;
  background:#f8fbfc;
  padding:10px 12px;
  border-radius:4px;
}
.cf-educational-pdf-info{
  min-width:0;
}
.cf-educational-pdf-name{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
  font-weight:600;
}
.cf-educational-pdf-actions{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.cf-service-pdf-cell{
  white-space:nowrap;
  width:100px;
}
.cf-muted-text{
  color:var(--cf-muted);
  font-size:12px;
}
@media(max-width:700px){
  .cf-educational-pdf-card{
    align-items:flex-start;
    flex-direction:column;
  }
  .cf-educational-pdf-actions{
    justify-content:flex-start;
  }
}


/* ClinicFlow v3.4.54 - Quotation Payment Details */
.cf-payment-details-settings{
  border-top:1px solid #dbe5e8;
  padding-top:12px;
  margin-top:4px;
}
.cf-payment-qr-picker{
  display:flex;
  align-items:center;
  gap:14px;
}
.cf-payment-qr-preview{
  width:110px;
  height:110px;
  border:1px solid #d7e1e6;
  border-radius:4px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  background:#fff;
  color:var(--cf-muted);
  font-size:12px;
}
.cf-payment-qr-preview img{
  width:100%;
  height:100%;
  object-fit:contain;
}
@media(max-width:700px){
  .cf-payment-qr-picker{
    align-items:flex-start;
    flex-direction:column;
  }
}

/* Scheduled Appointments: highlight only when Fee - Advance is still positive. */
.cf-table tbody tr.cf-payment-shortfall-row > td { background: #fde8e8 !important; }
.cf-table tbody tr.cf-payment-shortfall-row:hover > td { background: #fbdada !important; }

/* v3.4.57 - Scheduled Appointments: keep Fee / Advance / Balance as explicit visible columns. */
table.cf-table[data-module="scheduled-appointments"] th:nth-child(8),
table.cf-table[data-module="scheduled-appointments"] td:nth-child(8),
table.cf-table[data-module="scheduled-appointments"] th:nth-child(9),
table.cf-table[data-module="scheduled-appointments"] td:nth-child(9),
table.cf-table[data-module="scheduled-appointments"] th:nth-child(10),
table.cf-table[data-module="scheduled-appointments"] td:nth-child(10) {
  display: table-cell !important;
  visibility: visible !important;
  min-width: 92px !important;
  white-space: nowrap;
  text-align: right;
}

/* v3.4.59 - Scheduled Appointments financial status is deliberately unmistakable. */
#clinicflow-app[data-route="scheduled-appointments"] table.cf-table[data-module="scheduled-appointments"] tbody tr.cf-payment-shortfall-row > td {
  background-color:#ffe4e6 !important;
}
#clinicflow-app[data-route="scheduled-appointments"] table.cf-table[data-module="scheduled-appointments"] tbody tr.cf-payment-shortfall-row:hover > td {
  background-color:#ffd8dc !important;
}
#clinicflow-app[data-route="scheduled-appointments"] .cf-receive-payment-btn {
  display:inline-flex !important;
  visibility:visible !important;
  opacity:1 !important;
  color:#0f8f86 !important;
}


/* v3.4.74 - Scheduled Appointments: current Advance and Fee-Advance balance. */
#clinicflow-app[data-route="scheduled-appointments"] table.cf-table[data-module="scheduled-appointments"] .cf-scheduled-fee,
#clinicflow-app[data-route="scheduled-appointments"] table.cf-table[data-module="scheduled-appointments"] .cf-scheduled-advance,
#clinicflow-app[data-route="scheduled-appointments"] table.cf-table[data-module="scheduled-appointments"] .cf-scheduled-balance {
  display:table-cell !important;
  visibility:visible !important;
  white-space:nowrap;
  text-align:right;
}
#clinicflow-app[data-route="scheduled-appointments"] table.cf-table[data-module="scheduled-appointments"] tbody tr.cf-payment-shortfall-row,
#clinicflow-app[data-route="scheduled-appointments"] table.cf-table[data-module="scheduled-appointments"] tbody tr.cf-payment-shortfall-row > td {
  background:#fde8e8 !important;
}


/* v3.4.77 - Scheduled Appointments Actions column must scroll normally with the table.
   Do not pin/freeze/stick the Actions column. */
#clinicflow-app[data-route="scheduled-appointments"] table.cf-table[data-module="scheduled-appointments"] th:last-child,
#clinicflow-app[data-route="scheduled-appointments"] table.cf-table[data-module="scheduled-appointments"] td:last-child {
  position:static!important;
  left:auto!important;
  right:auto!important;
  z-index:auto!important;
  box-shadow:none!important;
  width:auto!important;
  min-width:180px!important;
  max-width:none!important;
}


/* v3.4.79 - Scheduled Appointment payment shortfall: Balance > 0 = full light-red row. */
#clinicflow-app table.cf-table[data-module="scheduled-appointments"] tbody tr.cf-payment-shortfall-row > td,
#clinicflow-app table.cf-table[data-module="scheduled-appointments"] tbody tr.cf-payment-shortfall-row > td[class] {
  background:#fde8e8 !important;
}
.cf-submenu-section{margin:14px 12px 5px;padding:8px 10px 5px;border-top:1px solid rgba(255,255,255,.14);font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.72}.ci-items-head{display:flex;align-items:center;justify-content:space-between;margin:18px 0 10px}.ci-item-line{display:grid;grid-template-columns:minmax(220px,1fr) 140px 130px minmax(170px,.8fr) 42px;gap:10px;align-items:center;margin-bottom:8px}.ci-item-line select,.ci-item-line input{width:100%}.ci-conversion-note{font-size:12px;line-height:1.3}.cf-clinic-inventory-page .cf-list-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}@media(max-width:700px){.ci-item-line{grid-template-columns:1fr 1fr}.ci-item-line .ci-item{grid-column:1/-1}.ci-item-line .ci-conversion-note{grid-column:1/-1}.ci-item-line .ci-remove{justify-self:end}.cf-clinic-inventory-page .cf-list-toolbar{align-items:flex-start;flex-direction:column}}

/* v3.5.08 Clinic Inventory submenu guarantee */
.cf-clinic-inventory-menu-heading{display:block!important;color:rgba(255,255,255,.78)!important;margin:14px 12px 4px!important;padding:9px 10px 5px!important;border-top:1px solid rgba(255,255,255,.18)!important;font-size:11px!important;font-weight:700!important;letter-spacing:.05em!important;text-transform:uppercase!important}.cf-clinic-inventory-menu-link{display:flex!important}


/* Clinic Inventory separate views - v3.5.13 */
.cf-clinic-inventory-page .ci-page-title{margin-bottom:14px}
.cf-clinic-inventory-page .ci-page-title h2{margin:0 0 4px}
.cf-clinic-inventory-page .ci-tabs{display:flex;gap:8px;flex-wrap:wrap;border-bottom:1px solid #e5e7eb;margin:0 0 18px;padding:0 0 10px}
.cf-clinic-inventory-page .ci-tab{appearance:none;border:1px solid #d1d5db;background:#fff;border-radius:8px;padding:9px 14px;font:inherit;font-weight:600;cursor:pointer}
.cf-clinic-inventory-page .ci-tab:hover{background:#f8fafc}
.cf-clinic-inventory-page .ci-tab.active{background:var(--cf-primary,#0f766e);border-color:var(--cf-primary,#0f766e);color:#fff}
@media(max-width:700px){.cf-clinic-inventory-page .ci-tabs{display:grid;grid-template-columns:1fr 1fr}.cf-clinic-inventory-page .ci-tab{width:100%}}


/* v3.5.17: make Cancel buttons use teal filled styling like other action buttons */
.cf-form-actions .cf-payment-cancel,
.cf-form-actions .cf-followup-cancel,
.cf-form-actions .cf-consent-cancel,
.cf-form-actions .ph-cancel,
.ph-quick-footer .ph-quick-close.cf-secondary,
.ph-form-footer .ph-cancel.cf-secondary{
  background: var(--cf-primary)!important;
  color: #fff!important;
  border-color: var(--cf-primary)!important;
}
.cf-form-actions .cf-payment-cancel:hover,
.cf-form-actions .cf-followup-cancel:hover,
.cf-form-actions .cf-consent-cancel:hover,
.cf-form-actions .ph-cancel:hover,
.ph-quick-footer .ph-quick-close.cf-secondary:hover,
.ph-form-footer .ph-cancel.cf-secondary:hover{
  filter: brightness(.96);
}


/* v3.5.18: keep Unit Conversion Master search and filters on a single desktop row */
@media (min-width:901px){
  body.cf-pharmacy-route-pharmacy-unit-conversions .cf-table-export-bar.cf-desktop-filter-export-row,
  body.cf-pharmacy-route-pharmacy-unit-conversions .cf-table-export-bar.cf-desktop-filter-export-row > .ph-filter-shell{
    display:block!important;
    width:100%!important;
    max-width:none!important;
  }
  body.cf-pharmacy-route-pharmacy-unit-conversions .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-singleline{
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
    flex-wrap:nowrap!important;
    width:100%!important;
  }
  body.cf-pharmacy-route-pharmacy-unit-conversions .cf-table-export-bar.cf-desktop-filter-export-row .ph-top-search,
  body.cf-pharmacy-route-pharmacy-unit-conversions .cf-table-export-bar.cf-desktop-filter-export-row .cf-list-search{
    flex:1 1 340px!important;
    min-width:240px!important;
    max-width:none!important;
    width:auto!important;
  }
  body.cf-pharmacy-route-pharmacy-unit-conversions .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-extra{
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
    flex:1 1 auto!important;
    width:auto!important;
    min-width:0!important;
    margin-top:0!important;
    flex-wrap:nowrap!important;
  }
  body.cf-pharmacy-route-pharmacy-unit-conversions .cf-table-export-bar.cf-desktop-filter-export-row .ph-top-filter,
  body.cf-pharmacy-route-pharmacy-unit-conversions .cf-table-export-bar.cf-desktop-filter-export-row .cf-list-filter{
    flex:1 1 0!important;
    min-width:180px!important;
    max-width:none!important;
    width:auto!important;
  }
  body.cf-pharmacy-route-pharmacy-unit-conversions .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-toggle,
  body.cf-pharmacy-route-pharmacy-unit-conversions .cf-table-export-bar.cf-desktop-filter-export-row #ph-filter-toggle{
    display:none!important;
  }
}


/* v3.5.19: keep Pharmacy Actions as a real table column and center controls cleanly */
body.cf-pharmacy-page .ph-table th:last-child{
  width:112px!important;
  min-width:112px!important;
  max-width:112px!important;
  text-align:center!important;
  white-space:nowrap!important;
}
body.cf-pharmacy-page .ph-table td.ph-actions,
body.cf-pharmacy-page .ph-table td.cf-actions.ph-actions{
  display:table-cell!important;
  width:112px!important;
  min-width:112px!important;
  max-width:112px!important;
  padding:8px 10px!important;
  text-align:center!important;
  vertical-align:middle!important;
  white-space:nowrap!important;
}
body.cf-pharmacy-page .ph-table td.ph-actions .cf-icon-action{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:30px!important;
  height:30px!important;
  margin:0 3px!important;
  padding:4px!important;
  vertical-align:middle!important;
}


/* v3.5.21: Clinic Issue internal-transfer item layout */
body.cf-pharmacy-page .ph-form-issues.ph-clinic-issue-mode #ph-items>.ph-line,
body.cf-pharmacy-page .ph-clinic-issue-mode.ph-form-issues #ph-items>.ph-line{
  grid-template-columns:minmax(235px,1.8fr) minmax(120px,.9fr) minmax(100px,.75fr) minmax(95px,.7fr) minmax(185px,1.35fr) minmax(110px,.8fr) 34px!important;
  gap:7px!important;
  width:100%!important;
  min-width:0!important;
}
body.cf-pharmacy-page .ph-clinic-issue-mode .ph-line input[readonly]{background:#f4f7f8!important;color:#33454f!important;}
@media(max-width:900px){
 body.cf-pharmacy-page .ph-clinic-issue-mode.ph-form-issues #ph-items>.ph-line{grid-template-columns:1fr 1fr!important;}
 body.cf-pharmacy-page .ph-clinic-issue-mode.ph-form-issues #ph-items>.ph-line .ph-line-field:first-of-type{grid-column:1/-1!important;}
}


/* v3.5.22: Clinic Inventory transaction forms use the standard ClinicFlow modal/form layout */
.ci-standard-modal .cf-modal-card{width:min(980px,96vw)!important;}
.ci-standard-form{padding:0!important;}
.ci-standard-form .ci-header-grid{padding:20px 22px 8px!important;gap:16px!important;}
.ci-standard-form .cf-field label{font-size:12px!important;font-weight:600!important;color:var(--cf-dark)!important;}
.ci-standard-form .cf-field input,
.ci-standard-form .cf-field select,
.ci-standard-form .cf-field textarea{min-height:44px!important;border:1px solid #9baab2!important;border-radius:4px!important;padding:10px 12px!important;font-size:13px!important;background:#fff!important;}
.ci-standard-form .cf-field textarea{min-height:90px!important;}
.ci-standard-form .ci-items-section{margin:8px 22px 0!important;border:1px solid #c9d4da!important;border-radius:4px!important;padding:16px!important;background:#fff!important;}
.ci-standard-form .ci-items-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;margin:0 0 14px!important;}
.ci-standard-form .ci-items-head h3{margin:0!important;font-size:15px!important;}
.ci-standard-form .ci-items-head small{display:block!important;margin-top:3px!important;color:var(--cf-muted)!important;font-size:10px!important;}
.ci-standard-form .ci-item-columns{display:grid!important;grid-template-columns:minmax(240px,1.6fr) 150px 140px minmax(180px,1fr) 42px!important;gap:10px!important;padding:0 0 6px!important;font-size:11px!important;font-weight:600!important;color:#344552!important;}
.ci-standard-form .ci-item-line{display:grid!important;grid-template-columns:minmax(240px,1.6fr) 150px 140px minmax(180px,1fr) 42px!important;gap:10px!important;align-items:center!important;margin:0 0 10px!important;}
.ci-standard-form .ci-item-line select,
.ci-standard-form .ci-item-line input{height:42px!important;min-height:42px!important;border:1px solid #9baab2!important;border-radius:4px!important;padding:8px 10px!important;font-size:13px!important;background:#fff!important;}
.ci-standard-form .ci-conversion-note{display:flex!important;align-items:center!important;min-height:42px!important;padding:8px 10px!important;background:#f6f8f9!important;border:1px solid #d5dde1!important;border-radius:4px!important;color:#455762!important;font-size:12px!important;}
.ci-standard-form .ci-remove{width:40px!important;height:40px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;justify-self:center!important;}
.ci-standard-form .ci-form-footer{display:flex!important;justify-content:flex-end!important;gap:10px!important;margin-top:18px!important;padding:16px 22px!important;border-top:1px solid #d7e0e5!important;background:#fff!important;}
.ci-standard-form .ci-form-footer .cf-btn{min-width:120px!important;height:42px!important;}
.ci-standard-form #ci-form-msg{margin:10px 22px 0!important;}
@media(max-width:760px){
  .ci-standard-modal .cf-modal-card{width:100%!important;max-height:96vh!important;}
  .ci-standard-form .ci-header-grid{grid-template-columns:1fr!important;padding:16px!important;}
  .ci-standard-form .ci-items-section{margin:4px 16px 0!important;padding:12px!important;overflow-x:auto!important;}
  .ci-standard-form .ci-item-columns{display:none!important;}
  .ci-standard-form .ci-item-line{grid-template-columns:1fr 1fr!important;min-width:0!important;}
  .ci-standard-form .ci-item-line .ci-item{grid-column:1/-1!important;}
  .ci-standard-form .ci-conversion-note{grid-column:1/-1!important;}
  .ci-standard-form .ci-remove{justify-self:end!important;}
  .ci-standard-form .ci-form-footer{padding:14px 16px!important;}
  .ci-standard-form .ci-form-footer .cf-btn{flex:1 1 0!important;min-width:0!important;}
}


/* v3.5.23: make pharmacy/clinic inventory cancel buttons rectangular */
body.cf-pharmacy-page .ph-form-footer .ph-cancel.cf-secondary,
body.cf-pharmacy-page .ph-quick-footer .ph-quick-close.cf-secondary,
body.cf-clinic-inventory-page .ph-form-footer .ph-cancel.cf-secondary,
body.cf-clinic-inventory-page .ph-quick-footer .ph-quick-close.cf-secondary{
  border-radius: 3px !important;
  border-top-left-radius: 3px !important;
  border-top-right-radius: 3px !important;
  border-bottom-right-radius: 3px !important;
  border-bottom-left-radius: 3px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 112px !important;
  height: 40px !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

/* v3.5.24: Clinic Inventory footer Cancel is a standard rectangular action button */
.cf-clinic-inventory-page .ci-form-footer .ci-cancel{
  background:var(--cf-primary)!important;
  color:#fff!important;
  border:1px solid var(--cf-primary)!important;
  border-radius:3px!important;
  min-width:112px!important;
  height:40px!important;
  padding:9px 18px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  line-height:1.2!important;
  white-space:nowrap!important;
  font-size:12px!important;
  font-weight:600!important;
}

/* v3.5.25: Alternate Qty stays calculated and stored, but is hidden in Clinic Issue entry rows. */

/* v3.5.26: readable Consent action in Scheduled Appointments */
.cf-row-actions .cf-action-consent-text{
  width:auto!important;
  min-width:70px!important;
  padding:0 10px!important;
  white-space:nowrap!important;
  background:var(--cf-primary)!important;
  border-color:var(--cf-primary)!important;
  color:#fff!important;
}
\n\n/* ClinicFlow v3.5.47 - simplified wrapped medicine entry */\n.cf-medicine-row.cf-medicine-row-simple{\n  min-width:0!important;\n  display:grid!important;\n  grid-template-columns:minmax(220px,1.5fr) minmax(150px,1fr) minmax(180px,1.1fr) minmax(150px,1fr) 38px!important;\n  gap:10px!important;\n  align-items:end!important;\n  overflow:visible!important;\n}\n.cf-medicine-row-simple > div{min-width:0!important;}\n.cf-medicine-row-simple .cf-medicine-select-wrap,\n.cf-medicine-row-simple .cf-medicine-dose-wrap,\n.cf-medicine-row-simple .cf-medicine-frequency-wrap,\n.cf-medicine-row-simple .cf-medicine-duration-wrap{width:100%!important;}\n.cf-medicine-row-simple input:not([type=hidden]),\n.cf-medicine-row-simple select{width:100%!important;max-width:100%!important;box-sizing:border-box!important;}\n.cf-medicines-field .cf-medicines-list{overflow-x:visible!important;}\n@media(max-width:1050px){\n  .cf-medicine-row.cf-medicine-row-simple{\n    grid-template-columns:repeat(2,minmax(0,1fr)) 38px!important;\n  }\n  .cf-medicine-row-simple .cf-medicine-remove{grid-column:3;grid-row:1 / span 2;align-self:end!important;}\n}\n@media(max-width:700px){\n  .cf-medicine-row.cf-medicine-row-simple{\n    min-width:0!important;\n    grid-template-columns:minmax(0,1fr) 34px!important;\n    gap:8px!important;\n  }\n  .cf-medicine-row-simple > div{grid-column:1!important;}\n  .cf-medicine-row-simple .cf-medicine-remove{grid-column:2!important;grid-row:1!important;align-self:end!important;}\n}\n
/* ClinicFlow v3.5.50 - compact clear-filters icon beside Filter trigger */
.cf-filter-reset-icon{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:42px!important;
  min-width:42px!important;
  height:42px!important;
  min-height:42px!important;
  padding:0!important;
  border:1px solid var(--cf-primary)!important;
  background:#fff!important;
  color:var(--cf-primary)!important;
  border-radius:4px!important;
}
.cf-filter-reset-icon svg{width:18px!important;height:18px!important;fill:currentColor!important;pointer-events:none!important}
.cf-filter-reset-icon:hover{background:var(--cf-primary)!important;color:#fff!important}
@media (min-width:901px){
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-primary{
    grid-template-columns:minmax(0,1fr) auto 42px!important;
  }
  .cf-table-export-bar.cf-desktop-filter-export-row .cf-filter-reset-icon{
    grid-column:3!important;
    grid-row:1!important;
    width:42px!important;
    min-width:42px!important;
    height:40px!important;
    min-height:40px!important;
  }
}
@media (max-width:900px){
  .cf-filter-reset-icon{width:42px!important;min-width:42px!important;height:42px!important;min-height:42px!important}
}


/* v3.5.51 Appointment Calendar */
.cf-calendar-shell{background:#fff;border:1px solid #dce6e8;border-radius:14px;padding:18px;box-shadow:0 8px 28px rgba(25,48,62,.06)}
.cf-calendar-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}.cf-calendar-date-block{display:flex;align-items:center;gap:12px;min-width:320px}.cf-calendar-date{width:auto;min-width:150px;padding:10px 12px;border:1px solid #b7c8ce;border-radius:9px;background:#fff}.cf-calendar-date-block strong{font-size:15px;color:#19313f}.cf-calendar-nav,.cf-calendar-today{border:1px solid #19aaa3;background:#fff;color:#138c87;border-radius:9px;min-width:42px;height:42px;font-weight:700;cursor:pointer}.cf-calendar-nav{font-size:28px;line-height:1}.cf-calendar-today{padding:0 15px}.cf-calendar-nav:hover,.cf-calendar-today:hover{background:#e9f8f7}.cf-calendar-legend{display:flex;align-items:center;gap:18px;flex-wrap:wrap;padding:10px 12px;background:#f7fbfb;border-radius:10px;margin-bottom:14px;color:#50636d;font-size:13px}.cf-calendar-legend span{display:flex;align-items:center;gap:7px;font-weight:600}.cf-calendar-legend i{width:13px;height:13px;border-radius:4px;display:inline-block}.cf-calendar-legend i.free{background:#eefaf7;border:1px solid #77cfc6}.cf-calendar-legend i.booked{background:#27afa7}.cf-calendar-legend small{margin-left:auto;color:#71838c}.cf-calendar-scroll{overflow:auto;border:1px solid #d7e2e5;border-radius:12px;max-height:68vh}.cf-calendar-grid{display:grid;grid-template-columns:90px repeat(var(--cf-doctors),minmax(190px,1fr));min-width:max-content;background:#fff}.cf-calendar-head{position:sticky;top:0;z-index:4;min-height:68px;padding:11px 12px;background:#183241;color:#fff;border-right:1px solid rgba(255,255,255,.15);display:flex;align-items:center;justify-content:center;gap:9px;font-weight:700}.cf-calendar-time-head{left:0;z-index:6}.cf-doctor-avatar{width:34px;height:34px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#28b2aa;color:#fff;font-weight:800}.cf-calendar-time{position:sticky;left:0;z-index:3;background:#f5f9fa;min-height:64px;border-right:1px solid #d7e2e5;border-bottom:1px solid #e3ebed;padding:12px 8px;font-size:12px;font-weight:700;color:#4d626c;display:flex;align-items:flex-start;justify-content:center}.cf-calendar-cell{min-height:64px;border:0;border-right:1px solid #e3ebed;border-bottom:1px solid #e3ebed;padding:6px;text-align:left}.cf-calendar-cell.available{background:#fbfefd;color:#269f98;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:5px;flex-direction:column;font-family:inherit}.cf-calendar-cell.available:hover{background:#e6f8f5;box-shadow:inset 0 0 0 2px #55c6bc}.cf-calendar-cell.available span{font-size:20px;line-height:16px}.cf-calendar-cell.available small{font-size:11px;font-weight:700}.cf-calendar-cell.booked{background:#eef9f8}.cf-booked-card{height:100%;min-height:50px;border-radius:9px;padding:7px 9px;background:linear-gradient(135deg,#20aaa3,#178d8b);color:#fff;display:flex;flex-direction:column;gap:2px;box-shadow:0 4px 12px rgba(24,143,139,.18)}.cf-booked-card strong{font-size:12px}.cf-booked-card span,.cf-booked-card small{font-size:10px;opacity:.94}.cf-booked-continuation{display:flex;height:100%;align-items:center;justify-content:center;color:#178d8b;font-size:11px;font-weight:700}
@media(max-width:768px){.cf-calendar-shell{padding:10px;border-radius:10px}.cf-calendar-date-block{min-width:0;flex:1 1 220px;flex-wrap:wrap}.cf-calendar-date-block strong{width:100%;font-size:13px}.cf-calendar-legend small{width:100%;margin-left:0}.cf-calendar-grid{grid-template-columns:72px repeat(var(--cf-doctors),minmax(155px,1fr))}.cf-calendar-head{min-height:58px;padding:8px;font-size:12px}.cf-calendar-time{min-height:58px;font-size:10px}.cf-calendar-cell{min-height:58px}.cf-doctor-avatar{width:28px;height:28px}}

/* v3.5.58 Appointment slot availability */
.cf-slot-status{margin-top:2px;padding:9px 11px;border:1px solid #c8d2d7;border-radius:4px;font-size:12px;font-weight:600;line-height:1.35;background:#f7f9fa;color:#41515d}
.cf-slot-status.checking{border-color:#aab6bf;background:#f7f9fa;color:#52606d}
.cf-slot-status.available{border-color:#67a985;background:#effaf4;color:#176b45}
.cf-slot-status.booked,.cf-slot-status.invalid{border-color:#d36b61;background:#fff1f0;color:#a62c23}


/* v3.5.61: Consent PDF action + consent-gated Session Form */
.cf-row-actions .cf-action-consent-pdf{color:#d32f2f;background:#fff;border-color:#efb4b4;min-width:34px}
.cf-row-actions .cf-action-consent-pdf:hover{background:#fff4f4;border-color:#d32f2f;color:#b71c1c}
.cf-row-actions .cf-consent-pdf-icon{width:20px;height:20px;display:block;fill:currentColor}
.cf-row-actions .cf-action-session.cf-action-disabled,
.cf-row-actions .cf-action-session:disabled{opacity:.34;cursor:not-allowed;filter:grayscale(1);pointer-events:none}

/* ClinicFlow 3.5.64 - Clinic Opening Stock dual-unit entry */
.ci-standard-form .ci-opening-item-columns{display:grid!important;grid-template-columns:minmax(210px,1.5fr) 115px 105px 125px 110px minmax(190px,1fr) 42px!important;gap:10px!important;padding:0 0 6px!important;font-size:11px!important;font-weight:600!important;color:#344552!important;}
.ci-standard-form .ci-opening-line{display:grid!important;grid-template-columns:minmax(210px,1.5fr) 115px 105px 125px 110px minmax(190px,1fr) 42px!important;gap:10px!important;align-items:center!important;margin:0 0 10px!important;}
.ci-standard-form .ci-opening-line select,.ci-standard-form .ci-opening-line input{height:42px!important;min-height:42px!important;border:1px solid #9baab2!important;border-radius:4px!important;padding:8px 10px!important;font-size:13px!important;background:#fff!important;width:100%!important;}
.ci-standard-form .ci-opening-line input[readonly]{background:#f6f8f9!important;color:#455762!important;}
.ci-standard-form .ci-opening-normalized{display:flex!important;align-items:center!important;min-height:42px!important;padding:8px 10px!important;background:#f6f8f9!important;border:1px solid #d5dde1!important;border-radius:4px!important;color:#455762!important;font-size:12px!important;}
@media(max-width:700px){.ci-standard-form .ci-opening-item-columns{display:none!important}.ci-standard-form .ci-opening-line{grid-template-columns:1fr 1fr!important;min-width:0!important}.ci-standard-form .ci-opening-line .ci-item,.ci-standard-form .ci-opening-normalized{grid-column:1/-1!important}.ci-standard-form .ci-opening-line .ci-remove{justify-self:end!important}}

/* ClinicFlow 3.5.65 - Clinic Stock dates displayed as DD/MM/YYYY */

/* ClinicFlow 3.5.66 - Clinic Consumption in Consultation/Session forms */
.cf-consumables-field{gap:10px!important;margin-top:4px}
.cf-consumables-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.cf-consumables-title strong{display:block;font-size:13px}
.cf-consumables-title small{display:block;margin-top:3px;color:var(--cf-muted);font-size:11px}
.cf-consumables-list{display:grid;gap:9px}
.cf-consumable-row{display:grid;grid-template-columns:minmax(250px,1.7fr) minmax(145px,.8fr) minmax(165px,.9fr) minmax(190px,1fr) 38px;gap:10px;align-items:end;border:1px solid #d8e1e5;border-radius:6px;padding:10px;background:#fbfcfc}
.cf-consumable-row>div{min-width:0}
.cf-consumable-row label{display:block;font-size:12px;font-weight:600;margin-bottom:5px}
.cf-consumable-row input,.cf-consumable-row select{width:100%;box-sizing:border-box}
.cf-consumable-row small{display:block;margin-top:4px;color:var(--cf-muted);font-size:10.5px}
.cf-unit-hint{font-weight:400;color:var(--cf-muted)}
.cf-consumable-remove{width:34px;height:34px;border:1px solid #d6dde1;background:#fff;border-radius:4px;font-size:21px;line-height:1;cursor:pointer}
.cf-consumable-remove:hover{border-color:#a74848;color:#a74848}
@media(max-width:1050px){.cf-consumable-row{grid-template-columns:repeat(2,minmax(0,1fr)) 38px}.cf-consumable-item{grid-column:1/-1}.cf-consumable-remove{grid-column:3;grid-row:2}}
@media(max-width:700px){.cf-consumables-title{align-items:flex-start;flex-direction:column}.cf-consumable-row{grid-template-columns:minmax(0,1fr) 34px}.cf-consumable-row>div{grid-column:1}.cf-consumable-remove{grid-column:2;grid-row:1;align-self:end}}

/* ClinicFlow 3.5.68 - fixed Clinical + Non-Clinical stock sections share the same inventory UI. */

/* v3.5.68.1 - Clinical / Non-Clinical classification controls */
.cf-choice-field .cf-choice-group{display:flex;flex-wrap:wrap;gap:10px;margin-top:4px}
.cf-choice-field .cf-choice-option{display:inline-flex;align-items:center;gap:8px;min-height:42px;padding:8px 14px;border:1px solid #cbd9dc;border-radius:9px;background:#fff;cursor:pointer;font-weight:600}
.cf-choice-field .cf-choice-option:has(input:checked){border-color:#1fb5ad;background:#edfafa}
.cf-choice-field .cf-choice-option input{width:18px;height:18px;margin:0;accent-color:#1faea6}

/* v3.5.68.2 - reliable Complete Payment feedback */
.cf-payment-error{padding:10px 12px;border:1px solid #c62828;border-radius:6px;background:#fff5f5;color:#9f1d1d;font-weight:600;margin:4px 0 2px;}
.cf-payment-error[hidden]{display:none!important;}
\n\n/* ClinicFlow v3.5.68.7 - consultation edit: medicines + consumables */\n.cf-medicine-row.cf-medicine-row-simple{\n  grid-template-columns:minmax(210px,1.45fr) minmax(145px,1fr) minmax(175px,1.08fr) minmax(145px,1fr) minmax(85px,.5fr) 82px!important;\n}\n.cf-medicine-row-simple .cf-medicine-qty-wrap{min-width:80px!important;}\n.cf-edit-row-remove{\n  width:auto!important;min-width:74px!important;height:40px!important;padding:0 10px!important;\n  border:1px solid #c62828!important;background:#fff5f5!important;color:#a51f1f!important;\n  border-radius:6px!important;font-weight:700!important;font-size:12px!important;cursor:pointer!important;\n}\n.cf-edit-row-remove:hover{background:#c62828!important;color:#fff!important;}\n.cf-consultation-edit-stock-note{border-left:4px solid #0f766e!important;}\n@media(max-width:1050px){\n  .cf-medicine-row.cf-medicine-row-simple{grid-template-columns:repeat(2,minmax(0,1fr)) 82px!important;}\n  .cf-medicine-row-simple .cf-medicine-remove{grid-column:3!important;grid-row:auto!important;align-self:end!important;}\n}\n@media(max-width:700px){\n  .cf-medicine-row.cf-medicine-row-simple,.cf-consumable-row{grid-template-columns:minmax(0,1fr)!important;}\n  .cf-medicine-row-simple > div,.cf-consumable-row>div{grid-column:1!important;}\n  .cf-medicine-row-simple .cf-medicine-remove,.cf-consumable-remove{grid-column:1!important;grid-row:auto!important;justify-self:start!important;}\n  .cf-edit-row-remove{height:36px!important;}\n}\n
/* ClinicFlow v3.5.68.8 - live left-menu workflow counts */
.cf-sidebar nav a{position:relative;}
.cf-sidebar nav a .cf-menu-label{min-width:0;flex:1 1 auto;}
.cf-sidebar nav a .cf-menu-count{
  margin-left:auto;
  min-width:24px;
  height:22px;
  padding:0 7px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  background:#e8f0ff;
  color:#174ea6;
  font-size:11px;
  line-height:1;
  font-weight:800;
  letter-spacing:0;
}
.cf-sidebar nav a.active .cf-menu-count{background:rgba(255,255,255,.2);color:inherit;}
.cf-sidebar nav a .cf-menu-count.is-zero{background:#eef1f5;color:#7a8492;}
.cf-sidebar nav a.active .cf-menu-count.is-zero{background:rgba(255,255,255,.14);color:inherit;opacity:.8;}
@media(max-width:782px){
  .cf-sidebar nav a .cf-menu-count{min-width:22px;height:20px;padding:0 6px;font-size:10px;}
}

/* v3.5.68.9 — quotation billing allocation */
.cf-quotation-billing-notice{grid-column:1/-1;margin:0 0 12px;padding:12px 14px;border:1px solid var(--cf-theme,#21b3aa);background:#f7fffe;display:flex;flex-direction:column;gap:4px}
.cf-quotation-billing-notice strong{font-size:14px;color:#172331}
.cf-quotation-billing-notice span{font-size:12px;line-height:1.45;color:#52606d}
.cf-quotation-billing-meta{margin-top:5px;font-size:10px;line-height:1.35;color:#52606d;white-space:normal}
.cf-item-service-cell{min-width:180px}
.cf-quotation-billing-row .cf-item-qty{font-weight:600}

/* v3.5.68.10 — cleaner Add/Edit Invoice form */
.cf-form-modal-invoices .cf-modal-card{
  width:min(1400px,calc(100vw - 32px));
  max-width:1400px;
}
.cf-form-modal-invoices #cf-form{padding:18px 24px 22px}
.cf-form-modal-invoices #cf-form>.cf-grid{gap:14px 16px}
.cf-form-modal-invoices .cf-line-items-field{
  padding:14px 16px 16px;
  border:1px solid #cbd7dc;
  background:#fbfcfd;
  border-radius:8px;
}
.cf-form-modal-invoices .cf-line-items-title{margin-bottom:10px}
.cf-form-modal-invoices .cf-line-items-title strong{font-size:18px}
.cf-form-modal-invoices .cf-items{overflow:visible;padding-bottom:0}
.cf-form-modal-invoices .cf-items-head,
.cf-form-modal-invoices .cf-item-row{
  grid-template-columns:minmax(260px,2.5fr) 96px 108px 108px 150px 132px 120px 42px!important;
  min-width:0!important;
  gap:10px!important;
  align-items:center;
}
.cf-form-modal-invoices .cf-items-head{
  padding:9px 10px;
  background:#eef3f6;
  border-color:#d6e0e5;
}
.cf-form-modal-invoices .cf-item-row{
  padding:10px;
  border-color:#d6e0e5;
}
.cf-form-modal-invoices .cf-item-gst-cell,
.cf-form-modal-invoices .cf-item-gst-amount-cell,
.cf-form-modal-invoices .cf-item-total-cell{display:none!important}
.cf-form-modal-invoices .cf-item-service-cell{
  min-width:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) 24px;
  align-items:center;
  gap:7px;
}
.cf-form-modal-invoices .cf-item-service-cell>.cf-mobile-item-label{grid-column:1/-1}
.cf-form-modal-invoices .cf-item-service-cell>.cf-integrated-search-select,
.cf-form-modal-invoices .cf-item-service-cell>select{grid-column:1}
.cf-billing-info{
  grid-column:2;
  width:22px;
  height:22px;
  padding:0;
  border:1px solid #96a8b2;
  border-radius:50%;
  background:#fff;
  color:#647786;
  font:700 12px/20px Arial,sans-serif;
  text-align:center;
  cursor:help;
  position:relative;
}
.cf-billing-info:hover,.cf-billing-info:focus{border-color:var(--cf-primary);color:var(--cf-primary);outline:none}
.cf-billing-info::after{
  content:attr(data-tooltip);
  position:absolute;
  left:50%;
  bottom:calc(100% + 9px);
  transform:translateX(-50%);
  width:max-content;
  max-width:360px;
  padding:8px 10px;
  border-radius:6px;
  background:#172331;
  color:#fff;
  font:500 11px/1.4 Montserrat,Arial,sans-serif;
  box-shadow:0 8px 24px rgba(16,37,50,.18);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  z-index:20;
  white-space:normal;
}
.cf-billing-info:hover::after,.cf-billing-info:focus::after{opacity:1;visibility:visible}
.cf-form-modal-invoices .cf-quotation-billing-meta,
.cf-form-modal-invoices .cf-quotation-billing-notice{display:none!important}
.cf-form-modal-invoices [name="subtotal"],
.cf-form-modal-invoices [name="tax_amount"]{font-weight:700;background:#f3fbfb!important;border-color:#a9dedd!important}
.cf-form-modal-invoices [name="subtotal"]:read-only,
.cf-form-modal-invoices [name="tax_amount"]:read-only{color:#132b3a}
.cf-form-modal-invoices .cf-invoice-form-actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
  grid-column:1/-1;
  padding-top:2px;
}
.cf-form-modal-invoices .cf-invoice-form-actions .cf-btn{min-width:112px}
.cf-form-modal-invoices .cf-invoice-form-actions .cf-btn.dark{min-width:150px}
@media(max-width:900px){
  .cf-form-modal-invoices #cf-form{padding:12px}
  .cf-form-modal-invoices .cf-items-head{display:none!important}
  .cf-form-modal-invoices .cf-item-row{
    min-width:0!important;
    grid-template-columns:1fr 1fr!important;
    gap:9px!important;
  }
  .cf-form-modal-invoices .cf-item-service-cell{grid-column:1/-1}
  .cf-form-modal-invoices .cf-item-action-cell{grid-column:1/-1;justify-self:end}
  .cf-form-modal-invoices .cf-mobile-item-label{display:block}
}
@media(max-width:560px){
  .cf-form-modal-invoices .cf-item-row{grid-template-columns:1fr!important}
  .cf-form-modal-invoices .cf-item-service-cell,
  .cf-form-modal-invoices .cf-item-action-cell{grid-column:auto}
  .cf-form-modal-invoices .cf-invoice-form-actions{justify-content:stretch}
  .cf-form-modal-invoices .cf-invoice-form-actions .cf-btn{flex:1;min-width:0}
}

/* ClinicFlow v3.5.68.11 - keep sidebar labels consistently left aligned */
.cf-sidebar nav a{
  text-align:left!important;
  justify-content:flex-start!important;
}
.cf-sidebar nav a .cf-menu-label{
  width:auto!important;
  min-width:0!important;
  flex:1 1 auto!important;
  text-align:left!important;
  line-height:1.35;
}
.cf-menu-group summary{
  text-align:left!important;
  justify-content:flex-start!important;
}
.cf-menu-group summary b{
  margin-left:auto!important;
}
.cf-submenu{
  padding-left:18px!important;
  padding-right:8px!important;
}
.cf-submenu a{
  padding-left:10px!important;
  text-align:left!important;
}
.cf-submenu a > span:first-child{
  flex:0 0 12px!important;
  width:12px!important;
  text-align:center!important;
}
.cf-submenu a .cf-menu-label{
  width:auto!important;
  text-align:left!important;
}
.cf-submenu-section{
  text-align:left!important;
}

/* v3.5.68.12: red logout button */
.cf-sidebar-logout{background:#c93a2f!important;border-color:#c93a2f!important;color:#fff!important;font-weight:700!important}
.cf-sidebar-logout:hover,.cf-sidebar-logout:focus{background:#a92f27!important;border-color:#a92f27!important;color:#fff!important}


/* ClinicFlow v3.5.68.13 - Service BOQ */
.cf-service-boq-field{gap:10px!important;margin-top:4px}
.cf-service-boq-list{display:grid;gap:9px}
.cf-service-boq-row{grid-template-columns:minmax(300px,1.8fr) minmax(150px,.8fr) minmax(170px,.9fr) 82px!important}
.cf-service-boq-row .cf-edit-row-remove{align-self:end}
@media(max-width:900px){.cf-service-boq-row{grid-template-columns:minmax(0,1fr)!important}.cf-service-boq-row>div,.cf-service-boq-row .cf-edit-row-remove{grid-column:1!important}}


/* ClinicFlow v3.5.68.14 - Service BOQ visual refinement */
.cf-service-boq-field .cf-consumables-title small{display:none!important}
.cf-service-boq-row .cf-consumable-item small{display:none!important}
.cf-boq-qty-unit-wrap{display:flex;align-items:stretch;gap:10px}
.cf-boq-qty-unit-wrap .cf-service-boq-main{min-width:0;flex:1 1 auto}
.cf-boq-main-unit{display:inline-flex;align-items:center;justify-content:center;min-width:72px;padding:0 12px;border:1px solid #d3dce6;border-radius:4px;background:#eef2f6;color:#455468;font-weight:500;white-space:nowrap}
@media(max-width:900px){.cf-boq-qty-unit-wrap{width:100%}.cf-boq-main-unit{min-width:64px}}


/* ClinicFlow v3.5.68.24 - Item Master table wrapping/readability */
body.cf-pharmacy-route-pharmacy-items .cf-table-wrap.cf-pharmacy-scroll > table.ph-table{
  table-layout:fixed!important;
  width:2360px!important;
  min-width:2360px!important;
  max-width:none!important;
}
body.cf-pharmacy-route-pharmacy-items .ph-table th,
body.cf-pharmacy-route-pharmacy-items .ph-table td{
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
  overflow:hidden!important;
  text-overflow:clip!important;
  vertical-align:top!important;
  line-height:1.35!important;
  height:auto!important;
}
body.cf-pharmacy-route-pharmacy-items .ph-table th:nth-child(1),
body.cf-pharmacy-route-pharmacy-items .ph-table td:nth-child(1){width:330px!important;min-width:330px!important;max-width:330px!important;}
body.cf-pharmacy-route-pharmacy-items .ph-table th:nth-child(2),
body.cf-pharmacy-route-pharmacy-items .ph-table td:nth-child(2){width:180px!important;min-width:180px!important;max-width:180px!important;}
body.cf-pharmacy-route-pharmacy-items .ph-table th:nth-child(3),
body.cf-pharmacy-route-pharmacy-items .ph-table td:nth-child(3){width:180px!important;min-width:180px!important;max-width:180px!important;}
body.cf-pharmacy-route-pharmacy-items .ph-table th:nth-child(4),
body.cf-pharmacy-route-pharmacy-items .ph-table td:nth-child(4){width:220px!important;min-width:220px!important;max-width:220px!important;}
body.cf-pharmacy-route-pharmacy-items .ph-table th:nth-child(5),
body.cf-pharmacy-route-pharmacy-items .ph-table td:nth-child(5){width:130px!important;min-width:130px!important;max-width:130px!important;}
body.cf-pharmacy-route-pharmacy-items .ph-table th:nth-child(6),
body.cf-pharmacy-route-pharmacy-items .ph-table td:nth-child(6){width:175px!important;min-width:175px!important;max-width:175px!important;}
body.cf-pharmacy-route-pharmacy-items .ph-table th:nth-child(7),
body.cf-pharmacy-route-pharmacy-items .ph-table td:nth-child(7){width:145px!important;min-width:145px!important;max-width:145px!important;}
body.cf-pharmacy-route-pharmacy-items .ph-table th:nth-child(8),
body.cf-pharmacy-route-pharmacy-items .ph-table td:nth-child(8){width:125px!important;min-width:125px!important;max-width:125px!important;}
body.cf-pharmacy-route-pharmacy-items .ph-table th:nth-child(9),
body.cf-pharmacy-route-pharmacy-items .ph-table td:nth-child(9){width:105px!important;min-width:105px!important;max-width:105px!important;}
body.cf-pharmacy-route-pharmacy-items .ph-table th:nth-child(n+10),
body.cf-pharmacy-route-pharmacy-items .ph-table td:nth-child(n+10){width:135px!important;min-width:135px!important;max-width:135px!important;}
body.cf-pharmacy-route-pharmacy-items .ph-table th:last-child,
body.cf-pharmacy-route-pharmacy-items .ph-table td:last-child{
  width:115px!important;
  min-width:115px!important;
  max-width:115px!important;
  white-space:nowrap!important;
  vertical-align:middle!important;
}
body.cf-pharmacy-route-pharmacy-items .ph-table tbody tr{height:auto!important;}


/* ClinicFlow v3.5.68.25 - force Item Name wrapping and auto row height */
body.cf-pharmacy-route-pharmacy-items .cf-table-wrap.cf-pharmacy-scroll table.ph-table tbody tr,
body.cf-pharmacy-route-pharmacy-items .cf-table-wrap.cf-pharmacy-scroll table.ph-table tbody td {
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
}
body.cf-pharmacy-route-pharmacy-items .cf-table-wrap.cf-pharmacy-scroll table.ph-table th:nth-child(1),
body.cf-pharmacy-route-pharmacy-items .cf-table-wrap.cf-pharmacy-scroll table.ph-table td:nth-child(1) {
  white-space:normal!important;
  overflow:visible!important;
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
  text-overflow:clip!important;
  line-height:1.4!important;
  height:auto!important;
  max-height:none!important;
  vertical-align:top!important;
}
body.cf-pharmacy-route-pharmacy-items .cf-table-wrap.cf-pharmacy-scroll table.ph-table td:nth-child(1) * {
  white-space:normal!important;
  overflow:visible!important;
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
  text-overflow:clip!important;
  max-width:100%!important;
}
