@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  font-family: "DM Sans", sans-serif;
  color: #233a3b;
  background: #f5f8f7;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #203839;
  --muted: #829393;
  --green: #157b70;
  --green-dark: #11675e;
  --green-light: #e8f4f1;
  --line: #e8eeec;
  --surface: #fff;
  --shadow: 0 7px 24px rgba(37, 70, 67, .045);
}

.cloud-invite-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(190px, 1.1fr) minmax(140px, .65fr) auto;
  gap: 12px;
  align-items: end;
}
.cloud-invite-form .field { margin: 0; }
.cloud-invite-help {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 12px;
}
.cloud-invite-status {
  min-height: 18px;
  margin: 8px 0;
  color: var(--green-dark);
  font-size: 13px;
}
.cloud-invite-list { display: grid; gap: 8px; }
.cloud-invite-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.cloud-invite-row > span { display: grid; gap: 4px; min-width: 0; }
.cloud-invite-row strong { overflow-wrap: anywhere; }
.cloud-invite-row small { color: var(--muted); }
.cloud-invite-row select { max-width: 180px; }
.access-profile-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 9px; }
.access-profile-list > div { display: grid; gap: 5px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfc; }
.access-profile-list strong { color: var(--green-dark); font-size: 13px; }
.access-profile-list span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.attendance-rooms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.attendance-room { display: flex; flex-direction: column; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; overflow-wrap: anywhere; background: #fbfdfc; }
.attendance-room.is-occupied { border-color: #cce5de; background: #f5faf8; }
.attendance-room-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.attendance-room-id { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 9px; color: var(--green-dark); background: #dcefeb; font-weight: 700; }
.attendance-room-status { color: var(--muted); font-size: 12px; }
.attendance-room-patient, .attendance-waiting-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.attendance-room-patient > div, .attendance-waiting-person > div { display: grid; gap: 5px; min-width: 0; }
.attendance-room-patient small { color: var(--green-dark); font-weight: 600; }
.attendance-patient-photo { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%; object-fit: cover; }
.attendance-photo-fallback { display: grid; place-items: center; background: #dcefeb; color: var(--green-dark); font-size: 13px; font-weight: 700; }
.attendance-patient-link { padding: 0; justify-self: start; text-align: left; }
.attendance-release { align-self: flex-start; margin-top: auto; }
.attendance-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "reception agenda" "reception walkins"; gap: 16px; align-items: start; margin-top: 16px; }
.attendance-agenda { grid-area: agenda; }
.attendance-reception { grid-area: reception; height: 560px; min-width: 0; display: flex; flex-direction: column; }
.attendance-reception-list { overflow-y: auto; flex: 1; min-height: 0; padding-right: 4px; }
.attendance-walkins { grid-area: walkins; }
.attendance-item-actions { display: flex; gap: 4px; }
.attendance-item-actions button { width: 36px; height: 36px; padding: 6px; }
.attendance-item-actions svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.attendance-item-actions button:disabled { opacity: .4; cursor: not-allowed; }
.calendar-selected-appointment { outline: 3px solid var(--green); outline-offset: 2px; }
.attendance-appointment { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.attendance-appointment > span { display: grid; gap: 4px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.attendance-appointment small, .attendance-unavailable { color: var(--muted); }
.attendance-waiting { display: grid; gap: 7px; padding: 12px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.attendance-waiting small { color: var(--muted); }
.attendance-waiting-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.attendance-waiting-actions .table-action { padding: 0; text-align: left; }
.attendance-room-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.attendance-room-actions .button { min-width: 42px; height: 38px; padding: 0 12px; border: 1px solid #a9d2c8; border-radius: 10px; background: #e8f4f1; color: var(--green-dark); font-size: 14px; font-weight: 700; }
.attendance-room-actions .button:hover, .attendance-room-actions .button:focus-visible { background: var(--green); color: #fff; border-color: var(--green); }
.attendance-agenda-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.attendance-status-label { color: var(--muted); font-size: 10px; font-weight: 600; }
.attendance-status { display: inline-flex; padding: 4px 8px; border-radius: 8px; font-size: 10px; font-weight: 700; background: #edf2f1; color: #667c79; }
.attendance-status.confirmed { background: #e9f5ef; color: #27836c; }
.attendance-status.waiting { background: #fbf3e5; color: #916818; }
.attendance-status.pending { background: #f0eef9; color: #6d64a1; }
.attendance-status.late { background: #fbecea; color: #b35346; }
.assessment-readonly > summary { cursor: pointer; padding: 14px 16px; border: 1px solid #dcebe6; border-radius: 10px; background: #f5faf8; color: var(--green-dark); font-weight: 700; }
.assessment-readonly[open] > summary { margin-bottom: 8px; }
.patient-room-indicator { border-radius: 10px; padding: 14px 16px; font-weight: 700; }
.patient-room-active { background: #e4f4eb; border: 1px solid #a7d6b8; color: #226b46; }
.patient-room-waiting { background: #fbf3e5; border: 1px solid #e8d7b4; color: #986520; }
.patient-room-unavailable { background: #fff5e3; border: 1px solid #e9c987; color: #795a19; }
.patient-profile-head .patient-room-indicator { padding: 6px 9px; }
.patient-room-indicator [data-patient-room-tv]:not([hidden]) { display: inline-flex; margin: 0; }
.patient-treatment-panel.patient-room-indicator { display: block; width: 100%; padding: 18px; border: 1px solid #b6d8c3; border-radius: 16px; background: linear-gradient(145deg,#f3fbf6 0%,#e5f4eb 100%); box-shadow: 0 8px 24px #246b4614; text-align: left; font-weight: 400; }
.patient-treatment-panel[hidden], [data-patient-room-time][hidden], [data-patient-reception-message][hidden] { display: none !important; }
.patient-treatment-header { display: grid; gap: 14px; }
.patient-treatment-heading { min-width: 0; }
.patient-treatment-label { display: inline-flex; margin-bottom: 5px; padding: 3px 8px; border-radius: 999px; background: #d3ebdc; color: #226b46; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.patient-treatment-heading h2 { margin: 0 0 4px; color: #194f35; font-size: 16px; }
.patient-treatment-heading p { margin: 0; color: #356c4f; font-size: 12px; font-weight: 500; }
.patient-treatment-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.patient-room-time { margin-left: auto; padding: 6px 9px; border-radius: 8px; background: #d3ebdc; color: #226b46; font: 700 14px ui-monospace,monospace; white-space: nowrap; }
.patient-treatment-panel .patient-room-time { margin-left: 0; }
.patient-treatment-evolution { display: grid; gap: 9px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #c9e2d2; }
.patient-treatment-evolution label { color: #244f39; font-size: 12px; font-weight: 750; }
.patient-treatment-evolution textarea { display: block; width: 100%; min-width: 0; min-height: 140px; padding: 10px 12px; resize: vertical; border: 1px solid #bed7c6; border-radius: 9px; background: #fff; color: #304746; font-size: 12px; line-height: 1.6; }
.patient-treatment-evolution textarea:focus { outline: 2px solid #16834c; outline-offset: 2px; }
.patient-treatment-evolution small { color: #587166; font-size: 11px; line-height: 1.45; }
.patient-treatment-evolution .button { justify-self: start; }
.patient-treatment-panel .treatment-attention-warning { margin: 12px 0 0; }
.patient-reception-indicator { padding: 6px 9px; border: 1px solid #e8d7b4; border-radius: 8px; background: #fbf3e5; color: #986520; font-size: 10px; font-weight: 700; text-align: right; }
.clinical-tv-button { display: inline-flex !important; min-width: 40px; width: auto; height: 40px; align-items: center; justify-content: center; gap: 5px; padding: 6px 10px !important; border-color: #b7ddc4 !important; background: #e4f4eb !important; color: #16834c !important; font-size: 11px; font-weight: 800; }
.clinical-tv-button:hover,.clinical-tv-button:focus-visible { background: #16834c !important; color: #fff !important; }
.clinical-tv-button svg { flex: 0 0 22px; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.clinical-tv-button[hidden] { display: none !important; }
.planned-service-trigger { padding: 0; border: 0; background: transparent; color: var(--green-dark); font: inherit; text-align: left; cursor: pointer; }
.planned-service-trigger:hover,.planned-service-trigger:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.attendance-elapsed { display: inline-block; margin: 3px 0; color: #226b46; font: 700 10px ui-monospace,monospace; }
.clinical-tv-picker { display: grid; gap: 10px; }
.clinical-tv-picker > input[type="hidden"] { display: none; }
.modal.clinical-tv-modal { width: min(840px,96vw); }
.clinical-tv-preview { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(150px,.8fr); grid-template-rows: minmax(0,1fr); gap: 8px; height: 480px; padding: 10px; border: 7px solid #172e28; border-radius: 15px; background: #173a32; box-shadow: inset 0 0 0 1px #668278,0 8px 18px #172e2826; }
.clinical-tv-main-screen,.clinical-tv-side-screens { min-width: 0; min-height: 0; }
.clinical-tv-side-screens { display: grid; grid-template-rows: repeat(3,minmax(0,1fr)); gap: 6px; }
.clinical-tv-screen { display: grid; grid-template-rows: auto minmax(0,1fr) auto; gap: 4px; min-width: 0; min-height: 0; height: 100%; padding: 6px; overflow: hidden; border: 1px solid #43685c; border-radius: 7px; background: #f9fcfa; touch-action: pan-y; }
.clinical-tv-screen:focus-visible { outline: 2px solid #36b980; outline-offset: 1px; }
.clinical-tv-screen-heading { display: flex; justify-content: space-between; align-items: center; min-height: 26px; gap: 4px; color: #527067; font-size: 9px; }
.clinical-tv-swap { display: grid; place-items: center; width: 30px; height: 26px; padding: 0; border: 1px solid #b7ddc4; border-radius: 6px; background: #e4f4eb; color: #16834c; font-size: 21px; cursor: pointer; }
.clinical-tv-swap:disabled { opacity: .35; cursor: default; }
.clinical-tv-screen-navigation { display: grid; grid-template-columns: 30px minmax(0,1fr) 30px; align-items: center; gap: 3px; }
.clinical-tv-screen-navigation button { height: 30px; padding: 0; border: 1px solid #c5dbd1; border-radius: 6px; background: #eff7f3; color: #176444; font-size: 23px; cursor: pointer; }
.clinical-tv-screen-navigation small { display: block; text-align: center; }
.clinical-tv-screen-navigation small span { display: block; color: #7a8b83; font-size: 8px; }
.clinical-tv-screen-preview { display: grid; min-height: 0; place-items: center; overflow: hidden; background: #edf4f0; }
.clinical-tv-screen-preview > * { min-height: 0; max-height: 100%; }
.clinical-tv-screen-preview > img { width: 100%; height: 100%; object-fit: contain; }
.clinical-tv-screen-preview .clinical-tv-source-placeholder { min-height: 35px; }
.clinical-tv-screen small { overflow: hidden; color: #315e4c; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.clinical-tv-screen-empty { display: grid; place-items: center; min-height: 25px; color: #8d9d97; font-size: 8px; }
.tv-device-status { padding: 12px; border: 1px solid #c5dbd1; border-radius: 8px; background: #eff7f3; color: #315e4c; }
#tvDeviceCode { text-transform: uppercase; letter-spacing: .3em; font: 700 24px ui-monospace,monospace; }
.clinical-tv-source-visual { width: 100%; height: 100%; overflow: hidden; pointer-events: none; }
.clinical-tv-odontogram-thumb rect { fill:#fff;stroke:#4c8069;stroke-width:2; }
.clinical-tv-odontogram-thumb path { fill:none;stroke:#4c8069;stroke-width:1.6;stroke-linecap:round; }
.clinical-tv-face-thumb path { fill:#e8c5a5;stroke:#9b785e;stroke-width:2;stroke-linecap:round;stroke-linejoin:round; }
.clinical-tv-source-placeholder { display: grid; align-content: center; justify-items: center; gap: 3px; min-height: 70px; padding: 6px; text-align: center; }
.clinical-tv-source-placeholder > span { color: #16834c; font-size: 19px; }
.clinical-tv-source-placeholder strong { color: #315e4c; font-size: 9px; }
.clinical-tv-source-placeholder small { color: #70877d; font-size: 8px; }
.attendance-red { color: #b23535; font-weight: 700; }
.attendance-green { color: #147461; font-weight: 700; }
@media (max-width: 1000px) { .attendance-columns { grid-template-columns: 1fr; grid-template-areas: "reception" "agenda" "walkins"; } }
@media (max-width: 760px) {
  .cloud-invite-form { grid-template-columns: minmax(0, 1fr); }
  .cloud-invite-help { align-items: flex-start; flex-direction: column; }
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 250px; flex: 0 0 250px; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 27px 16px 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); padding: 0 10px 24px; }
.brand-logo { display: block; width: 180px; max-width: 100%; height: auto; }
.brand-mark { width: 36px; height: 36px; border-radius: 12px; background: var(--green); color: #fff; font: 800 24px Manrope,sans-serif; text-align: center; line-height: 34px; transform: rotate(-8deg); }
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { font: 800 18px Manrope,sans-serif; letter-spacing: -.8px; }
.brand-copy small { color: #96a4a4; font-size: 10px; margin-top: 3px; }
.clinic-switcher { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 10px; background: #f7f9f8; border: 1px solid #eef2f0; border-radius: 11px; margin-bottom: 27px; color: var(--ink); text-align: left; }
.clinic-avatar,.profile-avatar { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 10px; color: #19776c; background: #dcefeb; font-weight: 700; }
.clinic-switcher strong,.clinic-switcher small,.profile-button strong,.profile-button small { display: block; }
.clinic-switcher strong,.profile-button strong { font-size: 12px; font-weight: 700; }
.clinic-switcher small,.profile-button small { color: var(--muted); font-size: 10px; margin-top: 3px; }
.switch-chevron { margin-left: auto; font-size: 17px; color: #899a99; }
.nav-label { color: #a0adac; font-size: 9px; font-weight: 700; letter-spacing: 1.1px; padding: 0 11px 9px; }
.main-nav { display: grid; gap: 4px; }
.nav-item { width: 100%; border: 0; background: transparent; color: #718382; border-radius: 9px; text-align: left; padding: 10px 11px; display: flex; align-items: center; gap: 11px; font-size: 12px; font-weight: 500; transition: .15s ease; }
.nav-item:hover { background: #f5f8f7; color: var(--green); }
.nav-item.active { background: var(--green-light); color: var(--green-dark); font-weight: 700; }
.nav-icon { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-count { margin-left: auto; background: #d4ebe6; color: #18776b; font-size: 10px; border-radius: 10px; min-width: 19px; text-align: center; padding: 2px 5px; }
.sidebar-bottom { margin-top: auto; }
.help-card { border: 1px solid #e8efed; border-radius: 12px; padding: 14px; margin: 22px 2px 17px; position: relative; }
.help-icon { position: absolute; top: 13px; right: 12px; width: 18px; height: 18px; border: 1px solid #dfe9e6; border-radius: 50%; display: grid; place-items: center; color: #8b9b99; font-size: 10px; }
.help-card strong,.help-card small { display: block; }
.help-card strong { font-size: 11px; }
.help-card small { color: var(--muted); font-size: 10px; margin-top: 6px; line-height: 1.5; }
.help-card button { border: 0; color: var(--green); background: transparent; font-size: 10px; font-weight: 700; padding: 10px 0 0; }
.help-card button span { padding-left: 4px; }
.certificate-link { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 10px 6px; border: 0; background: transparent; color: var(--green-dark); font-size: 11px; font-weight: 700; text-align: left; }
.certificate-link:hover { background: var(--green-light); border-radius: 8px; }
.profile-button { width: 100%; display: flex; align-items: center; gap: 9px; border: 0; background: transparent; text-align: left; padding: 9px 5px 0; color: var(--ink); border-top: 1px solid var(--line); }
.profile-avatar { background: #f6e8df; color: #a26143; border-radius: 50%; font-size: 10px; }
.profile-more { margin-left: auto; color: #90a09f; font-size: 20px; letter-spacing: 1px; }
.main-area { min-width: 0; flex: 1; }
.topbar { height: 72px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 36px; }
.breadcrumbs { display: flex; align-items: center; gap: 10px; color: #9aa8a6; font-size: 11px; }
.breadcrumbs strong { color: #405655; font-weight: 600; }
.crumb-separator { color: #c4cfcc; }
.topbar-actions { display: flex; align-items: center; gap: 20px; }
.search-box { width: 240px; height: 35px; border: 1px solid #e9efed; border-radius: 8px; display: flex; align-items: center; gap: 8px; padding: 0 10px; color: #98a7a5; }
.search-box span { font-size: 20px; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 10px; }
.search-box input::placeholder { color: #a1aeac; }
.icon-button { width: 30px; height: 30px; border: 0; background: transparent; color: #708582; font-size: 20px; position: relative; }
.notification-button i { position: absolute; width: 5px; height: 5px; border: 1px solid #fff; background: #e58669; border-radius: 50%; top: 5px; right: 5px; }
.topbar-divider { height: 24px; width: 1px; background: var(--line); }
.help-link { background: transparent; border: 0; color: #687b79; font-size: 11px; }
.help-link span { color: var(--green); padding-left: 4px; }
.mobile-menu { display: none; }
.page-content { max-width: 1440px; margin: 0 auto; padding: 30px 36px 50px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
h1,h2,h3,p { margin-top: 0; }
h1 { color: var(--ink); font: 700 24px Manrope,sans-serif; letter-spacing: -.65px; margin-bottom: 6px; }
.page-heading p { color: #869593; font-size: 11px; margin-bottom: 0; }
.heading-actions { display: flex; gap: 9px; align-items: center; }
.button { border: 1px solid #e3ebe8; background: #fff; color: #516765; border-radius: 8px; padding: 9px 13px; font-weight: 600; font-size: 10px; transition: .15s; }
.button:hover { border-color: #b7d4ce; color: var(--green); }
.button.primary { border-color: var(--green); background: var(--green); color: #fff; box-shadow: 0 3px 8px #157b7022; }
.button.primary:hover { background: var(--green-dark); }
.button .plus { font-size: 15px; vertical-align: -1px; margin-right: 5px; }
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 17px; }
.metric-card,.panel,.section-card { background: #fff; border: 1px solid #edf1ef; border-radius: 12px; box-shadow: var(--shadow); }
.metric-card { padding: 17px 18px 15px; min-height: 112px; }
.metric-top { display: flex; justify-content: space-between; align-items: center; color: #81928f; font-size: 10px; }
.metric-icon { width: 29px; height: 29px; border-radius: 9px; display: grid; place-items: center; color: #25887c; background: #eaf5f2; font-size: 16px; }
.metric-card strong { display: block; font: 700 23px Manrope,sans-serif; letter-spacing: -.5px; color: #294342; margin: 9px 0 3px; }
.metric-foot { color: #91a09e; font-size: 9px; }
.metric-foot b { color: #278a70; font-weight: 600; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(240px,.9fr); gap: 16px; }
.panel { padding: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 15px; }
.panel-head h2,.section-title { font: 700 13px Manrope,sans-serif; color: #304746; margin: 0; }
.panel-head p { color: #93a09e; font-size: 9px; margin: 5px 0 0; }
.text-button { color: var(--green); font-size: 10px; border: 0; background: transparent; font-weight: 700; white-space: nowrap; }
.appointment-list { display: grid; }
.appointment-row { display: grid; grid-template-columns: 63px 3px minmax(0,1fr) auto; align-items: center; gap: 12px; border-top: 1px solid #f0f3f2; padding: 12px 0; }
.appointment-time { color: #607573; font-size: 10px; font-weight: 600; }
.appointment-color { height: 38px; border-radius: 4px; background: var(--procedure-color, #83b9aa); }
.appointment-info strong { display: block; color: #3a504f; font-size: 10px; font-weight: 700; }
.appointment-info small { display: block; color: #99a6a4; font-size: 9px; margin-top: 4px; }
.status { display: inline-block; border-radius: 20px; font-size: 8px; font-weight: 600; padding: 5px 8px; white-space: nowrap; }
.status.confirmed,.status.pago,.status.aprovado { color: #27836c; background: #e9f5ef; }
.status.waiting,.status.analise { color: #a67c33; background: #fbf3e5; }
.status.pending { color: #7d75af; background: #f0eef9; }
.status.late,.status.atrasado { color: #c16254; background: #fbecea; }
.status.neutral { background: #f0f3f2; color: #788987; }
.side-stack { display: grid; gap: 15px; align-content: start; }
.revenue-amount { font: 700 21px Manrope,sans-serif; letter-spacing: -.5px; color: #294342; }
.revenue-amount small { font: 500 10px "DM Sans",sans-serif; color: #94a19f; }
.chart { height: 79px; display: flex; align-items: end; gap: 9px; padding: 7px 4px 0; border-bottom: 1px solid #edf1ef; margin: 10px 0 9px; }
.chart-bar { flex: 1; background: #dcefe9; border-radius: 4px 4px 0 0; min-height: 14px; }
.chart-bar:nth-child(2n) { background: #9acabe; }.chart-bar:nth-child(4) { background: #278a7b; }
.chart-labels { display: flex; justify-content: space-between; color: #a2aeac; font-size: 8px; }
.goal-row { display: flex; justify-content: space-between; color: #82928f; font-size: 9px; margin-top: 13px; }
.progress-track { height: 5px; background: #edf2f0; border-radius: 5px; margin-top: 7px; overflow: hidden; }
.progress-fill { height: 100%; width: 72%; background: #3b9a82; border-radius: inherit; }
.attention-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid #f0f3f2; }
.attention-dot { width: 8px; height: 8px; border-radius: 50%; background: #e2a04e; }
.attention-row div { flex: 1; color: #607471; font-size: 9px; }
.attention-row small { display: block; color: #9aa7a5; font-size: 8px; margin-top: 3px; }
.attention-row b { color: #ad7c38; font-size: 8px; font-weight: 600; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 15px; }
.filter-input,.filter-select { border: 1px solid #e6edeb; border-radius: 7px; padding: 8px 10px; background: #fff; color: #5d716e; font-size: 10px; outline: none; }
.filter-input { min-width: 205px; }
.data-table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th { text-align: left; color: #97a4a2; font-size: 9px; font-weight: 600; padding: 10px 12px; border-bottom: 1px solid #edf1ef; }
td { padding: 12px; color: #657775; font-size: 10px; border-bottom: 1px solid #f0f3f2; }
tbody tr:last-child td { border-bottom: 0; }
.patient-cell { display: flex; align-items: center; gap: 9px; color: #3f5654; font-weight: 600; }
.patient-avatar { width: 29px; height: 29px; border-radius: 50%; background: #e7f2ef; display: grid; place-items: center; color: #438577; font-size: 9px; font-weight: 700; }
.patient-avatar.orange { background: #f7eade; color: #ad7753; }.patient-avatar.purple { background: #efebf8; color: #8276ac; }.patient-avatar.blue { background: #e6eef7; color: #6684aa; }
.table-action { border: 0; background: transparent; color: var(--green); font-size: 10px; font-weight: 600; }
.two-column { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(250px,.8fr); gap: 15px; }
.two-column > * { min-width: 0; }
.patient-profile-head { padding: 20px; display: flex; align-items: center; gap: 15px; }
.patient-profile-head .patient-avatar { width: 54px; height: 54px; font-size: 15px; }
.patient-profile-head > .patient-photo { width: 54px; height: 54px; flex: 0 0 54px; border-radius: 50%; object-fit: cover; }
.patient-profile-head h2 { font: 700 17px Manrope,sans-serif; margin: 0 0 5px; }
.patient-profile-head p { color: #91a09e; font-size: 10px; margin: 0; }
.patient-profile-indicators { display: flex; flex: 0 1 auto; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 0; margin-left: auto; }
.patient-appointment-indicator { border-radius: 8px; padding: 6px 9px; background: #e9f5ef; color: #27836c; font-size: 10px; font-weight: 700; text-align: right; }
.patient-room-indicator { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; border-radius: 8px; font-size: 10px; text-align: right; }
.alert-banner { padding: 10px 12px; border-radius: 8px; background: #fff6e8; color: #a7742e; font-size: 10px; margin: 0 0 14px; }
.tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab-button { white-space: nowrap; border: 0; background: transparent; color: #879694; font-size: 10px; padding: 0 0 10px; }
.tab-button.active { color: var(--green); border-bottom: 2px solid var(--green); font-weight: 700; }
.patient-main-tabs { gap:6px;padding:6px;border:1px solid #dfeae5;border-radius:12px;background:#f4f8f6;scrollbar-width:thin; }
.patient-main-tabs .tab-button { flex:1 0 auto;min-height:42px;padding:9px 14px;border:1px solid transparent;border-radius:8px;color:#586e68;font-size:12px;font-weight:600; }
.patient-main-tabs .tab-button:hover { background:#e9f2ee;color:#285d4f; }
.patient-main-tabs .tab-button.active { border:1px solid #cde2d7;background:#fff;color:#21624e;box-shadow:0 2px 6px #274f3b12; }
.patient-main-tabs .tab-button:focus-visible,.clinical-subtab:focus-visible { outline:2px solid #438d70;outline-offset:2px; }
.patient-detail-content { min-width: 0; padding-top: 17px; }
.clinical-subtabs { display: flex; flex-wrap: nowrap; gap: 6px; padding: 12px 0 0; overflow-x: auto; scrollbar-width: thin; }
.clinical-subtab { flex: 0 0 auto; min-height:36px;border: 1px solid transparent; border-radius: 18px; padding: 7px 12px; background: #f6f9f8; color: #596e69; font-size: 11px; }
.clinical-subtab:hover,.clinical-subtab.active { border-color: #b7d5cb; background: #eaf5f2; color: var(--green-dark); font-weight: 700; }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.detail-item small { color: #9aa7a4; display: block; font-size: 9px; margin-bottom: 5px; }
.detail-item strong { color: #4b6260; font-size: 10px; font-weight: 600; }
.patient-face-photo { display: block; width: 68px; height: 68px; border-radius: 50%; object-fit: cover; }
.odontogram-reference { width: 100%; max-width: 100%; min-width: 0; overflow: hidden; border: 1px solid #d7dddb; background: #fff; }
.odontogram-arch-block { min-width: 0; padding: 6px 6px 0; }
.odontogram-arch-title { min-height: 23px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid #aeb8b5; color: #586762; font-size: 9px; letter-spacing: .04em; }
.odontogram-arch-title strong { font-size: 10px; }
.odontogram-arch-title span { color: #82908c; }
.anatomical-row { display: flex; align-items: stretch; position: relative; }
.anatomical-quadrant { display: grid; flex: 1 1 50%; min-width: 0; grid-template-columns: repeat(8,minmax(0,1fr)); }
.quadrant-label { display: none; }
.anatomical-slot { position: relative; min-width: 0; display: grid; justify-items: center; padding: 6px 0; border-right: 1px solid #e0e5e3; transition: background .15s; }
.anatomical-slot[data-tooth] { cursor: pointer; }
.anatomical-slot[data-tooth]:focus { outline: 2px solid #5488b4; outline-offset: -2px; }
.prosthesis-connection { position: absolute; left: 10%; width: 80%; height: 17px; pointer-events: none; color: #bc873d; }
.prosthesis-connection.upper { top: 52px; }
.prosthesis-connection.lower { top: 13px; }
.prosthesis-connection.completed { color: #4a927e; }
.prosthesis-connection.preexisting { color: #776aa3; }
.prosthesis-connection svg { position: relative; width: 100%; height: 100%; fill: #f5dfaa; stroke: currentColor; stroke-width: 1.5; }
.prosthesis-connection.preexisting svg { fill: #c9c2df; }
.prosthesis-connection::before,.prosthesis-connection::after { content: ""; position: absolute; top: 7px; height: 4px; background: currentColor; }
.prosthesis-connection.connect-left::before { left: -20%; width: 70%; }
.prosthesis-connection.connect-right::after { right: -20%; width: 70%; }
.anatomical-quadrant:first-child .anatomical-slot:first-child { border-left: 1px solid #e0e5e3; }
.anatomical-quadrant:first-child .anatomical-slot:last-child { border-right: 2px solid #9fa9a6; }
.anatomical-slot.selected { background: #fff3e9; box-shadow: inset 0 0 0 1px #e4a77d; }
.anatomical-tooth-card { width: 100%; min-width: 0; height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tooth-number { height: 12px; color: #45534f; font: 600 8px Arial,sans-serif; }
.anatomical-tooth { width: min(100%,42px); height: 62px; overflow: visible; }
.anatomical-slot .anatomical-tooth-card { height: auto; min-height: 76px; align-self: stretch; }
.anatomical-slot .tooth-number { width: 100%; height: auto; min-height: 12px; flex: 1; padding: 0 2px; text-align: center; overflow-wrap: anywhere; line-height: 1.3; }
.tooth-condition { display: block; font-size: 7px; font-weight: 400; }
.anatomical-slot .anatomical-tooth { flex-shrink: 0; }
.anatomical-slot .prosthesis-connection.upper { top: auto; bottom: 19px; }
.odontogram-instructions { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0; color: #637774; font-size: 10px; line-height: 1.5; }
.tooth-not-erupted { height: 76px; display: grid; align-items: center; color: #ccd4d1; font-size: 18px; }
.replaced-tooth-history { max-width: 100%; overflow: hidden; border: 0; padding: 1px 2px; background: transparent; color: #647d76; font-size: 6px; white-space: nowrap; cursor: pointer; }
.primary-row .anatomical-tooth { width: min(100%,48px); height: 77px; }
.tooth-flipped { transform: scale(1,-1) translate(0,-88px); }
.tooth-root { fill: #fff; stroke: #34413d; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tooth-crown { fill: #fff; stroke: #34413d; stroke-width: 1.6; stroke-linejoin: round; }
.tooth-detail { fill: none; stroke: #78837f; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.implant-crown { fill: #fff9e8; stroke: #92733b; stroke-width: 2; }
.prosthetic-crown { fill: #f5dfaa; stroke: #a77c27; stroke-width: 2; }
.prosthetic-crown.crown-only { fill: #f6e8c9; stroke: #a77c27; }
.prosthetic-seam { fill: none; stroke: #8a6928; stroke-width: 1.5; stroke-linecap: round; }
.implant-fixture { fill: #cbd4d1; stroke: #5c6e69; stroke-width: 1.7; stroke-linejoin: round; }
.implant-thread { fill: none; stroke: #5c6e69; stroke-width: 1; stroke-linecap: round; }
.implant-abutment { fill: #ded8c4; stroke: #756d58; }
.extraction-mark ellipse { fill: #fbf0ee; stroke: #ae4a40; stroke-width: 1.5; stroke-dasharray: 2 1; }
.extraction-mark path { fill: none; stroke: #ae4a40; stroke-width: 2; stroke-linecap: round; }
.tooth-surface-hit { fill: #fff; fill-opacity: .01; stroke: #a7b0ad; stroke-width: .8; stroke-linejoin: round; cursor: pointer; transition: fill .12s,stroke .12s; }
.tooth-surface-hit:hover,.tooth-surface-hit:focus { fill: #a9d8ca; fill-opacity: .85; stroke: #347e6e; stroke-width: 1.5; outline: none; }
.tooth-surface-hit.has-record { fill: #f3c9a7; fill-opacity: .85; }
.tooth-surface-hit.has-record.completed { fill: #91c9b7; }
.tooth-surface-hit.has-record.pending { fill: #f1c48c; }
.tooth-surface-hit.has-record.preexisting { fill: #c9c2df; fill-opacity: .8; stroke: #776aa3; }
.tooth-surface-hit.has-record:hover,.tooth-surface-hit.has-record:focus { stroke: #286f60; stroke-width: 1.6; }
.tooth-surface-hit.face-selected { fill: #73bda9; fill-opacity: .9; stroke: #277663; stroke-width: 1.4; }
.extracted-tooth { fill: #f8e4df; stroke: #b94a3f; stroke-dasharray: 2 1; }
.tooth-selector { display: grid; justify-items: center; gap: 7px; padding: 8px; border: 1px solid #e6eeeb; border-radius: 9px; background: #f9fbfa; }
.tooth-selector > p { margin: 0; color: #788985; font-size: 9px; text-align: center; line-height: 1.45; }
.tooth-selector .anatomical-tooth-card { width: 130px; height: 190px; }
.tooth-selector .anatomical-tooth { width: 118px; height: 164px; }
.tooth-selector .tooth-number { font-size: 11px; }
.tooth-face-key { color: #72817d; font-size: 8px; text-align: center; }
.whole-tooth-field label { display: flex; align-items: flex-start; gap: 7px; line-height: 1.5; }
.whole-tooth-field input { margin-top: 1px; accent-color: var(--green); }
.whole-tooth-field small { color: #899793; font-size: 8px; }
.whole-tooth-field input { width: auto; }
.odontogram-midline { height: 20px; display: flex; align-items: center; gap: 8px; color: #899591; font-size: 8px; text-transform: uppercase; }
.odontogram-midline i { height: 1px; flex: 1; background: #c4ccca; }
.lower-title { justify-content: flex-end; border-top: 1px solid #aeb8b5; border-bottom: 0; }
.odontogram-legend { min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; padding: 7px 8px; border-top: 1px solid #aeb8b5; color: #687571; font-size: 8px; }
.odontogram-legend span { display: inline-flex; align-items: center; gap: 4px; }
.odontogram-legend b { color: #3d514b; font-size: 9px; }
.legend-mark { width: 9px; height: 9px; border-radius: 2px; background: #f1c48c; }
.legend-mark.completed { background: #91c9b7; }
.surface-history { margin-top: 8px; }
.pending-dot { background: #e5a84c; box-shadow: 0 0 0 3px #fff3df; }
.legend { display: flex; gap: 14px; color: #8a9a97; font-size: 9px; }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; background: #e8aa80; }.legend i.done-key { background: #7db8a7; }
.timeline-item { display: flex; gap: 11px; padding: 10px 0; border-top: 1px solid #eef2f0; }
.timeline-dot { width: 8px; height: 8px; flex: 0 0 8px; margin-top: 3px; border-radius: 50%; background: #68aa98; box-shadow: 0 0 0 3px #e8f4f0; }
.timeline-item strong { color: #506663; font-size: 10px; display: block; }
.timeline-item small { color: #99a6a4; font-size: 9px; display: block; margin-top: 4px; line-height: 1.5; }
.empty-state { text-align: center; color: #8c9a98; font-size: 11px; padding: 36px 15px; }
.calendar-toolbar { display: flex; align-items: center; gap: 10px; }
.calendar-date { color: #415956; font-size: 11px; font-weight: 700; }
.calendar-toggle { display: flex; border: 1px solid #e7eeeb; padding: 3px; border-radius: 7px; gap: 2px; }
.calendar-toggle button { border: 0; background: transparent; color: #899895; padding: 5px 7px; font-size: 9px; border-radius: 5px; }
.calendar-toggle button.active { background: #eaf4f1; color: var(--green); font-weight: 700; }
.schedule-list { display: grid; }
.schedule-row { display: grid; grid-template-columns: 62px minmax(0,1fr); min-height: 75px; border-top: 1px solid #eef2f0; }
.schedule-time { padding-top: 15px; color: #8b9a98; font-size: 10px; }
.schedule-event { margin: 8px 0; border-left: 3px solid #52a08d; border-radius: 0 6px 6px 0; background: #edf6f3; padding: 9px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.schedule-event.lilac { border-color: #988fc6; background: #f2f0f9; }.schedule-event.peach { border-color: #d99a72; background: #fff3eb; }.schedule-event.blue { border-color: #7d9ec4; background: #eff4fa; }
.schedule-event strong { display: block; color: #506562; font-size: 10px; }.schedule-event small { display: block; color: #899a97; font-size: 9px; margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1/-1; }
.field label { color: #637774; font-size: 10px; font-weight: 600; }
.field input,.field select,.field textarea { border: 1px solid #e3ebe8; border-radius: 7px; outline: 0; padding: 9px 10px; color: #526764; font-size: 11px; background: #fff; width: 100%; }
.field textarea { min-height: 75px; resize: vertical; }
.field input:focus,.field select:focus,.field textarea:focus { border-color: #8bbdb2; box-shadow: 0 0 0 3px #e9f4f1; }
.field input[type="color"] { min-height: 36px; padding: 3px; cursor: pointer; }
.modal-backdrop { position: fixed; inset: 0; z-index: 20; background: #18333066; display: grid; place-items: center; padding: 16px; }
.idoc-hybrid-backdrop { z-index: 30; }
.modal.idoc-hybrid-modal { width: min(1100px, 96vw); max-height: 94dvh; overflow-y: auto; }
.idoc-hybrid-modal iframe { display: block; width: 100%; height: min(70dvh, 780px); border: 0; background: #fff; }
.idoc-hybrid-modal progress { width: 100%; }
.idoc-hybrid-panel { margin-top: 16px; }
.idoc-hybrid-panel [data-hybrid-notices] { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
@media (max-width: 600px) {
  .idoc-hybrid-backdrop { padding: 4px; }
  .modal.idoc-hybrid-modal { width: 100%; max-height: 98dvh; padding: 12px; }
  .idoc-hybrid-modal iframe { height: 68dvh; }
}
.modal { width: min(490px,100%); background: #fff; border-radius: 14px; box-shadow: 0 20px 70px #16302d33; padding: 22px; max-height: 90vh; overflow-y: auto; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 17px; }
.modal-head h2 { margin: 0 0 5px; font: 700 16px Manrope,sans-serif; color: #304846; }
.modal-head p { margin: 0; color: #8d9b99; font-size: 10px; }
.modal-close { border: 0; background: #f4f7f6; color: #758784; width: 27px; height: 27px; border-radius: 7px; font-size: 17px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.idoc-viewer { width: min(1100px,100%); }
.idoc-viewer > p { font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.idoc-viewer .modal-actions { flex-wrap: wrap; }
.idoc-preview-canvas { display: flex; min-height: 180px; max-height: 65vh; overflow: auto; background: #20302d; border-radius: 8px; }
.idoc-preview-canvas img { flex-shrink: 0; max-width: 100%; max-height: 65vh; margin: auto; object-fit: contain; }
.idoc-preview-canvas img.idoc-image-original { max-width: none; max-height: none; }
.certificate-overview { display: grid; gap: 12px; }
.certificate-card { border: 1px solid var(--line); border-radius: 11px; padding: 14px; background: #f9fbfa; }
.certificate-card h3 { margin: 0 0 7px; color: #304846; font-size: 13px; }
.certificate-card p,.certificate-notice { margin: 0; color: #667d79; font-size: 12px; line-height: 1.5; }
.certificate-status { display: inline-block; margin-top: 9px; color: #916b25; font-size: 11px; font-weight: 700; }
[data-fiscal-xml-result] { min-width: 0; overflow-wrap: anywhere; }
.toast { position: fixed; z-index: 30; right: 22px; bottom: 20px; background: #234541; color: #fff; border-radius: 9px; padding: 12px 16px; font-size: 11px; box-shadow: 0 8px 24px #1a393733; opacity: 0; transform: translateY(8px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translateY(0); }

[hidden] { display: none !important; }
.auth-gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 20%, #e8f4f1 0, transparent 38%), #f5f8f7; }
.auth-card { width: min(440px,100%); background: #fff; border: 1px solid #e8efed; border-radius: 18px; box-shadow: 0 18px 55px rgba(37,70,67,.1); overflow: hidden; }
.auth-brand { padding: 25px 28px 20px; border-bottom: 1px solid #eef2f0; }
.auth-content { padding: 28px; }
.auth-eyebrow { color: #788f8b; font-size: 9px; font-weight: 700; letter-spacing: 1.2px; }
.auth-content h1 { margin: 10px 0 8px; font-size: 23px; }
.auth-content > p { color: #748582; font-size: 12px; line-height: 1.6; }
.google-signin { width: 100%; min-height: 44px; margin: 11px 0 13px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 12px; }
.google-signin:disabled { opacity: .65; cursor: wait; }
.google-mark { font: 700 16px Arial,sans-serif; color: #4285f4; background: #fff; border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center; }
.auth-status { min-height: 18px; margin: 8px 0 0; color: #607573; font-size: 11px; }
.auth-membership { margin-top: 15px; padding: 14px; background: #fff8eb; border: 1px solid #f1e2c3; border-radius: 10px; }
.auth-membership p { color: #685638; font-size: 11px; line-height: 1.55; margin: 0 0 10px; }
.auth-membership code { display: block; overflow-wrap: anywhere; color: #495c59; font-size: 10px; line-height: 1.6; margin-bottom: 11px; }
.auth-signout { margin-top: 14px; }
.auth-footnote { display: block; margin-top: 23px; color: #91a09e; font-size: 10px; line-height: 1.55; }
.profile-button .profile-more { font-size: 10px; letter-spacing: 0; }
.status-card { display: flex; justify-content: space-between; align-items: center; border: 1px solid #edf1ef; border-radius: 9px; padding: 12px; margin-bottom: 9px; }
.status-card strong { display: block; color: #4b625f; font-size: 10px; }.status-card small { display: block; color: #98a5a3; font-size: 9px; margin-top: 4px; }
.inventory-level { width: 90px; }.inventory-level .progress-track { margin-top: 0; }
.muted { color: #93a19f; font-size: 10px; }

@media (max-width: 1050px) {
  .sidebar { width: 220px; flex-basis: 220px; }
  .page-content { padding: 26px 23px 42px; }
  .topbar { padding: 0 24px; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .odontogram-management { grid-template-columns: 1fr; }
}
.odontogram-management { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 16px; }
.clinical-service-panels { grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); }
.odontogram-management .panel { margin: 0; min-width: 0; }
.odontogram-management .panel-head { align-items: flex-start; }
.odontogram-management .panel-head h2 { margin: 0; color: #405753; font: 700 12px Manrope,sans-serif; }
.odontogram-management .panel-head p { margin: 4px 0 0; color: #92a09c; font-size: 9px; line-height: 1.4; }
.pending-dental-service { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid #eef2f0; }
.pending-dental-info { min-width: 0; }
.pending-dental-info strong,.pending-dental-info small { display: block; }
.pending-dental-info strong { overflow: hidden; color: #506663; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.pending-dental-info small { margin-top: 4px; color: #96a39f; font-size: 8px; line-height: 1.4; }
.pending-dental-service .table-action { grid-column: 2; justify-self: end; }
.inline-status { display: inline-flex; align-items: center; gap: 5px; color: #82918d; font-size: 8px; }
.inline-status select { max-width: 90px; border: 1px solid #e3ebe8; border-radius: 6px; padding: 5px; background: #fff; color: #5c716e; font-size: 8px; }
.pending-dental-service .inline-status { justify-self: end; }
.empty-pending { padding: 10px 0; }
.pending-service-open { display: block; min-width: 0; border: 0; padding: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.pending-service-open strong,.pending-service-open small { display: block; }
.pending-service-open strong { overflow: hidden; color: #506663; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.pending-service-open small { margin-top: 4px; color: #96a39f; font-size: 8px; line-height: 1.45; }
.pending-service-open:hover strong { color: var(--green); }
.service-category { display: inline-block; margin-bottom: 4px; color: #7d9991; font-size: 7px; letter-spacing: .04em; text-transform: uppercase; }
.pending-service-value { color: #536f68; font-size: 9px; font-weight: 700; white-space: nowrap; }
.pending-service-price { display: grid; gap: 3px; color: #82918d; font-size: 7px; }
.pending-service-price input { width: 92px; min-width: 76px; border: 1px solid #dfe9e5; border-radius: 6px; padding: 6px 7px; color: #4b655f; font-size: 9px; }
.pending-service-price input:focus { border-color: #8bbdb2; outline: 0; box-shadow: 0 0 0 2px #e9f4f1; }
.service-panel-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.compact-button { padding: 7px 9px; font-size: 9px; white-space: nowrap; }
.compact-button:disabled { opacity: .45; cursor: not-allowed; }
.service-editor-heading { padding: 10px 12px; border: 1px solid #e6efec; border-radius: 9px; background: #f7faf9; }
.service-editor-heading strong,.service-editor-heading small { display: block; }
.service-editor-heading strong { color: #405753; font-size: 11px; }
.service-editor-heading small { margin-top: 4px; color: #879692; font-size: 9px; line-height: 1.45; }
.modal:has(.quote-builder-list) { width: min(900px,100%); }
.quote-builder-list { display: grid; gap: 8px; max-height: none; overflow: visible; }
.quote-builder-item { display: grid; grid-template-columns: auto minmax(90px,1fr) minmax(120px,1.4fr) minmax(100px,.8fr); align-items: center; gap: 8px; border: 1px solid #e7eeec; border-radius: 9px; padding: 9px; }
.consolidated-quote-item { grid-template-columns: minmax(90px,1fr) minmax(120px,1.4fr) minmax(100px,.8fr); }
.quote-include,.payment-method-options label,.payment-method-option { display: inline-flex; align-items: center; gap: 6px; color: #647975; font-size: 9px; }
.quote-include input,.payment-method-options input,.payment-method-option input { accent-color: var(--green); }
.quote-item-description strong,.quote-item-description small { display: block; }
.quote-item-description strong { color: #516864; font-size: 9px; }
.quote-item-description small { margin-top: 3px; color: #99a6a2; font-size: 8px; }
.quote-builder-item .field { gap: 4px; }
.quote-builder-item .field label { font-size: 8px; }
.quote-builder-item .field input { padding: 7px; font-size: 9px; }
.quote-discount-field { max-width: 190px; }
.installment-field[hidden] { display: none; }
.payment-estimates { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 18px; color: #788984; font-size: 9px; }
.payment-estimates strong { color: #3e6158; }
.payment-method-options { display: flex; flex-wrap: wrap; gap: 8px; }
.quote-builder-totals { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 18px; padding: 11px; border-radius: 8px; background: #f4f8f6; color: #778782; font-size: 9px; }
.quote-builder-totals span { display: inline-flex; gap: 6px; }
.quote-builder-totals strong { color: #3e6158; }
.planned-service-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.health-question-positive { border-color: #e6d3b8; background: #fffcf6; }
.health-answer-summary { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin-top: 5px; color: #768781; font-size: 9px; line-height: 1.45; }
.health-answer-summary strong { color: #668075; font-size: 9px; }
.health-question-positive .health-answer-summary strong { color: #ab7248; }
.catalog-service-groups { display: grid; gap: 10px; max-height: 350px; overflow-y: auto; }
.catalog-group h3 { margin: 0 0 5px; color: #647a74; font-size: 9px; font-weight: 700; }
.catalog-service-list { display: grid; max-height: 190px; overflow-y: auto; border: 1px solid #e8efed; border-radius: 8px; padding: 0 10px; }
.catalog-service-row { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border: 0; border-bottom: 1px solid #edf2f0; background: transparent; color: inherit; text-align: left; }
.catalog-service-row:hover { background: #f7fbf9; }
.catalog-service-row:last-child { border-bottom: 0; }
.catalog-service-row strong,.catalog-service-row small { display: block; }
.catalog-service-row strong { color: #516864; font-size: 9px; }
.catalog-service-row small { margin-top: 3px; color: #91a09c; font-size: 8px; }
.catalog-service-row b { color: #56736a; font-size: 9px; white-space: nowrap; }
.catalog-service-row b small { margin-top: 3px; color: var(--green); font-size: 7px; text-align: right; }
.catalog-settings-list .catalog-service-list { max-height: 220px; }
.catalog-repeat-option { display: flex; align-items: center; gap: 7px; color: #637774; font-size: 9px; }
.catalog-repeat-option input,.catalog-tooth-picker input { accent-color: var(--green); }
.catalog-tooth-picker { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 5px; margin-top: 7px; }
.catalog-tooth-picker label { display: grid; justify-items: center; gap: 2px; padding: 5px 2px; border: 1px solid #e5eeeb; border-radius: 6px; color: #5a716b; font-size: 8px; }
.catalog-tooth-picker label:has(input:checked) { border-color: #80b5a8; background: #edf7f4; color: var(--green-dark); }
.catalog-tooth-picker input { margin: 0; }
.assessment-workspace { display: grid; grid-template-columns: minmax(210px,.72fr) minmax(0,1.8fr); align-items: start; gap: 14px; }
.assessment-workspace > .panel { min-width: 0; padding: 15px; }
.assessment-list .panel-head { align-items: flex-start; }
.assessment-history-list { display: grid; gap: 3px; max-height: 570px; overflow-y: auto; }
.assessment-history-item { width: 100%; display: grid; justify-items: start; gap: 5px; padding: 11px; border: 1px solid #edf1ef; border-radius: 8px; background: #fff; text-align: left; }
.assessment-history-item strong { color: #536a64; font-size: 10px; }
.assessment-history-item small { color: #91a09c; font-size: 8px; line-height: 1.5; }
.assessment-history-item:hover,.assessment-history-item.active { border-color: #b7d5cb; background: #f3f8f6; }
.assessment-editor-panel > .panel-head { margin-bottom: 12px; }
.assessment-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.assessment-fields:disabled { opacity: .8; }
.assessment-context { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; margin: 2px 0 15px; padding: 10px 12px; border: 1px solid #e6efec; border-radius: 8px; background: #f7faf9; color: #526a65; font-size: 9px; }
.assessment-context span { color: #8b9b97; }
.assessment-workspace .assessment-required { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border: 1px solid #e4ece9; border-radius: 9px; background: #f8fbfa; }
.assessment-required-icon { display: grid; flex: 0 0 26px; width: 26px; height: 26px; place-items: center; border-radius: 50%; background: #e7f2ee; color: #4c796d; font-weight: 700; }
.assessment-required strong { color: #46655c; font-size: 10px; }
.assessment-required p { margin: 5px 0 10px; color: #72847e; font-size: 9px; line-height: 1.5; }
.view-only-notice { margin-bottom: 12px; }
.validity-warning { border-color: #ead9b9; background: #fffbf2; }
.validity-warning .assessment-required-icon { background: #f8eed8; color: #97733b; }
.readonly-date { min-height: 35px; display: flex; align-items: center; padding: 8px 10px; border: 1px solid #e8efed; border-radius: 7px; color: #647a74; background: #f8fbfa; font-size: 9px; }
.assessment-revision-history { margin-top: 14px; padding-top: 10px; border-top: 1px solid #e9efed; color: #637a73; font-size: 9px; }
.assessment-revision-history summary { cursor: pointer; font-weight: 700; }
.assessment-revision-history > div { display: grid; gap: 4px; padding: 9px 0; border-bottom: 1px solid #edf1ef; }
.assessment-revision-history small { color: #82928d; line-height: 1.5; }
.ortho-visual-section { grid-column: 1/-1; min-width: 0; padding: 12px; border: 1px solid #e8efed; border-radius: 9px; background: #fbfdfc; }
.ortho-visual-heading { display: grid; gap: 4px; margin-bottom: 10px; }
.ortho-visual-heading strong { color: #526a64; font-size: 10px; }
.ortho-visual-heading small { color: #8a9a96; font-size: 8px; line-height: 1.5; }
.ortho-visual-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.ortho-visual-group > span { display: block; margin-bottom: 7px; color: #71837e; font-size: 8px; font-weight: 700; }
.ortho-visual-options { display: flex; flex-wrap: wrap; gap: 6px; }
.ortho-visual-option { display: grid; justify-items: center; gap: 4px; min-width: 60px; padding: 6px; border: 1px solid #e4ece9; border-radius: 7px; background: #fff; color: #768782; }
.ortho-visual-option:hover,.ortho-visual-option.selected { border-color: #9dc9bd; background: #edf7f4; color: var(--green-dark); }
.ortho-visual-option svg { width: 42px; height: 45px; fill: #f1e4d7; stroke: #8e9b94; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.ortho-visual-option svg .ortho-profile-indicator,.ortho-visual-option svg .ortho-angle-mark { fill: none; stroke: #cc816e; stroke-width: 2.2; }
.ortho-visual-option small { font-size: 8px; }
.angle-options .ortho-visual-option svg { width: 48px; height: 48px; }
.assessment-fields:disabled .ortho-visual-option { cursor: not-allowed; }
.history-actions { display: flex; align-items: center; gap: 7px; }
.upcoming-returns { display: grid; gap: 6px; margin: 14px 0; padding: 10px; border: 1px solid #e2eee9; border-radius: 8px; background: #f7fbf9; }
.upcoming-returns > strong { color: #4c6a61; font-size: 9px; }
.upcoming-return { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 7px; border-top: 1px solid #e8f0ed; color: #566d66; font-size: 9px; }
.upcoming-return small { display: block; margin-top: 3px; color: #8b9b96; font-size: 8px; }
.face-clinic-layout { display: grid; grid-template-columns: minmax(200px,.8fr) minmax(0,1.2fr); align-items: start; gap: 14px; margin: 12px 0 18px; }
.face-drawing-wrap { display: grid; justify-items: center; gap: 8px; border: 1px solid #e6eeeb; border-radius: 12px; padding: 12px; background: linear-gradient(160deg,#fbfdfc,#f4f8f6); }
.face-map { display: block; width: min(100%,270px); height: auto; overflow: visible; }
.mannequin-head,.mannequin-shoulders { fill: #fff9f3; stroke: #bdaea1; stroke-width: 1.25; pointer-events: none; }
.mannequin-shoulders { fill: #f5e9df; }
.face-region { fill: #e7f0ed; fill-opacity: .72; stroke: #a4aaa0; stroke-width: .85; cursor: pointer; transition: fill .15s,fill-opacity .15s,stroke .15s; }
.region-forehead { fill: #f2d9c8; }
.region-eyes,.region-glabella { fill: #dce5f1; }
.region-nose { fill: #edd9d4; }
.region-cheek { fill: #f1d0ca; }
.region-mouth { fill: #e9bbc0; }
.region-chin { fill: #dfebdc; }
.region-jaw { fill: #e9e2cb; }
.region-atm { fill: #ddd9ed; }
.region-neck { fill: #d9e8e4; }
.region-ear { fill: #edd6c9; }
.face-region:hover,.face-region:focus { fill: #9dcfc0; fill-opacity: .75; stroke: #347e6e; stroke-width: 1.5; outline: none; }
.face-region.pending { fill: #f0bf7a; fill-opacity: .9; stroke: #bc873d; }
.face-region.completed { fill: #8bc6b4; fill-opacity: .9; stroke: #4a927e; }
.face-region.pending.completed { fill: #c1ceb0; }
.face-features { pointer-events: none; }
.face-features path { fill: none; stroke: #8c786b; stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.face-features .mannequin-outline { stroke: #bdaea1; stroke-width: 1.25; }
.face-features .face-hair { fill: #69564c; stroke: #58473f; opacity: 1; }
.face-features .face-eye { fill: #fff; stroke: #8c786b; opacity: 1; }
.face-features .face-iris { fill: #716b62; stroke: #4e4942; }
.face-features .face-lip { fill: #d59991; stroke: #a66e68; opacity: .95; }
.face-map-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; color: #788984; font-size: 8px; }
.face-map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.face-map-legend .legend-mark { display: inline-block; }
.face-clinic-details { min-width: 0; }
.face-category-list { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.face-category-chip { border: 1px solid #e3ebe8; border-radius: 14px; padding: 5px 8px; color: #657a75; background: #f8fbfa; font-size: 8px; }
.face-record-list { border: 1px solid #e8efed; border-radius: 9px; padding: 0 10px; }
.face-record-list .timeline-item:first-child { border-top: 0; }
.tooth-history-modal { width: min(660px,100%); }
.tooth-history-records { display: grid; gap: 8px; max-height: 55vh; overflow-y: auto; }
.tooth-history-card { padding: 10px 12px; border: 1px solid #e8efed; border-radius: 8px; background: #fcfdfd; }
.tooth-history-card-head,.prosthesis-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tooth-history-card-head strong { color: #435f58; font-size: 10px; }
.tooth-history-card p,.tooth-history-card small { display: block; margin: 5px 0 0; color: #82928d; font-size: 8px; line-height: 1.5; }
.tooth-history-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 8px; }
.clinic-admin-grid { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.3fr); gap: 14px; align-items: start; }
.clinic-admin-grid > .panel { min-width: 0; }
.clinic-choice { width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px; border: 1px solid transparent; border-bottom-color: #edf1ef; background: #fff; color: #526a64; text-align: left; }
.clinic-choice.active,.clinic-choice:hover { border-color: #b8d5cc; border-radius: 8px; background: #f3f8f6; }
.clinic-choice > span:nth-child(2) { flex: 1; display: grid; gap: 3px; }
.clinic-choice strong,.staff-row strong { color: #49645d; font-size: 9px; }
.clinic-choice small,.staff-row small { display: block; color: #91a09c; font-size: 8px; }
.clinic-choice-avatar { width: 30px; height: 30px; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background: #e5f1ed; color: var(--green); font-size: 9px; font-weight: 700; }
.clinic-choice-avatar img,.clinic-avatar img { width: 100%; height: 100%; object-fit: contain; }
.clinic-selection-list { display: grid; gap: 8px; }
.clinic-selection-row { display: flex; align-items: center; gap: 8px; }
.clinic-selection-row .clinic-choice { flex: 1; min-width: 0; }
.clinic-selection-row .clinic-choice strong { font-size: 13px; }
.clinic-selection-row .clinic-choice small { font-size: 11px; }
.clinic-settings-button { flex: 0 0 auto; font-size: 18px; }
.clinic-create-button { justify-self: start; margin-top: 10px; }
.clinic-settings-tabs { overflow-x: auto; }
.clinic-settings-tabs .tab-button { font-size: 12px; }
.clinic-admin-grid > [data-settings-panel] { grid-column: 1 / -1; display: grid; gap: 16px; }
.clinic-admin-grid > [data-settings-panel][hidden] { display: none; }
.clinic-form-grid { gap: 9px 12px; }
.clinic-form-grid > .full { grid-column: 1 / -1; }
.clinic-form-grid .field { min-width: 0; align-self: start; }
.clinic-form-grid label { min-height: 20px; }
.clinic-form-section { min-width: 0; margin: 0; padding: 16px; border: 1px solid #e0ece6; border-radius: 12px; }
.clinic-form-section legend { padding: 0 7px; color: #365e51; font-size: 12px; font-weight: 600; }
.clinic-identity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin-bottom: 16px; }
.cnpj-input-group { display: flex; gap: 8px; align-items: stretch; }
.cnpj-input-group input { flex: 1; min-width: 0; }
.cnpj-search-button { flex: 0 0 38px; padding: 0; }
.clinic-contact-brand-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.clinic-contact-grid { display: grid; gap: 14px; }
.clinic-logo-controls { display: grid; gap: 8px; min-width: 0; }
.clinic-logo-controls small { line-height: 1.5; }
.consultation-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: #285d50; background: #edf6f2; border: 1px solid #bed9cf; font-weight: 600; cursor: pointer; }
.registration-row { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(100px, 1fr) 90px auto; align-items: end; gap: 10px; padding: 12px; margin-top: 8px; background: #f5f9f7; border: 1px solid #e0ece6; border-radius: 10px; }
.access-profile-options { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px; border: 1px solid #dce9e3; border-radius: 10px; }
.access-profile-options label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.access-profile-options input { width: auto; accent-color: #397961; }
.profile-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.profile-badges span { flex: 0 0 auto; width: fit-content; border-radius: 8px; padding: 3px 6px; background: #edf6f2; color: #285d50; font-size: 9px; line-height: 1.2; font-weight: 500; }
.table-action:disabled { opacity: .45; cursor: not-allowed; }
.registration-actions { display: flex; align-items: center; gap: 6px; }
.professional-address { margin: 0; padding: 14px; border: 1px solid #dce9e3; border-radius: 10px; min-width: 0; }
.form-grid > .professional-address, .form-grid > .professional-hours { grid-column: 1 / -1; width: 100%; }
.professional-address legend { color: #49645d; font-size: 11px; padding: 0 6px; }
.modal.professional-modal { width: min(760px, 100%); }
.professional-modal .field { min-width: 0; }
.professional-modal .form-grid > .full { grid-column: 1 / -1; }
.hr-record-row { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 10px 0; }
.hr-record-row label { display: grid; gap: 5px; flex: 1 1 120px; color: #637774; font-size: 11px; }
.hr-record-row input, .hr-record-row select { width: 100%; padding: 8px; border: 1px solid #e3ebe8; border-radius: 7px; color: #526764; background: white; }
.hr-vacation { border: 1px solid var(--line); border-radius: 8px; margin: 12px 0; padding: 12px; }
.professional-modal #automaticProfessionalTitle { color: #397961; font-weight: 600; }
.specialty-dropdown { border: 1px solid #dce9e3; border-radius: 8px; padding: 10px; }
.specialty-dropdown summary { cursor: pointer; color: #49645d; font-size: 11px; }
.specialty-options { max-height: 260px; overflow-y: auto; margin-top: 8px; }
.specialty-options fieldset { border: 0; padding: 6px 0; margin: 0; min-width: 0; }
.specialty-options legend { font-size: 11px; font-weight: 600; }
.specialty-options label { display: flex; align-items: center; gap: 7px; padding: 5px; font-weight: 400; }
.specialty-options input { width: auto; accent-color: #397961; }
.field { position: relative; align-content: start; }
.field-validation-error { display: none; position: absolute; z-index: 20; left: 0; top: 100%; max-width: 280px; width: max-content; padding: 7px 9px; border: 1px solid #e3b7b1; border-radius: 7px; background: #fff5f3; box-shadow: 0 3px 10px #18333022; color: #a73932; font-size: 11px; line-height: 1.4; }
.field:hover .field-validation-error:not([hidden]), .field:focus-within .field-validation-error:not([hidden]) { display: block; }
.professional-hours { min-width: 0; margin: 0; padding: 14px; border: 1px solid #dce9e3; border-radius: 10px; }
.schedule-day { display: grid; grid-template-columns: 110px minmax(0,1fr); align-items: start; gap: 10px; padding: 10px 0; border-bottom: 1px solid #eef2f0; font-size: 11px; }
.schedule-day > .button { grid-column: 2; justify-self: start; }
.schedule-interval { display: grid; grid-template-columns: minmax(128px,1fr) minmax(128px,1fr) auto; align-items: end; gap: 8px; margin-bottom: 8px; min-width: 0; }
.schedule-time-field { display: grid; gap: 4px; min-width: 0; }
.schedule-interval .schedule-time-field select, .field select[data-time-picker] { width: 100%; min-width: 128px; min-height: 44px; padding: 8px; font-size: 16px; font-variant-numeric: tabular-nums; }
.schedule-exception { display: grid; gap: 8px; margin: 10px 0; padding: 10px; border: 1px solid #dce9e3; border-radius: 8px; font-size: 11px; }
.schedule-holiday-toggle { display: flex; align-items: center; gap: 8px; margin: 14px 0; font-size: 11px; }
.schedule-holiday-toggle input { width: auto; }
@media (max-width: 600px) { .schedule-day { grid-template-columns: minmax(0,1fr); } .schedule-day > .button { grid-column: 1; } }
@media (max-width: 480px) { .schedule-interval { grid-template-columns: minmax(0,1fr); } .schedule-interval > .table-action { justify-self: start; } }
.calendar-notes { margin: 16px 0; padding: 12px; border: 1px solid #e6c49e; border-radius: 8px; background: #fff8ed; font-size: 11px; line-height: 1.5; }
.calendar-notes ul { padding-left: 17px; margin: 7px 0 0; }
.calendar-conflict { outline: 1px solid #c57d45; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: #c66b63; background: #fffafa; }
.clinic-logo-preview { display: grid; place-items: center; min-height: 90px; width: 160px; border: 1px dashed #bdcec5; border-radius: 12px; background: #f7faf8; }
.clinic-logo-upload { position: relative; }
.clinic-logo-upload input[type="file"] { left: 0; top: 0; width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; }
.clinic-logo-upload input[type="file"]:focus + label { outline: 2px solid #397961; outline-offset: 2px; }
.logo-crop-editor { display: grid; gap: 10px; max-width: 350px; }
.logo-crop-editor canvas { width: 256px; max-width: 100%; border: 1px solid #cbdcd4; background: repeating-conic-gradient(#e9eee9 0% 25%, white 0% 50%) 0 / 16px 16px; }
.logo-crop-editor label { display: grid; gap: 5px; }
.cloud-invite-row { padding: 14px; margin-bottom: 10px; gap: 12px; background: #f7faf8; border: 1px solid #dce9e3; border-radius: 12px; flex-wrap: wrap; }
.cloud-invite-row > span { display: grid; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.cloud-invite-row .status { width: fit-content; }
.clinic-registration-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr); gap: 12px; }
.clinic-registration-grid .field { display: flex; flex-direction: column; }
.clinic-registration-grid label { min-height: 20px; display: flex; align-items: center; gap: 6px; }
.clinic-registration-grid .button { margin-top: auto; text-align: center; }
.clinic-address-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 12px; }
.clinic-address-grid .address-cep { grid-column: span 3; }
.clinic-address-grid .address-street { grid-column: span 7; }
.clinic-address-grid .address-number { grid-column: span 2; }
.clinic-address-grid .address-complement, .clinic-address-grid .address-neighborhood { grid-column: span 3; }
.clinic-address-grid .address-city { grid-column: span 4; }
.clinic-address-grid .address-state { grid-column: span 2; }
.help-bubble { position: relative; display: inline-flex; color: #728b83; cursor: help; font-size: 13px; }
.help-bubble [role="tooltip"] { display: none; position: absolute; z-index: 30; top: 24px; left: 0; width: min(280px, 70vw); padding: 12px; border-radius: 8px; background: #244a40; color: white; font-size: 12px; font-weight: normal; line-height: 1.5; box-shadow: 0 4px 14px #18333033; }
.help-bubble:hover [role="tooltip"],.help-bubble:focus [role="tooltip"] { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.sync-recovery { position: fixed; z-index: 100; bottom: 18px; left: 270px; right: 18px; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; background: #fff4e5; border: 1px solid #e7b566; border-radius: 10px; padding: 16px; }
.sync-recovery[hidden] { display: none; }
.sync-recovery strong { flex: 1; }
.audit-list small { display: block; color: #71837e; }
@media (max-width: 760px) {
  .registration-row { grid-template-columns: 1fr 1fr; }
  .clinic-identity-grid,.clinic-registration-grid,.clinic-address-grid,.clinic-contact-brand-grid { grid-template-columns: 1fr; }
  .clinic-address-grid .field { grid-column: auto; }
  .sync-recovery { left: 12px; right: 12px; }
}
.clinic-logo-upload { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; color: #71837e; font-size: 11px; }
.clinic-logo-upload .logo-crop-editor { grid-column: 1 / -1; }
.clinic-logo-upload img { max-width: 130px; max-height: 70px; object-fit: contain; }
@media (max-width: 1000px) {
  .clinic-logo-upload { grid-template-columns: 1fr; }
}
.staff-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto auto; align-items: center; gap: 9px; padding: 10px 0; border-top: 1px solid #edf1ef; }
.staff-row > span { display: grid; gap: 4px; }
.clinic-admin-grid + .alert-banner { margin-top: 14px; }
.prosthesis-card { margin: 9px 0; padding: 12px; border: 1px solid #e6eeeb; border-radius: 9px; background: #fff; }
.prosthesis-card-head strong { color: #49645d; font-size: 10px; }
.prosthesis-meta { display: flex; flex-wrap: wrap; gap: 6px 13px; margin: 9px 0; color: #84938f; font-size: 8px; }
.prosthesis-card p { color: #71837e; font-size: 9px; line-height: 1.5; }
.image-purpose-options { display: grid; gap: 4px; padding: 8px 11px; border: 1px solid #e7efec; border-radius: 8px; }
.image-purpose-options .consent-check { margin: 7px 0; }
.tooth-history-modal .view-only-notice { margin-top: 10px; }
@media (max-width: 760px) {
  .sidebar { position: fixed; z-index: 10; inset: 0 auto 0 0; width: 250px; transform: translateX(-101%); transition: transform .2s; box-shadow: 10px 0 25px #1833301a; }
  .sidebar.open { transform: translateX(0); }
  .topbar { height: 62px; padding: 0 15px; gap: 12px; }
  .mobile-menu { display: block; border: 0; background: transparent; color: #54706b; font-size: 18px; }
  .breadcrumbs { margin-right: auto; }
  .topbar-actions { gap: 8px; }
  .search-box { width: 34px; border: 0; padding: 0 5px; }
  .search-box input { display: none; }
  .search-box span { font-size: 23px; }
  .help-link,.topbar-divider { display: none; }
  .page-content { padding: 22px 15px 35px; }
  h1 { font-size: 21px; }
  .page-heading { align-items: flex-start; }
  .heading-actions { flex-wrap: wrap; justify-content: flex-end; }
  .dashboard-grid,.two-column { grid-template-columns: 1fr; }
  .metric-grid { gap: 9px; }
  .metric-card { padding: 13px; min-height: 103px; }
  .metric-card strong { font-size: 20px; }
}
@media (max-width: 480px) {
  .breadcrumbs { font-size: 10px; gap: 6px; }
  .page-heading { display: grid; }
  .heading-actions { justify-content: flex-start; }
  .metric-top { font-size: 9px; }
  .metric-icon { width: 25px; height: 25px; }
  .panel { padding: 14px; }
  .appointment-row { grid-template-columns: 46px 3px minmax(0,1fr); gap: 8px; }
  .appointment-row .status { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .calendar-toolbar { flex-wrap: wrap; }
  .anatomical-row { display: grid; grid-template-columns: 1fr; }
  .anatomical-quadrant { grid-template-columns: repeat(8,minmax(0,1fr)); }
  .quadrant-label { display: block; grid-column: 1 / -1; padding: 2px 4px; color: #93a09c; font-size: 7px; text-transform: uppercase; }
  .anatomical-tooth-card { height: 68px; }
  .anatomical-tooth { width: min(100%,42px); height: 56px; }
  .tooth-not-erupted { height: 68px; }
}

[hidden] { display: none !important; }
.event-open { border: 0; background: transparent; padding: 0; text-align: left; min-width: 0; flex: 1; }
.event-open strong { display: block; color: #506562; font-size: 10px; }
.event-open small { display: block; color: #899a97; font-size: 9px; margin-top: 4px; }
.event-actions { display: flex; align-items: center; gap: 7px; }
.status-select { max-width: 124px; border: 1px solid #e3ebe8; border-radius: 6px; background: #fff; padding: 5px 6px; color: #5c716e; font-size: 9px; }
.week-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 8px; }
.week-day { display: grid; gap: 6px; text-align: center; border: 1px solid #e8efed; border-radius: 8px; background: #fff; padding: 11px 5px; color: #5d7470; }
.week-day small { font-size: 9px; color: #93a19f; text-transform: capitalize; }
.idoc-thumb-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; max-width: 100%; box-sizing: border-box; }
.status-card, .status-card > span { min-width: 0; max-width: 100%; overflow: hidden; box-sizing: border-box; }
.idoc-hybrid-panel, .idoc-hybrid-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.idoc-hybrid-modal { width: min(520px, 94vw); }
.idoc-hybrid-patient { font-size: 16px; font-weight: 600; color: #244a40; margin: 4px 0 12px; }
.idoc-hybrid-progress { display: grid; gap: 8px; padding: 14px; border: 1px solid #dce9e3; border-radius: 10px; background: #f7faf8; margin-bottom: 12px; }
.idoc-hybrid-progress-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: #36574e; }
.idoc-hybrid-progress progress { width: 100%; height: 10px; accent-color: #397961; border-radius: 999px; }
.idoc-thumb-btn { padding: 0; border: 1px solid #d7e4df; border-radius: 8px; background: #f4f8f6; width: 72px; height: 72px; overflow: hidden; cursor: pointer; flex: 0 0 auto; }
.idoc-thumb-btn:hover { border-color: #397961; }
.idoc-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.idoc-thumb-error { opacity: .45; }
.idoc-viewer { width: min(920px, 96vw); }
.idoc-carousel { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; margin: 8px 0; }
.idoc-preview-canvas { display: flex; align-items: center; justify-content: center; min-height: 260px; max-height: 62vh; overflow: auto; background: #141d1b; border-radius: 10px; touch-action: pan-y; }
.idoc-preview-canvas img { max-width: 100%; max-height: 60vh; object-fit: contain; display: block; }
.idoc-preview-canvas img.idoc-image-original { max-width: none; max-height: none; }
.idoc-nav { width: 38px; height: 52px; border: 1px solid #d7e4df; border-radius: 8px; background: #fff; color: #244a40; font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.idoc-nav:disabled { opacity: .35; cursor: default; }
.idoc-viewer-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 8px 2px 4px; -webkit-overflow-scrolling: touch; }
.idoc-viewer-thumb { flex: 0 0 auto; width: 58px; height: 58px; padding: 0; border: 2px solid transparent; border-radius: 8px; background: #f4f8f6; overflow: hidden; cursor: pointer; }
.idoc-viewer-thumb.active { border-color: #397961; }
.idoc-viewer-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 600px) {
  .idoc-carousel { grid-template-columns: minmax(0, 1fr); }
  .idoc-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 34px; height: 44px; background: rgba(255,255,255,.88); }
  .idoc-nav-prev { left: 6px; }
  .idoc-nav-next { right: 6px; }
  .idoc-thumb-btn { width: 64px; height: 64px; }
}
.week-day strong { font: 700 16px Manrope,sans-serif; }
.week-day span { font-size: 8px; }
.procedure-markers { display: flex; align-items: center; justify-content: center; gap: 3px; min-height: 5px; }
.procedure-markers b { width: 10px; height: 4px; border-radius: 3px; background: var(--procedure-color); }
.procedure-markers small { color: #71817e; font-size: 7px; }
.week-day.active { border-color: #157b70; box-shadow: inset 0 0 0 1px #157b70; color: #155e54; }
.week-day.occupancy-empty { background: #fff; }
.week-day.occupancy-light { background: #eff8f5; }
.week-day.occupancy-medium { background: #e2f1e9; }
.week-day.occupancy-high { background: #f9e9e2; }
.calendar-overview { margin-bottom: 15px; }
.month-weekdays,.month-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); }
.month-weekdays span { padding: 0 0 8px; text-align: center; color: #98a6a4; font-size: 9px; }
.month-day { position: relative; min-height: 48px; border: 1px solid #edf1ef; background: #fff; color: #607573; text-align: left; padding: 6px; font-size: 10px; }
.month-day .procedure-markers { position: absolute; left: 5px; bottom: 6px; justify-content: flex-start; max-width: 62%; }
.month-day .procedure-markers b { width: 7px; height: 4px; }
.month-day:hover { border-color: #9cc9be; }
.month-day.active { border-color: #157b70; box-shadow: inset 0 0 0 1px #157b70; color: #155e54; }
.month-day.occupancy-empty { background: #fff; }
.month-day.occupancy-light { background: #eff8f5; }
.month-day.occupancy-medium { background: #e2f1e9; }
.month-day.occupancy-high { background: #f9e9e2; }
.month-day.outside { color: #c1ccca; }
.month-day i { position: absolute; right: 6px; bottom: 5px; border-radius: 10px; background: #d7eee8; color: #267c6d; font-size: 8px; font-style: normal; padding: 2px 5px; }
.calendar-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 13px; margin-top: 12px; color: #758681; font-size: 8px; }
.calendar-legend > span { display: inline-flex; align-items: center; gap: 4px; }
.calendar-legend-title { color: #516863; font-weight: 700; }
.calendar-legend i { width: 9px; height: 9px; border: 1px solid #dfe9e5; border-radius: 3px; background: #fff; }
.calendar-legend i.occupancy-light { background: #eff8f5; }
.calendar-legend i.occupancy-medium { background: #e2f1e9; }
.calendar-legend i.occupancy-high { background: #f9e9e2; }
.calendar-legend i.procedure-legend-dot { border: 0; border-radius: 50%; background: var(--procedure-color); }
.day-calendar-scroll { overflow: auto; max-height: 68vh; border: 1px solid #edf1ef; border-radius: 8px; }
.day-calendar-grid { display: grid; min-width: max-content; position: relative; }
.day-calendar-heading { position: sticky; top: 0; z-index: 4; display: grid; place-items: center; padding: 5px; overflow: hidden; background: #f7faf9; border-bottom: 1px solid #e8efed; border-right: 2px solid #bdcec6; color: #627772; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.day-calendar-time { position: sticky; left: 0; z-index: 2; display: flex; justify-content: center; align-items: flex-start; background: #fff; border-right: 1px solid #edf1ef; color: #627772; font-size: 9px; }
.day-calendar-time > span { transform: translateY(-50%); background: white; padding: 0 3px; line-height: 12px; }
.day-calendar-slot { z-index: 0; width: 100%; height: 100%; border: 0; border-top: 1px solid transparent; border-right: 2px solid #bdcec6; background: transparent; padding: 0; }
.day-calendar-slot.half-hour { border-top-color: #edf0ee; }
.day-calendar-slot.whole-hour { border-top-color: #dbe3df; }
.calendar-selection { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; padding: 14px; margin-bottom: 12px; font-size: 11px; }
.calendar-selection label { display: flex; align-items: center; gap: 7px; }
.calendar-selection input { accent-color: #2c8061; }
.calendar-holiday { display: block; line-height: 1.3; color: #765541; font-size: 9px; font-weight: 600; white-space: normal; }
.week-day.calendar-unavailable, .month-day.calendar-unavailable, .day-calendar-slot.calendar-unavailable, .calendar-legend i.calendar-unavailable { background: #e7eae8; color: #747d77; }
.day-calendar-block { position: relative; z-index: 2; min-width: 0; min-height: 0; cursor: grab; touch-action: none; overflow: hidden; background: repeating-linear-gradient(135deg,#d3dbd6,#d3dbd6 5px,#e1e6e3 5px,#e1e6e3 10px); border-left: 3px solid #87968d; padding: 1px 3px; color: #34473c; font-size: 9px; }
.day-calendar-slot:not(:disabled):hover { background: #eaf5f2; }
.day-calendar-slot:disabled { cursor: default; }
.day-calendar-event { z-index: 3; position: relative; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow: hidden; margin: 2px; border-left: 3px solid var(--procedure-color); border-top: 1px solid white; border-bottom: 1px solid white; border-radius: 4px; background: color-mix(in srgb, var(--procedure-color) 13%, white); padding: 3px 4px; }
.day-calendar-event .event-open { width: 100%; min-height: 0; text-align: left; overflow: hidden; display: grid; grid-template-columns: 12px minmax(0,1fr); align-items: center; gap: 2px 4px; cursor: grab; touch-action: none; }
.calendar-event-label { display: block; min-width: 0; overflow: hidden; color: #344f46; font-size: 10px; line-height: 12px; white-space: nowrap; }
.calendar-event-label strong { display: block; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.calendar-event-hours { display: block; overflow: hidden; text-overflow: ellipsis; font-size: 9px; font-weight: 400; }
.patient-upcoming { margin-top: 19px; }
.calendar-context-menu { position: fixed; z-index: 30; min-width: 220px; max-width: calc(100vw - 16px); padding: 4px 0; background: white; border: 1px solid #dadce0; border-radius: 4px; box-shadow: 0 2px 6px #0003, 0 8px 24px #0002; font: 400 13px/20px Arial,sans-serif; color: #303134; }
.calendar-context-menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 16px; border: 0; background: transparent; color: inherit; text-align: left; border-radius: 0; }
.calendar-context-menu button > span { flex: 0 0 18px; color: #5f6368; font-size: 16px; text-align: center; }
.calendar-context-menu button:hover, .calendar-context-menu button:focus-visible { background: #f1f3f4; outline: none; }
.calendar-menu-divider { height: 1px; background: #e8eaed; margin: 4px 0; }
.day-calendar-event .event-open small { grid-column: 2; overflow: hidden; color: #687c77; font-size: 8px; line-height: 10px; text-overflow: ellipsis; white-space: nowrap; }
.day-calendar-event .status-select { position: absolute; top: 4px; right: 3px; z-index: 2; width: min(110px, calc(100% - 12px)); max-width: 100%; min-height: 0; border: 1px solid #bdcec6; border-radius: 3px; background: #f7faf9; padding: 1px; font-size: 9px; opacity: 0; pointer-events: none; }
.day-calendar-event:hover .status-select, .day-calendar-event:focus-within .status-select { opacity: 1; pointer-events: auto; }
.calendar-event-compact { padding: 0 3px; margin-top: 0; margin-bottom: 0; }
.calendar-event-compact .calendar-event-label { line-height: 10px; }
.calendar-event-compact .calendar-event-hours { line-height: 10px; }
.day-calendar-event:has(.calendar-event-hours.short) .calendar-event-label { display: flex; align-items: baseline; }
.day-calendar-event:has(.calendar-event-hours.short) .calendar-event-label strong { flex: 1; min-width: 0; }
.calendar-event-hours.short { flex: 0 0 auto; }
.calendar-event-hours.short::before { content: ", "; }
.calendar-event-hours.short .calendar-event-end { display: none; }
.calendar-event-compact .event-open small { display: none; }
.calendar-event-compact .status-select { top: 0; right: 0; height: 12px; padding: 0; font-size: 8px; }
.calendar-event-compact:hover .status-select, .calendar-event-compact:focus-within .status-select { opacity: 1; }
.calendar-event-completed .calendar-event-label { text-decoration: line-through; }
.calendar-status { display: inline-flex; width: 12px; height: 12px; align-items: center; justify-content: center; color: #607b70; }
.calendar-status svg { width: 100%; height: 100%; }
.calendar-status.confirmed { color: #2f8c6c; }
.calendar-status.waiting { color: #986520; }
.calendar-status.in-progress { color: #5266a4; }
.calendar-status.cancelled, .calendar-status.missed { color: #ad514b; }
.calendar-event-compact .calendar-status { width: 10px; height: 10px; }
.calendar-resize { position: absolute; left: 0; right: 0; height: 4px; z-index: 3; cursor: ns-resize; touch-action: none; }
.calendar-resize.start { top: 0; }
.calendar-resize.end { bottom: 0; }
.calendar-resize:hover { background: #47746088; }
.day-calendar-event { min-height: 0; touch-action: none; }
.calendar-overview-events { display: flex; flex-direction: column; gap: 3px; width: 100%; max-height: 120px; overflow-y: auto; margin: 4px 0 12px; }
.calendar-overview-event { display: block; min-width: 0; padding: 4px; border-left: 3px solid var(--procedure-color, #87968d); border-radius: 3px; background: #fff; color: #344f46; font-size: 9px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: grab; touch-action: none; }
.calendar-overview-block { background: #d3dbd6; }
.calendar-dragging { z-index: 6; opacity: .85; box-shadow: 0 2px 12px #21473255; pointer-events: none; }
.calendar-overview .calendar-dragging { opacity: .3; box-shadow: none; }
.calendar-drag-ghost { position: fixed !important; z-index: 10000; margin: 0 !important; box-sizing: border-box; pointer-events: none !important; opacity: .95; box-shadow: 0 5px 18px #21473266; transform: none !important; }
.calendar-drop-target { outline: 2px solid #157b70; outline-offset: -2px; background: #d7eee8 !important; }
.calendar-invalid-drop, .calendar-invalid-drop * { cursor: not-allowed !important; }
.calendar-drag-invalid { outline: 2px solid #ad514b; }
.calendar-drag-invalid::after { content: "\2298"; position: absolute; right: 0; top: 0; color: #b42318; background: white; border-radius: 50%; font-size: 20px; line-height: 22px; }
.calendar-range-preview { z-index: 5; pointer-events: none; background: #157b7033; border: 1px solid #157b70; color: #155e54; font-size: 10px; overflow: hidden; min-height: 0; }
.calendar-work-range { position: relative; z-index: 4; min-height: 0; pointer-events: none; }
.calendar-work-handle { pointer-events: auto; height: 6px; background: #87968d77; }
.calendar-work-handle:hover { background: #157b70; }
.day-calendar-slot { touch-action: none; }
.calendar-drag-ghost { overflow: visible; }
.modal.appointment-modal { width: min(480px, 100%); }
.appointment-backdrop { background: transparent; pointer-events: none; align-items: flex-start; justify-content: flex-end; padding: 90px 20px 16px; }
.appointment-backdrop .modal { pointer-events: auto; box-shadow: 0 10px 40px #18392b44; max-height: calc(100dvh - 32px); margin: 0; }
.movable-appointment .modal-head { cursor: move; touch-action: none; }
.movable-appointment .modal-head button { cursor: pointer; }
.patient-clinical-sidebar { display: grid; gap: 16px; align-content: start; }
.patient-clinical-sidebar .assessment-actions { flex-wrap: wrap; }
.patient-clinical-sidebar .assessment-heading { align-items: flex-start; }
.patient-clinical-sidebar .modal-actions { flex-wrap: wrap; }
.patient-clinical-sidebar .panel { min-width: 0; }
.assessment-procedure-summary { padding: 12px; background: #f5f9f7; border-radius: 8px; margin-top: 12px; font-size: 12px; }
.patient-intake-modal { width: min(900px, 100%); }
.patient-intake-modal #modalForm > .form-grid { display: block; }
#secureIntakeForm .field small, .patient-intake-modal .field small { min-height: 16px; display: block; font-size: 11px; color: #a04635; }
#secureIntakeForm [data-health-detail], .patient-intake-modal [data-health-detail] { grid-column: 1 / -1; }
#secureIntakeForm [data-health-detail] input, .patient-intake-modal [data-health-detail] input { display: block; width: 100%; padding: 9px; border: 1px solid #ceddd6; border-radius: 6px; }
.public-form-mode > .public-form-content { padding: 16px; }
.public-form-mode #intakeStatus { margin: 12px 0; }
.public-form-mode > .public-form-content { max-width: 680px; padding: 24px 18px 40px; }
.public-form-mode { background: #edf4f2; }
.public-form-content > header h1 { color: #203e43; font-size: 26px; letter-spacing: -.04em; }
#secureIntakeForm { color: #29484c; }
.intake-progress { position: sticky; top: 0; z-index: 2; padding: 16px 0; background: #edf4f2; }
.intake-progress-text { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.intake-progress-track { height: 7px; border-radius: 20px; overflow: hidden; background: #d4e3df; }
.intake-progress-track > div { height: 100%; background: #308978; border-radius: inherit; transition: width .2s; }
.intake-step { padding: 24px; background: white; border: 1px solid #dce8e4; border-radius: 20px; box-shadow: 0 8px 24px #25463c08; }
.intake-step h2 { font-size: 21px; margin: 0 0 10px; line-height: 1.3; }
.intake-step-intro { margin: 0 0 24px; font-size: 14px; line-height: 1.6; color: #667f7b; }
#secureIntakeForm .field { gap: 7px; min-width: 0; }
#secureIntakeForm .field label { font-size: 13px; line-height: 1.4; }
#secureIntakeForm input:not([type=radio]):not([type=checkbox]):not([type=file]), #secureIntakeForm select, #secureIntakeForm textarea { min-height: 48px; border-radius: 10px; padding: 12px; font-size: 16px; width: 100%; min-width: 0; border: 1px solid #cfdfd9; }
#secureIntakeForm textarea { min-height: 100px; }
#secureIntakeForm [data-field-error] { color: #a43c38; font-size: 12px; line-height: 1.4; }
#secureIntakeForm .button { min-height: 46px; font-size: 14px; border-radius: 10px; padding: 12px 18px; }
#secureIntakeForm .anamnesis-question { grid-template-columns: 1fr; gap: 12px; padding: 18px 0; }
#secureIntakeForm .question-label { font-size: 15px; line-height: 1.5; }
#secureIntakeForm .yes-no-options { gap: 12px; }
#secureIntakeForm .yes-no-option { padding: 12px 22px; min-height: 46px; font-size: 15px; border-radius: 10px; justify-content: center; flex: 1; }
#secureIntakeForm .question-detail { font-size: 13px; }
.intake-payer-choices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-bottom: 24px; }
.intake-payer-choices button { min-height: 60px; padding: 10px 6px; border: 1px solid #d5e3de; border-radius: 12px; background: #f7faf9; color: #4e6863; font: inherit; font-size: 14px; cursor: pointer; }
.intake-payer-choices button.selected { border-color: #308978; background: #e8f6f1; color: #226f61; box-shadow: inset 0 0 0 1px #308978; }
.intake-payer-choices button:focus-visible { outline: 2px solid #308978; outline-offset: 2px; }
.intake-navigation { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 18px 0; }
.intake-navigation > .primary { margin-left: auto; }
.intake-next-hint { flex: 1; min-width: 160px; font-size: 13px; line-height: 1.5; color: #637e77; }
.intake-photo-placeholder { padding: 60px 12px; border: 2px dashed #c7dcd4; border-radius: 20px; text-align: center; background: #f3faf7; color: #79938a; }
.intake-photo-preview { display: block; max-width: 100%; max-height: 300px; margin: auto; border-radius: 14px; object-fit: contain; }
.intake-photo-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.intake-photo-actions label { cursor: pointer; }
.intake-photo-status,.intake-lookup-status,.intake-signature-status { font-size: 13px; line-height: 1.6; color: #637e77; }
.intake-step > label { display: flex; gap: 12px; margin: 18px 0; align-items: flex-start; font-size: 14px; line-height: 1.6; }
.intake-step > label input { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; accent-color: #308978; }
.intake-review { border-radius: 12px; padding: 12px 18px; background: #f1f7f4; overflow-wrap: anywhere; font-size: 14px; }
.intake-privacy-note { font-size: 13px; line-height: 1.7; color: #637e77; }
.intake-signature { display: block; width: 100%; height: 180px; border: 1px solid #b7cfc5; border-radius: 12px; background: #fafdfb; touch-action: none; }
.anamnesis-versions details { border: 1px solid #dce8e4; border-radius: 8px; padding: 12px; margin: 8px 0; }
.anamnesis-versions summary { cursor: pointer; font-weight: 600; }
.intake-signature-record { margin: 16px 0; padding: 12px; border: 1px solid #dce8e4; border-radius: 10px; }
.intake-signature-record figcaption { font-size: 11px; color: #637e77; }
.intake-signature-record svg { display: block; width: 100%; max-width: 420px; height: auto; }
.intake-brand { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 24px; color: #254f45; }
.intake-brand img { width: 72px; height: 72px; border-radius: 14px; object-fit: contain; background: #fff; }
.intake-brand strong { font-size: 22px; overflow-wrap: anywhere; }
.patient-intake-indicators { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
.intake-indicator { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; background: #f7faf9; border: 1px solid #dce8e4; border-radius: 12px; }
.intake-indicator > small { color: #637e77; font-size: 11px; }
.intake-indicator .status { font-size: 12px; white-space: normal; }
.intake-indicator .status.pending { color: #8a651b; background: #fff3c9; }
.quote-workflow-status { margin-top: 6px; max-width: 100%; white-space: normal; }
.quote-workflow-status.pending { color: #8a651b; background: #fff3c9; }
@media (max-width: 600px) {
  #secureIntakeForm .form-grid { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .intake-step { padding: 20px 16px; }
  .public-form-mode > .public-form-content { padding: 16px 12px 30px; }
}
.patient-personal-data .detail-grid { gap: 12px; }
.patient-personal-data .detail-item { padding: 12px; border: 1px solid #e5eee9; border-radius: 8px; background: #f9fcfa; }
.photo-section canvas { max-width: 100%; height: auto; touch-action: none; }
.patient-links-modal .status-card { align-items: flex-start; flex-wrap: wrap; gap: 10px; }
.patient-links-modal .history-actions { flex-wrap: wrap; }
.intake-comparison { overflow: auto; }
.intake-comparison table { width: 100%; border-collapse: collapse; font-size: 12px; }
.intake-comparison th, .intake-comparison td { padding: 10px; border-bottom: 1px solid #dce8e2; text-align: left; vertical-align: top; overflow-wrap: anywhere; white-space: pre-wrap; }
.intake-comparison tr.changed { background: #fff7dd; }
.assessment-new-action { margin-bottom: 12px; }
.assessment-service-row { display: grid; grid-template-columns: minmax(0,1fr) 100px 26px; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid #e3ebe8; }
.assessment-service-row small { display: block; color: #647970; margin-top: 4px; }
.assessment-service-row input { width: 100%; min-width: 0; border: 1px solid #d4e2db; border-radius: 6px; padding: 8px; text-align: right; }
.assessment-service-row > b { grid-column: 2 / -1; text-align: right; }
.assessment-service-total, .assessment-quote-terms > div:not(.history-actions) { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0; }
.assessment-quote-terms { border-top: 2px solid #cce1d7; margin-top: 12px; padding-top: 12px; }
.assessment-quote-terms .history-actions { flex-wrap: wrap; margin-top: 12px; }
.assessment-service-row, .assessment-quote-terms { overflow-wrap: anywhere; }
.procedure-catalogue { margin-top: 18px; }
.procedure-catalogue-list { max-height: 420px; overflow: auto; }
.procedure-catalogue .panel-head { flex-wrap: wrap; gap: 8px; }
.procedure-catalogue .filter-input { min-width: 0; width: 100%; max-width: 280px; }
.ortho-card-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 24px; }
.ortho-card-grid .ortho-visual-options { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 6px; margin-top: 8px; }
.ortho-card-grid .ortho-visual-option { min-width: 0; padding: 8px 4px; border-radius: 10px; background: #fff; box-shadow: 0 2px 5px #243a3012; }
.ortho-card-grid .ortho-visual-option.selected { background: #e4f0fa; border: 2px solid #5488b4; }
.ortho-card-grid svg { width: 68px; height: 76px; max-width: 100%; fill: #fff; stroke: #58646b; stroke-width: 1.3; }
.ortho-card-grid .ortho-hair { fill: #54453e; }
.ortho-card-grid .ortho-crowded { fill: #a9cdea; }
.ortho-visual-group { padding-bottom: 18px; border-bottom: 1px solid #dce7ec; }
.clinical-draft-indicator { margin-top: 10px; color: #965411; font-weight: 700; }
.clinical-draft-indicator[hidden] { display: none; }
.clinical-field-pending { outline: 2px solid #e6b459; outline-offset: 2px; }
.clinical-leave-dialog { position: sticky; bottom: 0; z-index: 2; padding: 18px; border: 2px solid #d7ad5e; border-radius: 12px; background: #fffaf0; box-shadow: 0 6px 24px #26332d30; }
.clinical-leave-dialog .button { margin: 4px; }
.face-region.selected { fill: #75b9dd; fill-opacity: .85; stroke: #23669a; stroke-width: 2; }
.preexisting-tooth-mark { fill: none; stroke: #6f65a3; stroke-width: 2.5; pointer-events: none; }
.legend-mark.preexisting { background: #a493ce; border: 1px solid #776aa3; }
.face-region.preexisting { fill: #c9c2df; fill-opacity: .9; stroke: #776aa3; stroke-width: 2; }
.anatomical-tooth-card.has-preexisting .tooth-number { color: #776aa3; }
.anatomical-tooth-card.has-preexisting .extraction-mark ellipse { fill: #e6dff4; stroke: #776aa3; }
.anatomical-tooth-card.has-preexisting .extraction-mark path { stroke: #776aa3; }
.tooth-whole-hit { fill: transparent; stroke: transparent; pointer-events: all; cursor: pointer; }
.anatomical-slot .anatomical-tooth .tooth-root,.anatomical-slot .anatomical-tooth .tooth-crown,.anatomical-slot .anatomical-tooth .prosthetic-crown,.anatomical-slot .anatomical-tooth .prosthetic-seam,.anatomical-slot .anatomical-tooth .implant-fixture,.anatomical-slot .anatomical-tooth .extraction-mark { pointer-events: none; }
.tooth-whole-hit:hover,.tooth-whole-hit:focus { fill: #9dcfc0; fill-opacity: .6; stroke: #347e6e; outline: none; }
.tooth-brackets { fill: #e3e7ec; stroke: #53687b; stroke-width: 1.6; pointer-events: none; }
.anatomical-tooth-card.multi-selected { background: #e4f0fa; outline: 1px solid #5488b4; border-radius: 4px; }
.clinical-selection-toolbar,.clinical-chart-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.clinical-selection-toolbar { padding: 12px; border: 1px solid #dce7ec; border-radius: 8px; background: #f7faf9; }
.clinical-selection-toolbar > strong { flex-basis: 100%; }
.clinical-selection-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#clinicalTeethSelection > .clinical-service-panel { margin: 12px 0; }
.clinical-chart-mode strong { flex: 1; font-size: 11px; }
.clinical-service-panels > .procedure-catalogue { grid-column: 1/-1; width: 100%; min-width: 0; }
.catalogue-pricing { padding: 12px; border: 1px solid #dce7ec; border-radius: 8px; }
.catalogue-pricing p { font-size: 11px; color: #71837e; }
.pricing-tier-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; align-items: end; gap: 8px; margin-bottom: 8px; }
.pricing-tier-row label { display: grid; gap: 4px; min-width: 0; font-size: 10px; }
.pricing-tier-row input { width: 100%; min-width: 0; border: 1px solid #dce7ec; border-radius: 6px; padding: 8px; }
@media (max-width: 480px) { .ortho-card-grid .ortho-visual-options { grid-template-columns: repeat(3,minmax(0,1fr)); } }
.ortho-card-grid .ortho-skin { fill: #f0cfb0; }
.ortho-card-grid .ortho-gum { fill: #e7a09e; }
.ortho-card-grid .ortho-guide { fill: none; stroke: #568aae; stroke-dasharray: 3 2; }
.ortho-not-assessed { display: block; padding: 22px 0; color: #8a9ca5; }
.ortho-measure { background: #f6fafc; padding: 12px; border: 1px solid #d7e4ed; border-radius: 10px; }
.ortho-measure > div { display: flex; align-items: center; gap: 8px; }
.ortho-measure input[type=number] { min-width: 0; width: 90px; padding: 8px; }
.ortho-measure input[type=range] { width: 100%; accent-color: #5488b4; }
.ortho-measure small { display: block; }
.catalogue-consent textarea { min-height: 100px; }
.card-settlement-group { border-top: 1px solid #dce8e2; padding: 14px 0; }
@media (max-width: 750px) { .ortho-card-grid { grid-template-columns: minmax(0,1fr); } }
.assessment-highlight { outline: 3px solid #c0dfd3; outline-offset: 3px; font-weight: 700; }
.assessment-exams, .clinical-section-notes, .diagnosis-suggestions { margin-top: 18px; padding-top: 14px; border-top: 1px solid #dce8e2; }
.assessment-exams .status-card { flex-wrap: wrap; gap: 8px; }
.assessment-exams .history-actions { flex-wrap: wrap; }
.clinical-section-notes textarea { width: 100%; min-height: 100px; margin: 8px 0; border: 1px solid #d0dfd6; border-radius: 8px; padding: 10px; }
.yes-no-option:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
@media (max-width: 600px) {
  .appointment-backdrop { padding: 60px 8px 8px; }
  .patient-intake-modal .form-grid, #secureIntakeForm .form-grid { grid-template-columns: minmax(0, 1fr); }
  .patient-intake-modal .anamnesis-question, #secureIntakeForm .anamnesis-question { grid-template-columns: minmax(0, 1fr); }
}
.appointment-editor { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; align-items: start; }
.appointment-month { padding: 12px; background: #f7faf9; border: 1px solid #e3ebe8; border-radius: 8px; }
.appointment-month-head { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; font-size: 11px; }
.appointment-month-head strong { flex: 1; text-transform: capitalize; }
.appointment-month-head button { width: 24px; height: 26px; border: 0; background: transparent; font-size: 20px; color: #516765; }
.appointment-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.appointment-month-grid > span { padding: 5px 0; font-size: 10px; color: #708582; }
.appointment-month-grid button { height: 26px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #344f46; font-size: 11px; }
.appointment-month-grid button.outside { color: #98a6a1; }
.appointment-month-grid button.today { box-shadow: inset 0 0 0 1px #2c8061; }
.appointment-month-grid button.selected { background: #2c8061; color: white; }
.appointment-month-grid button:hover { background: #dceee6; color: #244b3b; }
.appointment-month-grid button:focus-visible { outline: 2px solid #2c8061; outline-offset: 1px; }
.appointment-month-today { display: block; margin: 8px auto 0; border: 0; background: transparent; color: #285d50; font-size: 11px; padding: 4px 8px; }
@media (max-width: 600px) {
  .appointment-editor { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .appointment-month { width: min(260px, 100%); justify-self: center; }
}
.catalog-color-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--procedure-color); vertical-align: 1px; }
.face-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; margin: 10px 0; }
.face-area { min-height: 48px; border: 1px solid #e2ece9; border-radius: 8px; background: #f9fbfa; color: #5f7772; font-size: 10px; font-weight: 700; }
.face-area small { display: block; margin-top: 4px; color: #8d9d99; font-size: 8px; font-weight: 400; }
.face-area:hover,.face-area.has-record { border-color: #8dbfaf; background: #edf7f4; color: var(--green); }
.question-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin-top: 18px; }
.question-summary span { color: #637774; font-size: 9px; border-bottom: 1px solid #eef2f0; padding: 6px 0; }
.question-summary b { color: #20816e; margin-right: 5px; }
.upload-box { display: flex; align-items: center; justify-content: space-between; gap: 15px; border: 1px dashed #b6d2cb; background: #f8fbfa; border-radius: 9px; padding: 15px; }
.upload-box label { cursor: pointer; }
.upload-box label strong,.upload-box label small { display: block; }
.upload-box label strong { color: #47716a; font-size: 11px; }
.upload-box label small { color: #91a09c; font-size: 9px; margin-top: 4px; }
.upload-box input { max-width: 190px; color: #6a7f7b; font-size: 9px; }
.attachment-list { margin-top: 12px; }
.anamnesis-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.anamnesis-question { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; border-bottom: 1px solid #edf1ef; padding: 9px 0; }
.question-label { color: #526a66; font-size: 9px; }
.yes-no-options { display: flex; gap: 6px; }
.yes-no-option { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; border: 1px solid #e2eae7; border-radius: 20px; padding: 5px 9px; color: #738580; font-size: 9px; }
.yes-no-option input { position: absolute; opacity: 0; pointer-events: none; }
.radio-dot { width: 10px; height: 10px; border: 1px solid #afbfbb; border-radius: 50%; }
.yes-no-option.checked { border-color: #9cc9be; background: #edf7f4; color: #287c6c; }
.yes-no-option.checked .radio-dot { border: 3px solid #398e7b; background: #fff; }
.question-detail { grid-column: 1/-1; }
.question-detail label { display: block; color: #637774; font-size: 9px; margin-bottom: 4px; }
.question-detail input { width: 100%; border: 1px solid #e2eae7; border-radius: 6px; padding: 7px 8px; color: #5d716e; background: #fff; font-size: 10px; }
.privacy-copy { color: #7d8f8b; font-size: 10px; line-height: 1.65; }
.consent-check { display: flex; align-items: flex-start; gap: 9px; margin: 13px 0; color: #536966; font-size: 10px; line-height: 1.55; }
.consent-check input { flex: 0 0 auto; margin: 2px 0 0; accent-color: var(--green); }
.consent-check b { color: #a55f4f; font-weight: 600; }
.public-form-mode { background: #f5f8f7; }
.public-form-mode .app-shell { display: none; }
.public-form-shell { position: fixed; z-index: 40; inset: 0; overflow-y: auto; background: #f5f8f7; padding: 0 18px 35px; }
.public-form-header { height: 66px; max-width: 850px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.public-form-header .brand { padding: 0; }
.public-form-content { max-width: 850px; margin: 14px auto; }
.public-form-title { text-align: center; padding: 20px 10px 17px; }
.public-form-title .metric-icon { margin: 0 auto 13px; width: 42px; height: 42px; font-size: 20px; }
.public-form-title h1 { margin-bottom: 8px; }
.public-form-title p { max-width: 600px; margin: 0 auto; color: #869593; font-size: 11px; line-height: 1.6; }
.public-section { margin: 12px 0; padding: 19px; }
.public-section h2 { color: #304746; font: 700 13px Manrope,sans-serif; margin-bottom: 12px; }
.public-section .field textarea { min-height: 64px; }
.public-section .panel-head p { color: #91a09c; font-size: 9px; margin: -5px 0 0; }
.compact-grid { gap: 9px 13px; }
.compact-grid .field { gap: 4px; }
.compact-grid .field input,.compact-grid .field select { padding: 8px 9px; }
.identification-grid,.address-grid { align-items: start; }
.identification-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.address-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.field-span-two { grid-column: span 2; }
.field input[list] { min-width: 0; }
.field-hint { color: #91a09c; font-size: 8px; }
.field-hint.error { color: #b64d42; }
.photo-section { display: grid; grid-template-columns: minmax(0,1fr) 110px; align-items: center; gap: 15px; }
.photo-section .muted { line-height: 1.5; margin: -5px 0 10px; }
.upload-compact { display: inline-flex; border: 1px solid #dfeae6; border-radius: 7px; padding: 8px 10px; color: #47716a; cursor: pointer; font-size: 9px; }
.upload-compact input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.face-photo-preview { width: 104px; height: 104px; display: grid; place-items: center; overflow: hidden; border: 1px dashed #b6d2cb; border-radius: 50%; background: #f8fbfa; color: #91a09c; font-size: 9px; }
.face-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.face-crop-editor { grid-column: 1/-1; display: grid; grid-template-columns: 150px minmax(0,1fr); align-items: center; gap: 8px 14px; padding-top: 12px; border-top: 1px solid #edf1ef; }
.face-crop-editor canvas { grid-row: span 3; width: 150px; height: 150px; border-radius: 8px; background: #edf2f0; object-fit: contain; cursor: grab; touch-action: none; }
.face-crop-editor canvas:active { cursor: grabbing; }
.face-crop-editor label { color: #637774; font-size: 9px; }
.face-crop-editor input[type="range"] { width: 100%; accent-color: var(--green); }
.face-crop-editor .button { justify-self: start; }
.phone-row { display: grid; grid-template-columns: 130px minmax(0,1fr) 30px; align-items: center; gap: 9px; margin: 8px 0; }
.phone-row label { color: #637774; font-size: 9px; }
.phone-row input { min-width: 0; border: 1px solid #e3ebe8; border-radius: 7px; padding: 8px 9px; color: #526764; font-size: 10px; }
.icon-button { width: 28px; height: 28px; border: 0; border-radius: 6px; background: #f2f6f4; color: #8c9a97; font-size: 16px; }
.icon-button:disabled { opacity: .35; cursor: not-allowed; }
.public-section .panel-head { gap: 12px; }
.public-submit { display: flex; justify-content: center; gap: 9px; padding: 8px 0 13px; }
@media (max-width: 600px) {
  .week-grid { gap: 4px; }
  .week-day { padding: 8px 2px; }
  .week-day span { font-size: 7px; }
  .event-actions { align-items: flex-end; flex-direction: column; }
  .status-select { max-width: 105px; }
  .face-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .anamnesis-grid,.question-summary { grid-template-columns: 1fr; }
  .upload-box { align-items: flex-start; flex-direction: column; }
  .public-section { padding: 14px; }
  .photo-section { grid-template-columns: minmax(0,1fr) 78px; gap: 10px; }
  .face-photo-preview { width: 76px; height: 76px; }
  .phone-row { grid-template-columns: minmax(0,1fr) 30px; gap: 5px; }
  .phone-row label { grid-column: 1/-1; }
  .face-crop-editor { grid-template-columns: 105px minmax(0,1fr); gap: 7px 10px; }
  .face-crop-editor canvas { width: 105px; height: 105px; }
  .anamnesis-question { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 760px) {
  .identification-grid,.address-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 480px) {
  .identification-grid,.address-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .patient-profile-head { align-items: flex-start; gap: 10px; padding: 14px; }
  .patient-profile-head > div { min-width: 0; flex: 1; }
  .patient-profile-head > .patient-profile-indicators { flex: 0 1 auto; align-items: flex-start; margin-left: 64px; }
}
@media (max-width: 760px) {
  .clinical-service-panels { grid-template-columns: minmax(0,1fr); }
  .assessment-workspace { grid-template-columns: minmax(0,1fr); }
  .assessment-history-list { max-height: 250px; }
  .clinic-admin-grid { grid-template-columns: minmax(0,1fr); }
  .ortho-visual-grid { grid-template-columns: minmax(0,1fr); }
  .face-clinic-layout { grid-template-columns: minmax(0,1fr); }
  .face-map { width: min(100%,220px); }
  .quote-builder-item { grid-template-columns: auto minmax(0,1fr); }
  .quote-item-description { grid-column: 2; }
  .quote-builder-item > .field { grid-column: 1/-1; }
  .quote-discount-field { max-width: none; }
  .quote-builder-totals { justify-content: flex-start; }
  .planned-service-actions { justify-content: flex-start; }
  .clinical-service-panel .panel-head { align-items: flex-start; flex-direction: column; }
  .pending-service-value { justify-self: end; }
  .pending-service-price { justify-self: end; }
  .pending-service-price input { width: 104px; }
  .service-panel-actions { justify-content: flex-start; }
  .catalog-tooth-picker { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .history-actions { align-items: flex-end; flex-direction: column; }
}
.modal:has(.tooth-selector) { width: min(650px,100%); }
.modal:has(.quote-builder-list) { width: min(960px,100%); }
.modal:has(.catalog-settings-list) { width: min(820px,100%); }
.patient-contact-list { display:flex;flex-direction:column;gap:12px; }
.patient-phone-contact { display:flex;align-items:center;flex-wrap:wrap;gap:8px;max-width:100%; }
.patient-phone-contact > strong { overflow-wrap:anywhere;min-width:0;font-size:12px; }
.patient-phone-actions { display:inline-flex;flex:0 0 auto;gap:6px; }
.patient-contact-action { display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;flex:0 0 40px;border:1px solid #dce7e4;border-radius:10px;color:#375e59;background:#fff;text-decoration:none;transition:background .15s,border-color .15s; }
.patient-contact-action svg { width:19px;height:19px; }
.patient-contact-action.whatsapp { color:#168249;background:#f1faf4;border-color:#cfe8d7; }
.patient-contact-action:hover { background:#eaf4f0;border-color:#93b6a8; }
.patient-contact-action:focus-visible,.patient-photo-action:focus-visible { outline:3px solid #26826b;outline-offset:3px; }
.patient-email-contact { align-items:center; }
.patient-email-contact > strong { flex:1 1 0; }
.patient-photo-action { border:0;padding:0;background:transparent;border-radius:50%;flex:0 0 54px;cursor:pointer; }
.patient-photo-action .patient-photo { display:block;width:54px;height:54px;border-radius:50%;object-fit:cover; }
.patient-profile-head > div { min-width:0; }
.patient-profile-head .patient-phone-contact { margin-bottom:6px; }
.patient-personal-toolbar { align-items:flex-start;flex-wrap:wrap;gap:14px; }
.patient-personal-actions { display:flex;flex-wrap:wrap;gap:8px; }
.patient-info-section { margin-top:22px;border:1px solid #e0e9e5;border-radius:14px;overflow:hidden;background:#fff; }
.patient-info-section h3 { margin:0;padding:14px 16px;background:#f3f7f5;color:#355d54;font-size:13px;font-weight:700; }
.patient-personal-data .patient-info-section .detail-grid { padding:16px;gap:18px 24px; }
.patient-personal-data .patient-info-section .detail-item { padding:0;border:0;border-radius:0;background:none;min-width:0; }
.patient-personal-data .detail-item.full { grid-column:1/-1; }
.patient-personal-data .detail-item small { font-size:11px;color:#687e77;margin-bottom:7px; }
.patient-personal-data .detail-item strong { font-size:13px;line-height:1.6;overflow-wrap:anywhere; }
.patient-info-note { grid-column:1/-1;margin:0;color:#4b6260;font-size:13px; }
.medical-documents-toolbar { align-items:flex-start;gap:12px;flex-wrap:wrap; }
.prescription-document-actions { display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px;margin:16px 0; }
.prescription-create { display:flex;align-items:center;gap:11px;min-width:0;min-height:72px;padding:12px;text-align:left;border:1px solid #d5e7df;border-radius:12px;background:#f9fcfa;color:#285d4f;cursor:pointer; }
.prescription-create:hover,.prescription-create:focus-visible { background:#edf8f2;border-color:#82b5a0;outline:2px solid #82b5a055;outline-offset:1px; }
.prescription-create-icon { display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:10px;background:#dff0e7;color:#287458;font-size:22px; }
.prescription-create strong,.prescription-create small { display:block;overflow-wrap:anywhere; }
.prescription-create strong { font-size:12px;line-height:1.35; }
.prescription-create small { margin-top:4px;color:#70867b;font-size:10px;line-height:1.35; }
.medical-document-list { display:grid;gap:10px; }
.medical-document-card { align-items:center;flex-wrap:wrap;gap:12px;margin:0;padding:14px; }
.medical-document-info { flex:1 1 240px;min-width:0; }
.medical-document-title { display:flex;align-items:center;gap:8px;flex-wrap:wrap; }
.medical-document-title strong { font-size:12px;overflow-wrap:anywhere; }
.medical-document-actions { display:flex;align-items:center;gap:6px;flex-wrap:wrap; }
.medical-document-action { min-height:36px;padding:7px 10px;border:1px solid #dce8e2;border-radius:8px;background:#fff;color:#386b58;font-size:11px;font-weight:600;cursor:pointer; }
.medical-document-action:hover:not(:disabled),.medical-document-action:focus-visible { background:#edf7f1;border-color:#a6ceba;outline:2px solid #82b5a055; }
.medical-document-action-delete { color:#a14d42; }
.medical-document-action:disabled { color:#82918b;background:#f4f6f5;cursor:not-allowed; }
.medical-document-card small { overflow-wrap:anywhere; }
.medical-document-note { margin:14px 0 0;line-height:1.55; }
.prescription-medicine-panel { margin-top:4px;padding:14px;border:1px solid var(--line);border-radius:10px;background:#fbfcfc; }
.prescription-medicine-panel .panel-head { align-items:flex-start;gap:10px;flex-wrap:wrap; }
.prescription-medicine-panel .panel-head h3 { margin-bottom:5px;font-size:13px; }
.prescription-medicine-panel .panel-head p { margin:0;color:var(--muted);font-size:10px; }
.prescription-workspace { display:grid;grid-template-columns:minmax(0,1fr);gap:14px;align-items:start; }
.prescription-catalog,.prescription-editor { min-width:0; }
.prescription-editor > [data-structured-prescriptions] .structured-prescription-card:first-child { margin-top:0; }
.prescription-editor > [data-structured-prescriptions]:empty + .prescription-composer { margin-top:0; }
.prescription-medication-row { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0 0;padding:14px;border:1px solid #dfe9e5;border-radius:9px;min-width:0; }
.prescription-medication-row legend { padding:0 6px;color:#526b65;font-size:11px;font-weight:700; }
.prescription-medication-row .field > span { color:#637774;font-size:10px;font-weight:600; }
.prescription-medication-row .field { min-width:0; }
.medication-search { position:relative;grid-column:1/-1;min-width:0; }
.medication-search-field { margin:0; }
.medication-search-field input { padding-left:36px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23829393' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") no-repeat 12px center; }
.medication-search.is-open .medication-search-field input { border-color:#c58d88;box-shadow:0 0 0 2px #bf73621a; }
.medication-catalog-panel { position:relative;z-index:5;display:grid;gap:8px;max-height:min(480px,65vh);margin-top:7px;padding:11px;background:#fff;border:1px solid #e4e9e8;border-radius:10px;box-shadow:0 8px 24px #263b341a; }
.medication-catalog-panel[hidden] { display:none!important; }
.medication-catalog-heading { display:flex;align-items:center;justify-content:space-between;gap:8px;color:#405655;font-size:11px; }
.medication-catalog-heading strong { min-width:0;overflow-wrap:anywhere; }
.medication-catalog-filters { display:flex;flex-wrap:wrap;gap:5px;max-height:70px;overflow:auto;padding-bottom:2px; }
.medication-category-chip { border:1px solid #dbe5e1;border-radius:18px;padding:5px 9px;background:#fff;color:#5d716b;font-size:9px;cursor:pointer; }
.medication-category-chip:hover,.medication-category-chip.active { border-color:#b5544a;background:#fff5f2;color:#a2382d; }
.dental-antimicrobial-groups { display:grid;gap:9px;max-height:280px;overflow:auto; }
.dental-antimicrobial-groups > .medication-catalog-footnote { padding-bottom:2px; }
.cfo-medication-search { position:sticky;top:0;z-index:2;margin:0;padding:7px 0;background:#fbfcfc; }
.cfo-medication-search input { min-height:40px;border-color:#cfe0d4;background-color:#fff; }
.cfo-medication-search-status { margin:0;color:#426b54;font-size:10px;line-height:1.4; }
.dental-antimicrobial-groups [hidden] { display:none!important; }
.dental-medication-section { min-width:0;border:1px solid #e0e8e5;border-radius:8px;background:#fbfcfc; }
.dental-medication-section > summary { display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;color:#405655;cursor:pointer;list-style-position:inside; }
.dental-medication-section > summary strong { font-size:11px; }
.dental-medication-section > summary span { color:#71817d;font-size:9px; }
.dental-medication-section-content { display:grid;gap:9px;padding:0 9px 9px; }
.dental-antimicrobial-group { display:grid;gap:5px; }
.dental-antimicrobial-group h4 { display:flex;align-items:center;gap:6px;margin:0;color:#405655;font-size:10px; }
.dental-antimicrobial-group h4 span { color:#7a8985;font-size:9px;font-weight:500; }
.dental-antimicrobial-group > div { display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:5px; }
.dental-antimicrobial-option { display:grid;gap:3px;min-width:0;padding:7px 8px;text-align:left;background:#fff;border:1px solid #e2e8e7;border-radius:7px;color:#283d3d;cursor:pointer; }
.dental-antimicrobial-option:hover,.dental-antimicrobial-option:focus-visible { border-color:#bb5d49;background:#fff8f5;outline:2px solid #d58c7b55; }
.dental-antimicrobial-option:disabled { background:#f4f6f5;color:#82908d;cursor:not-allowed;opacity:.72; }
.dental-antimicrobial-option strong { font-size:10px;line-height:1.3;overflow-wrap:anywhere; }
.dental-antimicrobial-option span { color:#5f706e;font-size:9px;line-height:1.3;overflow-wrap:anywhere; }
.dental-antimicrobial-option:disabled small { color:#9b5148;font-size:8px;line-height:1.3; }
.medication-catalog-results { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;max-height:250px;overflow:auto;padding-right:2px; }
.medication-result-card { display:grid;align-content:start;gap:5px;min-width:0;padding:9px 10px;text-align:left;background:#fff;border:1px solid #e2e8e7;border-left:3px solid #be6046;border-radius:8px;color:#283d3d;cursor:pointer; }
.medication-result-card:hover,.medication-result-card:focus-visible { border-color:#bb5d49;background:#fff8f5;outline:2px solid #d58c7b55; }
.medication-result-card strong { font-size:11px;line-height:1.3;overflow-wrap:anywhere; }
.medication-result-card > span { color:#5f706e;font-size:10px;line-height:1.35;overflow-wrap:anywhere; }
.medication-result-card small { display:flex;flex-wrap:wrap;gap:4px; }
.medication-result-card i { padding:2px 5px;border:1px solid #dfe6e4;border-radius:5px;color:#687a78;font-size:8px;font-style:normal;line-height:1.3; }
.medication-catalog-empty,.medication-catalog-footnote { margin:0;color:#778783;font-size:10px;line-height:1.45; }
.prescription-medication-row .medication-catalog-note { display:block;margin-top:6px;color:#687e77;font-size:10px;line-height:1.45;overflow-wrap:anywhere; }
.prescription-remove-medication { grid-column:1/-1;justify-self:end; }
.prescription-composer { margin-top:14px; }
.prescription-composer textarea { min-height:210px;font-family:inherit;line-height:1.6; }
.structured-prescription-card { margin:18px 0 0;padding:20px;border:1px solid #cfe0da;border-radius:14px;min-width:0;background:#fff;box-shadow:0 4px 16px #2c5e4d0d; }
.structured-prescription-card legend { max-width:100%;padding:0 9px;color:#284f46;font-size:14px;font-weight:700; }
.structured-prescription-card legend span { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.structured-prescription-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px; }
.structured-prescription-grid .full { grid-column:1/-1; }
.structured-prescription-grid [hidden] { display:none!important; }
.structured-prescription-grid .field { min-width:0; }
.structured-prescription-grid .field > span { font-size:12px;color:#405d55;font-weight:600; }
.structured-prescription-grid .field input,.structured-prescription-grid .field select { min-height:42px;font-size:13px; }
.structured-prescription-grid .button { min-height:40px;font-size:12px; }
.structured-step { display:flex;align-items:center;gap:10px;padding-bottom:8px;border-bottom:1px solid #e8efec; }
.structured-step > span { display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:50%;background:#e5f3ed;color:#276b54;font-size:12px;font-weight:700; }
.structured-step div { display:grid;gap:3px; }
.structured-step strong { color:#284f46;font-size:13px; }
.structured-step small { color:#6b8079;font-size:11px; }
.structured-drops,.structured-reference { padding:14px;border-radius:10px;border:1px solid #d5e8e0;background:#f5faf7; }
.structured-drops { display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px;align-items:start; }
.structured-drops > div,.structured-confirm { grid-column:1/-1; }
.structured-drops strong,.structured-reference strong { font-size:12px;color:#285d4f; }
.structured-drops p,.structured-reference span { display:block;margin:5px 0 0;color:#526e64;font-size:11px;line-height:1.5; }
.structured-confirm { display:flex;align-items:flex-start;gap:8px;color:#405d55;font-size:12px;line-height:1.45; }
.structured-confirm input { flex:none;width:17px;height:17px;margin:0; }
.structured-reference { display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;background:#f8faf9;border-color:#e1eae6; }
.structured-reference a { color:#21755d;font-size:12px;font-weight:700; }
.structured-suggestion { display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:14px;border:1px solid #cfe4d9;border-radius:10px;background:#edf8f2; }
.structured-suggestion > div { display:grid;gap:5px;flex:1 1 240px;min-width:0; }
.structured-suggestion-label { color:#54766a;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.04em; }
.structured-suggestion strong { color:#265645;font-size:12px;line-height:1.5;overflow-wrap:anywhere; }
.structured-actions { display:flex;gap:8px;flex-wrap:wrap; }
.controlled-prescription-fields { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
.controlled-prescription-fields .alert-banner { grid-column:1/-1; }
.sncr-number-actions { display:flex;align-items:center;gap:8px;flex-wrap:wrap; }
.sncr-number-actions [data-sncr-inventory] { flex:1 1 100%;margin:0;color:#526b65;font-size:12px;line-height:1.45; }
.sncr-number-actions [data-sncr-reserved-number] { flex:1 1 100%;margin:0; }
.attestation-fields { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:14px;border:1px solid var(--line);border-radius:10px;background:#fbfcfc; }
.attestation-fields h3 { grid-column:1/-1;margin:0;font-size:13px; }
.attestation-fields .full { grid-column:1/-1; }
.attestation-fields[hidden],.attestation-fields [hidden],.medical-document-body[hidden],.prescription-medicine-panel[hidden],.controlled-prescription-fields[hidden] { display:none!important; }
.medication-catalog-source { margin:12px 0 0;line-height:1.5; }
.modal:has(.prescription-medicine-panel) { width:min(1100px,100%);max-height:calc(100vh - 32px); }
.modal:has(.prescription-medicine-panel) #modalForm > .form-grid > .full { grid-column:1/-1; }
@media (max-width:480px) {
  .patient-contact-action { width:44px;height:44px;flex-basis:44px; }
  .patient-profile-head { flex-wrap:wrap; }
  .patient-profile-head > .patient-profile-indicators { align-items:flex-start; margin-left:64px; }
  .patient-personal-actions { width:100%; }
  .patient-personal-actions .button { flex:1 1 180px;white-space:normal; }
  .patient-personal-data .patient-info-section .detail-grid { padding:14px;gap:16px; }
  .medical-document-card { align-items:flex-start; }
  .medical-document-card .button { flex:1 1 100%; }
  .prescription-medication-row,.controlled-prescription-fields,.attestation-fields { grid-template-columns:minmax(0,1fr); }
  .dental-antimicrobial-group > div { grid-template-columns:minmax(0,1fr); }
  .medication-catalog-results { grid-template-columns:minmax(0,1fr);max-height:220px; }
  .medication-catalog-panel { max-height:60vh; }
}
.intake-signature-acceptance { display:flex;align-items:flex-start;gap:10px;margin:16px 0;line-height:1.5; }
.intake-signature-acceptance input { flex:0 0 auto;width:20px;height:20px;margin-top:3px; }
.intake-photo-crop { margin:16px 0;padding:16px;border:1px solid var(--border);border-radius:16px;background:#f5f8f7; }
.intake-photo-crop canvas { display:block;width:100%;max-width:320px;height:auto;aspect-ratio:1;margin:auto;touch-action:none;border-radius:12px; }
.intake-photo-crop label { display:block;margin-top:12px; }
.intake-photo-crop input[type=range] { display:block;width:100%;min-height:36px; }
.intake-review-choice { display:flex;gap:8px;align-items:center;margin:8px 0; }
.intake-conflict-card { margin:12px 0;padding:16px;border:1px solid #edc98f;border-radius:12px;background:#fffaf1; }
.intake-conflict-values { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;overflow-wrap:anywhere; }
.intake-conflict-values img { width:96px;height:96px;object-fit:cover;border-radius:12px; }
.intake-conflict-values dl { margin:0; }
.intake-conflict-values dd { margin:0 0 8px; }
.clinical-tv-picker { grid-column:1/-1; }
.clinical-tv-picker > small { color:#6b8079;font-size:10px;line-height:1.4; }
@media (max-width:760px) {
  .clinical-tv-preview { grid-template-columns:minmax(0,1.5fr) minmax(120px,.85fr); height:465px; }
  .clinical-tv-screen { padding:4px; }
  .clinical-tv-screen small { font-size:8px; }
}
@media (max-width:480px) {
  .clinical-tv-preview { grid-template-columns:minmax(0,1.3fr) minmax(112px,1fr); height:450px; gap:5px; padding:5px; border-width:5px; }
  .clinical-tv-side-screens { gap:4px; }
  .clinical-tv-screen-navigation { grid-template-columns:26px minmax(0,1fr) 26px; gap:2px; }
  .clinical-tv-screen-navigation button { height:34px; }
  .clinical-tv-swap { height:30px; }
}
