:root {
  color-scheme: only light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-muted: #f7fbfb;
  --ink: #0b2235;
  --muted: #5d6b76;
  --line: #dbe9eb;
  --teal: #00a99d;
  --teal-soft: #e4fbf7;
  --indigo: #1976b8;
  --indigo-soft: #eaf5ff;
  --amber: #f39c12;
  --amber-soft: #fff6df;
  --coral: #e45545;
  --coral-soft: #ffecec;
  --green: #00a65a;
  --green-soft: #e6f8ee;
  --danger: #d83b3b;
  --danger-soft: #ffe8e8;
  --if-blue: #0e5a88;
  --if-cyan: #13b7cc;
  --if-lime: #b6db00;
  --app-bg-base: #ffffff;
  --app-bg-bottom: #ffffff;
  --app-bg-cyan-glow: rgba(19, 183, 204, 0);
  --app-bg-lime-glow: rgba(182, 219, 0, 0);
  --app-bg-ribbon: rgba(13, 183, 204, 0);
  --shadow: 0 14px 36px rgba(11, 34, 53, 0.08);
  --radius: 12px;
  --radius-lg: 18px;
  --sidebar-width: 272px;
}

* {
  box-sizing: border-box;
}

/* Tela inicial — Central do Dia Tec Dent (menu preservado) */
[data-view-panel="Resumo"].dashboard-home {
  background:
    radial-gradient(circle at 6% 5%, rgba(37, 205, 190, .12), transparent 24%),
    radial-gradient(circle at 96% 20%, rgba(208, 238, 73, .10), transparent 22%),
    linear-gradient(180deg, #eff8f8 0%, #f7fbfb 46%, #ffffff 100%);
}

[data-view-panel="Resumo"] .home-command-shell {
  width: min(1380px, calc(100% - 44px));
  display: grid;
  gap: 16px;
  margin: 0 auto;
  padding: 18px 0 42px;
}

[data-view-panel="Resumo"] .home-command-toolbar {
  min-height: 176px;
  display: grid;
  grid-template-columns: minmax(400px, 424px) minmax(360px, 1fr) 338px;
  align-items: start;
  gap: 18px;
  padding: 4px 2px 0;
}

[data-view-panel="Resumo"] .home-command-toolbar .home-operation-strip {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

[data-view-panel="Resumo"] .home-command-toolbar .home-operation-metric {
  min-height: 84px;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: start;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(15, 118, 135, .10);
  border-radius: 15px;
  background: rgba(255, 255, 255, .88);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, .03),
    0 8px 24px rgba(15, 118, 135, .06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease !important;
}

[data-view-panel="Resumo"] .home-command-toolbar .home-operation-icon {
  width: 32px;
  height: 32px;
  margin-top: 1px;
  border-radius: 10px;
}

[data-view-panel="Resumo"] .home-command-toolbar .home-operation-icon svg {
  width: 16px;
  height: 16px;
}

[data-view-panel="Resumo"] .home-command-toolbar .home-operation-metric strong {
  color: #082f3a;
  font-size: 23px;
  font-weight: 750;
  line-height: 1;
}

[data-view-panel="Resumo"] .home-command-toolbar .home-operation-copy {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 3px;
}

[data-view-panel="Resumo"] .home-command-toolbar .home-operation-metric .home-operation-title {
  overflow: visible;
  color: #607078;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.2;
  text-overflow: clip;
  text-transform: none;
  white-space: normal;
}

[data-view-panel="Resumo"] .home-command-toolbar .home-operation-description {
  color: #8a989d;
  font-size: 8px;
  font-weight: 500;
  line-height: 1.2;
  white-space: normal;
}

[data-view-panel="Resumo"] .home-command-toolbar .home-operation-metric em {
  align-self: start;
  padding: 3px 6px;
  border-radius: 999px;
  background: #f2f4f5;
  color: #64747a;
  font-size: 7px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: none;
  white-space: nowrap;
}

[data-view-panel="Resumo"] .home-command-toolbar .home-operation-metric:hover,
[data-view-panel="Resumo"] .home-command-toolbar .home-operation-metric:focus-visible {
  border-color: rgba(15, 118, 135, .18);
  box-shadow: 0 12px 30px rgba(15, 118, 135, .10);
  transform: translateY(-2px);
}

[data-view-panel="Resumo"] .home-command-toolbar .home-operation-metric:active {
  transform: scale(.985);
}

[data-view-panel="Resumo"] .home-command-toolbar > .home-toolbar-patient-search {
  width: 100%;
  height: 96px;
  min-height: 0;
  grid-column: auto;
  order: initial;
  align-self: start;
  padding: 10px 12px 12px;
  border: 1px solid #c9e2e2;
  border-radius: 20px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 10px 26px rgba(11, 59, 70, .08);
  position: relative;
  z-index: 12;
  overflow: visible;
  box-sizing: border-box;
}

[data-view-panel="Resumo"] .home-command-toolbar .home-toolbar-patient-search .home-panel-header {
  min-height: 32px;
  margin: 0;
  padding: 0 2px 8px;
  border: 0;
}

[data-view-panel="Resumo"] .home-command-toolbar .home-toolbar-patient-search .home-panel-header h2 {
  gap: 7px;
  font-size: 15px;
  font-weight: 950;
}

[data-view-panel="Resumo"] .home-command-toolbar .home-toolbar-patient-search .home-panel-header h2::before {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

[data-view-panel="Resumo"] .home-command-toolbar .home-toolbar-patient-search .home-board-heading-copy {
  gap: 1px;
}

[data-view-panel="Resumo"] .home-command-toolbar .home-toolbar-patient-search .home-board-heading-copy small {
  font-size: 9px;
}

[data-view-panel="Resumo"] .home-command-toolbar .home-toolbar-patient-search .home-mini-search {
  height: 42px;
  margin: 0;
  border-color: #c8dddf;
  border-radius: 12px;
  background: #f8fbfb;
}

[data-view-panel="Resumo"] .home-command-toolbar .home-toolbar-patient-search #homePatientList {
  max-height: 330px;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  overflow: auto;
  padding: 8px;
  border: 1px solid #c9dddf;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(9, 53, 67, .18);
  z-index: 30;
  box-sizing: border-box;
}

[data-view-panel="Resumo"] .home-command-toolbar .home-toolbar-patient-search #homePatientList h3 {
  padding: 5px 6px 8px;
}

[data-view-panel="Resumo"] .home-command-toolbar .home-toolbar-patient-search #homePatientList table {
  width: 100%;
  min-width: 0;
}

[data-view-panel="Resumo"] .home-command-right {
  min-width: 0;
  display: grid;
  justify-items: end;
  gap: 11px;
}

[data-view-panel="Resumo"] .home-clinic-calendar {
  width: min(100%, 338px);
  min-height: 96px;
  display: grid;
  grid-template-columns: minmax(0, 176px) 116px;
  grid-template-rows: auto auto;
  justify-content: end;
  align-content: center;
  align-items: center;
  gap: 3px 8px;
  overflow: hidden;
  padding: 9px 12px 9px 14px;
  border: 1px solid #b9dddd;
  border-radius: 20px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .98), rgba(234, 249, 247, .94));
  box-shadow: 0 12px 28px rgba(12, 67, 77, .10);
  color: #164b58;
  position: relative;
  box-sizing: border-box;
}

[data-view-panel="Resumo"] .home-clinic-calendar::after {
  content: "";
  width: 142px;
  height: 142px;
  position: absolute;
  right: -18px;
  top: -25px;
  border: 19px solid rgba(10, 150, 139, .055);
  border-radius: 50%;
  pointer-events: none;
}

[data-view-panel="Resumo"] .home-clinic-calendar-logo {
  width: 116px;
  height: 82px;
  grid-column: 2;
  grid-row: 1 / 3;
  position: relative;
  right: auto;
  top: auto;
  z-index: 1;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  object-position: center;
  opacity: 1;
  filter: none;
  mix-blend-mode: multiply;
  transform: none;
  pointer-events: none;
  box-sizing: border-box;
}

[data-view-panel="Resumo"] .home-clinic-calendar-date,
[data-view-panel="Resumo"] .home-clinic-calendar > em {
  position: relative;
  z-index: 1;
}

[data-view-panel="Resumo"] .home-clinic-calendar-date {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

[data-view-panel="Resumo"] .home-clinic-calendar-date > strong {
  min-width: 45px;
  color: #078d83;
  font-size: 39px;
  font-weight: 950;
  line-height: .92;
  letter-spacing: -.055em;
  text-align: center;
}

[data-view-panel="Resumo"] .home-clinic-calendar-date > span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

[data-view-panel="Resumo"] .home-clinic-calendar-date b {
  color: #123d4a;
  font-size: 15px;
  font-weight: 950;
  text-transform: capitalize;
}

[data-view-panel="Resumo"] .home-clinic-calendar-date small {
  color: #58737b;
  font-size: 11px;
  font-weight: 800;
  text-transform: capitalize;
}

[data-view-panel="Resumo"] .home-clinic-calendar > em {
  max-width: 176px;
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  justify-self: start;
  overflow: hidden;
  padding: 5px 8px;
  border: 1px solid rgba(10, 141, 131, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .70);
  color: #176772;
  font-size: 9px;
  font-style: normal;
  font-weight: 950;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

[data-view-panel="Resumo"] .home-command-right > .home-command-actions {
  width: auto;
  display: grid;
  grid-template-columns: repeat(3, 76px);
  grid-auto-rows: auto;
  align-self: start;
  justify-content: end;
  gap: 14px;
}

[data-view-panel="Resumo"] .home-command-right > .home-command-actions .home-app-shortcut {
  width: 76px;
  min-height: 0;
  height: auto;
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: #173b45;
  box-shadow: none;
  font-size: 10px;
  line-height: 1.12;
  text-align: center;
  transition: transform .18s ease;
}

[data-view-panel="Resumo"] .home-command-right > .home-command-actions .home-app-shortcut:hover,
[data-view-panel="Resumo"] .home-command-right > .home-command-actions .home-app-shortcut:focus-visible {
  background: transparent;
  box-shadow: none;
  transform: translateY(-3px);
}

[data-view-panel="Resumo"] .home-command-right .home-app-icon {
  width: 66px;
  height: 66px;
  display: grid;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(10, 121, 130, .14);
  border-radius: 18px;
  background: #f7fcfc;
  box-shadow:
    0 10px 20px rgba(9, 66, 77, .14),
    inset 0 1px rgba(255, 255, 255, .92);
  transition: box-shadow .18s ease, transform .18s ease;
}

[data-view-panel="Resumo"] .home-command-right .home-app-shortcut:hover .home-app-icon,
[data-view-panel="Resumo"] .home-command-right .home-app-shortcut:focus-visible .home-app-icon {
  box-shadow:
    0 14px 26px rgba(9, 66, 77, .20),
    inset 0 1px rgba(255, 255, 255, .94);
}

[data-view-panel="Resumo"] .home-command-right .home-app-icon img {
  width: 86px;
  height: 86px;
  max-width: none;
  object-fit: cover;
  pointer-events: none;
}

[data-view-panel="Resumo"] .home-command-right .home-app-shortcut.is-new-patient .home-app-icon {
  border-color: rgba(25, 157, 98, .28);
  background: #f1fbf6;
  box-shadow:
    0 10px 22px rgba(20, 135, 84, .18),
    inset 0 1px rgba(255, 255, 255, .94);
}

[data-view-panel="Resumo"] .home-command-right .home-app-shortcut.is-new-patient .home-app-icon img {
  filter: hue-rotate(-43deg) saturate(1.18) brightness(1.02);
}

[data-view-panel="Resumo"] .home-command-right .home-app-shortcut.is-new-patient .home-app-label {
  color: #168557;
}

[data-view-panel="Resumo"] .home-command-right .home-app-calendar {
  background:
    linear-gradient(180deg, #fdfefe 0 25%, #e8f8f8 25% 100%);
  color: #078f91;
}

[data-view-panel="Resumo"] .home-command-right .home-app-calendar::before {
  content: "";
  width: 100%;
  height: 5px;
  position: absolute;
  top: 0;
  left: 0;
  background: linear-gradient(90deg, #0a91a0, #22b8b1);
}

[data-view-panel="Resumo"] .home-command-right .home-app-calendar {
  position: relative;
}

[data-view-panel="Resumo"] .home-command-right .home-app-calendar svg {
  width: 32px;
  height: 32px;
}

[data-view-panel="Resumo"] .home-command-right .home-app-label {
  max-width: 76px;
  color: #315966;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.15;
}

[data-view-panel="Resumo"] .home-command-hero {
  min-height: 154px;
  margin: 0;
  padding: 24px 28px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 26px;
  background:
    radial-gradient(circle at 76% -35%, rgba(204, 241, 66, .26), transparent 38%),
    radial-gradient(circle at 3% 120%, rgba(33, 210, 192, .28), transparent 36%),
    linear-gradient(118deg, #07364e 0%, #07596a 52%, #078d83 100%);
  box-shadow: 0 20px 44px rgba(6, 60, 76, .20);
}

[data-view-panel="Resumo"] .home-command-hero::before,
[data-view-panel="Resumo"] .home-command-hero::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 50%;
  pointer-events: none;
}

[data-view-panel="Resumo"] .home-command-hero::before {
  width: 330px;
  height: 330px;
  right: 31%;
  top: -285px;
}

[data-view-panel="Resumo"] .home-command-hero::after {
  width: 230px;
  height: 230px;
  right: 21%;
  top: -185px;
  border-width: 28px;
  border-color: rgba(255, 255, 255, .055);
}

[data-view-panel="Resumo"] .home-command-welcome > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d8f44b;
}

[data-view-panel="Resumo"] .home-command-welcome > span::before {
  content: "";
  width: 26px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

[data-view-panel="Resumo"] .home-command-welcome h1 {
  margin-top: 8px;
  font-size: clamp(25px, 2.2vw, 34px);
}

[data-view-panel="Resumo"] .home-command-welcome h1 b,
[data-view-panel="Resumo"] .home-command-welcome h1 strong {
  color: inherit;
  font: inherit;
}

[data-view-panel="Resumo"] .home-command-welcome p {
  max-width: 590px;
  margin-top: 8px;
  font-size: 13px;
}

[data-view-panel="Resumo"] .home-command-hero-side {
  min-width: min(100%, 510px);
  display: grid;
  justify-items: end;
  gap: 12px;
}

[data-view-panel="Resumo"] .home-command-hero .home-dashboard-context {
  width: fit-content;
  min-width: 230px;
  padding: 10px 14px;
  border-radius: 14px;
}

[data-view-panel="Resumo"] .home-command-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

[data-view-panel="Resumo"] .home-command-actions button {
  min-height: 41px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 13px;
  color: #ffffff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

[data-view-panel="Resumo"] .home-command-actions button svg {
  width: 17px;
  height: 17px;
}

[data-view-panel="Resumo"] .home-command-actions button.is-secondary {
  background: rgba(255, 255, 255, .11);
  backdrop-filter: blur(7px);
}

[data-view-panel="Resumo"] .home-command-actions button.is-primary {
  border-color: #d8f44b;
  background: #d8f44b;
  color: #173b45;
  box-shadow: 0 9px 20px rgba(12, 31, 36, .20);
}

[data-view-panel="Resumo"] .home-command-actions button:hover,
[data-view-panel="Resumo"] .home-command-actions button:focus-visible {
  transform: translateY(-2px);
}

[data-view-panel="Resumo"] .home-command-actions button.is-secondary:hover,
[data-view-panel="Resumo"] .home-command-actions button.is-secondary:focus-visible {
  background: rgba(255, 255, 255, .19);
}

[data-view-panel="Resumo"] .home-operation-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: -4px 18px 0;
  position: relative;
  z-index: 2;
}

[data-view-panel="Resumo"] .home-operation-metric {
  min-width: 0;
  min-height: 88px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid #d8e9e9;
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 30px rgba(11, 59, 70, .09);
  color: #163846;
  cursor: pointer;
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

[data-view-panel="Resumo"] .home-operation-metric:hover,
[data-view-panel="Resumo"] .home-operation-metric:focus-visible {
  border-color: #a9d7d5;
  box-shadow: 0 16px 34px rgba(11, 59, 70, .13);
  transform: translateY(-2px);
}

[data-view-panel="Resumo"] .home-operation-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #fff3d3;
  color: #bd7900;
}

[data-view-panel="Resumo"] .home-operation-icon svg {
  width: 22px;
  height: 22px;
}

[data-view-panel="Resumo"] .home-operation-metric > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

[data-view-panel="Resumo"] .home-operation-metric small {
  overflow: hidden;
  color: #6b8089;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .055em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

[data-view-panel="Resumo"] .home-operation-metric strong {
  color: #143644;
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
}

[data-view-panel="Resumo"] .home-operation-metric em {
  align-self: start;
  padding: 5px 7px;
  border-radius: 999px;
  background: #f3f7f7;
  color: #789098;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

[data-view-panel="Resumo"] .home-operation-metric.is-attending .home-operation-icon {
  background: #dcf8fa;
  color: #068a99;
}

[data-view-panel="Resumo"] .home-operation-metric.is-finished .home-operation-icon {
  background: #dcf8eb;
  color: #087e54;
}

[data-view-panel="Resumo"] .home-operation-metric.is-patients .home-operation-icon {
  background: #e5efff;
  color: #2c65b2;
}

[data-view-panel="Resumo"] .home-care-flow {
  overflow: hidden;
  border: 1px solid #d6e7e9;
  border-radius: 24px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 14px 36px rgba(14, 62, 73, .08);
}

[data-view-panel="Resumo"] .home-care-flow-heading {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 20px;
  border-bottom: 1px solid #dce9eb;
  background: linear-gradient(90deg, #f9fdfd, #eef9f7);
}

[data-view-panel="Resumo"] .home-care-flow-heading span {
  color: #078d83;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .11em;
  text-transform: uppercase;
}

[data-view-panel="Resumo"] .home-care-flow-heading h2 {
  margin: 2px 0 0;
  color: #143848;
  font-size: 21px;
  font-weight: 950;
}

[data-view-panel="Resumo"] .home-care-flow-heading > button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid #c8dfdf;
  border-radius: 11px;
  background: #ffffff;
  color: #126673;
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
}

[data-view-panel="Resumo"] .home-care-flow-heading > button svg {
  width: 15px;
  height: 15px;
}

[data-view-panel="Resumo"] .home-care-flow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board {
  min-height: 190px;
  border: 0;
  border-radius: 17px;
  box-shadow: none;
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-waiting {
  background: linear-gradient(180deg, #fffaf0, #ffffff 68%);
  box-shadow: inset 0 3px 0 #eda71d;
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-attending {
  background: linear-gradient(180deg, #effbfd, #ffffff 68%);
  box-shadow: inset 0 3px 0 #16aebe;
}

[data-view-panel="Resumo"] .home-care-flow .home-board-header {
  background: transparent;
}

[data-view-panel="Resumo"] .home-command-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(420px, .92fr);
  gap: 18px;
  align-items: start;
}

[data-view-panel="Resumo"] .home-command-lower > .home-side-stack {
  display: grid;
  grid-column: auto;
  gap: 14px;
  order: initial;
}

[data-view-panel="Resumo"] .home-command-lower > .home-follow-up-board {
  grid-column: auto;
  order: initial;
}

[data-view-panel="Resumo"] .home-command-lower .home-board {
  border-radius: 20px;
}

[data-view-panel="Resumo"] .home-follow-up-board {
  min-height: 100%;
  border-top-color: #e5a019;
}

[data-view-panel="Resumo"] .home-board-heading-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

[data-view-panel="Resumo"] .home-board-heading-copy small {
  overflow: hidden;
  color: #748993;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-view-panel="Resumo"] .patient-home-widget {
  padding: 0;
}

[data-view-panel="Resumo"] .home-command-lower .patient-home-widget {
  min-height: 150px;
}

[data-view-panel="Resumo"] .home-command-lower .home-finance-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

[data-view-panel="Resumo"] .home-command-lower .home-finance-metric {
  min-height: 84px;
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: 8px;
  padding: 11px 9px;
  border-radius: 16px;
}

[data-view-panel="Resumo"] .home-command-lower .home-finance-metric::before {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 14px;
}

[data-view-panel="Resumo"] .home-command-lower .home-finance-metric small {
  font-size: 8px;
}

[data-view-panel="Resumo"] .home-command-lower .home-finance-metric strong {
  font-size: 16px;
}

[data-view-panel="Resumo"] .home-command-lower .home-compact-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

[data-view-panel="Resumo"] .home-command-lower .home-compact-row > .home-board {
  min-height: 166px;
}

[data-view-panel="Resumo"] .home-command-lower .home-day-info-list {
  grid-template-columns: 1fr;
}

@media (max-width: 1240px) {
  [data-view-panel="Resumo"] .home-command-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  [data-view-panel="Resumo"] .home-command-right {
    grid-column: 1 / -1;
  }

  [data-view-panel="Resumo"] .home-command-toolbar > .home-toolbar-patient-search {
    width: 100%;
  }

  [data-view-panel="Resumo"] .home-operation-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  [data-view-panel="Resumo"] .home-command-lower {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  [data-view-panel="Resumo"] .home-command-shell {
    width: min(100% - 24px, 1380px);
    padding-top: 12px;
  }

  [data-view-panel="Resumo"] .home-command-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 20px;
  }

  [data-view-panel="Resumo"] .home-command-toolbar {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  [data-view-panel="Resumo"] .home-command-right {
    width: 100%;
  }

  [data-view-panel="Resumo"] .home-command-right > .home-command-actions {
    justify-content: flex-end;
  }

  [data-view-panel="Resumo"] .home-command-hero-side {
    width: 100%;
    min-width: 0;
    justify-items: start;
  }

  [data-view-panel="Resumo"] .home-command-actions {
    justify-content: flex-start;
  }

  [data-view-panel="Resumo"] .home-care-flow-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  [data-view-panel="Resumo"] .home-command-shell {
    width: calc(100% - 18px);
    gap: 12px;
  }

  [data-view-panel="Resumo"] .home-command-hero {
    border-radius: 20px;
  }

  [data-view-panel="Resumo"] .home-command-actions,
  [data-view-panel="Resumo"] .home-command-actions button,
  [data-view-panel="Resumo"] .home-command-hero .home-dashboard-context,
  [data-view-panel="Resumo"] .home-clinic-calendar {
    width: 100%;
  }

  [data-view-panel="Resumo"] .home-operation-strip {
    grid-template-columns: minmax(0, 1fr);
    margin-inline: 0;
  }

  [data-view-panel="Resumo"] .home-command-toolbar .home-operation-metric {
    grid-template-columns: 32px minmax(0, 1fr) auto;
  }

  [data-view-panel="Resumo"] .home-command-toolbar .home-operation-metric em {
    display: inline-flex;
  }

  [data-view-panel="Resumo"] .home-care-flow-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  [data-view-panel="Resumo"] .home-care-flow-heading > button {
    width: 100%;
    justify-content: center;
  }

  [data-view-panel="Resumo"] .home-command-lower {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-view-panel="Resumo"] .home-command-lower .home-finance-metrics,
  [data-view-panel="Resumo"] .home-command-lower .home-compact-row {
    grid-template-columns: 1fr;
  }

  [data-view-panel="Resumo"] .home-board-heading-copy small {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-view-panel="Resumo"] .home-command-toolbar .home-operation-metric {
    transition: none !important;
  }
}

/* Ícones v4: acabamento branco, profundo e responsivo ao toque como apps do iPhone. */
body .clinic-home-menu.standard-top-menu {
  min-height: 112px;
  background:
    radial-gradient(circle at 13% 205%, rgba(14, 165, 183, 0.045) 0 150px, transparent 151px),
    radial-gradient(circle at 86% 220%, rgba(59, 130, 246, 0.035) 0 175px, transparent 176px),
    linear-gradient(
      110deg,
      rgba(255, 255, 255, 0.96),
      rgba(242, 251, 252, 0.91),
      rgba(250, 252, 244, 0.89)
    );
}

body .standard-top-menu .menu-icon-button {
  height: 92px;
  min-height: 92px;
  gap: 8px;
  padding-top: 5px;
  padding-bottom: 6px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body .standard-top-menu .menu-icon-glyph {
  position: relative;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.98);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.99), rgba(247, 250, 251, 0.94));
  color: var(--menu-accent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(15, 118, 135, 0.045),
    0 2px 5px rgba(15, 23, 42, 0.035),
    0 10px 24px rgba(15, 118, 135, 0.075);
  transform: translateZ(0);
  transition:
    transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    background-color 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

body .standard-top-menu .menu-icon-glyph::after {
  position: absolute;
  inset: 1px 1px 48%;
  z-index: 0;
  border-radius: 17px 17px 11px 11px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0));
  content: "";
  pointer-events: none;
}

body .standard-top-menu .menu-icon-glyph svg {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 1px 1px rgba(15, 23, 42, 0.035));
}

body .standard-top-menu .menu-icon-caption {
  color: #314655;
  font-size: 12px;
  font-weight: 780;
}

body .standard-top-menu .menu-icon-button:hover,
body .standard-top-menu .menu-icon-button:focus-visible {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  transform: translateY(-1px) !important;
}

body .standard-top-menu .menu-icon-button:hover .menu-icon-glyph,
body .standard-top-menu .menu-icon-button:focus-visible .menu-icon-glyph {
  border-color: rgba(255, 255, 255, 1);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 1), color-mix(in srgb, var(--menu-accent) 3%, #f8fbfc));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 color-mix(in srgb, var(--menu-accent) 7%, transparent),
    0 4px 9px rgba(15, 23, 42, 0.045),
    0 14px 28px color-mix(in srgb, var(--menu-accent) 12%, transparent);
  transform: translateY(-3px) scale(1.035);
}

body .standard-top-menu .menu-icon-button.is-active .menu-icon-glyph,
body .standard-top-menu .menu-dropdown.is-open > .menu-icon-button .menu-icon-glyph {
  border-color: rgba(255, 255, 255, 1);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 1), color-mix(in srgb, var(--menu-accent) 5%, #f8fbfc));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 color-mix(in srgb, var(--menu-accent) 9%, transparent),
    0 4px 9px rgba(15, 23, 42, 0.05),
    0 12px 25px color-mix(in srgb, var(--menu-accent) 13%, transparent);
  transform: translateY(-2px);
}

body .standard-top-menu .menu-icon-button:active {
  transform: translateY(0) scale(0.98) !important;
  transition-duration: 70ms;
}

body .standard-top-menu .menu-icon-button:active .menu-icon-glyph {
  box-shadow:
    inset 0 2px 5px rgba(15, 23, 42, 0.055),
    0 2px 5px rgba(15, 23, 42, 0.04),
    0 6px 13px color-mix(in srgb, var(--menu-accent) 8%, transparent);
  transform: translateY(1px) scale(0.92);
  transition-duration: 70ms;
}

@media (max-width: 1180px) and (min-width: 901px) {
  body .clinic-home-menu.standard-top-menu {
    min-height: 108px;
  }

  body .standard-top-menu .menu-icon-button {
    height: 88px;
    min-height: 88px;
    gap: 7px;
  }

  body .standard-top-menu .menu-icon-glyph {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
    border-radius: 17px;
  }

  body .standard-top-menu .menu-icon-glyph svg {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 900px) {
  body .clinic-home-menu.standard-top-menu {
    min-height: 104px;
  }

  body .standard-top-menu .menu-icon-button {
    height: 80px;
    min-height: 80px;
    gap: 6px;
  }

  body .standard-top-menu .menu-icon-glyph {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    border-radius: 14px;
  }

  body .standard-top-menu .menu-icon-glyph svg {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 560px) {
  body .clinic-home-menu.standard-top-menu {
    min-height: 96px;
  }

  body .standard-top-menu .menu-icon-button {
    height: 76px;
    min-height: 76px;
  }

  body .standard-top-menu .menu-icon-glyph {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 14px;
  }

  body .standard-top-menu .menu-icon-glyph svg {
    width: 23px;
    height: 23px;
  }
}

@media (hover: none) {
  body .standard-top-menu .menu-icon-button:hover {
    transform: none !important;
  }

  body .standard-top-menu .menu-icon-button:hover .menu-icon-glyph {
    transform: none;
  }
}

html {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(980px 390px at 8% -12%, var(--app-bg-cyan-glow), transparent 64%),
    radial-gradient(780px 340px at 96% 2%, var(--app-bg-lime-glow), transparent 60%),
    linear-gradient(135deg, transparent 0 60%, var(--app-bg-ribbon) 60% 72%, transparent 72% 100%),
    linear-gradient(180deg, var(--app-bg-base) 0%, var(--app-bg-bottom) 58%, #fbfdfc 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

html,
body,
input,
select,
textarea,
option,
optgroup {
  color-scheme: only light !important;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(15, 143, 131, 0.2);
  outline-offset: 2px;
}

svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: currentColor;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.is-hidden {
  display: none !important;
}

.clinic-portal {
  min-height: 100vh;
  background:
    radial-gradient(980px 380px at 8% -14%, var(--app-bg-cyan-glow), transparent 62%),
    radial-gradient(760px 340px at 94% 2%, var(--app-bg-lime-glow), transparent 60%),
    linear-gradient(135deg, transparent 0 68%, var(--app-bg-ribbon) 68% 75%, transparent 75% 100%),
    linear-gradient(180deg, #fbfdfd 0%, var(--app-bg-bottom) 60%, #f9fcfb 100%);
}

.clinic-portal.franchise-portal {
  display: block;
  padding-left: 88px;
  transition: padding-left 0.22s ease;
}

.clinic-portal.franchise-portal:has(.portal-franchise-sidebar:hover),
.clinic-portal.franchise-portal:has(.portal-franchise-sidebar:focus-within) {
  padding-left: 268px;
}

body.franchise-sidebar-collapsed .clinic-portal.franchise-portal {
  padding-left: 88px;
}

body.franchise-sidebar-collapsed .clinic-portal.franchise-portal:has(.portal-franchise-sidebar:hover),
body.franchise-sidebar-collapsed .clinic-portal.franchise-portal:has(.portal-franchise-sidebar:focus-within) {
  padding-left: 268px;
}

.clinic-portal.franchise-portal .portal-franchise-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 90;
}

/* Portal da franqueadora — visual executivo */
.clinic-portal.franchise-portal,
body.franchise-sidebar-collapsed .clinic-portal.franchise-portal {
  min-height: 100vh;
  padding-left: 276px;
  background:
    radial-gradient(circle at 78% -8%, rgba(23, 191, 187, .17), transparent 29%),
    radial-gradient(circle at 98% 82%, rgba(192, 222, 40, .12), transparent 25%),
    linear-gradient(135deg, #eff9f8 0%, #fbfdfd 48%, #f5faef 100%);
}

.clinic-portal.franchise-portal:has(.portal-franchise-sidebar:hover),
.clinic-portal.franchise-portal:has(.portal-franchise-sidebar:focus-within),
body.franchise-sidebar-collapsed .clinic-portal.franchise-portal:has(.portal-franchise-sidebar:hover),
body.franchise-sidebar-collapsed .clinic-portal.franchise-portal:has(.portal-franchise-sidebar:focus-within) {
  padding-left: 276px;
}

.clinic-portal.franchise-portal .portal-franchise-sidebar,
body.franchise-sidebar-collapsed .clinic-portal.franchise-portal .portal-franchise-sidebar {
  width: 276px;
  padding: 22px 16px;
  border: 0;
  background:
    radial-gradient(circle at 3% 4%, rgba(47, 208, 200, .17), transparent 24%),
    linear-gradient(165deg, #062e42 0%, #064f61 52%, #087d78 125%);
  box-shadow: 18px 0 40px rgba(4, 41, 57, .18);
  color: #fff;
}

.clinic-portal.franchise-portal .portal-franchise-sidebar:hover,
.clinic-portal.franchise-portal .portal-franchise-sidebar:focus-within,
body.franchise-sidebar-collapsed .clinic-portal.franchise-portal .portal-franchise-sidebar:hover,
body.franchise-sidebar-collapsed .clinic-portal.franchise-portal .portal-franchise-sidebar:focus-within {
  width: 276px;
  padding: 22px 16px;
  box-shadow: 18px 0 40px rgba(4, 41, 57, .18);
}

.clinic-portal.franchise-portal .portal-franchise-sidebar .franchise-sidebar-brand {
  min-height: 104px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(236,255,249,.94));
  box-shadow: 0 15px 28px rgba(0, 18, 30, .16);
}

.clinic-portal.franchise-portal .portal-franchise-sidebar .franchise-sidebar-brand img,
.clinic-portal.franchise-portal .portal-franchise-sidebar:hover .franchise-sidebar-brand img,
.clinic-portal.franchise-portal .portal-franchise-sidebar:focus-within .franchise-sidebar-brand img {
  width: 142px;
  height: 82px;
}

.clinic-portal.franchise-portal .portal-franchise-sidebar .franchise-sidebar-nav,
.clinic-portal.franchise-portal .portal-franchise-sidebar:hover .franchise-sidebar-nav,
.clinic-portal.franchise-portal .portal-franchise-sidebar:focus-within .franchise-sidebar-nav {
  margin-top: 16px;
  opacity: 1;
  pointer-events: auto;
}

.clinic-portal.franchise-portal .portal-franchise-sidebar .franchise-sidebar-copy,
.clinic-portal.franchise-portal .portal-franchise-sidebar .franchise-sidebar-user-copy,
.clinic-portal.franchise-portal .portal-franchise-sidebar:hover .franchise-sidebar-copy,
.clinic-portal.franchise-portal .portal-franchise-sidebar:hover .franchise-sidebar-user-copy,
.clinic-portal.franchise-portal .portal-franchise-sidebar:focus-within .franchise-sidebar-copy,
.clinic-portal.franchise-portal .portal-franchise-sidebar:focus-within .franchise-sidebar-user-copy {
  display: grid;
}

.clinic-portal.franchise-portal .portal-franchise-sidebar .franchise-sidebar-item,
.clinic-portal.franchise-portal .portal-franchise-sidebar:hover .franchise-sidebar-item,
.clinic-portal.franchise-portal .portal-franchise-sidebar:focus-within .franchise-sidebar-item {
  min-height: 46px;
  justify-content: flex-start;
  border: 1px solid transparent;
  color: rgba(239,255,255,.8);
}

.clinic-portal.franchise-portal .portal-franchise-sidebar .franchise-sidebar-copy strong,
.clinic-portal.franchise-portal .portal-franchise-sidebar .franchise-sidebar-user-copy strong {
  color: inherit;
  font-size: 13px;
}

.clinic-portal.franchise-portal .portal-franchise-sidebar .franchise-sidebar-item.is-active,
.clinic-portal.franchise-portal .portal-franchise-sidebar .franchise-sidebar-item.is-active:hover {
  border-color: rgba(203,245,88,.2);
  background: linear-gradient(90deg, rgba(214,244,63,.2), rgba(255,255,255,.06));
  box-shadow: inset 3px 0 0 #d6f43f;
  color: #fff;
}

.clinic-portal.franchise-portal .portal-franchise-sidebar .franchise-sidebar-item:hover,
.clinic-portal.franchise-portal .portal-franchise-sidebar .franchise-sidebar-subitem:hover {
  border-color: rgba(255,255,255,.1);
  background: rgba(255,255,255,.08);
  color: #fff;
}

.clinic-portal.franchise-portal .portal-franchise-sidebar .franchise-sidebar-group[open] .franchise-sidebar-subnav,
.clinic-portal.franchise-portal .portal-franchise-sidebar:hover .franchise-sidebar-group[open] .franchise-sidebar-subnav,
.clinic-portal.franchise-portal .portal-franchise-sidebar:focus-within .franchise-sidebar-group[open] .franchise-sidebar-subnav {
  display: grid;
}

.clinic-portal.franchise-portal .portal-franchise-sidebar .franchise-sidebar-subitem {
  color: rgba(235,255,255,.66);
}

.clinic-portal.franchise-portal .portal-franchise-sidebar .franchise-sidebar-user,
.clinic-portal.franchise-portal .portal-franchise-sidebar:hover .franchise-sidebar-user,
.clinic-portal.franchise-portal .portal-franchise-sidebar:focus-within .franchise-sidebar-user {
  justify-content: flex-start;
  border-color: rgba(255,255,255,.13);
  background: rgba(1,27,40,.25);
}

.clinic-portal.franchise-portal .portal-franchise-sidebar .franchise-sidebar-user-copy small,
.clinic-portal.franchise-portal .portal-franchise-sidebar .franchise-profile-chevron { color: rgba(235,255,255,.58); }

.portal-main {
  width: min(1440px, calc(100% - 64px));
  margin: 0 auto;
  padding: 38px 0 60px;
}

.portal-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  overflow: hidden;
  margin-bottom: 22px;
  padding: 30px 34px;
  border: 1px solid rgba(12, 151, 155, .16);
  border-radius: 25px;
  background: linear-gradient(110deg, #06394d 0%, #086d75 56%, #0ca497 100%);
  box-shadow: 0 20px 42px rgba(7, 78, 89, .17);
  color: #fff;
}

.portal-hero::after {
  position: absolute;
  width: 280px;
  height: 280px;
  top: -175px;
  right: 7%;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%;
  box-shadow: 0 0 0 44px rgba(255,255,255,.05), 0 0 0 93px rgba(206,241,61,.08);
  content: "";
}

.portal-hero > *,
.portal-hero-highlight > * { position: relative; z-index: 1; }

.portal-hero > div > span,
.portal-clinic-heading > div > span {
  display: block;
  color: #d5f137;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .12em;
}

.portal-hero h1 { margin: 8px 0 7px; color: #fff; font-size: 34px; font-weight: 950; letter-spacing: -.04em; }
.portal-hero p { max-width: 560px; margin: 0; color: rgba(255,255,255,.8); font-size: 14px; font-weight: 650; line-height: 1.55; }

.portal-hero-highlight {
  min-width: 220px;
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 16px;
  background: rgba(1,37,49,.2);
  backdrop-filter: blur(8px);
}

.portal-hero-highlight small { color: #cdeff0; font-size: 9px; font-weight: 950; letter-spacing: .1em; }
.portal-hero-highlight strong { color: #fff; font-size: 15px; line-height: 1.35; }

.portal-actions {
  display: grid;
  grid-template-columns: minmax(260px, 1.15fr) minmax(360px, 1.12fr) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 29px;
  padding: 16px;
  border: 1px solid #d8ebe7;
  border-radius: 19px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 11px 27px rgba(18,65,75,.06);
}

.portal-clinic-search,
.quick-access { display: grid; gap: 6px; }

.portal-clinic-search > span,
.quick-access label {
  color: #49676e;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.quick-access label { max-width: none; line-height: 1.2; }
.quick-access label small { color: #8aa0a2; font-size: 9px; font-weight: 750; letter-spacing: 0; text-transform: none; }

.portal-clinic-search > div { position: relative; }
.portal-clinic-search svg { position: absolute; top: 50%; left: 13px; width: 17px; height: 17px; color: #5d8d91; transform: translateY(-50%); }

.portal-clinic-search input,
.quick-access input {
  width: 100%;
  height: 45px;
  border: 1px solid #cfe2df;
  border-radius: 12px;
  background: #fbfefd;
  color: #183f46;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.portal-clinic-search input { padding: 0 14px 0 39px; }
.quick-access { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.quick-access label { grid-column: 1 / -1; }
.quick-access input { min-width: 0; padding: 0 13px; }
.quick-access button,
.register-clinic-button {
  min-height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(100deg, #087f86, #0aad9f);
  box-shadow: 0 10px 20px rgba(8,132,133,.18);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.quick-access button { min-width: 85px; }
.register-clinic-button { padding: 0 17px; }
.quick-access button svg,
.register-clinic-button svg { width: 16px; height: 16px; }

.portal-clinic-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 2px 16px;
}

.portal-clinic-heading h2 { margin: 5px 0 0; color: #183b43; font-size: 22px; font-weight: 950; letter-spacing: -.025em; }
.portal-clinic-heading .muted-text { margin: 0; padding: 8px 12px; border-radius: 999px; background: #e7f7f3; color: #087b70; font-size: 12px; font-weight: 900; }

.clinic-bubble-field { grid-template-columns: repeat(auto-fill, minmax(275px, 1fr)); gap: 17px; }
.clinic-bubble { min-height: 224px; gap: 15px; padding: 20px; border-radius: 20px; box-shadow: 0 14px 30px rgba(14,69,78,.08); }
.clinic-bubble:hover { transform: translateY(-5px); box-shadow: 0 23px 42px rgba(10,77,83,.15); }
.clinic-id-pill { background: #e3f7f4; color: #067b76; font-size: 10px; letter-spacing: .04em; }
.clinic-bubble-main strong { color: #113b43; font-size: 18px; }
.clinic-enter-button { min-height: 42px; padding: 0 16px; border-radius: 12px; background: linear-gradient(105deg, #087f86, #0bb089); }

@media (max-width: 1050px) {
  .clinic-portal.franchise-portal,
  body.franchise-sidebar-collapsed .clinic-portal.franchise-portal { padding-left: 0; }
  .clinic-portal.franchise-portal .portal-franchise-sidebar { position: static; width: 100%; height: auto; min-height: 0; display: none; }
  .portal-main { width: min(100% - 32px, 900px); padding-top: 24px; }
  .portal-actions { grid-template-columns: 1fr 1fr; }
  .register-clinic-button { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .portal-main { width: min(100% - 22px, 580px); padding-top: 12px; }
  .portal-hero { align-items: flex-start; flex-direction: column; padding: 25px; }
  .portal-hero-highlight { min-width: 0; width: 100%; }
  .portal-actions { grid-template-columns: 1fr; }
  .quick-access { grid-template-columns: minmax(0, 1fr) auto; }
  .portal-clinic-heading { align-items: flex-start; flex-direction: column; }
}

.portal-header {
  height: 74px;
  display: flex;
  align-items: center;
  gap: 38px;
  padding: 0 clamp(16px, 3vw, 30px);
  background: #123c5c;
  color: #ffffff;
}

.portal-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-width: 136px;
  color: #ffffff;
  letter-spacing: 0;
}

.portal-logo span {
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.portal-logo strong {
  font-size: 26px;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.portal-dropdown {
  position: relative;
}

.portal-nav button {
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: #ffffff;
  font-weight: 700;
}

.portal-nav button::after {
  content: "";
  display: inline-block;
  margin-left: 8px;
  border-top: 5px solid currentColor;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  vertical-align: middle;
}

.portal-nav button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.portal-dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 80;
  display: none;
  min-width: 190px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(11, 34, 53, 0.2);
}

.portal-dropdown.is-open .portal-dropdown-panel {
  display: grid;
  gap: 4px;
}

.portal-dropdown-panel button {
  justify-content: flex-start;
  min-height: 38px;
  border-radius: 10px;
  color: #10243a;
  text-align: left;
}

.portal-dropdown-panel button::after {
  display: none;
}

.portal-dropdown-panel button:hover {
  background: #edf8fb;
  color: #007f9f;
}

.portal-main {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
  padding: 34px 0 54px;
}

.portal-access-row {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(440px, 540px);
  gap: 24px;
  align-items: center;
  margin-bottom: 34px;
}

.portal-heading h1 {
  color: #132436;
  font-size: 30px;
}

.quick-access {
  display: grid;
  grid-template-columns: auto minmax(190px, 1fr) minmax(150px, 198px);
  align-items: center;
  gap: 14px;
}

.quick-access label {
  max-width: 74px;
  color: #10243a;
  font-weight: 700;
  line-height: 1.45;
}

.quick-access input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #c7d1db;
  border-radius: 4px;
  background: #ffffff;
  color: var(--ink);
}

.portal-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.register-clinic-button {
  min-height: 38px;
}

.clinic-cloud-section {
  margin-top: 4px;
}

.clinic-cloud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.clinic-cloud-header h2 {
  color: #132436;
  font-size: 22px;
}

.clinic-filter-field {
  width: min(390px, 100%);
  height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid #c7d1db;
  border-radius: var(--radius);
  background: #ffffff;
  color: #6a7580;
}

.clinic-filter-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.clinic-bubble-field {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  align-items: start;
}

.clinic-bubble {
  position: relative;
  min-height: 210px;
  display: grid;
  gap: 14px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid #cfe4e6;
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 0%, rgba(13, 183, 204, 0.13), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 253, 252, 0.96));
  box-shadow: 0 16px 36px rgba(11, 34, 53, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.clinic-bubble::after {
  display: none;
}

.clinic-bubble::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #13b7cc, #9bd600);
}

.clinic-bubble:nth-child(3n + 2) {
  margin-top: 0;
}

.clinic-bubble:nth-child(4n) {
  margin-top: 0;
}

.clinic-bubble:hover {
  border-color: rgba(13, 183, 204, 0.44);
  box-shadow: 0 22px 46px rgba(11, 34, 53, 0.13);
  transform: translateY(-2px);
}

.clinic-bubble-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.clinic-bubble-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid #bfeceb;
  border-radius: 18px;
  background: linear-gradient(135deg, #e4fbf9, #f7fff0);
  color: #007f73;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.74);
}

.clinic-bubble-mark span {
  font-size: 14px;
  font-weight: 900;
}

.clinic-bubble-logo {
  width: 100%;
  height: 100%;
  padding: 4px;
  border-radius: 16px;
  object-fit: contain;
  box-sizing: border-box;
  background: #fff;
}

/* Comissão — identidade visual Tec Dent */
[data-view-panel="ConfigComissao"] .commission-page {
  min-height: calc(100vh - 74px);
  background:
    radial-gradient(circle at 94% 4%, rgba(20, 181, 194, .09), transparent 27%),
    linear-gradient(180deg, #f5fbfc 0, #fff 360px);
}

[data-view-panel="ConfigComissao"] .commission-content {
  width: min(1180px, calc(100% - 48px));
  padding: 26px 0 54px;
}

[data-view-panel="ConfigComissao"] .commission-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 22px 24px;
  border: 1px solid #d3e8eb;
  border-radius: 18px;
  background: linear-gradient(105deg, #e9faf9, #fff 72%);
  box-shadow: 0 12px 28px rgba(19, 66, 80, .07);
}

[data-view-panel="ConfigComissao"] .commission-page-header > div > span {
  display: block;
  margin-bottom: 4px;
  color: #078d9d;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .095em;
  text-transform: uppercase;
}

[data-view-panel="ConfigComissao"] .commission-title {
  margin: 0;
  color: #12334b;
  font-size: clamp(23px, 3vw, 30px);
  font-weight: 950;
  letter-spacing: -.025em;
}

[data-view-panel="ConfigComissao"] .commission-page-header p {
  margin: 6px 0 0;
  color: #60788a;
  font-size: 13px;
}

[data-view-panel="ConfigComissao"] .commission-page-header > button,
[data-view-panel="ConfigComissao"] .commission-search-button,
[data-view-panel="ConfigComissao"] .commission-rule-add-button,
[data-view-panel="ConfigComissao"] .commission-rule-actions button {
  min-height: 42px;
  padding: 0 17px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #168fc1, #10adbd);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(18, 142, 177, .2);
}

[data-view-panel="ConfigComissao"] .commission-page-header > button:hover,
[data-view-panel="ConfigComissao"] .commission-search-button:hover,
[data-view-panel="ConfigComissao"] .commission-rule-add-button:hover {
  filter: brightness(.96);
  transform: translateY(-1px);
}

[data-view-panel="ConfigComissao"] .commission-filter-card {
  display: grid;
  grid-template-columns: minmax(210px, 300px) auto;
  justify-content: end;
  min-height: auto;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px 18px;
  border: 1px solid #d8e9ec;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(20, 65, 78, .055);
}

[data-view-panel="ConfigComissao"] .commission-filter-card label {
  display: grid;
  grid-template-columns: auto minmax(145px, 1fr);
  gap: 9px;
}

[data-view-panel="ConfigComissao"] .commission-filter-card span {
  color: #50697a;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

[data-view-panel="ConfigComissao"] .commission-filter-card select,
[data-view-panel="ConfigComissao"] .commission-table-tools select,
[data-view-panel="ConfigComissao"] .commission-table-tools input,
[data-view-panel="ConfigComissao"] .commission-rule-grid input,
[data-view-panel="ConfigComissao"] .commission-rule-grid select {
  min-height: 42px;
  border: 1px solid #c9dde2;
  border-radius: 10px;
  background: #fff;
  color: #17364c;
  box-shadow: inset 0 1px 2px rgba(22, 61, 75, .025);
}

[data-view-panel="ConfigComissao"] .commission-table-tools {
  margin: 0;
  padding: 13px 16px;
  border: 1px solid #d9e9ec;
  border-bottom: 0;
  border-radius: 15px 15px 0 0;
  background: #fff;
  color: #5c7485;
  font-size: 12px;
}

[data-view-panel="ConfigComissao"] .commission-table-wrap {
  overflow: hidden;
  border: 1px solid #d9e9ec;
  border-radius: 0 0 15px 15px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(18, 62, 76, .06);
}

[data-view-panel="ConfigComissao"] .commission-table th,
[data-view-panel="ConfigComissao"] .commission-table td {
  height: 48px;
  padding: 10px 16px;
  border: 0;
  border-bottom: 1px solid #e2edef;
  color: #17334a;
}

[data-view-panel="ConfigComissao"] .commission-table th {
  height: 42px;
  background: linear-gradient(180deg, #e8f7f8, #e2f2f4);
  color: #426174;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .06em;
}

[data-view-panel="ConfigComissao"] .commission-table tbody tr:nth-child(even) { background: #f8fbfc; }
[data-view-panel="ConfigComissao"] .commission-table tbody tr:hover { background: #eefafa; }

[data-view-panel="ConfigComissao"] .commission-page-header.is-form { margin-bottom: 14px; }
[data-view-panel="ConfigComissao"] .commission-rule-card {
  min-height: 500px;
  padding: 22px;
  border: 1px solid #d6e8eb;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(18, 61, 75, .07);
}

[data-view-panel="ConfigComissao"] .commission-rule-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

[data-view-panel="ConfigComissao"] .commission-rule-grid label {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
}

[data-view-panel="ConfigComissao"] .commission-rule-grid span {
  color: #496577;
  font-size: 11px;
  text-align: left;
  letter-spacing: .04em;
  text-transform: uppercase;
}

[data-view-panel="ConfigComissao"] .commission-rule-tabs {
  align-items: center;
  gap: 7px;
  margin: 22px 0 18px;
  padding: 7px;
  border: 1px solid #d7e8eb;
  border-radius: 13px;
  background: #f5fafb;
}

[data-view-panel="ConfigComissao"] .commission-rule-tabs-title {
  margin: 0 8px 0 3px;
  padding: 0;
  color: #17364c;
  font-size: 15px;
  font-weight: 900;
}

[data-view-panel="ConfigComissao"] .commission-rule-tabs button {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 9px;
  color: #607687;
}
[data-view-panel="ConfigComissao"] .commission-rule-tabs button::after { display: none; }
[data-view-panel="ConfigComissao"] .commission-rule-tabs button.is-active {
  background: #fff;
  color: #087f8f;
  box-shadow: 0 4px 12px rgba(17, 76, 91, .09);
}

[data-view-panel="ConfigComissao"] .commission-standard-head,
[data-view-panel="ConfigComissao"] .commission-special-head {
  min-height: 44px;
  border-radius: 11px 11px 0 0;
  background: #e6f5f6;
  color: #446174;
  font-size: 10px;
  letter-spacing: .045em;
  text-transform: uppercase;
}

[data-view-panel="ConfigComissao"] .commission-standard-row,
[data-view-panel="ConfigComissao"] .commission-special-row {
  min-height: 50px;
  border-color: #dbe9ec;
}

[data-view-panel="ConfigComissao"] .commission-rule-actions {
  gap: 10px;
  padding-top: 22px;
}
[data-view-panel="ConfigComissao"] .commission-rule-actions [data-commission-rule-back] {
  background: #edf3f5;
  color: #526b7c;
  box-shadow: none;
}

@media (max-width: 760px) {
  [data-view-panel="ConfigComissao"] .commission-content { width: min(100% - 22px, 1180px); padding-top: 14px; }
  [data-view-panel="ConfigComissao"] .commission-page-header { align-items: stretch; flex-direction: column; padding: 18px; }
  [data-view-panel="ConfigComissao"] .commission-page-header > button { width: 100%; }
  [data-view-panel="ConfigComissao"] .commission-filter-card { grid-template-columns: 1fr; justify-content: stretch; }
  [data-view-panel="ConfigComissao"] .commission-search-button { width: 100%; justify-self: stretch; }
  [data-view-panel="ConfigComissao"] .commission-rule-grid { grid-template-columns: 1fr; }
  [data-view-panel="ConfigComissao"] .commission-rule-tabs { align-items: stretch; flex-direction: column; }
  [data-view-panel="ConfigComissao"] .commission-rule-tabs-title { padding: 7px; }
}

/* Dashboard Tec Dent — composição operacional sem faixa de título */
[data-view-panel="Resumo"] .home-board-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  padding-top: 30px;
}

[data-view-panel="Resumo"] .home-side-stack { display: contents; }

[data-view-panel="Resumo"] .home-finance-summary {
  order: -20;
  grid-column: 1 / -1;
}

[data-view-panel="Resumo"] .home-board-grid > .home-board:not(.home-large-board) {
  order: -10;
  grid-column: span 6;
}

[data-view-panel="Resumo"] .home-large-board {
  order: 0;
  grid-column: span 7;
}

[data-view-panel="Resumo"] .patient-home-widget {
  order: 0;
  grid-column: span 5;
}

[data-view-panel="Resumo"] .home-compact-row {
  order: 10;
  grid-column: 1 / -1;
}

[data-view-panel="Resumo"] .home-finance-metrics {
  gap: 16px;
}

[data-view-panel="Resumo"] .home-finance-metric {
  min-height: 104px;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-content: center;
  padding: 18px 20px;
  border: 1px solid #d7e7eb;
  border-left-width: 6px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 94% 8%, rgba(16,173,189,.11), transparent 34%),
    #fff;
  box-shadow: 0 12px 28px rgba(12, 54, 70, .08);
  position: relative;
  overflow: hidden;
}

[data-view-panel="Resumo"] .home-finance-metric::after {
  content: "";
  width: 48px;
  height: 48px;
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  border: 10px solid currentColor;
  border-radius: 50%;
  opacity: .07;
}

[data-view-panel="Resumo"] .home-finance-metric small {
  align-self: end;
  font-size: 10px;
}

[data-view-panel="Resumo"] .home-finance-metric strong {
  align-self: start;
  margin-top: 3px;
  font-size: 24px;
}

[data-view-panel="Resumo"] .home-board-grid > .home-board:not(.home-large-board),
[data-view-panel="Resumo"] .home-large-board,
[data-view-panel="Resumo"] .patient-home-widget {
  min-height: 206px;
}

[data-view-panel="Resumo"] .patient-home-widget {
  align-self: stretch;
}

[data-view-panel="Resumo"] .home-compact-row > .home-board {
  min-height: 205px;
}

[data-view-panel="Resumo"] .home-compact-row .home-negative-scroll {
  max-height: 142px;
}

[data-view-panel="Resumo"] .home-compact-row .home-day-info-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

[data-view-panel="Resumo"] .home-compact-row .home-day-info-list button {
  min-height: 50px;
  padding: 0 14px;
}

@media (max-width: 980px) {
  [data-view-panel="Resumo"] .home-board-grid > .home-board:not(.home-large-board),
  [data-view-panel="Resumo"] .home-large-board,
  [data-view-panel="Resumo"] .patient-home-widget {
    grid-column: 1 / -1;
  }
}

/* Cadastro de origens do paciente */
[data-view-panel="CadastroOrigens"] .patient-origin-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #f3f9fb 0, #ffffff 340px);
}

[data-view-panel="CadastroOrigens"] .payment-method-content {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 16px 0 42px;
}

[data-view-panel="CadastroOrigens"] .patient-origin-header {
  justify-content: space-between;
}

.patient-origin-header-icon {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 10px 24px rgba(3, 53, 86, 0.16);
  position: relative;
  z-index: 1;
}

.patient-origin-header-icon svg {
  width: 28px;
  height: 28px;
}

[data-view-panel="CadastroOrigens"] .payment-method-action-card,
[data-view-panel="CadastroOrigens"] .payment-method-detail-card {
  border: 1px solid #d9e9ee;
  border-radius: 17px;
  background: #ffffff;
  box-shadow: 0 9px 26px rgba(14, 52, 75, 0.07);
}

[data-view-panel="CadastroOrigens"] .payment-method-action-card {
  min-height: 76px;
  margin-bottom: 12px;
  padding: 14px 18px;
}

[data-view-panel="CadastroOrigens"] .payment-method-action-card .blue-action {
  width: fit-content;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(110deg, #0878b0, #12ad9e);
  color: #ffffff;
  font-weight: 850;
  box-shadow: 0 7px 16px rgba(8, 117, 160, 0.18);
}

[data-view-panel="CadastroOrigens"] .payment-method-action-card .blue-action svg {
  width: 17px;
  height: 17px;
}

[data-view-panel="CadastroOrigens"] .payment-method-action-card label {
  color: #607684;
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

[data-view-panel="CadastroOrigens"] :is(select, input) {
  border-color: #cfdee4;
  border-radius: 10px;
  color: #123a52;
}

[data-view-panel="CadastroOrigens"] .payment-method-table-tools {
  min-height: 54px;
  margin-bottom: 10px;
  padding: 6px 10px;
  border: 1px solid #e0ebef;
  border-radius: 13px;
  background: #f8fbfc;
}

[data-view-panel="CadastroOrigens"] .payment-method-table-wrap {
  padding: 5px 10px 10px;
  border: 1px solid #dce9ee;
  border-radius: 17px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(14, 52, 75, 0.06);
}

[data-view-panel="CadastroOrigens"] .patient-origin-table {
  border-collapse: separate;
  border-spacing: 0 7px;
}

[data-view-panel="CadastroOrigens"] .patient-origin-table th {
  padding: 9px 12px;
  border: 0;
  background: transparent;
  color: #6a7e8b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

[data-view-panel="CadastroOrigens"] .patient-origin-table td {
  padding: 11px 12px;
  border-width: 1px 0;
  border-color: #e1ecef;
  background: #f7fafb;
  color: #12384f;
  font-weight: 700;
}

[data-view-panel="CadastroOrigens"] .patient-origin-table td:first-child {
  width: 60%;
  border-left-width: 1px;
  border-radius: 12px 0 0 12px;
  color: #083b65;
  font-weight: 850;
}

[data-view-panel="CadastroOrigens"] .patient-origin-table td:last-child {
  width: 90px;
  border-right-width: 1px;
  border-radius: 0 12px 12px 0;
}

[data-view-panel="CadastroOrigens"] .patient-origin-table tbody tr:nth-child(even) {
  background: transparent;
}

.patient-origin-name {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.patient-origin-name svg {
  width: 18px;
  height: 18px;
  color: #0a9d9d;
}

[data-view-panel="CadastroOrigens"] .payment-method-edit-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #c8e7e3;
  border-radius: 10px;
  background: #eaf9f6;
  color: #078d79;
}

[data-view-panel="CadastroOrigens"] .payment-method-edit-button:disabled,
.status-switch:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

[data-view-panel="CadastroOrigens"] .payment-method-detail-card {
  gap: 16px;
  padding: 20px;
}

[data-view-panel="CadastroOrigens"] .payment-method-detail-row {
  grid-template-columns: 1fr;
  gap: 5px;
}

[data-view-panel="CadastroOrigens"] .payment-method-detail-row > span {
  color: #607684;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

[data-view-panel="CadastroOrigens"] .payment-method-detail-row input {
  min-height: 44px;
}

@media (max-width: 700px) {
  [data-view-panel="CadastroOrigens"] .payment-method-content {
    width: calc(100% - 20px);
  }

  [data-view-panel="CadastroOrigens"] .payment-method-action-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  [data-view-panel="CadastroOrigens"] .payment-method-action-card label {
    justify-self: stretch;
  }

  [data-view-panel="CadastroOrigens"] .payment-method-action-card .blue-action {
    width: 100%;
  }

  .patient-origin-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }
}

/* Franqueadora — navegação premium unificada */
@media (min-width: 1051px) {
  .franchise-sidebar,
  body.franchise-sidebar-collapsed .franchise-sidebar {
    width: 276px;
    padding: 20px 16px;
    border: 0;
    background:
      radial-gradient(circle at 0 0, rgba(45,207,196,.18), transparent 25%),
      linear-gradient(165deg, #062d42, #075265 57%, #078075 125%);
    box-shadow: 18px 0 42px rgba(3,37,53,.2);
    color: #fff;
  }

  .franchise-sidebar:hover,
  .franchise-sidebar:focus-within,
  body.franchise-sidebar-collapsed .franchise-sidebar:hover,
  body.franchise-sidebar-collapsed .franchise-sidebar:focus-within {
    width: 276px;
    padding: 20px 16px;
    box-shadow: 18px 0 42px rgba(3,37,53,.2);
  }

  .franchise-sidebar .franchise-sidebar-brand,
  body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-brand {
    min-height: 96px;
    border-radius: 19px;
    background: linear-gradient(135deg, #fff, #e7fff8);
    box-shadow: 0 13px 27px rgba(0,20,30,.17);
  }

  .franchise-sidebar .franchise-sidebar-brand img,
  .franchise-sidebar:hover .franchise-sidebar-brand img,
  .franchise-sidebar:focus-within .franchise-sidebar-brand img,
  body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-brand img {
    width: 132px;
    height: 76px;
  }

  .franchise-sidebar-toggle {
    width: 100%;
    min-height: 39px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 12px;
    background: rgba(0,27,41,.22);
    color: rgba(239,255,255,.86);
    cursor: pointer;
    font-size: 11px;
    font-weight: 850;
  }

  .franchise-sidebar-toggle:hover { background: rgba(255,255,255,.12); color: #fff; }
  .franchise-sidebar-toggle svg { width: 17px; height: 17px; }

  .franchise-sidebar .franchise-sidebar-nav,
  .franchise-sidebar:hover .franchise-sidebar-nav,
  .franchise-sidebar:focus-within .franchise-sidebar-nav,
  body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-nav {
    margin-top: 12px;
    opacity: 1;
    pointer-events: auto;
  }

  .franchise-sidebar .franchise-sidebar-copy,
  .franchise-sidebar .franchise-sidebar-user-copy,
  .franchise-sidebar:hover .franchise-sidebar-copy,
  .franchise-sidebar:hover .franchise-sidebar-user-copy,
  .franchise-sidebar:focus-within .franchise-sidebar-copy,
  .franchise-sidebar:focus-within .franchise-sidebar-user-copy,
  body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-copy,
  body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-user-copy {
    display: grid;
  }

  .franchise-sidebar .franchise-sidebar-item,
  .franchise-sidebar:hover .franchise-sidebar-item,
  .franchise-sidebar:focus-within .franchise-sidebar-item,
  body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-item {
    min-height: 45px;
    justify-content: flex-start;
    gap: 11px;
    color: rgba(237,255,255,.78);
  }

  .franchise-sidebar-icon {
    width: 19px;
    height: 19px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
  }

  .franchise-sidebar .franchise-sidebar-copy strong,
  .franchise-sidebar .franchise-sidebar-user-copy strong { color: inherit; font-size: 13px; }

  .franchise-sidebar .franchise-sidebar-item.is-active,
  .franchise-sidebar .franchise-sidebar-item.is-active:hover {
    border-color: rgba(210,244,66,.19);
    background: linear-gradient(90deg, rgba(210,244,66,.19), rgba(255,255,255,.06));
    box-shadow: inset 3px 0 0 #d2f442;
    color: #fff;
  }

  .franchise-sidebar .franchise-sidebar-item:hover,
  .franchise-sidebar .franchise-sidebar-subitem:hover {
    border-color: rgba(255,255,255,.12);
    background: rgba(255,255,255,.09);
    color: #fff;
  }

  .franchise-sidebar .franchise-sidebar-subitem { color: rgba(237,255,255,.64); }
  .franchise-sidebar .franchise-sidebar-user,
  .franchise-sidebar:hover .franchise-sidebar-user,
  .franchise-sidebar:focus-within .franchise-sidebar-user,
  body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-user {
    justify-content: flex-start;
    border-color: rgba(255,255,255,.13);
    background: rgba(0,25,39,.22);
  }

  .franchise-sidebar .franchise-sidebar-user-copy small,
  .franchise-sidebar .franchise-profile-chevron { color: rgba(236,255,255,.58); }

  body:not(.franchise-sidebar-collapsed) .clinic-portal.franchise-portal,
  body:not(.franchise-sidebar-collapsed) .workspace-view.access-manager-dialog.is-active:has(> .franchise-sidebar),
  body:not(.franchise-sidebar-collapsed) .workspace-view.profile-manager-dialog.is-active:has(> .franchise-sidebar) {
    padding-left: 276px;
  }

  body.franchise-sidebar-collapsed .clinic-portal.franchise-portal,
  body.franchise-sidebar-collapsed .workspace-view.access-manager-dialog.is-active:has(> .franchise-sidebar),
  body.franchise-sidebar-collapsed .workspace-view.profile-manager-dialog.is-active:has(> .franchise-sidebar) {
    padding-left: 88px;
  }

  body.franchise-sidebar-collapsed .franchise-sidebar,
  body.franchise-sidebar-collapsed .franchise-sidebar:hover,
  body.franchise-sidebar-collapsed .franchise-sidebar:focus-within {
    width: 88px;
    padding: 20px 10px;
  }

  body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-brand,
  body.franchise-sidebar-collapsed .franchise-sidebar:hover .franchise-sidebar-brand,
  body.franchise-sidebar-collapsed .franchise-sidebar:focus-within .franchise-sidebar-brand { min-height: 66px; }

  body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-brand img,
  body.franchise-sidebar-collapsed .franchise-sidebar:hover .franchise-sidebar-brand img,
  body.franchise-sidebar-collapsed .franchise-sidebar:focus-within .franchise-sidebar-brand img { width: 54px; height: 54px; }

  body.franchise-sidebar-collapsed .franchise-sidebar-toggle { width: 42px; justify-self: center; padding: 0; }
  body.franchise-sidebar-collapsed .franchise-sidebar-toggle span,
  body.franchise-sidebar-collapsed .franchise-sidebar-copy,
  body.franchise-sidebar-collapsed .franchise-sidebar-user-copy,
  body.franchise-sidebar-collapsed .franchise-profile-chevron { display: none !important; }
  body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-item { justify-content: center; padding: 7px; }
  body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-icon { width: 21px; height: 21px; }
  body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-group[open] .franchise-sidebar-subnav { display: none; }

  body.franchise-sidebar-collapsed .clinic-portal.franchise-portal .portal-franchise-sidebar,
  body.franchise-sidebar-collapsed .clinic-portal.franchise-portal .portal-franchise-sidebar:hover,
  body.franchise-sidebar-collapsed .clinic-portal.franchise-portal .portal-franchise-sidebar:focus-within {
    width: 88px;
    padding: 20px 10px;
  }

  body.franchise-sidebar-collapsed .clinic-portal.franchise-portal .portal-franchise-sidebar .franchise-sidebar-copy,
  body.franchise-sidebar-collapsed .clinic-portal.franchise-portal .portal-franchise-sidebar .franchise-sidebar-user-copy {
    display: none !important;
  }

  body.franchise-sidebar-collapsed .franchise-sidebar:hover,
  body.franchise-sidebar-collapsed .franchise-sidebar:focus-within,
  body.franchise-sidebar-collapsed .clinic-portal.franchise-portal .portal-franchise-sidebar:hover,
  body.franchise-sidebar-collapsed .clinic-portal.franchise-portal .portal-franchise-sidebar:focus-within {
    width: 276px;
    padding: 20px 16px;
    box-shadow: 18px 0 42px rgba(3,37,53,.2);
  }

  body.franchise-sidebar-collapsed .franchise-sidebar:hover .franchise-sidebar-brand,
  body.franchise-sidebar-collapsed .franchise-sidebar:focus-within .franchise-sidebar-brand {
    min-height: 96px;
  }

  body.franchise-sidebar-collapsed .franchise-sidebar:hover .franchise-sidebar-brand img,
  body.franchise-sidebar-collapsed .franchise-sidebar:focus-within .franchise-sidebar-brand img {
    width: 132px;
    height: 76px;
  }

  body.franchise-sidebar-collapsed .franchise-sidebar:hover .franchise-sidebar-toggle,
  body.franchise-sidebar-collapsed .franchise-sidebar:focus-within .franchise-sidebar-toggle {
    width: 100%;
    justify-self: stretch;
    padding: 0 12px;
  }

  body.franchise-sidebar-collapsed .franchise-sidebar:hover .franchise-sidebar-toggle span,
  body.franchise-sidebar-collapsed .franchise-sidebar:hover .franchise-sidebar-copy,
  body.franchise-sidebar-collapsed .franchise-sidebar:hover .franchise-sidebar-user-copy,
  body.franchise-sidebar-collapsed .franchise-sidebar:focus-within .franchise-sidebar-toggle span,
  body.franchise-sidebar-collapsed .franchise-sidebar:focus-within .franchise-sidebar-copy,
  body.franchise-sidebar-collapsed .franchise-sidebar:focus-within .franchise-sidebar-user-copy,
  body.franchise-sidebar-collapsed .clinic-portal.franchise-portal .portal-franchise-sidebar:hover .franchise-sidebar-copy,
  body.franchise-sidebar-collapsed .clinic-portal.franchise-portal .portal-franchise-sidebar:hover .franchise-sidebar-user-copy,
  body.franchise-sidebar-collapsed .clinic-portal.franchise-portal .portal-franchise-sidebar:focus-within .franchise-sidebar-copy,
  body.franchise-sidebar-collapsed .clinic-portal.franchise-portal .portal-franchise-sidebar:focus-within .franchise-sidebar-user-copy {
    display: grid !important;
  }

  body.franchise-sidebar-collapsed .franchise-sidebar:hover .franchise-sidebar-item,
  body.franchise-sidebar-collapsed .franchise-sidebar:focus-within .franchise-sidebar-item {
    justify-content: flex-start;
    padding: 7px 14px;
  }

  body.franchise-sidebar-collapsed .franchise-sidebar:hover .franchise-sidebar-icon,
  body.franchise-sidebar-collapsed .franchise-sidebar:focus-within .franchise-sidebar-icon {
    width: 19px;
    height: 19px;
  }

  .workspace-view.access-manager-dialog,
  .workspace-view.profile-manager-dialog { background: linear-gradient(135deg, #eff8f7 0%, #fff 48%, #f4faee 100%); }
  .workspace-view.access-manager-dialog .access-manager-header,
  .workspace-view.profile-manager-dialog .access-manager-header {
    border-bottom-color: rgba(12,153,157,.14);
    background: rgba(255,255,255,.7);
    backdrop-filter: blur(10px);
  }
}

@media (max-width: 680px) {
  [data-view-panel="Resumo"] .home-finance-metrics,
  [data-view-panel="Resumo"] .home-compact-row,
  [data-view-panel="Resumo"] .home-compact-row .home-day-info-list {
    grid-template-columns: 1fr;
  }

  [data-view-panel="Resumo"] .home-finance-metric { min-height: 92px; }
}

/* Dashboard Tec Dent — experiência inspirada em widgets de telefone */
[data-view-panel="Resumo"].dashboard-home {
  background: #f2f2f7;
}

/* Dashboard telefone — indicadores novamente abaixo de Paciente */
[data-view-panel="Resumo"] .home-side-stack {
  order: 0;
  grid-column: span 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-content: start;
}

[data-view-panel="Resumo"] .home-side-stack > :is(.patient-home-widget, .home-finance-summary, .home-compact-row) {
  order: initial;
  grid-column: 1 / -1;
}

[data-view-panel="Resumo"] .home-side-stack .patient-home-widget {
  min-height: 146px;
}

[data-view-panel="Resumo"] .home-side-stack .home-finance-summary {
  min-height: auto;
}

[data-view-panel="Resumo"] .home-side-stack .home-finance-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

[data-view-panel="Resumo"] .home-side-stack .home-finance-metric {
  min-height: 76px;
  grid-template-columns: 38px minmax(0, 1fr);
  column-gap: 9px;
  padding: 11px 10px;
  border-radius: 16px;
}

[data-view-panel="Resumo"] .home-side-stack .home-finance-metric::before {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 15px;
}

[data-view-panel="Resumo"] .home-side-stack .home-finance-metric small {
  overflow: hidden;
  font-size: 8px;
  line-height: 1.2;
  text-overflow: ellipsis;
}

[data-view-panel="Resumo"] .home-side-stack .home-finance-metric strong {
  margin-top: 2px;
  font-size: 17px;
}

[data-view-panel="Resumo"] .home-side-stack .home-compact-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

[data-view-panel="Resumo"] .home-side-stack .home-compact-row > .home-board {
  min-height: 205px;
}

[data-view-panel="Resumo"] .home-side-stack .home-compact-row .home-day-info-list {
  grid-template-columns: 1fr;
  gap: 6px;
}

[data-view-panel="Resumo"] .home-side-stack .home-compact-row .home-day-info-list button {
  min-height: 34px;
  padding: 0 10px;
}

@media (max-width: 980px) {
  [data-view-panel="Resumo"] .home-side-stack {
    grid-column: 1 / -1;
  }
}

/* Agenda clínica Tec Dent */
.agenda-workspace {
  background: #f3f8f8;
  min-height: calc(100vh - 110px);
}

.agenda-shell {
  display: grid;
  gap: 16px;
  width: min(100% - 36px, 1460px);
  margin: 0 auto;
  padding: 24px 0 40px;
}

.agenda-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 102px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 10%, rgba(255,255,255,.28), transparent 25%),
    linear-gradient(120deg, #087f74, #0eaa8d 58%, #39c0bd);
  color: #fff;
  padding: 20px 24px;
  box-shadow: 0 18px 38px rgba(8, 112, 101, .18);
}

.agenda-header span,
.agenda-dialog-header span {
  display: block;
  color: rgba(255,255,255,.78);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .12em;
}

.agenda-header h2 {
  margin: 3px 0 2px;
  color: #fff;
  font-size: 28px;
}

.agenda-header small {
  color: rgba(255,255,255,.86);
  font-weight: 700;
}

.agenda-new-button,
.agenda-save-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 15px;
  background: #fff;
  color: #087f74;
  cursor: pointer;
  font-weight: 950;
  padding: 0 18px;
  box-shadow: 0 12px 26px rgba(4, 74, 68, .2);
}

.agenda-new-button svg,
.agenda-save-button svg,
.agenda-delete-button svg {
  width: 18px;
  height: 18px;
}

.agenda-command-bar,
.agenda-filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #d4e9e5;
  border-radius: 19px;
  background: #fff;
  padding: 13px 15px;
  box-shadow: 0 10px 26px rgba(16, 54, 62, .06);
}

.agenda-date-navigation,
.agenda-view-switch {
  display: flex;
  align-items: center;
  gap: 7px;
}

.agenda-date-navigation > button,
.agenda-view-switch button,
.agenda-clear-filters {
  min-height: 39px;
  border: 1px solid #cce3de;
  border-radius: 11px;
  background: #f7fcfb;
  color: #315b5c;
  cursor: pointer;
  font-weight: 900;
  padding: 0 13px;
}

.agenda-date-navigation > button:first-child,
.agenda-date-navigation > button:nth-child(3) {
  width: 40px;
  padding: 0;
  color: #087f74;
  font-size: 25px;
}

.agenda-date-navigation .agenda-today-button {
  border-color: #9edbcd;
  background: #e9faf5;
  color: #087f74;
}

.agenda-view-switch {
  border-radius: 13px;
  background: #eef7f5;
  padding: 4px;
}

.agenda-view-switch button {
  min-height: 36px;
  border: 0;
  background: transparent;
}

.agenda-view-switch button.is-active {
  background: #087f74;
  color: #fff;
  box-shadow: 0 7px 16px rgba(8,127,116,.2);
}

.agenda-date-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 5px;
  color: #456a6b;
  font-size: 11px;
  font-weight: 900;
}

.agenda-date-picker button {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #cce3de;
  border-radius: 11px;
  background: #fff;
  color: #173d42;
  font: inherit;
  cursor: pointer;
  padding: 0 10px;
}

.agenda-date-picker button strong { font-size: 13px; }
.agenda-date-picker button svg { width: 16px; height: 16px; color: #087f74; }

.agenda-filter-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, .8fr)) minmax(220px, 1.35fr) auto;
  align-items: end;
}

.agenda-filter-panel label {
  display: grid;
  gap: 6px;
}

.agenda-filter-panel label > span {
  color: #31575b;
  font-size: 11px;
  font-weight: 950;
}

.agenda-filter-panel select,
.agenda-filter-panel input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid #cbdeda;
  border-radius: 12px;
  background: #fbfefd;
  color: #173d42;
  font: inherit;
  padding: 0 11px;
}

.agenda-patient-filter > div {
  position: relative;
}

.agenda-patient-filter svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 17px;
  height: 17px;
  color: #6b9291;
  transform: translateY(-50%);
}

.agenda-patient-filter input {
  padding-left: 38px;
}

.agenda-clear-filters {
  min-height: 42px;
  white-space: nowrap;
}

.agenda-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}

.agenda-overview article {
  position: relative;
  overflow: hidden;
  min-height: 80px;
  border: 1px solid #d8ebe7;
  border-left: 5px solid #158db3;
  border-radius: 17px;
  background: #fff;
  padding: 13px 16px;
  box-shadow: 0 9px 22px rgba(16,54,62,.055);
}

.agenda-overview article.is-confirmed { border-left-color: #12a76f; }
.agenda-overview article.is-waiting { border-left-color: #e4a20c; }
.agenda-overview article.is-open { border-left-color: #8b6dca; }

.agenda-overview span {
  color: #668082;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.agenda-overview strong {
  display: block;
  margin-top: 5px;
  color: #123b42;
  font-size: 25px;
}

.agenda-board-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d4e9e5;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(16,54,62,.08);
}

.agenda-board-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid #dcebe8;
  padding: 16px 19px;
}

.agenda-board-heading span,
.agenda-board-heading small {
  color: #6b8586;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.agenda-board-heading h3 {
  margin: 3px 0 0;
  color: #123b42;
  font-size: 19px;
}

.agenda-board {
  min-width: 0;
}

.agenda-day-scroll {
  max-height: 680px;
  overflow: auto;
}

.agenda-professional-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  border-bottom: 1px solid #dcebe8;
  background: #fbfefd;
  padding: 10px 16px;
}

.agenda-professional-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #48686b;
  font-size: 10px;
  font-weight: 900;
}

.agenda-professional-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--agenda-professional-color);
}

.agenda-day-scroll.is-single-professional .agenda-day-grid {
  grid-template-columns: 76px minmax(250px, 560px);
  width: min(100%, 636px) !important;
}

.agenda-day-scroll.is-single-professional .agenda-slot {
  max-width: 560px;
}

.agenda-day-grid {
  display: grid;
  grid-template-columns: 76px repeat(var(--agenda-columns), var(--agenda-column-width, 230px));
}

.agenda-day-grid-header {
  position: sticky;
  top: 0;
  z-index: 8;
  border-bottom: 1px solid #d7e8e4;
  background: #f3faf8;
}

.agenda-corner,
.agenda-professional-head {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-right: 1px solid #dcebe8;
  padding: 9px 12px;
}

button.agenda-professional-head {
  width: 100%;
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

button.agenda-professional-head:hover {
  background: #e7f6f2;
}

button.agenda-professional-head:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid #49b8a6;
  outline-offset: -3px;
}

.agenda-corner {
  justify-content: center;
  color: #668082;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.agenda-professional-head > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--agenda-professional-color);
  color: #fff;
  font-weight: 950;
}

.agenda-professional-head strong {
  color: #1b4449;
  font-size: 12px;
  line-height: 1.25;
}

.agenda-time-row > time {
  min-height: 68px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  border-right: 1px solid #dcebe8;
  border-bottom: 1px solid #e2efec;
  color: #587375;
  font-size: 11px;
  font-weight: 900;
  padding-top: 9px;
}

.agenda-slot {
  position: relative;
  min-height: 68px;
  display: grid;
  gap: 4px;
  align-content: start;
  border-right: 1px solid #dcebe8;
  border-bottom: 1px solid #e2efec;
  background: #fff;
  padding: 4px;
}

.agenda-time-row:nth-child(odd) .agenda-slot {
  background: #fcfefd;
}

.agenda-slot-add {
  position: absolute;
  inset: 4px;
  border: 1px dashed transparent;
  border-radius: 10px;
  background: transparent;
  color: transparent;
  cursor: pointer;
  font-size: 20px;
}

.agenda-slot:hover .agenda-slot-add {
  border-color: #a8ddd1;
  background: #effbf7;
  color: #15977d;
}

.agenda-event {
  position: relative;
  width: 100%;
  min-height: 57px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1px 7px;
  align-content: center;
  border: 0;
  border-left: 5px solid var(--agenda-specialty-color, #62878d);
  border-radius: 9px;
  background: var(--agenda-status-bg, #dceff6);
  color: var(--agenda-status-text, #185c74);
  cursor: pointer;
  text-align: left;
  padding: 6px 8px;
  transition: transform .14s ease, box-shadow .14s ease;
}

.agenda-event:hover {
  z-index: 3;
  transform: translateY(-1px);
  box-shadow: 0 9px 20px rgba(16,54,62,.16);
}

.agenda-event-time {
  grid-row: 1 / 3;
  align-self: center;
  border-radius: 7px;
  background: rgba(255,255,255,.72);
  color: inherit;
  font-size: 10px;
  font-weight: 950;
  padding: 5px 6px;
}

.agenda-event strong,
.agenda-event em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agenda-event strong { padding-right: 7px; font-size: 11px; }
.agenda-event em { color: var(--agenda-status-muted, #42788a); font-size: 9px; font-style: normal; font-weight: 800; }

.agenda-hover-card {
  position: fixed;
  z-index: 8000;
  width: min(340px, calc(100vw - 24px));
  border: 1px solid #b9ddd6;
  border-radius: 18px;
  background: rgba(255,255,255,.98);
  color: #173d42;
  padding: 15px;
  box-shadow: 0 20px 46px rgba(10,55,58,.23);
  pointer-events: none;
  animation: agendaHoverIn .14s ease-out;
}

.agenda-hover-card::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 20px;
  width: 13px;
  height: 13px;
  border-left: 1px solid #b9ddd6;
  border-bottom: 1px solid #b9ddd6;
  background: #fff;
  transform: rotate(45deg);
}

.agenda-hover-card.is-left::before {
  right: -7px;
  left: auto;
  border: 0;
  border-right: 1px solid #b9ddd6;
  border-top: 1px solid #b9ddd6;
}

.agenda-hover-card > strong {
  display: block;
  margin: 8px 0 11px;
  color: #0e3d43;
  font-size: 16px;
}

.agenda-hover-status,
.agenda-list-status {
  display: inline-flex;
  border-radius: 999px;
  background: #e8f6fb;
  color: #16708b;
  font-size: 9px;
  font-weight: 950;
  padding: 5px 8px;
}

.agenda-hover-status.is-confirmed,
.agenda-list-status.is-confirmed { background: #e4f8ee; color: #08794b; }
.agenda-hover-status.is-waiting,
.agenda-list-status.is-waiting { background: #fff3d3; color: #916506; }
.agenda-hover-status.is-cancelled,
.agenda-list-status.is-cancelled { background: #f2def3; color: #760b79; }
.agenda-hover-status.is-finished,
.agenda-list-status.is-finished { background: #171717; color: #fff; }
.agenda-hover-status.is-attending,
.agenda-list-status.is-attending { background: #dff5f0; color: #076d61; }
.agenda-hover-status.is-no-show,
.agenda-list-status.is-no-show { background: #ffe0de; color: #a71919; }
.agenda-hover-status.is-extra,
.agenda-list-status.is-extra { background: #ffead0; color: #8c4d00; }
.agenda-hover-status.is-rescheduled,
.agenda-list-status.is-rescheduled { background: #fff1bd; color: #725600; }
.agenda-hover-status.is-blocked,
.agenda-list-status.is-blocked { background: #e8e2ff; color: #5140ad; }

.agenda-hover-card dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 12px;
  margin: 0;
}

.agenda-hover-card dl div {
  min-width: 0;
  border-top: 1px solid #e2eeeb;
  padding-top: 7px;
}

.agenda-hover-card dl .is-full { grid-column: 1 / -1; }
.agenda-hover-card dt { color: #789091; font-size: 9px; font-weight: 950; text-transform: uppercase; }
.agenda-hover-card dd { margin: 2px 0 0; color: #244c50; font-size: 11px; font-weight: 800; overflow-wrap: anywhere; }

@keyframes agendaHoverIn {
  from { opacity: 0; transform: translateY(4px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.agenda-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(170px, 1fr));
  gap: 0;
  min-width: 1190px;
  overflow-x: auto;
}

.agenda-week-day {
  min-height: 470px;
  border-right: 1px solid #dcebe8;
  background: #fcfefd;
}

.agenda-week-day > header {
  min-height: 76px;
  display: grid;
  place-items: center;
  align-content: center;
  border-bottom: 1px solid #dcebe8;
  background: #f5faf9;
}

.agenda-week-day > header span,
.agenda-week-day > header small { color: #6d8687; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.agenda-week-day > header strong { color: #173d42; font-size: 23px; }
.agenda-week-day.is-today > header { background: #e5f8f2; }
.agenda-week-day.is-today > header strong { color: #087f74; }
.agenda-week-events { display: grid; gap: 7px; align-content: start; padding: 8px; }
.agenda-event.is-compact { min-height: 64px; }

.agenda-week-empty {
  min-height: 70px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  border: 1px dashed #c5dfd9;
  border-radius: 12px;
  background: transparent;
  color: #83a19f;
  cursor: pointer;
}
.agenda-week-empty b { font-size: 20px; }
.agenda-week-empty span { font-size: 10px; font-weight: 900; }

.agenda-list-view { display: grid; gap: 8px; padding: 12px; }
.agenda-list-item {
  display: grid;
  grid-template-columns: 76px minmax(220px, 1fr) auto 56px;
  gap: 13px;
  align-items: center;
  border: 1px solid #d8e9e5;
  border-left: 5px solid var(--agenda-specialty-color, #62878d);
  border-radius: 14px;
  background: var(--agenda-status-bg, #fff);
  color: var(--agenda-status-text, #173d42);
  padding: 11px 13px;
}
.agenda-list-item time { display: grid; }
.agenda-list-item time strong { color: var(--agenda-status-text, #087f74); font-size: 16px; }
.agenda-list-item time span,
.agenda-list-item div small { color: var(--agenda-status-muted, #71898a); font-size: 10px; font-weight: 800; }
.agenda-list-item div { min-width: 0; }
.agenda-list-item div strong,
.agenda-list-item div small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda-list-item button { min-height: 34px; border: 0; border-radius: 10px; background: #e8f7f3; color: #087f74; cursor: pointer; font-weight: 900; }

.agenda-empty {
  min-height: 320px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: #658081;
  text-align: center;
}
.agenda-empty > span { font-size: 34px; }
.agenda-empty strong { color: #234b50; }

.agenda-dialog {
  width: min(820px, calc(100vw - 28px));
  max-height: calc(100vh - 30px);
  overflow: auto;
  border: 0;
  border-radius: 23px;
  padding: 0;
  box-shadow: 0 28px 70px rgba(8, 48, 53, .3);
}

.agenda-dialog::backdrop { background: rgba(11, 35, 45, .56); backdrop-filter: blur(3px); }
.agenda-form { margin: 0; background: #f7fbfa; }
.agenda-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(120deg, #087f74, #11aa8c 65%, #35bbb8);
  color: #fff;
  padding: 18px 21px;
}
.agenda-dialog-header h2 { margin: 3px 0 0; color: #fff; font-size: 22px; }
.agenda-dialog-header .dialog-close-button { background: rgba(255,255,255,.17); color: #fff; }
.agenda-dialog-header-actions { display: flex; align-items: center; gap: 9px; }
.agenda-queue-button {
  min-height: 34px;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 10px;
  background: rgba(255,255,255,.13);
  color: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
  padding: 0 12px;
}
.agenda-queue-button:hover { background: rgba(255,255,255,.22); }
.agenda-queue-button:disabled { cursor: default; opacity: .72; }

.agenda-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  padding: 20px;
}
.agenda-form-grid label { display: grid; gap: 6px; }
.agenda-form-grid label > span { color: #284f53; font-size: 11px; font-weight: 950; }
.agenda-form-grid .agenda-patient-label { display: flex; align-items: center; gap: 8px; }
.agenda-patient-record-button {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #b9ddd6;
  border-radius: 8px;
  background: #eaf8f5;
  color: #087f74;
  cursor: pointer;
  font-size: 9px;
  font-weight: 900;
  padding: 0 8px;
}
.agenda-patient-record-button svg { width: 13px; height: 13px; fill: currentColor; }
.agenda-patient-record-button:hover { border-color: #7bc9ba; background: #dff4ef; }
.agenda-form-grid .span-2 { grid-column: 1 / -1; }
.agenda-form-grid input,
.agenda-form-grid select,
.agenda-form-grid textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid #c9dfda;
  border-radius: 12px;
  background: #fff;
  color: #173d42;
  font: inherit;
  padding: 10px 12px;
}
.agenda-form-grid textarea { resize: vertical; }
.agenda-form-grid input:focus,
.agenda-form-grid select:focus,
.agenda-form-grid textarea:focus { outline: 0; border-color: #11a789; box-shadow: 0 0 0 4px rgba(17,167,137,.12); }

.agenda-dialog-actions {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 10px;
  align-items: center;
  border-top: 1px solid #dcebe8;
  background: #fff;
  padding: 14px 20px;
}
.agenda-save-button { background: linear-gradient(135deg, #0ea77d, #087f74); color: #fff; }
.agenda-delete-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #f0c4c4;
  border-radius: 12px;
  background: #fff0f0;
  color: #bd3e3e;
  cursor: pointer;
  font-weight: 900;
  padding: 0 14px;
}

@media (max-width: 900px) {
  .agenda-filter-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agenda-clear-filters { width: 100%; }
  .agenda-command-bar { align-items: stretch; flex-direction: column; }
  .agenda-view-switch { align-self: flex-start; }
}

@media (max-width: 620px) {
  .agenda-shell { width: calc(100% - 18px); padding-top: 12px; }
  .agenda-header { align-items: stretch; flex-direction: column; border-radius: 18px; }
  .agenda-new-button { width: 100%; }
  .agenda-date-navigation { flex-wrap: wrap; }
  .agenda-date-picker { width: 100%; margin: 4px 0 0; }
  .agenda-date-picker button { flex: 1; justify-content: space-between; }
  .agenda-filter-panel { grid-template-columns: 1fr; }
  .agenda-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agenda-board-heading { align-items: flex-start; flex-direction: column; }
  .agenda-form-grid { grid-template-columns: 1fr; }
  .agenda-form-grid .span-2 { grid-column: auto; }
  .agenda-dialog-header { align-items: flex-start; }
  .agenda-dialog-header-actions { gap: 6px; }
  .agenda-queue-button { max-width: 112px; line-height: 1.15; }
  .agenda-dialog-actions { grid-template-columns: 1fr 1fr; }
  .agenda-dialog-actions > span { display: none; }
  .agenda-delete-button { grid-column: 1 / -1; justify-content: center; }
  .agenda-list-item { grid-template-columns: 60px minmax(0,1fr) auto; }
  .agenda-list-status { display: none; }
}

@media (max-width: 680px) {
  [data-view-panel="Resumo"] .home-side-stack .home-finance-metrics,
  [data-view-panel="Resumo"] .home-side-stack .home-compact-row {
    grid-template-columns: 1fr;
  }
}

[data-view-panel="Resumo"] .home-board-grid {
  width: min(1320px, 100%);
  margin: 0 auto;
  gap: 18px;
  padding: 20px 24px 36px;
  box-sizing: border-box;
}

[data-view-panel="Resumo"] .home-finance-metrics { gap: 18px; }

[data-view-panel="Resumo"] .home-finance-metric {
  min-height: 112px;
  grid-template-columns: 58px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 14px;
  border: 0;
  border-radius: 24px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 8px 28px rgba(31, 48, 61, .09);
  color: #163248;
}

[data-view-panel="Resumo"] .home-finance-metric::before {
  width: 54px;
  height: 54px;
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  font-size: 20px;
  font-weight: 950;
  box-shadow: inset 0 1px rgba(255,255,255,.32), 0 7px 16px rgba(20, 70, 90, .15);
}

[data-view-panel="Resumo"] .home-finance-metric::after { display: none; }
[data-view-panel="Resumo"] .home-finance-metric.is-budget::before { content: "✦"; background: linear-gradient(145deg, #ffb62f, #ef8e16); }
[data-view-panel="Resumo"] .home-finance-metric.is-income::before { content: "↓"; background: linear-gradient(145deg, #23c98b, #089d67); }
[data-view-panel="Resumo"] .home-finance-metric.is-outcome::before { content: "↑"; background: linear-gradient(145deg, #ff7468, #df493f); }

[data-view-panel="Resumo"] .home-finance-metric small,
[data-view-panel="Resumo"] .home-finance-metric strong {
  grid-column: 2;
}

[data-view-panel="Resumo"] .home-finance-metric small {
  align-self: end;
  color: #788894;
  font-size: 9px;
}

[data-view-panel="Resumo"] .home-finance-metric strong {
  align-self: start;
  color: #17364c;
  font-size: 24px;
}

[data-view-panel="Resumo"] .home-board {
  border: 0;
  border-radius: 24px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 8px 28px rgba(31, 48, 61, .085);
}

[data-view-panel="Resumo"] .home-board-header {
  min-height: 62px;
  padding: 11px 16px;
  border-bottom: 1px solid #eceff2;
  background: transparent;
}

[data-view-panel="Resumo"] .home-board-header h2 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #182f42;
  font-size: 17px;
  font-weight: 900;
}

[data-view-panel="Resumo"] .home-board-header h2::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 4px;
  background: #f1a51e;
  box-shadow: inset 0 1px rgba(255,255,255,.4);
}

[data-view-panel="Resumo"] .home-board.is-attending .home-board-header h2::before { background: #17aec0; }
[data-view-panel="Resumo"] .patient-home-widget .home-board-header h2::before { background: #13aa78; }
[data-view-panel="Resumo"] .home-board.is-negatives .home-board-header h2::before { background: #e2574d; }
[data-view-panel="Resumo"] .home-board.is-day-info .home-board-header h2::before { background: #288fc2; }

[data-view-panel="Resumo"] :is(.home-board-action, .home-square-action, .patient-home-widget .primary-action) {
  min-height: 38px;
  border-radius: 12px;
  background: #168fc1;
  box-shadow: 0 5px 12px rgba(22, 143, 193, .22);
}

[data-view-panel="Resumo"] .home-square-action {
  width: 38px;
  height: 38px;
  border-radius: 13px;
}

[data-view-panel="Resumo"] .home-mini-search {
  height: 44px;
  border: 0;
  border-radius: 13px;
  background: #f1f3f5;
  box-shadow: inset 0 0 0 1px rgba(90, 112, 126, .06);
}

[data-view-panel="Resumo"] .home-mini-search:focus-within {
  background: #fff;
  outline: 3px solid rgba(25, 180, 193, .13);
}

[data-view-panel="Resumo"] .home-mini-table {
  border-spacing: 0 6px;
}

[data-view-panel="Resumo"] .home-mini-table td {
  border: 0;
  background: #f4f6f8;
}

[data-view-panel="Resumo"] .home-mini-table td:first-child { border-radius: 13px 0 0 13px; }
[data-view-panel="Resumo"] .home-mini-table td:last-child { border-radius: 0 13px 13px 0; }
[data-view-panel="Resumo"] .home-mini-table .empty-table-cell {
  border: 0;
  border-radius: 14px;
  background: #f4f6f8;
}

[data-view-panel="Resumo"] .home-compact-row .home-day-info-list button {
  min-height: 54px;
  border: 0;
  border-radius: 14px;
  background: #f2f5f7;
}

[data-view-panel="Resumo"] .home-compact-row .home-day-info-list button:hover {
  background: #e9f5f7;
  transform: translateY(-1px);
}

[data-view-panel="Resumo"] .home-board.is-negatives .home-board-header strong {
  background: #fff0ef;
  color: #d84c43;
}

@media (max-width: 760px) {
  [data-view-panel="Resumo"] .home-board-grid { padding: 14px 11px 24px; }
  [data-view-panel="Resumo"] .home-finance-metric { border-radius: 20px; }
  [data-view-panel="Resumo"] .home-board { border-radius: 20px; }
}

.clinic-id-pill {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border-radius: 999px;
  background: #edf8fb;
  color: #0a6680;
  font-size: 12px;
  font-weight: 900;
}

.clinic-bubble-main {
  min-width: 0;
}

.clinic-bubble-main strong,
.clinic-bubble-main span,
.clinic-bubble-main small {
  display: block;
}

.clinic-bubble-main strong {
  min-height: 40px;
  color: #0f1f2f;
  font-size: 17px;
  line-height: 1.32;
}

.clinic-bubble-main span {
  margin-top: 7px;
  color: #566575;
  font-size: 13px;
}

.clinic-bubble-main small {
  margin-top: 4px;
  color: #7a8591;
  font-size: 12px;
}

.clinic-bubble-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.clinic-bubble-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.clinic-bubble-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.clinic-enter-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 15px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #0e92bf, #00a676);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(0, 127, 115, 0.18);
}

.clinic-enter-button:hover {
  background: linear-gradient(135deg, #007ca5, #008d68);
  transform: translateY(-1px);
}

.clinic-empty-state {
  min-height: 140px;
  display: grid;
  place-items: center;
  padding: 22px;
  border: 1px dashed #bdc8d3;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
  color: #566575;
  text-align: center;
}

.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 30px;
  align-items: stretch;
  max-width: 900px;
}

.region-card {
  min-height: 232px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 13px;
  padding: 22px 18px 20px;
  border: 1px solid #d2d8df;
  border-radius: 4px;
  background: #ffffff;
  color: #0f1f2f;
  box-shadow: 0 1px 0 rgba(16, 36, 58, 0.03);
}

.region-card:hover {
  border-color: rgba(15, 143, 131, 0.35);
  box-shadow: 0 14px 32px rgba(16, 36, 58, 0.08);
}

.region-pin {
  color: #ff8a00;
}

.region-pin svg {
  width: 72px;
  height: 72px;
}

.region-card small {
  color: #0f1f2f;
  font-size: 15px;
}

.region-card strong {
  margin-top: 16px;
  font-size: 20px;
}

.region-card button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  background: #262d35;
  color: #ffffff;
  font-weight: 800;
}

.region-card button:hover {
  background: #123c5c;
}

.portal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 900px;
  margin-top: 14px;
}

.summary-block {
  min-height: 82px;
  padding: 14px 16px;
  border: 1px solid #d2d8df;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.76);
}

.summary-block strong,
.summary-block span {
  display: block;
}

.summary-block strong {
  color: #123c5c;
  font-size: 24px;
}

.summary-block span {
  margin-top: 4px;
  color: #4d5d6c;
  font-size: 13px;
}

.clinic-dialog {
  width: min(1080px, calc(100vw - 42px));
  max-height: calc(100vh - 42px);
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
}

.clinic-dialog::backdrop {
  background: rgba(18, 36, 54, 0.54);
}

.clinic-dialog-panel {
  max-height: calc(100vh - 42px);
  overflow: auto;
  padding: 16px;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 22px 70px rgba(18, 36, 54, 0.28);
}

.clinic-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 14px;
  border-bottom: 1px solid #e3e8ee;
}

.clinic-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 8px;
  color: #394754;
}

.clinic-table-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.clinic-table-toolbar select,
.clinic-table-toolbar input {
  height: 30px;
  border: 1px solid #2b3035;
  background: #ffffff;
}

.clinic-table-toolbar input {
  width: min(260px, 34vw);
  padding: 0 8px;
}

.clinic-table {
  min-width: 930px;
  border: 1px solid #d7dde4;
}

.clinic-table th,
.clinic-table td {
  border-right: 1px solid #d7dde4;
  text-align: center;
}

.clinic-table tbody tr:nth-child(odd) {
  background: #f1f1f1;
}

.clinic-open-button {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border: 1px solid #9bcba2;
  border-radius: 50%;
  background: #ffffff;
  color: #27a83f;
  box-shadow: inset 0 0 0 2px #dff4e2;
}

.clinic-open-button svg {
  width: 15px;
  height: 15px;
}

.compact-action {
  min-height: 44px;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.corner-menu-button {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 45;
  width: 44px;
  height: 44px;
  display: none;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(24, 32, 28, 0.12);
}

.corner-menu-button:hover {
  color: var(--teal);
  border-color: rgba(15, 143, 131, 0.34);
}

body.cadastro-focus .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

body.cadastro-focus .corner-menu-button {
  display: none;
}

body.cadastro-focus .topbar {
  display: none;
}

body.cadastro-focus .sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  transform: translateX(-100%);
  transition: transform 180ms ease;
  box-shadow: 18px 0 50px rgba(24, 32, 28, 0.18);
}

body.cadastro-focus .sidebar.is-open {
  transform: translateX(0);
}

body.cadastro-focus .workspace {
  padding: 0;
}

body.cadastro-focus .workspace-view.is-active {
  gap: 0;
}

body.budget-fullscreen {
  background: #f3f3f3;
}

body.budget-fullscreen .ficha-sidebar,
body.budget-fullscreen #patientRecordForm {
  display: none;
}

body.budget-fullscreen .ficha-layout {
  display: block;
  width: min(1234px, calc(100% - 96px));
  margin: 0 auto;
  padding: 18px 0 42px;
}

body.budget-fullscreen .budget-card {
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.budget-fullscreen .budget-detail-view {
  display: block;
}

body.budget-fullscreen .budget-list-view {
  display: none;
}

body.budget-fullscreen .procedure-table-wrap {
  overflow-x: hidden;
}

body.resumo-focus .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

body.resumo-focus .sidebar,
body.resumo-focus .topbar {
  display: none;
}

body.resumo-focus .workspace {
  padding: 0;
}

body.resumo-focus .workspace-view.is-active {
  gap: 0;
}

body.resumo-focus .dashboard-home {
  min-height: 100vh;
  border: 0;
  border-radius: 0;
}

body.patients-focus .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

body.patients-focus .sidebar,
body.patients-focus .topbar {
  display: none;
}

body.patients-focus .workspace {
  padding: 0;
}

body.patients-focus .workspace-view.is-active {
  gap: 0;
}

body.daily-focus .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

body.daily-focus .sidebar,
body.daily-focus .topbar {
  display: none;
}

body.daily-focus .workspace {
  padding: 0;
}

body.daily-focus .workspace-view.is-active {
  gap: 0;
}

body.professionals-focus .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

body.professionals-focus .sidebar,
body.professionals-focus .topbar {
  display: none;
}

body.professionals-focus .workspace {
  padding: 0;
}

body.professionals-focus .workspace-view.is-active {
  gap: 0;
}

body.specialties-focus .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

body.specialties-focus .sidebar,
body.specialties-focus .topbar {
  display: none;
}

body.specialties-focus .workspace {
  padding: 0;
}

body.specialties-focus .workspace-view.is-active {
  gap: 0;
}

body.commission-focus .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

body.commission-focus .sidebar,
body.commission-focus .topbar {
  display: none;
}

body.commission-focus .workspace {
  padding: 0;
}

body.commission-focus .workspace-view.is-active {
  gap: 0;
}

body.payment-focus .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

body.payment-focus .sidebar,
body.payment-focus .topbar {
  display: none;
}

body.payment-focus .workspace {
  padding: 0;
}

body.payment-focus .workspace-view.is-active {
  gap: 0;
}

body.payment-focus .workspace-view[data-view-panel="OrcamentoPagamentos"].is-active {
  width: min(1280px, calc(100% - 44px));
  margin: 28px auto 46px;
  gap: 14px;
}

body.standard-menu-focus .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

body.standard-menu-focus .sidebar,
body.standard-menu-focus .topbar {
  display: none;
}

body.standard-menu-focus .workspace {
  padding: 0;
}

body.standard-menu-focus .workspace-view.is-active {
  gap: 0;
}

body.standard-menu-focus .register-panel,
body.standard-menu-focus .clean-panel {
  min-height: calc(100vh - 98px);
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.72), transparent 30%),
    #0f8f83;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 143, 131, 0.24);
}

.brand-mark span {
  font-size: 15px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
}

.nav-link {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.nav-link:hover {
  background: var(--surface-muted);
  color: var(--ink);
}

.nav-link.is-active {
  background: var(--teal-soft);
  border-color: rgba(15, 143, 131, 0.18);
  color: var(--teal);
  font-weight: 700;
}

.sidebar-footer {
  margin-top: auto;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 13px;
}

.status-dot,
.notification-dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 999px;
  background: var(--green);
}

.workspace {
  min-width: 0;
  padding: 24px clamp(18px, 3vw, 34px) 34px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.eyebrow,
.section-label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  margin-top: 4px;
  font-size: 28px;
  line-height: 1.12;
}

h2 {
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.2;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: min(640px, 100%);
}

.search-field {
  min-width: 280px;
  max-width: 440px;
  flex: 1;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.select-field {
  height: 44px;
  min-width: 148px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

.select-field.compact {
  min-width: 116px;
  height: 38px;
}

.icon-button {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

.icon-button:hover {
  border-color: rgba(15, 143, 131, 0.34);
  color: var(--teal);
}

.notification-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
}

.mobile-only {
  display: none;
}

.action-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.primary-action,
.secondary-action,
.text-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  white-space: nowrap;
}

.primary-action {
  padding: 0 15px;
  background: var(--teal);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(15, 143, 131, 0.2);
}

.primary-action:hover {
  background: #0c7e74;
}

.secondary-action {
  padding: 0 13px;
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.secondary-action:hover {
  border-color: rgba(15, 143, 131, 0.34);
  color: var(--teal);
}

.text-button {
  padding: 0 4px 0 10px;
  border: 0;
  background: transparent;
  color: var(--teal);
  font-weight: 800;
}

.text-button svg {
  width: 17px;
  height: 17px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.metric-card {
  min-height: 126px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
}

.metric-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
}

.metric-icon.is-teal {
  background: var(--teal-soft);
  color: var(--teal);
}

.metric-icon.is-indigo {
  background: var(--indigo-soft);
  color: var(--indigo);
}

.metric-icon.is-amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.metric-icon.is-coral {
  background: var(--coral-soft);
  color: var(--coral);
}

.metric-card span,
.metric-card small {
  display: block;
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-card strong {
  display: block;
  margin-top: 4px;
  font-size: 26px;
  line-height: 1;
}

.metric-card small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.65fr);
  gap: 14px;
}

.panel {
  min-width: 0;
  padding: 18px;
}

.workspace-view {
  display: none;
}

.workspace-view.is-active {
  display: grid;
  gap: 14px;
}

.clean-panel {
  min-height: calc(100vh - 150px);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.8);
}

.register-panel {
  min-height: calc(100vh - 150px);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.register-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.register-header h2 {
  font-size: 24px;
}

.register-header button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
}

.register-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.register-grid label {
  display: grid;
  gap: 6px;
}

.register-grid span {
  color: #111820;
  font-size: 13px;
  font-weight: 900;
}

.register-grid input,
.register-grid select {
  height: 38px;
  border: 1px solid #c9c9c9;
  border-radius: 4px;
  background: #ffffff;
  color: #26313a;
  padding: 0 10px;
}

.register-empty {
  min-height: 86px;
  display: grid;
  place-items: center;
  margin-top: 18px;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  background: #f7f7f7;
  color: var(--muted);
}

.home-panel {
  min-height: calc(100vh - 150px);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
}

.dashboard-home {
  display: grid;
  gap: 20px;
  padding: 0;
  overflow: hidden;
  background: #e8edf3;
}

.dashboard-home:not(.is-active) {
  display: none;
}

.clinic-home-menu {
  min-height: 78px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  gap: 8px 12px;
  overflow: visible;
  padding: 12px 24px;
  border-bottom: 1px solid #cfe0e7;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 248, 250, 0.96)),
    linear-gradient(90deg, rgba(0, 167, 151, 0.1), rgba(14, 85, 130, 0.1));
  box-shadow: 0 10px 28px rgba(10, 34, 52, 0.08);
  color: #193044;
}

.clinic-home-menu > strong {
  flex: 0 0 auto;
  margin-right: 14px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #102f48, #0c6573);
  box-shadow: 0 12px 24px rgba(10, 47, 72, 0.18);
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.clinic-home-menu .menu-brand-button {
  width: 122px;
  min-height: 76px;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.menu-brand-logo {
  width: 108px;
  height: 70px;
  display: block;
  object-fit: contain;
}

.clinic-home-menu .menu-brand-button::after {
  display: none;
}

.clinic-home-menu button {
  min-height: 36px;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #193044;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.clinic-home-menu button::after {
  display: none;
}

.clinic-home-menu .menu-trigger::after,
.clinic-home-menu .menu-profile-trigger::after {
  content: "";
  display: inline-block;
  margin-left: 6px;
  border-top: 5px solid currentColor;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  vertical-align: middle;
}

.clinic-home-menu button:hover {
  border-color: #bfe9e7;
  background: #e8f7fb;
  color: #007f73;
}

.clinic-home-menu .menu-brand-button:hover {
  border-color: #bde8e5;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(10, 34, 52, 0.12);
  color: #007f73;
  transform: translateY(-1px);
}

.clinic-home-menu button.is-active {
  border-color: #9bd9d5;
  background: #dff8f5;
  color: #006f66;
}

.clinic-home-menu .menu-brand-button.is-active {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: inherit;
}

.clinic-home-menu .menu-brand-button.is-active:hover {
  border-color: #bde8e5;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(10, 34, 52, 0.12);
  color: #007f73;
}

/* Menu principal por ícones: mantém os submenus textuais e reduz ruído visual. */
.clinic-home-menu .menu-icon-button {
  position: relative;
  width: 46px;
  height: 46px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #d1e3e8;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 7px 18px rgba(10, 50, 70, 0.07);
  color: #16465e;
}

.clinic-home-menu .menu-icon-button > svg {
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.clinic-home-menu .menu-icon-button.menu-trigger::after {
  position: absolute;
  right: 5px;
  bottom: 5px;
  margin: 0;
  border-top-width: 4px;
  border-right-width: 3px;
  border-left-width: 3px;
  opacity: 0.65;
}

.clinic-home-menu .menu-icon-button::before {
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  z-index: 90;
  max-width: 190px;
  padding: 6px 9px;
  border: 1px solid rgba(8, 57, 76, 0.16);
  border-radius: 9px;
  background: #0b3548;
  box-shadow: 0 8px 22px rgba(7, 38, 52, 0.18);
  color: #ffffff;
  content: attr(data-menu-label);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -3px);
  transition: opacity 0.14s ease, transform 0.14s ease;
  white-space: nowrap;
}

.clinic-home-menu .menu-icon-button:hover::before,
.clinic-home-menu .menu-icon-button:focus-visible::before {
  opacity: 1;
  transform: translate(-50%, 0);
}

.clinic-home-menu .menu-dropdown.is-open > .menu-icon-button::before {
  opacity: 0;
}

.clinic-home-menu .menu-icon-button:hover,
.clinic-home-menu .menu-icon-button:focus-visible,
.clinic-home-menu .menu-icon-button.is-active {
  border-color: #83d6d2;
  background: #e8faf8;
  box-shadow: 0 9px 22px rgba(0, 127, 115, 0.12);
  color: #007f73;
}

.menu-dropdown {
  position: relative;
  flex: 0 0 auto;
}

.menu-dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 60;
  min-width: 224px;
  display: none;
  padding: 8px;
  border: 1px solid #d9e7ee;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 35px rgba(10, 34, 52, 0.16);
}

.menu-dropdown-wide .menu-dropdown-panel {
  min-width: 318px;
}

.menu-dropdown.is-open .menu-dropdown-panel {
  display: grid;
}

.clinic-home-menu .menu-dropdown.is-open > .menu-trigger,
.clinic-home-menu .menu-profile.is-open > .menu-profile-trigger {
  border-color: #bde8e5;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(10, 34, 52, 0.12);
  color: #007f73;
}

.clinic-home-menu .menu-dropdown-panel button {
  min-height: 32px;
  justify-content: flex-start;
  width: 100%;
  padding: 0 14px;
  border-radius: 9px;
  color: #203444;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}

.clinic-home-menu .menu-dropdown-panel button::after {
  display: none;
}

.clinic-home-menu .menu-dropdown-panel button:hover,
.clinic-home-menu .menu-dropdown-panel button.is-active {
  background: #edf8fa;
  color: #007f73;
}

.menu-profile {
  margin-left: auto;
  align-self: flex-start;
}

.clinic-home-menu .menu-profile-trigger {
  width: 64px;
  max-width: 64px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 5px 8px;
  border: 1px solid #cfe0e7;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(10, 34, 52, 0.1);
  color: #173046;
}

.clinic-home-menu .menu-profile-trigger::after { margin-left: 0; }

.clinic-home-menu .menu-profile-trigger:hover {
  border-color: #bde8e5;
  background: #f2fbfc;
  color: #007f73;
}

.menu-profile-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border: 1px solid #bcebe6;
  border-radius: 999px;
  background: #ddf8f4;
  color: #007f73;
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
}

.menu-profile-avatar img,
.menu-profile-panel-avatar img,
.profile-edit-photo-preview img,
.master-user-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.menu-profile-copy {
  min-width: 0;
  display: grid;
  gap: 0;
  text-align: left;
}

.clinic-home-menu .menu-profile-copy small,
.clinic-home-menu .menu-profile-copy strong {
  overflow: hidden;
  color: inherit;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clinic-home-menu .menu-profile-copy small {
  color: #64737f;
  font-size: 11px;
  font-weight: 800;
}

.clinic-home-menu .menu-profile-copy strong {
  max-width: 92px;
  color: #0c2539;
  font-size: 13px;
  font-weight: 900;
  text-transform: none;
}

.menu-profile .menu-dropdown-panel {
  right: 0;
  left: auto;
  min-width: 288px;
}

.menu-profile .menu-dropdown-panel.menu-profile-panel {
  width: min(350px, calc(100vw - 28px));
  min-width: min(350px, calc(100vw - 28px));
  gap: 0;
  overflow: hidden;
  padding: 0;
  border-color: rgba(8, 143, 145, .18);
  border-radius: 20px;
  box-shadow: 0 24px 55px rgba(10, 34, 52, .2);
}

.menu-profile-summary {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(255,255,255,.14), transparent 42%),
    linear-gradient(135deg, #087f86, #0baaa2);
  color: #fff;
}

.menu-profile-panel-avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.72);
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  color: #fff;
  font-size: 15px;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(3, 80, 82, .22);
}

.menu-profile-summary > span:last-child { min-width: 0; display: grid; gap: 3px; }
.menu-profile-summary small { color: rgba(255,255,255,.72); font-size: 8px; font-weight: 950; letter-spacing: .12em; }
.menu-profile-summary strong { overflow: hidden; color: #fff; font-size: 15px; font-weight: 950; text-overflow: ellipsis; white-space: nowrap; }
.menu-profile-summary em {
  justify-self: start;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(217, 243, 55, .18);
  color: #e8fa78;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
}

.menu-profile-clinic-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  margin: 14px;
  padding: 13px;
  border: 1px solid #dbeaed;
  border-radius: 13px;
  background: linear-gradient(135deg, #f5fbfc, #f1faf7);
}

.menu-profile-clinic-card > svg {
  width: 36px;
  height: 36px;
  padding: 8px;
  box-sizing: border-box;
  border-radius: 10px;
  background: #dff6f2;
  color: #087f73;
}
.menu-profile-clinic-card > span { min-width: 0; display: grid; gap: 2px; }
.menu-profile-clinic-card small { color: #789098; font-size: 8px; font-weight: 950; letter-spacing: .1em; }
.menu-profile-clinic-card strong { overflow: hidden; color: #19394b; font-size: 12px; font-weight: 950; text-overflow: ellipsis; white-space: nowrap; }
.menu-profile-clinic-card b { color: #087f86; font-size: 9px; font-weight: 900; }

.menu-profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 14px 14px;
}

.clinic-home-menu .menu-dropdown-panel .menu-profile-pending-action {
  grid-column: 1 / -1;
  justify-content: space-between;
  border-color: #cde3f3;
  background: linear-gradient(135deg, #eef8ff, #f4fbff);
  color: #176287;
}

.clinic-home-menu .menu-dropdown-panel .menu-profile-pending-action:hover {
  border-color: #abd3ec;
  background: #e5f5ff;
  color: #0d5276;
}

.menu-profile-pending-action > span { display: inline-flex; align-items: center; gap: 7px; }
.menu-profile-pending-action > b {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  box-sizing: border-box;
  border-radius: 999px;
  background: #ef5555;
  color: #fff;
  font-size: 9px;
  font-weight: 950;
  box-shadow: 0 5px 12px rgba(203, 52, 52, .2);
}

.clinic-home-menu .menu-dropdown-panel .menu-profile-actions button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}
.menu-profile-actions button svg { width: 15px; height: 15px; }
.clinic-home-menu .menu-dropdown-panel .menu-profile-edit-action { border-color: #bfe7df; background: #eaf8f5; color: #087565; }
.clinic-home-menu .menu-dropdown-panel .menu-profile-edit-action:hover { background: #dcf3ee; color: #075e53; }
.clinic-home-menu .menu-dropdown-panel .menu-profile-exit-action { border-color: #f0d2d2; background: #fff4f4; color: #a53e3e; }
.clinic-home-menu .menu-dropdown-panel .menu-profile-exit-action:hover { background: #ffe9e9; color: #8d2929; }

.menu-profile-details {
  display: grid;
  gap: 4px;
  padding: 12px 16px;
  border-bottom: 1px solid #edf1f4;
}

.menu-profile-details small {
  color: #64737f;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.menu-profile-details strong {
  color: #132230;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.home-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  padding: 0 28px;
}

.home-status-card {
  min-height: 92px;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #dce2e7;
  border-radius: 4px;
  background: #ffffff;
  padding: 0;
  text-align: left;
  box-shadow: 0 2px 6px rgba(22, 34, 45, 0.08);
}

button.home-status-card:hover,
button.home-status-card:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 9px 22px rgba(22, 34, 45, 0.12);
}

.home-status-card .status-icon {
  width: 100%;
  height: 100%;
  min-height: 88px;
  display: grid;
  place-items: center;
  color: #ffffff;
}

.home-status-card .status-icon svg {
  width: 42px;
  height: 42px;
}

.home-status-card > div:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 10px;
}

.home-status-card span,
.home-status-card small {
  display: block;
  overflow: hidden;
  color: #1f2a33;
  font-size: 14px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-status-card small {
  color: #3f4d56;
}

.home-status-card strong {
  display: block;
  margin-top: 2px;
  color: #121a20;
  font-size: 18px;
  line-height: 1.1;
}

.home-status-card.is-info .status-icon {
  background: #16bfe1;
}

.home-status-card.is-budget .status-icon {
  background: #f6a000;
}

.home-status-card.is-income .status-icon {
  background: #04a75f;
}

.home-status-card.is-income strong {
  color: #05a05a;
}

.home-status-card.is-outcome .status-icon {
  background: #df493c;
}

.home-status-card.is-outcome strong {
  color: #e22218;
}

.status-arrow {
  position: relative;
}

.status-arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-right: 16px solid transparent;
  border-left: 16px solid transparent;
}

.status-arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 28px;
  background: #ffffff;
}

.status-arrow.is-up::before {
  border-bottom: 24px solid #ffffff;
  transform: translate(-50%, -32px);
}

.status-arrow.is-up::after {
  transform: translate(-50%, -8px);
}

.status-arrow.is-down::before {
  border-top: 24px solid #ffffff;
  transform: translate(-50%, 8px);
}

.status-arrow.is-down::after {
  transform: translate(-50%, -20px);
}

.home-board-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  gap: 22px 30px;
  padding: 0 28px 28px;
}

.home-large-board {
  min-height: 190px;
}

.home-side-stack {
  align-content: start;
}

.home-board {
  min-width: 0;
  border: 1px solid #dce2e7;
  border-top: 3px solid #f0a000;
  border-radius: 4px;
  background: #ffffff;
}

.home-board.is-attending {
  border-top-color: #08bfe1;
}

.home-board.patient-home-widget {
  border-top-color: #05a05a;
}

.home-board.is-negatives {
  border-top-color: #e14639;
}

.home-board.is-day-info {
  border-top-color: #0b79bd;
}

.home-board-header {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border-bottom: 1px solid #edf1f4;
}

.home-board-header h2 {
  color: #1f2a33;
  font-size: 20px;
  font-weight: 500;
}

.home-board-action {
  min-height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 4px;
  background: #2f7fbe;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.home-square-action {
  width: 31px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: #2f7fbe;
  color: #ffffff;
}

.home-square-action svg {
  width: 16px;
  height: 16px;
}

.home-table-wrap {
  padding: 0 10px 14px;
  overflow-x: auto;
}

.home-mini-table {
  min-width: 500px;
  width: 100%;
  border-collapse: collapse;
}

.home-mini-table th {
  color: #202b33;
  text-align: center;
}

.home-waiting-table thead th {
  background: #df493c;
  color: #ffffff;
}

.home-attending-table thead th {
  background: #08bfe1;
  color: #ffffff;
}

.home-mini-table td {
  padding: 7px 8px;
  border: 1px solid #dce2e7;
  text-align: center;
}

.home-board-action-inline {
  margin: -4px 26px 14px auto;
  display: flex;
}

.home-side-stack {
  display: grid;
  gap: 18px;
}

.home-compact-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.home-compact-row .home-board-header {
  min-height: 46px;
}

.home-compact-row .home-board-header h2 {
  font-size: 18px;
}

.home-compact-row .home-negative-scroll {
  max-height: 128px;
}

.home-compact-row .home-day-info-list {
  gap: 6px;
}

.home-compact-row .home-day-info-list button {
  min-height: 33px;
  padding: 0 10px;
}

.home-finance-summary {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.home-finance-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
}

.home-finance-metric {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 7px;
  border: 1px solid #dce6ee;
  border-left: 5px solid #d4dde6;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  padding: 13px 14px;
  color: #14202a;
  text-align: left;
  box-shadow: 0 12px 28px rgba(15, 35, 52, 0.08);
}

.home-finance-metric:hover,
.home-finance-metric:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(22, 34, 45, 0.1);
}

.home-finance-metric small {
  color: #596a75;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.home-finance-metric strong {
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.home-finance-metric.is-budget {
  border-left-color: #f1a40f;
}

.home-finance-metric.is-budget strong {
  color: #d98200;
}

.home-finance-metric.is-income {
  border-left-color: #05a05a;
}

.home-finance-metric.is-income strong {
  color: #008f50;
}

.home-finance-metric.is-outcome {
  border-left-color: #df493c;
}

.home-finance-metric.is-outcome strong {
  color: #d9271c;
}

[data-dashboard-financial-total].is-financial-restricted {
  cursor: not-allowed;
  filter: grayscale(0.65);
  opacity: 0.68;
}

[data-dashboard-financial-total].is-financial-restricted strong {
  color: #73828b !important;
  font-size: 11px !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

[data-dashboard-financial-total].is-financial-restricted:hover,
[data-dashboard-financial-total].is-financial-restricted:focus-visible {
  box-shadow: none;
  transform: none;
}

.home-mini-search {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 24px 18px;
  padding: 0 10px;
  border: 1px solid #cfd8df;
  border-radius: 4px;
  background: #ffffff;
  color: #7b858c;
}

.home-mini-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.patient-home-widget {
  padding: 10px;
}

.patient-home-widget .home-panel-header {
  margin-bottom: 12px;
}

.patient-home-widget .home-panel-header h2 {
  font-size: 20px;
  font-weight: 500;
}

.patient-home-widget .primary-action {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: #33a852;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.patient-home-widget h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 10px 10px 8px;
  color: #14202a;
  font-size: 14px;
}

.patient-home-widget h3 span {
  min-width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #ce8612;
  color: #ffffff;
  font-size: 12px;
}

.patient-home-widget table {
  min-width: 0;
  table-layout: fixed;
}

.patient-home-widget .table-wrap {
  overflow-x: hidden;
}

.patient-home-widget th,
.patient-home-widget td {
  padding: 10px 6px;
  font-size: 13px;
}

.patient-home-widget th:nth-child(1),
.patient-home-widget td:nth-child(1) {
  width: 58px;
}

.patient-home-widget th:nth-child(3),
.patient-home-widget td:nth-child(3) {
  width: 102px;
}

.patient-home-widget th:nth-child(4),
.patient-home-widget td:nth-child(4) {
  width: 84px;
}

.patient-home-widget .patient-cell {
  gap: 8px;
}

.patient-home-widget .avatar {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

.patient-home-widget .patient-cell strong {
  font-size: 13px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.patient-home-widget .patient-cell small {
  font-size: 11px;
  overflow-wrap: anywhere;
}

.patient-home-widget td:nth-child(3) {
  overflow-wrap: anywhere;
}

.patient-home-widget .open-record-button {
  width: 66px;
  min-height: 31px;
  gap: 3px;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1.05;
  white-space: normal;
}

.patient-home-widget .open-record-button svg {
  width: 14px;
  height: 14px;
}

.home-day-info-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.home-day-info-list button {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d7e8f4;
  border-radius: 4px;
  background: #f6fbff;
  color: #152534;
  padding: 0 12px;
  text-align: left;
}

.home-day-info-list button:hover,
.home-day-info-list button:focus-visible {
  border-color: #8bc5ec;
  background: #eaf6ff;
}

.home-day-info-list span {
  font-size: 13px;
  font-weight: 800;
}

.home-day-info-list strong {
  color: #00733f;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.home-day-info-list strong.is-negative {
  color: #d9271c;
}

.home-board.is-negatives .home-board-header strong {
  min-width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #f3eeee;
  color: #c8372f;
  font-size: 13px;
}

.home-negative-scroll {
  max-height: 174px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px 10px 12px;
}

.home-negative-list {
  display: grid;
  gap: 6px;
}

.home-negative-list-title,
.home-negative-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.home-negative-list-title {
  padding: 0 4px 5px;
  border-bottom: 1px solid #dfe5ea;
  color: #1f2a33;
  font-size: 12px;
  font-weight: 900;
}

.home-negative-list-title strong {
  color: #b42318;
  font-size: 12px;
}

.home-negative-row {
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid #e2e8ee;
  border-radius: 5px;
  background: #ffffff;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.home-negative-row:nth-child(even) {
  background: #f5f7f9;
}

.home-negative-row:hover {
  border-color: rgba(13, 183, 204, 0.35);
  box-shadow: 0 8px 18px rgba(8, 25, 38, 0.08);
  transform: translateY(-1px);
}

.home-negative-name {
  min-width: 0;
  color: #14202a;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.home-negative-value {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fee4e2;
  color: #b42318;
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.home-negative-empty {
  padding: 12px;
  border: 1px dashed #d0d8df;
  border-radius: 5px;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.patients-page {
  min-height: 100vh;
  background: #ffffff;
}

.patients-top-menu {
  min-height: 82px;
  border-bottom: 1px solid #cfe0e7;
}

.daily-top-menu {
  min-height: 82px;
  border-bottom: 1px solid #cfe0e7;
}

.daily-page {
  min-height: 100vh;
  background: #f4f7f9;
}

.daily-content {
  padding: 18px 28px 46px;
}

.daily-title {
  margin: 0 0 8px;
  color: #112033;
  font-size: 28px;
  font-weight: 700;
}

.daily-filter-card {
  padding: 20px;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  background: linear-gradient(180deg, #eeeeee, #f8f8f8);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.daily-filter-card > label {
  display: grid;
  grid-template-columns: 205px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.daily-filter-card > label:not(.daily-wide-field) {
  width: min(100%, 980px);
}

.daily-filter-card span {
  color: #111820;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.daily-filter-card input,
.daily-filter-card select {
  height: 34px;
  border: 1px solid #c9c9c9;
  border-radius: 4px;
  background: #ffffff;
  color: #26313a;
  padding: 0 12px;
}

.daily-section-title {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 18px 0 22px;
  padding-top: 16px;
  border-top: 1px solid #e1e1e1;
  font-size: 22px;
  font-weight: 500;
}

.daily-section-title.is-received {
  color: #00a75f;
}

.daily-section-title.is-paid {
  color: #ef3f33;
}

.daily-specialty-table-wrap,
.daily-paid-panel {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 40px;
}

.daily-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.daily-table th,
.daily-table td {
  padding: 9px 10px;
  border: 1px solid #d8d8d8;
  color: #000000;
  font-size: 14px;
  text-align: center;
}

.daily-table tbody tr:nth-child(even) {
  background: #eeeeee;
}

.daily-table .daily-specialty-row th,
.received-table thead tr:nth-child(2) th {
  background: #06a85d;
  color: #ffffff;
  font-weight: 900;
}

.daily-table .daily-specialty-row th {
  padding: 14px 10px;
  text-transform: uppercase;
}

.received-table td:nth-child(7),
.received-table td:nth-child(8),
.received-table tfoot td {
  color: #008000;
}

.received-table tfoot td {
  background: #ffffff;
  font-weight: 900;
  text-align: right;
}

.paid-summary-box {
  display: grid;
  justify-items: center;
  gap: 5px;
  margin-bottom: 12px;
  background: #ffffff;
}

.paid-summary-box strong {
  width: 100%;
  padding: 7px;
  background: #ffffff;
  text-align: center;
}

.paid-summary-box button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
}

.paid-summary-box svg {
  width: 16px;
  height: 16px;
}

.paid-table th {
  background: #e54839;
  color: #ffffff;
  font-weight: 900;
}

.paid-table td:nth-child(4) {
  color: #ff0000;
}

.daily-summary-heading {
  width: min(1240px, calc(100% - 56px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto 16px;
  padding: 20px 22px;
  border: 1px solid #d9e1e7;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(28, 42, 54, 0.08);
}

.daily-summary-heading p,
.daily-panel-header p,
.daily-overview-title p {
  margin: 0 0 3px;
  color: #75808a;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.daily-summary-heading .daily-title {
  margin: 0;
}

.daily-summary-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-top: 8px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e9f7ef;
  color: #087a40;
  font-size: 12px;
  font-weight: 900;
}

.daily-summary-status.is-empty {
  background: #eef2f5;
  color: #687580;
}

.daily-summary-filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.daily-summary-filters label {
  display: grid;
  gap: 5px;
}

.daily-summary-filters span {
  color: #56616b;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.daily-summary-filters input {
  height: 36px;
  border: 1px solid #cbd2d8;
  border-radius: 4px;
  background: #ffffff;
  color: #26313a;
  padding: 0 11px;
}

.daily-summary-date-control {
  display: grid;
  grid-template-columns: minmax(126px, 1fr) 38px;
  overflow: hidden;
  border: 1px solid #cbd2d8;
  border-radius: 10px;
  background: #ffffff;
}

.daily-summary-date-control input {
  width: 100%;
  border: 0 !important;
  border-radius: 0 !important;
  cursor: pointer;
}

.daily-summary-date-control button {
  display: grid;
  place-items: center;
  width: 38px;
  padding: 0;
  border: 0;
  border-left: 1px solid #dbe9eb;
  background: #f1fbfd;
  color: var(--if-blue);
}

.daily-summary-date-control button:hover,
.daily-summary-date-control button:focus-visible {
  background: #dff7fb;
  color: var(--teal);
}

.daily-summary-date-control button svg {
  width: 18px;
  height: 18px;
}

.daily-operation-date-control {
  min-width: 0;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 40px !important;
  gap: 0 !important;
  overflow: hidden;
  border: 1px solid #c9d7dc;
  border-radius: 10px;
  background: #ffffff;
}

.daily-operation-date-control input {
  width: 100%;
  border: 0 !important;
  border-radius: 0 !important;
  cursor: pointer;
}

.daily-operation-date-control button {
  display: grid;
  place-items: center;
  width: 40px;
  min-height: 35px;
  padding: 0;
  border: 0;
  border-left: 1px solid #d8e8eb;
  background: #ecf9fa;
  color: var(--teal);
}

.daily-operation-date-control button:hover,
.daily-operation-date-control button:focus-visible {
  background: #dff6f7;
  color: var(--if-blue);
  outline: none;
}

.daily-operation-date-control button svg {
  width: 18px;
  height: 18px;
}

.daily-summary-calendar-dialog {
  width: min(360px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid #cfe0e7;
  border-radius: 18px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 24px 64px rgba(11, 34, 53, 0.28);
}

.daily-summary-calendar-dialog::backdrop {
  background: rgba(9, 34, 53, 0.3);
}

.daily-summary-calendar-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid #e4eef0;
}

.daily-summary-calendar-dialog header div {
  display: grid;
  gap: 2px;
}

.daily-summary-calendar-dialog header span {
  color: #667783;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.daily-summary-calendar-title {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  margin: -3px 0 0 -8px;
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  text-align: left;
}

.daily-summary-calendar-title::after {
  width: 7px;
  height: 7px;
  margin-left: 10px;
  border-right: 2px solid #5c7888;
  border-bottom: 2px solid #5c7888;
  content: "";
  transform: rotate(45deg) translateY(-2px);
}

.daily-summary-calendar-title:hover,
.daily-summary-calendar-title:focus-visible,
.daily-summary-calendar-title.is-active {
  border-color: #bfe6ea;
  background: #ecf9fa;
  color: var(--if-blue);
  outline: none;
}

.daily-summary-calendar-dialog .dialog-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #f4f8f9;
  color: #6f7f89;
}

.daily-summary-calendar-dialog .dialog-close:hover {
  background: #e7f7f7;
  color: var(--teal);
}

.daily-summary-calendar-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 14px 18px 8px;
}

.daily-summary-calendar-nav button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #d9e8eb;
  border-radius: 9px;
  background: #ffffff;
  color: #355168;
  font-size: 12px;
  font-weight: 800;
}

.daily-summary-calendar-nav button:nth-child(2) {
  border-color: #bceceb;
  background: #e9fbf9;
  color: #087c75;
}

.daily-summary-calendar-nav button:last-child {
  justify-self: end;
}

.daily-summary-calendar-nav button:hover {
  border-color: var(--if-cyan);
  color: var(--if-blue);
}

.daily-summary-calendar-weekdays,
.daily-summary-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  padding: 0 18px;
}

.daily-summary-calendar-weekdays {
  padding-top: 10px;
  padding-bottom: 6px;
}

.daily-summary-calendar-weekdays span {
  color: #71828e;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.daily-summary-calendar-days {
  padding-bottom: 18px;
}

.daily-summary-calendar-dialog.is-year-picker .daily-summary-calendar-weekdays,
.daily-summary-calendar-dialog.is-month-picker .daily-summary-calendar-weekdays {
  display: none;
}

.daily-summary-calendar-dialog.is-year-picker .daily-summary-calendar-days,
.daily-summary-calendar-dialog.is-month-picker .daily-summary-calendar-days {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding-top: 12px;
}

.daily-summary-calendar-year {
  min-width: 0;
  min-height: 44px;
  border: 1px solid #d9e8eb;
  border-radius: 11px;
  background: #ffffff;
  color: #173247;
  font-size: 13px;
  font-weight: 900;
}

.daily-summary-calendar-year:hover,
.daily-summary-calendar-year:focus-visible {
  border-color: #9bdfe5;
  background: #eaf9fb;
  color: var(--if-blue);
  outline: none;
}

.daily-summary-calendar-year.is-current {
  border-color: #82d8d1;
  color: #087d74;
}

.daily-summary-calendar-year.is-selected {
  border-color: var(--if-blue);
  background: var(--if-blue);
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(14, 90, 136, 0.2);
}

.daily-summary-calendar-month-option {
  min-width: 0;
  min-height: 44px;
  padding: 0 8px;
  border: 1px solid #d9e8eb;
  border-radius: 11px;
  background: #ffffff;
  color: #173247;
  font-size: 12px;
  font-weight: 900;
}

.daily-summary-calendar-month-option:hover,
.daily-summary-calendar-month-option:focus-visible {
  border-color: #9bdfe5;
  background: #eaf9fb;
  color: var(--if-blue);
  outline: none;
}

.daily-summary-calendar-month-option.is-selected {
  border-color: var(--if-blue);
  background: var(--if-blue);
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(14, 90, 136, 0.2);
}

.daily-summary-calendar-days > span,
.daily-summary-calendar-day {
  min-width: 0;
  height: 36px;
}

.daily-summary-calendar-day {
  border: 1px solid transparent;
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.daily-summary-calendar-day:hover {
  border-color: #aee8ed;
  background: #e9fbfd;
  color: var(--if-blue);
}

.daily-summary-calendar-day.is-today {
  border-color: #9bded8;
  color: #07887d;
}

.daily-summary-calendar-day.is-selected {
  border-color: var(--if-blue);
  background: var(--if-blue);
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(14, 90, 136, 0.22);
}

#dailySummaryClinic {
  width: min(380px, 34vw);
}

.daily-summary-metrics {
  width: min(1240px, calc(100% - 56px));
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 0 auto 14px;
}

.daily-summary-metrics article {
  --metric-color: #64727d;
  position: relative;
  min-height: 102px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 15px;
  border: 1px solid rgba(17, 32, 43, 0.08);
  border-left: 6px solid var(--metric-color);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(22, 35, 44, 0.07);
}

.daily-summary-shortcut {
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.daily-summary-shortcut:hover,
.daily-summary-shortcut:focus-visible,
.daily-summary-shortcut.is-active {
  border-color: #5aa1d6;
  box-shadow: 0 10px 24px rgba(25, 120, 189, 0.16);
  outline: none;
  transform: translateY(-1px);
}

.daily-summary-metrics .daily-summary-shortcut.is-active {
  border-color: var(--metric-color);
  box-shadow: 0 14px 28px rgba(25, 120, 189, 0.2);
}

.daily-summary-metrics .daily-summary-shortcut.is-active::after {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--metric-color);
  content: "";
}

.daily-summary-metrics article.is-received {
  --metric-color: #00a65a;
  background: linear-gradient(135deg, rgba(0, 166, 90, 0.1), #ffffff 62%);
}

.daily-summary-metrics article.is-paid {
  --metric-color: #e34a3b;
  background: linear-gradient(135deg, rgba(227, 74, 59, 0.1), #ffffff 62%);
}

.daily-summary-metrics article.is-balance {
  --metric-color: #05648e;
  background: linear-gradient(135deg, rgba(5, 100, 142, 0.12), #ffffff 62%);
}

.daily-summary-metrics article.is-budget {
  --metric-color: #f39a12;
  background: linear-gradient(135deg, rgba(243, 154, 18, 0.12), #ffffff 62%);
}

.daily-summary-metrics article.is-attendance {
  --metric-color: #08a9d2;
  background: linear-gradient(135deg, rgba(8, 169, 210, 0.12), #ffffff 62%);
}

.daily-summary-metrics article.is-patient {
  --metric-color: #335f7a;
  background: linear-gradient(135deg, rgba(51, 95, 122, 0.12), #ffffff 62%);
}

.daily-summary-metrics span {
  color: #5c6872;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.daily-summary-metrics strong {
  color: #142230;
  font-size: 22px;
}

.daily-summary-metrics small {
  color: #7b8791;
  font-size: 11px;
}

.daily-summary-tabs {
  display: none;
  width: min(1240px, calc(100% - 56px));
  gap: 6px;
  margin: 0 auto;
  padding: 5px;
  border: 1px solid #d9e1e7;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(28, 42, 54, 0.05);
  overflow-x: auto;
}

.daily-summary-tabs button {
  position: relative;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #69757e;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.daily-summary-tabs button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: transparent;
  content: "";
}

.daily-summary-tabs button:hover,
.daily-summary-tabs button.is-active {
  background: #eef6fb;
  color: #1978bd;
}

.daily-summary-tabs button.is-active::after {
  background: #1978bd;
}

.daily-summary-panel {
  width: min(1240px, calc(100% - 56px));
  min-height: 290px;
  margin: 0 auto 42px;
  padding: 18px 0 0;
}

.daily-overview-showcase {
  display: grid;
  grid-template-columns: minmax(300px, 1.15fr) minmax(260px, 0.9fr) minmax(320px, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.daily-cash-card,
.daily-movement-card,
.daily-recent-card,
.daily-overview-grid > article {
  border: 1px solid #d9e1e7;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 7px 20px rgba(28, 42, 54, 0.06);
}

.daily-cash-card,
.daily-movement-card,
.daily-recent-card {
  min-height: 256px;
  padding: 18px;
}

.daily-overview-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.daily-overview-title h3 {
  margin: 0;
  color: #192a39;
  font-size: 19px;
  font-weight: 800;
}

.daily-overview-title > span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e5f6ed;
  color: #087a40;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.daily-overview-title > span.is-negative {
  background: #fde9e6;
  color: #c83227;
}

.daily-cash-lines {
  display: grid;
  gap: 10px;
}

.daily-cash-lines > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 50px;
  padding: 0 14px;
  border-radius: 5px;
  background: #f6f8fa;
}

.daily-cash-lines span,
.daily-movement-grid span,
.daily-recent-item span {
  color: #66737d;
  font-size: 12px;
  font-weight: 800;
}

.daily-cash-lines strong {
  color: #087a40;
  font-size: 21px;
  white-space: nowrap;
}

.daily-cash-lines .is-balance {
  background: #eaf5fb;
}

.daily-cash-lines .is-balance strong {
  color: #05648e;
}

.daily-cash-lines strong.is-negative {
  color: #d6342a;
}

.daily-movement-grid {
  display: grid;
  gap: 10px;
}

.daily-movement-grid > div {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 14px;
  padding: 11px 14px;
  border: 1px solid #e3e8ec;
  border-radius: 5px;
  background: #fbfcfd;
}

.daily-movement-grid strong {
  grid-row: span 2;
  color: #172534;
  font-size: 24px;
}

.daily-movement-grid small {
  color: #87929b;
  font-size: 12px;
}

.daily-recent-list {
  display: grid;
  gap: 8px;
}

.daily-recent-list .daily-breakdown-empty {
  margin: 0;
  padding: 42px 18px;
}

.daily-recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 50px;
  padding: 10px 12px;
  border: 1px solid #e3e8ec;
  border-radius: 5px;
  background: #fbfcfd;
}

.daily-recent-item div {
  display: grid;
  gap: 3px;
}

.daily-recent-item div:last-child {
  justify-items: end;
  text-align: right;
}

.daily-recent-item strong {
  color: #172534;
  font-size: 13px;
}

.daily-recent-item div:last-child strong {
  color: #008b3a;
}

.daily-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.daily-overview-grid > article {
  min-height: 280px;
  padding: 18px;
}

.daily-overview-grid h3,
.daily-panel-header h3 {
  margin: 0;
  color: #22313d;
  font-size: 18px;
  font-weight: 600;
}

.daily-breakdown-row {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.daily-breakdown-row > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #44515b;
  font-size: 13px;
}

.daily-breakdown-row i {
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: #e8ecef;
}

.daily-breakdown-row b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #00a65a;
}

.daily-overview-grid article:nth-child(2) .daily-breakdown-row b {
  background: #1978bd;
}

.daily-breakdown-empty,
.daily-summary-empty {
  margin: 18px 0 0;
  padding: 32px 20px;
  border: 1px dashed #ccd3d8;
  border-radius: 5px;
  background: #f9fafb;
  color: #76828c;
  text-align: center;
}

.daily-panel-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.daily-panel-header > strong {
  color: #138743;
  font-size: 20px;
}

.daily-summary-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #d8dde1;
  border-radius: 4px;
  background: #ffffff;
}

.daily-summary-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.daily-summary-table th,
.daily-summary-table td {
  padding: 10px 11px;
  border-right: 1px solid #dde1e4;
  border-bottom: 1px solid #dde1e4;
  color: #26313a;
  font-size: 13px;
  text-align: center;
}

.daily-summary-table th {
  background: #e3e6e8;
  color: #293640;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.daily-summary-table tbody tr:nth-child(even) {
  background: #f3f5f6;
}

.daily-summary-table .daily-money-cell {
  color: #008b3a;
  font-weight: 900;
}

.daily-summary-table .daily-money-cell.is-paid {
  color: #df3f35;
}

.daily-received-groups {
  display: grid;
  gap: 20px;
}

.daily-received-group {
  overflow: hidden;
  border: 1px solid #cfded8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(21, 49, 64, 0.06);
}

.daily-received-group-header {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 16px;
  background: linear-gradient(180deg, #08ab61 0%, #009b55 100%);
  color: #ffffff;
}

.daily-received-group-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.daily-received-group-header strong {
  font-size: 15px;
  white-space: nowrap;
}

.daily-received-columns,
.daily-received-row {
  display: grid;
  grid-template-columns: 0.72fr 1.45fr 1.35fr 1.35fr 0.85fr 1.2fr 0.8fr 0.9fr 1.2fr;
  align-items: center;
  gap: 8px;
}

.daily-received-columns {
  padding: 9px 12px;
  border-bottom: 1px solid #dce8e2;
  background: #eef8f4;
}

.daily-received-columns span {
  color: #38524a;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.daily-received-list {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
}

.daily-received-row {
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid #dce5e1;
  border-radius: 7px;
  background: #ffffff;
}

.daily-received-row:nth-child(even) {
  background: #f7faf9;
}

.daily-received-row span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.daily-received-row small {
  color: #65746f;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.daily-received-row strong {
  min-width: 0;
  color: #132433;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.daily-received-discount,
.daily-received-value {
  color: #008b3a !important;
}

.daily-received-action-cell {
  justify-items: end;
}

.daily-received-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid #dce8e2;
  background: #f7fbf9;
}

.daily-received-summary span {
  min-width: 160px;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #d7e9df;
  border-radius: 7px;
  background: #ffffff;
  text-align: right;
}

.daily-received-summary small {
  color: #51665e;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.daily-received-summary strong {
  color: #008b3a;
  font-size: 15px;
  font-weight: 900;
}

.daily-paid-groups {
  display: grid;
  gap: 20px;
}

.daily-paid-group {
  overflow: hidden;
  border: 1px solid #f0d2cd;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(64, 21, 21, 0.06);
}

.daily-paid-group-header {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 16px;
  background: linear-gradient(180deg, #e94d42 0%, #d94136 100%);
  color: #ffffff;
}

.daily-paid-group-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.daily-paid-group-header strong {
  font-size: 15px;
  white-space: nowrap;
}

.daily-paid-columns,
.daily-paid-row {
  display: grid;
  grid-template-columns: 1.55fr 1.25fr 1.15fr 1.05fr 0.9fr 1.1fr;
  align-items: center;
  gap: 8px;
}

.daily-paid-columns {
  padding: 9px 12px;
  border-bottom: 1px solid #f0d8d4;
  background: #fff2ef;
}

.daily-paid-columns span {
  color: #70433d;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.daily-paid-list {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
}

.daily-paid-row {
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid #ecdeda;
  border-radius: 7px;
  background: #ffffff;
}

.daily-paid-row:nth-child(even) {
  background: #fbf8f7;
}

.daily-paid-row span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.daily-paid-row small {
  color: #7a615c;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.daily-paid-row strong {
  min-width: 0;
  color: #132433;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.daily-paid-value {
  color: #df3f35 !important;
}

.daily-paid-action-cell {
  justify-items: end;
}

.daily-paid-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid #f0d8d4;
  background: #fff8f7;
}

.daily-paid-summary span {
  min-width: 150px;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #f0d2cd;
  border-radius: 7px;
  background: #ffffff;
  text-align: right;
}

.daily-paid-summary small {
  color: #70433d;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.daily-paid-summary strong {
  color: #df3f35;
  font-size: 15px;
  font-weight: 900;
}

.daily-row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 30px;
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #eef6ff;
  color: #1f7dcf;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 11px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.daily-row-action svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.daily-row-action:hover,
.daily-row-action:focus-visible {
  box-shadow: 0 8px 18px rgba(18, 42, 54, 0.12);
  filter: brightness(1.02);
  transform: translateY(-1px);
}

.daily-row-action.is-received {
  border-color: #a8ead1;
  background: #e7fff4;
  color: #04744a;
}

.daily-row-action.is-paid {
  border-color: #ffd0c9;
  background: #fff0ed;
  color: #d9342b;
}

.daily-row-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

@media (max-width: 1100px) {
  .daily-received-columns,
  .daily-paid-columns {
    display: none;
  }

  .daily-received-row,
  .daily-paid-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .daily-received-action-cell,
  .daily-paid-action-cell {
    justify-items: start;
  }
}

.opening-panel {
  display: grid;
  gap: 10px;
  border-radius: 18px;
}

.opening-detail-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -20px -20px 20px;
  padding: 11px 17px 11px 22px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(115deg, #063b69 0%, #087ab0 58%, #12b9b0 100%);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(5, 63, 105, 0.18);
  position: relative;
  overflow: hidden;
}

.opening-detail-header::after {
  content: "";
  width: 180px;
  height: 180px;
  position: absolute;
  right: 78px;
  top: -116px;
  border: 28px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.opening-detail-header > div,
.opening-detail-header > span {
  position: relative;
  z-index: 1;
}

.opening-detail-header p,
.opening-detail-header h2 {
  margin: 0;
}

.opening-detail-header p {
  margin-bottom: 3px;
  color: #9ff4e8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.opening-detail-header h2 {
  font-size: 20px;
  font-weight: 850;
}

.opening-detail-header span {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
  font-size: 11px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.opening-detail-header span::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 2px solid rgba(255,255,255,.45);
  border-radius: 50%;
  background: #72e5d2;
}

.opening-detail-header span.is-closed {
  border-color: rgba(255,255,255,.5);
  background: #effcf7;
  color: #08765f;
}

.opening-detail-header span.is-closed::before {
  border-color: #bdebdc;
  background: #17ad83;
}

.opening-detail-header span.is-not-opened {
  border-color: rgba(255,255,255,.7);
  background: #eef7fb;
  color: #27627d;
}

.opening-detail-header span.is-not-opened::before {
  border-color: #c7e1ec;
  background: #69a9c4;
}

.opening-detail-header span.is-no-movement {
  border-color: rgba(255,255,255,.72);
  background: #f2f5f7;
  color: #5e6e78;
}

.opening-detail-header span.is-no-movement::before {
  border-color: #d8e0e4;
  background: #96a6af;
}

.opening-detail-header span.is-reopened {
  border-color: #bfe8d9;
  background: #edf9f4;
  color: #177158;
}

.opening-detail-header span.is-reopened::before {
  border-color: #b9e5d6;
  background: #19a77f;
}

.opening-detail-header span.is-movement-only {
  border-color: #f6dea1;
  background: #fff7df;
  color: #8b600d;
}

.opening-detail-header span.is-movement-only::before {
  border-color: #f3d78b;
  background: #dda21e;
}

.opening-detail-header span.is-pending-close {
  background: #fff4d6;
  color: #9a5b00;
}

.opening-detail-header span.is-pending-close::before {
  border-color: #f9dc91;
  background: #e99a15;
}

.daily-unopened-day-state {
  min-height: 365px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 9px;
  margin: 22px;
  padding: 38px 24px;
  border: 1px dashed #bfd9e3;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 10%, rgba(21, 168, 181, .1), transparent 34%),
    linear-gradient(180deg, #f8fcfd, #f2f8fa);
  text-align: center;
}

.daily-unopened-day-state.is-hidden { display: none; }

.daily-unopened-day-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin-bottom: 5px;
  border: 1px solid #c9e3e9;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(22, 87, 107, .1);
  color: #2385a0;
}

.daily-unopened-day-icon svg { width: 32px; height: 32px; }
.daily-unopened-day-eyebrow { color: #2185a0; font-size: 9px; font-weight: 1000; letter-spacing: .14em; }
.daily-unopened-day-state h3 { margin: 2px 0 0; color: #173a4d; font-size: 24px; font-weight: 950; letter-spacing: -.025em; }
.daily-unopened-day-state p { max-width: 540px; margin: 0; color: #71848e; font-size: 11px; font-weight: 650; line-height: 1.55; }
.daily-unopened-day-state p strong { color: #3c6072; }
.daily-unopened-day-reopen {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
  padding: 0 21px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #e19118, #f2a31a);
  box-shadow: 0 12px 24px rgba(218, 139, 18, .22);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}
.daily-unopened-day-reopen:hover { transform: translateY(-1px); box-shadow: 0 15px 27px rgba(218, 139, 18, .28); }
.daily-unopened-day-reopen svg { width: 15px; height: 15px; }

.opening-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.opening-detail-summary {
  margin-top: 8px;
}

.opening-summary article {
  min-height: 96px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.opening-summary span,
.opening-summary strong {
  display: block;
  text-align: center;
}

.opening-summary span {
  font-weight: 800;
  color: #5d6870;
}

.opening-summary strong {
  color: #00a75f;
  font-size: 24px;
}

.daily-map-section {
  display: grid;
  gap: 22px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid #e0e4e7;
}

.daily-map-title {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px 12px 22px;
  border-radius: 18px;
  background: linear-gradient(115deg, #063b69 0%, #087ab0 58%, #12b9b0 100%);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(5, 63, 105, 0.2);
  position: relative;
  overflow: hidden;
}

.daily-map-title::after {
  content: "";
  width: 180px;
  height: 180px;
  position: absolute;
  right: 74px;
  top: -115px;
  border: 28px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.daily-map-title > div {
  position: relative;
  z-index: 1;
}

.daily-map-title span {
  display: block;
  margin-bottom: 3px;
  color: #9ff4e8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.daily-map-title h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 850;
}

.daily-map-title button,
.opening-small-action {
  width: fit-content;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 800;
}

.daily-map-title button {
  min-height: 46px;
  padding: 0 17px;
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
  backdrop-filter: blur(8px);
}

.daily-map-title button svg {
  width: 18px;
  height: 18px;
}

.daily-map-cards {
  display: grid;
  gap: 16px;
}

.daily-map-professional-card {
  overflow: hidden;
  border: 1px solid #dce9ee;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(14, 52, 75, 0.1);
  position: relative;
}

.daily-map-professional-card::before {
  content: "";
  width: 5px;
  position: absolute;
  inset: 18px auto 18px 0;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(#13bfa5, #0874ad);
}

.daily-map-card-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 18px 8px 26px;
  border-bottom: 1px solid #e4eef2;
  background: linear-gradient(90deg, #f8fcfd, #ffffff);
}

.daily-map-card-header > div > span {
  display: block;
  margin-bottom: 2px;
  color: #718695;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.daily-map-card-header h4 {
  margin: 0;
  color: #083b65;
  font-size: 18px;
  font-weight: 850;
}

.daily-map-card-header button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #bce9e2;
  border-radius: 11px;
  background: #eafaf7;
  color: #079d89;
}

.daily-map-card-header svg {
  width: 24px;
  height: 24px;
}

.daily-map-card-times {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 16px 16px;
}

.daily-map-card-times > span {
  min-width: 220px;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border: 1px solid #d9eaee;
  border-radius: 15px;
  background: #f7fbfc;
  color: #15384f;
  font-size: 12px;
  font-weight: 800;
}

.daily-map-card-times > span > i {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: #12b99e;
  box-shadow: 0 0 0 3px #c9f2eb;
}

.daily-map-card-times > span.is-exit > i {
  background: #0875ad;
  box-shadow: 0 0 0 3px #d5eaf5;
}

.daily-map-card-times > b {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, #65d7c5, #7bb9d5);
}

.daily-map-card-times strong {
  display: block;
  margin-bottom: 1px;
  color: #6f8491;
  font-size: 9px;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.daily-map-card-table {
  width: min(100% - 110px, 1076px);
  min-width: 0;
  margin: 0 auto 24px;
  border-collapse: separate;
  border-spacing: 0 5px;
}

.daily-map-card-table th,
.daily-map-card-table td {
  padding: 9px 14px;
  border: 0;
  text-align: center;
}

.daily-map-card-table th {
  background: transparent;
  color: #6a7e8b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.daily-map-card-table tbody td {
  background: #f5f9fa;
  border-top: 1px solid #e2ecef;
  border-bottom: 1px solid #e2ecef;
}

.daily-map-card-table tbody td:first-child {
  border-left: 1px solid #e2ecef;
  border-radius: 11px 0 0 11px;
}

.daily-map-card-table tbody td:last-child {
  border-right: 1px solid #e2ecef;
  border-radius: 0 11px 11px 0;
}

.daily-map-card-table td:last-child {
  color: #083b65;
  font-weight: 850;
}

.daily-map-card-label {
  color: #078d79;
  font-weight: 900;
  text-align: right;
  text-transform: uppercase;
}

.daily-map-card-label.is-total {
  color: #083b65;
}

.daily-map-card-table tbody tr:last-child td {
  background: linear-gradient(90deg, #e8f7f5, #eef7fb);
  border-color: #bfe4df;
}

.daily-map-empty {
  padding: 34px 18px;
  border: 1px dashed #cbd4dc;
  border-radius: 5px;
  background: #ffffff;
  color: #687580;
  text-align: center;
}

.daily-map-subsection {
  display: grid;
  gap: 12px;
  padding: 18px 20px 20px;
  border: 1px solid #dce9ee;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(14, 52, 75, .06);
}

.daily-map-subsection h3 {
  margin: 0;
  padding-left: 13px;
  border-left: 4px solid #12b9a2;
  color: #083b65;
  font-size: 18px;
  font-weight: 850;
}

.daily-map-subsection h3 span {
  display: block;
  margin-bottom: 2px;
  color: #718592;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.daily-map-table {
  min-width: 760px;
}

@media (max-width: 760px) {
  .opening-detail-header {
    min-height: 68px;
    padding: 10px 12px 10px 16px;
    border-radius: 15px 15px 0 0;
  }

  .opening-detail-header h2 {
    font-size: 16px;
  }

  .opening-detail-header span {
    min-height: 32px;
    padding: 0 10px;
    white-space: nowrap;
  }

  .daily-unopened-day-state {
    min-height: 310px;
    margin: 14px;
    padding: 30px 18px;
  }

  .daily-unopened-day-state h3 { font-size: 21px; }

  .daily-map-title {
    min-height: 68px;
    padding: 10px 12px 10px 16px;
    border-radius: 15px;
  }

  .daily-map-title h3 {
    font-size: 16px;
  }

  .daily-map-title button {
    min-height: 42px;
    padding: 0 12px;
  }

  .daily-map-card-times {
    gap: 8px;
  }

  .daily-map-card-times > span {
    min-width: 0;
    flex: 1 1 0;
    padding: 7px 10px;
  }

  .daily-map-card-times > b {
    width: 20px;
    flex: 0 0 20px;
  }

  .daily-map-card-table {
    width: calc(100% - 28px);
  }

  .daily-map-subsection {
    padding: 15px 14px 16px;
  }
}

/* Formas de pagamento - identidade Tec Dent */
[data-view-panel="CadastroFormasPagamento"] .payment-method-page {
  background: linear-gradient(180deg, #f4f9fb 0, #ffffff 260px);
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-content {
  padding-top: 16px;
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-page-header {
  min-height: 104px;
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 16px 24px;
  border-radius: 18px;
  background: linear-gradient(115deg, #063b69 0%, #087ab0 58%, #12b9b0 100%);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(5, 63, 105, .18);
  position: relative;
  overflow: hidden;
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-page-header::after {
  content: "";
  width: 190px;
  height: 190px;
  position: absolute;
  right: 80px;
  top: -125px;
  border: 30px solid rgba(255,255,255,.08);
  border-radius: 50%;
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-page-header > div {
  position: relative;
  z-index: 1;
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-page-header span {
  color: #9ff4e8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-title {
  margin: 2px 0 3px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 850;
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-page-header p {
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 650;
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-action-card,
[data-view-panel="CadastroFormasPagamento"] .payment-method-detail-card {
  border: 1px solid #d9e9ee;
  border-radius: 17px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(14,52,75,.08);
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-action-card {
  min-height: 82px;
  padding: 17px 20px;
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-action-card .blue-action {
  width: fit-content;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 17px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(110deg, #0878b0, #12ad9e);
  box-shadow: 0 7px 16px rgba(8,117,160,.2);
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-action-card .blue-action b {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 7px;
  font-size: 17px;
  line-height: 1;
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-action-card label {
  color: #607684;
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-action-card select,
[data-view-panel="CadastroFormasPagamento"] .payment-method-table-tools select,
[data-view-panel="CadastroFormasPagamento"] .payment-method-table-tools input,
[data-view-panel="CadastroFormasPagamento"] .payment-method-detail-row input,
[data-view-panel="CadastroFormasPagamento"] .payment-method-detail-row select {
  min-height: 42px;
  border-color: #cfdee4;
  border-radius: 11px;
  color: #123a52;
  outline: none;
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-table-tools {
  min-height: 54px;
  margin-bottom: 10px;
  padding: 6px 10px;
  border: 1px solid #e0ebef;
  border-radius: 13px;
  background: #f8fbfc;
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-table-wrap {
  padding: 5px 10px 10px;
  border: 1px solid #dce9ee;
  border-radius: 17px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(14,52,75,.06);
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-table {
  border-collapse: separate;
  border-spacing: 0 7px;
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-table th {
  padding: 9px 12px;
  border: 0;
  background: transparent;
  color: #6a7e8b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-table td {
  padding: 10px 12px;
  border-width: 1px 0;
  border-color: #e1ecef;
  background: #f7fafb;
  color: #12384f;
  font-weight: 700;
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-table td:first-child {
  border-left-width: 1px;
  border-radius: 12px 0 0 12px;
  color: #083b65;
  font-weight: 850;
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-table td:last-child {
  border-right-width: 1px;
  border-radius: 0 12px 12px 0;
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-table tbody tr:nth-child(even) {
  background: transparent;
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-edit-button {
  width: 34px;
  height: 34px;
  border: 1px solid #bde7e1;
  border-radius: 10px;
  background: #eaf9f6;
  color: #078d79;
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-detail-card {
  gap: 18px;
  padding: 24px;
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-detail-row span,
[data-view-panel="CadastroFormasPagamento"] .payment-method-check-row span {
  color: #536d7b;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-check-row {
  min-height: 42px;
  padding: 5px 10px;
  border-radius: 11px;
  background: #f5fafb;
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-restrict-section {
  padding: 17px;
  border: 1px solid #dce9ee;
  border-radius: 14px;
  background: #f8fbfc;
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-restrict-section h3 {
  color: #083b65;
  font-size: 17px;
  font-weight: 850;
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-detail-actions {
  gap: 8px;
}

[data-view-panel="CadastroFormasPagamento"] .payment-method-detail-actions button,
[data-view-panel="CadastroFormasPagamento"] .payment-method-restrict-section button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 11px;
}

@media (max-width: 760px) {
  [data-view-panel="CadastroFormasPagamento"] .payment-method-page-header {
    min-height: 90px;
    padding: 14px 17px;
    border-radius: 15px;
  }

  [data-view-panel="CadastroFormasPagamento"] .payment-method-title {
    font-size: 19px;
  }

  [data-view-panel="CadastroFormasPagamento"] .payment-method-action-card .blue-action {
    width: 100%;
    justify-content: center;
  }
}

.opening-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 10px;
}

.opening-actions button {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
}

.professional-opening-panel {
  width: min(1140px, calc(100% - 112px));
  min-height: 412px;
  margin: 0 auto;
  padding: 20px;
}

.opening-meta-row {
  display: grid;
  grid-template-columns: minmax(300px, 1.2fr) repeat(2, minmax(205px, .8fr));
  align-items: center;
  gap: 12px;
  margin: -4px 0 16px;
}

.opening-meta-row label,
.opening-meta-row > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 8px 12px 8px 15px;
  border: 1px solid #dce9ee;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fcfd, #ffffff);
}

.opening-meta-row span {
  color: #657b89;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .07em;
  text-align: left;
  text-transform: uppercase;
}

.opening-meta-row input {
  height: 34px;
  border: 1px solid #c9c9c9;
  border-radius: 4px;
  background: #ffffff;
  color: #26313a;
  padding: 0 12px;
}

.opening-meta-row strong {
  color: #083b65;
  font-size: 17px;
  font-weight: 900;
}

.opening-meta-row #dailyClosingTime.is-open {
  color: #7d909a;
  font-size: 14px;
}

.opening-meta-row #dailyClosingTime.is-closed {
  color: #07875d;
}

.opening-meta-row .daily-operation-date-control {
  min-height: 40px;
  border-color: #cfe1e6;
  border-radius: 11px;
}

.opening-professional-title {
  margin: 8px 0 20px;
  padding-top: 0;
}

.professionals-day-soft-table {
  display: grid;
  gap: 8px;
}

.professionals-day-soft-head,
.opening-professional-row {
  display: grid;
  grid-template-columns: minmax(230px, 2fr) minmax(140px, 1fr) minmax(155px, 1fr) minmax(130px, 0.95fr) 78px 78px 78px;
  align-items: center;
  column-gap: 8px;
}

.professionals-day-soft-head {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  background: #edf2f7;
  color: #31414f;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.professionals-day-list {
  display: grid;
  gap: 8px;
}

.opening-professional-row {
  min-height: 52px;
  padding: 9px 14px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.07), 0 8px 20px rgba(15, 23, 42, 0.035);
}

.opening-professional-row:nth-child(even) {
  background: #f8fafc;
}

.opening-professional-row.is-open {
  box-shadow: inset 4px 0 0 #22c55e, 0 1px 0 rgba(15, 23, 42, 0.07), 0 8px 20px rgba(15, 23, 42, 0.035);
}

.opening-professional-row.is-closed {
  box-shadow: inset 4px 0 0 #64748b, 0 1px 0 rgba(15, 23, 42, 0.07), 0 8px 20px rgba(15, 23, 42, 0.035);
}

.opening-professional-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.opening-professional-cell.is-name {
  justify-content: center;
  text-align: center;
}

.opening-professional-cell.is-name strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
}

.opening-professional-cell.is-time {
  color: #172033;
  font-weight: 800;
}

.opening-professional-cell.is-action {
  min-height: 34px;
}

.opening-professional-action-locked {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 10px;
  font-weight: 850;
}

.opening-professional-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef6ff;
  color: #0f5c94;
  font-size: 11px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
}

.opening-professional-empty {
  padding: 22px;
  border: 1px dashed #b9cad6;
  border-radius: 10px;
  background: #f8fbfd;
  color: #506071;
  font-weight: 900;
  text-align: center;
}

@media (max-width: 980px) {
  .professionals-day-soft-head {
    display: none;
  }

  .opening-professional-row {
    grid-template-columns: 1fr 1fr;
    row-gap: 10px;
  }

  .opening-professional-cell.is-name,
  .opening-professional-cell.is-time {
    justify-content: flex-start;
  }

  .opening-professional-cell.is-action {
    justify-content: flex-start;
  }
}

.mini-icon {
  display: inline-grid;
  place-items: center;
  vertical-align: middle;
}

.mini-icon svg {
  width: 16px;
  height: 16px;
}

.mini-icon.is-camera {
  color: #3f91d6;
}

button.mini-icon.is-camera {
  padding: 1px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

button.mini-icon.is-camera:hover {
  color: #096dbb;
  transform: scale(1.08);
}

.professional-icon-button {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #f8fafc;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.professional-icon-button:hover {
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.14);
  transform: translateY(-1px);
}

.professional-icon-button svg {
  width: 19px;
  height: 19px;
}

.professional-icon-button.is-close {
  color: #dc2626;
  background: #fff1f2;
  border-color: #fecdd3;
}

.professional-icon-button.is-delete {
  color: #ef4444;
  background: #fff7f7;
  border-color: #fee2e2;
}

.professional-icon-button.is-simulate {
  color: #0ea5e9;
  background: #e0f2fe;
  border-color: #bae6fd;
}

.professional-icon-button.is-edit {
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.professional-icon-button.is-close:hover {
  background: #ffe4e6;
}

.professional-icon-button.is-delete:hover {
  background: #fee2e2;
}

.professional-icon-button.is-simulate:hover {
  background: #bae6fd;
}

.professional-icon-button.is-edit:hover {
  background: #dbeafe;
}

.opening-professional-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
}

.opening-add-professional,
.opening-add-without-professional {
  width: fit-content;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
}

.opening-add-without-professional {
  background: linear-gradient(180deg, #f5a623, #e48705);
}

.professional-opening-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

.day-professional-dialog {
  width: min(900px, calc(100vw - 40px));
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(3, 34, 50, 0.28);
  overflow: hidden;
}

.day-professional-dialog::backdrop {
  background: rgba(5, 26, 39, 0.58);
  backdrop-filter: blur(5px);
}

.day-professional-dialog .day-professional-dialog-header {
  position: relative;
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  border-bottom: 0;
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 255, 255, .14) 0 62px, transparent 63px),
    radial-gradient(circle at 92% 36%, rgba(255, 255, 255, .08) 0 104px, transparent 105px),
    linear-gradient(120deg, #075080 0%, #087da0 58%, #12afa8 100%);
  overflow: hidden;
}

.day-professional-dialog-heading {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.day-professional-dialog-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 16px;
  background: rgba(255, 255, 255, .16);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
}

.day-professional-dialog-icon svg {
  width: 27px;
  height: 27px;
}

.day-professional-dialog-heading small {
  display: block;
  margin-bottom: 4px;
  color: #bff9f0;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .14em;
}

.day-professional-dialog-heading h2 {
  margin: 0;
  color: #ffffff;
  font-size: 23px;
  font-weight: 950;
  letter-spacing: -.02em;
}

.day-professional-dialog-heading p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, .78);
  font-size: 11px;
  font-weight: 650;
}

.day-professional-dialog-header > button {
  position: relative;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 11px;
  background: rgba(255, 255, 255, .14);
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

.day-professional-dialog-header > button:hover {
  background: rgba(255, 255, 255, .24);
  transform: translateY(-1px);
}

.day-professional-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
  padding: 26px 28px 30px;
  background: linear-gradient(180deg, #f8fcfd 0%, #ffffff 100%);
}

.day-professional-form-grid label {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.day-professional-form-grid .day-professional-field-wide {
  grid-column: 1 / -1;
}

.day-professional-form-grid label > span {
  color: #315161;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .055em;
  text-align: left;
  text-transform: uppercase;
}

.day-professional-form-grid input[type="search"],
.day-professional-form-grid input[type="text"],
.day-professional-form-grid select {
  width: 100%;
  height: 46px;
  box-sizing: border-box;
  border: 1px solid #cfe1e6;
  border-radius: 12px;
  background: #ffffff;
  padding: 0 14px;
  color: #153d50;
  font: inherit;
  font-weight: 750;
  outline: 0;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.day-professional-form-grid input:focus,
.day-professional-form-grid select:focus {
  border-color: #18b8b5;
  background: #fcffff;
  box-shadow: 0 0 0 4px rgba(24, 184, 181, .13);
}

.day-professional-form-grid .day-professional-check {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  align-content: center;
  min-height: 46px;
  margin-top: 17px;
  padding: 0 14px;
  box-sizing: border-box;
  border: 1px solid #d8e8eb;
  border-radius: 12px;
  background: #f3faf9;
}

.day-professional-check input {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: #0aa39e;
}

.day-professional-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 17px 24px;
  border-top: 1px solid #dcebed;
  background: #f6fbfb;
}

.day-professional-dialog-actions button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(8, 67, 86, .12);
}

.day-professional-dialog-actions button svg {
  width: 16px;
  height: 16px;
}

.day-professional-dialog-actions .day-professional-cancel-action {
  border-color: #cddfe3;
  background: #ffffff;
  color: #526d79;
  box-shadow: none;
}

.day-professional-dialog-actions .blue-action {
  background: linear-gradient(135deg, #07999a, #10b7ad);
}

.day-professional-dialog-actions .orange-action {
  background: linear-gradient(135deg, #f59e0b, #f47b16);
}

.day-professional-dialog-actions .danger-action {
  background: linear-gradient(135deg, #e84c4c, #dc3030);
}

@media (max-width: 680px) {
  .day-professional-dialog {
    width: min(100% - 20px, 900px);
  }

  .day-professional-dialog .day-professional-dialog-header {
    min-height: 92px;
    padding: 16px;
  }

  .day-professional-dialog-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .day-professional-dialog-heading {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 11px;
  }

  .day-professional-dialog-heading h2 {
    font-size: 19px;
  }

  .day-professional-dialog-heading p {
    display: none;
  }

  .day-professional-form-grid {
    grid-template-columns: 1fr;
    padding: 20px 16px;
  }

  .day-professional-form-grid .day-professional-field-wide {
    grid-column: auto;
  }

  .day-professional-form-grid .day-professional-check {
    margin-top: 0;
  }

  .day-professional-dialog-actions {
    padding: 14px 16px;
  }
}

.closing-simulation-dialog,
.map-generation-dialog {
  width: min(900px, calc(100vw - 40px));
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: #ffffff;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.4);
}

.closing-simulation-dialog::backdrop,
.map-generation-dialog::backdrop {
  background: rgba(0, 0, 0, 0.58);
}

.closing-simulation-modal-form {
  margin: 0;
}

.map-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid #e0e4e8;
}

.map-dialog-header span {
  display: block;
  margin-bottom: 3px;
  color: #5d6d7d;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.map-dialog-header h2 {
  margin: 0;
  color: #1f2933;
  font-size: 22px;
  line-height: 1.15;
}

.dialog-close-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f4f6f8;
  color: #8b98a5;
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.dialog-close-button:hover {
  background: #e9eef3;
  color: #34495e;
}

.access-manager-dialog {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  overflow: hidden;
}

.workspace-view.access-manager-dialog,
.workspace-view.profile-manager-dialog {
  width: 100%;
  height: auto;
  min-height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  overflow: visible;
  background: #f5faf9;
}

.workspace-view.access-manager-dialog.is-active,
.workspace-view.profile-manager-dialog.is-active {
  display: block;
  padding-left: 0;
  transition: padding-left 0.22s ease;
}

.workspace-view.access-manager-dialog.is-active:has(> .franchise-sidebar),
.workspace-view.profile-manager-dialog.is-active:has(> .franchise-sidebar) {
  padding-left: 88px;
}

.workspace-view.access-manager-dialog.is-active:has(.franchise-sidebar:hover),
.workspace-view.access-manager-dialog.is-active:has(.franchise-sidebar:focus-within),
.workspace-view.profile-manager-dialog.is-active:has(.franchise-sidebar:hover),
.workspace-view.profile-manager-dialog.is-active:has(.franchise-sidebar:focus-within) {
  padding-left: 268px;
}

.workspace-view.access-manager-dialog.is-active > .franchise-sidebar,
.workspace-view.profile-manager-dialog.is-active > .franchise-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 90;
}

.workspace-view.access-manager-dialog .access-manager-shell,
.workspace-view.profile-manager-dialog .profile-manager-panel {
  min-width: 0;
  min-height: 100vh;
}

body.franchise-sidebar-collapsed .workspace-view.access-manager-dialog.is-active:has(> .franchise-sidebar),
body.franchise-sidebar-collapsed .workspace-view.profile-manager-dialog.is-active:has(> .franchise-sidebar) {
  padding-left: 88px;
}

body.franchise-sidebar-collapsed .workspace-view.access-manager-dialog.is-active:has(.franchise-sidebar:hover),
body.franchise-sidebar-collapsed .workspace-view.access-manager-dialog.is-active:has(.franchise-sidebar:focus-within),
body.franchise-sidebar-collapsed .workspace-view.profile-manager-dialog.is-active:has(.franchise-sidebar:hover),
body.franchise-sidebar-collapsed .workspace-view.profile-manager-dialog.is-active:has(.franchise-sidebar:focus-within) {
  padding-left: 268px;
}

.franchise-sidebar {
  position: sticky;
  top: 0;
  z-index: 70;
  width: 88px;
  height: 100vh;
  min-height: 100vh;
  align-self: start;
  flex-direction: column;
  flex-wrap: nowrap;
  align-content: stretch;
  align-items: stretch;
  gap: 16px;
  overflow: hidden;
  padding: 18px 10px;
  border-right: 1px solid rgba(13, 183, 204, 0.18);
  border-bottom: 0;
  background:
    radial-gradient(circle at 28% 0%, rgba(13, 183, 204, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 252, 252, 0.98) 100%);
  box-shadow: 16px 0 34px rgba(8, 25, 38, 0.08);
  color: #0a2238;
  transition: width 0.22s ease, padding 0.22s ease, box-shadow 0.22s ease;
}

.franchise-sidebar:hover,
.franchise-sidebar:focus-within {
  width: 268px;
  padding: 18px 14px;
  box-shadow: 20px 0 42px rgba(8, 25, 38, 0.14);
}

.franchise-sidebar-head,
.franchise-sidebar-nav,
.franchise-sidebar-user {
  min-width: 0;
}

.franchise-sidebar-head {
  display: grid;
  gap: 10px;
}

.franchise-sidebar .franchise-sidebar-item:hover,
.franchise-sidebar .franchise-sidebar-subitem:hover {
  border-color: rgba(13, 183, 204, 0.24);
  background: rgba(228, 249, 247, 0.9);
  color: #007f73;
  transform: translateY(-1px);
}

.franchise-sidebar .franchise-sidebar-brand {
  width: 100%;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #0a2238;
  cursor: pointer;
  text-decoration: none;
}

.franchise-sidebar:hover .franchise-sidebar-brand,
.franchise-sidebar:focus-within .franchise-sidebar-brand {
  justify-content: center;
  padding: 0;
}

.franchise-sidebar .franchise-sidebar-brand img {
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(13, 183, 204, 0.18));
  transition: width 0.22s ease, height 0.22s ease, transform 0.22s ease;
}

.franchise-sidebar:hover .franchise-sidebar-brand img,
.franchise-sidebar:focus-within .franchise-sidebar-brand img {
  width: 108px;
  height: 86px;
  transform: translateY(-1px);
}

.franchise-sidebar-brand-copy,
.franchise-sidebar-copy,
.franchise-sidebar-user-copy {
  min-width: 0;
  display: none;
  gap: 3px;
  text-align: left;
}

.franchise-sidebar:hover .franchise-sidebar-brand-copy,
.franchise-sidebar:hover .franchise-sidebar-copy,
.franchise-sidebar:hover .franchise-sidebar-user-copy,
.franchise-sidebar:focus-within .franchise-sidebar-brand-copy,
.franchise-sidebar:focus-within .franchise-sidebar-copy,
.franchise-sidebar:focus-within .franchise-sidebar-user-copy {
  display: grid;
}

.franchise-sidebar-brand-copy strong,
.franchise-sidebar-copy strong,
.franchise-sidebar-user-copy strong {
  overflow: hidden;
  color: #0a2238;
  font-size: 14px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.franchise-sidebar-brand-copy small,
.franchise-sidebar-copy small,
.franchise-sidebar-user-copy small {
  display: none;
}

.franchise-sidebar-nav {
  display: grid;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.franchise-sidebar:hover .franchise-sidebar-nav,
.franchise-sidebar:focus-within .franchise-sidebar-nav {
  opacity: 1;
  pointer-events: auto;
}

.franchise-sidebar .franchise-sidebar-item {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #193044;
  text-align: left;
}

.franchise-sidebar:hover .franchise-sidebar-item,
.franchise-sidebar:focus-within .franchise-sidebar-item {
  justify-content: flex-start;
}

.franchise-sidebar .franchise-sidebar-item.is-active {
  border-color: transparent;
  background: transparent;
  color: #007f73;
  box-shadow: inset 3px 0 0 transparent;
}

.franchise-sidebar .franchise-sidebar-item.is-active:hover {
  border-color: rgba(13, 183, 204, 0.24);
  background: rgba(228, 249, 247, 0.95);
  box-shadow: inset 3px 0 0 #29c9e0;
}

.franchise-sidebar-icon {
  display: none;
}

.franchise-sidebar-group {
  min-width: 0;
}

.franchise-sidebar-group > summary {
  list-style: none;
  cursor: pointer;
}

.franchise-sidebar-group > summary::-webkit-details-marker {
  display: none;
}

.franchise-sidebar-subnav {
  display: none;
  gap: 4px;
  margin: 2px 0 8px 14px;
}

.franchise-sidebar:hover .franchise-sidebar-group[open] .franchise-sidebar-subnav,
.franchise-sidebar:focus-within .franchise-sidebar-group[open] .franchise-sidebar-subnav {
  display: grid;
}

.franchise-sidebar-subitem {
  width: 100%;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #425466;
  font-size: 13px;
  font-weight: 850;
  text-align: left;
}

.franchise-sidebar-owner-actions {
  display: grid;
  gap: 6px;
  margin-top: auto;
}

.franchise-sidebar:has(.franchise-sidebar-owner-actions:not(.is-hidden)) .franchise-sidebar-user {
  margin-top: 0;
}

.franchise-sidebar .franchise-sidebar-owner-action {
  position: relative;
  overflow: hidden;
  border-color: rgba(210, 244, 66, 0.28);
  background: linear-gradient(90deg, rgba(210, 244, 66, 0.17), rgba(255, 255, 255, 0.07));
  color: #ffffff;
  box-shadow: inset 3px 0 0 rgba(210, 244, 66, 0.8);
}

.franchise-sidebar .franchise-sidebar-owner-action::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 15%, rgba(255, 255, 255, 0.16) 50%, transparent 85%);
  transform: translateX(-115%);
  transition: transform 0.42s ease;
}

.franchise-sidebar .franchise-sidebar-owner-action:hover::after,
.franchise-sidebar .franchise-sidebar-owner-action:focus-visible::after {
  transform: translateX(115%);
}

.franchise-sidebar .franchise-sidebar-owner-action .franchise-sidebar-copy small {
  display: block;
  color: rgba(237, 255, 255, 0.62);
  font-size: 10px;
  font-weight: 750;
}

.franchise-sidebar-user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  padding: 10px 8px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent;
}

.franchise-profile-menu {
  position: relative;
  display: grid;
  align-items: stretch;
}

.franchise-profile-trigger {
  min-width: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  cursor: pointer;
}

.franchise-profile-trigger::-webkit-details-marker {
  display: none;
}

.franchise-profile-chevron {
  display: none;
  margin-left: auto;
  color: var(--muted);
  font-size: 15px;
  font-weight: 950;
  transition: transform 0.18s ease;
}

.franchise-sidebar:hover .franchise-profile-chevron,
.franchise-sidebar:focus-within .franchise-profile-chevron {
  display: inline-flex;
}

.franchise-profile-menu[open] .franchise-profile-chevron {
  transform: rotate(180deg);
}

.franchise-profile-panel {
  display: none;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(13, 183, 204, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 28px rgba(8, 25, 38, 0.1);
}

.franchise-profile-menu[open] .franchise-profile-panel {
  display: grid;
}

.franchise-profile-details,
.franchise-profile-actions {
  display: grid;
  gap: 5px;
}

.franchise-profile-details small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.franchise-profile-details strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.franchise-profile-action,
.franchise-logout-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-align: left;
}

.franchise-profile-action {
  border-color: rgba(0, 169, 157, 0.35);
  background: linear-gradient(135deg, rgba(0, 169, 157, 0.14), rgba(19, 183, 204, 0.16));
  color: #007f73;
}

.franchise-logout-button {
  background: var(--danger-soft);
  color: var(--danger);
}

.franchise-sidebar:hover .franchise-sidebar-user,
.franchise-sidebar:focus-within .franchise-sidebar-user {
  justify-content: flex-start;
  border-color: rgba(13, 183, 204, 0.16);
  background: rgba(245, 252, 251, 0.95);
}

.franchise-sidebar .menu-profile-avatar {
  border-color: rgba(159, 237, 232, 0.56);
  background: rgba(223, 248, 244, 0.95);
  color: #007f73;
}

body.franchise-sidebar-collapsed .franchise-sidebar {
  width: 88px;
  padding: 18px 10px;
}

body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-brand,
body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-item,
body.franchise-sidebar-collapsed .franchise-sidebar-user {
  justify-content: center;
  padding-right: 8px;
  padding-left: 8px;
}

body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-brand img {
  width: 54px;
  height: 54px;
}

body.franchise-sidebar-collapsed .franchise-sidebar-brand-copy,
body.franchise-sidebar-collapsed .franchise-sidebar-copy,
body.franchise-sidebar-collapsed .franchise-sidebar-user-copy {
  display: none;
}

body.franchise-sidebar-collapsed .franchise-sidebar:hover,
body.franchise-sidebar-collapsed .franchise-sidebar:focus-within {
  width: 268px;
  padding: 18px 14px;
}

body.franchise-sidebar-collapsed .franchise-sidebar:hover .franchise-sidebar-brand,
body.franchise-sidebar-collapsed .franchise-sidebar:hover .franchise-sidebar-item,
body.franchise-sidebar-collapsed .franchise-sidebar:hover .franchise-sidebar-user,
body.franchise-sidebar-collapsed .franchise-sidebar:focus-within .franchise-sidebar-brand,
body.franchise-sidebar-collapsed .franchise-sidebar:focus-within .franchise-sidebar-item,
body.franchise-sidebar-collapsed .franchise-sidebar:focus-within .franchise-sidebar-user {
  justify-content: flex-start;
}

body.franchise-sidebar-collapsed .franchise-sidebar:hover .franchise-sidebar-brand-copy,
body.franchise-sidebar-collapsed .franchise-sidebar:hover .franchise-sidebar-copy,
body.franchise-sidebar-collapsed .franchise-sidebar:hover .franchise-sidebar-user-copy,
body.franchise-sidebar-collapsed .franchise-sidebar:focus-within .franchise-sidebar-brand-copy,
body.franchise-sidebar-collapsed .franchise-sidebar:focus-within .franchise-sidebar-copy,
body.franchise-sidebar-collapsed .franchise-sidebar:focus-within .franchise-sidebar-user-copy {
  display: grid;
}

@media (max-width: 860px) {
  .workspace-view.access-manager-dialog.is-active,
  .workspace-view.profile-manager-dialog.is-active,
  .clinic-portal.franchise-portal,
  body.franchise-sidebar-collapsed .workspace-view.access-manager-dialog.is-active,
  body.franchise-sidebar-collapsed .workspace-view.profile-manager-dialog.is-active,
  body.franchise-sidebar-collapsed .clinic-portal.franchise-portal {
    grid-template-columns: 1fr;
    padding-left: 0;
  }

  .franchise-sidebar,
  body.franchise-sidebar-collapsed .franchise-sidebar {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    border-right: 0;
    border-bottom: 1px solid rgba(13, 183, 204, 0.22);
  }

  .clinic-portal.franchise-portal .portal-franchise-sidebar {
    position: relative;
    inset: auto;
  }

  .workspace-view.access-manager-dialog.is-active > .franchise-sidebar,
  .workspace-view.profile-manager-dialog.is-active > .franchise-sidebar {
    position: relative;
    inset: auto;
  }

  .franchise-sidebar-nav {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .franchise-sidebar-user {
    margin-top: 0;
  }
}

.access-manager-dialog::backdrop {
  background: rgba(8, 25, 38, 0.52);
  backdrop-filter: blur(6px);
}

.login-screen,
.password-change-layer,
.profile-edit-layer,
.pending-signatures-layer,
.pending-signature-detail-layer,
.map-signature-face-layer,
.professional-opening-photo-layer {
  position: fixed;
  inset: 0;
  z-index: 3200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-screen {
  overflow: auto;
  background:
    radial-gradient(circle at 10% 8%, rgba(10, 197, 228, .24), transparent 27%),
    radial-gradient(circle at 91% 91%, rgba(19, 92, 203, .16), transparent 29%),
    linear-gradient(135deg, #eaf8ff 0%, #f8fbff 48%, #edf3ff 100%);
}

.password-change-layer,
.profile-edit-layer,
.pending-signatures-layer,
.pending-signature-detail-layer,
.map-signature-face-layer,
.professional-opening-photo-layer {
  z-index: 3300;
  background: rgba(8, 25, 38, 0.42);
  backdrop-filter: blur(8px);
}

.pending-signature-detail-layer,
.map-signature-face-layer,
.professional-opening-photo-layer { z-index: 3400; }

.login-screen.is-hidden,
.password-change-layer.is-hidden,
.profile-edit-layer.is-hidden,
.pending-signatures-layer.is-hidden,
.pending-signature-detail-layer.is-hidden,
.map-signature-face-layer.is-hidden,
.professional-opening-photo-layer.is-hidden {
  display: none !important;
}

.password-change-card {
  width: min(430px, 100%);
  display: grid;
  gap: 14px;
  padding: 30px;
  border: 1px solid rgba(13, 183, 204, 0.2);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(8, 25, 38, 0.18);
}

.password-change-card {
  position: relative;
}

.profile-edit-card {
  position: relative;
  width: min(590px, 100%);
  max-height: calc(100vh - 40px);
  display: grid;
  gap: 18px;
  overflow: auto;
  padding: 28px;
  border: 1px solid rgba(13, 183, 204, .22);
  border-radius: 25px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 30px 85px rgba(8, 25, 38, .25);
}

.pending-signatures-card {
  position: relative;
  width: calc(100vw - 48px);
  height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 16px;
  overflow: hidden;
  padding: 28px;
  box-sizing: border-box;
  border: 1px solid rgba(13, 183, 204, .22);
  border-radius: 25px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 30px 85px rgba(8, 25, 38, .25);
}

.pending-signatures-card > .dialog-close-button {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
}

.pending-signatures-heading {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) minmax(230px, auto);
  gap: 15px;
  align-items: center;
  padding-right: 44px;
}
.pending-signatures-heading-copy { min-width: 0; }
.pending-signatures-heading-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: linear-gradient(135deg, #dff7f4, #e8f5ff);
  color: #078a89;
  box-shadow: inset 0 0 0 1px rgba(8, 143, 145, .1);
}
.pending-signatures-heading-icon svg { width: 27px; height: 27px; }
.pending-signatures-heading small { color: #079b9e; font-size: 9px; font-weight: 950; letter-spacing: .13em; }
.pending-signatures-heading h2 { margin: 5px 0 4px; color: #123844; font-size: 27px; font-weight: 950; letter-spacing: -.03em; }
.pending-signatures-heading p { margin: 0; color: #6f858d; font-size: 11px; font-weight: 650; line-height: 1.5; }

.pending-signatures-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: min(330px, 31vw);
  padding: 10px 13px;
  box-sizing: border-box;
  border: 1px solid #d8e9eb;
  border-radius: 13px;
  background: linear-gradient(135deg, #f5fbfc, #f2faf7);
}
.pending-signatures-summary > span { display: grid; gap: 3px; }
.pending-signatures-summary small { color: #789098; font-size: 8px; font-weight: 950; letter-spacing: .1em; }
.pending-signatures-summary strong { color: #174155; font-size: 15px; font-weight: 950; }
.pending-signatures-summary > b { max-width: 155px; overflow: hidden; color: #087f86; font-size: 10px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }

.pending-signatures-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.pending-signatures-tabs > button {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 15px 16px;
  border: 1px solid #d9e6e9;
  border-radius: 15px;
  background: #f8fbfc;
  color: #4b6673;
  cursor: pointer;
  text-align: left;
  transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}
.pending-signatures-tabs > button:hover { border-color: #b8dcdf; background: #f1faf9; transform: translateY(-1px); }
.pending-signatures-tabs > button.is-active { border-color: #48bfc0; background: linear-gradient(135deg, #e8f8f5, #eef9ff); color: #087c7c; box-shadow: inset 0 0 0 1px rgba(72, 191, 192, .12); }
.pending-signatures-tabs > button > span { min-width: 0; display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 9px; align-items: center; }
.pending-signatures-tabs svg { width: 22px; height: 22px; grid-row: 1 / span 2; }
.pending-signatures-tabs strong { overflow: hidden; font-size: 12px; font-weight: 950; text-overflow: ellipsis; white-space: nowrap; }
.pending-signatures-tabs small { overflow: hidden; color: #7a9099; font-size: 8px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.pending-signatures-tabs > button > b { min-width: 30px; height: 30px; display: grid; place-items: center; padding: 0 7px; box-sizing: border-box; border-radius: 999px; background: #e5edf0; color: #526b77; font-size: 10px; font-weight: 950; }
.pending-signatures-tabs > button.is-active > b { background: #0a9895; color: #fff; }

.pending-signatures-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 9px;
  overflow: auto;
  padding-right: 4px;
}
.pending-signature-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 10px;
  align-items: stretch;
}
.pending-signature-item {
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid #dce8eb;
  border-radius: 14px;
  background: #fff;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.pending-signature-item:hover { border-color: #9fd8d5; box-shadow: 0 8px 20px rgba(13, 104, 111, .08); transform: translateY(-1px); }
.pending-signature-item-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #eaf8f5; color: #07847b; }
.pending-signature-item-icon svg { width: 20px; height: 20px; }
.pending-signature-item-copy { min-width: 0; display: grid; gap: 2px; }
.pending-signature-item-copy small { color: #079b9e; font-size: 8px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.pending-signature-item-copy strong { overflow: hidden; color: #183b4d; font-size: 12px; font-weight: 950; text-overflow: ellipsis; white-space: nowrap; }
.pending-signature-item-copy em { color: #7b8c94; font-size: 9px; font-style: normal; font-weight: 700; }
.pending-signature-status { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 999px; background: #fff5df; color: #aa6c00; font-size: 8px; font-weight: 950; white-space: nowrap; }
.pending-signature-status i { width: 7px; height: 7px; border-radius: 50%; background: #f0a20d; box-shadow: 0 0 0 3px rgba(240, 162, 13, .13); }
.pending-signature-row.is-signed .pending-signature-status { background: #e8f8ef; color: #188052; }
.pending-signature-row.is-signed .pending-signature-status i { background: #1da866; box-shadow: 0 0 0 3px rgba(29, 168, 102, .13); }
.pending-signature-sign-action { min-height: 100%; padding: 0 14px; border: 0; border-radius: 14px; background: linear-gradient(135deg, #0a9991, #0cb4a7); color: #fff; cursor: pointer; font-size: 10px; font-weight: 950; box-shadow: 0 8px 18px rgba(10, 137, 130, .17); }
.pending-signature-sign-action:hover { background: linear-gradient(135deg, #07837d, #0a9e95); }
.pending-signature-sign-action:disabled { background: #e8f0ef; color: #76908b; cursor: default; box-shadow: none; }

.pending-signatures-empty {
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 25px;
  border: 1px dashed #cbdfe3;
  border-radius: 18px;
  background: #f8fbfc;
  text-align: center;
}
.pending-signatures-empty > span { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: #e6f7ef; color: #15965b; }
.pending-signatures-empty > span svg { width: 27px; height: 27px; }
.pending-signatures-empty strong { color: #183b4d; font-size: 15px; font-weight: 950; }
.pending-signatures-empty p { max-width: 440px; margin: 0; color: #71868f; font-size: 10px; font-weight: 650; line-height: 1.6; }

.pending-signature-detail-card,
.map-signature-face-card {
  position: relative;
  width: min(680px, 100%);
  max-height: calc(100vh - 40px);
  display: grid;
  gap: 16px;
  overflow: auto;
  padding: 28px;
  box-sizing: border-box;
  border: 1px solid rgba(13, 183, 204, .22);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 85px rgba(8, 25, 38, .28);
}
.pending-signature-detail-card > .dialog-close-button,
.map-signature-face-card > .dialog-close-button { position: absolute; top: 18px; right: 18px; z-index: 2; }
.pending-signature-detail-card header,
.map-signature-face-card header { padding-right: 42px; }
.pending-signature-detail-card header small,
.map-signature-face-card header small { color: #079b9e; font-size: 9px; font-weight: 950; letter-spacing: .12em; }
.pending-signature-detail-card header h2,
.map-signature-face-card header h2 { margin: 6px 0 5px; color: #123844; font-size: 25px; font-weight: 950; }
.pending-signature-detail-card header p,
.map-signature-face-card header p { margin: 0; color: #6e838d; font-size: 10px; line-height: 1.55; }

.professional-opening-photo-card {
  position: relative;
  width: min(720px, 100%);
  max-height: calc(100vh - 40px);
  display: grid;
  gap: 16px;
  overflow: auto;
  padding: 28px;
  box-sizing: border-box;
  border: 1px solid rgba(13, 183, 204, .22);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 85px rgba(8, 25, 38, .28);
}

.professional-opening-photo-card > .dialog-close-button {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
}

.professional-opening-photo-card header { padding-right: 42px; }
.professional-opening-photo-card header small { color: #079b9e; font-size: 9px; font-weight: 950; letter-spacing: .12em; }
.professional-opening-photo-card header h2 { margin: 6px 0 5px; color: #123844; font-size: 25px; font-weight: 950; }
.professional-opening-photo-card header p { margin: 0; color: #6e838d; font-size: 10px; line-height: 1.55; }

.professional-opening-photo-preview {
  position: relative;
  min-height: 300px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d5e6e9;
  border-radius: 18px;
  background: #edf5f6;
}

.professional-opening-photo-preview img {
  width: 100%;
  max-height: 460px;
  display: block;
  object-fit: contain;
}

.professional-opening-photo-preview img:not([src]) { display: none; }
.professional-opening-photo-preview > span { color: #607984; font-size: 11px; font-weight: 850; }
.professional-opening-photo-preview > span.is-hidden { display: none; }

.professional-opening-photo-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.professional-opening-photo-meta > span {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #dce9eb;
  border-radius: 13px;
  background: #f7fbfb;
}

.professional-opening-photo-meta small { color: #799098; font-size: 8px; font-weight: 950; letter-spacing: .08em; }
.professional-opening-photo-meta strong { overflow: hidden; color: #173d4e; font-size: 11px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
  .professional-opening-photo-layer { padding: 12px; }
  .professional-opening-photo-card { padding: 22px 18px 18px; }
  .professional-opening-photo-meta { grid-template-columns: 1fr; }
}
.pending-signature-detail-status { justify-self: start; display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 999px; background: #fff4de; color: #a96900; font-size: 9px; font-weight: 950; }
.pending-signature-detail-status i { width: 8px; height: 8px; border-radius: 50%; background: #f0a20d; box-shadow: 0 0 0 3px rgba(240, 162, 13, .14); }
.pending-signature-detail-status.is-signed { background: #e8f8ef; color: #188052; }
.pending-signature-detail-status.is-signed i { background: #1da866; box-shadow: 0 0 0 3px rgba(29, 168, 102, .13); }
.pending-signature-detail-value { display: grid; gap: 4px; padding: 22px; border-radius: 17px; background: linear-gradient(135deg, #087f86, #0aa59d); color: #fff; }
.pending-signature-detail-value small { color: rgba(255,255,255,.72); font-size: 8px; font-weight: 950; letter-spacing: .11em; }
.pending-signature-detail-value strong { color: #fff; font-size: 29px; font-weight: 950; }
.pending-signature-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pending-signature-detail-grid > span { min-width: 0; display: grid; gap: 5px; padding: 14px; border: 1px solid #dce8eb; border-radius: 13px; background: #f8fbfc; }
.pending-signature-detail-grid small { color: #7c929b; font-size: 8px; font-weight: 950; letter-spacing: .08em; }
.pending-signature-detail-grid strong { overflow: hidden; color: #183b4d; font-size: 11px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.pending-signature-detail-note { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: center; padding: 13px; border: 1px solid #d8e8f3; border-radius: 13px; background: #f2f8fd; color: #537487; }
.pending-signature-detail-note svg { width: 21px; height: 21px; color: #2686af; }
.pending-signature-detail-note span { font-size: 9px; font-weight: 700; line-height: 1.55; }

.map-signature-face-card { width: min(760px, 100%); }
.map-signature-face-preview { position: relative; min-height: 390px; display: grid; place-items: center; overflow: hidden; border: 1px solid #cfe2e6; border-radius: 18px; background: #e9f1f3; }
.map-signature-face-preview video,
.map-signature-face-preview canvas { width: 100%; height: 100%; max-height: 520px; display: block; object-fit: cover; }
.map-signature-face-preview video { transform: scaleX(-1); }
.map-signature-face-preview canvas { object-fit: contain; background: #edf4f5; }
.map-signature-face-preview > span { position: absolute; width: min(430px, calc(100% - 34px)); display: grid; place-items: center; gap: 9px; color: #6f858f; font-size: 10px; font-weight: 850; text-align: center; }
.map-signature-face-preview > span svg { width: 34px; height: 34px; }
.map-signature-face-preview > span b { color: #365766; font-size: 13px; font-weight: 950; }
.map-signature-face-preview > span small { color: #748a93; font-size: 10px; font-weight: 700; line-height: 1.55; }
.map-signature-face-result { padding: 12px 14px; border-radius: 12px; background: #e8f8ef; color: #168052; font-size: 10px; font-weight: 900; }
.map-signature-face-result.is-blocked { background: #fff0f0; color: #b23f3f; }
.map-signature-face-card footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.map-signature-face-card footer button,
.map-signature-face-upload { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; box-sizing: border-box; padding: 0 16px; border: 0; border-radius: 10px; font-size: 10px; font-weight: 900; cursor: pointer; }
.map-signature-face-card .facial-bypass-action { border: 1px solid #efc272; background: #fff5e2; color: #9b5c00; box-shadow: 0 7px 16px rgba(177, 104, 0, .10); }
.map-signature-face-card .facial-bypass-action:hover { border-color: #e4a83d; background: #ffedc8; color: #7d4900; }
.map-signature-face-card .facial-bypass-action:disabled { cursor: wait; opacity: .58; }
.map-signature-face-upload { background: linear-gradient(135deg, #087f86, #0aa59d); color: #ffffff; box-shadow: 0 8px 18px rgba(8, 127, 134, .18); }
.map-signature-face-upload:hover { background: linear-gradient(135deg, #076f76, #08958e); }
.map-signature-face-upload svg { width: 17px; height: 17px; }
.map-signature-face-upload input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

.profile-edit-heading { padding-right: 38px; }
.profile-edit-heading > small { color: #079b9e; font-size: 9px; font-weight: 950; letter-spacing: .13em; }
.profile-edit-heading h2 { margin: 6px 0 4px; color: #123844; font-size: 27px; font-weight: 950; letter-spacing: -.03em; }
.profile-edit-heading p { margin: 0; color: #6f858d; font-size: 11px; font-weight: 650; }

.profile-edit-photo-section {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid #d8e9eb;
  border-radius: 17px;
  background: linear-gradient(135deg, #f5fbfc, #f2faf7);
}

.profile-edit-photo-preview {
  width: 98px;
  height: 98px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, #dff8f4, #e4f3fa);
  box-shadow: 0 10px 24px rgba(9, 91, 100, .16);
  color: #087f73;
  font-size: 24px;
  font-weight: 950;
}
.profile-edit-photo-section > div { min-width: 0; }
.profile-edit-photo-section strong { color: #183b4d; font-size: 14px; font-weight: 950; }
.profile-edit-photo-section p { margin: 5px 0 12px; color: #6d828c; font-size: 10px; line-height: 1.5; }
.profile-edit-photo-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.profile-edit-photo-actions button { min-height: 34px; padding: 0 11px; border-radius: 10px; font-size: 9px; font-weight: 900; }
.profile-edit-photo-actions button svg { width: 14px; height: 14px; }
.profile-photo-select { display: inline-flex; align-items: center; gap: 6px; border: 0; background: #0b9287; color: #fff; }
.profile-photo-remove { border: 1px solid #edd0d0; background: #fff; color: #a34040; }

.profile-edit-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.profile-edit-fields label {
  display: grid;
  gap: 7px;
  color: #4f6a77;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.profile-edit-fields input {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  padding: 0 13px;
  border: 1px solid #cfdee3;
  border-radius: 12px;
  background: #fff;
  color: #19384a;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
}
.profile-edit-fields input:focus { outline: 3px solid rgba(19, 183, 190, .14); border-color: #13aeb3; }
.profile-edit-login-field { grid-column: 1 / -1; }
.profile-edit-login-field input { background: #f2f6f7; color: #71828a; cursor: not-allowed; }
.profile-edit-login-field small { color: #89989f; font-size: 8px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.profile-edit-card footer { display: flex; justify-content: flex-end; gap: 9px; padding-top: 4px; }
.profile-edit-card footer button { min-height: 40px; padding: 0 17px; font-size: 10px; font-weight: 900; }

.login-card {
  position: relative;
  isolation: isolate;
  width: min(1040px, 100%);
  min-height: 590px;
  display: grid;
  grid-template-columns: minmax(360px, .96fr) minmax(400px, 1.04fr);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 30px;
  background: rgba(255,255,255,.94);
  border-color: rgba(255, 255, 255, .82);
  box-shadow: 0 32px 85px rgba(5, 48, 105, .2);
}

.login-showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 46px;
  background:
    radial-gradient(circle at 18% 74%, rgba(11, 205, 229, .17), transparent 34%),
    linear-gradient(145deg, #032f74 0%, #0759b5 50%, #08b7d4 100%);
  color: #fff;
}

.login-showcase::before,
.login-showcase::after {
  position: absolute;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.login-showcase::before {
  width: 340px;
  height: 340px;
  top: -176px;
  right: -146px;
  box-shadow: 0 0 0 48px rgba(255,255,255,.045), 0 0 0 98px rgba(255,255,255,.04);
}

.login-showcase::after {
  width: 220px;
  height: 220px;
  bottom: -125px;
  left: -105px;
  box-shadow: 0 0 0 42px rgba(75, 224, 247, .14);
}

.login-brand-mark,
.login-showcase-copy,
.login-feature-list {
  position: relative;
  z-index: 1;
}

.login-brand-mark {
  width: max-content;
  max-width: 100%;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, .68);
  border-radius: 20px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 16px 34px rgba(1, 31, 88, .24);
}

.login-brand-mark img {
  display: block;
  width: clamp(230px, 21vw, 265px);
  max-width: 100%;
  max-height: 170px;
  object-fit: contain;
}

.login-brand-mark .login-brand-compact {
  display: none;
}

.login-showcase-copy {
  max-width: 360px;
  margin: auto 0;
}

.login-showcase-copy small,
.login-panel-heading small {
  display: block;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .13em;
}

.login-showcase-copy small { color: #7cecff; }

.login-showcase-copy h1 {
  max-width: 330px;
  margin: 12px 0 14px;
  color: #fff;
  font-size: clamp(31px, 3.1vw, 43px);
  font-weight: 950;
  letter-spacing: -.045em;
  line-height: 1.04;
}

.login-showcase-copy p {
  max-width: 340px;
  margin: 0;
  color: rgba(255,255,255,.86);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.65;
}

.login-feature-list {
  display: grid;
  gap: 11px;
}

.login-feature-list span {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255,255,255,.92);
  font-size: 12px;
  font-weight: 800;
}

.login-feature-list i {
  width: 9px;
  height: 9px;
  border: 2px solid #6ceaff;
  border-radius: 50%;
  background: rgba(108, 234, 255, .2);
  box-shadow: 0 0 0 4px rgba(108, 234, 255, .12);
}

.login-panel {
  display: grid;
  align-content: center;
  gap: 19px;
  padding: clamp(38px, 6vw, 70px);
  background:
    radial-gradient(circle at 100% 0, rgba(28, 178, 224, .07), transparent 32%),
    rgba(255,255,255,.97);
}

.login-panel-heading { margin-bottom: 8px; }

.login-panel-heading small { color: #087ac4; }

.login-panel-heading h2 {
  margin: 9px 0 8px;
  color: #082f5c;
  font-size: 31px;
  font-weight: 950;
  letter-spacing: -.035em;
}

.login-panel-heading p {
  margin: 0;
  color: #6a858b;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
}

.password-change-card > small {
  color: var(--if-cyan);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.password-change-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 27px;
  font-weight: 950;
}

.password-change-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.password-change-card input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  text-transform: none;
}

.password-change-card input:focus {
  outline: 3px solid rgba(19, 183, 204, 0.18);
  border-color: var(--if-cyan);
}

.login-helper {
  margin: 3px 0 0;
  color: #789095;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.login-panel label {
  display: grid;
  gap: 8px;
  color: #294f70;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.login-panel input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid #cbddea;
  border-radius: 14px;
  background: #fbfdfd;
  color: #123a61;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.login-panel input::placeholder { color: #9aafb2; font-weight: 650; }

.login-panel input:focus {
  outline: 0;
  border-color: #08a9d3;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(8, 169, 211, .13);
}

.login-password-field { position: relative; display: block; }
.login-password-field input { padding-right: 54px; }

.login-password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #6a898d;
  cursor: pointer;
  transform: translateY(-50%);
}

.login-password-toggle:hover { background: #eaf5fc; color: #075daf; }
.login-password-toggle:focus-visible { outline: 3px solid rgba(8, 169, 211, .24); }
.login-password-toggle svg { width: 19px; height: 19px; }

.login-submit {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(100deg, #064eaa, #08b9d5);
  box-shadow: 0 12px 25px rgba(5, 87, 177, .27);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
}

.login-submit:hover { transform: translateY(-1px); box-shadow: 0 16px 29px rgba(5, 87, 177, .34); }
.login-submit svg { width: 17px; height: 17px; }

@media (max-width: 760px) {
  .login-screen { place-items: start center; padding: 15px; }
  .login-card { min-height: 0; grid-template-columns: 1fr; border-radius: 24px; }
  .login-showcase { min-height: 245px; padding: 28px; }
  .login-brand-mark { padding: 13px 16px; border-radius: 17px; }
  .login-brand-mark img { width: min(230px, 72vw); }
  .login-showcase-copy { margin: 28px 0 0; }
  .login-showcase-copy h1 { margin: 8px 0; font-size: 30px; }
  .login-showcase-copy p { font-size: 13px; }
  .login-feature-list { display: none; }
  .login-panel { padding: 34px 28px; gap: 16px; }
  .login-panel-heading h2 { font-size: 27px; }
}

.password-change-card footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

#accessManagerForm,
#profileManagerForm {
  margin: 0;
}

.access-manager-shell,
.profile-manager-panel {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.access-manager-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px 20px;
  border-bottom: 1px solid #dcebef;
  background:
    radial-gradient(circle at 8% 0%, rgba(19, 183, 204, 0.16), transparent 34%),
    linear-gradient(135deg, #f7fcfd 0%, #ffffff 62%);
}

.access-manager-header small {
  display: block;
  color: var(--if-cyan);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.access-manager-header h2 {
  margin: 4px 0;
  color: #0b2235;
  font-size: 26px;
  font-weight: 950;
}

.access-manager-header p {
  margin: 0;
  color: #627481;
  font-size: 14px;
  font-weight: 700;
}

.access-manager-layout {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(390px, 0.88fr);
  gap: 18px;
  padding: 22px;
  background: #f5faf9;
  flex: 1;
  overflow: auto;
}

.access-manager-layout.access-list-only {
  grid-template-columns: 1fr;
}

.access-form-panel,
.access-list-panel {
  border: 1px solid #d7e8ea;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(11, 34, 53, 0.07);
}

.access-form-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.access-form-card {
  width: 100%;
  min-height: 100%;
  max-height: none;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  align-content: start;
  padding: clamp(20px, 3vw, 38px);
}

.access-form-heading {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid #dcebef;
}

.access-form-heading small {
  color: var(--if-cyan);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.access-form-heading h3 {
  margin: 0;
  color: #0b2235;
  font-size: 22px;
  font-weight: 950;
}

.access-form-heading p {
  margin: 0;
  color: #627481;
  font-size: 13px;
  font-weight: 750;
}

.access-form-panel label:not(.access-active-row):not(.access-email-row):not(.clinic-professional-link-toggle) {
  display: grid;
  gap: 7px;
  color: #536774;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.access-form-panel input:not([type="checkbox"]),
.access-form-panel select,
.profile-form-card input:not([type="checkbox"]),
.profile-form-card select,
.profile-form-card textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid #cfe0e7;
  border-radius: 12px;
  background: #ffffff;
  color: #0b2235;
  font-size: 15px;
  text-transform: none;
}

.profile-form-card textarea {
  min-height: 104px;
  padding: 12px 13px;
  resize: vertical;
}

.access-password-hint {
  color: #6b7c86;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
  text-transform: none;
}

.access-active-row,
.access-email-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: end;
  min-height: 44px;
  color: #0b3d2d;
  font-size: 14px;
  font-weight: 900;
}

.access-email-row {
  grid-column: 1 / -1;
  justify-self: start;
  color: #536774;
}

.access-active-row input,
.access-email-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.clinic-professional-link {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #cfe7e2;
  border-radius: 16px;
  background: linear-gradient(135deg, #f4fcfa 0%, #ffffff 72%);
}

.access-form-panel .clinic-professional-link-toggle {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #0b3d2d;
  font-size: 14px;
  font-weight: 900;
  text-transform: none;
  cursor: pointer;
}

.clinic-professional-link-toggle input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--green);
}

.clinic-professional-link-toggle span,
.clinic-linked-professional-field,
.clinic-agenda-scope-field {
  display: grid;
  gap: 3px;
}

.clinic-professional-link-toggle small,
.clinic-linked-professional-field small,
.clinic-agenda-scope-field small {
  color: #667a82;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
  text-transform: none;
}

.access-form-panel .clinic-linked-professional-field,
.access-form-panel .clinic-agenda-scope-field {
  max-width: 720px;
  color: #536774;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.access-form-panel .clinic-agenda-scope-field {
  padding-top: 12px;
  border-top: 1px solid #dceeea;
}

#agendaProfessionalFilter[readonly],
[name="professionalSearch"][readonly] {
  cursor: not-allowed;
  background: #eef7f5;
  color: #087b63;
  font-weight: 850;
}

/* Tec Dent: ação única para refazer os cálculos do mapa */
button.if-recalculate-action[data-recalculate-daily-closing] {
  min-width: 164px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  border: 1px solid #078eaa !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #0879a7 0%, #0a99a5 48%, #12b7ad 100%) !important;
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 20px rgba(7, 132, 158, 0.22) !important;
}

button.if-recalculate-action[data-recalculate-daily-closing] svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  overflow: visible;
}

button.if-recalculate-action[data-recalculate-daily-closing]:hover,
button.if-recalculate-action[data-recalculate-daily-closing]:focus-visible {
  background: linear-gradient(135deg, #066c97 0%, #078d99 48%, #0da399 100%) !important;
  box-shadow: 0 10px 24px rgba(7, 116, 144, 0.28) !important;
  transform: none !important;
}

button.if-recalculate-action[data-recalculate-daily-closing]:active {
  box-shadow: 0 5px 14px rgba(7, 116, 144, 0.22) !important;
  transform: none !important;
}

@media (max-width: 640px) {
  button.if-recalculate-action[data-recalculate-daily-closing] {
    width: 100%;
  }
}

/* Modo leve: telas fora de uso não participam da renderização do navegador. */
.workspace-view:not(.is-active) {
  content-visibility: hidden;
  contain: strict;
}

.workspace-view.is-active {
  content-visibility: visible;
}

.access-linked-professional {
  color: #087b63 !important;
  font-weight: 900 !important;
}

.access-clinic-box {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px dashed #bfdde2;
  border-radius: 16px;
  background: #f8fdfd;
}

.access-clinic-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.access-clinic-title strong {
  color: #0b2235;
  font-size: 15px;
  font-weight: 950;
}

.access-clinic-title small {
  max-width: 210px;
  color: #627481;
  font-size: 11px;
  font-weight: 750;
  text-align: right;
}

.access-clinic-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-height: none;
  overflow-y: auto;
  padding-right: 4px;
}

.access-clinic-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #d8e9ed;
  border-radius: 13px;
  background: #ffffff;
  color: #0b2235;
}

.access-clinic-option:hover {
  border-color: #9cdfe5;
  background: #f0fbfc;
}

.access-clinic-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--if-cyan);
}

.access-clinic-option strong,
.access-clinic-option small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-clinic-option strong {
  font-size: 13px;
  font-weight: 950;
}

.access-clinic-option small {
  margin-top: 2px;
  color: #627481;
  font-size: 11px;
  font-weight: 750;
}

.access-all-clinics-card,
.access-empty {
  padding: 14px;
  border: 1px dashed #bcdce3;
  border-radius: 14px;
  background: #f1fbfd;
  color: #0e5a88;
  font-weight: 850;
  text-align: center;
}

.access-form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.access-form-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 950;
  padding: 0 16px;
}

.neutral-action {
  background: #6b7a8a;
}

.access-list-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
}

.access-list-panel-full .access-user-list {
  max-height: min(560px, calc(100vh - 280px));
}

.access-list-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.access-list-toolbar .access-list-header {
  padding-bottom: 0;
  border-bottom: 0;
}

.access-list-toolbar .save-action,
.profile-manager-toolbar .save-action {
  min-height: 42px;
  border: 0;
  border-radius: 13px;
  color: #ffffff;
  font-weight: 950;
  padding: 0 18px;
}

.access-form-layer,
.profile-form-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: block;
  padding: 0;
  overflow-y: auto;
  background: #f5faf9;
  backdrop-filter: none;
}

.access-form-layer.is-hidden,
.profile-form-layer.is-hidden {
  display: none;
}

.access-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid #dcebef;
}

.access-list-header strong {
  color: #0b2235;
  font-size: 18px;
  font-weight: 950;
}

.access-list-header small {
  color: #627481;
  font-size: 12px;
  font-weight: 850;
}

.access-user-list {
  display: grid;
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.access-user-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 12px 14px;
  border: 1px solid #d9e9ed;
  border-radius: 12px;
  background: #ffffff;
}

.access-user-card.is-inactive {
  background: #f2f5f6;
  opacity: 0.76;
}

.access-user-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #dff8f4, #e8f7fb);
  color: #007f73;
  font-size: 13px;
  font-weight: 950;
}

.access-user-info {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.access-user-info strong,
.access-user-info span,
.access-user-info small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-user-info strong {
  color: #0b2235;
  font-size: 15px;
  font-weight: 950;
}

.access-user-info span {
  color: #0e5a88;
  font-size: 12px;
  font-weight: 900;
}

.access-user-info small {
  color: #627481;
  font-size: 11px;
  font-weight: 700;
}

.access-status {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.access-status.is-active {
  background: var(--green-soft);
  color: #008948;
}

.access-status.is-inactive {
  background: var(--danger-soft);
  color: #c73131;
}

.access-edit-button {
  min-height: 34px;
  border: 1px solid #cde7ea;
  background: #f2fbfc;
  color: #0e5a88;
  font-size: 12px;
  font-weight: 950;
  padding: 0 12px;
}

.access-list-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.access-icon-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 10px;
}

.access-icon-button svg {
  width: 18px;
  height: 18px;
}

.access-icon-button.is-edit {
  border: 1px solid #bfe1f5;
  background: #edf8ff;
  color: #168bd0;
}

.access-icon-button.is-delete {
  border: 1px solid #ffd0d0;
  background: #fff2f2;
  color: #ef3e46;
}

.access-icon-button:disabled,
.access-list-switch:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.access-list-switch.status-switch {
  width: 72px;
  min-width: 72px;
  min-height: 26px;
  font-size: 10px;
}

.access-list-switch.status-switch.is-active .status-switch-knob {
  transform: translateX(46px);
}

.profile-manager-dialog {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

.profile-manager-panel {
  background: linear-gradient(135deg, #ffffff 0%, #f2fbfc 100%);
}

.profile-manager-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 18px 24px 0;
}

.profile-rule-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: min-content;
  align-content: start;
  gap: 9px;
  padding: 24px;
  flex: 1;
  overflow: auto;
}

.profile-rule-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  padding: 13px 15px;
  border: 1px solid #d7e8ea;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 18px rgba(11, 34, 53, 0.05);
}

.profile-rule-card strong {
  color: #0b2235;
  font-size: 15px;
  font-weight: 950;
}

.profile-rule-card > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.profile-rule-card p {
  margin: 0;
  color: #5d707d;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.profile-rule-card small {
  width: auto;
  padding: 0;
  background: transparent;
  color: #627481;
  font-size: 11px;
  font-weight: 800;
}

.profile-rule-card.is-inactive {
  opacity: 0.7;
  background: #f3f6f7;
}

.profile-rule-card.is-inactive small {
  background: transparent;
  color: #65717a;
}

.profile-form-card {
  display: grid;
  gap: 14px;
  width: 100%;
  min-height: 100%;
  max-height: none;
  overflow-y: auto;
  align-content: start;
  padding: clamp(20px, 3vw, 38px);
  border: 0;
  border-radius: 0;
  background: #f5faf9;
  box-shadow: none;
}

.profile-form-card label:not(.access-active-row) {
  display: grid;
  gap: 7px;
  color: #536774;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

#clinicUserProfileRow small {
  color: #6b7c86;
  font-size: 11px;
  font-weight: 750;
  text-transform: none;
}

.procedure-attendance-professional-hint {
  margin-top: 2px;
  color: #087b63;
  font-size: 11px;
  font-weight: 850;
}

#procedureAttendanceProfessional.is-login-linked {
  border-color: #9ddbc9;
  background: #edf9f5;
  color: #086c58;
  cursor: not-allowed;
}

.profile-permissions-editor {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #cfe3e7;
  border-radius: 16px;
  background: #ffffff;
}

.profile-permissions-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #dcebef;
}

.profile-permissions-heading > div {
  display: grid;
  gap: 2px;
}

.profile-permissions-heading strong {
  color: #0b2235;
  font-size: 17px;
  font-weight: 950;
}

.profile-permissions-heading small {
  color: #627481;
  font-size: 12px;
  font-weight: 750;
}

.profile-permissions-heading .neutral-action {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: #e8f3f6;
  color: #17384a;
  font-size: 12px;
  font-weight: 900;
}

.profile-permissions-heading .neutral-action:hover {
  background: #d9edf1;
}

.profile-permission-grid {
  display: grid;
  gap: 20px;
}

.profile-permission-group {
  display: grid;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid #dcebed;
}

.profile-permission-group:first-child {
  padding-top: 0;
  border-top: 0;
}

.profile-permission-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 2px 6px;
}

.profile-permission-group-heading > div {
  display: grid;
  gap: 2px;
}

.profile-permission-group-heading strong {
  color: #102c40;
  font-size: 18px;
  font-weight: 950;
}

.profile-permission-group-heading small {
  color: #6b7d88;
  font-size: 12px;
  font-weight: 700;
}

.profile-group-toggle,
.profile-permission-check {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  color: #315064;
  font-size: 11px !important;
  font-weight: 900 !important;
  text-transform: none !important;
  white-space: nowrap;
}

.profile-group-toggle input,
.profile-permission-check input,
.profile-special-permission input {
  width: 18px;
  height: 18px;
  min-height: 18px !important;
  margin: 0;
  accent-color: var(--teal);
}

.profile-app-permission-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.profile-app-permission {
  min-height: 190px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  justify-items: center;
  gap: 8px;
  padding: 18px 14px 14px;
  border: 1px solid #d6e8eb;
  border-radius: 8px;
  background: #fbfdfd;
  text-align: center;
}

.profile-app-permission > svg {
  width: 36px;
  height: 36px;
  color: #0d718a;
}

.profile-app-permission > strong {
  color: #102c40;
  font-size: 16px;
  font-weight: 950;
}

.profile-app-permission > p {
  margin: 0;
  color: #657985;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.55;
}

.profile-app-permission-actions {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid #e3edef;
}

.profile-app-permission .profile-permission-check span {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  clip-path: none;
}

.profile-permission-group.is-prescriptions {
  padding: 20px;
  border: 1px solid #bfe2df;
  border-radius: 14px;
  background: linear-gradient(145deg, #f3fbfa 0%, #ffffff 62%);
  box-shadow: 0 10px 26px rgba(8, 111, 113, 0.08);
}

.profile-prescription-permission-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.profile-prescription-permission {
  min-height: 148px;
  display: grid !important;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  gap: 10px;
  padding: 14px 12px 12px;
  border: 1px solid #d2e8e7;
  border-radius: 11px;
  background: #ffffff;
  text-align: center;
  text-transform: none !important;
  cursor: pointer;
}

.profile-prescription-permission:hover {
  border-color: #86ccc6;
  box-shadow: 0 8px 18px rgba(9, 122, 121, 0.1);
}

.profile-prescription-permission.is-danger {
  border-color: #f0d8d5;
  background: #fffafa;
}

.profile-prescription-permission-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #e5f6f3;
  color: #087c78;
}

.profile-prescription-permission.is-danger .profile-prescription-permission-icon {
  background: #ffebe8;
  color: #c84a3c;
}

.profile-prescription-permission-icon svg {
  width: 21px;
  height: 21px;
}

.profile-prescription-permission-copy {
  display: grid;
  align-content: start;
  gap: 4px;
}

.profile-prescription-permission-copy strong {
  color: #12364a;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.25;
}

.profile-prescription-permission-copy small {
  color: #6c7f89;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.45;
}

.profile-prescription-permission input {
  width: 19px;
  height: 19px;
  min-height: 19px !important;
  margin: 0;
  accent-color: var(--teal);
}

.profile-prescription-permission-note {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #e8f6fb;
  color: #24566e;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.45;
}

.profile-prescription-permission-note svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  color: #167c9e;
}

.profile-special-permission-list {
  display: grid;
  gap: 6px;
}

.profile-special-permission {
  min-height: 62px;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 14px;
  border: 1px solid #e0e9eb;
  border-radius: 7px;
  background: #fbfdfd;
  text-transform: none !important;
}

.profile-special-permission > span {
  display: grid;
  gap: 2px;
}

.profile-special-permission strong {
  color: #17384a;
  font-size: 13px;
  font-weight: 900;
}

.profile-special-permission small {
  color: #6b7d88;
  font-size: 11px;
  font-weight: 700;
}

.profile-permission-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(72px, 92px));
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid #e0ecee;
  border-radius: 11px;
  background: #fbfdfd;
}

.profile-permission-row.is-heading {
  min-height: 38px;
  border-color: #cfe8ec;
  background: #eaf8fa;
  color: #536774;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.profile-permission-row strong {
  color: #183548;
  font-size: 13px;
  font-weight: 900;
}

.profile-permission-row label {
  display: grid !important;
  place-items: center;
  min-height: 30px;
}

.profile-permission-row .profile-permission-check span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.profile-permission-row input {
  width: 18px;
  height: 18px;
  min-height: 18px !important;
  accent-color: var(--teal);
}

.profile-permission-row i {
  color: #9aabb5;
  font-style: normal;
  text-align: center;
}

.workspace-view.access-manager-dialog,
.workspace-view.profile-manager-dialog {
  width: 100%;
  height: auto;
  min-height: calc(100vh - 98px);
  overflow: visible;
}

@media (max-width: 980px) {
  .access-manager-layout {
    grid-template-columns: 1fr;
  }

  .access-form-panel {
    grid-template-columns: 1fr;
  }

  .access-clinic-list,
  .profile-rule-grid {
    grid-template-columns: 1fr;
  }

  .profile-permission-row {
    grid-template-columns: minmax(130px, 1fr) repeat(4, 58px);
  }

  .profile-app-permission-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-prescription-permission-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .profile-permission-group-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-app-permission-grid {
    grid-template-columns: 1fr;
  }

  .profile-prescription-permission-grid {
    grid-template-columns: 1fr;
  }

  .profile-permission-row {
    grid-template-columns: minmax(120px, 1fr) repeat(4, 44px);
    padding-inline: 7px;
  }
}

@media (min-width: 981px) and (max-width: 1280px) {
  .access-clinic-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.closing-simulation-form-grid {
  display: grid;
  gap: 16px;
  padding: 22px 72px 12px;
}

.closing-simulation-form-grid label,
.closing-discount-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.closing-simulation-form-grid span,
.closing-discount-row span {
  color: #32383e;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.closing-simulation-form-grid select,
.closing-discount-row input {
  width: 100%;
  height: 35px;
  border: 1px solid #bfc7ce;
  border-radius: 4px;
  background: #ffffff;
  padding: 0 12px;
  color: #303840;
  font: inherit;
}

.closing-simulation-discounts {
  min-height: 118px;
  padding: 0 72px 26px;
}

.closing-discount-list {
  display: grid;
  gap: 14px;
  padding-top: 6px;
}

.closing-discount-row {
  grid-template-columns: minmax(180px, 1fr) 94px 148px;
}

.closing-discount-row strong {
  color: #303840;
  font-size: 14px;
  text-align: right;
}

.closing-discount-row span {
  color: #008000;
}

.closing-discount-button {
  justify-self: end;
  min-height: 30px;
  padding: 0 13px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
}

.closing-simulation-empty {
  margin-top: 12px;
  padding: 18px;
  border: 1px solid #c9dce8;
  border-radius: 4px;
  background: #e7f5fb;
  color: #217190;
  text-align: center;
}

.map-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 22px;
  border-top: 1px solid #e0e4e8;
}

.map-dialog-actions button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.daily-closing-confirm-dialog {
  width: min(900px, calc(100vw - 40px));
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: #ffffff;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.4);
}

.daily-closing-confirm-dialog::backdrop {
  background: rgba(0, 0, 0, 0.58);
}

.daily-closing-confirm-form {
  margin: 0;
}

.daily-closing-confirm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid #dedede;
}

.daily-closing-confirm-header h2 {
  margin: 0;
  color: #363c43;
  font-size: 20px;
  font-weight: 500;
}

.daily-closing-confirm-header button {
  border: 0;
  background: transparent;
  color: #bbbbbb;
  font-size: 27px;
  font-weight: 900;
  cursor: pointer;
}

.daily-closing-confirm-body {
  min-height: 124px;
  display: grid;
  place-items: center;
  padding: 34px 20px;
}

.daily-closing-confirm-body label {
  width: min(540px, 100%);
  display: grid;
  grid-template-columns: 170px minmax(190px, 260px);
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.daily-closing-confirm-body span {
  color: #32383e;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.daily-closing-confirm-body input {
  position: static;
  display: block;
  width: 100%;
  box-sizing: border-box;
  height: 35px;
  border: 1px solid #bfc7ce;
  border-radius: 4px;
  padding: 0 12px;
  font: inherit;
}

.daily-closing-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 18px 20px;
  border-top: 1px solid #dedede;
}

.daily-closing-confirm-actions button {
  min-height: 31px;
  padding: 0 13px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
}

.system-confirm-dialog {
  width: min(520px, calc(100vw - 36px));
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
}

.system-confirm-dialog::backdrop {
  background: rgba(10, 18, 24, 0.58);
}

.system-confirm-form {
  margin: 0;
}

.system-confirm-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid #e2e8ef;
}

.system-confirm-icon {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  background: #eaf4ff;
  color: #248ff2;
}

.system-confirm-icon svg {
  width: 24px;
  height: 24px;
}

.system-confirm-header div {
  flex: 1;
  min-width: 0;
}

.system-confirm-header p {
  margin: 0 0 2px;
  color: #647386;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.system-confirm-header h2 {
  margin: 0;
  color: #0d2134;
  font-size: 20px;
}

.system-confirm-header .dialog-close-button {
  margin-left: auto;
}

.system-confirm-body {
  padding: 22px 22px 8px;
}

.system-confirm-body p {
  margin: 0;
  color: #41505f;
  font-size: 15px;
  line-height: 1.45;
}

.system-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 22px 22px;
}

.system-confirm-actions button {
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  padding: 0 16px;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 640px) {
  .daily-closing-confirm-body {
    padding: 28px 18px;
  }

  .daily-closing-confirm-body label {
    grid-template-columns: 1fr;
  }

  .daily-closing-confirm-body span {
    text-align: left;
  }
}

.daily-closing-approval-page {
  min-height: 100vh;
  background: transparent;
  padding: 18px 0 48px;
}

.daily-closing-approval-content {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0;
}

.daily-closing-approval-card {
  overflow: hidden;
  border: 1px solid #d8e4ee;
  border-radius: 8px;
  background: #f4f7f8;
  box-shadow: 0 14px 36px rgba(16, 24, 40, 0.08);
}

.daily-closing-approval-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  background: #248ff0;
  color: #ffffff;
}

.daily-closing-approval-header div {
  display: grid;
  gap: 4px;
}

.daily-closing-approval-header span {
  font-size: 21px;
  font-weight: 500;
}

.daily-closing-approval-header strong {
  font-size: 13px;
}

.daily-closing-back-button {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

.daily-closing-money-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 20px 10px;
}

.daily-closing-money-summary article {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid #cfe7cc;
  border-radius: 8px;
  background: #ecfae8;
}

.daily-closing-money-summary span {
  color: #197341;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.daily-closing-money-summary .is-negative span,
.daily-closing-money-summary .is-negative strong {
  color: #ff0000;
}

.daily-closing-money-summary strong {
  color: #03172c;
  font-size: 20px;
  font-weight: 900;
}

.daily-closing-cash-hint {
  margin: 0 20px 6px;
  border: 1px solid #bce3cb;
  border-radius: 8px;
  padding: 12px 16px;
  background: #effbf3;
  color: #0c6f36;
  font-weight: 900;
}

.daily-closing-cash-hint.is-negative {
  border-color: #ffc7c7;
  background: #fff3f3;
  color: #d21f1f;
}

.daily-closing-cash-hint.has-specialty-grid,
.daily-closing-cash-hint.has-specialty-grid.is-negative {
  background: #f7fbff;
  color: #03172c;
}

.daily-closing-cash-specialty-title {
  margin-bottom: 10px;
  color: #42526b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.daily-closing-cash-specialty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.daily-closing-cash-specialty-card {
  display: grid;
  gap: 7px;
  border: 1px solid #d7e6f5;
  border-radius: 8px;
  padding: 12px 14px;
  background: #ffffff;
}

.daily-closing-cash-specialty-card strong {
  color: #03172c;
  font-size: 14px;
  font-weight: 900;
}

.daily-closing-cash-specialty-card span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #5d6b7a;
  font-size: 12px;
  font-weight: 800;
}

.daily-closing-cash-specialty-card b {
  color: #009b55;
  font-size: 13px;
  white-space: nowrap;
}

.daily-closing-cash-specialty-card.is-negative {
  border-color: #ffc7c7;
  background: #fff8f8;
}

.daily-closing-cash-specialty-card.is-negative b {
  color: #ff0000;
}

.daily-closing-approval-list {
  display: grid;
  gap: 16px;
  padding: 18px 18px 0;
}

.daily-closing-professional-card {
  overflow: hidden;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.08);
}

.daily-closing-professional-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 10px;
  border-bottom: 2px solid #1689ff;
}

.daily-closing-professional-card h3 {
  margin: 0;
  color: #17324d;
  font-size: 20px;
  font-weight: 500;
}

.daily-closing-professional-card header span {
  color: #667085;
  font-size: 13px;
  font-weight: 900;
}

.daily-closing-time-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 26px 16px 8px;
}

.daily-closing-time-row span {
  min-width: 196px;
  padding: 8px 16px;
  border: 1px solid #2c2c2c;
  border-radius: 16px;
  text-align: center;
  font-weight: 800;
}

.daily-closing-time-row strong {
  display: block;
}

.daily-closing-time-row.is-multi {
  flex-wrap: wrap;
}

.daily-closing-specialty-list {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.daily-closing-specialty-card {
  overflow: hidden;
  border: 1px solid #dbe8f5;
  border-radius: 10px;
  background: #fbfdff;
}

.daily-closing-specialty-time {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 14px 16px 4px;
}

.daily-closing-specialty-time span {
  min-width: 176px;
  padding: 8px 14px;
  border: 1px solid #2c2c2c;
  border-radius: 16px;
  background: #ffffff;
  text-align: center;
  font-weight: 800;
}

.daily-closing-specialty-time strong {
  display: block;
}

.daily-closing-commission-block {
  width: min(1100px, calc(100% - 80px));
  margin: 0 auto 28px;
}

.daily-closing-specialty-card .daily-closing-commission-block {
  width: auto;
  margin: 0;
  padding: 12px 18px 16px;
}

.daily-closing-commission-title {
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e3e3e3;
  color: #17212b;
  font-size: 23px;
}

.daily-closing-commission-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(190px, 0.8fr) minmax(240px, 0.7fr);
  align-items: center;
  gap: 18px;
}

.daily-closing-commission-row strong {
  text-align: center;
}

.daily-closing-commission-row > span {
  color: #475467;
  font-weight: 800;
  text-align: center;
}

.daily-closing-segment-list {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid #d8e4f2;
  border-radius: 5px;
  background: #f6fbff;
}

.daily-closing-segment-list span {
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.daily-closing-commission-row label,
.daily-closing-approval-row label {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.daily-closing-commission-row label span,
.daily-closing-approval-row label span {
  color: #008000;
  font-weight: 900;
  text-align: right;
}

.daily-closing-approval-row label:last-child span {
  color: #ff0000;
}

.daily-closing-commission-row input,
.daily-closing-approval-row input {
  height: 35px;
  border: 1px solid #c9ced4;
  border-radius: 4px;
  padding: 0 12px;
  font: inherit;
}

.daily-closing-approval-table {
  margin: 0 20px 20px;
  border: 1px solid #ead9d9;
  background: #fffbe6;
}

.daily-closing-specialty-card .daily-closing-approval-table {
  margin: 0 18px 18px;
}

.daily-closing-approval-table h4 {
  margin: 0;
  padding: 14px;
  background: #f1dada;
  text-align: center;
}

.daily-closing-approval-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 160px minmax(200px, 0.7fr) minmax(200px, 0.7fr);
  align-items: center;
  gap: 28px;
  padding: 16px 28px;
}

.daily-closing-approval-row > strong {
  text-align: center;
}

.daily-closing-map-info {
  margin: 42px 18px 0;
  padding-top: 18px;
  border-top: 1px solid #e5e5e5;
}

.daily-closing-map-info h3 {
  margin: 0 0 14px;
  font-size: 23px;
  font-weight: 500;
}

.daily-closing-approval-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 18px;
}

.daily-closing-approval-actions button {
  min-height: 31px;
  border: 0;
  border-radius: 4px;
  padding: 0 14px;
  color: #ffffff;
  font-weight: 800;
}

.daily-closing-empty {
  margin: 0;
  padding: 24px;
  border: 1px solid #c9dce8;
  border-radius: 4px;
  background: #e7f5fb;
  color: #217190;
  text-align: center;
}

@media (max-width: 980px) {
  .daily-closing-approval-content {
    width: min(100% - 24px, 1280px);
  }

  .daily-closing-money-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .daily-closing-commission-row,
  .daily-closing-approval-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px 18px;
  }

  .daily-closing-commission-row strong,
  .daily-closing-commission-row > span,
  .daily-closing-approval-row > strong {
    text-align: left;
  }

  .daily-closing-commission-block {
    width: calc(100% - 36px);
  }
}

.daily-closing-map-page {
  background: #ffffff;
}

.daily-closing-map-page .standard-top-menu {
  gap: 16px;
  padding-inline: 22px;
}

.daily-closing-map-page .standard-top-menu button {
  font-size: 13px;
}

.daily-closing-map-content {
  width: min(1160px, calc(100% - 96px));
  max-width: 1160px;
  margin: 0 auto;
  padding: 10px 0 42px;
  overflow-x: visible;
}

#dailyClosingMapReport {
  width: min(1240px, calc(100% - 56px));
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 0 42px;
  box-sizing: border-box;
}

.closing-map-report {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: visible;
  color: #000000;
  font-family: Arial, sans-serif;
}

.closing-map-watermark {
  position: fixed;
  top: 290px;
  left: 50%;
  z-index: 0;
  color: rgba(255, 0, 0, 0.12);
  font-size: 72px;
  font-weight: 900;
  letter-spacing: 5px;
  pointer-events: none;
  transform: translateX(-50%) rotate(-18deg);
}

.closing-map-header,
.closing-map-meta,
.closing-map-box,
.closing-map-actions {
  position: relative;
  z-index: 1;
}

.closing-map-header {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 62px;
  border: 1px solid #555555;
  background: #dddddd;
  text-align: center;
}

.closing-map-header strong {
  font-size: 14px;
}

.closing-map-header span {
  font-size: 13px;
  font-weight: 800;
}

.closing-map-meta {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.64fr) minmax(0, 0.42fr);
  margin-top: 6px;
  border-top: 1px solid #555555;
  border-left: 1px solid #555555;
}

.closing-map-meta span {
  padding: 8px;
  border-right: 1px solid #555555;
  border-bottom: 1px solid #555555;
  background: #dddddd;
  font-weight: 800;
  text-align: center;
  overflow-wrap: anywhere;
}

.closing-map-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 10px;
  margin-top: 6px;
}

.closing-map-left,
.closing-map-right {
  min-width: 0;
  max-width: 100%;
  display: grid;
  align-content: start;
  gap: 10px;
}

.closing-map-box {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid #555555;
  background: #ffffff;
}

.closing-map-box h3 {
  margin: 0;
  padding: 12px 8px;
  border-bottom: 1px solid #555555;
  background: #dddddd;
  color: #111111;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  overflow-wrap: anywhere;
}

.closing-map-box p {
  margin: 0;
  padding: 12px 8px;
  font-size: 12px;
  font-weight: 800;
}

.closing-map-box table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.closing-map-box th,
.closing-map-box td {
  padding: 7px 5px;
  border-right: 1px solid #666666;
  border-bottom: 1px solid #666666;
  font-size: 10.5px;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  overflow: visible;
  word-break: normal;
}

.closing-map-box th {
  background: #dddddd;
  font-weight: 800;
}

.closing-map-box td:first-child {
  text-align: left;
}

.closing-map-box td:last-child {
  font-weight: 800;
}

.closing-map-box.is-short {
  min-height: 54px;
}

.closing-payment-methods {
  margin-top: 10px;
}

.closing-map-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 10px;
}

.closing-map-actions button {
  min-height: 31px;
  padding: 0 13px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
}

.closing-map-modern-report {
  --map-line: #d8dee6;
  --map-soft: #f6f8fb;
  --map-green: #078d4f;
  --map-red: #d93025;
  --map-blue: #1d72d2;
  --map-purple: #7952b3;
  display: grid;
  gap: 12px;
}

.closing-map-modern-report .closing-map-watermark {
  display: none;
}

.closing-map-modern-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--map-line);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
}

.closing-map-header-stamp {
  position: absolute;
  left: 50%;
  top: 50%;
  color: rgba(220, 0, 0, 0.42) !important;
  font-size: clamp(46px, 8vw, 92px) !important;
  font-weight: 900 !important;
  letter-spacing: 6px;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(4deg);
}

.closing-map-modern-header div {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3px;
}

.closing-map-modern-header span {
  color: #697386;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.closing-map-modern-header strong {
  color: #101828;
  font-size: 22px;
  font-weight: 900;
}

.closing-map-modern-header p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #475467;
  font-size: 13px;
  font-weight: 800;
}

.closing-map-modern-meta {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 0.7fr) minmax(0, 0.55fr);
  gap: 10px;
}

.closing-map-modern-meta span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--map-line);
  border-radius: 6px;
  background: #ffffff;
  color: #101828;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.closing-map-modern-meta b {
  color: #697386;
  font-size: 11px;
  text-transform: uppercase;
}

.closing-map-kpis {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.closing-map-kpi {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--map-line);
  border-left: 5px solid #98a2b3;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.closing-map-kpi span {
  color: #475467;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.closing-map-kpi strong {
  color: #101828;
  font-size: 22px;
  font-weight: 900;
}

.closing-map-kpi small {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.closing-map-kpi.is-green {
  border-left-color: var(--map-green);
}

.closing-map-kpi.is-red {
  border-left-color: var(--map-red);
}

.closing-map-kpi.is-blue {
  border-left-color: var(--map-blue);
}

.closing-map-kpi.is-purple {
  border-left-color: var(--map-purple);
}

.closing-map-modern-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  gap: 12px;
}

.closing-map-column {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.closing-map-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--map-line);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.closing-map-panel.is-large {
  grid-row: span 2;
}

.closing-map-panel-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--map-line);
}

.closing-map-panel-title div {
  display: grid;
  gap: 3px;
}

.closing-map-panel-title span {
  color: #101828;
  font-size: 17px;
  font-weight: 900;
}

.closing-map-panel-title strong {
  color: #667085;
  font-size: 12px;
}

.closing-map-panel-title b {
  display: grid;
  place-items: center;
  min-width: 34px;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eaf4ff;
  color: var(--map-blue);
  font-size: 13px;
}

.closing-map-card-list {
  display: grid;
  gap: 10px;
}

.closing-map-card-list.is-compact {
  gap: 6px;
}

.closing-map-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  background: var(--map-soft);
}

.closing-map-professional-card.is-compact {
  gap: 7px;
  padding: 9px 10px;
}

.closing-map-professional-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.closing-map-professional-main > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.closing-map-professional-main span,
.closing-map-professional-meta span {
  color: #667085;
  font-size: 11px;
  font-weight: 900;
}

.closing-map-professional-main > div:first-child span {
  text-transform: uppercase;
}

.closing-map-professional-main strong {
  color: #101828;
  font-size: 14px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.closing-map-professional-value {
  display: grid;
  justify-items: end;
  gap: 2px;
  min-width: 96px;
}

.closing-map-professional-value span {
  color: #344054;
  font-size: 12px;
}

.closing-map-professional-value strong {
  color: var(--map-green);
  font-size: 15px;
}

.closing-map-professional-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.closing-map-professional-meta span {
  padding: 4px 7px;
  border-radius: 999px;
  background: #ffffff;
}

.closing-map-payment-card.is-compact {
  gap: 6px;
  padding: 8px 9px;
}

.closing-map-payment-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.closing-map-payment-main > div {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.closing-map-payment-main span,
.closing-map-payment-meta span {
  color: #667085;
  font-size: 10.5px;
  font-weight: 900;
}

.closing-map-payment-main strong {
  color: #101828;
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.closing-map-payment-value {
  color: var(--map-green) !important;
  font-size: 13px !important;
  white-space: nowrap;
}

.closing-map-payment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.closing-map-payment-meta span {
  padding: 3px 6px;
  border-radius: 999px;
  background: #ffffff;
}

.closing-map-payment-group {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.closing-map-payment-group + .closing-map-payment-group {
  margin-top: 4px;
}

.closing-map-payment-group-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto 16px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid #d6e8ff;
  border-radius: 6px;
  background: #eef6ff;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.closing-map-payment-group-head strong {
  color: #101828;
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.closing-map-payment-group-head span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #ffffff;
  color: #344054;
  font-size: 10.5px;
  font-weight: 900;
  white-space: nowrap;
}

.closing-map-payment-group-head b {
  color: var(--map-green);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.closing-map-payment-group-head svg {
  width: 14px;
  height: 14px;
  fill: #008f5a;
  transition: transform 160ms ease;
}

.closing-map-payment-group:not(.is-collapsed) .closing-map-payment-group-head svg {
  transform: rotate(90deg);
}

.closing-map-payment-group.is-collapsed [data-payment-group-body] {
  display: none;
}

.closing-map-payment-group:not(.is-collapsed) [data-payment-group-body] {
  max-height: 450px;
  overflow-y: auto;
  padding-right: 3px;
}

.closing-map-payment-group:not(.is-collapsed) [data-payment-group-body]::-webkit-scrollbar {
  width: 8px;
}

.closing-map-payment-group:not(.is-collapsed) [data-payment-group-body]::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #b7c7d8;
}

.closing-map-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.closing-map-card-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.closing-map-card-head span,
.closing-map-card-foot span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.closing-map-card-head strong {
  color: #101828;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.closing-map-card-head b {
  flex: 0 0 auto;
  color: #344054;
  font-size: 12px;
}

.closing-map-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.closing-map-fact {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e4e7ec;
  border-radius: 5px;
  background: #ffffff;
}

.closing-map-fact span {
  color: #667085;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.closing-map-fact strong {
  color: #101828;
  font-size: 15px;
  font-weight: 900;
}

.closing-map-fact strong.is-green,
.closing-map-settlement-list strong {
  color: var(--map-green);
}

.closing-map-fact strong.is-red {
  color: var(--map-red);
}

.closing-map-fact strong.is-blue {
  color: var(--map-blue);
}

.closing-map-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.closing-map-card-foot span {
  padding: 6px 8px;
  border-radius: 999px;
  background: #ffffff;
}

.closing-map-signature {
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.closing-map-consolidated-list {
  display: grid;
  gap: 8px;
}

.closing-map-consolidated-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.3fr) minmax(160px, 0.9fr) minmax(105px, 0.55fr) minmax(105px, 0.55fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e4e7ec;
  border-radius: 5px;
  background: var(--map-soft);
}

.closing-map-consolidated-row span {
  min-width: 0;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.closing-map-consolidated-row strong,
.closing-map-consolidated-row b {
  color: #101828;
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.closing-map-consolidated-row b {
  color: var(--map-red);
}

.closing-map-consolidated-row.is-head {
  background: #e8eef6;
}

.closing-map-consolidated-row.is-head span,
.closing-map-consolidated-row.is-head strong,
.closing-map-consolidated-row.is-head b {
  color: #475467;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.closing-map-consolidated-row.is-total {
  background: #edf7f0;
}

.closing-map-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.closing-map-stat,
.closing-map-settlement-list div,
.closing-map-method-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e4e7ec;
  border-radius: 5px;
  background: var(--map-soft);
}

.closing-map-stat span,
.closing-map-settlement-list span,
.closing-map-method-row span {
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.closing-map-stat strong,
.closing-map-settlement-list strong,
.closing-map-method-row strong {
  color: #101828;
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.closing-map-settlement-list,
.closing-map-methods {
  display: grid;
  gap: 8px;
}

.closing-map-methods {
  margin-top: 12px;
}

.closing-map-methods h4 {
  margin: 0;
  color: #344054;
  font-size: 13px;
  font-weight: 900;
}

.closing-map-cash-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  background: var(--map-soft);
}

.closing-map-cash-title {
  display: block;
  color: #101828;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.closing-map-cash-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.closing-map-cash-values span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  border: 1px solid #e1e7ec;
  border-radius: 5px;
  background: #ffffff;
  text-align: center;
}

.closing-map-cash-values small {
  color: #667085;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.closing-map-cash-values b {
  color: #101828;
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.closing-map-cash-card .closing-map-cash-values span:last-child b {
  color: var(--map-green);
}

.closing-map-cash-card.is-negative .closing-map-cash-values span:last-child b {
  color: var(--map-red);
}

.closing-map-method-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.closing-map-method-row span,
.closing-map-method-row strong,
.closing-map-method-row b,
.closing-map-method-row em {
  min-width: 0;
  overflow-wrap: anywhere;
}

.closing-map-method-row span {
  grid-column: 1 / -1;
  text-align: left;
}

.closing-map-method-row strong,
.closing-map-method-row b,
.closing-map-method-row em {
  display: block;
  padding: 7px 8px;
  border: 1px solid #e1e7ec;
  border-radius: 5px;
  background: #ffffff;
  color: #344054;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.closing-map-method-row em {
  color: var(--map-green);
}

.closing-map-method-row.is-negative em,
.closing-map-payment-value.is-red,
.closing-map-settlement-list strong.is-red {
  color: var(--map-red) !important;
}

.closing-map-notes {
  display: grid;
  gap: 10px;
}

.closing-map-notes h3 {
  margin: 0;
  padding: 10px;
  border-radius: 5px;
  background: var(--map-soft);
  color: #101828;
  font-size: 15px;
  text-align: center;
}

.closing-map-notes p {
  min-height: 34px;
  margin: 0;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.closing-map-empty {
  margin: 0;
  padding: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: #475467;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.ficha-top-menu {
  min-height: 102px;
  border-bottom: 1px solid #111111;
}

body.cadastro-focus .ficha-layout {
  padding: 10px 14px 36px;
}

body.cadastro-focus.budget-fullscreen .ficha-layout {
  width: min(1234px, calc(100% - 96px));
  margin: 0 auto;
  padding: 18px 0 42px;
}

.patients-content {
  padding: 10px 44px 38px;
}

.patients-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  margin-bottom: 14px;
}

.patients-metric-card {
  min-height: 120px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  text-align: center;
  text-transform: uppercase;
}

.patients-metric-card.is-green {
  background: #4caf50;
}

.patients-metric-card.is-blue {
  background: #2999e8;
}

.patients-metric-card.is-orange {
  background: #ff9708;
}

.patients-metric-card span,
.patients-metric-card strong {
  display: block;
}

.patients-metric-card span {
  font-size: 14px;
  font-weight: 800;
}

.patients-metric-card strong {
  margin-top: 10px;
  font-size: 32px;
  line-height: 1;
}

.patients-page {
  min-height: 100vh;
  background: #ffffff;
}

.patients-content {
  width: min(1260px, calc(100% - 58px));
  margin: 0 auto;
  padding: 10px 0 42px;
}

.patients-metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  margin: 0 0 14px;
}

.patients-metric-strip article {
  min-height: 120px;
  display: grid;
  place-items: center;
  gap: 8px;
  border-radius: 7px;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(24, 32, 28, 0.14);
}

.patients-metric-strip strong {
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.patients-metric-strip span {
  font-size: 32px;
  font-weight: 900;
}

.patients-metric-strip .is-total {
  background: #4caf50;
}

.patients-metric-strip .is-leads {
  background: #2d98e4;
}

.patients-metric-strip .is-week {
  background: #ff9700;
}

.patients-tabs {
  display: flex;
  align-items: flex-end;
  min-height: 42px;
  border-bottom: 1px solid #dddddd;
}

.patients-tabs button {
  min-width: 92px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  background: transparent;
  color: #1d68b3;
}

.patients-tabs button.is-active {
  border-color: #dddddd;
  background: #ffffff;
  color: #111111;
}

.patients-title {
  margin: 14px 0 8px;
  color: #1c1c1c;
  font-size: 25px;
  font-weight: 500;
}

.patients-filter-card {
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(280px, 380px);
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
  padding: 19px 34px;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  background: linear-gradient(180deg, #eeeeee, #f8f8f8);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.patients-create-button {
  width: fit-content;
  min-height: 31px;
  padding: 0 11px;
  border: 1px solid #1f5f91;
  border-radius: 4px;
  background: #2f7fbe;
  color: #ffffff;
  font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.patients-filter-card label,
.patients-table-tools label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #111111;
  font-size: 14px;
}

.patients-filter-card label {
  justify-self: end;
  font-weight: 800;
}

.patients-filter-card select,
.patients-table-tools select,
.patients-table-tools input {
  height: 34px;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  background: #ffffff;
  color: #333333;
}

.patients-filter-card select {
  width: 276px;
  padding: 0 12px;
}

.patients-table-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.patients-table-tools select {
  width: 66px;
  padding: 0 8px;
}

.patients-table-tools input {
  width: 168px;
  padding: 0 8px;
}

.patients-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.patients-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.patients-table th:nth-child(1),
.patients-table td:nth-child(1) {
  width: 136px;
}

.patients-table th:nth-child(3),
.patients-table td:nth-child(3) {
  width: 174px;
}

.patients-table th:nth-child(4),
.patients-table td:nth-child(4) {
  width: 190px;
}

.patients-table th:nth-child(5),
.patients-table td:nth-child(5),
.patients-table th:nth-child(6),
.patients-table td:nth-child(6),
.patients-table th:nth-child(7),
.patients-table td:nth-child(7) {
  width: 96px;
}

.patients-table th {
  padding: 11px 10px;
  border: 1px solid #d5d5d5;
  background: #dcdcdc;
  color: #111111;
  font-size: 13px;
  text-align: center;
  text-transform: uppercase;
}

.patients-table td {
  padding: 8px 10px;
  border: 1px solid #dcdcdc;
  color: #111111;
  font-size: 14px;
  text-align: center;
}

.patients-table tbody tr:nth-child(even) {
  background: #eeeeee;
}

.patients-table tbody tr:hover {
  background: #e8f3fb;
}

.patients-table .patient-cell {
  justify-content: center;
}

.patients-table .avatar,
.patients-table .patient-cell small {
  display: none;
}

.patients-table .patient-cell strong {
  font-weight: 500;
}

.professionals-page {
  min-height: 100vh;
  background: #ffffff;
}

.professionals-top-menu {
  min-height: 102px;
  border-bottom: 1px solid #111111;
}

.professionals-content {
  padding: 10px 28px 38px;
}

.professional-tabs {
  display: flex;
  align-items: flex-end;
  min-height: 42px;
  margin-bottom: 18px;
  border-bottom: 1px solid #dddddd;
}

.professional-tabs button {
  min-width: 104px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  background: transparent;
  color: #1d68b3;
  font-size: 14px;
}

.professional-tabs button.is-active {
  border-color: #dddddd;
  background: #ffffff;
  color: #111111;
}

.professional-title {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid #dddddd;
  color: #172534;
  font-size: 24px;
  font-weight: 500;
}

.professional-title svg {
  width: 23px;
  height: 23px;
}

.professional-action-card,
.professional-filter-card {
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  background: linear-gradient(180deg, #eeeeee, #f8f8f8);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.professional-action-card {
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 86px;
  margin-bottom: 18px;
  padding: 18px;
}

.professional-action-card button,
.professional-filter-card button {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 2px 5px rgba(24, 32, 28, 0.12);
}

.professional-filter-card {
  min-height: 102px;
  display: grid;
  grid-template-columns: minmax(220px, 290px) minmax(220px, 290px) minmax(120px, 1fr);
  align-items: center;
  gap: 36px;
  margin-bottom: 22px;
  padding: 20px;
}

.professional-filter-card label {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.professional-filter-card span {
  color: #111820;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.professional-filter-card select {
  height: 34px;
  border: 1px solid #c9c9c9;
  border-radius: 4px;
  background: #ffffff;
  color: #26313a;
  padding: 0 12px;
}

.professional-search-button {
  justify-self: end;
}

.professional-table-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 0 0 10px;
  color: #111111;
  font-size: 14px;
}

.professional-table-tools label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.professional-table-tools select,
.professional-table-tools input {
  height: 34px;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  background: #ffffff;
  color: #333333;
  padding: 0 10px;
}

.professional-table-tools input {
  width: 170px;
}

.professionals-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.professionals-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.professionals-table th,
.professionals-table td {
  padding: 8px 10px;
  border: 1px solid #d8d8d8;
  color: #000000;
  font-size: 14px;
  text-align: center;
}

.professionals-table th {
  background: #dcdcdc;
  font-weight: 700;
  text-transform: uppercase;
}

.professionals-table tbody tr:nth-child(even) {
  background: #eeeeee;
}

.professional-status svg {
  width: 24px;
  height: 24px;
}

.professional-status.is-active svg {
  color: #008000;
}

.professional-status.is-inactive svg {
  color: #ff0000;
}

.status-switch {
  position: relative;
  width: 80px;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #b9d9c7;
  border-radius: 999px;
  background: #e8f8ef;
  color: #008845;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.status-switch:hover {
  box-shadow: 0 6px 18px rgba(15, 80, 45, 0.14);
}

.status-switch-knob {
  position: absolute;
  top: 3px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #009b51;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s ease, background 0.18s ease;
}

.status-switch.is-active {
  padding-right: 22px;
}

.status-switch.is-active .status-switch-knob {
  transform: translateX(54px);
}

.status-switch.is-inactive {
  padding-left: 22px;
  border-color: #b9c0cb;
  background: #e4e7ec;
  color: #4b5563;
}

.status-switch.is-inactive .status-switch-knob {
  background: #6b7280;
}

.status-switch-text {
  position: relative;
  z-index: 1;
}

.is-inactive-record,
.professionals-table tbody tr.is-inactive-record:nth-child(even) {
  background: #d9dde4 !important;
}

.is-inactive-record td,
.is-inactive-record strong,
.is-inactive-record small {
  color: #4f5b6b !important;
}

.is-inactive-record .edit-cell,
.is-inactive-record .patient-edit-button,
.is-inactive-record .patient-whatsapp-button {
  opacity: 0.82;
}

.attendance-budgets-page {
  min-height: 100vh;
  background: #ffffff;
}

.attendance-budgets-content {
  width: min(1250px, calc(100% - 58px));
  margin: 0 auto;
  padding: 10px 0 42px;
}

.attendance-budgets-title {
  margin: 0 0 14px;
  color: #1c1c1c;
  font-size: 25px;
  font-weight: 500;
}

.attendance-budget-filter-card {
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  background: linear-gradient(180deg, #eeeeee, #f8f8f8);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.attendance-budget-filter-card button {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 2px 5px rgba(24, 32, 28, 0.12);
}

.attendance-budget-filter-card {
  display: grid;
  grid-template-columns:
    minmax(170px, 0.8fr)
    minmax(150px, 0.7fr)
    minmax(150px, 0.7fr)
    minmax(190px, 0.9fr)
    auto;
  align-items: end;
  gap: 18px 28px;
  margin-bottom: 18px;
  padding: 20px 34px;
}

.attendance-budget-filter-card label {
  display: grid;
  gap: 7px;
  color: #111820;
  font-size: 14px;
  font-weight: 900;
}

.attendance-budget-filter-card span {
  color: #111820;
}

.attendance-budget-filter-card select,
.attendance-budget-filter-card input,
.attendance-budget-table-tools select,
.attendance-budget-table-tools input {
  height: 34px;
  border: 1px solid #c9c9c9;
  border-radius: 4px;
  background: #ffffff;
  color: #26313a;
  padding: 0 12px;
}

.attendance-budget-search-button {
  justify-self: end;
  min-width: 118px;
}

.attendance-budget-table-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 10px;
  color: #111111;
  font-size: 14px;
}

.attendance-budget-table-tools label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.attendance-budget-table-tools input {
  width: 170px;
}

.attendance-budget-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.attendance-budget-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.attendance-budget-table th,
.attendance-budget-table td {
  padding: 8px 10px;
  border: 1px solid #d8d8d8;
  color: #000000;
  font-size: 14px;
  text-align: center;
  vertical-align: middle;
}

.attendance-budget-table th {
  background: #dcdcdc;
  font-weight: 700;
  text-transform: uppercase;
}

.attendance-budget-table th:nth-child(1),
.attendance-budget-table td:nth-child(1) {
  width: 70px;
}

.attendance-budget-table th:nth-child(4),
.attendance-budget-table td:nth-child(4),
.attendance-budget-table th:nth-child(5),
.attendance-budget-table td:nth-child(5),
.attendance-budget-table th:nth-child(6),
.attendance-budget-table td:nth-child(6) {
  width: 120px;
}

.attendance-budget-table th:nth-child(7),
.attendance-budget-table td:nth-child(7),
.attendance-budget-table th:nth-child(8),
.attendance-budget-table td:nth-child(8) {
  width: 74px;
}

.attendance-budget-table tbody tr:nth-child(even) {
  background: #eeeeee;
}

.attendance-budget-table tbody tr:hover {
  background: #e8f3fb;
}

.attendance-budget-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.attendance-budget-status.is-contracted {
  background: #d8f3d0;
  color: #087c21;
}

.attendance-budget-status.is-pending {
  background: #fff1d2;
  color: #995f00;
}

.attendance-budget-edit-button,
.attendance-budget-table .print-budget-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: #ffffff;
  color: #348bd1;
  cursor: pointer;
}

.attendance-budget-edit-button:hover,
.attendance-budget-table .print-budget-button:hover {
  background: #eaf4ff;
}

.attendance-budget-edit-button svg,
.attendance-budget-table .print-budget-button svg {
  width: 20px;
  height: 20px;
}

.professionals-list-view.is-hidden,
.professional-create-view.is-hidden {
  display: none;
}

.professional-create-view {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-height: calc(100vh - 140px);
}

body.professionals-focus .professional-create-view {
  width: min(1280px, calc(100% - 28px));
  margin: 14px auto 42px;
}

.professional-form-sidebar {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  background: linear-gradient(180deg, #eeeeee, #f8f8f8);
}

.professional-photo-box {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 24px 10px 14px;
  background: #ffffff;
}

.professional-photo-box .patient-photo-placeholder {
  margin-bottom: 4px;
}

.professional-form-sidebar button {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: #ffffff;
  color: #1f75c9;
  font-size: 14px;
  text-align: left;
}

.professional-form-sidebar button.is-active {
  background: #3b8cd1;
  color: #ffffff;
  font-weight: 800;
}

.professional-form-sidebar svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.professional-form-card {
  min-height: 560px;
  padding: 20px 20px 22px;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  background: linear-gradient(180deg, #eeeeee, #f8f8f8);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.professional-form-title {
  margin: 0 0 16px;
  color: #172534;
  font-size: 25px;
  font-weight: 500;
}

.professional-info-section {
  margin-bottom: 26px;
}

.professional-info-grid {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(230px, 1fr) minmax(230px, 1fr);
  gap: 16px 58px;
  padding: 6px 14px 10px;
}

.professional-info-grid label {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.professional-info-grid label.professional-info-full {
  grid-column: 1 / -1;
  grid-template-columns: 170px minmax(0, 1fr);
}

.professional-info-grid span {
  color: #111820;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.professional-info-grid input:not([type="checkbox"]),
.professional-info-grid select {
  width: 100%;
  height: 34px;
  border: 1px solid #c9c9c9;
  border-radius: 4px;
  background: #ffffff;
  color: #26313a;
  padding: 0 12px;
}

.professional-cro-fields {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(105px, .42fr) minmax(150px, 1fr);
  gap: 10px;
}

.professional-info-grid .professional-cro-fields label {
  min-width: 0;
  grid-template-columns: 1fr;
  align-content: end;
  gap: 5px;
}

.professional-cro-fields.is-required label span::after {
  content: " *";
  color: #cf3c4f;
}

.professional-check-field {
  grid-column: 1 / -1;
  width: 220px;
}

.professional-check-field input {
  width: 14px;
  height: 14px;
}

.professional-form-section {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.professional-form-section h3 {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #dddddd;
  color: #172534;
  font-size: 23px;
  font-weight: 500;
}

.professional-form-section h3 svg {
  width: 20px;
  height: 20px;
}

.professional-clinic-table {
  display: grid;
  border: 1px solid #d8d8d8;
  background: #ffffff;
}

.professional-clinic-head,
.professional-clinic-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
}

.professional-clinic-head span {
  padding: 10px;
  border-right: 1px solid #d8d8d8;
  background: #dcdcdc;
  color: #000000;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.professional-clinic-head span:last-child {
  border-right: 0;
  text-align: center;
}

.professional-clinic-row {
  min-height: 40px;
}

.professional-clinic-row select {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 0;
  border-right: 1px solid #d8d8d8;
  background: #ffffff;
  color: #26313a;
  padding: 0 12px;
}

.professional-remove-clinic {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #ff0000;
}

.professional-remove-clinic svg {
  width: 23px;
  height: 23px;
}

.professional-add-clinic {
  width: fit-content;
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
}

.professional-commission-picker {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d8d8d8;
  background: #ffffff;
}

.professional-commission-select-field {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.professional-commission-select-field span {
  color: #111111;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.professional-commission-select-field select {
  width: 100%;
  min-width: 0;
  height: 40px;
  border: 1px solid #c8cdd1;
  border-radius: 4px;
  background: #ffffff;
  color: #26313a;
  padding: 0 12px;
}

.professional-commission-select-control {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.professional-commission-select-control small {
  color: #65717b;
  font-size: 11px;
}

.professional-commission-selected {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid #dce7de;
  background: #f5fbf7;
}

.professional-commission-selected span {
  color: #65717b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.professional-commission-selected strong {
  min-width: 0;
  color: #172534;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.professional-commission-selected em {
  color: #008b3a;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.professional-commission-selected em.is-muted {
  color: #8b949b;
}

.professional-commission-empty {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 22px;
  border: 1px solid #f0d9a2;
  border-radius: 8px;
  background: #fffaf0;
  color: #69757e;
  text-align: center;
}

.professional-commission-empty strong {
  color: #8b5b08;
  font-size: 14px;
}

.professional-commission-empty span {
  font-size: 12px;
  line-height: 1.5;
}

.professional-commission-validation {
  margin: 0;
  padding: 9px 11px;
  border-radius: 8px;
  background: #fff0f0;
  color: #b42318;
  font-size: 12px;
  font-weight: 800;
}

.professional-commission-validation[hidden] {
  display: none !important;
}

.professional-commission-picker.is-invalid {
  border-color: #e45151;
  box-shadow: 0 0 0 3px rgba(228, 81, 81, .12);
}

.professional-commission-picker.is-invalid .professional-commission-select-field select {
  border-color: #d93434;
  background: #fffafa;
}

.professional-commission-help {
  margin: -4px 0 0;
  color: #65717b;
  font-size: 12px;
}

.professional-form-grid {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(240px, 1.2fr) minmax(190px, 1fr);
  gap: 16px 36px;
}

.professional-form-grid label {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.professional-form-grid label.professional-wide-field {
  grid-column: span 2;
}

.professional-form-grid label.professional-full-field {
  grid-column: 1 / -1;
}

.professional-form-grid span {
  color: #111820;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.professional-form-grid input,
.professional-form-grid select {
  width: 100%;
  height: 34px;
  border: 1px solid #c9c9c9;
  border-radius: 4px;
  background: #ffffff;
  color: #26313a;
  padding: 0 12px;
}

.professional-bank-section {
  min-height: 48px;
}

.professional-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 20px;
}

.professional-form-actions button {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
}

.specialties-page {
  min-height: 100vh;
  background: #ffffff;
}

.specialties-top-menu {
  min-height: 102px;
  border-bottom: 1px solid #111111;
}

.specialties-content {
  width: min(1140px, calc(100% - 112px));
  margin: 0 auto;
  padding: 8px 0 42px;
}

.specialties-title {
  margin: 0 0 8px;
  color: #1c1c1c;
  font-size: 25px;
  font-weight: 500;
}

.procedure-tabs {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  margin: 2px 0 20px;
  border-bottom: 1px solid #dddddd;
}

.procedure-tabs button {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 4px 4px 0 0;
  background: transparent;
  color: #2c76bf;
  font: inherit;
  cursor: pointer;
}

.procedure-tabs button.is-active {
  border: 1px solid #dddddd;
  border-bottom-color: #ffffff;
  background: #ffffff;
  color: #222222;
}

.procedures-title {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 20px;
  padding-bottom: 3px;
  border-bottom: 1px solid #e0e0e0;
}

.procedures-title svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.specialties-filter-card,
.specialty-create-panel {
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  background: linear-gradient(180deg, #eeeeee, #f8f8f8);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.specialties-filter-card {
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(280px, 380px);
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
  padding: 19px 34px;
}

.procedures-filter-card {
  grid-template-columns: minmax(340px, 1fr) minmax(280px, 380px);
}

.procedure-action-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.specialties-filter-card label,
.specialties-table-tools label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #111111;
  font-size: 14px;
}

.specialties-filter-card label {
  justify-self: end;
  font-weight: 800;
}

.specialties-filter-card select,
.specialties-table-tools select,
.specialties-table-tools input {
  height: 34px;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  background: #ffffff;
  color: #333333;
}

.specialties-filter-card select {
  width: 244px;
  padding: 0 12px;
}

.specialty-create-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(220px, 0.8fr) minmax(180px, 0.6fr) auto;
  align-items: end;
  gap: 16px;
  margin: -6px 0 20px;
  padding: 18px 20px;
}

.procedure-create-panel {
  grid-template-columns:
    minmax(220px, 1.3fr)
    minmax(120px, 0.45fr)
    minmax(140px, 0.5fr)
    minmax(210px, 0.95fr)
    minmax(130px, 0.45fr)
    auto;
}

.specialty-create-panel.is-hidden {
  display: none;
}

.specialty-create-panel label {
  display: grid;
  gap: 7px;
  color: #111820;
  font-size: 14px;
  font-weight: 900;
}

.specialty-create-panel input,
.specialty-create-panel select {
  height: 34px;
  border: 1px solid #c9c9c9;
  border-radius: 4px;
  background: #ffffff;
  color: #26313a;
  padding: 0 12px;
}

.specialty-form-actions {
  display: flex;
  gap: 6px;
}

.specialty-form-actions button {
  min-height: 31px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
}

.specialties-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.specialties-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.specialties-table th,
.specialties-table td {
  padding: 8px 10px;
  border: 1px solid #d8d8d8;
  color: #000000;
  font-size: 14px;
  text-align: center;
}

.specialties-table th {
  background: #dcdcdc;
  font-weight: 700;
  text-transform: uppercase;
}

.specialties-table tbody tr:nth-child(even) {
  background: #eeeeee;
}

.procedure-value-cell {
  color: #0000ff !important;
}

.procedures-table {
  min-width: 960px;
}

.payment-method-page {
  min-height: 100vh;
  background: #ffffff;
}

.payment-method-content {
  width: min(1140px, calc(100% - 112px));
  margin: 0 auto;
  padding: 8px 0 42px;
}

.payment-method-title {
  margin: 0 0 8px;
  color: #1c1c1c;
  font-size: 25px;
  font-weight: 500;
}

.payment-method-action-card,
.payment-method-detail-card {
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  background: linear-gradient(180deg, #eeeeee, #f8f8f8);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.payment-method-action-card {
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 380px);
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
  padding: 19px 34px;
}

.payment-method-action-card label,
.payment-method-table-tools label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #111111;
  font-size: 14px;
}

.payment-method-action-card label {
  justify-self: end;
  font-weight: 800;
}

.payment-method-action-card select,
.payment-method-table-tools select,
.payment-method-table-tools input,
.payment-method-detail-row input,
.payment-method-detail-row select,
.payment-method-detail-row textarea {
  height: 34px;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  background: #ffffff;
  color: #333333;
}

.payment-method-action-card select {
  width: 244px;
  padding: 0 12px;
}

.payment-method-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.payment-method-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

.payment-method-table th,
.payment-method-table td {
  padding: 8px 10px;
  border: 1px solid #d8d8d8;
  color: #000000;
  font-size: 14px;
  text-align: center;
}

.payment-method-table th {
  background: #dcdcdc;
  font-weight: 700;
  text-transform: uppercase;
}

.payment-method-table tbody tr:nth-child(even) {
  background: #eeeeee;
}

.payment-method-list-view.is-hidden,
.payment-method-create-view.is-hidden {
  display: none;
}

.payment-method-detail-card {
  display: grid;
  gap: 16px;
  padding: 20px 20px 34px;
}

.payment-method-detail-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.payment-method-detail-row span,
.payment-method-check-row span {
  color: #111111;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.payment-method-detail-row input,
.payment-method-detail-row select,
.payment-method-detail-row textarea {
  width: 100%;
  min-width: 0;
  padding: 0 12px;
}

.payment-method-detail-row textarea {
  min-height: 96px;
  padding-top: 10px;
  resize: vertical;
}

.supplier-table {
  min-width: 820px;
}

.cost-center-table {
  min-width: 620px;
}

.finance-field-hint {
  color: #58706c;
  font-size: 11px;
  font-weight: 700;
}

.payment-method-check-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 6px 14px;
}

.payment-method-check-row input {
  grid-column: 2;
  width: 14px;
  height: 14px;
}

.payment-method-check-row span {
  grid-column: 2;
  grid-row: 1;
  padding-left: 20px;
  text-align: left;
}

.payment-method-restrict-section {
  display: grid;
  gap: 16px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid #dddddd;
}

.payment-method-restrict-section h3 {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  color: #172534;
  font-size: 23px;
  font-weight: 500;
}

.payment-method-restrict-section h3 svg {
  width: 20px;
  height: 20px;
}

.payment-method-restrict-section button {
  width: fit-content;
}

.payment-method-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 8px;
}

@media (max-width: 760px) {
  .payment-method-content {
    width: min(100% - 24px, 1140px);
  }

  .payment-method-action-card {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .payment-method-action-card label {
    justify-self: stretch;
  }

  .payment-method-action-card select {
    width: 100%;
  }

  .payment-method-detail-row,
  .payment-method-check-row {
    grid-template-columns: 1fr;
  }

  .payment-method-detail-row span,
  .payment-method-check-row span {
    text-align: left;
  }

  .payment-method-check-row input,
  .payment-method-check-row span {
    grid-column: auto;
    grid-row: auto;
  }
}

.procedure-list-view.is-hidden,
.procedure-create-view.is-hidden {
  display: none;
}

.procedure-detail-title {
  margin-bottom: 8px;
}

.procedure-detail-card {
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  background: linear-gradient(180deg, #eeeeee, #f8f8f8);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 18px 20px 28px;
}

.procedure-detail-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin-bottom: 15px;
}

.procedure-detail-row span,
.procedure-check-grid span,
.procedure-generation-grid span,
.procedure-lab-row span {
  color: #111111;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.procedure-detail-row input,
.procedure-detail-row select {
  width: 100%;
  height: 34px;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  background: #ffffff;
  color: #26313a;
  padding: 0 12px;
  font: inherit;
}

.procedure-check-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px 34px;
  margin: 30px 0 18px;
}

.procedure-check-grid label,
.procedure-generation-grid label,
.procedure-lab-row label {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 22px;
  align-items: center;
  gap: 8px;
}

.procedure-check-grid input,
.procedure-generation-grid input,
.procedure-lab-row input {
  width: 13px;
  height: 13px;
  justify-self: start;
}

.procedure-check-grid label:nth-child(5) {
  grid-column: 1 / 2;
}

.procedure-generation-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(210px, 0.45fr) minmax(320px, 1fr);
  align-items: center;
  gap: 18px;
  margin: 18px 0 22px 170px;
}

.procedure-generation-grid p {
  margin: 0;
  color: #ff0000;
  font-size: 10px;
  font-weight: 900;
}

.procedure-lab-row {
  width: min(310px, 100%);
  margin-left: 170px;
}

.procedure-clinic-section {
  margin-top: 14px;
}

.procedure-clinic-section h3 {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e0e0e0;
  color: #1c1c1c;
  font-size: 22px;
  font-weight: 500;
}

.procedure-clinic-section h3 svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.procedure-clinic-box {
  min-height: 48px;
  display: flex;
  align-items: center;
  border: 1px solid #dddddd;
  background: #ffffff;
  padding: 0 12px;
  color: #26313a;
}

.procedure-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 24px;
}

.procedure-detail-actions button {
  min-height: 31px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
}

.commission-page {
  min-height: 100vh;
  background: #ffffff;
}

.commission-top-menu {
  min-height: 102px;
  border-bottom: 1px solid #111111;
}

.commission-content {
  width: min(1140px, calc(100% - 112px));
  margin: 0 auto;
  padding: 8px 0 42px;
}

.commission-title {
  margin: 0 0 8px;
  color: #1c1c1c;
  font-size: 25px;
  font-weight: 500;
}

.commission-action-card,
.commission-filter-card {
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  background: linear-gradient(180deg, #eeeeee, #f8f8f8);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.commission-action-card {
  min-height: 70px;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding: 18px 34px;
}

.commission-action-card button,
.commission-filter-card button {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
}

.commission-filter-card {
  min-height: 88px;
  display: grid;
  grid-template-columns: minmax(450px, 1fr) minmax(230px, 260px) 150px;
  align-items: center;
  gap: 28px;
  margin-bottom: 20px;
  padding: 20px 32px;
}

.commission-filter-card label {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.commission-filter-card span {
  color: #111820;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.commission-filter-card select,
.commission-table-tools select,
.commission-table-tools input {
  height: 34px;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  background: #ffffff;
  color: #333333;
  padding: 0 12px;
}

.commission-list-view.is-hidden,
.commission-rule-view.is-hidden {
  display: none;
}

.commission-rule-card {
  min-height: 480px;
  display: flex;
  flex-direction: column;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  background: linear-gradient(180deg, #eeeeee, #f9f9f9);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 20px 20px 26px;
}

.commission-rule-section {
  padding: 0;
}

.commission-rule-section + .commission-rule-section {
  margin-top: 18px;
}

.commission-rule-section h3 {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 0 36px;
  padding: 0 0 3px;
  border-bottom: 1px solid #e0e0e0;
  color: #1c1c1c;
  font-size: 22px;
  font-weight: 500;
}

.commission-rule-section h3 svg {
  width: 18px;
  height: 18px;
  color: #2b2b2b;
  fill: currentColor;
}

.commission-rule-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.commission-rule-grid label {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.commission-rule-grid span {
  color: #111820;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.commission-rule-grid input,
.commission-rule-grid select,
.commission-rule-grid textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  background: #ffffff;
  color: #333333;
  padding: 0 12px;
  font: inherit;
}

.commission-rule-grid textarea {
  min-height: 92px;
  padding-top: 10px;
  resize: vertical;
}

.commission-wide-field {
  grid-column: 1 / -1;
}

.commission-rule-basic {
  padding: 0 0 8px;
}

.commission-rule-block {
  min-height: 94px;
}

.commission-rule-tabs {
  display: flex;
  align-items: flex-end;
  gap: 22px;
  margin: 8px 0 20px;
  border-bottom: 1px solid #d8d8d8;
}

.commission-rule-tabs-title {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-right: 4px;
  padding: 0 0 7px;
  color: #1c1c1c;
  font-size: 22px;
  font-weight: 500;
}

.commission-rule-tabs-title svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.commission-rule-tabs button {
  position: relative;
  min-height: 37px;
  padding: 0 1px 8px;
  border: 0;
  background: transparent;
  color: #69727c;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.commission-rule-tabs button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: transparent;
  content: "";
}

.commission-rule-tabs button:hover,
.commission-rule-tabs button.is-active {
  color: #1474c4;
}

.commission-rule-tabs button.is-active::after {
  background: #1474c4;
}

.commission-dynamic-table {
  margin-bottom: 14px;
  overflow-x: auto;
}

.commission-standard-head,
.commission-standard-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.1fr) minmax(130px, 0.7fr) minmax(180px, 1fr) minmax(210px, 1.1fr) 72px;
  min-width: 850px;
}

.commission-special-head,
.commission-special-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(180px, 1fr) minmax(210px, 1.2fr) minmax(160px, 0.9fr) minmax(100px, 0.55fr) 72px;
  min-width: 950px;
}

.commission-standard-head,
.commission-special-head {
  min-height: 38px;
  align-items: center;
  background: #dddddd;
  color: #202020;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.commission-standard-row,
.commission-special-row {
  min-height: 42px;
  align-items: stretch;
  border-right: 1px solid #d7d7d7;
  border-bottom: 1px solid #d7d7d7;
  border-left: 1px solid #d7d7d7;
  background: #ffffff;
}

.commission-standard-row label,
.commission-special-row label {
  display: flex;
  align-items: center;
  padding: 3px;
  border-right: 1px solid #d7d7d7;
}

.commission-standard-row label > span,
.commission-special-row label > span {
  display: none;
}

.commission-standard-row select,
.commission-standard-row input,
.commission-special-row select,
.commission-special-row input {
  width: 100%;
  min-width: 0;
  height: 35px;
  border: 1px solid #c7cdd3;
  border-radius: 4px;
  background: #ffffff;
  color: #303840;
  padding: 0 11px;
  font: inherit;
}

.commission-standard-row input,
.commission-special-row input {
  text-align: center;
}

.commission-remove-row {
  border: 0;
  background: transparent;
  color: #e60000;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.commission-remove-row:hover {
  background: #fff0f0;
}

.commission-row-empty,
.commission-empty-rule {
  margin: 0;
  padding: 22px;
  border: 1px solid #d7d7d7;
  background: #ffffff;
  color: #68737d;
  text-align: center;
}

.commission-empty-rule {
  margin-bottom: 14px;
}

.commission-rule-add-button {
  width: fit-content;
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
}

.commission-rule-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
}

.commission-rule-actions button {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
}

.commission-search-button {
  justify-self: end;
}

.commission-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.commission-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.commission-table th,
.commission-table td {
  padding: 9px 10px;
  border: 1px solid #d8d8d8;
  color: #000000;
  font-size: 14px;
  text-align: center;
}

.commission-table th {
  background: #dcdcdc;
  font-weight: 700;
  text-transform: uppercase;
}

.commission-table tbody tr:nth-child(even) {
  background: #eeeeee;
}

.payment-discount-content {
  width: min(1140px, calc(100% - 72px));
  margin: 0 auto;
  padding: 8px 0 42px;
}

.payment-discount-title {
  margin-top: 0;
  margin-bottom: 8px;
}

.payment-discount-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  background: linear-gradient(180deg, #eeeeee, #f8f8f8);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 20px 26px;
}

.payment-discount-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.payment-discount-grid label {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.payment-discount-grid span {
  color: #111820;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.payment-discount-grid select,
.payment-discount-row select,
.payment-discount-row input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid #c9cfd4;
  border-radius: 4px;
  background: #ffffff;
  color: #303840;
  padding: 0 12px;
}

.payment-discount-section-title {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 0 28px;
  padding-bottom: 5px;
  border-bottom: 1px solid #e0e0e0;
  color: #1c1c1c;
  font-size: 22px;
  font-weight: 500;
}

.payment-discount-section-title svg {
  width: 18px;
  height: 18px;
}

.payment-discount-empty {
  width: min(735px, 100%);
  margin: 0 auto 18px;
  padding: 16px;
  border: 1px solid #8ecbe7;
  border-radius: 4px;
  background: #c7e9f7;
  color: #166383;
  text-align: left;
}

.payment-discount-table-wrap {
  margin-bottom: 20px;
  overflow-x: visible;
}

.payment-discount-head,
.payment-discount-row {
  display: grid;
  grid-template-columns: minmax(178px, 1.1fr) minmax(160px, 0.95fr) minmax(130px, 0.75fr) minmax(118px, 0.7fr) minmax(96px, 0.55fr) 62px;
  min-width: 0;
}

.payment-discount-head {
  min-height: 38px;
  align-items: center;
  background: #dddddd;
  color: #202020;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.payment-discount-row {
  min-height: 42px;
  align-items: stretch;
  border-right: 1px solid #d7d7d7;
  border-bottom: 1px solid #d7d7d7;
  border-left: 1px solid #d7d7d7;
  background: #ffffff;
}

.payment-discount-row:nth-child(even) {
  background: #eeeeee;
}

.payment-discount-row label {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 3px;
  border-right: 1px solid #d7d7d7;
}

.payment-discount-row label > span {
  display: none;
}

.payment-discount-row input {
  text-align: center;
}

.payment-discount-remove-row {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 42px;
}

.payment-discount-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-top: auto;
}

.payment-discount-left-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.payment-discount-footer button {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
}

.payment-discount-copy-help {
  color: #ff0000;
  font-size: 11px;
  font-weight: 800;
}

.specialty-status-button,
.specialty-edit-button,
.procedure-status-button,
.procedure-edit-button {
  width: 34px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.specialty-status-button svg,
.specialty-edit-button svg,
.procedure-status-button svg,
.procedure-edit-button svg {
  width: 22px;
  height: 22px;
}

.specialty-status-button:hover,
.specialty-edit-button:hover,
.procedure-status-button:hover,
.procedure-edit-button:hover {
  background: #eef6fc;
}

.specialty-edit-view.is-hidden,
.specialties-list-view.is-hidden {
  display: none;
}

.specialty-edit-card {
  min-height: 278px;
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  background: linear-gradient(180deg, #eeeeee, #f8f8f8);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.specialty-edit-row {
  display: grid;
  grid-template-columns: 275px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.specialty-edit-row span {
  color: #111820;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.specialty-edit-row input,
.specialty-edit-row select {
  height: 34px;
  border: 1px solid #c9c9c9;
  border-radius: 4px;
  background: #ffffff;
  color: #26313a;
  padding: 0 12px;
}

.specialty-clinic-section {
  min-height: 96px;
  display: grid;
  align-content: start;
  gap: 18px;
  padding-top: 2px;
  border-top: 1px solid #dddddd;
}

.specialty-clinic-section h3 {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  color: #172534;
  font-size: 23px;
  font-weight: 500;
}

.specialty-clinic-section svg {
  width: 20px;
  height: 20px;
}

.specialty-clinic-section .save-action {
  width: fit-content;
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
}

.specialty-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  margin-top: auto;
}

.specialty-edit-actions button {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
}

.patient-status-check {
  display: inline-grid;
  place-items: center;
  color: #008000;
}

.patient-status-check.is-inactive {
  color: #ff0000;
}

.patient-status-check svg {
  width: 23px;
  height: 23px;
}

.patient-edit-button,
.patient-whatsapp-button {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: #ffffff;
}

.patient-edit-button {
  color: #338ed0;
}

.patient-whatsapp-button {
  color: #43c65d;
}

.patient-edit-button svg,
.patient-whatsapp-button svg {
  width: 23px;
  height: 23px;
}

.patient-edit-button:hover,
.patient-whatsapp-button:hover {
  background: #eaf4ff;
}

.home-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.home-panel-header .primary-action {
  background: #37a344;
  box-shadow: 0 8px 18px rgba(55, 163, 68, 0.18);
}

.home-panel-header h2 {
  font-size: 22px;
}

.home-patient-search {
  height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
}

.home-patient-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.registered-patients-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.registered-patients-toggle {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-weight: 900;
}

.registered-patients-toggle:hover {
  background: rgba(15, 143, 131, 0.04);
}

.registered-patients-toggle strong {
  min-width: 28px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--amber);
  color: #ffffff;
  font-size: 12px;
}

.registered-patients-list {
  border-top: 1px solid var(--line);
  padding: 0 10px 12px;
}

.open-record-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid rgba(15, 143, 131, 0.25);
  border-radius: var(--radius);
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.open-record-button:hover {
  border-color: rgba(15, 143, 131, 0.5);
  background: #d2f0ec;
}

.patient-form-panel,
.patient-records-panel {
  box-shadow: none;
}

.patient-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.patient-form label {
  display: grid;
  gap: 7px;
}

.patient-form span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.patient-form input,
.patient-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

.patient-form input {
  height: 42px;
  padding: 0 11px;
}

.patient-form textarea {
  resize: vertical;
  padding: 10px 11px;
}

.span-2 {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.compact-search {
  min-width: min(320px, 100%);
  height: 40px;
}

.empty-table-cell {
  height: 82px;
  color: var(--muted);
  text-align: center;
}

.ficha-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
}

.ficha-sidebar,
.ficha-card {
  border: 1px solid #d2d2d2;
  border-radius: 4px;
  background: #eeeeee;
  box-shadow: inset 0 1px 2px rgba(24, 32, 28, 0.05);
}

.ficha-sidebar {
  align-self: start;
  display: grid;
  gap: 12px;
  padding: 18px;
}

.ficha-sidebar > strong {
  color: #111820;
  font-size: 13px;
  text-align: center;
}

.health-button,
.pending-button,
.ficha-side-menu button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
}

.health-button,
.pending-button {
  background: #37a344;
}

.patient-photo-placeholder {
  width: 140px;
  height: 140px;
  position: relative;
  display: grid;
  place-items: center;
  justify-self: center;
  border-radius: 50%;
  border: 4px solid #d8d8d8;
  background: #ffffff;
  color: #b9b9b9;
}

.patient-photo-placeholder.has-photo {
  display: block;
  grid-template-rows: none;
  overflow: hidden;
  padding: 0 !important;
  background: #ffffff;
}

.patient-photo-placeholder.has-photo > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
  object-position: center;
}

.patient-photo-placeholder img[hidden] {
  display: none !important;
}

.patient-photo-placeholder.has-photo > [data-patient-profile-photo-placeholder],
.patient-photo-placeholder [data-patient-profile-photo-placeholder][hidden] {
  display: none !important;
}

.patient-photo-placeholder svg {
  width: 58px;
  height: 58px;
}

.patient-photo-placeholder small {
  align-self: start;
  margin-top: -18px;
  font-size: 9px;
  font-weight: 900;
}

.photo-links {
  display: flex;
  justify-content: center;
  gap: 4px;
  color: #2678cf;
  font-size: 12px;
}

.photo-links button {
  border: 0;
  background: transparent;
  color: #2678cf;
  padding: 0;
}

.ficha-side-menu {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.ficha-side-menu button {
  justify-content: flex-start;
  padding: 0 12px;
  background: #f8f8f8;
  color: #2874c8;
  font-weight: 700;
}

.ficha-side-menu button svg {
  color: #c7c7c7;
}

.ficha-side-menu button.is-active {
  background: #3f91d6;
  color: #ffffff;
}

.ficha-side-menu button.is-active svg {
  color: #ffffff;
}

.ficha-card {
  padding: 18px;
  background: #f1f1f1;
}

.ficha-footer-actions button,
.ficha-inline-actions button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 2px 5px rgba(24, 32, 28, 0.12);
}

.save-action {
  background: #2e85e8;
}

.blue-action {
  background: #2daedf;
}

.green-action {
  background: #37a344;
}

.danger-action {
  background: #d54040;
}

.ficha-section {
  padding-top: 12px;
  border-top: 1px solid #e0e0e0;
}

.ficha-section + .ficha-section {
  margin-top: 20px;
}

.ficha-section h2 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  color: #172534;
  font-size: 23px;
  font-weight: 500;
}

.balance-strip {
  min-height: 58px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 10px 20px;
  border: 1px solid #b8dfad;
  border-radius: 4px;
  background: #d8f0cf;
  color: #1f6c25;
  font-size: 14px;
  font-weight: 800;
}

.balance-strip span {
  display: flex;
  justify-content: center;
  gap: 28px;
}

.balance-strip strong.is-negative,
.procedure-balance-strip strong.is-negative {
  color: #d71920;
}

.ficha-inline-actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin: 0 0 16px;
}

.ficha-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px 22px;
}

.ficha-grid label {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.ficha-grid label.wide-field {
  grid-column: span 3;
}

.ficha-grid label.full-field {
  grid-column: 1 / -1;
}

.ficha-grid label.full-field textarea,
.ficha-grid label.full-field input {
  min-width: 0;
}

.ficha-grid span {
  color: #111820;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.ficha-grid input,
.ficha-grid select,
.ficha-grid textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #c9c9c9;
  border-radius: 4px;
  background: #ffffff;
  color: #26313a;
}

.ficha-grid input,
.ficha-grid select {
  height: 34px;
  padding: 0 12px;
}

.ficha-grid textarea {
  resize: vertical;
  padding: 9px 12px;
}

.ficha-footer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid #dedede;
}

.patient-record-page {
  width: min(1320px, calc(100% - 28px));
  min-height: calc(100vh - 110px);
  align-items: start;
  gap: 14px;
  margin: 14px auto 42px;
  padding: 0;
}

.patient-record-page .ficha-sidebar {
  position: sticky;
  top: 14px;
  border-color: #d1d6d9;
  background: #e9e9e9;
  box-shadow: 0 3px 10px rgba(30, 42, 54, 0.08);
}

.patient-record-page .ficha-sidebar > strong {
  min-height: 34px;
  display: grid;
  place-items: center;
  color: #111820;
  line-height: 1.25;
}

.patient-record-page .patient-photo-placeholder {
  grid-template-rows: 1fr auto;
  padding: 18px 0 14px;
}

.patient-record-page .patient-photo-placeholder svg {
  align-self: end;
}

.patient-record-page .patient-photo-placeholder small {
  align-self: start;
  margin-top: 6px;
}

.patient-age-label {
  margin-top: -8px;
  color: #111820;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.patient-record-page .health-button {
  background: linear-gradient(#e14a4d, #bf272d);
  box-shadow: 0 2px 5px rgba(191, 39, 45, 0.2);
}

.patient-record-page .pending-button {
  background: linear-gradient(#43b24d, #2c9538);
  box-shadow: 0 2px 5px rgba(44, 149, 56, 0.2);
}

.patient-record-page .health-button svg,
.patient-record-page .pending-button svg,
.patient-record-page .ficha-side-menu svg,
.ficha-inline-actions svg,
.ficha-section h2 svg {
  width: 15px;
  height: 15px;
}

.patient-record-page .ficha-side-menu button {
  min-height: 36px;
  border-radius: 5px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.patient-record-page .ficha-side-menu button:hover {
  background: #eef6fd;
}

.patient-record-page .ficha-side-menu button.is-active {
  background: #3f91d6;
  color: #ffffff;
}

.patient-record-page .ficha-main {
  min-width: 0;
}

.patient-record-page .ficha-card {
  border-color: #d2d6d9;
  background: linear-gradient(180deg, #eeeeee, #f7f7f7);
  box-shadow: inset 0 1px 2px rgba(24, 32, 28, 0.06), 0 4px 12px rgba(30, 42, 54, 0.08);
}

.patient-record-form {
  padding: 20px;
}

.patient-record-form .ficha-section:first-of-type {
  padding-top: 8px;
}

.patient-record-page .ficha-section h2 {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 23px;
}

.ficha-inline-actions {
  justify-content: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.ficha-inline-actions button {
  min-height: 31px;
  border-radius: 5px;
  font-size: 13px;
}

.serasa-action {
  background: #ee2f7d;
}

.credit-action {
  background: #25a9d3;
}

.voucher-action {
  background: #59bfe5;
}

.patient-balance-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
  background: #d7f0cf;
}

.patient-balance-strip span {
  justify-content: center;
  gap: 28px;
}

.patient-quick-actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin: 0 0 12px;
}

.patient-quick-actions button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 2px 5px rgba(24, 32, 28, 0.12);
}

.whatsapp-action {
  background: #35a84a;
}

.queue-action {
  background: #d64040;
}

.patient-record-form .ficha-grid {
  gap: 14px 22px;
}

.patient-record-form .ficha-grid label {
  min-width: 0;
}

.patient-record-form .ficha-grid input,
.patient-record-form .ficha-grid select {
  height: 34px;
}

.patient-record-form .ficha-grid textarea {
  min-height: 78px;
}

.patient-record-form .ficha-footer-actions button {
  min-width: 74px;
}

.budget-card {
  min-width: 0;
}

.budget-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.budget-list-header h2 {
  margin: 0;
  color: #111827;
  font-size: 19px;
  font-weight: 900;
}

.budget-new-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-left: auto;
  padding: 0 16px;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(180deg, #2f8df0 0%, #1672cf 100%);
  box-shadow: 0 10px 22px rgba(22, 114, 207, 0.22);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.budget-new-button:hover,
.budget-new-button:focus-visible {
  background: linear-gradient(180deg, #3b99fb 0%, #0968c4 100%);
  transform: translateY(-1px);
}

.budget-new-button svg {
  width: 16px;
  height: 16px;
}

.patient-budget-table {
  width: 100%;
  margin-top: 14px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.patient-budget-table th {
  padding: 8px 10px 10px;
  border-bottom: 1px solid #dce8e6;
  color: #60707d;
  font-size: 11px;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

.patient-budget-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #dce8e6;
  color: #071827;
  font-size: 13px;
  vertical-align: middle;
}

.patient-budget-table tbody tr:hover td {
  background: rgba(15, 143, 131, 0.04);
}

.patient-budget-table th:nth-child(1),
.patient-budget-table td:nth-child(1) {
  width: 72px;
}

.patient-budget-table th:nth-child(2),
.patient-budget-table td:nth-child(2) {
  width: 120px;
}

.patient-budget-table th:nth-child(3),
.patient-budget-table td:nth-child(3) {
  width: 170px;
}

.patient-budget-table th:nth-child(5),
.patient-budget-table td:nth-child(5) {
  width: 130px;
  text-align: right;
}

.patient-budget-table th:nth-child(6),
.patient-budget-table td:nth-child(6) {
  width: 230px;
  text-align: center;
}

.patient-budget-table .budget-list-actions {
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .budget-list-header {
    align-items: stretch;
    flex-direction: column;
  }

  .budget-new-button {
    width: 100%;
  }

  .patient-budget-table {
    table-layout: auto;
  }
}

/* Digital anamnesis center */
.patient-anamnesis-center {
  padding: 17px;
  border: 1px solid #d9e8eb;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 9px 25px rgba(20, 63, 80, .06);
}

.patient-anamnesis-center-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.patient-anamnesis-center-header small {
  display: block;
  color: #7f949c;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.patient-anamnesis-center-header h3 {
  margin: 2px 0 0;
  color: #143d4d;
  font-size: 16px;
  font-weight: 950;
}

.patient-anamnesis-center-header p {
  margin: 3px 0 0;
  color: #748b94;
  font-size: 9px;
  font-weight: 650;
}

.patient-anamnesis-center-header > button {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #12ae9c, #087e91);
  color: #ffffff;
  font-size: 9px;
  font-weight: 950;
  box-shadow: 0 8px 17px rgba(8, 126, 145, .2);
}

.patient-anamnesis-center-header > button svg {
  width: 15px;
  height: 15px;
}

.patient-anamnesis-center-header > button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.patient-anamnesis-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 15px;
}

.patient-anamnesis-metrics article {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e0ebed;
  border-radius: 13px;
  background: #f9fcfc;
}

.patient-anamnesis-metrics article > span {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
}

.patient-anamnesis-metrics article > span svg {
  width: 19px;
  height: 19px;
}

.patient-anamnesis-metrics .is-total { background: #e9f7fa; color: #12849a; }
.patient-anamnesis-metrics .is-waiting { background: #fff4df; color: #ab7014; }
.patient-anamnesis-metrics .is-progress { background: #edf0ff; color: #655fc1; }
.patient-anamnesis-metrics .is-signed { background: #e7f8ed; color: #16834d; }
.patient-anamnesis-metrics small { display: block; color: #80949c; font-size: 7px; font-weight: 900; text-transform: uppercase; }
.patient-anamnesis-metrics strong { display: block; margin-top: 2px; color: #183f4e; font-size: 17px; font-weight: 950; }

.patient-anamnesis-document-list {
  display: grid;
  gap: 11px;
  margin-top: 14px;
}

.patient-anamnesis-empty {
  min-height: 155px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 1px dashed #cadde1;
  border-radius: 15px;
  background: #f8fbfc;
  color: #8da1a9;
  text-align: center;
}

.patient-anamnesis-empty svg { width: 38px; height: 38px; margin-bottom: 3px; }
.patient-anamnesis-empty strong { color: #58747f; font-size: 11px; font-weight: 900; }
.patient-anamnesis-empty span { font-size: 8px; font-weight: 650; }

.patient-anamnesis-document-card {
  overflow: hidden;
  border: 1px solid #dce9ec;
  border-left: 4px solid #55aeb3;
  border-radius: 15px;
  background: #ffffff;
  box-shadow: 0 7px 19px rgba(20, 65, 80, .06);
}

.patient-anamnesis-document-card.is-signed { border-left-color: #25a66a; }
.patient-anamnesis-document-card.is-progress,
.patient-anamnesis-document-card.is-completed { border-left-color: #7069c4; }
.patient-anamnesis-document-card.is-expired { border-left-color: #c55a65; }

.patient-anamnesis-document-card > header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
}

.patient-anamnesis-document-icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #e9f7f7;
  color: #0c9293;
}

.patient-anamnesis-document-icon svg { width: 21px; height: 21px; }
.patient-anamnesis-document-card > header small { display: block; color: #81969e; font-size: 7px; font-weight: 950; letter-spacing: .07em; }
.patient-anamnesis-document-card h4 { margin: 2px 0 0; color: #163f50; font-size: 12px; font-weight: 950; }
.patient-anamnesis-document-card > header p { margin: 3px 0 0; color: #7a8f97; font-size: 8px; }
.patient-anamnesis-document-card > header > b { padding: 6px 8px; border-radius: 999px; background: #eaf5f7; color: #247d8d; font-size: 7px; font-weight: 950; text-transform: uppercase; }
.patient-anamnesis-document-card.is-signed > header > b { background: #e7f8ed; color: #16834d; }
.patient-anamnesis-document-card.is-progress > header > b,
.patient-anamnesis-document-card.is-completed > header > b { background: #eeefff; color: #645eb6; }
.patient-anamnesis-document-card.is-expired > header > b { background: #ffecee; color: #be4552; }

.patient-anamnesis-timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 13px 15px;
  border-top: 1px solid #edf2f3;
  border-bottom: 1px solid #edf2f3;
  background: #fbfdfd;
}

.patient-anamnesis-timeline > span {
  min-width: 0;
  position: relative;
  display: grid;
  justify-items: center;
  gap: 3px;
  color: #97a8ae;
  text-align: center;
}

.patient-anamnesis-timeline > span:not(:last-child)::after {
  content: "";
  width: calc(100% - 30px);
  height: 2px;
  position: absolute;
  z-index: 0;
  top: 12px;
  left: calc(50% + 15px);
  background: #dce6e8;
}

.patient-anamnesis-timeline > span.is-complete:not(:last-child)::after { background: #44b89c; }
.patient-anamnesis-timeline i {
  width: 25px;
  height: 25px;
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  border: 2px solid #d7e3e5;
  border-radius: 50%;
  background: #ffffff;
  color: #91a3aa;
  font-size: 8px;
  font-style: normal;
  font-weight: 950;
}

.patient-anamnesis-timeline .is-complete i { border-color: #2faf8a; background: #2faf8a; color: #fff; }
.patient-anamnesis-timeline .is-current i { border-color: #6670bd; color: #6670bd; box-shadow: 0 0 0 4px rgba(102, 112, 189, .1); }
.patient-anamnesis-timeline b { overflow: hidden; font-size: 7px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.patient-anamnesis-timeline small { overflow: hidden; font-size: 6px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.patient-anamnesis-timeline .is-complete b { color: #247d69; }
.patient-anamnesis-timeline .is-current b { color: #5f68ad; }

.patient-anamnesis-final-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 13px 14px;
  border-top: 1px solid #edf2f3;
  border-bottom: 1px solid #edf2f3;
  background: linear-gradient(135deg, #fbfefd, #f2faf6);
}

.patient-anamnesis-final-summary article {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #d9ebe1;
  border-radius: 11px;
  background: #ffffff;
}

.patient-anamnesis-final-summary article > span {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #e4f6eb;
  color: #178a55;
}

.patient-anamnesis-final-summary svg { width: 16px; height: 16px; }
.patient-anamnesis-final-summary small { display: block; color: #80958c; font-size: 6px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.patient-anamnesis-final-summary strong { display: block; overflow: hidden; margin-top: 2px; color: #255443; font-size: 8px; font-weight: 900; line-height: 1.35; text-overflow: ellipsis; }

.patient-anamnesis-document-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
}

.patient-anamnesis-document-card > footer > div:first-child span,
.patient-anamnesis-document-card > footer > div:first-child small { color: #83979e; font-size: 7px; font-weight: 750; }
.patient-anamnesis-document-card > footer > div:first-child strong { margin: 0 7px; color: #173f4f; font-size: 12px; font-weight: 950; }
.patient-anamnesis-document-card > footer.is-finalized { background: #fbfefd; }
.patient-anamnesis-final-note { display: grid; gap: 2px; }
.patient-anamnesis-final-note span { color: #168653 !important; font-size: 7px !important; font-weight: 950 !important; text-transform: uppercase; }
.patient-anamnesis-final-note strong { margin: 0 !important; color: #244e3e !important; font-size: 9px !important; }
.patient-anamnesis-final-note small { color: #7c9289 !important; font-size: 7px !important; }
.patient-anamnesis-document-actions { display: flex; gap: 6px; }
.patient-anamnesis-document-actions button {
  min-height: 33px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid #d8e5e8;
  border-radius: 9px;
  background: #ffffff;
  color: #426975;
  font-size: 8px;
  font-weight: 850;
}
.patient-anamnesis-document-actions button:hover { border-color: #9bcfd0; background: #f4fbfb; }
.patient-anamnesis-document-actions button.is-whatsapp { border-color: #bce9ce; background: #effbf4; color: #13844d; }
.patient-anamnesis-document-actions button.is-download { border-color: #acdcca; background: #eaf8f1; color: #147d50; }
.patient-anamnesis-document-actions button:disabled { cursor: not-allowed; opacity: .42; }
.patient-anamnesis-document-actions svg { width: 14px; height: 14px; }

.patient-anamnesis-dialog,
.patient-anamnesis-document-dialog {
  width: min(720px, calc(100% - 28px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(17, 48, 61, .28);
}

.patient-anamnesis-dialog::backdrop,
.patient-anamnesis-document-dialog::backdrop {
  background: rgba(15, 38, 49, .58);
  backdrop-filter: blur(3px);
}

.patient-anamnesis-dialog form > header,
.patient-anamnesis-document-shell > header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 17px 19px;
  border-bottom: 1px solid #e6edef;
}

.patient-anamnesis-dialog form > header > span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #e8f7f6;
  color: #0c918e;
}

.patient-anamnesis-dialog form > header svg { width: 21px; height: 21px; }
.patient-anamnesis-dialog form > header div,
.patient-anamnesis-document-shell > header div { min-width: 0; }
.patient-anamnesis-dialog form > header small,
.patient-anamnesis-document-shell > header small { display: block; color: #82969e; font-size: 8px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.patient-anamnesis-dialog form > header h2,
.patient-anamnesis-document-shell > header h2 { margin: 2px 0 0; color: #173f4f; font-size: 17px; font-weight: 950; }
.patient-anamnesis-dialog form > header p,
.patient-anamnesis-document-shell > header p { margin: 3px 0 0; color: #798e96; font-size: 9px; }
.patient-anamnesis-dialog form > header > button,
.patient-anamnesis-document-shell > header > button { width: 34px; height: 34px; margin-left: auto; border: 0; border-radius: 10px; background: #f0f5f6; color: #698089; font-size: 19px; }

.patient-anamnesis-dialog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  padding: 17px 19px;
}

.patient-anamnesis-dialog-grid label { display: grid; gap: 6px; }
.patient-anamnesis-dialog-grid label > span { color: #55717b; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.patient-anamnesis-dialog-grid input,
.patient-anamnesis-dialog-grid select { width: 100%; min-height: 41px; padding: 0 10px; border: 1px solid #d7e5e8; border-radius: 11px; outline: none; background: #fbfdfd; color: #244c5a; font-size: 10px; }
.patient-anamnesis-dialog-grid input:focus,
.patient-anamnesis-dialog-grid select:focus { border-color: #4cb3b3; box-shadow: 0 0 0 3px rgba(33, 166, 164, .1); }
.patient-anamnesis-dialog-summary { display: flex; align-items: center; gap: 10px; margin: 0 19px 17px; padding: 11px 12px; border-radius: 12px; background: #edf8f6; color: #277566; }
.patient-anamnesis-dialog-summary svg { width: 22px; height: 22px; flex: 0 0 auto; }
.patient-anamnesis-dialog-summary strong { display: block; font-size: 9px; font-weight: 950; }
.patient-anamnesis-dialog-summary small { display: block; margin-top: 2px; font-size: 8px; line-height: 1.4; }
.patient-anamnesis-dialog form > footer,
.patient-anamnesis-document-shell > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 19px; border-top: 1px solid #e6edef; background: #fafcfc; }
.patient-anamnesis-dialog form > footer button,
.patient-anamnesis-document-shell > footer button { min-height: 37px; padding: 0 13px; border: 1px solid #d7e4e7; border-radius: 10px; background: #fff; color: #56717b; font-size: 9px; font-weight: 900; }
.patient-anamnesis-dialog form > footer button.is-primary { display: inline-flex; align-items: center; gap: 6px; border: 0; background: linear-gradient(135deg, #12ae9c, #087e91); color: #fff; }
.patient-anamnesis-dialog form > footer button svg { width: 14px; height: 14px; }

.patient-anamnesis-document-dialog { width: min(900px, calc(100% - 28px)); }
#patientAnamnesisDocumentBody { display: grid; gap: 13px; padding: 17px 19px; background: #f4f8f9; }
.patient-anamnesis-document-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.patient-anamnesis-document-summary div { padding: 10px; border: 1px solid #dce8eb; border-radius: 11px; background: #fff; }
.patient-anamnesis-document-summary small { display: block; color: #83969e; font-size: 7px; font-weight: 900; text-transform: uppercase; }
.patient-anamnesis-document-summary strong { display: block; margin-top: 3px; color: #214958; font-size: 9px; font-weight: 900; }
.patient-anamnesis-answer-sheet { display: grid; gap: 7px; }
.patient-anamnesis-answer-sheet article { display: flex; gap: 9px; padding: 10px 11px; border: 1px solid #dce8ea; border-radius: 11px; background: #fff; }
.patient-anamnesis-answer-sheet article > span { width: 24px; height: 24px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; background: #e9f7f6; color: #0c8c8c; font-size: 8px; font-weight: 950; }
.patient-anamnesis-answer-sheet strong { color: #284e5b; font-size: 9px; font-weight: 900; }
.patient-anamnesis-answer-sheet p { margin: 3px 0 0; color: #5b747e; font-size: 9px; font-weight: 750; }
.patient-anamnesis-answer-sheet small { display: block; margin-top: 3px; color: #7e9199; font-size: 8px; white-space: pre-wrap; }
.patient-anamnesis-evidence { padding: 13px; border: 1px solid #dbe7e9; border-radius: 13px; background: #fff; }
.patient-anamnesis-evidence > header { display: flex; align-items: center; gap: 9px; }
.patient-anamnesis-evidence > header svg { width: 27px; height: 27px; color: #82969e; }
.patient-anamnesis-evidence.is-signed > header svg { color: #15905a; }
.patient-anamnesis-evidence > header small { display: block; color: #83969e; font-size: 7px; font-weight: 900; text-transform: uppercase; }
.patient-anamnesis-evidence > header strong { display: block; margin-top: 2px; color: #234b59; font-size: 10px; }
.patient-anamnesis-evidence > div { margin-top: 10px; padding-top: 10px; border-top: 1px solid #e9eff0; }
.patient-anamnesis-evidence p { margin: 3px 0; color: #607983; font-size: 8px; line-height: 1.45; overflow-wrap: anywhere; }
.patient-anamnesis-evidence img { width: min(360px, 100%); max-height: 120px; margin-top: 9px; object-fit: contain; border: 1px solid #dce7e9; border-radius: 10px; background: #fff; }
.patient-anamnesis-evidence-media { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.patient-anamnesis-evidence-media figure { min-width: 0; display: grid; align-content: start; justify-items: center; gap: 6px; margin: 0; padding: 10px; border: 1px solid #d9e8e2; border-radius: 12px; background: #f8fcfa; }
.patient-anamnesis-evidence-media img { width: 100%; height: 160px; max-height: 160px; margin: 0; object-fit: contain; }
.patient-anamnesis-evidence-media img.is-face { object-fit: cover; }
.patient-anamnesis-evidence-media figcaption { color: #5f7c70; font-size: 7px; font-weight: 850; text-align: center; }
.patient-anamnesis-evidence-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.patient-anamnesis-evidence-grid article { min-width: 0; padding: 9px 10px; border: 1px solid #e0eaec; border-radius: 10px; background: #fbfdfd; }
.patient-anamnesis-evidence-grid small,
.patient-anamnesis-evidence-hash small { display: block; color: #82969d; font-size: 6px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.patient-anamnesis-evidence-grid strong,
.patient-anamnesis-evidence-hash strong { display: block; margin-top: 3px; color: #2b5260; font-size: 8px; line-height: 1.4; overflow-wrap: anywhere; }
.patient-anamnesis-evidence-hash { padding: 9px 10px; border: 1px dashed #cbdedf; border-radius: 10px; background: #f5f9fa; }

.patient-document-filter-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 13px;
  padding: 10px 12px;
  border: 1px solid #e0eaec;
  border-radius: 13px;
  background: #f8fbfc;
}

.patient-document-filter-bar label { display: grid; gap: 5px; }
.patient-document-filter-bar label > span { color: #66808a; font-size: 7px; font-weight: 950; letter-spacing: .05em; text-transform: uppercase; }
.patient-document-filter-bar select { min-width: 250px; min-height: 37px; padding: 0 10px; border: 1px solid #d2e2e5; border-radius: 10px; outline: none; background: #fff; color: #244b59; font-size: 9px; font-weight: 800; }
.patient-document-filter-bar select:focus { border-color: #49b1b1; box-shadow: 0 0 0 3px rgba(28, 161, 159, .1); }
.patient-document-filter-bar > small { color: #81949b; font-size: 8px; line-height: 1.4; }

.patient-document-create-progress {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 15px 19px 0;
}

.patient-document-create-progress > span {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 11px;
  border-bottom: 3px solid #e2eaec;
  color: #91a2a8;
}

.patient-document-create-progress i { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #e8eff0; font-size: 8px; font-style: normal; font-weight: 950; }
.patient-document-create-progress b { font-size: 8px; font-weight: 900; }
.patient-document-create-progress > span.is-active { border-bottom-color: #11a39d; color: #0c8784; }
.patient-document-create-progress > span.is-active i,
.patient-document-create-progress > span.is-complete i { background: #12a99f; color: #fff; }
.patient-document-create-progress > span.is-complete { border-bottom-color: #8fd4cb; color: #4f8f87; }

.patient-document-create-step[hidden] { display: none !important; }
.patient-anamnesis-dialog footer button[hidden],
.patient-anamnesis-document-dialog footer button[hidden] { display: none !important; }
.patient-document-type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 16px 19px 0; }
.patient-document-type-grid label { position: relative; cursor: pointer; }
.patient-document-type-grid input { position: absolute; opacity: 0; pointer-events: none; }
.patient-document-type-grid label > span { min-height: 104px; display: grid; align-content: center; justify-items: start; gap: 4px; padding: 14px; border: 1px solid #d8e5e7; border-radius: 14px; background: #fafcfc; color: #728990; transition: .16s ease; }
.patient-document-type-grid svg { width: 25px; height: 25px; margin-bottom: 4px; }
.patient-document-type-grid b { color: #294f5c; font-size: 10px; font-weight: 950; }
.patient-document-type-grid small { font-size: 8px; line-height: 1.4; }
.patient-document-type-grid em { margin-top: 4px; padding: 4px 7px; border-radius: 999px; background: #e7f2f4; color: #557783; font-size: 6px; font-style: normal; font-weight: 900; text-transform: uppercase; }
.patient-document-type-grid input:checked + span { border-color: #32aaa5; background: #eaf8f6; color: #147f7b; box-shadow: inset 0 0 0 1px #32aaa5, 0 7px 18px rgba(23, 137, 133, .09); }
.patient-document-template-empty { grid-column: 1 / -1; display: grid; gap: 4px; padding: 18px; border: 1px dashed #cadcdf; border-radius: 14px; background: #f7fafb; text-align: center; }
.patient-document-template-empty strong { color: #365966; font-size: 10px; }
.patient-document-template-empty span { color: #7d929a; font-size: 8px; }

.patient-document-signers-heading { padding: 17px 19px 9px; }
.patient-document-signers-heading > small { color: #0c918c; font-size: 7px; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.patient-document-signers-heading h3 { margin: 3px 0 0; color: #173f4f; font-size: 15px; font-weight: 950; }
.patient-document-signers-heading p { margin: 4px 0 0; color: #7a8f96; font-size: 9px; }
.patient-document-signer-options { display: grid; gap: 8px; padding: 0 19px 15px; }
.patient-document-signer-options label { position: relative; cursor: pointer; }
.patient-document-signer-options label.is-disabled { cursor: not-allowed; opacity: .52; }
.patient-document-signer-options input { position: absolute; opacity: 0; pointer-events: none; }
.patient-document-signer-options label > span { min-height: 62px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; column-gap: 10px; padding: 10px 12px; border: 1px solid #dce7e9; border-radius: 13px; background: #fbfdfd; }
.patient-document-signer-options i { width: 36px; height: 36px; grid-row: 1 / 3; display: grid; place-items: center; border-radius: 11px; background: #edf4f5; color: #66818a; }
.patient-document-signer-options svg { width: 19px; height: 19px; }
.patient-document-signer-options b { align-self: end; color: #274e5b; font-size: 10px; font-weight: 950; }
.patient-document-signer-options small { align-self: start; color: #81949b; font-size: 8px; }
.patient-document-signer-options em { width: 24px; height: 24px; grid-column: 3; grid-row: 1 / 3; display: grid; place-items: center; border: 2px solid #d4e1e3; border-radius: 8px; color: transparent; font-size: 10px; font-style: normal; font-weight: 950; }
.patient-document-signer-options input:checked + span { border-color: #3cb0a9; background: #edf9f7; }
.patient-document-signer-options input:checked + span i { background: #d9f3ee; color: #0f8e83; }
.patient-document-signer-options input:checked + span em { border-color: #17a496; background: #17a496; color: #fff; }

.patient-document-editor { overflow: hidden; border: 1px solid #dce8ea; border-radius: 14px; background: #fff; }
.patient-document-editor > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border-bottom: 1px solid #e9eff0; background: linear-gradient(135deg, #f8fcfc, #edf8f7); }
.patient-document-editor > header small { display: block; color: #0f8f8b; font-size: 7px; font-weight: 950; letter-spacing: .07em; text-transform: uppercase; }
.patient-document-editor > header h3 { margin: 2px 0 0; color: #1b4553; font-size: 13px; font-weight: 950; }
.patient-document-editor > header p { margin: 3px 0 0; color: #718991; font-size: 8px; }
.patient-document-editor > header > span { padding: 5px 8px; border-radius: 999px; background: #e3f4f1; color: #117f78; font-size: 7px; font-weight: 950; }
.patient-document-editor > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px; }
.patient-document-editor-field { min-width: 0; padding: 11px; border: 1px solid #e0e9eb; border-radius: 11px; background: #fcfefe; }
.patient-document-editor-field:has(textarea) { grid-column: 1 / -1; }
.patient-document-editor-field > header { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 9px; }
.patient-document-editor-field > header > span { width: 23px; height: 23px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 7px; background: #e7f6f4; color: #0e8d87; font-size: 7px; font-weight: 950; }
.patient-document-editor-field > header strong { display: block; color: #294e5b; font-size: 9px; line-height: 1.35; }
.patient-document-editor-field > header small { display: block; margin-top: 2px; color: #8a9ba1; font-size: 7px; }
.patient-document-editor-field > input,
.patient-document-editor-field > select,
.patient-document-editor-field > textarea { width: 100%; min-height: 39px; padding: 0 10px; border: 1px solid #d5e3e5; border-radius: 9px; outline: none; background: #fff; color: #294f5c; font-size: 9px; }
.patient-document-editor-field > textarea { min-height: 80px; padding: 9px 10px; resize: vertical; line-height: 1.45; }
.patient-document-editor-field > input:focus,
.patient-document-editor-field > select:focus,
.patient-document-editor-field > textarea:focus { border-color: #42afac; box-shadow: 0 0 0 3px rgba(34, 158, 156, .1); }
.patient-document-editor-field [disabled] { cursor: not-allowed; opacity: .72; background: #f2f6f7; }
.patient-document-editor-field textarea[hidden] { display: none !important; }
.patient-document-editor-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.patient-document-editor-options label { position: relative; cursor: pointer; }
.patient-document-editor-options input { position: absolute; opacity: 0; pointer-events: none; }
.patient-document-editor-options span { min-height: 37px; display: grid; place-items: center; border: 1px solid #d7e4e6; border-radius: 9px; background: #fff; color: #66808a; font-size: 8px; font-weight: 900; }
.patient-document-editor-options input:checked + span { border-color: #35aaa5; background: #e8f8f5; color: #0d817b; box-shadow: inset 0 0 0 1px #35aaa5; }

.patient-document-signers { overflow: hidden; border: 1px solid #dce8ea; border-radius: 14px; background: #fff; }
.patient-document-signers > header { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; border-bottom: 1px solid #e9eff0; }
.patient-document-signers > header small { color: #7b9199; font-size: 7px; font-weight: 950; letter-spacing: .07em; text-transform: uppercase; }
.patient-document-signers > header strong { color: #2b5664; font-size: 8px; }
.patient-document-signers > div { display: grid; gap: 7px; padding: 9px; }
.patient-document-signers article { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid #e1eaec; border-radius: 10px; background: #fbfdfd; }
.patient-document-signers article > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: #edf3f4; color: #71878f; }
.patient-document-signers article svg { width: 17px; height: 17px; }
.patient-document-signers article small { display: block; color: #84979e; font-size: 6px; font-weight: 900; text-transform: uppercase; }
.patient-document-signers article strong { display: block; margin-top: 1px; color: #284e5b; font-size: 9px; }
.patient-document-signers article p { margin: 2px 0 0; color: #84969c; font-size: 7px; }
.patient-document-signers article > b { padding: 5px 7px; border-radius: 999px; background: #fff2df; color: #a86d19; font-size: 6px; text-transform: uppercase; }
.patient-document-signers article.is-signed { border-color: #cfe9da; background: #f3fbf6; }
.patient-document-signers article.is-signed > span { background: #def4e7; color: #168653; }
.patient-document-signers article.is-signed > b { background: #dff5e8; color: #168653; }

.patient-anamnesis-document-shell > footer { position: sticky; z-index: 2; bottom: 0; }
.patient-anamnesis-document-shell > footer button.is-primary { display: inline-flex; align-items: center; gap: 6px; border: 0; background: linear-gradient(135deg, #12ae9c, #087e91); color: #fff; }
.patient-anamnesis-document-shell > footer button.is-professional { border-color: #cbd2ed; background: #f2f3ff; color: #5c62aa; }
.patient-anamnesis-document-shell > footer button[data-download-patient-anamnesis-pdf]:not([hidden]) { display: inline-flex; align-items: center; gap: 6px; border-color: #acdcca; background: #eaf8f1; color: #147d50; }
.patient-anamnesis-document-shell > footer button svg { width: 14px; height: 14px; }

@media (max-width: 820px) {
  .patient-anamnesis-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .patient-anamnesis-document-card > footer { align-items: stretch; flex-direction: column; }
  .patient-anamnesis-document-actions { flex-wrap: wrap; }
  .patient-anamnesis-document-actions button { flex: 1 1 130px; }
  .patient-anamnesis-final-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .patient-anamnesis-document-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .patient-document-editor > div { grid-template-columns: 1fr; }
  .patient-document-editor-field:has(textarea) { grid-column: auto; }
  .patient-anamnesis-evidence-media,
  .patient-anamnesis-evidence-grid { grid-template-columns: 1fr; }
  .patient-anamnesis-document-shell > footer { flex-wrap: wrap; }
  .patient-anamnesis-document-shell > footer button { flex: 1 1 150px; }
}

@media (max-width: 620px) {
  .patient-anamnesis-center-header { align-items: stretch; flex-direction: column; }
  .patient-anamnesis-center-header > button { width: 100%; }
  .patient-anamnesis-document-card > header { grid-template-columns: auto minmax(0, 1fr); }
  .patient-anamnesis-document-card > header > b { grid-column: 2; justify-self: start; }
  .patient-anamnesis-final-summary { grid-template-columns: 1fr; }
  .patient-anamnesis-timeline { grid-template-columns: 1fr; gap: 7px; }
  .patient-anamnesis-timeline > span { grid-template-columns: 28px 1fr auto; justify-items: start; align-items: center; text-align: left; }
  .patient-anamnesis-timeline > span:not(:last-child)::after { width: 2px; height: 17px; top: 25px; left: 12px; }
  .patient-anamnesis-dialog-grid,
  .patient-anamnesis-document-summary { grid-template-columns: 1fr; }
  .patient-document-filter-bar { align-items: stretch; flex-direction: column; }
  .patient-document-filter-bar select { width: 100%; min-width: 0; }
  .patient-document-type-grid { grid-template-columns: 1fr; }
  .patient-document-create-progress b { font-size: 7px; }
}

/* Balões de atendimento do procedimento - identidade Tec Dent */
.procedure-attendance-dialog,
.procedure-attendance-detail-dialog {
  border-radius: 18px;
}

.procedure-attendance-dialog::backdrop,
.procedure-attendance-detail-dialog::backdrop {
  background: rgba(3,27,46,.62);
  backdrop-filter: blur(3px);
}

.procedure-attendance-panel,
.procedure-attendance-detail-panel {
  overflow: hidden;
  border: 1px solid #d8e8ed;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(2,30,50,.32);
}

.procedure-attendance-header,
.procedure-attendance-detail-header {
  min-height: 82px;
  padding: 12px 17px 12px 22px;
  border: 0;
  background: linear-gradient(115deg, #063b69 0%, #087ab0 58%, #12b9b0 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.procedure-attendance-header::after,
.procedure-attendance-detail-header::after {
  content: "";
  width: 150px;
  height: 150px;
  position: absolute;
  right: 68px;
  top: -105px;
  border: 23px solid rgba(255,255,255,.08);
  border-radius: 50%;
}

.procedure-attendance-header > div,
.procedure-attendance-header > button,
.procedure-attendance-detail-header > div,
.procedure-attendance-detail-header > button {
  position: relative;
  z-index: 1;
}

.procedure-attendance-header span,
.procedure-attendance-detail-header span {
  color: #9ff4e8;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
}

.procedure-attendance-header h2,
.procedure-attendance-detail-header h2 {
  margin: 2px 0 0;
  color: #ffffff;
  font-size: 20px;
  font-weight: 850;
}

.procedure-attendance-header button,
.procedure-attendance-detail-header button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 11px;
  background: rgba(255,255,255,.15);
  color: #ffffff;
  font-size: 24px;
  backdrop-filter: blur(8px);
}

.procedure-attendance-tabs {
  gap: 7px;
  padding: 12px 18px;
  border: 0;
  background: #f5fafb;
}

.procedure-attendance-tabs button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #d3e4e9;
  border-radius: 10px;
  background: #ffffff;
  color: #567181;
  font-size: 11px;
  font-weight: 850;
}

.procedure-attendance-tabs button.is-active {
  border-color: #9edfd5;
  background: #eaf9f6;
  color: #087b6b;
  box-shadow: none;
}

.procedure-attendance-status {
  width: calc(100% - 36px);
  min-height: 58px;
  margin: 14px auto 12px;
  padding: 6px 16px 6px 8px;
  border-radius: 13px;
  box-shadow: none;
}

.procedure-attendance-status-icon {
  width: 44px;
  height: 44px;
}

.procedure-attendance-status-icon svg {
  width: 42px;
  height: 42px;
}

.procedure-attendance-summary {
  gap: 12px;
  padding: 0 18px 16px;
}

.procedure-attendance-summary > label,
.procedure-attendance-flow {
  padding: 12px;
  border: 1px solid #dce9ed;
  border-radius: 13px;
  background: #f8fbfc;
}

.procedure-attendance-summary span {
  color: #607684;
  font-size: 9px;
  letter-spacing: .06em;
}

.procedure-attendance-summary strong,
.procedure-attendance-summary input,
.procedure-attendance-summary textarea {
  min-height: 42px;
  border-color: #cfdee4;
  border-radius: 10px;
  background: #ffffff;
  color: #123a52;
}

.procedure-attendance-flow {
  grid-template-columns: 180px minmax(0,1fr);
  gap: 12px;
}

.procedure-attendance-flow > label {
  padding: 0;
  border: 0;
  background: transparent;
}

.procedure-attendance-switch {
  min-height: 42px;
  border-radius: 11px;
  box-shadow: none;
}

.procedure-attendance-switch i {
  top: 7px;
}

.procedure-attendance-note textarea {
  min-height: 72px;
  border-radius: 10px;
  background: #ffffff;
}

.procedure-attendance-actions {
  gap: 8px;
  padding: 14px 18px 17px;
  border-bottom: 0;
  background: #fbfdfd;
}

.procedure-attendance-actions button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  box-shadow: none;
}

.procedure-attendance-actions .save-action {
  background: linear-gradient(110deg, #0878b0, #12ad9e);
}

.procedure-attendance-actions .green-action {
  border: 1px solid #cfe1e6;
  background: #ffffff;
  color: #567181;
}

.procedure-attendance-history {
  padding: 15px 18px 20px;
}

.procedure-attendance-history-header {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dfebee;
}

.procedure-attendance-history-header h3 {
  color: #083b65;
  font-size: 17px;
  font-weight: 850;
}

.procedure-attendance-history-header button {
  min-height: 38px;
  border-radius: 10px;
  box-shadow: none;
}

.procedure-attendance-loose-list {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.procedure-attendance-list-head {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  background: #f3f8fa;
  color: #6a7e8b;
  font-size: 9px;
  letter-spacing: .06em;
}

.procedure-attendance-list-row {
  min-height: 64px;
  margin-top: 7px;
  padding: 9px 12px;
  border: 1px solid #dce9ed;
  border-radius: 12px;
  background: #ffffff;
}

.procedure-attendance-list-row:nth-child(odd) {
  background: #f8fbfc;
}

.procedure-attendance-list-row.is-repeat,
.procedure-attendance-list-row.is-repeat:nth-child(odd) {
  border-color: #efcccc;
  border-left: 4px solid #d94a4a;
  background: #fffafa;
}

.attendance-view-button {
  min-height: 34px;
  border-radius: 10px;
  background: #eaf9f6;
  color: #087b6b;
  box-shadow: none;
}

.attendance-trash-button {
  border-color: #efcccc;
  border-radius: 10px;
  background: #fff2f2;
  color: #bd3e3e;
}

.procedure-attendance-empty {
  border-color: #cfe1e6;
  border-radius: 12px;
  background: #f8fbfc;
}

.procedure-attendance-detail-body {
  padding: 16px 18px;
}

.procedure-attendance-detail-grid div {
  border-color: #dce9ed;
  border-radius: 11px;
  background: #f8fbfc;
}

.procedure-attendance-detail-footer {
  padding: 13px 18px 17px;
  background: #fbfdfd;
}

.procedure-attendance-detail-footer button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #cfe1e6;
  border-radius: 10px;
  background: #ffffff;
  color: #567181;
}

@media (max-width: 720px) {
  .procedure-attendance-summary,
  .procedure-attendance-flow,
  .procedure-attendance-detail-grid {
    grid-template-columns: 1fr;
  }

  .procedure-attendance-summary .procedure-attendance-full,
  .procedure-attendance-flow,
  .procedure-attendance-detail-grid .is-wide {
    grid-column: auto;
  }

  .procedure-attendance-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .procedure-attendance-actions button {
    width: 100%;
  }

  .procedure-attendance-list-head {
    display: none;
  }

  .procedure-attendance-list-row {
    grid-template-columns: 1fr 1fr;
  }

  .attendance-row-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

/* Interior do orçamento - identidade Tec Dent */
[data-view-panel="Cadastro"] .budget-detail-view {
  gap: 14px;
}

[data-view-panel="Cadastro"] .budget-detail-header {
  min-height: 92px;
  padding: 14px 18px 14px 22px;
  border: 0;
  border-radius: 17px;
  background: linear-gradient(115deg, #063b69 0%, #087ab0 58%, #12b9b0 100%);
  box-shadow: 0 12px 28px rgba(5,63,105,.17);
  position: relative;
  overflow: hidden;
}

[data-view-panel="Cadastro"] .budget-detail-header::after {
  content: "";
  width: 165px;
  height: 165px;
  position: absolute;
  right: 88px;
  top: -112px;
  border: 25px solid rgba(255,255,255,.08);
  border-radius: 50%;
}

[data-view-panel="Cadastro"] .budget-detail-header > div {
  position: relative;
  z-index: 1;
}

[data-view-panel="Cadastro"] .budget-detail-header span {
  color: #9ff4e8;
  font-size: 9px;
  letter-spacing: .12em;
}

[data-view-panel="Cadastro"] .budget-detail-header h2,
[data-view-panel="Cadastro"] .budget-detail-header h2 b {
  color: #ffffff;
}

[data-view-panel="Cadastro"] .budget-detail-header h2 {
  font-size: 24px;
}

[data-view-panel="Cadastro"] .budget-detail-actions {
  position: relative;
  z-index: 1;
}

[data-view-panel="Cadastro"] .budget-detail-actions button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.27);
  border-radius: 11px;
  box-shadow: none;
}

[data-view-panel="Cadastro"] .budget-light-action {
  background: rgba(255,255,255,.13);
}

[data-view-panel="Cadastro"] .budget-pay-action {
  border-color: rgba(255,255,255,.45);
  background: #effcf7;
  color: #08765f;
}

[data-view-panel="Cadastro"] .budget-save-action {
  background: rgba(255,255,255,.22);
}

[data-view-panel="Cadastro"] .budget-detail-info-card,
[data-view-panel="Cadastro"] .budget-procedure-panel {
  margin: 0;
  padding: 16px;
  border: 1px solid #dce9ed;
  border-radius: 15px;
  background: #fbfdfd;
  box-shadow: none;
}

[data-view-panel="Cadastro"] .budget-detail-info-card > h3,
[data-view-panel="Cadastro"] .procedure-title h2 {
  min-height: 39px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0 0 10px;
  border-bottom: 1px solid #dfebee;
  color: #083b65;
  font-size: 17px;
  font-weight: 850;
}

[data-view-panel="Cadastro"] .budget-detail-info-card > h3 span,
[data-view-panel="Cadastro"] .budget-section-emoji {
  width: 29px;
  height: 29px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #cce7e3;
  border-radius: 9px;
  background: #eaf9f6;
  font-size: 15px;
  line-height: 1;
}

[data-view-panel="Cadastro"] .budget-detail-form-grid {
  grid-template-columns: repeat(12,minmax(0,1fr));
  gap: 13px 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

[data-view-panel="Cadastro"] .budget-detail-form-grid label {
  gap: 5px;
  color: #607684;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

[data-view-panel="Cadastro"] .budget-detail-form-grid input,
[data-view-panel="Cadastro"] .budget-detail-form-grid select,
[data-view-panel="Cadastro"] .budget-detail-form-grid textarea {
  min-height: 42px;
  border: 1px solid #cfdee4;
  border-radius: 10px;
  background: #ffffff;
  color: #123a52;
}

[data-view-panel="Cadastro"] .budget-detail-form-grid textarea {
  min-height: 42px;
  height: 42px;
  resize: vertical;
}

[data-view-panel="Cadastro"] .budget-field-created,
[data-view-panel="Cadastro"] .budget-field-contracted {
  grid-column: span 2;
}

[data-view-panel="Cadastro"] .budget-field-status {
  grid-column: span 3;
}

[data-view-panel="Cadastro"] .budget-field-patient {
  grid-column: span 5;
}

[data-view-panel="Cadastro"] .budget-field-professional,
[data-view-panel="Cadastro"] .budget-field-observation {
  grid-column: span 6;
}

[data-view-panel="Cadastro"] .budget-contract-panel {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 16px;
  border: 1px solid #d4e7ea;
  border-radius: 15px;
  background:
    radial-gradient(circle at 95% 0, rgba(13, 175, 167, .08), transparent 29%),
    #fbfdfd;
}

[data-view-panel="Cadastro"] .budget-contract-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 13px;
  border-bottom: 1px solid #dfebee;
}

[data-view-panel="Cadastro"] .budget-contract-header > div > span,
.patient-contract-header > div > span {
  color: #0a9b92;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

[data-view-panel="Cadastro"] .budget-contract-header h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 4px 0 2px;
  color: #083b65;
  font-size: 17px;
  font-weight: 900;
}

[data-view-panel="Cadastro"] .budget-contract-header h3 svg {
  width: 28px;
  height: 28px;
  padding: 6px;
  border-radius: 9px;
  color: #0a9b92;
  background: #e7f8f4;
}

[data-view-panel="Cadastro"] .budget-contract-header p {
  margin: 0;
  color: #6b808d;
  font-size: 11px;
  line-height: 1.45;
}

[data-view-panel="Cadastro"] .budget-contract-create-button,
[data-view-panel="Cadastro"] .budget-contract-submit-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 0;
  border-radius: 11px;
  color: #ffffff;
  background: linear-gradient(115deg, #087bb2, #0db19e);
  box-shadow: 0 8px 18px rgba(8, 123, 178, .17);
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

[data-view-panel="Cadastro"] .budget-contract-create-button svg,
[data-view-panel="Cadastro"] .budget-contract-submit-button svg {
  width: 15px;
  height: 15px;
}

[data-view-panel="Cadastro"] .budget-contract-create-button:disabled {
  color: #8aa0aa;
  background: #edf4f5;
  box-shadow: none;
  cursor: not-allowed;
}

[data-view-panel="Cadastro"] .budget-contract-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 11px;
  border: 1px solid #d6eae7;
  border-radius: 12px;
  background: #f0faf8;
}

[data-view-panel="Cadastro"] .budget-contract-summary article {
  min-width: 150px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
  border-radius: 9px;
  background: #ffffff;
}

[data-view-panel="Cadastro"] .budget-contract-summary article span {
  color: #607684;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

[data-view-panel="Cadastro"] .budget-contract-summary article strong {
  color: #078875;
  font-size: 19px;
}

[data-view-panel="Cadastro"] .budget-contract-summary > p {
  margin: 0;
  color: #6b808d;
  font-size: 10px;
  line-height: 1.45;
}

[data-view-panel="Cadastro"] .budget-contract-summary > p strong {
  color: #0b6477;
}

[data-view-panel="Cadastro"] .budget-contract-builder {
  display: grid;
  gap: 14px;
  padding: 15px;
  border: 1px solid #bfe3de;
  border-radius: 14px;
  background: linear-gradient(135deg, #edf9f7, #f3f9fc);
}

[data-view-panel="Cadastro"] .budget-contract-builder.is-hidden {
  display: none;
}

[data-view-panel="Cadastro"] .budget-contract-builder-grid {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(260px, 1.4fr) minmax(210px, 1fr);
  gap: 12px;
}

[data-view-panel="Cadastro"] .budget-contract-builder-grid label {
  display: grid;
  gap: 5px;
  color: #607684;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

[data-view-panel="Cadastro"] .budget-contract-builder-grid input,
[data-view-panel="Cadastro"] .budget-contract-builder-grid select {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid #c8dfe2;
  border-radius: 10px;
  outline: 0;
  color: #123a52;
  background: #ffffff;
  font-size: 11px;
  font-weight: 750;
}

[data-view-panel="Cadastro"] .budget-contract-builder-grid input:focus,
[data-view-panel="Cadastro"] .budget-contract-builder-grid select:focus {
  border-color: #11a89c;
  box-shadow: 0 0 0 3px rgba(17, 168, 156, .11);
}

[data-view-panel="Cadastro"] .budget-contract-procedure-field {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d3e7e6;
  border-radius: 11px;
  background: rgba(255,255,255,.78);
}

[data-view-panel="Cadastro"] .budget-contract-procedure-field.is-hidden {
  display: none;
}

[data-view-panel="Cadastro"] .budget-contract-procedure-field > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

[data-view-panel="Cadastro"] .budget-contract-procedure-field > header strong {
  color: #0b5068;
  font-size: 11px;
}

[data-view-panel="Cadastro"] .budget-contract-procedure-field > header small {
  color: #718793;
  font-size: 9px;
}

[data-view-panel="Cadastro"] .budget-contract-procedure-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

[data-view-panel="Cadastro"] .budget-contract-procedure-options > label {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid #d8e8e9;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
}

[data-view-panel="Cadastro"] .budget-contract-procedure-options input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  accent-color: #0aa392;
}

[data-view-panel="Cadastro"] .budget-contract-procedure-options span {
  display: grid;
  gap: 2px;
}

[data-view-panel="Cadastro"] .budget-contract-procedure-options strong {
  color: #123a52;
  font-size: 10px;
}

[data-view-panel="Cadastro"] .budget-contract-procedure-options small,
[data-view-panel="Cadastro"] .budget-contract-procedure-empty {
  color: #748995;
  font-size: 9px;
}

[data-view-panel="Cadastro"] .budget-contract-builder > footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

[data-view-panel="Cadastro"] .budget-contract-cancel-button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid #cbdde2;
  border-radius: 11px;
  color: #56707e;
  background: #ffffff;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

[data-view-panel="Cadastro"] .budget-contract-list {
  display: grid;
  gap: 9px;
}

[data-view-panel="Cadastro"] .budget-contract-empty,
.patient-contract-empty {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  border: 1px dashed #cbdfe3;
  border-radius: 12px;
  color: #78909a;
  background: rgba(247,251,252,.8);
  text-align: left;
}

[data-view-panel="Cadastro"] .budget-contract-empty svg,
.patient-contract-empty svg {
  width: 32px;
  height: 32px;
  padding: 7px;
  border-radius: 10px;
  color: #0a9b92;
  background: #e7f8f4;
}

[data-view-panel="Cadastro"] .budget-contract-empty div,
.patient-contract-empty div {
  display: grid;
  gap: 3px;
}

[data-view-panel="Cadastro"] .budget-contract-empty strong,
.patient-contract-empty strong {
  color: #31556a;
  font-size: 11px;
}

[data-view-panel="Cadastro"] .budget-contract-empty span,
.patient-contract-empty span {
  font-size: 9px;
  line-height: 1.45;
}

[data-view-panel="Cadastro"] .budget-contract-card,
.patient-contract-card {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #d8e7ea;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 6px 15px rgba(14,52,75,.045);
}

[data-view-panel="Cadastro"] .budget-contract-card-icon,
.patient-contract-card-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #079888;
  background: #e8f8f4;
}

[data-view-panel="Cadastro"] .budget-contract-card-icon svg,
.patient-contract-card-icon svg {
  width: 20px;
  height: 20px;
}

[data-view-panel="Cadastro"] .budget-contract-card-main,
.patient-contract-card-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

[data-view-panel="Cadastro"] .budget-contract-card-title,
.patient-contract-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

[data-view-panel="Cadastro"] .budget-contract-card-title > div,
.patient-contract-card-title > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

[data-view-panel="Cadastro"] .budget-contract-card-title span,
.patient-contract-card-title span {
  color: #0a9b92;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

[data-view-panel="Cadastro"] .budget-contract-card-title strong,
.patient-contract-card-title strong {
  overflow: hidden;
  color: #123a52;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.budget-contract-status {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: #856313;
  background: #fff3cf;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.budget-contract-status.is-ready,
.budget-contract-status.is-pending {
  color: #0a6d8d;
  background: #e7f5fa;
}

.budget-contract-status.is-signed {
  color: #087849;
  background: #e4f7ec;
}

[data-view-panel="Cadastro"] .budget-contract-card-tags,
.patient-contract-card-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

[data-view-panel="Cadastro"] .budget-contract-card-tags > span,
.patient-contract-card-details > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 7px;
  color: #627985;
  background: #f2f7f8;
  font-size: 8px;
}

[data-view-panel="Cadastro"] .budget-contract-card-tags b,
.patient-contract-card-details b {
  color: #285267;
}

.budget-contract-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.budget-contract-card-actions button {
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid #c9dfe3;
  border-radius: 9px;
  color: #0a6987;
  background: #f8fbfc;
  font-size: 8px;
  font-weight: 850;
  cursor: pointer;
}

.budget-contract-card-actions button.is-send {
  color: #087c5a;
  border-color: #bde3d4;
  background: linear-gradient(135deg, #effaf5, #e7f8f2);
  box-shadow: 0 5px 12px rgba(10, 137, 95, .08);
}

.budget-contract-card-actions button svg {
  width: 13px;
  height: 13px;
}

.budget-contract-internal-signature {
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid #cfe5ea;
  border-radius: 9px;
  color: #17647b;
  background: #edf7fa;
  font-size: 8px;
  font-weight: 850;
}

.budget-contract-internal-signature svg {
  width: 13px;
  height: 13px;
}

[data-view-panel="Cadastro"] .budget-contract-remove-button {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border: 1px solid #f0d8dc;
  border-radius: 10px;
  color: #d3485d;
  background: #fff8f9;
  cursor: pointer;
}

[data-view-panel="Cadastro"] .budget-contract-remove-button svg {
  width: 15px;
  height: 15px;
}

.patient-contract-panel {
  display: grid;
  gap: 15px;
  padding: 18px;
  border: 1px solid #d5e7ea;
  background:
    radial-gradient(circle at 96% 0, rgba(13, 175, 167, .09), transparent 30%),
    #f8fbfc;
}

.patient-contract-panel.is-hidden {
  display: none;
}

.patient-contract-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid #d1e5e9;
  border-radius: 15px;
  background: #ffffff;
}

.patient-contract-header h2 {
  margin: 4px 0 3px;
  color: #083b65;
  font-size: 20px;
}

.patient-contract-header p {
  margin: 0;
  color: #6c818d;
  font-size: 10px;
}

.patient-contract-patient {
  min-width: 260px;
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  border: 1px solid #cfe7e3;
  border-radius: 12px;
  background: #f0faf8;
}

.patient-contract-patient small {
  color: #669087;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.patient-contract-patient strong {
  color: #123a52;
  font-size: 11px;
}

.patient-contract-patient span {
  color: #0a9587;
  font-size: 9px;
  font-weight: 800;
}

.patient-contract-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
}

.patient-contract-metrics article {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 10px;
  padding: 12px 14px;
  border: 1px solid #d9e8eb;
  border-radius: 12px;
  background: #ffffff;
}

.patient-contract-metrics small {
  color: #607984;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.patient-contract-metrics strong {
  grid-row: span 2;
  color: #078b78;
  font-size: 23px;
}

.patient-contract-metrics span {
  color: #82939b;
  font-size: 8px;
}

.patient-contract-list {
  display: grid;
  gap: 10px;
}

.patient-contract-open-budget {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid #c7dfe4;
  border-radius: 10px;
  color: #0a6987;
  background: #f7fbfc;
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
}

.patient-contract-open-budget svg {
  width: 12px;
  height: 12px;
}

.patient-contract-card-controls {
  display: grid;
  gap: 7px;
}

.patient-contract-preview-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid #b9ded6;
  border-radius: 10px;
  color: #087b68;
  background: #effaf7;
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
}

.patient-contract-preview-button svg {
  width: 13px;
  height: 13px;
}

.patient-contract-signers {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid #d8e7ea;
  border-radius: 11px;
  background: #f9fbfc;
}

.patient-contract-signers > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.patient-contract-signers > header > div {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.patient-contract-signers > header strong {
  color: #244f63;
  font-size: 9px;
}

.patient-contract-signers > header span {
  color: #7a9099;
  font-size: 8px;
}

.patient-contract-signers > header em {
  padding: 4px 7px;
  border-radius: 999px;
  color: #9a6717;
  background: #fff2d8;
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.patient-contract-signers > header em.is-complete {
  color: #087b4b;
  background: #e3f7eb;
}

.patient-contract-signer-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 6px;
}

.patient-contract-signer-list article {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #e2e9eb;
  border-radius: 9px;
  background: #fff;
}

.patient-contract-signer-list article > span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #a36b18;
  background: #fff1d5;
}

.patient-contract-signer-list article.is-signed > span {
  color: #087c4d;
  background: #e3f7eb;
}

.patient-contract-signer-list article > span svg {
  width: 13px;
  height: 13px;
}

.patient-contract-signer-list article > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.patient-contract-signer-list article strong {
  overflow: hidden;
  color: #24495b;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patient-contract-signer-list article small,
.patient-contract-signer-list article time {
  color: #7b8e96;
  font-size: 7px;
  font-style: normal;
}

.patient-contract-signer-list article > em {
  color: #a46a16;
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.patient-contract-signer-list article.is-signed > em {
  color: #087b4c;
}

.patient-contract-signers-empty {
  padding: 9px;
  border: 1px dashed #d5e3e6;
  border-radius: 9px;
  color: #7a8e97;
  font-size: 8px;
}

.patient-contract-link {
  display: grid;
  justify-items: start;
  gap: 7px;
}

.patient-contract-link-button {
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid #bfded8;
  border-radius: 9px;
  color: #087968;
  background: #eff9f7;
  font-size: 8px;
  font-weight: 900;
  cursor: pointer;
}

.patient-contract-link-button svg {
  width: 13px;
  height: 13px;
}

.patient-contract-link-button small {
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #079b89;
  font-size: 7px;
}

.patient-contract-link-detail {
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #cfe4e1;
  border-radius: 10px;
  background: #f3faf8;
}

.patient-contract-link-detail[hidden] {
  display: none !important;
}

.patient-contract-link-detail > header {
  display: grid;
  gap: 2px;
}

.patient-contract-link-detail > header strong {
  color: #25584f;
  font-size: 9px;
}

.patient-contract-link-detail > header span {
  color: #75918b;
  font-size: 7px;
}

.patient-contract-link-detail > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.patient-contract-link-detail article {
  min-width: 190px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border: 1px solid #d8e8e5;
  border-radius: 9px;
  background: #fff;
}

.patient-contract-link-detail article > span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #078b79;
  background: #e6f7f2;
}

.patient-contract-link-detail article svg {
  width: 13px;
  height: 13px;
}

.patient-contract-link-detail article > div {
  display: grid;
  gap: 2px;
}

.patient-contract-link-detail article strong {
  color: #295449;
  font-size: 8px;
}

.patient-contract-link-detail article small {
  color: #78908a;
  font-size: 7px;
}

.patient-contract-preview-dialog {
  width: min(1120px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background: transparent;
  box-shadow: 0 28px 80px rgba(5, 35, 47, .3);
}

.patient-contract-preview-dialog::backdrop {
  background: rgba(5, 27, 37, .65);
  backdrop-filter: blur(3px);
}

.patient-contract-preview-card {
  max-height: calc(100vh - 28px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: #edf4f5;
}

.patient-contract-preview-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 21px;
  border-bottom: 1px solid #d5e5e8;
  background: #fff;
}

.patient-contract-preview-card > header span {
  color: #079a8d;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .1em;
}

.patient-contract-preview-card > header h2 {
  margin: 3px 0 5px;
  color: #123d51;
  font-size: 19px;
}

.patient-contract-preview-card > header p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #71858e;
  font-size: 8px;
}

.patient-contract-preview-card > header p > span {
  padding: 4px 7px;
  border-radius: 7px;
  color: #52707c;
  background: #f1f6f7;
  letter-spacing: 0;
}

.patient-contract-preview-card > header > button {
  width: 35px;
  height: 35px;
  border: 0;
  border-radius: 10px;
  color: #6e848d;
  background: #edf3f4;
  font-size: 22px;
  cursor: pointer;
}

.patient-contract-preview-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(285px, .65fr);
  gap: 14px;
  padding: 14px;
  overflow: auto;
}

.patient-contract-preview-document {
  min-height: 680px;
  padding: 48px 55px;
  border-radius: 15px;
  background: #fff;
  color: #243d49;
  box-shadow: 0 8px 25px rgba(15, 48, 60, .08);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  line-height: 1.65;
}

.patient-contract-preview-document img {
  max-width: 100%;
}

.patient-contract-preview-layout > aside {
  align-self: start;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d4e5e7;
  border-radius: 15px;
  background: #fff;
}

.patient-contract-preview-layout > aside > div:first-child {
  display: grid;
  gap: 3px;
}

.patient-contract-preview-layout > aside small {
  color: #0a988c;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .09em;
}

.patient-contract-preview-layout > aside h3 {
  margin: 0;
  color: #21495b;
  font-size: 13px;
}

.patient-contract-preview-layout > aside p {
  margin: 0;
  color: #73878f;
  font-size: 8px;
  line-height: 1.45;
}

.patient-contract-signers.is-preview {
  padding: 0;
  border: 0;
  background: transparent;
}

.patient-contract-signers.is-preview .patient-contract-signer-list {
  grid-template-columns: 1fr;
}

.patient-contract-signers.is-preview .patient-contract-signer-list article {
  align-items: start;
}

.patient-contract-signers.is-preview .patient-contract-signer-list img {
  width: 150px;
  max-width: 100%;
  height: 52px;
  margin-top: 5px;
  object-fit: contain;
  object-position: left center;
  border: 1px solid #e0e9eb;
  border-radius: 7px;
  background: #fff;
}

.patient-contract-preview-card > footer {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px;
  border-top: 1px solid #d5e4e7;
  background: #fff;
}

.patient-contract-preview-card > footer button {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid #c8dcdf;
  border-radius: 10px;
  color: #466672;
  background: #f5f9fa;
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
}

[data-view-panel="Cadastro"] .procedure-title {
  min-height: auto;
  align-items: flex-start;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

[data-view-panel="Cadastro"] .procedure-title h2 {
  flex: 0 0 auto;
}

[data-view-panel="Cadastro"] .procedure-status-legend {
  justify-content: flex-end;
  gap: 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dfebee;
}

[data-view-panel="Cadastro"] .procedure-status-legend span {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 9px;
  font-size: 9px;
}

[data-view-panel="Cadastro"] .procedure-status-legend svg {
  width: 19px;
  height: 19px;
}

[data-view-panel="Cadastro"] .procedure-balance-strip {
  min-height: 70px;
  gap: 8px;
  margin: 0 0 12px;
  padding: 8px;
  border: 1px solid #cfe7e2;
  border-radius: 13px;
  background: #f0faf8;
}

[data-view-panel="Cadastro"] .procedure-balance-strip > span {
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 9px;
  background: #ffffff;
  color: #607684;
  font-size: 9px;
  letter-spacing: .03em;
  text-transform: uppercase;
}

[data-view-panel="Cadastro"] .procedure-balance-strip strong {
  color: #087c69;
  font-size: 13px;
}

[data-view-panel="Cadastro"] .budget-balance-detail-button {
  min-height: 25px;
  padding: 0 9px;
  font-size: 9px;
}

[data-view-panel="Cadastro"] .budget-procedure-item {
  min-height: 58px;
  padding: 8px 10px;
  border-color: #dce9ed;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 5px 14px rgba(14,52,75,.04);
}

[data-view-panel="Cadastro"] .budget-modern-total {
  min-height: 58px;
  margin-top: 4px;
  padding: 8px 10px;
  border-color: #c4e4de;
  border-radius: 13px;
  background: linear-gradient(90deg, #eef9f7, #f2f8fb);
  color: #083b65;
}

[data-view-panel="Cadastro"] .budget-footer-add-button {
  min-height: 40px;
  border-radius: 10px;
  background: linear-gradient(110deg, #0878b0, #12ad9e);
  box-shadow: 0 7px 16px rgba(8,117,160,.16);
}

[data-view-panel="Cadastro"] .budget-modern-total input {
  height: 40px;
  border-color: #bddfd9;
  border-radius: 10px;
  color: #087c69;
  font-size: 15px;
}

/* Contratos do orçamento — fluxo compacto e modal de vínculo */
[data-view-panel="Cadastro"] .budget-contract-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

[data-view-panel="Cadastro"] .budget-contract-list-toggle {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid #bfe0dc;
  border-radius: 10px;
  color: #087d72;
  background: #ffffff;
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
}

[data-view-panel="Cadastro"] .budget-contract-list-toggle:disabled {
  color: #8da1aa;
  border-color: #dce8ea;
  background: #f5f8f9;
  cursor: not-allowed;
}

[data-view-panel="Cadastro"] .budget-contract-list-toggle svg {
  width: 14px;
  height: 14px;
}

[data-view-panel="Cadastro"] .budget-contract-list.is-hidden {
  display: none;
}

.budget-contract-dialog {
  width: min(920px, calc(100vw - 28px));
  max-width: none;
  max-height: min(880px, calc(100vh - 28px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  color: #123a52;
  background: #f5f9fa;
  box-shadow: 0 28px 80px rgba(5, 35, 54, .28);
}

.budget-contract-dialog::backdrop {
  background: rgba(4, 28, 44, .58);
  backdrop-filter: blur(3px);
}

[data-view-panel="Cadastro"] .budget-contract-dialog .budget-contract-builder {
  max-height: min(880px, calc(100vh - 28px));
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #f5f9fa;
}

.budget-contract-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 17px;
  border-bottom: 1px solid #d9e8ea;
  background: #ffffff;
}

.budget-contract-dialog-header > div {
  display: grid;
  gap: 3px;
}

.budget-contract-dialog-header > div > span {
  color: #0a9b92;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.budget-contract-dialog-header h3 {
  margin: 0;
  color: #083b65;
  font-size: 19px;
  font-weight: 900;
}

.budget-contract-dialog-header p {
  margin: 0;
  color: #6d818c;
  font-size: 10px;
}

.budget-contract-dialog-header > button {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 10px;
  color: #607783;
  background: #edf4f5;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.budget-contract-builder-body {
  min-height: 0;
  display: grid;
  gap: 12px;
  padding: 15px;
  overflow: auto;
}

.budget-contract-builder-section {
  display: grid;
  gap: 13px;
  padding: 15px;
  border: 1px solid #d7e7e9;
  border-radius: 15px;
  background: #ffffff;
}

.budget-contract-builder-section > header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.budget-contract-builder-section > header > span {
  width: 27px;
  height: 27px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  color: #ffffff;
  background: linear-gradient(135deg, #0789aa, #0bad97);
  font-size: 10px;
  font-weight: 900;
}

.budget-contract-builder-section > header > div {
  display: grid;
  gap: 2px;
}

.budget-contract-builder-section > header strong {
  color: #123a52;
  font-size: 11px;
}

.budget-contract-builder-section > header small {
  color: #728690;
  font-size: 9px;
}

[data-view-panel="Cadastro"] .budget-contract-dialog .budget-contract-builder-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

[data-view-panel="Cadastro"] .budget-contract-builder-grid textarea {
  width: 100%;
  min-height: 78px;
  padding: 10px 11px;
  resize: vertical;
  border: 1px solid #c8dfe2;
  border-radius: 10px;
  outline: 0;
  color: #123a52;
  background: #ffffff;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
}

[data-view-panel="Cadastro"] .budget-contract-builder-grid textarea:focus {
  border-color: #11a89c;
  box-shadow: 0 0 0 3px rgba(17, 168, 156, .11);
}

.budget-contract-observation-field {
  grid-column: 1 / -1;
}

.budget-contract-observation-field > small {
  color: #758892;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.budget-contract-signer-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.budget-contract-signer-options > label,
.budget-contract-witness-toggle {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid #d7e6e9;
  border-radius: 11px;
  background: #f9fbfc;
  cursor: pointer;
}

.budget-contract-signer-options > label:has(input:checked),
.budget-contract-witness-toggle:has(input:checked) {
  border-color: #4dc2b4;
  background: #effaf8;
  box-shadow: inset 3px 0 #0baa97;
}

.budget-contract-signer-options > label.is-disabled {
  opacity: .55;
  cursor: not-allowed;
}

.budget-contract-signer-options input,
.budget-contract-witness-toggle input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  accent-color: #0aa392;
}

.budget-contract-signer-options span,
.budget-contract-witness-toggle span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.budget-contract-signer-options strong,
.budget-contract-witness-toggle strong {
  color: #17445a;
  font-size: 10px;
}

.budget-contract-signer-options small,
.budget-contract-witness-toggle small {
  overflow: hidden;
  color: #748792;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.budget-contract-witness-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.budget-contract-witness-fields.is-hidden {
  display: none;
}

.budget-contract-witness-fields fieldset {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(125px, .7fr);
  gap: 8px;
  margin: 0;
  padding: 10px;
  border: 1px solid #d8e8ea;
  border-radius: 11px;
}

.budget-contract-witness-fields legend {
  padding: 0 5px;
  color: #0a8479;
  font-size: 9px;
  font-weight: 900;
}

.budget-contract-witness-fields label {
  display: grid;
  gap: 4px;
  color: #607884;
  font-size: 8px;
  font-weight: 850;
  text-transform: uppercase;
}

.budget-contract-witness-fields input {
  width: 100%;
  min-height: 39px;
  padding: 0 10px;
  border: 1px solid #c8dfe2;
  border-radius: 9px;
  color: #123a52;
  background: #ffffff;
  font-size: 10px;
}

[data-view-panel="Cadastro"] .budget-contract-dialog .budget-contract-procedure-field {
  padding: 15px;
  background: #ffffff;
}

[data-view-panel="Cadastro"] .budget-contract-dialog .budget-contract-builder > footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 13px 18px;
  border-top: 1px solid #d8e7ea;
  background: #ffffff;
}

.budget-contract-status.is-cancelled {
  color: #a43b4a;
  background: #fdebed;
}

[data-view-panel="Cadastro"] .budget-contract-card.is-cancelled,
.patient-contract-card.is-cancelled {
  border-color: #eadde0;
  background: #fcf9fa;
}

[data-view-panel="Cadastro"] .budget-contract-card.is-cancelled .budget-contract-card-icon,
.patient-contract-card.is-cancelled .patient-contract-card-icon {
  color: #9b747b;
  background: #f3eaec;
}

.patient-contract-budget-reference {
  flex-basis: 100%;
  border: 1px solid #c8e6e1;
  color: #17685f !important;
  background: #effaf8 !important;
}

[data-view-panel="Cadastro"] .budget-procedure-item.is-contract-locked {
  border-color: #bcded9;
  background: linear-gradient(180deg, #ffffff, #f1faf8);
}

.budget-procedure-tags em.is-contract-lock {
  gap: 4px;
  color: #08796d;
  background: #e7f7f3;
}

.budget-procedure-tags em.is-contract-lock svg {
  width: 12px;
  height: 12px;
}

@media (max-width: 900px) {
  [data-view-panel="Cadastro"] .budget-detail-header,
  [data-view-panel="Cadastro"] .procedure-title,
  [data-view-panel="Cadastro"] .budget-contract-header,
  .patient-contract-header {
    align-items: stretch;
    flex-direction: column;
  }

  [data-view-panel="Cadastro"] .procedure-status-legend {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  [data-view-panel="Cadastro"] .budget-detail-form-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  [data-view-panel="Cadastro"] .budget-field-created,
  [data-view-panel="Cadastro"] .budget-field-status,
  [data-view-panel="Cadastro"] .budget-field-contracted {
    grid-column: span 4;
  }

  [data-view-panel="Cadastro"] .budget-field-patient {
    grid-column: span 12;
  }

  [data-view-panel="Cadastro"] .budget-contract-builder-grid {
    grid-template-columns: 1fr;
  }

  [data-view-panel="Cadastro"] .budget-contract-summary {
    grid-template-columns: auto minmax(0, 1fr);
  }

  [data-view-panel="Cadastro"] .budget-contract-list-toggle {
    grid-column: 1 / -1;
  }

  .patient-contract-patient {
    min-width: 0;
  }

  .patient-contract-preview-layout {
    grid-template-columns: 1fr;
  }

  .patient-contract-preview-layout > aside {
    order: -1;
  }
}

@media (max-width: 680px) {
  [data-view-panel="Cadastro"] .budget-detail-form-grid {
    grid-template-columns: 1fr;
  }

  [data-view-panel="Cadastro"] .budget-detail-form-grid > label {
    grid-column: 1 / -1;
  }

  [data-view-panel="Cadastro"] .budget-contract-summary,
  [data-view-panel="Cadastro"] .budget-contract-procedure-field > header,
  [data-view-panel="Cadastro"] .budget-contract-card-title,
  .patient-contract-card-title {
    align-items: stretch;
    flex-direction: column;
  }

  [data-view-panel="Cadastro"] .budget-contract-summary article {
    width: 100%;
  }

  [data-view-panel="Cadastro"] .budget-contract-procedure-options,
  .budget-contract-signer-options,
  .budget-contract-witness-fields,
  .patient-contract-metrics {
    grid-template-columns: 1fr;
  }

  [data-view-panel="Cadastro"] .budget-contract-summary {
    display: flex;
  }

  [data-view-panel="Cadastro"] .budget-contract-list-toggle {
    width: 100%;
  }

  .budget-contract-witness-fields fieldset {
    grid-template-columns: 1fr;
  }

  [data-view-panel="Cadastro"] .budget-contract-card,
  .patient-contract-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  [data-view-panel="Cadastro"] .budget-contract-remove-button,
  .patient-contract-card-controls {
    grid-column: 1 / -1;
    width: 100%;
  }

  .patient-contract-card-controls {
    grid-template-columns: 1fr 1fr;
  }

  .patient-contract-open-budget,
  .patient-contract-preview-button {
    width: 100%;
  }

  .patient-contract-signers > header,
  .patient-contract-signers > header > div {
    align-items: flex-start;
    flex-direction: column;
  }

  .patient-contract-signer-list {
    grid-template-columns: 1fr;
  }

  .patient-contract-preview-dialog,
  .patient-contract-preview-card {
    width: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .patient-contract-preview-layout {
    padding: 8px;
  }

  .patient-contract-preview-document {
    min-height: 560px;
    padding: 28px 20px;
  }

  [data-view-panel="Cadastro"] .budget-modern-total {
    align-items: stretch;
    flex-direction: column;
  }

  [data-view-panel="Cadastro"] .budget-footer-add-button,
  [data-view-panel="Cadastro"] .budget-modern-total input {
    width: 100%;
    margin: 0;
  }
}

/* Descontos por pagamento — padrão Tec Dent */
[data-view-panel="ConfigDescontoPagamento"] .specialties-page {
  min-height: calc(100vh - 74px);
  background: radial-gradient(circle at 95% 3%, rgba(14, 181, 193, .1), transparent 29%), linear-gradient(180deg, #f4fbfc, #fff 400px);
}

[data-view-panel="ConfigDescontoPagamento"] .payment-discount-content {
  width: min(1180px, calc(100% - 48px));
  padding: 26px 0 54px;
}

.payment-discount-page-header {
  margin-bottom: 16px;
  padding: 22px 24px;
  border: 1px solid #d3e8eb;
  border-radius: 18px;
  background: linear-gradient(105deg, #e8faf8, #fff 72%);
  box-shadow: 0 12px 28px rgba(19, 66, 80, .07);
}

.payment-discount-page-header > span {
  display: block;
  margin-bottom: 4px;
  color: #078d9d;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .095em;
  text-transform: uppercase;
}

.payment-discount-page-header .payment-discount-title {
  margin: 0;
  color: #12334b;
  font-size: clamp(23px, 3vw, 30px);
  font-weight: 950;
  letter-spacing: -.025em;
}

.payment-discount-page-header p {
  margin: 6px 0 0;
  color: #60788a;
  font-size: 13px;
}

[data-view-panel="ConfigDescontoPagamento"] .payment-discount-card {
  min-height: 430px;
  padding: 22px;
  border: 1px solid #d6e8eb;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(18, 61, 75, .07);
}

[data-view-panel="ConfigDescontoPagamento"] .payment-discount-grid {
  grid-template-columns: minmax(260px, 520px);
  margin-bottom: 20px;
}

[data-view-panel="ConfigDescontoPagamento"] .payment-discount-grid label {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
}

[data-view-panel="ConfigDescontoPagamento"] .payment-discount-grid span {
  color: #496577;
  font-size: 11px;
  text-align: left;
  letter-spacing: .045em;
  text-transform: uppercase;
}

[data-view-panel="ConfigDescontoPagamento"] .payment-discount-grid select,
[data-view-panel="ConfigDescontoPagamento"] .payment-discount-row select,
[data-view-panel="ConfigDescontoPagamento"] .payment-discount-row input {
  min-height: 42px;
  border: 1px solid #c9dde2;
  border-radius: 10px;
  background: #fff;
  color: #17364c;
}

[data-view-panel="ConfigDescontoPagamento"] .payment-discount-section-title {
  gap: 8px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid #d8e9ec;
  border-radius: 12px;
  background: #f4fafb;
  color: #17364c;
  font-size: 17px;
  font-weight: 900;
}

[data-view-panel="ConfigDescontoPagamento"] .payment-discount-empty {
  width: auto;
  margin: 0 0 20px;
  padding: 17px 18px;
  border: 1px dashed #a8d9de;
  border-radius: 13px;
  background: #effafa;
  color: #397080;
  font-size: 13px;
  text-align: center;
}

[data-view-panel="ConfigDescontoPagamento"] .payment-discount-head {
  min-height: 44px;
  border-radius: 11px 11px 0 0;
  background: #e5f4f6;
  color: #446174;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}

[data-view-panel="ConfigDescontoPagamento"] .payment-discount-row {
  min-height: 50px;
  border-color: #dbe9ec;
}

[data-view-panel="ConfigComissao"] .commission-table th {
  height: 36px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: #6a7e8b;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .08em;
}

[data-view-panel="ConfigComissao"] .commission-table td {
  height: 48px;
  padding: 10px 12px;
  border-width: 1px 0;
  border-style: solid;
  border-color: #e1ecef;
  background: #f7fafb;
  color: #12384f;
}

[data-view-panel="ConfigComissao"] .commission-table td:first-child {
  border-left-width: 1px;
  border-radius: 12px 0 0 12px;
}

[data-view-panel="ConfigComissao"] .commission-table td:last-child {
  border-right-width: 1px;
  border-radius: 0 12px 12px 0;
}

[data-view-panel="ConfigDescontoPagamento"] .payment-discount-footer {
  align-items: center;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid #e1edef;
}

[data-view-panel="ConfigDescontoPagamento"] .payment-discount-left-actions { gap: 9px; }
[data-view-panel="ConfigDescontoPagamento"] .payment-discount-footer button {
  min-height: 42px;
  padding: 0 17px;
  border-radius: 11px;
  font-weight: 900;
}

[data-view-panel="ConfigDescontoPagamento"] [data-add-payment-discount],
[data-view-panel="ConfigDescontoPagamento"] [data-save-payment-discount] {
  background: linear-gradient(135deg, #168fc1, #10adbd);
  box-shadow: 0 8px 18px rgba(18, 142, 177, .2);
}

[data-view-panel="ConfigDescontoPagamento"] [data-copy-payment-discount] {
  background: #fff4df;
  color: #a76608;
  box-shadow: none;
}

[data-view-panel="ConfigDescontoPagamento"] .payment-discount-copy-help {
  max-width: 280px;
  color: #748794;
  font-size: 10px;
  line-height: 1.35;
}

/* Perfis e permissões — cartões compactos Tec Dent */
.profile-manager-dialog .access-manager-header {
  min-height: 118px;
  padding: 22px 28px;
  border-bottom: 1px solid #d5e8eb;
  background: linear-gradient(105deg, #e7faf8, #fff 70%);
}

.profile-manager-dialog .access-manager-header small {
  color: #078d9d;
  font-size: 10px;
  letter-spacing: .095em;
}

.profile-manager-dialog .access-manager-header h2 {
  margin-top: 4px;
  color: #12334b;
  font-size: clamp(24px, 3vw, 30px);
  letter-spacing: -.025em;
}

.profile-manager-dialog .access-manager-header p { color: #60788a; }

.profile-manager-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-manager-header-actions .save-action {
  min-height: 42px;
  padding: 0 17px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #168fc1, #10adbd);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(18, 142, 177, .2);
}

.profile-manager-header-actions .dialog-close-button {
  position: static;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: #edf3f5;
  color: #627786;
}

.profile-manager-dialog .profile-rule-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 22px 28px 34px;
}

.profile-manager-dialog .profile-rule-card {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 12px;
  min-height: 142px;
  padding: 18px;
  border: 1px solid #d6e8eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 9px 23px rgba(15, 58, 72, .06);
  transition: box-shadow .18s ease, border-color .18s ease;
}

.profile-manager-dialog .profile-rule-card:hover {
  transform: translateY(-2px);
  border-color: #b8dde0;
  box-shadow: 0 14px 30px rgba(15, 58, 72, .09);
}

.profile-manager-dialog .profile-rule-card > div:first-child {
  grid-row: 1 / 3;
  align-content: start;
  gap: 7px;
}

.profile-manager-dialog .profile-rule-card strong { color: #12334b; font-size: 17px; }
.profile-manager-dialog .profile-rule-card p { color: #617887; line-height: 1.5; }
.profile-manager-dialog .profile-rule-card small {
  width: fit-content;
  margin-top: 5px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #eef8f8;
  color: #397985;
}

.profile-manager-dialog .profile-rule-card > .status-switch { align-self: start; justify-self: end; }
.profile-manager-dialog .profile-rule-card > .access-list-actions { align-self: end; justify-self: end; }

.profile-manager-dialog .profile-form-card {
  padding: clamp(20px, 3vw, 34px);
  background: linear-gradient(180deg, #f3fafb, #fff);
}

@media (max-width: 820px) {
  [data-view-panel="ConfigDescontoPagamento"] .payment-discount-content { width: min(100% - 22px, 1180px); padding-top: 14px; }
  [data-view-panel="ConfigDescontoPagamento"] .payment-discount-footer { align-items: stretch; flex-direction: column; }
  [data-view-panel="ConfigDescontoPagamento"] .payment-discount-left-actions { align-items: stretch; flex-direction: column; }
  [data-view-panel="ConfigDescontoPagamento"] .payment-discount-copy-help { max-width: none; }
  .profile-manager-dialog .access-manager-header { align-items: flex-start; flex-direction: column; }
  .profile-manager-header-actions { width: 100%; }
  .profile-manager-header-actions .save-action { flex: 1; }
  .profile-manager-dialog .profile-rule-grid { grid-template-columns: 1fr; padding: 16px; }
}

/* Ações consistentes nos cadastros Tec Dent */
:is(
  [data-view-panel="CadastroProfissionais"],
  [data-view-panel="CadastroEspecialidades"],
  [data-view-panel="CadastroProcedimentos"],
  [data-view-panel="CadastroFormasPagamento"],
  [data-view-panel="CadastroCentroCustos"],
  [data-view-panel="CadastroFornecedores"]
) :is(
  .professional-form-actions,
  .specialty-form-actions,
  .specialty-edit-actions,
  .procedure-detail-actions,
  .payment-method-detail-actions
) button {
  min-height: 42px;
  padding: 0 17px;
  border: 0;
  border-radius: 11px;
  font-weight: 900;
}

:is(
  [data-view-panel="CadastroProfissionais"],
  [data-view-panel="CadastroEspecialidades"],
  [data-view-panel="CadastroProcedimentos"],
  [data-view-panel="CadastroFormasPagamento"],
  [data-view-panel="CadastroCentroCustos"],
  [data-view-panel="CadastroFornecedores"]
) :is(
  .professional-form-actions,
  .specialty-form-actions,
  .specialty-edit-actions,
  .procedure-detail-actions,
  .payment-method-detail-actions
) button[type="submit"] {
  background: linear-gradient(135deg, #168fc1, #10adbd);
  color: #fff;
  box-shadow: 0 8px 18px rgba(18, 142, 177, .2);
}

:is(
  [data-view-panel="CadastroProfissionais"],
  [data-view-panel="CadastroEspecialidades"],
  [data-view-panel="CadastroProcedimentos"],
  [data-view-panel="CadastroFormasPagamento"],
  [data-view-panel="CadastroCentroCustos"],
  [data-view-panel="CadastroFornecedores"]
) :is(
  [data-professional-back],
  [data-cancel-specialty],
  [data-specialty-back],
  [data-cancel-procedure],
  [data-payment-method-back],
  [data-cost-center-back],
  [data-supplier-back]
) {
  background: #edf3f5 !important;
  color: #526b7c !important;
  box-shadow: none !important;
}

:is(
  [data-view-panel="CadastroProfissionais"],
  [data-view-panel="CadastroEspecialidades"],
  [data-view-panel="CadastroProcedimentos"],
  [data-view-panel="CadastroFormasPagamento"],
  [data-view-panel="CadastroCentroCustos"],
  [data-view-panel="CadastroFornecedores"]
) :is(input, select, textarea):focus {
  border-color: #20b8c3;
  outline: 3px solid rgba(25, 180, 193, .12);
  box-shadow: none;
}

/* Padronização final dos títulos e tabelas de configuração */
:is(
  [data-view-panel="CadastroProfissionais"] .professionals-page-header,
  .registry-page-header,
  [data-view-panel="CadastroFormasPagamento"] .payment-method-page-header,
  [data-view-panel="ConfigComissao"] .commission-page-header,
  .payment-discount-page-header
) {
  min-height: 104px;
  display: flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 16px 24px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(115deg, #063b69 0%, #087ab0 58%, #12b9b0 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(5, 63, 105, .18);
  position: relative;
  overflow: hidden;
}

:is(
  [data-view-panel="CadastroProfissionais"] .professionals-page-header,
  .registry-page-header,
  [data-view-panel="CadastroFormasPagamento"] .payment-method-page-header,
  [data-view-panel="ConfigComissao"] .commission-page-header,
  .payment-discount-page-header
)::after {
  content: "";
  width: 190px;
  height: 190px;
  position: absolute;
  right: 80px;
  top: -125px;
  border: 30px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  pointer-events: none;
}

:is(
  [data-view-panel="CadastroProfissionais"] .professionals-page-header,
  .registry-page-header,
  [data-view-panel="CadastroFormasPagamento"] .payment-method-page-header,
  [data-view-panel="ConfigComissao"] .commission-page-header,
  .payment-discount-page-header
) > * {
  position: relative;
  z-index: 1;
}

:is(
  [data-view-panel="CadastroProfissionais"] .professionals-page-header,
  .registry-page-header,
  [data-view-panel="CadastroFormasPagamento"] .payment-method-page-header,
  [data-view-panel="ConfigComissao"] .commission-page-header,
  .payment-discount-page-header
) :is(> div > span, > span) {
  color: #9ff4e8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

:is(
  [data-view-panel="CadastroProfissionais"] .professionals-page-header,
  .registry-page-header,
  [data-view-panel="CadastroFormasPagamento"] .payment-method-page-header,
  [data-view-panel="ConfigComissao"] .commission-page-header,
  .payment-discount-page-header
) h2 {
  margin: 2px 0 3px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.015em;
}

:is(
  [data-view-panel="CadastroProfissionais"] .professionals-page-header,
  .registry-page-header,
  [data-view-panel="CadastroFormasPagamento"] .payment-method-page-header,
  [data-view-panel="ConfigComissao"] .commission-page-header,
  .payment-discount-page-header
) p {
  margin: 0;
  color: rgba(255, 255, 255, .8);
  font-size: 12px;
  font-weight: 650;
}

[data-view-panel="ConfigComissao"] .commission-page-header {
  justify-content: space-between;
}

[data-view-panel="ConfigComissao"] .commission-page-header > button {
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.14);
  box-shadow: none;
  backdrop-filter: blur(5px);
}

.profile-manager-dialog .access-manager-header {
  min-height: 116px;
  border-bottom: 0;
  background: linear-gradient(115deg, #063b69 0%, #087ab0 58%, #12b9b0 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(5, 63, 105, .16);
}

.profile-manager-dialog .access-manager-header :is(small, h2, p) { color: #fff; }
.profile-manager-dialog .access-manager-header small { color: #9ff4e8; }
.profile-manager-dialog .access-manager-header p { color: rgba(255,255,255,.8); }
.profile-manager-header-actions .save-action {
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.15);
  box-shadow: none;
  backdrop-filter: blur(5px);
}
.profile-manager-header-actions .dialog-close-button {
  background: rgba(255,255,255,.15);
  color: #fff;
}

:is(
  .professionals-table-wrap,
  .specialties-table-wrap,
  .payment-method-table-wrap,
  .commission-table-wrap
) {
  padding: 5px 10px 10px;
  border: 1px solid #dce9ee;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(14, 52, 75, .06);
  overflow-x: auto;
}

:is(
  .professionals-table,
  .specialties-table,
  .payment-method-table,
  .commission-table
) {
  border-collapse: separate;
  border-spacing: 0 7px;
}

:is(
  .professionals-table,
  .specialties-table,
  .payment-method-table,
  .commission-table
) th {
  height: 36px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: #6a7e8b;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

:is(
  .professionals-table,
  .specialties-table,
  .payment-method-table,
  .commission-table
) td {
  height: 48px;
  padding: 10px 12px;
  border-width: 1px 0;
  border-style: solid;
  border-color: #e1ecef;
  background: #f7fafb;
  color: #12384f;
  font-size: 13px;
  font-weight: 700;
}

:is(
  .professionals-table,
  .specialties-table,
  .payment-method-table,
  .commission-table
) td:first-child {
  border-left-width: 1px;
  border-radius: 12px 0 0 12px;
  color: #083b65;
  font-weight: 850;
}

:is(
  .professionals-table,
  .specialties-table,
  .payment-method-table,
  .commission-table
) td:last-child {
  border-right-width: 1px;
  border-radius: 0 12px 12px 0;
}

:is(
  .professionals-table,
  .specialties-table,
  .payment-method-table,
  .commission-table
) tbody tr:nth-child(even) { background: transparent; }

:is(
  .professionals-table,
  .specialties-table,
  .payment-method-table,
  .commission-table
) tbody tr:hover td {
  border-color: #cce5e7;
  background: #eef9f9;
}

[data-view-panel="ConfigDescontoPagamento"] .payment-discount-row {
  margin-bottom: 7px;
  overflow: hidden;
  border: 1px solid #dce9ec;
  border-radius: 11px;
  background: #f8fbfc;
}

@media (max-width: 700px) {
  :is(
    [data-view-panel="CadastroProfissionais"] .professionals-page-header,
    .registry-page-header,
    [data-view-panel="CadastroFormasPagamento"] .payment-method-page-header,
    [data-view-panel="ConfigComissao"] .commission-page-header,
    .payment-discount-page-header
  ) {
    min-height: 92px;
    padding: 14px 17px;
    border-radius: 15px;
  }
}

/* Pacientes do Dia — controle operacional com identidade Tec Dent. */
.home-board-title-link {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #17364a;
  cursor: pointer;
  font: inherit;
  font-size: 17px;
  font-weight: 950;
  text-align: left;
}

.home-board-title-link:hover,
.home-board-title-link:focus-visible {
  color: var(--if-cyan-dark, #087f96);
  text-decoration: underline;
  text-underline-offset: 4px;
  outline: 0;
}

[data-view-panel="PacientesDia"] {
  background:
    radial-gradient(circle at 5% 0%, rgba(22, 182, 199, 0.1), transparent 28%),
    linear-gradient(180deg, #f4fafb 0%, #f8fbfc 100%);
}

.daily-patients-page {
  width: min(1320px, calc(100% - 36px));
  display: grid;
  gap: 18px;
  margin: 0 auto;
  padding: 22px 0 40px;
}

.daily-patients-hero {
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  overflow: hidden;
  padding: 28px 32px;
  border: 1px solid rgba(20, 161, 177, 0.2);
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 18%, rgba(194, 222, 17, 0.2), transparent 24%),
    linear-gradient(128deg, #073e58 0%, #087f91 56%, #0aa9b2 100%);
  color: #ffffff;
  box-shadow: 0 18px 38px rgba(7, 62, 88, 0.18);
}

.daily-patients-hero > div {
  max-width: 720px;
}

.daily-patients-hero > div > span {
  display: inline-flex;
  margin-bottom: 7px;
  color: #dff95a;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.16em;
}

.daily-patients-hero h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
}

.daily-patients-hero p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  font-weight: 650;
}

.daily-patients-date-field {
  min-width: 230px;
  display: grid;
  gap: 7px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(8px);
}

.daily-patients-date-field span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.daily-patients-date-field input {
  min-height: 42px;
  border: 0 !important;
  background: #ffffff !important;
  color: #12384a !important;
  font-size: 14px;
  font-weight: 850;
}

.daily-patients-date-control {
  grid-template-columns: minmax(150px, 1fr) 42px;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(5, 49, 66, 0.14);
}

.daily-patients-date-control button {
  width: 42px;
  background: #e8f8fb;
  color: #087f96;
}

.daily-patients-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.daily-patients-metrics article {
  --metric-color: #168eae;
  --metric-soft: #e9f8fc;
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--metric-color) 22%, #dbe8eb);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(11, 52, 67, 0.08);
}

.daily-patients-metrics article.is-pending { --metric-color: #db554a; --metric-soft: #fff0ee; }
.daily-patients-metrics article.is-justified { --metric-color: #e28d0f; --metric-soft: #fff6df; }
.daily-patients-metrics article.is-attended { --metric-color: #079a65; --metric-soft: #e8f9f2; }
.daily-patients-metrics article.is-total { --metric-color: #168eae; --metric-soft: #e8f7fb; }

.daily-patients-metric-icon {
  width: 46px;
  height: 46px;
  display: grid;
  flex: 0 0 46px;
  place-items: center;
  border-radius: 15px;
  background: var(--metric-soft);
  color: var(--metric-color);
  font-size: 20px;
  font-weight: 950;
}

.daily-patients-metrics article > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.daily-patients-metrics small {
  color: #627a86;
  font-size: 12px;
  font-weight: 850;
}

.daily-patients-metrics strong {
  color: #17384a;
  font-size: 26px;
  font-weight: 950;
}

.daily-patients-card {
  --section-color: #168eae;
  --section-soft: #e9f8fc;
  overflow: hidden;
  border: 1px solid #dbe9ec;
  border-top: 4px solid var(--section-color);
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 14px 32px rgba(11, 52, 67, 0.07);
}

.daily-patients-card.is-pending { --section-color: #db554a; --section-soft: #fff0ee; }
.daily-patients-card.is-justified { --section-color: #e28d0f; --section-soft: #fff6df; }
.daily-patients-card.is-attended { --section-color: #079a65; --section-soft: #e8f9f2; }

.daily-patients-card > header {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 20px;
  border-bottom: 1px solid #e4eef0;
}

.daily-patients-card > header > div {
  display: flex;
  align-items: center;
  gap: 13px;
}

.daily-patients-section-icon {
  width: 40px;
  height: 40px;
  display: grid;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 13px;
  background: var(--section-soft);
  color: var(--section-color);
  font-size: 18px;
  font-weight: 950;
}

.daily-patients-card h3 {
  margin: 0;
  color: #17384a;
  font-size: 18px;
}

.daily-patients-card header p {
  margin: 4px 0 0;
  color: #6b818b;
  font-size: 12px;
  font-weight: 650;
}

.daily-patients-card > header > strong {
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--section-soft);
  color: var(--section-color);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.daily-patients-table-wrap {
  overflow-x: auto;
}

.daily-patients-table {
  width: 100%;
  border-collapse: collapse;
}

.daily-patients-table th {
  height: 42px;
  padding: 10px 18px;
  border: 0;
  border-bottom: 1px solid #dce9ec;
  background: #f3f8f9 !important;
  color: #5f7783 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  text-align: left;
}

.daily-patients-table td {
  min-height: 58px;
  padding: 12px 18px;
  border: 0;
  border-bottom: 1px solid #e7eff1;
  color: #36515e;
  font-size: 13px;
  font-weight: 700;
}

.daily-patients-table tbody tr:last-child td {
  border-bottom: 0;
}

.daily-patients-table tbody tr:hover {
  background: color-mix(in srgb, var(--section-soft) 62%, #ffffff);
}

.daily-patients-table td:first-child {
  min-width: 230px;
}

.daily-patients-table td:last-child,
.daily-patients-table th:last-child {
  text-align: center;
}

.daily-patient-name,
.daily-patients-table td:first-child small {
  display: block;
}

.daily-patient-name {
  color: #183b4d;
  font-weight: 900;
}

.daily-patients-table td:first-child small {
  margin-top: 3px;
  color: #8a9da5;
  font-size: 10px;
  font-weight: 750;
}

.daily-patient-time {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 9px;
  background: #eef6f8;
  color: #37606f;
  font-weight: 900;
}

.daily-patient-justification,
.daily-patient-procedure {
  color: #4f6873;
  line-height: 1.35;
}

.daily-patients-empty {
  height: 92px;
  color: #82959d !important;
  font-weight: 750 !important;
  text-align: center !important;
}

.daily-patients-table .queue-icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

@media (max-width: 920px) {
  .daily-patients-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .daily-patients-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .daily-patients-date-field {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .daily-patients-page {
    width: calc(100% - 20px);
    padding-top: 12px;
  }

  .daily-patients-hero {
    padding: 22px 18px;
    border-radius: 19px;
  }

  .daily-patients-metrics {
    grid-template-columns: 1fr;
  }

  .daily-patients-card > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .daily-patients-card > header > strong {
    align-self: flex-start;
  }
}

/* Central principal de assinaturas em tela inteira */
.pending-signatures-layer {
  padding: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  background: #f5fbfb;
  backdrop-filter: none;
}

.pending-signatures-card {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: clamp(22px, 2.6vw, 38px);
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 96% 0%, rgba(13, 183, 204, .1), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, #f5fbfb 100%);
  box-shadow: none;
  contain: layout paint;
}

.pending-signatures-card > .dialog-close-button {
  top: clamp(17px, 2vw, 28px);
  right: clamp(17px, 2vw, 28px);
}

.pending-signatures-card .pending-signatures-list {
  padding-bottom: 24px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

@media (max-width: 720px) {
  .pending-signatures-layer {
    padding: 0;
  }

  .pending-signatures-card {
    width: 100%;
    height: 100%;
    padding: 20px 16px;
    border-radius: 0;
  }
}

/* Central de assinaturas — cards de mapas */
.pending-signatures-list.is-map-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 315px));
  gap: 18px;
  align-content: start;
  justify-content: start;
  padding: 4px 6px 10px 2px;
}

.pending-signature-map-card {
  position: relative;
  min-height: 330px;
  aspect-ratio: 1 / 1;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #cfe4e6;
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 0%, rgba(13, 183, 204, .13), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, .99), rgba(248, 253, 252, .97));
  box-shadow: 0 16px 36px rgba(11, 34, 53, .08);
  contain: layout paint;
  transition: border-color .15s ease;
}

.pending-signature-map-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  height: 5px;
  background: linear-gradient(90deg, #13b7cc, #9bd600);
}

.pending-signature-map-card.is-signed::before {
  background: linear-gradient(90deg, #0a9c74, #77c947);
}

.pending-signature-map-card:hover {
  border-color: rgba(13, 183, 204, .48);
}

.pending-signature-map-open {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 19px 12px;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.pending-signature-map-open:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(13, 183, 204, .28);
}

.pending-signature-map-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pending-signature-map-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid #bfeceb;
  border-radius: 18px;
  background: linear-gradient(135deg, #e4fbf9, #f7fff0);
  color: #007f73;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .74);
}

.pending-signature-map-icon svg {
  width: 25px;
  height: 25px;
}

.pending-signature-map-card .pending-signature-status {
  margin-top: 3px;
}

.pending-signature-map-card.is-signed .pending-signature-status {
  background: #e8f8ef;
  color: #188052;
}

.pending-signature-map-card.is-signed .pending-signature-status i {
  background: #1da866;
  box-shadow: 0 0 0 3px rgba(29, 168, 102, .13);
}

.pending-signature-map-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.pending-signature-map-copy small,
.pending-signature-map-value small,
.pending-signature-map-specialties > span:first-child small {
  color: #079b9e;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .1em;
}

.pending-signature-map-copy > strong {
  color: #103a48;
  font-size: 20px;
  font-weight: 950;
  line-height: 1.15;
}

.pending-signature-map-copy em {
  overflow: hidden;
  color: #748991;
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pending-signature-map-value {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid #cbe6e2;
  border-radius: 15px;
  background: linear-gradient(135deg, #eef9f7, #f5fbff);
}

.pending-signature-map-value strong {
  color: #087d65;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -.025em;
}

.pending-signature-map-specialties {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.pending-signature-map-specialties > span:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pending-signature-map-specialties > span:first-child b {
  color: #4d6974;
  font-size: 8px;
  font-weight: 900;
  white-space: nowrap;
}

.pending-signature-map-tags {
  min-height: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.pending-signature-map-tags i {
  max-width: 100%;
  overflow: hidden;
  padding: 5px 8px;
  border: 1px solid #d5e7e8;
  border-radius: 999px;
  background: #f7fbfb;
  color: #52717b;
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.pending-signature-map-bottom {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 0 17px 17px;
}

.pending-signature-map-bottom > footer {
  padding: 0;
}

.pending-signature-map-card .pending-signature-sign-action {
  width: auto;
  min-width: 104px;
  min-height: 38px;
  display: inline-grid;
  grid-template-columns: 16px auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #0e92bf, #00a676);
  color: #fff;
  box-shadow: 0 9px 18px rgba(0, 127, 115, .16);
  font-size: 9px;
  font-weight: 950;
}

.pending-signature-map-card .pending-signature-sign-action svg {
  width: 15px;
  height: 15px;
}

.pending-signature-map-card .pending-signature-sign-action:hover {
  background: linear-gradient(135deg, #007ca5, #008d68);
}

.pending-signature-map-card .pending-signature-sign-action:disabled {
  background: #e8f0ef;
  color: #6f8984;
  box-shadow: none;
}

/* Busca de pacientes da tela inicial em formato de cards no celular */
@media (max-width: 680px) {
  [data-view-panel="Resumo"] .patient-home-widget .table-wrap {
    overflow: visible;
  }

  [data-view-panel="Resumo"] .patient-home-widget table,
  [data-view-panel="Resumo"] .patient-home-widget tbody {
    width: 100%;
    display: block;
  }

  [data-view-panel="Resumo"] .patient-home-widget thead {
    display: none;
  }

  [data-view-panel="Resumo"] .patient-home-widget tbody {
    display: grid;
    gap: 10px;
    padding: 0 10px 12px;
    box-sizing: border-box;
  }

  [data-view-panel="Resumo"] .patient-home-widget tbody tr {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px 12px;
    padding: 14px;
    box-sizing: border-box;
    border: 1px solid #cfe3e6;
    border-radius: 16px;
    background: linear-gradient(145deg, #ffffff, #f3faf9);
    box-shadow: 0 8px 20px rgba(12, 65, 76, .07);
  }

  [data-view-panel="Resumo"] .patient-home-widget tbody td {
    width: auto !important;
    min-width: 0;
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 13px;
    text-align: left;
    overflow-wrap: normal;
    word-break: normal;
  }

  [data-view-panel="Resumo"] .patient-home-widget .home-patient-name {
    grid-column: 1 / -1;
    padding-bottom: 10px;
    border-bottom: 1px solid #dcebed;
  }

  [data-view-panel="Resumo"] .patient-home-widget .patient-cell {
    align-items: center;
    gap: 11px;
  }

  [data-view-panel="Resumo"] .patient-home-widget .avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    font-size: 12px;
  }

  [data-view-panel="Resumo"] .patient-home-widget .patient-cell > div {
    min-width: 0;
  }

  [data-view-panel="Resumo"] .patient-home-widget .patient-cell strong,
  [data-view-panel="Resumo"] .patient-home-widget .patient-cell small {
    display: block;
    overflow-wrap: normal;
    word-break: normal;
  }

  [data-view-panel="Resumo"] .patient-home-widget .patient-cell strong {
    color: #123a49;
    font-size: 15px;
    font-weight: 950;
    line-height: 1.3;
  }

  [data-view-panel="Resumo"] .patient-home-widget .patient-cell small {
    margin-top: 3px;
    color: #71878f;
    font-size: 10px;
  }

  [data-view-panel="Resumo"] .patient-home-widget td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: #7b9198;
    font-size: 8px;
    font-weight: 950;
    letter-spacing: .09em;
    text-transform: uppercase;
  }

  [data-view-panel="Resumo"] .patient-home-widget .home-patient-record,
  [data-view-panel="Resumo"] .patient-home-widget .home-patient-cpf {
    grid-column: 1;
    color: #244b59;
    font-weight: 850;
  }

  [data-view-panel="Resumo"] .patient-home-widget .home-patient-action {
    grid-column: 2;
    grid-row: 2 / span 2;
    align-self: end;
    justify-self: end;
    width: max-content !important;
  }

  [data-view-panel="Resumo"] .patient-home-widget .open-record-button {
    width: auto;
    min-width: 104px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 11px;
    line-height: 1.1;
    white-space: nowrap;
  }

  [data-view-panel="Resumo"] .patient-home-widget .empty-table-cell {
    grid-column: 1 / -1;
    padding: 18px;
    text-align: center;
  }
}

.pending-signature-detail-card {
  width: min(730px, 100%);
}

.pending-signature-detail-specialties {
  overflow: hidden;
  border: 1px solid #d8e7ea;
  border-radius: 17px;
  background: #fff;
}

.pending-signature-detail-specialties > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 17px;
  border-bottom: 1px solid #dce9eb;
  background: linear-gradient(90deg, #f7fcfb, #edf9f6);
}

.pending-signature-detail-specialties > header small {
  display: block;
  color: #079b9e;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .1em;
}

.pending-signature-detail-specialties > header h3 {
  margin: 3px 0 0;
  color: #153d4d;
  font-size: 15px;
  font-weight: 950;
}

.pending-signature-detail-specialties > header > b {
  min-width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: #0a9895;
  color: #fff;
  font-size: 10px;
  font-weight: 950;
}

.pending-signature-detail-specialties > div {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.pending-signature-detail-specialties article {
  min-height: 51px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 12px;
  border: 1px solid #e0eaec;
  border-radius: 12px;
  background: #fafdfd;
}

.pending-signature-detail-specialties article > span {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pending-signature-detail-specialties article i {
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #e7f7f4;
  color: #08887f;
  font-size: 9px;
  font-style: normal;
  font-weight: 950;
}

.pending-signature-detail-specialties article strong {
  overflow: hidden;
  color: #2d5361;
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.pending-signature-detail-specialties article > b {
  color: #087e63;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.pending-signature-detail-specialties > div > p {
  margin: 0;
  padding: 13px;
  border: 1px dashed #cbdfe3;
  border-radius: 11px;
  color: #6f858d;
  font-size: 9px;
  text-align: center;
}

.pending-signature-detail-specialties > footer {
  min-height: 55px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 17px;
  border-top: 1px solid #cfe5df;
  background: #eaf8f3;
}

.pending-signature-detail-specialties > footer span {
  color: #497467;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.pending-signature-detail-specialties > footer strong {
  color: #087d59;
  font-size: 16px;
  font-weight: 950;
}

.pending-signature-detail-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 1px;
}

.pending-signature-detail-sign {
  min-height: 40px;
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #0e92bf, #00a676);
  color: #fff;
  box-shadow: 0 9px 18px rgba(0, 127, 115, .16);
  cursor: pointer;
  font-size: 9px;
  font-weight: 950;
}

.pending-signature-detail-sign svg {
  width: 16px;
  height: 16px;
}

.pending-signature-detail-sign:disabled {
  background: #e8f0ef;
  color: #6f8984;
  box-shadow: none;
  cursor: default;
}

@media (max-width: 720px) {
  .pending-signatures-list.is-map-grid {
    grid-template-columns: 1fr;
    padding-inline: 0;
  }

  .pending-signature-map-card {
    min-height: 0;
    aspect-ratio: auto;
  }

  .pending-signature-detail-specialties article strong {
    white-space: normal;
  }

  .pending-signature-detail-actions,
  .pending-signature-detail-sign {
    width: 100%;
  }
}

/* Dashboard operacional — padrão Tec Dent */
[data-view-panel="Resumo"].dashboard-home {
  gap: 0;
  background:
    radial-gradient(circle at 94% 5%, rgba(20, 184, 191, .10), transparent 28%),
    linear-gradient(180deg, #e2ebee 0, #e8edef 620px);
}

.home-dashboard-header {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 16px 28px;
  padding: 18px 24px;
  border-radius: 19px;
  background: linear-gradient(115deg, #063b69 0%, #087ab0 58%, #12b9b0 100%);
  color: #fff;
  box-shadow: 0 14px 32px rgba(5, 63, 105, .18);
  position: relative;
  overflow: hidden;
}

.home-dashboard-header::after {
  content: "";
  width: 210px;
  height: 210px;
  position: absolute;
  right: 130px;
  top: -145px;
  border: 34px solid rgba(255,255,255,.08);
  border-radius: 50%;
}

.home-dashboard-header > * { position: relative; z-index: 1; }
.home-dashboard-header span {
  color: #9ff4e8;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.home-dashboard-header h1 {
  margin: 3px 0 4px;
  color: #fff;
  font-size: 25px;
  font-weight: 950;
  letter-spacing: -.02em;
}
.home-dashboard-header p {
  margin: 0;
  color: rgba(255,255,255,.8);
  font-size: 12px;
  font-weight: 650;
}
.home-dashboard-context {
  min-width: 220px;
  display: grid;
  gap: 3px;
  justify-items: end;
  padding: 11px 14px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 13px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(5px);
}
.home-dashboard-context small {
  color: #bdf8ef;
  font-size: 10px;
  font-weight: 900;
}
.home-dashboard-context strong {
  max-width: 300px;
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-view-panel="Resumo"] .home-board-grid {
  gap: 16px;
  padding: 0 28px 32px;
}

[data-view-panel="Resumo"] .home-side-stack { gap: 16px; }
[data-view-panel="Resumo"] .home-compact-row { gap: 16px; }

[data-view-panel="Resumo"] .home-board {
  border: 1px solid #d8e8ec;
  border-top: 4px solid #e5a019;
  border-radius: 17px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 10px 26px rgba(14, 52, 75, .07);
  overflow: hidden;
}

[data-view-panel="Resumo"] .home-board.is-attending { border-top-color: #18aec0; }
[data-view-panel="Resumo"] .home-board.patient-home-widget { border-top-color: #13a977; }
[data-view-panel="Resumo"] .home-board.is-negatives { border-top-color: #e2574d; }
[data-view-panel="Resumo"] .home-board.is-day-info { border-top-color: #168abe; }

[data-view-panel="Resumo"] .home-board-header {
  min-height: 54px;
  padding: 10px 14px;
  border-bottom: 1px solid #e1ecef;
  background: linear-gradient(180deg, #fff, #fbfdfd);
}

[data-view-panel="Resumo"] .home-board-header h2,
[data-view-panel="Resumo"] .patient-home-widget .home-panel-header h2,
[data-view-panel="Resumo"] .home-compact-row .home-board-header h2 {
  margin: 0;
  color: #17364c;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -.01em;
}

[data-view-panel="Resumo"] :is(.home-board-action, .home-square-action, .patient-home-widget .primary-action) {
  min-height: 36px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #168fc1, #10adbd);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(18, 142, 177, .18);
}

[data-view-panel="Resumo"] .home-square-action {
  width: 36px;
  height: 36px;
}

[data-view-panel="Resumo"] .home-table-wrap { padding: 0 10px 12px; }
[data-view-panel="Resumo"] .home-mini-table {
  border-collapse: separate;
  border-spacing: 0 7px;
}

[data-view-panel="Resumo"] .home-mini-table th,
[data-view-panel="Resumo"] :is(.home-waiting-table, .home-attending-table) thead th {
  height: 34px;
  padding: 7px 8px;
  border: 0;
  background: transparent;
  color: #667d8b;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .055em;
  text-transform: uppercase;
}

[data-view-panel="Resumo"] .home-mini-table td {
  height: 48px;
  padding: 8px 10px;
  border-width: 1px 0;
  border-style: solid;
  border-color: #e1ecef;
  background: #f7fafb;
  color: #17364c;
  font-size: 12px;
  font-weight: 700;
}
[data-view-panel="Resumo"] .home-mini-table td:first-child {
  border-left-width: 1px;
  border-radius: 11px 0 0 11px;
}
[data-view-panel="Resumo"] .home-mini-table td:last-child {
  border-right-width: 1px;
  border-radius: 0 11px 11px 0;
}
[data-view-panel="Resumo"] .home-mini-table .empty-table-cell {
  height: 68px;
  border: 1px dashed #cfe1e5;
  border-radius: 11px;
  background: #fbfdfd;
  color: #758995;
  font-weight: 650;
}

[data-view-panel="Resumo"] .home-mini-search {
  height: 42px;
  margin: 0 14px 12px;
  border-color: #ccdee3;
  border-radius: 11px;
  background: #fbfdfd;
}
[data-view-panel="Resumo"] .home-mini-search:focus-within {
  border-color: #20b8c3;
  outline: 3px solid rgba(25, 180, 193, .11);
}

[data-view-panel="Resumo"] .home-finance-metrics { gap: 10px; }
[data-view-panel="Resumo"] .home-finance-metric {
  min-height: 84px;
  border: 1px solid #dbe8ec;
  border-left: 5px solid #d4dde6;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 9px 22px rgba(15, 55, 70, .07);
}
[data-view-panel="Resumo"] .home-finance-metric small {
  color: #617684;
  font-size: 9px;
  letter-spacing: .045em;
}
[data-view-panel="Resumo"] .home-finance-metric strong { font-size: 19px; }
[data-view-panel="Resumo"] .home-finance-metric.is-budget { border-left-color: #e5a019; }
[data-view-panel="Resumo"] .home-finance-metric.is-income { border-left-color: #13a977; }
[data-view-panel="Resumo"] .home-finance-metric.is-outcome { border-left-color: #e2574d; }

[data-view-panel="Resumo"] .home-day-info-list { padding: 10px 12px 12px; }
[data-view-panel="Resumo"] .home-day-info-list button {
  min-height: 38px;
  border-color: #d9e8ec;
  border-radius: 10px;
  background: #f7fbfc;
}

[data-view-panel="Resumo"] .home-negative-scroll { padding: 10px 12px 12px; }

@media (max-width: 760px) {
  .home-dashboard-header {
    align-items: flex-start;
    flex-direction: column;
    margin: 12px 11px;
    padding: 17px;
  }
  .home-dashboard-context { width: 100%; min-width: 0; justify-items: start; box-sizing: border-box; }
  [data-view-panel="Resumo"] .home-board-grid { padding: 0 11px 22px; }
}

/* Cadastro de usuários - identidade Tec Dent e lista compacta */
[data-view-panel="CadastroUsuarios"] .access-manager-shell {
  background: linear-gradient(180deg, #f3f9fb 0, #ffffff 350px);
}

[data-view-panel="CadastroUsuarios"] .access-manager-header {
  min-height: 104px;
  align-items: center;
  margin: 16px 22px 0;
  padding: 16px 18px 16px 24px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(115deg, #063b69 0%, #087ab0 58%, #12b9b0 100%);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(5,63,105,.18);
  position: relative;
  overflow: hidden;
}

[data-view-panel="CadastroUsuarios"] .access-manager-header::after {
  content: "";
  width: 190px;
  height: 190px;
  position: absolute;
  right: 80px;
  top: -125px;
  border: 30px solid rgba(255,255,255,.08);
  border-radius: 50%;
}

[data-view-panel="CadastroUsuarios"] .access-manager-header > div,
[data-view-panel="CadastroUsuarios"] .access-manager-header > button {
  position: relative;
  z-index: 1;
}

[data-view-panel="CadastroUsuarios"] .access-manager-header small {
  color: #9ff4e8;
  font-size: 10px;
  letter-spacing: .13em;
}

[data-view-panel="CadastroUsuarios"] .access-manager-header h2 {
  margin: 2px 0 3px;
  color: #ffffff;
  font-size: 22px;
}

[data-view-panel="CadastroUsuarios"] .access-manager-header p {
  color: rgba(255,255,255,.78);
  font-size: 12px;
}

[data-view-panel="CadastroUsuarios"] .access-manager-header .dialog-close-button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 11px;
  background: rgba(255,255,255,.15);
  color: #ffffff;
}

[data-view-panel="CadastroUsuarios"] .access-manager-layout {
  padding: 14px 22px 30px;
  background: transparent;
}

[data-view-panel="CadastroUsuarios"] .access-list-panel {
  gap: 12px;
  padding: 16px;
  border: 1px solid #d9e9ee;
  border-radius: 17px;
  background: #ffffff;
  box-shadow: 0 9px 26px rgba(14,52,75,.07);
}

[data-view-panel="CadastroUsuarios"] .access-list-toolbar {
  min-height: 58px;
  padding: 7px 8px 10px;
  border-bottom: 1px solid #e0ebef;
}

[data-view-panel="CadastroUsuarios"] .access-list-header strong {
  color: #083b65;
  font-size: 17px;
}

[data-view-panel="CadastroUsuarios"] .access-list-header small {
  padding: 5px 9px;
  border-radius: 8px;
  background: #f1f7f9;
  color: #607684;
  font-size: 10px;
}

[data-view-panel="CadastroUsuarios"] .access-list-toolbar .save-action {
  min-height: 42px;
  border-radius: 11px;
  background: linear-gradient(110deg, #0878b0, #12ad9e);
  box-shadow: 0 7px 16px rgba(8,117,160,.18);
}

[data-view-panel="CadastroUsuarios"] .access-list-panel-full .access-user-list {
  max-height: calc(100vh - 300px);
  gap: 7px;
}

[data-view-panel="CadastroUsuarios"] .access-user-card {
  grid-template-columns: 42px minmax(0,1fr) auto auto;
  gap: 11px;
  min-height: 64px;
  padding: 9px 11px;
  border: 1px solid #dce9ed;
  border-radius: 12px;
  background: #f8fbfc;
}

[data-view-panel="CadastroUsuarios"] .access-user-card:hover {
  border-color: #b8ddd8;
  background: #ffffff;
}

[data-view-panel="CadastroUsuarios"] .access-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #dff8f4, #e8f7fb);
  color: #087b6b;
}

[data-view-panel="CadastroUsuarios"] .access-user-info {
  display: block;
}

[data-view-panel="CadastroUsuarios"] .access-user-primary {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

[data-view-panel="CadastroUsuarios"] .access-user-primary > strong {
  color: #083b65;
  font-size: 14px;
}

[data-view-panel="CadastroUsuarios"] .access-user-primary > span {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid #cfe1e6;
  border-radius: 8px;
  background: #f1f7f9;
  color: #607684;
  font-size: 10px;
}

[data-view-panel="CadastroUsuarios"] .access-linked-professional {
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid #bde7e1;
  border-radius: 9px;
  background: #eaf9f6;
  color: #087b68 !important;
  font-size: 11px !important;
}

[data-view-panel="CadastroUsuarios"] .access-linked-professional b {
  font-size: 13px;
}

[data-view-panel="CadastroUsuarios"] .access-icon-button.is-edit {
  border-color: #bde7e1;
  background: #eaf9f6;
  color: #078d79;
}

[data-view-panel="CadastroUsuarios"] .access-icon-button.is-delete {
  border-color: #efcccc;
  background: #fff2f2;
  color: #bd3e3e;
}

[data-view-panel="CadastroUsuarios"] .access-form-layer {
  padding: 16px 22px 30px;
  background: linear-gradient(180deg, #f3f9fb, #ffffff);
}

[data-view-panel="CadastroUsuarios"] .access-form-card {
  width: min(1100px,100%);
  min-height: 0;
  margin: 0 auto;
  padding: 22px;
  border: 1px solid #d9e8ed;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(14,52,75,.08);
}

[data-view-panel="CadastroUsuarios"] .access-form-heading {
  padding: 14px 16px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(110deg, #edf9f7, #f2f8fb);
}

@media (max-width: 720px) {
  [data-view-panel="CadastroUsuarios"] .access-manager-header {
    margin: 10px 10px 0;
    border-radius: 15px;
  }

  [data-view-panel="CadastroUsuarios"] .access-manager-layout,
  [data-view-panel="CadastroUsuarios"] .access-form-layer {
    padding: 10px;
  }

  [data-view-panel="CadastroUsuarios"] .access-list-toolbar {
    grid-template-columns: 1fr;
  }

  [data-view-panel="CadastroUsuarios"] .access-list-toolbar .save-action {
    width: 100%;
  }

  [data-view-panel="CadastroUsuarios"] .access-user-card {
    grid-template-columns: 40px minmax(0,1fr) auto;
  }

  [data-view-panel="CadastroUsuarios"] .access-list-switch {
    grid-column: 2;
    justify-self: start;
  }

  [data-view-panel="CadastroUsuarios"] .access-list-actions {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}

/* Balões do orçamento - identidade Tec Dent */
.budget-procedure-dialog {
  width: min(1120px, calc(100vw - 32px));
  border-radius: 18px;
}

.budget-procedure-dialog::backdrop,
.tooth-selector-dialog::backdrop,
.budget-specialty-balance-dialog::backdrop,
.budget-confirm-dialog::backdrop {
  background: rgba(3, 27, 46, .62);
  backdrop-filter: blur(3px);
}

.budget-procedure-dialog .budget-procedure-panel {
  min-height: 0;
  padding: 0 18px 18px;
  border: 1px solid #d8e8ed;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(2,30,50,.32);
}

.budget-procedure-header {
  min-height: 82px;
  margin: 0 -18px 16px;
  padding: 12px 17px 12px 22px;
  border: 0;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(115deg, #063b69 0%, #087ab0 58%, #12b9b0 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.budget-procedure-header::after {
  content: "";
  width: 150px;
  height: 150px;
  position: absolute;
  right: 68px;
  top: -105px;
  border: 23px solid rgba(255,255,255,.08);
  border-radius: 50%;
}

.budget-procedure-header > div,
.budget-procedure-header > button {
  position: relative;
  z-index: 1;
}

.budget-procedure-header span {
  display: block;
  margin-bottom: 2px;
  color: #9ff4e8;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.budget-procedure-header h2 {
  color: #ffffff;
  font-size: 20px;
  font-weight: 850;
}

.budget-procedure-header button,
.budget-specialty-balance-header button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 11px;
  background: rgba(255,255,255,.15);
  color: #ffffff;
  font-size: 24px;
  backdrop-filter: blur(8px);
}

.budget-professional-add {
  min-height: 68px;
  grid-template-columns: minmax(220px, 300px) minmax(0,1fr);
  gap: 18px;
  margin-bottom: 13px;
  padding: 11px 14px;
  border: 1px solid #cfe7e2;
  border-radius: 13px;
  background: #f0faf8;
}

.budget-professional-add span {
  color: #527080;
  font-size: 10px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.budget-professional-add input,
.budget-add-table input,
.budget-add-table select {
  min-height: 40px;
  border-color: #cfdee4;
  border-radius: 10px;
  color: #123a52;
}

.budget-add-table-wrap {
  padding: 4px 8px 8px;
  border: 1px solid #dce9ed;
  border-radius: 14px;
  background: #fbfdfd;
}

.budget-add-table {
  border-collapse: separate;
  border-spacing: 0 6px;
}

.budget-add-table th {
  height: 34px;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  color: #6a7e8b;
  font-size: 9px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.budget-add-table td {
  padding: 5px;
  border-width: 1px 0;
  border-color: #e1ecef;
  background: #ffffff;
}

.budget-add-table tbody td:first-child,
.budget-add-table tfoot td:first-child {
  border-left-width: 1px;
  border-radius: 10px 0 0 10px;
}

.budget-add-table tbody td:last-child,
.budget-add-table tfoot td:last-child {
  border-right-width: 1px;
  border-radius: 0 10px 10px 0;
}

#budgetAddRows tr:nth-child(even) td,
.budget-add-table tfoot td,
.budget-add-table tfoot tr:last-child td {
  background: #f7fafb;
}

.budget-add-table .budget-add-discount-label,
.budget-add-total-label {
  color: #607684;
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.budget-add-total-label {
  color: #083b65;
}

.budget-tooth-trigger {
  min-height: 40px;
  border-radius: 10px;
  background: #eaf7fb;
  color: #08739e;
}

.budget-add-delete {
  width: 34px;
  height: 34px;
  border: 1px solid #efcccc;
  border-radius: 10px;
  background: #fff2f2;
  color: #bd3e3e;
}

.budget-apply-discount,
.budget-add-inline {
  min-height: 40px;
  border-radius: 10px;
  background: #0877ad;
}

.budget-add-inline {
  margin-top: 12px;
  padding: 0 16px;
}

.budget-procedure-actions {
  gap: 8px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid #e1ebee;
}

.budget-procedure-actions button,
.budget-confirm-actions button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
}

.tooth-selector-dialog {
  border-radius: 18px;
}

.tooth-selector-panel {
  border: 1px solid #d8e8ed;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(2,30,50,.32);
}

.tooth-selector-header,
.budget-specialty-balance-header {
  min-height: 78px;
  border: 0;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(115deg, #063b69 0%, #087ab0 58%, #12b9b0 100%);
  color: #ffffff;
}

.tooth-selector-header span,
.budget-specialty-balance-header span {
  color: #9ff4e8;
  font-size: 9px;
  letter-spacing: .12em;
}

.tooth-selector-header h2,
.budget-specialty-balance-header h2 {
  color: #ffffff;
  font-size: 20px;
}

.tooth-selector-controls {
  margin: 14px 18px;
  padding: 12px;
  border: 1px solid #dce9ed;
  border-radius: 13px;
  background: #f7fbfc;
}

.tooth-section {
  border-radius: 14px;
  box-shadow: 0 7px 18px rgba(14,52,75,.05);
}

.tooth-selector-actions {
  gap: 8px;
  margin-top: 14px;
  padding: 13px 18px 17px;
}

.tooth-selector-actions button {
  min-height: 40px;
  border-radius: 10px;
  box-shadow: none;
}

.budget-specialty-balance-dialog {
  border-radius: 18px;
}

.budget-specialty-balance-panel {
  padding: 0 18px 18px;
  border: 1px solid #d8e8ed;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(2,30,50,.32);
}

.budget-specialty-balance-header {
  margin: 0 -18px 14px;
  padding: 0 18px 0 22px;
}

.budget-specialty-balance-card {
  border-radius: 13px;
  background: #f1faf7;
}

.budget-specialty-balance-actions button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  background: linear-gradient(110deg, #0878b0, #12ad9e);
}

.budget-confirm-dialog {
  border-radius: 17px;
}

.budget-confirm-panel {
  display: grid;
  justify-items: center;
  padding: 24px;
  border: 1px solid #eadede;
  border-radius: 17px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(2,30,50,.32);
}

.budget-confirm-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  border: 1px solid #f0caca;
  border-radius: 13px;
  background: #fff1f1;
  color: #bd3e3e;
  font-size: 22px;
  font-weight: 900;
}

.budget-confirm-panel h2 {
  color: #083b65;
  font-weight: 850;
}

.budget-confirm-panel p {
  color: #607684;
}

.budget-confirm-actions {
  width: 100%;
  justify-content: center;
}

@media (max-width: 720px) {
  .budget-professional-add {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .budget-procedure-actions,
  .tooth-selector-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .budget-procedure-actions button,
  .tooth-selector-actions button {
    width: 100%;
  }
}

.budget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.budget-header h2 {
  margin-top: 4px;
  color: #172534;
  font-size: 23px;
  font-weight: 500;
}

.budget-detail-view {
  display: grid;
  gap: 18px;
}

body.budget-fullscreen .budget-detail-view {
  display: grid;
}

.budget-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid #d9e2e0;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f6faf9 100%);
  box-shadow: 0 10px 24px rgba(18, 42, 54, 0.06);
}

.budget-detail-header span {
  display: block;
  color: #5e6d78;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.budget-detail-header h2 {
  margin: 3px 0 0;
  color: #071a2d;
  font-size: 26px;
  line-height: 1.1;
}

.budget-detail-header h2 b {
  color: #198ed8;
}

.budget-detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.budget-detail-actions button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 6px;
  padding: 0 13px;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

.budget-detail-actions svg {
  width: 17px;
  height: 17px;
}

.budget-light-action {
  background: #64748b;
}

.budget-light-action svg {
  transform: rotate(180deg);
}

.budget-primary-action {
  background: #2d8fd6;
}

.budget-pay-action {
  background: #16a34a;
}

.budget-save-action {
  background: #0f5f94;
}

.budget-detail-form-grid {
  padding: 18px;
  border: 1px solid #d9e2e0;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(45, 143, 214, 0.05), rgba(34, 197, 94, 0.04)), #ffffff;
  box-shadow: 0 10px 24px rgba(18, 42, 54, 0.06);
}

.budget-detail-form-grid textarea {
  min-height: 82px;
  resize: vertical;
}

.budget-procedure-panel {
  display: grid;
  gap: 12px;
  padding: 0;
}

.procedure-title h2 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.procedure-title h2 svg {
  width: 20px;
  height: 20px;
  color: #172534;
}

.procedure-card-list {
  display: grid;
  gap: 8px;
  height: auto;
  max-height: none;
  overflow: visible;
}

#budgetProcedureRows,
.budget-procedure-panel,
.budget-detail-view .procedure-card,
body.budget-fullscreen #budgetProcedureRows,
body.budget-fullscreen .budget-procedure-panel,
body.budget-fullscreen .budget-detail-view .procedure-card {
  height: auto;
  max-height: none;
  overflow: visible;
}

.budget-modern-total {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  border: 1px solid #b8dfad;
  border-radius: 8px;
  background: #eef9ea;
  padding: 8px 12px;
  color: #008000;
  font-weight: 900;
}

.budget-footer-add-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-right: auto;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #1f93d2, #176fa8);
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(31, 147, 210, 0.24);
}

.budget-footer-add-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(31, 147, 210, 0.3);
}

.budget-footer-add-button svg {
  width: 18px;
  height: 18px;
}

.budget-modern-total input {
  width: min(220px, 48vw);
  height: 34px;
  border: 1px solid #c6d7c5;
  border-radius: 7px;
  background: #ffffff;
  color: #0000ff;
  font-weight: 900;
  text-align: center;
}

@media (max-width: 1180px) {
  .budget-detail-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .budget-detail-actions {
    justify-content: flex-start;
  }

  .budget-procedure-item {
    grid-template-columns: minmax(0, 1fr) 132px 156px;
  }

  .budget-procedure-values {
    grid-column: 1 / -1;
  }

  .budget-procedure-actions {
    grid-column: 3;
  }
}

@media (max-width: 760px) {
  .procedure-balance-strip {
    grid-template-columns: 1fr;
  }

  .budget-procedure-item {
    grid-template-columns: 1fr;
  }

  .budget-procedure-marker,
  .budget-procedure-actions {
    justify-content: flex-start;
  }

  .budget-procedure-values {
    grid-template-columns: 1fr;
  }
}

.budget-list-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.procedure-table-wrap {
  width: 100%;
  overflow: visible;
}

.budget-list-table,
.procedure-table {
  width: 100%;
  border-collapse: collapse;
}

.budget-list-table {
  min-width: 760px;
}

.budget-list-table th,
.budget-list-table td {
  padding: 12px 10px;
  border: 1px solid #d8d8d8;
  text-align: center;
}

.budget-list-table th {
  background: #dcdcdc;
  color: #111111;
  font-size: 13px;
  text-transform: uppercase;
}

.budget-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 4px;
  background: #d8f0cf;
  color: #1f6c25;
  font-weight: 800;
  text-transform: uppercase;
}

.budget-list-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: center;
}

.budget-pay-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: #32a852;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.patient-payment-panel {
  display: grid;
  gap: 18px;
}

.patient-payment-panel.is-hidden {
  display: none;
}

.section-header.patient-payment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #dfe8e6;
}

.patient-payment-header span {
  display: block;
  color: #65737f;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.patient-payment-header h2 {
  margin: 3px 0 0;
  color: #071a2d;
  font-size: 24px;
}

.patient-payment-header strong {
  padding: 10px 14px;
  border: 1px solid #c9ead0;
  border-radius: 999px;
  background: #eef9ea;
  color: #145f2d;
  white-space: nowrap;
}

.patient-payment-header b {
  color: #008000;
}

.patient-payment-list,
.patient-payment-section,
.patient-payment-budget-list,
.patient-payment-history-list {
  display: grid;
  gap: 10px;
}

.patient-payment-section h3 {
  margin: 0;
  color: #102235;
  font-size: 18px;
}

.patient-payment-budget-card,
.patient-payment-history-card {
  display: grid;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d5e5e2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 45, 56, 0.05);
}

.patient-payment-budget-card {
  grid-template-columns: minmax(150px, 1fr) repeat(3, minmax(110px, 0.7fr)) auto;
}

.patient-payment-history-card {
  grid-template-columns: minmax(150px, 1fr) minmax(130px, 0.9fr) minmax(130px, 0.9fr) minmax(110px, 0.65fr) minmax(140px, 0.85fr) auto;
}

.patient-payment-budget-card:nth-child(even),
.patient-payment-history-card:nth-child(even) {
  background: #f6faf9;
}

.patient-payment-budget-card div,
.patient-payment-history-card div {
  min-width: 0;
}

.patient-payment-budget-card span,
.patient-payment-history-card span {
  display: block;
  margin-bottom: 4px;
  color: #687887;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.patient-payment-budget-card strong,
.patient-payment-history-card strong {
  display: block;
  color: #0a1c2d;
  font-size: 14px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.patient-payment-budget-card small,
.patient-payment-history-card small {
  display: block;
  margin-top: 3px;
  color: #60717c;
  font-size: 12px;
  font-weight: 700;
}

.patient-payment-budget-card .is-green,
.patient-payment-history-card .is-green {
  color: #008000;
}

.patient-payment-budget-card .is-red {
  color: #e00000;
}

.patient-payment-action,
.patient-payment-secondary {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 15px;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(18, 42, 54, 0.12);
}

.patient-payment-action {
  background: #16a34a;
}

.patient-payment-secondary {
  background: #2d8fd6;
}

.patient-payment-empty {
  padding: 18px;
  border: 1px dashed #bed0dc;
  border-radius: 8px;
  background: #f8fbfc;
  color: #587087;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 1180px) {
  .patient-payment-budget-card,
  .patient-payment-history-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .patient-payment-action,
  .patient-payment-secondary {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .section-header.patient-payment-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .patient-payment-budget-card,
  .patient-payment-history-card {
    grid-template-columns: 1fr;
  }
}

.budget-register-page .professional-action-card {
  margin-bottom: 20px;
}

.budget-filter-card {
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
}

.budget-register-table {
  min-width: 980px;
}

.budget-payment-page {
  background: #ffffff;
}

.payment-content {
  padding-top: 20px;
}

.payment-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
  padding: 0 4px;
}

.payment-page-header .patients-title {
  margin: 0;
}

.payment-top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.payment-top-actions button {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(24, 32, 28, 0.12);
}

.budget-payment-shell {
  padding: 28px 22px 34px;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  background: linear-gradient(180deg, #eeeeee, #f8f8f8);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.payment-summary-inline {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 40px;
  margin: 0 0 18px;
}

.payment-summary-inline article {
  min-height: auto;
  display: flex;
  justify-content: center;
  gap: 32px;
  border: 0;
  background: transparent;
  color: #111820;
}

.payment-summary-inline span {
  text-transform: none;
}

.payment-summary-inline strong {
  color: #0047ff;
  font-size: 14px;
}

.payment-summary-inline .is-balance strong {
  color: #ff0000;
}

.payment-tabs {
  display: flex;
  align-items: flex-end;
  gap: 0;
  margin-bottom: 14px;
  border-bottom: 1px solid #dddddd;
}

.payment-tabs button {
  min-height: 41px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-bottom: 0;
  background: transparent;
  color: #2f7bd0;
  font-size: 14px;
  cursor: pointer;
}

.payment-tabs button.is-active {
  border-color: #dddddd;
  background: #ffffff;
  color: #1c1c1c;
}

.payment-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 28px;
  align-items: start;
  margin: 10px 0 20px;
  padding-right: 0;
}

.payment-form-grid label {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(155px, 210px) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.payment-form-grid span {
  color: #111820;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.payment-form-grid input,
.payment-form-grid select {
  width: 100%;
  height: 34px;
  min-width: 0;
  border: 1px solid #c9c9c9;
  border-radius: 4px;
  background: #ffffff;
  color: #26313a;
  padding: 0 12px;
}

.payment-form-grid input[type="checkbox"] {
  width: 13px;
  height: 13px;
  padding: 0;
}

.payment-form-grid .payment-wide-field input,
.payment-form-grid .payment-wide-field select {
  grid-column: auto;
}

.payment-form-grid .payment-method-field,
.payment-form-grid .payment-installments-field {
  grid-column: span 1;
}

.payment-form-grid .payment-amount-field {
  grid-column: span 1;
}

.payment-form-grid .payment-specialty-field,
.payment-form-grid .payment-note-field {
  grid-column: 1 / -1;
}

.payment-form-grid .payment-specialty-field select {
  max-width: 560px;
}

.payment-form-grid .payment-check-field input {
  justify-self: start;
}

.payment-specialty-available {
  grid-column: 2;
  margin-top: -4px;
  color: #16853b;
  font-size: 11px;
  font-weight: 800;
}

.payment-specialty-available.is-empty {
  color: #d23c32;
}

.payment-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 6px;
}

.payment-action-row > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.payment-action-row button,
.payment-section-header button {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
}

.payment-launch-card {
  padding: 18px 20px 20px;
  border: 1px solid #d9e3e9;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.budget-payment-shell .success-alert {
  display: grid;
  gap: 6px;
  margin: 12px 0 16px;
  padding: 18px 20px;
  border: 1px solid #a7dfab;
  border-left: 5px solid #20a34a;
  border-radius: 5px;
  background: #e9fae6;
  color: #16662e;
}

.budget-payment-shell .success-alert strong {
  font-size: 18px;
}

.budget-payment-shell .success-alert span {
  font-size: 13px;
  font-weight: 800;
}

.payment-ledger-list {
  display: grid;
  gap: 8px;
}

.payment-ledger-card {
  display: grid;
  grid-template-columns: minmax(170px, 1.15fr) minmax(120px, 0.75fr) minmax(82px, 0.5fr) minmax(120px, 0.7fr) minmax(145px, 0.75fr) minmax(120px, 0.7fr) 44px;
  align-items: center;
  gap: 10px;
  min-height: 70px;
  padding: 10px 12px;
  border: 1px solid #d5e1e7;
  border-radius: 6px;
  background: #ffffff;
}

.payment-ledger-card:nth-child(even) {
  background: #f3f6f8;
}

.payment-ledger-card div {
  min-width: 0;
}

.payment-ledger-card span {
  display: block;
  margin-bottom: 4px;
  color: #64717b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.payment-ledger-card strong {
  color: #111820;
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.payment-ledger-main strong {
  display: block;
  color: #04253c;
  font-size: 14px;
}

.payment-ledger-main span {
  color: #12734a;
}

.payment-ledger-card .payment-value-cell {
  color: #008000;
  font-size: 14px;
}

.payment-ledger-actions {
  display: flex;
  justify-content: center;
}

.payment-ledger-section,
.payment-transfer-section,
.payment-specialty-section {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #e0e0e0;
}

.payment-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.payment-section-header h3,
.payment-transfer-section h3,
.payment-specialty-section h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
}

.payment-section-header.is-received h3,
.payment-transfer-section.is-received h3,
.payment-specialty-section h3 {
  color: #00a95b;
}

.payment-transfer-section.is-sent h3 {
  color: #e64436;
}

.budget-payment-table .payment-value-cell {
  color: #008000;
  font-weight: 900;
}

.payment-empty-alert {
  width: min(835px, 100%);
  min-height: 52px;
  display: flex;
  align-items: center;
  margin: 28px auto 8px;
  padding: 0 16px;
  border: 1px solid #91cdf0;
  border-radius: 4px;
  background: #c8eaf8;
  color: #1f7198;
}

.payment-specialty-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 30px;
  margin-top: 22px;
}

.payment-specialty-card {
  border: 1px solid #c6e7bd;
  border-radius: 4px;
  background: #ffffff;
  overflow: hidden;
}

.payment-specialty-card h4 {
  margin: 0 0 14px;
  padding: 14px 16px;
  background: #d8f0cf;
  color: #1f6c25;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.payment-specialty-card p {
  margin: 0 16px 10px;
  color: #000000;
  font-size: 13px;
  font-weight: 800;
}

.payment-specialty-card .payment-specialty-balance {
  margin-bottom: 14px;
  padding: 6px 12px;
  background: #e6f3df;
  color: #1f6c25;
}

.print-budget-button {
  border: 0;
  background: transparent;
  color: #3f91d6;
  cursor: pointer;
}

.print-budget-button svg {
  width: 20px;
  height: 20px;
}

.budget-form-grid {
  display: grid;
  grid-template-columns: 160px minmax(220px, 280px) 180px minmax(220px, 280px);
  align-items: center;
  gap: 16px 32px;
  margin-bottom: 14px;
}

.budget-form-grid label {
  display: contents;
}

.budget-form-grid span {
  color: #111820;
  font-size: 14px;
  font-weight: 900;
  text-align: right;
}

.budget-form-grid input,
.budget-form-grid select,
.budget-form-grid textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #c9c9c9;
  border-radius: 4px;
  background: #ffffff;
  color: #26313a;
}

.budget-form-grid input,
.budget-form-grid select {
  height: 34px;
  padding: 0 12px;
}

.budget-form-grid textarea {
  resize: vertical;
  padding: 9px 12px;
}

.budget-form-grid strong {
  color: #111820;
}

.budget-wide-field {
  grid-column: 1 / -1;
}

.budget-wide-field span,
.budget-full-field span {
  grid-column: 1;
}

.budget-wide-field input,
.budget-full-field textarea {
  grid-column: 2 / -1;
}

.budget-full-field {
  grid-column: 1 / -1;
}

.budget-plus-button {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #3f91d6;
  color: #ffffff;
}

.budget-plus-button svg {
  width: 14px;
  height: 14px;
}

.budget-alert {
  max-width: 590px;
  min-height: 52px;
  display: flex;
  align-items: center;
  margin: 14px 0 24px 154px;
  padding: 12px 15px;
  border: 1px solid #8ed0ed;
  border-radius: 3px;
  background: #c8eafa;
  color: #186585;
  font-size: 14px;
}

.procedure-card,
.payment-conditions-card {
  margin-top: 18px;
}

.procedure-title,
.payment-conditions-card h2 {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
  padding: 0 10px;
  border-radius: 8px;
  background: #ffffff;
  color: #172534;
  font-size: 20px;
  font-weight: 500;
}

.procedure-title h2,
.payment-conditions-card h2 {
  margin: 0;
}

.procedure-status-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 auto;
}

.procedure-status-legend span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d8e0e8;
  border-radius: 999px;
  background: #f7f9fb;
  padding: 0 11px;
  color: #6e7d8c;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.procedure-status-legend svg {
  width: 23px;
  height: 23px;
}

.procedure-status-legend .is-open {
  border-color: #ffd49a;
  background: #fff4e5;
  color: #f08a08;
}

.procedure-status-legend .is-finished {
  border-color: #aee4bd;
  background: #ecfaef;
  color: #2ca64a;
}

.procedure-title button {
  border: 0;
  background: transparent;
  color: #3f91d6;
}

.procedure-balance-strip {
  min-height: 76px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 10px 22px;
  border: 1px solid #b8dfad;
  border-radius: 4px;
  background: #d8f0cf;
  color: #1f6c25;
  font-size: 14px;
  font-weight: 800;
}

.procedure-balance-strip span {
  display: flex;
  justify-content: center;
  gap: 16px;
  text-align: center;
}

.procedure-balance-strip .budget-balance-cell {
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.budget-balance-detail-button {
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid #83c7ad;
  border-radius: 999px;
  background: #ffffff;
  color: #007a58;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 122, 88, 0.12);
}

.budget-balance-detail-button:hover {
  border-color: #2fad78;
  background: #ecfff7;
  transform: translateY(-1px);
}

.procedure-table {
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0 6px;
}

.procedure-table thead {
  display: none;
}

.procedure-table tbody,
.procedure-table tfoot,
.procedure-table tr,
.procedure-table td {
  display: block;
}

.procedure-table td {
  border: 0;
  padding: 0;
  color: #172534;
}

.budget-procedure-card-row {
  background: transparent;
}

.budget-procedure-item {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 136px 158px minmax(280px, 0.78fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid #dbe8e4;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.05);
}

.budget-procedure-item.is-open {
  border-color: #ffdba8;
  background: linear-gradient(180deg, #ffffff, #fffaf2);
}

.budget-procedure-item.is-finished {
  border-color: #bce8c7;
  background: linear-gradient(180deg, #ffffff, #f4fff6);
}

.budget-procedure-main {
  min-width: 0;
}

.budget-procedure-marker {
  display: grid;
  align-self: center;
  justify-items: center;
  gap: 3px;
  min-width: 150px;
}

.budget-procedure-marker .attendance-procedure-button {
  width: 148px;
  min-height: 48px;
  border-radius: 999px;
  justify-content: flex-start;
  gap: 9px;
  padding: 4px 12px 4px 7px;
  box-shadow: 0 9px 22px rgba(15, 23, 42, 0.08);
}

.budget-procedure-marker .attendance-procedure-button svg {
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
}

.budget-procedure-marker .attendance-procedure-button span {
  color: #657587;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-align: left;
  text-transform: uppercase;
  white-space: normal;
}

.budget-procedure-item.is-open .budget-procedure-marker .attendance-procedure-button span {
  color: #d57904;
}

.budget-procedure-item.is-finished .budget-procedure-marker .attendance-procedure-button span {
  color: #208b39;
}

.budget-procedure-info {
  min-width: 0;
}

.budget-procedure-info > span {
  display: block;
  margin-bottom: 2px;
  color: #657587;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.budget-procedure-info strong {
  display: block;
  color: #06182e;
  font-size: 14px;
  line-height: 1.15;
}

.budget-procedure-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.budget-procedure-tags:empty {
  display: none;
}

.budget-procedure-tags em {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  background: #eef5fb;
  padding: 0 8px;
  color: #40556d;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.budget-procedure-tags em.is-lab {
  background: #ecfaef;
  color: #208b39;
}

.budget-procedure-location {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 44px;
  border: 1px solid #d9e9f5;
  border-radius: 8px;
  background: #f4f9fd;
  padding: 6px 9px;
}

.budget-procedure-location span,
.budget-procedure-location strong {
  display: block;
  overflow: hidden;
  color: #1f4c73;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.budget-procedure-location strong {
  color: #64748b;
  font-size: 10px;
}

.budget-procedure-values {
  display: grid;
  grid-template-columns: minmax(94px, 1fr) 54px minmax(104px, 1fr);
  align-items: end;
  gap: 6px;
}

.budget-procedure-values label {
  display: grid;
  gap: 3px;
  margin: 0;
}

.budget-procedure-values span {
  color: #657587;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.procedure-table input,
.budget-procedure-values input {
  width: 100%;
  height: 30px;
  border: 1px solid #cad6df;
  border-radius: 6px;
  background: #f8fafc;
  color: #0000ff;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.procedure-table input:focus,
.budget-procedure-values input:focus {
  outline: 2px solid rgba(63, 145, 214, 0.22);
  border-color: #78b5e8;
  background: #ffffff;
}

.procedure-table .budget-quantity-input,
.budget-procedure-values .budget-quantity-input {
  min-width: 0;
}

.budget-procedure-actions {
  display: grid;
  grid-template-columns: repeat(2, 32px);
  align-content: center;
  justify-content: flex-end;
  gap: 6px;
}

.budget-card-icon-button {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #cfe0ee;
  border-radius: 8px;
  background: #ffffff;
  color: #3f91d6;
  cursor: pointer;
}

.budget-card-icon-button:hover {
  background: #eef7ff;
  transform: translateY(-1px);
}

.budget-card-icon-button.is-danger {
  border-color: #ffd5d5;
  color: #ef4444;
}

.budget-card-icon-button.is-danger:hover {
  background: #fff1f1;
}

.budget-card-icon-button.budget-edit-button {
  border-color: #b9d8f2;
  background: #eaf4fd;
  color: #1681d5;
}

.budget-card-icon-button.budget-edit-button:hover {
  background: #dff0ff;
}

.budget-card-icon-button svg {
  width: 16px;
  height: 16px;
}

.budget-procedure-empty {
  display: grid;
  place-items: center;
  min-height: 62px;
  border: 1px dashed #cbd8e3;
  border-radius: 8px;
  background: #f8fafc;
  color: #5d6c7a;
  font-weight: 800;
}

.budget-procedure-total-row td {
  padding-top: 2px;
}

.budget-procedure-total {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid #b8dfad;
  border-radius: 8px;
  background: #eef9ea;
}

.budget-procedure-total span {
  color: #008000;
  font-weight: 900;
}

.budget-procedure-total input {
  max-width: 210px;
  background: #ffffff;
}

.ok-cell,
.delete-cell,
.edit-cell,
.lab-cell {
  font-size: 0;
}

.ok-cell svg {
  color: #008000;
}

.delete-cell svg {
  color: #ff0000;
}

.edit-cell svg {
  color: #3f91d6;
}

.professional-edit-button,
.commission-edit-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

.professional-edit-button:hover,
.commission-edit-button:hover {
  background: #eaf4fd;
}

.professional-edit-button svg,
.commission-edit-button svg {
  width: 20px;
  height: 20px;
}

.attendance-procedure-button {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d8e0e8;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f2f5f8);
  color: #7b8999;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.1);
}

.attendance-procedure-button:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
}

.attendance-procedure-button svg {
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  color: currentColor;
}

.clock-cell.is-pending .attendance-procedure-button {
  border-color: #c8e8ff;
  background: linear-gradient(180deg, #ffffff, #eef9ff);
  color: #11a8ee;
  box-shadow: 0 8px 18px rgba(17, 168, 238, 0.13);
}

.clock-cell.is-open .attendance-procedure-button {
  border-color: #ffd49a;
  background: linear-gradient(180deg, #fff8ee, #ffe7c4);
  color: #f08a08;
  box-shadow: 0 7px 16px rgba(240, 138, 8, 0.16);
}

.clock-cell.is-finished .attendance-procedure-button {
  border-color: #aee4bd;
  background: linear-gradient(180deg, #f3fff5, #dff6e5);
  color: #2ca64a;
  box-shadow: 0 7px 16px rgba(44, 166, 74, 0.16);
}

.lab-cell svg {
  color: #00a45a;
}

.lab-cell.is-orange svg {
  color: #ff9708;
}

.payment-conditions-card h2 {
  justify-content: flex-start;
}

.payment-conditions-card .budget-alert {
  max-width: none;
  margin: 46px 0 34px;
}

.budget-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.budget-action-row > div,
.budget-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.budget-footer-actions {
  justify-content: flex-end;
}

.budget-action-row button,
.budget-footer-actions button,
.budget-header button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 2px 5px rgba(24, 32, 28, 0.12);
}

.budget-delete-button:not(.budget-card-icon-button),
.budget-edit-button:not(.budget-card-icon-button) {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.budget-procedure-dialog {
  width: min(1148px, calc(100vw - 56px));
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
}

.budget-procedure-dialog::backdrop,
.budget-payment-dialog::backdrop,
.budget-specialty-balance-dialog::backdrop,
.budget-confirm-dialog::backdrop {
  background: rgba(0, 0, 0, 0.54);
}

.budget-procedure-panel {
  min-height: 482px;
  max-height: calc(100vh - 86px);
  overflow-y: auto;
  padding: 0 20px 18px;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
}

.budget-procedure-header {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 -20px 20px;
  padding: 0 16px;
  border-bottom: 1px solid #e5e5e5;
}

.budget-procedure-header h2 {
  margin: 0;
  color: #333333;
  font-size: 20px;
  font-weight: 500;
}

.budget-procedure-header button {
  border: 0;
  background: transparent;
  color: #c4c4c4;
  font-size: 26px;
  font-weight: 900;
  cursor: pointer;
}

.budget-professional-add {
  min-height: 82px;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  align-items: center;
  gap: 34px;
  margin-bottom: 20px;
  padding: 16px 46px;
  border: 1px solid #c8e9bf;
  border-radius: 4px;
  background: #def3d8;
}

.budget-professional-add span {
  color: #333333;
  font-weight: 900;
}

.budget-professional-add input,
.budget-add-table input,
.budget-add-table select {
  width: 100%;
  height: 34px;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  background: #ffffff;
  color: #444444;
  padding: 0 12px;
  font: inherit;
}

.budget-add-table-wrap {
  overflow-x: auto;
}

.budget-add-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.budget-add-table th,
.budget-add-table td {
  padding: 4px;
  border: 1px solid #dddddd;
  text-align: center;
}

.budget-add-table th {
  height: 36px;
  background: #dcdcdc;
  color: #333333;
  font-size: 14px;
  font-weight: 900;
}

.budget-add-table tfoot td {
  height: 42px;
  background: #ffffff;
}

.budget-add-table tfoot tr:last-child td {
  background: #fafafa;
}

#budgetAddRows tr:nth-child(even) td {
  background: #f5f5f5;
}

#budgetAddRows td {
  vertical-align: middle;
}

.budget-add-table .budget-add-discount-label {
  color: #0000ff;
  font-weight: 900;
  text-align: right;
}

.budget-add-total-label {
  color: #ff0000;
  font-weight: 900;
  text-align: right;
}

.budget-add-delete {
  border: 0;
  background: transparent;
  color: #ff0000;
  cursor: pointer;
}

.budget-add-delete svg {
  width: 18px;
  height: 18px;
}

.budget-tooth-field {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
}

.budget-tooth-field input[type="hidden"] {
  display: none;
}

.budget-tooth-trigger {
  width: 100%;
  min-width: 118px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  background: #2d90d6;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.budget-tooth-field svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.budget-tooth-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.budget-apply-discount,
.budget-add-inline {
  min-height: 30px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
}

.budget-apply-discount {
  width: 100%;
  padding: 0 10px;
  background: #2d8fd6;
}

.budget-add-inline {
  margin-top: 20px;
}

.budget-procedure-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
}

.budget-procedure-actions button,
.budget-confirm-actions button {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
}

.budget-payment-dialog {
  width: min(940px, calc(100vw - 46px));
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
}

.budget-specialty-balance-dialog {
  width: min(820px, calc(100vw - 46px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.budget-specialty-balance-panel {
  padding: 0 20px 18px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

.budget-specialty-balance-header {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 -20px 16px;
  padding: 0 18px;
  border-bottom: 1px solid #dce8e3;
}

.budget-specialty-balance-header span {
  color: #667786;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.budget-specialty-balance-header h2 {
  margin: 2px 0 0;
  color: #071b33;
  font-size: 22px;
}

.budget-specialty-balance-header button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #f1f6f8;
  color: #748391;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.budget-specialty-balance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.budget-specialty-balance-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #c7ead7;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fffb 0%, #eefbf3 100%);
}

.budget-specialty-balance-card.is-negative {
  border-color: #ffc7c7;
  background: linear-gradient(180deg, #fff9f9 0%, #fff0f0 100%);
}

.budget-specialty-balance-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.budget-specialty-balance-card header strong {
  color: #071b33;
  font-size: 15px;
}

.budget-specialty-balance-card header span {
  color: #00994f;
  font-size: 17px;
  font-weight: 900;
  white-space: nowrap;
}

.budget-specialty-balance-card.is-negative header span {
  color: #e33434;
}

.budget-specialty-balance-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #4f6270;
  font-size: 13px;
}

.budget-specialty-balance-card div strong {
  color: #071b33;
  font-size: 14px;
}

.budget-specialty-balance-empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed #a7c7df;
  border-radius: 8px;
  background: #f5fbff;
  color: #1d5f87;
  text-align: center;
  font-weight: 800;
}

.budget-specialty-balance-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.budget-specialty-balance-actions button {
  min-height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: #2ea84f;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

.budget-payment-panel {
  padding: 0 20px 18px;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
}

.budget-payment-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.budget-payment-summary article {
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 12px 16px;
  border: 1px solid #b8dfad;
  border-radius: 4px;
  background: #d8f0cf;
  color: #1f6c25;
  text-align: center;
}

.budget-payment-summary span {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.budget-payment-summary strong {
  font-size: 20px;
}

.budget-payment-form {
  display: grid;
  grid-template-columns: 170px 220px 170px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  background: #f3f3f3;
}

.budget-payment-form label {
  display: grid;
  gap: 6px;
  color: #111820;
  font-weight: 900;
}

.budget-payment-form input,
.budget-payment-form select {
  height: 34px;
  width: 100%;
  border: 1px solid #c9c9c9;
  border-radius: 4px;
  background: #ffffff;
  color: #26313a;
  padding: 0 12px;
}

.budget-payment-form button {
  min-height: 34px;
  border: 0;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 800;
}

.budget-payment-table-wrap {
  width: 100%;
  overflow-x: hidden;
}

.budget-payment-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
}

.budget-payment-table th,
.budget-payment-table td {
  padding: 8px 6px;
  border: 1px solid #d8d8d8;
  font-size: 12px;
  text-align: center;
  overflow-wrap: anywhere;
}

.budget-payment-table th {
  background: #dcdcdc;
  color: #111111;
  font-size: 13px;
  text-transform: uppercase;
}

.budget-payment-table tbody tr:nth-child(even) {
  background: #eeeeee;
}

.budget-payment-summary.payment-summary-inline {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin: 0 0 18px;
}

.budget-payment-summary.payment-summary-inline article {
  min-height: auto;
  display: flex;
  align-content: initial;
  justify-content: center;
  gap: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111820;
}

.budget-payment-summary.payment-summary-inline span {
  font-size: 14px;
  text-transform: none;
}

.budget-payment-summary.payment-summary-inline strong {
  color: #0047ff;
  font-size: 14px;
}

.budget-payment-summary.payment-summary-inline .is-balance strong {
  color: #ff0000;
}

.payment-paid-alert {
  display: grid;
  gap: 5px;
  margin: 0 0 18px;
  padding: 18px 20px;
  border: 1px solid #a9dba5;
  border-left: 6px solid #2ba64a;
  border-radius: 5px;
  background: #e9f8e6;
  color: #1f6c25;
  box-shadow: 0 6px 16px rgba(43, 166, 74, 0.12);
}

.payment-paid-alert strong {
  font-size: 18px;
}

.payment-paid-alert span {
  color: #356f3b;
  font-size: 13px;
  font-weight: 700;
}

.tooth-selector-dialog {
  width: min(1080px, calc(100vw - 42px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
}

.tooth-selector-dialog::backdrop {
  background: rgba(7, 18, 27, 0.56);
  backdrop-filter: blur(4px);
}

.tooth-selector-panel {
  overflow: auto;
  max-height: calc(100vh - 32px);
  border: 1px solid #d6e8e8;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(6, 30, 43, 0.24);
}

.tooth-selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 24px 18px;
  border-bottom: 1px solid #dfe9ec;
  background:
    radial-gradient(circle at 0% 0%, rgba(16, 185, 203, 0.14), transparent 36%),
    #ffffff;
}

.tooth-selector-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.tooth-selector-heading-icon {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(135deg, #0aa7b4, #087ca5);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(8, 124, 165, 0.22);
}

.tooth-selector-heading-icon svg {
  width: 25px;
  height: 25px;
}

.tooth-selector-heading > div > span {
  display: block;
  margin-bottom: 2px;
  color: #5e7480;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tooth-selector-header h2 {
  margin: 0;
  color: #142434;
  font-size: 22px;
  line-height: 1.1;
}

.tooth-selector-header p {
  margin: 5px 0 0;
  color: #607582;
  font-size: 12px;
  font-weight: 700;
}

.tooth-selector-controls {
  display: grid;
  grid-template-columns: minmax(190px, 230px) minmax(0, 1fr) minmax(210px, 250px);
  align-items: stretch;
  gap: 14px;
  margin: 18px 22px 16px;
  padding: 16px;
  border: 1px solid #cfe4e8;
  border-radius: 18px;
  background: linear-gradient(135deg, #effafb, #f4faf7);
}

.tooth-arch-field {
  display: grid;
  gap: 7px;
  color: #23313c;
  font-weight: 900;
}

.tooth-selector-controls select {
  width: 100%;
  height: 42px;
  border: 1px solid #bdd4dc;
  border-radius: 14px;
  background: #ffffff;
  color: #26313a;
  padding: 0 12px;
  font: inherit;
  font-weight: 800;
}

.tooth-face-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.tooth-face-options legend {
  width: 100%;
  margin-bottom: 2px;
  color: #23313c;
  font-weight: 900;
}

.tooth-face-options legend small {
  color: #71838d;
  font-size: 10px;
  font-weight: 700;
}

.tooth-face-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #d8e8e8;
  border-radius: 10px;
  background: #ffffff;
  color: #344552;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.tooth-face-options label:has(input:checked) {
  border-color: #12a7b5;
  background: #e2f7f8;
  color: #087786;
  box-shadow: 0 0 0 2px rgba(18, 167, 181, 0.08);
}

.tooth-face-options label strong {
  color: #087f91;
  font-size: 12px;
}

.tooth-face-options label span {
  font-size: 10px;
}

.tooth-face-options input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #0ea5b8;
}

.tooth-selection-summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #cfe5df;
  border-radius: 14px;
  background: #ffffff;
}

.tooth-selection-summary strong {
  color: #0c766a;
  font-size: 13px;
  font-weight: 900;
}

.tooth-selection-summary span {
  overflow: hidden;
  color: #617580;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tooth-selection-grid {
  display: grid;
  gap: 14px;
  margin: 0 22px;
}

.tooth-section {
  border: 1px solid #d8e7e8;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 45, 62, 0.06);
}

.tooth-section > header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 12px 16px;
  background: linear-gradient(135deg, #08a757, #00a66a);
  color: #ffffff;
}

.tooth-section.is-deciduous > header {
  background: linear-gradient(135deg, #f59e0b, #f1a525);
}

.tooth-section-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
}

.tooth-section-icon svg {
  width: 19px;
  height: 19px;
}

.tooth-section h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.tooth-section header p {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  font-weight: 800;
}

.tooth-section-rows {
  display: grid;
  gap: 0;
  padding: 0 18px;
}

.tooth-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 13px 0;
}

.tooth-row + .tooth-row {
  border-top: 1px dashed #dbe7ea;
}

.tooth-row-label {
  display: grid;
  gap: 2px;
  padding-right: 12px;
  border-right: 1px solid #dbe7ea;
  text-align: right;
}

.tooth-row-label span {
  color: #1b3644;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.tooth-row-label small {
  color: #7b8d96;
  font-size: 9px;
  font-weight: 800;
}

.tooth-row-quadrants {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 26px;
  min-width: 0;
}

.tooth-quadrant {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.tooth-quadrant > small {
  color: #81939c;
  font-size: 9px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.tooth-quadrant-buttons {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.tooth-button {
  display: grid;
  flex: 1 1 0;
  min-width: 34px;
  max-width: 48px;
  height: 46px;
  place-items: center;
  gap: 0;
  padding: 4px 3px;
  border: 1px solid #cce1e7;
  border-radius: 11px;
  background: linear-gradient(180deg, #ffffff, #edf7fa);
  color: #137c9b;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 5px 12px rgba(20, 110, 140, 0.09);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.tooth-button svg {
  width: 17px;
  height: 17px;
}

.tooth-button:hover,
.tooth-button:focus-visible {
  transform: translateY(-1px);
  border-color: #13a7bd;
  box-shadow: 0 8px 18px rgba(20, 150, 209, 0.18);
}

.tooth-button.is-selected {
  border-color: #047857;
  background: linear-gradient(135deg, #059669, #047857);
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.18), 0 10px 20px rgba(5, 150, 105, 0.18);
}

.tooth-selector-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding: 16px 22px 20px;
  border-top: 1px solid #e5edf0;
  background: #fbfdfd;
}

.tooth-selector-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(15, 45, 62, 0.12);
  cursor: pointer;
}

.tooth-selector-actions button svg {
  width: 17px;
  height: 17px;
}

.tooth-cancel-action {
  border: 1px solid #d3e1e5 !important;
  background: #ffffff;
  color: #526974;
}

.tooth-clear-action {
  margin-right: auto;
  border: 1px solid #f2c8c8 !important;
  background: #fff3f3;
  color: #b42323;
}

.tooth-save-action {
  background: linear-gradient(135deg, #0ea5a8, #087f95);
  color: #ffffff;
}

@media (max-width: 820px) {
  .tooth-selector-controls {
    grid-template-columns: 1fr;
  }

  .tooth-row {
    grid-template-columns: 1fr;
  }

  .tooth-row-label {
    display: flex;
    justify-content: space-between;
    padding: 0 0 6px;
    border-right: 0;
    border-bottom: 1px solid #e1eaed;
    text-align: left;
  }

  .tooth-row-quadrants {
    gap: 12px;
  }

  .tooth-button {
    min-width: 30px;
  }
}

@media (max-width: 580px) {
  .tooth-selector-dialog {
    width: calc(100vw - 18px);
  }

  .tooth-selector-header,
  .tooth-selector-controls,
  .tooth-selector-actions {
    margin-left: 10px;
    margin-right: 10px;
  }

  .tooth-selector-heading p {
    display: none;
  }

  .tooth-selection-grid {
    margin: 0 10px;
  }

  .tooth-section-rows {
    padding: 0 10px;
  }

  .tooth-row-quadrants {
    grid-template-columns: 1fr;
  }

  .tooth-selector-actions {
    flex-direction: column;
  }

  .tooth-selector-actions button,
  .tooth-clear-action {
    width: 100%;
    margin-right: 0;
  }
}

.budget-confirm-dialog {
  width: min(420px, calc(100vw - 36px));
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
}

.budget-confirm-panel {
  padding: 22px;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

.budget-confirm-panel h2 {
  margin: 0 0 10px;
  color: #202020;
  font-size: 21px;
  font-weight: 600;
}

.budget-confirm-panel p {
  margin: 0;
  color: #333333;
}

.budget-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}

.procedure-attendance-dialog {
  width: min(920px, calc(100vw - 38px));
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
}

.procedure-attendance-dialog::backdrop {
  background: rgba(0, 0, 0, 0.58);
}

.procedure-attendance-panel {
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

.procedure-attendance-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e7eb;
}

.procedure-attendance-header span {
  display: block;
  color: #5e6b76;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.procedure-attendance-header h2 {
  font-size: 20px;
  font-weight: 500;
}

.procedure-attendance-header button {
  border: 0;
  background: transparent;
  color: #b8bec4;
  font-size: 28px;
  cursor: pointer;
}

.procedure-attendance-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 20px 0;
  border-bottom: 1px solid #edf1f4;
}

.procedure-attendance-tabs button {
  min-height: 38px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  padding: 0 18px;
  background: transparent;
  color: #50606d;
  font-weight: 800;
  cursor: pointer;
}

.procedure-attendance-tabs button:hover {
  background: #eef7fb;
  color: #006b92;
}

.procedure-attendance-tabs button.is-active {
  border-color: #dbe5ec;
  background: #ffffff;
  color: #062033;
  box-shadow: 0 -2px 8px rgba(15, 23, 42, 0.06);
}

.procedure-attendance-tab-panel.is-hidden {
  display: none;
}

.procedure-attendance-status {
  width: min(640px, calc(100% - 40px));
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px auto 18px;
  border: 1px solid #c8e8ff;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #eef9ff);
  color: #11a8ee;
  padding: 7px 22px 7px 10px;
  box-shadow: 0 14px 30px rgba(17, 168, 238, 0.12);
}

.procedure-attendance-status.is-open {
  border-color: #ffd49a;
  background: linear-gradient(180deg, #ffffff, #fff4e1);
  color: #ff920f;
  box-shadow: 0 14px 30px rgba(255, 146, 15, 0.14);
}

.procedure-attendance-status.is-finished {
  border-color: #aee4bd;
  background: linear-gradient(180deg, #ffffff, #e9f8ed);
  color: #2ca64a;
  box-shadow: 0 14px 30px rgba(44, 166, 74, 0.14);
}

.procedure-attendance-status.is-repeat {
  border-color: #f3a9a9;
  background: linear-gradient(180deg, #ffffff, #fff0f0);
  color: #d33232;
  box-shadow: 0 14px 30px rgba(211, 50, 50, 0.12);
}

.procedure-attendance-status-icon {
  width: 54px;
  height: 54px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.procedure-attendance-status-icon svg {
  width: 52px;
  height: 52px;
}

.procedure-attendance-status-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.procedure-attendance-status-text strong {
  color: currentColor;
  font-size: 15px;
  font-weight: 900;
}

.procedure-attendance-status-text small {
  color: #5f7283;
  font-size: 12px;
  font-weight: 700;
}

.procedure-attendance-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 12px;
  padding: 0 20px 16px;
}

.procedure-attendance-summary label {
  grid-column: auto;
}

.procedure-attendance-summary .procedure-attendance-full {
  grid-column: 1 / -1;
}

.procedure-attendance-summary span {
  display: block;
  margin-bottom: 5px;
  color: #5d6b76;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.procedure-attendance-summary strong {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #dbe2e7;
  border-radius: 4px;
  background: #f8fafb;
}

.procedure-attendance-summary input,
.procedure-attendance-summary textarea {
  width: 100%;
  border: 1px solid #c9d2d9;
  border-radius: 4px;
  padding: 0 10px;
  background: #ffffff;
}

.procedure-attendance-summary input {
  height: 38px;
}

.procedure-attendance-date-field small {
  display: block;
  margin-top: 5px;
  color: #6f808c;
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
}

.procedure-attendance-flow {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.procedure-attendance-summary .procedure-attendance-mode,
.procedure-attendance-summary .procedure-attendance-note {
  grid-column: auto;
}

.procedure-attendance-mode {
  max-width: none;
}

.procedure-attendance-note {
  min-width: 0;
}

.procedure-attendance-switch {
  width: 100%;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  color: #ffffff;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 7px 16px rgba(15, 23, 42, 0.12);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.procedure-attendance-switch i {
  width: 28px;
  height: 28px;
  display: block;
  position: absolute;
  top: 5px;
  left: 5px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  transition: left 0.18s ease;
}

.procedure-attendance-switch strong {
  position: relative;
  z-index: 1;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.procedure-attendance-switch.is-open {
  background: linear-gradient(180deg, #ffad34, #ed8a00);
}

.procedure-attendance-switch.is-finished {
  background: linear-gradient(180deg, #31b34f, #188a35);
}

.procedure-attendance-switch.is-repeat {
  background: linear-gradient(180deg, #ef6464, #c92c2c);
  cursor: default;
}

.procedure-attendance-switch.is-finished i {
  left: calc(100% - 33px);
}

.procedure-attendance-switch.is-repeat i {
  left: calc(100% - 33px);
}

.procedure-attendance-switch.is-open strong {
  margin-left: 22px;
}

.procedure-attendance-switch.is-finished strong {
  margin-right: 22px;
}

.procedure-attendance-switch.is-repeat strong {
  margin-right: 22px;
}

.procedure-attendance-switch:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 9px 20px rgba(15, 23, 42, 0.18);
}

.procedure-attendance-note textarea {
  min-height: 78px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafb;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
  resize: vertical;
}

.procedure-attendance-history th:nth-child(5),
.procedure-attendance-history td:nth-child(5) {
  text-align: left;
  overflow-wrap: anywhere;
}

.procedure-attendance-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid #edf1f4;
  border-bottom: 1px solid #edf1f4;
}

.procedure-attendance-actions button {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.16);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.procedure-attendance-actions .save-action {
  background: linear-gradient(180deg, #2f98ee, #166eb9);
}

.procedure-attendance-actions .green-action {
  background: linear-gradient(180deg, #33ad4d, #1f8537);
}

.procedure-attendance-actions .orange-action {
  background: linear-gradient(180deg, #ffa934, #e58505);
}

.procedure-attendance-actions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(15, 23, 42, 0.2);
  filter: brightness(1.02);
}

.procedure-attendance-history {
  padding: 18px 20px 28px;
}

.procedure-attendance-history h3 {
  margin-bottom: 12px;
  color: #00b8e6;
  font-size: 20px;
  font-weight: 500;
}

.procedure-attendance-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.procedure-attendance-history-header h3 {
  margin-bottom: 0;
}

.procedure-attendance-history-header button {
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  padding: 0 14px;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 5px 12px rgba(190, 36, 36, 0.18);
}

.procedure-attendance-history-header .danger-action {
  background: linear-gradient(180deg, #ef6464, #c93535);
}

.procedure-attendance-list {
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}

.procedure-attendance-loose-list {
  border: 1px solid #cfe5dc;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.procedure-attendance-list-head,
.procedure-attendance-list-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(190px, 1.45fr) minmax(120px, 1fr) minmax(110px, 0.8fr) minmax(190px, 1.15fr);
  align-items: center;
  gap: 12px;
}

.procedure-attendance-list-head {
  min-height: 42px;
  padding: 0 14px;
  background: #fbfff3;
  color: #63726f;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.procedure-attendance-list-row {
  min-height: 68px;
  padding: 10px 14px;
  border-top: 1px solid #cfe5dc;
  background: #ffffff;
}

.procedure-attendance-list-row:nth-child(odd) {
  background: #f8fbfb;
}

.procedure-attendance-list-row.is-repeat {
  border-left: 4px solid #e44343;
  background: #fff7f7;
}

.procedure-attendance-list-row.is-repeat:nth-child(odd) {
  background: #fff0f0;
}

.procedure-attendance-list-row strong {
  display: block;
  color: #11262a;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}

.procedure-attendance-list-row small {
  display: block;
  margin-top: 4px;
  color: #687b7d;
  font-size: 12px;
  line-height: 1.25;
}

.attendance-row-main strong {
  font-size: 14px;
}

.attendance-repeat-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-top: 6px;
  border-radius: 999px;
  padding: 0 9px;
  background: #ffe1e1;
  color: #c52323;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.attendance-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.attendance-view-button {
  min-height: 34px;
  border: 1px solid #b9e5dc;
  border-radius: 999px;
  background: #eafff8;
  color: #007b6b;
  padding: 0 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 3px 9px rgba(0, 123, 107, 0.08);
}

.attendance-trash-button {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d4ebe8;
  border-radius: 8px;
  background: #ffffff;
  color: #e94141;
  cursor: pointer;
}

.attendance-trash-button svg {
  width: 17px;
  height: 17px;
}

.attendance-view-button:hover,
.attendance-trash-button:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
}

.procedure-attendance-empty {
  margin: 0;
  padding: 22px;
  border: 1px dashed #c9d5de;
  border-radius: 8px;
  background: #f8fafb;
  color: #667786;
  text-align: center;
  font-weight: 800;
}

.procedure-attendance-card {
  border: 1px solid #d9e2e9;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.procedure-attendance-card-head {
  width: 100%;
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(230px, 1.4fr) auto 30px;
  align-items: center;
  gap: 12px;
  border: 0;
  background: #f8fbfd;
  padding: 10px 14px;
  color: #102033;
  text-align: left;
  cursor: pointer;
}

.procedure-attendance-card-head:hover {
  background: #eff8fc;
}

.procedure-attendance-card-head span:not(.attendance-status-pill),
.procedure-attendance-detail-grid span {
  display: block;
  margin-bottom: 4px;
  color: #687887;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.procedure-attendance-card-head strong {
  display: block;
  color: #102033;
  font-size: 14px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.procedure-attendance-card-head svg {
  width: 16px;
  height: 16px;
  color: #3f91d6;
  transition: transform 0.18s ease;
}

.procedure-attendance-card.is-expanded .procedure-attendance-card-head svg {
  transform: rotate(180deg);
}

.procedure-attendance-card-body {
  display: none;
  padding: 14px;
  border-top: 1px solid #e6edf2;
  background: #ffffff;
}

.procedure-attendance-card.is-expanded .procedure-attendance-card-body {
  display: block;
}

.procedure-attendance-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.procedure-attendance-detail-grid div {
  padding: 11px 12px;
  border: 1px solid #e1e8ee;
  border-radius: 7px;
  background: #f9fbfc;
}

.procedure-attendance-detail-grid .is-wide {
  grid-column: 1 / -1;
}

.procedure-attendance-detail-grid strong {
  color: #102033;
  font-size: 14px;
}

.procedure-attendance-detail-grid .procedure-attendance-status-detail {
  border-color: #f2c165;
  background: #fff4d8;
}

.procedure-attendance-detail-grid .procedure-attendance-status-detail strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #9a6300;
}

.procedure-attendance-detail-grid .procedure-attendance-status-detail svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.procedure-attendance-detail-grid .procedure-attendance-status-detail.is-finished {
  border-color: #a8d8ae;
  background: #e4f7e6;
}

.procedure-attendance-detail-grid .procedure-attendance-status-detail.is-finished strong {
  color: #168a35;
}

.procedure-attendance-detail-grid .procedure-attendance-status-detail.is-repeat,
.procedure-attendance-detail-grid .procedure-attendance-repeat-detail {
  border-color: #ef9a9a;
  background: #fff1f1;
}

.procedure-attendance-detail-grid .procedure-attendance-status-detail.is-repeat strong,
.procedure-attendance-detail-grid .procedure-attendance-repeat-detail strong {
  color: #c52323;
}

.procedure-attendance-detail-grid p {
  margin: 0;
  color: #263746;
  line-height: 1.45;
  white-space: pre-wrap;
}

.procedure-attendance-card-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.attendance-detail-action {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  background: #2c89d8;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.attendance-detail-action.is-muted {
  background: #8c99a5;
}

.attendance-detail-action.is-danger {
  background: #d8483f;
}

.attendance-detail-action:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.procedure-attendance-table-wrap {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid #d7dde2;
  border-radius: 4px;
}

.procedure-attendance-history table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.procedure-attendance-history th,
.procedure-attendance-history td {
  padding: 9px 8px;
  border: 1px solid #d7dde2;
  text-align: center;
  font-size: 13px;
}

.procedure-attendance-history th {
  background: #09b8de;
  color: #ffffff;
  font-weight: 800;
}

.procedure-attendance-history tbody tr:nth-child(even) {
  background: #eef0f2;
}

.attendance-row-action {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #2d8bdd;
  cursor: pointer;
}

.attendance-row-action svg {
  width: 20px;
  height: 20px;
}

.attendance-row-action.is-danger {
  color: #f00000;
}

.attendance-row-action:hover {
  background: #e8f4ff;
}

.attendance-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 86px;
  min-height: 24px;
  border-radius: 999px;
  background: #fff1cf;
  color: #8b5d00;
  font-size: 11px;
  font-weight: 900;
  padding: 0 9px;
}

.attendance-status-pill.is-finished {
  background: #dff4df;
  color: #17812b;
}

.attendance-status-pill.is-repeat {
  background: #ffe1e1;
  color: #c52323;
}

.attendance-status-pill svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.procedure-attendance-detail-dialog {
  width: min(720px, calc(100vw - 36px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.35);
}

.procedure-attendance-detail-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.procedure-attendance-detail-panel {
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
}

.procedure-attendance-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #e2e8ee;
}

.procedure-attendance-detail-header span {
  display: block;
  color: #647380;
  font-size: 11px;
  font-weight: 900;
}

.procedure-attendance-detail-header h2 {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 800;
}

.procedure-attendance-detail-header button {
  border: 0;
  background: transparent;
  color: #aab3bb;
  font-size: 28px;
  cursor: pointer;
}

.procedure-attendance-detail-body {
  padding: 18px 20px;
}

.procedure-attendance-detail-footer {
  display: flex;
  justify-content: flex-end;
  padding: 14px 20px 18px;
  border-top: 1px solid #e8eef3;
}

.procedure-attendance-detail-footer button {
  min-height: 34px;
  border: 0;
  border-radius: 4px;
  padding: 0 14px;
  color: #ffffff;
  font-weight: 800;
}

.save-toast {
  --toast-accent: #118a6b;
  --toast-soft: #e8f8f2;
  --toast-duration: 3200ms;
  position: fixed;
  right: 24px;
  top: 24px;
  bottom: auto;
  left: auto;
  z-index: 2147483646;
  width: min(390px, calc(100vw - 32px));
  min-height: 76px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  overflow: hidden;
  margin: 0;
  padding: 14px 18px 16px 14px;
  border: 1px solid color-mix(in srgb, var(--toast-accent) 24%, #dce8e8);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
  color: #19313a;
  box-shadow: 0 20px 48px rgba(14, 43, 55, 0.2), 0 4px 14px rgba(14, 43, 55, 0.08);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(18px, -8px, 0) scale(0.96);
  transform-origin: top right;
  transition: opacity 220ms ease, transform 260ms cubic-bezier(.2,.85,.3,1.15);
}

.save-toast[data-variant="warning"] {
  --toast-accent: #e08a12;
  --toast-soft: #fff4dd;
}

.save-toast[data-variant="welcome"] {
  --toast-accent: #168eae;
  --toast-soft: #e9f8fc;
}

.save-toast[data-variant="error"] {
  --toast-accent: #d94b55;
  --toast-soft: #fff0f1;
}

.save-toast-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  align-self: start;
  border-radius: 14px;
  background: var(--toast-soft);
  color: var(--toast-accent);
  font-size: 22px;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--toast-accent) 16%, transparent);
}

.save-toast-icon::before {
  content: "✓";
}

.save-toast[data-variant="warning"] .save-toast-icon::before {
  content: "!";
}

.save-toast[data-variant="welcome"] .save-toast-icon::before {
  content: "✦";
}

.save-toast[data-variant="error"] .save-toast-icon::before {
  content: "×";
}

.save-toast-content {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.save-toast-content strong {
  color: var(--toast-accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.save-toast-content [data-toast-message] {
  color: #29434d;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.save-toast-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--toast-accent), color-mix(in srgb, var(--toast-accent) 58%, #ffffff));
  transform: scaleX(0);
  transform-origin: left;
}

.save-toast.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.save-toast.is-visible .save-toast-progress {
  animation: save-toast-progress var(--toast-duration) linear forwards;
}

@keyframes save-toast-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (max-width: 620px) {
  .save-toast {
    top: 14px;
    right: 50%;
    width: min(420px, calc(100vw - 24px));
    transform: translate3d(50%, -12px, 0) scale(0.96);
    transform-origin: top center;
  }

  .save-toast.is-visible {
    transform: translate3d(50%, 0, 0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .save-toast {
    transition: opacity 120ms ease;
  }

  .save-toast-progress {
    animation: none !important;
  }
}

.orange-action {
  background: #ff9708;
}

.info-action {
  background: #2daedf;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(58px, 1fr));
  min-height: 38px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.segmented-control button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.segmented-control button.is-selected {
  background: var(--surface);
  color: var(--teal);
  box-shadow: 0 6px 16px rgba(24, 32, 28, 0.1);
}

.appointment-list {
  display: grid;
  gap: 10px;
}

.appointment-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.appointment-time {
  display: grid;
  place-items: center;
  min-height: 52px;
  border-radius: var(--radius);
  background: var(--surface-muted);
  color: var(--ink);
  font-weight: 900;
}

.appointment-main {
  min-width: 0;
}

.appointment-main strong,
.queue-item strong,
.chair-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-main small,
.queue-item small,
.chair-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.appointment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.pill.success {
  background: var(--green-soft);
  color: var(--green);
}

.pill.warning {
  background: var(--amber-soft);
  color: #8f5f11;
}

.pill.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.pill.neutral {
  background: var(--surface-muted);
  color: var(--muted);
}

.queue-list {
  display: grid;
  gap: 10px;
}

.queue-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.queue-time {
  color: var(--teal);
  font-size: 14px;
  font-weight: 900;
}

.finance-panel,
.chairs-panel {
  margin-top: 14px;
}

.bar-chart {
  display: grid;
  gap: 16px;
  padding-top: 4px;
}

.bar-row {
  display: grid;
  grid-template-columns: 104px minmax(130px, 1fr) 70px;
  align-items: center;
  gap: 12px;
  min-height: 30px;
  font-size: 13px;
}

.bar-row span:first-child {
  color: var(--muted);
  font-weight: 800;
}

.bar-row strong {
  text-align: right;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-muted);
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), #5a66d9);
}

.chair-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.chair-card {
  min-height: 104px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.chair-card span {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chair-card.is-busy {
  border-color: rgba(85, 98, 214, 0.24);
  background: var(--indigo-soft);
}

.chair-card.is-free {
  border-color: rgba(45, 143, 86, 0.24);
  background: var(--green-soft);
}

.chair-card.is-alert {
  border-color: rgba(200, 133, 22, 0.28);
  background: var(--amber-soft);
}

.patient-section {
  margin-top: 14px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

td {
  color: var(--ink);
}

tbody tr:hover {
  background: rgba(15, 143, 131, 0.04);
}

.patient-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.patient-cell strong,
.patient-cell small {
  display: block;
}

.patient-cell small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.row-action {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
}

.row-action:hover {
  color: var(--teal);
}

.modal {
  width: min(720px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
}

.modal::backdrop {
  background: rgba(24, 32, 28, 0.42);
  backdrop-filter: blur(5px);
}

.modal-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(24, 32, 28, 0.22);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid label {
  display: grid;
  gap: 7px;
}

.form-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.form-grid input,
.form-grid select {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.payable-post-payment-dialog {
  width: min(560px, calc(100vw - 32px));
}

.payable-post-payment-panel {
  border-color: #cce6dd;
  background:
    radial-gradient(circle at 14% 0%, rgba(34, 197, 94, 0.12), transparent 36%),
    #ffffff;
}

.payable-post-payment-header {
  align-items: flex-start;
  border-bottom: 1px solid #dbece6;
  padding-bottom: 14px;
}

.payable-post-payment-header span {
  color: #04744a;
  display: block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.payable-post-payment-header h2 {
  color: #0f2234;
  font-size: 22px;
  margin: 4px 0 0;
}

.payable-post-payment-panel p {
  color: #53635f;
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
}

.payable-post-payment-actions {
  flex-wrap: wrap;
}

.payable-post-payment-actions button {
  min-height: 40px;
  border-radius: 8px;
  font-weight: 900;
  padding: 9px 14px;
}

.payable-negative-batch-dialog {
  width: min(760px, calc(100vw - 32px));
}

.payable-negative-batch-panel {
  border-color: #cce6dd;
  background:
    radial-gradient(circle at 10% 0%, rgba(14, 165, 233, 0.1), transparent 34%),
    #ffffff;
}

.payable-negative-batch-form {
  display: grid;
  gap: 16px;
}

.payable-negative-batch-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.payable-negative-batch-summary article {
  border: 1px solid #d8e8e2;
  border-radius: 10px;
  background: #f5fbf8;
  padding: 14px;
}

.payable-negative-batch-summary span,
.payable-negative-batch-grid span {
  display: block;
  color: #536661;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.payable-negative-batch-summary strong {
  display: block;
  color: #08243c;
  font-size: 22px;
  margin-top: 6px;
}

.payable-negative-batch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.payable-negative-batch-grid label {
  display: grid;
  gap: 6px;
}

.payable-negative-batch-grid input,
.payable-negative-batch-grid select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd8d5;
  border-radius: 8px;
  background: #ffffff;
  color: #0f2234;
  font-size: 15px;
  padding: 0 12px;
}

.finance-map-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  border: 1px solid #cde7dc;
  border-radius: 10px;
  background: #f3fbf7;
  color: #0b4b32;
  font-weight: 900;
  padding: 12px 14px;
}

.finance-map-preview strong {
  flex-basis: 100%;
  color: #09253d;
}

.finance-map-preview span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  padding: 6px 10px;
}

.finance-map-preview.is-negative {
  border-color: #ffc5c5;
  background: #fff2f2;
  color: #c22121;
}

body.modal-open {
  overflow: hidden;
}

html:has(body.modal-open) {
  overflow: hidden;
}

.finance-payable-page {
  display: grid;
  gap: 18px;
  width: min(100% - 48px, 1320px);
  margin: 0 auto 34px;
  padding-top: 14px;
}

.finance-page-header,
.finance-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.finance-page-header h2,
.finance-detail-header h2 {
  margin: 0;
}

.finance-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid #d7e2df;
  border-radius: 8px;
  background: #f7fbfa;
}

.finance-tabs button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #61706d;
  cursor: pointer;
  font-weight: 800;
  padding: 10px 14px;
}

.finance-tabs button.is-active {
  background: #ffffff;
  color: #09253d;
  box-shadow: 0 6px 18px rgba(9, 37, 61, 0.1);
}

.finance-payable-tab-panel,
.finance-payable-list-view,
.finance-payable-account-view,
.finance-payable-payment-view {
  display: grid;
  gap: 18px;
}

.finance-payable-account-view {
  border: 1px solid #d7e2df;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 250, 0.92)),
    #ffffff;
  box-shadow: 0 12px 30px rgba(18, 42, 54, 0.08);
  padding: 22px;
}

.finance-action-card,
.finance-filter-card,
.finance-payable-form,
.finance-payable-payment-panel,
.finance-substatus-card {
  border: 1px solid #d9e2e0;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f6faf9 100%);
  box-shadow: 0 10px 28px rgba(18, 42, 54, 0.07);
  padding: 18px;
}

.finance-action-card {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.finance-create-payable-button,
.finance-payable-search-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 12px 22px rgba(18, 42, 54, 0.14);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.finance-create-payable-button {
  padding: 0 18px;
  background: linear-gradient(180deg, #2f98e8, #1975c8);
}

.finance-payable-search-button {
  align-self: end;
  justify-self: start;
  min-width: 136px;
  padding: 0 16px;
  background: linear-gradient(180deg, #2daedf, #1689c7);
}

.finance-create-payable-button svg,
.finance-payable-search-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.finance-create-payable-button:hover,
.finance-payable-search-button:hover {
  filter: brightness(1.03);
  box-shadow: 0 16px 28px rgba(18, 42, 54, 0.18);
  transform: translateY(-1px);
}

.finance-create-payable-button:active,
.finance-payable-search-button:active {
  transform: translateY(0);
}

.finance-account-form {
  display: grid;
  gap: 16px;
}

.finance-account-section {
  display: grid;
  gap: 14px;
  border: 1px solid #d9e2e0;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfa 100%);
  box-shadow: 0 10px 24px rgba(18, 42, 54, 0.06);
  padding: 18px;
}

.finance-account-section .finance-section-title {
  margin-bottom: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #dce8e3;
}

.finance-account-section .finance-payable-form {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.finance-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.finance-metric-card {
  appearance: none;
  font: inherit;
  width: 100%;
  text-align: left;
  border: 1px solid #d9e2e0;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 10px 22px rgba(18, 42, 54, 0.06);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.finance-metric-card:hover,
.finance-metric-card.is-active {
  border-color: #24a3dc;
  box-shadow: 0 14px 28px rgba(18, 42, 54, 0.1);
  transform: translateY(-1px);
}

.finance-metric-card.is-active {
  outline: 3px solid rgba(36, 163, 220, 0.14);
}

.finance-metric-card span,
.finance-metric-card small {
  display: block;
  color: #5d6b68;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.finance-metric-card strong {
  display: block;
  color: #09253d;
  font-size: 24px;
  margin: 8px 0 3px;
}

.finance-metric-card.is-red strong,
.finance-payable-money.is-red,
.finance-payment-summary .is-red {
  color: #e23d37;
}

.finance-metric-card.is-orange strong {
  color: #f59e0b;
}

.finance-metric-card.is-blue strong {
  color: #0f8dcc;
}

.finance-metric-card.is-green strong,
.finance-payable-money.is-green,
.finance-payment-summary .is-green {
  color: #04954d;
}

.finance-filter-card,
.finance-payable-form,
.finance-payment-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 18px;
}

.finance-payable-page.is-negative-mode .finance-action-card,
.finance-payable-page.is-negative-mode .finance-filter-card .span-2,
.finance-payable-page.is-negative-mode .finance-filter-card label:not(.finance-payable-date-filter),
.finance-payable-page.is-negative-mode .finance-payable-search-button {
  display: none;
}

.finance-payable-page.is-negative-mode .finance-filter-card {
  grid-template-columns: repeat(2, minmax(150px, 220px));
  justify-content: start;
}

.finance-payable-page.is-negative-mode .finance-payable-date-filter input {
  min-height: 42px;
}

.finance-negative-bulk-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr)) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #bfe7d4;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(14, 165, 233, 0.06)),
    #fbfffd;
  box-shadow: 0 10px 24px rgba(18, 42, 54, 0.07);
  padding: 14px 16px;
}

.finance-negative-bulk-panel > div {
  display: grid;
  gap: 4px;
}

.finance-negative-bulk-panel span {
  color: #5f6f6c;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.finance-negative-bulk-panel strong {
  color: #09253d;
  font-size: 18px;
}

.finance-negative-bulk-panel button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #23b46b, #078548);
  color: #ffffff;
  cursor: pointer;
  font-weight: 900;
  padding: 0 16px;
  box-shadow: 0 12px 22px rgba(7, 133, 72, 0.18);
}

.finance-negative-bulk-panel button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.3);
  opacity: 0.55;
}

.finance-negative-bulk-panel svg {
  width: 18px;
  height: 18px;
}

.finance-negative-select-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid #bfe7d4;
  border-radius: 12px;
  background: #f4fffa;
  padding: 8px 12px;
  box-shadow: 0 8px 18px rgba(18, 42, 54, 0.05);
}

.finance-negative-select-all label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
}

.finance-negative-select-all input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.finance-negative-select-all-box {
  position: relative;
  width: 24px;
  height: 24px;
  border: 2px solid #17a76b;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 0 0 0 2px #ffffff;
}

.finance-negative-select-all input:checked + .finance-negative-select-all-box,
.finance-negative-select-all input:indeterminate + .finance-negative-select-all-box {
  border-color: #0aa565;
  background: #0aa565;
}

.finance-negative-select-all input:checked + .finance-negative-select-all-box::after,
.finance-negative-select-all input:indeterminate + .finance-negative-select-all-box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  width: 10px;
  height: 6px;
  border-left: 3px solid #ffffff;
  border-bottom: 3px solid #ffffff;
  transform: rotate(-45deg);
}

.finance-negative-select-all input:indeterminate + .finance-negative-select-all-box::after {
  left: 5px;
  top: 10px;
  width: 10px;
  height: 0;
  border-left: 0;
  border-bottom: 3px solid #ffffff;
  transform: none;
}

.finance-negative-select-all strong {
  color: #08243c;
  font-size: 14px;
}

.finance-negative-select-all small {
  color: #5d6b68;
  font-size: 12px;
  font-weight: 800;
}

.finance-negative-select-all input:disabled + .finance-negative-select-all-box,
.finance-negative-select-all input:disabled ~ strong {
  cursor: not-allowed;
  opacity: 0.5;
}

.finance-negative-search {
  flex: 1;
  min-width: min(360px, 100%);
  max-width: 560px;
  position: relative;
}

.finance-negative-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #0f8dcc;
  pointer-events: none;
}

.finance-list-tools .finance-negative-search input {
  width: 100%;
  min-height: 42px;
  padding-left: 38px;
  border-color: #bfe7d4;
  border-radius: 10px;
  background: #fbfffd;
  font-weight: 700;
}

.finance-payable-form {
  align-items: end;
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.05), rgba(14, 165, 233, 0.04)),
    #ffffff;
}

.finance-payable-classic-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
}

.finance-payable-classic-grid .payable-grid-full {
  grid-column: 1 / -1;
}

.finance-payable-classic-grid .payable-grid-wide {
  grid-column: span 4;
}

.finance-payable-classic-grid .payable-grid-half {
  grid-column: span 3;
}

.finance-payable-classic-grid .payable-grid-third {
  grid-column: span 2;
}

.finance-payable-classic-grid textarea {
  min-height: 112px;
}

.finance-filter-card label,
.finance-payable-form label,
.finance-payable-form > div,
.finance-payment-form label {
  display: grid;
  gap: 6px;
}

.finance-filter-card span,
.finance-payable-form span,
.finance-payment-form span {
  color: #0f2234;
  font-size: 12px;
  font-weight: 900;
}

.finance-filter-card input,
.finance-filter-card select,
.finance-payable-form input,
.finance-payable-form select,
.finance-payable-form textarea,
.finance-payment-form input,
.finance-payment-form select {
  width: 100%;
  min-width: 0;
  border: 1px solid #cbd6d3;
  border-radius: 6px;
  background: #ffffff;
  color: #163144;
  font: inherit;
  padding: 10px 12px;
}

.finance-payable-form textarea {
  resize: vertical;
}

.finance-filter-card .span-2,
.finance-payable-form .span-2 {
  grid-column: span 2;
}

.finance-filter-card .finance-filter-search {
  grid-column: span 2;
}

.finance-payable-form .span-3 {
  grid-column: 1 / -1;
}

.finance-payment-form .span-2 {
  grid-column: span 2;
}

.finance-payment-form .span-3 {
  grid-column: 1 / -1;
}

.finance-field-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  gap: 10px;
}

.finance-paid-map-card {
  display: grid;
  gap: 14px;
  border: 1px solid #bfe4d3;
  border-left: 5px solid #21a765;
  border-radius: 8px;
  background: linear-gradient(180deg, #f1fff8 0%, #ffffff 100%);
  box-shadow: 0 10px 22px rgba(33, 167, 101, 0.08);
  padding: 14px;
}

.finance-paid-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #d7efe4;
  padding-bottom: 10px;
}

.finance-paid-map-head strong {
  display: block;
  color: #0f5132;
  font-size: 16px;
}

.finance-paid-map-head small {
  display: block;
  color: #527466;
  font-weight: 800;
  margin-top: 3px;
}

.finance-paid-map-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.finance-paid-map-grid label {
  display: grid;
  gap: 6px;
}

.finance-paid-map-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  border: 1px solid #d7efe4;
  border-radius: 7px;
  background: #f8fffb;
  color: #527466;
  font-size: 12px;
  font-weight: 800;
  padding: 10px 12px;
}

.finance-paid-map-preview strong {
  color: #0f5132;
  font-size: 13px;
}

.finance-paid-map-preview span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #e7f8ef;
  color: #0f5132;
  padding: 5px 9px;
}

.finance-paid-map-preview.is-negative {
  border-color: #fecaca;
  background: #fff7f7;
  color: #b42318;
}

.finance-paid-map-preview.is-negative strong,
.finance-paid-map-preview.is-negative span {
  color: #b42318;
}

.finance-paid-map-preview.is-negative span {
  background: #fee4e2;
}

.finance-payment-map-preview {
  margin-top: 2px;
}

.finance-account-attachments-card {
  display: grid;
  gap: 14px;
  border: 1px solid #d9e2e0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(18, 42, 54, 0.06);
  padding: 18px;
}

.finance-round-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #3a92dc;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(58, 146, 220, 0.22);
}

.finance-round-add svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.finance-search-button,
.finance-pay-button {
  align-self: end;
  justify-self: end;
}

.finance-list-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.finance-list-tools label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #425451;
  font-weight: 700;
}

.finance-list-tools label:last-child {
  flex: 1;
  justify-content: flex-end;
}

.finance-list-tools select {
  border: 1px solid #cbd6d3;
  border-radius: 6px;
  padding: 8px 10px;
}

.finance-list-tools input {
  width: min(520px, 100%);
  border: 1px solid #cbd6d3;
  border-radius: 6px;
  padding: 9px 11px;
}

.finance-payable-list {
  display: grid;
  gap: 10px;
}

.finance-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border: 1px solid #d7e5e1;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
  box-shadow: 0 10px 22px rgba(18, 42, 54, 0.05);
}

.records-pagination {
  margin-top: 14px;
}

.finance-pagination-summary {
  color: #60716d;
  font-size: 12px;
  font-weight: 900;
}

.finance-pagination-pages {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.finance-page-button {
  min-width: 34px;
  min-height: 34px;
  border: 1px solid #cfe0dc;
  border-radius: 8px;
  background: #f8fcfb;
  color: #0f2234;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.finance-page-button:hover:not(:disabled) {
  border-color: #25a7e0;
  background: #e8f7ff;
  transform: translateY(-1px);
}

.finance-page-button.is-active {
  border-color: #168bd3;
  background: linear-gradient(180deg, #2f98e8, #1975c8);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(25, 117, 200, 0.2);
}

.finance-page-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.finance-page-ellipsis {
  color: #60716d;
  font-weight: 900;
  padding: 0 3px;
}

.finance-payable-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.4fr) repeat(6, minmax(82px, 0.65fr)) minmax(140px, 0.9fr);
  gap: 10px;
  align-items: center;
  border: 1px solid #d9e2e0;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  box-shadow: 0 10px 22px rgba(18, 42, 54, 0.05);
}

.finance-payable-row.is-bulk-row,
.finance-payable-row.is-negative-row {
  grid-template-columns: 42px minmax(180px, 1.35fr) repeat(6, minmax(74px, 0.58fr)) minmax(132px, 0.85fr);
}

.finance-negative-select {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  position: relative;
}

.finance-negative-select input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.finance-negative-select span {
  width: 24px;
  height: 24px;
  border: 2px solid #b9d7d0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 0 0 0 2px #ffffff;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.finance-negative-select input:checked + span {
  border-color: #0b9a5a;
  background: #0b9a5a;
}

.finance-negative-select input:disabled {
  cursor: not-allowed;
}

.finance-negative-select input:disabled + span {
  opacity: 0.35;
  cursor: not-allowed;
}

.finance-negative-select input:checked + span::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 6px;
  border-left: 3px solid #ffffff;
  border-bottom: 3px solid #ffffff;
  transform: translate(6px, 7px) rotate(-45deg);
}

.finance-payable-row:nth-child(even) {
  background: #f7faf9;
}

.finance-payable-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.finance-payable-main strong {
  color: #102538;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.finance-payable-main small,
.finance-payable-cell span {
  color: #60716d;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.finance-payable-cell {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.finance-payable-cell strong,
.finance-payable-money {
  color: #11283d;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.finance-payable-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 900;
}

.finance-payable-status.is-due {
  background: #fff1d8;
  color: #a15f00;
}

.finance-payable-status.is-overdue {
  background: #ffe3df;
  color: #c0332d;
}

.finance-payable-status.is-partial {
  background: #e7f1ff;
  color: #1f6dbc;
}

.finance-payable-status.is-paid {
  background: #dff7ea;
  color: #05763f;
}

.finance-payable-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.finance-payable-actions button,
.finance-history-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 900;
  min-height: 36px;
  padding: 8px 10px;
}

.finance-payable-actions svg,
.finance-history-action svg {
  width: 16px;
  height: 16px;
}

.finance-edit-button {
  background: #e9f4ff;
  border-color: #b9dcff;
  color: #1f7dcf;
}

.finance-pay-button-mini {
  background: #e3f8ef;
  border-color: #b4ebcf;
  color: #067a43;
}

.finance-empty-card {
  border: 1px dashed #c5d5d1;
  border-radius: 8px;
  background: #fbfefd;
  color: #596b67;
  font-weight: 800;
  padding: 22px;
  text-align: center;
}

.finance-detail-header > div:last-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.finance-payment-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.finance-account-history-card {
  display: grid;
  gap: 18px;
  border: 1px solid #d9e2e0;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
  padding: 18px;
}

.finance-substatus-log {
  border-bottom: 1px solid #dce6e3;
  padding-bottom: 14px;
}

.finance-substatus-log summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #0f2234;
  cursor: pointer;
  font-size: 20px;
  font-weight: 800;
}

.finance-substatus-log summary::after {
  content: "";
  width: 12px;
  height: 12px;
  border-right: 3px solid #3984c6;
  border-bottom: 3px solid #3984c6;
  transform: rotate(45deg);
}

.finance-substatus-log[open] summary::after {
  transform: rotate(225deg);
}

.finance-payable-payment-view .finance-detail-header small {
  display: block;
  color: #60716d;
  font-weight: 800;
  margin-top: 4px;
}

.finance-payment-open-account,
.finance-payment-back,
.finance-payment-save,
.finance-account-delete,
.finance-attachment-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0;
  padding: 0 16px;
  box-shadow: 0 12px 22px rgba(18, 42, 54, 0.14);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.finance-payment-open-account svg,
.finance-payment-back svg,
.finance-payment-save svg,
.finance-account-delete svg,
.finance-attachment-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.finance-payment-open-account {
  background: linear-gradient(180deg, #36b65a, #229341);
}

.finance-payment-back {
  background: linear-gradient(180deg, #77879a, #59697f);
}

.finance-payment-back svg {
  transform: rotate(180deg);
}

.finance-payment-save {
  background: linear-gradient(180deg, #2daedf, #1689c7);
}

.finance-account-delete {
  background: linear-gradient(180deg, #ef5350, #cc3333);
}

.finance-attachment-button {
  width: 100%;
  min-height: 38px;
  background: linear-gradient(180deg, #2daedf, #1689c7);
}

.finance-payment-open-account:hover,
.finance-payment-back:hover,
.finance-payment-save:hover,
.finance-account-delete:hover,
.finance-attachment-button:hover {
  filter: brightness(1.03);
  box-shadow: 0 16px 28px rgba(18, 42, 54, 0.18);
  transform: translateY(-1px);
}

.finance-payment-open-account:active,
.finance-payment-back:active,
.finance-payment-save:active,
.finance-account-delete:active,
.finance-attachment-button:active {
  transform: translateY(0);
}

.finance-account-actions {
  align-items: center;
  gap: 10px;
  padding-top: 2px;
}

.finance-payment-actions {
  align-items: center;
  gap: 10px;
}

.finance-payment-summary div {
  border: 1px solid #cce9c4;
  border-radius: 8px;
  background: #e8f8e2;
  padding: 14px;
}

.finance-payment-summary span {
  display: block;
  color: #26723a;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.finance-payment-summary strong {
  display: block;
  color: #09253d;
  font-size: 20px;
  margin-top: 6px;
}

.finance-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #dce6e3;
  margin-top: 18px;
  padding-bottom: 10px;
}

.finance-section-title h3 {
  margin: 0;
}

.finance-section-title small {
  color: #60716d;
  font-weight: 700;
}

.finance-payment-history {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.finance-payment-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(120px, 0.8fr) minmax(130px, 0.8fr) minmax(100px, 0.7fr) 48px;
  gap: 10px;
  align-items: center;
  border: 1px solid #dbe6e2;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.finance-payment-row span {
  color: #65736f;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.finance-payment-row strong {
  display: block;
  color: #11283d;
}

.finance-attachments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.finance-attachments article {
  display: grid;
  gap: 10px;
  border: 1px solid #d9e6e2;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.finance-attachments strong {
  color: #11627b;
  text-transform: uppercase;
}

.finance-attachment-placeholder {
  display: grid;
  place-items: center;
  min-height: 130px;
  border: 1px dashed #c7d8d3;
  border-radius: 8px;
  color: #9aa8a5;
}

.finance-attachment-placeholder svg {
  width: 54px;
  height: 54px;
  fill: currentColor;
}

.finance-substatus-card p {
  color: #60716d;
  font-weight: 700;
  max-width: 720px;
}

@media (max-width: 980px) {
  .finance-payable-page {
    width: min(100% - 24px, 1320px);
  }

  .finance-page-header,
  .finance-detail-header {
    flex-direction: column;
  }

  .finance-metrics,
  .finance-filter-card,
  .finance-payable-form,
  .finance-paid-map-grid,
  .finance-payment-summary,
  .finance-payment-form,
  .finance-attachments {
    grid-template-columns: 1fr;
  }

  .finance-filter-card .span-2,
  .finance-payable-form .span-2,
  .finance-payable-form .span-3,
  .finance-payable-classic-grid .payable-grid-full,
  .finance-payable-classic-grid .payable-grid-wide,
  .finance-payable-classic-grid .payable-grid-half,
  .finance-payable-classic-grid .payable-grid-third,
  .finance-payment-form .span-2 {
    grid-column: auto;
  }

  .finance-payable-row,
  .finance-payment-row {
    grid-template-columns: 1fr;
  }

  .closing-map-method-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .closing-map-cash-values {
    grid-template-columns: 1fr;
  }

  .closing-map-method-row strong,
  .closing-map-method-row b,
  .closing-map-method-row em {
    text-align: left;
  }

  .finance-payable-actions,
  .finance-search-button,
  .finance-pay-button {
    justify-self: stretch;
  }
}

@media (max-width: 1160px) {
  .daily-closing-map-content {
    width: min(100% - 32px, 1160px);
    padding-inline: 0;
  }

  #dailyClosingMapReport {
    width: min(100% - 32px, 1240px);
    padding-inline: 0;
  }

  .closing-map-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }

  .closing-map-box th,
  .closing-map-box td {
    padding: 6px 4px;
    font-size: 10px;
  }

  .closing-map-modern-grid {
    grid-template-columns: 1fr;
  }

  .closing-map-consolidated-row {
    grid-template-columns: minmax(0, 1fr) minmax(120px, 0.65fr) minmax(92px, 0.45fr) minmax(92px, 0.45fr);
  }

  .closing-map-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .closing-map-panel.is-large {
    grid-row: auto;
  }

  .ficha-layout {
    grid-template-columns: 1fr;
  }

  .ficha-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .patient-photo-placeholder,
  .photo-links,
  .pending-button,
  .ficha-side-menu {
    grid-column: 1 / -1;
  }

  .ficha-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .budget-form-grid {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .budget-form-grid span,
  .budget-wide-field span,
  .budget-full-field span {
    grid-column: 1;
  }

  .budget-form-grid input,
  .budget-form-grid select,
  .budget-form-grid textarea,
  .budget-wide-field input,
  .budget-full-field textarea {
    grid-column: 2;
  }

  .budget-alert {
    margin-left: 0;
  }

  .procedure-balance-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .budget-procedure-item {
    grid-template-columns: 1fr;
  }

  .budget-procedure-actions {
    grid-template-columns: repeat(2, 32px);
    justify-content: flex-end;
  }

  .budget-action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .ficha-grid label,
  .ficha-grid label.wide-field {
    grid-column: span 1;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .patients-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .register-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .opening-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-board-grid {
    grid-template-columns: 1fr;
  }

  .home-finance-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .daily-overview-showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .daily-cash-card {
    grid-column: 1 / -1;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .finance-panel,
  .chairs-panel {
    margin-top: 0;
  }
}

@media (max-width: 900px) {
  .daily-closing-map-content {
    width: min(100% - 20px, 1160px);
    padding-inline: 0;
  }

  .closing-map-modern-header,
  .closing-map-modern-meta {
    grid-template-columns: 1fr;
  }

  .closing-map-modern-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .closing-map-kpis,
  .closing-map-facts,
  .closing-map-stats-grid,
  .closing-map-consolidated-row {
    grid-template-columns: 1fr;
  }

  .closing-map-consolidated-row strong,
  .closing-map-consolidated-row b {
    text-align: left;
  }

  .closing-map-professional-main {
    grid-template-columns: 1fr;
  }

  .closing-map-professional-value {
    justify-items: start;
    min-width: 0;
  }

  .closing-map-payment-main {
    grid-template-columns: 1fr;
  }

  .closing-map-payment-value {
    justify-self: start;
  }

  .payment-page-header,
  .payment-action-row,
  .payment-section-header {
    align-items: stretch;
    flex-direction: column;
  }

  .payment-top-actions {
    justify-content: flex-start;
  }

  .payment-summary-inline {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .payment-ledger-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .payment-ledger-actions {
    justify-content: flex-start;
  }

  .payment-specialty-grid {
    grid-template-columns: 1fr;
  }

  .closing-map-grid,
  .closing-map-meta {
    grid-template-columns: 1fr;
  }

  .closing-map-watermark {
    font-size: 44px;
  }

  .portal-header {
    height: auto;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
  }

  .portal-nav {
    width: 100%;
    overflow-x: auto;
  }

  .portal-main {
    width: min(100% - 28px, 720px);
    padding-top: 22px;
  }

  .portal-access-row,
  .portal-controls,
  .quick-access,
  .portal-summary {
    grid-template-columns: 1fr;
  }

  .quick-access label {
    max-width: none;
  }

  .region-grid {
    gap: 14px;
    max-width: none;
  }

  .clinic-cloud-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .clinic-filter-field {
    width: 100%;
  }

  .clinic-table-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .clinic-table-toolbar input {
    width: min(420px, calc(100vw - 90px));
  }

  .ficha-grid {
    grid-template-columns: 1fr;
  }

  .budget-form-grid {
    grid-template-columns: 1fr;
  }

  .ficha-grid label,
  .ficha-grid label.wide-field,
  .ficha-grid label.full-field {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }

  .ficha-grid span {
    text-align: left;
  }

  .budget-form-grid span,
  .budget-wide-field span,
  .budget-full-field span,
  .budget-form-grid input,
  .budget-form-grid select,
  .budget-form-grid textarea,
  .budget-wide-field input,
  .budget-full-field textarea {
    grid-column: 1;
    text-align: left;
  }

  .balance-strip {
    grid-template-columns: 1fr;
  }

  .procedure-balance-strip {
    grid-template-columns: 1fr;
  }

  .budget-procedure-main,
  .budget-procedure-values {
    grid-template-columns: 1fr;
  }

  .budget-procedure-marker {
    justify-content: start;
    justify-items: start;
    min-width: 0;
  }

  .balance-strip span {
    justify-content: space-between;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, var(--sidebar-width));
    transform: translateX(-100%);
    transition: transform 180ms ease;
    box-shadow: 18px 0 50px rgba(24, 32, 28, 0.18);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .mobile-only {
    display: grid;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .clinic-home-menu {
    padding: 10px 16px;
  }

  .home-status-grid,
  .home-board-grid {
    padding-right: 16px;
    padding-left: 16px;
  }

  .home-compact-row,
  .home-finance-metrics {
    grid-template-columns: 1fr;
  }

  .patients-content {
    padding: 16px;
  }

  .professionals-content {
    padding: 16px;
  }

  .specialties-content {
    width: 100%;
    padding: 16px;
  }

  .payment-discount-content {
    width: 100%;
    padding: 16px;
  }

  .payment-discount-head {
    display: none;
  }

  .payment-discount-table-wrap {
    display: grid;
    gap: 10px;
    overflow-x: visible;
  }

  .payment-discount-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) 54px;
    min-height: 0;
    border: 1px solid #d7d7d7;
    border-radius: 4px;
    overflow: hidden;
  }

  .payment-discount-row label {
    display: grid;
    gap: 5px;
    padding: 8px;
  }

  .payment-discount-row label > span {
    display: block;
    color: #5c6975;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .payment-discount-remove-row {
    grid-column: 3;
    grid-row: 1 / span 3;
    min-height: auto;
  }

  .commission-content {
    width: 100%;
    padding: 16px;
  }

  .commission-rule-tabs {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 4px 18px;
  }

  .commission-rule-tabs-title {
    width: 100%;
  }

  .commission-standard-head,
  .commission-special-head {
    display: none;
  }

  .commission-standard-row,
  .commission-special-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    margin-bottom: 12px;
    border-top: 1px solid #d7d7d7;
  }

  .commission-standard-row label,
  .commission-special-row label {
    display: grid;
    gap: 5px;
    padding: 9px;
  }

  .commission-standard-row label > span,
  .commission-special-row label > span {
    display: block;
    color: #4c5863;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .commission-remove-row {
    min-height: 46px;
    grid-column: 1 / -1;
    border-top: 1px solid #d7d7d7;
  }

  .daily-content {
    padding: 16px;
  }

  .daily-summary-heading,
  .daily-summary-metrics,
  .daily-summary-tabs,
  .daily-summary-panel {
    width: 100%;
  }

  .daily-summary-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .daily-summary-filters {
    align-items: stretch;
  }

  #dailySummaryClinic {
    width: 100%;
  }

  .daily-summary-filters label:first-child {
    flex: 1;
  }

  .daily-summary-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .daily-overview-showcase {
    grid-template-columns: 1fr;
  }

  .daily-map-card-table {
    width: calc(100% - 24px);
  }

  .daily-cash-card {
    grid-column: auto;
  }

  .daily-overview-grid {
    grid-template-columns: 1fr;
  }

  .daily-filter-card > label {
    grid-template-columns: 1fr;
  }

  .payment-form-grid {
    grid-template-columns: 1fr;
  }

  .payment-form-grid label,
  .payment-form-grid .payment-method-field,
  .payment-form-grid .payment-installments-field,
  .payment-form-grid .payment-specialty-field,
  .payment-form-grid .payment-note-field {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }

  .payment-form-grid span {
    text-align: left;
  }

  .payment-specialty-available {
    grid-column: 1;
    margin-top: 0;
  }

  .professional-opening-panel {
    width: 100%;
  }

  .opening-meta-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .opening-meta-row label,
  .opening-meta-row div {
    grid-template-columns: 1fr;
  }

  .opening-meta-row span {
    text-align: left;
  }

  .daily-filter-card span {
    text-align: left;
  }

  .patients-filter-card {
    grid-template-columns: 1fr;
  }

  .specialties-filter-card,
  .specialty-create-panel,
  .commission-filter-card {
    grid-template-columns: 1fr;
  }

  .procedure-action-buttons {
    align-items: stretch;
  }

  .procedure-detail-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .procedure-detail-row span,
  .procedure-check-grid span,
  .procedure-generation-grid span,
  .procedure-lab-row span {
    text-align: left;
  }

  .procedure-check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .procedure-generation-grid {
    grid-template-columns: 1fr;
    margin-left: 0;
  }

  .procedure-lab-row {
    margin-left: 0;
  }

  .patients-filter-card label {
    justify-self: stretch;
  }

  .specialties-filter-card label {
    justify-self: stretch;
  }

  .patients-filter-card select {
    flex: 1;
    width: auto;
  }

  .specialties-filter-card select {
    flex: 1;
    width: auto;
  }

  .patients-table-tools {
    align-items: flex-start;
    flex-direction: column;
  }

  .professional-action-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .professional-create-view {
    grid-template-columns: 1fr;
  }

  .professional-form-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .professional-photo-box {
    grid-column: 1 / -1;
  }

  .professional-info-grid {
    grid-template-columns: 1fr;
  }

  .professional-info-grid label,
  .professional-info-grid label.professional-info-full,
  .professional-check-field {
    grid-column: 1 / -1;
    width: 100%;
  }

  .professional-info-grid label,
  .professional-info-grid label.professional-info-full {
    grid-template-columns: 1fr;
  }

  .professional-info-grid span {
    text-align: left;
  }

  .professional-form-grid {
    grid-template-columns: 1fr;
  }

  .professional-form-grid label,
  .professional-form-grid label.professional-wide-field,
  .professional-form-grid label.professional-full-field {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }

  .professional-form-grid span {
    text-align: left;
  }

  .professional-clinic-head,
  .professional-clinic-row {
    grid-template-columns: minmax(0, 1fr) 120px;
  }

  .professional-commission-select-field,
  .professional-commission-selected {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .day-professional-form-grid {
    padding: 20px;
  }

  .day-professional-form-grid label {
    grid-template-columns: 1fr;
  }

  .day-professional-form-grid label > span {
    text-align: left;
  }

  .professional-form-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .professional-filter-card {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .professional-filter-card label {
    grid-template-columns: 1fr;
  }

  .professional-filter-card span {
    text-align: left;
  }

  .professional-search-button {
    justify-self: stretch;
  }

  .specialty-form-actions {
    justify-content: flex-start;
  }

  .commission-filter-card label {
    grid-template-columns: 1fr;
  }

  .commission-filter-card span {
    text-align: left;
  }

  .commission-search-button {
    justify-self: stretch;
  }

  .commission-rule-grid {
    grid-template-columns: 1fr;
  }

  .commission-rule-grid label,
  .commission-rule-grid label.commission-wide-field {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }

  .commission-rule-grid span {
    text-align: left;
  }

  .commission-rule-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .specialty-edit-row {
    grid-template-columns: 1fr;
  }

  .specialty-edit-row span {
    text-align: left;
  }

  .specialty-edit-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .register-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: stretch;
    flex-wrap: wrap;
    min-width: 0;
  }

  .search-field {
    min-width: min(100%, 320px);
  }

  .select-field {
    flex: 1;
  }
}

@media (max-width: 640px) {
  body.cadastro-focus .workspace {
    padding: 0;
  }

  .portal-logo span,
  .portal-logo strong {
    font-size: 22px;
  }

  .portal-heading h1 {
    font-size: 24px;
  }

  .portal-nav button {
    padding: 0 9px;
  }

  .region-card {
    min-height: 210px;
  }

  .clinic-bubble-field {
    grid-template-columns: 1fr;
  }

  .clinic-bubble:nth-child(3n + 2),
  .clinic-bubble:nth-child(4n) {
    margin-top: 0;
  }

  .clinic-bubble-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .workspace {
    padding: 18px 14px 28px;
  }

  h1 {
    font-size: 24px;
  }

  .closing-simulation-dialog,
  .map-generation-dialog {
    width: calc(100vw - 20px);
  }

  .map-dialog-header,
  .map-dialog-actions {
    padding-inline: 14px;
  }

  .closing-simulation-form-grid,
  .closing-simulation-discounts {
    padding-inline: 14px;
  }

  .closing-simulation-form-grid label,
  .closing-discount-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .closing-simulation-form-grid span,
  .closing-discount-row span,
  .closing-discount-row strong {
    text-align: left;
  }

  .map-dialog-actions {
    flex-direction: column;
  }

  .action-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .primary-action,
  .secondary-action {
    width: 100%;
    white-space: normal;
    text-align: center;
  }

  .metric-grid,
  .home-status-grid,
  .patients-metrics,
  .opening-summary,
  .register-grid,
  .chair-grid,
  .form-grid,
  .patient-form {
    grid-template-columns: 1fr;
  }

  .dashboard-home {
    gap: 16px;
  }

  .clinic-home-menu > strong {
    font-size: 20px;
  }

  .clinic-home-menu .menu-brand-button {
    width: 104px;
    min-height: 66px;
  }

  .menu-brand-logo {
    width: 92px;
    height: 58px;
  }

  .menu-profile {
    width: auto;
    margin-left: auto;
  }

  .clinic-home-menu .menu-profile-trigger {
    width: 64px;
    max-width: 64px;
  }

  .clinic-home-menu .menu-profile-copy strong {
    max-width: none;
  }

  .profile-edit-layer,
  .pending-signature-detail-layer,
  .map-signature-face-layer { padding: 12px; }
  .pending-signatures-layer { padding: 0; }
  .profile-edit-card { max-height: calc(100vh - 24px); gap: 14px; padding: 20px; border-radius: 20px; }
  .pending-signatures-card { width: 100%; height: 100%; min-height: 0; grid-template-rows: auto; overflow: auto; padding: 20px 16px; border-radius: 0; }
  .pending-signatures-heading { grid-template-columns: 48px minmax(0, 1fr); gap: 11px; }
  .pending-signatures-heading-icon { width: 48px; height: 48px; border-radius: 14px; }
  .pending-signatures-heading h2 { font-size: 22px; }
  .pending-signatures-heading p { display: none; }
  .pending-signatures-summary { grid-column: 1 / -1; width: 100%; min-width: 0; align-items: center; flex-direction: row; }
  .pending-signatures-summary > b { max-width: 100%; }
  .pending-signatures-tabs { grid-template-columns: 1fr; }
  .pending-signatures-empty { min-height: 240px; }
  .pending-signature-row { grid-template-columns: 1fr; }
  .pending-signature-sign-action { min-height: 42px; }
  .pending-signature-item { grid-template-columns: 42px minmax(0, 1fr); }
  .pending-signature-item > b { grid-column: 2; justify-self: start; }
  .pending-signature-detail-card,
  .map-signature-face-card { max-height: calc(100vh - 24px); padding: 20px; border-radius: 20px; }
  .pending-signature-detail-grid { grid-template-columns: 1fr; }
  .map-signature-face-preview { min-height: 280px; }
  .profile-edit-photo-section { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .profile-edit-photo-actions { justify-content: center; }
  .profile-edit-fields { grid-template-columns: 1fr; }
  .profile-edit-login-field { grid-column: auto; }
  .profile-edit-card footer { display: grid; grid-template-columns: 1fr 1fr; }

  .home-status-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .home-status-card .status-icon {
    min-height: 76px;
  }

  .patients-top-menu {
    min-height: 74px;
  }

  .daily-top-menu {
    min-height: 74px;
  }

  .professionals-top-menu {
    min-height: 74px;
  }

  .specialties-top-menu {
    min-height: 74px;
  }

  .commission-top-menu {
    min-height: 74px;
  }

  .patients-metric-card {
    min-height: 96px;
  }

  .procedure-tabs {
    overflow-x: auto;
  }

  .procedure-tabs button {
    white-space: nowrap;
  }

  .procedure-action-buttons {
    flex-direction: column;
  }

  .daily-title {
    font-size: 22px;
  }

  .daily-summary-filters {
    flex-direction: column;
  }

  .daily-summary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .patients-filter-card {
    padding: 14px;
  }

  .patients-create-button,
  .professional-action-card button,
  .professional-filter-card button,
  .professional-add-clinic,
  .professional-form-actions,
  .professional-form-actions button,
  .commission-action-card button,
  .commission-filter-card button,
  .commission-rule-actions,
  .commission-rule-actions button,
  .procedure-detail-actions,
  .procedure-detail-actions button,
  .specialty-form-actions,
  .specialty-form-actions button,
  .specialty-edit-actions,
  .specialty-edit-actions button,
  .patients-table-tools label,
  .patients-table-tools input {
    width: 100%;
  }

  .patients-table-tools label {
    align-items: stretch;
    flex-direction: column;
  }

  .specialty-form-actions {
    flex-direction: column;
  }

  .professional-form-sidebar {
    grid-template-columns: 1fr;
  }

  .professional-form-actions {
    flex-direction: column;
  }

  .commission-rule-actions {
    flex-direction: column;
  }

  .commission-standard-row,
  .commission-special-row {
    grid-template-columns: 1fr;
  }

  .procedure-check-grid {
    grid-template-columns: 1fr;
  }

  .procedure-detail-actions {
    flex-direction: column;
  }

  .specialty-edit-actions {
    flex-direction: column;
  }

  .home-board-header {
    align-items: stretch;
    flex-direction: column;
  }

  .home-board-action,
  .home-square-action,
  .patient-home-widget .primary-action {
    width: 100%;
  }

  .home-mini-search {
    margin-right: 10px;
    margin-left: 10px;
  }

  .span-2 {
    grid-column: auto;
  }

  .panel {
    padding: 14px;
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .segmented-control {
    width: 100%;
  }

  .appointment-card,
  .queue-item {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .appointment-card .pill,
  .queue-item .pill {
    grid-column: 2;
    justify-self: start;
  }

  .bar-row {
    grid-template-columns: 1fr 70px;
  }

  .bar-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.indicator-page {
  width: min(100% - 48px, 1320px);
  display: grid;
  gap: 16px;
  margin: 0 auto 36px;
  padding-top: 14px;
}

.indicator-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #d9e2e0;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f6faf9 100%);
  box-shadow: 0 12px 30px rgba(18, 42, 54, 0.08);
  padding: 18px 20px;
}

.indicator-page-header span,
.indicator-filter-card span,
.map-surplus-row small,
.map-surplus-metrics span {
  color: #607077;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.indicator-page-header h2 {
  margin: 4px 0;
  color: #09253d;
  font-size: 28px;
}

.indicator-page-header p {
  margin: 0;
  color: #52616a;
  font-weight: 700;
}

.indicator-page-header > strong {
  min-width: 150px;
  border-radius: 999px;
  background: #e8f8ef;
  color: #04954d;
  font-size: 22px;
  font-weight: 950;
  padding: 12px 18px;
  text-align: center;
}

.indicator-page-header > strong.is-negative {
  background: #fff0f0;
  color: #e23d37;
}

.indicator-filter-card {
  display: grid;
  grid-template-columns: 160px 160px 180px minmax(220px, 1fr);
  gap: 14px;
  border: 1px solid #d9e2e0;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(18, 42, 54, 0.06);
  padding: 16px;
}

.indicator-filter-card label {
  display: grid;
  gap: 6px;
}

.indicator-filter-card input,
.indicator-filter-card select {
  min-height: 40px;
  width: 100%;
  border: 1px solid #cdd9d6;
  border-radius: 7px;
  background: #ffffff;
  color: #0f2535;
  font: inherit;
  padding: 8px 11px;
}

.map-surplus-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.map-surplus-metrics article {
  border: 1px solid #d9e2e0;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(18, 42, 54, 0.06);
  padding: 16px;
}

.map-surplus-metrics strong {
  display: block;
  margin-top: 8px;
  color: #09253d;
  font-size: 24px;
  font-weight: 950;
}

.map-surplus-list-card {
  border: 1px solid #d9e2e0;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(18, 42, 54, 0.08);
  padding: 14px;
}

.map-surplus-list-head,
.map-surplus-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) minmax(180px, 1.4fr) minmax(115px, 0.9fr) minmax(115px, 0.9fr) minmax(115px, 0.9fr) minmax(130px, 0.8fr);
  gap: 10px;
  align-items: center;
}

.map-surplus-list-head {
  margin-bottom: 10px;
  border-radius: 8px;
  background: #eaf2f7;
  color: #314351;
  font-size: 12px;
  font-weight: 950;
  padding: 11px 12px;
  text-transform: uppercase;
}

.map-surplus-list {
  display: grid;
  gap: 10px;
}

.map-surplus-row {
  border: 1px solid #dce7e5;
  border-left: 5px solid #08a85d;
  border-radius: 10px;
  background: #fbfefd;
  padding: 13px 12px;
}

.map-surplus-row.is-negative {
  border-left-color: #e23d37;
  background: #fffafa;
}

.map-surplus-row strong {
  display: block;
  color: #09253d;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.map-surplus-date span {
  display: block;
  color: #64747d;
  font-size: 12px;
  font-weight: 800;
}

.map-surplus-balance strong {
  color: #04954d;
}

.map-surplus-row.is-negative .map-surplus-balance strong {
  color: #e23d37;
}

.map-surplus-actions {
  display: flex;
  justify-content: flex-end;
}

.map-surplus-actions button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 950;
  padding: 9px 14px;
}

.map-surplus-empty {
  border: 1px dashed #bdd5e6;
  border-radius: 10px;
  background: #f6fbff;
  color: #456171;
  font-weight: 850;
  padding: 22px;
  text-align: center;
}

@media (max-width: 900px) {
  .indicator-page {
    width: min(100% - 24px, 1320px);
  }

  .indicator-page-header,
  .indicator-filter-card,
  .map-surplus-metrics,
  .map-surplus-list-head,
  .map-surplus-row {
    grid-template-columns: 1fr;
  }

  .indicator-page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .map-surplus-list-head {
    display: none;
  }

  .map-surplus-actions {
    justify-content: stretch;
  }

  .map-surplus-actions button {
    width: 100%;
  }
}

/* Tec Dent visual polish: camada global para deixar as telas mais arredondadas e coerentes. */
body {
  font-weight: 500;
}

body input:not([type="checkbox"]):not([type="radio"]),
body select,
body textarea {
  color-scheme: only light;
  border: 1px solid #cfe0e7;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

body input:not([type="checkbox"]):not([type="radio"]):focus,
body select:focus,
body textarea:focus {
  border-color: var(--if-cyan);
  background: #ffffff;
  box-shadow:
    0 0 0 4px rgba(19, 183, 204, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  outline: 0;
}

body select option,
body select optgroup {
  color-scheme: only light !important;
  background: #ffffff !important;
  color: var(--ink) !important;
}

body select option:checked {
  background: var(--teal-soft) !important;
  color: var(--ink) !important;
}

/* Impede o Chromium/Windows de aplicar o popup escuro aos selects nativos. */
html,
body,
select,
select:focus,
select:active,
select option,
select optgroup {
  color-scheme: only light !important;
  forced-color-adjust: none;
}

body select {
  background-color: #ffffff !important;
  color: #0b2235 !important;
  -webkit-text-fill-color: #0b2235;
}

body select option,
body select optgroup {
  background-color: #ffffff !important;
  color: #0b2235 !important;
  -webkit-text-fill-color: #0b2235;
}

.if-lookup-menu {
  position: fixed;
  z-index: 20000;
  display: grid;
  gap: 4px;
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
  background: #ffffff;
  border: 1px solid #cfe0e7;
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(11, 34, 53, 0.18);
  color: var(--ink);
}

.if-lookup-option {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.if-lookup-option:hover,
.if-lookup-option:focus {
  background: var(--teal-soft);
  outline: 0;
}

.if-lookup-option strong {
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
}

.if-lookup-option small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

body button:not(.menu-brand-button):not(.menu-trigger):not(.menu-profile-trigger):not(.tooth-button) {
  border-radius: 12px;
  letter-spacing: 0;
  transition:
    box-shadow 0.16s ease,
    filter 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease;
}

body button:not(.menu-brand-button):not(.menu-trigger):not(.menu-profile-trigger):not(.tooth-button):hover {
  filter: brightness(1.02);
}

body button:not(.menu-brand-button):not(.menu-trigger):not(.menu-profile-trigger):not(.tooth-button):active {
  filter: brightness(.99);
}

body :is(
  .panel,
  .clean-panel,
  .register-panel,
  .home-board,
  .home-board-card,
  .home-compact-card,
  .home-finance-summary,
  .home-status-card,
  .patient-home-widget,
  .metric-card,
  .patients-metric-card,
  .patients-filter-card,
  .patients-table-card,
  .daily-filter-card,
  .daily-summary-heading,
  .daily-summary-panel,
  .daily-summary-metrics article,
  .daily-cash-card,
  .daily-movement-card,
  .daily-recent-card,
  .daily-overview-grid > article,
  .opening-panel,
  .opening-summary article,
  .daily-map-professional-card,
  .professional-action-card,
  .professional-filter-card,
  .professional-create-view,
  .professional-form-sidebar,
  .professional-photo-box,
  .specialties-filter-card,
  .specialty-create-panel,
  .commission-action-card,
  .commission-filter-card,
  .commission-rule-card,
  .payment-discount-card,
  .procedure-action-card,
  .procedure-filter-card,
  .budget-card,
  .budget-summary-card,
  .budget-detail-card,
  .budget-procedure-item,
  .procedure-balance-strip,
  .payment-page-card,
  .payment-ledger-card,
  .payment-summary-card,
  .finance-action-card,
  .finance-filter-card,
  .finance-payable-form,
  .finance-payable-payment-panel,
  .finance-substatus-card,
  .finance-account-section,
  .finance-account-history-card,
  .finance-account-attachments-card,
  .finance-metric-card,
  .finance-payment-summary div,
  .finance-attachments article,
  .indicator-filter-card,
  .map-surplus-list-card
) {
  border-color: var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(11, 34, 53, 0.07);
}

body :is(
  .home-board,
  .home-finance-summary,
  .patient-home-widget,
  .patients-filter-card,
  .daily-filter-card,
  .daily-summary-heading,
  .opening-panel,
  .professional-action-card,
  .professional-filter-card,
  .specialties-filter-card,
  .specialty-create-panel,
  .commission-action-card,
  .commission-filter-card,
  .payment-discount-card,
  .finance-filter-card,
  .finance-payable-form,
  .finance-payable-payment-panel
) {
  border-top: 3px solid rgba(19, 183, 204, 0.5);
}

body :is(
  .home-table-wrap,
  .table-wrap,
  .clinic-table-toolbar,
  .daily-specialty-table-wrap,
  .daily-paid-panel,
  .daily-summary-table-wrap,
  .payment-discount-table-wrap,
  .patients-table-wrap,
  .professionals-table-wrap,
  .specialties-table-wrap,
  .commission-table-wrap,
  .procedure-table-wrap,
  .finance-payable-list,
  .finance-payment-history,
  .finance-substatus-card,
  .budget-payment-table-wrap
) {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(11, 34, 53, 0.05);
  overflow: hidden;
}

body :is(
  table,
  .home-mini-table,
  .daily-table,
  .daily-summary-table,
  .daily-map-card-table,
  .patients-table,
  .professionals-table,
  .specialties-table,
  .clinic-table,
  .procedure-table,
  .budget-payment-table,
  .finance-payment-history table
) {
  border-color: #d9e8ea;
}

body :is(
  table thead th,
  .home-mini-table th,
  .daily-table th,
  .daily-summary-table th,
  .daily-map-card-table th,
  .patients-table th,
  .professionals-table th,
  .specialties-table th,
  .clinic-table th,
  .procedure-table th,
  .budget-payment-table th,
  .finance-payment-history th
) {
  background: linear-gradient(180deg, #edf8fa, #e3f2f4);
  color: #15354a;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

body :is(
  table tbody tr:nth-child(even),
  .home-mini-table tbody tr:nth-child(even),
  .daily-table tbody tr:nth-child(even),
  .daily-summary-table tbody tr:nth-child(even),
  .daily-map-card-table tbody tr:nth-child(even),
  .patients-table tbody tr:nth-child(even),
  .professionals-table tbody tr:nth-child(even),
  .specialties-table tbody tr:nth-child(even),
  .procedure-table tbody tr:nth-child(even)
) {
  background: rgba(234, 246, 248, 0.48);
}

body :is(
  .primary-action,
  .text-button,
  .patients-create-button,
  .professional-action-card button,
  .professional-filter-card button,
  .professional-add-clinic,
  .commission-action-card button,
  .commission-filter-card button,
  .commission-rule-actions button,
  .procedure-detail-actions button,
  .procedure-action-buttons button,
  .specialty-form-actions button,
  .specialty-edit-actions button,
  .payment-discount-footer button,
  .opening-actions button,
  .opening-add-professional,
  .opening-add-without-professional,
  .daily-map-title button,
  .map-dialog-actions button,
  .daily-closing-confirm-actions button,
  .finance-create-payable-button,
  .finance-payable-search-button,
  .finance-search-button,
  .finance-pay-button,
  .finance-payment-open-account,
  .finance-payment-back,
  .finance-payment-save,
  .finance-account-delete,
  .finance-attachment-button,
  .finance-negative-bulk-panel button,
  .map-surplus-actions button
) {
  min-height: 40px;
  border: 0;
  border-radius: 13px;
  font-weight: 950;
  box-shadow: 0 10px 20px rgba(11, 34, 53, 0.13);
}

body :is(
  .primary-action,
  .text-button,
  .patients-create-button,
  .finance-create-payable-button,
  .finance-payable-search-button,
  .finance-payment-save,
  .opening-add-professional
) {
  background: linear-gradient(180deg, #18b9d0, #108fc4);
  color: #ffffff;
}

body :is(
  .finance-payment-back,
  .daily-closing-confirm-actions button:first-child,
  .map-dialog-actions button:first-child
) {
  background: linear-gradient(180deg, #5f7185, #46566c);
  color: #ffffff;
}

body :is(
  .finance-account-delete,
  .budget-delete-button,
  .professional-icon-button.is-delete
) {
  background: #fff0f0;
  color: #e03535;
}

body :is(
  dialog,
  .modal-panel,
  .clinic-dialog-panel,
  .day-professional-dialog,
  .closing-simulation-dialog,
  .map-generation-dialog,
  .daily-closing-confirm-dialog,
  .system-confirm-dialog,
  .payable-post-payment-panel,
  .payable-negative-batch-panel
) {
  border: 1px solid #d6e7e9;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 30px 70px rgba(5, 27, 43, 0.22);
}

body :is(
  .modal-header,
  .clinic-dialog-header,
  .day-professional-dialog-header,
  .map-dialog-header,
  .daily-closing-confirm-header,
  .system-confirm-header,
  .payable-post-payment-header
) {
  border-bottom-color: #dcebed;
  background: linear-gradient(180deg, #ffffff, #f6fbfb);
}

body :is(
  .status-pill,
  .finance-payable-status,
  .procedure-status-pill,
  .budget-status-pill,
  .opening-professional-tag,
  .home-panel-header h2 span,
  .daily-summary-status,
  .map-surplus-status
) {
  border-radius: 999px;
  font-weight: 950;
}

body :is(
  .icon-button,
  .professional-icon-button,
  .budget-card-icon-button,
  .daily-row-action,
  .finance-payable-actions button,
  .finance-history-action,
  .budget-delete-button,
  .budget-edit-button
) {
  border-radius: 12px;
}

body :is(
  .page-title,
  .patients-title,
  .daily-title,
  .professional-title,
  .specialties-title,
  .commission-title,
  .payment-discount-title,
  .finance-page-header h2,
  .finance-detail-header h2,
  .indicator-page-header h2,
  .budget-title,
  .patient-form h1
) {
  color: #071f35;
  font-weight: 950;
  letter-spacing: 0;
}

body :is(
  .home-panel-header,
  .daily-panel-header,
  .finance-section-title,
  .payment-section-header,
  .budget-section-title,
  .daily-section-title,
  .daily-map-title,
  .map-surplus-section-title
) {
  border-bottom-color: #dcebed;
}

body :is(
  .empty-state,
  .daily-breakdown-empty,
  .daily-summary-empty,
  .daily-map-empty,
  .finance-empty-card,
  .map-surplus-empty,
  .payment-empty,
  .opening-professional-empty
) {
  border-radius: 16px;
  border-color: #bfe0eb;
  background: linear-gradient(180deg, #f9fdff, #f0f8fb);
  color: #44606e;
}

.queue-row-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
}

.queue-icon-button {
  width: 31px;
  height: 31px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: #eef7fb;
  color: #158ac1;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(10, 38, 58, 0.12);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.queue-icon-button:hover {
  box-shadow: 0 10px 18px rgba(10, 38, 58, 0.16);
  filter: brightness(1.02);
}

.queue-icon-button svg {
  width: 16px;
  height: 16px;
}

.queue-icon-button.is-play,
.queue-icon-button.is-power {
  background: #e8fbf1;
  color: #079854;
}

.queue-icon-button.is-person {
  background: #edf5ff;
  color: #2f7fbe;
}

.queue-icon-button.is-edit {
  background: #fff8e8;
  color: #ef9900;
}

.queue-icon-button.is-note {
  background: #eef5fb;
  color: #638092;
}

.queue-icon-button.is-note.has-observation {
  position: relative;
  border: 1px solid #efc25a;
  background: linear-gradient(145deg, #fff9e9, #ffe7a6);
  color: #9c5e00;
  box-shadow: 0 7px 16px rgba(174, 110, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.queue-icon-button.is-note.has-observation::after {
  content: "";
  position: absolute;
  top: -4px;
  right: -4px;
  width: 8px;
  height: 8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #f39a18;
  box-shadow: 0 2px 6px rgba(156, 94, 0, 0.38);
}

.queue-icon-button.is-note.has-observation:hover,
.queue-icon-button.is-note.has-observation:focus-visible {
  border-color: #df9f20;
  background: linear-gradient(145deg, #fff4d4, #ffdc7c);
  box-shadow: 0 10px 20px rgba(174, 110, 0, 0.25), 0 0 0 3px rgba(243, 154, 24, 0.13);
}

.queue-observation-bubble {
  position: fixed;
  z-index: 5000;
  width: min(310px, calc(100vw - 24px));
  padding: 12px 14px;
  border: 1px solid #bde8dc;
  border-radius: 17px;
  background: linear-gradient(145deg, #ffffff, #edfff9);
  color: #153a36;
  box-shadow: 0 14px 34px rgba(10, 57, 52, 0.2);
  animation: queueBubbleIn 0.16s ease-out;
}

.queue-observation-bubble-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.queue-observation-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 15px;
  height: 15px;
  border-right: 1px solid #bde8dc;
  border-bottom: 1px solid #bde8dc;
  background: #edfff9;
  transform: translateX(-50%) rotate(45deg);
}

.queue-observation-bubble.is-below::after {
  top: -8px;
  bottom: auto;
  border: 0;
  border-left: 1px solid #bde8dc;
  border-top: 1px solid #bde8dc;
  background: #ffffff;
}

.queue-observation-bubble-label {
  display: block;
  color: #07966f;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.queue-observation-edit-button {
  display: inline-grid;
  flex: 0 0 23px;
  width: 23px;
  height: 23px;
  place-items: center;
  padding: 0;
  border: 1px solid #c7e9df;
  border-radius: 8px;
  background: #ffffff;
  color: #078d70;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(7, 105, 86, 0.1);
}

.queue-observation-edit-button:hover,
.queue-observation-edit-button:focus-visible {
  border-color: #07966f;
  background: #e6faf3;
}

.queue-observation-edit-button svg {
  width: 12px;
  height: 12px;
}

.queue-observation-bubble p {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.queue-observation-bubble.is-editing > p,
.queue-observation-bubble.is-editing .queue-observation-edit-button {
  display: none;
}

.queue-observation-editor {
  display: grid;
  gap: 7px;
  margin-top: 7px;
}

.queue-observation-editor.is-hidden {
  display: none;
}

.queue-observation-editor label {
  color: #55736e;
  font-size: 10px;
  font-weight: 800;
}

.queue-observation-editor textarea {
  width: 100%;
  min-height: 82px;
  resize: vertical;
  border: 1px solid #b9ddd4;
  border-radius: 11px;
  background: #ffffff;
  color: #153a36;
  padding: 9px 10px;
  font: inherit;
  font-size: 12px;
  line-height: 1.4;
  outline: none;
}

.queue-observation-editor textarea:focus {
  border-color: #07966f;
  box-shadow: 0 0 0 3px rgba(7, 150, 111, 0.12);
}

.queue-observation-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.queue-observation-editor-actions button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #cfe2dd;
  border-radius: 8px;
  background: #ffffff;
  color: #58716d;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.queue-observation-editor-actions button.is-save {
  border-color: #078d70;
  background: #078d70;
  color: #ffffff;
}

@keyframes queueBubbleIn {
  from { opacity: 0; transform: translateY(5px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Contas a pagar — experiência visual Tec Dent */
.finance-payable-page {
  gap: 20px;
  padding-top: 24px;
}

.finance-page-header,
.finance-payable-account-view > .finance-detail-header,
.finance-payable-payment-view > .finance-detail-header {
  position: relative;
  overflow: hidden;
  align-items: center;
  min-height: 86px;
  border: 1px solid #bfe8e1;
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 15%, rgba(255, 255, 255, 0.34), transparent 24%),
    linear-gradient(120deg, #087f74, #10aa91 58%, #20b7b2);
  color: #fff;
  padding: 18px 22px;
  box-shadow: 0 16px 34px rgba(7, 112, 101, 0.18);
}

.finance-page-header::before,
.finance-payable-account-view > .finance-detail-header::before,
.finance-payable-payment-view > .finance-detail-header::before {
  content: "TEC DENT • FINANCEIRO";
  display: block;
  position: absolute;
  top: 10px;
  left: 23px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.finance-page-header > div:first-child,
.finance-payable-account-view > .finance-detail-header > div:first-child,
.finance-payable-payment-view > .finance-detail-header > div:first-child {
  padding-top: 12px;
}

.finance-page-header h2,
.finance-detail-header h2 {
  color: #fff;
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: -0.02em;
}

.finance-page-header small,
.finance-detail-header small,
.finance-payable-payment-view .finance-detail-header small {
  color: rgba(255, 255, 255, 0.83);
}

.finance-tabs {
  border-color: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(4, 75, 69, 0.22);
  padding: 5px;
  backdrop-filter: blur(8px);
}

.finance-tabs button {
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  padding: 10px 16px;
}

.finance-tabs button.is-active {
  background: #fff;
  color: #087f74;
  box-shadow: 0 8px 20px rgba(4, 69, 63, 0.2);
}

.finance-payable-list-view,
.finance-payable-account-view,
.finance-payable-payment-view {
  gap: 16px;
}

.finance-payable-account-view,
.finance-payable-payment-panel {
  border: 0;
  border-radius: 24px;
  background: #f5faf9;
  box-shadow: 0 18px 44px rgba(16, 54, 62, 0.1);
  padding: 18px;
}

.finance-action-card {
  border: 0;
  border-radius: 18px;
  background: linear-gradient(120deg, #f0fffa, #f4fbff);
  padding: 14px 16px;
  box-shadow: inset 0 0 0 1px #ccece5, 0 10px 24px rgba(16, 54, 62, 0.06);
}

.finance-create-payable-button {
  min-height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, #08a678, #0b8d82);
  box-shadow: 0 12px 24px rgba(8, 154, 119, 0.22);
}

.finance-filter-card {
  border: 1px solid #d4ebe6;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  padding: 18px;
  box-shadow: 0 12px 30px rgba(16, 54, 62, 0.07);
}

.finance-filter-card input,
.finance-filter-card select,
.finance-payable-form input,
.finance-payable-form select,
.finance-payable-form textarea,
.finance-payment-form input,
.finance-payment-form select {
  min-height: 44px;
  border-color: #c9dfda;
  border-radius: 12px;
  background: #fbfefd;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.finance-filter-card input:focus,
.finance-filter-card select:focus,
.finance-payable-form input:focus,
.finance-payable-form select:focus,
.finance-payable-form textarea:focus,
.finance-payment-form input:focus,
.finance-payment-form select:focus {
  outline: 0;
  border-color: #11a789;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(17, 167, 137, 0.12);
}

.finance-payable-search-button {
  min-height: 44px;
  border-radius: 13px;
  background: linear-gradient(135deg, #159fbd, #087f9c);
}

.finance-metrics {
  gap: 12px;
}

.finance-metric-card {
  position: relative;
  overflow: hidden;
  min-height: 116px;
  border: 1px solid #d8ebe7;
  border-radius: 20px;
  padding: 17px 18px;
  box-shadow: 0 12px 28px rgba(16, 54, 62, 0.07);
}

.finance-metric-card::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -30px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: currentColor;
  opacity: .06;
}

.finance-metric-card strong {
  font-size: 27px;
}

.finance-metric-card:hover,
.finance-metric-card.is-active {
  border-color: #15aa92;
  box-shadow: 0 16px 34px rgba(7, 127, 116, 0.13);
}

.finance-payable-row {
  border-color: #d7e9e5;
  border-left: 5px solid #17a78d;
  border-radius: 17px;
  background: #fff;
  padding: 14px 15px;
  box-shadow: 0 9px 23px rgba(16, 54, 62, 0.06);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.finance-payable-row:nth-child(even) {
  background: #fbfefd;
}

.finance-payable-row:hover {
  border-color: #9dd9cb;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(16, 54, 62, 0.1);
}

.finance-payable-actions button,
.finance-history-action {
  border-radius: 11px;
}

.finance-edit-button {
  background: #edf7ff;
  border-color: #c8e4f5;
}

.finance-pay-button-mini {
  background: #e9fbf4;
  border-color: #bce8d5;
}

.finance-pagination,
.finance-empty-card {
  border-radius: 16px;
}

.finance-account-section,
.finance-account-history-card,
.finance-account-attachments-card {
  border: 1px solid #d5e9e4;
  border-radius: 20px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 10px 28px rgba(16, 54, 62, 0.06);
}

.finance-section-title,
.finance-account-section .finance-section-title {
  align-items: center;
  border-bottom-color: #d9ebe7;
  margin-top: 0;
}

.finance-section-title h3 {
  color: #123b42;
  font-size: 18px;
}

.finance-payment-summary {
  gap: 14px;
  margin: 0;
}

.finance-payment-summary div {
  position: relative;
  overflow: hidden;
  border: 1px solid #cce8df;
  border-radius: 18px;
  background: linear-gradient(145deg, #fff, #effbf7);
  padding: 17px 18px;
  box-shadow: 0 9px 22px rgba(16, 54, 62, 0.06);
}

.finance-payment-summary strong {
  font-size: 24px;
}

.finance-payment-form {
  border: 1px solid #d2e9e3;
  border-radius: 20px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 12px 28px rgba(16, 54, 62, 0.07);
}

.finance-payment-open-account,
.finance-payment-back,
.finance-payment-save,
.finance-account-delete,
.finance-attachment-button {
  border-radius: 13px;
}

.finance-payment-open-account,
.finance-payment-save {
  background: linear-gradient(135deg, #0eaa7d, #087f74);
}

.finance-payment-row {
  border-color: #d7e9e5;
  border-radius: 14px;
  background: #fbfefd;
  padding: 12px 14px;
}

@media (max-width: 760px) {
  .finance-payable-page { width: min(100% - 20px, 1320px); padding-top: 14px; }
  .finance-page-header,
  .finance-payable-account-view > .finance-detail-header,
  .finance-payable-payment-view > .finance-detail-header { align-items: stretch; flex-direction: column; }
  .finance-tabs { align-self: flex-start; }
  .finance-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-payment-summary { grid-template-columns: 1fr; }
}

.queue-time {
  color: #0b4ec4;
  font-weight: 950;
  white-space: nowrap;
}

.queue-dialog {
  width: min(900px, calc(100vw - 40px));
  padding: 0;
  overflow: hidden;
}

.queue-form {
  margin: 0;
}

.queue-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid #dcebed;
  background: linear-gradient(180deg, #ffffff, #f6fbfb);
}

.queue-dialog-header span {
  display: block;
  color: #5e7180;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.queue-dialog-header h2 {
  margin: 2px 0 0;
  color: #071f35;
  font-size: 22px;
  font-weight: 950;
}

.queue-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px 18px;
  padding: 22px;
}

.queue-field {
  display: grid;
  gap: 7px;
}

.queue-field > span {
  color: #233141;
  font-size: 13px;
  font-weight: 950;
}

.queue-field input,
.queue-field select,
.queue-field textarea {
  width: 100%;
  border: 1px solid #cbd7df;
  border-radius: 12px;
  background: #ffffff;
  color: #0d2134;
  font: inherit;
  padding: 10px 12px;
  box-shadow: inset 0 1px 2px rgba(4, 28, 44, 0.04);
}

.queue-field textarea {
  min-height: 112px;
  resize: vertical;
}

.queue-field-full {
  grid-column: 1 / -1;
}

#unattendedJustificationForm > .queue-field {
  box-sizing: border-box;
  padding: 22px;
}

#unattendedJustificationForm > .queue-field textarea {
  box-sizing: border-box;
  min-height: 128px;
}

.queue-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid #e6eef2;
  background: #ffffff;
}

.queue-dialog-actions button {
  min-height: 40px;
  border: 0;
  border-radius: 13px;
  font-weight: 950;
  box-shadow: 0 10px 20px rgba(11, 34, 53, 0.13);
}

@media (max-width: 720px) {
  .queue-form-grid {
    grid-template-columns: 1fr;
  }

  .queue-field-full {
    grid-column: auto;
  }
}

/* Ajustes de respiro da tela Resumo Diario */
.daily-summary-heading,
.daily-summary-metrics,
.daily-summary-tabs,
.daily-summary-panel {
  width: min(1360px, calc(100% - 32px));
}

.daily-summary-heading {
  border-radius: 18px;
  padding: 22px 24px;
}

.daily-summary-metrics {
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 14px;
}

.daily-summary-metrics article {
  min-height: 116px;
  gap: 8px;
  padding: 18px 18px 16px;
  border-radius: 18px;
}

.daily-summary-metrics span,
.daily-summary-metrics small,
.daily-summary-metrics strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.daily-summary-metrics strong {
  line-height: 1.08;
}

.daily-summary-panel {
  padding-top: 22px;
}

.daily-overview-showcase {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.daily-cash-card,
.daily-movement-card,
.daily-recent-card,
.daily-overview-grid > article {
  border-radius: 18px;
}

.daily-cash-card,
.daily-movement-card,
.daily-recent-card,
.daily-overview-grid > article {
  padding: 20px;
}

.daily-cash-lines > div,
.daily-movement-grid > div,
.daily-recent-item,
.daily-breakdown-row > div {
  min-width: 0;
}

.daily-cash-lines > div,
.daily-recent-item {
  align-items: flex-start;
}

.daily-cash-lines span,
.daily-cash-lines strong,
.daily-movement-grid span,
.daily-movement-grid small,
.daily-movement-grid strong,
.daily-recent-item span,
.daily-recent-item strong,
.daily-breakdown-row span,
.daily-breakdown-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.daily-received-group,
.daily-paid-group {
  border-radius: 18px;
}

.daily-received-group-header,
.daily-paid-group-header {
  min-height: 52px;
  padding: 0 18px;
}

.daily-received-columns,
.daily-paid-columns {
  display: none;
}

.daily-received-list,
.daily-paid-list {
  gap: 12px;
  padding: 14px;
}

.daily-received-row,
.daily-paid-row {
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  align-items: start;
  gap: 12px 16px;
  min-height: 0;
  padding: 14px;
  border-radius: 14px;
}

.daily-received-row span,
.daily-paid-row span {
  min-width: 0;
}

.daily-received-row small,
.daily-paid-row small {
  letter-spacing: 0.01em;
}

.daily-received-row strong,
.daily-paid-row strong {
  font-size: 13px;
}

.daily-received-action-cell,
.daily-paid-action-cell {
  justify-items: start;
  align-self: end;
}

.daily-received-summary,
.daily-paid-summary {
  justify-content: flex-start;
  gap: 12px;
  padding: 14px;
}

.daily-received-summary span,
.daily-paid-summary span {
  min-width: 180px;
  flex: 1 1 180px;
  border-radius: 14px;
  text-align: left;
}

.daily-summary-table-wrap {
  border-radius: 16px;
}

.daily-summary-table th,
.daily-summary-table td {
  padding: 12px 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.daily-summary-card-list {
  display: grid;
  gap: 12px;
}

.daily-summary-card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  align-items: center;
  gap: 12px 16px;
  padding: 14px;
  border: 1px solid #d7e8ea;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(16, 40, 52, 0.06);
}

.daily-summary-card-row:nth-child(even) {
  background: rgba(245, 251, 250, 0.95);
}

.daily-summary-card-row > span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.daily-summary-card-row small {
  color: #62737c;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.daily-summary-card-row strong {
  min-width: 0;
  color: #071b33;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.daily-summary-card-row .daily-money-cell {
  color: #008f4b;
  font-size: 14px;
}

.daily-attendance-card-row {
  grid-template-columns: minmax(70px, 0.5fr) minmax(180px, 1.4fr) minmax(170px, 1.3fr) minmax(130px, 1fr) minmax(150px, 1.1fr) minmax(120px, 0.9fr) minmax(140px, 1fr) minmax(120px, auto);
}

.daily-card-action-cell {
  justify-items: start;
  align-self: end;
}

.daily-row-action.is-patient {
  border-color: #b8eee5;
  background: #e5fff9;
  color: #007a68;
}

@media (max-width: 1080px) {
  .daily-overview-showcase {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1320px) {
  .daily-attendance-card-row {
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  }
}

@media (max-width: 760px) {
  .daily-summary-heading,
  .daily-summary-metrics,
  .daily-summary-tabs,
  .daily-summary-panel {
    width: min(100%, calc(100% - 20px));
  }

  .daily-summary-metrics {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .daily-received-row,
  .daily-paid-row,
  .daily-summary-card-row,
  .daily-attendance-card-row {
    grid-template-columns: 1fr;
  }
}

/* Resumo diario compacto */
.daily-received-groups,
.daily-paid-groups {
  gap: 14px;
}

.daily-compact-group {
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(20, 53, 63, 0.07);
}

.daily-compact-group .daily-summary-table-wrap {
  overflow-x: visible;
  border: 0;
  border-radius: 0 0 12px 12px;
}

.daily-summary-compact-table {
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
}

.daily-summary-compact-table th,
.daily-summary-compact-table td {
  padding: 8px 9px;
  border-color: #dce5e1;
  font-size: 12px;
  line-height: 1.18;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.daily-summary-compact-table th {
  font-size: 10px;
  letter-spacing: 0;
}

.daily-summary-received-table th {
  background: #05a45b;
  color: #ffffff;
}

.daily-summary-paid-table th {
  background: #e24b3e;
  color: #ffffff;
}

.daily-summary-attendance-table th {
  background: #11b7d4;
  color: #ffffff;
}

.daily-summary-neutral-table th,
.daily-summary-patient-table th {
  background: #e7f0f3;
  color: #163041;
}

.daily-summary-compact-table tbody tr:nth-child(even) {
  background: #f5f8f7;
}

.daily-summary-compact-table .daily-row-action {
  min-height: 26px;
  padding: 4px 9px;
  font-size: 11px;
}

.daily-summary-compact-table .daily-row-action svg {
  width: 12px;
  height: 12px;
}

.daily-total-row td {
  background: #f8fcfa !important;
  color: #0b3a2b;
  font-weight: 900;
  text-align: right;
}

.daily-total-row.is-paid td {
  background: #fff7f5 !important;
}

.daily-total-row.is-discount .daily-money-cell,
.daily-total-row.is-paid .daily-money-cell {
  color: #df3f35;
}

.daily-received-group-header,
.daily-paid-group-header {
  min-height: 40px;
}

/* Resumo diario - cartões com identidade Tec Dent */
body .daily-summary-panel {
  overflow: hidden;
  border-top: 4px solid var(--if-cyan);
  background:
    radial-gradient(circle at 100% 0, rgba(17, 183, 212, 0.09), transparent 260px),
    rgba(255, 255, 255, 0.97);
}

.daily-panel-header {
  margin: -22px -20px 22px;
  padding: 24px 36px 20px;
  border-bottom: 1px solid #dcecef;
  background: linear-gradient(110deg, #f2fbfc 0%, #ffffff 64%);
}

.daily-panel-header p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  color: #3f6879;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.075em;
}

.daily-panel-header p::before {
  width: 18px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--if-blue), var(--if-cyan));
  content: "";
}

.daily-panel-header h3 {
  color: #0b2c41;
  font-size: 21px;
  font-weight: 850;
  letter-spacing: -0.015em;
}

.daily-panel-header > strong {
  padding: 9px 14px;
  border: 1px solid #c8e8ec;
  border-radius: 999px;
  background: #ffffff;
  color: var(--if-blue);
  box-shadow: 0 6px 16px rgba(11, 89, 125, 0.08);
}

.daily-received-group,
.daily-paid-group {
  overflow: hidden;
  border-width: 0;
  border-radius: 20px;
  box-shadow: 0 14px 32px rgba(11, 34, 53, 0.09);
}

.daily-received-group-header,
.daily-paid-group-header {
  min-height: 58px;
  padding: 0 30px;
}

.daily-received-group-header h4,
.daily-paid-group-header h4 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.035em;
}

.daily-received-group-header h4::before,
.daily-paid-group-header h4::before {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  background: #ffffff;
  content: "";
}

.daily-received-group-header > strong,
.daily-paid-group-header > strong {
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.daily-received-group-header {
  background: linear-gradient(110deg, #008f65, #10b886);
}

.daily-paid-group-header {
  background: linear-gradient(110deg, #d9473c, #ed6b5d);
}

.daily-received-list,
.daily-paid-list {
  gap: 14px;
  padding: 18px;
  background: #f5fafb;
}

.daily-received-row,
.daily-paid-row {
  position: relative;
  align-items: center;
  gap: 10px 12px;
  min-height: 72px;
  padding: 11px 14px 11px 22px;
  border: 1px solid #d9e9eb;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 7px 18px rgba(13, 52, 66, 0.06);
}

.daily-received-row {
  grid-template-columns:
    minmax(58px, 0.55fr)
    minmax(180px, 2.15fr)
    minmax(120px, 1.45fr)
    minmax(145px, 1.55fr)
    minmax(58px, 0.55fr)
    minmax(112px, 1fr)
    minmax(78px, 0.72fr)
    minmax(86px, 0.78fr)
    minmax(116px, auto);
}

.daily-paid-row {
  grid-template-columns:
    minmax(180px, 1.7fr)
    minmax(150px, 1.35fr)
    minmax(155px, 1.35fr)
    minmax(116px, 0.9fr)
    minmax(100px, 0.8fr)
    minmax(110px, auto);
}

.daily-received-row::before,
.daily-paid-row::before,
.daily-summary-card-row::before {
  position: absolute;
  inset: 14px auto 14px 0;
  width: 5px;
  border-radius: 0 8px 8px 0;
  background: var(--if-cyan);
  content: "";
}

.daily-received-row::before {
  background: #10ad7d;
}

.daily-paid-row::before {
  background: #e65b4f;
}

.daily-received-row:nth-child(even),
.daily-paid-row:nth-child(even),
.daily-summary-card-row:nth-child(even) {
  background: #ffffff;
}

.daily-received-row > span:not(.daily-received-action-cell),
.daily-paid-row > span:not(.daily-paid-action-cell),
.daily-summary-card-row > span:not(.daily-card-action-cell) {
  align-content: start;
  gap: 3px;
  padding: 0;
}

.daily-received-row small,
.daily-paid-row small,
.daily-summary-card-row small {
  color: #71828c;
  font-size: 10px;
  letter-spacing: 0.045em;
}

.daily-received-row strong,
.daily-paid-row strong,
.daily-summary-card-row strong {
  font-size: 14px;
  line-height: 1.25;
}

.daily-received-action-cell,
.daily-paid-action-cell,
.daily-card-action-cell {
  align-self: center;
  justify-self: start;
}

.daily-row-action {
  min-height: 34px;
  padding: 6px 12px;
}

.daily-received-summary,
.daily-paid-summary {
  gap: 14px;
  padding: 18px;
}

.daily-received-summary span,
.daily-paid-summary span {
  min-height: 72px;
  align-content: center;
  padding: 13px 16px;
}

.daily-summary-card-list {
  gap: 16px;
}

.daily-summary-card-row {
  position: relative;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 20px 24px;
  min-height: 142px;
  padding: 24px 24px 24px 30px;
  border: 1px solid #d7e8eb;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 9px 22px rgba(13, 52, 66, 0.07);
}

.daily-budget-card-row::before {
  background: var(--if-blue);
}

.daily-attendance-card-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 174px;
}

.daily-attendance-card-row::before {
  background: var(--if-cyan);
}

.daily-patient-card-row::before {
  background: var(--teal);
}

.daily-summary-card-row .attendance-status-pill {
  justify-self: start;
  width: fit-content;
}

@media (max-width: 1180px) {
  .daily-received-row,
  .daily-paid-row,
  .daily-summary-card-row,
  .daily-attendance-card-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .daily-panel-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px 24px 18px;
  }

  .daily-received-group-header,
  .daily-paid-group-header {
    padding-inline: 22px;
  }

  .daily-received-row,
  .daily-paid-row,
  .daily-summary-card-row,
  .daily-attendance-card-row {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 20px 20px 20px 26px;
  }
}

/* Contraste final dos botões de fechar nos balões de atendimento */
.procedure-attendance-dialog .procedure-attendance-actions .green-action,
.procedure-attendance-detail-dialog .procedure-attendance-detail-footer .green-action {
  border: 1px solid #b9d3dc;
  background: #ffffff;
  color: #083b65;
  font-weight: 900;
  opacity: 1;
  text-shadow: none;
  box-shadow: none;
}

.procedure-attendance-dialog .procedure-attendance-actions .green-action:hover,
.procedure-attendance-dialog .procedure-attendance-actions .green-action:focus-visible,
.procedure-attendance-detail-dialog .procedure-attendance-detail-footer .green-action:hover,
.procedure-attendance-detail-dialog .procedure-attendance-detail-footer .green-action:focus-visible {
  border-color: #78b9c3;
  background: #eaf7f8;
  color: #063b69;
  filter: none;
}

/* Cadastro de profissionais - identidade Tec Dent */
[data-view-panel="CadastroProfissionais"] {
  background: linear-gradient(180deg, #f3f9fb 0, #ffffff 320px);
}

[data-view-panel="CadastroProfissionais"] .professionals-page {
  background: transparent;
}

[data-view-panel="CadastroProfissionais"] .professionals-content {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: 16px 0 42px;
}

[data-view-panel="CadastroProfissionais"] .professional-tabs {
  min-height: 38px;
  gap: 7px;
  margin: 0 0 12px;
  border: 0;
}

[data-view-panel="CadastroProfissionais"] .professional-tabs button {
  min-width: 0;
  min-height: 34px;
  padding: 0 15px;
  border: 1px solid #d3e4e9;
  border-radius: 10px;
  background: #ffffff;
  color: #567181;
  font-size: 12px;
  font-weight: 800;
}

[data-view-panel="CadastroProfissionais"] .professional-tabs button.is-active {
  border-color: #9edfd5;
  background: #eaf9f6;
  color: #087b6b;
}

[data-view-panel="CadastroProfissionais"] .professionals-page-header,
[data-view-panel="CadastroProfissionais"] .professional-form-header {
  min-height: 104px;
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 16px 24px;
  border-radius: 18px;
  background: linear-gradient(115deg, #063b69 0%, #087ab0 58%, #12b9b0 100%);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(5,63,105,.18);
  position: relative;
  overflow: hidden;
}

[data-view-panel="CadastroProfissionais"] .professionals-page-header::after,
[data-view-panel="CadastroProfissionais"] .professional-form-header::after {
  content: "";
  width: 190px;
  height: 190px;
  position: absolute;
  right: 80px;
  top: -125px;
  border: 30px solid rgba(255,255,255,.08);
  border-radius: 50%;
}

[data-view-panel="CadastroProfissionais"] .professionals-page-header > div,
[data-view-panel="CadastroProfissionais"] .professional-form-header > div {
  position: relative;
  z-index: 1;
}

[data-view-panel="CadastroProfissionais"] .professionals-page-header span,
[data-view-panel="CadastroProfissionais"] .professional-form-header span {
  color: #9ff4e8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

[data-view-panel="CadastroProfissionais"] .professionals-page-header h2,
[data-view-panel="CadastroProfissionais"] .professional-form-header h2 {
  margin: 2px 0 3px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 850;
}

[data-view-panel="CadastroProfissionais"] .professionals-page-header p,
[data-view-panel="CadastroProfissionais"] .professional-form-header p {
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 650;
}

[data-view-panel="CadastroProfissionais"] .professional-action-card,
[data-view-panel="CadastroProfissionais"] .professional-filter-card {
  border: 1px solid #d9e9ee;
  border-radius: 17px;
  background: #ffffff;
  box-shadow: 0 9px 26px rgba(14,52,75,.07);
}

[data-view-panel="CadastroProfissionais"] .professional-action-card {
  min-height: 74px;
  gap: 10px;
  margin-bottom: 12px;
  padding: 14px 18px;
}

[data-view-panel="CadastroProfissionais"] .professional-action-card button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 11px;
}

[data-view-panel="CadastroProfissionais"] .professional-action-card .blue-action {
  background: linear-gradient(110deg, #0878b0, #12ad9e);
  box-shadow: 0 7px 16px rgba(8,117,160,.18);
}

[data-view-panel="CadastroProfissionais"] .professional-action-card .blue-action b {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 7px;
  font-size: 17px;
  line-height: 1;
}

[data-view-panel="CadastroProfissionais"] .professional-action-card .green-action {
  border: 1px solid #bce9df;
  background: #eaf9f5;
  color: #087b68;
  box-shadow: none;
}

[data-view-panel="CadastroProfissionais"] .professional-filter-card {
  min-height: 88px;
  grid-template-columns: minmax(230px,1fr) minmax(230px,1fr) auto;
  gap: 14px;
  margin-bottom: 12px;
  padding: 15px 18px;
}

[data-view-panel="CadastroProfissionais"] .professional-filter-card label {
  grid-template-columns: 1fr;
  gap: 5px;
}

[data-view-panel="CadastroProfissionais"] .professional-filter-card span {
  color: #647a88;
  font-size: 10px;
  letter-spacing: .07em;
  text-align: left;
  text-transform: uppercase;
}

[data-view-panel="CadastroProfissionais"] .professional-filter-card select,
[data-view-panel="CadastroProfissionais"] .professional-table-tools select,
[data-view-panel="CadastroProfissionais"] .professional-table-tools input {
  min-height: 42px;
  border-color: #cfdee4;
  border-radius: 11px;
  color: #123a52;
}

[data-view-panel="CadastroProfissionais"] .professional-search-button {
  min-height: 42px;
  align-self: end;
  padding: 0 18px;
  border-radius: 11px;
  background: #0877ad;
}

[data-view-panel="CadastroProfissionais"] .professional-table-tools {
  min-height: 54px;
  margin-bottom: 10px;
  padding: 6px 10px;
  border: 1px solid #e0ebef;
  border-radius: 13px;
  background: #f8fbfc;
}

[data-view-panel="CadastroProfissionais"] .professionals-table-wrap {
  padding: 5px 10px 10px;
  border: 1px solid #dce9ee;
  border-radius: 17px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(14,52,75,.06);
}

[data-view-panel="CadastroProfissionais"] .professionals-table {
  border-collapse: separate;
  border-spacing: 0 7px;
}

[data-view-panel="CadastroProfissionais"] .professionals-table th {
  padding: 9px 12px;
  border: 0;
  background: transparent;
  color: #6a7e8b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}

[data-view-panel="CadastroProfissionais"] .professionals-table td {
  padding: 10px 12px;
  border-width: 1px 0;
  border-color: #e1ecef;
  background: #f7fafb;
  color: #12384f;
  font-weight: 700;
}

[data-view-panel="CadastroProfissionais"] .professionals-table td:first-child {
  border-left-width: 1px;
  border-radius: 12px 0 0 12px;
  color: #083b65;
  font-weight: 850;
}

[data-view-panel="CadastroProfissionais"] .professionals-table td:last-child {
  border-right-width: 1px;
  border-radius: 0 12px 12px 0;
}

[data-view-panel="CadastroProfissionais"] .professionals-table tbody tr:nth-child(even) {
  background: transparent;
}

[data-view-panel="CadastroProfissionais"] .professional-create-view {
  width: min(1320px, calc(100% - 34px));
  grid-template-columns: 224px minmax(0,1fr);
  gap: 14px;
  margin: 16px auto 42px;
}

[data-view-panel="CadastroProfissionais"] .professional-form-sidebar {
  gap: 6px;
  padding: 12px;
  border: 1px solid #d9e8ed;
  border-radius: 17px;
  background: #ffffff;
  box-shadow: 0 9px 26px rgba(14,52,75,.07);
  position: sticky;
  top: 12px;
}

[data-view-panel="CadastroProfissionais"] .professional-photo-box {
  margin-bottom: 5px;
  border-radius: 12px;
  background: #f5fafb;
}

[data-view-panel="CadastroProfissionais"] .professional-form-sidebar button {
  min-height: 40px;
  border-radius: 10px;
  background: transparent;
  color: #527080;
  font-size: 12px;
  font-weight: 750;
}

[data-view-panel="CadastroProfissionais"] .professional-form-sidebar button.is-active {
  background: linear-gradient(110deg, #0877ad, #12ad9e);
  color: #ffffff;
}

[data-view-panel="CadastroProfissionais"] .professional-form-card {
  padding: 0 18px 20px;
  border: 1px solid #d9e8ed;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(14,52,75,.08);
}

[data-view-panel="CadastroProfissionais"] .professional-form-header {
  min-height: 100px;
  margin: 0 -18px 18px;
  border-radius: 18px 18px 0 0;
}

[data-view-panel="CadastroProfissionais"] .professional-form-title {
  margin: 2px 0 3px;
}

[data-view-panel="CadastroProfissionais"] .professional-info-section,
[data-view-panel="CadastroProfissionais"] .professional-form-section {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid #deeaee;
  border-radius: 15px;
  background: #fbfdfd;
}

[data-view-panel="CadastroProfissionais"] .professional-info-section .professional-title,
[data-view-panel="CadastroProfissionais"] .professional-form-section h3 {
  min-height: auto;
  gap: 7px;
  margin: 0 0 14px;
  padding: 0 0 10px;
  border-bottom: 1px solid #dfebee;
  color: #083b65;
  font-size: 17px;
  font-weight: 850;
}

[data-view-panel="CadastroProfissionais"] .professional-info-grid {
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 13px 16px;
  padding: 0;
}

[data-view-panel="CadastroProfissionais"] .professional-info-grid label,
[data-view-panel="CadastroProfissionais"] .professional-info-grid label.professional-info-full,
[data-view-panel="CadastroProfissionais"] .professional-form-grid label {
  grid-template-columns: 1fr;
  gap: 5px;
}

[data-view-panel="CadastroProfissionais"] .professional-info-grid span,
[data-view-panel="CadastroProfissionais"] .professional-form-grid span {
  color: #607684;
  font-size: 10px;
  letter-spacing: .06em;
  text-align: left;
  text-transform: uppercase;
}

[data-view-panel="CadastroProfissionais"] .professional-info-grid input:not([type="checkbox"]),
[data-view-panel="CadastroProfissionais"] .professional-info-grid select,
[data-view-panel="CadastroProfissionais"] .professional-form-grid input,
[data-view-panel="CadastroProfissionais"] .professional-form-grid select,
[data-view-panel="CadastroProfissionais"] .professional-commission-select-field select {
  min-height: 42px;
  border-color: #cfdee4;
  border-radius: 10px;
  color: #123a52;
}

[data-view-panel="CadastroProfissionais"] .professional-check-field {
  grid-column: auto;
  width: auto;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 11px;
  border: 1px solid #dce9ed;
  border-radius: 10px;
  background: #f4f9fa;
}

[data-view-panel="CadastroProfissionais"] .professional-form-grid {
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 13px 16px;
}

[data-view-panel="CadastroProfissionais"] .professional-form-grid label.professional-wide-field,
[data-view-panel="CadastroProfissionais"] .professional-form-grid label.professional-full-field {
  grid-column: span 2;
}

[data-view-panel="CadastroProfissionais"] .professional-commission-picker {
  padding: 12px;
  border-color: #dce9ed;
  border-radius: 12px;
}

[data-view-panel="CadastroProfissionais"] .professional-commission-selected {
  border-radius: 10px;
}

[data-view-panel="CadastroProfissionais"] .professional-form-actions {
  gap: 8px;
  margin-top: 16px;
}

[data-view-panel="CadastroProfissionais"] .professional-form-actions button {
  min-height: 42px;
  padding: 0 17px;
  border-radius: 11px;
}

@media (max-width: 880px) {
  [data-view-panel="CadastroProfissionais"] .professional-filter-card {
    grid-template-columns: 1fr 1fr;
  }

  [data-view-panel="CadastroProfissionais"] .professional-search-button {
    width: 100%;
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  [data-view-panel="CadastroProfissionais"] .professional-create-view {
    grid-template-columns: 1fr;
  }

  [data-view-panel="CadastroProfissionais"] .professional-form-sidebar {
    display: flex;
    overflow-x: auto;
    position: static;
  }

  [data-view-panel="CadastroProfissionais"] .professional-photo-box {
    display: none;
  }

  [data-view-panel="CadastroProfissionais"] .professional-form-sidebar button {
    flex: 0 0 auto;
  }
}

/* Franqueadora: tema completo herdado das cores cadastradas na franquia */
body.franchise-theme-active {
  --tenant-sidebar-deep: color-mix(in srgb, var(--tenant-primary) 38%, #061523);
  --tenant-sidebar-mid: color-mix(in srgb, var(--tenant-primary) 58%, #071c2b);
  --tenant-sidebar-end: color-mix(in srgb, var(--tenant-primary) 76%, #081d28);
  --tenant-primary-soft: color-mix(in srgb, var(--tenant-primary) 9%, #ffffff);
  --tenant-primary-glow: color-mix(in srgb, var(--tenant-primary) 18%, transparent);
  --tenant-accent-soft: color-mix(in srgb, var(--tenant-accent) 20%, transparent);
  --tenant-accent-on-dark: color-mix(in srgb, var(--tenant-accent) 58%, #ffffff);
}

body.franchise-theme-active .clinic-portal.franchise-portal {
  background:
    radial-gradient(circle at 84% 8%, var(--tenant-primary-glow), transparent 29%),
    radial-gradient(circle at 98% 92%, var(--tenant-accent-soft), transparent 24%),
    linear-gradient(180deg, var(--tenant-primary-soft), #ffffff 58%) !important;
}

body.franchise-theme-active .clinic-portal.franchise-portal .portal-franchise-sidebar,
body.franchise-theme-active .workspace-view.access-manager-dialog.is-active > .franchise-sidebar,
body.franchise-theme-active .workspace-view.profile-manager-dialog.is-active > .franchise-sidebar,
body.franchise-theme-active .franchise-sidebar:hover,
body.franchise-theme-active .franchise-sidebar:focus-within {
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--tenant-primary) 34%, transparent), transparent 29%),
    radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--tenant-accent) 14%, transparent), transparent 32%),
    linear-gradient(165deg, var(--tenant-sidebar-deep) 0%, var(--tenant-sidebar-mid) 58%, var(--tenant-sidebar-end) 125%) !important;
  box-shadow: 18px 0 42px color-mix(in srgb, var(--tenant-primary) 22%, rgba(2, 20, 31, .24)) !important;
}

body.franchise-theme-active .franchise-sidebar .franchise-sidebar-brand,
body.franchise-theme-active .franchise-sidebar:hover .franchise-sidebar-brand,
body.franchise-theme-active .franchise-sidebar:focus-within .franchise-sidebar-brand {
  background: linear-gradient(135deg, #ffffff, var(--tenant-primary-soft)) !important;
  box-shadow: 0 13px 27px color-mix(in srgb, var(--tenant-primary) 14%, rgba(0, 20, 30, .17)) !important;
}

body.franchise-theme-active .franchise-sidebar .franchise-sidebar-toggle {
  border-color: color-mix(in srgb, var(--tenant-primary) 25%, rgba(255, 255, 255, .22)) !important;
  background: color-mix(in srgb, var(--tenant-sidebar-deep) 72%, transparent) !important;
}

body.franchise-theme-active .franchise-sidebar .franchise-sidebar-item:hover,
body.franchise-theme-active .franchise-sidebar .franchise-sidebar-subitem:hover {
  border-color: color-mix(in srgb, var(--tenant-primary) 32%, rgba(255, 255, 255, .18)) !important;
  background: color-mix(in srgb, var(--tenant-primary) 18%, rgba(255, 255, 255, .08)) !important;
  color: #ffffff !important;
}

body.franchise-theme-active .franchise-sidebar .franchise-sidebar-item.is-active,
body.franchise-theme-active .franchise-sidebar .franchise-sidebar-subitem.is-active {
  border-color: color-mix(in srgb, var(--tenant-accent-on-dark) 35%, transparent) !important;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--tenant-accent-on-dark) 27%, transparent),
    color-mix(in srgb, var(--tenant-primary) 20%, rgba(255, 255, 255, .06))
  ) !important;
  box-shadow: inset 3px 0 0 var(--tenant-accent-on-dark) !important;
  color: #ffffff !important;
}

body.franchise-theme-active .franchise-sidebar .franchise-sidebar-owner-action {
  border-color: color-mix(in srgb, var(--tenant-accent-on-dark) 34%, transparent) !important;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--tenant-accent-on-dark) 25%, transparent),
    rgba(255, 255, 255, .07)
  ) !important;
  box-shadow: inset 3px 0 0 var(--tenant-accent-on-dark) !important;
}

body.franchise-theme-active .franchise-sidebar .franchise-sidebar-user,
body.franchise-theme-active .franchise-sidebar:hover .franchise-sidebar-user,
body.franchise-theme-active .franchise-sidebar:focus-within .franchise-sidebar-user {
  border-color: color-mix(in srgb, var(--tenant-primary) 26%, rgba(255, 255, 255, .16)) !important;
  background: color-mix(in srgb, var(--tenant-sidebar-deep) 76%, transparent) !important;
  color: #ffffff !important;
}

body.franchise-theme-active .franchise-sidebar .menu-profile-avatar {
  border-color: color-mix(in srgb, var(--tenant-primary) 45%, #ffffff) !important;
  background: color-mix(in srgb, var(--tenant-primary) 14%, #ffffff) !important;
  color: color-mix(in srgb, var(--tenant-primary) 72%, #071c2b) !important;
}

body.franchise-theme-active .franchise-sidebar .franchise-profile-panel {
  border-color: color-mix(in srgb, var(--tenant-primary) 24%, #dce8eb) !important;
  background: color-mix(in srgb, var(--tenant-primary) 4%, #ffffff) !important;
  box-shadow: 0 14px 28px color-mix(in srgb, var(--tenant-primary) 12%, rgba(8, 25, 38, .1)) !important;
}

body.franchise-theme-active .franchise-sidebar .franchise-profile-action {
  border-color: color-mix(in srgb, var(--tenant-primary) 38%, #dce8eb) !important;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--tenant-primary) 15%, #ffffff),
    color-mix(in srgb, var(--tenant-accent) 10%, #ffffff)
  ) !important;
  color: color-mix(in srgb, var(--tenant-primary) 72%, #071c2b) !important;
}

body.franchise-theme-active .portal-clinic-search input:focus,
body.franchise-theme-active .portal-quick-id input:focus {
  border-color: var(--tenant-primary) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tenant-primary) 16%, transparent) !important;
}

body.franchise-theme-active .portal-clinic-heading > div > span,
body.franchise-theme-active .portal-clinic-heading .muted-text {
  color: color-mix(in srgb, var(--tenant-primary) 78%, #071c2b) !important;
}

body.franchise-theme-active .portal-clinic-heading .muted-text {
  background: color-mix(in srgb, var(--tenant-primary) 9%, #ffffff) !important;
}

body.franchise-theme-active .workspace-view.access-manager-dialog.is-active .access-manager-shell,
body.franchise-theme-active .workspace-view.profile-manager-dialog.is-active .profile-manager-panel {
  background:
    radial-gradient(circle at 92% 2%, var(--tenant-primary-glow), transparent 25%),
    linear-gradient(180deg, var(--tenant-primary-soft) 0%, #ffffff 58%) !important;
}

body.franchise-theme-active .workspace-view.access-manager-dialog.is-active .access-manager-shell > .access-manager-header,
body.franchise-theme-active .workspace-view.profile-manager-dialog.is-active .profile-manager-panel > .access-manager-header {
  background: linear-gradient(
    115deg,
    var(--tenant-sidebar-deep) 0%,
    var(--tenant-primary) 62%,
    color-mix(in srgb, var(--tenant-primary) 76%, var(--tenant-accent)) 100%
  ) !important;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--tenant-primary) 25%, rgba(5, 36, 60, .18)) !important;
}

body.franchise-theme-active .workspace-view.access-manager-dialog.is-active .access-manager-header small,
body.franchise-theme-active .workspace-view.profile-manager-dialog.is-active .access-manager-header small {
  color: var(--tenant-accent-on-dark) !important;
}

@media (max-width: 1050px) {
  body.franchise-theme-active .clinic-portal.franchise-portal .portal-franchise-sidebar,
  body.franchise-theme-active .workspace-view.access-manager-dialog.is-active > .franchise-sidebar,
  body.franchise-theme-active .workspace-view.profile-manager-dialog.is-active > .franchise-sidebar,
  body.franchise-theme-active .franchise-sidebar:hover,
  body.franchise-theme-active .franchise-sidebar:focus-within {
    background: linear-gradient(105deg, var(--tenant-sidebar-deep), var(--tenant-sidebar-end)) !important;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--tenant-primary) 22%, rgba(3, 37, 53, .16)) !important;
  }

  body.franchise-theme-active .franchise-sidebar .franchise-sidebar-group[open] .franchise-sidebar-subnav {
    background: var(--tenant-sidebar-mid) !important;
    box-shadow: 0 16px 30px color-mix(in srgb, var(--tenant-primary) 24%, rgba(0, 23, 34, .25)) !important;
  }
}

/* Patient anamnesis and implantology record */
[data-view-panel="Cadastro"] .ficha-side-menu [data-ficha-tab="anamnesis"] svg {
  background: #e8f8f1;
  color: #159563;
}

.patient-anamnesis-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #d9e8eb;
  background: #f4f8f9;
  box-shadow: 0 15px 38px rgba(20, 63, 80, .08);
}

.patient-anamnesis-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 10%, rgba(255, 255, 255, .18) 0 64px, transparent 65px),
    linear-gradient(120deg, #0d5874, #0c9eaa);
  color: #ffffff;
}

.patient-anamnesis-header > div:first-child > span,
.patient-clinical-title small,
.patient-implant-history-header small {
  display: block;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.patient-anamnesis-header h2 {
  margin: 3px 0 4px;
  font-size: 20px;
  font-weight: 950;
  letter-spacing: -.02em;
}

.patient-anamnesis-header p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, .78);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.45;
}

.patient-anamnesis-patient {
  min-width: 210px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 14px;
  background: rgba(255, 255, 255, .12);
}

.patient-anamnesis-patient > svg {
  width: 26px;
  height: 26px;
}

.patient-anamnesis-patient span {
  min-width: 0;
}

.patient-anamnesis-patient small {
  display: block;
  color: rgba(255, 255, 255, .68);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.patient-anamnesis-patient strong {
  max-width: 230px;
  display: block;
  margin-top: 2px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patient-anamnesis-save-notice {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid #f0d796;
  border-radius: 13px;
  background: #fff9e8;
  color: #8d6615;
  font-size: 10px;
  font-weight: 750;
}

.patient-anamnesis-save-notice svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.patient-anamnesis-form {
  display: block;
}

.patient-clinical-card {
  padding: 17px;
  border: 1px solid #d9e8eb;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 9px 25px rgba(20, 63, 80, .06);
}

.patient-clinical-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}

.patient-clinical-title {
  display: flex;
  align-items: center;
  gap: 11px;
}

.patient-clinical-title > span {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 13px;
}

.patient-clinical-title > span.is-medical {
  background: #e8f8f1;
  color: #159563;
}

.patient-clinical-title > span.is-implant {
  background: #e8f6f8;
  color: #069aa6;
}

.patient-clinical-title svg {
  width: 21px;
  height: 21px;
}

.patient-clinical-title small {
  color: #7c929b;
}

.patient-clinical-title h3 {
  margin: 2px 0 0;
  color: #123b4c;
  font-size: 15px;
  font-weight: 950;
}

.patient-clinical-title p {
  margin: 3px 0 0;
  color: #728891;
  font-size: 9px;
  font-weight: 650;
}

.patient-clinical-save,
.patient-implant-entry-actions button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #13ad91, #087e91);
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  box-shadow: 0 7px 15px rgba(8, 126, 145, .18);
}

.patient-clinical-save svg,
.patient-implant-entry-actions button svg {
  width: 15px;
  height: 15px;
}

.patient-anamnesis-alerts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 13px;
}

.patient-anamnesis-alerts label {
  min-height: 40px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #dfeaec;
  border-radius: 11px;
  background: #f8fbfc;
  color: #536f7b;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}

.patient-anamnesis-alerts input {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  accent-color: #0b9e8c;
}

.patient-anamnesis-alerts label:has(input:checked) {
  border-color: #f0bd8b;
  background: #fff6ec;
  color: #a15c17;
  box-shadow: inset 3px 0 0 #ee9a43;
}

.patient-anamnesis-grid,
.patient-implant-entry-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.patient-anamnesis-grid label,
.patient-implant-entry-form label {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
}

.patient-anamnesis-grid label > span,
.patient-implant-entry-form label > span {
  color: #526e79;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.patient-anamnesis-grid input,
.patient-anamnesis-grid textarea,
.patient-implant-entry-form input,
.patient-implant-entry-form select,
.patient-implant-entry-form textarea {
  width: 100%;
  border: 1px solid #d9e6e9;
  border-radius: 11px;
  outline: none;
  background: #fbfdfd;
  color: #183e4d;
  font: inherit;
  font-size: 10px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.patient-anamnesis-grid textarea,
.patient-implant-entry-form textarea {
  min-height: 86px;
  padding: 10px 11px;
  resize: vertical;
  line-height: 1.45;
}

.patient-implant-entry-form input,
.patient-implant-entry-form select {
  min-height: 38px;
  padding: 0 10px;
}

.patient-anamnesis-grid input:focus,
.patient-anamnesis-grid textarea:focus,
.patient-implant-entry-form input:focus,
.patient-implant-entry-form select:focus,
.patient-implant-entry-form textarea:focus {
  border-color: #55b9bc;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(32, 164, 164, .10);
}

.patient-anamnesis-grid .is-wide,
.patient-implant-entry-form .is-wide,
.patient-implant-entry-actions {
  grid-column: 1 / -1;
}

.patient-medical-history-card > footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #edf2f3;
  color: #80949c;
  font-size: 8px;
  font-weight: 700;
}

.patient-implant-record-card {
  margin-top: 14px;
}

.patient-implant-entry-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 13px;
  border: 1px solid #dbe9ec;
  border-radius: 14px;
  background: linear-gradient(145deg, #f8fcfc, #f4f9fa);
}

.patient-implant-entry-actions {
  display: flex;
  justify-content: flex-end;
}

.patient-implant-entry-actions button {
  min-height: 38px;
}

.patient-clinical-card form :disabled {
  cursor: not-allowed;
  opacity: .58;
}

.patient-implant-history-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 15px;
  margin: 18px 0 10px;
  padding-top: 15px;
  border-top: 1px solid #e5edef;
}

.patient-implant-history-header small {
  color: #7c929b;
}

.patient-implant-history-header strong {
  display: block;
  margin-top: 3px;
  color: #173f4f;
  font-size: 13px;
  font-weight: 950;
}

.patient-implant-history-header > span {
  color: #84969e;
  font-size: 8px;
  font-weight: 700;
}

.patient-implant-record-list {
  display: grid;
  gap: 10px;
}

.patient-implant-empty {
  min-height: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 1px dashed #ccdee2;
  border-radius: 15px;
  background: #f8fbfc;
  color: #8ca1a9;
  text-align: center;
}

.patient-implant-empty svg {
  width: 37px;
  height: 37px;
  margin-bottom: 3px;
}

.patient-implant-empty strong {
  color: #58747f;
  font-size: 11px;
  font-weight: 900;
}

.patient-implant-empty span {
  font-size: 8px;
  font-weight: 650;
}

.patient-implant-record {
  padding: 14px;
  border: 1px solid #dce9ec;
  border-left: 4px solid #18a59e;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(24, 70, 86, .05);
}

.patient-implant-record > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.patient-implant-record > header small {
  color: #7f949c;
  font-size: 8px;
  font-weight: 800;
}

.patient-implant-record h4 {
  margin: 2px 0 0;
  color: #143d4d;
  font-size: 12px;
  font-weight: 950;
}

.patient-implant-record > header > span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #e8f6f5;
  color: #087e78;
  font-size: 7px;
  font-weight: 900;
  text-transform: uppercase;
}

.patient-implant-record > header > span.is-finished {
  background: #e7f8ed;
  color: #14824b;
}

.patient-implant-record > header > span.is-warning {
  background: #ffecef;
  color: #bd4050;
}

.patient-implant-record > header > span.is-maintenance {
  background: #edf0ff;
  color: #5b57bd;
}

.patient-implant-record > header > span.is-planned {
  background: #fff4df;
  color: #a66b0e;
}

.patient-implant-record-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.patient-implant-record-grid > div {
  min-width: 0;
  padding: 8px 9px;
  border-radius: 9px;
  background: #f6fafb;
}

.patient-implant-record-grid small,
.patient-implant-evolution small {
  display: block;
  color: #82959d;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.patient-implant-record-grid strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #264d5b;
  font-size: 9px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patient-implant-evolution {
  margin-top: 10px;
  padding: 10px 11px;
  border: 1px solid #e0ebed;
  border-radius: 10px;
  background: #fbfdfd;
}

.patient-implant-evolution p {
  margin: 4px 0 0;
  color: #405f6b;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.5;
  white-space: pre-wrap;
}

.patient-implant-record > footer {
  margin-top: 9px;
  color: #8a9da4;
  font-size: 7px;
  font-weight: 650;
}

.patient-implant-record > footer strong {
  color: #637c86;
}

@media (max-width: 1120px) {
  .patient-anamnesis-alerts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .patient-implant-entry-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .patient-implant-record-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .patient-anamnesis-panel {
    padding: 10px;
  }

  .patient-anamnesis-header,
  .patient-clinical-card > header,
  .patient-implant-history-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .patient-anamnesis-patient {
    width: 100%;
  }

  .patient-anamnesis-alerts,
  .patient-anamnesis-grid,
  .patient-implant-entry-form,
  .patient-implant-record-grid {
    grid-template-columns: 1fr;
  }

  .patient-anamnesis-grid .is-wide,
  .patient-implant-entry-form .is-wide,
  .patient-implant-entry-actions {
    grid-column: auto;
  }

  .patient-clinical-save,
  .patient-implant-entry-actions button {
    width: 100%;
  }
}

@media (max-width: 620px) {
  [data-view-panel="CadastroProfissionais"] .professionals-content,
  [data-view-panel="CadastroProfissionais"] .professional-create-view {
    width: calc(100% - 20px);
  }

  [data-view-panel="CadastroProfissionais"] .professionals-page-header,
  [data-view-panel="CadastroProfissionais"] .professional-form-header {
    min-height: 92px;
    padding: 14px 17px;
    border-radius: 15px;
  }

  [data-view-panel="CadastroProfissionais"] .professional-filter-card,
  [data-view-panel="CadastroProfissionais"] .professional-info-grid,
  [data-view-panel="CadastroProfissionais"] .professional-form-grid {
    grid-template-columns: 1fr;
  }

  [data-view-panel="CadastroProfissionais"] .professional-form-grid label.professional-wide-field,
  [data-view-panel="CadastroProfissionais"] .professional-form-grid label.professional-full-field {
    grid-column: auto;
  }

  [data-view-panel="CadastroProfissionais"] .professional-action-card {
    align-items: stretch;
    flex-direction: column;
  }

  [data-view-panel="CadastroProfissionais"] .professional-action-card button {
    justify-content: center;
  }
}

/* Orçamentos e pagamentos dentro da ficha */
[data-view-panel="Cadastro"] #patientBudgetPanel,
[data-view-panel="Cadastro"] #patientPaymentPanel {
  padding: 18px;
  border: 1px solid #d9e8ed;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(14,52,75,.08);
}

[data-view-panel="Cadastro"] .budget-list-header,
[data-view-panel="Cadastro"] .patient-payment-header {
  min-height: 86px;
  margin: -18px -18px 14px;
  padding: 13px 18px;
  border: 0;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(115deg, #063b69 0%, #087ab0 58%, #12b9b0 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

[data-view-panel="Cadastro"] .budget-list-header::after,
[data-view-panel="Cadastro"] .patient-payment-header::after {
  content: "";
  width: 150px;
  height: 150px;
  position: absolute;
  right: 72px;
  top: -104px;
  border: 23px solid rgba(255,255,255,.08);
  border-radius: 50%;
}

[data-view-panel="Cadastro"] .budget-list-header > div,
[data-view-panel="Cadastro"] .budget-list-header > button,
[data-view-panel="Cadastro"] .patient-payment-header > div,
[data-view-panel="Cadastro"] .patient-payment-header > strong {
  position: relative;
  z-index: 1;
}

[data-view-panel="Cadastro"] .budget-list-header span,
[data-view-panel="Cadastro"] .patient-payment-header span {
  display: block;
  color: #9ff4e8;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

[data-view-panel="Cadastro"] .budget-list-header h2,
[data-view-panel="Cadastro"] .patient-payment-header h2 {
  margin: 3px 0 0;
  color: #ffffff;
  font-size: 20px;
  font-weight: 850;
}

[data-view-panel="Cadastro"] .budget-new-button {
  min-height: 42px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 11px;
  background: rgba(255,255,255,.17);
  box-shadow: none;
  backdrop-filter: blur(8px);
}

[data-view-panel="Cadastro"] .patient-budget-table {
  border-collapse: separate;
  border-spacing: 0 7px;
}

[data-view-panel="Cadastro"] .patient-budget-table th {
  padding: 8px 12px;
  border: 0;
  color: #6a7e8b;
  font-size: 10px;
  letter-spacing: .07em;
}

[data-view-panel="Cadastro"] .patient-budget-table td {
  padding: 11px 12px;
  border-width: 1px 0;
  border-color: #e1ecef;
  background: #f7fafb;
  color: #12384f;
}

[data-view-panel="Cadastro"] .patient-budget-table td:first-child {
  border-left-width: 1px;
  border-radius: 11px 0 0 11px;
}

[data-view-panel="Cadastro"] .patient-budget-table td:last-child {
  border-right-width: 1px;
  border-radius: 0 11px 11px 0;
}

[data-view-panel="Cadastro"] .patient-budget-table th:nth-child(1),
[data-view-panel="Cadastro"] .patient-budget-table td:nth-child(1) {
  width: 118px;
}

[data-view-panel="Cadastro"] .patient-budget-table th:nth-child(2),
[data-view-panel="Cadastro"] .patient-budget-table td:nth-child(2) {
  width: 118px;
}

[data-view-panel="Cadastro"] .patient-payment-header strong {
  border-color: rgba(255,255,255,.42);
  background: #effcf7;
  color: #08765f;
}

[data-view-panel="Cadastro"] .patient-payment-section h3 {
  color: #083b65;
  font-size: 17px;
  font-weight: 850;
}

[data-view-panel="Cadastro"] .patient-payment-budget-card,
[data-view-panel="Cadastro"] .patient-payment-history-card {
  border-color: #dce9ed;
  border-radius: 12px;
  background: #f8fbfc;
  box-shadow: none;
}

[data-view-panel="Cadastro"] .patient-payment-section .empty-state,
[data-view-panel="Cadastro"] .patient-payment-section .empty-table-cell {
  border-radius: 12px;
}

@media (max-width: 720px) {
  [data-view-panel="Cadastro"] .budget-list-header,
  [data-view-panel="Cadastro"] .patient-payment-header {
    align-items: stretch;
    flex-direction: column;
  }

  [data-view-panel="Cadastro"] .patient-payment-header strong {
    width: fit-content;
  }
}

/* Lista de pacientes - identidade Tec Dent */
[data-view-panel="Pacientes"] .patients-page {
  background: linear-gradient(180deg, #f3f9fb 0, #ffffff 330px);
}

[data-view-panel="Pacientes"] .patients-content {
  width: min(1220px, calc(100% - 40px));
  padding: 16px 0 42px;
}

[data-view-panel="Pacientes"] .patients-page-header {
  min-height: 104px;
  display: flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 16px 24px;
  border-radius: 18px;
  background: linear-gradient(115deg, #063b69 0%, #087ab0 58%, #12b9b0 100%);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(5,63,105,.18);
  position: relative;
  overflow: hidden;
}

[data-view-panel="Pacientes"] .patients-page-header::after {
  content: "";
  width: 190px;
  height: 190px;
  position: absolute;
  right: 80px;
  top: -125px;
  border: 30px solid rgba(255,255,255,.08);
  border-radius: 50%;
}

[data-view-panel="Pacientes"] .patients-page-header > div {
  position: relative;
  z-index: 1;
}

[data-view-panel="Pacientes"] .patients-page-header span {
  color: #9ff4e8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

[data-view-panel="Pacientes"] .patients-page-header h2 {
  margin: 2px 0 3px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 850;
}

[data-view-panel="Pacientes"] .patients-page-header p {
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 650;
}

[data-view-panel="Pacientes"] .patients-metric-strip {
  gap: 12px;
  margin-bottom: 12px;
}

[data-view-panel="Pacientes"] .patients-metric-strip article {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 18px;
  border: 1px solid #d9e9ee;
  border-radius: 15px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(14,52,75,.06);
  position: relative;
  overflow: hidden;
}

[data-view-panel="Pacientes"] .patients-metric-strip article::before {
  content: "";
  width: 4px;
  position: absolute;
  inset: 12px auto 12px 0;
  border-radius: 0 5px 5px 0;
}

[data-view-panel="Pacientes"] .patients-metric-strip strong {
  color: #607684;
  font-size: 10px;
  letter-spacing: .08em;
}

[data-view-panel="Pacientes"] .patients-metric-strip span {
  font-size: 28px;
  line-height: 1;
}

[data-view-panel="Pacientes"] .patients-metric-strip .is-total::before {
  background: #13b89d;
}

[data-view-panel="Pacientes"] .patients-metric-strip .is-total span {
  color: #087c69;
}

[data-view-panel="Pacientes"] .patients-metric-strip .is-leads::before {
  background: #1689c2;
}

[data-view-panel="Pacientes"] .patients-metric-strip .is-leads span {
  color: #0b6f9f;
}

[data-view-panel="Pacientes"] .patients-metric-strip .is-week::before {
  background: #e9a12a;
}

[data-view-panel="Pacientes"] .patients-metric-strip .is-week span {
  color: #b87508;
}

[data-view-panel="Pacientes"] .patients-tabs {
  min-height: 38px;
  gap: 7px;
  margin-bottom: 12px;
  border: 0;
}

[data-view-panel="Pacientes"] .patients-tabs button {
  min-width: 0;
  min-height: 34px;
  padding: 0 15px;
  border: 1px solid #d3e4e9;
  border-radius: 10px;
  background: #ffffff;
  color: #567181;
  font-size: 12px;
  font-weight: 800;
}

[data-view-panel="Pacientes"] .patients-tabs button.is-active {
  border-color: #9edfd5;
  background: #eaf9f6;
  color: #087b6b;
}

[data-view-panel="Pacientes"] .patients-filter-card {
  min-height: 76px;
  margin-bottom: 12px;
  padding: 14px 18px;
  border: 1px solid #d9e9ee;
  border-radius: 17px;
  background: #ffffff;
  box-shadow: 0 9px 26px rgba(14,52,75,.07);
}

[data-view-panel="Pacientes"] .patients-create-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(110deg, #0878b0, #12ad9e);
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 7px 16px rgba(8,117,160,.18);
}

[data-view-panel="Pacientes"] .patients-create-button b {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 7px;
  font-size: 17px;
  line-height: 1;
}

[data-view-panel="Pacientes"] .patients-filter-card label {
  color: #607684;
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

[data-view-panel="Pacientes"] .patients-filter-card select,
[data-view-panel="Pacientes"] .patients-table-tools select,
[data-view-panel="Pacientes"] .patients-table-tools input {
  min-height: 42px;
  border-color: #cfdee4;
  border-radius: 11px;
  color: #123a52;
}

[data-view-panel="Pacientes"] .patients-table-tools {
  min-height: 54px;
  margin-bottom: 10px;
  padding: 6px 10px;
  border: 1px solid #e0ebef;
  border-radius: 13px;
  background: #f8fbfc;
}

[data-view-panel="Pacientes"] .patients-table-wrap {
  padding: 5px 10px 10px;
  border: 1px solid #dce9ee;
  border-radius: 17px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(14,52,75,.06);
}

[data-view-panel="Pacientes"] .patients-table {
  border-collapse: separate;
  border-spacing: 0 7px;
}

[data-view-panel="Pacientes"] .patients-table th {
  padding: 9px 12px;
  border: 0;
  background: transparent;
  color: #6a7e8b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}

[data-view-panel="Pacientes"] .patients-table td {
  padding: 10px 12px;
  border-width: 1px 0;
  border-color: #e1ecef;
  background: #f7fafb;
  color: #12384f;
  font-weight: 700;
}

[data-view-panel="Pacientes"] .patients-table td:first-child {
  border-left-width: 1px;
  border-radius: 12px 0 0 12px;
  color: #607684;
}

[data-view-panel="Pacientes"] .patients-table td:nth-child(2) {
  color: #083b65;
  font-weight: 850;
}

[data-view-panel="Pacientes"] .patients-table td:last-child {
  border-right-width: 1px;
  border-radius: 0 12px 12px 0;
}

[data-view-panel="Pacientes"] .patients-table tbody tr:nth-child(even),
[data-view-panel="Pacientes"] .patients-table tbody tr:hover {
  background: transparent;
}

@media (max-width: 700px) {
  [data-view-panel="Pacientes"] .patients-content {
    width: calc(100% - 20px);
  }

  [data-view-panel="Pacientes"] .patients-page-header {
    min-height: 92px;
    padding: 14px 17px;
    border-radius: 15px;
  }

  [data-view-panel="Pacientes"] .patients-metric-strip {
    grid-template-columns: 1fr;
  }

  [data-view-panel="Pacientes"] .patients-filter-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  [data-view-panel="Pacientes"] .patients-create-button {
    width: 100%;
    justify-content: center;
  }

  [data-view-panel="Pacientes"] .patients-filter-card label {
    justify-self: stretch;
  }
}

/* Ficha interna do paciente - identidade Tec Dent */
[data-view-panel="Cadastro"] {
  background: linear-gradient(180deg, #f3f9fb 0, #ffffff 360px);
}

[data-view-panel="Cadastro"] .patient-record-page {
  width: min(1320px, calc(100% - 32px));
  grid-template-columns: 226px minmax(0,1fr);
  gap: 14px;
  margin-top: 16px;
}

[data-view-panel="Cadastro"] .ficha-sidebar {
  gap: 8px;
  padding: 12px;
  border: 1px solid #d9e8ed;
  border-radius: 17px;
  background: #ffffff;
  box-shadow: 0 9px 26px rgba(14,52,75,.07);
}

[data-view-panel="Cadastro"] .health-button,
[data-view-panel="Cadastro"] .pending-button {
  min-height: 38px;
  border-radius: 10px;
}

[data-view-panel="Cadastro"] .patient-photo-placeholder {
  width: 112px;
  height: 112px;
  border-width: 3px;
  border-color: #d7e6ea;
  background: #f7fbfc;
}

[data-view-panel="Cadastro"] .patient-photo-placeholder svg {
  width: 42px;
  height: 42px;
}

[data-view-panel="Cadastro"] .ficha-side-menu {
  gap: 5px;
  margin-top: 8px;
}

[data-view-panel="Cadastro"] .ficha-side-menu button {
  min-height: 40px;
  border-radius: 10px;
  background: transparent;
  color: #527080;
  font-size: 12px;
  font-weight: 750;
  box-shadow: none;
}

[data-view-panel="Cadastro"] .ficha-side-menu button:hover {
  background: #f0f7f9;
}

[data-view-panel="Cadastro"] .ficha-side-menu button.is-active {
  background: linear-gradient(110deg, #0877ad, #12ad9e);
  color: #ffffff;
}

/* Documentos clínicos dentro da ficha do paciente */
[data-view-panel="Cadastro"] #patientClinicalDocumentsPanel {
  min-width: 0;
  padding: 18px;
  border: 1px solid #d9e8ed;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(14,52,75,.08);
}

[data-view-panel="Cadastro"] .clinical-documents-header {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -18px -18px 14px;
  padding: 13px 18px;
  border: 0;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(115deg, #063b69 0%, #087ab0 58%, #12b9b0 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

[data-view-panel="Cadastro"] .clinical-documents-header::after {
  content: "";
  width: 150px;
  height: 150px;
  position: absolute;
  right: 72px;
  top: -104px;
  border: 23px solid rgba(255,255,255,.08);
  border-radius: 50%;
}

[data-view-panel="Cadastro"] .clinical-documents-header > * {
  position: relative;
  z-index: 1;
}

[data-view-panel="Cadastro"] .clinical-documents-header span {
  display: block;
  color: #9ff4e8;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

[data-view-panel="Cadastro"] .clinical-documents-header h2 {
  margin: 3px 0 0;
  color: #ffffff;
  font-size: 20px;
  font-weight: 850;
}

.clinical-documents-create-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

[data-view-panel="Cadastro"] .clinical-documents-header .budget-new-button,
[data-view-panel="Cadastro"] .clinical-document-back-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 11px;
  background: rgba(255,255,255,.17);
  box-shadow: none;
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

[data-view-panel="Cadastro"] .clinical-document-back-button svg,
[data-view-panel="Cadastro"] .clinical-documents-header .budget-new-button svg {
  width: 15px;
  height: 15px;
}

[data-view-panel="Cadastro"] .clinical-documents-header .clinical-document-secondary-create {
  background: rgba(4, 45, 80, .24);
}

.clinical-documents-patient-line {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  padding: 10px 14px;
  border: 1px solid #dce9ed;
  border-radius: 12px;
  background: #f7fbfc;
}

.clinical-documents-patient-line div {
  display: grid;
  gap: 2px;
}

.clinical-documents-patient-line small {
  color: #6a7e8b;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.clinical-documents-patient-line strong {
  color: #083b65;
  font-size: 15px;
}

.clinical-documents-patient-line > span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #e8f7f4;
  color: #087b6d;
  font-size: 11px;
  font-weight: 850;
}

.clinical-documents-table-wrap {
  overflow-x: auto;
}

[data-view-panel="Cadastro"] .clinical-documents-table {
  min-width: 790px;
  border-collapse: separate;
  border-spacing: 0 7px;
  table-layout: auto;
}

[data-view-panel="Cadastro"] .clinical-documents-table th {
  width: auto;
  padding: 8px 12px;
  border: 0;
  color: #6a7e8b;
  font-size: 10px;
  letter-spacing: .07em;
  text-align: left;
}

[data-view-panel="Cadastro"] .clinical-documents-table td {
  width: auto;
  padding: 11px 12px;
  border-width: 1px 0;
  border-style: solid;
  border-color: #e1ecef;
  background: #f7fafb;
  color: #12384f;
  text-align: left;
}

[data-view-panel="Cadastro"] .clinical-documents-table td:first-child {
  min-width: 205px;
  border-left-width: 1px;
  border-radius: 11px 0 0 11px;
}

[data-view-panel="Cadastro"] .clinical-documents-table td:last-child {
  min-width: 170px;
  border-right-width: 1px;
  border-radius: 0 11px 11px 0;
}

.clinical-document-type-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.clinical-document-type-cell > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  background: linear-gradient(135deg, #0877ad, #12ad9e);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.clinical-document-type-cell div {
  display: grid;
  gap: 2px;
}

.clinical-document-type-cell strong {
  color: #083b65;
  font-size: 12px;
}

.clinical-document-type-cell small {
  color: #6d818d;
  font-size: 9px;
}

.clinical-document-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid #bfe4d7;
  border-radius: 999px;
  background: #edf9f4;
  color: #08765f;
  font-size: 10px;
  font-weight: 900;
}

.clinical-document-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #08a171;
}

.clinical-document-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.clinical-document-row-actions button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #cfe0e6;
  border-radius: 9px;
  background: #ffffff;
  color: #376174;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.clinical-document-row-actions button.is-primary {
  border-color: #0b9b91;
  background: #0b9b91;
  color: #ffffff;
}

.clinical-document-row-actions button.is-danger {
  border-color: #f0c9c4;
  background: #fff5f3;
  color: #bd4338;
}

.clinical-document-readonly {
  color: #7a8b94;
  font-size: 10px;
  font-weight: 800;
}

.clinical-documents-empty {
  min-height: 190px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  color: #69808d;
  text-align: center;
}

.clinical-documents-empty > span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  border-radius: 16px;
  background: #eaf6f6;
  font-size: 25px;
}

.clinical-documents-empty strong {
  color: #254b5f;
  font-size: 14px;
}

.clinical-documents-empty small {
  font-size: 11px;
}

.clinical-document-info-card {
  margin-bottom: 13px;
  padding: 16px;
  border: 1px solid #dce9ed;
  border-radius: 14px;
  background: #f9fcfd;
}

.clinical-document-section-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.clinical-document-section-title > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  background: #e8f6f7;
}

.clinical-document-section-title h3 {
  margin: 0;
  color: #083b65;
  font-size: 15px;
  font-weight: 850;
}

.clinical-document-section-title p {
  margin: 3px 0 0;
  color: #6b7f8c;
  font-size: 10px;
}

.clinical-document-grid,
.prescription-item-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.clinical-document-grid label,
.prescription-item-grid label,
.clinical-document-notes {
  display: grid;
  gap: 6px;
  color: #34566a;
  font-size: 10px;
  font-weight: 850;
}

.clinical-document-grid .span-2,
.prescription-item-grid .span-2 {
  grid-column: span 2;
}

.clinical-document-grid .span-4 {
  grid-column: 1 / -1;
}

.certificate-authorization {
  min-height: 42px;
  display: flex !important;
  align-items: center;
  align-self: end;
  grid-template-columns: none !important;
  gap: 9px !important;
  padding: 9px 12px;
  border: 1px solid #cbdde4;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
}

.clinical-document-grid .certificate-authorization input {
  width: 17px;
  min-height: 17px;
  height: 17px;
  flex: 0 0 17px;
  padding: 0;
  accent-color: #0aa49d;
}

.certificate-authorization span {
  color: #34566a;
  font-size: 10px;
  line-height: 1.35;
}

.certificate-companion-grid {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #cbdde4;
}

.prescription-item-grid .span-4 {
  grid-column: 1 / -1;
}

.clinical-document-grid input,
.clinical-document-grid select,
.clinical-document-grid textarea,
.prescription-item-grid input,
.prescription-item-grid textarea,
.clinical-document-notes textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #cbdde4;
  border-radius: 10px;
  background: #ffffff;
  color: #102f42;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  outline: none;
}

.clinical-document-grid input,
.clinical-document-grid select,
.prescription-item-grid input {
  min-height: 42px;
  padding: 0 11px;
}

.clinical-document-grid input:focus,
.clinical-document-grid select:focus,
.clinical-document-grid textarea:focus,
.prescription-item-grid input:focus,
.prescription-item-grid textarea:focus,
.clinical-document-notes textarea:focus {
  border-color: #0aa49d;
  box-shadow: 0 0 0 3px rgba(10,164,157,.11);
}

.clinical-document-grid input[readonly] {
  background: #edf4f6;
  color: #37596a;
}

.clinical-document-grid textarea {
  min-height: 112px;
  padding: 10px 11px;
  line-height: 1.45;
  resize: vertical;
}

.referral-destination-card {
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0, rgba(12, 166, 153, .10), transparent 34%),
    #f8fcfd;
}

.referral-target-switch {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: -2px 0 14px;
  padding: 0;
  border: 0;
}

.referral-target-switch legend {
  margin-bottom: 7px;
  color: #34566a;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.referral-target-switch label {
  min-width: 0;
  position: relative;
  cursor: pointer;
}

.referral-target-switch input {
  width: 1px;
  height: 1px;
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.referral-target-switch label > span {
  min-height: 72px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 9px;
  padding: 10px 12px;
  border: 1px solid #cbdde4;
  border-radius: 12px;
  background: rgba(255,255,255,.88);
  color: #496776;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.referral-target-switch label > span > b {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  grid-row: 1 / 3;
  border-radius: 10px;
  background: #edf5f7;
  font-size: 18px;
}

.referral-target-switch label > span > strong {
  align-self: end;
  color: #173f54;
  font-size: 11px;
  font-weight: 900;
}

.referral-target-switch label > span > small {
  align-self: start;
  margin-top: 2px;
  font-size: 8px;
  font-weight: 650;
  line-height: 1.35;
}

.referral-target-switch input:checked + span {
  border-color: #0ca69c;
  background: linear-gradient(110deg, #eaf9f7, #f8fdfd);
  box-shadow: 0 0 0 3px rgba(12,166,156,.10), 0 7px 16px rgba(12,119,112,.07);
  color: #236a69;
  transform: translateY(-1px);
}

.referral-target-switch input:checked + span > b {
  background: linear-gradient(135deg, #087bae, #10ad9d);
  color: #ffffff;
}

.referral-target-switch input:focus-visible + span {
  outline: 3px solid rgba(10,164,157,.18);
  outline-offset: 2px;
}

.referral-destination-grid {
  align-items: end;
}

.referral-request-card {
  border-color: #cce5e3;
  background: linear-gradient(135deg, #f7fcfc, #eef9f7);
}

.referral-notes {
  margin-top: 12px;
}

.clinical-document-professional-registration {
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  padding: 2px 8px;
  border: 1px solid #bfe5df;
  border-radius: 999px;
  background: #eaf8f6;
  color: #087b68;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .03em;
}

.prescription-items-title {
  align-items: center;
}

.clinical-document-add-item {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 0 12px;
  border: 1px solid #bce1de;
  border-radius: 9px;
  background: #eaf8f6;
  color: #087b71;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.clinical-document-add-item svg {
  width: 13px;
  height: 13px;
}

.prescription-catalog-card {
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0, rgba(19, 170, 157, .09), transparent 34%),
    #f8fcfd;
}

.prescription-catalog-title {
  align-items: center;
}

.prescription-catalog-count {
  margin-left: auto;
  padding: 6px 9px;
  border: 1px solid #cce5e7;
  border-radius: 999px;
  background: #ffffff;
  color: #3c6977;
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
}

.prescription-catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(150px, 1fr) minmax(120px, .72fr) minmax(105px, .6fr);
  gap: 10px;
  margin-bottom: 10px;
}

.prescription-catalog-toolbar label {
  display: grid;
  gap: 5px;
  color: #34566a;
  font-size: 9px;
  font-weight: 850;
}

.prescription-catalog-toolbar input,
.prescription-catalog-toolbar select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid #cbdde4;
  border-radius: 10px;
  background: #ffffff;
  color: #15384a;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  outline: none;
}

.prescription-catalog-search input {
  padding-left: 36px;
  background-image: 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='%235a7b89' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 11px center;
}

.prescription-catalog-toolbar input:focus,
.prescription-catalog-toolbar select:focus {
  border-color: #0aa49d;
  box-shadow: 0 0 0 3px rgba(10,164,157,.11);
}

.prescription-catalog-safety {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 11px;
  padding: 9px 11px;
  border: 1px solid #cfe2ed;
  border-radius: 10px;
  background: #eef7fb;
  color: #3b6172;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.45;
}

.prescription-catalog-safety svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  margin-top: 1px;
  color: #0b7fac;
}

.prescription-catalog-layout {
  display: grid;
  grid-template-columns: minmax(210px, 270px) minmax(0, 1fr);
  min-height: 390px;
  border: 1px solid #d7e6eb;
  border-radius: 13px;
  overflow: hidden;
  background: #ffffff;
}

.prescription-catalog-results {
  display: grid;
  align-content: start;
  gap: 5px;
  max-height: 520px;
  padding: 8px;
  overflow-y: auto;
  border-right: 1px solid #dce9ed;
  background: #f5fafb;
}

.prescription-catalog-result {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #24495b;
  text-align: left;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.prescription-catalog-result:hover {
  border-color: #c6e2e3;
  background: #ffffff;
  transform: translateX(2px);
}

.prescription-catalog-result.is-selected {
  border-color: #9edbd7;
  background: linear-gradient(110deg, #e7f8f6, #f6fcfc);
  box-shadow: 0 5px 14px rgba(7, 126, 120, .08);
}

.prescription-catalog-result-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border-radius: 9px;
  background: #e8f3f6;
  color: #087b85;
  font-size: 11px;
  font-weight: 900;
}

.prescription-catalog-result-icon svg {
  width: 19px;
  height: 19px;
}

.prescription-catalog-result-icon.is-antibiotic {
  background: #e9f1ff;
  color: #3569aa;
}

.prescription-catalog-result-icon.is-anti_inflammatory {
  background: #fff0e5;
  color: #b45b20;
}

.prescription-catalog-result-icon.is-analgesic {
  background: #f1ebff;
  color: #7048ae;
}

.prescription-catalog-result-icon.is-antifungal {
  background: #eaf7e8;
  color: #3c8243;
}

.prescription-catalog-result-icon.is-mouthwash {
  background: #e4f7f5;
  color: #087d74;
}

.prescription-catalog-result.is-selected .prescription-catalog-result-icon {
  background: #0b9d94;
  color: #ffffff;
}

.prescription-catalog-result-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
  flex: 1 1 auto;
}

.prescription-catalog-result-copy strong {
  overflow: hidden;
  color: #193e51;
  font-size: 10px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prescription-catalog-result-copy small {
  color: #718792;
  font-size: 8px;
  font-weight: 750;
}

.prescription-catalog-result-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.prescription-catalog-result-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prescription-product-badge {
  min-height: 17px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .02em;
  line-height: 1;
  text-transform: uppercase;
}

.prescription-product-badge.is-generic {
  border-color: #cfdee5;
  background: #f3f7f9;
  color: #567180;
}

.prescription-product-badge.is-reference {
  border-color: #ebd28d;
  background: #fff8df;
  color: #8a6411;
}

.prescription-product-badge.is-oral_care {
  border-color: #b9dfdc;
  background: #eaf8f6;
  color: #08766f;
}

.prescription-catalog-result > b {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #e5eff2;
  color: #52717f;
  font-size: 9px;
}

.prescription-catalog-results-empty {
  padding: 28px 10px;
  color: #728893;
  font-size: 10px;
  font-weight: 750;
  text-align: center;
}

.prescription-catalog-detail {
  min-width: 0;
  max-height: 520px;
  padding: 15px;
  overflow-y: auto;
}

.prescription-catalog-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.prescription-catalog-detail-header > div {
  min-width: 0;
}

.prescription-catalog-detail-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 7px;
}

.prescription-catalog-detail-badges .prescription-product-badge {
  min-height: 22px;
  padding: 0 8px;
  font-size: 8px;
}

.prescription-category-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-bottom: 0;
  padding: 0 8px;
  border-radius: 999px;
  background: #eaf5f7;
  color: #35707d;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.prescription-category-pill.is-antibiotic {
  background: #eaf2ff;
  color: #2d65a6;
}

.prescription-category-pill.is-anti_inflammatory {
  background: #fff1e8;
  color: #a95520;
}

.prescription-category-pill.is-analgesic {
  background: #f2ecff;
  color: #6841a8;
}

.prescription-category-pill.is-antifungal {
  background: #edf8eb;
  color: #377d3e;
}

.prescription-category-pill.is-mouthwash {
  background: #e6f8f6;
  color: #087970;
}

.prescription-catalog-detail-header h4 {
  margin: 0;
  color: #093d5a;
  font-size: 18px;
  font-weight: 900;
}

.prescription-catalog-detail-header p {
  margin: 4px 0 0;
  color: #6a808b;
  font-size: 9px;
  font-weight: 650;
}

.prescription-regimen-count {
  flex: 0 0 auto;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f1f6f8;
  color: #5b7480;
  font-size: 8px;
  font-weight: 850;
}

.prescription-catalog-alert,
.prescription-catalog-retention,
.prescription-weight-prompt {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-bottom: 9px;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1.4;
}

.prescription-catalog-alert {
  border: 1px solid #f0d9a2;
  background: #fff9eb;
  color: #75581b;
}

.prescription-catalog-retention {
  border: 1px solid #d5e0f4;
  background: #f1f5fd;
  color: #355c92;
}

.prescription-weight-prompt {
  border: 1px solid #bfe1df;
  background: #edf9f7;
  color: #166f69;
}

.prescription-catalog-alert strong,
.prescription-catalog-retention strong {
  flex: 0 0 auto;
  font-weight: 900;
}

.prescription-regimen-list {
  display: grid;
  gap: 8px;
}

.prescription-regimen-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border: 1px solid #dbe8ec;
  border-radius: 11px;
  background: #ffffff;
  box-shadow: 0 5px 14px rgba(31, 72, 89, .045);
}

.prescription-regimen-card.is-disabled {
  background: #f7fafb;
}

.prescription-regimen-card-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
  flex: 1 1 auto;
}

.prescription-regimen-card-copy > strong {
  color: #184b61;
  font-size: 10px;
  font-weight: 900;
}

.prescription-regimen-card-copy > span {
  color: #0b817a;
  font-size: 8.5px;
  font-weight: 850;
}

.prescription-regimen-card-copy p {
  margin: 1px 0;
  color: #405e6c;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.45;
}

.prescription-regimen-card-copy small {
  color: #728792;
  font-size: 8px;
  line-height: 1.4;
}

.prescription-regimen-card-copy small b {
  color: #526d79;
}

.prescription-regimen-card > button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(110deg, #087db0, #10a89c);
  color: #ffffff;
  font-size: 8.5px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 7px 15px rgba(8, 125, 176, .16);
}

.prescription-regimen-card > button svg {
  width: 12px;
  height: 12px;
}

.prescription-regimen-card > button:disabled {
  background: #b9c9cf;
  cursor: not-allowed;
  box-shadow: none;
}

.prescription-catalog-empty {
  min-height: 300px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: #6d838d;
  text-align: center;
}

.prescription-catalog-empty > span {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #e9f4f6;
  color: #13828b;
  font-size: 14px;
  font-weight: 900;
}

.prescription-catalog-empty strong {
  color: #345566;
  font-size: 11px;
}

.prescription-catalog-empty small {
  font-size: 9px;
}

.common-prescription-items {
  display: grid;
  gap: 10px;
}

.common-prescription-item {
  padding: 13px;
  border: 1px solid #dce9ed;
  border-radius: 12px;
  background: #ffffff;
}

.common-prescription-item > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.common-prescription-item > header strong {
  color: #0b6d77;
  font-size: 11px;
  text-transform: uppercase;
}

.common-prescription-item > header button {
  width: 28px;
  height: 28px;
  border: 1px solid #f0c7c7;
  border-radius: 8px;
  background: #fff5f5;
  color: #cf3d3d;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.common-prescription-item > header button:disabled {
  opacity: .38;
  cursor: not-allowed;
}

.prescription-item-grid textarea,
.clinical-document-notes textarea {
  min-height: 82px;
  padding: 10px 11px;
  resize: vertical;
}

.clinical-document-notice {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 14px;
  padding: 10px 13px;
  border: 1px solid #f0d9a2;
  border-radius: 11px;
  background: #fff9eb;
  color: #75581b;
  font-size: 10px;
  font-weight: 700;
}

.clinical-document-notice svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.clinical-document-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.clinical-document-actions button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.clinical-document-cancel {
  border: 1px solid #cfdfe5;
  background: #ffffff;
  color: #4b6675;
}

.clinical-document-save {
  border: 0;
  background: linear-gradient(110deg, #0877ad, #12ad9e);
  color: #ffffff;
  box-shadow: 0 9px 20px rgba(8,119,173,.18);
}

.clinical-document-save svg {
  width: 15px;
  height: 15px;
}

@media (max-width: 1100px) {
  .prescription-catalog-toolbar {
    grid-template-columns: minmax(220px, 2fr) minmax(150px, 1fr);
  }
}

@media (max-width: 820px) {
  [data-view-panel="Cadastro"] .clinical-documents-header,
  .clinical-documents-patient-line,
  .clinical-document-section-title.prescription-items-title {
    align-items: stretch;
    flex-direction: column;
  }

  [data-view-panel="Cadastro"] .clinical-documents-header .budget-new-button,
  [data-view-panel="Cadastro"] .clinical-document-back-button,
  .clinical-document-add-item {
    width: 100%;
    margin-left: 0;
  }

  .clinical-documents-create-actions {
    width: 100%;
    flex-direction: column;
  }

  .clinical-document-grid,
  .prescription-item-grid {
    grid-template-columns: 1fr;
  }

  .referral-target-switch {
    grid-template-columns: 1fr;
  }

  .clinical-document-grid .span-2,
  .prescription-item-grid .span-2,
  .prescription-item-grid .span-4 {
    grid-column: auto;
  }

  .clinical-document-actions {
    flex-direction: column-reverse;
  }

  .clinical-document-actions button {
    width: 100%;
  }

  .prescription-catalog-title {
    align-items: stretch;
  }

  .prescription-catalog-count {
    width: max-content;
    margin-left: 0;
  }

  .prescription-catalog-toolbar,
  .prescription-catalog-layout {
    grid-template-columns: 1fr;
  }

  .prescription-catalog-results {
    max-height: 250px;
    border-right: 0;
    border-bottom: 1px solid #dce9ed;
  }

  .prescription-catalog-detail {
    max-height: none;
  }

  .prescription-catalog-detail-header,
  .prescription-regimen-card {
    align-items: stretch;
    flex-direction: column;
  }

  .prescription-regimen-count {
    width: max-content;
  }

  .prescription-regimen-card > button {
    width: 100%;
  }
}

[data-view-panel="Cadastro"] .patient-record-form {
  padding: 0 18px 20px;
  border: 1px solid #d9e8ed;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(14,52,75,.08);
}

[data-view-panel="Cadastro"] .patient-record-header {
  min-height: 104px;
  display: flex;
  align-items: center;
  margin: 0 -18px 14px;
  padding: 16px 24px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(115deg, #063b69 0%, #087ab0 58%, #12b9b0 100%);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(5,63,105,.16);
  position: relative;
  overflow: hidden;
}

[data-view-panel="Cadastro"] .patient-record-header::after {
  content: "";
  width: 190px;
  height: 190px;
  position: absolute;
  right: 80px;
  top: -125px;
  border: 30px solid rgba(255,255,255,.08);
  border-radius: 50%;
}

[data-view-panel="Cadastro"] .patient-record-header > div {
  position: relative;
  z-index: 1;
}

[data-view-panel="Cadastro"] .patient-record-header span {
  color: #9ff4e8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

[data-view-panel="Cadastro"] .patient-record-header h1 {
  margin: 2px 0 3px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 850;
}

[data-view-panel="Cadastro"] .patient-record-header p {
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 650;
}

[data-view-panel="Cadastro"] .ficha-inline-actions {
  gap: 8px;
  margin: 0 0 12px;
}

[data-view-panel="Cadastro"] .ficha-inline-actions button {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 10px;
  box-shadow: none;
}

[data-view-panel="Cadastro"] .serasa-action {
  background: #fcedf4;
  color: #b62763;
  border: 1px solid #f2bfd5;
}

[data-view-panel="Cadastro"] .credit-action {
  background: #eaf6fb;
  color: #08739e;
  border: 1px solid #bfe2f0;
}

[data-view-panel="Cadastro"] .voucher-action {
  background: #edf9f7;
  color: #087d6b;
  border: 1px solid #bfe8e0;
}

[data-view-panel="Cadastro"] .patient-record-form .ficha-section {
  margin: 0 0 14px;
  padding: 16px;
  border: 1px solid #deeaee;
  border-radius: 15px;
  background: #fbfdfd;
}

[data-view-panel="Cadastro"] .patient-record-form .ficha-section + .ficha-section {
  margin-top: 0;
}

[data-view-panel="Cadastro"] .patient-record-form .ficha-section h2 {
  gap: 8px;
  margin: 0 0 14px;
  padding: 0 0 10px;
  border-bottom: 1px solid #dfebee;
  color: #083b65;
  font-size: 17px;
  font-weight: 850;
}

[data-view-panel="Cadastro"] .ficha-section-emoji {
  width: 29px;
  height: 29px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #cce7e3;
  border-radius: 9px;
  background: #eaf9f6;
  font-size: 15px;
  line-height: 1;
}

[data-view-panel="Cadastro"] .patient-balance-strip {
  min-height: 62px;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px;
  border: 1px solid #cfe7e2;
  border-radius: 13px;
  background: #f0faf8;
}

[data-view-panel="Cadastro"] .patient-balance-strip span {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border-radius: 9px;
  background: #ffffff;
  color: #607684;
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

[data-view-panel="Cadastro"] .patient-balance-strip strong {
  color: #087c69;
  font-size: 14px;
}

[data-view-panel="Cadastro"] .patient-quick-actions {
  gap: 7px;
  margin-bottom: 13px;
}

[data-view-panel="Cadastro"] .patient-quick-actions button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-radius: 10px;
  box-shadow: none;
}

[data-view-panel="Cadastro"] .whatsapp-action {
  border: 1px solid #bfe8dc;
  background: #eaf9f4;
  color: #087b64;
}

[data-view-panel="Cadastro"] .queue-action {
  border: 1px solid #efc9c9;
  background: #fff1f1;
  color: #b63b3b;
}

[data-view-panel="Cadastro"] .patient-record-form .ficha-grid {
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 13px 16px;
}

[data-view-panel="Cadastro"] .patient-record-form .ficha-grid label,
[data-view-panel="Cadastro"] .patient-record-form .ficha-grid label.wide-field,
[data-view-panel="Cadastro"] .patient-record-form .ficha-grid label.full-field {
  grid-column: auto;
  grid-template-columns: 1fr;
  gap: 5px;
}

[data-view-panel="Cadastro"] .patient-record-form .ficha-grid label.full-field {
  grid-column: 1 / -1;
}

[data-view-panel="Cadastro"] .patient-record-form .ficha-grid span {
  color: #607684;
  font-size: 10px;
  letter-spacing: .06em;
  text-align: left;
  text-transform: uppercase;
}

[data-view-panel="Cadastro"] .patient-record-form .ficha-grid input,
[data-view-panel="Cadastro"] .patient-record-form .ficha-grid select {
  min-height: 42px;
  border-color: #cfdee4;
  border-radius: 10px;
  color: #123a52;
}

[data-view-panel="Cadastro"] .patient-record-number-field > span,
[data-view-panel="Cadastro"] .patient-created-date-field > span,
[data-view-panel="Cadastro"] .patient-last-attendance-field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

[data-view-panel="Cadastro"] .patient-record-number-field > span small,
[data-view-panel="Cadastro"] .patient-created-date-field > span small,
[data-view-panel="Cadastro"] .patient-last-attendance-field > span small {
  padding: 3px 7px;
  border-radius: 999px;
  background: #e9f5f8;
  color: #347185;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .06em;
}

[data-view-panel="Cadastro"] .patient-record-number-field[data-automatic] > span small {
  background: #e8f8f1;
  color: #08765a;
}

[data-view-panel="Cadastro"] .patient-record-number-field[data-automatic] input[readonly] {
  border-color: #a7ddd2;
  background: linear-gradient(90deg, #0ca88d 0 5px, #f2fbf8 5px 100%);
  color: #08705f;
  font-weight: 850;
  cursor: default;
  box-shadow: none;
}

[data-view-panel="Cadastro"] .patient-created-date-field input[readonly],
[data-view-panel="Cadastro"] .patient-last-attendance-field input[readonly] {
  border-color: #c5dce4;
  background: linear-gradient(90deg, #edf8fa 0 5px, #f7fbfc 5px 100%);
  color: #476773;
  font-weight: 800;
  cursor: default;
  box-shadow: none;
}

[data-view-panel="Cadastro"] .patient-last-attendance-field[data-has-attendance] input[readonly] {
  border-color: #a7ddd2;
  background: linear-gradient(90deg, #0ca88d 0 5px, #f2fbf8 5px 100%);
  color: #08705f;
}

[data-view-panel="Cadastro"] .patient-created-date-field[data-has-created-date] input[readonly] {
  border-color: #b7d9e5;
  background: linear-gradient(90deg, #148eb6 0 5px, #f2f9fb 5px 100%);
  color: #17637c;
}

/* Central rápida de atendimento na ficha do paciente */
[data-view-panel="Cadastro"] .patient-attendance-panel {
  padding: 0 18px 22px;
  border: 1px solid #d8e7ec;
  border-radius: 18px;
  background: #f7fafb;
  box-shadow: 0 12px 32px rgba(9, 55, 78, .09);
  overflow: hidden;
}

[data-view-panel="Cadastro"] .patient-attendance-header {
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 -18px;
  padding: 20px 26px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(118deg, #063c68 0%, #087ca7 56%, #13b9ad 100%);
  color: #ffffff;
}

[data-view-panel="Cadastro"] .patient-attendance-header::after {
  content: "";
  width: 180px;
  height: 180px;
  position: absolute;
  right: 15%;
  top: -118px;
  border: 28px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
}

[data-view-panel="Cadastro"] .patient-attendance-header > * {
  position: relative;
  z-index: 1;
}

[data-view-panel="Cadastro"] .patient-attendance-header > div:first-child > span {
  color: #9ef5e9;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

[data-view-panel="Cadastro"] .patient-attendance-header h2 {
  margin: 3px 0 4px;
  font-size: 24px;
  font-weight: 900;
}

[data-view-panel="Cadastro"] .patient-attendance-header p {
  margin: 0;
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  font-weight: 650;
}

[data-view-panel="Cadastro"] .patient-attendance-patient {
  min-width: 250px;
  display: grid;
  gap: 4px;
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 13px;
  background: rgba(2, 44, 75, .24);
  backdrop-filter: blur(5px);
}

[data-view-panel="Cadastro"] .patient-attendance-patient small {
  color: #9ef5e9;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

[data-view-panel="Cadastro"] .patient-attendance-patient strong {
  font-size: 14px;
  line-height: 1.3;
}

[data-view-panel="Cadastro"] .patient-attendance-patient .patient-attendance-age {
  display: block;
  margin-top: -1px;
  color: rgba(255, 255, 255, .74);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
}

[data-view-panel="Cadastro"] .patient-attendance-tabs {
  display: flex;
  gap: 8px;
  margin: 0 -18px 16px;
  padding: 12px 18px;
  border-bottom: 1px solid #dce9ed;
  background: #ffffff;
}

[data-view-panel="Cadastro"] .patient-attendance-tabs button {
  min-width: 150px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid #d3e3e8;
  border-radius: 11px;
  background: #f7fafb;
  color: #456270;
  font-size: 12px;
  font-weight: 850;
  box-shadow: none;
}

[data-view-panel="Cadastro"] .patient-attendance-tabs button svg {
  width: 17px;
  height: 17px;
}

[data-view-panel="Cadastro"] .patient-attendance-tabs button.is-active {
  border-color: #0aa68e;
  background: #e9f9f5;
  color: #087561;
  box-shadow: 0 5px 14px rgba(10, 166, 142, .12);
}

[data-view-panel="Cadastro"] .patient-attendance-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

[data-view-panel="Cadastro"] .patient-attendance-metrics article {
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: center;
  gap: 3px 12px;
  padding: 12px 14px;
  border: 1px solid #dce8ec;
  border-radius: 13px;
  background: #ffffff;
}

[data-view-panel="Cadastro"] .patient-attendance-metrics article::before {
  content: "";
  width: 5px;
  align-self: stretch;
  grid-row: 1 / 3;
  border-radius: 99px;
  background: #ef9b31;
}

[data-view-panel="Cadastro"] .patient-attendance-metrics article.is-open::before {
  background: #188fc1;
}

[data-view-panel="Cadastro"] .patient-attendance-metrics article.is-finished::before {
  background: #08a970;
}

[data-view-panel="Cadastro"] .patient-attendance-metrics span {
  align-self: end;
  color: #526d79;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

[data-view-panel="Cadastro"] .patient-attendance-metrics strong {
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
  color: #103f59;
  font-size: 27px;
  font-weight: 900;
}

[data-view-panel="Cadastro"] .patient-attendance-metrics small {
  color: #81939b;
  font-size: 10px;
  font-weight: 650;
}

[data-view-panel="Cadastro"] .patient-attendance-board {
  margin-top: 14px;
  border: 1px solid #dce8ec;
  border-radius: 15px;
  background: #ffffff;
  overflow: hidden;
}

[data-view-panel="Cadastro"] .patient-attendance-board > header {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  color: #ffffff;
  background: linear-gradient(105deg, #e95b42, #ee7a42);
}

[data-view-panel="Cadastro"] .patient-attendance-board.is-finished-history > header {
  background: linear-gradient(105deg, #078a71, #0bb187);
}

[data-view-panel="Cadastro"] .patient-attendance-board.is-open-history > header {
  background: linear-gradient(105deg, #c77a0b, #efa62f);
}

[data-view-panel="Cadastro"] .patient-attendance-board.is-other-history > header {
  background: linear-gradient(105deg, #587280, #78909b);
}

[data-view-panel="Cadastro"] .patient-attendance-board > header span {
  display: block;
  margin-bottom: 2px;
  color: rgba(255, 255, 255, .72);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

[data-view-panel="Cadastro"] .patient-attendance-board > header h3 {
  margin: 0;
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
}

[data-view-panel="Cadastro"] .patient-attendance-board > header > strong {
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  background: rgba(0, 0, 0, .09);
  font-size: 13px;
}

[data-view-panel="Cadastro"] .patient-attendance-rows {
  max-height: 430px;
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-color: #a9cbd4 #edf4f6;
  scrollbar-width: thin;
}

[data-view-panel="Cadastro"] .patient-attendance-table {
  min-width: 880px;
}

[data-view-panel="Cadastro"] .patient-attendance-table-head,
[data-view-panel="Cadastro"] .patient-attendance-row {
  display: grid;
  grid-template-columns: .8fr 1fr 1.55fr .9fr 1fr .85fr;
  align-items: center;
  gap: 10px;
}

[data-view-panel="Cadastro"] .patient-attendance-table.is-budget-history {
  width: 100%;
  min-width: 0;
}

[data-view-panel="Cadastro"] .patient-attendance-table.is-budget-history .patient-attendance-table-head,
[data-view-panel="Cadastro"] .patient-attendance-table.is-budget-history .patient-attendance-row {
  grid-template-columns:
    minmax(60px, .65fr)
    minmax(78px, .72fr)
    minmax(135px, 1.3fr)
    minmax(58px, .55fr)
    minmax(150px, 1.45fr)
    minmax(76px, .68fr)
    minmax(108px, .92fr);
  gap: 8px;
}

[data-view-panel="Cadastro"] .patient-attendance-table.is-ortho-history {
  width: 100%;
  min-width: 0;
}

[data-view-panel="Cadastro"] .patient-attendance-table.is-ortho-history .patient-attendance-table-head,
[data-view-panel="Cadastro"] .patient-attendance-table.is-ortho-history .patient-attendance-row {
  grid-template-columns:
    minmax(116px, 1fr)
    minmax(78px, .72fr)
    minmax(140px, 1.25fr)
    minmax(155px, 1.35fr)
    minmax(76px, .68fr)
    minmax(108px, .92fr);
  gap: 8px;
}

[data-view-panel="Cadastro"] .patient-attendance-table-head {
  min-height: 36px;
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0 14px;
  border-bottom: 1px solid #dfe9ec;
  background: #f1f6f7;
  color: #6c7f87;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

[data-view-panel="Cadastro"] .patient-attendance-row {
  min-height: 70px;
  padding: 10px 14px;
  border-bottom: 1px solid #e5edef;
  color: #173e52;
  transition: background .15s ease;
}

[data-view-panel="Cadastro"] .patient-attendance-row:last-child {
  border-bottom: 0;
}

[data-view-panel="Cadastro"] .patient-attendance-row:hover {
  background: #f7fbfb;
}

[data-view-panel="Cadastro"] .patient-attendance-row > div {
  min-width: 0;
}

[data-view-panel="Cadastro"] .patient-attendance-row strong {
  display: block;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

[data-view-panel="Cadastro"] .patient-attendance-row small {
  display: block;
  margin-top: 3px;
  color: #7a9099;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.3;
}

[data-view-panel="Cadastro"] .patient-attendance-datetime strong,
[data-view-panel="Cadastro"] .patient-attendance-datetime small {
  white-space: nowrap;
}

[data-view-panel="Cadastro"] .patient-attendance-datetime small {
  margin-top: 2px;
  color: #087ca1;
  font-size: 9px;
  font-weight: 850;
}

[data-view-panel="Cadastro"] .patient-attendance-reference strong,
[data-view-panel="Cadastro"] .patient-attendance-value strong,
[data-view-panel="Cadastro"] .patient-attendance-tooth-cell strong {
  color: #087ca1;
}

.procedure-attendance-summary .procedure-attendance-tooth {
  border-color: #f1d08f;
  background: linear-gradient(135deg, #fff9e9, #fff4d4);
}

.procedure-attendance-summary .procedure-attendance-tooth > span {
  color: #9a6410;
}

.procedure-attendance-summary .procedure-attendance-tooth > strong {
  justify-content: flex-start;
  border-color: #ebc56f;
  background: #ffffff;
  color: #9a5700;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .02em;
}

.procedure-attendance-summary .procedure-attendance-tooth.is-empty {
  border-color: #dce9ed;
  background: #f8fbfc;
}

.procedure-attendance-summary .procedure-attendance-tooth.is-empty > span,
.procedure-attendance-summary .procedure-attendance-tooth.is-empty > strong {
  color: #70848e;
}

.procedure-attendance-detail-grid .procedure-attendance-detail-tooth {
  border-color: #efcd84;
  background: #fff7e2;
}

.procedure-attendance-detail-grid .procedure-attendance-detail-tooth strong {
  color: #9a5e07;
  font-size: 14px;
}

[data-view-panel="Cadastro"] .patient-attendance-status {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 8px;
  border: 1px solid #f0c98d;
  border-radius: 999px;
  background: #fff5df;
  color: #a76508;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
}

[data-view-panel="Cadastro"] .patient-attendance-status.is-open {
  border-color: #a9d9ed;
  background: #eaf7fc;
  color: #08769e;
}

[data-view-panel="Cadastro"] .patient-attendance-status.is-finished {
  border-color: #a9dfc3;
  background: #e9f8ef;
  color: #087347;
}

[data-view-panel="Cadastro"] .patient-attendance-status.is-cancelled {
  border-color: #e7c1c5;
  background: #fbedef;
  color: #a63843;
}

[data-view-panel="Cadastro"] .patient-attendance-primary,
[data-view-panel="Cadastro"] .patient-attendance-secondary {
  width: 100%;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid #0aa28a;
  border-radius: 9px;
  background: #0aa88e;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 5px 12px rgba(10, 168, 142, .16);
}

[data-view-panel="Cadastro"] .patient-attendance-primary svg {
  width: 15px;
  height: 15px;
}

[data-view-panel="Cadastro"] .patient-attendance-secondary {
  border-color: #b9dce8;
  background: #edf8fb;
  color: #08759a;
  box-shadow: none;
}

[data-view-panel="Cadastro"] .patient-attendance-secondary.is-open {
  border-color: #e6c17d;
  background: #fff5df;
  color: #9b610d;
}

[data-view-panel="Cadastro"] .patient-attendance-empty {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 14px;
  padding: 18px;
  border: 1px dashed #c8dde3;
  border-radius: 12px;
  background: #f5fafb;
  color: #56747f;
}

[data-view-panel="Cadastro"] .patient-attendance-empty svg {
  width: 27px;
  height: 27px;
  color: #58a8bb;
}

[data-view-panel="Cadastro"] .patient-attendance-empty strong,
[data-view-panel="Cadastro"] .patient-attendance-empty span {
  display: block;
}

[data-view-panel="Cadastro"] .patient-attendance-empty strong {
  color: #274e60;
  font-size: 12px;
}

[data-view-panel="Cadastro"] .patient-attendance-empty span {
  margin-top: 3px;
  color: #7b929c;
  font-size: 10px;
}

@media (max-width: 820px) {
  [data-view-panel="Cadastro"] .patient-attendance-header {
    align-items: stretch;
    flex-direction: column;
  }

  [data-view-panel="Cadastro"] .patient-attendance-patient {
    min-width: 0;
  }

  [data-view-panel="Cadastro"] .patient-attendance-metrics {
    grid-template-columns: 1fr;
  }

  [data-view-panel="Cadastro"] .patient-attendance-table {
    min-width: 0;
    padding: 10px;
  }

  [data-view-panel="Cadastro"] .patient-attendance-table-head {
    display: none;
  }

  [data-view-panel="Cadastro"] .patient-attendance-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 10px;
    padding: 14px;
    border: 1px solid #dce8ec;
    border-radius: 12px;
  }

  [data-view-panel="Cadastro"] .patient-attendance-table.is-budget-history .patient-attendance-row,
  [data-view-panel="Cadastro"] .patient-attendance-table.is-ortho-history .patient-attendance-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  [data-view-panel="Cadastro"] .patient-attendance-row > div:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 540px) {
  [data-view-panel="Cadastro"] .patient-attendance-tabs button {
    min-width: 0;
    flex: 1;
  }

  [data-view-panel="Cadastro"] .patient-attendance-row {
    grid-template-columns: 1fr;
  }

  [data-view-panel="Cadastro"] .patient-attendance-table.is-budget-history .patient-attendance-row,
  [data-view-panel="Cadastro"] .patient-attendance-table.is-ortho-history .patient-attendance-row {
    grid-template-columns: 1fr;
  }

  [data-view-panel="Cadastro"] .patient-attendance-row > div:last-child {
    grid-column: auto;
  }
}

[data-view-panel="Cadastro"] .patient-zip-field {
  align-content: start;
}

[data-view-panel="Cadastro"] .patient-zip-status {
  min-height: 14px;
  color: #657d89;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.35;
}

[data-view-panel="Cadastro"] .patient-zip-status[data-state="loading"] {
  color: #087ca1;
}

[data-view-panel="Cadastro"] .patient-zip-status[data-state="success"] {
  color: #087b64;
}

[data-view-panel="Cadastro"] .patient-zip-status[data-state="error"] {
  color: #b33b45;
}

[data-view-panel="Cadastro"] .patient-record-form .ficha-grid textarea {
  min-height: 76px;
  border-color: #cfdee4;
  border-radius: 10px;
}

[data-view-panel="Cadastro"] .ficha-footer-actions {
  gap: 8px;
  margin-top: 4px;
  padding-top: 4px;
  border: 0;
}

[data-view-panel="Cadastro"] .patient-record-form .ficha-footer-actions button {
  min-width: 82px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 11px;
}

@media (max-width: 860px) {
  [data-view-panel="Cadastro"] .patient-record-page {
    grid-template-columns: 1fr;
  }

  [data-view-panel="Cadastro"] .ficha-sidebar {
    display: flex;
    overflow-x: auto;
    position: static;
  }

  [data-view-panel="Cadastro"] .patient-identity-card,
  [data-view-panel="Cadastro"] .patient-photo-placeholder,
  [data-view-panel="Cadastro"] .photo-links,
  [data-view-panel="Cadastro"] .health-button,
  [data-view-panel="Cadastro"] .pending-button {
    display: none;
  }

  [data-view-panel="Cadastro"] .ficha-side-menu {
    display: flex;
    margin: 0;
  }

  [data-view-panel="Cadastro"] .ficha-side-menu button {
    flex: 0 0 auto;
  }
}

@media (max-width: 620px) {
  [data-view-panel="Cadastro"] .patient-record-page {
    width: calc(100% - 20px);
  }

  [data-view-panel="Cadastro"] .patient-record-header {
    min-height: 92px;
    padding: 14px 17px;
  }

  [data-view-panel="Cadastro"] .patient-record-form .ficha-grid,
  [data-view-panel="Cadastro"] .patient-balance-strip {
    grid-template-columns: 1fr;
  }

  [data-view-panel="Cadastro"] .ficha-inline-actions,
  [data-view-panel="Cadastro"] .patient-quick-actions {
    align-items: stretch;
    flex-direction: column;
  }

  [data-view-panel="Cadastro"] .ficha-inline-actions button,
  [data-view-panel="Cadastro"] .patient-quick-actions button {
    justify-content: center;
  }
}

/* Cadastros de especialidades, procedimentos, centro de custo e fornecedores */
:is([data-view-panel="CadastroEspecialidades"], [data-view-panel="CadastroProcedimentos"], [data-view-panel="CadastroCentroCustos"], [data-view-panel="CadastroFornecedores"]) {
  background: linear-gradient(180deg, #f3f9fb 0, #ffffff 340px);
}

:is([data-view-panel="CadastroEspecialidades"], [data-view-panel="CadastroProcedimentos"]) .specialties-page,
:is([data-view-panel="CadastroCentroCustos"], [data-view-panel="CadastroFornecedores"]) .payment-method-page {
  background: transparent;
}

:is([data-view-panel="CadastroEspecialidades"], [data-view-panel="CadastroProcedimentos"]) .specialties-content,
:is([data-view-panel="CadastroCentroCustos"], [data-view-panel="CadastroFornecedores"]) .payment-method-content {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: 16px 0 42px;
}

.registry-page-header {
  min-height: 104px;
  display: flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 16px 24px;
  border-radius: 18px;
  background: linear-gradient(115deg, #063b69 0%, #087ab0 58%, #12b9b0 100%);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(5,63,105,.18);
  position: relative;
  overflow: hidden;
}

.registry-page-header::after {
  content: "";
  width: 190px;
  height: 190px;
  position: absolute;
  right: 80px;
  top: -125px;
  border: 30px solid rgba(255,255,255,.08);
  border-radius: 50%;
}

.registry-page-header > div {
  position: relative;
  z-index: 1;
}

.registry-page-header span {
  color: #9ff4e8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.registry-page-header h2 {
  margin: 2px 0 3px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 850;
}

.registry-page-header p {
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 650;
}

.procedure-tabs {
  min-height: 38px;
  gap: 7px;
  margin: 0 0 12px;
  border: 0;
}

.procedure-tabs button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #d3e4e9;
  border-radius: 10px;
  background: #ffffff;
  color: #567181;
  font-size: 11px;
  font-weight: 800;
}

.procedure-tabs button.is-active {
  border-color: #9edfd5;
  background: #eaf9f6;
  color: #087b6b;
}

:is([data-view-panel="CadastroEspecialidades"], [data-view-panel="CadastroProcedimentos"]) .specialties-filter-card,
:is([data-view-panel="CadastroCentroCustos"], [data-view-panel="CadastroFornecedores"]) .payment-method-action-card {
  min-height: 76px;
  margin-bottom: 12px;
  padding: 14px 18px;
  border: 1px solid #d9e9ee;
  border-radius: 17px;
  background: #ffffff;
  box-shadow: 0 9px 26px rgba(14,52,75,.07);
}

:is([data-view-panel="CadastroEspecialidades"], [data-view-panel="CadastroProcedimentos"], [data-view-panel="CadastroCentroCustos"], [data-view-panel="CadastroFornecedores"]) :is(.specialties-filter-card, .payment-method-action-card) .blue-action {
  width: fit-content;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(110deg, #0878b0, #12ad9e);
  color: #ffffff;
  font-weight: 850;
  box-shadow: 0 7px 16px rgba(8,117,160,.18);
}

.procedure-action-buttons {
  gap: 8px;
}

.procedure-action-buttons .blue-action + .blue-action {
  border: 1px solid #bde5df;
  background: #eaf9f6;
  color: #087b6b;
  box-shadow: none;
}

:is([data-view-panel="CadastroEspecialidades"], [data-view-panel="CadastroProcedimentos"], [data-view-panel="CadastroCentroCustos"], [data-view-panel="CadastroFornecedores"]) :is(.specialties-filter-card, .payment-method-action-card) label {
  color: #607684;
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

:is([data-view-panel="CadastroEspecialidades"], [data-view-panel="CadastroProcedimentos"], [data-view-panel="CadastroCentroCustos"], [data-view-panel="CadastroFornecedores"]) :is(select, input, textarea) {
  border-color: #cfdee4;
  border-radius: 10px;
  color: #123a52;
}

:is([data-view-panel="CadastroEspecialidades"], [data-view-panel="CadastroProcedimentos"], [data-view-panel="CadastroCentroCustos"], [data-view-panel="CadastroFornecedores"]) :is(.specialties-table-tools, .payment-method-table-tools) {
  min-height: 54px;
  margin-bottom: 10px;
  padding: 6px 10px;
  border: 1px solid #e0ebef;
  border-radius: 13px;
  background: #f8fbfc;
}

:is([data-view-panel="CadastroEspecialidades"], [data-view-panel="CadastroProcedimentos"]) .specialties-table-wrap,
:is([data-view-panel="CadastroCentroCustos"], [data-view-panel="CadastroFornecedores"]) .payment-method-table-wrap {
  padding: 5px 10px 10px;
  border: 1px solid #dce9ee;
  border-radius: 17px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(14,52,75,.06);
}

:is([data-view-panel="CadastroEspecialidades"], [data-view-panel="CadastroProcedimentos"]) .specialties-table,
:is([data-view-panel="CadastroCentroCustos"], [data-view-panel="CadastroFornecedores"]) .payment-method-table {
  border-collapse: separate;
  border-spacing: 0 7px;
}

:is([data-view-panel="CadastroEspecialidades"], [data-view-panel="CadastroProcedimentos"]) .specialties-table th,
:is([data-view-panel="CadastroCentroCustos"], [data-view-panel="CadastroFornecedores"]) .payment-method-table th {
  padding: 9px 12px;
  border: 0;
  background: transparent;
  color: #6a7e8b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}

:is([data-view-panel="CadastroEspecialidades"], [data-view-panel="CadastroProcedimentos"]) .specialties-table td,
:is([data-view-panel="CadastroCentroCustos"], [data-view-panel="CadastroFornecedores"]) .payment-method-table td {
  padding: 10px 12px;
  border-width: 1px 0;
  border-color: #e1ecef;
  background: #f7fafb;
  color: #12384f;
  font-weight: 700;
}

:is([data-view-panel="CadastroEspecialidades"], [data-view-panel="CadastroProcedimentos"]) .specialties-table td:first-child,
:is([data-view-panel="CadastroCentroCustos"], [data-view-panel="CadastroFornecedores"]) .payment-method-table td:first-child {
  border-left-width: 1px;
  border-radius: 12px 0 0 12px;
  color: #083b65;
  font-weight: 850;
}

:is([data-view-panel="CadastroEspecialidades"], [data-view-panel="CadastroProcedimentos"]) .specialties-table td:last-child,
:is([data-view-panel="CadastroCentroCustos"], [data-view-panel="CadastroFornecedores"]) .payment-method-table td:last-child {
  border-right-width: 1px;
  border-radius: 0 12px 12px 0;
}

:is([data-view-panel="CadastroEspecialidades"], [data-view-panel="CadastroProcedimentos"]) .specialties-table tbody tr:nth-child(even),
:is([data-view-panel="CadastroCentroCustos"], [data-view-panel="CadastroFornecedores"]) .payment-method-table tbody tr:nth-child(even) {
  background: transparent;
}

.specialty-create-panel,
.specialty-edit-card,
.procedure-detail-card,
:is([data-view-panel="CadastroCentroCustos"], [data-view-panel="CadastroFornecedores"]) .payment-method-detail-card {
  gap: 16px;
  padding: 20px;
  border: 1px solid #d9e8ed;
  border-radius: 17px;
  background: #ffffff;
  box-shadow: 0 9px 26px rgba(14,52,75,.07);
}

.specialty-create-panel label,
.specialty-edit-row,
.procedure-detail-row,
:is([data-view-panel="CadastroCentroCustos"], [data-view-panel="CadastroFornecedores"]) .payment-method-detail-row {
  grid-template-columns: 1fr;
  gap: 5px;
}

.specialty-create-panel label > span,
.specialty-edit-row > span,
.procedure-detail-row > span,
:is([data-view-panel="CadastroCentroCustos"], [data-view-panel="CadastroFornecedores"]) .payment-method-detail-row > span {
  color: #607684;
  font-size: 10px;
  letter-spacing: .06em;
  text-align: left;
  text-transform: uppercase;
}

.specialty-create-panel :is(input,select),
.specialty-edit-row :is(input,select),
.procedure-detail-row :is(input,select),
:is([data-view-panel="CadastroCentroCustos"], [data-view-panel="CadastroFornecedores"]) .payment-method-detail-row :is(input,select) {
  min-height: 42px;
}

.supplier-detail-card {
  grid-template-columns: repeat(2,minmax(0,1fr));
}

.supplier-detail-card .payment-method-detail-row:last-of-type {
  grid-column: 1 / -1;
}

.supplier-detail-card textarea {
  min-height: 82px;
}

.procedure-check-grid,
.procedure-generation-grid,
.procedure-lab-row,
.specialty-clinic-section {
  padding: 13px;
  border: 1px solid #dce9ed;
  border-radius: 13px;
  background: #f7fbfc;
}

.procedure-check-grid label,
.procedure-generation-grid label {
  min-height: 38px;
  padding: 6px 10px;
  border-radius: 9px;
  background: #ffffff;
}

:is(.specialty-form-actions, .specialty-edit-actions, .procedure-detail-actions, .payment-method-detail-actions) {
  gap: 8px;
}

:is(.specialty-form-actions, .specialty-edit-actions, .procedure-detail-actions, .payment-method-detail-actions) button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
}

@media (max-width: 700px) {
  :is([data-view-panel="CadastroEspecialidades"], [data-view-panel="CadastroProcedimentos"]) .specialties-content,
  :is([data-view-panel="CadastroCentroCustos"], [data-view-panel="CadastroFornecedores"]) .payment-method-content {
    width: calc(100% - 20px);
  }

  .registry-page-header {
    min-height: 92px;
    padding: 14px 17px;
    border-radius: 15px;
  }

  .supplier-detail-card {
    grid-template-columns: 1fr;
  }

  .supplier-detail-card .payment-method-detail-row:last-of-type {
    grid-column: auto;
  }
}

:is([data-view-panel="CadastroEspecialidades"], [data-view-panel="CadastroProcedimentos"], [data-view-panel="CadastroCentroCustos"], [data-view-panel="CadastroFornecedores"])
:is(.specialty-edit-button, .procedure-edit-button, .payment-method-edit-button) {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid #bde7e1;
  border-radius: 10px;
  background: #eaf9f6;
  color: #078d79;
  cursor: pointer;
  box-shadow: none;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

:is([data-view-panel="CadastroEspecialidades"], [data-view-panel="CadastroProcedimentos"], [data-view-panel="CadastroCentroCustos"], [data-view-panel="CadastroFornecedores"])
:is(.specialty-edit-button, .procedure-edit-button, .payment-method-edit-button) svg {
  width: 17px;
  height: 17px;
}

:is([data-view-panel="CadastroEspecialidades"], [data-view-panel="CadastroProcedimentos"], [data-view-panel="CadastroCentroCustos"], [data-view-panel="CadastroFornecedores"])
:is(.specialty-edit-button, .procedure-edit-button, .payment-method-edit-button):hover,
:is([data-view-panel="CadastroEspecialidades"], [data-view-panel="CadastroProcedimentos"], [data-view-panel="CadastroCentroCustos"], [data-view-panel="CadastroFornecedores"])
:is(.specialty-edit-button, .procedure-edit-button, .payment-method-edit-button):focus-visible {
  border-color: #75cfc1;
  background: #d9f5ef;
  color: #056f61;
  outline: none;
  transform: translateY(-1px);
}

/* Botões de edição dos orçamentos */
[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-edit-button,
[data-view-panel="Cadastro"] .budget-card-icon-button.budget-edit-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid #bde7e1;
  border-radius: 10px;
  background: #eaf9f6;
  color: #078d79;
  cursor: pointer;
  box-shadow: none;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-edit-button svg,
[data-view-panel="Cadastro"] .budget-card-icon-button.budget-edit-button svg {
  width: 17px;
  height: 17px;
}

[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-edit-button:hover,
[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-edit-button:focus-visible,
[data-view-panel="Cadastro"] .budget-card-icon-button.budget-edit-button:hover,
[data-view-panel="Cadastro"] .budget-card-icon-button.budget-edit-button:focus-visible {
  border-color: #75cfc1;
  background: #d9f5ef;
  color: #056f61;
  outline: none;
  transform: translateY(-1px);
}

[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-table .print-budget-button {
  width: 34px;
  height: 34px;
  border: 1px solid #c9dff0;
  border-radius: 10px;
  background: #edf6fc;
  color: #287bac;
}

/* Listagem geral de orçamentos - identidade Tec Dent */
[data-view-panel="AtendimentoOrcamentos"] {
  background: linear-gradient(180deg, #f3f9fb 0, #ffffff 350px);
}

[data-view-panel="AtendimentoOrcamentos"] .attendance-budgets-page {
  background: transparent;
}

[data-view-panel="AtendimentoOrcamentos"] .attendance-budgets-content {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: 16px 0 42px;
}

.attendance-budgets-page-header {
  min-height: 104px;
  display: flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 16px 24px;
  border-radius: 18px;
  background: linear-gradient(115deg, #063b69 0%, #087ab0 58%, #12b9b0 100%);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(5,63,105,.18);
  position: relative;
  overflow: hidden;
}

.attendance-budgets-page-header::after {
  content: "";
  width: 190px;
  height: 190px;
  position: absolute;
  right: 80px;
  top: -125px;
  border: 30px solid rgba(255,255,255,.08);
  border-radius: 50%;
}

.attendance-budgets-page-header > div {
  position: relative;
  z-index: 1;
}

.attendance-budgets-page-header span {
  color: #9ff4e8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.attendance-budgets-page-header h2 {
  margin: 2px 0 3px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 850;
}

.attendance-budgets-page-header p {
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 650;
}

[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-filter-card {
  min-height: 92px;
  grid-template-columns: minmax(150px,.8fr) minmax(150px,.75fr) minmax(150px,.75fr) minmax(180px,.9fr) auto;
  gap: 14px;
  margin-bottom: 12px;
  padding: 15px 18px;
  border: 1px solid #d9e9ee;
  border-radius: 17px;
  background: #ffffff;
  box-shadow: 0 9px 26px rgba(14,52,75,.07);
}

[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-filter-card label {
  gap: 5px;
  color: #607684;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-filter-card span {
  color: #607684;
}

[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-filter-card :is(select,input),
[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-table-tools :is(select,input) {
  min-height: 42px;
  border-color: #cfdee4;
  border-radius: 10px;
  color: #123a52;
}

[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-filter-card input[type="date"] {
  padding-right: 10px;
  color-scheme: light;
  cursor: pointer;
}

[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-filter-card input[type="date"]::-webkit-calendar-picker-indicator {
  width: 20px;
  height: 20px;
  padding: 7px;
  border-left: 1px solid #d8e8eb;
  background-color: #ecf9fa;
  cursor: pointer;
  opacity: .9;
}

[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-search-button {
  min-width: 112px;
  min-height: 42px;
  padding: 0 17px;
  border-radius: 11px;
  background: linear-gradient(110deg, #0878b0, #12ad9e);
  color: #ffffff;
  box-shadow: 0 7px 16px rgba(8,117,160,.18);
}

[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-table-tools {
  min-height: 54px;
  margin-bottom: 10px;
  padding: 6px 10px;
  border: 1px solid #e0ebef;
  border-radius: 13px;
  background: #f8fbfc;
}

[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-table-wrap {
  padding: 5px 10px 10px;
  border: 1px solid #dce9ee;
  border-radius: 17px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(14,52,75,.06);
}

[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-table {
  border-collapse: separate;
  border-spacing: 0 7px;
}

[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-table th {
  padding: 9px 10px;
  border: 0;
  background: transparent;
  color: #6a7e8b;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .07em;
}

[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-table td {
  padding: 10px;
  border-width: 1px 0;
  border-color: #e1ecef;
  background: #f7fafb;
  color: #12384f;
  font-weight: 700;
}

[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-table td:first-child {
  border-left-width: 1px;
  border-radius: 12px 0 0 12px;
  color: #607684;
}

[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-table td:nth-child(2) {
  color: #083b65;
  font-weight: 850;
}

[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-table td:nth-child(4) {
  color: #087c69;
  font-weight: 900;
}

[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-table td:last-child {
  border-right-width: 1px;
  border-radius: 0 12px 12px 0;
}

[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-table tbody tr:nth-child(even),
[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-table tbody tr:hover {
  background: transparent;
}

[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-status {
  min-height: 27px;
  padding: 3px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 10px;
}

[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-status.is-contracted {
  border-color: #bfe7d2;
  background: #eaf9f2;
  color: #087b64;
}

[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-status.is-pending {
  border-color: #eed9a7;
  background: #fff8e8;
  color: #9a6808;
}

@media (max-width: 960px) {
  [data-view-panel="AtendimentoOrcamentos"] .attendance-budget-filter-card {
    grid-template-columns: 1fr 1fr;
  }

  [data-view-panel="AtendimentoOrcamentos"] .attendance-budget-search-button {
    width: 100%;
    grid-column: 1 / -1;
    justify-self: stretch;
  }
}

@media (max-width: 680px) {
  [data-view-panel="AtendimentoOrcamentos"] .attendance-budgets-content {
    width: calc(100% - 20px);
  }

  .attendance-budgets-page-header {
    min-height: 92px;
    padding: 14px 17px;
    border-radius: 15px;
  }

  [data-view-panel="AtendimentoOrcamentos"] .attendance-budget-filter-card {
    grid-template-columns: 1fr;
  }
}

/* Franqueadora: correção definitiva do menu e das áreas de gestão */
@media (min-width: 1051px) {
  body:not(.franchise-sidebar-collapsed) .clinic-portal.franchise-portal,
  body:not(.franchise-sidebar-collapsed) .workspace-view.access-manager-dialog.is-active:has(> .franchise-sidebar),
  body:not(.franchise-sidebar-collapsed) .workspace-view.profile-manager-dialog.is-active:has(> .franchise-sidebar) {
    padding-left: 276px !important;
  }

  body.franchise-sidebar-collapsed .clinic-portal.franchise-portal,
  body.franchise-sidebar-collapsed .workspace-view.access-manager-dialog.is-active:has(> .franchise-sidebar),
  body.franchise-sidebar-collapsed .workspace-view.profile-manager-dialog.is-active:has(> .franchise-sidebar) {
    padding-left: 88px !important;
  }

  .clinic-portal.franchise-portal .portal-franchise-sidebar,
  .workspace-view.access-manager-dialog.is-active > .franchise-sidebar,
  .workspace-view.profile-manager-dialog.is-active > .franchise-sidebar,
  body:not(.franchise-sidebar-collapsed) .franchise-sidebar,
  body:not(.franchise-sidebar-collapsed) .franchise-sidebar:hover,
  body:not(.franchise-sidebar-collapsed) .franchise-sidebar:focus-within {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: 276px !important;
    height: 100vh !important;
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 20px 16px !important;
    border: 0 !important;
    background:
      radial-gradient(circle at 0 0, rgba(45, 207, 196, .2), transparent 27%),
      linear-gradient(165deg, #062d42 0%, #075265 58%, #087f75 125%) !important;
    box-shadow: 18px 0 42px rgba(3, 37, 53, .2) !important;
    color: #fff !important;
  }

  .franchise-sidebar .franchise-sidebar-head {
    display: grid !important;
    gap: 10px !important;
  }

  .franchise-sidebar .franchise-sidebar-brand,
  .franchise-sidebar:hover .franchise-sidebar-brand,
  .franchise-sidebar:focus-within .franchise-sidebar-brand {
    width: 100% !important;
    min-height: 96px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 19px !important;
    background: linear-gradient(135deg, #fff, #e7fff8) !important;
    box-shadow: 0 13px 27px rgba(0, 20, 30, .17) !important;
  }

  .franchise-sidebar .franchise-sidebar-brand img,
  .franchise-sidebar:hover .franchise-sidebar-brand img,
  .franchise-sidebar:focus-within .franchise-sidebar-brand img {
    width: 132px !important;
    height: 76px !important;
    object-fit: contain !important;
    transform: none !important;
  }

  .franchise-sidebar .franchise-sidebar-toggle {
    width: 100% !important;
    min-height: 39px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 0 12px !important;
    border: 1px solid rgba(255, 255, 255, .14) !important;
    border-radius: 12px !important;
    background: rgba(0, 27, 41, .22) !important;
    color: rgba(239, 255, 255, .88) !important;
    font-size: 11px !important;
    font-weight: 850 !important;
  }

  .franchise-sidebar .franchise-sidebar-nav,
  .franchise-sidebar:hover .franchise-sidebar-nav,
  .franchise-sidebar:focus-within .franchise-sidebar-nav {
    width: 100% !important;
    display: grid !important;
    gap: 5px !important;
    margin-top: 0 !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .franchise-sidebar .franchise-sidebar-item,
  .franchise-sidebar:hover .franchise-sidebar-item,
  .franchise-sidebar:focus-within .franchise-sidebar-item {
    width: 100% !important;
    min-height: 45px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 11px !important;
    padding: 7px 12px !important;
    border: 1px solid transparent !important;
    border-radius: 13px !important;
    background: transparent !important;
    color: rgba(237, 255, 255, .8) !important;
  }

  .franchise-sidebar .franchise-sidebar-item:hover,
  .franchise-sidebar .franchise-sidebar-subitem:hover,
  .franchise-sidebar .franchise-sidebar-subitem.is-active {
    border-color: rgba(255, 255, 255, .13) !important;
    background: rgba(255, 255, 255, .09) !important;
    color: #fff !important;
  }

  .franchise-sidebar .franchise-sidebar-item.is-active {
    border-color: rgba(210, 244, 66, .2) !important;
    background: linear-gradient(90deg, rgba(210, 244, 66, .2), rgba(255, 255, 255, .06)) !important;
    box-shadow: inset 3px 0 0 #d2f442 !important;
    color: #fff !important;
  }

  .franchise-sidebar .franchise-sidebar-icon {
    width: 19px !important;
    height: 19px !important;
    display: block !important;
    flex: 0 0 auto !important;
  }

  .franchise-sidebar .franchise-sidebar-copy,
  .franchise-sidebar .franchise-sidebar-user-copy,
  .franchise-sidebar:hover .franchise-sidebar-copy,
  .franchise-sidebar:hover .franchise-sidebar-user-copy,
  .franchise-sidebar:focus-within .franchise-sidebar-copy,
  .franchise-sidebar:focus-within .franchise-sidebar-user-copy {
    min-width: 0 !important;
    display: grid !important;
    gap: 2px !important;
  }

  .franchise-sidebar .franchise-sidebar-copy strong,
  .franchise-sidebar .franchise-sidebar-user-copy strong {
    overflow: hidden !important;
    color: inherit !important;
    font-size: 13px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .franchise-sidebar .franchise-sidebar-group[open] .franchise-sidebar-subnav {
    display: grid !important;
  }

  .franchise-sidebar .franchise-sidebar-subnav {
    gap: 4px !important;
    margin: 3px 0 8px 30px !important;
  }

  .franchise-sidebar .franchise-sidebar-subitem {
    min-height: 35px !important;
    padding: 0 11px !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: rgba(237, 255, 255, .68) !important;
    font-size: 12px !important;
    font-weight: 850 !important;
  }

  .franchise-sidebar .franchise-sidebar-user,
  .franchise-sidebar:hover .franchise-sidebar-user,
  .franchise-sidebar:focus-within .franchise-sidebar-user {
    width: 100% !important;
    min-height: 58px !important;
    margin-top: auto !important;
    justify-content: flex-start !important;
    padding: 9px 10px !important;
    border: 1px solid rgba(255, 255, 255, .13) !important;
    border-radius: 16px !important;
    background: rgba(0, 25, 39, .24) !important;
  }

  .franchise-sidebar .franchise-profile-chevron {
    display: inline-flex !important;
    color: rgba(236, 255, 255, .6) !important;
  }

  body.franchise-sidebar-collapsed .clinic-portal.franchise-portal .portal-franchise-sidebar,
  body.franchise-sidebar-collapsed .workspace-view.access-manager-dialog.is-active > .franchise-sidebar,
  body.franchise-sidebar-collapsed .workspace-view.profile-manager-dialog.is-active > .franchise-sidebar,
  body.franchise-sidebar-collapsed .franchise-sidebar,
  body.franchise-sidebar-collapsed .franchise-sidebar:hover,
  body.franchise-sidebar-collapsed .franchise-sidebar:focus-within {
    width: 88px !important;
    padding: 20px 10px !important;
  }

  body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-brand,
  body.franchise-sidebar-collapsed .franchise-sidebar:hover .franchise-sidebar-brand,
  body.franchise-sidebar-collapsed .franchise-sidebar:focus-within .franchise-sidebar-brand {
    min-height: 66px !important;
  }

  body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-brand img,
  body.franchise-sidebar-collapsed .franchise-sidebar:hover .franchise-sidebar-brand img,
  body.franchise-sidebar-collapsed .franchise-sidebar:focus-within .franchise-sidebar-brand img {
    width: 54px !important;
    height: 54px !important;
  }

  body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-toggle {
    width: 42px !important;
    align-self: center !important;
    padding: 0 !important;
  }

  body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-toggle span,
  body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-copy,
  body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-user-copy,
  body.franchise-sidebar-collapsed .franchise-sidebar .franchise-profile-chevron {
    display: none !important;
  }

  body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-item,
  body.franchise-sidebar-collapsed .franchise-sidebar:hover .franchise-sidebar-item,
  body.franchise-sidebar-collapsed .franchise-sidebar:focus-within .franchise-sidebar-item {
    justify-content: center !important;
    padding: 7px !important;
  }

  body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-group[open] .franchise-sidebar-subnav {
    display: none !important;
  }

  body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-user,
  body.franchise-sidebar-collapsed .franchise-sidebar:hover .franchise-sidebar-user,
  body.franchise-sidebar-collapsed .franchise-sidebar:focus-within .franchise-sidebar-user {
    justify-content: center !important;
    padding: 8px !important;
  }
}

.workspace-view.access-manager-dialog.is-active .access-manager-shell,
.workspace-view.profile-manager-dialog.is-active .profile-manager-panel {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 100vh !important;
  background:
    radial-gradient(circle at 92% 2%, rgba(18, 185, 176, .1), transparent 25%),
    linear-gradient(180deg, #f3f9fb 0%, #fff 58%) !important;
}

.workspace-view.access-manager-dialog.is-active .access-manager-shell > .access-manager-header,
.workspace-view.profile-manager-dialog.is-active .profile-manager-panel > .access-manager-header {
  min-height: 108px !important;
  align-items: center !important;
  margin: 16px 22px 0 !important;
  padding: 17px 20px 17px 24px !important;
  border: 0 !important;
  border-radius: 18px !important;
  background: linear-gradient(115deg, #063b69 0%, #087ab0 58%, #12b9b0 100%) !important;
  box-shadow: 0 12px 28px rgba(5, 63, 105, .18) !important;
  color: #fff !important;
  overflow: hidden !important;
}

.workspace-view.access-manager-dialog.is-active .access-manager-header :is(small, h2, p),
.workspace-view.profile-manager-dialog.is-active .access-manager-header :is(small, h2, p) {
  color: #fff !important;
}

.workspace-view.access-manager-dialog.is-active .access-manager-header small,
.workspace-view.profile-manager-dialog.is-active .access-manager-header small {
  color: #9ff4e8 !important;
}

.workspace-view.access-manager-dialog.is-active .access-manager-header p,
.workspace-view.profile-manager-dialog.is-active .access-manager-header p {
  color: rgba(255, 255, 255, .8) !important;
}

.workspace-view.access-manager-dialog.is-active .access-manager-header .dialog-close-button,
.workspace-view.profile-manager-dialog.is-active .access-manager-header .dialog-close-button,
.workspace-view.profile-manager-dialog.is-active .profile-manager-header-actions .save-action {
  border: 1px solid rgba(255, 255, 255, .28) !important;
  background: rgba(255, 255, 255, .15) !important;
  color: #fff !important;
  box-shadow: none !important;
  backdrop-filter: blur(7px) !important;
}

.workspace-view.access-manager-dialog.is-active .access-manager-layout,
.workspace-view.profile-manager-dialog.is-active .profile-rule-grid {
  min-width: 0 !important;
}

.workspace-view.access-manager-dialog.is-active .access-list-panel,
.workspace-view.profile-manager-dialog.is-active .profile-rule-card {
  border-color: #d8e8ec !important;
  background: rgba(255, 255, 255, .97) !important;
  box-shadow: 0 10px 28px rgba(14, 52, 75, .07) !important;
}

.franchise-sidebar .franchise-sidebar-subitem.is-active {
  color: #fff !important;
}

@media (max-width: 1050px) {
  .clinic-portal.franchise-portal,
  body.franchise-sidebar-collapsed .clinic-portal.franchise-portal,
  .workspace-view.access-manager-dialog.is-active,
  .workspace-view.profile-manager-dialog.is-active,
  body.franchise-sidebar-collapsed .workspace-view.access-manager-dialog.is-active,
  body.franchise-sidebar-collapsed .workspace-view.profile-manager-dialog.is-active {
    padding-left: 0 !important;
  }

  .clinic-portal.franchise-portal .portal-franchise-sidebar,
  body.franchise-sidebar-collapsed .clinic-portal.franchise-portal .portal-franchise-sidebar,
  .workspace-view.access-manager-dialog.is-active > .franchise-sidebar,
  .workspace-view.profile-manager-dialog.is-active > .franchise-sidebar,
  body.franchise-sidebar-collapsed .franchise-sidebar {
    position: sticky !important;
    inset: 0 auto auto 0 !important;
    z-index: 120 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 12px !important;
    overflow: visible !important;
    padding: 10px 14px !important;
    border: 0 !important;
    background: linear-gradient(105deg, #062f43, #076d70) !important;
    box-shadow: 0 10px 24px rgba(3, 37, 53, .16) !important;
    color: #fff !important;
  }

  .franchise-sidebar .franchise-sidebar-head {
    display: flex !important;
    align-items: center !important;
  }

  .franchise-sidebar .franchise-sidebar-brand {
    width: 116px !important;
    min-height: 54px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: #fff !important;
  }

  .franchise-sidebar .franchise-sidebar-brand img,
  body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-brand img {
    width: 96px !important;
    height: 50px !important;
  }

  .franchise-sidebar .franchise-sidebar-toggle {
    display: none !important;
  }

  .franchise-sidebar .franchise-sidebar-nav,
  .franchise-sidebar:hover .franchise-sidebar-nav,
  .franchise-sidebar:focus-within .franchise-sidebar-nav {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 5px !important;
    margin: 0 !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .franchise-sidebar .franchise-sidebar-item,
  .franchise-sidebar:hover .franchise-sidebar-item,
  .franchise-sidebar:focus-within .franchise-sidebar-item {
    min-height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    padding: 6px 8px !important;
    border: 1px solid transparent !important;
    border-radius: 11px !important;
    background: transparent !important;
    color: rgba(241, 255, 255, .82) !important;
  }

  .franchise-sidebar .franchise-sidebar-icon {
    width: 17px !important;
    height: 17px !important;
    display: block !important;
  }

  .franchise-sidebar .franchise-sidebar-copy {
    display: grid !important;
  }

  .franchise-sidebar .franchise-sidebar-copy strong {
    color: inherit !important;
    font-size: 11px !important;
    white-space: nowrap !important;
  }

  .franchise-sidebar .franchise-sidebar-group {
    position: relative !important;
  }

  .franchise-sidebar .franchise-sidebar-group[open] .franchise-sidebar-subnav {
    position: absolute !important;
    top: calc(100% + 7px) !important;
    left: 50% !important;
    z-index: 12 !important;
    width: 180px !important;
    display: grid !important;
    gap: 5px !important;
    margin: 0 !important;
    padding: 9px !important;
    border: 1px solid rgba(255, 255, 255, .15) !important;
    border-radius: 13px !important;
    background: #074e5d !important;
    box-shadow: 0 16px 30px rgba(0, 23, 34, .25) !important;
    transform: translateX(-50%) !important;
  }

  .franchise-sidebar .franchise-sidebar-subitem {
    min-height: 36px !important;
    padding: 0 11px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: rgba(255, 255, 255, .05) !important;
    color: #e9ffff !important;
    font-size: 12px !important;
  }

  .franchise-sidebar .franchise-sidebar-user,
  body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-user {
    width: auto !important;
    min-height: 46px !important;
    margin: 0 !important;
    padding: 7px 9px !important;
    border: 1px solid rgba(255, 255, 255, .14) !important;
    border-radius: 13px !important;
    background: rgba(0, 25, 39, .2) !important;
    color: #fff !important;
  }

  .franchise-sidebar .franchise-sidebar-user-copy {
    display: none !important;
  }

  .franchise-sidebar .franchise-profile-chevron {
    display: inline-flex !important;
    color: rgba(255, 255, 255, .7) !important;
  }

  .franchise-sidebar .franchise-profile-panel {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    z-index: 15 !important;
    width: 230px !important;
  }

  .workspace-view.access-manager-dialog.is-active .access-manager-shell > .access-manager-header,
  .workspace-view.profile-manager-dialog.is-active .profile-manager-panel > .access-manager-header {
    margin: 12px 14px 0 !important;
  }
}

@media (max-width: 680px) {
  .clinic-portal.franchise-portal .portal-franchise-sidebar,
  .workspace-view.access-manager-dialog.is-active > .franchise-sidebar,
  .workspace-view.profile-manager-dialog.is-active > .franchise-sidebar,
  body.franchise-sidebar-collapsed .franchise-sidebar {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px !important;
    padding: 8px 10px !important;
  }

  .franchise-sidebar .franchise-sidebar-head {
    grid-column: 1 !important;
  }

  .franchise-sidebar .franchise-sidebar-brand {
    width: 94px !important;
    min-height: 46px !important;
  }

  .franchise-sidebar .franchise-sidebar-brand img,
  body.franchise-sidebar-collapsed .franchise-sidebar .franchise-sidebar-brand img {
    width: 82px !important;
    height: 42px !important;
  }

  .franchise-sidebar .franchise-sidebar-user {
    grid-column: 2 !important;
  }

  .franchise-sidebar .franchise-sidebar-nav {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }

  .franchise-sidebar .franchise-sidebar-item,
  .franchise-sidebar:hover .franchise-sidebar-item,
  .franchise-sidebar:focus-within .franchise-sidebar-item {
    min-height: 38px !important;
    padding: 5px 4px !important;
  }

  .franchise-sidebar .franchise-sidebar-copy strong {
    font-size: 10px !important;
  }

  .workspace-view.access-manager-dialog.is-active .access-manager-shell > .access-manager-header,
  .workspace-view.profile-manager-dialog.is-active .profile-manager-panel > .access-manager-header {
    align-items: flex-start !important;
    margin: 10px !important;
    padding: 16px !important;
  }

  .workspace-view.profile-manager-dialog.is-active .access-manager-header {
    flex-direction: column !important;
  }

  .workspace-view.profile-manager-dialog.is-active .profile-manager-header-actions {
    width: 100% !important;
  }
}

/* Multifr franquias: Painel Mestre, marca por franquia e login próprio */
:root {
  --tenant-primary: #078f9a;
  --tenant-accent: #b9d600;
}

.login-screen,
.franchise-portal {
  --tenant-primary: #078f9a;
  --tenant-accent: #b9d600;
}

.login-tenant-brand.is-hidden,
.franchise-portal [data-back-to-master].is-hidden,
.franchise-portal [data-open-clinic-register].is-hidden {
  display: none !important;
}

.login-brand-stack {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.login-screen.is-tenant-login .login-brand-stack {
  display: contents;
}

.login-tenant-brand {
  min-width: 150px;
  min-height: 76px;
  padding: 12px 18px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(1, 39, 60, .18);
}

.login-tenant-brand img {
  display: block;
  width: auto;
  max-width: 190px;
  height: 58px;
  object-fit: contain;
}

.login-tenant-brand strong {
  color: var(--tenant-primary);
  font-size: 30px;
  letter-spacing: -.06em;
}

.login-screen.is-tenant-login .login-brand-mark {
  width: 124px;
  min-width: 0;
  grid-column: 1;
  grid-row: 3;
  align-self: end;
  padding: 9px 11px;
  display: grid;
  align-items: center;
  justify-items: center;
  gap: 5px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 13px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 9px 22px rgba(1, 39, 60, .12);
}

.login-screen.is-tenant-login .login-brand-mark::before {
  content: "TECNOLOGIA";
  display: block;
  margin: 0;
  color: color-mix(in srgb, var(--tenant-primary) 76%, #183b4d);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .18em;
  text-align: center;
}

.login-screen.is-tenant-login .login-brand-mark img {
  width: 92px;
  max-width: 92px;
  filter: drop-shadow(0 5px 11px rgba(0, 18, 35, .18));
}

.login-screen.is-tenant-login .login-brand-mark .login-brand-full {
  display: none;
}

.login-screen.is-tenant-login .login-brand-mark .login-brand-compact {
  display: block;
}

.login-screen.is-tenant-login .login-tenant-brand {
  position: relative;
  z-index: 2;
  width: 100%;
  min-width: 0;
  min-height: 150px;
  grid-column: 1 / 3;
  grid-row: 1;
  padding: 14px 22px;
  border-radius: 22px;
}

.login-screen.is-tenant-login .login-tenant-brand img {
  width: 100%;
  max-width: 350px;
  height: 122px;
  object-fit: contain;
}

.login-screen.is-tenant-login .login-tenant-brand strong {
  font-size: clamp(34px, 4vw, 48px);
}

.login-screen.is-tenant-login .login-showcase {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  column-gap: 18px;
  row-gap: 22px;
  background:
    radial-gradient(circle at 82% 20%, color-mix(in srgb, var(--tenant-accent) 35%, transparent) 0 14%, transparent 15%),
    linear-gradient(145deg, color-mix(in srgb, var(--tenant-primary) 78%, #022b50), var(--tenant-primary));
}

.login-screen.is-tenant-login .login-showcase-copy {
  grid-column: 1 / 3;
  grid-row: 2;
  align-self: center;
  max-width: none;
  margin: 0;
}

.login-screen.is-tenant-login .login-showcase-copy h1 {
  max-width: none;
  font-size: clamp(28px, 2.65vw, 37px);
}

.login-screen.is-tenant-login .login-showcase-copy p {
  max-width: none;
  font-size: 14px;
}

.login-screen.is-tenant-login .login-feature-list {
  grid-column: 2;
  grid-row: 3;
  align-self: center;
}

.login-screen.is-tenant-login .login-showcase-copy small,
.login-screen.is-tenant-login .login-feature-list i {
  color: var(--tenant-accent);
}

.login-screen.is-tenant-login .login-feature-list i {
  background: var(--tenant-accent);
}

.login-screen.is-tenant-login .login-panel-heading small {
  color: var(--tenant-primary);
}

.login-screen.is-tenant-login .login-panel input:focus {
  border-color: var(--tenant-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tenant-primary) 16%, transparent);
}

.login-screen.is-tenant-login .login-submit {
  background: linear-gradient(135deg, var(--tenant-primary), color-mix(in srgb, var(--tenant-primary) 70%, #00c8b5));
}

.login-submit:disabled {
  cursor: not-allowed;
  opacity: .5;
  transform: none !important;
  box-shadow: none !important;
}

.master-portal {
  min-height: 100vh;
  color: #092d4b;
  background:
    radial-gradient(circle at 4% 0%, rgba(0, 192, 192, .11), transparent 25%),
    radial-gradient(circle at 96% 8%, rgba(185, 214, 0, .1), transparent 24%),
    #f4f8fa;
}

.master-topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  height: 84px;
  padding: 0 clamp(22px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #d8e8ed;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 30px rgba(7, 48, 72, .05);
}

.master-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  color: inherit;
  text-decoration: none;
}

.master-brand img {
  width: 116px;
  height: 58px;
  object-fit: contain;
}

.master-brand span,
.master-user > span:not(.master-user-avatar) {
  display: grid;
  gap: 2px;
}

.master-brand small,
.master-user small {
  color: #728998;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .13em;
}

.master-brand strong {
  font-size: 17px;
}

.master-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.master-user-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #006e79;
  background: #e1f7f5;
  font-weight: 950;
  overflow: hidden;
}

.master-user > button {
  margin-left: 8px;
  padding: 10px 14px;
  border: 1px solid #cfe0e6;
  border-radius: 12px;
  color: #456577;
  background: #fff;
  font-weight: 850;
  cursor: pointer;
}

.master-main {
  width: min(1440px, calc(100% - 44px));
  margin: 0 auto;
  padding: 32px 0 60px;
}

.master-hero {
  position: relative;
  min-height: 235px;
  padding: clamp(32px, 5vw, 58px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  overflow: hidden;
  border-radius: 30px;
  color: #fff;
  background: linear-gradient(120deg, #073e6a 0%, #087f9b 55%, #0bb6ac 100%);
  box-shadow: 0 25px 55px rgba(5, 63, 93, .2);
}

.master-hero::before,
.master-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 28px solid rgba(255,255,255,.08);
}

.master-hero::before { width: 250px; height: 250px; right: 10%; top: -150px; }
.master-hero::after { width: 150px; height: 150px; right: -65px; bottom: -80px; }
.master-hero > * { position: relative; z-index: 1; }
.master-hero > div { max-width: 760px; }
.master-hero span,
.master-franchise-section > header span,
.master-franchise-card-copy > small {
  color: #cfe93a;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .16em;
}

.master-hero h1 {
  margin: 10px 0 12px;
  max-width: 690px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.02;
  letter-spacing: -.045em;
}

.master-hero p {
  margin: 0;
  max-width: 650px;
  color: rgba(255,255,255,.79);
  font-size: 15px;
  line-height: 1.65;
}

.master-primary-action,
.master-open-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 15px;
  font-weight: 950;
  cursor: pointer;
}

.master-primary-action {
  min-width: 174px;
  padding: 16px 21px;
  color: #163e1f;
  background: #cfe93a;
  box-shadow: 0 15px 30px rgba(16, 47, 25, .18);
}

.master-primary-action svg,
.master-open-action svg,
.master-secondary-action svg { width: 17px; height: 17px; }

.master-metrics {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.master-metrics article {
  padding: 22px 25px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 3px 15px;
  border: 1px solid #d7e7ec;
  border-radius: 20px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 12px 28px rgba(9, 59, 84, .055);
}

.master-metrics article span { color: #577384; font-size: 12px; font-weight: 850; }
.master-metrics article strong { grid-row: 1 / 3; grid-column: 2; color: #087d8c; font-size: 34px; line-height: 1; }
.master-metrics article small { color: #91a4af; font-size: 11px; }

.master-franchise-section {
  margin-top: 34px;
}

.master-franchise-section > header {
  margin-bottom: 17px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.master-franchise-section > header span { color: #079ba2; }
.master-franchise-section h2 { margin: 5px 0 0; font-size: 26px; letter-spacing: -.035em; }

.master-search {
  width: min(430px, 100%);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #ccdee5;
  border-radius: 15px;
  background: #fff;
}

.master-search svg { width: 18px; height: 18px; color: #78909d; }
.master-search input { width: 100%; min-height: 48px; border: 0; outline: 0; color: #12354e; background: transparent; font-weight: 700; }

.master-franchise-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.master-franchise-card {
  position: relative;
  min-height: 315px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #d6e6eb;
  border-radius: 24px;
  background: linear-gradient(145deg, #fff 45%, color-mix(in srgb, var(--card-primary) 7%, #fff));
  box-shadow: 0 15px 35px rgba(9, 60, 85, .07);
  transition: transform .18s ease, box-shadow .18s ease;
}

.master-franchise-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--card-primary), var(--card-accent));
}

.master-franchise-card:hover { transform: translateY(-3px); box-shadow: 0 20px 45px rgba(9, 60, 85, .12); }
.master-franchise-card.is-inactive { filter: grayscale(.35); opacity: .78; }
.master-franchise-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

.master-franchise-logo {
  width: 74px;
  height: 66px;
  padding: 7px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--card-primary) 24%, #dce7eb);
  border-radius: 18px;
  color: var(--card-primary);
  background: #fff;
}

.master-franchise-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.master-franchise-logo b { font-size: 22px; }

.master-status {
  padding: 7px 10px;
  border-radius: 999px;
  color: #a15454;
  background: #fff0f0;
  font-size: 10px;
  font-weight: 950;
}

.master-status.is-active { color: #087847; background: #e8f8ef; }
.master-franchise-card-copy { margin-top: 22px; }
.master-franchise-card-copy > small { color: var(--card-primary); }
.master-franchise-card-copy h3 { margin: 6px 0 7px; font-size: 21px; letter-spacing: -.025em; }
.master-franchise-card-copy a { color: #4d7184; font-size: 12px; font-weight: 780; text-decoration: none; }
.master-franchise-card-copy a:hover { color: var(--card-primary); text-decoration: underline; }

.master-franchise-card-meta {
  margin-top: 19px;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #e4edf0;
  color: #66808f;
  font-size: 11px;
}

.master-franchise-card-meta strong { color: #123e58; font-size: 17px; }
.master-franchise-card footer { margin-top: auto; padding-top: 19px; display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; }
.master-secondary-action { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #cfe0e5; border-radius: 13px; color: #426579; background: #fff; font-weight: 850; cursor: pointer; }
.master-open-action { padding: 13px 15px; color: #fff; background: linear-gradient(135deg, var(--card-primary), color-mix(in srgb, var(--card-primary) 75%, #00bfae)); }
.master-empty-state { grid-column: 1 / -1; padding: 60px 24px; border: 1px dashed #bfd4dc; border-radius: 22px; color: #6c8795; background: rgba(255,255,255,.7); text-align: center; font-weight: 800; }

.franchise-register-dialog {
  width: min(760px, calc(100% - 26px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 25px;
  box-shadow: 0 30px 90px rgba(3, 37, 58, .3);
}

.franchise-register-form { padding: 0; }
.franchise-register-form > header { padding: 25px 28px; display: flex; justify-content: space-between; align-items: center; color: #fff; background: linear-gradient(120deg, #064f78, #09aaa9); }
.franchise-register-form > header span { color: #d0ec43; font-size: 9px; font-weight: 950; letter-spacing: .15em; }
.franchise-register-form > header h2 { margin: 5px 0 0; font-size: 25px; }
.franchise-register-form > header button { width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.3); border-radius: 12px; color: #fff; background: rgba(255,255,255,.12); font-size: 25px; cursor: pointer; }
.franchise-form-grid { padding: 26px 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.franchise-form-grid > label { display: grid; gap: 8px; color: #274b60; font-size: 11px; font-weight: 900; }
.franchise-form-grid > label > input:not([type="checkbox"]),
.franchise-slug-field { min-height: 48px; border: 1px solid #cbdde3; border-radius: 13px; color: #0d344d; background: #fff; }
.franchise-form-grid > label > input:not([type="checkbox"]):not([type="color"]) { padding: 0 14px; outline: 0; }
.franchise-form-grid input[type="color"] { width: 100%; padding: 5px; cursor: pointer; }
.franchise-form-grid label > small { color: #7d929e; font-size: 10px; font-weight: 650; }
.franchise-form-grid .span-2 { grid-column: 1 / -1; }
.franchise-slug-field { padding-left: 13px; display: flex; align-items: center; overflow: hidden; }
.franchise-slug-field input { min-width: 80px; flex: 1; align-self: stretch; border: 0; outline: 0; color: #0d344d; font-weight: 750; }
.franchise-slug-field b { align-self: stretch; padding: 0 13px; display: flex; align-items: center; color: #5c7684; background: #eef5f6; font-size: 11px; }
.franchise-logo-upload > input { padding: 11px 12px !important; }
.franchise-logo-preview { min-height: 78px; padding: 10px 14px; display: flex; align-items: center; gap: 14px; border: 1px dashed #b9d0d7; border-radius: 14px; background: #f5fafb; }
.franchise-logo-preview img { width: 115px; height: 58px; object-fit: contain; }
.franchise-logo-preview #franchiseLogoFallback { width: 58px; height: 58px; display: block; padding: 0; border-radius: 14px; object-fit: cover; background: transparent; }
.franchise-logo-preview small { color: #81949f; }
.franchise-active-field { padding: 15px; display: flex !important; align-items: center; gap: 12px !important; border: 1px solid #cde5dc; border-radius: 14px; background: #f0fbf6; cursor: pointer; }
.franchise-active-field input { width: 19px; height: 19px; accent-color: #079c65; }
.franchise-active-field span { display: grid; gap: 3px; }
.franchise-active-field small { color: #6e8c80 !important; }
.franchise-register-form > footer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 28px 21px;
  border-top: 1px solid #e0eaed;
  background: #fff;
  box-shadow: 0 -10px 24px rgba(18, 62, 86, .06);
}

.franchise-register-footer-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #768c96;
  font-size: 9px;
  font-weight: 700;
}

.franchise-register-footer-note svg {
  width: 16px;
  height: 16px;
  color: #0a9b99;
}

.franchise-register-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.franchise-register-actions button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 950;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.franchise-register-actions button:hover {
  transform: translateY(-1px);
}

.franchise-register-cancel {
  border: 1px solid #ccdde2;
  background: #f5f9fa;
  color: #4f6d7c;
}

.franchise-register-cancel:hover {
  background: #edf4f5;
}

.franchise-register-save {
  border: 1px solid #087f92;
  background: linear-gradient(135deg, #08779b, #0badaa);
  color: #fff;
  box-shadow: 0 9px 20px rgba(7, 133, 151, .2);
}

.franchise-register-save:hover {
  box-shadow: 0 12px 24px rgba(7, 133, 151, .27);
}

.franchise-register-save svg {
  width: 16px;
  height: 16px;
}

/* Cadastro de clínica — padrão Tec Dent */
.clinic-register-dialog {
  width: min(780px, calc(100vw - 28px));
  max-height: calc(100vh - 30px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 25px;
  background: #f7fbfc;
  color: #103b52;
  box-shadow: 0 32px 90px rgba(3, 35, 52, .34);
}

.clinic-register-dialog::backdrop {
  background: rgba(4, 27, 40, .62);
  backdrop-filter: blur(5px);
}

.clinic-register-form {
  margin: 0;
  background: #f7fbfc;
}

.clinic-register-header {
  position: relative;
  min-height: 116px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 23px 28px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 91% 0%, rgba(190, 220, 29, .18), transparent 35%),
    linear-gradient(122deg, #053958 0%, #076f83 58%, #0ba9a7 100%);
}

.clinic-register-header::after {
  content: "";
  position: absolute;
  right: 66px;
  bottom: -68px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(255, 255, 255, .035), 0 0 0 58px rgba(255, 255, 255, .025);
  pointer-events: none;
}

.clinic-register-heading {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.clinic-register-heading-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 17px;
  background: rgba(255, 255, 255, .13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
}

.clinic-register-heading-icon svg {
  width: 27px;
  height: 27px;
}

.clinic-register-heading small {
  display: block;
  margin-bottom: 4px;
  color: #d4eb45;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .15em;
}

.clinic-register-heading h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(22px, 2.6vw, 27px);
  font-weight: 950;
  letter-spacing: -.025em;
}

.clinic-register-heading p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, .76);
  font-size: 11px;
  font-weight: 650;
}

.clinic-register-close {
  position: relative;
  z-index: 2;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 12px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

.clinic-register-close:hover {
  background: rgba(255, 255, 255, .22);
  transform: translateY(-1px);
}

.clinic-register-close svg {
  width: 17px;
  height: 17px;
}

.clinic-register-body {
  padding: 22px 28px 28px;
}

.clinic-register-context {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 14px;
  border: 1px solid #c7e4e2;
  border-radius: 16px;
  background: linear-gradient(105deg, #effaf8, #f8fcf8);
  box-shadow: 0 8px 22px rgba(11, 116, 123, .06);
}

.clinic-register-context-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, #087892, #0fb1a8);
  color: #fff;
  box-shadow: 0 7px 16px rgba(8, 126, 145, .2);
}

.clinic-register-context-icon svg {
  width: 21px;
  height: 21px;
}

.clinic-register-context > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.clinic-register-context small {
  color: #6c8a93;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .12em;
}

.clinic-register-context strong {
  overflow: hidden;
  color: #0c5369;
  font-size: 14px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clinic-register-context em {
  margin-left: auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: #e0f4e8;
  color: #0a805f;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.clinic-register-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 15px;
}

.clinic-register-section-heading span {
  display: block;
  margin-bottom: 3px;
  color: #0a9b96;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .13em;
}

.clinic-register-section-heading h3 {
  margin: 0;
  color: #123e56;
  font-size: 18px;
  font-weight: 950;
}

.clinic-register-section-heading > small {
  color: #80939c;
  font-size: 9px;
  font-weight: 700;
}

.clinic-register-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px 18px;
}

.clinic-register-grid > label {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 7px;
  color: #284d60;
  font-size: 10px;
  font-weight: 900;
}

.clinic-register-grid > label > span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.clinic-register-grid > label b {
  color: #0aa59e;
}

.clinic-register-grid input {
  width: 100%;
  min-width: 0;
  min-height: 49px;
  box-sizing: border-box;
  padding: 0 14px;
  border: 1px solid #cbdde3;
  border-radius: 13px;
  outline: 0;
  background: #fff;
  color: #113b52;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.clinic-register-grid input::placeholder {
  color: #9aabb2;
  font-weight: 600;
}

.clinic-register-grid input:hover {
  border-color: #a9cbd2;
}

.clinic-register-grid input:focus {
  border-color: #0ba7a4;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(11, 167, 164, .11);
}

.clinic-register-grid input:invalid:not(:placeholder-shown) {
  border-color: #dc8585;
}

.clinic-register-grid .clinic-register-span-2 {
  grid-column: 1 / -1;
}

.clinic-register-grid label > small {
  color: #84969e;
  font-size: 8px;
  font-weight: 650;
  line-height: 1.4;
}

.clinic-register-footer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 28px 21px;
  border-top: 1px solid #e0ebee;
  background: #fff;
  box-shadow: 0 -10px 24px rgba(18, 62, 86, .06);
}

.clinic-register-footer-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #768c96;
  font-size: 9px;
  font-weight: 700;
}

.clinic-register-footer-note svg {
  width: 16px;
  height: 16px;
  color: #0a9b99;
}

.clinic-register-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.clinic-register-actions button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 950;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.clinic-register-actions button:hover {
  transform: translateY(-1px);
}

.clinic-register-cancel {
  border: 1px solid #ccdde2;
  background: #f5f9fa;
  color: #4f6d7c;
}

.clinic-register-cancel:hover {
  background: #edf4f5;
}

.clinic-register-save {
  border: 1px solid #087f92;
  background: linear-gradient(135deg, #08779b, #0badaa);
  color: #fff;
  box-shadow: 0 9px 20px rgba(7, 133, 151, .2);
}

.clinic-register-save:hover {
  box-shadow: 0 12px 24px rgba(7, 133, 151, .27);
}

.clinic-register-save svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 640px) {
  .clinic-register-dialog {
    width: calc(100vw - 18px);
    max-height: calc(100vh - 18px);
    border-radius: 20px;
  }

  .clinic-register-header {
    min-height: 104px;
    padding: 19px 18px;
  }

  .clinic-register-heading-icon {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    border-radius: 14px;
  }

  .clinic-register-heading p {
    display: none;
  }

  .clinic-register-body {
    padding: 18px;
  }

  .clinic-register-context em,
  .clinic-register-section-heading > small,
  .clinic-register-footer-note {
    display: none;
  }

  .clinic-register-grid {
    grid-template-columns: 1fr;
  }

  .clinic-register-grid .clinic-register-span-2 {
    grid-column: auto;
  }

  .clinic-register-footer {
    padding: 14px 18px 18px;
  }

  .clinic-register-actions {
    width: 100%;
  }

  .clinic-register-actions button {
    flex: 1;
    padding-inline: 12px;
  }
}

.franchise-portal .portal-hero {
  background: linear-gradient(115deg, color-mix(in srgb, var(--tenant-primary) 75%, #073d69), var(--tenant-primary), color-mix(in srgb, var(--tenant-primary) 65%, #0bbdab));
}

.franchise-portal .register-clinic-button,
.franchise-portal .clinic-enter-button,
.franchise-portal .quick-access button {
  background: linear-gradient(135deg, var(--tenant-primary), color-mix(in srgb, var(--tenant-primary) 72%, #00bea8));
}

.franchise-portal .portal-hero-highlight small,
.franchise-portal .portal-hero > div > span {
  color: var(--tenant-accent);
}

.franchise-portal .clinic-bubble::before {
  background: linear-gradient(90deg, var(--tenant-primary), var(--tenant-accent));
}

.franchise-portal .clinic-bubble.is-inactive {
  border-color: #d7e0e3;
  background: linear-gradient(145deg, #f4f7f8, #edf2f3);
  box-shadow: 0 10px 24px rgba(36, 62, 70, .07);
}

.franchise-portal .clinic-bubble.is-inactive::before {
  background: linear-gradient(90deg, #93a5aa, #c2cdd0);
}

.franchise-portal .clinic-bubble.is-inactive .clinic-bubble-mark,
.franchise-portal .clinic-bubble.is-inactive .clinic-bubble-main {
  filter: grayscale(.75);
  opacity: .72;
}

.clinic-bubble-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #e1ecee;
}

.clinic-bubble-admin-actions button {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.clinic-bubble-admin-actions button:hover {
  transform: translateY(-1px);
}

.clinic-status-action {
  border: 1px solid #f1c27b;
  color: #9a5700;
  background: #fff5e5;
}

.clinic-backup-action {
  border: 1px solid #9dd8d7;
  color: #08727a;
  background: #eaf9f9;
}

.clinic-backup-action:hover {
  box-shadow: 0 7px 16px rgba(8, 127, 134, .14);
  background: #ddf5f4;
}

.clinic-status-action.is-reactivate {
  border-color: #9ddbc4;
  color: #08784e;
  background: #eaf9f2;
}

.clinic-delete-action {
  border: 1px solid #f1b5ba;
  color: #bb2f3b;
  background: #fff0f1;
}

.clinic-bubble-status.is-inactive {
  color: #667a80;
  background: #e3eaec;
}

.clinic-bubble-status.is-inactive::before {
  background: #8b9ba0;
}

.franchise-portal .clinic-enter-button:disabled {
  color: #718187;
  background: #dfe6e8;
  box-shadow: none;
  cursor: not-allowed;
}

@media (max-width: 1050px) {
  .master-franchise-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .master-topbar { height: auto; min-height: 74px; padding: 10px 16px; }
  .master-brand img { width: 90px; }
  .master-brand span, .master-user > span:not(.master-user-avatar) { display: none; }
  .master-user-avatar { width: 38px; height: 38px; }
  .master-main { width: min(100% - 24px, 640px); padding-top: 18px; }
  .master-hero { min-height: 0; padding: 28px 24px; align-items: flex-start; flex-direction: column; border-radius: 23px; }
  .master-hero h1 { font-size: 32px; }
  .master-primary-action { width: 100%; }
  .master-metrics { grid-template-columns: 1fr; }
  .master-franchise-section > header { align-items: stretch; flex-direction: column; }
  .master-search { width: 100%; }
  .master-franchise-grid { grid-template-columns: 1fr; }
  .franchise-form-grid { padding: 22px 18px; grid-template-columns: 1fr; }
  .franchise-form-grid .span-2 { grid-column: auto; }
  .franchise-register-form > header, .franchise-register-form > footer { padding-left: 18px; padding-right: 18px; }
  .franchise-register-footer-note { display: none; }
  .franchise-register-actions { width: 100%; }
  .franchise-register-actions button { flex: 1; padding-inline: 12px; }
  .franchise-slug-field b { padding: 0 8px; font-size: 9px; }
  .login-brand-stack { gap: 10px; }
  .login-tenant-brand { min-width: 130px; min-height: 64px; }
  .login-tenant-brand img { max-width: 155px; height: 48px; }
  .login-screen.is-tenant-login .login-tenant-brand {
    min-height: 112px;
    padding: 12px;
  }
  .login-screen.is-tenant-login .login-tenant-brand img {
    max-width: 260px;
    height: 88px;
  }
  .login-screen.is-tenant-login .login-brand-mark {
    width: 98px;
    padding: 7px 9px;
  }
  .login-screen.is-tenant-login .login-brand-mark img {
    width: 74px;
    max-width: 74px;
  }
  .login-screen.is-tenant-login .login-showcase {
    grid-template-columns: 98px minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 14px;
  }
  .login-screen.is-tenant-login .login-showcase-copy {
    align-self: center;
  }
  .login-screen.is-tenant-login .login-showcase-copy h1 {
    font-size: clamp(25px, 8vw, 31px);
  }
  .login-screen.is-tenant-login .login-showcase-copy p {
    font-size: 12px;
  }
  .login-screen.is-tenant-login .login-feature-list {
    display: grid;
    gap: 8px;
  }
  .login-screen.is-tenant-login .login-feature-list span {
    gap: 7px;
    font-size: 10px;
  }
}
:root.app-booting {
  background: #f3fbfa;
}

:root.app-booting .login-screen {
  display: none !important;
}

/* Pagamentos do orçamento — identidade Tec Dent */
[data-view-panel="OrcamentoPagamentos"] {
  --if-pay-navy: #074d78;
  --if-pay-blue: #087eaa;
  --if-pay-cyan: #12b7b6;
  --if-pay-mint: #e9f8f5;
  --if-pay-green: #0aa66f;
  --if-pay-ink: #07334d;
  --if-pay-muted: #647d8b;
  padding-top: 16px;
}

[data-view-panel="OrcamentoPagamentos"] .payment-page-header.payment-if-hero {
  position: relative;
  min-height: 146px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 20px;
  padding: 28px 30px;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  background: linear-gradient(120deg, #064b77 0%, #087eaa 52%, #12b7b6 100%);
  color: #fff;
  box-shadow: 0 18px 42px rgba(4, 72, 105, .2);
}

[data-view-panel="OrcamentoPagamentos"] .payment-if-hero::before,
[data-view-panel="OrcamentoPagamentos"] .payment-if-hero::after {
  content: "";
  position: absolute;
  border: 24px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  pointer-events: none;
}

[data-view-panel="OrcamentoPagamentos"] .payment-if-hero::before {
  width: 190px;
  height: 190px;
  top: -105px;
  right: 13%;
}

[data-view-panel="OrcamentoPagamentos"] .payment-if-hero::after {
  width: 115px;
  height: 115px;
  right: -42px;
  bottom: -72px;
}

[data-view-panel="OrcamentoPagamentos"] .payment-if-hero-copy,
[data-view-panel="OrcamentoPagamentos"] .payment-top-actions {
  position: relative;
  z-index: 1;
}

[data-view-panel="OrcamentoPagamentos"] .payment-if-hero-copy {
  display: flex;
  align-items: center;
  gap: 18px;
}

[data-view-panel="OrcamentoPagamentos"] .payment-if-hero-icon {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 19px;
  background: rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28);
  backdrop-filter: blur(8px);
}

[data-view-panel="OrcamentoPagamentos"] .payment-if-hero-icon svg {
  width: 31px;
  height: 31px;
}

[data-view-panel="OrcamentoPagamentos"] .payment-if-hero-copy small {
  display: block;
  margin-bottom: 4px;
  color: #c8ffef;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
}

[data-view-panel="OrcamentoPagamentos"] .payment-if-hero .patients-title {
  margin: 0;
  color: #fff;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.08;
}

[data-view-panel="OrcamentoPagamentos"] .payment-if-hero-copy p {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, .78);
  font-size: 13px;
  font-weight: 700;
}

[data-view-panel="OrcamentoPagamentos"] .payment-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

[data-view-panel="OrcamentoPagamentos"] .payment-top-actions button,
[data-view-panel="OrcamentoPagamentos"] .payment-section-header button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 900;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

[data-view-panel="OrcamentoPagamentos"] .payment-top-actions button svg,
[data-view-panel="OrcamentoPagamentos"] .payment-section-header button svg {
  width: 17px;
  height: 17px;
}

[data-view-panel="OrcamentoPagamentos"] .payment-top-actions .budget-light-action {
  border: 1px solid rgba(255, 255, 255, .36);
  background: rgba(255, 255, 255, .14);
  color: #fff;
  box-shadow: none;
  backdrop-filter: blur(7px);
}

[data-view-panel="OrcamentoPagamentos"] .payment-top-actions .budget-primary-action {
  border: 1px solid #fff;
  background: #fff;
  color: #086c92;
  box-shadow: 0 10px 24px rgba(2, 52, 79, .2);
}

[data-view-panel="OrcamentoPagamentos"] .payment-top-actions button:hover,
[data-view-panel="OrcamentoPagamentos"] .payment-section-header button:hover {
  transform: translateY(-2px);
}

[data-view-panel="OrcamentoPagamentos"] .budget-payment-shell {
  padding: 20px;
  border: 1px solid #d8ebee;
  border-radius: 24px;
  background: linear-gradient(180deg, #f5fbfb 0%, #eff7f8 100%);
  box-shadow: 0 16px 45px rgba(14, 68, 83, .08);
}

[data-view-panel="OrcamentoPagamentos"] .payment-summary-inline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 18px;
}

[data-view-panel="OrcamentoPagamentos"] .payment-summary-inline article {
  position: relative;
  min-height: 116px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  justify-content: initial;
  gap: 15px;
  padding: 19px 20px;
  overflow: hidden;
  border: 1px solid #d9e9ed;
  border-radius: 18px;
  background: #fff;
  color: var(--if-pay-ink);
  box-shadow: 0 9px 24px rgba(21, 76, 91, .07);
}

[data-view-panel="OrcamentoPagamentos"] .payment-summary-inline article::after {
  content: "";
  position: absolute;
  width: 70px;
  height: 70px;
  right: -38px;
  bottom: -38px;
  border: 14px solid #ecf8f7;
  border-radius: 999px;
}

[data-view-panel="OrcamentoPagamentos"] .payment-summary-inline article:nth-child(2) {
  border-color: #c9ebdf;
}

[data-view-panel="OrcamentoPagamentos"] .payment-summary-inline article.is-balance {
  border-color: #f2dcc7;
  background: linear-gradient(145deg, #fff 0%, #fffaf5 100%);
}

[data-view-panel="OrcamentoPagamentos"] .payment-summary-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #e8f5f7;
  color: #087eaa;
}

[data-view-panel="OrcamentoPagamentos"] .payment-summary-inline article:nth-child(2) .payment-summary-icon {
  background: #e4f7ef;
  color: #0a9a68;
}

[data-view-panel="OrcamentoPagamentos"] .payment-summary-inline .is-balance .payment-summary-icon {
  background: #fff0e0;
  color: #e07b18;
}

[data-view-panel="OrcamentoPagamentos"] .payment-summary-icon svg {
  width: 23px;
  height: 23px;
}

[data-view-panel="OrcamentoPagamentos"] .payment-summary-inline article > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

[data-view-panel="OrcamentoPagamentos"] .payment-summary-inline article > div > span {
  color: #5f7682;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

[data-view-panel="OrcamentoPagamentos"] .payment-summary-inline strong,
[data-view-panel="OrcamentoPagamentos"] .payment-summary-inline .is-balance strong {
  color: var(--if-pay-ink);
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.1;
}

[data-view-panel="OrcamentoPagamentos"] .payment-summary-inline article:nth-child(2) strong {
  color: #07875d;
}

[data-view-panel="OrcamentoPagamentos"] .payment-summary-inline .is-balance strong {
  color: #cf6410;
}

[data-view-panel="OrcamentoPagamentos"] .payment-summary-inline article small {
  color: #91a3aa;
  font-size: 10px;
  font-weight: 700;
}

[data-view-panel="OrcamentoPagamentos"] .payment-launch-card,
[data-view-panel="OrcamentoPagamentos"] .payment-ledger-section,
[data-view-panel="OrcamentoPagamentos"] .payment-specialty-section {
  overflow: hidden;
  border: 1px solid #d7e8eb;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(17, 70, 84, .06);
}

[data-view-panel="OrcamentoPagamentos"] .payment-launch-card {
  padding: 0;
}

[data-view-panel="OrcamentoPagamentos"] .payment-launch-heading,
[data-view-panel="OrcamentoPagamentos"] .payment-section-header {
  min-height: 83px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0;
  padding: 18px 22px;
  border-bottom: 1px solid #e4eef0;
  background: linear-gradient(90deg, #f8fcfc 0%, #eef9f7 100%);
}

[data-view-panel="OrcamentoPagamentos"] .payment-section-title {
  display: flex;
  align-items: center;
  gap: 13px;
}

[data-view-panel="OrcamentoPagamentos"] .payment-section-title > span {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, #087da8, #12b4b4);
  color: #fff;
  box-shadow: 0 8px 18px rgba(5, 133, 157, .2);
}

[data-view-panel="OrcamentoPagamentos"] .payment-section-title > span svg {
  width: 20px;
  height: 20px;
}

[data-view-panel="OrcamentoPagamentos"] .payment-section-title small {
  display: block;
  margin-bottom: 1px;
  color: #0aa687;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .13em;
}

[data-view-panel="OrcamentoPagamentos"] .payment-section-title h3,
[data-view-panel="OrcamentoPagamentos"] .payment-section-header h3,
[data-view-panel="OrcamentoPagamentos"] .payment-specialty-section h3 {
  margin: 0;
  color: var(--if-pay-ink);
  font-size: 18px;
  font-weight: 900;
}

[data-view-panel="OrcamentoPagamentos"] .payment-section-title p {
  margin: 3px 0 0;
  color: #748b96;
  font-size: 11px;
  font-weight: 700;
}

[data-view-panel="OrcamentoPagamentos"] .payment-safe-badge {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid #bfe5d8;
  border-radius: 999px;
  background: #e9f8f2;
  color: #087a57;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

[data-view-panel="OrcamentoPagamentos"] .payment-safe-badge svg {
  width: 12px;
  height: 12px;
}

[data-view-panel="OrcamentoPagamentos"] .payment-form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 17px 15px;
  margin: 0;
  padding: 23px 22px 20px;
}

[data-view-panel="OrcamentoPagamentos"] .payment-form-grid > label {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
}

[data-view-panel="OrcamentoPagamentos"] .payment-form-grid > label > span {
  color: #34586a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .05em;
  text-align: left;
  text-transform: uppercase;
}

[data-view-panel="OrcamentoPagamentos"] .payment-form-grid input,
[data-view-panel="OrcamentoPagamentos"] .payment-form-grid select {
  width: 100%;
  height: 46px;
  border: 1px solid #cadde2;
  border-radius: 12px;
  outline: 0;
  background: #fbfdfd;
  color: #123e54;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 700;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

[data-view-panel="OrcamentoPagamentos"] .payment-form-grid input:focus,
[data-view-panel="OrcamentoPagamentos"] .payment-form-grid select:focus {
  border-color: #19aeb3;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(18, 183, 182, .11);
}

[data-view-panel="OrcamentoPagamentos"] .payment-form-grid .payment-amount-field { grid-column: span 3; }
[data-view-panel="OrcamentoPagamentos"] .payment-form-grid .payment-method-field { grid-column: span 3; }
[data-view-panel="OrcamentoPagamentos"] .payment-form-grid .payment-installments-field { grid-column: span 2; }
[data-view-panel="OrcamentoPagamentos"] .payment-form-grid > label:nth-of-type(4) { grid-column: span 4; }
[data-view-panel="OrcamentoPagamentos"] .payment-form-grid .payment-specialty-field,
[data-view-panel="OrcamentoPagamentos"] .payment-form-grid .payment-note-field { grid-column: span 6; }

[data-view-panel="OrcamentoPagamentos"] .payment-specialty-available {
  grid-column: auto;
  min-height: 16px;
  margin: 0;
  color: #0b8f68;
  font-size: 10px;
  font-weight: 800;
}

[data-view-panel="OrcamentoPagamentos"] .payment-specialty-available.is-empty {
  color: #c94b43;
}

[data-view-panel="OrcamentoPagamentos"] .payment-form-grid .payment-check-field {
  grid-column: span 6;
  min-height: 66px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #d7e7ea;
  border-radius: 14px;
  background: #f7fbfb;
  cursor: pointer;
}

[data-view-panel="OrcamentoPagamentos"] .payment-form-grid .payment-check-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  justify-self: auto;
  margin: 0;
  padding: 0;
  accent-color: #0ca69c;
}

[data-view-panel="OrcamentoPagamentos"] .payment-check-field > span {
  display: grid;
  gap: 3px;
  text-align: left;
  text-transform: none;
}

[data-view-panel="OrcamentoPagamentos"] .payment-check-field > span strong {
  color: #17475d;
  font-size: 11px;
  font-weight: 900;
}

[data-view-panel="OrcamentoPagamentos"] .payment-check-field > span small {
  color: #78909a;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

[data-view-panel="OrcamentoPagamentos"] .payment-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 0;
  padding: 17px 22px;
  border-top: 1px solid #e4eef0;
  background: #f8fbfb;
}

[data-view-panel="OrcamentoPagamentos"] .payment-action-row > div {
  display: flex;
  gap: 8px;
}

[data-view-panel="OrcamentoPagamentos"] .payment-action-row button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}

[data-view-panel="OrcamentoPagamentos"] .payment-action-row button svg {
  width: 16px;
  height: 16px;
}

[data-view-panel="OrcamentoPagamentos"] .payment-action-row .danger-action {
  border: 1px solid #efc5c5;
  background: #fff2f2;
  color: #c33c3c;
}

[data-view-panel="OrcamentoPagamentos"] .payment-action-row .green-action {
  border: 1px solid #b9e2d2;
  background: #eaf8f2;
  color: #087b58;
}

[data-view-panel="OrcamentoPagamentos"] .payment-action-row .save-action {
  border: 1px solid #078db0;
  background: linear-gradient(135deg, #087aa6, #12b5b4);
  color: #fff;
  box-shadow: 0 9px 22px rgba(6, 137, 163, .22);
}

[data-view-panel="OrcamentoPagamentos"] .payment-action-row button:hover {
  transform: translateY(-1px);
}

[data-view-panel="OrcamentoPagamentos"] .payment-ledger-section,
[data-view-panel="OrcamentoPagamentos"] .payment-specialty-section {
  margin-top: 18px;
  padding: 0 0 18px;
  border-top: 1px solid #d7e8eb;
}

[data-view-panel="OrcamentoPagamentos"] .payment-section-header .budget-primary-action {
  border: 1px solid #c8e6e4;
  background: #fff;
  color: #087e92;
  box-shadow: 0 7px 17px rgba(23, 81, 93, .08);
}

[data-view-panel="OrcamentoPagamentos"] .payment-ledger-list {
  gap: 10px;
  padding: 16px 18px 0;
}

[data-view-panel="OrcamentoPagamentos"] .payment-ledger-card {
  min-height: 78px;
  padding: 13px 14px;
  border: 1px solid #dce9ec;
  border-left: 4px solid #11a982;
  border-radius: 14px;
  background: #fbfdfd;
  box-shadow: 0 5px 15px rgba(15, 67, 78, .04);
}

[data-view-panel="OrcamentoPagamentos"] .payment-ledger-card:nth-child(even) {
  background: #f4faf9;
}

[data-view-panel="OrcamentoPagamentos"] .payment-ledger-card span {
  color: #81949c;
  font-size: 9px;
  letter-spacing: .04em;
}

[data-view-panel="OrcamentoPagamentos"] .payment-ledger-card strong {
  color: #173f51;
}

[data-view-panel="OrcamentoPagamentos"] .payment-ledger-main strong {
  color: var(--if-pay-ink);
  font-size: 14px;
}

[data-view-panel="OrcamentoPagamentos"] .payment-ledger-main span,
[data-view-panel="OrcamentoPagamentos"] .payment-ledger-card .payment-value-cell {
  color: #07855f;
}

[data-view-panel="OrcamentoPagamentos"] .payment-ledger-actions .budget-add-delete {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #f0c9c9;
  border-radius: 11px;
  background: #fff3f3;
  color: #c83f3f;
}

[data-view-panel="OrcamentoPagamentos"] .payment-ledger-actions .budget-add-delete svg {
  width: 17px;
  height: 17px;
}

[data-view-panel="OrcamentoPagamentos"] .payment-specialty-grid {
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 16px 18px 0;
}

[data-view-panel="OrcamentoPagamentos"] .payment-specialty-card {
  overflow: hidden;
  border: 1px solid #d5e8e5;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(17, 75, 86, .06);
}

[data-view-panel="OrcamentoPagamentos"] .payment-specialty-card h4 {
  margin: 0 0 13px;
  padding: 15px 16px;
  background: linear-gradient(115deg, #075d82, #0aa6a5);
  color: #fff;
  font-size: 11px;
  letter-spacing: .06em;
}

[data-view-panel="OrcamentoPagamentos"] .payment-specialty-card p {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 7px 15px;
  border-bottom: 1px solid #eef3f4;
  color: #496672;
  font-size: 10px;
  font-weight: 800;
}

[data-view-panel="OrcamentoPagamentos"] .payment-specialty-card p strong {
  color: #173f51;
}

[data-view-panel="OrcamentoPagamentos"] .payment-specialty-card .payment-specialty-balance {
  margin: 0;
  padding: 12px 15px;
  border: 0;
  background: #e6f7ef;
  color: #087d59;
  font-size: 11px;
  font-weight: 900;
}

[data-view-panel="OrcamentoPagamentos"] .payment-empty-alert {
  width: auto;
  min-height: 64px;
  margin: 0;
  padding: 0 17px;
  border: 1px dashed #b8dce2;
  border-radius: 13px;
  background: #f0fafb;
  color: #39758b;
  font-size: 11px;
  font-weight: 800;
}

[data-view-panel="OrcamentoPagamentos"] .payment-ledger-list > .payment-empty-alert,
[data-view-panel="OrcamentoPagamentos"] .payment-specialty-grid > .payment-empty-alert {
  grid-column: 1 / -1;
}

[data-view-panel="OrcamentoPagamentos"] .budget-payment-shell .success-alert {
  margin: 0 0 18px;
  padding: 18px 20px;
  border: 1px solid #aaddc8;
  border-left: 5px solid #0aa66f;
  border-radius: 15px;
  background: #eaf9f2;
  color: #087450;
}

@media (max-width: 1080px) {
  [data-view-panel="OrcamentoPagamentos"] .payment-form-grid .payment-amount-field,
  [data-view-panel="OrcamentoPagamentos"] .payment-form-grid .payment-method-field,
  [data-view-panel="OrcamentoPagamentos"] .payment-form-grid .payment-installments-field,
  [data-view-panel="OrcamentoPagamentos"] .payment-form-grid > label:nth-of-type(4),
  [data-view-panel="OrcamentoPagamentos"] .payment-form-grid .payment-specialty-field,
  [data-view-panel="OrcamentoPagamentos"] .payment-form-grid .payment-note-field {
    grid-column: span 6;
  }
}

@media (max-width: 800px) {
  [data-view-panel="OrcamentoPagamentos"] {
    padding-top: 8px;
  }

  [data-view-panel="OrcamentoPagamentos"] .payment-page-header.payment-if-hero {
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
    padding: 23px 20px;
    border-radius: 20px;
  }

  [data-view-panel="OrcamentoPagamentos"] .payment-top-actions,
  [data-view-panel="OrcamentoPagamentos"] .payment-top-actions button {
    width: 100%;
  }

  [data-view-panel="OrcamentoPagamentos"] .payment-summary-inline {
    grid-template-columns: 1fr;
  }

  [data-view-panel="OrcamentoPagamentos"] .budget-payment-shell {
    padding: 12px;
    border-radius: 19px;
  }

  [data-view-panel="OrcamentoPagamentos"] .payment-launch-heading,
  [data-view-panel="OrcamentoPagamentos"] .payment-section-header,
  [data-view-panel="OrcamentoPagamentos"] .payment-action-row {
    align-items: stretch;
    flex-direction: column;
  }

  [data-view-panel="OrcamentoPagamentos"] .payment-safe-badge {
    align-self: flex-start;
  }

  [data-view-panel="OrcamentoPagamentos"] .payment-form-grid {
    grid-template-columns: 1fr;
    padding: 20px 16px;
  }

  [data-view-panel="OrcamentoPagamentos"] .payment-form-grid .payment-amount-field,
  [data-view-panel="OrcamentoPagamentos"] .payment-form-grid .payment-method-field,
  [data-view-panel="OrcamentoPagamentos"] .payment-form-grid .payment-installments-field,
  [data-view-panel="OrcamentoPagamentos"] .payment-form-grid > label:nth-of-type(4),
  [data-view-panel="OrcamentoPagamentos"] .payment-form-grid .payment-specialty-field,
  [data-view-panel="OrcamentoPagamentos"] .payment-form-grid .payment-note-field,
  [data-view-panel="OrcamentoPagamentos"] .payment-form-grid .payment-check-field {
    grid-column: 1;
  }

  [data-view-panel="OrcamentoPagamentos"] .payment-action-row > div,
  [data-view-panel="OrcamentoPagamentos"] .payment-action-row button,
  [data-view-panel="OrcamentoPagamentos"] .payment-section-header button {
    width: 100%;
  }

  [data-view-panel="OrcamentoPagamentos"] .payment-action-row > div {
    flex-direction: column;
  }
}

/* Conferência e fechamento diário — identidade Tec Dent */
[data-view-panel="DiaFechamentoConfirmacao"] {
  --if-close-navy: #074d78;
  --if-close-blue: #087ea9;
  --if-close-cyan: #12b7b5;
  --if-close-green: #0a9e70;
  --if-close-ink: #07334d;
  padding-top: 14px;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-page {
  min-height: 100vh;
  padding: 0 0 48px;
  background: transparent;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-content {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-card {
  overflow: hidden;
  border: 1px solid #d5e8eb;
  border-radius: 25px;
  background: linear-gradient(180deg, #f5fbfb 0%, #eff7f8 100%);
  box-shadow: 0 18px 48px rgba(10, 66, 82, .1);
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-header {
  position: relative;
  min-height: 148px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 27px 30px;
  overflow: hidden;
  background: linear-gradient(120deg, #064b77 0%, #087eaa 54%, #12b7b6 100%);
  color: #fff;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-header::before,
[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-header::after {
  content: "";
  position: absolute;
  border: 25px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  pointer-events: none;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-header::before {
  width: 190px;
  height: 190px;
  top: -104px;
  right: 15%;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-header::after {
  width: 108px;
  height: 108px;
  right: -40px;
  bottom: -70px;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-hero-copy,
[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-back-button {
  position: relative;
  z-index: 1;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-hero-copy {
  display: flex;
  align-items: center;
  gap: 18px;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-hero-copy > div {
  display: block;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-hero-icon {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 19px;
  background: rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
  backdrop-filter: blur(8px);
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-hero-icon svg {
  width: 31px;
  height: 31px;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-hero-copy small {
  display: block;
  margin-bottom: 3px;
  color: #c8ffef;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-hero-copy h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(25px, 3vw, 33px);
  line-height: 1.08;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-hero-copy strong {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: rgba(255, 255, 255, .82);
  font-size: 12px;
  font-weight: 800;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-hero-copy strong svg {
  width: 15px;
  height: 15px;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-hero-copy strong b {
  color: #fff;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-back-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 13px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  box-shadow: none;
  backdrop-filter: blur(7px);
  transition: transform .18s ease, background .18s ease;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-back-button svg {
  width: 16px;
  height: 16px;
  transform: rotate(180deg);
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-back-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, .22);
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-money-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin: 20px 20px 14px;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-money-summary article {
  position: relative;
  min-height: 112px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 17px 18px;
  overflow: hidden;
  border: 1px solid #d8e9ec;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(16, 71, 84, .06);
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-money-summary article::after {
  content: "";
  position: absolute;
  width: 64px;
  height: 64px;
  right: -35px;
  bottom: -35px;
  border: 13px solid #edf8f7;
  border-radius: 999px;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-money-summary article:nth-child(2) {
  border-color: #c9e9dd;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-money-summary article:nth-child(3) {
  border-color: #cbe8ec;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-money-summary article:nth-child(4) {
  border-color: #f0d5d2;
  background: linear-gradient(145deg, #fff 0%, #fff8f7 100%);
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-summary-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #e7f3f7;
  color: #087ca6;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-money-summary article:nth-child(2) .daily-closing-summary-icon {
  background: #e2f6ed;
  color: #099766;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-money-summary article:nth-child(3) .daily-closing-summary-icon {
  background: #e4f6f6;
  color: #0c9e9f;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-money-summary article:nth-child(4) .daily-closing-summary-icon {
  background: #ffebea;
  color: #d84a44;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-summary-icon svg {
  width: 22px;
  height: 22px;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-money-summary article > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-money-summary article > div > span {
  color: #607985;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-money-summary strong,
[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-money-summary .is-negative strong {
  color: var(--if-close-ink);
  font-size: clamp(18px, 1.8vw, 23px);
  line-height: 1.1;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-money-summary article:nth-child(2) strong {
  color: #07855e;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-money-summary article:nth-child(4) strong,
[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-money-summary article:nth-child(4) > div > span,
[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-money-summary .is-negative span,
[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-money-summary .is-negative strong {
  color: #cc4039;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-money-summary article small {
  color: #91a4ab;
  font-size: 9px;
  font-weight: 700;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-cash-hint {
  margin: 0 20px 4px;
  padding: 15px 17px;
  border: 1px solid #c8e5dc;
  border-radius: 15px;
  background: #ebf8f3;
  color: #087a58;
  font-size: 11px;
  font-weight: 900;
  box-shadow: none;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-cash-hint.is-negative {
  border-color: #efcfcc;
  background: #fff4f3;
  color: #c53c36;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-cash-hint.has-specialty-grid,
[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-cash-hint.has-specialty-grid.is-negative {
  padding: 17px;
  border-color: #d7e8eb;
  background: #f8fcfc;
  color: var(--if-close-ink);
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-cash-specialty-title {
  margin-bottom: 11px;
  color: #0a8d83;
  font-size: 9px;
  letter-spacing: .1em;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-cash-specialty-grid {
  gap: 10px;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-cash-specialty-card {
  gap: 8px;
  padding: 13px 14px;
  border: 1px solid #d9e8eb;
  border-left: 4px solid #0da28a;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(17, 71, 83, .04);
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-cash-specialty-card strong {
  color: var(--if-close-ink);
  font-size: 12px;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-cash-specialty-card span {
  color: #6d838e;
  font-size: 10px;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-cash-specialty-card b {
  color: #087f5b;
  font-size: 11px;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-cash-specialty-card.is-negative {
  border-color: #efcfcc;
  border-left-color: #db514a;
  background: #fff9f8;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-list {
  gap: 16px;
  padding: 18px 20px 0;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-professional-card {
  overflow: hidden;
  border: 1px solid #d7e7ea;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(13, 66, 80, .07);
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-professional-card > header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px;
  border: 0;
  border-bottom: 1px solid #dcebed;
  background: linear-gradient(90deg, #f8fcfc 0%, #eef9f7 100%);
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-professional-identity {
  display: flex;
  align-items: center;
  gap: 13px;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-professional-identity > span {
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, #087da8, #12b4b4);
  color: #fff;
  box-shadow: 0 8px 18px rgba(5, 133, 157, .18);
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-professional-identity svg {
  width: 21px;
  height: 21px;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-professional-identity small {
  display: block;
  margin-bottom: 2px;
  color: #0a9c83;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-professional-card h3 {
  margin: 0;
  color: var(--if-close-ink);
  font-size: 17px;
  font-weight: 900;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-professional-role {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid #c9e5df;
  border-radius: 999px;
  background: #eaf8f3;
  color: #087b59;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-professional-role i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16aa7c;
  box-shadow: 0 0 0 3px rgba(22, 170, 124, .12);
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-specialty-list {
  gap: 14px;
  padding: 16px;
  background: #fbfdfd;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-specialty-card {
  overflow: hidden;
  border: 1px solid #d9e8eb;
  border-radius: 16px;
  background: #fff;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-specialty-time {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 15px 16px 6px;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-specialty-time > span {
  min-width: 190px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  column-gap: 9px;
  padding: 9px 12px;
  border: 1px solid #d3e4e8;
  border-radius: 13px;
  background: #f8fbfc;
  color: var(--if-close-ink);
  text-align: left;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-specialty-time svg {
  width: 18px;
  height: 18px;
  grid-row: 1 / 3;
  color: #0b9e98;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-specialty-time strong {
  color: #78909a;
  font-size: 8px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-specialty-time b {
  color: var(--if-close-ink);
  font-size: 10px;
  font-weight: 900;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-specialty-card .daily-closing-commission-block {
  margin: 0;
  padding: 13px 18px 17px;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-commission-title {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 13px;
  padding: 0 0 12px;
  border-bottom: 1px solid #e3edef;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-commission-title > span {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #e6f5f5;
  color: #0a9295;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-commission-title svg {
  width: 19px;
  height: 19px;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-commission-title small {
  display: block;
  color: #77909a;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .11em;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-commission-title strong {
  display: block;
  margin-top: 2px;
  color: var(--if-close-ink);
  font-size: 15px;
  font-weight: 900;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-commission-row {
  grid-template-columns: minmax(145px, .65fr) minmax(220px, 1fr) minmax(235px, .85fr);
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #e0ebed;
  border-radius: 13px;
  background: #f8fbfb;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-commission-row strong {
  color: #4e6975;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-commission-row > span {
  color: var(--if-close-ink);
  font-size: 12px;
  font-weight: 900;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-commission-row label,
[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-row label {
  grid-template-columns: auto minmax(100px, 1fr);
  gap: 9px;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-commission-row label span,
[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-row label span {
  color: #087d59;
  font-size: 10px;
  text-align: left;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-row label:last-child span {
  color: #ca403a;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-commission-row input,
[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-row input {
  width: 100%;
  height: 42px;
  border: 1px solid #c8dce1;
  border-radius: 11px;
  outline: 0;
  background: #fff;
  color: #143e51;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
  transition: border-color .18s ease, box-shadow .18s ease;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-commission-row input:focus,
[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-row input:focus {
  border-color: #14aeb0;
  box-shadow: 0 0 0 4px rgba(18, 183, 182, .1);
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-row > input[readonly],
[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-row label:last-child input {
  background: #f3f7f8;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-segment-list {
  gap: 7px;
  margin-top: 10px;
  padding: 11px 13px;
  border: 1px dashed #bfdde2;
  border-radius: 12px;
  background: #f4fbfb;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-segment-list span {
  color: #496975;
  font-size: 10px;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-specialty-card .daily-closing-approval-table {
  margin: 0 18px 18px;
  overflow: hidden;
  border: 1px solid #d9e7e9;
  border-radius: 14px;
  background: #fff;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-table h4 {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 11px 14px;
  border-bottom: 1px solid #d8e9e7;
  background: linear-gradient(90deg, #eaf7f4, #eef9f8);
  color: #0b745d;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-table h4 svg {
  width: 18px;
  height: 18px;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-table h4 span {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-table h4 small {
  padding-left: 8px;
  border-left: 1px solid #badbd3;
  color: #71938a;
  font-size: 8px;
  letter-spacing: .08em;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-row {
  grid-template-columns: minmax(145px, .8fr) minmax(130px, .65fr) minmax(210px, 1fr) minmax(210px, 1fr);
  gap: 18px;
  padding: 15px 18px;
  background: #fff;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-row > strong {
  color: var(--if-close-ink);
  font-size: 11px;
  text-align: left;
  text-transform: uppercase;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-map-info {
  margin: 18px 20px 0;
  padding: 0 0 16px;
  overflow: hidden;
  border: 1px solid #d7e7ea;
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 9px 24px rgba(14, 66, 79, .06);
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-section-heading {
  min-height: 80px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 20px;
  border-bottom: 1px solid #e0ecee;
  background: linear-gradient(90deg, #f8fcfc, #eef9f7);
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-section-heading > span {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, #087da8, #12b4b4);
  color: #fff;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-section-heading svg {
  width: 20px;
  height: 20px;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-section-heading small {
  display: block;
  color: #0a9c83;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .12em;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-map-info .daily-closing-section-heading h3 {
  margin: 1px 0 0;
  color: var(--if-close-ink);
  font-size: 17px;
  font-weight: 900;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-section-heading p {
  margin: 3px 0 0;
  color: #748b95;
  font-size: 10px;
  font-weight: 700;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-map-info .daily-summary-table-wrap {
  margin: 15px 16px 0;
  overflow: hidden;
  border: 1px solid #dce8eb;
  border-radius: 13px;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-map-info .daily-summary-table th {
  background: #edf6f7;
  color: #476774;
  font-size: 9px;
  letter-spacing: .04em;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-map-info .daily-summary-table td {
  color: #244b5c;
  font-size: 10px;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding: 18px 20px 20px;
  border-top: 1px solid #dce9eb;
  background: #f8fbfb;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-actions button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 17px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-actions button svg {
  width: 16px;
  height: 16px;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-actions .green-action {
  border: 1px solid #b9ddd3;
  background: #eaf8f3;
  color: #087a58;
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-actions .blue-action {
  border: 1px solid #078daf;
  background: linear-gradient(135deg, #087aa6, #12b5b4);
  color: #fff;
  box-shadow: 0 9px 22px rgba(6, 137, 163, .22);
}

[data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-actions button:hover {
  transform: translateY(-2px);
}

/* Balão exclusivo da confirmação de fechamento */
.system-confirm-dialog[data-confirm-context="daily-closing"] {
  width: min(570px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid #d1e4e7;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(3, 34, 48, .35);
}

.system-confirm-dialog[data-confirm-context="daily-closing"]::backdrop {
  background: rgba(4, 24, 34, .65);
  backdrop-filter: blur(3px);
}

.system-confirm-dialog[data-confirm-context="daily-closing"] .system-confirm-header {
  min-height: 91px;
  gap: 14px;
  padding: 19px 21px;
  border-bottom: 1px solid #dcebed;
  background: linear-gradient(110deg, #f6fbfb 0%, #eaf8f5 100%);
}

.system-confirm-dialog[data-confirm-context="daily-closing"] .system-confirm-icon {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: linear-gradient(145deg, #087da8, #12b4b4);
  color: #fff;
  box-shadow: 0 8px 20px rgba(4, 136, 158, .2);
}

.system-confirm-dialog[data-confirm-context="daily-closing"] .system-confirm-icon svg {
  width: 23px;
  height: 23px;
}

.system-confirm-dialog[data-confirm-context="daily-closing"] .system-confirm-header p {
  margin-bottom: 2px;
  color: #0b9b83;
  font-size: 9px;
  letter-spacing: .12em;
}

.system-confirm-dialog[data-confirm-context="daily-closing"] .system-confirm-header h2 {
  color: #07334d;
  font-size: 20px;
  font-weight: 900;
}

.system-confirm-dialog[data-confirm-context="daily-closing"] .dialog-close-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: #edf3f4;
  color: #78909a;
  font-size: 22px;
}

.system-confirm-dialog[data-confirm-context="daily-closing"] .system-confirm-body {
  padding: 22px 22px 8px;
}

.system-confirm-dialog[data-confirm-context="daily-closing"] .system-confirm-body p {
  margin: 0;
  padding: 16px 17px;
  border: 1px solid #d8e8eb;
  border-left: 4px solid #0aa49a;
  border-radius: 13px;
  background: #f7fbfb;
  color: #3f5b68;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.system-confirm-dialog[data-confirm-context="daily-closing"] .system-confirm-actions {
  gap: 9px;
  padding: 18px 22px 22px;
}

.system-confirm-dialog[data-confirm-context="daily-closing"] .system-confirm-actions button {
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 17px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 900;
  transition: transform .18s ease, box-shadow .18s ease;
}

.system-confirm-dialog[data-confirm-context="daily-closing"] #systemConfirmCancel {
  border: 1px solid #cbdde1;
  background: #f5f9fa;
  color: #496875;
}

.system-confirm-dialog[data-confirm-context="daily-closing"] #systemConfirmCancel::before {
  content: "←";
  font-size: 14px;
}

.system-confirm-dialog[data-confirm-context="daily-closing"] #systemConfirmAccept {
  border: 1px solid #078daf;
  background: linear-gradient(135deg, #087aa6, #12b5b4);
  color: #fff;
  box-shadow: 0 9px 20px rgba(6, 137, 163, .2);
}

.system-confirm-dialog[data-confirm-context="daily-closing"] #systemConfirmAccept::before {
  content: "✓";
  font-size: 13px;
}

.system-confirm-dialog[data-confirm-context="daily-closing"] .system-confirm-actions button:hover {
  transform: translateY(-1px);
}

@media (max-width: 980px) {
  [data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-money-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  [data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-commission-row,
  [data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  [data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-commission-row strong,
  [data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-commission-row > span,
  [data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-row > strong {
    text-align: left;
  }
}

@media (max-width: 700px) {
  [data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-content {
    width: calc(100% - 18px);
  }

  [data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-header {
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
    padding: 22px 18px;
  }

  [data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-hero-copy {
    align-items: flex-start;
  }

  [data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-back-button {
    width: 100%;
  }

  [data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-money-summary {
    grid-template-columns: 1fr;
    margin-inline: 12px;
  }

  [data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-cash-hint,
  [data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-map-info {
    margin-inline: 12px;
  }

  [data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-list {
    padding-inline: 12px;
  }

  [data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-professional-card > header,
  [data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-specialty-time,
  [data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-actions {
    align-items: stretch;
    flex-direction: column;
  }

  [data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-professional-role {
    align-self: flex-start;
  }

  [data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-specialty-time > span,
  [data-view-panel="DiaFechamentoConfirmacao"] .daily-closing-approval-actions button {
    width: 100%;
    min-width: 0;
  }

  .system-confirm-dialog[data-confirm-context="daily-closing"] .system-confirm-actions {
    flex-direction: column-reverse;
  }

  .system-confirm-dialog[data-confirm-context="daily-closing"] .system-confirm-actions button {
    width: 100%;
  }
}
/* Orto dentro da ficha do paciente — identidade Tec Dent */
.patient-budget-subnav {
  display: flex;
  gap: 8px;
  margin: -4px 0 22px;
  padding: 6px;
  width: fit-content;
  border: 1px solid #dce8ea;
  border-radius: 14px;
  background: #f4f8f9;
}

.patient-budget-subnav button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  color: #53676a;
  background: transparent;
  font: 700 14px/1 inherit;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.patient-budget-subnav button svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.patient-budget-subnav button:hover {
  color: #087f89;
  background: #e8f5f6;
}

.patient-budget-subnav button.is-active {
  color: #fff;
  background: linear-gradient(135deg, #0699a5, #087c86);
  box-shadow: 0 8px 18px rgba(8, 127, 137, .2);
}

.orthodontic-panel {
  color: #24383b;
}

.orthodontic-page-header,
.orthodontic-detail-header,
.orthodontic-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.orthodontic-page-header {
  padding: 4px 2px 20px;
  border-bottom: 1px solid #e3ecee;
}

.orthodontic-page-header > div > span,
.orthodontic-detail-header > div > span,
.orthodontic-dialog-header > div > span,
.orthodontic-ledger-title > div > span {
  display: block;
  margin-bottom: 5px;
  color: #07939e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.orthodontic-page-header h2,
.orthodontic-detail-header h2,
.orthodontic-dialog-header h2,
.orthodontic-ledger-title h3 {
  margin: 0;
  color: #19383c;
}

.orthodontic-page-header h2 { font-size: 25px; }
.orthodontic-page-header p,
.orthodontic-dialog-header p {
  margin: 7px 0 0;
  color: #6d7d80;
  font-size: 13px;
}

.orthodontic-primary-action,
.orthodontic-neutral-action,
.orthodontic-danger-action,
.orthodontic-back-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
}

.orthodontic-primary-action {
  color: #fff;
  background: linear-gradient(135deg, #069da8, #087b85);
  box-shadow: 0 9px 20px rgba(8, 127, 137, .2);
}

.orthodontic-primary-action:hover { filter: brightness(.96); }
.orthodontic-primary-action svg,
.orthodontic-danger-action svg,
.orthodontic-back-action svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.orthodontic-back-action {
  color: #356468;
  border: 1px solid #d5e3e5;
  background: #fff;
}

.orthodontic-neutral-action {
  color: #8b6208;
  border: 1px solid #f1d790;
  background: #fff8e7;
}

.orthodontic-danger-action {
  color: #b43b43;
  border: 1px solid #f0cdd0;
  background: #fff3f4;
}

.orthodontic-patient-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0;
  padding: 14px 18px;
  border: 1px solid #dce9eb;
  border-radius: 12px;
  background: linear-gradient(110deg, #f7fbfb, #fff);
}

.orthodontic-patient-line small,
.orthodontic-summary-item small,
.orthodontic-metric small,
.orthodontic-ledger-totals small {
  display: block;
  margin-bottom: 4px;
  color: #78898c;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.orthodontic-patient-line strong { display: block; color: #24494d; }
.orthodontic-patient-line > span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #087f89;
  background: #e6f5f6;
  font-size: 12px;
  font-weight: 800;
}

.orthodontic-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.orthodontic-metric {
  padding: 16px;
  border: 1px solid #e0eaec;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(32, 74, 79, .06);
}

.orthodontic-metric strong { color: #24464a; font-size: 18px; }
.orthodontic-metric.is-paid strong { color: #198858; }
.orthodontic-metric.is-pending strong { color: #d38a18; }

.orthodontic-treatment-list { display: grid; gap: 12px; }
.orthodontic-treatment-empty {
  padding: 36px 20px;
  border: 1px dashed #cddfe2;
  border-radius: 14px;
  color: #718285;
  background: #f9fbfc;
  text-align: center;
}

.orthodontic-treatment-card {
  display: grid;
  grid-template-columns: minmax(230px, 1.5fr) repeat(3, minmax(120px, .75fr)) auto;
  align-items: center;
  gap: 16px;
  padding: 17px 18px;
  border: 1px solid #dce8ea;
  border-left: 4px solid #07939e;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(32, 74, 79, .06);
}

.orthodontic-treatment-card.is-cancelled { border-left-color: #c5ced0; opacity: .82; }
.orthodontic-treatment-main strong { display: block; color: #183b3f; font-size: 15px; }
.orthodontic-treatment-main small,
.orthodontic-treatment-cell small { display: block; margin-top: 4px; color: #748689; font-size: 12px; }
.orthodontic-treatment-cell strong { color: #315358; font-size: 13px; }
.orthodontic-open-action {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #b9dcdf;
  border-radius: 9px;
  color: #087f89;
  background: #eff9fa;
  font-weight: 800;
  cursor: pointer;
}

.orthodontic-status-pill,
.orthodontic-attendance-pill,
.orthodontic-payment-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.orthodontic-status-pill { color: #087d55; background: #e3f7ed; }
.orthodontic-status-pill.is-cancelled { color: #6f7d80; background: #edf1f2; }
.orthodontic-attendance-pill { color: #a16a0c; background: #fff3d7; }
.orthodontic-attendance-pill.is-done { color: #087f89; background: #e5f5f6; }
.orthodontic-payment-pill { color: #b43b43; background: #fff0f1; }
.orthodontic-payment-pill.is-paid { color: #148250; background: #e4f7ed; }

.orthodontic-detail-header {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  padding-bottom: 18px;
  border-bottom: 1px solid #e1ebed;
}

.orthodontic-detail-actions { display: flex; gap: 8px; }
.orthodontic-treatment-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.orthodontic-summary-item {
  min-height: 70px;
  padding: 13px 14px;
  border: 1px solid #dfeaec;
  border-radius: 11px;
  background: #f9fbfc;
}
.orthodontic-summary-item strong { color: #294b50; font-size: 13px; }

.orthodontic-ledger-card {
  overflow: hidden;
  border: 1px solid #d9e6e8;
  border-radius: 14px;
  background: #fff;
}

.orthodontic-ledger-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 19px;
  background: linear-gradient(120deg, #f5fbfb, #fff);
}

.orthodontic-ledger-totals { display: flex; gap: 22px; text-align: right; }
.orthodontic-ledger-totals strong { color: #21484c; }
.orthodontic-table-wrap { overflow: auto; }
.orthodontic-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.orthodontic-table th {
  padding: 11px 13px;
  color: #527175;
  background: #edf5f6;
  font-size: 10px;
  letter-spacing: .06em;
  text-align: left;
  text-transform: uppercase;
}

.orthodontic-table td {
  padding: 13px;
  border-top: 1px solid #e6edef;
  color: #405d61;
  font-size: 12px;
}

.orthodontic-table tbody tr:hover { background: #f8fbfc; }
.orthodontic-installment-actions { display: flex; gap: 7px; }
.orthodontic-row-action {
  min-height: 33px;
  padding: 0 10px;
  border: 1px solid #cddfe1;
  border-radius: 8px;
  color: #26747b;
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.orthodontic-row-action.is-payment { color: #168252; border-color: #bce3ce; background: #f1fbf5; }
.orthodontic-row-action:disabled { color: #89989a; border-color: #dde5e6; background: #f3f6f6; cursor: default; }

.orthodontic-inline-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 112px;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid #cfdee0;
  border-radius: 9px;
  color: #557175;
  background: #fff;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.orthodontic-inline-action svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
}

.orthodontic-inline-action > span {
  display: grid;
  line-height: 1.15;
  text-align: left;
}

.orthodontic-inline-action > span > strong {
  font: inherit;
}

.orthodontic-inline-action > span > small {
  margin-top: 2px;
  font-size: 9px;
  font-weight: 750;
  opacity: .78;
}

.orthodontic-inline-action.is-attendance.is-pending { color: #8a671d; border-color: #eedda9; background: #fff9e9; }
.orthodontic-inline-action.is-attendance.is-open { color: #b06b09; border-color: #f0d193; background: #fff5df; }
.orthodontic-inline-action.is-attendance.is-finished { color: #087f89; border-color: #b9dfe2; background: #eaf7f8; }
.orthodontic-inline-action.is-payment { color: #18855b; border-color: #bce3ce; background: #f1fbf5; }
.orthodontic-inline-action.is-payment.is-received { color: #fff; border-color: #168257; background: linear-gradient(135deg, #1b9a68, #14774f); }
.orthodontic-inline-action:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(.98); }
.orthodontic-inline-action:disabled { color: #89989a; border-color: #dde5e6; background: #f3f6f6; cursor: default; }

.orthodontic-budget-attendance-dialog .procedure-attendance-summary select {
  width: 100%;
  height: 38px;
  border: 1px solid #c9d2d9;
  border-radius: 4px;
  padding: 0 10px;
  color: #243b4a;
  background: #fff;
}

.orthodontic-budget-attendance-dialog .procedure-attendance-actions .danger-action {
  margin-right: auto;
}

.orthodontic-budget-attendance-dialog .procedure-attendance-switch.is-locked,
.orthodontic-budget-attendance-dialog .procedure-attendance-switch.is-locked:disabled {
  opacity: 1;
  cursor: not-allowed;
  filter: none;
}

.orthodontic-budget-attendance-dialog .procedure-attendance-actions .danger-action,
.procedure-attendance-detail-footer .danger-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.orthodontic-budget-attendance-dialog .procedure-attendance-actions .danger-action svg,
.procedure-attendance-detail-footer .danger-action svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
}

.orthodontic-attendance-status-field > span {
  display: block;
  margin-bottom: 7px;
  color: #486569;
  font-size: 12px;
  font-weight: 800;
}

.orthodontic-attendance-status-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.orthodontic-attendance-status-options button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  border: 1px solid #d4e0e2;
  border-radius: 10px;
  color: #62777a;
  background: #f8fafb;
  font-weight: 850;
  cursor: pointer;
}

.orthodontic-attendance-status-options button i {
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.orthodontic-attendance-status-options button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
}

.orthodontic-attendance-status-options button[data-orthodontic-attendance-status="EM ABERTO"].is-active {
  color: #a56508;
  border-color: #e7c36e;
  background: #fff4d7;
  box-shadow: 0 0 0 3px rgba(231, 195, 110, .16);
}

.orthodontic-attendance-status-options button[data-orthodontic-attendance-status="FINALIZADO"].is-active {
  color: #087f89;
  border-color: #8fcbd0;
  background: #e8f7f8;
  box-shadow: 0 0 0 3px rgba(8, 127, 137, .12);
}

.orthodontic-dialog-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  margin-right: auto;
  padding: 0 14px;
  border: 1px solid #efc9cd;
  border-radius: 10px;
  color: #b63d46;
  background: #fff2f3;
  font-weight: 850;
  cursor: pointer;
}

.orthodontic-dialog-delete svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
}

.orthodontic-installment-payment-history {
  margin: 0 23px 20px;
  overflow: hidden;
  border: 1px solid #d7e6e1;
  border-radius: 12px;
  background: #fff;
}

.orthodontic-installment-payment-history > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid #e2ece8;
  background: linear-gradient(120deg, #f1faf6, #fff);
}

.orthodontic-installment-payment-history > header span {
  display: block;
  margin-bottom: 3px;
  color: #18855b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.orthodontic-installment-payment-history > header h3 { margin: 0; color: #234a3c; font-size: 16px; }
.orthodontic-installment-payment-history > header > strong { color: #168257; font-size: 12px; text-align: right; }
.orthodontic-installment-payment-rows { display: grid; }
.orthodontic-installment-payment-row {
  display: grid;
  grid-template-columns: 38px minmax(100px, .7fr) minmax(135px, .85fr) minmax(150px, 1fr) minmax(150px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e7eeeb;
}

.orthodontic-installment-payment-row:last-child { border-bottom: 0; }
.orthodontic-installment-payment-row:nth-child(even) { background: #f9fcfa; }
.orthodontic-installment-payment-icon {
  display: grid;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #168257;
  background: #e7f6ed;
  place-items: center;
}

.orthodontic-installment-payment-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; }
.orthodontic-installment-payment-row span { display: block; margin-bottom: 3px; color: #77888a; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.orthodontic-installment-payment-row strong { display: block; color: #304f49; font-size: 11px; overflow-wrap: anywhere; }
.orthodontic-installment-payment-row strong.is-paid { color: #168257; font-size: 13px; }
.orthodontic-installment-payment-row small { display: block; margin-top: 3px; color: #748480; font-size: 10px; line-height: 1.35; }
.orthodontic-installment-payment-note p { margin: 0; color: #506762; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.orthodontic-installment-payment-actions button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  border: 1px solid #efc9cd;
  border-radius: 9px;
  color: #c43e48;
  background: #fff4f5;
  cursor: pointer;
  place-items: center;
}

.orthodontic-installment-payment-actions button:hover {
  transform: translateY(-1px);
  background: #ffe9eb;
}

.orthodontic-installment-payment-actions svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
}

.procedure-attendance-detail-footer {
  gap: 8px;
}

.procedure-attendance-detail-footer .danger-action {
  margin-right: auto;
  border: 1px solid #c92f3b;
  background: linear-gradient(180deg, #e14d58, #bd2f3a);
  color: #ffffff;
  opacity: 1;
  text-shadow: none;
  box-shadow: 0 5px 12px rgba(189, 47, 58, .2);
}

.procedure-attendance-detail-footer .danger-action:hover,
.procedure-attendance-detail-footer .danger-action:focus-visible {
  border-color: #a9232e;
  background: linear-gradient(180deg, #d9434f, #a9232e);
  color: #ffffff;
  filter: none;
}

.orthodontic-history-stack {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.orthodontic-history-card .orthodontic-ledger-title {
  border-bottom: 1px solid #e4edef;
}

.orthodontic-history-summary {
  min-width: 145px;
  text-align: right;
}

.orthodontic-history-summary strong,
.orthodontic-history-summary small {
  display: block;
}

.orthodontic-history-summary strong {
  color: #244c50;
  font-size: 14px;
}

.orthodontic-history-summary small {
  margin-top: 4px;
  color: #718487;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.orthodontic-history-list {
  display: grid;
}

.orthodontic-history-row {
  display: grid;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border-bottom: 1px solid #e6edef;
  border-left: 3px solid transparent;
  background: #fff;
}

.orthodontic-history-row:last-child { border-bottom: 0; }
.orthodontic-history-row:nth-child(even) { background: #f9fbfc; }
.orthodontic-history-row.is-payment {
  grid-template-columns: minmax(180px, 1.25fr) minmax(130px, .8fr) minmax(120px, .75fr) minmax(155px, .9fr) minmax(145px, .9fr) minmax(170px, 1.1fr);
  border-left-color: #35a36e;
}

.orthodontic-history-row.is-attendance {
  grid-template-columns: minmax(170px, 1.1fr) minmax(175px, 1.05fr) minmax(160px, .95fr) minmax(220px, 1.35fr) auto auto;
  border-left-color: #07939e;
}

.orthodontic-history-row > div { min-width: 0; }
.orthodontic-history-row > div > span:not(.attendance-status-pill) {
  display: block;
  margin-bottom: 4px;
  color: #7a898c;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.orthodontic-history-row strong {
  display: block;
  color: #294d51;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.orthodontic-history-row small {
  display: block;
  margin-top: 4px;
  color: #738386;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
}

.orthodontic-history-main > span { color: #087f89 !important; }
.orthodontic-history-main > strong { color: #173f43; font-size: 14px; }
.orthodontic-history-value { color: #15845a !important; font-size: 14px !important; }
.orthodontic-history-note p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #4f666a;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.orthodontic-history-status { justify-self: center; }
.orthodontic-history-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.orthodontic-history-view,
.orthodontic-history-delete {
  min-height: 34px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.orthodontic-history-view {
  padding: 0 11px;
  border: 1px solid #bcdde0;
  color: #087f89;
  background: #eff9fa;
}

.orthodontic-history-delete {
  display: grid;
  width: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid #efcfd2;
  color: #bd434b;
  background: #fff4f5;
}

.orthodontic-history-delete svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.orthodontic-history-view:hover { background: #e1f4f5; }
.orthodontic-history-delete:hover { background: #ffe8ea; }
.orthodontic-history-empty {
  display: grid;
  gap: 5px;
  padding: 28px 20px;
  color: #718285;
  background: #fbfcfc;
  text-align: center;
}

.orthodontic-history-empty strong { color: #49666a; font-size: 13px; }
.orthodontic-history-empty span { font-size: 12px; }

.orthodontic-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 17px;
  background: transparent;
  box-shadow: 0 25px 70px rgba(19, 47, 51, .26);
}

.orthodontic-dialog::backdrop { background: rgba(18, 43, 47, .58); backdrop-filter: blur(2px); }
.orthodontic-dialog-panel {
  overflow-x: hidden;
  overflow-y: auto;
  max-height: calc(100vh - 28px);
  margin: 0;
  overscroll-behavior: contain;
  background: #fff;
}
.orthodontic-dialog-header { padding: 21px 23px 18px; border-bottom: 1px solid #e2ebed; }
.orthodontic-dialog-header h2 { font-size: 21px; }
.orthodontic-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  padding: 21px 23px;
}

.orthodontic-form-grid .span-2 { grid-column: span 2; }
.orthodontic-form-grid label > span {
  display: block;
  margin-bottom: 6px;
  color: #486569;
  font-size: 12px;
  font-weight: 800;
}

.orthodontic-form-grid input,
.orthodontic-form-grid select,
.orthodontic-form-grid textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #cadbdd;
  border-radius: 9px;
  color: #29484c;
  background: #fff;
  font: inherit;
}

.orthodontic-form-grid textarea { resize: vertical; }
.orthodontic-form-grid input:focus,
.orthodontic-form-grid select:focus,
.orthodontic-form-grid textarea:focus {
  outline: 3px solid rgba(6, 157, 168, .12);
  border-color: #069da8;
}

.orthodontic-form-grid input[readonly] { color: #5e7073; background: #f3f6f7; }
.orthodontic-generation-preview,
.orthodontic-payment-preview {
  margin: 0 23px 20px;
  padding: 13px 15px;
  border: 1px solid #cde4e6;
  border-radius: 10px;
  color: #356267;
  background: #f0fafb;
  font-size: 12px;
}

.orthodontic-payment-preview.is-discounted { color: #8a5e08; border-color: #efd594; background: #fff9e9; }
.orthodontic-payment-preview strong { color: inherit; }
.orthodontic-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 16px 23px 20px;
  border-top: 1px solid #e6edef;
  background: #fbfcfc;
}

@media (max-width: 960px) {
  .orthodontic-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .orthodontic-treatment-card { grid-template-columns: 1fr 1fr; }
  .orthodontic-treatment-main { grid-column: span 2; }
  .orthodontic-treatment-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .orthodontic-history-row.is-payment,
  .orthodontic-history-row.is-attendance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .orthodontic-history-note { grid-column: span 2; }
  .orthodontic-history-status { justify-self: start; }
}

@media (max-width: 680px) {
  .patient-budget-subnav { width: 100%; }
  .patient-budget-subnav button { flex: 1; }
  .orthodontic-page-header,
  .orthodontic-detail-header,
  .orthodontic-dialog-header { align-items: stretch; grid-template-columns: 1fr; flex-direction: column; }
  .orthodontic-detail-actions { flex-wrap: wrap; }
  .orthodontic-form-grid { grid-template-columns: 1fr; }
  .orthodontic-form-grid .span-2 { grid-column: auto; }
  .orthodontic-metrics,
  .orthodontic-treatment-summary { grid-template-columns: 1fr; }
  .orthodontic-treatment-card { grid-template-columns: 1fr; }
  .orthodontic-treatment-main { grid-column: auto; }
  .orthodontic-ledger-title { align-items: flex-start; flex-direction: column; }
  .orthodontic-ledger-totals { width: 100%; justify-content: space-between; text-align: left; }
  .orthodontic-history-summary { min-width: 0; text-align: left; }
  .orthodontic-history-row.is-payment,
  .orthodontic-history-row.is-attendance { grid-template-columns: 1fr; }
  .orthodontic-history-note { grid-column: auto; }
  .orthodontic-history-actions { justify-content: flex-start; }
  .orthodontic-attendance-status-options { grid-template-columns: 1fr; }
  .orthodontic-dialog-actions { flex-wrap: wrap; }
  .orthodontic-dialog-delete { width: 100%; margin-right: 0; }
  .orthodontic-installment-payment-history > header { align-items: flex-start; flex-direction: column; }
  .orthodontic-installment-payment-history > header > strong { text-align: left; }
  .orthodontic-installment-payment-row { grid-template-columns: 38px 1fr; }
  .orthodontic-installment-payment-row > div:not(.orthodontic-installment-payment-icon) { grid-column: 2; }
}

/* Início: alvos de clique estáveis, sem deslocamento no hover/pressionamento. */
/* Sistema inteiro: alvos de clique estaveis, sem deslocamento no hover/pressionamento. */
body button {
  touch-action: manipulation;
}

body button:hover,
body button:active,
body button:focus-visible,
.clinic-bubble:hover,
.agenda-event:hover,
.home-negative-row:hover,
.profile-manager-dialog .profile-rule-card:hover,
.finance-payable-row:hover,
.prescription-catalog-result:hover,
.master-franchise-card:hover,
.franchise-sidebar:hover .franchise-sidebar-brand img,
.franchise-sidebar:focus-within .franchise-sidebar-brand img,
.referral-target-switch input:checked + span {
  transform: none !important;
}

/* Este controle usa translateY para permanecer centralizado dentro do campo. */
.login-password-toggle:hover,
.login-password-toggle:active,
.login-password-toggle:focus-visible {
  transform: translateY(-50%) !important;
}

/* Orçamento: responsável vinculado ao usuário e telas somente leitura. */
#budgetProfessional.is-current-user-professional {
  border-color: #a9d9d3;
  background: #eef9f7;
  color: #14645d;
  cursor: not-allowed;
  font-weight: 850;
}

.budget-detail-view.is-read-only-budget input[readonly],
.budget-detail-view.is-read-only-budget textarea[readonly],
.budget-detail-view.is-read-only-budget select:disabled {
  border-color: #d8e3e5;
  background: #f3f7f7;
  color: #62777a;
  cursor: not-allowed;
}

/* Menu Tec Dent v2: atalhos visuais, identificáveis e estáveis em qualquer largura. */
body .clinic-home-menu.standard-top-menu {
  min-height: 88px;
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr) 64px;
  align-items: center;
  align-content: center;
  gap: 12px;
  padding: 10px 18px;
}

body .standard-top-menu .menu-brand-button {
  width: 122px;
  min-height: 68px;
  margin-right: 0;
}

body .standard-top-menu .menu-brand-logo {
  width: 108px;
  height: 64px;
}

body .standard-top-menu .menu-primary-actions {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(8, minmax(60px, 76px));
  align-items: center;
  justify-content: center;
  gap: 7px;
}

body .standard-top-menu .menu-primary-actions > .menu-dropdown {
  min-width: 0;
}

body .standard-top-menu .menu-icon-button {
  --menu-accent: #087f86;
  --menu-soft: #e8f7f7;
  --menu-border: #bfe4e5;
  width: 100%;
  max-width: 76px;
  height: 64px;
  min-height: 64px;
  display: grid;
  grid-template-rows: 36px 13px;
  place-items: center;
  gap: 3px;
  padding: 6px 4px 5px;
  border: 1px solid #d8e6ea;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 8px 20px rgba(10, 50, 70, 0.075);
  color: #365364;
  overflow: visible;
}

body .standard-top-menu .menu-icon-button::before {
  display: none;
}

body .standard-top-menu .menu-icon-button.menu-trigger::after {
  top: 8px;
  right: 7px;
  bottom: auto;
  border-top-color: var(--menu-accent);
  opacity: 0.7;
}

body .standard-top-menu .menu-icon-glyph {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--menu-border);
  border-radius: 12px;
  background: var(--menu-soft);
  color: var(--menu-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

body .standard-top-menu .menu-icon-glyph svg {
  width: 21px;
  height: 21px;
  pointer-events: none;
}

body .standard-top-menu .menu-icon-caption {
  max-width: 100%;
  overflow: hidden;
  color: #385665;
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body .standard-top-menu .menu-icon-button:hover,
body .standard-top-menu .menu-icon-button:focus-visible,
body .standard-top-menu .menu-icon-button.is-active,
body .standard-top-menu .menu-dropdown.is-open > .menu-icon-button {
  border-color: var(--menu-border);
  background: var(--menu-soft);
  box-shadow: inset 0 -3px 0 var(--menu-accent), 0 9px 22px rgba(10, 50, 70, 0.1);
  color: var(--menu-accent);
}

body .standard-top-menu [data-menu-tone="routine"] { --menu-accent: #058aa5; --menu-soft: #e8f8fb; --menu-border: #b8e6ed; }
body .standard-top-menu [data-menu-tone="records"] { --menu-accent: #3270c7; --menu-soft: #edf4ff; --menu-border: #c7dafa; }
body .standard-top-menu [data-menu-tone="care"] { --menu-accent: #009c8b; --menu-soft: #e8f9f5; --menu-border: #bce9df; }
body .standard-top-menu [data-menu-tone="finance"] { --menu-accent: #16844c; --menu-soft: #ebf8f0; --menu-border: #c4e6d1; }
body .standard-top-menu [data-menu-tone="reports"] { --menu-accent: #6f55b6; --menu-soft: #f3effd; --menu-border: #d9cef5; }
body .standard-top-menu [data-menu-tone="insights"] { --menu-accent: #c17a08; --menu-soft: #fff6e5; --menu-border: #f0d9aa; }
body .standard-top-menu [data-menu-tone="settings"] { --menu-accent: #4f6470; --menu-soft: #eef3f5; --menu-border: #d2dfe4; }
body .standard-top-menu [data-menu-tone="audit"] { --menu-accent: #b14f62; --menu-soft: #fff0f3; --menu-border: #efcbd3; }

body .standard-top-menu .menu-profile {
  grid-column: 3;
  align-self: center;
  justify-self: end;
  margin-left: 0;
}

body .standard-top-menu .menu-profile-trigger {
  min-height: 50px;
  border-radius: 16px;
}

body .standard-top-menu .menu-dropdown-wide .menu-dropdown-panel,
body .standard-top-menu .menu-primary-actions > :nth-child(n + 6) .menu-dropdown-panel {
  right: 0;
  left: auto;
}

@media (max-width: 900px) {
  body .clinic-home-menu.standard-top-menu {
    grid-template-columns: 104px minmax(0, 1fr) 64px;
    gap: 8px 12px;
    padding: 9px 14px 12px;
  }

  body .standard-top-menu .menu-brand-button {
    width: 104px;
    min-height: 62px;
  }

  body .standard-top-menu .menu-brand-logo {
    width: 94px;
    height: 58px;
  }

  body .standard-top-menu .menu-primary-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    grid-template-columns: repeat(8, minmax(48px, 1fr));
    gap: 6px;
  }

  body .standard-top-menu .menu-icon-button {
    max-width: none;
    height: 60px;
    min-height: 60px;
    grid-template-rows: 33px 12px;
    border-radius: 15px;
  }

  body .standard-top-menu .menu-icon-glyph {
    width: 33px;
    height: 33px;
    border-radius: 11px;
  }

  body .standard-top-menu .menu-icon-glyph svg {
    width: 19px;
    height: 19px;
  }

  body .standard-top-menu .menu-profile {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (max-width: 560px) {
  body .standard-top-menu .menu-primary-actions {
    grid-template-columns: repeat(4, minmax(60px, 1fr));
  }

  body .standard-top-menu .menu-primary-actions > :nth-child(4n) .menu-dropdown-panel,
  body .standard-top-menu .menu-dropdown-wide .menu-dropdown-panel {
    right: 0;
    left: auto;
  }

  body .standard-top-menu .menu-dropdown-panel {
    min-width: min(224px, calc(100vw - 24px));
  }

  body .standard-top-menu .menu-dropdown-wide .menu-dropdown-panel {
    min-width: min(318px, calc(100vw - 24px));
  }
}

/* Submenus orientados por tarefa: títulos compatíveis com as telas, ícones e contexto. */
body .standard-top-menu .submenu-panel {
  --submenu-accent: #087f86;
  width: min(350px, calc(100vw - 24px));
  min-width: 0;
  max-height: min(520px, calc(100vh - 178px));
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  padding: 10px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid #d6e5e9;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 48px rgba(9, 39, 57, 0.18);
  scrollbar-width: thin;
  scrollbar-color: #bad8dc transparent;
}

body .standard-top-menu .menu-primary-actions > :nth-child(1) .submenu-panel { --submenu-accent: #058aa5; }
body .standard-top-menu .menu-primary-actions > :nth-child(2) .submenu-panel { --submenu-accent: #3270c7; }
body .standard-top-menu .menu-primary-actions > :nth-child(3) .submenu-panel { --submenu-accent: #009c8b; }
body .standard-top-menu .menu-primary-actions > :nth-child(4) .submenu-panel { --submenu-accent: #16844c; }
body .standard-top-menu .menu-primary-actions > :nth-child(6) .submenu-panel { --submenu-accent: #c17a08; }
body .standard-top-menu .menu-primary-actions > :nth-child(7) .submenu-panel { --submenu-accent: #4f6470; }

body .standard-top-menu .submenu-panel-records {
  width: min(520px, calc(100vw - 24px));
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body .standard-top-menu .submenu-panel-settings {
  width: min(390px, calc(100vw - 24px));
}

body .standard-top-menu .submenu-panel-heading {
  grid-column: 1 / -1;
  display: grid;
  gap: 2px;
  margin: -2px -2px 3px;
  padding: 10px 12px 11px;
  border-bottom: 1px solid #e4edef;
  border-radius: 12px 12px 5px 5px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--submenu-accent) 10%, white), #ffffff 74%);
}

body .standard-top-menu .submenu-panel-heading strong {
  color: #18394b;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

body .standard-top-menu .submenu-panel-heading small {
  color: #6a7f8a;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.25;
}

body .standard-top-menu .submenu-panel .submenu-item {
  min-width: 0;
  min-height: 55px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #243f4d;
  line-height: 1.15;
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

body .standard-top-menu .submenu-panel .submenu-item::after {
  content: "›";
  width: 14px;
  display: block;
  color: #9babb3;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  text-align: center;
}

body .standard-top-menu .submenu-panel .submenu-item:hover,
body .standard-top-menu .submenu-panel .submenu-item:focus-visible,
body .standard-top-menu .submenu-panel .submenu-item.is-active {
  border-color: color-mix(in srgb, var(--submenu-accent) 26%, white);
  background: color-mix(in srgb, var(--submenu-accent) 8%, white);
  box-shadow: 0 5px 14px color-mix(in srgb, var(--submenu-accent) 10%, transparent);
  color: #173e4d;
}

body .standard-top-menu .submenu-item-icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--submenu-accent) 20%, white);
  border-radius: 11px;
  background: color-mix(in srgb, var(--submenu-accent) 9%, white);
  color: var(--submenu-accent);
}

body .standard-top-menu .submenu-item-icon svg {
  width: 19px;
  height: 19px;
  pointer-events: none;
}

body .standard-top-menu .submenu-item-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
  text-align: left;
}

body .standard-top-menu .submenu-item-copy strong {
  overflow: hidden;
  color: inherit;
  font-size: 11.5px;
  font-weight: 850;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body .standard-top-menu .submenu-item-copy small {
  overflow: hidden;
  color: #748791;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 560px) {
  body .standard-top-menu .submenu-panel,
  body .standard-top-menu .submenu-panel-records,
  body .standard-top-menu .submenu-panel-settings {
    width: min(400px, calc(100vw - 28px));
    grid-template-columns: minmax(0, 1fr);
    max-height: min(440px, calc(100vh - 170px));
  }

  body .standard-top-menu .menu-primary-actions > :nth-child(4n + 1) .submenu-panel {
    right: auto;
    left: 0;
  }

  body .standard-top-menu .menu-primary-actions > :nth-child(4n + 2) .submenu-panel {
    right: auto;
    left: calc(-100% - 6px);
  }

  body .standard-top-menu .menu-primary-actions > :nth-child(4n + 3) .submenu-panel {
    right: auto;
    left: calc(-200% - 12px);
  }

  body .standard-top-menu .menu-primary-actions > :nth-child(4n) .submenu-panel {
    right: 0;
    left: auto;
  }
}

/* Barra Tec Dent v2: composição ampla, leve e sem cartões em forma de bolha. */
body .clinic-home-menu.standard-top-menu {
  position: relative;
  z-index: 120;
  min-height: 104px;
  grid-template-columns: 148px minmax(0, 1fr) 72px;
  gap: 10px 18px;
  padding: 9px 22px;
  border-bottom: 1px solid rgba(37, 151, 164, 0.2);
  background:
    radial-gradient(circle at 8% -64%, transparent 0 76px, rgba(16, 170, 176, 0.1) 77px 105px, transparent 106px),
    radial-gradient(circle at 92% 150%, rgba(202, 224, 47, 0.12) 0 92px, transparent 93px),
    linear-gradient(112deg, transparent 0 34%, rgba(255, 255, 255, 0.58) 34.2% 43%, transparent 43.2%),
    linear-gradient(122deg, #e9f8f7 0%, #f2fafc 48%, #f7faea 100%);
  box-shadow: 0 12px 30px rgba(18, 75, 91, 0.09);
}

body .standard-top-menu .menu-brand-button {
  position: relative;
  width: 148px;
  min-height: 86px;
  justify-content: flex-start;
  padding: 3px 12px 3px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body .standard-top-menu .menu-brand-button::before {
  position: absolute;
  top: 18px;
  right: 0;
  bottom: 18px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(0, 166, 173, 0), rgba(0, 145, 153, 0.38), rgba(195, 216, 37, 0));
  content: "";
}

body .standard-top-menu .menu-brand-logo {
  width: 126px;
  height: 86px;
  object-fit: contain;
  filter: drop-shadow(0 7px 12px rgba(0, 108, 121, 0.16));
}

body .standard-top-menu .menu-primary-actions {
  width: 100%;
  grid-template-columns: repeat(8, minmax(72px, 1fr));
  justify-content: stretch;
  gap: 3px;
  padding: 0;
}

body .standard-top-menu .menu-primary-actions > * {
  width: 100%;
  min-width: 0;
}

body .standard-top-menu .menu-icon-button {
  width: 100%;
  max-width: none;
  height: 82px;
  min-height: 82px;
  grid-template-rows: 48px 16px;
  gap: 5px;
  padding: 7px 4px 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

body .standard-top-menu .menu-icon-button.menu-trigger::after {
  top: 10px;
  right: 9px;
  opacity: 0.55;
}

body .standard-top-menu .menu-icon-glyph {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 14px;
  background: color-mix(in srgb, var(--menu-accent) 11%, rgba(255, 255, 255, 0.78));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--menu-accent) 16%, transparent);
}

body .standard-top-menu .menu-icon-glyph svg {
  width: 26px;
  height: 26px;
}

body .standard-top-menu .menu-icon-caption {
  color: #294b59;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
}

body .standard-top-menu .menu-icon-button:hover,
body .standard-top-menu .menu-icon-button:focus-visible,
body .standard-top-menu .menu-icon-button.is-active,
body .standard-top-menu .menu-dropdown.is-open > .menu-icon-button {
  border: 0;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--menu-accent) 72%, transparent);
  color: var(--menu-accent);
  transform: none;
}

body .standard-top-menu .menu-icon-button:hover .menu-icon-glyph,
body .standard-top-menu .menu-icon-button:focus-visible .menu-icon-glyph,
body .standard-top-menu .menu-icon-button.is-active .menu-icon-glyph,
body .standard-top-menu .menu-dropdown.is-open > .menu-icon-button .menu-icon-glyph {
  background: color-mix(in srgb, var(--menu-accent) 17%, white);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--menu-accent) 22%, transparent), 0 7px 15px color-mix(in srgb, var(--menu-accent) 10%, transparent);
}

body .standard-top-menu .menu-profile-trigger {
  width: 60px;
  min-height: 60px;
  border: 1px solid rgba(49, 128, 140, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 8px 20px rgba(16, 74, 89, 0.08);
}

@media (max-width: 900px) {
  body .clinic-home-menu.standard-top-menu {
    min-height: 174px;
    grid-template-columns: 132px minmax(0, 1fr) 68px;
    gap: 6px 12px;
    padding: 8px 14px 12px;
    background:
      radial-gradient(circle at 13% -30%, transparent 0 65px, rgba(16, 170, 176, 0.1) 66px 89px, transparent 90px),
      radial-gradient(circle at 88% 122%, rgba(202, 224, 47, 0.1) 0 84px, transparent 85px),
      linear-gradient(122deg, #e9f8f7 0%, #f2fafc 49%, #f7faea 100%);
  }

  body .standard-top-menu .menu-brand-button {
    width: 132px;
    min-height: 74px;
  }

  body .standard-top-menu .menu-brand-logo {
    width: 112px;
    height: 74px;
  }

  body .standard-top-menu .menu-primary-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(8, minmax(58px, 1fr));
    gap: 2px;
  }

  body .standard-top-menu .menu-icon-button {
    height: 72px;
    min-height: 72px;
    grid-template-rows: 42px 14px;
    gap: 4px;
  }

  body .standard-top-menu .menu-icon-glyph {
    width: 41px;
    height: 41px;
    border-radius: 13px;
  }

  body .standard-top-menu .menu-icon-glyph svg {
    width: 23px;
    height: 23px;
  }

  body .standard-top-menu .menu-icon-caption {
    font-size: 9.5px;
  }
}

@media (max-width: 760px) {
  body .clinic-home-menu.standard-top-menu {
    min-height: 258px;
    padding-bottom: 13px;
  }

  body .standard-top-menu .menu-primary-actions {
    grid-template-columns: repeat(4, minmax(68px, 1fr));
    gap: 3px 5px;
  }

  body .standard-top-menu .menu-icon-button {
    height: 79px;
    min-height: 79px;
    grid-template-rows: 48px 15px;
  }

  body .standard-top-menu .menu-icon-glyph {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  body .standard-top-menu .menu-icon-glyph svg {
    width: 26px;
    height: 26px;
  }

  body .standard-top-menu .menu-icon-caption {
    font-size: 10.5px;
  }

  body .standard-top-menu .menu-primary-actions > :nth-child(4n + 1) .submenu-panel {
    right: auto;
    left: 0;
  }

  body .standard-top-menu .menu-primary-actions > :nth-child(4n + 2) .submenu-panel {
    right: auto;
    left: calc(-100% - 5px);
  }

  body .standard-top-menu .menu-primary-actions > :nth-child(4n + 3) .submenu-panel {
    right: auto;
    left: calc(-200% - 10px);
  }

  body .standard-top-menu .menu-primary-actions > :nth-child(4n) .submenu-panel {
    right: 0;
    left: auto;
  }
}

@media (max-width: 420px) {
  body .clinic-home-menu.standard-top-menu {
    grid-template-columns: 116px minmax(0, 1fr) 62px;
    padding-right: 9px;
    padding-left: 9px;
  }

  body .standard-top-menu .menu-brand-button {
    width: 116px;
    padding-left: 2px;
  }

  body .standard-top-menu .menu-brand-logo {
    width: 102px;
  }

  body .standard-top-menu .menu-profile-trigger {
    width: 54px;
    min-height: 54px;
  }
}

/* Barra Tec Dent v3: navegação glass premium inspirada em apps, sem alterar a lógica. */
body .clinic-home-menu.standard-top-menu {
  min-height: 104px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 70px;
  align-items: center;
  align-content: center;
  gap: 18px;
  overflow: visible;
  padding: 10px 22px;
  border: 1px solid rgba(15, 118, 135, 0.1);
  border-top: 0;
  border-radius: 0 0 24px 24px;
  background:
    linear-gradient(
      110deg,
      rgba(255, 255, 255, 0.94),
      rgba(239, 250, 252, 0.88),
      rgba(249, 252, 239, 0.86)
    );
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.03),
    0 10px 35px rgba(15, 118, 135, 0.07);
}

body .standard-top-menu .menu-brand-button {
  position: relative;
  width: 150px;
  min-height: 84px;
  justify-content: flex-start;
  margin: 0;
  padding: 2px 17px 2px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body .standard-top-menu .menu-brand-button::before {
  position: absolute;
  top: 50%;
  right: 0;
  width: 1px;
  height: 56px;
  border-radius: 999px;
  background: rgba(15, 118, 135, 0.12);
  content: "";
  transform: translateY(-50%);
}

body .standard-top-menu .menu-brand-logo {
  width: 126px;
  height: 82px;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(15, 118, 135, 0.12));
}

body .standard-top-menu .menu-brand-button:hover,
body .standard-top-menu .menu-brand-button:focus-visible,
body .standard-top-menu .menu-brand-button:active,
body .standard-top-menu .menu-brand-button.is-active,
body .standard-top-menu .menu-brand-button.is-active:hover {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  transform: none !important;
}

body .standard-top-menu .menu-brand-button:focus-visible {
  outline: 3px solid rgba(14, 165, 183, 0.24);
  outline-offset: 2px;
}

body .standard-top-menu .menu-primary-actions {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(8, minmax(80px, 96px));
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 0.85vw, 13px);
  padding: 0;
}

body .standard-top-menu .menu-primary-actions > *,
body .standard-top-menu .menu-primary-actions > .menu-dropdown {
  width: 100%;
  min-width: 0;
}

body .standard-top-menu .menu-icon-button {
  --menu-accent: #0e8f9c;
  --menu-soft: rgba(14, 143, 156, 0.1);
  --menu-border: rgba(14, 143, 156, 0.15);
  position: relative;
  width: 100%;
  max-width: 96px;
  height: 82px;
  min-height: 82px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 8px 8px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
  color: var(--menu-accent);
  overflow: visible;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

body .standard-top-menu .menu-icon-button::before {
  position: absolute;
  top: auto;
  bottom: 3px;
  left: 50%;
  z-index: 1;
  width: 0;
  height: 3px;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--menu-accent);
  box-shadow: none;
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: width 180ms ease, opacity 180ms ease;
}

body .standard-top-menu .menu-icon-button.is-active::before,
body .standard-top-menu .menu-dropdown.is-open > .menu-icon-button::before {
  width: 26px;
  opacity: 1;
}

body .standard-top-menu .menu-icon-glyph {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 15px;
  background: var(--menu-soft);
  color: var(--menu-accent);
  box-shadow:
    inset 0 0 0 1px var(--menu-border),
    0 2px 5px rgba(15, 23, 42, 0.04),
    0 8px 18px rgba(15, 118, 135, 0.07);
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

body .standard-top-menu .menu-icon-glyph svg {
  width: 24px;
  height: 24px;
  pointer-events: none;
}

body .standard-top-menu .menu-icon-caption {
  max-width: 100%;
  overflow: visible;
  color: #243b45;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.2;
  text-overflow: clip;
  text-transform: none;
  white-space: nowrap;
}

body .standard-top-menu .menu-icon-button.menu-trigger::after {
  position: absolute;
  top: auto;
  right: 7px;
  bottom: 14px;
  width: 6px;
  height: 6px;
  display: block;
  margin: 0;
  border: 0;
  border-right: 1.5px solid var(--menu-accent);
  border-bottom: 1.5px solid var(--menu-accent);
  opacity: 0.62;
  transform: rotate(45deg);
  transform-origin: center;
  transition: transform 180ms ease, opacity 180ms ease;
}

body .standard-top-menu .menu-dropdown.is-open > .menu-trigger::after {
  opacity: 0.9;
  transform: rotate(225deg);
}

body .standard-top-menu .menu-icon-button:hover,
body .standard-top-menu .menu-icon-button:focus-visible {
  border-color: rgba(15, 118, 135, 0.06);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 7px 18px rgba(15, 118, 135, 0.055);
  color: var(--menu-accent);
  transform: translateY(-2px) !important;
}

body .standard-top-menu .menu-icon-button.is-active,
body .standard-top-menu .menu-dropdown.is-open > .menu-icon-button {
  border-color: rgba(15, 118, 135, 0.08);
  background: rgba(255, 255, 255, 0.7);
  box-shadow:
    inset 0 0 0 1px rgba(15, 118, 135, 0.08),
    0 6px 16px rgba(15, 118, 135, 0.07);
  color: var(--menu-accent);
}

body .standard-top-menu .menu-icon-button:hover .menu-icon-glyph,
body .standard-top-menu .menu-icon-button:focus-visible .menu-icon-glyph,
body .standard-top-menu .menu-icon-button.is-active .menu-icon-glyph,
body .standard-top-menu .menu-dropdown.is-open > .menu-icon-button .menu-icon-glyph {
  background: color-mix(in srgb, var(--menu-accent) 14%, rgba(255, 255, 255, 0.88));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--menu-accent) 17%, transparent),
    0 4px 8px rgba(15, 23, 42, 0.05),
    0 12px 24px rgba(15, 118, 135, 0.11);
  transform: translateY(-1px);
}

body .standard-top-menu .menu-icon-button:active {
  transform: scale(0.96) !important;
  transition-duration: 70ms;
}

body .standard-top-menu :is(.menu-icon-button, .menu-profile-trigger, .submenu-item):focus-visible {
  outline: 3px solid rgba(14, 165, 183, 0.25);
  outline-offset: 2px;
}

body .standard-top-menu [data-menu-tone="routine"] {
  --menu-accent: #0ea5b7;
  --menu-soft: rgba(14, 165, 183, 0.1);
  --menu-border: rgba(14, 165, 183, 0.15);
}

body .standard-top-menu [data-menu-tone="records"] {
  --menu-accent: #3b82f6;
  --menu-soft: rgba(59, 130, 246, 0.1);
  --menu-border: rgba(59, 130, 246, 0.15);
}

body .standard-top-menu [data-menu-tone="care"] {
  --menu-accent: #14a893;
  --menu-soft: rgba(20, 184, 166, 0.1);
  --menu-border: rgba(20, 184, 166, 0.15);
}

body .standard-top-menu [data-menu-tone="finance"] {
  --menu-accent: #16a34a;
  --menu-soft: rgba(22, 163, 74, 0.1);
  --menu-border: rgba(22, 163, 74, 0.15);
}

body .standard-top-menu [data-menu-tone="reports"] {
  --menu-accent: #7c3aed;
  --menu-soft: rgba(124, 58, 237, 0.1);
  --menu-border: rgba(124, 58, 237, 0.15);
}

body .standard-top-menu [data-menu-tone="insights"] {
  --menu-accent: #c57a08;
  --menu-soft: rgba(217, 139, 14, 0.1);
  --menu-border: rgba(217, 139, 14, 0.15);
}

body .standard-top-menu [data-menu-tone="settings"] {
  --menu-accent: #475569;
  --menu-soft: rgba(71, 85, 105, 0.09);
  --menu-border: rgba(71, 85, 105, 0.14);
}

body .standard-top-menu [data-menu-tone="audit"] {
  --menu-accent: #d94459;
  --menu-soft: rgba(225, 70, 91, 0.09);
  --menu-border: rgba(225, 70, 91, 0.14);
}

body .standard-top-menu .menu-dropdown-panel,
body .standard-top-menu .submenu-panel,
body .standard-top-menu .menu-profile-panel {
  border: 1px solid rgba(15, 118, 135, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.14);
}

body .standard-top-menu .menu-dropdown.is-open > .menu-dropdown-panel {
  animation: standard-menu-panel-in 180ms ease both;
}

body .standard-top-menu .submenu-panel {
  padding: 8px;
}

body .standard-top-menu .submenu-panel .submenu-item {
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 550;
}

body .standard-top-menu .submenu-panel .submenu-item:hover,
body .standard-top-menu .submenu-panel .submenu-item:focus-visible,
body .standard-top-menu .submenu-panel .submenu-item.is-active {
  background: color-mix(in srgb, var(--submenu-accent) 7%, rgba(255, 255, 255, 0.94));
}

body .standard-top-menu .submenu-item-copy,
body .standard-top-menu .submenu-item-copy strong,
body .standard-top-menu .submenu-item-copy small {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

body .standard-top-menu .menu-profile {
  grid-column: 3;
  align-self: center;
  justify-self: end;
  margin: 0;
}

body .standard-top-menu .menu-profile-trigger {
  position: relative;
  width: 66px;
  max-width: 66px;
  height: 58px;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  padding: 7px 8px;
  border: 1px solid rgba(15, 118, 135, 0.09);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 20px rgba(15, 118, 135, 0.06);
  color: #177682;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

body .standard-top-menu .menu-profile-trigger::after {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  display: block;
  margin: 0;
  border: 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  opacity: 0.62;
  transform: rotate(45deg);
  transition: transform 180ms ease;
}

body .standard-top-menu .menu-profile.is-open > .menu-profile-trigger::after {
  transform: rotate(225deg);
}

body .standard-top-menu .menu-profile-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-color: rgba(15, 118, 135, 0.16);
  background: rgba(223, 248, 244, 0.92);
  font-size: 13px;
}

body .standard-top-menu .menu-profile-trigger:hover,
body .standard-top-menu .menu-profile-trigger:focus-visible,
body .standard-top-menu .menu-profile.is-open > .menu-profile-trigger {
  border-color: rgba(15, 118, 135, 0.16);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(15, 118, 135, 0.1);
  color: #087f86;
  transform: translateY(-1px) !important;
}

body .standard-top-menu .menu-profile-trigger:active {
  transform: scale(0.96) !important;
  transition-duration: 70ms;
}

@keyframes standard-menu-panel-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) and (min-width: 901px) {
  body .clinic-home-menu.standard-top-menu {
    grid-template-columns: 132px minmax(0, 1fr) 66px;
    gap: 10px;
    padding-right: 14px;
    padding-left: 14px;
  }

  body .standard-top-menu .menu-brand-button {
    width: 132px;
    padding-right: 11px;
  }

  body .standard-top-menu .menu-brand-logo {
    width: 112px;
  }

  body .standard-top-menu .menu-primary-actions {
    grid-template-columns: repeat(8, minmax(72px, 1fr));
    gap: 3px;
  }

  body .standard-top-menu .menu-icon-button {
    max-width: none;
    padding-right: 5px;
    padding-left: 5px;
  }

  body .standard-top-menu .menu-icon-caption {
    font-size: 10.5px;
  }
}

@media (max-width: 900px) {
  body .clinic-home-menu.standard-top-menu {
    min-height: 104px;
    grid-template-columns: 112px minmax(0, 1fr) 62px;
    gap: 10px;
    padding: 9px 12px;
    background:
      linear-gradient(
        110deg,
        rgba(255, 255, 255, 0.95),
        rgba(239, 250, 252, 0.91),
        rgba(249, 252, 239, 0.89)
      );
  }

  body .standard-top-menu .menu-brand-button {
    grid-column: 1;
    grid-row: 1;
    width: 112px;
    min-height: 82px;
    padding-right: 11px;
  }

  body .standard-top-menu .menu-brand-logo {
    width: 96px;
    height: 78px;
  }

  body .standard-top-menu .menu-primary-actions {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    display: flex;
    justify-content: flex-start;
    gap: 5px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1px 2px 3px;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }

  body .standard-top-menu .menu-primary-actions::-webkit-scrollbar {
    display: none;
  }

  body .standard-top-menu .menu-primary-actions > *,
  body .standard-top-menu .menu-primary-actions > .menu-dropdown {
    width: 78px;
    min-width: 78px;
    flex: 0 0 78px;
    scroll-snap-align: start;
  }

  body .standard-top-menu .menu-icon-button {
    width: 78px;
    max-width: 78px;
    height: 80px;
    min-height: 80px;
    gap: 6px;
    padding-right: 5px;
    padding-left: 5px;
  }

  body .standard-top-menu .menu-icon-glyph {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    border-radius: 14px;
  }

  body .standard-top-menu .menu-icon-caption {
    font-size: 10.5px;
  }

  body .standard-top-menu .menu-profile {
    grid-column: 3;
    grid-row: 1;
  }

  body .standard-top-menu .menu-profile-trigger {
    width: 60px;
    max-width: 60px;
  }

  body .standard-top-menu .menu-profile-avatar {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  body .standard-top-menu .menu-primary-actions .submenu-panel {
    position: fixed;
    top: 108px;
    right: auto !important;
    left: 12px !important;
    width: min(390px, calc(100vw - 24px));
    min-width: 0;
    max-height: calc(100vh - 120px);
  }

  body .standard-top-menu .menu-primary-actions .submenu-panel-records {
    width: min(520px, calc(100vw - 24px));
  }
}

@media (max-width: 560px) {
  body .clinic-home-menu.standard-top-menu {
    min-height: 96px;
    grid-template-columns: 88px minmax(0, 1fr) 56px;
    gap: 6px;
    padding: 7px 8px;
    border-radius: 0 0 20px 20px;
  }

  body .standard-top-menu .menu-brand-button {
    width: 88px;
    min-height: 78px;
    padding-right: 7px;
  }

  body .standard-top-menu .menu-brand-button::before {
    height: 48px;
  }

  body .standard-top-menu .menu-brand-logo {
    width: 78px;
    height: 72px;
  }

  body .standard-top-menu .menu-primary-actions {
    gap: 2px;
  }

  body .standard-top-menu .menu-primary-actions > *,
  body .standard-top-menu .menu-primary-actions > .menu-dropdown {
    width: 68px;
    min-width: 68px;
    flex-basis: 68px;
  }

  body .standard-top-menu .menu-icon-button {
    width: 68px;
    max-width: 68px;
    height: 76px;
    min-height: 76px;
    border-radius: 16px;
  }

  body .standard-top-menu .menu-icon-glyph {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  body .standard-top-menu .menu-icon-glyph svg {
    width: 22px;
    height: 22px;
  }

  body .standard-top-menu .menu-icon-caption {
    font-size: 9.5px;
  }

  body .standard-top-menu .menu-icon-button.menu-trigger::after {
    right: 4px;
    bottom: 13px;
  }

  body .standard-top-menu .menu-profile-trigger {
    width: 54px;
    max-width: 54px;
    height: 54px;
    min-height: 54px;
    padding: 6px;
  }

  body .standard-top-menu .menu-profile-avatar {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  body .standard-top-menu .menu-primary-actions .submenu-panel {
    top: 100px;
    right: auto !important;
    left: 8px !important;
    grid-template-columns: minmax(0, 1fr);
  }

  body .standard-top-menu .menu-profile .menu-dropdown-panel {
    position: fixed;
    top: 100px;
    right: 8px;
    left: auto;
    width: min(350px, calc(100vw - 16px));
    min-width: 0;
    max-height: calc(100vh - 112px);
    overflow-y: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  body .standard-top-menu *,
  body .standard-top-menu *::before,
  body .standard-top-menu *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Ícones v4 — camada final para manter o acabamento iPhone acima do tema do menu. */
body .clinic-home-menu.standard-top-menu {
  min-height: 112px;
  background:
    radial-gradient(circle at 13% 205%, rgba(14, 165, 183, 0.045) 0 150px, transparent 151px),
    radial-gradient(circle at 86% 220%, rgba(59, 130, 246, 0.035) 0 175px, transparent 176px),
    linear-gradient(110deg, rgba(255, 255, 255, 0.96), rgba(242, 251, 252, 0.91), rgba(250, 252, 244, 0.89));
}

body .standard-top-menu .menu-icon-button {
  height: 92px;
  min-height: 92px;
  gap: 8px;
  padding-top: 5px;
  padding-bottom: 6px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body .standard-top-menu .menu-icon-glyph {
  position: relative;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.98);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.99), rgba(247, 250, 251, 0.94));
  color: var(--menu-accent);
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 rgba(15, 118, 135, 0.045),
    0 2px 5px rgba(15, 23, 42, 0.035),
    0 10px 24px rgba(15, 118, 135, 0.075);
  transform: translateZ(0);
  transition:
    transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    background-color 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

body .standard-top-menu .menu-icon-glyph::after {
  position: absolute;
  inset: 1px 1px 48%;
  z-index: 0;
  border-radius: 17px 17px 11px 11px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0));
  content: "";
  pointer-events: none;
}

body .standard-top-menu .menu-icon-glyph svg {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 1px 1px rgba(15, 23, 42, 0.035));
}

body .standard-top-menu .menu-icon-caption {
  color: #314655;
  font-size: 12px;
  font-weight: 780;
}

body .standard-top-menu .menu-icon-button:hover,
body .standard-top-menu .menu-icon-button:focus-visible {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  transform: translateY(-1px) !important;
}

body .standard-top-menu .menu-icon-button:hover .menu-icon-glyph,
body .standard-top-menu .menu-icon-button:focus-visible .menu-icon-glyph {
  border-color: #ffffff;
  background: linear-gradient(145deg, #ffffff, color-mix(in srgb, var(--menu-accent) 3%, #f8fbfc));
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 color-mix(in srgb, var(--menu-accent) 7%, transparent),
    0 4px 9px rgba(15, 23, 42, 0.045),
    0 14px 28px color-mix(in srgb, var(--menu-accent) 12%, transparent);
  transform: translateY(-3px) scale(1.035);
}

body .standard-top-menu .menu-icon-button.is-active .menu-icon-glyph,
body .standard-top-menu .menu-dropdown.is-open > .menu-icon-button .menu-icon-glyph {
  border-color: #ffffff;
  background: linear-gradient(145deg, #ffffff, color-mix(in srgb, var(--menu-accent) 5%, #f8fbfc));
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 -1px 0 color-mix(in srgb, var(--menu-accent) 9%, transparent),
    0 4px 9px rgba(15, 23, 42, 0.05),
    0 12px 25px color-mix(in srgb, var(--menu-accent) 13%, transparent);
  transform: translateY(-2px);
}

body .standard-top-menu .menu-icon-button:active {
  transform: translateY(0) scale(0.98) !important;
  transition-duration: 70ms;
}

body .standard-top-menu .menu-icon-button:active .menu-icon-glyph {
  box-shadow:
    inset 0 2px 5px rgba(15, 23, 42, 0.055),
    0 2px 5px rgba(15, 23, 42, 0.04),
    0 6px 13px color-mix(in srgb, var(--menu-accent) 8%, transparent);
  transform: translateY(1px) scale(0.92);
  transition-duration: 70ms;
}

@media (max-width: 1180px) and (min-width: 901px) {
  body .clinic-home-menu.standard-top-menu { min-height: 108px; }
  body .standard-top-menu .menu-icon-button { height: 88px; min-height: 88px; gap: 7px; }
  body .standard-top-menu .menu-icon-glyph { width: 54px; height: 54px; flex-basis: 54px; border-radius: 17px; }
  body .standard-top-menu .menu-icon-glyph svg { width: 28px; height: 28px; }
}

@media (max-width: 900px) {
  body .clinic-home-menu.standard-top-menu { min-height: 104px; }
  body .standard-top-menu .menu-icon-button { height: 80px; min-height: 80px; gap: 6px; }
  body .standard-top-menu .menu-icon-glyph { width: 46px; height: 46px; flex-basis: 46px; border-radius: 14px; }
  body .standard-top-menu .menu-icon-glyph svg { width: 24px; height: 24px; }
}

@media (max-width: 560px) {
  body .clinic-home-menu.standard-top-menu { min-height: 96px; }
  body .standard-top-menu .menu-icon-button { height: 76px; min-height: 76px; }
  body .standard-top-menu .menu-icon-glyph { width: 44px; height: 44px; flex-basis: 44px; border-radius: 14px; }
  body .standard-top-menu .menu-icon-glyph svg { width: 23px; height: 23px; }
}

@media (hover: none) {
  body .standard-top-menu .menu-icon-button:hover { transform: none !important; }
  body .standard-top-menu .menu-icon-button:hover .menu-icon-glyph { transform: none; }
}

/* Marca TEC: resposta de hover sem criar uma caixa em volta da logo. */
body .standard-top-menu .menu-brand-button {
  isolation: isolate;
}

body .standard-top-menu .menu-brand-button::after {
  position: absolute;
  inset: 12px 18px 12px 0;
  z-index: -1;
  display: block;
  border-radius: 24px;
  background:
    radial-gradient(circle at 48% 48%, rgba(14, 165, 183, 0.2), rgba(14, 165, 183, 0.035) 46%, transparent 72%),
    radial-gradient(circle at 24% 74%, rgba(181, 211, 36, 0.1), transparent 50%);
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: scale(0.82);
  transition: opacity 180ms ease, transform 180ms ease;
}

body .standard-top-menu .menu-brand-logo {
  position: relative;
  z-index: 1;
  transform-origin: center;
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 180ms ease;
}

body .standard-top-menu .menu-brand-button:hover::after,
body .standard-top-menu .menu-brand-button:focus-visible::after {
  opacity: 1;
  transform: scale(1);
}

body .standard-top-menu .menu-brand-button:hover .menu-brand-logo,
body .standard-top-menu .menu-brand-button:focus-visible .menu-brand-logo {
  filter: drop-shadow(0 11px 18px rgba(0, 136, 151, 0.28)) brightness(1.035) saturate(1.08);
  transform: translateY(-3px) scale(1.06);
}

body .standard-top-menu .menu-brand-button:active .menu-brand-logo {
  filter: drop-shadow(0 4px 8px rgba(0, 136, 151, 0.16));
  transform: translateY(0) scale(0.96);
  transition-duration: 70ms;
}

@media (hover: none) {
  body .standard-top-menu .menu-brand-button:hover::after {
    opacity: 0;
    transform: scale(0.82);
  }

  body .standard-top-menu .menu-brand-button:hover .menu-brand-logo {
    filter: drop-shadow(0 6px 12px rgba(15, 118, 135, 0.12));
    transform: none;
  }
}

/* Identidade Tec Dent v4: assinatura legível no desktop e ícone compacto no celular. */
body .standard-top-menu .menu-brand-picture {
  width: 100%;
  display: grid;
  place-items: center start;
}

@media (min-width: 1181px) {
  body .clinic-home-menu.standard-top-menu {
    grid-template-columns: 174px minmax(0, 1fr) 70px;
  }

  body .standard-top-menu .menu-brand-button {
    width: 174px;
  }

  body .standard-top-menu .menu-brand-logo {
    width: 158px;
    height: 68px;
  }
}

@media (max-width: 560px) {
  body .standard-top-menu .menu-brand-picture {
    place-items: center;
  }

  body .standard-top-menu .menu-brand-logo {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    object-fit: cover;
  }
}

/* Fila de espera: balão branco premium conforme a referência visual. */
[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-waiting {
  min-height: 252px;
  overflow: hidden;
  border: 1px solid rgba(154, 171, 183, 0.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 7%, rgba(54, 200, 216, 0.045), transparent 27%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.99), rgba(253, 254, 255, 0.96));
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.025),
    0 16px 34px rgba(55, 75, 88, 0.085);
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-waiting .home-board-header {
  min-height: 72px;
  padding: 13px 20px;
  border-bottom: 1px solid #e9eef1;
  background: rgba(255, 255, 255, 0.72);
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-waiting .home-board-header h2 {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: #172a40;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-waiting .home-board-header h2::before {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffb62d, #f19a12);
  box-shadow: 0 5px 12px rgba(239, 157, 22, 0.22);
  content: "";
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-waiting .home-board-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  background: linear-gradient(135deg, #43d6cf, #25acd2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 9px 20px rgba(31, 178, 200, 0.2);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-waiting .home-board-action::before {
  width: 23px;
  height: 23px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #2bbfc9;
  content: "+";
  font-size: 21px;
  font-weight: 500;
  line-height: 1;
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-waiting .home-board-action:hover,
[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-waiting .home-board-action:focus-visible {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.44),
    0 12px 25px rgba(31, 178, 200, 0.28);
  filter: saturate(1.04) brightness(1.025);
  transform: translateY(-2px) !important;
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-waiting .home-board-action:active {
  box-shadow: 0 5px 12px rgba(31, 178, 200, 0.17);
  transform: scale(0.96) !important;
  transition-duration: 70ms;
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-waiting .home-table-wrap {
  padding: 0 18px 18px;
  background: rgba(255, 255, 255, 0.5);
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-waiting .home-waiting-table {
  border-collapse: separate;
  border-spacing: 0 8px;
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-waiting .home-waiting-table thead th {
  height: 42px;
  padding: 8px 10px 11px;
  border-bottom: 1px solid #edf1f3;
  background: transparent;
  color: #7b8da4;
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: 0.09em;
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-waiting .home-waiting-table .empty-table-cell {
  height: 130px;
  padding: 0 !important;
  border: 1px solid #edf1f3 !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.82);
  color: #506171;
}

[data-view-panel="Resumo"] .home-queue-board.is-waiting .home-queue-empty-state {
  min-height: 128px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  box-sizing: border-box;
  color: #53606d;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

[data-view-panel="Resumo"] .home-queue-board.is-waiting .home-queue-empty-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #f8fafb, #f1f4f6);
  color: #929daa;
  box-shadow: inset 0 1px 0 #ffffff;
}

[data-view-panel="Resumo"] .home-queue-board.is-waiting .home-queue-empty-icon svg {
  width: 28px;
  height: 28px;
}

@media (max-width: 760px) {
  [data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-waiting {
    min-height: 232px;
    border-radius: 20px;
  }

  [data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-waiting .home-board-header {
    min-height: 64px;
    padding: 10px 13px;
  }

  [data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-waiting .home-board-header h2 {
    gap: 9px;
    font-size: 16px;
  }

  [data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-waiting .home-board-action {
    min-height: 40px;
    padding: 0 13px;
    font-size: 11px;
  }
}

/* Botão Adicionar da fila: cápsula iOS mais delicada. */
[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-waiting .home-board-action {
  min-height: 43px;
  gap: 8px;
  padding: 0 17px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), transparent 48%),
    linear-gradient(135deg, #58d9d2, #36b8d6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 7px 16px rgba(37, 177, 199, 0.15);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-waiting .home-board-action::before {
  width: 21px;
  height: 21px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 4px rgba(15, 118, 135, 0.06);
  color: #36bdc9;
  font-size: 18px;
  font-weight: 400;
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-waiting .home-board-action:hover,
[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-waiting .home-board-action:focus-visible {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 9px 19px rgba(37, 177, 199, 0.19);
  filter: brightness(1.018);
  transform: translateY(-1px) !important;
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-waiting .home-board-action:active {
  box-shadow:
    inset 0 2px 4px rgba(17, 126, 145, 0.08),
    0 4px 9px rgba(37, 177, 199, 0.12);
  filter: none;
  transform: scale(0.98) !important;
}

/* Central do dia: pesquisa e fila em linguagem Apple, com espaço reservado para atalhos. */
[data-view-panel="Resumo"] .home-command-toolbar {
  grid-template-areas:
    "left search right"
    "left waiting right";
  grid-template-rows: 96px auto;
}

[data-view-panel="Resumo"] .home-command-toolbar > .home-command-left {
  grid-area: left;
}

[data-view-panel="Resumo"] .home-command-toolbar > .home-toolbar-patient-search {
  grid-area: search;
  border: 1px solid rgba(152, 190, 196, 0.34);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 0%, rgba(111, 221, 216, 0.09), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(248, 252, 252, 0.84));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 12px 30px rgba(22, 79, 91, 0.08);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
}

[data-view-panel="Resumo"] .home-command-toolbar .home-toolbar-patient-search .home-panel-header {
  padding-bottom: 6px;
}

[data-view-panel="Resumo"] .home-command-toolbar .home-toolbar-patient-search .home-panel-header h2 {
  color: #183948;
  font-size: 15.5px;
  font-weight: 820;
  letter-spacing: -0.02em;
}

[data-view-panel="Resumo"] .home-command-toolbar .home-toolbar-patient-search .home-panel-header h2::before {
  border-radius: 50%;
  background: linear-gradient(145deg, #20c486, #0fae75);
  box-shadow: 0 3px 8px rgba(15, 174, 117, 0.2);
}

[data-view-panel="Resumo"] .home-command-toolbar .home-toolbar-patient-search .home-mini-search {
  height: 43px;
  padding: 0 12px;
  border: 1px solid rgba(166, 190, 197, 0.42);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 2px rgba(33, 61, 72, 0.035),
    0 4px 12px rgba(30, 79, 91, 0.035);
  transition: border-color 170ms ease, box-shadow 170ms ease, background 170ms ease;
}

[data-view-panel="Resumo"] .home-command-toolbar .home-toolbar-patient-search .home-mini-search:focus-within {
  border-color: rgba(24, 177, 181, 0.52);
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 0 0 4px rgba(40, 190, 192, 0.1),
    0 9px 20px rgba(31, 104, 114, 0.08);
}

[data-view-panel="Resumo"] .home-command-toolbar .home-toolbar-patient-search .home-mini-search svg {
  color: #778c96;
}

[data-view-panel="Resumo"] .home-command-toolbar .home-toolbar-patient-search .home-mini-search input {
  color: #233d49;
  font-size: 14px;
  font-weight: 520;
  letter-spacing: -0.01em;
}

[data-view-panel="Resumo"] .home-command-toolbar > .home-toolbar-waiting {
  min-width: 0;
  min-height: 180px;
  grid-area: waiting;
  align-self: start;
  overflow: hidden;
  border: 1px solid rgba(154, 171, 183, 0.22);
  border-radius: 22px;
  background:
    radial-gradient(circle at 93% 0%, rgba(255, 190, 74, 0.075), transparent 29%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(252, 253, 254, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 14px 32px rgba(55, 75, 88, 0.08);
  backdrop-filter: blur(22px) saturate(1.1);
  -webkit-backdrop-filter: blur(22px) saturate(1.1);
}

@media (min-width: 1241px) {
  [data-view-panel="Resumo"] .home-command-toolbar > .home-toolbar-waiting {
    width: calc(100% + 64px);
  }
}

[data-view-panel="Resumo"] .home-command-toolbar > .home-toolbar-waiting .home-board-header {
  min-height: 54px;
  padding: 9px 15px;
  border-bottom: 1px solid rgba(224, 231, 235, 0.8);
  background: rgba(255, 255, 255, 0.5);
}

[data-view-panel="Resumo"] .home-command-toolbar > .home-toolbar-waiting .home-board-header h2 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #172d40;
  font-size: 16px;
  font-weight: 820;
  letter-spacing: -0.02em;
}

[data-view-panel="Resumo"] .home-command-toolbar > .home-toolbar-waiting .home-board-header h2::before {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffb62d, #f19a12);
  box-shadow: 0 4px 10px rgba(239, 157, 22, 0.2);
  content: "";
}

[data-view-panel="Resumo"] .home-command-toolbar > .home-toolbar-waiting .home-board-action {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), transparent 48%),
    linear-gradient(135deg, #58d9d2, #36b8d6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 7px 16px rgba(37, 177, 199, 0.15);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 720;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

[data-view-panel="Resumo"] .home-command-toolbar > .home-toolbar-waiting .home-board-action::before {
  width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #36bdc9;
  content: "+";
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}

[data-view-panel="Resumo"] .home-command-toolbar > .home-toolbar-waiting .home-board-action:hover,
[data-view-panel="Resumo"] .home-command-toolbar > .home-toolbar-waiting .home-board-action:focus-visible {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    0 10px 20px rgba(37, 177, 199, 0.2);
  filter: brightness(1.02);
  transform: translateY(-1px) !important;
}

[data-view-panel="Resumo"] .home-command-toolbar > .home-toolbar-waiting .home-board-action:active {
  box-shadow: 0 4px 9px rgba(37, 177, 199, 0.12);
  filter: none;
  transform: scale(0.98) !important;
}

[data-view-panel="Resumo"] .home-command-toolbar > .home-toolbar-waiting .home-table-wrap {
  max-height: 140px;
  overflow: auto;
  padding: 0 13px 12px;
  background: rgba(255, 255, 255, 0.36);
}

[data-view-panel="Resumo"] .home-command-toolbar > .home-toolbar-waiting .home-waiting-table {
  min-width: 460px;
  border-collapse: separate;
  border-spacing: 0 5px;
}

[data-view-panel="Resumo"] .home-command-toolbar > .home-toolbar-waiting .home-waiting-table thead th {
  height: 31px;
  padding: 6px 7px 8px;
  border-bottom: 1px solid rgba(232, 237, 240, 0.9);
  background: transparent;
  color: #7b8da4;
  font-size: 8.5px;
  font-weight: 820;
  letter-spacing: 0.08em;
}

[data-view-panel="Resumo"] .home-command-toolbar > .home-toolbar-waiting .home-waiting-table .empty-table-cell {
  height: 76px;
  padding: 0 !important;
  border: 1px solid rgba(235, 239, 242, 0.95) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.76);
}

[data-view-panel="Resumo"] .home-command-toolbar > .home-toolbar-waiting .home-queue-empty-state {
  min-height: 74px;
  flex-direction: row;
  gap: 9px;
  padding: 10px 14px;
  color: #66747f;
  font-size: 11px;
  font-weight: 600;
}

[data-view-panel="Resumo"] .home-command-toolbar > .home-toolbar-waiting .home-queue-empty-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}

[data-view-panel="Resumo"] .home-command-toolbar > .home-toolbar-waiting .home-queue-empty-icon svg {
  width: 20px;
  height: 20px;
}

[data-view-panel="Resumo"] .home-command-right {
  grid-area: right;
}

[data-view-panel="Resumo"] .home-care-flow-empty-slot {
  min-height: 190px;
}

@media (max-width: 1240px) {
  [data-view-panel="Resumo"] .home-command-toolbar {
    grid-template-areas:
      "left search"
      "left waiting"
      "right right";
    grid-template-rows: 96px auto auto;
  }

  [data-view-panel="Resumo"] .home-command-right {
    grid-column: auto;
  }
}

@media (max-width: 860px) {
  [data-view-panel="Resumo"] .home-command-toolbar {
    grid-template-areas:
      "left"
      "search"
      "waiting"
      "right";
    grid-template-rows: auto;
  }

  [data-view-panel="Resumo"] .home-command-toolbar > .home-toolbar-waiting {
    width: 100%;
  }
}

@media (max-width: 620px) {
  [data-view-panel="Resumo"] .home-command-toolbar > .home-toolbar-waiting {
    border-radius: 19px;
  }

  [data-view-panel="Resumo"] .home-command-toolbar > .home-toolbar-waiting .home-board-header {
    padding-inline: 12px;
  }

  [data-view-panel="Resumo"] .home-command-toolbar > .home-toolbar-waiting .home-board-header h2 {
    font-size: 14px;
  }

  [data-view-panel="Resumo"] .home-command-toolbar > .home-toolbar-waiting .home-board-action {
    min-height: 36px;
    padding-inline: 11px;
    font-size: 10.5px;
  }

  [data-view-panel="Resumo"] .home-care-flow-empty-slot {
    min-height: 150px;
  }
}

/* Jornada clínica: atendimento, atalho central e pacientes sem atendimento. */
[data-view-panel="Resumo"] .home-care-flow {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

[data-view-panel="Resumo"] .home-care-flow-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px minmax(0, 1fr);
  align-items: stretch;
  gap: 16px;
  padding: 0;
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-attending,
[data-view-panel="Resumo"] .home-care-flow .home-unattended-board {
  min-width: 0;
  min-height: 244px;
  overflow: hidden;
  border: 1px solid rgba(154, 181, 190, 0.24);
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 2%, rgba(42, 192, 207, 0.09), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(249, 253, 254, 0.91));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 14px 32px rgba(38, 79, 91, 0.08);
  backdrop-filter: blur(22px) saturate(1.1);
  -webkit-backdrop-filter: blur(22px) saturate(1.1);
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-attending .home-board-header,
[data-view-panel="Resumo"] .home-care-flow .home-unattended-board .home-board-header {
  min-height: 60px;
  padding: 10px 17px;
  border-bottom: 1px solid rgba(222, 232, 236, 0.82);
  background: rgba(255, 255, 255, 0.52);
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-attending .home-board-header h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #172f43;
  font-size: 17px;
  font-weight: 830;
  letter-spacing: -0.02em;
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-attending .home-board-header h2::before {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 50%;
  background: linear-gradient(145deg, #36c8d5, #159dac);
  box-shadow: 0 4px 10px rgba(21, 157, 172, 0.2);
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-attending .home-table-wrap {
  max-height: 184px;
  overflow: auto;
  padding: 0 14px 14px;
  background: rgba(255, 255, 255, 0.34);
}

[data-view-panel="Resumo"] .home-care-flow .home-table-wrap:has(.empty-table-cell) {
  overflow-y: hidden;
}

[data-view-panel="Resumo"] .home-care-flow .home-table-wrap.is-empty,
[data-view-panel="Resumo"] .home-command-toolbar .home-table-wrap.is-empty {
  overflow: hidden !important;
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-attending .home-attending-table {
  min-width: 500px;
  border-collapse: separate;
  border-spacing: 0 6px;
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-attending .home-attending-table thead th {
  height: 36px;
  padding: 7px 8px 9px;
  border-bottom: 1px solid rgba(231, 238, 241, 0.92);
  background: transparent;
  color: #728a9c;
  font-size: 9px;
  font-weight: 840;
  letter-spacing: 0.075em;
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-attending .home-mini-table td {
  background: rgba(242, 250, 251, 0.88);
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-attending .home-mini-table .empty-table-cell {
  height: 116px;
  padding: 0 !important;
  background: rgba(255, 255, 255, 0.76);
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-attending .home-queue-empty-state {
  min-height: 114px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  box-sizing: border-box;
  color: #5c6d79;
  font-size: 12px;
  font-weight: 600;
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-attending .home-queue-empty-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #eefbfc, #e2f5f7);
  color: #159dac;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

[data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-attending .home-queue-empty-icon svg {
  width: 23px;
  height: 23px;
}

[data-view-panel="Resumo"] .home-flow-control-shortcut {
  width: 86px;
  min-height: 112px;
  align-self: start;
  margin-top: 14px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 7px 2px;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: #3f5967;
  cursor: pointer;
  transition: transform 180ms cubic-bezier(.2, .8, .2, 1), color 180ms ease;
}

[data-view-panel="Resumo"] .home-flow-control-icon {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(35, 174, 186, 0.34);
  border-radius: 21px;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.98), transparent 38%),
    linear-gradient(145deg, rgba(240, 253, 253, 0.99), rgba(216, 245, 247, 0.96));
  color: #078f9d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 0 0 1px rgba(255, 255, 255, 0.46),
    0 11px 25px rgba(22, 128, 140, 0.15);
  transition: transform 180ms cubic-bezier(.2, .8, .2, 1), box-shadow 180ms ease, color 180ms ease;
}

[data-view-panel="Resumo"] .home-flow-control-icon svg {
  width: 30px;
  height: 30px;
}

[data-view-panel="Resumo"] .home-flow-control-label {
  max-width: 76px;
  color: #244957;
  font-size: 10px;
  font-weight: 820;
  line-height: 1.18;
  text-align: center;
}

[data-view-panel="Resumo"] .home-flow-control-shortcut:hover,
[data-view-panel="Resumo"] .home-flow-control-shortcut:focus-visible {
  color: #0d8996;
  outline: 0;
  transform: translateY(-3px);
}

[data-view-panel="Resumo"] .home-flow-control-shortcut:hover .home-flow-control-icon,
[data-view-panel="Resumo"] .home-flow-control-shortcut:focus-visible .home-flow-control-icon {
  color: #087f8c;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 13px 27px rgba(30, 130, 141, 0.16);
  transform: scale(1.035);
}

[data-view-panel="Resumo"] .home-flow-control-shortcut:active {
  transform: scale(0.96);
  transition-duration: 70ms;
}

[data-view-panel="Resumo"] .home-care-flow .home-unattended-board {
  grid-column: auto;
  order: initial;
  background:
    radial-gradient(circle at 92% 2%, rgba(231, 91, 86, 0.075), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(254, 251, 251, 0.92));
}

[data-view-panel="Resumo"] .home-care-flow .home-unattended-board .home-board-title-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #172f43;
  font-size: 17px;
  font-weight: 830;
  letter-spacing: -0.02em;
  text-decoration: none;
}

[data-view-panel="Resumo"] .home-care-flow .home-unattended-board .home-board-title-link::before {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f07168, #df4d50);
  box-shadow: 0 4px 10px rgba(223, 77, 80, 0.18);
  content: "";
}

[data-view-panel="Resumo"] .home-care-flow .home-unattended-board .home-board-heading-copy small {
  padding-left: 22px;
  color: #819099;
  font-size: 8.5px;
  font-weight: 620;
}

[data-view-panel="Resumo"] .home-care-flow .home-unattended-board .home-mini-search {
  height: 39px;
  margin: 10px 14px 2px;
  padding: 0 11px;
  border: 1px solid rgba(176, 196, 202, 0.34);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 1px 2px rgba(37, 65, 75, 0.035);
}

[data-view-panel="Resumo"] .home-care-flow .home-unattended-board .home-mini-search:focus-within {
  border-color: rgba(223, 77, 80, 0.42);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 4px rgba(223, 77, 80, 0.075);
  outline: 0;
}

[data-view-panel="Resumo"] .home-care-flow .home-unattended-board .home-table-wrap {
  max-height: 130px;
  overflow: auto;
  padding: 0 14px 13px;
}

[data-view-panel="Resumo"] .home-care-flow .home-unattended-board .home-mini-table {
  min-width: 440px;
  border-spacing: 0 5px;
}

[data-view-panel="Resumo"] .home-care-flow .home-unattended-board .home-mini-table th {
  height: 29px;
  padding-block: 5px 7px;
  color: #7b8d99;
  font-size: 8.5px;
  letter-spacing: 0.075em;
}

[data-view-panel="Resumo"] .home-care-flow .home-unattended-board .home-mini-table td {
  height: 42px;
  padding-block: 6px;
  background: rgba(250, 246, 246, 0.88);
  font-size: 11px;
}

[data-view-panel="Resumo"] .home-command-lower {
  grid-template-columns: minmax(0, 1fr);
}

[data-view-panel="Resumo"] .home-command-lower > .home-side-stack {
  grid-column: 1 / -1;
}

@media (max-width: 1080px) {
  [data-view-panel="Resumo"] .home-care-flow-grid {
    grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr);
    gap: 12px;
  }

  [data-view-panel="Resumo"] .home-flow-control-shortcut {
    width: 76px;
  }

  [data-view-panel="Resumo"] .home-flow-control-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
  }
}

@media (max-width: 860px) {
  [data-view-panel="Resumo"] .home-care-flow-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-view-panel="Resumo"] .home-flow-control-shortcut {
    width: auto;
    min-height: 74px;
    align-self: center;
    grid-template-columns: 52px auto;
    justify-self: center;
    margin-top: 0;
    padding-inline: 10px;
  }

  [data-view-panel="Resumo"] .home-flow-control-icon {
    width: 52px;
    height: 52px;
    border-radius: 17px;
  }

  [data-view-panel="Resumo"] .home-flow-control-label {
    max-width: none;
    font-size: 10px;
  }
}

@media (max-width: 620px) {
  [data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-attending,
  [data-view-panel="Resumo"] .home-care-flow .home-unattended-board {
    min-height: 226px;
    border-radius: 19px;
  }

  [data-view-panel="Resumo"] .home-care-flow .home-queue-board.is-attending .home-board-header h2,
  [data-view-panel="Resumo"] .home-care-flow .home-unattended-board .home-board-title-link {
    font-size: 14px;
  }
}

/* Indicadores financeiros no espaço reservado da coluna esquerda. */
[data-view-panel="Resumo"] .home-command-left {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 14px;
}

[data-view-panel="Resumo"] .home-command-left > .home-operation-strip {
  width: 100%;
  margin: 0;
}

[data-view-panel="Resumo"] .home-command-left > .home-toolbar-finance-summary {
  width: 100%;
  min-height: 100px;
  order: initial;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

[data-view-panel="Resumo"] .home-toolbar-finance-summary .home-finance-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
}

[data-view-panel="Resumo"] .home-toolbar-finance-summary .home-finance-metric {
  min-width: 0;
  min-height: 100px;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 7px;
  row-gap: 4px;
  overflow: hidden;
  padding: 10px 8px;
  border: 1px solid rgba(165, 190, 196, 0.26);
  border-radius: 18px;
  background:
    radial-gradient(circle at 90% 0%, rgba(77, 193, 202, 0.06), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 252, 0.88));
  color: #17364c;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 9px 23px rgba(35, 75, 87, 0.075);
  text-align: left;
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  transition: transform 170ms cubic-bezier(.2, .8, .2, 1), box-shadow 170ms ease, border-color 170ms ease;
}

[data-view-panel="Resumo"] .home-toolbar-finance-summary .home-finance-metric::before {
  width: 31px;
  height: 31px;
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 6px 13px rgba(38, 76, 87, 0.12);
}

[data-view-panel="Resumo"] .home-toolbar-finance-summary .home-finance-metric small,
[data-view-panel="Resumo"] .home-toolbar-finance-summary .home-finance-metric strong {
  min-width: 0;
  grid-column: 2;
}

[data-view-panel="Resumo"] .home-toolbar-finance-summary .home-finance-metric small {
  align-self: end;
  overflow: visible;
  color: #73858e;
  font-size: 6.6px;
  font-weight: 790;
  letter-spacing: 0.025em;
  line-height: 1.18;
  text-overflow: clip;
  text-transform: uppercase;
  white-space: normal;
}

[data-view-panel="Resumo"] .home-toolbar-finance-summary .home-finance-metric strong {
  align-self: start;
  overflow: hidden;
  color: #17364c;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: -0.025em;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-view-panel="Resumo"] .home-toolbar-finance-summary .home-finance-metric.is-budget {
  border-color: rgba(229, 160, 25, 0.22);
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 185, 54, 0.09), transparent 40%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(255, 252, 246, 0.9));
}

[data-view-panel="Resumo"] .home-toolbar-finance-summary .home-finance-metric.is-income {
  border-color: rgba(19, 169, 119, 0.2);
  background:
    radial-gradient(circle at 90% 0%, rgba(35, 201, 139, 0.08), transparent 40%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(247, 253, 250, 0.9));
}

[data-view-panel="Resumo"] .home-toolbar-finance-summary .home-finance-metric.is-outcome {
  border-color: rgba(226, 87, 77, 0.2);
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 116, 104, 0.08), transparent 40%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(254, 249, 249, 0.9));
}

[data-view-panel="Resumo"] .home-toolbar-finance-summary .home-finance-metric:hover,
[data-view-panel="Resumo"] .home-toolbar-finance-summary .home-finance-metric:focus-visible {
  border-color: rgba(54, 161, 171, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 13px 27px rgba(35, 94, 104, 0.12);
  outline: 0;
  transform: translateY(-2px);
}

[data-view-panel="Resumo"] .home-toolbar-finance-summary .home-finance-metric:active {
  transform: scale(0.97);
  transition-duration: 70ms;
}

@media (max-width: 620px) {
  [data-view-panel="Resumo"] .home-toolbar-finance-summary .home-finance-metrics {
    gap: 6px;
  }

  [data-view-panel="Resumo"] .home-toolbar-finance-summary .home-finance-metric {
    min-height: 92px;
    grid-template-columns: 28px minmax(0, 1fr);
    column-gap: 6px;
    padding: 8px 6px;
    border-radius: 16px;
  }

  [data-view-panel="Resumo"] .home-toolbar-finance-summary .home-finance-metric::before {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    font-size: 12px;
  }

  [data-view-panel="Resumo"] .home-toolbar-finance-summary .home-finance-metric small {
    font-size: 6px;
  }

  [data-view-panel="Resumo"] .home-toolbar-finance-summary .home-finance-metric strong {
    font-size: 12px;
  }
}

/* Ficha do paciente — menu lateral branco inspirado no iOS */
[data-view-panel="Cadastro"] .patient-record-page {
  grid-template-columns: 246px minmax(0, 1fr);
  gap: 18px;
}

[data-view-panel="Cadastro"] .ficha-sidebar {
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(205, 222, 228, .88);
  border-radius: 24px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 14px 38px rgba(31, 66, 82, .10), 0 2px 6px rgba(31, 66, 82, .04);
  backdrop-filter: blur(20px) saturate(150%);
}

[data-view-panel="Cadastro"] .ficha-sidebar > strong {
  min-height: 24px;
  padding: 2px 6px 0;
  color: #102f40;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: -.01em;
}

[data-view-panel="Cadastro"] .patient-identity-card {
  position: relative;
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 4px;
  overflow: hidden;
  padding: 12px 10px 11px;
  border: 1px solid #dcebed;
  border-radius: 15px;
  background:
    radial-gradient(circle at 100% 0%, rgba(30, 186, 180, .10), transparent 43%),
    linear-gradient(145deg, #ffffff, #f7fbfc);
  box-shadow: 0 7px 18px rgba(29, 75, 91, .07);
  text-align: center;
}

[data-view-panel="Cadastro"] .patient-identity-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, #0baab2, #22c59b);
}

[data-view-panel="Cadastro"] .patient-identity-card > span {
  color: #0a9997;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .10em;
  line-height: 1;
  text-transform: uppercase;
}

[data-view-panel="Cadastro"] .patient-identity-card > strong {
  color: #102f40;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -.015em;
  line-height: 1.25;
  text-wrap: balance;
}

[data-view-panel="Cadastro"] .patient-age-label {
  min-height: 21px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eaf7f5;
  color: #087f78;
  font-size: 9px;
  font-weight: 850;
}

[data-view-panel="Cadastro"] .patient-age-label::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #17b699;
  box-shadow: 0 0 0 3px rgba(23, 182, 153, .10);
}

/* Informações do paciente — leitura rápida e campos proporcionais */
[data-view-panel="Cadastro"] .patient-record-form .patient-info-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
  gap: 14px 12px;
}

[data-view-panel="Cadastro"] .patient-record-form .patient-info-grid > label,
[data-view-panel="Cadastro"] .patient-record-form .patient-info-grid > label.wide-field,
[data-view-panel="Cadastro"] .patient-record-form .patient-info-grid > label.full-field {
  grid-column: span 4;
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

[data-view-panel="Cadastro"] .patient-record-form .patient-info-grid .patient-info-name-field {
  grid-column: span 6;
}

[data-view-panel="Cadastro"] .patient-record-form .patient-info-grid .patient-info-document-field {
  grid-column: span 3;
}

[data-view-panel="Cadastro"] .patient-record-form .patient-info-grid .patient-info-birth-field,
[data-view-panel="Cadastro"] .patient-record-form .patient-info-grid .patient-info-third-field {
  grid-column: span 4;
}

[data-view-panel="Cadastro"] .patient-record-form .patient-info-grid .patient-info-half-field {
  grid-column: span 6;
}

[data-view-panel="Cadastro"] .patient-record-form .patient-info-grid .patient-info-notes-field {
  grid-column: 1 / -1;
}

[data-view-panel="Cadastro"] .patient-record-form .patient-info-grid .patient-field-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #315d70;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .055em;
}

[data-view-panel="Cadastro"] .patient-info-grid .patient-field-label svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  box-sizing: content-box;
  padding: 5px;
  border-radius: 8px;
}

[data-view-panel="Cadastro"] .patient-info-grid .patient-field-label.is-person svg {
  border: 1px solid #c8e2f5;
  background: #eaf5fd;
  color: #177db7;
}

[data-view-panel="Cadastro"] .patient-info-grid .patient-field-label.is-document svg {
  border: 1px solid #ddd3f6;
  background: #f2edfd;
  color: #7555c7;
}

[data-view-panel="Cadastro"] .patient-info-grid .patient-field-label.is-calendar svg {
  border: 1px solid #c8e9df;
  background: #eaf8f3;
  color: #079476;
}

[data-view-panel="Cadastro"] .patient-record-form .patient-info-grid input,
[data-view-panel="Cadastro"] .patient-record-form .patient-info-grid select {
  min-height: 46px;
  padding-inline: 13px;
  border: 1px solid #c9dce3;
  border-radius: 11px;
  background: #ffffff;
  color: #123a52;
  font-size: 12px;
  font-weight: 750;
  box-shadow: inset 0 1px 2px rgba(16, 60, 78, .025);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

[data-view-panel="Cadastro"] .patient-record-form .patient-info-grid input:focus,
[data-view-panel="Cadastro"] .patient-record-form .patient-info-grid select:focus,
[data-view-panel="Cadastro"] .patient-record-form .patient-info-grid textarea:focus {
  border-color: #18a9ad;
  outline: 0;
  box-shadow: 0 0 0 4px rgba(24, 169, 173, .10);
}

[data-view-panel="Cadastro"] .patient-record-form .patient-info-grid .patient-info-system-field input[readonly] {
  background-color: #f3f8f9;
  color: #54717e;
  font-weight: 800;
}

[data-view-panel="Cadastro"] .patient-record-form .patient-info-grid .patient-info-name-field input {
  border-color: #bcd9e4;
  background: linear-gradient(90deg, #ffffff, #fbfefe);
  font-size: 13px;
  font-weight: 850;
}

[data-view-panel="Cadastro"] .patient-record-form .patient-info-grid textarea {
  min-height: 88px;
  padding: 12px 13px;
  border: 1px solid #c9dce3;
  border-radius: 11px;
  background: #ffffff;
  color: #123a52;
  font-size: 12px;
}

@media (max-width: 1100px) {
  [data-view-panel="Cadastro"] .patient-record-form .patient-info-grid .patient-info-name-field {
    grid-column: 1 / -1;
  }

  [data-view-panel="Cadastro"] .patient-record-form .patient-info-grid .patient-info-document-field,
  [data-view-panel="Cadastro"] .patient-record-form .patient-info-grid .patient-info-birth-field,
  [data-view-panel="Cadastro"] .patient-record-form .patient-info-grid .patient-info-half-field {
    grid-column: span 6;
  }

  [data-view-panel="Cadastro"] .patient-record-form .patient-info-grid .patient-info-third-field {
    grid-column: span 3;
  }
}

@media (max-width: 620px) {
  [data-view-panel="Cadastro"] .patient-record-form .patient-info-grid > label,
  [data-view-panel="Cadastro"] .patient-record-form .patient-info-grid > label.wide-field,
  [data-view-panel="Cadastro"] .patient-record-form .patient-info-grid > label.full-field,
  [data-view-panel="Cadastro"] .patient-record-form .patient-info-grid .patient-info-name-field,
  [data-view-panel="Cadastro"] .patient-record-form .patient-info-grid .patient-info-document-field,
  [data-view-panel="Cadastro"] .patient-record-form .patient-info-grid .patient-info-birth-field,
  [data-view-panel="Cadastro"] .patient-record-form .patient-info-grid .patient-info-third-field,
  [data-view-panel="Cadastro"] .patient-record-form .patient-info-grid .patient-info-half-field {
    grid-column: 1 / -1;
  }
}

[data-view-panel="Cadastro"] .health-button,
[data-view-panel="Cadastro"] .pending-button {
  min-height: 46px;
  justify-content: flex-start;
  padding: 6px 10px;
  border: 1px solid #e4ecef;
  border-radius: 14px;
  background: #ffffff;
  color: #17394a;
  box-shadow: 0 5px 15px rgba(35, 68, 83, .07);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

[data-view-panel="Cadastro"] .health-button:hover,
[data-view-panel="Cadastro"] .pending-button:hover {
  transform: translateY(-1px);
  background: #fbfdfe;
  box-shadow: 0 8px 18px rgba(35, 68, 83, .10);
}

[data-view-panel="Cadastro"] .health-button svg,
[data-view-panel="Cadastro"] .pending-button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  padding: 7px;
  border-radius: 9px;
  color: #ffffff;
  box-sizing: content-box;
}

[data-view-panel="Cadastro"] .health-button svg {
  background: linear-gradient(145deg, #ff625d, #e52f3d);
  box-shadow: 0 4px 10px rgba(229, 47, 61, .22);
}

[data-view-panel="Cadastro"] .health-button span {
  color: #bf2734;
}

[data-view-panel="Cadastro"] .pending-button svg {
  background: linear-gradient(145deg, #42cf69, #17a34a);
  box-shadow: 0 4px 10px rgba(23, 163, 74, .20);
}

[data-view-panel="Cadastro"] .pending-button::after,
[data-view-panel="Cadastro"] .health-button::after {
  content: "\203A";
  margin-left: auto;
  color: #a5b5bd;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
}

[data-view-panel="Cadastro"] .patient-photo-placeholder {
  width: 94px;
  height: 94px;
  padding: 13px 0 11px;
  border: 1px solid #dce8ec;
  background: linear-gradient(145deg, #ffffff, #f3f8fa);
  box-shadow: inset 0 0 0 5px #f4f8f9, 0 5px 16px rgba(32, 68, 84, .08);
}

[data-view-panel="Cadastro"] .patient-photo-placeholder.has-photo {
  padding: 0 !important;
  border-color: #c8dce3;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(32, 68, 84, .12);
}

[data-view-panel="Cadastro"] .patient-photo-placeholder svg {
  width: 34px;
  height: 34px;
  color: #9eb0b8;
}

[data-view-panel="Cadastro"] .patient-photo-placeholder small {
  color: #9aabb3;
  font-size: 8px;
}

[data-view-panel="Cadastro"] .photo-links {
  gap: 0;
  justify-self: center;
  overflow: hidden;
  border: 1px solid #e0eaed;
  border-radius: 999px;
  background: #f8fbfc;
  color: #ccd7dc;
  font-size: 10px;
}

[data-view-panel="Cadastro"] .photo-links button {
  min-height: 25px;
  padding: 0 9px;
  color: #087e91;
  font-size: 10px;
  font-weight: 750;
}

[data-view-panel="Cadastro"] .photo-links span {
  align-self: center;
}

[data-view-panel="Cadastro"] .ficha-side-menu {
  display: grid;
  gap: 0;
  margin-top: 3px;
  overflow: hidden;
  border: 1px solid #dfeaec;
  border-radius: 17px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(32, 68, 84, .075);
}

[data-view-panel="Cadastro"] .ficha-side-menu button {
  position: relative;
  min-height: 49px;
  justify-content: flex-start;
  gap: 10px;
  padding: 5px 31px 5px 9px;
  border-radius: 0;
  background: #ffffff;
  color: #274b5d;
  box-shadow: none;
  font-size: 11px;
  font-weight: 760;
  transition: background-color .16s ease, color .16s ease;
}

[data-view-panel="Cadastro"] .ficha-side-menu button:not(:last-child)::before {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 0;
  left: 48px;
  height: 1px;
  background: #e8eff1;
}

[data-view-panel="Cadastro"] .ficha-side-menu button::after {
  content: "\203A";
  position: absolute;
  right: 12px;
  top: 50%;
  color: #a7b7be;
  font-size: 21px;
  font-weight: 500;
  line-height: 1;
  transform: translateY(-52%);
}

[data-view-panel="Cadastro"] .ficha-side-menu button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  padding: 6px;
  border-radius: 8px;
  background: #e9f5ff;
  color: #1684d6;
  box-sizing: content-box;
  transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

[data-view-panel="Cadastro"] .ficha-side-menu button:nth-child(2) svg {
  background: #e9f8f5;
  color: #07977e;
}

[data-view-panel="Cadastro"] .ficha-side-menu button:nth-child(3) svg {
  background: #f0edff;
  color: #7357d8;
}

[data-view-panel="Cadastro"] .ficha-side-menu button:nth-child(4) svg {
  background: #fff3e5;
  color: #e78816;
}

[data-view-panel="Cadastro"] .ficha-side-menu button:nth-child(5) svg {
  background: #e7f8fb;
  color: #089cac;
}

[data-view-panel="Cadastro"] .ficha-side-menu button:nth-child(6) svg {
  background: #fff0f2;
  color: #df5261;
}

[data-view-panel="Cadastro"] .ficha-side-menu button:nth-child(7) svg {
  background: #edf7e8;
  color: #42a637;
}

[data-view-panel="Cadastro"] .ficha-side-menu button:hover {
  background: #f6fafb;
  color: #0b7380;
}

[data-view-panel="Cadastro"] .ficha-side-menu button:hover svg {
  transform: scale(1.04);
}

[data-view-panel="Cadastro"] .ficha-side-menu button.is-active {
  background: linear-gradient(90deg, #edfafa, #f8fdfd);
  color: #076f79;
  box-shadow: inset 3px 0 0 #10a8a3;
}

[data-view-panel="Cadastro"] .ficha-side-menu button.is-active svg {
  background: linear-gradient(145deg, #16b9b2, #078a99);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(8, 138, 153, .20);
}

[data-view-panel="Cadastro"] .ficha-side-menu button.is-active::after {
  color: #0e9ba0;
}

@media (max-width: 860px) {
  [data-view-panel="Cadastro"] .patient-record-page {
    grid-template-columns: 1fr;
  }

  [data-view-panel="Cadastro"] .ficha-sidebar {
    display: flex;
    padding: 9px;
    border-radius: 18px;
  }

  [data-view-panel="Cadastro"] .ficha-side-menu {
    display: flex;
    width: 100%;
    gap: 7px;
    overflow-x: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  [data-view-panel="Cadastro"] .ficha-side-menu button {
    min-height: 44px;
    padding: 5px 11px 5px 7px;
    border: 1px solid #e0eaed;
    border-radius: 12px;
    white-space: nowrap;
  }

  [data-view-panel="Cadastro"] .ficha-side-menu button::before,
  [data-view-panel="Cadastro"] .ficha-side-menu button::after {
    display: none;
  }
}

/* Status de orçamento — semântica visual única em todas as telas */
.budget-status-pill,
.attendance-budget-status {
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid #d7e1e5;
  border-radius: 999px;
  background: #f1f5f6;
  color: #62747d;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .01em;
  text-transform: uppercase;
  white-space: nowrap;
}

.budget-status-pill::before,
.attendance-budget-status::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(98, 116, 125, .10);
}

.budget-status-pill.is-contracted,
[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-status.is-contracted {
  border-color: #b9e2c6;
  background: #e7f7eb;
  color: #24773a;
}

.budget-status-pill.is-open,
[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-status.is-open {
  border-color: #f0ca88;
  background: #fff2da;
  color: #a45d06;
}

.budget-status-pill.is-finished,
[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-status.is-finished {
  border-color: #b9d7f3;
  background: #eaf4fe;
  color: #176ba5;
}

.budget-status-pill.is-cancelled,
[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-status.is-cancelled {
  border-color: #efc0c5;
  background: #fdecee;
  color: #b33743;
}

.budget-status-pill.is-neutral,
[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-status.is-neutral {
  border-color: #d7e1e5;
  background: #f1f5f6;
  color: #62747d;
}

[data-view-panel="AtendimentoOrcamentos"] .attendance-budget-status {
  border-radius: 999px;
}

.patient-payment-budget-status .budget-status-pill {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  margin-top: 2px;
}

#budgetStatus {
  border-width: 1px;
  font-weight: 850;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

#budgetStatus.is-contracted {
  border-color: #a9dcbc;
  background: #effaf2;
  color: #24773a;
  box-shadow: 0 0 0 3px rgba(36, 119, 58, .07);
}

#budgetStatus.is-open {
  border-color: #ebc16f;
  background: #fff8e9;
  color: #9a5705;
  box-shadow: 0 0 0 3px rgba(164, 93, 6, .07);
}

#budgetStatus.is-finished {
  border-color: #afd0ef;
  background: #f0f7fe;
  color: #176ba5;
}

#budgetStatus.is-cancelled {
  border-color: #e9b1b8;
  background: #fff1f2;
  color: #b33743;
}

#budgetStatus option {
  background: #ffffff;
  color: #18384a;
}

/* Agendamentos dentro da ficha do paciente */
[data-view-panel="Cadastro"] .patient-appointment-panel {
  min-width: 0;
  padding: 18px;
  overflow: hidden;
  border: 1px solid #d8e7eb;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(21, 61, 79, .09);
}

.patient-appointment-header {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  margin: -18px -18px 16px;
  padding: 20px 22px;
  overflow: hidden;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(115deg, #063f6b 0%, #087fa8 54%, #11b8ae 100%);
  color: #ffffff;
}

.patient-appointment-header::after {
  content: "";
  width: 178px;
  height: 178px;
  position: absolute;
  right: 78px;
  top: -112px;
  border: 28px solid rgba(255, 255, 255, .075);
  border-radius: 50%;
}

.patient-appointment-header > * {
  position: relative;
  z-index: 1;
}

.patient-appointment-header > div:first-child > span {
  color: #9cf5e9;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.patient-appointment-header h2 {
  margin: 4px 0 3px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 850;
  letter-spacing: -.02em;
}

.patient-appointment-header p {
  margin: 0;
  color: rgba(255, 255, 255, .82);
  font-size: 11px;
  font-weight: 600;
}

.patient-appointment-header-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.patient-appointment-header-actions small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, .88);
  font-size: 9px;
  font-weight: 750;
}

.patient-appointment-header-actions small i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #bce94a;
  box-shadow: 0 0 0 4px rgba(188, 233, 74, .14);
}

.patient-appointment-header-actions button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 12px;
  background: rgba(255, 255, 255, .18);
  box-shadow: 0 8px 18px rgba(2, 52, 72, .13);
  color: #ffffff;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: transform .18s ease, background-color .18s ease;
}

.patient-appointment-header-actions button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, .26);
}

.patient-appointment-header-actions button svg {
  width: 15px;
  height: 15px;
}

.patient-appointment-patient-line {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid #dce9ed;
  border-radius: 14px;
  background: #f8fbfc;
}

.patient-appointment-patient-line div {
  display: grid;
  gap: 2px;
}

.patient-appointment-patient-line small {
  color: #7a8f99;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.patient-appointment-patient-line strong {
  color: #093c5d;
  font-size: 15px;
  font-weight: 850;
}

.patient-appointment-patient-line > span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #eaf6f7;
  color: #087883;
  font-size: 9px;
  font-weight: 850;
}

.patient-appointment-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.patient-appointment-metrics article {
  min-height: 82px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: center;
  gap: 3px 8px;
  position: relative;
  overflow: hidden;
  padding: 12px 13px;
  border: 1px solid #dce9ed;
  border-radius: 15px;
  background: linear-gradient(145deg, #ffffff, #f7fbfc);
  box-shadow: 0 6px 16px rgba(21, 61, 79, .055);
}

.patient-appointment-metrics article::before {
  content: "";
  width: 4px;
  position: absolute;
  inset: 10px auto 10px 0;
  border-radius: 0 5px 5px 0;
  background: #2387bd;
}

.patient-appointment-metrics article.is-confirmed::before { background: #25a754; }
.patient-appointment-metrics article.is-waiting::before { background: #eea326; }
.patient-appointment-metrics article.is-completed::before { background: #087e89; }

.patient-appointment-metrics span {
  align-self: end;
  color: #657d89;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.patient-appointment-metrics strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  color: #0b405d;
  font-size: 25px;
  font-weight: 850;
  line-height: 1;
}

.patient-appointment-metrics small {
  color: #899aa2;
  font-size: 8px;
  font-weight: 650;
}

.patient-appointment-journey {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin-bottom: 13px;
  padding: 12px 14px;
  border: 1px solid #deeaed;
  border-radius: 15px;
  background: #fbfdfd;
}

.patient-appointment-journey > div {
  display: grid;
  gap: 3px;
}

.patient-appointment-journey small {
  color: #08858a;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.patient-appointment-journey strong {
  color: #234b5c;
  font-size: 11px;
}

.patient-appointment-journey ol,
.patient-appointment-flow ol {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.patient-appointment-journey li {
  position: relative;
  padding-top: 17px;
  color: #718690;
  font-size: 8px;
  font-weight: 750;
  text-align: center;
}

.patient-appointment-journey li::before {
  content: "";
  width: 9px;
  height: 9px;
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #16a8a3;
  box-shadow: 0 0 0 2px #a9dddc;
  transform: translateX(-50%);
}

.patient-appointment-journey li:not(:last-child)::after {
  content: "";
  height: 2px;
  position: absolute;
  top: 5px;
  right: -50%;
  left: 50%;
  background: #cce5e5;
}

.patient-appointment-list {
  display: grid;
  gap: 10px;
}

.patient-appointment-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 38px;
  align-items: stretch;
  gap: 12px;
  position: relative;
  padding: 12px;
  overflow: hidden;
  border: 1px solid #dce8ec;
  border-left: 4px solid var(--patient-appointment-accent, #168cb4);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 7px 20px rgba(22, 62, 80, .065);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.patient-appointment-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 11px 25px rgba(22, 62, 80, .10);
}

.patient-appointment-card.is-past {
  background: linear-gradient(145deg, #ffffff, #fafcfc);
}

.patient-appointment-date {
  min-height: 84px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  border: 1px solid color-mix(in srgb, var(--patient-appointment-accent, #168cb4) 25%, #dce8ec);
  border-radius: 13px;
  background: color-mix(in srgb, var(--patient-appointment-accent, #168cb4) 7%, #ffffff);
  color: var(--patient-appointment-accent, #168cb4);
}

.patient-appointment-date strong {
  font-size: 26px;
  font-weight: 850;
  line-height: .95;
}

.patient-appointment-date span {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
}

.patient-appointment-date small {
  margin-top: 5px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #ffffff;
  color: #345b6c;
  font-size: 9px;
  font-weight: 850;
  box-shadow: 0 2px 6px rgba(18, 57, 73, .08);
}

.patient-appointment-content {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 8px;
}

.patient-appointment-content > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.patient-appointment-content > header > div {
  min-width: 0;
}

.patient-appointment-content header small {
  display: block;
  margin-bottom: 3px;
  color: #7b909a;
  font-size: 8px;
  font-weight: 750;
  text-transform: capitalize;
}

.patient-appointment-content h3 {
  margin: 0;
  overflow: hidden;
  color: #123d53;
  font-size: 14px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patient-appointment-status {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--patient-appointment-status-text) 24%, transparent);
  border-radius: 999px;
  background: var(--patient-appointment-status-bg, #dceff6);
  color: var(--patient-appointment-status-text, #185c74);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.patient-appointment-status::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: currentColor;
}

.patient-appointment-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.patient-appointment-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #617985;
  font-size: 9px;
}

.patient-appointment-meta svg {
  width: 13px;
  height: 13px;
  color: var(--patient-appointment-accent, #168cb4);
}

.patient-appointment-meta b {
  font-weight: 750;
}

.patient-appointment-flow {
  padding-top: 3px;
}

.patient-appointment-flow li {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 4px;
  position: relative;
  color: #9aabb2;
  font-size: 7px;
  font-weight: 750;
  text-align: center;
}

.patient-appointment-flow li i {
  width: 8px;
  height: 8px;
  z-index: 1;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #d9e3e6;
  box-shadow: 0 0 0 1px #c8d5da;
}

.patient-appointment-flow li:not(:last-child)::after {
  content: "";
  height: 2px;
  position: absolute;
  top: 3px;
  right: -50%;
  left: 50%;
  background: #dfe8eb;
}

.patient-appointment-flow li.is-complete {
  color: #168752;
}

.patient-appointment-flow li.is-complete i,
.patient-appointment-flow li.is-complete::after {
  background: #30b36f;
}

.patient-appointment-flow li.is-current {
  color: var(--patient-appointment-status-text, #087883);
  font-weight: 900;
}

.patient-appointment-flow li.is-current i {
  width: 10px;
  height: 10px;
  margin-top: -1px;
  background: var(--patient-appointment-status-text, #087883);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--patient-appointment-status-text, #087883) 15%, transparent);
}

.patient-appointment-flow.is-exception ol {
  opacity: .42;
}

.patient-appointment-flow > small {
  display: block;
  margin-top: 5px;
  color: #b23c46;
  font-size: 8px;
  font-weight: 700;
}

.patient-appointment-content > p {
  margin: 0;
  padding: 7px 9px;
  border-radius: 9px;
  background: #f6f9fa;
  color: #647b86;
  font-size: 9px;
  line-height: 1.35;
}

.patient-appointment-open {
  width: 34px;
  height: 34px;
  align-self: center;
  display: inline-grid;
  place-items: center;
  border: 1px solid #dce8ec;
  border-radius: 11px;
  background: #f7fbfc;
  color: #168996;
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease;
}

.patient-appointment-open:hover {
  transform: translateX(2px);
  background: #eaf7f8;
}

.patient-appointment-open svg {
  width: 15px;
  height: 15px;
}

.patient-appointment-empty {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px dashed #cfe0e5;
  border-radius: 16px;
  background: #fbfdfd;
  color: #6f8792;
}

.patient-appointment-empty > span {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #e9f6f7;
  color: #0a9298;
}

.patient-appointment-empty svg {
  width: 24px;
  height: 24px;
}

.patient-appointment-empty div {
  display: grid;
  gap: 3px;
}

.patient-appointment-empty strong {
  color: #234c5e;
  font-size: 13px;
}

.patient-appointment-empty small {
  font-size: 9px;
}

@media (max-width: 980px) {
  .patient-appointment-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .patient-appointment-journey {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .patient-appointment-header,
  .patient-appointment-patient-line,
  .patient-appointment-content > header {
    align-items: stretch;
    flex-direction: column;
  }

  .patient-appointment-header-actions {
    justify-items: stretch;
  }

  .patient-appointment-header-actions button {
    width: 100%;
  }

  .patient-appointment-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .patient-appointment-open {
    grid-column: 1 / -1;
    width: 100%;
  }

  .patient-appointment-journey,
  .patient-appointment-flow {
    overflow-x: auto;
  }

  .patient-appointment-journey ol,
  .patient-appointment-flow ol {
    min-width: 590px;
  }
}

/* Ficha do paciente — identidade, biometria e assinaturas eletrônicas */
.patient-signature-panel {
  overflow: hidden;
  padding: 0 0 26px;
  border: 1px solid #d7e7eb;
  border-radius: 23px;
  background: linear-gradient(180deg, #f7fbfc 0, #ffffff 250px);
  box-shadow: 0 18px 45px rgba(11, 53, 76, 0.1);
}

.patient-signature-header {
  min-height: 126px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 28px;
  background:
    radial-gradient(circle at 83% 0, rgba(255, 255, 255, 0.12) 0 75px, transparent 76px),
    radial-gradient(circle at 83% 0, transparent 0 103px, rgba(255, 255, 255, 0.08) 104px 138px, transparent 139px),
    linear-gradient(115deg, #073d69, #087fa7 58%, #10b8ad);
  color: #ffffff;
}

.patient-signature-header > div { min-width: 0; }
.patient-signature-header > div > span,
.patient-signature-requests header small {
  color: #9ff4e8;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.patient-signature-header h2 {
  margin: 4px 0 4px;
  color: #ffffff;
  font-size: 25px;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.patient-signature-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 650;
}

.patient-signature-whatsapp-primary {
  min-height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 9px 24px rgba(1, 52, 71, 0.2);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
}

.patient-signature-whatsapp-primary svg { width: 18px; height: 18px; }

.patient-signature-identity {
  min-height: 78px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) minmax(210px, 0.7fr);
  align-items: center;
  gap: 13px;
  margin: 18px 22px 12px;
  padding: 13px 16px;
  border: 1px solid #d7e8eb;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 9px 24px rgba(12, 58, 78, 0.06);
}

.patient-signature-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #e6f9fa, #effff4);
  color: #078f96;
}

.patient-signature-avatar svg { width: 23px; height: 23px; }
.patient-signature-identity > div { min-width: 0; display: grid; gap: 2px; }
.patient-signature-identity small,
.patient-signature-contact small,
.guardian-signature-person small {
  color: #78909a;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.patient-signature-identity strong {
  overflow: hidden;
  color: #113b52;
  font-size: 14px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patient-signature-identity > div > span,
.patient-signature-contact > span,
.guardian-signature-person > span {
  color: #76909a;
  font-size: 9px;
  font-weight: 650;
}

.patient-signature-contact {
  padding-left: 16px;
  border-left: 1px solid #e0ecee;
}

.patient-signature-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 22px 12px;
}

.patient-signature-summary article {
  min-height: 64px;
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dde9ec;
  border-radius: 15px;
  background: #ffffff;
}

.patient-signature-summary article > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #e9f7fa;
  color: #078a9a;
}

.patient-signature-summary article > span.is-patient { background: #e9f8ef; color: #10925c; }
.patient-signature-summary article > span.is-guardian { background: #f2edff; color: #7454d8; }
.patient-signature-summary svg { width: 19px; height: 19px; }
.patient-signature-summary article div { min-width: 0; display: grid; gap: 3px; }
.patient-signature-summary small { color: #7d919a; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.patient-signature-summary strong { color: #163d4f; font-size: 11px; font-weight: 950; }

.patient-signature-save-notice {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 22px 12px;
  padding: 11px 13px;
  border: 1px solid #f2d39a;
  border-radius: 13px;
  background: #fff9ec;
  color: #9a6813;
  font-size: 10px;
  font-weight: 800;
}

.patient-signature-save-notice svg { width: 17px; height: 17px; }

.optional-guardian-prompt {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  margin: 0 22px 12px;
  padding: 14px 15px;
  border: 1px dashed #c9dce1;
  border-radius: 17px;
  background: linear-gradient(135deg, #fbfdfd, #f4fafb);
}

.optional-guardian-prompt[hidden] { display: none !important; }
[data-guardian-signature-summary][hidden],
[data-guardian-signature-section][hidden] { display: none !important; }
.optional-guardian-prompt > span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: #f0ebff; color: #7053cb; }
.optional-guardian-prompt > span svg { width: 21px; height: 21px; }
.optional-guardian-prompt > div { display: grid; gap: 3px; }
.optional-guardian-prompt small { color: #7b69b6; font-size: 7px; font-weight: 950; letter-spacing: .1em; }
.optional-guardian-prompt strong { color: #183d50; font-size: 12px; }
.optional-guardian-prompt p { margin: 0; color: #728790; font-size: 9px; line-height: 1.45; }
.optional-guardian-prompt button { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 13px; border: 1px solid #d7caef; border-radius: 12px; background: #fff; color: #6749ba; cursor: pointer; font-size: 9px; font-weight: 900; box-shadow: 0 7px 16px rgba(91, 65, 157, .09); }
.optional-guardian-prompt button svg { width: 14px; height: 14px; }

.patient-signature-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 22px;
}

.patient-signature-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 15px;
  border: 1px solid #dbe8eb;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(12, 57, 77, 0.06);
}

.patient-signature-card > header {
  min-width: 0;
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.patient-signature-card > header > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #e5f8fa, #f4fffb);
  color: #088f98;
}

.patient-signature-card > header svg { width: 19px; height: 19px; }
.patient-signature-card > header div { min-width: 0; }
.patient-signature-card > header small { display: block; color: #81939b; font-size: 7px; font-weight: 900; letter-spacing: 0.07em; text-transform: uppercase; }
.patient-signature-card > header h3 { margin: 2px 0 0; color: #143e50; font-size: 12px; font-weight: 950; }
.patient-signature-card > header b {
  padding: 6px 8px;
  border-radius: 999px;
  background: #fff3dc;
  color: #a8690a;
  font-size: 7px;
  font-weight: 950;
  text-transform: uppercase;
}

.patient-signature-card > header b.is-ready { background: #e6f8ed; color: #12834e; }
.patient-signature-card > header b.is-required { background: #ffe8e9; color: #c84049; }
.patient-signature-card > header b.is-optional { background: #edf1f3; color: #6e8088; }

.patient-face-reference {
  min-height: 174px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid #d6e7ea;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 40%, #fafdfe, #edf7f8);
}

.patient-face-reference img { width: 100%; height: 174px; object-fit: cover; }
.patient-face-reference > img[hidden],
.patient-face-reference > span[hidden] { display: none !important; }
.patient-face-reference > span,
.patient-written-signature-preview > span {
  display: grid;
  justify-items: center;
  gap: 7px;
  color: #91a4ab;
}

.patient-face-reference > span svg { width: 40px; height: 40px; }
.patient-face-reference > span small,
.patient-written-signature-preview > span small { font-size: 8px; font-weight: 850; text-transform: uppercase; }

.patient-written-signature-preview {
  min-height: 124px;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 1px dashed #cddfe3;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fbfc);
}

.patient-written-signature-preview img { width: 100%; height: 106px; object-fit: contain; }
.patient-written-signature-preview > span svg { width: 30px; height: 30px; }

.patient-signature-card > p {
  min-height: 31px;
  margin: 0;
  color: #718a94;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.45;
}

.guardian-signature-person {
  min-height: 47px;
  display: grid;
  gap: 2px;
  padding: 9px 11px;
  border: 1px solid #e1e4f4;
  border-radius: 12px;
  background: #faf9ff;
}

.guardian-signature-person strong { color: #443c75; font-size: 11px; font-weight: 900; }

.patient-signature-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: auto;
}

.patient-signature-card-actions button {
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid #bfe1e4;
  border-radius: 11px;
  background: linear-gradient(135deg, #eaf9fb, #effaf6);
  color: #087e87;
  cursor: pointer;
  font-size: 8px;
  font-weight: 900;
}

.patient-signature-card-actions button.is-secondary { background: #f5f8fa; color: #526d79; }
.patient-signature-card-actions button.is-whatsapp { border-color: #bce7cc; background: #eaf9ef; color: #137f48; }
.patient-signature-card-actions button svg { width: 15px; height: 15px; }
.patient-signature-card-actions button:disabled,
.patient-signature-whatsapp-primary:disabled,
.patient-signature-requests button:disabled { cursor: not-allowed; opacity: 0.48; box-shadow: none; }

.patient-signature-requests {
  overflow: hidden;
  margin: 14px 22px 0;
  border: 1px solid #dbe8eb;
  border-radius: 17px;
  background: #ffffff;
}

.patient-signature-requests > header {
  min-height: 61px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 15px;
  border-bottom: 1px solid #e0ecee;
  background: linear-gradient(90deg, #f5fbfc, #f1fbf7);
}

.patient-signature-requests header small { color: #089199; }
.patient-signature-requests h3 { margin: 3px 0 0; color: #183f50; font-size: 13px; font-weight: 950; }
.patient-signature-requests > header button {
  min-height: 35px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid #c7e3e5;
  border-radius: 10px;
  background: #ffffff;
  color: #087f88;
  cursor: pointer;
  font-size: 8px;
  font-weight: 900;
}

.patient-signature-requests > header svg { width: 14px; height: 14px; }
.patient-signature-requests > div { display: grid; gap: 6px; padding: 10px; }

.patient-signature-request-empty {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #82969e;
}

.patient-signature-request-empty svg { width: 24px; height: 24px; }
.patient-signature-request-empty span { display: grid; gap: 2px; }
.patient-signature-request-empty strong { color: #506c77; font-size: 10px; }
.patient-signature-request-empty small { font-size: 8px; }

.patient-signature-request-row {
  min-height: 52px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 32px;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid #e1ebed;
  border-radius: 12px;
  background: #fbfdfd;
}

.patient-signature-request-row > span {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #e8f8ef;
  color: #16814b;
}

.patient-signature-request-row > span svg { width: 16px; height: 16px; }
.patient-signature-request-row > div { min-width: 0; display: grid; gap: 2px; }
.patient-signature-request-row strong { color: #244b5b; font-size: 10px; font-weight: 900; }
.patient-signature-request-row small { color: #81939a; font-size: 8px; }
.patient-signature-request-row > b { padding: 5px 8px; border-radius: 999px; background: #fff3dc; color: #a86c13; font-size: 7px; font-weight: 950; }
.patient-signature-request-row.is-complete > b { background: #e5f8ed; color: #14814d; }
.patient-signature-request-row.is-expired > b { background: #edf1f3; color: #77868c; }
.patient-signature-request-row > button { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid #d5e5e8; border-radius: 9px; background: #ffffff; color: #16828a; cursor: pointer; }
.patient-signature-request-row > button svg { width: 14px; height: 14px; }

.patient-signature-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 20px;
  border: 0;
  background: rgba(6, 28, 42, 0.48);
  backdrop-filter: blur(10px);
}

.patient-signature-dialog[open] { display: grid; place-items: center; }
.patient-signature-dialog::backdrop { background: rgba(6, 28, 42, 0.48); }

.patient-signature-dialog-card {
  width: min(720px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  display: grid;
  gap: 15px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #f4f9fa);
  box-shadow: 0 28px 75px rgba(3, 25, 39, 0.3);
  position: relative;
}

.patient-signature-dialog-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  border: 1px solid #dbe7e9;
  border-radius: 50%;
  background: #ffffff;
  color: #617781;
  cursor: pointer;
  font-size: 20px;
}

.patient-signature-dialog-card > header {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding-right: 35px;
}

.patient-signature-dialog-card > header > span {
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #e2f8fa, #eefff5);
  color: #078b94;
}

.patient-signature-dialog-card > header svg { width: 23px; height: 23px; }
.patient-signature-dialog-card > header small { color: #0c9698; font-size: 8px; font-weight: 950; letter-spacing: 0.11em; text-transform: uppercase; }
.patient-signature-dialog-card > header h2 { margin: 3px 0; color: #153d4e; font-size: 20px; font-weight: 950; }
.patient-signature-dialog-card > header p { margin: 0; color: #758b94; font-size: 9px; font-weight: 650; }

.patient-face-capture-stage {
  min-height: 390px;
  overflow: hidden;
  border: 1px solid #cee2e6;
  border-radius: 20px;
  background: #102d39;
  position: relative;
}

.patient-face-capture-stage video { width: 100%; height: 390px; display: block; object-fit: contain; object-position: center; }
.patient-face-capture-stage canvas { display: none; }
.patient-face-guide { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.patient-face-guide span { width: 210px; height: 280px; border: 2px solid rgba(255, 255, 255, 0.84); border-radius: 48% 48% 44% 44%; box-shadow: 0 0 0 999px rgba(3, 19, 28, 0.22); }

.patient-face-dialog-status {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 10px 13px;
  border: 1px solid #d8e7ea;
  border-radius: 12px;
  background: #f5fafb;
  color: #56727d;
  font-size: 9px;
  font-weight: 800;
}

.patient-face-dialog-status.is-success { border-color: #bde3cb; background: #eaf8ef; color: #147a49; }
.patient-face-dialog-status.is-error { border-color: #f0c7c9; background: #fff0f1; color: #bb3d45; }

.patient-signature-dialog-card > footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.patient-signature-dialog-card > footer button {
  min-height: 41px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  border-radius: 11px;
  cursor: pointer;
  font-size: 9px;
  font-weight: 900;
}

.patient-signature-dialog-cancel { border: 1px solid #d6e2e5; background: #ffffff; color: #60757e; }
.patient-signature-dialog-confirm { border: 0; background: linear-gradient(120deg, #0786aa, #0aaf8e); color: #ffffff; box-shadow: 0 8px 18px rgba(7, 135, 160, 0.2); }
.patient-signature-dialog-confirm svg { width: 16px; height: 16px; }

.patient-signature-pad-wrap {
  min-height: 230px;
  overflow: hidden;
  border: 1px dashed #bcd3d9;
  border-radius: 18px;
  background: #ffffff;
  position: relative;
}

.patient-signature-pad-wrap::after { content: ""; position: absolute; left: 7%; right: 7%; bottom: 52px; border-bottom: 1px solid #d8e4e7; pointer-events: none; }
.patient-signature-pad-wrap canvas { width: 100%; height: 230px; display: block; position: relative; z-index: 1; touch-action: none; cursor: crosshair; }
.patient-signature-pad-wrap > span { position: absolute; inset: 0; display: grid; place-items: center; color: #a0afb5; pointer-events: none; font-size: 10px; font-weight: 750; }
.patient-signature-pad-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.patient-signature-pad-tools button { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid #efd0d2; border-radius: 10px; background: #fff4f4; color: #be4650; cursor: pointer; font-size: 8px; font-weight: 900; }
.patient-signature-pad-tools button svg { width: 14px; height: 14px; }
.patient-signature-pad-tools small { color: #81939a; font-size: 8px; }

@media (max-width: 1100px) {
  .patient-signature-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .patient-signature-header { align-items: stretch; flex-direction: column; padding: 20px; }
  .patient-signature-whatsapp-primary { width: 100%; }
  .patient-signature-identity { grid-template-columns: 48px minmax(0, 1fr); margin-inline: 12px; }
  .patient-signature-contact { grid-column: 1 / -1; padding: 10px 0 0; border-top: 1px solid #e0ecee; border-left: 0; }
  .patient-signature-summary { grid-template-columns: 1fr; margin-inline: 12px; }
  .optional-guardian-prompt { grid-template-columns: 42px minmax(0, 1fr); margin-inline: 12px; }
  .optional-guardian-prompt button { grid-column: 1 / -1; width: 100%; }
  .patient-signature-cards { grid-template-columns: 1fr; margin-inline: 12px; }
  .patient-signature-card.is-guardian-card { grid-column: auto; }
  .patient-signature-requests { margin-inline: 12px; }
  .patient-signature-requests > header { align-items: stretch; flex-direction: column; }
  .patient-signature-requests > header button { justify-content: center; }
  .patient-signature-dialog { padding: 10px; }
  .patient-signature-dialog-card { max-height: calc(100vh - 20px); padding: 18px; border-radius: 20px; }
  .patient-face-capture-stage,
  .patient-face-capture-stage video { min-height: 310px; height: 310px; }
  .patient-signature-dialog-card > footer { display: grid; grid-template-columns: 1fr 1fr; }
}

/* Sistema de botoes de acao - padrao Tec Dent */
:root {
  --tec-action-height: 44px;
  --tec-action-radius: 12px;
  --tec-action-font-size: 11px;
  --tec-action-primary-start: #08779b;
  --tec-action-primary-end: #0badaa;
  --tec-action-success-start: #0b8b65;
  --tec-action-success-end: #10aa78;
  --tec-action-danger-start: #d94752;
  --tec-action-danger-end: #bb2436;
  --tec-action-warning-start: #f1a126;
  --tec-action-warning-end: #e47a13;
  --tec-action-neutral-border: #ccdde2;
  --tec-action-neutral-background: #f5f9fa;
  --tec-action-neutral-text: #4f6d7c;
}

button:is(
  .blue-action,
  .save-action,
  .green-action,
  .danger-action,
  .neutral-action,
  .orange-action,
  .primary-action,
  .secondary-action,
  .budget-primary-action,
  .budget-pay-action,
  .budget-save-action,
  .budget-light-action,
  .tooth-save-action,
  .agenda-save-button,
  .agenda-delete-button,
  .clinical-document-save,
  .clinical-document-cancel,
  .finance-payment-save,
  .orthodontic-primary-action,
  .orthodontic-neutral-action,
  .orthodontic-danger-action,
  .orthodontic-back-action,
  .patient-signature-dialog-confirm,
  .patient-signature-dialog-cancel,
  .franchise-register-save,
  .franchise-register-cancel,
  .clinic-register-save,
  .clinic-register-cancel,
  .day-professional-cancel-action
) {
  min-height: var(--tec-action-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--tec-action-radius);
  appearance: none;
  font-family: inherit;
  font-size: var(--tec-action-font-size);
  font-weight: 950;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 9px 20px rgba(7, 73, 95, .13);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease, color .18s ease, filter .18s ease;
}

button:is(
  .blue-action,
  .save-action,
  .primary-action,
  .budget-primary-action,
  .budget-save-action,
  .tooth-save-action,
  .agenda-save-button,
  .clinical-document-save,
  .finance-payment-save,
  .orthodontic-primary-action,
  .patient-signature-dialog-confirm,
  .franchise-register-save,
  .clinic-register-save
) {
  border-color: #087f92;
  background: linear-gradient(135deg, var(--tec-action-primary-start), var(--tec-action-primary-end));
  color: #ffffff;
  box-shadow: 0 9px 20px rgba(7, 133, 151, .22);
}

button:is(.green-action, .budget-pay-action) {
  border-color: #0a865f;
  background: linear-gradient(135deg, var(--tec-action-success-start), var(--tec-action-success-end));
  color: #ffffff;
  box-shadow: 0 9px 20px rgba(10, 139, 101, .2);
}

button:is(
  .neutral-action,
  .secondary-action,
  .budget-light-action,
  .clinical-document-cancel,
  .orthodontic-neutral-action,
  .orthodontic-back-action,
  .patient-signature-dialog-cancel,
  .franchise-register-cancel,
  .clinic-register-cancel,
  .day-professional-cancel-action
) {
  border-color: var(--tec-action-neutral-border);
  background: var(--tec-action-neutral-background);
  color: var(--tec-action-neutral-text);
  box-shadow: none;
}

button:is(.danger-action, .agenda-delete-button, .orthodontic-danger-action) {
  border-color: #c93644;
  background: linear-gradient(135deg, var(--tec-action-danger-start), var(--tec-action-danger-end));
  color: #ffffff;
  box-shadow: 0 9px 20px rgba(194, 43, 56, .2);
}

button.orange-action {
  border-color: #dd7d16;
  background: linear-gradient(135deg, var(--tec-action-warning-start), var(--tec-action-warning-end));
  color: #ffffff;
  box-shadow: 0 9px 20px rgba(218, 118, 15, .2);
}

button:is(
  .blue-action,
  .save-action,
  .green-action,
  .danger-action,
  .neutral-action,
  .orange-action,
  .primary-action,
  .secondary-action,
  .budget-primary-action,
  .budget-pay-action,
  .budget-save-action,
  .budget-light-action,
  .tooth-save-action,
  .agenda-save-button,
  .agenda-delete-button,
  .clinical-document-save,
  .clinical-document-cancel,
  .finance-payment-save,
  .orthodontic-primary-action,
  .orthodontic-neutral-action,
  .orthodontic-danger-action,
  .orthodontic-back-action,
  .patient-signature-dialog-confirm,
  .patient-signature-dialog-cancel,
  .franchise-register-save,
  .franchise-register-cancel,
  .clinic-register-save,
  .clinic-register-cancel,
  .day-professional-cancel-action
):hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(.98) saturate(1.04);
}

button:is(
  .blue-action,
  .save-action,
  .green-action,
  .danger-action,
  .neutral-action,
  .orange-action,
  .primary-action,
  .secondary-action,
  .budget-primary-action,
  .budget-pay-action,
  .budget-save-action,
  .budget-light-action,
  .tooth-save-action,
  .agenda-save-button,
  .agenda-delete-button,
  .clinical-document-save,
  .clinical-document-cancel,
  .finance-payment-save,
  .orthodontic-primary-action,
  .orthodontic-neutral-action,
  .orthodontic-danger-action,
  .orthodontic-back-action,
  .patient-signature-dialog-confirm,
  .patient-signature-dialog-cancel,
  .franchise-register-save,
  .franchise-register-cancel,
  .clinic-register-save,
  .clinic-register-cancel,
  .day-professional-cancel-action
):focus-visible {
  outline: 3px solid rgba(13, 170, 171, .26);
  outline-offset: 3px;
}

button:is(
  .blue-action,
  .save-action,
  .green-action,
  .danger-action,
  .neutral-action,
  .orange-action,
  .primary-action,
  .secondary-action,
  .budget-primary-action,
  .budget-pay-action,
  .budget-save-action,
  .budget-light-action,
  .tooth-save-action,
  .agenda-save-button,
  .agenda-delete-button,
  .clinical-document-save,
  .clinical-document-cancel,
  .finance-payment-save,
  .orthodontic-primary-action,
  .orthodontic-neutral-action,
  .orthodontic-danger-action,
  .orthodontic-back-action,
  .patient-signature-dialog-confirm,
  .patient-signature-dialog-cancel,
  .franchise-register-save,
  .franchise-register-cancel,
  .clinic-register-save,
  .clinic-register-cancel,
  .day-professional-cancel-action
):active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(7, 73, 95, .13);
}

button:is(
  .blue-action,
  .save-action,
  .green-action,
  .danger-action,
  .neutral-action,
  .orange-action,
  .primary-action,
  .secondary-action,
  .budget-primary-action,
  .budget-pay-action,
  .budget-save-action,
  .budget-light-action,
  .tooth-save-action,
  .agenda-save-button,
  .agenda-delete-button,
  .clinical-document-save,
  .clinical-document-cancel,
  .finance-payment-save,
  .orthodontic-primary-action,
  .orthodontic-neutral-action,
  .orthodontic-danger-action,
  .orthodontic-back-action,
  .patient-signature-dialog-confirm,
  .patient-signature-dialog-cancel,
  .franchise-register-save,
  .franchise-register-cancel,
  .clinic-register-save,
  .clinic-register-cancel,
  .day-professional-cancel-action
):disabled {
  opacity: .52;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: grayscale(.16);
}

button:is(
  .blue-action,
  .save-action,
  .green-action,
  .danger-action,
  .neutral-action,
  .orange-action,
  .primary-action,
  .secondary-action,
  .budget-primary-action,
  .budget-pay-action,
  .budget-save-action,
  .budget-light-action,
  .tooth-save-action,
  .agenda-save-button,
  .agenda-delete-button,
  .clinical-document-save,
  .clinical-document-cancel,
  .finance-payment-save,
  .orthodontic-primary-action,
  .orthodontic-neutral-action,
  .orthodontic-danger-action,
  .orthodontic-back-action,
  .patient-signature-dialog-confirm,
  .patient-signature-dialog-cancel,
  .franchise-register-save,
  .franchise-register-cancel,
  .clinic-register-save,
  .clinic-register-cancel,
  .day-professional-cancel-action
) svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

button.dialog-close-button,
button.patient-signature-dialog-close {
  width: 38px;
  height: 38px;
  min-height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid #d8e5e8;
  border-radius: 12px;
  background: #f5f9fa;
  color: #6d828c;
  cursor: pointer;
  box-shadow: none;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}

button.dialog-close-button:hover,
button.patient-signature-dialog-close:hover {
  border-color: #b9d4da;
  background: #eaf5f5;
  color: #0a7783;
  transform: translateY(-1px);
}

button.dialog-close-button:focus-visible,
button.patient-signature-dialog-close:focus-visible {
  outline: 3px solid rgba(13, 170, 171, .24);
  outline-offset: 3px;
}

/* Cadastro digital do profissional */
.professional-digital-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 18px;
  border: 0;
  background: rgba(6, 28, 42, .48);
  backdrop-filter: blur(9px);
}

.professional-digital-dialog[open] { display: grid; place-items: center; }
.professional-digital-dialog::backdrop { background: rgba(6, 28, 42, .48); }

.professional-digital-dialog-card {
  width: min(720px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 24px;
  background: linear-gradient(180deg, #fff, #f4f9fa);
  box-shadow: 0 28px 75px rgba(3, 25, 39, .3);
}

.professional-digital-dialog-card > header {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 12px;
  padding: 22px;
  border-bottom: 1px solid #deeaec;
}

.professional-digital-dialog-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg, #e2f8fa, #eafff1);
  color: #078b94;
}

.professional-digital-dialog-icon svg { width: 23px; height: 23px; }
.professional-digital-dialog-card > header small,
.professional-digital-result small { color: #0b9297; font-size: 9px; font-weight: 950; letter-spacing: .11em; }
.professional-digital-dialog-card > header h2 { margin: 3px 0; color: #163d4d; font-size: 21px; font-weight: 950; }
.professional-digital-dialog-card > header p { margin: 0; color: #718891; font-size: 10px; font-weight: 650; }

.professional-digital-dialog-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 22px;
}

.professional-digital-dialog-body label,
.professional-digital-result label { display: grid; gap: 7px; color: #345564; font-size: 10px; font-weight: 900; }
.professional-digital-dialog-body input,
.professional-digital-dialog-body select,
.professional-digital-result input { min-height: 44px; padding: 0 12px; border: 1px solid #cddfe3; border-radius: 11px; background: #fff; color: #183f50; font: inherit; }
.professional-digital-span-2 { grid-column: 1 / -1; }

.professional-digital-explanation {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 13px;
  border: 1px solid #cce6df;
  border-radius: 13px;
  background: #effaf6;
  color: #337064;
}

.professional-digital-explanation svg { width: 20px; height: 20px; justify-self: center; }
.professional-digital-explanation span { display: grid; gap: 3px; }
.professional-digital-explanation strong { font-size: 10px; }
.professional-digital-explanation small { font-size: 9px; line-height: 1.5; }

.professional-digital-dialog-card > footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 16px 22px 20px;
  border-top: 1px solid #deeaec;
}

.professional-digital-result {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  padding: 24px;
}

.professional-digital-result-check { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: #dff6e8; color: #16814b; }
.professional-digital-result-check svg { width: 23px; height: 23px; }
.professional-digital-result h3 { margin: 3px 0; color: #173e4e; font-size: 18px; }
.professional-digital-result p { margin: 0; color: #738891; font-size: 10px; }
.professional-digital-result label { grid-column: 1 / -1; }
.professional-digital-result-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }

.professional-name-cell { display: grid; justify-items: start; gap: 5px; }
.professional-name-cell > strong { color: inherit; font-size: inherit; }
.professional-digital-status { display: inline-flex; align-items: center; min-height: 22px; padding: 4px 8px; border-radius: 999px; font-size: 8px; font-weight: 950; letter-spacing: .025em; }
.professional-digital-status.is-pending { background: #fff2d9; color: #a76808; }
.professional-digital-status.is-progress { background: #e4f4fb; color: #087b9a; }
.professional-digital-status.is-complete { background: #e1f7e9; color: #137d49; }

@media (max-width: 640px) {
  .professional-digital-dialog { padding: 8px; }
  .professional-digital-dialog-card { max-height: calc(100vh - 16px); border-radius: 18px; }
  .professional-digital-dialog-card > header { grid-template-columns: 42px minmax(0, 1fr) 38px; padding: 18px; }
  .professional-digital-dialog-icon { width: 42px; height: 42px; }
  .professional-digital-dialog-body { grid-template-columns: 1fr; padding: 18px; }
  .professional-digital-span-2 { grid-column: auto; }
  .professional-digital-result-actions,
  .professional-digital-dialog-card > footer { display: grid; grid-template-columns: 1fr; }
}

/* Franqueadora: recolhimento automatico sem botao */
@media (min-width: 1051px) {
  body:not(.franchise-sidebar-collapsed) .clinic-portal.franchise-portal:not(:has(.portal-franchise-sidebar:hover)):not(:has(.portal-franchise-sidebar :focus-visible)),
  body:not(.franchise-sidebar-collapsed) .workspace-view.access-manager-dialog.is-active:not(:has(> .franchise-sidebar:hover)):not(:has(> .franchise-sidebar :focus-visible)),
  body:not(.franchise-sidebar-collapsed) .workspace-view.profile-manager-dialog.is-active:not(:has(> .franchise-sidebar:hover)):not(:has(> .franchise-sidebar :focus-visible)) {
    padding-left: 88px !important;
  }

  body:not(.franchise-sidebar-collapsed) .franchise-sidebar:not(:hover):not(:has(:focus-visible)) {
    width: 88px !important;
    padding: 20px 10px !important;
    transition: width .22s ease, padding .22s ease, box-shadow .22s ease !important;
  }

  body:not(.franchise-sidebar-collapsed) .franchise-sidebar:not(:hover):not(:has(:focus-visible)) .franchise-sidebar-brand {
    width: 100% !important;
    min-height: 66px !important;
    border-radius: 17px !important;
  }

  body:not(.franchise-sidebar-collapsed) .franchise-sidebar:not(:hover):not(:has(:focus-visible)) .franchise-sidebar-brand img {
    width: 54px !important;
    height: 54px !important;
  }

  body:not(.franchise-sidebar-collapsed) .franchise-sidebar:not(:hover):not(:has(:focus-visible)) :is(
    .franchise-sidebar-copy,
    .franchise-sidebar-user-copy,
    .franchise-profile-chevron
  ) {
    display: none !important;
  }

  body:not(.franchise-sidebar-collapsed) .franchise-sidebar:not(:hover):not(:has(:focus-visible)) .franchise-sidebar-item {
    justify-content: center !important;
    gap: 0 !important;
    padding: 7px !important;
  }

  body:not(.franchise-sidebar-collapsed) .franchise-sidebar:not(:hover):not(:has(:focus-visible)) .franchise-sidebar-group[open] .franchise-sidebar-subnav {
    display: none !important;
  }

  body:not(.franchise-sidebar-collapsed) .franchise-sidebar:not(:hover):not(:has(:focus-visible)) .franchise-sidebar-user {
    justify-content: center !important;
    padding: 8px !important;
  }

  body:not(.franchise-sidebar-collapsed) .franchise-sidebar:hover,
  body:not(.franchise-sidebar-collapsed) .franchise-sidebar:has(:focus-visible) {
    transition: width .22s ease, padding .22s ease, box-shadow .22s ease !important;
  }
}

/* Ficha do profissional — menu lateral no padrão da ficha do paciente */
[data-view-panel="CadastroProfissionais"] .professional-create-view {
  grid-template-columns: 246px minmax(0, 1fr);
  gap: 18px;
}

[data-view-panel="CadastroProfissionais"] .professional-form-sidebar {
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(205, 222, 228, .88);
  border-radius: 24px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 14px 38px rgba(31, 66, 82, .10), 0 2px 6px rgba(31, 66, 82, .04);
  backdrop-filter: blur(20px) saturate(150%);
}

[data-view-panel="CadastroProfissionais"] .professional-identity-card {
  position: relative;
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 4px;
  overflow: hidden;
  padding: 12px 10px 11px;
  border: 1px solid #dcebed;
  border-radius: 15px;
  background:
    radial-gradient(circle at 100% 0%, rgba(30, 186, 180, .10), transparent 43%),
    linear-gradient(145deg, #ffffff, #f7fbfc);
  box-shadow: 0 7px 18px rgba(29, 75, 91, .07);
  text-align: center;
}

[data-view-panel="CadastroProfissionais"] .professional-identity-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, #0baab2, #22c59b);
}

[data-view-panel="CadastroProfissionais"] .professional-identity-card > span {
  color: #0a9997;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .10em;
  line-height: 1;
  text-transform: uppercase;
}

[data-view-panel="CadastroProfissionais"] .professional-identity-card > strong {
  color: #102f40;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -.015em;
  line-height: 1.25;
  text-wrap: balance;
}

[data-view-panel="CadastroProfissionais"] .professional-identity-card > small {
  min-height: 21px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
  padding: 0 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #eaf7f5;
  color: #087f78;
  font-size: 9px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-view-panel="CadastroProfissionais"] .professional-identity-card > small::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #17b699;
  box-shadow: 0 0 0 3px rgba(23, 182, 153, .10);
}

[data-view-panel="CadastroProfissionais"] .professional-photo-box {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 0;
  padding: 12px 10px 11px;
  border: 1px solid #dcebed;
  border-radius: 15px;
  background: linear-gradient(145deg, #ffffff, #f7fbfc);
  box-shadow: 0 7px 18px rgba(29, 75, 91, .07);
}

[data-view-panel="CadastroProfissionais"] .professional-photo-box .patient-photo-placeholder {
  width: 94px;
  height: 94px;
  padding: 13px 0 11px;
  border: 1px solid #dce8ec;
  background: linear-gradient(145deg, #ffffff, #f3f8fa);
  box-shadow: inset 0 0 0 5px #f4f8f9, 0 5px 16px rgba(32, 68, 84, .08);
}

[data-view-panel="CadastroProfissionais"] .professional-photo-box .patient-photo-placeholder:has(img) {
  padding: 0;
  border-color: #c8dce3;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(32, 68, 84, .12);
}

[data-view-panel="CadastroProfissionais"] .professional-photo-box .patient-photo-placeholder svg {
  width: 34px;
  height: 34px;
  color: #9eb0b8;
}

[data-view-panel="CadastroProfissionais"] .professional-photo-box .patient-photo-placeholder span {
  color: #9aabb3;
  font-size: 8px;
  font-weight: 850;
}

[data-view-panel="CadastroProfissionais"] .professional-photo-box .professional-photo-link {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #dbe9ec;
  border-radius: 999px;
  background: #f8fbfc;
  color: #087e91;
  font-size: 9px;
  font-weight: 800;
}

[data-view-panel="CadastroProfissionais"] .professional-photo-box .professional-photo-link:hover {
  border-color: #b9dce0;
  background: #eef9f9;
  color: #076f79;
}

[data-view-panel="CadastroProfissionais"] .professional-zip-field {
  align-content: start;
}

[data-view-panel="CadastroProfissionais"] .professional-zip-status {
  min-height: 14px;
  color: #657d89;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.35;
}

[data-view-panel="CadastroProfissionais"] .professional-zip-status[data-state="loading"] {
  color: #087ca1;
}

[data-view-panel="CadastroProfissionais"] .professional-zip-status[data-state="success"] {
  color: #087b64;
}

[data-view-panel="CadastroProfissionais"] .professional-zip-status[data-state="error"] {
  color: #b33b45;
}

[data-view-panel="CadastroProfissionais"] .professional-side-menu {
  display: grid;
  gap: 0;
  margin-top: 3px;
  overflow: hidden;
  border: 1px solid #dfeaec;
  border-radius: 17px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(32, 68, 84, .075);
}

[data-view-panel="CadastroProfissionais"] .professional-side-menu button {
  position: relative;
  min-height: 49px;
  justify-content: flex-start;
  gap: 10px;
  padding: 5px 31px 5px 9px;
  border-radius: 0;
  background: #ffffff;
  color: #274b5d;
  box-shadow: none;
  font-size: 11px;
  font-weight: 760;
  text-align: left;
  transition: background-color .16s ease, color .16s ease;
}

[data-view-panel="CadastroProfissionais"] .professional-side-menu button:not(:last-child)::before {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 0;
  left: 48px;
  height: 1px;
  background: #e8eff1;
}

[data-view-panel="CadastroProfissionais"] .professional-side-menu button::after {
  content: "\203A";
  position: absolute;
  right: 12px;
  top: 50%;
  color: #a7b7be;
  font-size: 21px;
  font-weight: 500;
  line-height: 1;
  transform: translateY(-52%);
}

[data-view-panel="CadastroProfissionais"] .professional-side-menu button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  padding: 6px;
  border-radius: 8px;
  background: #e9f5ff;
  color: #1684d6;
  box-sizing: content-box;
  transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

[data-view-panel="CadastroProfissionais"] .professional-side-menu button:nth-child(2) svg {
  background: #e9f8f5;
  color: #07977e;
}

[data-view-panel="CadastroProfissionais"] .professional-side-menu button:nth-child(3) svg {
  background: #f0edff;
  color: #7357d8;
}

[data-view-panel="CadastroProfissionais"] .professional-side-menu button:nth-child(4) svg {
  background: #fff3e5;
  color: #e78816;
}

[data-view-panel="CadastroProfissionais"] .professional-side-menu button:nth-child(5) svg {
  background: #e7f8fb;
  color: #089cac;
}

[data-view-panel="CadastroProfissionais"] .professional-side-menu button:hover {
  background: #f6fafb;
  color: #0b7380;
}

[data-view-panel="CadastroProfissionais"] .professional-side-menu button:hover svg {
  transform: scale(1.04);
}

[data-view-panel="CadastroProfissionais"] .professional-side-menu button.is-active {
  background: linear-gradient(90deg, #edfafa, #f8fdfd);
  color: #076f79;
  box-shadow: inset 3px 0 0 #10a8a3;
}

[data-view-panel="CadastroProfissionais"] .professional-side-menu button.is-active svg {
  background: linear-gradient(145deg, #16b9b2, #078a99);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(8, 138, 153, .20);
}

[data-view-panel="CadastroProfissionais"] .professional-side-menu button.is-active::after {
  color: #0e9ba0;
}

@media (max-width: 880px) {
  [data-view-panel="CadastroProfissionais"] .professional-create-view {
    grid-template-columns: 1fr;
  }

  [data-view-panel="CadastroProfissionais"] .professional-form-sidebar {
    display: flex;
    padding: 9px;
    border-radius: 18px;
  }

  [data-view-panel="CadastroProfissionais"] .professional-identity-card,
  [data-view-panel="CadastroProfissionais"] .professional-photo-box {
    display: none;
  }

  [data-view-panel="CadastroProfissionais"] .professional-side-menu {
    display: flex;
    width: 100%;
    gap: 7px;
    overflow-x: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  [data-view-panel="CadastroProfissionais"] .professional-side-menu button {
    min-height: 44px;
    flex: 0 0 auto;
    padding: 5px 11px 5px 7px;
    border: 1px solid #e0eaed;
    border-radius: 12px;
    white-space: nowrap;
  }

  [data-view-panel="CadastroProfissionais"] .professional-side-menu button::before,
  [data-view-panel="CadastroProfissionais"] .professional-side-menu button::after {
    display: none;
  }
}

/* Franqueadora: prioridade final para o tema cadastrado sobre os estilos legados */
body.franchise-theme-active .clinic-portal.franchise-portal .portal-franchise-sidebar,
body.franchise-theme-active .workspace-view.access-manager-dialog.is-active > .franchise-sidebar,
body.franchise-theme-active .workspace-view.profile-manager-dialog.is-active > .franchise-sidebar,
body.franchise-theme-active .franchise-sidebar:hover,
body.franchise-theme-active .franchise-sidebar:focus-within {
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--tenant-primary) 34%, transparent), transparent 29%),
    radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--tenant-accent) 14%, transparent), transparent 32%),
    linear-gradient(165deg, var(--tenant-sidebar-deep) 0%, var(--tenant-sidebar-mid) 58%, var(--tenant-sidebar-end) 125%) !important;
  box-shadow: 18px 0 42px color-mix(in srgb, var(--tenant-primary) 22%, rgba(2, 20, 31, .24)) !important;
}

body.franchise-theme-active .workspace-view.access-manager-dialog.is-active .access-manager-shell,
body.franchise-theme-active .workspace-view.profile-manager-dialog.is-active .profile-manager-panel {
  background:
    radial-gradient(circle at 92% 2%, var(--tenant-primary-glow), transparent 25%),
    linear-gradient(180deg, var(--tenant-primary-soft) 0%, #ffffff 58%) !important;
}

body.franchise-theme-active .workspace-view.access-manager-dialog.is-active .access-manager-shell > .access-manager-header,
body.franchise-theme-active .workspace-view.profile-manager-dialog.is-active .profile-manager-panel > .access-manager-header {
  background: linear-gradient(
    115deg,
    var(--tenant-sidebar-deep) 0%,
    var(--tenant-primary) 62%,
    color-mix(in srgb, var(--tenant-primary) 76%, var(--tenant-accent)) 100%
  ) !important;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--tenant-primary) 25%, rgba(5, 36, 60, .18)) !important;
}

body.franchise-theme-active .workspace-view.access-manager-dialog.is-active .access-manager-header small,
body.franchise-theme-active .workspace-view.profile-manager-dialog.is-active .access-manager-header small {
  color: var(--tenant-accent-on-dark) !important;
}

@media (max-width: 1050px) {
  body.franchise-theme-active .clinic-portal.franchise-portal .portal-franchise-sidebar,
  body.franchise-theme-active .workspace-view.access-manager-dialog.is-active > .franchise-sidebar,
  body.franchise-theme-active .workspace-view.profile-manager-dialog.is-active > .franchise-sidebar,
  body.franchise-theme-active .franchise-sidebar:hover,
  body.franchise-theme-active .franchise-sidebar:focus-within {
    background: linear-gradient(105deg, var(--tenant-sidebar-deep), var(--tenant-sidebar-end)) !important;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--tenant-primary) 22%, rgba(3, 37, 53, .16)) !important;
  }

  body.franchise-theme-active .franchise-sidebar .franchise-sidebar-group[open] .franchise-sidebar-subnav {
    background: var(--tenant-sidebar-mid) !important;
    box-shadow: 0 16px 30px color-mix(in srgb, var(--tenant-primary) 24%, rgba(0, 23, 34, .25)) !important;
  }
}

/* Contratos do paciente — mantém a prévia acima do estilo global de dialogs. */
body .patient-contract-preview-dialog {
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: transparent;
}

@media (max-width: 680px) {
  body .patient-contract-preview-dialog {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0;
    border-radius: 0;
  }

  body .patient-contract-preview-card {
    max-height: 100%;
    border-radius: 0;
  }
}
