﻿/* ════════════════════════════════════════════════════════════════════════
   clinicpro-design.css  —  SEPARATED DESIGN LAYER
   ------------------------------------------------------------------------
   All custom page/control styling lives HERE, not inline in the .aspx/.ascx
   markup, so the design is decoupled from the logic. Loaded globally by the
   Fluent masters (ClinicProMaster.master, MasterPage2.master) right after
   theme-components.css, so every rule below applies wherever its (scoped)
   class appears.

   Rules are scoped by a wrapper class (.vitals-grid, .pain-scale-block, …) so
   nothing leaks. To change the design, edit THIS file — never re-add a
   <style> block to a control/page.
   ════════════════════════════════════════════════════════════════════════ */

/* ── Nurse control (Vital Signs tab): pain scale image, pain score chips,
      and the 2-column vital-signs grid (text field | result dropdown). ── */

/* Pain scale reference chart (pain_scale.svg): constrain the vector so it
   doesn't stretch to full container width, and centre it above the score. */
.pain-scale-block .pain-faces-img { text-align: center; margin: 6px 0 14px; }
.pain-scale-block .pain-faces-img img {
    width: 100%;
    max-width: 680px;
    height: auto;
    display: inline-block;
}
@media (max-width: 720px) {
    .pain-scale-block .pain-faces-img img { max-width: 100%; }
}

/* Pain score selector: render the 0..10 RadioButtonList as a clean row of
   number chips instead of default gray radios with the label knocked below. */
.pain-scale-block .pain-scale-radio {
    border-collapse: collapse;
    width: auto !important;
    margin: 6px auto 10px;
}
.pain-scale-block .pain-scale-radio tbody { display: block; }
.pain-scale-block .pain-scale-radio tr {
    display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center;
}
.pain-scale-block .pain-scale-radio td { padding: 0 !important; border: 0 !important; }
.pain-scale-block .pain-scale-radio input[type="radio"] {
    position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none;
}
.pain-scale-block .pain-scale-radio label {
    display: inline-flex !important;
    align-items: center; justify-content: center;
    min-width: 44px; height: 44px; padding: 0 8px; margin: 0;
    border: 1.5px solid var(--ns1); border-radius: 10px;
    background: var(--nb1); color: var(--nf1);
    font-size: 16px; font-weight: 600; line-height: 1;
    cursor: pointer; user-select: none;
    transition: background .12s, border-color .12s, color .12s, transform .08s, box-shadow .12s;
}
.pain-scale-block .pain-scale-radio label:hover {
    border-color: var(--brand-fg);
    background: var(--nb2);
}
.pain-scale-block .pain-scale-radio input[type="radio"]:checked + label {
    background: var(--brand-80); border-color: var(--brand-fg); color: #fff;
    transform: translateY(-1px); box-shadow: var(--shadow4);
}
.pain-scale-block .pain-scale-radio input[type="radio"]:focus-visible + label {
    outline: 2px solid var(--brand-80); outline-offset: 2px;
}

/* Vital signs grid — 2-column CSS grid per vital. Column 1 holds the value
   textbox with its normal-range caption underneath; column 2 holds the result
   dropdown, spanning both rows:  [ text field ] [ dropdown ]. */
.vitals-grid .vital-cell { margin-bottom: 14px !important; }
.vitals-grid .vital-row {
    display: grid !important;
    grid-template-columns: 110px 1fr;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 2px;
    width: 100%;
    align-items: center;
}
.vitals-grid .vital-row .vital-input {
    grid-column: 1;
    grid-row: 1;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    text-align: center;
}
.vitals-grid .vital-row .vital-reference {
    grid-column: 1;
    grid-row: 2;
    width: auto !important;
    font-size: 11px;
    color: var(--nf3);
    font-weight: 500;
    white-space: nowrap;
    text-align: center;
    line-height: 1.2;
}
.vitals-grid .vital-row .vital-dropdown {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    width: 100% !important;
    min-width: 0 !important;
}
@media (max-width: 768px) {
    .vitals-grid .vital-row {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    .vitals-grid .vital-row .vital-input     { grid-column: 1; grid-row: 1; }
    .vitals-grid .vital-row .vital-reference { grid-column: 1; grid-row: 2; }
    .vitals-grid .vital-row .vital-dropdown  { grid-column: 1; grid-row: 3; }
}

/* ===== migrated from Calendar\Controls\DoctorCalendar.ascx ===== */
.doctor-calendar-fluent {
    font-family: 'Segoe UI Variable', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--nf1);
}
.doctor-calendar-fluent .content-section {
    background: var(--nb1);
    border: 1px solid var(--ns2);
    border-radius: var(--r-xl);
    overflow: hidden;
    margin-bottom: 16px;
}
.doctor-calendar-fluent .formHeader {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px 12px;
    background: var(--nb1);
    border-bottom: 1px solid var(--ns2);
}
.doctor-calendar-fluent .formHeader .form-icon {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--brand-bg-tint); color: var(--brand-fg);
    font-size: 13px; display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.doctor-calendar-fluent .formHeader .title,
.doctor-calendar-fluent .formHeader .title label {
    margin: 0; font-size: 16px; font-weight: 600; color: var(--nf1);
}
.doctor-calendar-fluent .ContentContainer-section { padding: 16px 20px; }

/* Rows: vertical rhythm, no zebra background */
.doctor-calendar-fluent .row-striped { background: transparent !important; margin-bottom: 4px; }
.doctor-calendar-fluent .row > [class*="col-"],
.doctor-calendar-fluent .row-striped > [class*="col-"] {
    margin-bottom: 12px; background: transparent !important;
    display: flex; flex-direction: column; justify-content: flex-end;
}

/* Labels: 12px / 400, above the field */
.doctor-calendar-fluent .control-label,
.doctor-calendar-fluent label {
    display: block; margin: 0 0 4px; font-size: 12px; font-weight: 400;
    line-height: 16px; color: var(--nf2); text-transform: none; letter-spacing: 0;
    background: transparent !important;
}
/* Bare text nodes acting as labels (Mobile, Doctor, Time, etc.) sit in their own col */
.doctor-calendar-fluent .row-striped > [class*="col-"] {
    font-size: 12px; color: var(--nf2); line-height: 16px;
}

/* Inputs / selects / textareas */
.doctor-calendar-fluent input[type="text"],
.doctor-calendar-fluent select,
.doctor-calendar-fluent textarea,
.doctor-calendar-fluent .form-control {
    width: 100%; height: 32px; min-height: 32px; padding: 0 8px; margin: 0;
    border: 1px solid var(--ns1); border-radius: var(--r-sm);
    background: var(--nb1); color: var(--nf1);
    font-family: inherit; font-size: 14px; line-height: 20px; box-sizing: border-box;
    box-shadow: none;
}
.doctor-calendar-fluent .form-control.red,
.doctor-calendar-fluent input.red {
    border: 1px solid var(--ns1) !important;
}
.doctor-calendar-fluent input:focus,
.doctor-calendar-fluent select:focus,
.doctor-calendar-fluent textarea:focus,
.doctor-calendar-fluent .form-control:focus {
    border-color: var(--brand-fg); outline: none; box-shadow: none;
}
/* Hide the decorative select caret artifacts */
.doctor-calendar-fluent .arrow { display: none !important; }

/* Buttons: 32px, 4px radius, 14px/600, auto width, not uppercase */
.doctor-calendar-fluent input[type="submit"],
.doctor-calendar-fluent input[type="button"],
.doctor-calendar-fluent button,
.doctor-calendar-fluent .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 32px; min-height: 32px; padding: 0 12px; width: auto;
    border: 1px solid var(--ns1); border-radius: var(--r-sm);
    background: var(--nb1); color: var(--nf1);
    font-family: inherit; font-size: 14px; font-weight: 600; line-height: 20px;
    text-transform: none; letter-spacing: 0; cursor: pointer; white-space: nowrap;
    box-shadow: none;
}
.doctor-calendar-fluent .btn:hover,
.doctor-calendar-fluent input[type="submit"]:hover,
.doctor-calendar-fluent input[type="button"]:hover { background: var(--nb1-hover); }

/* Primary action emphasis for Save buttons */
.doctor-calendar-fluent #NewAppointment input[id$="btnSaveCal"] {
    background: var(--brand-80); border-color: var(--brand-fg); color: var(--nf-on-brand);
}
.doctor-calendar-fluent #NewAppointment input[id$="btnSaveCal"]:hover {
    background: var(--brand-90); border-color: var(--brand-90);
}

/* Hyperlinks-as-actions row: pill chips */
.doctor-calendar-fluent .dc-links a {
    display: inline-flex; align-items: center; height: 32px; padding: 0 12px;
    border: 1px solid var(--ns1); border-radius: var(--r-sm);
    color: var(--brand-fg); background: var(--nb1);
    font-size: 13px; font-weight: 600; text-decoration: none;
}
.doctor-calendar-fluent .dc-links a:hover { background: var(--nb1-hover); }

/* Status legend chips (Appointment / Canceled / Arrived / Finish) */
.doctor-calendar-fluent .control-label[id$="lblApp"],
.doctor-calendar-fluent .control-label[id$="lblCancel"],
.doctor-calendar-fluent .control-label[id$="lblWaiting"],
.doctor-calendar-fluent .control-label[id$="lblFinish"] {
    display: inline-flex !important; align-items: center; height: 22px; padding: 0 10px;
    border-radius: 11px; font-size: 12px !important; font-weight: 600 !important;
    color: #fff !important; line-height: 1 !important; margin-bottom: 0 !important;
}

/* Checkbox legibility */
.doctor-calendar-fluent input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.doctor-calendar-fluent .checkbox-style { font-size: 14px; color: var(--nf1); }
.doctor-calendar-fluent .radiobtn-style label { display: inline-flex; align-items: center; gap: 6px; margin-right: 14px; font-size: 14px; color: var(--nf1); }

/* GridView: 44px rows, header 12px/600 on nb2, hover (no zebra) */
.doctor-calendar-fluent .Grid { width: 100%; border-collapse: collapse; background: var(--nb1); }
.doctor-calendar-fluent .Grid th,
.doctor-calendar-fluent .gridHeader th {
    background: var(--nb2); color: var(--nf2);
    font-size: 12px; font-weight: 600; line-height: 16px; text-align: left;
    padding: 0 12px; height: 44px; border-bottom: 1px solid var(--ns1); white-space: nowrap;
}
.doctor-calendar-fluent .Grid td {
    font-size: 14px; color: var(--nf1); padding: 6px 12px; min-height: 44px;
    border-bottom: 1px solid var(--ns2); vertical-align: middle;
}
.doctor-calendar-fluent .Grid tr:hover td { background: var(--nb1-hover); }
.doctor-calendar-fluent .Grid .alt td { background: inherit; }
.doctor-calendar-fluent .Grid td table,
.doctor-calendar-fluent .Grid td table td { border: 0; padding: 1px 0; min-height: 0; }
.doctor-calendar-fluent .grid-pagination { padding: 8px 12px; }
.doctor-calendar-fluent .responsive-grid { overflow-x: auto; }

/* ===== migrated from Controls\FindPatient.ascx ===== */
/* Hide the Statement link in the FindPatient grid (HLStatement).
   The DLL is frozen so we can't set Visible="False" on the server control;
   suppress the rendered <a> instead. ASP.NET prefixes the id with the
   parent naming containers, so match by id-suffix. */
[id$="_HLStatement"],
a[id$="HLStatement"] {
    display: none !important;
}

.find-patient-fluent {
    font-family: inherit;
    color: var(--nf1);
}

.find-patient-fluent .findsearch-bar {
    border: 1px solid var(--ns2);
    padding: 10px 12px;
    margin-bottom: 12px;
    border-radius: var(--r-sm);
    background: var(--nb2);
}

.find-patient-fluent .fp-label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 400;
    color: var(--nf2);
    line-height: 16px;
}

.find-patient-fluent input[type="text"],
.find-patient-fluent select,
.find-patient-fluent .form-control {
    height: 32px;
    min-height: 32px;
    padding: 0 8px;
    border: 1px solid var(--ns1);
    border-radius: var(--r-sm);
    font-size: 14px;
    background: var(--nb1);
    color: var(--nf1);
    width: 100%;
    box-sizing: border-box;
    box-shadow: none;
}

.find-patient-fluent input[type="text"]:focus,
.find-patient-fluent select:focus,
.find-patient-fluent .form-control:focus {
    border-color: var(--brand-fg);
    outline: none;
    box-shadow: none;
}

.find-patient-fluent input[type="submit"],
.find-patient-fluent input[type="button"],
.find-patient-fluent button,
.find-patient-fluent .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    min-height: 32px;
    padding: 0 12px;
    border-radius: var(--r-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: none;
}

.find-patient-fluent .fp-search-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.find-patient-fluent .fp-search-row .fp-search-field {
    flex: 1;
    min-width: 0;
}

/* Search-type radios: keep them on one compact wrapping line. The global
   Fluent rule (label{display:block}) was forcing every radio label onto its
   own row, producing a tall vertical staircase. Restore inline flow so the
   options read as a tidy horizontal group of chips. */
.find-patient-fluent .findsearch-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 4px;
    padding: 8px 12px;
}
.find-patient-fluent .findsearch-bar > [class*="col-"] { padding: 0; width: 100%; }
.find-patient-fluent .findsearch-bar label {
    display: inline-flex;
    align-items: center;
    margin: 0 14px 0 4px;
    padding: 0;
    font-size: 13px;
    font-weight: 400;
    color: var(--nf1);
    line-height: 26px;
    white-space: nowrap;
    cursor: pointer;
}
.find-patient-fluent .findsearch-bar input[type="radio"] {
    /* sized to match the app-wide unified square toggles (the master's
       inline block draws them with appearance:none) */
    width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    margin: 0 5px 0 0;
    padding: 0;
    vertical-align: middle;
    accent-color: var(--brand-fg);
}
.find-patient-fluent .findsearch-bar [id$="RbtnSearch"] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 2px;
}

/* Search row: keep label above the field, button aligned with the input */
.find-patient-fluent .fp-search-row { align-items: flex-end; }

/* Grid: readable Fluent rows (global .gridHeader is hidden) */
.find-patient-fluent table.Grid { width: 100%; border-collapse: collapse; }
.find-patient-fluent table.Grid td {
    padding: 8px 12px;
    font-size: 14px;
    color: var(--nf1);
    vertical-align: middle;
    border-bottom: 1px solid var(--ns2);
}
.find-patient-fluent table.Grid tr:hover td { background: var(--nb1-hover); }
/* Grid action links: spaced, not crammed */
.find-patient-fluent table.Grid a { margin-right: 8px; }
.find-patient-fluent table.Grid .btn,
.find-patient-fluent table.Grid input[type="submit"],
.find-patient-fluent table.Grid input[type="button"] { padding: 0 10px; }

/* ===== migrated from Controls\InsuranceChatting.ascx ===== */
#ctl00_ContentPlaceHolder1_InsuranceChatting1_lblRecordCount,
[id$="lblRecordCount"] { color: var(--brand-fg) !important; font-weight: 600; }

.ins-chat-fluent { font-family: inherit; color: var(--nf1); }

/* Inputs / selects / textareas -> Fluent 32px fields */
.ins-chat-fluent input[type="text"],
.ins-chat-fluent select,
.ins-chat-fluent .form-control {
    height: 32px;
    min-height: 32px;
    padding: 0 8px;
    border: 1px solid var(--ns1);
    border-radius: var(--r-sm);
    font-size: 14px;
    background: var(--nb1);
    color: var(--nf1);
    box-sizing: border-box;
    box-shadow: none;
}
.ins-chat-fluent textarea,
.ins-chat-fluent .form-control[rows] {
    min-height: 64px;
    height: auto;
    padding: 8px;
    border: 1px solid var(--ns1);
    border-radius: var(--r-sm);
    font-size: 14px;
    background: var(--nb1);
    color: var(--nf1);
    width: 100%;
    box-sizing: border-box;
    box-shadow: none;
}
.ins-chat-fluent input:focus,
.ins-chat-fluent select:focus,
.ins-chat-fluent textarea:focus {
    border-color: var(--brand-fg);
    outline: none;
    box-shadow: none;
}

/* Buttons -> Fluent 32px */
.ins-chat-fluent input[type="submit"],
.ins-chat-fluent input[type="button"],
.ins-chat-fluent button,
.ins-chat-fluent .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    min-height: 32px;
    padding: 0 12px;
    border-radius: var(--r-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    text-transform: none;
    box-shadow: none;
}

/* Labels in search bar: caption styling, vertically centered with fields */
.ins-chat-fluent .ic-searchbar label,
.ins-chat-fluent .ic-searchbar .control-label {
    font-size: 12px;
    font-weight: 400;
    color: var(--nf2);
    line-height: 32px;
    margin: 0;
    text-transform: none;
}

/* Search bar row: align the From/To/Status/Search controls on one line */
.ins-chat-fluent .ic-searchbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid var(--ns2);
    border-radius: var(--r-sm);
    background: var(--nb2);
}
.ins-chat-fluent .ic-searchbar > [class*="col-"] {
    width: auto;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Normalize Syncfusion date pickers to ~32px and align inline */
.ins-chat-fluent .ic-searchbar table,
.ins-chat-fluent .ic-searchbar td { vertical-align: middle; }
.ins-chat-fluent .ic-searchbar input[type="text"] {
    height: 32px !important;
    width: 120px;
}

/* Grid: readable Fluent rows (global .gridHeader is hidden) */
.ins-chat-fluent table.Grid { width: 100%; border-collapse: collapse; }
.ins-chat-fluent table.Grid td {
    padding: 8px 12px;
    font-size: 14px;
    color: var(--nf1);
    vertical-align: middle;
    border-bottom: 1px solid var(--ns2);
}
.ins-chat-fluent table.Grid tr:hover td { background: var(--nb1-hover); }
.ins-chat-fluent table.Grid textarea { min-height: 56px; }

/* Reply modal panel -> clean Fluent card */
.ins-chat-fluent [id$="_Panel1"] {
    background-color: var(--nb1) !important;
    border: 1px solid var(--ns2) !important;
    border-radius: var(--r-xl) !important;
    padding: 16px !important;
    box-shadow: var(--shadow16);
    height: auto !important;
}
.ins-chat-fluent [id$="_Panel1"] .row { margin: 0 0 12px 0; }
.ins-chat-fluent [id$="_Panel1"] > .row:last-child {
    display: flex;
    gap: 8px;
    margin-bottom: 0;
}
.ins-chat-fluent [id$="_Panel1"] > .row:last-child > [class*="col-"] {
    width: auto;
    padding: 0;
}

/* ===== migrated from Controls\InsuranceControl.ascx ===== */
.insurance-control-fluent {
    display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px;
    font-family: 'Segoe UI Variable', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}
.insurance-control-fluent select {
    height: 32px; min-height: 32px; padding: 0 8px;
    border: 1px solid var(--ns1); border-radius: var(--r-sm);
    background: var(--nb1); color: var(--nf1);
    font-family: inherit; font-size: 14px; line-height: 20px; box-sizing: border-box;
    box-shadow: none; width: 175px; max-width: 100%;
}
.insurance-control-fluent select:focus { border-color: var(--brand-fg); outline: none; box-shadow: none; }

/* ===== migrated from Dental\DentalInvoice.ascx ===== */
/* ── Dental Invoice — Fluent 2 scoped polish ── */
.dental-invoice-fluent {
    font-family: 'Segoe UI Variable', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--nf1);
}
.dental-invoice-fluent .content-section {
    background: var(--nb1);
    border: 1px solid var(--ns2);
    border-radius: var(--r-xl);
    overflow: hidden;
    margin-bottom: 16px;
}
.dental-invoice-fluent .formHeader {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 18px 10px; background: var(--nb1);
    border-bottom: 1px solid var(--ns2); margin-bottom: 12px;
}
.dental-invoice-fluent .formHeader .form-icon {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--brand-bg-tint); color: var(--brand-fg);
    font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dental-invoice-fluent .formHeader .title,
.dental-invoice-fluent .formHeader .title label {
    margin: 0; font-size: 15px; font-weight: 600; color: var(--nf1);
}
.dental-invoice-fluent .ContentContainer-section { padding: 12px 16px; }

/* Rows + columns: vertical rhythm, bottom-align label/field pairs */
.dental-invoice-fluent .row-striped { background: transparent !important; }
.dental-invoice-fluent .row > [class*="col-"],
.dental-invoice-fluent .row-striped > [class*="col-"] {
    margin-bottom: 12px; background: transparent !important;
    display: flex; flex-direction: column; justify-content: flex-end;
}

/* Labels: 12px / 400, above field, never bold/uppercase */
.dental-invoice-fluent .control-label,
.dental-invoice-fluent label {
    display: block; margin: 0 0 4px; font-size: 12px; font-weight: 400;
    line-height: 16px; color: var(--nf2); text-transform: none; letter-spacing: 0;
    background: transparent !important;
}

/* Inputs / selects / textareas */
.dental-invoice-fluent input[type="text"],
.dental-invoice-fluent input[type="password"],
.dental-invoice-fluent select,
.dental-invoice-fluent textarea,
.dental-invoice-fluent .form-control {
    width: 100%; height: 32px; min-height: 32px; padding: 0 8px; margin: 0;
    border: 1px solid var(--ns1); border-radius: var(--r-sm);
    background: var(--nb1); color: var(--nf1);
    font-family: inherit; font-size: 14px; line-height: 20px; box-sizing: border-box;
    box-shadow: none;
}
.dental-invoice-fluent .form-control.red,
.dental-invoice-fluent input.red {
    border: 1px solid var(--ns1) !important;
}
.dental-invoice-fluent input:focus,
.dental-invoice-fluent select:focus,
.dental-invoice-fluent textarea:focus,
.dental-invoice-fluent .form-control:focus {
    border-color: var(--brand-fg); outline: none; box-shadow: none;
}
/* Hide decorative select caret artifacts */
.dental-invoice-fluent .arrow { display: none !important; }

/* Buttons: 32px, 4px radius, 14px/600, auto width, not uppercase */
.dental-invoice-fluent input[type="submit"],
.dental-invoice-fluent input[type="button"],
.dental-invoice-fluent button,
.dental-invoice-fluent .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 32px; min-height: 32px; padding: 0 12px; width: auto;
    border: 1px solid var(--ns1); border-radius: var(--r-sm);
    background: var(--nb1); color: var(--nf1);
    font-family: inherit; font-size: 14px; font-weight: 600; line-height: 20px;
    text-transform: none; letter-spacing: 0; cursor: pointer; white-space: nowrap; box-shadow: none;
}
.dental-invoice-fluent .btn:hover,
.dental-invoice-fluent input[type="submit"]:hover { background: var(--nb1-hover); }

/* Primary emphasis: Create Invoice */
.dental-invoice-fluent input[id$="btnCreateInvoice"] {
    background: var(--brand-80); border-color: var(--brand-fg); color: var(--nf-on-brand);
}
.dental-invoice-fluent input[id$="btnCreateInvoice"]:hover {
    background: var(--brand-90); border-color: var(--brand-90);
}
.dental-invoice-fluent input[id$="btnRemoveAllCPTs"] {
    background: var(--danger); border-color: var(--danger); color: var(--nf-on-brand);
}

/* Hyperlinks in the action bar render as subtle chips */
.dental-invoice-fluent .row a[id*="HL"],
.dental-invoice-fluent .row a[id*="HyperLink"] {
    display: inline-flex; align-items: center; height: 32px; padding: 0 12px;
    border: 1px solid var(--ns1); border-radius: var(--r-sm);
    color: var(--brand-fg); background: var(--nb1);
    font-size: 13px; font-weight: 600; text-decoration: none;
}
.dental-invoice-fluent .row a[id*="HL"]:hover,
.dental-invoice-fluent .row a[id*="HyperLink"]:hover { background: var(--nb1-hover); }

/* Checkboxes / radios */
.dental-invoice-fluent input[type="checkbox"],
.dental-invoice-fluent input[type="radio"] { width: 16px; height: 16px; cursor: pointer; vertical-align: middle; }
.dental-invoice-fluent .checkbox-style,
.dental-invoice-fluent .radiobtn-style label { font-size: 14px; color: var(--nf1); }
.dental-invoice-fluent .radiobtn-style label { display: inline-flex; align-items: center; gap: 6px; margin-right: 14px; }

/* GridView data tables: 44px rows, header 12px/600, hover (no zebra) */
.dental-invoice-fluent .Grid { width: 100%; border-collapse: collapse; background: var(--nb1); }
.dental-invoice-fluent .Grid th,
.dental-invoice-fluent .gridHeader th {
    background: var(--nb2); color: var(--nf2);
    font-size: 12px; font-weight: 600; line-height: 16px; text-align: left;
    padding: 0 10px; height: 44px; border-bottom: 1px solid var(--ns1); white-space: nowrap;
}
.dental-invoice-fluent .Grid td {
    font-size: 14px; color: var(--nf1); padding: 6px 10px;
    border-bottom: 1px solid var(--ns2); vertical-align: middle;
}
.dental-invoice-fluent .Grid tr:hover td { background: var(--nb1-hover); }
.dental-invoice-fluent .responsive-grid { overflow-x: auto; }
/* In-grid inputs stay compact */
.dental-invoice-fluent .Grid td input[type="text"],
.dental-invoice-fluent .Grid td select { height: 28px; min-height: 28px; font-size: 13px; }

.invbox {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--nf1) !important;
    color: var(--nb1) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    height: 36px !important;
    min-width: 80px !important;
    padding: 0 12px !important;
    border-radius: var(--r-sm) !important;
    text-align: center !important;
    margin: 0 !important;
    vertical-align: middle !important;
}

/* ===== migrated from Dental\Controls\DentalHistory.ascx ===== */
.denthist-fluent {
    font-family: 'Segoe UI Variable','Segoe UI',-apple-system,BlinkMacSystemFont,sans-serif;
    color: var(--nf1);
}
.denthist-fluent .row { margin-left: -8px; margin-right: -8px; }
.denthist-fluent .row-striped { background: none; }
.denthist-fluent [class*="col-"] {
    padding-left: 8px;
    padding-right: 8px;
    margin-bottom: 8px;
    min-height: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.denthist-fluent .control-label,
.denthist-fluent label {
    display: block;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    color: var(--nf2);
    margin-bottom: 4px;
    text-transform: none;
    letter-spacing: 0;
}
.denthist-fluent input[type="text"],
.denthist-fluent textarea,
.denthist-fluent .form-control {
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--ns1);
    border-radius: var(--r-sm);
    background: var(--nb1);
    color: var(--nf1);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}
.denthist-fluent textarea,
.denthist-fluent textarea.form-control {
    height: auto;
    min-height: 64px;
    padding: 8px;
}
.denthist-fluent input:focus,
.denthist-fluent textarea:focus,
.denthist-fluent select:focus {
    border-color: var(--brand-fg);
    box-shadow: none;
}
.denthist-fluent .checkbox-style {
    display: inline-flex;
    align-items: flex-start;
    font-size: 14px;
    font-weight: 400 !important;
    color: var(--nf1);
    min-height: 32px;
    line-height: 1.3;
}
.denthist-fluent .checkbox-style input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 2px 6px 0 0;
    flex-shrink: 0;
}
.denthist-fluent .radiobtn-style label {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 400;
    color: var(--nf1);
    margin: 0 12px 0 0;
}
.denthist-fluent .radiobtn-style input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0 4px 0 0;
    vertical-align: middle;
}
/* red bold section headings -> Fluent subtitle weight */
.denthist-fluent span[id*="Label14"],
.denthist-fluent span[id*="Label15"],
.denthist-fluent span[id*="Label17"],
.denthist-fluent span[id*="Label18"],
.denthist-fluent span[id*="Label19"],
.denthist-fluent span[id*="Label20"] {
    font-size: 14px;
    font-weight: 600;
}
.denthist-fluent input[type="image"] {
    vertical-align: middle;
    margin-right: 8px;
}

/* ===== migrated from Dental\Controls\FamilyHistory.ascx ===== */
.famhist-fluent {
    font-family: 'Segoe UI Variable','Segoe UI',-apple-system,BlinkMacSystemFont,sans-serif;
    color: var(--nf1);
}
.famhist-fluent .row { margin-left: -8px; margin-right: -8px; }
.famhist-fluent .row-striped { background: none; }
.famhist-fluent [class*="col-"] {
    padding-left: 8px;
    padding-right: 8px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.famhist-fluent .control-label,
.famhist-fluent label {
    display: block;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    color: var(--nf2);
    margin-bottom: 4px;
    text-transform: none;
    letter-spacing: 0;
}
.famhist-fluent input[type="text"],
.famhist-fluent textarea,
.famhist-fluent .form-control {
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--ns1);
    border-radius: var(--r-sm);
    background: var(--nb1);
    color: var(--nf1);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}
.famhist-fluent textarea,
.famhist-fluent .form-control[rows],
.famhist-fluent textarea.form-control {
    height: auto;
    min-height: 64px;
    padding: 8px;
}
.famhist-fluent input:focus,
.famhist-fluent textarea:focus,
.famhist-fluent select:focus {
    border-color: var(--brand-fg);
    box-shadow: none;
}
.famhist-fluent .checkbox-style {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 400;
    color: var(--nf1);
    min-height: 32px;
}
.famhist-fluent .checkbox-style input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0 6px 0 0;
    vertical-align: middle;
}
/* legacy bold labels normalized to Fluent weight */
.famhist-fluent .checkbox-style label,
.famhist-fluent .checkbox-style {
    font-weight: 400 !important;
}
.famhist-fluent input[type="image"] {
    vertical-align: middle;
    margin-right: 8px;
}

/* ===== migrated from Dental\Controls\MedicalHistory.ascx ===== */
.medhist-fluent {
    font-family: 'Segoe UI Variable','Segoe UI',-apple-system,BlinkMacSystemFont,sans-serif;
    color: var(--nf1);
}
.medhist-fluent .row { margin-left: -8px; margin-right: -8px; }
.medhist-fluent .row-striped { background: none; }
.medhist-fluent [class*="col-"] {
    padding-left: 8px;
    padding-right: 8px;
    margin-bottom: 8px;
    min-height: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.medhist-fluent .control-label,
.medhist-fluent label {
    display: block;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    color: var(--nf2);
    margin-bottom: 4px;
    text-transform: none;
    letter-spacing: 0;
}
.medhist-fluent input[type="text"],
.medhist-fluent textarea,
.medhist-fluent .form-control {
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--ns1);
    border-radius: var(--r-sm);
    background: var(--nb1);
    color: var(--nf1);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}
.medhist-fluent textarea,
.medhist-fluent textarea.form-control {
    height: auto;
    min-height: 64px;
    padding: 8px;
}
.medhist-fluent input:focus,
.medhist-fluent textarea:focus,
.medhist-fluent select:focus {
    border-color: var(--brand-fg);
    box-shadow: none;
}
.medhist-fluent .checkbox-style {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    font-weight: 400 !important;
    color: var(--nf1);
    min-height: 32px;
    line-height: 1.3;
}
.medhist-fluent .checkbox-style input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0 6px 0 0;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
}
/* section headings (red bold legacy) -> Fluent subtitle */
.medhist-fluent span[id*="Label15"],
.medhist-fluent span[id*="Label19"],
.medhist-fluent span[id*="Label20"],
.medhist-fluent span[id*="Label4"] {
    font-size: 14px;
    font-weight: 600;
}
.medhist-fluent .GridViewStyle, .medhist-fluent .Grid { width: 100%; border-collapse: collapse; }
.medhist-fluent table.Grid th, .medhist-fluent .gridHeader th, .medhist-fluent .gridHeader {
    background: var(--nb2);
    height: 44px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--nf2);
    border-bottom: 1px solid var(--ns1);
    text-align: left;
    white-space: nowrap;
}
.medhist-fluent table.Grid td {
    height: 44px;
    padding: 0 12px;
    font-size: 14px;
    color: var(--nf1);
    border-bottom: 1px solid var(--ns2);
    vertical-align: middle;
}
.medhist-fluent table.Grid tr:hover td { background: var(--nb1-hover); }
.medhist-fluent table.Grid .alt td { background: inherit; }
.medhist-fluent input[type="image"] { vertical-align: middle; }

/* ===== migrated from Doctor\Controls\CtrlPatientAllergy.ascx ===== */
/* ===== Fluent 2 scoped styling for Patient Allergy control ===== */
.allergy-fluent { font-family: inherit; color: var(--nf1); }

/* Labels: 12px / 400, never bold/uppercase */
.allergy-fluent .control-label,
.allergy-fluent label {
    display: block;
    font-size: 12px;
    font-weight: 400 !important;
    line-height: 16px;
    color: var(--nf2);
    margin-bottom: 4px;
    text-transform: none;
    letter-spacing: 0;
}

/* Align label columns with field columns on the same row */
.allergy-fluent .row { margin-left: 0; margin-right: 0; }
.allergy-fluent .row > [class*="col-"] {
    padding: 6px 8px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Inputs / selects */
.allergy-fluent input[type="text"],
.allergy-fluent select,
.allergy-fluent .form-control {
    height: 32px;
    min-height: 32px;
    padding: 0 8px;
    border: 1px solid var(--ns1);
    border-radius: var(--r-sm);
    background: var(--nb1);
    color: var(--nf1);
    font-size: 14px;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    box-shadow: none;
    outline: none;
}
.allergy-fluent input:focus,
.allergy-fluent select:focus {
    border-color: var(--brand-fg);
    box-shadow: none;
    outline: none;
}

/* Telerik AutoComplete box: match Fluent input look + full width */
.allergy-fluent .RadAutoCompleteBox { width: 100% !important; }
.allergy-fluent .RadAutoCompleteBox .racWrap,
.allergy-fluent .RadAutoCompleteBox .racToken,
.allergy-fluent .RadAutoCompleteBox input.racText {
    min-height: 30px;
    font-size: 14px;
    font-family: inherit;
}
.allergy-fluent .RadAutoCompleteBox .racWrap {
    border: 1px solid var(--ns1) !important;
    border-radius: var(--r-sm) !important;
    background: var(--nb1) !important;
    box-shadow: none !important;
}

/* Image add button aligned to field baseline */
.allergy-fluent input[type="image"] { vertical-align: middle; }

/* Section header */
.allergy-fluent .formHeader {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
}
.allergy-fluent .formHeader .form-icon { color: var(--brand-fg); }
.allergy-fluent .formHeader .title { font-size: 16px; font-weight: 600; color: var(--nf1); }

/* GridView: 44px rows, Fluent header, hover, no zebra */
.allergy-fluent table.Grid { width: 100%; border-collapse: collapse; }
.allergy-fluent table.Grid th,
.allergy-fluent table.Grid .gridHeader th {
    background: var(--nb2);
    height: 44px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--nf2);
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid var(--ns1);
}
.allergy-fluent table.Grid td {
    height: 44px;
    padding: 6px 12px;
    font-size: 14px;
    color: var(--nf1);
    vertical-align: middle;
    border-bottom: 1px solid var(--ns2);
}
.allergy-fluent table.Grid tr.alt td { background: transparent; }
.allergy-fluent table.Grid tr:hover td { background: var(--nb1-hover); }
.allergy-fluent table.Grid select[disabled] {
    border: none;
    background: transparent;
    color: var(--nf1);
    height: auto;
    padding: 0;
}
.allergy-fluent table.Grid a,
.allergy-fluent table.Grid input[type="submit"] {
    font-size: 13px;
    color: var(--brand-fg);
}

/* Validators */
.allergy-fluent span[id*="Validator"] { color: var(--danger); font-size: 12px; }
.allergy-fluent .table-responsive { width: 100%; overflow-x: auto; }

/* ===== migrated from Doctor\Controls\Diagnosis.ascx ===== */
.diagnosis-fluent {
    font-family: inherit;
    color: var(--nf1);
}

.diagnosis-fluent .dg-label,
.diagnosis-fluent .row-striped > .col-md-12 > label,
.diagnosis-fluent .row-striped > .col-md-12 > asp\:label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 400 !important;   /* override inline Font-Bold on Label103 */
    color: var(--nf2);
    line-height: 16px;
    text-transform: none;
}

/* Scoped grid: Fluent row height + readable cells (global .gridHeader is hidden) */
.diagnosis-fluent table.Grid { width: 100%; border-collapse: collapse; }
.diagnosis-fluent table.Grid td {
    padding: 6px 12px;
    font-size: 14px;
    color: var(--nf1);
    vertical-align: middle;
    border-bottom: 1px solid var(--ns2);
}
.diagnosis-fluent table.Grid tr:hover td { background: var(--nb1-hover); }
.diagnosis-fluent table.Grid .btn,
.diagnosis-fluent table.Grid input[type="submit"],
.diagnosis-fluent table.Grid input[type="button"] {
    padding: 0 10px;
}

.diagnosis-fluent input[type="text"],
.diagnosis-fluent select,
.diagnosis-fluent .form-control {
    height: 32px;
    min-height: 32px;
    padding: 0 8px;
    border: 1px solid var(--ns1);
    border-radius: var(--r-sm);
    font-size: 14px;
    background: var(--nb1);
    color: var(--nf1);
    width: 100%;
    box-sizing: border-box;
    box-shadow: none;
}

.diagnosis-fluent input[type="text"]:focus,
.diagnosis-fluent select:focus,
.diagnosis-fluent .form-control:focus {
    border-color: var(--brand-fg);
    outline: none;
    box-shadow: none;
}

.diagnosis-fluent input[type="submit"],
.diagnosis-fluent input[type="button"],
.diagnosis-fluent button,
.diagnosis-fluent .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    min-height: 32px;
    padding: 0 12px;
    border-radius: var(--r-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: none;
}

.diagnosis-fluent .dg-field-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.diagnosis-fluent .dg-field-input {
    flex: 1;
    min-width: 0;
}

.diagnosis-fluent .row-striped {
    padding: 8px 0;
    margin-left: 0;
    margin-right: 0;
}

.diagnosis-fluent input[type="image"].dg-img-replaced {
    display: none !important;
}

.diagnosis-fluent .dg-img-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--ns1);
    border-radius: var(--r-sm);
    background: var(--nb1);
    color: var(--nf2);
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
}

.diagnosis-fluent .dg-img-btn:hover {
    background: var(--nb1-hover);
    color: var(--nf1);
}

.diagnosis-fluent [id$="PanelSearch"] {
    background-color: var(--nb1) !important;
    border: 1px solid var(--ns2) !important;
    border-radius: var(--r-xl) !important;
    padding: 16px !important;
    box-shadow: var(--shadow16);
}

/* Modal OK/Cancel row: align side-by-side instead of stacked bootstrap cols */
.diagnosis-fluent [id$="PanelSearch"] > .row:first-child {
    display: flex;
    gap: 8px;
    margin: 0 0 12px 0;
}
.diagnosis-fluent [id$="PanelSearch"] > .row:first-child > [class*="col-"] {
    width: auto;
    padding: 0;
}

/* ===== migrated from Doctor\Controls\DoctorGPPatientEducation.ascx ===== */
.gppe-fluent { padding: 8px 4px; }
.gppe-fluent .row { margin-left: 0; margin-right: 0; }
.gppe-fluent .row-striped { background: transparent; }

/* Labels: 12px/400, above the field, not uppercase. The source markup puts
   labels in a left column beside the field; normalise their typography and
   spacing so each label reads as a Fluent caption directly over its input. */
.gppe-fluent .control-label,
.gppe-fluent label {
    display: block;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    color: var(--nf2);
    margin-bottom: 4px;
    text-transform: lowercase;
}
.gppe-fluent .control-label::first-letter { text-transform: uppercase; }

/* Decorative dropdown arrow injected after selects in legacy markup — hide it,
   the themed <select> already paints its own chevron. */
.gppe-fluent i.arrow { display: none; }

/* Consistent vertical rhythm between fields/columns */
.gppe-fluent [class*="col-md-"] { margin-bottom: 8px; }

/* The "..." favourite buttons and add image button — align to field bottom */
.gppe-fluent .gppe-btn-cell { display: flex; align-items: flex-end; }
.gppe-fluent .gppe-btn-cell .btn { width: auto !important; }

/* GridView — Fluent 2 data table */
.gppe-fluent .Grid { width: 100%; border-collapse: collapse; background: var(--nb1); border: 1px solid var(--ns2); border-radius: var(--r-sm); overflow: hidden; }
.gppe-fluent .Grid th,
.gppe-fluent .gridHeader th {
    height: 44px; padding: 0 12px; text-align: left;
    background: var(--nb2); color: var(--nf2);
    font-size: 12px; font-weight: 600;
    border-bottom: 1px solid var(--ns1); white-space: nowrap;
}
.gppe-fluent .Grid td {
    height: 44px; padding: 8px 12px;
    font-size: 14px; color: var(--nf1);
    border-bottom: 1px solid var(--ns2); vertical-align: middle;
}
.gppe-fluent .Grid tr:hover td { background: var(--nb1-hover); }
.gppe-fluent .grid-pagination td { height: auto; padding: 6px 12px; border: none; }

/* Favourite modal panel */
.gppe-fluent .modalBackground { background: rgba(0,0,0,0.4); }

/* ===== migrated from Doctor\Controls\PatientProblems.ascx ===== */
/* ===== Fluent 2 scoped styling for Patient Problems control ===== */
.problems-fluent { font-family: inherit; color: var(--nf1); }

/* Labels: 12px / 400, never bold/uppercase */
.problems-fluent .control-label,
.problems-fluent label {
    display: block;
    font-size: 12px;
    font-weight: 400 !important;
    line-height: 16px;
    color: var(--nf2);
    margin-bottom: 4px;
    text-transform: none;
    letter-spacing: 0;
}

/* Align label columns with field columns on the same row */
.problems-fluent .row { margin-left: 0; margin-right: 0; }
.problems-fluent .row > [class*="col-"] {
    padding: 6px 8px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Inputs / selects */
.problems-fluent input[type="text"],
.problems-fluent select,
.problems-fluent .form-control {
    height: 32px;
    min-height: 32px;
    padding: 0 8px;
    border: 1px solid var(--ns1);
    border-radius: var(--r-sm);
    background: var(--nb1);
    color: var(--nf1);
    font-size: 14px;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    box-shadow: none;
    outline: none;
}
.problems-fluent input:focus,
.problems-fluent select:focus {
    border-color: var(--brand-fg);
    box-shadow: none;
    outline: none;
}

/* Telerik AutoComplete box: match Fluent input look + full width */
.problems-fluent .RadAutoCompleteBox { width: 100% !important; }
.problems-fluent .RadAutoCompleteBox .racWrap {
    border: 1px solid var(--ns1) !important;
    border-radius: var(--r-sm) !important;
    background: var(--nb1) !important;
    box-shadow: none !important;
    min-height: 30px;
}
.problems-fluent .RadAutoCompleteBox input.racText { font-size: 14px; font-family: inherit; }

.problems-fluent input[type="image"] { vertical-align: middle; }

/* Section header */
.problems-fluent .formHeader {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
}
.problems-fluent .formHeader .form-icon { color: var(--brand-fg); }
.problems-fluent .formHeader .title { font-size: 16px; font-weight: 600; color: var(--nf1); }

/* GridView: 44px rows, Fluent header, hover, no zebra */
.problems-fluent table.Grid { width: 100%; border-collapse: collapse; }
.problems-fluent table.Grid th,
.problems-fluent table.Grid .gridHeader th {
    background: var(--nb2);
    height: 44px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--nf2);
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid var(--ns1);
}
.problems-fluent table.Grid td {
    height: 44px;
    padding: 6px 12px;
    font-size: 14px;
    color: var(--nf1);
    vertical-align: middle;
    border-bottom: 1px solid var(--ns2);
}
.problems-fluent table.Grid tr.alt td { background: transparent; }
.problems-fluent table.Grid tr:hover td { background: var(--nb1-hover); }
.problems-fluent table.Grid select[disabled] {
    border: none;
    background: transparent;
    color: var(--nf1);
    height: auto;
    padding: 0;
}
.problems-fluent table.Grid a,
.problems-fluent table.Grid input[type="submit"] {
    font-size: 13px;
    color: var(--brand-fg);
}

/* ===== migrated from Patients\Patient.ascx ===== */
.patient-fluent { font-family: inherit; color: var(--nf1); }
.patient-fluent .pf-label,
.patient-fluent label.control-label {
    display: block; margin-bottom: 4px; font-size: 12px; font-weight: 400;
    color: var(--nf2); line-height: 16px;
}
.patient-fluent input[type="text"],
.patient-fluent input[type="password"],
.patient-fluent input[type="email"],
.patient-fluent input[type="number"],
.patient-fluent input[type="tel"],
.patient-fluent select,
.patient-fluent textarea,
.patient-fluent .form-control {
    height: 32px; min-height: 32px; padding: 0 8px;
    border: 1px solid var(--ns1); border-radius: var(--r-sm);
    font-size: 14px; background: var(--nb1); color: var(--nf1);
    width: 100%; box-sizing: border-box; box-shadow: none;
}
.patient-fluent input[type="text"]:focus,
.patient-fluent select:focus,
.patient-fluent .form-control:focus {
    border-color: var(--brand-fg); outline: none; box-shadow: none;
}
.patient-fluent input[type="submit"],
.patient-fluent input[type="button"],
.patient-fluent button,
.patient-fluent .btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 32px; min-height: 32px; padding: 0 12px;
    border-radius: var(--r-sm); font-size: 14px; font-weight: 600;
    font-family: inherit; cursor: pointer; white-space: nowrap; box-shadow: none;
}
.patient-fluent .pf-age-input { width: 64px !important; flex: 0 0 64px !important; min-width: 0; }
.patient-fluent .pf-inline-row .btn { flex: 0 0 auto; height: 32px; padding: 0 10px; font-size: 13px; }
/* DOB date input â€” takes remaining space */
.patient-fluent .pf-inline-row input#txtBirthDate,
.patient-fluent .pf-inline-row input[id$="BirthDate"] { flex: 1 1 0 !important; min-width: 80px; width: auto !important; }
/* Mobile code inputs â€” fixed small width, number input expands */
.patient-fluent .pf-inline-row input[id$="MobileCountryCode"] { flex: 0 0 60px !important; width: 60px !important; }
.patient-fluent .pf-inline-row input[id$="MobileAreaCode"] { flex: 0 0 52px !important; width: 52px !important; }
.patient-fluent .pf-inline-row input[id$="txtMobile"] { flex: 1 1 0 !important; min-width: 80px; width: auto !important; }
.patient-fluent .arrow { display: none !important; }
.patient-fluent input[type="image"].pf-img-replaced { display: none !important; }
.patient-fluent .pf-img-btn {
    display: inline-flex !important; align-items: center; justify-content: center;
    gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--ns1);
    border-radius: var(--r-sm); background: var(--nb1); color: var(--nf2);
    font-size: 14px; font-weight: 600; cursor: pointer;
}
.patient-fluent .pf-img-btn:hover { background: var(--nb1-hover); color: var(--nf1); }
.patient-fluent .pf-btn-primary { background: var(--brand-80) !important; border-color: var(--brand-fg) !important; color: var(--nf-on-brand) !important; }
.patient-fluent .pf-btn-danger { background: var(--danger) !important; border-color: var(--danger) !important; color: var(--nf-on-brand) !important; }
.patient-fluent .pf-inline-row { display: flex; align-items: center; gap: 6px; width: 100%; }
.patient-fluent .pf-inline-row input[type="text"],
.patient-fluent .pf-inline-row select { width: auto; flex: 1; min-width: 0; }
.patient-fluent .pf-inline-row .pf-img-btn { flex: 0 0 32px; width: 32px; padding: 0; }
.patient-fluent .pf-actions-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.patient-fluent .pf-insurance-box { border: 1px solid var(--ns2); border-radius: var(--r-xl); padding: 16px; background: var(--nb1); }
.patient-fluent .pf-radio-inline { display: flex; align-items: center; gap: 18px; height: 32px; padding: 0 10px; border: 1px solid var(--ns1); border-radius: var(--r-sm); background: var(--nb1); }
.patient-fluent .pf-radio-inline td { padding: 0 !important; border: 0; }
.patient-fluent .pf-radio-inline label { display: inline-flex; align-items: center; gap: 6px; margin: 0 14px 0 4px; font-size: 14px; font-weight: 500; color: var(--nf1); cursor: pointer; }
.patient-fluent .pf-radio-inline input[type="radio"] { margin: 0; cursor: pointer; accent-color: var(--brand-fg); }
.patient-fluent .pf-message-box { border: 2px solid var(--danger); border-radius: var(--r-sm); padding: 8px 12px; }
.patient-fluent textarea.form-control { height: auto; min-height: 64px; resize: vertical; padding: 6px 8px; }
/* Neutralise the legacy .red class â€” normal border, no aggressive red bar */
.patient-fluent .form-control.red,
.patient-fluent input.red,
.patient-fluent select.red {
    border: 1px solid var(--ns1) !important;
    border-left-width: 1px !important;
}
.patient-fluent .pf-field-text { display: flex; flex-direction: column; }
.patient-fluent .pf-field-text > span.pf-label { display: block; }
.patient-fluent .pf-toggle-btn {
    display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px;
    border: 1px solid var(--ns1); border-radius: var(--r-sm); background: var(--nb2);
    color: var(--nf2); font-size: 14px; font-weight: 500; cursor: pointer;
    margin: 8px 0; font-family: inherit;
}
.patient-fluent .pf-toggle-btn:hover { background: var(--nb1-hover); color: var(--nf1); border-color: var(--brand-fg); }
.patient-fluent hr.dotted { border: none; border-top: 1px dashed var(--ns2); margin: 12px 0; }
.patient-fluent .row { margin-bottom: 0; }
.patient-fluent .row > [class*="col-"] { margin-bottom: 14px; }
.patient-fluent .formHeader { display: flex; align-items: center; gap: 8px; padding: 12px 16px 10px; border-bottom: 1px solid var(--ns2); margin-bottom: 12px; background: var(--nb2); }
.patient-fluent .formHeader .title { font-size: 15px; font-weight: 600; color: var(--nf1); }
.patient-fluent .formHeader .form-icon { width: 26px; height: 26px; border-radius: 50%; background: var(--brand-bg-tint); color: var(--brand-fg); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.patient-fluent .content-section { border: 1px solid var(--ns2); border-radius: var(--r-xl); overflow: visible; margin-bottom: 16px; }
.patient-fluent .content-section .formHeader { border-radius: var(--r-xl) var(--r-xl) 0 0; overflow: hidden; }
.patient-fluent .ContentContainer-section { padding: 14px 20px; }
.patient-fluent input[type="checkbox"] { width: 16px; height: 16px; margin-top: 6px; cursor: pointer; }
.patient-fluent .pf-actions-bar .pf-img-btn { min-width: 80px; }
/* Spacing around action bar and message box â€” no br tags needed */
.patient-fluent .pf-actions-bar { margin-top: 16px; margin-bottom: 0; }
.patient-fluent .pf-message-box { margin-top: 12px; margin-bottom: 12px; display: none; }
.patient-fluent .pf-message-box.pf-has-message { display: block; }
/* Audit trail value display */
.patient-fluent .pf-audit-value {
    display: block; font-size: 13px; font-weight: 600; color: var(--nf1);
    line-height: 20px; padding: 4px 0;
}
/* Bottom links bar */
.patient-fluent .pf-links-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    padding: 10px 0; border-top: 1px solid var(--ns2); margin-top: 8px;
}
.patient-fluent .pf-link-btn {
    display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px;
    border: 1px solid var(--ns2); border-radius: var(--r-sm); background: var(--nb2);
    color: var(--nf2); font-size: 13px; text-decoration: none !important;
    transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.patient-fluent .pf-link-btn:hover { background: var(--nb1-hover); color: var(--nf1); border-color: var(--brand-fg); }
/* Static hidden rows (e.g. inside insurance tabs) */
.patient-fluent .pf-hidden { display: none !important; }
/* FileUpload label + control alignment */
.patient-fluent .pf-upload-wrap { display: flex; flex-direction: column; }
.patient-fluent .pf-upload-wrap input[type="file"] { margin-top: 4px; }

/* â”€â”€ Date picker fields â€” calendar icon embedded in the textbox itself,
      no separate trigger button. Clicking/focusing the textbox opens the
      AjaxControlToolkit CalendarExtender popup natively. â”€â”€ */
.patient-fluent .pf-datefield,
.patient-fluent input[type="text"].pf-datefield {
    padding-right: 34px !important;
    cursor: pointer;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><rect x='1.5' y='3' width='13' height='11' rx='1.5' fill='none' stroke='%23556' stroke-width='1.4'/><path d='M1.5 6h13' fill='none' stroke='%23556' stroke-width='1.4'/><rect x='4' y='1.5' width='1.4' height='3.2' fill='%23556'/><rect x='10.6' y='1.5' width='1.4' height='3.2' fill='%23556'/><circle cx='5' cy='9' r='0.9' fill='%23556'/><circle cx='8' cy='9' r='0.9' fill='%23556'/><circle cx='11' cy='9' r='0.9' fill='%23556'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 16px 16px !important;
}
.patient-fluent .pf-datefield:focus,
.patient-fluent input[type="text"].pf-datefield:focus {
    border-color: var(--brand-fg) !important;
    /* Swap calendar icon to the brand color on focus */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><rect x='1.5' y='3' width='13' height='11' rx='1.5' fill='none' stroke='%23107c41' stroke-width='1.4'/><path d='M1.5 6h13' fill='none' stroke='%23107c41' stroke-width='1.4'/><rect x='4' y='1.5' width='1.4' height='3.2' fill='%23107c41'/><rect x='10.6' y='1.5' width='1.4' height='3.2' fill='%23107c41'/><circle cx='5' cy='9' r='0.9' fill='%23107c41'/><circle cx='8' cy='9' r='0.9' fill='%23107c41'/><circle cx='11' cy='9' r='0.9' fill='%23107c41'/></svg>") !important;
}

/* ---------------------------------------------------------------
   ESIS ID search field (txtFileCode) - distinct highlight so it
   stands out from the other search inputs. Global (any page).
   --------------------------------------------------------------- */
.page-content [id$="txtFileCode"] {
    background: var(--brand-bg-tint, #eff6fc) !important;
    border: 1.5px solid var(--brand-80) !important;
    color: var(--nf1) !important;
    font-weight: 600 !important;
}
.page-content [id$="txtFileCode"]:focus {
    border-color: var(--brand-90, var(--brand-80)) !important;
    box-shadow: 0 0 0 2px rgba(0,120,212,.20) !important;
}

/* ---------------------------------------------------------------
   FindPatient control: show ONLY the filter radios + the search box.
   Hide the results grid (GVGPPatients) and the mobile-number
   autocomplete (RadMobileNoSearch) rows.
   --------------------------------------------------------------- */
.find-patient-fluent .row:has([id$="GVGPPatients"]),
.find-patient-fluent .row:has([id$="RadMobileNoSearch"]) {
    display: none !important;
}

/* =============================================================
   ANTI-FOUC: stop the old/raw layout from flashing on load.
   <html> gets .cp-loading from an early master script; while it's set
   the AJAX tab content + un-converted image buttons are held invisible,
   then faded in once the Fluent JS has reshaped them. The class is
   removed on DOMContentLoaded AND by a hard safety timeout, so the page
   can never get stuck hidden (if JS dies, the early script also never
   ran, so nothing is hidden).
   ============================================================= */
.ajax__tab_container { transition: opacity .18s ease; }
html.cp-loading .ajax__tab_container { opacity: 0 !important; }
html.cp-loading .ajax__tab_body input[type="image"]:not(.sr-replaced) { visibility: hidden !important; }
html.cp-loading .ns-nav-list { opacity: 0 !important; }
.ns-nav-list { transition: opacity .15s ease; }

/* ============================================================================
   CENTRALIZED DATE / TIME PICKERS  (Syncfusion DropDownCalendarControl)
   One consistent Fluent field for every date & time picker, app-wide.
   APPEARANCE ONLY — this does NOT change the picker's behavior, its value, or
   the date/time format (CustomFormat="HH:mm" / "dd-MMM-yyyy" stay intact).
   The AjaxControlToolkit calendar popups are themed in theme-components.css.

   Scoped with :has(input[type="text"]) so it only targets input-bearing
   pickers — never Syncfusion charts/grids that share the .ejWebControl class.
   The :has() also lifts specificity so this wins over per-page input rules
   without fighting the cascade.
   ============================================================================ */
.ejWebControl:has(input[type="text"]) {
    border: 1px solid var(--field-border, var(--ns1)) !important;
    border-radius: var(--r-sm) !important;
    background: var(--field-bg, var(--nb1)) !important;
    box-sizing: border-box !important;
    height: 32px !important;
    max-width: 100% !important;
    vertical-align: middle !important;
    border-collapse: collapse !important;
    /* Keep the picker in the normal content layer so it scrolls cleanly BEHIND
       fixed headers instead of bleeding over them. */
    position: relative !important;
    z-index: 0 !important;
}
.ejWebControl:has(input[type="text"]):focus-within {
    border-color: var(--brand-fg) !important;
}
/* Strip the inner table chrome so the wrapper reads as one clean field. */
.ejWebControl:has(input[type="text"]) td,
.ejWebControl:has(input[type="text"]) tr,
.ejWebControl:has(input[type="text"]) tbody {
    border: none !important;
    background: transparent !important;
    vertical-align: middle !important;
}
.ejWebControl:has(input[type="text"]) input[type="text"] {
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    height: 28px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 8px !important;
    font-size: 14px !important;
    line-height: 28px !important;
    color: var(--nf1) !important;
    box-sizing: border-box !important;
}
/* Keep the calendar / clock launcher visible and clickable, just tidied. */
.ejWebControl:has(input[type="text"]) input[type="image"],
.ejWebControl:has(input[type="text"]) img,
.ejWebControl:has(input[type="text"]) a img {
    cursor: pointer !important;
    vertical-align: middle !important;
    max-height: 22px !important;
    width: auto !important;
    margin: 0 4px !important;
}

/* ============================================================================
   PATIENT SEARCH RESULTS — group each patient into one contained block
   The #dtPAtientSearchLst repeater renders EVERY patient as exactly 3 rows
   (info / selectors / action buttons). Without grouping they run together as
   one long list. Remove the borders WITHIN a patient so the 3 rows read as a
   single unit, then add a clear gap + a brand accent BETWEEN patients so each
   one reads as its own contained card. Same table id on both the reception and
   PatientDeal search pages, so this covers both. CSS only — no markup change.
   ============================================================================ */
#dtPAtientSearchLst { border-collapse: collapse !important; }
/* No borders between the 3 rows of the same patient. */
#dtPAtientSearchLst > tbody > tr > td {
    border-top: none !important;
    border-bottom: none !important;
}
/* Clear gap divider before each new patient (every 1st-of-3 row, not the first). */
#dtPAtientSearchLst > tbody > tr:nth-child(3n+1):not(:first-child) > td {
    border-top: 14px solid var(--nb2, #eef1f6) !important;
}
/* Brand accent down the left edge contains each patient group. */
#dtPAtientSearchLst > tbody > tr > td:first-child {
    border-left: 3px solid var(--brand-80) !important;
}
/* Breathing room top (info row) and bottom (actions row) of each block. */
#dtPAtientSearchLst > tbody > tr:nth-child(3n+1) > td { padding-top: 12px !important; }
#dtPAtientSearchLst > tbody > tr:nth-child(3n) > td   { padding-bottom: 12px !important; }
