:root {
  --purple: #6c3bff;
  --purple-soft: #f0ebff;
  --teal: #00a99d;
  --teal-soft: #e8f8f5;
  --orange: #f97316;
  --orange-soft: #fff2e8;
  --green: #16a34a;
  --green-soft: #eaf8ef;
  --rose: #ec4899;
  --ink: #121a2c;
  --muted: #64748b;
  --line: #e5e7eb;
  --page: #f8fafc;
  --panel: #fff;
  --radius: 12px;
  --sidebar: 236px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .03);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
  font-size: 14px;
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; stroke-width: 1.8; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px 25px;
}
.pulse {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  background: var(--purple);
}
.pulse svg { width: 25px; height: 25px; }
.brand b { display: block; font-size: 21px; font-weight: 700; }
.brand b span, .login-brand b span { color: var(--purple); }
.brand small { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }
.sidebar nav { flex: 1; overflow-y: auto; scrollbar-width: thin; }
.sidebar nav label {
  display: block;
  color: #73829b;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  margin: 27px 12px 10px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 13px;
  border-radius: 8px;
  color: #44526b;
  font-size: 13px;
  font-weight: 500;
}
.sidebar nav a svg { width: 18px; color: #60708b; }
.sidebar nav a:hover { background: #f5f5fb; }
.sidebar nav a.active { color: var(--purple); background: var(--purple-soft); }
.sidebar nav a.active svg { color: var(--purple); }
.collapse {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: #718198;
  font-size: 12px;
  padding: 18px 12px 0;
}
.workspace { margin-left: var(--sidebar); min-height: 100vh; }
.topbar {
  height: 76px;
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.96);
}
.mobile-menu { display: none; border: 0; background: transparent; }
.search {
  width: min(555px, 48vw);
  height: 43px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  color: #77859d;
}
.search svg { width: 17px; }
.search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}
.search kbd {
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px 7px;
  background: #fbfcfd;
}
.bell {
  position: relative;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #4b5971;
}
.bell b {
  position: absolute;
  top: -8px;
  right: -7px;
  border-radius: 20px;
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--purple);
  font-size: 10px;
}
.account { display: flex; align-items: center; gap: 13px; padding-left: 20px; border-left: 1px solid var(--line); }
.avatar {
  width: 39px; height: 39px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--purple); background: var(--purple-soft); font-weight: 600;
}
.account strong { display: block; font-size: 13px; font-weight: 600; }
.account small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.account a { margin-left: 6px; color: var(--muted); }
.content { padding: 26px 34px 32px; max-width: 1320px; margin: 0 auto; }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.welcome, .page-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 22px;
}
.welcome h1, .page-head h1 {
  margin: 0 0 7px;
  font-size: 25px;
  line-height: 1.2;
  font-weight: 650;
}
.welcome p, .page-head p { margin: 0; color: var(--muted); }
.date-select, .secondary-btn {
  height: 44px;
  display: inline-flex; align-items: center; gap: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  background: white;
  color: #25324a;
  font-size: 13px;
  font-weight: 500;
}
.date-select svg:last-child { width: 15px; margin-left: 16px; }
.primary-btn {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 17px;
  background: var(--purple);
  color: #fff;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
}
.primary-btn svg, .secondary-btn svg { width: 17px; }
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dashboard-layout { display: grid; grid-template-columns: minmax(580px, 1fr) 272px; gap: 18px; }
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 16px;
}
.metric {
  height: 120px; display: flex; align-items: center; gap: 15px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 20px 15px;
}
.metric > svg {
  flex: none; width: 45px; height: 45px; padding: 12px; border-radius: 50%;
}
.metric span { color: #58667d; font-size: 11px; min-width: 0; }
.metric strong { display: block; margin-top: 8px; color: var(--ink); font-size: 21px; font-weight: 650; white-space: nowrap; }
.metric small { display: block; margin-top: 9px; font-size: 11px; color: currentColor; }
.metric.purple svg { color: var(--purple); background: var(--purple-soft); }
.metric.purple small { color: var(--purple); }
.metric.teal svg { color: var(--teal); background: var(--teal-soft); }
.metric.teal small { color: var(--teal); }
.metric.orange svg { color: var(--orange); background: var(--orange-soft); }
.metric.orange small { color: var(--orange); }
.metric.green svg { color: var(--green); background: var(--green-soft); }
.metric.green small { color: var(--green); }
.dashboard-panels { display: grid; grid-template-columns: 1fr .94fr; gap: 16px; margin-bottom: 16px; }
.panel header { display: flex; justify-content: space-between; align-items: center; }
.panel header h2, .quick h2, .alerts h2, .report-list h2 { font-size: 14px; margin: 0; font-weight: 600; }
.panel header a { color: var(--purple); font-size: 11px; }
.agenda-panel, .recent-panel { padding: 19px 18px 12px; min-height: 322px; }
.agenda-row {
  display: grid; grid-template-columns: 48px 3px 1fr auto 21px;
  align-items: center; gap: 12px; min-height: 56px;
  border-bottom: 1px solid #f0f2f5; font-size: 12px;
}
.agenda-row time { color: #24334c; }
.agenda-row .line { width: 2px; height: 34px; background: #c1b3ff; }
.agenda-row:nth-of-type(3n) .line { background: #42c5bb; }
.agenda-row:nth-of-type(4n) .line { background: #fb923c; }
.agenda-row b, .patient-row b { display: block; font-size: 12px; font-weight: 500; }
.agenda-row small, .patient-row small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.agenda-row em {
  color: var(--purple); background: var(--purple-soft); padding: 6px 9px; border-radius: 6px;
  font-size: 10px; font-style: normal;
}
.agenda-row button { border: 0; background: transparent; color: #60708b; padding: 0; }
.agenda-row button svg { width: 16px; }
.patient-row {
  display: flex; align-items: center; gap: 12px; min-height: 56px;
  border-bottom: 1px solid #f0f2f5;
}
.patient-row .initial {
  width: 37px; height: 37px; flex: none; border-radius: 50%; display: grid; place-items: center;
  color: var(--purple); background: var(--purple-soft); font-size: 12px;
}
.patient-row:nth-of-type(3n) .initial { color: var(--teal); background: var(--teal-soft); }
.patient-row time { margin-left: auto; color: var(--muted); font-size: 11px; }
.appointments-table { padding: 19px 18px 10px; }
.appointments-table header { margin-bottom: 15px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { text-align: left; height: 33px; color: #64748b; font-size: 11px; font-weight: 500; border-bottom: 1px solid var(--line); }
td { height: 48px; color: #344258; border-bottom: 1px solid #f0f2f5; padding-right: 12px; }
td strong { display: block; color: var(--ink); font-weight: 500; }
td small { display: block; color: var(--muted); margin-top: 4px; }
.status { display: inline-flex; padding: 5px 9px; border-radius: 6px; background: #f0f3f7; color: #596a84; font-size: 10px; font-weight: 500; }
.status.concluido, .status.concluído, .status.pago, .status.active, .status.ativa { color: #128645; background: #e7f7ed; }
.status.em-atendimento { color: #2463e8; background: #eaf1ff; }
.status.pendente { color: #c35c08; background: #fff0db; }
.status.mensagem-preparada, .status.confirmado { color: #128645; background: #e7f7ed; }
.patient-link:hover strong { color: var(--purple); }
.row-action {
  display: inline-flex; align-items: center; gap: 6px; color: var(--purple);
  font-size: 11px; font-weight: 500; white-space: nowrap;
}
.row-action svg { width: 14px; height: 14px; }
.quick-column { display: flex; flex-direction: column; gap: 16px; }
.quick, .alerts { padding: 20px 16px; }
.quick h2 { margin: 0 0 19px; }
.quick a {
  display: grid; grid-template-columns: 34px 1fr 16px; gap: 10px; align-items: center;
  min-height: 55px; margin-top: 10px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px; font-size: 12px; font-weight: 500;
}
.quick a svg:first-child { width: 33px; height: 33px; padding: 9px; border-radius: 7px; color: var(--purple); background: var(--purple-soft); }
.quick a:nth-of-type(2) svg:first-child { color: var(--teal); background: var(--teal-soft); }
.quick a:nth-of-type(4) svg:first-child { color: var(--orange); background: var(--orange-soft); }
.quick a:last-child svg:first-child { color: var(--green); background: var(--green-soft); }
.quick a svg:last-child { width: 15px; color: var(--muted); }
.alerts header { margin-bottom: 13px; }
.alerts div {
  display: grid; grid-template-columns: 37px 1fr; gap: 10px; padding: 13px 0; border-bottom: 1px solid #f1f3f7;
}
.alerts div svg { width: 36px; height: 36px; padding: 10px; border-radius: 8px; color: #ef476f; background: #ffe8ef; grid-row: span 2; }
.alerts div:nth-of-type(2) svg { color: #e8861c; background: #fff2df; }
.alerts div:nth-of-type(3) svg { color: #2874eb; background: #e8f0ff; }
.alerts div:nth-of-type(4) svg { color: #18a454; background: #e8f8ee; }
.alerts b { font-size: 11.5px; font-weight: 500; }
.alerts small { grid-column: 2; color: var(--muted); font-size: 10px; }
.data-shell { display: block; }
.table-panel { padding: 18px 20px; overflow: hidden; }
.table-tools {
  display: flex; gap: 12px; align-items: center; margin-bottom: 18px;
}
.table-tools label {
  height: 42px; min-width: 320px; display: flex; gap: 10px; align-items: center;
  border: 1px solid var(--line); border-radius: 8px; padding: 0 13px; color: var(--muted);
}
.table-tools input { border: 0; outline: 0; width: 100%; }
input, select, textarea {
  width: 100%; border: 1px solid #d9e1ed; border-radius: 8px;
  color: var(--ink); background: #fff; outline: none;
}
input, select { height: 43px; padding: 0 13px; }
textarea { min-height: 95px; padding: 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(108,59,255,.08); }
.table-tools select { width: 210px; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr); align-items: start; }
.calendar-summary, .finance-metrics, .report-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px;
}
.calendar-summary article {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 19px;
}
.calendar-summary small, .finance-metrics small, .report-cards small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 9px; }
.calendar-summary strong { font-size: 15px; font-weight: 550; }
.calendar-panel { overflow: hidden; }
.calendar-toolbar {
  min-height: 66px; padding: 12px 18px; border-bottom: 1px solid var(--line);
  gap: 16px; flex-wrap: wrap;
}
.calendar-navigation { display: flex; align-items: center; gap: 8px; }
.calendar-navigation > a {
  height: 38px; min-width: 38px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 8px; background: white; color: #52627a;
}
.calendar-navigation svg { width: 16px; }
.calendar-navigation .calendar-today { padding: 0 13px; font-size: 12px; font-weight: 500; }
.calendar-navigation h2 { margin: 0 0 0 10px; font-size: 17px; font-weight: 600; }
.calendar-switch {
  display: inline-flex; border: 1px solid var(--line); border-radius: 8px;
  padding: 3px; margin-left: auto; background: #fafbff;
}
.calendar-switch a {
  height: 34px; min-width: 72px; display: grid; place-items: center;
  border-radius: 6px; color: #53637b; font-size: 12px; font-weight: 500;
}
.calendar-switch a.active { background: var(--purple); color: white; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(142px, 1fr)); min-width: 995px; }
.calendar-column { padding: 0 10px 14px; min-height: 430px; border-right: 1px solid var(--line); }
.calendar-column > header {
  height: 62px; justify-content: center; flex-direction: column; gap: 5px;
  border-bottom: 1px solid var(--line); margin: 0 -10px 12px;
}
.calendar-column > header small { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.calendar-column > header b { font-size: 18px; font-weight: 550; }
.calendar-column.today > header b {
  width: 31px; height: 31px; border-radius: 50%; display: grid; place-items: center;
  background: var(--purple); color: white;
}
.appointment-chip {
  padding: 11px; margin-bottom: 10px; border: 1px solid #dfd8ff; border-left: 3px solid var(--purple);
  border-radius: 8px; background: #faf9ff; overflow: hidden;
}
.appointment-chip time { display: block; font-size: 11px; color: var(--purple); font-weight: 600; margin-bottom: 7px; }
.appointment-chip > a:not(.whatsapp-action) { display: block; color: var(--ink); font-size: 12px; font-weight: 550; line-height: 1.35; }
.appointment-chip p { margin: 5px 0; font-size: 11px; line-height: 1.35; color: #495872; }
.appointment-chip small { display: block; color: var(--muted); font-size: 10px; line-height: 1.4; }
.whatsapp-action {
  display: inline-flex !important; align-items: center; gap: 5px; margin-top: 10px;
  color: #128645 !important; font-size: 10.5px !important; font-weight: 550;
}
.whatsapp-action svg { width: 13px; height: 13px; }
.drop-space { margin: 10px 0; padding: 14px 6px; text-align: center; border: 1px dashed #e3e8f0; border-radius: 8px; color: #9aa6b7; font-size: 11px; }
.month-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); padding: 14px 18px 8px; color: var(--muted); font-size: 11px; font-weight: 600; }
.month-weekdays span { padding-left: 8px; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); padding: 0 18px 18px; }
.calendar-cell {
  min-height: 116px; border: 1px solid #edf0f5; margin: -1px 0 0 -1px;
  padding: 8px; overflow: hidden;
}
.calendar-cell > b { display: block; font-size: 12px; color: #3f4d65; font-weight: 550; margin-bottom: 6px; }
.calendar-cell.outside { background: #fbfcfe; opacity: .48; }
.calendar-cell.today > b { color: var(--purple); }
.month-chip {
  display: block; padding: 5px 6px; margin: 4px 0; border-radius: 5px;
  background: var(--purple-soft); color: #44308c; font-size: 10px; white-space: nowrap;
  text-overflow: ellipsis; overflow: hidden;
}
.month-chip time { margin-right: 5px; font-weight: 600; }
.calendar-cell > small { color: var(--muted); font-size: 10px; }
.schedule-shell {
  --minute-height: 2px;
  --agenda-minutes: 600;
  position: relative;
  overflow-x: auto;
  background: #fff;
}
.schedule-preview {
  position: sticky;
  left: 18px;
  top: 0;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin: 12px 18px 4px;
  padding: 0 14px;
  border: 1px solid #dbe5f2;
  border-radius: 999px;
  background: #f8fbff;
  color: #52627a;
  font-size: 12px;
  font-weight: 500;
}
.schedule-preview.active {
  border-color: #8dc5ff;
  background: #edf7ff;
  color: #0b67bc;
}
.schedule-grid {
  display: grid;
  grid-template-columns: 72px repeat(7, minmax(178px, 1fr));
  min-width: 1320px;
  padding: 0 18px 18px;
}
.schedule-grid.one-day { grid-template-columns: 72px minmax(520px, 1fr); min-width: 720px; }
.schedule-hours {
  position: relative;
  display: grid;
  grid-template-rows: 54px calc(var(--agenda-minutes) * var(--minute-height));
  color: #738198;
  font-size: 11px;
}
.schedule-hours time {
  position: absolute;
  top: calc(54px + ((var(--hour) * 60) * var(--minute-height)) - 7px);
  right: 12px;
}
.schedule-day {
  min-width: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  margin-right: -1px;
}
.schedule-day > header {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  background: #fbfcff;
}
.schedule-day > header small {
  color: #63728a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.schedule-day > header b { font-size: 16px; font-weight: 650; color: #172033; }
.schedule-day > header span { font-size: 10px; color: #8a96a8; }
.schedule-day.today > header { background: #f3efff; }
.schedule-track {
  position: relative;
  height: calc(var(--agenda-minutes) * var(--minute-height));
  background:
    repeating-linear-gradient(to bottom, #edf1f6 0 1px, transparent 1px calc(30 * var(--minute-height))),
    linear-gradient(#fff, #fff);
}
.schedule-day.drop-target .schedule-track { background-color: #f7fbff; outline: 2px solid rgba(59, 130, 246, .18); outline-offset: -2px; }
.schedule-event {
  position: absolute;
  z-index: 2;
  left: 8px;
  right: 8px;
  top: calc(var(--start) * var(--minute-height));
  height: max(32px, calc(var(--duration) * var(--minute-height)));
  padding: 8px 10px 14px;
  border: 1px solid #b8e7d6;
  border-left: 4px solid #28b37b;
  border-radius: 8px;
  background: #ebfff6;
  box-shadow: 0 8px 18px rgba(22, 37, 59, .08);
  cursor: grab;
  overflow: hidden;
  transition: box-shadow .16s ease, transform .16s ease, opacity .16s ease;
}
.schedule-event.status-agendado { background: #eef6ff; border-color: #b9d9ff; border-left-color: #4f8ee8; }
.schedule-event.status-em-andamento { background: #fff7e8; border-color: #ffd899; border-left-color: #f59e0b; }
.schedule-event.status-concluido { background: #ebfff6; border-color: #b8e7d6; border-left-color: #28b37b; }
.schedule-event.status-cancelado { background: #fff1f2; border-color: #fecdd3; border-left-color: #f43f5e; }
.schedule-event.dragging { opacity: .58; transform: scale(.985); cursor: grabbing; }
.schedule-event.resizing { box-shadow: 0 12px 28px rgba(22, 37, 59, .18); }
.schedule-event time { display: block; color: #255445; font-size: 10.5px; font-weight: 750; margin-bottom: 4px; }
.schedule-event > a:not(.whatsapp-action) {
  display: block;
  color: #142033;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.schedule-event p { margin: 3px 0 2px; color: #4f5d73; font-size: 10.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schedule-event small { display: block; color: #65748b; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schedule-event .whatsapp-action { margin-top: 5px; }
.schedule-resize {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
  border: 0;
  background: linear-gradient(to bottom, transparent, rgba(15, 23, 42, .06));
  cursor: ns-resize;
}
.schedule-resize:after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 28px;
  height: 3px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(15, 23, 42, .24);
}
.schedule-drop-hint {
  position: absolute;
  inset: 10px;
  display: grid;
  place-items: center;
  border: 1px dashed #d7deea;
  border-radius: 9px;
  color: #9aa6b7;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
}
.schedule-day.drop-target .schedule-drop-hint { opacity: 1; }
.day-schedule { max-width: 820px; padding: 20px; }
.calendar-day-head { display: flex; gap: 14px; align-items: baseline; margin-bottom: 18px; }
.calendar-day-head b { color: var(--purple); font-size: 12px; text-transform: uppercase; }
.calendar-day-head strong { font-size: 18px; font-weight: 600; }
.day-appointment { display: grid; grid-template-columns: 72px 1fr; gap: 15px; align-items: start; margin-bottom: 12px; }
.day-appointment > time { color: var(--muted); font-size: 12px; padding-top: 15px; }
.day-appointment .appointment-chip { margin: 0; }
.day-appointment .appointment-chip header { margin-bottom: 5px; }
.day-appointment .appointment-chip header a { font-weight: 550; }
.calendar-empty { color: var(--muted); padding: 30px; }
.patient-profile { display: grid; grid-template-columns: 290px minmax(420px, 1fr); gap: 18px; }
.patient-head .back-link {
  display: inline-flex; gap: 7px; align-items: center; color: var(--purple);
  margin-bottom: 12px; font-size: 12px; font-weight: 500;
}
.back-link svg { width: 15px; height: 15px; }
.profile-card { padding: 24px 20px; text-align: center; height: max-content; }
.patient-avatar {
  width: 62px; height: 62px; margin: 0 auto 14px; display: grid; place-items: center;
  border-radius: 50%; color: var(--purple); background: var(--purple-soft);
  font-size: 22px; font-weight: 600;
}
.profile-card h2 { margin: 0 0 13px; font-size: 18px; font-weight: 600; }
.profile-card dl { margin: 25px 0 0; text-align: left; display: grid; gap: 6px; }
.profile-card dt { margin-top: 10px; color: var(--muted); font-size: 11px; }
.profile-card dd { margin: 0; color: #25324a; font-size: 13px; overflow-wrap: anywhere; }
.patient-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.patient-metrics article { padding: 17px 19px; }
.patient-metrics small { color: var(--muted); display: block; margin-bottom: 7px; }
.patient-metrics strong { font-size: 25px; font-weight: 600; }
.timeline-panel { padding: 20px; }
.timeline-panel header { margin-bottom: 18px; }
.timeline-panel h2 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.timeline-panel header p { margin: 0; color: var(--muted); font-size: 12px; }
.timeline { position: relative; }
.timeline:before { content: ""; position: absolute; left: 19px; top: 10px; bottom: 10px; width: 1px; background: #e1e7f0; }
.timeline-entry {
  position: relative; display: grid; grid-template-columns: 40px minmax(260px, 1fr) auto;
  gap: 15px; padding: 13px 0; align-items: start;
}
.timeline-icon {
  z-index: 1; width: 39px; height: 39px; border-radius: 50%; display: grid; place-items: center;
  color: var(--purple); background: var(--purple-soft);
}
.timeline-icon svg { width: 18px; height: 18px; }
.timeline-entry.teal .timeline-icon { color: var(--teal); background: var(--teal-soft); }
.timeline-entry.orange .timeline-icon { color: var(--orange); background: var(--orange-soft); }
.timeline-entry.green .timeline-icon { color: var(--green); background: var(--green-soft); }
.timeline-entry time { color: var(--muted); font-size: 11px; }
.timeline-entry h3 { margin: 5px 0; font-size: 13px; font-weight: 550; }
.timeline-entry p { margin: 0; line-height: 1.48; color: #55647d; font-size: 12px; }
.empty.compact { min-height: 150px; }
.session-grid, .plans-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px;
}
.session-card, .plan { padding: 17px; }
.session-card header { justify-content: flex-start; gap: 12px; margin-bottom: 17px; }
.session-card header .status { margin-left: auto; }
.initial { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--purple); background: var(--purple-soft); font-weight: 600; }
.session-card h2, .plan h2 { margin: 0; font-size: 14px; font-weight: 550; }
.session-card small, .plan small { color: var(--muted); }
.session-card dl {
  display: grid; grid-template-columns: 86px 1fr; margin: 0 0 18px; gap: 9px; font-size: 12px;
}
.session-card dt { color: var(--muted); }
.session-card dd { margin: 0; }
.session-card form { display: flex; gap: 8px; }
.session-card form select { height: 39px; }
.session-card form button { height: 39px; }
.records { padding: 8px 20px; }
.record {
  display: grid; grid-template-columns: 110px 1fr auto; gap: 20px; align-items: start; padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.record-date { color: var(--muted); font-size: 12px; }
.record h2 { margin: 0 0 7px; font-size: 14px; font-weight: 550; }
.record p { margin: 0 0 9px; }
.record small { color: var(--muted); }
.record-head { margin-bottom: 12px; }
.record-tabs {
  position: sticky;
  top: 78px;
  z-index: 20;
  display: flex;
  gap: 18px;
  overflow-x: auto;
  margin: -4px -4px 16px;
  padding: 0 4px;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 247, 251, .96);
  backdrop-filter: blur(8px);
}
.record-tabs a {
  position: relative;
  flex: 0 0 auto;
  padding: 13px 0 14px;
  color: #617089;
  font-size: 13px;
  font-weight: 500;
}
.record-tabs a.active,
.record-tabs a:hover { color: var(--purple); }
.record-tabs a.active:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--purple);
}
.record-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.record-summary {
  position: sticky;
  top: 134px;
  padding: 20px;
}
.record-summary h2 { margin: 0 0 10px; font-size: 17px; font-weight: 600; text-align: center; }
.record-summary dl { margin: 22px 0 0; display: grid; gap: 6px; }
.record-summary dt { margin-top: 9px; color: var(--muted); font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .03em; }
.record-summary dd { margin: 0; color: #25324a; font-size: 13px; overflow-wrap: anywhere; }
.record-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.record-kpis span {
  min-height: 58px;
  display: grid;
  place-content: center;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
  color: #64748b;
  font-size: 10px;
}
.record-kpis b { display: block; color: #172033; font-size: 18px; font-weight: 650; }
.record-content { display: grid; gap: 16px; min-width: 0; }
.record-section { padding: 20px; scroll-margin-top: 132px; }
.record-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.record-section small {
  display: block;
  margin-bottom: 4px;
  color: var(--purple);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.record-section h2 { margin: 0; color: #162033; font-size: 16px; font-weight: 650; }
.record-section.mini { min-height: 125px; }
.record-section.mini p { margin: 10px 0 0; color: var(--muted); line-height: 1.55; }
.record-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px 12px;
}
.record-form label {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: #52627a;
  font-size: 11px;
  font-weight: 650;
}
.record-form label > span {
  min-height: 14px;
  padding-left: 10px;
  background: #fff;
}
.record-form input,
.record-form select,
.record-form textarea {
  height: 42px;
  margin: 0;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
}
.record-form textarea { min-height: 88px; resize: vertical; }
.record-form .span-2 { grid-column: span 2; }
.record-form .span-all { grid-column: 1 / -1; }
.record-check {
  align-self: end;
  min-height: 42px;
  display: flex !important;
  align-items: center;
  gap: 8px !important;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #334155 !important;
  font-size: 13px !important;
}
.record-check input { width: 18px; height: 18px; }
.record-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.compact-list { display: grid; gap: 8px; }
.compact-list a,
.compact-list p {
  margin: 0;
  display: block;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfdff;
}
.compact-list a b { display: block; margin-bottom: 5px; color: #1e293b; font-size: 13px; font-weight: 650; }
.compact-list a span { display: block; color: #64748b; font-size: 12px; line-height: 1.45; }
.record-timeline { scroll-margin-top: 132px; }
.empty {
  text-align: center; min-height: 270px; display: grid; place-content: center; color: var(--muted);
}
.empty svg { width: 44px; height: 44px; margin: auto auto 15px; color: var(--purple); }
.empty h2 { font-size: 17px; color: var(--ink); margin: 0 0 8px; }
.empty p { margin: 0; }
.plan header { justify-content: flex-start; gap: 13px; }
.plan header svg { color: var(--purple); background: var(--purple-soft); width: 42px; height: 42px; padding: 11px; border-radius: 9px; }
.plan .status { margin-left: auto; }
.plan p { color: #3b485f; min-height: 55px; line-height: 1.5; }
.plan footer { border-top: 1px solid var(--line); padding-top: 13px; display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.finance-metrics article { padding: 20px; }
.finance-metrics strong, .report-cards strong { display: block; font-size: 25px; font-weight: 600; margin-bottom: 8px; }
.finance-metrics em { color: var(--muted); font-size: 12px; font-style: normal; }
.report-cards { grid-template-columns: repeat(4, 1fr); }
.report-cards article { padding: 20px; position: relative; }
.report-cards svg { position: absolute; right: 19px; top: 20px; color: var(--purple); }
.report-list { padding: 22px; max-width: 780px; }
.report-list h2 { margin-bottom: 16px; }
.report-list a {
  min-height: 66px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 15px;
}
.report-list a svg { color: var(--purple); }
.report-list a b { display: block; font-size: 13px; font-weight: 550; }
.report-list a small { color: var(--muted); }
.report-list button { margin-left: auto; border: 1px solid var(--line); background: white; border-radius: 7px; padding: 9px 17px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 17px; }
.settings-grid article { padding: 22px; }
.settings-grid h2 { margin: 0 0 18px; font-size: 16px; }
.settings-grid label { display: block; margin-bottom: 15px; color: #55647d; font-size: 12px; font-weight: 500; }
.settings-grid label input, .settings-grid label select { margin-top: 7px; }
.settings-grid p { color: var(--muted); line-height: 1.6; }
.notice { display: block; padding: 14px; border-radius: 8px; background: #fff6e8; color: #9a5e08; font-size: 12px; }
.notice.success { border: 1px solid #ccebdc; background: #effaf4; color: #188657; }
.professional-feedback { margin-bottom: 14px; }
.access-note { display: flex; gap: 17px; padding: 26px; max-width: 720px; }
.access-note svg { color: var(--purple); }
.access-note h2 { margin: 0 0 9px; font-size: 16px; }
.access-note p { margin: 0; color: var(--muted); }
.modal {
  display: none; position: fixed; inset: 0; z-index: 50;
  background: rgba(15, 23, 42, .38); place-items: center; padding: 20px;
}
.modal.open { display: grid; }
.modal-card {
  width: min(630px, 96vw); max-height: calc(100vh - 40px); overflow-y: auto;
  background: #fff; border-radius: 14px; padding: 23px;
}
.modal-card.wide { width: min(720px, 96vw); }
.modal-card.extra-wide { width: min(980px, 96vw); }
.modal-card.compact { width: min(540px, 96vw); }
.modal-card header { display: flex; justify-content: space-between; margin-bottom: 22px; }
.modal-card h2 { margin: 0 0 7px; font-size: 19px; }
.modal-card p { margin: 0; color: var(--muted); font-size: 12px; }
.modal-card header button { border: 0; background: transparent; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid label {
  color: #52627a; font-size: 12px; font-weight: 500;
}
.form-grid input, .form-grid select, .form-grid textarea { margin-top: 7px; }
.form-grid .span-2 { grid-column: span 2; }
.modal-card footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

.form-section {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  margin: 5px 0 0; padding: 12px 0 2px; border-top: 1px solid var(--line);
}
.form-section:first-child { border-top: 0; padding-top: 0; }
.form-section strong { color: #1f2a44; font-size: 13px; font-weight: 650; }
.form-section span { color: var(--muted); font-size: 12px; text-align: right; }
.anamnesis-summary { padding: 18px 20px; margin-bottom: 16px; }
.anamnesis-summary header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 16px; }
.anamnesis-summary h2, .guidance-card h2, .table-panel h2 { margin: 0 0 6px; font-size: 16px; font-weight: 650; }
.anamnesis-summary p, .guidance-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.info-grid span { display: block; padding: 12px; border: 1px solid var(--line); border-radius: 9px; color: #2f3d56; background: #fbfdff; overflow-wrap: anywhere; }
.info-grid b { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .02em; }
.guidance-card { padding: 22px; height: max-content; }
.guidance-card ul { margin: 15px 0 0; padding-left: 18px; color: #465570; line-height: 1.7; }

.anamnesis-body { min-height: 100vh; background: linear-gradient(180deg, #f4f7fb, #fff); }
.anamnesis-shell { width: min(920px, calc(100% - 28px)); margin: 28px auto; }
.anamnesis-card { padding: 28px; }
.anamnesis-header { display: flex; gap: 16px; align-items: center; padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.anamnesis-header strong { color: var(--purple); font-weight: 750; }
.anamnesis-header h1 { margin: 4px 0 4px; font-size: 25px; line-height: 1.15; }
.anamnesis-header p { margin: 0; color: var(--muted); }
.anamnesis-form { display: grid; gap: 16px; }
.anamnesis-form > label { display: grid; gap: 8px; color: #4b5971; font-size: 12px; font-weight: 650; }
.signature-pad { width: 100%; height: 220px; border: 1px dashed #adc0d8; border-radius: 12px; background: #fff; touch-action: none; }
.signature-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.success-state { border: 1px solid #b7ebc6; background: #f0fdf4; }
.whatsapp-primary { border-color: #168B5B; background: #168B5B; }
.whatsapp-primary:hover { border-color: #0E754A; background: #0E754A; }
.yes-no-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.yes-no-question { min-width: 0; margin: 0; padding: 16px; border: 1px solid #e4e1ef; border-radius: 12px; background: #fcfbff; transition: border-color .2s ease, box-shadow .2s ease; }
.yes-no-question.answered-yes { border-color: #cbbff5; box-shadow: 0 7px 20px rgba(91, 58, 196, .07); }
.yes-no-question legend { max-width: 100%; padding: 0 4px; color: #303548; font-size: 12px; font-weight: 700; line-height: 1.45; }
.yes-no-options { display: flex; gap: 8px; margin: 10px 0 0; }
.yes-no-options label { cursor: pointer; }
.yes-no-options input { position: absolute; opacity: 0; pointer-events: none; }
.yes-no-options span { min-width: 66px; display: inline-flex; justify-content: center; padding: 8px 14px; border: 1px solid #dedbe8; border-radius: 9px; background: #fff; color: #656a7b; font-size: 11px; font-weight: 700; transition: .18s ease; }
.yes-no-options input:checked + span { border-color: var(--purple); background: var(--purple-soft); color: var(--purple); box-shadow: 0 0 0 3px rgba(95, 56, 230, .07); }
.conditional-details { display: grid; gap: 7px; margin-top: 13px; color: #565c70; font-size: 11px; font-weight: 650; }
.conditional-details[hidden] { display: none; }
.conditional-details textarea { min-height: 78px; }
.record-inline-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #e0dcef; border-radius: 9px; background: #fff; color: var(--purple); }
.icon-btn:hover { border-color: #bfb1f1; background: var(--purple-soft); }
.prescription-section { grid-column: 1 / -1; }
.prescription-section > header { align-items: center; }
.prescription-list { display: grid; gap: 9px; }
.prescription-list > article { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px; border: 1px solid #e7e4ef; border-radius: 12px; background: linear-gradient(135deg, #fff, #fbfaff); }
.prescription-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: var(--purple-soft); color: var(--purple); }
.prescription-list h3 { margin: 3px 0 4px; color: #24283a; font-size: 12.5px; }
.prescription-list small, .prescription-list p { margin: 0; color: var(--muted); font-size: 10px; }
.prescription-drawer { width: min(540px, 100vw); }
.activation-banner { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; margin-bottom: 16px; padding: 17px; border: 1px solid #ccebdc; border-radius: 13px; background: linear-gradient(135deg, #f0fbf5, #fbfffd); }
.activation-banner > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: #dff6e9; color: #168657; }
.activation-banner strong { color: #1e3a2e; font-size: 13px; }
.activation-banner p { margin: 4px 0 7px; color: #66756d; font-size: 10.5px; }
.activation-banner code { display: block; max-width: 650px; overflow: hidden; color: #315847; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.activation-banner .copied { border-color: #79c9a2; background: #e7f8ef; color: #12734a; }
.users-table td > small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.users-table td > code { color: #4d426f; font-size: 10px; }
.user-actions { display: flex; align-items: center; gap: 6px; }
.user-actions form { margin: 0; }
.user-actions .icon-btn { width: 31px; height: 31px; padding: 0; }
.user-actions .icon-btn svg { width: 14px; height: 14px; }
.user-active-label { color: #7a7f90; font-size: 9.5px; }
.drawer-security-note { display: flex; gap: 10px; align-items: flex-start; padding: 13px; border: 1px solid #e2ddf4; border-radius: 10px; background: #faf8ff; color: #5f5679; }
.drawer-security-note svg { width: 18px; height: 18px; flex: none; color: var(--purple); }
.drawer-security-note p { margin: 0; font-size: 10px; line-height: 1.55; }
.password-hint { display: block; margin: -7px 0 15px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.activation-login-link { justify-content: center; width: 100%; margin-top: 8px; }

.login-body { display: grid; grid-template-columns: 430px 1fr; min-height: 100vh; background: #fff; }
.login-panel {
  display: flex; flex-direction: column; justify-content: center;
  padding: 48px 48px 36px; border-right: 1px solid var(--line);
}
.login-brand { display: grid; grid-template-columns: 50px 1fr; column-gap: 13px; align-items: center; margin-bottom: 56px; }
.login-brand .pulse { grid-row: span 2; width: 48px; height: 48px; }
.login-brand b { font-size: 25px; }
.login-brand small { color: var(--muted); }
.login-panel h1 { font-size: 28px; margin: 0 0 9px; }
.login-panel > p { color: var(--muted); line-height: 1.55; margin: 0 0 27px; }
.login-unavailable {
  display: grid;
  gap: 5px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #fff7ed;
  color: #9a3412;
  padding: 14px;
  margin-bottom: 18px;
  font-size: 12px;
}
.login-unavailable strong { font-size: 13px; color: #7c2d12; }
.login-error { border-radius: 8px; background: #fff1f2; color: #be123c; padding: 12px; margin-bottom: 18px; }
.login-form fieldset { border: 0; margin: 0; padding: 0; }
.login-form label { display: block; color: #55647d; font-size: 12px; font-weight: 600; margin: 0 0 16px; }
.login-form input { margin-top: 8px; height: 49px; background: #fbfcfe; }
.login-form input:disabled { opacity: .7; cursor: not-allowed; }
.login-form .primary-btn { width: 100%; margin-top: 8px; height: 50px; }
.login-form .primary-btn:disabled { opacity: .65; cursor: not-allowed; }
.demo-access { margin: 30px 0 0; padding: 14px; background: var(--purple-soft); border-radius: 8px; color: #5841a4; font-size: 12px; }
.demo-access strong { display: block; margin-bottom: 6px; }
.developer { margin-top: 44px; color: var(--muted); }
.login-feature {
  min-height: 100vh; display: flex; align-items: center; padding: clamp(36px, 6vw, 88px);
  background: #f5f3ff;
}
.login-showcase { max-width: 700px; }
.login-showcase .tag {
  display: inline-flex; color: var(--purple); background: white; border: 1px solid #e1dbff;
  padding: 8px 13px; border-radius: 20px; font-size: 12px; font-weight: 500;
}
.login-showcase h2 { font-size: clamp(38px, 4vw, 54px); line-height: 1.14; letter-spacing: 0; margin: 24px 0 18px; max-width: 660px; }
.login-showcase p { font-size: 17px; line-height: 1.65; color: #5c6981; max-width: 550px; margin-bottom: 42px; }
.showcase-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.showcase-grid div { border: 1px solid #e5ddff; border-radius: 12px; background: white; padding: 19px; }
.showcase-grid svg { color: var(--purple); margin-bottom: 20px; }
.showcase-grid b { display: block; font-size: 13px; margin-bottom: 7px; }
.showcase-grid small { color: var(--muted); }

@media (max-width: 1180px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .dashboard-layout { grid-template-columns: 1fr; }
  .quick-column { display: grid; grid-template-columns: repeat(2, 1fr); }
  .session-grid, .plans-grid { grid-template-columns: repeat(2, 1fr); }
  .calendar-panel { overflow-x: auto; }
  .record-shell { grid-template-columns: 1fr; }
  .record-summary { position: static; }
  .record-form { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.visible { transform: translateX(0); }
  .workspace { margin-left: 0; }
  .topbar { height: 65px; padding: 0 16px; gap: 12px; }
  .mobile-menu { display: block; }
  .search { width: auto; flex: 1; }
  .search kbd, .account span:not(.avatar), .bell { display: none; }
  .account { padding-left: 0; border: 0; gap: 6px; }
  .content { padding: 20px 15px; }
  .dashboard-panels, .quick-column, .session-grid, .plans-grid, .settings-grid, .calendar-summary, .finance-metrics, .report-cards, .grid.two, .info-grid { grid-template-columns: 1fr; }
  .table-panel { overflow-x: auto; }
  .table-panel table { min-width: 680px; }
  .patient-profile { grid-template-columns: 1fr; }
  .record-tabs { top: 64px; margin-left: -15px; margin-right: -15px; padding-left: 15px; }
  .record-grid, .record-form { grid-template-columns: 1fr; }
  .record-form .span-2, .record-form .span-all { grid-column: auto; }
  .profile-card { text-align: left; }
  .patient-avatar { margin-left: 0; }
  .month-grid, .month-weekdays { min-width: 700px; }
  .login-body { grid-template-columns: 1fr; }
  .login-panel { padding: 42px 26px; min-height: 100vh; }
  .login-feature { display: none; }
}
@media (max-width: 580px) {
  .welcome, .page-head { align-items: flex-start; flex-direction: column; gap: 15px; }
  .metrics { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .form-section { display: block; }
  .form-section span { display: block; margin-top: 5px; text-align: left; }
  .anamnesis-card { padding: 20px; }
  .yes-no-grid { grid-template-columns: 1fr; }
  .prescription-list > article { grid-template-columns: 38px minmax(0, 1fr); }
  .prescription-list > article > .secondary-btn { grid-column: 1 / -1; justify-content: center; }
  .activation-banner { grid-template-columns: 40px minmax(0, 1fr); }
  .activation-banner > button { grid-column: 1 / -1; justify-content: center; }
  .page-actions { width: 100%; }
  .page-actions .primary-btn, .page-actions .secondary-btn { flex: 1 1 100%; }
  .patient-metrics { grid-template-columns: 1fr; }
  .timeline-entry { grid-template-columns: 40px minmax(0, 1fr); }
  .timeline-entry .status { grid-column: 2; }
}
@media print {
  .sidebar, .topbar, .page-head .secondary-btn { display: none !important; }
  .workspace { margin: 0; }
  .content { padding: 0; }
  body { background: #fff; }
  .panel { break-inside: avoid; box-shadow: none; }
}

/* Attendances */
.attendance-head {
  align-items: flex-end;
  margin-bottom: 20px;
}
.page-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--purple);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.attendance-head h1 { font-size: 28px; letter-spacing: -.025em; }
.attendance-head p { max-width: 650px; line-height: 1.55; }
.attendance-total {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.attendance-total strong {
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #ded8ff;
  border-radius: 10px;
  background: #f5f2ff;
  color: var(--purple);
  font-size: 14px;
}
.attendance-filters {
  margin-bottom: 20px;
  padding: 18px;
  border-color: #e2e5eb;
  box-shadow: 0 8px 28px rgba(31, 42, 68, .045);
}
.attendance-filters .filter-heading {
  justify-content: flex-start;
  gap: 11px;
  margin-bottom: 16px;
}
.filter-heading-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 9px;
  background: var(--purple-soft);
  color: var(--purple);
}
.filter-heading-icon svg { width: 17px; height: 17px; stroke-width: 1.8; }
.filter-heading h2 { color: #172033; font-size: 13px !important; font-weight: 650 !important; }
.filter-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.filter-count {
  margin-left: auto;
  padding: 6px 9px;
  border-radius: 20px;
  background: #f5f2ff;
  color: #6844d8;
  font-size: 10px;
  font-weight: 650;
}
.attendance-filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) repeat(3, minmax(145px, 1fr));
  gap: 12px;
  align-items: end;
}
.attendance-filter-form > label {
  min-width: 0;
  display: grid;
  gap: 6px;
}
.attendance-filter-form > label > span:first-child {
  color: #5f6d83;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .025em;
}
.attendance-filter-form input,
.attendance-filter-form select {
  width: 100%;
  height: 41px;
  margin: 0;
  border: 1px solid #dce2ea;
  border-radius: 8px;
  background-color: #fff;
  color: #233047;
  font-size: 12px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.attendance-filter-form input:focus,
.attendance-filter-form select:focus {
  border-color: #9d87ee;
  box-shadow: 0 0 0 3px rgba(108, 59, 255, .09);
}
.field-with-icon { position: relative; display: block; }
.field-with-icon svg {
  position: absolute;
  left: 13px;
  top: 12px;
  width: 16px;
  height: 16px;
  color: #8592a7;
  stroke-width: 1.8;
  pointer-events: none;
}
.field-with-icon input { padding-left: 38px; }
.filter-actions {
  grid-column: 1 / -1;
  min-height: 41px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}
.apply-filters,
.clear-filters {
  height: 41px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.apply-filters { border: 1px solid var(--purple); background: var(--purple); color: #fff; }
.clear-filters { border: 1px solid #dce2ea; background: #fff; color: #5d6b80; }
.apply-filters svg, .clear-filters svg { width: 15px; height: 15px; stroke-width: 1.9; }
.attendance-grid { gap: 17px; }
.attendance-card {
  position: relative;
  padding: 20px;
  overflow: hidden;
  border-color: #e1e5eb;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(31, 42, 68, .055);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.attendance-card:hover {
  transform: translateY(-2px);
  border-color: #d6d0ee;
  box-shadow: 0 15px 38px rgba(31, 42, 68, .08);
}
.card-accent { position: absolute; inset: 0 0 auto; height: 3px; background: #94a3b8; }
.status-accent-confirmado, .status-accent-concluido { background: #32a672; }
.status-accent-em-atendimento { background: #4d7fe9; }
.status-accent-falta, .status-accent-cancelado { background: #e26c72; }
.attendance-card > header {
  min-width: 0;
  align-items: flex-start;
  margin-bottom: 18px;
}
.patient-identity { min-width: 0; display: flex; align-items: center; gap: 11px; }
.patient-identity > span:last-child { min-width: 0; }
.attendance-card .initial {
  width: 42px;
  height: 42px;
  flex: none;
  background: linear-gradient(145deg, #eee9ff, #f7f4ff);
  box-shadow: inset 0 0 0 1px #e9e2ff;
  font-size: 13px;
}
.attendance-card h2 {
  margin: 0 0 4px;
  overflow: hidden;
  color: #172033;
  font-size: 14px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attendance-card .patient-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attendance-card .status {
  margin: 0 0 0 auto;
  flex: none;
  gap: 6px;
  border: 1px solid #e0e5ec;
  border-radius: 20px;
  padding: 6px 9px;
  background: #f7f9fb;
  color: #59677b;
  font-size: 9.5px;
  font-weight: 650;
}
.attendance-card .status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.attendance-card .status-confirmado,
.attendance-card .status-concluido { border-color: #ccebdc; background: #effaf4; color: #188657; }
.attendance-card .status-em-atendimento { border-color: #d2dffc; background: #f1f5ff; color: #3568d5; }
.attendance-card .status-falta,
.attendance-card .status-cancelado { border-color: #f2d3d5; background: #fff4f4; color: #c24f58; }
.appointment-datetime {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 17px;
  padding: 13px;
  border: 1px solid #e5e1f6;
  border-radius: 11px;
  background: linear-gradient(120deg, #faf9ff, #f7f9fd);
}
.date-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 9px;
  background: #fff;
  color: var(--purple);
  box-shadow: 0 3px 10px rgba(55, 39, 105, .08);
}
.date-icon svg { width: 17px; height: 17px; stroke-width: 1.7; }
.appointment-datetime > span:last-child { min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; width: 100%; }
.appointment-datetime small { grid-column: 1 / -1; color: #7c8799; font-size: 9px; font-weight: 650; letter-spacing: .045em; text-transform: uppercase; }
.appointment-datetime strong { color: #202b3e; font-size: 12px; font-weight: 650; }
.appointment-datetime em { align-self: center; color: #7b8799; font-size: 9.5px; font-style: normal; }
.appointment-details {
  display: grid !important;
  grid-template-columns: minmax(0, 1.5fr) minmax(90px, .8fr) !important;
  gap: 13px !important;
  margin: 0 0 18px !important;
}
.appointment-details > div { min-width: 0; }
.appointment-details dt {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  color: #7a879a !important;
  font-size: 9.5px;
  font-weight: 600;
}
.appointment-details dt svg { width: 13px; height: 13px; color: #8b7bc7; stroke-width: 1.8; }
.appointment-details dd { overflow: hidden; color: #29364b; font-size: 11.5px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.status-update-form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 9px !important;
  padding-top: 16px;
  border-top: 1px solid #edf0f4;
}
.status-update-form label { min-width: 0; display: grid; gap: 6px; }
.status-update-form label > span { color: #7a879a; font-size: 9.5px; font-weight: 600; }
.status-update-form select {
  width: 100%;
  height: 39px !important;
  margin: 0;
  border-color: #dce2ea;
  border-radius: 8px;
  background-color: #fff;
  color: #2d3a50;
  font-size: 11px;
}
.status-update-form button {
  height: 39px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #d8d1f5;
  border-radius: 8px;
  padding: 0 12px;
  background: #f4f1ff;
  color: #6242cd;
  font-size: 10.5px;
  font-weight: 650;
  transition: background .16s ease, color .16s ease, opacity .16s ease;
}
.status-update-form button:not(:disabled):hover { background: var(--purple); color: #fff; }
.status-update-form button:disabled { opacity: .45; cursor: default; }
.status-update-form button svg { width: 14px; height: 14px; stroke-width: 1.9; }
.status-update-form button.is-loading svg { animation: attendance-spin .8s linear infinite; }
@keyframes attendance-spin { to { transform: rotate(360deg); } }
.attendance-empty {
  min-height: 310px;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 40px 20px;
  text-align: center;
}
.attendance-empty > span { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; background: var(--purple-soft); color: var(--purple); }
.attendance-empty svg { width: 24px; height: 24px; stroke-width: 1.7; }
.attendance-empty h2 { margin: 17px 0 7px; font-size: 16px; }
.attendance-empty p { max-width: 430px; margin: 0 0 18px; color: var(--muted); line-height: 1.55; }
.attendance-empty a { border: 1px solid #d8d1f5; border-radius: 8px; padding: 10px 14px; color: #6242cd; font-size: 11px; font-weight: 650; }

@media (max-width: 1180px) {
  .attendance-filter-form { grid-template-columns: repeat(3, minmax(145px, 1fr)); }
  .attendance-filter-form .filter-search { grid-column: span 2; }
}
@media (max-width: 860px) {
  .attendance-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .attendance-filter-form .filter-search { grid-column: 1 / -1; }
  .attendance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .attendance-head { align-items: flex-start; }
  .attendance-total { align-self: stretch; justify-content: flex-start; }
  .attendance-filters { padding: 15px; }
  .filter-heading { align-items: flex-start !important; }
  .filter-count { display: none; }
  .attendance-filter-form { grid-template-columns: 1fr; }
  .attendance-filter-form .filter-search { grid-column: auto; }
  .filter-actions { justify-content: stretch; }
  .filter-actions > * { flex: 1; }
  .attendance-grid { grid-template-columns: 1fr; }
}

/* Finance */
.finance-head { align-items: flex-end; margin-bottom: 20px; }
.finance-head h1 { font-size: 28px; letter-spacing: -.025em; }
.finance-head p { max-width: 660px; line-height: 1.55; }
.finance-new-button { box-shadow: 0 8px 20px rgba(108, 59, 255, .18); }
.finance-new-button svg { width: 16px; height: 16px; stroke-width: 2; }
.finance-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.finance-metric {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px;
  border-color: #e1e5eb;
  border-radius: 14px;
  box-shadow: 0 9px 28px rgba(31, 42, 68, .045);
}
.finance-metric .metric-icon {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 10px;
}
.finance-metric .metric-icon svg { width: 17px; height: 17px; stroke-width: 1.8; }
.finance-metric.balance .metric-icon { background: #f1edff; color: #6842de; }
.finance-metric.income .metric-icon { background: #eaf8f1; color: #188657; }
.finance-metric.expense .metric-icon { background: #fff0f0; color: #c65059; }
.finance-metric.pending .metric-icon { background: #fff6e8; color: #c3701a; }
.finance-metric > div { min-width: 0; }
.finance-metric small { display: block; margin: 1px 0 7px; color: #738096; font-size: 9.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.finance-metric strong { display: block; overflow: hidden; margin-bottom: 5px; color: #1b2639; font-size: 19px; font-weight: 680; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.finance-metric strong.negative { color: #c65059; }
.finance-metric em { display: block; overflow: hidden; color: #7b8798; font-size: 9.5px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.finance-cost-strip {
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(190px, .8fr) minmax(190px, .8fr) minmax(260px, 1.4fr);
  align-items: center;
  gap: 0;
  margin-bottom: 18px;
  padding: 10px 14px;
  border-color: #e2e6ec;
  border-radius: 13px;
}
.finance-cost-strip > div { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px 14px; }
.finance-cost-strip > div + div { border-left: 1px solid #e8ebf0; }
.cost-icon { width: 32px; height: 32px; display: grid; place-items: center; flex: none; border-radius: 9px; }
.cost-icon svg { width: 15px; height: 15px; stroke-width: 1.8; }
.cost-icon.fixed { background: #edf3ff; color: #446fd1; }
.cost-icon.variable { background: #f5efff; color: #8055c5; }
.finance-cost-strip small { display: block; margin-bottom: 3px; color: #7a8798; font-size: 9px; font-weight: 650; text-transform: uppercase; }
.finance-cost-strip strong { color: #253146; font-size: 13px; font-weight: 650; }
.finance-cost-strip .cost-note { justify-content: flex-end; text-align: right; }
.cost-note strong { min-width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; background: #f4f1ff; color: var(--purple); }
.cost-note span { color: #6d7a8f; font-size: 10px; }
.finance-filters { margin-bottom: 18px; padding: 18px; border-color: #e1e5eb; border-radius: 14px; box-shadow: 0 8px 28px rgba(31, 42, 68, .04); }
.finance-filters > header { justify-content: flex-start; gap: 11px; margin-bottom: 16px; }
.finance-section-icon { width: 34px; height: 34px; display: grid; place-items: center; flex: none; border-radius: 9px; background: var(--purple-soft); color: var(--purple); }
.finance-section-icon svg { width: 17px; height: 17px; stroke-width: 1.8; }
.finance-filters h2, .finance-ledger h2 { margin: 0; color: #172033; font-size: 13px; font-weight: 650; }
.finance-filters header p, .finance-ledger-head p { margin: 3px 0 0; color: var(--muted); font-size: 10.5px; }
.finance-filter-form {
  display: grid;
  grid-template-columns: minmax(230px, 1.6fr) repeat(3, minmax(145px, 1fr));
  gap: 12px;
  align-items: end;
}
.finance-filter-form > label { min-width: 0; display: grid; gap: 6px; }
.finance-filter-form > label > span:first-child { color: #5f6d83; font-size: 9.5px; font-weight: 650; letter-spacing: .025em; }
.finance-filter-form input, .finance-filter-form select {
  width: 100%;
  height: 40px;
  margin: 0;
  border: 1px solid #dce2ea;
  border-radius: 8px;
  background-color: #fff;
  color: #263349;
  font-size: 11px;
  outline: none;
}
.finance-filter-form input:focus, .finance-filter-form select:focus { border-color: #9d87ee; box-shadow: 0 0 0 3px rgba(108, 59, 255, .08); }
.finance-filter-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.finance-filter-actions .apply-filters, .finance-filter-actions .clear-filters { height: 40px; }
.finance-ledger { overflow: hidden; border-color: #e1e5eb; border-radius: 14px; box-shadow: 0 10px 30px rgba(31, 42, 68, .045); }
.finance-ledger-head { padding: 18px 20px 14px; border-bottom: 1px solid #edf0f4; }
.finance-table-wrap { overflow-x: auto; }
.finance-table { min-width: 980px; }
.finance-table th { height: 40px; padding: 0 14px; background: #fafbfd; color: #788599; font-size: 9px; font-weight: 650; letter-spacing: .035em; text-transform: uppercase; }
.finance-table td { height: 68px; padding: 10px 14px; color: #334158; vertical-align: middle; }
.finance-table tbody tr { transition: background .15s ease; }
.finance-table tbody tr:hover { background: #fcfcff; }
.ledger-description { min-width: 230px; display: flex; align-items: center; gap: 10px; }
.ledger-description > span:last-child { min-width: 0; }
.ledger-description strong { max-width: 250px; overflow: hidden; color: #1d293c; font-size: 11.5px; font-weight: 630; text-overflow: ellipsis; white-space: nowrap; }
.ledger-description small, .finance-table td > small { display: block; margin-top: 4px; color: #7b8799; font-size: 9.5px; }
.ledger-type-icon { width: 32px; height: 32px; display: grid; place-items: center; flex: none; border-radius: 9px; }
.ledger-type-icon svg { width: 15px; height: 15px; stroke-width: 1.9; }
.ledger-type-icon.income { background: #eaf8f1; color: #188657; }
.ledger-type-icon.expense { background: #fff0f0; color: #c65059; }
.movement-pill { display: inline-flex; align-items: center; border: 1px solid; border-radius: 20px; padding: 5px 8px; font-size: 9.5px; font-weight: 650; }
.movement-pill.income { border-color: #ccebdc; background: #f0faf5; color: #188657; }
.movement-pill.expense { border-color: #f0d3d5; background: #fff5f5; color: #bf4c55; }
.category-name, .due-date { color: #2a374c !important; font-size: 10.5px; font-weight: 600 !important; }
.cost-classification { display: block; margin-top: 4px; color: #7b8799; font-size: 9px; }
.ledger-amount { font-size: 11.5px; font-weight: 680 !important; white-space: nowrap; }
.ledger-amount.income { color: #188657; }
.ledger-amount.expense { color: #bf4c55; }
.finance-status-form { display: flex; align-items: center; gap: 6px; }
.finance-status {
  width: 104px;
  height: 32px;
  margin: 0;
  border: 1px solid #e0e5ec;
  border-radius: 18px;
  padding: 0 25px 0 10px;
  background-color: #f7f9fb;
  color: #59677b;
  font-size: 9.5px;
  font-weight: 600;
}
.finance-status.status-pago { border-color: #ccebdc; background-color: #effaf4; color: #188657; }
.finance-status.status-vencido { border-color: #f0d3d5; background-color: #fff4f4; color: #c24f58; }
.finance-status.status-pendente { border-color: #f1dec1; background-color: #fff8ec; color: #a9661d; }
.finance-status.status-cancelado { color: #788599; }
.finance-status-form button {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid #d8d1f5;
  border-radius: 8px;
  background: #f4f1ff;
  color: #6242cd;
}
.finance-status-form button:disabled { opacity: .38; cursor: default; }
.finance-status-form button:not(:disabled):hover { background: var(--purple); color: #fff; }
.finance-status-form button svg { width: 13px; height: 13px; stroke-width: 1.9; }
.finance-status-form button.is-loading svg { animation: attendance-spin .8s linear infinite; }
.finance-empty { min-height: 285px; display: grid; place-content: center; justify-items: center; padding: 38px 20px; text-align: center; }
.finance-empty > span { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 14px; background: var(--purple-soft); color: var(--purple); }
.finance-empty svg { width: 23px; height: 23px; stroke-width: 1.7; }
.finance-empty h2 { margin: 16px 0 7px; font-size: 15px; }
.finance-empty p { margin: 0 0 16px; color: var(--muted); font-size: 11px; }
.finance-empty a { border: 1px solid #d8d1f5; border-radius: 8px; padding: 9px 13px; color: #6242cd; font-size: 10.5px; font-weight: 650; }
.finance-entry-modal { width: min(860px, 96vw) !important; }
.finance-entry-modal > header { padding-bottom: 16px; border-bottom: 1px solid #edf0f4; }
.finance-entry-modal > header button svg { width: 18px; height: 18px; }
.modal-eyebrow { display: block; margin-bottom: 6px; color: var(--purple); font-size: 9px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.entry-type-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 0 19px; padding: 0; border: 0; }
.entry-type-picker legend { margin-bottom: 8px; color: #56647a; font-size: 10px; font-weight: 650; }
.entry-type-picker label { position: relative; cursor: pointer; }
.entry-type-picker input { position: absolute; opacity: 0; pointer-events: none; }
.entry-type-picker label > span { min-height: 64px; display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 10px; padding: 12px; border: 1px solid #e0e5ec; border-radius: 11px; background: #fff; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.entry-type-picker svg { grid-row: 1 / 3; width: 34px; height: 34px; padding: 9px; border-radius: 9px; stroke-width: 1.8; }
.entry-type-picker .income svg { background: #eaf8f1; color: #188657; }
.entry-type-picker .expense svg { background: #fff0f0; color: #c65059; }
.entry-type-picker b { color: #253146; font-size: 12px; font-weight: 650; }
.entry-type-picker small { color: #7b8798; font-size: 9.5px; }
.entry-type-picker input:checked + span { border-color: #a997ed; background: #faf9ff; box-shadow: 0 0 0 3px rgba(108, 59, 255, .07); }
.finance-entry-grid { gap: 13px; }
.finance-entry-grid label { font-size: 10.5px; font-weight: 600; }
.finance-entry-grid input, .finance-entry-grid select { height: 41px; font-size: 11px; }
.finance-entry-grid textarea { min-height: 72px; font-size: 11px; }
.finance-entry-grid .is-hidden { display: none; }
.finance-entry-grid [data-payment-date-group].is-muted { display: none; }
.finance-entry-modal footer .primary-btn svg { width: 15px; height: 15px; stroke-width: 1.9; }

@media (max-width: 1180px) {
  .finance-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-filter-form { grid-template-columns: repeat(3, minmax(145px, 1fr)); }
  .finance-filter-search { grid-column: span 2; }
}
@media (max-width: 860px) {
  .finance-cost-strip { grid-template-columns: repeat(2, 1fr); }
  .finance-cost-strip .cost-note { grid-column: 1 / -1; justify-content: flex-start; border-top: 1px solid #e8ebf0; border-left: 0; padding-top: 10px; text-align: left; }
  .finance-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-filter-search { grid-column: 1 / -1; }
}
@media (max-width: 580px) {
  .finance-head { align-items: stretch; }
  .finance-new-button { width: 100%; }
  .finance-metric-grid { grid-template-columns: 1fr; }
  .finance-cost-strip { grid-template-columns: 1fr; }
  .finance-cost-strip > div + div { border-top: 1px solid #e8ebf0; border-left: 0; }
  .finance-cost-strip .cost-note { grid-column: auto; }
  .finance-filter-form { grid-template-columns: 1fr; }
  .finance-filter-search { grid-column: auto; }
  .finance-filter-actions { justify-content: stretch; }
  .finance-filter-actions > * { flex: 1; }
  .entry-type-picker { grid-template-columns: 1fr; }
}

/* Premium SaaS theme */
:root {
  --purple: #6b3cff;
  --purple-strong: #5422e8;
  --purple-soft: #f1edff;
  --ink: #171a2b;
  --muted: #70778b;
  --line: #e7e8f0;
  --page: #f6f7fb;
  --radius: 16px;
  --sidebar: 248px;
  --shadow: 0 10px 32px rgba(27, 24, 56, .055);
}
body {
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  background:
    radial-gradient(circle at 78% -20%, rgba(107, 60, 255, .07), transparent 32%),
    var(--page);
}
.supericon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar { padding: 22px 15px 16px; border-right-color: #ebeaf2; box-shadow: 8px 0 28px rgba(25, 23, 50, .025); }
.brand { padding: 0 10px 26px; gap: 11px; }
.pulse { width: 43px; height: 43px; border-radius: 13px; background: linear-gradient(145deg, #794cff, #5a25f0); box-shadow: 0 9px 20px rgba(107, 60, 255, .24); }
.pulse svg { width: 24px; height: 24px; stroke-width: 1.7; }
.brand b { font-size: 19px; font-weight: 750; letter-spacing: -.035em; }
.brand small { font-size: 9px; font-weight: 500; }
.sidebar nav label { margin-top: 24px; color: #9a9fb0; font-size: 9px; font-weight: 750; letter-spacing: .11em; }
.sidebar nav a { min-height: 43px; border-radius: 11px; color: #535b70; font-size: 12px; font-weight: 550; transition: background .16s ease, color .16s ease, transform .16s ease; }
.sidebar nav a:hover { background: #f7f5ff; color: #3e2b8e; transform: translateX(2px); }
.sidebar nav a.active { color: var(--purple-strong); background: linear-gradient(90deg, #f0ebff, #f8f6ff); font-weight: 650; }
.sidebar nav a svg { width: 17px; height: 17px; stroke-width: 1.75; }
.topbar { height: 72px; padding: 0 32px; border-bottom-color: rgba(226, 226, 236, .9); background: rgba(255, 255, 255, .88); backdrop-filter: blur(14px); }
.search { height: 42px; border-color: #e4e5ed; border-radius: 12px; background: #fbfbfd; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.search:focus-within { border-color: #b5a2ff; background: #fff; box-shadow: 0 0 0 4px rgba(107, 60, 255, .07); }
.account strong { font-weight: 650; }
.avatar { border-radius: 12px; background: linear-gradient(145deg, #eee8ff, #f7f5ff); font-weight: 700; }
.content { max-width: 1480px; padding: 30px 34px 38px; }
.panel { border-color: var(--line); box-shadow: var(--shadow); }
.welcome h1, .page-head h1 { font-size: 27px; font-weight: 750; letter-spacing: -.035em; }
.page-head p, .welcome p { font-size: 12px; line-height: 1.55; }
.page-eyebrow { display: block; margin-bottom: 8px; color: var(--purple); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.primary-btn, .secondary-btn { border-radius: 11px; font-size: 11px; font-weight: 650; }
.primary-btn { background: linear-gradient(135deg, #7548ff, #5b28ed); box-shadow: 0 8px 18px rgba(107, 60, 255, .2); transition: transform .15s ease, box-shadow .15s ease; }
.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 11px 23px rgba(107, 60, 255, .26); }
.secondary-btn { border-color: #e0e1e9; }
.secondary-btn:hover { border-color: #cfc5f8; background: #faf9ff; color: var(--purple-strong); }
.metric { border-radius: 15px; box-shadow: 0 8px 26px rgba(27, 24, 56, .04); }
.metric > svg { border-radius: 12px; }
.attendance-filters, .finance-filters { border-top: 3px solid var(--purple); border-color: #ded8f7; border-top-color: var(--purple); background: linear-gradient(180deg, #fcfaff 0, #fff 52%); }
.form-grid input, .form-grid select, .form-grid textarea, input, select, textarea { border-radius: 10px; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: #aa94ff; box-shadow: 0 0 0 4px rgba(107, 60, 255, .07); outline: 0; }

/* Premium agenda */
.agenda-page-head { align-items: flex-end; }
.calendar-summary { gap: 14px; }
.calendar-summary article { min-height: 88px; display: flex; align-items: center; gap: 13px; padding: 17px; border-radius: 15px; border-color: #e5e4ef; box-shadow: 0 8px 24px rgba(34, 28, 70, .04); }
.calendar-summary .summary-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: none; border-radius: 11px; background: var(--purple-soft); color: var(--purple); }
.calendar-summary .summary-icon svg { width: 18px; height: 18px; }
.calendar-summary small { margin-bottom: 5px; font-size: 9px; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; }
.calendar-summary strong { color: #292d41; font-size: 12px; font-weight: 650; }
.calendar-panel { overflow: hidden; border-radius: 17px; }
.calendar-toolbar { padding: 17px 18px; background: linear-gradient(180deg, #fff, #fcfbff); }
.calendar-navigation h2 { font-size: 14px; font-weight: 700; letter-spacing: -.015em; }
.calendar-navigation > a { border-radius: 9px; }
.calendar-toolbar-actions { display: flex; align-items: center; gap: 8px; }
.toolbar-action { height: 35px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid #e3e2ec; border-radius: 9px; padding: 0 10px; background: #fff; color: #60677a; font-size: 9.5px; font-weight: 650; }
.toolbar-action:hover { border-color: #cfc5f8; color: var(--purple); background: #faf9ff; }
.toolbar-action svg { width: 14px; height: 14px; }
.calendar-switch { padding: 3px; border-radius: 10px; background: #f0f0f5; }
.calendar-switch a { min-width: 52px; border-radius: 8px; font-size: 9.5px; font-weight: 650; }
.calendar-switch a.active { background: var(--purple); box-shadow: 0 5px 12px rgba(107, 60, 255, .2); }
.schedule-preview { border-color: #ded8f8; background: #f9f7ff; color: #63558e; font-size: 10px; }
.schedule-preview.active { border-color: #ad99ff; background: var(--purple-soft); color: var(--purple-strong); }
.schedule-day > header { background: #fafafe; }
.schedule-day.today > header { background: linear-gradient(180deg, #eee9ff, #f7f5ff); }
.schedule-day.today > header b { color: var(--purple); }
.schedule-event { padding: 8px 9px 14px; border-radius: 10px; box-shadow: 0 7px 16px rgba(27, 38, 62, .07); }
.schedule-event time { max-width: calc(100% - 58px); color: #4c5570; font-size: 9px; font-weight: 750; }
.schedule-event > a:not(.whatsapp-action) { max-width: calc(100% - 4px); font-size: 10.5px; font-weight: 700; }
.schedule-event p, .schedule-event small { font-size: 8.5px; }
.schedule-card-actions { position: absolute; z-index: 4; top: 6px; right: 6px; display: flex; gap: 4px; }
.schedule-card-actions button, .schedule-card-actions .whatsapp-action { width: 24px; height: 24px; display: grid; place-items: center; margin: 0; padding: 0; border: 1px solid rgba(86, 82, 110, .13); border-radius: 7px; background: rgba(255,255,255,.88); color: #6d6684; box-shadow: 0 3px 8px rgba(30, 25, 55, .06); }
.schedule-card-actions button:hover { border-color: #b9a9f6; background: #fff; color: var(--purple); }
.schedule-card-actions .whatsapp-action { color: #128c5c; }
.schedule-card-actions .whatsapp-action:hover { border-color: #a5dbc4; background: #effaf5; color: #0b7d4f; }
.schedule-card-actions .whatsapp-action.unavailable { color: #a5a8b2; opacity: .7; cursor: not-allowed; }
.schedule-card-actions svg { width: 12px; height: 12px; }
.schedule-card-actions .whatsapp-icon { fill: currentColor; stroke: none; }
.schedule-event.status-confirmado { border-color: #b8e7d6; border-left-color: #20a56f; background: #effbf5; }
.schedule-event.status-falta { border-color: #fed7aa; border-left-color: #f97316; background: #fff7ed; }
.month-chip { border: 0; text-align: left; }

/* Lateral drawers */
body.drawer-open { overflow: hidden; }
.drawer-shell { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: flex-end; visibility: hidden; background: rgba(18, 16, 35, 0); transition: visibility .22s ease, background .22s ease; }
.drawer-shell.open { visibility: visible; background: rgba(18, 16, 35, .32); backdrop-filter: blur(2px); }
.drawer-panel { width: min(470px, 100vw); height: 100%; display: flex; flex-direction: column; background: #fff; box-shadow: -24px 0 60px rgba(22, 18, 50, .16); transform: translateX(102%); transition: transform .25s ease; }
.drawer-shell.open .drawer-panel { transform: translateX(0); }
.drawer-panel > header { min-height: 112px; display: flex; justify-content: space-between; align-items: flex-start; padding: 27px 28px 22px; border-bottom: 1px solid #ecebf2; background: linear-gradient(145deg, #faf8ff, #fff 65%); }
.drawer-panel h2 { margin: 0 0 7px; color: #1d2032; font-size: 20px; font-weight: 750; letter-spacing: -.03em; }
.drawer-panel header p { margin: 0; color: var(--muted); font-size: 10.5px; }
.drawer-eyebrow { display: block; margin-bottom: 7px; color: var(--purple); font-size: 8px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.drawer-panel header button { width: 34px; height: 34px; display: grid; place-items: center; flex: none; border: 1px solid #e5e3ed; border-radius: 10px; background: #fff; color: #777d8f; }
.drawer-panel header button:hover { border-color: #cec3f8; color: var(--purple); }
.drawer-panel header button svg { width: 17px; height: 17px; }
.drawer-body { flex: 1; align-content: start; overflow-y: auto; padding: 25px 28px; gap: 15px; }
.drawer-body label { color: #555c70; font-size: 9.5px; font-weight: 650; }
.drawer-body input, .drawer-body select { height: 43px; margin-top: 7px; border-color: #dfe1e9; background-color: #fff; font-size: 11px; }
.drawer-body textarea { min-height: 82px; margin-top: 7px; border-color: #dfe1e9; font-size: 11px; resize: vertical; }
.cep-status { min-height: 15px; display: block; margin-top: 6px; color: #7a8193; font-size: 9px; font-weight: 600; }
.cep-status:empty { display: none; }
.cep-status[data-cep-state="loading"] { color: var(--purple); }
.cep-status[data-cep-state="success"] { color: #168257; }
.cep-status[data-cep-state="error"] { color: #c14953; }
[data-cep].loading { padding-right: 36px; background-image: radial-gradient(circle, var(--purple) 2px, transparent 3px); background-position: calc(100% - 17px) 50%; background-repeat: no-repeat; animation: cep-pulse .8s ease-in-out infinite alternate; }
@keyframes cep-pulse { to { background-size: 12px 12px; } }
.drawer-panel > footer { display: flex; justify-content: flex-end; gap: 9px; padding: 18px 28px; border-top: 1px solid #ecebf2; background: #fcfcfe; }

@media (max-width: 1050px) {
  .calendar-toolbar { align-items: flex-start; gap: 14px; }
  .calendar-toolbar-actions { flex-wrap: wrap; justify-content: flex-end; }
}
@media (max-width: 720px) {
  .topbar { padding: 0 16px; }
  .content { padding: 24px 16px 30px; }
  .agenda-page-head { align-items: stretch; }
  .agenda-page-head .page-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .calendar-toolbar { flex-direction: column; }
  .calendar-toolbar-actions { width: 100%; justify-content: flex-start; }
  .calendar-switch { margin-left: auto; }
  .drawer-body, .drawer-panel > header, .drawer-panel > footer { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 480px) {
  .agenda-page-head .page-actions { grid-template-columns: 1fr; }
  .toolbar-action { display: none; }
  .calendar-switch { margin-left: 0; width: 100%; }
  .calendar-switch a { flex: 1; }
  .drawer-panel { width: 100vw; }
}

/* Progressive Web App */
.sidebar-brand-row { display: flex; align-items: flex-start; justify-content: space-between; }
.sidebar-brand-row .brand { flex: 1; }
.sidebar-close, .mobile-bottom-nav { display: none; }

.install-hero {
  min-height: 286px;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  overflow: hidden;
  position: relative;
  padding: 42px;
  border-color: #ded7fb;
  background:
    radial-gradient(circle at 92% 8%, rgba(107, 60, 255, .16), transparent 28%),
    linear-gradient(135deg, #fff 42%, #f5f1ff);
}
.install-hero:after { content: ""; position: absolute; width: 250px; height: 250px; right: -130px; bottom: -150px; border: 36px solid rgba(107, 60, 255, .055); border-radius: 50%; }
.install-app-mark { width: 104px; height: 104px; display: grid; place-items: center; border-radius: 29px; background: linear-gradient(145deg, #7c4eff, #5421e8); color: #fff; box-shadow: 0 22px 42px rgba(92, 41, 232, .28); }
.install-app-mark svg { width: 58px; height: 58px; stroke-width: 1.5; }
.install-hero-copy { position: relative; z-index: 1; max-width: 700px; }
.install-hero h1 { margin: 0 0 12px; color: #171a2b; font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -.045em; }
.install-hero p { max-width: 630px; margin: 0; color: #646b7e; font-size: 14px; line-height: 1.7; }
.install-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.install-status { display: block; margin-top: 14px; color: #777d90; font-size: 10px; font-weight: 600; }
.pwa-installed [data-install-app] { display: none; }
.install-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }
.install-benefits article { padding: 22px; }
.install-benefits article > span { width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 17px; border-radius: 12px; background: var(--purple-soft); color: var(--purple); }
.install-benefits svg { width: 19px; height: 19px; }
.install-benefits h2 { margin: 0 0 8px; font-size: 13px; font-weight: 700; }
.install-benefits p { margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.6; }
.install-guide { padding: 26px; scroll-margin-top: 90px; }
.install-guide > header { margin-bottom: 20px; }
.install-guide h2 { font-size: 19px !important; font-weight: 750 !important; }
.install-device-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.install-device-grid article { min-height: 190px; padding: 21px; border: 1px solid #e7e5ef; border-radius: 14px; background: #fcfcfe; }
.device-number { color: var(--purple); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.install-device-grid h3 { margin: 17px 0 9px; font-size: 14px; }
.install-device-grid p { margin: 0; color: #666e82; font-size: 10.5px; line-height: 1.75; }

@media (max-width: 860px) {
  body { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  body.mobile-menu-open { overflow: hidden; }
  .sidebar {
    inset: 0;
    width: 100vw;
    height: 100dvh;
    padding: calc(18px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom));
    z-index: 100;
    border: 0;
    box-shadow: none;
    background: #fff;
    transition: transform .24s cubic-bezier(.22,.8,.24,1);
  }
  .sidebar-brand-row { align-items: center; border-bottom: 1px solid #efedf5; }
  .sidebar-brand-row .brand { padding: 0 4px 18px; }
  .sidebar-close { width: 42px; height: 42px; display: grid; place-items: center; margin: -8px 0 10px; border: 1px solid #e6e3ef; border-radius: 13px; background: #faf9fd; color: #626a7e; }
  .sidebar-close svg { width: 19px; height: 19px; }
  .sidebar nav { padding: 8px 0 18px; }
  .sidebar nav label { margin: 20px 12px 7px; }
  .sidebar nav a { min-height: 46px; font-size: 13px; }
  .sidebar .collapse { display: none; }
  .mobile-menu { display: none; }
  .mobile-bottom-nav {
    position: fixed;
    z-index: 60;
    left: 10px;
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    min-height: 66px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: end;
    padding: 7px 6px 6px;
    border: 1px solid rgba(224, 221, 234, .92);
    border-radius: 20px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 16px 42px rgba(28, 23, 55, .17);
    backdrop-filter: blur(18px);
  }
  .mobile-bottom-nav > a, .mobile-bottom-nav > button { min-width: 0; min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 0; border-radius: 13px; background: transparent; color: #7b8192; font-size: 8.5px; font-weight: 650; }
  .mobile-bottom-nav svg { width: 18px; height: 18px; stroke-width: 1.8; }
  .mobile-bottom-nav > .active { color: var(--purple); }
  .mobile-bottom-nav .agenda-shortcut { position: relative; overflow: visible; color: var(--purple); }
  .mobile-bottom-nav .agenda-shortcut > span { width: 51px; height: 51px; display: grid; place-items: center; margin-top: -27px; border: 5px solid #f6f7fb; border-radius: 17px; background: linear-gradient(145deg, #7b4dff, #5925ed); color: #fff; box-shadow: 0 11px 24px rgba(91, 39, 235, .31); }
  .mobile-bottom-nav .agenda-shortcut svg { width: 23px; height: 23px; }
  .mobile-bottom-nav .agenda-shortcut b { font-size: 8.5px; font-weight: 750; }
  .install-hero { grid-template-columns: 76px 1fr; gap: 20px; padding: 30px 24px; }
  .install-app-mark { width: 72px; height: 72px; border-radius: 21px; }
  .install-app-mark svg { width: 39px; height: 39px; }
  .install-benefits, .install-device-grid { grid-template-columns: 1fr; }
  .install-device-grid article { min-height: 0; }
}
@media (max-width: 560px) {
  .topbar .search { max-width: calc(100vw - 98px); }
  .topbar .account { margin-left: auto; }
  .install-hero { grid-template-columns: 1fr; padding: 28px 22px; }
  .install-app-mark { width: 64px; height: 64px; border-radius: 18px; }
  .install-hero h1 { font-size: 29px; }
  .install-actions { display: grid; grid-template-columns: 1fr; }
  .install-actions > * { width: 100%; }
  .install-guide { padding: 20px; }
}

/* Public PWA installation page */
.install-public-body {
  min-height: 100vh;
  padding: 0 !important;
  background:
    radial-gradient(circle at 88% 0, rgba(107, 60, 255, .13), transparent 30%),
    radial-gradient(circle at 5% 42%, rgba(73, 177, 232, .08), transparent 26%),
    #f7f8fc;
}
.install-public-header {
  width: min(1180px, calc(100% - 32px));
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
}
.install-public-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #171a2b;
  text-decoration: none;
}
.install-public-brand .pulse {
  width: 43px;
  height: 43px;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 13px;
}
.install-public-brand .pulse svg { width: 24px; height: 24px; }
.install-public-brand b { display: block; font-size: 19px; font-weight: 750; letter-spacing: -.035em; }
.install-public-brand b span { color: var(--purple); }
.install-public-brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 500; }
.install-public-header > .secondary-btn { flex: none; }
.install-public-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 0;
  padding-bottom: 32px;
}
.install-public-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px 4px;
  color: #777d90;
  font-size: 10px;
}
.install-public-footer span { color: #303548; font-weight: 750; }
.install-public-footer p { margin: 0; }

@media (max-width: 560px) {
  .install-public-header,
  .install-public-shell { width: min(100% - 24px, 1180px); }
  .install-public-header { min-height: 70px; }
  .install-public-header > .secondary-btn { width: 42px; height: 42px; padding: 0; font-size: 0; }
  .install-public-header > .secondary-btn svg { margin: 0; }
  .install-public-brand small { display: none; }
  .install-public-shell { margin-top: 10px; }
  .install-public-footer { align-items: flex-start; flex-direction: column; gap: 5px; padding-inline: 2px; line-height: 1.5; }
}

/* Search-first patient selector */
.patient-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  opacity: 0 !important;
}
.patient-combobox { position: relative; margin-top: 7px; font-weight: 500; }
.patient-combobox-control {
  height: 43px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 11px;
  border: 1px solid #dfe1e9;
  border-radius: 10px;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.patient-combobox.open .patient-combobox-control,
.patient-combobox-control:focus-within { border-color: #aa94ff; box-shadow: 0 0 0 4px rgba(107, 60, 255, .07); }
.patient-combobox-control > svg { width: 17px; height: 17px; flex: none; color: #7c8294; stroke-width: 1.8; }
.patient-combobox-control input {
  width: 100%;
  height: 40px !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #24283a;
}
.patient-combobox-clear {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #f2f1f6;
  color: #777e90;
}
.patient-combobox-clear:hover { background: #eae7f5; color: var(--purple); }
.patient-combobox-clear svg { width: 13px; height: 13px; }
.patient-combobox-menu {
  position: absolute;
  z-index: 35;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  overflow: hidden;
  border: 1px solid #dedbe8;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(28, 25, 52, .17);
}
.patient-combobox-results { max-height: 252px; overflow-y: auto; padding: 6px; }
.patient-combobox-results > button {
  width: 100%;
  min-height: 53px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #25293a;
  text-align: left;
}
.patient-combobox-results > button:hover,
.patient-combobox-results > button.active { background: #f4f1ff; color: var(--purple-strong); }
.patient-combobox-results > button > span:nth-child(2) { min-width: 0; }
.patient-combobox-results b,
.patient-combobox-create b { display: block; overflow: hidden; color: inherit; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.patient-combobox-results small,
.patient-combobox-create small { display: block; margin-top: 3px; color: #858b9b; font-size: 8.5px; font-weight: 550; }
.patient-combobox-results > button > svg { width: 14px; height: 14px; color: #aaaebe; }
.patient-option-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--purple-soft);
  color: var(--purple);
  font-size: 11px;
  font-weight: 800;
}
.patient-combobox-hint { margin: 0; padding: 15px 12px; color: #848a9b; font-size: 9.5px; line-height: 1.5; text-align: center; }
.patient-combobox-empty { display: flex; align-items: center; gap: 10px; padding: 13px 10px; color: #555c70; }
.patient-combobox-empty > svg { width: 21px; height: 21px; flex: none; color: #9a8dcc; stroke-width: 1.7; }
.patient-combobox-empty span { min-width: 0; }
.patient-combobox-empty b { display: block; font-size: 10.5px; }
.patient-combobox-empty small { display: block; margin-top: 3px; color: #8a90a0; font-size: 8.5px; }
.patient-combobox-create {
  width: 100%;
  min-height: 55px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 0;
  border-top: 1px solid #eeecf3;
  background: #faf9fe;
  color: var(--purple-strong);
  text-align: left;
}
.patient-combobox-create:hover { background: #f2efff; }
.patient-combobox-create > svg:first-child { width: 18px; height: 18px; }
.patient-combobox-create .patient-create-arrow { width: 14px; height: 14px; }

@media (max-width: 560px) {
  .patient-combobox-menu { position: fixed; z-index: 120; top: auto; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); left: 12px; border-radius: 17px; box-shadow: 0 24px 70px rgba(22, 18, 48, .25); }
  .patient-combobox-results { max-height: min(42vh, 330px); }
}
