/* Medibox v14 — Dental visit context, type selector and top tooth status */

body.app-body .clinical-visit-context-bar,
.embedded-body .clinical-visit-context-bar {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin: 0 0 12px;
    padding: 13px 14px;
    border: 1px solid #e4eaf2;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(15, 23, 42, .045);
}

body.app-body .clinical-visit-context-bar.is-embedded,
.embedded-body .clinical-visit-context-bar.is-embedded {
    margin-top: 0;
    border-radius: 12px;
    box-shadow: none;
}

body.app-body .clinical-visit-context-datetime,
.embedded-body .clinical-visit-context-datetime {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 210px;
    min-height: 46px;
    padding: 6px 10px;
}

body.app-body .clinical-visit-context-icon,
.embedded-body .clinical-visit-context-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #475569;
}

body.app-body .clinical-visit-context-icon .ui-icon,
.embedded-body .clinical-visit-context-icon .ui-icon {
    width: 18px;
    height: 18px;
}

body.app-body .clinical-visit-context-datetime > div,
.embedded-body .clinical-visit-context-datetime > div,
body.app-body .clinical-visit-context-type-readonly,
.embedded-body .clinical-visit-context-type-readonly {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

body.app-body .clinical-visit-context-datetime small,
.embedded-body .clinical-visit-context-datetime small,
body.app-body .clinical-visit-context-type-readonly small,
.embedded-body .clinical-visit-context-type-readonly small,
body.app-body .clinical-visit-type-form label > span,
.embedded-body .clinical-visit-type-form label > span {
    color: #64748b;
    font-size: 11.5px;
    line-height: 1.25;
    font-weight: 600;
}

body.app-body .clinical-visit-context-datetime strong,
.embedded-body .clinical-visit-context-datetime strong,
body.app-body .clinical-visit-context-type-readonly strong,
.embedded-body .clinical-visit-context-type-readonly strong {
    color: #172033;
    font-size: 14.5px;
    line-height: 1.35;
    font-weight: 600;
    white-space: nowrap;
}

body.app-body .clinical-visit-type-form,
.embedded-body .clinical-visit-type-form {
    position: relative;
    flex: 1 1 430px;
    min-width: 320px;
    max-width: 620px;
}

body.app-body .clinical-visit-type-form label,
.embedded-body .clinical-visit-type-form label {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

body.app-body .clinical-visit-type-form select,
.embedded-body .clinical-visit-type-form select {
    width: 100%;
    min-height: 46px;
    padding: 0 42px 0 13px;
    border: 1px solid #d7dfeb;
    border-radius: 10px;
    background-color: #fff;
    color: #172033;
    font-size: 14.5px;
    line-height: 1.35;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .025);
}

body.app-body .clinical-visit-type-form select:hover,
.embedded-body .clinical-visit-type-form select:hover {
    border-color: #b9c6d8;
}

body.app-body .clinical-visit-type-form select:focus,
.embedded-body .clinical-visit-type-form select:focus {
    outline: none;
    border-color: #7c83ee;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .10);
}

body.app-body .clinical-visit-type-state,
.embedded-body .clinical-visit-type-state {
    position: absolute;
    right: 9px;
    top: 1px;
    color: #64748b;
    font-size: 10.5px;
    font-weight: 500;
}

body.app-body .clinical-visit-type-state.is-saved,
.embedded-body .clinical-visit-type-state.is-saved { color: #15803d; }
body.app-body .clinical-visit-type-state.is-error,
.embedded-body .clinical-visit-type-state.is-error { color: #b42318; }

body.app-body .clinical-visit-context-print,
.embedded-body .clinical-visit-context-print {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 15px;
    border: 1px solid #d9e1ec;
    border-radius: 10px;
    background: #fff;
    color: #334155;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

body.app-body .clinical-visit-context-print:hover,
.embedded-body .clinical-visit-context-print:hover {
    background: #f8fafc;
    border-color: #c4cfdd;
    color: #111827;
}

body.app-body .clinical-visit-context-print .ui-icon,
.embedded-body .clinical-visit-context-print .ui-icon {
    width: 17px;
    height: 17px;
}

/* Tooth status is the first clinical working area in an active dental visit. */
body.app-body .clinical-odontogram-top,
.embedded-body .clinical-odontogram-top {
    margin: 0 0 12px;
    border-color: #e2e8f0;
    box-shadow: 0 3px 12px rgba(15, 23, 42, .035);
}

body.app-body .clinical-odontogram-top .odontogram-header h2,
.embedded-body .clinical-odontogram-top .odontogram-header h2 {
    font-size: 15px;
    font-weight: 650;
    letter-spacing: -.01em;
}

body.app-body .clinical-odontogram-top .odontogram-tooth strong,
.embedded-body .clinical-odontogram-top .odontogram-tooth strong {
    font-size: 11px;
    font-weight: 600;
}

/* The old report caption/visit number toolbar is intentionally removed in v14. */
body.app-body .clinical-visit-entry-board,
.embedded-body .clinical-visit-entry-board {
    margin-top: 0;
}

@media (max-width: 900px) {
    body.app-body .clinical-visit-context-bar,
    .embedded-body .clinical-visit-context-bar {
        align-items: stretch;
        flex-wrap: wrap;
    }

    body.app-body .clinical-visit-type-form,
    .embedded-body .clinical-visit-type-form {
        order: 3;
        flex-basis: 100%;
        max-width: none;
        min-width: 0;
    }

    body.app-body .clinical-visit-context-print,
    .embedded-body .clinical-visit-context-print {
        margin-left: auto;
    }
}

@media (max-width: 560px) {
    body.app-body .clinical-visit-context-bar,
    .embedded-body .clinical-visit-context-bar {
        gap: 9px;
        padding: 11px;
    }

    body.app-body .clinical-visit-context-datetime,
    .embedded-body .clinical-visit-context-datetime {
        min-width: 0;
        flex: 1 1 auto;
        padding-left: 2px;
    }

    body.app-body .clinical-visit-context-print,
    .embedded-body .clinical-visit-context-print {
        width: 46px;
        padding: 0;
    }

    body.app-body .clinical-visit-context-print span,
    .embedded-body .clinical-visit-context-print span {
        display: none;
    }

    body.app-body .clinical-visit-type-form select,
    .embedded-body .clinical-visit-type-form select {
        font-size: 14px;
    }
}

/* =========================================================
   Dental visit materials / automatic stock consumption v20
   ========================================================= */
body.app-body .dental-visit-materials-section {
    overflow: visible;
}

body.app-body .dental-materials-header h2 {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -.01em;
}

body.app-body .dental-materials-header em {
    min-width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe3ee;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
}

body.app-body .dental-material-entry-card {
    margin: 10px 12px 12px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fbfcfe;
}

body.app-body .dental-material-entry-copy {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-bottom: 12px;
}

body.app-body .dental-material-entry-copy strong {
    color: #172033;
    font-size: 13.5px;
    font-weight: 600;
}

body.app-body .dental-material-entry-copy span {
    color: #718096;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
}

body.app-body .dental-material-add-form {
    display: grid;
    grid-template-columns: minmax(230px, 1.55fr) minmax(220px, 1.25fr) minmax(130px, .65fr) minmax(145px, .7fr) auto;
    gap: 10px;
    align-items: end;
}

body.app-body .dental-material-add-form .field {
    min-width: 0;
    margin: 0;
}

body.app-body .dental-material-add-form .field > span {
    display: block;
    margin-bottom: 6px;
    color: #526175;
    font-size: 11.5px;
    font-weight: 600;
}

body.app-body .dental-material-add-form select,
body.app-body .dental-material-add-form input {
    width: 100%;
    min-height: 42px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 400;
}

body.app-body .dental-material-quantity-control {
    position: relative;
}

body.app-body .dental-material-quantity-control input {
    padding-right: 52px;
}

body.app-body .dental-material-quantity-control > span {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: #718096;
    font-size: 11.5px;
    font-weight: 500;
    pointer-events: none;
}

body.app-body .dental-material-stock-panel {
    min-height: 42px;
    display: grid;
    align-content: center;
    gap: 1px;
    padding: 6px 11px;
    border: 1px solid #dfe7f0;
    border-radius: 10px;
    background: #fff;
}

body.app-body .dental-material-stock-panel small {
    color: #7b8798;
    font-size: 10px;
    font-weight: 500;
}

body.app-body .dental-material-stock-panel strong {
    color: #1f2937;
    font-size: 13px;
    font-weight: 600;
}

body.app-body .dental-material-stock-panel > span {
    display: none;
    color: #b42318;
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1.25;
}

body.app-body .dental-material-stock-panel.is-insufficient {
    border-color: #fecaca;
    background: #fff8f8;
}

body.app-body .dental-material-stock-panel.is-insufficient > span {
    display: block;
}

body.app-body .dental-material-submit {
    min-height: 42px;
    padding-inline: 15px;
    white-space: nowrap;
}

body.app-body .dental-material-submit:disabled {
    cursor: not-allowed;
    opacity: .48;
}

body.app-body .dental-material-usage-list {
    display: grid;
    gap: 0;
    margin: 0 12px 12px;
    border: 1px solid #e4eaf1;
    border-radius: 13px;
    background: #fff;
    overflow: hidden;
}

body.app-body .dental-material-usage-row {
    display: grid;
    grid-template-columns: 34px minmax(220px, 1fr) minmax(110px, auto) minmax(110px, auto) 38px;
    gap: 10px;
    align-items: center;
    min-height: 62px;
    padding: 9px 11px;
    border-bottom: 1px solid #edf1f5;
}

body.app-body .dental-material-usage-row:last-child {
    border-bottom: 0;
}

body.app-body .dental-material-usage-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e7f1;
    border-radius: 9px;
    background: #f7f9fc;
    color: #53657a;
}

body.app-body .dental-material-usage-icon .ui-icon {
    width: 15px;
    height: 15px;
}

body.app-body .dental-material-usage-copy {
    min-width: 0;
}

body.app-body .dental-material-usage-copy strong {
    display: block;
    overflow: hidden;
    color: #1f2937;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.app-body .dental-material-usage-copy small {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: #7a8798;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.app-body .dental-material-usage-quantity,
body.app-body .dental-material-usage-stock {
    display: grid;
    gap: 2px;
    text-align: right;
}

body.app-body .dental-material-usage-quantity small,
body.app-body .dental-material-usage-stock small {
    color: #8a96a7;
    font-size: 9.5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .04em;
}

body.app-body .dental-material-usage-quantity strong,
body.app-body .dental-material-usage-stock strong {
    color: #334155;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}

body.app-body .dental-material-usage-stock.is-empty strong {
    color: #b42318;
}

body.app-body .dental-material-remove {
    width: 34px;
    height: 34px;
    color: #8b98a9;
}

body.app-body .dental-material-remove:hover {
    border-color: #fecaca;
    background: #fff5f5;
    color: #b42318;
}

body.app-body .dental-material-empty-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 10px 12px 12px;
    padding: 13px 14px;
    border: 1px dashed #d8e1ec;
    border-radius: 12px;
    background: #fafbfd;
    color: #66758a;
}

body.app-body .dental-material-empty-note > span {
    margin-top: 1px;
    color: #66758a;
}

body.app-body .dental-material-empty-note strong {
    display: block;
    margin-bottom: 2px;
    color: #334155;
    font-size: 12.5px;
    font-weight: 600;
}

body.app-body .dental-material-empty-note p,
body.app-body .dental-material-no-usage {
    margin: 0;
    color: #7b8798;
    font-size: 11.5px;
    font-weight: 400;
    line-height: 1.45;
}

body.app-body .dental-material-no-usage {
    padding: 12px 14px 14px;
}

@media (max-width: 1180px) {
    body.app-body .dental-material-add-form {
        grid-template-columns: minmax(220px, 1.4fr) minmax(200px, 1.2fr) minmax(120px, .6fr) minmax(140px, .7fr);
    }

    body.app-body .dental-material-submit {
        grid-column: 4;
        justify-self: end;
    }
}

@media (max-width: 820px) {
    body.app-body .dental-material-add-form {
        grid-template-columns: 1fr 1fr;
    }

    body.app-body .dental-material-submit {
        grid-column: auto;
        width: 100%;
        justify-content: center;
    }

    body.app-body .dental-material-usage-row {
        grid-template-columns: 34px minmax(0, 1fr) auto 38px;
    }

    body.app-body .dental-material-usage-stock {
        display: none;
    }
}

@media (max-width: 560px) {
    body.app-body .dental-material-entry-card {
        margin: 8px 9px 10px;
        padding: 11px;
    }

    body.app-body .dental-material-add-form {
        grid-template-columns: 1fr;
    }

    body.app-body .dental-material-usage-list {
        margin: 0 9px 10px;
    }

    body.app-body .dental-material-usage-row {
        grid-template-columns: 30px minmax(0, 1fr) 34px;
        gap: 8px;
        min-height: 58px;
        padding: 9px;
    }

    body.app-body .dental-material-usage-quantity {
        grid-column: 2;
        justify-self: start;
        text-align: left;
    }

    body.app-body .dental-material-usage-row > form {
        grid-column: 3;
        grid-row: 1 / span 2;
    }
}

body.app-body .dental-material-stock-panel.is-low {
    border-color: #fde3a7;
    background: #fffdf6;
}
body.app-body .dental-material-stock-panel.is-low > span {
    display: block;
    color: #9a6700;
}
body.app-body .dental-material-usage-stock.is-low strong {
    color: #9a6700;
}


/* v22 material modal */
body.app-body .dental-material-dialog .modal-card { width:min(820px,94vw); max-height:min(760px,92dvh); }
body.app-body .dental-material-modal-grid { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(0,1fr); gap:16px; align-items:end; }
body.app-body .dental-material-modal-grid .dental-material-select-field { grid-column:1 / -1; }
@media(max-width:700px){body.app-body .dental-material-modal-grid{grid-template-columns:1fr} body.app-body .dental-material-modal-grid .dental-material-select-field{grid-column:auto}}

/* v23 — larger material modal */
body.app-body .dental-material-dialog .modal-card {
    width:min(1120px,96vw) !important;
    max-width:1120px !important;
    min-height:min(560px,78dvh);
    max-height:min(900px,94dvh) !important;
}
body.app-body .dental-material-modal-body { padding:28px 30px 32px; gap:22px; overflow:auto; }
body.app-body .dental-material-modal-grid {
    grid-template-columns:minmax(0,1.55fr) minmax(170px,.62fr) minmax(190px,.72fr);
    gap:18px;
    align-items:end;
}
body.app-body .dental-material-modal-grid .dental-material-select-field { grid-column:1 / -1; }
body.app-body .dental-material-modal-grid .field select,
body.app-body .dental-material-modal-grid .field input { min-height:48px; font-size:14px; }
body.app-body .dental-material-stock-panel { min-height:72px !important; padding:10px 13px; }
@media(max-width:900px){
  body.app-body .dental-material-dialog .modal-card{width:min(96vw,900px)!important;min-height:auto}
  body.app-body .dental-material-modal-grid{grid-template-columns:1fr 1fr}
  body.app-body .dental-material-modal-grid .dental-material-select-field{grid-column:1/-1}
}
@media(max-width:650px){
  body.app-body .dental-material-dialog .modal-card{width:100vw!important;max-width:100vw!important;min-height:100dvh;max-height:100dvh!important;border-radius:0}
  body.app-body .dental-material-modal-body{padding:18px}
  body.app-body .dental-material-modal-grid{grid-template-columns:1fr}
  body.app-body .dental-material-modal-grid .dental-material-select-field{grid-column:auto}
}

/* Medibox v118 — dental visit: type + compact teeth, services directly below */
body.app-body .clinical-dental-overview-grid,
.embedded-body .clinical-dental-overview-grid {
    display: grid;
    grid-template-columns: minmax(300px, .72fr) minmax(520px, 1.28fr);
    gap: 12px;
    align-items: stretch;
    margin: 0 0 12px;
}

body.app-body .clinical-dental-overview-grid .clinical-visit-context-bar,
.embedded-body .clinical-dental-overview-grid .clinical-visit-context-bar {
    margin: 0;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 10px;
    padding: 12px;
}

body.app-body .clinical-dental-overview-grid .clinical-visit-context-datetime,
.embedded-body .clinical-dental-overview-grid .clinical-visit-context-datetime {
    min-width: 0;
    min-height: 0;
    padding: 2px 2px 6px;
}

body.app-body .clinical-dental-overview-grid .clinical-visit-context-icon,
.embedded-body .clinical-dental-overview-grid .clinical-visit-context-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    border-radius: 8px;
}

body.app-body .clinical-dental-overview-grid .clinical-visit-context-icon .ui-icon,
.embedded-body .clinical-dental-overview-grid .clinical-visit-context-icon .ui-icon {
    width: 15px;
    height: 15px;
}

body.app-body .clinical-dental-overview-grid .clinical-visit-type-form,
.embedded-body .clinical-dental-overview-grid .clinical-visit-type-form {
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: none;
}

body.app-body .clinical-dental-overview-grid .clinical-visit-type-form select,
.embedded-body .clinical-dental-overview-grid .clinical-visit-type-form select {
    min-height: 42px;
    font-size: 13.5px;
}

body.app-body .clinical-dental-overview-grid .clinical-visit-context-print,
.embedded-body .clinical-dental-overview-grid .clinical-visit-context-print {
    width: 100%;
    min-height: 38px;
    margin: 0;
}

body.app-body .clinical-odontogram-mini,
.embedded-body .clinical-odontogram-mini {
    margin: 0;
    padding: 10px 11px;
    height: 100%;
    overflow: visible;
}

body.app-body .clinical-odontogram-mini .odontogram-header,
.embedded-body .clinical-odontogram-mini .odontogram-header {
    min-height: 26px;
    margin: 0 0 4px;
    align-items: center;
}

body.app-body .clinical-odontogram-mini .odontogram-header h2,
.embedded-body .clinical-odontogram-mini .odontogram-header h2 {
    font-size: 13px;
    font-weight: 700;
}

body.app-body .clinical-odontogram-mini .odontogram-legend-toggle,
.embedded-body .clinical-odontogram-mini .odontogram-legend-toggle {
    min-width: 0;
    min-height: 28px;
    padding: 0 8px;
    font-size: 10px;
}

body.app-body .clinical-odontogram-mini .odontogram-chart,
.embedded-body .clinical-odontogram-mini .odontogram-chart {
    display: grid;
    grid-template-columns: repeat(16, minmax(26px, 1fr));
    gap: 4px;
    padding: 2px 0 0;
}

body.app-body .clinical-odontogram-mini .odontogram-tooth,
.embedded-body .clinical-odontogram-mini .odontogram-tooth {
    min-height: 31px;
    padding: 2px;
    border-radius: 7px;
}

body.app-body .clinical-odontogram-mini .odontogram-tooth .tooth-shape,
.embedded-body .clinical-odontogram-mini .odontogram-tooth .tooth-shape,
body.app-body .clinical-odontogram-mini .odontogram-tooth small,
.embedded-body .clinical-odontogram-mini .odontogram-tooth small,
body.app-body .clinical-odontogram-mini .tooth-edit-hint,
.embedded-body .clinical-odontogram-mini .tooth-edit-hint {
    display: none !important;
}

body.app-body .clinical-odontogram-mini .odontogram-tooth strong,
.embedded-body .clinical-odontogram-mini .odontogram-tooth strong {
    font-size: 10px;
    line-height: 1;
    font-weight: 700;
}

body.app-body .clinical-service-entry-top,
.embedded-body .clinical-service-entry-top {
    margin: 0 0 12px;
    border: 1px solid #e1e7ef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(15, 23, 42, .035);
}

body.app-body .clinical-service-entry-top .clinical-entry-full-head,
.embedded-body .clinical-service-entry-top .clinical-entry-full-head {
    min-height: 48px;
    padding: 10px 12px;
}

body.app-body .clinical-service-entry-top .clinical-entry-full-head h3,
.embedded-body .clinical-service-entry-top .clinical-entry-full-head h3 {
    font-size: 14px;
    font-weight: 700;
}

body.app-body .clinical-service-entry-actions,
.embedded-body .clinical-service-entry-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

body.app-body .clinical-service-entry-actions .btn,
.embedded-body .clinical-service-entry-actions .btn {
    min-height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 650;
}

@media (max-width: 1050px) {
    body.app-body .clinical-dental-overview-grid,
    .embedded-body .clinical-dental-overview-grid {
        grid-template-columns: 1fr;
    }
    body.app-body .clinical-odontogram-mini .odontogram-chart,
    .embedded-body .clinical-odontogram-mini .odontogram-chart {
        grid-template-columns: repeat(16, minmax(24px, 1fr));
    }
}

@media (max-width: 680px) {
    body.app-body .clinical-odontogram-mini .odontogram-chart,
    .embedded-body .clinical-odontogram-mini .odontogram-chart {
        grid-template-columns: repeat(8, minmax(28px, 1fr));
    }
    body.app-body .clinical-service-entry-top .clinical-entry-full-head,
    .embedded-body .clinical-service-entry-top .clinical-entry-full-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
    body.app-body .clinical-service-entry-actions,
    .embedded-body .clinical-service-entry-actions {
        width: 100%;
    }
    body.app-body .clinical-service-entry-actions .btn,
    .embedded-body .clinical-service-entry-actions .btn {
        flex: 1 1 0;
    }
}

/* Medibox v119 — compact tooth status, print below odontogram, service + modal, optional exam details */
body.app-body .clinical-odontogram-mini .tooth-quick-status,
.embedded-body .clinical-odontogram-mini .tooth-quick-status {
    width: min(318px, calc(100vw - 18px));
    padding: 8px;
    border-radius: 11px;
}

body.app-body .clinical-odontogram-mini .tooth-quick-status-head,
.embedded-body .clinical-odontogram-mini .tooth-quick-status-head {
    margin-bottom: 6px;
    padding-bottom: 5px;
    font-size: 10px;
}

body.app-body .clinical-odontogram-mini .tooth-quick-status-head strong,
.embedded-body .clinical-odontogram-mini .tooth-quick-status-head strong {
    font-size: 12px;
}

body.app-body .clinical-odontogram-mini .tooth-status-palette,
.embedded-body .clinical-odontogram-mini .tooth-status-palette {
    gap: 5px;
}

body.app-body .clinical-odontogram-mini .tooth-status-option,
.embedded-body .clinical-odontogram-mini .tooth-status-option {
    min-height: 30px;
    gap: 5px;
    padding: 5px 6px;
    border-radius: 7px;
    font-size: 8px;
    font-weight: 700;
}

body.app-body .clinical-odontogram-mini .tooth-status-option i,
.embedded-body .clinical-odontogram-mini .tooth-status-option i {
    width: 8px;
    height: 8px;
    min-width: 8px;
}

body.app-body .clinical-odontogram-mini .tooth-details-button,
.embedded-body .clinical-odontogram-mini .tooth-details-button {
    min-height: 30px;
    margin-top: 6px;
    font-size: 9px;
}

body.app-body .clinical-odontogram-print-row,
.embedded-body .clinical-odontogram-print-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 7px;
    padding-top: 7px;
    border-top: 1px solid #edf1f5;
}

body.app-body .clinical-odontogram-print,
.embedded-body .clinical-odontogram-print {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 29px;
    padding: 0 9px;
    border: 1px solid #dce3eb;
    border-radius: 7px;
    color: #526171;
    background: #fff;
    text-decoration: none;
    font-size: 10px;
    font-weight: 650;
}

body.app-body .clinical-odontogram-print:hover,
.embedded-body .clinical-odontogram-print:hover {
    border-color: #b9c6d5;
    color: #234f7d;
    background: #f8fafc;
}

body.app-body .clinical-odontogram-print .ui-icon,
.embedded-body .clinical-odontogram-print .ui-icon {
    width: 13px;
    height: 13px;
}

/* Services now follow the same compact section language as Anamnesis. */
body.app-body .clinical-service-entry-top,
.embedded-body .clinical-service-entry-top {
    border-color: var(--ui-line, #e1e7ef);
    border-radius: 10px;
    box-shadow: none;
}

body.app-body .clinical-service-entry-top .clinical-entry-full-head,
.embedded-body .clinical-service-entry-top .clinical-entry-full-head {
    min-height: 48px;
    padding: 10px 12px;
}

body.app-body .clinical-service-entry-top .clinical-entry-full-head > div:first-child,
.embedded-body .clinical-service-entry-top .clinical-entry-full-head > div:first-child {
    display: flex;
    align-items: center;
    gap: 9px;
}

/* The rest of the dental exam is intentionally optional and collapsed by default. */
body.app-body .clinical-extra-exam-toggle-card,
.embedded-body .clinical-extra-exam-toggle-card {
    margin: 0 0 12px;
    padding: 0;
    border: 1px solid #e1e7ef;
    border-radius: 10px;
    background: #fff;
}

body.app-body .clinical-extra-exam-toggle,
.embedded-body .clinical-extra-exam-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    cursor: pointer;
    user-select: none;
}

body.app-body .clinical-extra-exam-toggle input,
.embedded-body .clinical-extra-exam-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

body.app-body .clinical-extra-exam-switch,
.embedded-body .clinical-extra-exam-switch {
    position: relative;
    width: 34px;
    height: 19px;
    flex: 0 0 34px;
    border-radius: 999px;
    background: #d7dee7;
    transition: background .16s ease;
}

body.app-body .clinical-extra-exam-switch::after,
.embedded-body .clinical-extra-exam-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15,23,42,.18);
    transition: transform .16s ease;
}

body.app-body .clinical-extra-exam-toggle input:checked + .clinical-extra-exam-switch,
.embedded-body .clinical-extra-exam-toggle input:checked + .clinical-extra-exam-switch {
    background: #2f6f9f;
}

body.app-body .clinical-extra-exam-toggle input:checked + .clinical-extra-exam-switch::after,
.embedded-body .clinical-extra-exam-toggle input:checked + .clinical-extra-exam-switch::after {
    transform: translateX(15px);
}

body.app-body .clinical-extra-exam-copy,
.embedded-body .clinical-extra-exam-copy {
    display: grid;
    gap: 2px;
}

body.app-body .clinical-extra-exam-copy strong,
.embedded-body .clinical-extra-exam-copy strong {
    color: #344054;
    font-size: 12px;
    font-weight: 650;
}

body.app-body .clinical-extra-exam-copy small,
.embedded-body .clinical-extra-exam-copy small {
    color: #7d8797;
    font-size: 10px;
}

body.app-body .clinical-extra-exam-content[hidden],
.embedded-body .clinical-extra-exam-content[hidden] {
    display: none !important;
}

body.app-body .clinical-extra-exam-content.is-open,
.embedded-body .clinical-extra-exam-content.is-open {
    display: block;
}

@media (max-width: 680px) {
    body.app-body .clinical-extra-exam-copy small,
    .embedded-body .clinical-extra-exam-copy small {
        display: none;
    }
}

/* Medibox v120 — appointment visit type is read-only, print precedes services. */
body.app-body .clinical-dental-overview-grid .clinical-visit-context-type-static,
.embedded-body .clinical-dental-overview-grid .clinical-visit-context-type-static {
    width: 100%;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #e4e9ef;
    border-radius: 9px;
    background: #f8fafc;
}
body.app-body .clinical-dental-overview-grid .clinical-visit-context-type-static small,
.embedded-body .clinical-dental-overview-grid .clinical-visit-context-type-static small {
    display: block;
    margin-bottom: 3px;
    color: #7a8795;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .035em;
    text-transform: uppercase;
}
body.app-body .clinical-dental-overview-grid .clinical-visit-context-type-static strong,
.embedded-body .clinical-dental-overview-grid .clinical-visit-context-type-static strong {
    display: block;
    color: #24384d;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
}
body.app-body .clinical-before-services-print-row,
.embedded-body .clinical-before-services-print-row {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 7px;
}
body.app-body .clinical-before-services-print,
.embedded-body .clinical-before-services-print {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    padding: 0 9px;
    border: 1px solid #dce3eb;
    border-radius: 7px;
    background: #fff;
    color: #526171;
    text-decoration: none;
    font-size: 9.5px;
    font-weight: 750;
    letter-spacing: .025em;
}
body.app-body .clinical-before-services-print:hover,
.embedded-body .clinical-before-services-print:hover {
    border-color: #b9c6d5;
    background: #f8fafc;
    color: #234f7d;
}
body.app-body .clinical-before-services-print .ui-icon,
.embedded-body .clinical-before-services-print .ui-icon {
    width: 12px;
    height: 12px;
}
body.app-body .clinical-service-picker-card .modal-header h2,
.embedded-body .clinical-service-picker-card .modal-header h2 {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .025em;
}
body.app-body .clinical-service-picker-tabs button,
.embedded-body .clinical-service-picker-tabs button {
    font-weight: 750;
    letter-spacing: .015em;
}

/* v121 — selected service/group becomes an editable line table. */
body.app-body .clinical-service-picker-settings,
.embedded-body .clinical-service-picker-settings {
    padding: 12px 16px 16px;
    background: #f8fafc;
}
body.app-body .clinical-service-picker-line-table,
.embedded-body .clinical-service-picker-line-table {
    overflow: hidden;
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}
body.app-body .clinical-service-picker-line-head,
body.app-body .clinical-service-picker-line-row,
.embedded-body .clinical-service-picker-line-head,
.embedded-body .clinical-service-picker-line-row {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 120px 120px 150px;
    align-items: center;
    gap: 12px;
}
body.app-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-head,
body.app-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-row,
.embedded-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-head,
.embedded-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-row {
    grid-template-columns: minmax(240px, 1fr) 120px;
}
body.app-body .clinical-service-picker-line-head,
.embedded-body .clinical-service-picker-line-head {
    min-height: 34px;
    padding: 0 12px;
    border-bottom: 1px solid #e8edf3;
    background: #f8fafc;
    color: #667085;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .035em;
    text-transform: uppercase;
}
body.app-body .clinical-service-picker-line-head span:not(:first-child),
.embedded-body .clinical-service-picker-line-head span:not(:first-child) {
    text-align: center;
}
body.app-body .clinical-service-picker-line-row,
.embedded-body .clinical-service-picker-line-row {
    min-height: 58px;
    padding: 8px 12px;
}
body.app-body .clinical-service-picker-line-name,
.embedded-body .clinical-service-picker-line-name {
    min-width: 0;
}
body.app-body .clinical-service-picker-line-name strong,
.embedded-body .clinical-service-picker-line-name strong {
    display: block;
    overflow: hidden;
    color: #24364b;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body.app-body .clinical-service-picker-line-control,
.embedded-body .clinical-service-picker-line-control {
    margin: 0 !important;
}
body.app-body .clinical-service-picker-line-control input,
.embedded-body .clinical-service-picker-line-control input {
    width: 100%;
    height: 34px;
    padding: 5px 8px;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    background: #fff;
    color: #27364d;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    box-shadow: none;
}
body.app-body .clinical-service-picker-line-control input:focus,
.embedded-body .clinical-service-picker-line-control input:focus {
    border-color: #9eb4d2;
    outline: 0;
    box-shadow: 0 0 0 2px rgba(70, 101, 145, .08);
}
body.app-body .clinical-service-picker-line-total,
.embedded-body .clinical-service-picker-line-total {
    justify-self: stretch;
    color: #173b67;
    font-size: 12px;
    font-weight: 750;
    text-align: right;
}
@media (max-width: 760px) {
    body.app-body .clinical-service-picker-line-head,
    .embedded-body .clinical-service-picker-line-head { display: none; }
    body.app-body .clinical-service-picker-line-row,
    .embedded-body .clinical-service-picker-line-row,
    body.app-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-row,
    .embedded-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-row {
        grid-template-columns: minmax(0, 1fr) 82px 82px 105px;
        gap: 7px;
        min-height: 54px;
        padding: 8px;
    }
    body.app-body .clinical-service-picker-line-name strong,
    .embedded-body .clinical-service-picker-line-name strong { font-size: 11px; }
    body.app-body .clinical-service-picker-line-control input,
    .embedded-body .clinical-service-picker-line-control input { height: 32px; padding-inline: 5px; }
    body.app-body .clinical-service-picker-line-total,
    .embedded-body .clinical-service-picker-line-total { font-size: 11px; }
}
@media (max-width: 560px) {
    body.app-body .clinical-service-picker-line-row,
    .embedded-body .clinical-service-picker-line-row,
    body.app-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-row,
    .embedded-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-row {
        grid-template-columns: 1fr 72px 72px 92px;
    }
}
@media (max-width: 760px) {
    body.app-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-row,
    .embedded-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-row {
        grid-template-columns: minmax(0, 1fr) 82px;
    }
}
@media (max-width: 560px) {
    body.app-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-row,
    .embedded-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-row {
        grid-template-columns: minmax(0, 1fr) 72px;
    }
}


/* v122 — tabs before search; tighter service-name column. */
body.app-body .clinical-service-picker-topbar,
.embedded-body .clinical-service-picker-topbar {
    align-items: center;
}
body.app-body .clinical-service-picker-tabs,
.embedded-body .clinical-service-picker-tabs {
    order: 1;
}
body.app-body .clinical-service-picker-search,
.embedded-body .clinical-service-picker-search {
    order: 2;
}
body.app-body .clinical-service-picker-line-head,
body.app-body .clinical-service-picker-line-row,
.embedded-body .clinical-service-picker-line-head,
.embedded-body .clinical-service-picker-line-row {
    grid-template-columns: minmax(180px, .78fr) 105px 105px 135px;
}
body.app-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-head,
body.app-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-row,
.embedded-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-head,
.embedded-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-row {
    grid-template-columns: minmax(180px, .78fr) 105px;
}
body.app-body .clinical-service-picker-line-name strong,
.embedded-body .clinical-service-picker-line-name strong {
    font-size: 11px;
    font-weight: 600;
}
body.app-body .clinical-service-choice-description strong,
.embedded-body .clinical-service-choice-description strong {
    font-size: 11px;
}
@media (max-width: 760px) {
    body.app-body .clinical-service-picker-line-row,
    .embedded-body .clinical-service-picker-line-row,
    body.app-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-row,
    .embedded-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-row {
        grid-template-columns: minmax(0, 1fr) 76px 76px 96px;
    }
    body.app-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-row,
    .embedded-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-row {
        grid-template-columns: minmax(0, 1fr) 76px;
    }
}

/* v123 — modern service/group selector with full-width search below and stronger service-name column. */
body.app-body .clinical-service-picker-topbar,
.embedded-body .clinical-service-picker-topbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px 16px 13px;
}
body.app-body .clinical-service-picker-tabs,
.embedded-body .clinical-service-picker-tabs {
    order: 1;
    align-self: flex-start;
    display: inline-flex;
    gap: 3px;
    padding: 3px;
    border: 1px solid #e5eaf0;
    border-radius: 12px;
    background: #f6f8fb;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}
body.app-body .clinical-service-picker-tabs button,
.embedded-body .clinical-service-picker-tabs button {
    min-height: 34px;
    padding: 7px 15px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #6b7788;
    font-size: 10.5px;
    font-weight: 750;
    letter-spacing: .015em;
    transition: background .14s ease, color .14s ease, box-shadow .14s ease, transform .14s ease;
}
body.app-body .clinical-service-picker-tabs button:hover,
.embedded-body .clinical-service-picker-tabs button:hover {
    color: #27496d;
    background: rgba(255,255,255,.68);
}
body.app-body .clinical-service-picker-tabs button.is-active,
.embedded-body .clinical-service-picker-tabs button.is-active {
    background: #fff;
    color: #234f7d;
    box-shadow: 0 1px 3px rgba(15,23,42,.10), 0 0 0 1px rgba(45,83,123,.04);
}
body.app-body .clinical-service-picker-search,
.embedded-body .clinical-service-picker-search {
    order: 2;
    width: 100%;
    flex: 0 0 auto;
    height: 40px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px;
    background: #f8fafc !important;
    box-shadow: none !important;
}
body.app-body .clinical-service-picker-search:focus-within,
.embedded-body .clinical-service-picker-search:focus-within {
    border-color: #b7c6d8 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(58,91,128,.06) !important;
}
body.app-body .clinical-service-picker-search input,
.embedded-body .clinical-service-picker-search input {
    font-size: 12px;
    font-weight: 500;
}
body.app-body .clinical-service-picker-line-head,
body.app-body .clinical-service-picker-line-row,
.embedded-body .clinical-service-picker-line-head,
.embedded-body .clinical-service-picker-line-row {
    grid-template-columns: minmax(300px, 1.55fr) 105px 110px 140px;
    gap: 12px;
}
body.app-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-head,
body.app-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-row,
.embedded-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-head,
.embedded-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-row {
    grid-template-columns: minmax(300px, 1.55fr) 105px;
}
body.app-body .clinical-service-picker-line-head,
.embedded-body .clinical-service-picker-line-head {
    font-size: 10px;
}
body.app-body .clinical-service-picker-line-head span:first-child,
.embedded-body .clinical-service-picker-line-head span:first-child {
    font-size: 10.5px;
    color: #526174;
}
body.app-body .clinical-service-picker-line-name strong,
.embedded-body .clinical-service-picker-line-name strong {
    font-size: 14px;
    font-weight: 720;
    line-height: 1.3;
    color: #1f344c;
}
body.app-body .clinical-service-picker-line-row,
.embedded-body .clinical-service-picker-line-row {
    min-height: 62px;
}
body.app-body .clinical-service-picker-line-control input,
.embedded-body .clinical-service-picker-line-control input {
    font-size: 12px;
    font-weight: 650;
}
body.app-body .clinical-service-picker-line-total,
.embedded-body .clinical-service-picker-line-total {
    font-size: 13px;
    font-weight: 800;
}
@media (max-width: 760px) {
    body.app-body .clinical-service-picker-tabs,
    .embedded-body .clinical-service-picker-tabs {
        align-self: stretch;
    }
    body.app-body .clinical-service-picker-tabs button,
    .embedded-body .clinical-service-picker-tabs button {
        flex: 1 1 0;
        padding-inline: 8px;
    }
    body.app-body .clinical-service-picker-line-row,
    .embedded-body .clinical-service-picker-line-row,
    body.app-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-row,
    .embedded-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-row {
        grid-template-columns: minmax(0, 1.45fr) 72px 76px 96px;
        gap: 7px;
    }
    body.app-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-row,
    .embedded-body .clinical-service-picker-line-table.is-no-finance .clinical-service-picker-line-row {
        grid-template-columns: minmax(0, 1.45fr) 72px;
    }
    body.app-body .clinical-service-picker-line-name strong,
    .embedded-body .clinical-service-picker-line-name strong {
        font-size: 12px;
    }
}


/* v119: tooth first + paid status when adding a service */
body.app-body .clinical-service-picker-line-table.has-tooth .clinical-service-picker-line-head,
body.app-body .clinical-service-picker-line-table.has-tooth .clinical-service-picker-line-row,
.embedded-body .clinical-service-picker-line-table.has-tooth .clinical-service-picker-line-head,
.embedded-body .clinical-service-picker-line-table.has-tooth .clinical-service-picker-line-row {
    grid-template-columns: 82px minmax(210px,1fr) 94px 94px 126px;
}
body.app-body .clinical-service-picker-line-table.has-tooth.is-no-finance .clinical-service-picker-line-head,
body.app-body .clinical-service-picker-line-table.has-tooth.is-no-finance .clinical-service-picker-line-row,
.embedded-body .clinical-service-picker-line-table.has-tooth.is-no-finance .clinical-service-picker-line-head,
.embedded-body .clinical-service-picker-line-table.has-tooth.is-no-finance .clinical-service-picker-line-row {
    grid-template-columns: 82px minmax(230px,1fr) 100px;
}
body.app-body .clinical-service-picker-line-control select,
.embedded-body .clinical-service-picker-line-control select {
    width:100%;height:34px;padding:5px 8px;border:1px solid #d8e0ea;border-radius:8px;background:#fff;color:#27364d;font-size:12px;font-weight:700;text-align:center;box-shadow:none;
}
body.app-body .clinical-service-payment-row,
.embedded-body .clinical-service-payment-row {
    display:flex;align-items:center;gap:9px;margin-top:10px;padding:9px 11px;border:1px solid #dce5ef;border-radius:10px;background:#fff;cursor:pointer;
}
body.app-body .clinical-service-payment-row input,
.embedded-body .clinical-service-payment-row input { width:16px;height:16px;margin:0;accent-color:var(--primary,#0b63f6); }
body.app-body .clinical-service-payment-row span:last-child,
.embedded-body .clinical-service-payment-row span:last-child { display:flex;align-items:baseline;gap:8px;min-width:0; }
body.app-body .clinical-service-payment-row strong,
.embedded-body .clinical-service-payment-row strong { font-size:12px;color:#22344c; }
body.app-body .clinical-service-payment-row small,
.embedded-body .clinical-service-payment-row small { font-size:10px;color:#758399; }
@media(max-width:760px){
  body.app-body .clinical-service-picker-line-table.has-tooth .clinical-service-picker-line-row,
  .embedded-body .clinical-service-picker-line-table.has-tooth .clinical-service-picker-line-row {grid-template-columns:68px minmax(0,1fr) 72px 72px 92px}
  body.app-body .clinical-service-picker-line-table.has-tooth.is-no-finance .clinical-service-picker-line-row,
  .embedded-body .clinical-service-picker-line-table.has-tooth.is-no-finance .clinical-service-picker-line-row {grid-template-columns:68px minmax(0,1fr) 78px}
  body.app-body .clinical-service-payment-row span:last-child,
  .embedded-body .clinical-service-payment-row span:last-child {align-items:flex-start;flex-direction:column;gap:1px}
}

/* Medibox v120 — per-service payment + visual tooth picker */
body.app-body .clinical-service-tooth-combo,
.embedded-body .clinical-service-tooth-combo {
    display:grid;
    grid-template-columns:minmax(0,1fr) 34px;
    align-items:center;
    gap:5px;
    width:100%;
}
body.app-body .clinical-service-tooth-combo select,
.embedded-body .clinical-service-tooth-combo select { min-width:0; }
body.app-body .clinical-service-tooth-button,
.embedded-body .clinical-service-tooth-button {
    width:34px;
    height:34px;
    display:grid;
    place-items:center;
    padding:0;
    border:1px solid #d8e0ea;
    border-radius:8px;
    background:#fff;
    color:#355675;
    cursor:pointer;
    transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease;
}
body.app-body .clinical-service-tooth-button:hover,
.embedded-body .clinical-service-tooth-button:hover {
    border-color:#8bb6ea;
    box-shadow:0 4px 12px rgba(45,91,145,.12);
    transform:translateY(-1px);
}
body.app-body .clinical-service-tooth-button .ui-icon,
.embedded-body .clinical-service-tooth-button .ui-icon { width:18px;height:18px; }
body.app-body .clinical-service-tooth-combo-editor,
.embedded-body .clinical-service-tooth-combo-editor { margin-top:0; }

body.app-body .service-tooth-picker-card,
.embedded-body .service-tooth-picker-card { width:min(900px,94vw); }
body.app-body .service-tooth-picker-body,
.embedded-body .service-tooth-picker-body { display:grid;gap:16px;padding-block:16px 18px; }
body.app-body .service-tooth-picker-section,
.embedded-body .service-tooth-picker-section {
    padding:13px 14px;
    border:1px solid #e1e8f0;
    border-radius:14px;
    background:#fbfcfe;
}
body.app-body .service-tooth-picker-section h3,
.embedded-body .service-tooth-picker-section h3 { margin:0 0 10px;font-size:12px;letter-spacing:.02em;color:#34465d; }
body.app-body .service-tooth-arch,
.embedded-body .service-tooth-arch {
    display:grid;
    grid-template-columns:repeat(16,minmax(34px,1fr));
    gap:6px;
}
body.app-body .service-tooth-picker-section.is-primary .service-tooth-arch,
.embedded-body .service-tooth-picker-section.is-primary .service-tooth-arch { grid-template-columns:repeat(10,minmax(38px,1fr));max-width:620px;margin-inline:auto; }
body.app-body .service-tooth-choice,
.embedded-body .service-tooth-choice {
    min-width:0;
    min-height:58px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:3px;
    padding:6px 3px;
    border:1px solid #d9e3ee;
    border-radius:10px;
    background:#fff;
    color:#355675;
    cursor:pointer;
    transition:.16s ease;
}
body.app-body .service-tooth-choice:hover,
.embedded-body .service-tooth-choice:hover {
    border-color:#79a9df;
    box-shadow:0 6px 15px rgba(39,91,151,.12);
    transform:translateY(-1px);
}
body.app-body .service-tooth-choice span,
.embedded-body .service-tooth-choice span { display:grid;place-items:center; }
body.app-body .service-tooth-choice .ui-icon,
.embedded-body .service-tooth-choice .ui-icon { width:21px;height:21px; }
body.app-body .service-tooth-choice strong,
.embedded-body .service-tooth-choice strong { font-size:11px;line-height:1; }
body.app-body .service-tooth-midline,
.embedded-body .service-tooth-midline { display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;margin:7px 0;color:#8a97a8;font-size:9px;font-weight:800;letter-spacing:.08em; }
body.app-body .service-tooth-midline i,
.embedded-body .service-tooth-midline i { height:1px;background:#dfe6ee; }
body.app-body .service-tooth-picker-footer,
.embedded-body .service-tooth-picker-footer { justify-content:space-between; }

body.app-body .service-payment-badge,
.embedded-body .service-payment-badge {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:64px;
    padding:4px 8px;
    border-radius:999px;
    font-size:10px;
    font-weight:800;
    line-height:1;
    white-space:nowrap;
}
body.app-body .service-payment-badge.is-paid,
.embedded-body .service-payment-badge.is-paid { background:#ecf8f1;color:#1d7a4b;border:1px solid #ccebd9; }
body.app-body .service-payment-badge.is-unpaid,
.embedded-body .service-payment-badge.is-unpaid { background:#fff4f2;color:#b14f43;border:1px solid #f0d1cc; }
body.app-body .clinical-service-edit-payment,
.embedded-body .clinical-service-edit-payment { margin-top:12px; }

@media(max-width:900px){
    body.app-body .service-tooth-arch,
    .embedded-body .service-tooth-arch { grid-template-columns:repeat(8,minmax(36px,1fr)); }
    body.app-body .service-tooth-picker-section.is-primary .service-tooth-arch,
    .embedded-body .service-tooth-picker-section.is-primary .service-tooth-arch { grid-template-columns:repeat(5,minmax(40px,1fr)); }
}

/* Medibox v121 — compact structured tooth picker + per-service payment inline */
body.app-body .clinical-service-picker-line-head,
body.app-body .clinical-service-picker-line-row,
.embedded-body .clinical-service-picker-line-head,
.embedded-body .clinical-service-picker-line-row {
    grid-template-columns: minmax(260px,1.45fr) 92px 92px 120px 104px;
}
body.app-body .clinical-service-picker-line-table.has-tooth .clinical-service-picker-line-head,
body.app-body .clinical-service-picker-line-table.has-tooth .clinical-service-picker-line-row,
.embedded-body .clinical-service-picker-line-table.has-tooth .clinical-service-picker-line-head,
.embedded-body .clinical-service-picker-line-table.has-tooth .clinical-service-picker-line-row {
    grid-template-columns: 118px minmax(230px,1.45fr) 84px 84px 118px 102px;
    gap:8px;
}
body.app-body .clinical-service-picker-line-table.has-tooth.is-no-finance .clinical-service-picker-line-head,
body.app-body .clinical-service-picker-line-table.has-tooth.is-no-finance .clinical-service-picker-line-row,
.embedded-body .clinical-service-picker-line-table.has-tooth.is-no-finance .clinical-service-picker-line-head,
.embedded-body .clinical-service-picker-line-table.has-tooth.is-no-finance .clinical-service-picker-line-row {
    grid-template-columns:118px minmax(250px,1fr) 94px;
}
body.app-body .clinical-service-picker-tooth-control select,
.embedded-body .clinical-service-picker-tooth-control select,
body.app-body .clinical-service-tooth-combo-editor select,
.embedded-body .clinical-service-tooth-combo-editor select {
    min-width:72px;
    font-size:14px;
    font-weight:850;
    letter-spacing:.02em;
}
body.app-body .clinical-service-tooth-combo,
.embedded-body .clinical-service-tooth-combo {
    grid-template-columns:minmax(72px,1fr) 36px;
    gap:6px;
}
body.app-body .clinical-service-tooth-button,
.embedded-body .clinical-service-tooth-button {
    width:36px;
    height:36px;
}
body.app-body .clinical-service-payment-inline,
.embedded-body .clinical-service-payment-inline {
    min-width:0;
    min-height:34px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    padding:4px 6px;
    border:1px solid #dce5ef;
    border-radius:9px;
    background:#fff;
    cursor:pointer;
    white-space:nowrap;
}
body.app-body .clinical-service-payment-inline input,
.embedded-body .clinical-service-payment-inline input {
    position:absolute;
    opacity:0;
    pointer-events:none;
}
body.app-body .clinical-service-payment-inline-track,
.embedded-body .clinical-service-payment-inline-track {
    width:28px;
    height:16px;
    flex:0 0 28px;
    padding:2px;
    border-radius:999px;
    background:#d9e0e8;
    transition:.15s ease;
}
body.app-body .clinical-service-payment-inline-track i,
.embedded-body .clinical-service-payment-inline-track i {
    display:block;
    width:12px;
    height:12px;
    border-radius:50%;
    background:#fff;
    box-shadow:0 1px 3px rgba(15,23,42,.18);
    transition:transform .15s ease;
}
body.app-body .clinical-service-payment-inline input:checked + .clinical-service-payment-inline-track,
.embedded-body .clinical-service-payment-inline input:checked + .clinical-service-payment-inline-track { background:#36a26d; }
body.app-body .clinical-service-payment-inline input:checked + .clinical-service-payment-inline-track i,
.embedded-body .clinical-service-payment-inline input:checked + .clinical-service-payment-inline-track i { transform:translateX(12px); }
body.app-body .clinical-service-payment-inline-label,
.embedded-body .clinical-service-payment-inline-label {
    font-size:10px;
    font-weight:800;
    color:#a14d45;
}
body.app-body .clinical-service-payment-inline input:checked ~ .clinical-service-payment-inline-label,
.embedded-body .clinical-service-payment-inline input:checked ~ .clinical-service-payment-inline-label { color:#21714c; }

body.app-body .service-tooth-picker-card,
.embedded-body .service-tooth-picker-card {
    width:min(720px,92vw);
}
body.app-body .service-tooth-picker-body,
.embedded-body .service-tooth-picker-body {
    gap:10px;
    padding:12px 14px 14px;
}
body.app-body .service-tooth-picker-section,
.embedded-body .service-tooth-picker-section {
    padding:10px 11px;
    border-radius:11px;
}
body.app-body .service-tooth-picker-section-title,
.embedded-body .service-tooth-picker-section-title {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-bottom:6px;
}
body.app-body .service-tooth-picker-section-title h3,
.embedded-body .service-tooth-picker-section-title h3 { margin:0;font-size:11.5px; }
body.app-body .service-tooth-picker-section-title small,
.embedded-body .service-tooth-picker-section-title small { color:#8a97a8;font-size:9px;font-weight:800;letter-spacing:.04em; }
body.app-body .service-tooth-arch-label,
.embedded-body .service-tooth-arch-label {
    margin:4px 0 5px;
    color:#7b8797;
    font-size:9px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.07em;
    text-align:center;
}
body.app-body .service-tooth-arch,
.embedded-body .service-tooth-arch {
    grid-template-columns:repeat(16,minmax(30px,1fr));
    gap:4px;
}
body.app-body .service-tooth-picker-section.is-primary .service-tooth-arch,
.embedded-body .service-tooth-picker-section.is-primary .service-tooth-arch {
    grid-template-columns:repeat(10,minmax(32px,1fr));
    max-width:470px;
}
body.app-body .service-tooth-choice,
.embedded-body .service-tooth-choice {
    min-height:44px;
    gap:1px;
    padding:4px 2px;
    border-radius:8px;
}
body.app-body .service-tooth-choice .ui-icon,
.embedded-body .service-tooth-choice .ui-icon { width:16px;height:16px; }
body.app-body .service-tooth-choice strong,
.embedded-body .service-tooth-choice strong { font-size:10px; }
body.app-body .service-tooth-midline,
.embedded-body .service-tooth-midline {
    grid-template-columns:1fr auto 1fr;
    gap:7px;
    margin:5px 0;
    font-size:8px;
}

@media(max-width:900px){
    body.app-body .clinical-service-picker-line-table.has-tooth .clinical-service-picker-line-head,
    body.app-body .clinical-service-picker-line-table.has-tooth .clinical-service-picker-line-row,
    .embedded-body .clinical-service-picker-line-table.has-tooth .clinical-service-picker-line-head,
    .embedded-body .clinical-service-picker-line-table.has-tooth .clinical-service-picker-line-row {
        grid-template-columns:104px minmax(180px,1fr) 72px 72px 102px 96px;
    }
}
@media(max-width:760px){
    body.app-body .clinical-service-picker-line-head,
    .embedded-body .clinical-service-picker-line-head { display:none; }
    body.app-body .clinical-service-picker-line-table.has-tooth .clinical-service-picker-line-row,
    .embedded-body .clinical-service-picker-line-table.has-tooth .clinical-service-picker-line-row {
        grid-template-columns:104px minmax(140px,1fr) 70px 70px 96px 94px;
        min-width:650px;
    }
    body.app-body .clinical-service-picker-line-table,
    .embedded-body .clinical-service-picker-line-table { overflow-x:auto; }
    body.app-body .service-tooth-picker-card,
    .embedded-body .service-tooth-picker-card { width:min(680px,96vw); }
    body.app-body .service-tooth-arch,
    .embedded-body .service-tooth-arch { grid-template-columns:repeat(8,minmax(34px,1fr)); }
    body.app-body .service-tooth-picker-section.is-primary .service-tooth-arch,
    .embedded-body .service-tooth-picker-section.is-primary .service-tooth-arch { grid-template-columns:repeat(5,minmax(36px,1fr)); }
}

/* Medibox v123 — flatter service edit + cleaner tooth picker */
body.app-body .clinical-service-editor-body,
.embedded-body .clinical-service-editor-body {
    padding:18px;
}
body.app-body .clinical-service-editor-fields,
.embedded-body .clinical-service-editor-fields {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
    align-items:end;
}
body.app-body .clinical-service-editor-service,
.embedded-body .clinical-service-editor-service,
body.app-body .clinical-service-editor-notes,
.embedded-body .clinical-service-editor-notes {
    grid-column:1 / -1;
}
body.app-body .clinical-service-editor-total,
.embedded-body .clinical-service-editor-total {
    min-width:0;
}
body.app-body .clinical-service-editor-total output,
.embedded-body .clinical-service-editor-total output {
    min-height:38px;
    display:flex;
    align-items:center;
    padding:0 11px;
    border:1px solid #dce5ef;
    border-radius:9px;
    background:#f8fafc;
    color:#1f3550;
    font-size:13px;
    font-weight:850;
    white-space:nowrap;
}
body.app-body .clinical-service-editor-payment,
.embedded-body .clinical-service-editor-payment {
    min-height:38px;
    align-self:end;
    justify-self:stretch;
}
body.app-body .service-tooth-picker-header-compact,
.embedded-body .service-tooth-picker-header-compact {
    min-height:46px;
    padding:8px 12px;
    justify-content:space-between;
}
body.app-body .service-tooth-picker-header-icon,
.embedded-body .service-tooth-picker-header-icon {
    width:32px;
    height:32px;
    display:grid;
    place-items:center;
    border-radius:9px;
    background:#f3f7fb;
    color:#456884;
}
body.app-body .service-tooth-picker-header-icon .ui-icon,
.embedded-body .service-tooth-picker-header-icon .ui-icon { width:18px;height:18px; }
body.app-body .service-tooth-picker-section-title,
.embedded-body .service-tooth-picker-section-title { justify-content:center; }
@media(max-width:900px){
    body.app-body .clinical-service-editor-fields,
    .embedded-body .clinical-service-editor-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:560px){
    body.app-body .clinical-service-editor-fields,
    .embedded-body .clinical-service-editor-fields { grid-template-columns:1fr; }
    body.app-body .clinical-service-editor-service,
    .embedded-body .clinical-service-editor-service,
    body.app-body .clinical-service-editor-notes,
    .embedded-body .clinical-service-editor-notes { grid-column:auto; }
}


/* Medibox v143 — Albanian service-name header + exact centered selected service */
body.app-body .clinical-service-picker-line-name-head,
.embedded-body .clinical-service-picker-line-name-head {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
}
body.app-body .clinical-service-picker-line-name,
.embedded-body .clinical-service-picker-line-name {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    text-align: center;
}
body.app-body .clinical-service-picker-line-name strong,
.embedded-body .clinical-service-picker-line-name strong {
    display: block;
    width: 100%;
    text-align: center;
}


/* Medibox v181 — modern service tooth picker */
body.app-body .service-tooth-picker-dialog,
.embedded-body .service-tooth-picker-dialog {
    width:min(790px, calc(100vw - 24px));
    max-width:790px;
}
body.app-body .service-tooth-picker-card,
.embedded-body .service-tooth-picker-card {
    width:100%;
    max-width:none;
    overflow:hidden;
    border:1px solid #dfe7f0;
    border-radius:18px;
    background:#fff;
    box-shadow:0 24px 70px rgba(27,45,72,.18);
}
body.app-body .service-tooth-picker-modern-header,
.embedded-body .service-tooth-picker-modern-header {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    min-height:70px;
    padding:13px 16px;
    border-bottom:1px solid #e8edf3;
    background:linear-gradient(180deg,#fff 0%,#fbfcfe 100%);
}
body.app-body .service-tooth-picker-modern-title,
.embedded-body .service-tooth-picker-modern-title {
    display:flex;
    align-items:center;
    gap:11px;
    min-width:0;
}
body.app-body .service-tooth-picker-modern-title h2,
.embedded-body .service-tooth-picker-modern-title h2 {
    margin:0;
    color:#1e2f45;
    font-size:16px;
    font-weight:800;
    line-height:1.2;
    letter-spacing:-.01em;
}
body.app-body .service-tooth-picker-modern-title p,
.embedded-body .service-tooth-picker-modern-title p {
    margin:3px 0 0;
    color:#8290a2;
    font-size:10.5px;
    font-weight:600;
    line-height:1.3;
}
body.app-body .service-tooth-picker-header-icon,
.embedded-body .service-tooth-picker-header-icon {
    width:38px;
    height:38px;
    flex:0 0 38px;
    display:grid;
    place-items:center;
    border:1px solid #dfe7f2;
    border-radius:11px;
    background:#f5f8fc;
    color:#496684;
}
body.app-body .service-tooth-picker-header-icon .ui-icon,
.embedded-body .service-tooth-picker-header-icon .ui-icon { width:19px;height:19px; }
body.app-body .service-tooth-picker-close,
.embedded-body .service-tooth-picker-close {
    width:34px;
    height:34px;
    border-radius:10px;
    color:#68788b;
}
body.app-body .service-tooth-picker-body,
.embedded-body .service-tooth-picker-body {
    display:grid;
    grid-template-columns:minmax(0,1.55fr) minmax(250px,.8fr);
    gap:12px;
    padding:14px;
    background:#f7f9fc;
}
body.app-body .service-tooth-picker-section,
.embedded-body .service-tooth-picker-section {
    min-width:0;
    padding:12px;
    border:1px solid #e1e8f0;
    border-radius:14px;
    background:#fff;
    box-shadow:0 2px 8px rgba(31,54,85,.035);
}
body.app-body .service-tooth-picker-section.is-primary,
.embedded-body .service-tooth-picker-section.is-primary {
    background:#fcfdff;
}
body.app-body .service-tooth-picker-section-title,
.embedded-body .service-tooth-picker-section-title {
    justify-content:flex-start;
    margin:0 0 11px;
    padding:0 1px 8px;
    border-bottom:1px solid #edf1f5;
}
body.app-body .service-tooth-picker-section-title h3,
.embedded-body .service-tooth-picker-section-title h3 {
    margin:0;
    color:#31455e;
    font-size:11.5px;
    font-weight:800;
    letter-spacing:.01em;
}
body.app-body .service-tooth-picker-section-count,
.embedded-body .service-tooth-picker-section-count {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:23px;
    height:19px;
    margin-left:auto;
    padding:0 6px;
    border:1px solid #e0e7ef;
    border-radius:999px;
    background:#f6f8fb;
    color:#8794a4;
    font-size:9px;
    font-weight:800;
}
body.app-body .service-tooth-jaw-row,
.embedded-body .service-tooth-jaw-row { display:grid;gap:6px; }
body.app-body .service-tooth-jaw-label,
.embedded-body .service-tooth-jaw-label {
    display:block;
    color:#8a96a5;
    font-size:9px;
    font-weight:750;
    letter-spacing:.04em;
    text-align:center;
    text-transform:uppercase;
}
body.app-body .service-tooth-arch,
.embedded-body .service-tooth-arch {
    display:grid;
    grid-template-columns:repeat(16,minmax(0,1fr));
    gap:4px;
}
body.app-body .service-tooth-picker-section.is-primary .service-tooth-arch,
.embedded-body .service-tooth-picker-section.is-primary .service-tooth-arch {
    grid-template-columns:repeat(5,minmax(0,1fr));
    max-width:none;
    margin:0;
    gap:6px;
}
body.app-body .service-tooth-choice,
.embedded-body .service-tooth-choice {
    position:relative;
    min-width:0;
    min-height:47px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:2px;
    padding:4px 2px;
    border:1px solid #dfe6ee;
    border-radius:9px;
    background:#fff;
    color:#718198;
    box-shadow:0 1px 2px rgba(31,54,85,.025);
    cursor:pointer;
    transition:border-color .15s ease,background .15s ease,color .15s ease,box-shadow .15s ease,transform .15s ease;
}
body.app-body .service-tooth-choice:hover,
.embedded-body .service-tooth-choice:hover {
    z-index:2;
    border-color:#aebfd3;
    background:#f7faff;
    color:#395a7a;
    box-shadow:0 5px 13px rgba(49,83,120,.10);
    transform:translateY(-1px);
}
body.app-body .service-tooth-choice:focus-visible,
.embedded-body .service-tooth-choice:focus-visible {
    outline:0;
    border-color:#6f8eb3;
    box-shadow:0 0 0 3px rgba(95,126,164,.16);
}
body.app-body .service-tooth-choice.is-selected,
.embedded-body .service-tooth-choice.is-selected {
    border-color:#526f96;
    background:#eef4fb;
    color:#294d75;
    box-shadow:0 0 0 2px rgba(82,111,150,.10);
}
body.app-body .service-tooth-choice.is-selected::after,
.embedded-body .service-tooth-choice.is-selected::after {
    content:'✓';
    position:absolute;
    top:3px;
    right:4px;
    width:13px;
    height:13px;
    display:grid;
    place-items:center;
    border-radius:50%;
    background:#526f96;
    color:#fff;
    font-size:8px;
    font-weight:900;
    line-height:1;
}
body.app-body .service-tooth-choice .ui-icon,
.embedded-body .service-tooth-choice .ui-icon { width:15px;height:15px; }
body.app-body .service-tooth-choice strong,
.embedded-body .service-tooth-choice strong {
    color:inherit;
    font-size:10px;
    font-weight:800;
    line-height:1;
}
body.app-body .service-tooth-midline,
.embedded-body .service-tooth-midline {
    display:grid;
    grid-template-columns:1fr auto 1fr;
    align-items:center;
    gap:7px;
    margin:8px 0;
    color:#a0abb8;
    font-size:7.5px;
    font-weight:800;
    letter-spacing:.08em;
}
body.app-body .service-tooth-midline i,
.embedded-body .service-tooth-midline i { height:1px;background:#e4eaf1; }
body.app-body .service-tooth-picker-footer,
.embedded-body .service-tooth-picker-footer {
    min-height:58px;
    justify-content:flex-end;
    gap:8px;
    padding:10px 14px;
    border-top:1px solid #e7edf3;
    background:#fff;
}
body.app-body .service-tooth-picker-footer .service-tooth-clear-button,
.embedded-body .service-tooth-picker-footer .service-tooth-clear-button {
    margin-right:auto;
    color:#6d7c8e;
}
@media(max-width:760px){
    body.app-body .service-tooth-picker-dialog,
    .embedded-body .service-tooth-picker-dialog { width:calc(100vw - 12px); }
    body.app-body .service-tooth-picker-card,
    .embedded-body .service-tooth-picker-card { border-radius:15px; }
    body.app-body .service-tooth-picker-modern-header,
    .embedded-body .service-tooth-picker-modern-header { min-height:62px;padding:10px 12px; }
    body.app-body .service-tooth-picker-body,
    .embedded-body .service-tooth-picker-body { grid-template-columns:1fr;padding:10px;max-height:calc(100vh - 140px);overflow:auto; }
    body.app-body .service-tooth-arch,
    .embedded-body .service-tooth-arch { grid-template-columns:repeat(8,minmax(35px,1fr)); }
    body.app-body .service-tooth-picker-section.is-primary .service-tooth-arch,
    .embedded-body .service-tooth-picker-section.is-primary .service-tooth-arch { grid-template-columns:repeat(5,minmax(39px,1fr)); }
    body.app-body .service-tooth-choice,
    .embedded-body .service-tooth-choice { min-height:45px; }
}
@media(max-width:430px){
    body.app-body .service-tooth-picker-modern-title p,
    .embedded-body .service-tooth-picker-modern-title p { display:none; }
    body.app-body .service-tooth-picker-body,
    .embedded-body .service-tooth-picker-body { padding:8px;gap:8px; }
    body.app-body .service-tooth-picker-section,
    .embedded-body .service-tooth-picker-section { padding:9px; }
    body.app-body .service-tooth-arch,
    .embedded-body .service-tooth-arch { grid-template-columns:repeat(8,minmax(31px,1fr));gap:3px; }
    body.app-body .service-tooth-picker-section.is-primary .service-tooth-arch,
    .embedded-body .service-tooth-picker-section.is-primary .service-tooth-arch { grid-template-columns:repeat(5,minmax(34px,1fr));gap:4px; }
    body.app-body .service-tooth-choice,
    .embedded-body .service-tooth-choice { min-height:42px;border-radius:8px; }
}

/* Medibox v182 — unified service tooth picker (design 1) */
body.app-body .service-tooth-picker-dialog,
.embedded-body .service-tooth-picker-dialog {
    width:min(1040px, calc(100vw - 24px));
    max-width:1040px;
}
body.app-body .service-tooth-picker-card,
.embedded-body .service-tooth-picker-card {
    border-radius:18px;
}
body.app-body .service-tooth-picker-body,
.embedded-body .service-tooth-picker-body {
    display:block;
    padding:16px;
    background:#f8fafc;
}
body.app-body .service-tooth-picker-unified-card,
.embedded-body .service-tooth-picker-unified-card {
    overflow:hidden;
    border:1px solid #dfe7f0;
    border-radius:14px;
    background:#fff;
    box-shadow:0 2px 10px rgba(31,54,85,.035);
}
body.app-body .service-tooth-picker-legend,
.embedded-body .service-tooth-picker-legend {
    min-height:54px;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-wrap:wrap;
    gap:20px;
    padding:10px 18px;
    border-bottom:1px solid #e9eef4;
    background:#fcfdff;
}
body.app-body .service-tooth-legend-item,
.embedded-body .service-tooth-legend-item {
    display:inline-flex;
    align-items:center;
    gap:7px;
    color:#66778c;
    font-size:11px;
    font-weight:750;
    white-space:nowrap;
}
body.app-body .service-tooth-legend-item i,
.embedded-body .service-tooth-legend-item i {
    width:10px;
    height:10px;
    flex:0 0 10px;
    border-radius:50%;
    background:#2f7eea;
    box-shadow:0 0 0 3px rgba(47,126,234,.09);
}
body.app-body .service-tooth-legend-item.is-primary i,
.embedded-body .service-tooth-legend-item.is-primary i {
    background:#3ca77a;
    box-shadow:0 0 0 3px rgba(60,167,122,.09);
}
body.app-body .service-tooth-legend-item.is-selected i,
.embedded-body .service-tooth-legend-item.is-selected i {
    background:#fff;
    border:1.5px solid #6b8fbb;
    box-shadow:none;
}
body.app-body .service-tooth-picker-unified-row,
.embedded-body .service-tooth-picker-unified-row {
    padding:13px 18px 15px;
    border-bottom:1px solid #edf1f5;
}
body.app-body .service-tooth-picker-unified-row:last-child,
.embedded-body .service-tooth-picker-unified-row:last-child {
    border-bottom:0;
}
body.app-body .service-tooth-picker-row-title,
.embedded-body .service-tooth-picker-row-title {
    display:flex;
    align-items:center;
    gap:8px;
    margin:0 0 10px;
}
body.app-body .service-tooth-picker-row-title > i,
.embedded-body .service-tooth-picker-row-title > i {
    width:9px;
    height:9px;
    flex:0 0 9px;
    border-radius:50%;
    background:#2f7eea;
}
body.app-body .service-tooth-picker-unified-row.is-primary .service-tooth-picker-row-title > i,
.embedded-body .service-tooth-picker-unified-row.is-primary .service-tooth-picker-row-title > i {
    background:#3ca77a;
}
body.app-body .service-tooth-picker-row-title h3,
.embedded-body .service-tooth-picker-row-title h3 {
    margin:0;
    color:#344a64;
    font-size:12px;
    font-weight:800;
    line-height:1.25;
    letter-spacing:0;
}
body.app-body .service-tooth-arch-unified,
.embedded-body .service-tooth-arch-unified {
    display:grid;
    grid-template-columns:repeat(16, minmax(42px,1fr));
    gap:6px;
    width:100%;
    max-width:none;
    margin:0;
}
body.app-body .service-tooth-arch-unified.is-permanent .service-tooth-choice:nth-child(8),
.embedded-body .service-tooth-arch-unified.is-permanent .service-tooth-choice:nth-child(8) {
    margin-right:6px;
}
body.app-body .service-tooth-arch-unified.is-primary,
.embedded-body .service-tooth-arch-unified.is-primary {
    grid-template-columns:repeat(10, minmax(46px,1fr));
    max-width:650px;
}
body.app-body .service-tooth-arch-unified.is-primary .service-tooth-choice:nth-child(5),
.embedded-body .service-tooth-arch-unified.is-primary .service-tooth-choice:nth-child(5) {
    margin-right:6px;
}
body.app-body .service-tooth-arch-unified .service-tooth-choice,
.embedded-body .service-tooth-arch-unified .service-tooth-choice {
    min-height:54px;
    border-radius:10px;
    border-color:#dbe5ef;
    background:#fff;
    color:#627793;
}
body.app-body .service-tooth-arch-unified .service-tooth-choice .ui-icon,
.embedded-body .service-tooth-arch-unified .service-tooth-choice .ui-icon {
    width:16px;
    height:16px;
}
body.app-body .service-tooth-arch-unified .service-tooth-choice strong,
.embedded-body .service-tooth-arch-unified .service-tooth-choice strong {
    font-size:10.5px;
}
body.app-body .service-tooth-picker-unified-row.is-primary .service-tooth-choice,
.embedded-body .service-tooth-picker-unified-row.is-primary .service-tooth-choice {
    color:#3f8d69;
}
body.app-body .service-tooth-picker-unified-row.is-primary .service-tooth-choice:hover,
.embedded-body .service-tooth-picker-unified-row.is-primary .service-tooth-choice:hover {
    border-color:#a9d6c4;
    background:#f5fbf8;
    color:#287654;
}
body.app-body .service-tooth-arch-unified .service-tooth-choice.is-selected,
.embedded-body .service-tooth-arch-unified .service-tooth-choice.is-selected,
body.app-body .service-tooth-picker-unified-row.is-primary .service-tooth-choice.is-selected,
.embedded-body .service-tooth-picker-unified-row.is-primary .service-tooth-choice.is-selected {
    border-color:#2f7eea;
    background:#eef5ff;
    color:#1768d5;
    box-shadow:0 0 0 2px rgba(47,126,234,.10),0 4px 12px rgba(47,126,234,.08);
}
body.app-body .service-tooth-arch-unified .service-tooth-choice.is-selected::after,
.embedded-body .service-tooth-arch-unified .service-tooth-choice.is-selected::after {
    background:#2f7eea;
}
body.app-body .service-tooth-picker-footer .service-tooth-picker-done,
.embedded-body .service-tooth-picker-footer .service-tooth-picker-done {
    min-width:112px;
}
@media(max-width:900px){
    body.app-body .service-tooth-picker-body,
    .embedded-body .service-tooth-picker-body { max-height:calc(100vh - 148px);overflow:auto; }
    body.app-body .service-tooth-arch-unified,
    .embedded-body .service-tooth-arch-unified { grid-template-columns:repeat(8,minmax(42px,1fr)); }
    body.app-body .service-tooth-arch-unified.is-primary,
    .embedded-body .service-tooth-arch-unified.is-primary { grid-template-columns:repeat(5,minmax(44px,1fr));max-width:100%; }
    body.app-body .service-tooth-arch-unified.is-permanent .service-tooth-choice:nth-child(8),
    .embedded-body .service-tooth-arch-unified.is-permanent .service-tooth-choice:nth-child(8),
    body.app-body .service-tooth-arch-unified.is-primary .service-tooth-choice:nth-child(5),
    .embedded-body .service-tooth-arch-unified.is-primary .service-tooth-choice:nth-child(5) { margin-right:0; }
}
@media(max-width:520px){
    body.app-body .service-tooth-picker-body,
    .embedded-body .service-tooth-picker-body { padding:8px; }
    body.app-body .service-tooth-picker-unified-row,
    .embedded-body .service-tooth-picker-unified-row { padding:11px 9px 12px; }
    body.app-body .service-tooth-picker-legend,
    .embedded-body .service-tooth-picker-legend { justify-content:flex-start;gap:10px 14px;padding:9px 10px; }
    body.app-body .service-tooth-arch-unified,
    .embedded-body .service-tooth-arch-unified { grid-template-columns:repeat(4,minmax(42px,1fr));gap:5px; }
    body.app-body .service-tooth-arch-unified.is-primary,
    .embedded-body .service-tooth-arch-unified.is-primary { grid-template-columns:repeat(5,minmax(36px,1fr));gap:4px; }
    body.app-body .service-tooth-arch-unified .service-tooth-choice,
    .embedded-body .service-tooth-arch-unified .service-tooth-choice { min-height:48px; }
}


/* Medibox v183 — compact unified service tooth picker */
body.app-body .service-tooth-picker-dialog,
.embedded-body .service-tooth-picker-dialog {
    width:min(900px, calc(100vw - 24px));
    max-width:900px;
}
body.app-body .service-tooth-picker-modern-header,
.embedded-body .service-tooth-picker-modern-header {
    min-height:58px;
    padding:9px 12px;
}
body.app-body .service-tooth-picker-modern-title,
.embedded-body .service-tooth-picker-modern-title { gap:9px; }
body.app-body .service-tooth-picker-modern-title h2,
.embedded-body .service-tooth-picker-modern-title h2 {
    font-size:15px;
    line-height:1.15;
}
body.app-body .service-tooth-picker-header-icon,
.embedded-body .service-tooth-picker-header-icon {
    width:32px;
    height:32px;
    flex-basis:32px;
    border-radius:9px;
}
body.app-body .service-tooth-picker-header-icon .ui-icon,
.embedded-body .service-tooth-picker-header-icon .ui-icon { width:16px;height:16px; }
body.app-body .service-tooth-picker-close,
.embedded-body .service-tooth-picker-close { width:30px;height:30px;border-radius:8px; }
body.app-body .service-tooth-picker-body,
.embedded-body .service-tooth-picker-body {
    padding:10px;
    background:#f8fafc;
}
body.app-body .service-tooth-picker-unified-card,
.embedded-body .service-tooth-picker-unified-card { border-radius:12px; }
body.app-body .service-tooth-picker-unified-row,
.embedded-body .service-tooth-picker-unified-row {
    padding:8px 12px 10px;
}
body.app-body .service-tooth-picker-row-title,
.embedded-body .service-tooth-picker-row-title {
    gap:6px;
    margin:0 0 7px;
}
body.app-body .service-tooth-picker-row-title > i,
.embedded-body .service-tooth-picker-row-title > i {
    width:7px;
    height:7px;
    flex-basis:7px;
}
body.app-body .service-tooth-picker-row-title h3,
.embedded-body .service-tooth-picker-row-title h3 {
    font-size:11px;
    font-weight:750;
    line-height:1.2;
}
body.app-body .service-tooth-arch-unified,
.embedded-body .service-tooth-arch-unified {
    grid-template-columns:repeat(16,minmax(36px,1fr));
    gap:4px;
}
body.app-body .service-tooth-arch-unified.is-permanent .service-tooth-choice:nth-child(8),
.embedded-body .service-tooth-arch-unified.is-permanent .service-tooth-choice:nth-child(8) { margin-right:4px; }
body.app-body .service-tooth-arch-unified.is-primary,
.embedded-body .service-tooth-arch-unified.is-primary {
    grid-template-columns:repeat(10,minmax(38px,1fr));
    max-width:540px;
}
body.app-body .service-tooth-arch-unified.is-primary .service-tooth-choice:nth-child(5),
.embedded-body .service-tooth-arch-unified.is-primary .service-tooth-choice:nth-child(5) { margin-right:4px; }
body.app-body .service-tooth-arch-unified .service-tooth-choice,
.embedded-body .service-tooth-arch-unified .service-tooth-choice {
    min-height:42px;
    gap:1px;
    padding:3px 2px;
    border-radius:8px;
}
body.app-body .service-tooth-arch-unified .service-tooth-choice .ui-icon,
.embedded-body .service-tooth-arch-unified .service-tooth-choice .ui-icon {
    width:13px;
    height:13px;
}
body.app-body .service-tooth-arch-unified .service-tooth-choice strong,
.embedded-body .service-tooth-arch-unified .service-tooth-choice strong {
    font-size:9.5px;
}
body.app-body .service-tooth-arch-unified .service-tooth-choice.is-selected::after,
.embedded-body .service-tooth-arch-unified .service-tooth-choice.is-selected::after {
    top:2px;
    right:3px;
    width:11px;
    height:11px;
    font-size:7px;
}
body.app-body .service-tooth-picker-footer,
.embedded-body .service-tooth-picker-footer {
    min-height:50px;
    padding:7px 10px;
}
body.app-body .service-tooth-picker-footer .btn,
.embedded-body .service-tooth-picker-footer .btn {
    min-height:34px;
    padding:6px 12px;
    font-size:11px;
}
body.app-body .service-tooth-picker-footer .service-tooth-picker-done,
.embedded-body .service-tooth-picker-footer .service-tooth-picker-done { min-width:92px; }
@media(max-width:900px){
    body.app-body .service-tooth-picker-dialog,
    .embedded-body .service-tooth-picker-dialog { width:calc(100vw - 16px); }
    body.app-body .service-tooth-arch-unified,
    .embedded-body .service-tooth-arch-unified { grid-template-columns:repeat(8,minmax(36px,1fr)); }
    body.app-body .service-tooth-arch-unified.is-primary,
    .embedded-body .service-tooth-arch-unified.is-primary { grid-template-columns:repeat(5,minmax(38px,1fr));max-width:100%; }
    body.app-body .service-tooth-arch-unified.is-permanent .service-tooth-choice:nth-child(8),
    .embedded-body .service-tooth-arch-unified.is-permanent .service-tooth-choice:nth-child(8),
    body.app-body .service-tooth-arch-unified.is-primary .service-tooth-choice:nth-child(5),
    .embedded-body .service-tooth-arch-unified.is-primary .service-tooth-choice:nth-child(5) { margin-right:0; }
}
@media(max-width:520px){
    body.app-body .service-tooth-picker-body,
    .embedded-body .service-tooth-picker-body { padding:7px; }
    body.app-body .service-tooth-picker-unified-row,
    .embedded-body .service-tooth-picker-unified-row { padding:8px 7px 9px; }
    body.app-body .service-tooth-arch-unified,
    .embedded-body .service-tooth-arch-unified { grid-template-columns:repeat(4,minmax(38px,1fr));gap:4px; }
    body.app-body .service-tooth-arch-unified.is-primary,
    .embedded-body .service-tooth-arch-unified.is-primary { grid-template-columns:repeat(5,minmax(34px,1fr));gap:3px; }
    body.app-body .service-tooth-arch-unified .service-tooth-choice,
    .embedded-body .service-tooth-arch-unified .service-tooth-choice { min-height:39px; }
}

/* v201 — Configurable visit sections */
body.app-body [data-visit-display-section][hidden],
.embedded-body [data-visit-display-section][hidden],
body.app-body [data-visit-display-group][hidden],
.embedded-body [data-visit-display-group][hidden] {
    display: none !important;
}
body.app-body .clinical-visit-display-toggle,
.embedded-body .clinical-visit-display-toggle {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 10px;
}
body.app-body .clinical-show-more-button,
.embedded-body .clinical-show-more-button {
    min-height: 32px;
    gap: 6px;
    padding: 0 10px;
    border-radius: 9px;
    color: #475467;
    background: #fff;
}
body.app-body .clinical-show-more-button small,
.embedded-body .clinical-show-more-button small {
    min-width: 19px;
    height: 19px;
    display: inline-grid;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: #eef2f6;
    color: #667085;
    font-size: 9.5px;
    line-height: 1;
}
body.app-body .clinical-show-more-button .ui-icon,
.embedded-body .clinical-show-more-button .ui-icon {
    width: 14px;
    height: 14px;
    transition: transform .16s ease;
}
body.app-body .clinical-show-more-button.is-expanded .ui-icon,
.embedded-body .clinical-show-more-button.is-expanded .ui-icon {
    transform: rotate(180deg);
}

/* Medibox v202 — balanced active dental visit overview */
body.app-body .clinical-dental-overview-grid,
.embedded-body .clinical-dental-overview-grid {
    grid-template-columns: minmax(340px, .62fr) minmax(640px, 1.38fr);
    gap: 14px;
    align-items: stretch;
    margin-bottom: 10px;
}

body.app-body .clinical-dental-overview-grid .clinical-visit-context-bar,
.embedded-body .clinical-dental-overview-grid .clinical-visit-context-bar {
    min-height: 154px;
    border-radius: 14px;
    padding: 13px 14px;
    box-shadow: 0 3px 12px rgba(15, 23, 42, .035);
}

body.app-body .clinical-dental-overview-grid .clinical-visit-context-type-readonly,
.embedded-body .clinical-dental-overview-grid .clinical-visit-context-type-readonly {
    margin-top: 2px;
    padding: 10px 12px;
    border-radius: 10px;
}

body.app-body .clinical-odontogram-mini,
.embedded-body .clinical-odontogram-mini {
    min-height: 154px;
    padding: 12px 13px;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(15, 23, 42, .035);
}

body.app-body .clinical-odontogram-mini .odontogram-header,
.embedded-body .clinical-odontogram-mini .odontogram-header {
    margin-bottom: 8px;
}

body.app-body .clinical-odontogram-mini .odontogram-header h2,
.embedded-body .clinical-odontogram-mini .odontogram-header h2 {
    font-size: 14px;
    letter-spacing: -.01em;
}

body.app-body .clinical-odontogram-mini .odontogram-chart,
.embedded-body .clinical-odontogram-mini .odontogram-chart {
    grid-template-columns: repeat(16, minmax(29px, 1fr));
    gap: 5px;
    align-content: center;
}

body.app-body .clinical-odontogram-mini .odontogram-tooth,
.embedded-body .clinical-odontogram-mini .odontogram-tooth {
    min-height: 34px;
    border-radius: 8px;
}

body.app-body .clinical-visit-toolbar,
.embedded-body .clinical-visit-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-height: 34px;
    margin: 0 0 10px;
}

body.app-body .clinical-visit-toolbar .clinical-visit-display-toggle,
.embedded-body .clinical-visit-toolbar .clinical-visit-display-toggle {
    margin: 0;
}

body.app-body .clinical-visit-toolbar .clinical-show-more-button,
.embedded-body .clinical-visit-toolbar .clinical-show-more-button,
body.app-body .clinical-visit-toolbar .clinical-before-services-print,
.embedded-body .clinical-visit-toolbar .clinical-before-services-print {
    min-height: 32px;
    height: 32px;
    margin: 0;
    padding: 0 10px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 650;
}

body.app-body .clinical-visit-toolbar .clinical-before-services-print,
.embedded-body .clinical-visit-toolbar .clinical-before-services-print {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    text-decoration: none;
}

body.app-body .clinical-service-entry-top,
.embedded-body .clinical-service-entry-top {
    margin-top: 0;
}

@media (max-width: 1180px) {
    body.app-body .clinical-dental-overview-grid,
    .embedded-body .clinical-dental-overview-grid {
        grid-template-columns: minmax(310px, .72fr) minmax(520px, 1.28fr);
    }
    body.app-body .clinical-odontogram-mini .odontogram-chart,
    .embedded-body .clinical-odontogram-mini .odontogram-chart {
        grid-template-columns: repeat(16, minmax(25px, 1fr));
        gap: 4px;
    }
}

@media (max-width: 980px) {
    body.app-body .clinical-dental-overview-grid,
    .embedded-body .clinical-dental-overview-grid {
        grid-template-columns: 1fr;
    }
    body.app-body .clinical-dental-overview-grid .clinical-visit-context-bar,
    .embedded-body .clinical-dental-overview-grid .clinical-visit-context-bar,
    body.app-body .clinical-odontogram-mini,
    .embedded-body .clinical-odontogram-mini {
        min-height: 0;
    }
}

@media (max-width: 680px) {
    body.app-body .clinical-visit-toolbar,
    .embedded-body .clinical-visit-toolbar {
        justify-content: stretch;
    }
    body.app-body .clinical-visit-toolbar .clinical-visit-display-toggle,
    .embedded-body .clinical-visit-toolbar .clinical-visit-display-toggle {
        flex: 1;
    }
    body.app-body .clinical-visit-toolbar .clinical-show-more-button,
    .embedded-body .clinical-visit-toolbar .clinical-show-more-button {
        width: 100%;
        justify-content: center;
    }
}

/* Medibox v203 — show-more control follows the currently displayed visit sections */
body.app-body .clinical-visit-display-footer,
.embedded-body .clinical-visit-display-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 10px 0 12px;
}

body.app-body .clinical-visit-display-footer .clinical-show-more-button,
.embedded-body .clinical-visit-display-footer .clinical-show-more-button {
    margin: 0;
}

body.app-body .clinical-visit-print-toolbar,
.embedded-body .clinical-visit-print-toolbar {
    margin-bottom: 10px;
}

@media (max-width: 680px) {
    body.app-body .clinical-visit-display-footer,
    .embedded-body .clinical-visit-display-footer {
        justify-content: stretch;
    }
    body.app-body .clinical-visit-display-footer .clinical-show-more-button,
    .embedded-body .clinical-visit-display-footer .clinical-show-more-button {
        width: 100%;
        justify-content: center;
    }
}


/* Medibox v205 — all-teeth service selection */
body.app-body .service-tooth-picker-all-row,
.embedded-body .service-tooth-picker-all-row {
    display:flex;
    justify-content:flex-end;
    padding:10px 14px;
    border-bottom:1px solid #edf1f5;
    background:#fbfcfe;
}
body.app-body .service-tooth-all-choice,
.embedded-body .service-tooth-all-choice {
    min-height:36px;
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:0 14px;
    border:1px solid #d7e1ec;
    border-radius:10px;
    background:#fff;
    color:#425872;
    font:inherit;
    font-size:12px;
    font-weight:800;
    cursor:pointer;
    transition:border-color .15s ease,background .15s ease,color .15s ease,box-shadow .15s ease;
}
body.app-body .service-tooth-all-choice span,
.embedded-body .service-tooth-all-choice span { display:grid;place-items:center;width:20px;height:20px; }
body.app-body .service-tooth-all-choice .ui-icon,
.embedded-body .service-tooth-all-choice .ui-icon { width:18px;height:18px; }
body.app-body .service-tooth-all-choice:hover,
.embedded-body .service-tooth-all-choice:hover { border-color:#aebed1;background:#f7faff;color:#274f83; }
body.app-body .service-tooth-all-choice.is-selected,
.embedded-body .service-tooth-all-choice.is-selected {
    border-color:#6f91bb;
    background:#eef5ff;
    color:#244f83;
    box-shadow:0 0 0 2px rgba(73,114,164,.10);
}


/* Medibox v210 — tooth picker bottom actions */
body.app-body .service-tooth-picker-footer,
.embedded-body .service-tooth-picker-footer {
    justify-content:space-between;
    align-items:center;
    gap:12px;
    padding:11px 14px;
}
body.app-body .service-tooth-picker-bottom-actions,
.embedded-body .service-tooth-picker-bottom-actions {
    display:flex;
    align-items:center;
    gap:8px;
    min-width:0;
}
body.app-body .service-tooth-bottom-option,
.embedded-body .service-tooth-bottom-option {
    min-height:38px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    padding:0 14px;
    border:1px solid #d7e1ec;
    border-radius:10px;
    background:#f8fafc;
    color:#465a71;
    font:inherit;
    font-size:12px;
    font-weight:700;
    cursor:pointer;
    transition:border-color .15s ease,background .15s ease,color .15s ease,box-shadow .15s ease,transform .15s ease;
}
body.app-body .service-tooth-bottom-option:hover,
.embedded-body .service-tooth-bottom-option:hover {
    transform:translateY(-1px);
    border-color:#aebed1;
    background:#fff;
    color:#274f83;
    box-shadow:0 4px 12px rgba(49,83,120,.08);
}
body.app-body .service-tooth-bottom-option > span,
.embedded-body .service-tooth-bottom-option > span {
    width:18px;
    height:18px;
    display:grid;
    place-items:center;
    font-size:18px;
    line-height:1;
}
body.app-body .service-tooth-bottom-option .ui-icon,
.embedded-body .service-tooth-bottom-option .ui-icon { width:17px;height:17px; }
body.app-body .service-tooth-bottom-option.service-tooth-clear-button,
.embedded-body .service-tooth-bottom-option.service-tooth-clear-button {
    margin-right:0;
    color:#68788a;
}
body.app-body .service-tooth-bottom-option.service-tooth-all-choice.is-selected,
.embedded-body .service-tooth-bottom-option.service-tooth-all-choice.is-selected {
    border-color:#6f91bb;
    background:#eef5ff;
    color:#244f83;
    box-shadow:0 0 0 2px rgba(73,114,164,.10);
}
@media(max-width:620px){
    body.app-body .service-tooth-picker-footer,
    .embedded-body .service-tooth-picker-footer { align-items:stretch;flex-direction:column; }
    body.app-body .service-tooth-picker-bottom-actions,
    .embedded-body .service-tooth-picker-bottom-actions { width:100%; }
    body.app-body .service-tooth-bottom-option,
    .embedded-body .service-tooth-bottom-option { flex:1; }
    body.app-body .service-tooth-picker-footer .service-tooth-picker-done,
    .embedded-body .service-tooth-picker-footer .service-tooth-picker-done { width:100%; }
}

/* Medibox v297 — editable price while adding a service */
body.app-body .clinical-service-picker-line-head,
body.app-body .clinical-service-picker-line-row,
.embedded-body .clinical-service-picker-line-head,
.embedded-body .clinical-service-picker-line-row {
    grid-template-columns:minmax(240px,1.45fr) 82px 96px 82px 116px 102px;
}
body.app-body .clinical-service-picker-line-table.has-tooth .clinical-service-picker-line-head,
body.app-body .clinical-service-picker-line-table.has-tooth .clinical-service-picker-line-row,
.embedded-body .clinical-service-picker-line-table.has-tooth .clinical-service-picker-line-head,
.embedded-body .clinical-service-picker-line-table.has-tooth .clinical-service-picker-line-row {
    grid-template-columns:112px minmax(210px,1.35fr) 76px 92px 76px 112px 98px;
    gap:8px;
}
body.app-body .clinical-service-picker-price-control input,
.embedded-body .clinical-service-picker-price-control input {
    font-weight:800;
    color:#163b70;
    background:#f8fbff;
    border-color:#cddcf0;
}
body.app-body .clinical-service-picker-price-control input:hover,
.embedded-body .clinical-service-picker-price-control input:hover {
    border-color:#9fbbe1;
}
body.app-body .clinical-service-picker-price-control input:focus,
.embedded-body .clinical-service-picker-price-control input:focus {
    background:#fff;
    border-color:#5e8fd0;
}
@media(max-width:900px){
    body.app-body .clinical-service-picker-line-table.has-tooth .clinical-service-picker-line-head,
    body.app-body .clinical-service-picker-line-table.has-tooth .clinical-service-picker-line-row,
    .embedded-body .clinical-service-picker-line-table.has-tooth .clinical-service-picker-line-head,
    .embedded-body .clinical-service-picker-line-table.has-tooth .clinical-service-picker-line-row {
        grid-template-columns:104px minmax(180px,1fr) 70px 88px 70px 104px 94px;
    }
}
@media(max-width:760px){
    body.app-body .clinical-service-picker-line-row,
    .embedded-body .clinical-service-picker-line-row {
        min-width:720px;
    }
    body.app-body .clinical-service-picker-line-table.has-tooth .clinical-service-picker-line-row,
    .embedded-body .clinical-service-picker-line-table.has-tooth .clinical-service-picker-line-row {
        grid-template-columns:104px minmax(140px,1fr) 68px 86px 68px 98px 92px;
        min-width:790px;
    }
}

/* Medibox v325 — original dental visit layout; smaller teeth with numbers only */
body.app-body .clinical-odontogram-number-compact .odontogram-chart,
.embedded-body .clinical-odontogram-number-compact .odontogram-chart {
    grid-template-columns: repeat(16, minmax(22px, 1fr));
    gap: 3px;
}

body.app-body .clinical-odontogram-number-compact .odontogram-tooth,
.embedded-body .clinical-odontogram-number-compact .odontogram-tooth {
    min-height: 25px;
    height: 25px;
    padding: 0 2px;
    border-radius: 6px;
    display: grid;
    place-items: center;
}

body.app-body .clinical-odontogram-number-compact .odontogram-tooth strong,
.embedded-body .clinical-odontogram-number-compact .odontogram-tooth strong {
    font-size: 9px;
    line-height: 1;
    font-weight: 800;
}

body.app-body .clinical-odontogram-number-compact .odontogram-primary-chart,
.embedded-body .clinical-odontogram-number-compact .odontogram-primary-chart {
    grid-template-columns: repeat(10, minmax(22px, 1fr));
    max-width: 560px;
    gap: 3px;
}

@media (max-width: 900px) {
    body.app-body .clinical-odontogram-number-compact .odontogram-chart,
    .embedded-body .clinical-odontogram-number-compact .odontogram-chart {
        grid-template-columns: repeat(8, minmax(26px, 1fr));
    }
    body.app-body .clinical-odontogram-number-compact .odontogram-primary-chart,
    .embedded-body .clinical-odontogram-number-compact .odontogram-primary-chart {
        grid-template-columns: repeat(5, minmax(26px, 1fr));
        max-width: 420px;
    }
}

/* Compact all-teeth action: three-tooth icon with accessible hover label. */
.all-teeth-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}
body.app-body .service-tooth-all-choice .all-teeth-icon,
.embedded-body .service-tooth-all-choice .all-teeth-icon,
.cq-all-teeth .all-teeth-icon{display:inline-flex;align-items:center;justify-content:center;width:auto;height:20px;gap:0;line-height:1}
body.app-body .service-tooth-all-choice .all-teeth-icon .ui-icon,
.embedded-body .service-tooth-all-choice .all-teeth-icon .ui-icon,
.cq-all-teeth .all-teeth-icon .ui-icon{width:16px;height:19px;flex:none;stroke-width:1.9}
body.app-body .service-tooth-all-choice .all-teeth-icon .ui-icon + .ui-icon,
.embedded-body .service-tooth-all-choice .all-teeth-icon .ui-icon + .ui-icon,
.cq-all-teeth .all-teeth-icon .ui-icon + .ui-icon{margin-left:-4px}
body.app-body .service-tooth-all-choice,
.embedded-body .service-tooth-all-choice,
.cq-tooth-action.cq-all-teeth{min-width:48px;padding-left:11px;padding-right:11px}
