@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/assets/fonts/BricolageGrotesque.ttf') format('truetype');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
/* Tokens e componentes únicos. CSS puro; sem compilador ou CDN em produção. */
:root {
  color-scheme: light;
  --bg: #e6edf1;
  --surface: #ffffffa8;
  --solid: #f5f9fc;
  --muted-surface: #e6edf2b8;
  --text: #1c2b32;
  --muted: #60717c;
  --border: #526b7b24;
  --accent: #0074d9;
  --accent-soft: #dcecfbe0;
  --success: #087e65;
  --success-soft: #dff3ebd9;
  --danger: #b9364b;
  --danger-soft: #fbe6e9d9;
  --warning: #956416;
  --warning-soft: #faf0d9d9;
  --glass-edge: #ffffffc7;
  --glass-highlight: #ffffffb3;
  --glass-panel: #f6fafd73;
  --glass-menu: #f6f9fdef;
  --window-shadow: 0 28px 80px #263f541b, 0 6px 20px #263f540d, inset 0 1px 0 #ffffffcc;
  --shadow: 0 6px 20px #31455709, 0 1px 3px #31455706, inset 0 1px 0 #ffffffb3;
  --button-fill: linear-gradient(180deg, #1484e8, #0072d8);
  --nav-active: linear-gradient(130deg, #253e46, #172b34);
  --nav-active-text: #ffffff;
  --radius: 18px;
  --font:
    'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scrollbar-gutter: auto;
}
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 3% 7%, #b8dddca8, transparent 47%),
    radial-gradient(ellipse at 100% 100%, #c5c7ea91, transparent 48%),
    radial-gradient(ellipse at 70% 10%, #e8f4fc, transparent 53%), var(--bg);
  background-attachment: fixed;
  min-height: 100dvh;
  color: var(--text);
  font: 13px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.55;
}
a {
  color: var(--accent);
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 29px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.035em;
}
h2 {
  font-size: 17px;
  line-height: 1.35;
  font-weight: 550;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 14px;
  line-height: 1.45;
  font-weight: 580;
}
p + p {
  margin-top: 10px;
}
svg.icon {
  width: 18px;
  height: 18px;
  flex: none;
  vertical-align: middle;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: none;
}
[hidden] {
  display: none !important;
}
.boot {
  display: grid;
  place-items: center;
  min-height: 70vh;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.nowrap {
  white-space: nowrap;
}
.break {
  overflow-wrap: anywhere;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wrap {
  flex-wrap: wrap;
}
.spread {
  justify-content: space-between;
}
.end {
  justify-content: flex-end;
}
.grow {
  flex: 1;
  min-width: 0;
}
.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}
.shell {
  width: calc(100% - 28px);
  max-width: none;
  height: calc(100dvh - 28px);
  margin: 14px auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--glass-edge);
  border-radius: 24px;
  background: var(--glass-panel);
  box-shadow: var(--window-shadow);
  backdrop-filter: blur(36px) saturate(125%);
  -webkit-backdrop-filter: blur(36px) saturate(125%);
}
.topbar {
  height: 66px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  gap: 16px;
  padding: 0 22px;
  background: var(--glass-panel);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  aspect-ratio: auto;
  background: none;
  flex: none;
  color: var(--text);
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.055em;
}
.layout {
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr);
  gap: 0;
  padding-top: 0;
  flex: 1;
  min-height: 0;
}
.sidebar {
  align-self: stretch;
  position: relative;
  top: 0;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 22px 14px 16px;
  background: var(--glass-panel);
  border-right: 1px solid var(--border);
}
.nav-group + .nav-group {
  margin-top: 22px;
  padding-top: 0;
  border: 0;
}
.nav-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 0 12px 9px;
}
.nav-link {
  color: var(--muted);
  font-weight: 520;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: 12px;
  border: 1px solid transparent;
  min-height: 42px;
  transition:
    background 0.18s,
    color 0.18s,
    box-shadow 0.18s;
}
.nav-link:hover {
  color: var(--text);
  background: var(--surface);
}
.nav-link[aria-current='page'] {
  color: var(--nav-active-text);
  border-color: var(--glass-highlight);
  background: var(--nav-active);
  box-shadow:
    0 4px 10px #14374916,
    inset 0 1px 0 #ffffff1f;
}
.main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 26px;
}
.page-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 1px 5px 10px 1px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.section-tabs {
  display: flex;
  gap: 3px;
  flex-wrap: nowrap;
  overflow: auto;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  padding: 4px;
  margin-bottom: 16px;
  border: 1px solid var(--glass-edge);
  border-radius: 12px;
  background: var(--muted-surface);
  box-shadow: inset 0 1px 3px #26435008;
  scrollbar-width: none;
}
.section-tabs [aria-pressed='true'] {
  color: var(--text);
  border-color: var(--glass-edge);
  background: var(--surface);
  box-shadow:
    0 2px 6px #23435710,
    inset 0 1px 0 var(--glass-highlight);
}
.integration-panel {
  margin-top: 12px;
}
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex: none;
}
.page-head p {
  margin-top: 6px;
  color: var(--muted);
  max-width: 620px;
  font-size: 12px;
}
.head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.button.mobile-menu {
  display: none;
}
.drawer-backdrop {
  display: none;
}
.user-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  padding: 9px 14px;
  min-height: 40px;
  font-weight: 560;
  font-size: 12px;
  white-space: nowrap;
  box-shadow:
    0 1px 2px #1b344209,
    inset 0 1px 0 var(--glass-highlight);
  transition:
    background 0.18s,
    border-color 0.18s,
    box-shadow 0.18s,
    transform 0.18s;
}
.button:hover {
  background: color-mix(in srgb, var(--solid) 75%, var(--surface));
  border-color: color-mix(in srgb, var(--border) 65%, var(--muted));
  box-shadow:
    0 3px 10px #23495e0d,
    inset 0 1px 0 var(--glass-highlight);
}
.button:active {
  transform: scale(0.98);
}
.button.primary {
  color: #fff;
  background: var(--button-fill);
  border-color: #ffffff33;
  box-shadow:
    0 3px 9px #0872cf25,
    inset 0 1px 0 #ffffff29;
}
.button.primary:hover {
  background: linear-gradient(180deg, #118bec, #006ccd);
  border-color: #ffffff4d;
  box-shadow:
    0 5px 14px #0872cf36,
    inset 0 1px 0 #ffffff29;
}
.button.danger {
  color: var(--danger);
  background: var(--danger-soft);
}
.button.ghost {
  background: transparent;
  box-shadow: none;
  border-color: transparent;
}
.button.compact {
  min-height: 34px;
  padding: 6px 11px;
  border-radius: 9px;
}
.icon-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 11px;
  flex: none;
}
.pill {
  border-radius: 11px;
}
.button .icon {
  width: 16px;
  height: 16px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  background: var(--muted-surface);
  border: 1px solid var(--glass-highlight);
  border-radius: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 560;
  white-space: nowrap;
}
.badge.blue {
  color: var(--accent);
  background: var(--accent-soft);
}
.badge.green {
  color: var(--success);
  background: var(--success-soft);
}
.badge.red {
  color: var(--danger);
  background: var(--danger-soft);
}
.badge.amber {
  color: var(--warning);
  background: var(--warning-soft);
}
.card {
  background: var(--surface);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  min-width: 0;
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.card-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.metric {
  padding: 19px;
  position: relative;
  overflow: hidden;
}
.metric-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.metric strong {
  display: block;
  font-size: 31px;
  letter-spacing: -0.04em;
  line-height: 1.2;
  margin-top: 14px;
  font-weight: 580;
}
.metric .small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}
.empty {
  padding: 30px 18px;
  text-align: center;
  color: var(--muted);
}
.empty .icon {
  width: 40px;
  height: 40px;
  padding: 10px;
  margin-bottom: 12px;
  color: var(--muted);
  background: var(--muted-surface);
  border: 1px solid var(--glass-edge);
  border-radius: 13px;
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}
.empty strong {
  display: block;
  color: var(--text);
  font-weight: 620;
  margin-bottom: 5px;
}
.empty .button {
  margin-top: 14px;
}
.notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--warning);
  background: var(--warning-soft);
  border: 1px solid color-mix(in srgb, var(--warning) 25%, transparent);
  border-radius: 14px;
  padding: 12px 14px;
}
.notice.success {
  color: var(--success);
  background: var(--success-soft);
}
.notice.error {
  color: var(--danger);
  background: var(--danger-soft);
}
.notice.info {
  color: var(--accent);
  background: var(--accent-soft);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  position: relative;
}
.field > label {
  color: var(--text);
  font-size: 12px;
  font-weight: 520;
  padding: 0;
}
.input {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  background: var(--surface);
  box-shadow: none;
  transition:
    border-color 0.18s,
    box-shadow 0.18s,
    background 0.18s;
}
.input::placeholder {
  color: var(--muted);
  opacity: 0.75;
}
textarea.input {
  min-height: 100px;
  resize: vertical;
  line-height: 1.55;
}
select.input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image: url('data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%236b7b86%27 stroke-width=%271.8%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27m6 9 6 6 6-6%27/%3E%3C/svg%3E');
  background-size: 20px;
  background-position: right 10px center;
  background-repeat: no-repeat;
}
.input[readonly] {
  background: var(--muted-surface);
}
.field-hint,
.field-feedback {
  font-size: 11px;
  color: var(--muted);
  min-height: 16px;
}
.field-feedback:empty {
  display: none;
}
.field.invalid .input,
.field.invalid .input:hover,
.field.invalid .input:focus,
.field.invalid .input:focus-visible {
  border-color: var(--danger);
  box-shadow: none;
}
.field.invalid .field-feedback {
  color: var(--danger);
}
.field.valid .field-feedback {
  color: var(--success);
}
.check-label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--text);
  min-height: 44px;
  cursor: pointer;
}
.check-label input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  flex: none;
  margin: 2px 0 0;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  box-shadow:
    inset 0 1px 2px #26455a08,
    0 1px 0 var(--glass-highlight);
  cursor: pointer;
  position: relative;
  transition:
    background 0.16s,
    border-color 0.16s;
}
.form-error {
  margin-bottom: 14px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.toolbar .field {
  min-width: 150px;
}
.search {
  position: relative;
  width: 275px;
  max-width: 100%;
}
.search .input {
  border-radius: 11px;
  padding-left: 39px;
}
.search > .icon {
  position: absolute;
  left: 14px;
  top: 14px;
  color: var(--muted);
  width: 16px;
}
.suggestions {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 6px;
  padding: 6px;
  border: 1px solid var(--glass-edge);
  border-radius: 14px;
  box-shadow:
    0 12px 32px #142c4526,
    inset 0 1px 0 var(--glass-highlight);
  background: var(--glass-menu);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  max-height: 228px;
  overflow: auto;
}
.suggestion {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  color: var(--text);
  min-height: 54px;
}
.suggestion:hover,
.suggestion[aria-selected='true'] {
  background: var(--accent-soft);
}
.suggestion strong {
  display: block;
  font-size: 12px;
}
.suggestion span.small {
  display: block;
  color: var(--muted);
}
.picker-status {
  font-size: 11px;
  color: var(--muted);
}
.picker-status.selected {
  color: var(--success);
}
.patients-labels,
.patient-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.55fr) minmax(150px, 1fr) minmax(115px, 0.8fr) 174px;
  gap: 18px;
  align-items: center;
}
.patients-labels {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.045em;
  margin: 0 0 14px;
  padding: 0;
}
.patients-labels span:last-child {
  text-align: right;
}
.patient-row {
  padding: 16px 18px;
  margin-bottom: 10px;
  border-radius: 16px;
  transition:
    background 0.18s,
    border-color 0.18s;
}
.patient-row .row {
  min-width: 0;
}
.patient-title {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.patient-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border: 1px solid var(--glass-edge);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  flex: none;
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}
.patient-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.patient-detail {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}
.patient-detail > .icon {
  color: var(--muted);
  width: 15px;
  height: 15px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 12px;
}
.table-scroll {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
}
.table {
  border-collapse: collapse;
  width: 100%;
  min-width: 620px;
  text-align: left;
}
.table th {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 580;
  color: var(--muted);
  background: var(--glass-panel);
  padding: 13px 16px;
  white-space: nowrap;
}
.table td {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}
.table td .button {
  min-height: 34px;
}
.list-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.list-item:first-child {
  border-top: 0;
}
.list-item .list-time {
  font-size: 14px;
  font-weight: 650;
  color: var(--accent);
  width: 52px;
  flex: none;
}
.record-section + .record-section {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  margin-top: 22px;
}
.record-block {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-top: 12px;
}
.record-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  font-size: 12px;
}
.record-meta span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.record-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-top: 10px;
}
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.case-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.case-card .case-body {
  flex: 1;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.case-card .case-footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.case-card .case-date {
  font-size: 11px;
  color: var(--muted);
}
.agenda-workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--glass-edge);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.agenda-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  flex: none;
  border-bottom: 1px solid var(--border);
}
.calendar-navigation,
.calendar-controls,
.calendar-arrows {
  display: flex;
  align-items: center;
  gap: 12px;
}
.calendar-arrows {
  gap: 0;
}
.calendar-arrows .icon-button {
  border: 0;
  border-radius: 50%;
  width: 30px;
  min-height: 30px;
  padding: 5px;
}
.agenda-toolbar #period {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.agenda-toolbar #period::first-letter {
  text-transform: uppercase;
}
#period-detail {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
  margin-top: 2px;
}
#period-detail:empty {
  display: none;
}
.calendar-jump {
  position: relative;
}
.calendar-jump .input {
  width: 126px;
  min-height: 35px;
  font-size: 12px;
  padding: 6px 27px 6px 9px;
  border-radius: 9px;
}
.calendar-jump .icon {
  position: absolute;
  right: 9px;
  top: 10px;
  width: 14px;
  height: 14px;
  color: var(--muted);
  pointer-events: none;
}
.segmented {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  gap: 2px;
  background: var(--muted-surface);
  border-radius: 10px;
}
.segmented button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 7px;
  min-height: 30px;
}
.segmented button[aria-pressed='true'] {
  background: var(--solid);
  color: var(--accent);
  font-weight: 650;
}
#calendar-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.calendar {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 310px;
}
.calendar-weekdays,
.calendar-month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.calendar-weekdays {
  flex: none;
  text-align: center;
  padding: 10px 0;
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
}
.calendar-month {
  flex: 1;
  min-height: 0;
  grid-template-rows: repeat(var(--weeks), minmax(0, 1fr));
}
.calendar-day {
  min-width: 0;
  min-height: 0;
  padding: 5px 7px;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  overflow: hidden;
}
.calendar-day:nth-child(7n) {
  border-right: 0;
}
.calendar-day.outside {
  background: color-mix(in srgb, var(--muted-surface) 30%, var(--solid));
}
.calendar-day.outside .day-number {
  color: var(--muted);
}
.calendar-cell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}
.day-number {
  border: 0;
  background: transparent;
  color: var(--text);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
}
.today .day-number {
  background: var(--accent);
  color: var(--solid);
}
.day-add {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 25px;
  height: 26px;
  padding: 4px;
  opacity: 0.6;
}
.day-add:hover {
  opacity: 1;
  color: var(--accent);
}
.day-add .icon {
  width: 14px;
  height: 14px;
}
.calendar-event {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  border: 0;
  text-align: left;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 550;
  min-height: 20px;
  padding: 2px 5px;
  margin-top: 2px;
}
.calendar-event span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.calendar-event.confirmed {
  background: var(--success-soft);
  color: var(--success);
}
.calendar-event.completed {
  background: var(--muted-surface);
  color: var(--muted);
}
.calendar-event.cancelled {
  background: var(--danger-soft);
  color: var(--danger);
  text-decoration: line-through;
}
.calendar-more {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  padding: 1px 4px;
}
.mobile-day-count {
  display: none;
  border: 0;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 6px;
  min-width: 24px;
  min-height: 20px;
  font-size: 10px;
}
.agenda-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 16px;
  border-top: 1px solid var(--border);
  flex: none;
}
.agenda-legend {
  display: flex;
  align-items: center;
  gap: 12px;
}
.agenda-legend button {
  display: flex;
  align-items: center;
  gap: 5px;
  border: 0;
  padding: 2px 0;
  background: transparent;
  font-size: 11px;
  color: var(--muted);
}
.agenda-legend button[aria-pressed='false'] {
  opacity: 0.4;
  text-decoration: line-through;
}
.event-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  display: inline-block;
  background: var(--accent);
}
.event-dot.confirmed {
  background: var(--success);
}
.event-dot.completed {
  background: var(--muted);
}
.event-dot.cancelled {
  background: var(--danger);
}
.time-scroll {
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.time-grid {
  min-width: 760px;
  background: var(--solid);
}
.time-grid.single-day {
  min-width: 0;
}
.time-grid-head,
.time-grid-body {
  display: grid;
  grid-template-columns: 52px repeat(var(--days), minmax(0, 1fr));
}
.time-grid-head {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--solid);
  border-bottom: 1px solid var(--border);
}
.time-zone {
  position: sticky;
  left: 0;
  z-index: 6;
  background: var(--solid);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 12px;
  font-size: 9px;
  color: var(--muted);
}
.time-day-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 4px 10px;
  gap: 3px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}
.time-day-head strong {
  width: 40px;
  height: 40px;
  line-height: 40px;
  border-radius: 50%;
  font-size: 27px;
  font-weight: 400;
  color: var(--text);
}
.time-day-head.today span {
  color: var(--accent);
}
.time-day-head.today strong {
  color: var(--solid);
  background: var(--accent);
}
.time-grid-body {
  height: var(--grid-height);
}
.time-ruler {
  position: sticky;
  left: 0;
  z-index: 4;
  background: var(--solid);
  color: var(--muted);
  font-size: 10px;
}
.time-ruler span {
  position: absolute;
  right: 9px;
  line-height: 14px;
  transform: translateY(-50%);
  background: var(--solid);
  padding: 0 1px;
}
.time-ruler span:first-child {
  display: none;
}
.time-day-column {
  min-width: 0;
  position: relative;
  border-left: 1px solid var(--border);
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 35px,
    color-mix(in srgb, var(--border) 40%, transparent) 35px,
    color-mix(in srgb, var(--border) 40%, transparent) 36px,
    transparent 36px,
    transparent 71px,
    var(--border) 71px,
    var(--border) 72px
  );
}
.closed-hours {
  position: absolute;
  width: 100%;
  background: color-mix(in srgb, var(--muted-surface) 24%, transparent);
  pointer-events: none;
}
.time-slot {
  position: absolute;
  left: 0;
  width: 100%;
  height: 18px;
  border: 0;
  padding: 0;
  background: transparent;
}
.time-slot span {
  display: none;
}
.time-slot:enabled:hover,
.time-slot.drop-target {
  background: var(--accent-soft);
}
.time-slot.drop-target {
  height: 36px;
  outline: 1px solid var(--accent);
  z-index: 2;
}
.time-slot.drop-target span {
  display: block;
  color: var(--accent);
  font-size: 10px;
}
.time-slot:disabled {
  opacity: 1;
}
.time-slot:focus-visible {
  outline-offset: -3px;
}
.time-event {
  position: absolute;
  z-index: 2;
  text-align: left;
  border: 0;
  padding: 3px 7px;
  border-radius: 6px;
  background: #d3e3fd;
  color: #174ea6;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.25;
  box-shadow: inset 0 0 0 1px #174ea608;
}
.time-event strong {
  display: block;
  font-size: 11px;
  font-weight: 650;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.time-event span,
.time-event small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  margin-top: 2px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.time-event.confirmed {
  background: #c5efdc;
  color: #0b6346;
}
.time-event.completed {
  background: #e9edf3;
  color: #526174;
}
.time-event.cancelled {
  background: #fbe0e3;
  color: #ad3345;
  text-decoration: line-through;
}
.time-event[draggable='true'] {
  cursor: grab;
}
.time-event.dragging {
  opacity: 0.35;
}
.time-event:hover {
  box-shadow: inset 0 0 0 1px currentColor;
}
.current-time {
  position: absolute;
  height: 2px;
  left: 0;
  right: 0;
  background: #ea4335;
  z-index: 3;
  pointer-events: none;
}
.current-time::before {
  content: '';
  position: absolute;
  left: -4px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ea4335;
}
.calendar-list {
  padding: 4px 20px;
}
.calendar-list-day {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 15px;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.calendar-list-date strong {
  display: block;
  font-size: 26px;
  font-weight: 400;
}
.calendar-list-date span {
  font-size: 11px;
  color: var(--muted);
}
.calendar-list-date.today strong {
  color: var(--accent);
}
.calendar-list-event {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  width: 100%;
  padding: 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 8px;
}
.calendar-list-event:hover {
  background: var(--muted-surface);
}
.calendar-list-event small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.list-event-time {
  font-size: 12px;
  width: 105px;
  flex: none;
}
.appointment-summary {
  display: flex;
  gap: 14px;
  padding: 18px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}
.appointment-summary.confirmed {
  background: var(--success-soft);
  color: var(--success);
}
.appointment-summary-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
}
.appointment-summary strong {
  font-size: 16px;
}
.appointment-summary p {
  font-size: 13px;
  margin-top: 4px;
}
.appointment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  margin-top: 16px;
}
.hours-row {
  display: grid;
  grid-template-columns: minmax(95px, 1fr) 1fr 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.hours-row .check-label {
  min-height: 0;
}
.photo-picker .button {
  align-self: flex-start;
}
.photo-picker.invalid .button {
  border-color: var(--danger);
}
.profile-photo {
  width: 64px;
  height: 64px;
  border-radius: 19px;
  object-fit: cover;
}
.image-preview {
  display: grid;
  place-items: center;
  flex: none;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 19px;
  background: var(--muted-surface);
  color: var(--muted);
}
.image-preview .preview-icon {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}
.image-preview:has(img:not([hidden])) .preview-icon {
  display: none;
}
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.bar-row {
  display: grid;
  grid-template-columns: 100px 1fr 45px;
  gap: 12px;
  align-items: center;
  font-size: 12px;
}
.bar-track {
  height: 10px;
  border-radius: 8px;
  background: var(--muted-surface);
  overflow: hidden;
}
.bar-fill {
  display: block;
  height: 100%;
  border-radius: 8px;
  background: var(--accent);
}
dialog.modal {
  padding: 0;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  border: 1px solid var(--glass-edge);
  border-radius: 22px;
  background: var(--glass-menu);
  color: var(--text);
  box-shadow:
    0 32px 100px #081b3d3b,
    inset 0 1px 0 var(--glass-highlight);
  backdrop-filter: blur(36px) saturate(120%);
  -webkit-backdrop-filter: blur(36px) saturate(120%);
  overflow: auto;
}
dialog.modal.wide {
  width: min(800px, calc(100vw - 32px));
}
dialog.modal::backdrop {
  background: #102b3c38;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.modal-header {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 8;
  background: var(--glass-menu);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.modal-header h2 {
  font-size: 22px;
}
.modal-header p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.modal-body {
  padding: 22px 24px;
}
.modal-header .icon-button {
  border-radius: 12px;
  min-width: 34px;
}
.notifications {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
}
.toast {
  display: flex;
  gap: 10px;
  padding: 14px 17px;
  border: 1px solid var(--glass-edge);
  border-radius: 14px;
  background: var(--glass-menu);
  box-shadow:
    0 10px 35px #142d4926,
    inset 0 1px 0 var(--glass-highlight);
  color: var(--text);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  animation: appear 0.2s ease;
}
.toast.success > .icon {
  color: var(--success);
}
.toast.error > .icon {
  color: var(--danger);
}
@keyframes appear {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: var(--danger);
  margin-right: 5px;
}
.status-dot.online {
  background: var(--success);
}
@media (min-width: 1500px) {
  .shell {
    padding-left: 40px;
    padding-right: 40px;
  }
  .layout {
    gap: 34px;
  }
}
@media (max-width: 1180px) {
  .shell {
    padding: 0 22px 16px;
  }
  .layout {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 24px;
  }
  .metrics {
    gap: 12px;
  }
  .metric {
    padding: 16px;
  }
  .patients-labels,
  .patient-row {
    grid-template-columns: minmax(170px, 1.4fr) minmax(145px, 1fr) 174px;
    gap: 14px;
  }
  .patient-document {
    display: none;
  }
  .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .page-head {
    flex-wrap: wrap;
  }
  .head-actions {
    justify-content: flex-start;
  }
}
@media (max-width: 850px) {
  .layout {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 20px;
  }
  .nav-link {
    font-size: 12px;
    padding: 10px;
  }
  .nav-link .icon {
    width: 16px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid2,
  .grid3 {
    grid-template-columns: 1fr;
  }
  .patient-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .patient-row > .patient-detail {
    grid-column: 1;
    grid-row: 2;
    font-size: 11px;
    padding-left: 49px;
  }
  .patient-actions {
    grid-column: 2;
    grid-row: 1/3;
  }
  .patients-labels {
    display: none;
  }
  .search {
    width: 240px;
  }
  .card {
    padding: 18px;
  }
  .case-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 680px) {
  html {
    scrollbar-gutter: auto;
  }
  .shell {
    padding: 0 16px 12px;
  }
  .topbar {
    height: 70px;
    gap: 8px;
  }
  .topbar .logo {
    width: 135px;
  }
  .topbar .user-name {
    display: none;
  }
  .topbar .row {
    gap: 7px;
  }
  .button.mobile-menu {
    display: inline-flex;
  }
  .layout {
    display: flex;
    flex-direction: column;
    padding-top: 16px;
    min-height: 0;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 248px;
    max-height: none;
    padding: 24px 18px;
    background: var(--solid);
    z-index: 30;
    transform: translateX(-100%);
    transition: transform 0.2s;
    overflow: auto;
  }
  .shell.drawer-open .sidebar {
    transform: translateX(0);
  }
  .shell.drawer-open .drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: #0007;
    z-index: 29;
    border: 0;
  }
  .page-head {
    gap: 16px;
    margin-bottom: 16px;
  }
  .page-head h1 {
    font-size: 25px;
  }
  .page-head p {
    font-size: 12px;
  }
  .head-actions {
    width: 100%;
    gap: 8px;
  }
  .head-actions .search {
    flex: 1;
    width: auto;
    min-width: 160px;
  }
  .head-actions .button {
    min-height: 42px;
  }
  .metrics {
    gap: 10px;
    margin-bottom: 20px;
  }
  .metric {
    padding: 15px;
  }
  .metric strong {
    font-size: 24px;
  }
  .card {
    border-radius: 20px;
  }
  .patient-row {
    padding: 15px;
    border-radius: 20px;
    gap: 8px;
  }
  .patient-actions {
    align-items: flex-end;
    flex-direction: column;
    gap: 6px;
  }
  .patient-actions .icon-button {
    display: none;
  }
  .patient-actions .button {
    min-height: 36px;
    padding: 7px 10px;
  }
  .patient-detail > .icon {
    display: none;
  }
  .avatar {
    width: 35px;
    height: 35px;
  }
  .patient-row > .patient-detail {
    padding-left: 44px;
  }
  .patient-title {
    font-size: 12px;
  }
  .pagination {
    font-size: 11px;
    flex-wrap: wrap;
  }
  .pagination .button {
    min-height: 40px;
  }
  .card-head {
    align-items: flex-start;
  }
  .toolbar {
    gap: 9px;
  }
  .toolbar .field {
    flex: 1;
    min-width: 140px;
  }
  .toolbar .segmented {
    width: 100%;
    justify-content: center;
  }
  .toolbar .button {
    min-height: 42px;
  }
  .grid2 {
    gap: 14px;
  }
  .record-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .modal-header {
    padding: 20px;
  }
  .modal-body {
    padding: 20px;
  }
  .modal-header h2 {
    font-size: 20px;
  }
  dialog.modal {
    max-height: calc(100dvh - 24px);
    width: calc(100vw - 20px);
    border-radius: 24px;
  }
  .notifications {
    left: 14px;
    right: 14px;
    bottom: 18px;
    max-width: none;
  }
  .form-actions .button {
    flex: 1;
  }
  .hours-row {
    grid-template-columns: 90px 1fr 1fr;
    gap: 8px;
  }
  .hours-row .input {
    padding: 8px;
    font-size: 12px;
  }
  .bar-row {
    grid-template-columns: 85px 1fr 30px;
  }
  .input {
    font-size: 16px;
  }
  .field-hint,
  .field-feedback {
    font-size: 11px;
  }
  .button {
    font-size: 12px;
  }
  .header-date {
    display: none;
  }
  .topbar > a,
  .topbar .row > .button {
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
  }
  .topbar .logo {
    width: 125px;
  }
  .topbar .row > .button[aria-label='Meu perfil'] {
    width: 34px;
  }
  .patient-actions .icon-button[data-edit],
  .patient-actions .icon-button[data-archive] {
    display: inline-flex;
    width: 32px;
    height: 32px;
    min-height: 32px;
  }
  .patient-actions {
    flex-direction: row;
    flex-wrap: wrap;
    max-width: 92px;
  }
  .patient-actions > .button.primary {
    width: 100%;
  }
  .patient-row > .patient-detail {
    overflow-wrap: anywhere;
    font-size: 10px;
  }
  .patient-actions .icon-button[data-archive] {
    color: var(--muted);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  .topbar,
  .sidebar,
  .page-head .head-actions,
  .toolbar,
  .notifications,
  .button {
    display: none !important;
  }
  .shell {
    padding: 0;
    max-width: none;
  }
  .layout {
    display: block;
  }
  .card {
    break-inside: avoid;
    background: #fff;
    box-shadow: none;
  }
  body {
    background: #fff;
    color: #111;
  }
  .muted {
    color: #555;
  }
}

@media (max-width: 680px) {
  .main {
    flex: 1;
  }
  .page-body {
    padding-right: 2px;
  }
  .agenda-toolbar {
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
  }
  .agenda-toolbar > .row {
    width: 100%;
    flex-wrap: wrap;
    gap: 5px;
  }
  .agenda-toolbar #period {
    font-size: 14px;
    flex: 1;
  }
  .agenda-toolbar .segmented {
    margin-left: auto;
  }
  .agenda-toolbar .segmented button {
    padding: 6px 8px;
  }
  .agenda-date-label {
    font-size: 0;
  }
  .agenda-date-label .input {
    font-size: 12px;
    width: 118px;
  }
  .agenda-footer {
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    padding: 8px;
  }
  .agenda-legend {
    gap: 8px;
    font-size: 10px;
    flex-wrap: wrap;
  }
  .calendar-day {
    padding: 3px;
  }
  .calendar-cell-head {
    justify-content: center;
  }
  .day-add,
  .month-events {
    display: none;
  }
  .mobile-day-count {
    display: block;
    margin: 5px auto 0;
  }
  .calendar-weekdays {
    font-size: 9px;
  }
  .calendar-month {
    min-height: 300px;
  }
  .time-grid:not(.single-day) {
    min-width: 680px;
  }
  .agenda-page .page-head p {
    max-width: 300px;
  }
}
@media (max-height: 650px) and (min-width: 681px) {
  .topbar {
    height: 58px;
  }
  .layout {
    padding-top: 12px;
  }
  .page-head {
    margin-bottom: 12px;
  }
  .agenda-toolbar {
    padding: 8px 12px;
  }
}
@media print {
  .shell {
    height: auto;
    overflow: visible;
  }
  .main,
  .page-body,
  #calendar-content {
    overflow: visible;
  }
  .agenda-workspace {
    min-height: 600px;
  }
  .time-scroll {
    overflow: visible;
  }
  .calendar-month {
    min-height: 550px;
  }
}

.auth-layout {
  min-height: calc(100dvh - 32px);
  width: calc(100% - 32px);
  max-width: 1600px;
  margin: 16px auto;
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(0, 1.05fr);
  background: var(--glass-panel);
  padding: 8px;
  gap: 8px;
  border: 1px solid var(--glass-edge);
  border-radius: 26px;
  box-shadow: var(--window-shadow);
  backdrop-filter: blur(36px) saturate(120%);
  -webkit-backdrop-filter: blur(36px) saturate(120%);
}
.auth-form-side {
  display: flex;
  flex-direction: column;
  padding: 22px 36px 14px;
  min-width: 0;
}
.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.auth-brand {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.06em;
}
.auth-brand img {
  width: 31px;
  height: 36px;
}
.auth-brand > span > span {
  color: var(--accent);
}
.auth-form-wrap {
  width: 100%;
  max-width: 430px;
  margin: auto;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--glass-edge);
  border-radius: 23px;
  box-shadow: var(--shadow);
}
.auth-eyebrow {
  font-size: 10px;
  letter-spacing: 0.17em;
  font-weight: 650;
  color: var(--accent);
}
.auth-form-wrap h1 {
  margin-top: 14px;
  font-size: 38px;
  font-weight: 550;
  letter-spacing: -0.055em;
  line-height: 1.1;
  max-width: 350px;
}
.auth-intro {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 16px 0 27px;
}
.auth-form {
  gap: 16px;
}
.auth-form .field > label {
  font-size: 12px;
  font-weight: 550;
  color: var(--text);
}
.auth-form .input {
  min-height: 48px;
  border-radius: 11px;
  padding: 12px 14px;
  background: var(--surface);
}
.auth-form .form-actions {
  margin-top: 7px;
}
.auth-form .form-actions .button {
  width: 100%;
  min-height: 48px;
  border-radius: 11px;
  background: var(--button-fill);
  color: #fff;
  border: 1px solid #ffffff2e;
  justify-content: space-between;
  padding: 12px 17px;
  font-size: 14px;
  box-shadow:
    0 4px 12px #0872cf25,
    inset 0 1px 0 #ffffff29;
}
.auth-help {
  font-size: 11px;
  color: var(--muted);
  margin-top: 20px;
  line-height: 1.6;
}
.auth-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  color: var(--muted);
  margin-top: auto;
}
.auth-footer > span:first-child {
  display: flex;
  align-items: center;
  gap: 5px;
}
.auth-footer .icon {
  width: 13px;
  height: 13px;
}
.auth-image-side {
  border-radius: 20px;
  position: relative;
  min-width: 0;
  min-height: calc(100dvh - 50px);
  overflow: hidden;
  background: #202735;
  border: 1px solid var(--glass-edge);
}
.auth-photo {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 37% 50%;
}
.auth-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #101e3414 0%, transparent 38%, #092a292b 60%, #061f299c 100%);
}
.auth-image-tag {
  position: absolute;
  left: 24px;
  top: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  border: 1px solid #ffffff59;
  background: #15323245;
  padding: 10px 14px;
  border-radius: 13px;
  font-size: 11px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 6px 20px #020e171f,
    inset 0 1px 0 #ffffff26;
}
.auth-image-tag .icon {
  width: 15px;
  height: 15px;
}
.auth-image-copy {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  color: #fff;
  padding: 24px;
  background: #102d3a66;
  border: 1px solid #ffffff40;
  border-radius: 19px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 8px 30px #030c1626,
    inset 0 1px 0 #ffffff24;
}
.auth-image-eyebrow {
  letter-spacing: 0.16em;
  font-size: 10px;
  color: #d2e2ee;
  font-weight: 500;
}
.auth-image-copy h2 {
  font-size: clamp(26px, 2.6vw, 38px);
  font-weight: 500;
  line-height: 1.17;
  letter-spacing: -0.045em;
  margin: 13px 0;
}
.auth-image-copy p {
  font-size: 13px;
  color: #d5e1eb;
  max-width: 380px;
}
.password-control {
  position: relative;
}
.password-control .input {
  padding-right: 48px;
}
.password-toggle {
  position: absolute;
  right: 8px;
  top: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px;
  width: 32px;
  height: 32px;
  border-radius: 7px;
}
.password-toggle .icon {
  width: 18px;
  height: 18px;
}
@media (min-width: 1600px) {
  .auth-form-side {
    padding-left: 60px;
    padding-right: 60px;
  }
  .auth-form-wrap {
    max-width: 400px;
  }
}
@media (max-width: 1000px) {
  .auth-layout {
    grid-template-columns: minmax(370px, 1fr) minmax(0, 1fr);
  }
  .auth-form-side {
    padding: 16px 22px;
  }
  .auth-image-copy {
    left: 26px;
    right: 20px;
  }
  .auth-image-tag {
    left: 20px;
    right: 20px;
    top: 20px;
    width: max-content;
    max-width: calc(100% - 40px);
  }
  .auth-form-wrap h1 {
    font-size: 34px;
  }
}
@media (max-width: 760px) {
  .auth-layout {
    display: flex;
    flex-direction: column;
    padding: 0;
    gap: 0;
  }
  .auth-form-side {
    padding: 22px 24px 28px;
    min-height: 100dvh;
    order: 1;
  }
  .auth-header {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
  }
  .auth-form-wrap {
    max-width: 400px;
    padding: 40px 0;
  }
  .auth-image-side {
    min-height: 280px;
    height: 280px;
    order: 2;
    margin: 0 16px 16px;
  }
  .auth-photo {
    object-position: 50% 35%;
  }
  .auth-image-copy {
    bottom: 24px;
    left: 24px;
  }
  .auth-image-copy h2 {
    font-size: 26px;
  }
  .auth-image-tag {
    display: none;
  }
  .auth-footer {
    max-width: 450px;
    width: 100%;
    margin: 0 auto;
  }
  .auth-form-wrap h1 {
    font-size: 37px;
  }
}
@media (max-height: 750px) and (min-width: 761px) {
  .auth-form-wrap {
    padding: 22px 0;
  }
  .auth-form-wrap h1 {
    font-size: 34px;
  }
  .auth-intro {
    margin: 12px 0 18px;
  }
  .auth-form {
    gap: 12px;
  }
  .auth-help {
    margin-top: 13px;
  }
}

@media (max-width: 1100px) {
  .agenda-toolbar {
    flex-wrap: wrap;
    gap: 10px;
  }
}
@media (max-width: 680px) {
  .agenda-toolbar {
    padding: 10px 12px;
    gap: 8px;
  }
  .calendar-navigation {
    gap: 7px;
    width: 100%;
  }
  .agenda-toolbar #period {
    font-size: 19px;
  }
  .calendar-controls {
    width: 100%;
    justify-content: space-between;
    gap: 7px;
  }
  .calendar-controls .segmented button {
    padding: 5px 7px;
    font-size: 11px;
  }
  .calendar-jump .input {
    width: 105px;
    font-size: 11px;
    padding-left: 7px;
  }
  .agenda-legend {
    flex-wrap: wrap;
    gap: 9px;
  }
  .agenda-legend button {
    font-size: 10px;
  }
  .calendar-list {
    padding: 4px 12px;
  }
  .calendar-list-day {
    grid-template-columns: 50px 1fr;
    gap: 8px;
  }
  .calendar-list-event {
    flex-wrap: wrap;
    gap: 7px;
    padding: 8px 3px;
  }
  .list-event-time {
    width: auto;
  }
  .calendar-list-event .badge {
    font-size: 9px;
  }
  .calendar-list-event .grow {
    flex-basis: 100%;
  }
  .integration-panel .list-item {
    flex-wrap: wrap;
  }
  .integration-panel .list-item .grow {
    min-width: 170px;
  }
  .integration-panel .list-item .button {
    white-space: normal;
  }
}
.conversation-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 330px;
}
.conversation-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}
.conversation-window {
  height: min(420px, 50dvh);
  min-height: 160px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: var(--bg);
}
.message-bubble {
  max-width: 85%;
  padding: 12px 15px;
  border-radius: 14px;
  background: var(--solid);
  border: 1px solid var(--border);
  align-self: flex-start;
}
.message-bubble.outgoing {
  background: var(--accent-soft);
  border-color: transparent;
  align-self: flex-end;
}
.message-origin {
  font-size: 10px;
  font-weight: 650;
  color: var(--accent);
}
.message-bubble p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  margin: 4px 0 8px;
}
.message-bubble footer {
  color: var(--muted);
  font-size: 10px;
}
.conversation-note {
  margin-top: 12px;
}
.connection-guide ol {
  padding-left: 20px;
  font-size: 13px;
  color: var(--muted);
}
.connection-guide li {
  margin-bottom: 8px;
}
.connection-code {
  margin: 20px auto;
  padding: 16px;
  display: grid;
  place-items: center;
  min-height: 240px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
}
.connection-code img {
  width: 230px;
  height: 230px;
  max-width: 100%;
  object-fit: contain;
  background: #fff;
  border: 10px solid white;
}
.connection-success {
  color: var(--success);
  text-align: center;
}
.connection-success > .icon {
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
}
.connection-success p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}
@media (max-width: 680px) {
  .conversation-actions {
    max-width: 100%;
    justify-content: flex-start;
  }
  .message-bubble {
    max-width: 95%;
  }
}

@media (min-width: 761px) {
  .auth-setup .auth-form-wrap {
    padding: 20px 0;
  }
  .auth-setup .auth-form-wrap h1 {
    font-size: 34px;
    max-width: none;
    margin-top: 10px;
  }
  .auth-setup .auth-intro {
    margin: 14px 0 20px;
  }
  .auth-setup .auth-form {
    gap: 12px;
  }
  .auth-setup .auth-help {
    margin-top: 14px;
  }
}
::selection {
  background: var(--accent-soft);
  color: var(--text);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 11px;
  background: var(--surface);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow);
}
.brand-mark img {
  width: 25px;
  height: 28px;
}
.brand-accent {
  color: var(--accent);
}
.topbar .row {
  gap: 9px;
}
.topbar > .row:last-child {
  gap: 8px;
}
.topbar .header-date {
  margin-right: 8px;
  font-size: 11px;
}
.topbar .icon-button {
  background: var(--surface);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow);
}
.topbar a[aria-label='Meu perfil'] {
  background: var(--surface);
  padding: 5px 11px 5px 6px;
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow);
  border-radius: 12px;
}
.user-avatar {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  border: 1px solid var(--glass-edge);
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
}
.sidebar nav {
  flex: 1;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
}
.nav-link .icon {
  width: 17px;
  height: 17px;
  opacity: 0.92;
}
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
  margin: 18px 2px 0;
  padding: 13px 8px 2px;
  border-top: 1px solid var(--border);
}
.sidebar-footer-mark {
  color: var(--success);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--success-soft);
  border: 1px solid var(--glass-edge);
  border-radius: 9px;
}
.sidebar-footer-mark .icon {
  width: 14px;
  height: 14px;
}
.sidebar-footer strong {
  display: block;
  font-size: 10px;
  font-weight: 550;
  color: var(--text);
}
.sidebar-footer span:not(.sidebar-footer-mark) {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 2px;
}
.button.ghost:hover {
  background: var(--surface);
  border-color: var(--glass-edge);
}
.button.danger {
  border-color: color-mix(in srgb, var(--danger) 18%, transparent);
}
.button:disabled,
.input:disabled {
  opacity: 0.5;
}
.section-tabs > .button {
  flex: none;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  min-height: 32px;
  font-size: 11px;
}
.section-tabs > .button[aria-pressed='true'] {
  background: var(--surface);
  border-color: var(--glass-edge);
  box-shadow:
    0 2px 6px #23435710,
    inset 0 1px 0 var(--glass-highlight);
}
.segmented {
  background: var(--muted-surface);
  padding: 4px;
  border: 1px solid var(--glass-edge);
  border-radius: 11px;
  box-shadow: inset 0 1px 3px #23435009;
}
.segmented button {
  border-radius: 8px;
  font-weight: 520;
  transition:
    background 0.18s,
    color 0.18s,
    box-shadow 0.18s;
}
.segmented button[aria-pressed='true'],
.segmented button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow:
    0 2px 6px #23435712,
    inset 0 1px 0 var(--glass-highlight);
}
.metric-label {
  font-size: 11px;
  font-weight: 530;
}
.metric-label > .icon {
  box-sizing: content-box;
  width: 16px;
  height: 16px;
  padding: 8px;
  border-radius: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}
.metric:nth-child(2) .metric-label > .icon {
  color: var(--success);
  background: var(--success-soft);
}
.metric:nth-child(3) .metric-label > .icon {
  color: #7861a8;
  background: #e5e0f0b8;
}
.metric:nth-child(4) .metric-label > .icon {
  color: var(--warning);
  background: var(--warning-soft);
}
.metric:first-child {
  background: linear-gradient(
    120deg,
    var(--surface),
    color-mix(in srgb, var(--accent-soft) 42%, var(--surface))
  );
}
.metric .small {
  font-size: 11px;
}
.patient-row:hover {
  background: color-mix(in srgb, var(--surface) 85%, var(--accent-soft));
  border-color: color-mix(in srgb, var(--accent) 18%, var(--glass-edge));
}
.table tbody tr:hover {
  background: color-mix(in srgb, var(--accent-soft) 18%, transparent);
}
.record-block {
  background: var(--glass-panel);
  border-radius: 13px;
}
.notice {
  border-radius: 12px;
  font-size: 12px;
}
.input:hover:not(:disabled):not(:focus) {
  border-color: color-mix(in srgb, var(--border) 65%, var(--muted));
}
.check-label {
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
}
.check-label input:checked {
  background: var(--button-fill);
  border-color: #0072d8;
  box-shadow:
    0 1px 3px #076cb529,
    inset 0 1px 0 #ffffff33;
}
.check-label input:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.check-label input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.switch-control input {
  width: 32px;
  height: 19px;
  border-radius: 20px;
  background: var(--muted-surface);
  border-color: var(--border);
  margin-top: 1px;
}
.switch-control input::after {
  content: '';
  position: absolute;
  width: 13px;
  height: 13px;
  left: 2px;
  top: 2px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px #13314240;
  transform: none;
  transition: transform 0.18s;
}
.switch-control input:checked::after {
  width: 13px;
  height: 13px;
  left: 2px;
  top: 2px;
  border: 0;
  background: #fff;
  transform: translateX(13px);
}
.hours-row {
  padding: 9px 0;
}
.hours-row .field > label {
  font-size: 10px;
  color: var(--muted);
}
.agenda-toolbar,
.agenda-footer,
.calendar-weekdays {
  background: var(--glass-panel);
}
.time-grid-head {
  background: var(--solid);
}
.time-day-head {
  background: transparent;
}
.calendar-event {
  border-radius: 6px;
}
.time-event {
  border-radius: 7px;
  box-shadow:
    inset 0 1px 0 #ffffff55,
    0 1px 2px #18344c0b;
}
.agenda-footer {
  border-top-color: var(--border);
}
.modal-header .icon-button {
  background: var(--muted-surface);
  border: 1px solid var(--glass-edge);
  border-radius: 10px;
}
.modal-header h2 {
  font-weight: 550;
  letter-spacing: -0.035em;
}
.conversation-window {
  background: var(--glass-panel);
  border-radius: 14px;
}
.message-bubble {
  background: var(--surface);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow);
  border-radius: 14px 14px 14px 4px;
}
.message-bubble.outgoing {
  background: var(--accent-soft);
  border-radius: 14px 14px 4px 14px;
}
.auth-header {
  margin-bottom: 20px;
}
.auth-header .icon-button {
  background: var(--surface);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow);
}
.auth-brand {
  font-weight: 650;
  font-size: 23px;
}
.auth-eyebrow {
  font-size: 9px;
  letter-spacing: 0.16em;
}
.auth-footer {
  margin-top: 18px;
}
.password-toggle:hover {
  background: var(--muted-surface);
  color: var(--text);
}
.auth-image-copy p {
  font-size: 12px;
}
/* O select preserva teclado, leitores de tela e formulários sem JavaScript adicional. */
@supports (appearance: base-select) {
  select.input,
  select.input::picker(select) {
    appearance: base-select;
  }
  select.input {
    background-image: none;
    padding-right: 13px;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  select.input::picker-icon {
    color: var(--muted);
    content: '';
    width: 18px;
    height: 18px;
    flex: none;
    border: 0;
    background: currentColor;
    mask: url('../icons/chevron-down.svg') center / contain no-repeat;
    transform: rotate(0deg);
    transition: transform 0.18s;
  }
  select.input:open::picker-icon {
    transform: rotate(180deg);
  }
  select.input::picker(select) {
    background: var(--glass-menu);
    color: var(--text);
    border: 1px solid var(--glass-edge);
    padding: 6px;
    border-radius: 13px;
    box-shadow:
      0 16px 44px #0f274435,
      inset 0 1px 0 var(--glass-highlight);
    backdrop-filter: blur(24px) saturate(130%);
    -webkit-backdrop-filter: blur(24px) saturate(130%);
    margin-top: 6px;
    max-height: 260px;
    overflow: auto;
    font: 13px/1.5 var(--font);
  }
  select.input option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    font-size: 12px;
    color: var(--text);
    background: transparent;
    white-space: normal;
  }
  select.input option:hover,
  select.input option:focus {
    background: var(--accent-soft);
  }
  select.input option:checked {
    background: var(--accent-soft);
    color: var(--accent);
  }
  select.input option::checkmark {
    color: var(--accent);
    margin-left: auto;
    order: 1;
  }
}
/* Composição consistente em telas grandes; rolagem apenas na área de conteúdo. */
@media (min-width: 1500px) {
  .shell {
    padding: 0;
  }
  .layout {
    gap: 0;
  }
  .main {
    padding: 30px;
  }
}
@media (max-width: 1180px) {
  .shell {
    padding: 0;
  }
  .layout {
    grid-template-columns: 186px minmax(0, 1fr);
    gap: 0;
  }
  .sidebar {
    padding: 20px 10px 14px;
  }
  .main {
    padding: 22px;
  }
  .sidebar-footer {
    padding-left: 5px;
    gap: 6px;
  }
  .sidebar-footer strong {
    font-size: 9px;
  }
  .sidebar-footer span:not(.sidebar-footer-mark) {
    font-size: 8px;
  }
}
@media (min-width: 681px) and (max-width: 850px) {
  .layout {
    grid-template-columns: 160px minmax(0, 1fr);
  }
  .main {
    padding: 20px;
  }
  .sidebar {
    padding-left: 8px;
    padding-right: 8px;
  }
  .nav-link {
    padding: 10px;
    gap: 8px;
    font-size: 12px;
  }
  .sidebar-footer {
    display: none;
  }
}
@media (max-width: 680px) {
  .shell {
    width: 100%;
    height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .topbar {
    height: 62px;
    padding: 0 16px;
    gap: 8px;
  }
  .topbar .logo {
    width: auto;
    font-size: 20px;
    gap: 6px;
  }
  .brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 9px;
  }
  .brand-mark img {
    width: 23px;
    height: 25px;
  }
  .topbar .row {
    gap: 6px;
  }
  .topbar > .row:last-child {
    gap: 6px;
  }
  .topbar .row > .button {
    border-radius: 10px;
  }
  .topbar a[aria-label='Meu perfil'] {
    padding: 0;
  }
  .user-avatar {
    width: 26px;
    height: 26px;
    font-size: 9px;
  }
  .layout {
    padding-top: 0;
  }
  .main {
    padding: 20px 16px 12px;
  }
  .sidebar {
    display: flex;
    padding: 26px 16px 18px;
    background: var(--glass-menu);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
  }
  .sidebar-footer {
    padding-top: 14px;
  }
  .sidebar-footer strong {
    font-size: 10px;
  }
  .sidebar-footer span:not(.sidebar-footer-mark) {
    font-size: 9px;
  }
  .page-head {
    margin-bottom: 18px;
  }
  .card {
    border-radius: 16px;
    padding: 18px;
  }
  .metric {
    padding: 15px;
  }
  .metric strong {
    font-size: 27px;
  }
  .metric-label > .icon {
    width: 14px;
    height: 14px;
    padding: 6px;
    border-radius: 9px;
  }
  .patient-row {
    padding: 14px;
    gap: 8px;
  }
  .section-tabs {
    width: 100%;
  }
  .agenda-workspace {
    border-radius: 16px;
  }
  dialog.modal {
    border-radius: 20px;
  }
  .auth-layout {
    width: calc(100% - 16px);
    margin: 8px;
    border-radius: 22px;
    min-height: calc(100dvh - 16px);
    padding: 0;
    gap: 0;
  }
  .auth-form-side {
    padding: 20px 16px 24px;
    min-height: calc(100dvh - 18px);
  }
  .auth-form-wrap {
    padding: 24px 20px;
    margin: auto;
    border-radius: 20px;
  }
  .auth-form-wrap h1 {
    font-size: 34px;
  }
  .auth-footer {
    font-size: 9px;
    margin: 20px 0 0;
  }
  .auth-image-side {
    margin: 0 8px 8px;
    min-height: 300px;
    height: 300px;
    border-radius: 17px;
  }
  .auth-image-copy {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 18px;
    border-radius: 15px;
  }
  .auth-image-copy h2 {
    font-size: 24px;
  }
  .auth-image-copy p {
    font-size: 11px;
  }
}
@media (min-width: 681px) and (max-width: 1000px) {
  .auth-layout {
    grid-template-columns: minmax(365px, 1fr) minmax(0, 1fr);
  }
  .auth-form-side {
    padding: 20px;
  }
  .auth-form-wrap {
    padding: 24px;
  }
  .auth-image-copy {
    left: 14px;
    right: 14px;
    bottom: 14px;
    padding: 20px;
  }
}
@media (min-width: 761px) {
  .auth-setup .auth-form-wrap {
    padding: 22px 26px;
  }
  .auth-setup .auth-form-wrap h1 {
    font-size: 33px;
  }
  .auth-setup .auth-intro {
    font-size: 13px;
    margin: 12px 0 18px;
  }
  .auth-setup .auth-form {
    gap: 11px;
  }
  .auth-setup .auth-help {
    margin-top: 13px;
  }
}
@media (max-height: 720px) and (min-width: 761px) {
  .auth-form-side {
    padding-top: 14px;
    padding-bottom: 10px;
  }
  .auth-header {
    margin-bottom: 12px;
  }
  .auth-form-wrap {
    padding: 20px 26px;
  }
  .auth-form-wrap h1 {
    font-size: 33px;
  }
  .auth-setup .auth-form-wrap {
    padding: 18px 26px;
  }
  .auth-setup .auth-form .input {
    min-height: 43px;
    padding-top: 9px;
    padding-bottom: 9px;
  }
  .auth-setup .auth-form .form-actions .button {
    min-height: 44px;
  }
  .auth-footer {
    margin-top: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .button,
  .nav-link,
  .switch-control input::after,
  select.input::picker-icon {
    transition: none;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .shell,
  .card,
  .agenda-workspace,
  .auth-layout {
    background: var(--solid);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  dialog.modal,
  .modal-header,
  .toast,
  .sidebar {
    background: var(--solid);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .shell,
  .card,
  .agenda-workspace,
  .auth-layout {
    background: var(--solid);
  }
}
@media print {
  .shell {
    width: 100%;
    height: auto;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    backdrop-filter: none;
  }
  .main,
  .page-body {
    overflow: visible;
    padding: 0;
  }
  .card {
    background: #fff;
    box-shadow: none;
    backdrop-filter: none;
    border-color: #ddd;
  }
  .sidebar-footer {
    display: none;
  }
}

/* Expediente compacto com títulos compartilhados para os campos de horário. */
.time-grid {
  background: transparent;
}
.card-head + .list-item {
  border-top: 0;
}
.hours-card {
  padding: 18px;
}
.hours-card .card-head {
  margin-bottom: 10px;
  padding-bottom: 12px;
}
.hours-heading {
  display: grid;
  grid-template-columns: minmax(95px, 1fr) 1fr 1fr;
  gap: 12px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 550;
}
.hours-row {
  padding: 2px 0;
}
.hours-row .input {
  min-height: 32px;
  padding: 5px 11px;
  font-size: 12px;
}
.hours-row .field > label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.hours-preferences {
  margin-top: 12px;
}
.hours-preferences .input {
  min-height: 36px;
  padding: 7px 11px;
}
.hours-preferences .field > label {
  font-size: 11px;
}
.hours-preferences .check-label {
  font-size: 11px;
}
.hours-preferences .small {
  font-size: 10px;
}
@media (min-width: 851px) {
  #profile-form > .form-actions {
    margin-top: 0;
  }
}
@media (min-width: 851px) and (max-height: 820px) {
  .profile-page .page-head {
    margin-bottom: 14px;
  }
  .profile-page .page-head h1 {
    font-size: 26px;
  }
  .profile-page .section-tabs {
    margin-bottom: 12px;
  }
  .hours-card {
    padding: 16px;
  }
  .hours-card .card-head {
    margin-bottom: 8px;
    padding-bottom: 8px;
  }
  .hours-row {
    padding: 1px 0;
  }
  .hours-row .input {
    min-height: 30px;
    padding-top: 4px;
    padding-bottom: 4px;
  }
  .hours-preferences {
    margin-top: 10px;
  }
}
@media (max-width: 680px) {
  .hours-heading {
    grid-template-columns: 90px 1fr 1fr;
    gap: 8px;
    font-size: 9px;
  }
  .hours-row {
    padding: 6px 0;
  }
  .hours-row .input {
    min-height: 40px;
    font-size: 14px;
    padding: 8px;
  }
  .hours-preferences {
    margin-top: 16px;
  }
}
@media (min-width: 761px) {
  .auth-setup .auth-form-side {
    padding-top: 18px;
    padding-bottom: 12px;
  }
  .auth-setup .auth-header {
    margin-bottom: 14px;
  }
  .auth-setup .auth-form-wrap {
    padding: 18px 26px;
  }
  .auth-setup .auth-form {
    gap: 9px;
  }
  .auth-setup .auth-form .input {
    min-height: 44px;
    padding: 10px 14px;
  }
  .auth-setup .password-toggle {
    top: 6px;
  }
  .auth-setup .auth-help {
    margin-top: 12px;
  }
  .auth-setup .auth-footer {
    margin-top: 14px;
  }
}

/* Identidade, alinhamento dos formulários e espaçamento da revisão comercial. */
.brand-mark {
  background: transparent;
  box-shadow: none;
  border: 0;
  width: 24px;
  height: 28px;
}
.brand-mark img,
.auth-brand img {
  object-fit: contain;
  width: 24px;
  height: 28px;
}
.profile-photo[hidden] {
  display: none;
}
.sidebar-footer {
  color: var(--text);
  text-decoration: none;
}
.sidebar-footer:hover strong {
  color: var(--accent);
}
.clinic-access {
  margin-bottom: 16px;
  line-height: 1.7;
}
input,
select,
textarea,
.input,
.input:focus,
.input:focus-visible,
.input:hover {
  box-shadow: none;
}
.field-messages {
  min-height: 18px;
  line-height: 1.45;
}
.field-messages > span {
  display: block;
}
.field-messages .field-feedback:empty {
  display: none;
}
.field-grid {
  align-items: start;
}
@supports (grid-template-rows: subgrid) {
  .field-grid > .field {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    row-gap: 6px;
  }
  .field-grid > .field > label {
    align-self: end;
  }
}
.toolbar .field-messages {
  display: none;
}
.toolbar .field:has(.field-feedback:not(:empty)) .field-messages {
  display: block;
}
.toolbar {
  align-items: flex-start;
}
.toolbar > .button,
.toolbar > a.button {
  margin-top: 25px;
}
.auth-help a {
  font-weight: 650;
}
.auth-confirmation {
  margin: 0 0 16px;
}
.profile-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.clinic-logo {
  object-fit: contain;
}
.hours-card {
  padding: 20px;
}
.hours-heading,
.hours-row {
  grid-template-columns: minmax(140px, 0.6fr) 1fr 1fr;
  gap: 24px;
}
.hours-list {
  max-height: min(37dvh, 420px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  overscroll-behavior: contain;
}
.hours-row {
  padding: 8px 0;
  align-items: start;
}
.hours-row .field {
  gap: 2px;
}
.hours-row .input {
  min-height: 36px;
  padding: 7px 12px;
}
.hours-row .check-label {
  margin-top: 9px;
}
.hours-row .field-messages {
  min-height: 16px;
}
.hours-row .field-feedback {
  font-size: 10px;
}
.hours-preferences {
  gap: 24px;
  align-items: start;
  margin-top: 18px;
}
.hours-preferences > div:not(.field) {
  padding-top: 25px;
}
.hours-preferences .check-label {
  font-size: 12px;
}
#integration-status:not(:empty) {
  margin-bottom: 20px;
}
#integration-status > .notice {
  margin-top: 16px;
}
.section-note {
  margin-top: 20px;
}
.crop-editor {
  display: grid;
  gap: 20px;
}
.crop-editor canvas {
  width: min(100%, 300px);
  aspect-ratio: 1;
  height: auto;
  justify-self: center;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--muted-surface);
  cursor: grab;
  touch-action: none;
}
.crop-zoom {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
}
.crop-zoom input {
  width: 100%;
  accent-color: var(--accent);
}
.time-buffer {
  position: absolute;
  z-index: 1;
  border: 1px dashed var(--border);
  border-radius: 5px;
  background: repeating-linear-gradient(135deg, transparent 0 5px, var(--border) 5px 6px);
  color: var(--muted);
  font-size: 9px;
  padding: 2px 6px;
  overflow: hidden;
  pointer-events: none;
}
.service-caption:empty {
  display: none;
}
@media (min-width: 761px) {
  .auth-setup .auth-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 12px 16px;
  }
  .auth-setup .auth-form > .form-actions,
  .auth-setup .auth-form > .form-error,
  .auth-registration > .grid2,
  .auth-registration > [data-field='phone'] {
    grid-column: 1 / -1;
  }
  .auth-setup .auth-form-wrap {
    padding: 24px;
  }
  .auth-setup .auth-form label {
    font-size: 11px;
  }
}
@media (max-width: 850px) {
  .hours-heading,
  .hours-row {
    grid-template-columns: 100px 1fr 1fr;
    gap: 12px;
  }
  .hours-card {
    padding: 16px;
  }
  .hours-preferences {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .hours-preferences > div:not(.field) {
    padding-top: 0;
  }
  .profile-images {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}
@media (max-width: 680px) {
  .hours-row .input {
    min-height: 40px;
    padding: 8px;
  }
  .hours-list {
    max-height: 320px;
    padding-right: 4px;
  }
  .hours-heading,
  .hours-row {
    grid-template-columns: 80px 1fr 1fr;
    gap: 8px;
  }
  .hours-heading {
    font-size: 9px;
  }
  .hours-row .check-label {
    font-size: 11px;
    gap: 6px;
    margin-top: 12px;
  }
}
.weekly-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding: 16px 20px;
  margin: -2px 0 20px;
  border: 1px solid var(--glass-edge);
  border-radius: 14px;
  background: var(--surface);
  font-size: 12px;
}
.weekly-summary > div {
  display: grid;
  gap: 3px;
  margin-right: auto;
}
.weekly-summary > div span {
  color: var(--muted);
  font-size: 10px;
}
.weekly-summary > span > strong {
  margin-right: 4px;
}
#finance-content .metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
#period-form .field {
  flex: 1 1 140px;
  min-width: 120px;
  max-width: 210px;
}
.report-period {
  margin: 0 0 14px;
}
.cash-trend {
  display: flex;
  gap: 12px;
  height: 180px;
  padding: 10px 0 0;
}
.cash-month {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 9px;
}
.cash-bars {
  width: 100%;
  height: 150px;
  display: flex;
  gap: 3px;
  align-items: flex-end;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}
.cash-bars > span {
  width: 34%;
  max-width: 30px;
  border-radius: 4px 4px 0 0;
}
.cash-income {
  background: var(--accent);
}
.cash-expense {
  background: #d17878;
}
@media (max-width: 1180px) {
  #finance-content .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 680px) {
  #finance-content .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .weekly-summary {
    gap: 12px 18px;
    padding: 14px;
  }
  .weekly-summary > div {
    width: 100%;
  }
  .weekly-summary > .small {
    width: 100%;
  }
  .cash-trend {
    gap: 5px;
  }
}
body {
  display: flow-root;
}
@media (min-width: 761px) {
  .auth-setup .auth-form-wrap {
    width: min(100%, 480px);
  }
}
.date-control {
  position: relative;
}
.date-control > .input {
  padding-right: 42px;
}
.date-picker-button {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 7px;
}
.date-picker-button:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.date-proxy {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
@media (min-width: 851px) and (max-height: 820px) {
  .hours-list {
    max-height: 26dvh;
  }
}

.hours-list {
  scrollbar-width: thin;
  scrollbar-color: #9cb6c9 #e7eef4;
}
.hours-row .field-messages:has(.field-feedback:empty) {
  display: none;
}

.page-body {
  padding: 1px;
}
.overview-page .list-item {
  padding: 10px 0;
}
