:root {
  --bg: #f5f7fb;
  --public-bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #172033;
  --muted: #64748b;
  --border: #e5e7eb;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --warning: #f59e0b;
  --warning-soft: #fef3c7;
  --danger: #ef4444;
  --danger-soft: #fee2e2;
  --sky: #0ea5e9;
  --gray-soft: #f1f5f9;
  --radius: 18px;
  --shadow: 0 12px 30px rgba(15, 23, 42, .06);
  --shadow-soft: 0 4px 14px rgba(15, 23, 42, .05);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
body.public {
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.12), transparent 34%),
    radial-gradient(circle at top right, rgba(14,165,233,.10), transparent 30%),
    var(--public-bg);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.muted { color: var(--muted); }

.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.app { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }
.sidebar {
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 22px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 24px; text-decoration: none; color: var(--text); }
.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .28);
}
.brand strong { display: block; font-size: 20px; letter-spacing: -.04em; }
.brand span { display: block; color: var(--muted); font-size: 12px; }
.nav-label {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 18px 10px 8px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  padding: 12px;
  margin: 4px 0;
  border-radius: 14px;
  text-decoration: none;
  color: #475569;
  font-weight: 750;
  transition: .18s ease;
}
.nav a:hover, .nav a.active { background: #eef4ff; color: var(--primary); }
.nav-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
}
.main { min-width: 0; }
.topbar {
  height: 78px;
  background: rgba(245, 247, 251, .86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(229,231,235,.8);
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
}
.title h1, .page-title h1 { margin: 0; font-size: 24px; letter-spacing: -.04em; }
.title p, .page-title p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.top-actions, .actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search { position: relative; }
.search input {
  width: 320px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  padding: 11px 14px 11px 40px;
  outline: none;
}
.search span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94a3b8; }
.content { max-width: 1580px; margin: 0 auto; padding: 28px; }

.btn {
  border: 1px solid var(--border);
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 10px 14px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  font-weight: 850;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled, .btn.loading { opacity: .7; cursor: wait; transform: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.success { background: var(--success); border-color: var(--success); color: #fff; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.warning { background: var(--warning); border-color: var(--warning); color: #fff; }
.btn.ghost { background: #fff; color: #334155; }
.btn.small { padding: 8px 11px; font-size: 12px; box-shadow: none; }
.btn.icon { width: 40px; height: 40px; padding: 0; }
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
  border: 1px solid #bfdbfe;
  display: grid;
  place-items: center;
  color: var(--primary);
  font-weight: 900;
}

.grid { display: grid; gap: 16px; }
.cols-6 { grid-template-columns: repeat(6, minmax(0,1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-head h2, .card-head h3 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.card-body { padding: 20px; }
.kpi { padding: 18px; position: relative; overflow: hidden; }
.kpi::after {
  content: "";
  position: absolute;
  right: -24px;
  top: -24px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #eff6ff;
}
.kpi .label, .kpi .note, .kpi .value { position: relative; z-index: 1; }
.kpi .label { color: var(--muted); font-size: 12px; font-weight: 850; }
.kpi .value { font-size: 30px; line-height: 1; font-weight: 950; letter-spacing: -.05em; margin: 9px 0; }
.kpi .note { color: var(--muted); font-size: 12px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  border: 1px solid transparent;
}
.pill.blue { background: #dbeafe; border-color: #bfdbfe; color: #1d4ed8; }
.pill.green { background: var(--success-soft); border-color: #bbf7d0; color: #15803d; }
.pill.yellow { background: var(--warning-soft); border-color: #fde68a; color: #b45309; }
.pill.red { background: var(--danger-soft); border-color: #fecaca; color: #b91c1c; }
.pill.gray { background: var(--gray-soft); border-color: #cbd5e1; color: #475569; }
.pill.sky { background: #e0f2fe; border-color: #bae6fd; color: #0369a1; }
.pill-action { border: 0; font: inherit; cursor: pointer; }
.pill-action:hover { filter: brightness(.96); transform: translateY(-1px); }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; font-size: 14px; }
th { color: var(--muted); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; background: #f8fafc; }
tbody tr { transition: .15s ease; }
tbody tr:hover, tbody tr.selected { background: #f8fbff; }

input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 14px;
  padding: 12px 13px;
  outline: none;
  color: var(--text);
}
textarea { resize: vertical; min-height: 105px; }
input:focus, select:focus, textarea:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(37,99,235,.08);
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
label { font-size: 13px; font-weight: 850; color: #334155; }

.patient, .patient-line, .profile-head, .profile { display: flex; align-items: center; gap: 10px; }
.initial, .mini-avatar, .profile-photo, .doctor-avatar {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
  border: 1px solid #bfdbfe;
  color: var(--primary);
  font-weight: 950;
  flex: 0 0 auto;
}
.initial, .mini-avatar { width: 38px; height: 38px; border-radius: 14px; }
.profile-photo { width: 68px; height: 68px; border-radius: 24px; font-size: 28px; }
.patient strong { display: block; }
.patient span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.info-list { display: grid; gap: 10px; margin-top: 18px; }
.info-item { background: #f8fafc; border: 1px solid var(--border); border-radius: 15px; padding: 12px; }
.info-item span { display: block; color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.panel-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.active-care-card {
  overflow: hidden;
  border-color: #dbeafe;
  box-shadow: 0 18px 42px rgba(15,23,42,.08);
}
.active-care-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  background: linear-gradient(180deg, #fff, #fbfdff);
}
.active-care-main .profile { gap: 14px; min-width: 0; }
.active-care-main h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: 0;
  color: #0f172a;
}
.active-care-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: #475569;
  font-size: 14px;
  margin-top: 5px;
  font-weight: 700;
}
.active-care-meta span + span::before {
  content: "•";
  margin-right: 8px;
  color: #94a3b8;
}
.active-care-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.active-care-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}
.active-care-nav .btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.active-care-details {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 0 18px 16px;
  color: var(--muted);
  font-size: 13px;
  background: #f8fafc;
}
.active-care-details strong { color: #334155; }

.layout { display: grid; grid-template-columns: minmax(0,1fr) 390px; gap: 18px; align-items: start; margin-top: 18px; }
.side-panel { position: sticky; top: 98px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px; border-bottom: 1px solid var(--border); background: #f8fafc; }
.tab { border: 1px solid var(--border); background: #fff; color: #475569; border-radius: 999px; padding: 9px 12px; font-size: 13px; font-weight: 850; }
.tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.filters { display: grid; grid-template-columns: 160px 1fr 170px 170px auto; gap: 10px; padding: 14px; border-bottom: 1px solid var(--border); }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 12px; }
.lane { background: #f8fafc; border: 1px solid var(--border); border-radius: 18px; padding: 12px; min-height: 190px; }
.lane-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-weight: 900; font-size: 13px; }
.mini-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 11px; margin-bottom: 9px; box-shadow: var(--shadow-soft); cursor: pointer; }
.mini-card strong { display: block; font-size: 13px; }
.mini-card span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.month-title { font-weight: 950; letter-spacing: -.03em; margin-bottom: 12px; color: #334155; }
.calendar-month { display: grid !important; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 8px; align-items: stretch; }
.calendar-weekday { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; padding: 0 4px; }
.calendar-day {
  min-height: 92px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 14px;
  padding: 10px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(15,23,42,.03);
  transition: .18s ease;
}
.calendar-day:hover, .calendar-day.today, .calendar-day.is-selected { border-color: #93c5fd; background: #f8fbff; transform: translateY(-1px); }
.calendar-day.is-drop-target { border-color: var(--primary); background: #eff6ff; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.calendar-day.muted-day { opacity: .45; }
.calendar-day strong { font-size: 16px; }
.calendar-day span { color: var(--muted); font-size: 12px; }
.dashboard-calendar { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 8px; }
.dashboard-calendar-day { min-height: 150px; border: 1px solid var(--border); border-radius: 14px; background: #fff; padding: 10px; display: grid; grid-template-rows: auto auto 1fr; gap: 7px; }
.dashboard-calendar-day.today { border-color: var(--primary); box-shadow: inset 0 0 0 1px rgba(37,99,235,.18); }
.dashboard-calendar-day.muted-day { opacity: .45; background: #f8fafc; }
.dashboard-calendar-day > strong { font-size: 15px; color: #334155; }
.dashboard-legend, .dashboard-day-symbols { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dashboard-legend { margin-bottom: 12px; color: var(--muted); font-size: 12px; font-weight: 850; }
.dashboard-legend span { display: inline-flex; align-items: center; gap: 6px; }
.event-symbol { width: 9px; height: 9px; display: inline-block; flex: 0 0 auto; background: var(--primary); }
.event-symbol.plantao { border-radius: 999px; background: var(--event-color, #16a34a); }
.event-symbol.procedimento { width: 10px; height: 10px; transform: rotate(45deg); border-radius: 2px; background: #f97316; }
.event-symbol.consulta { border-radius: 2px; background: #2563eb; }
.dashboard-day-symbols { min-height: 12px; gap: 5px; }
.secretary-day-symbols { min-height: 12px; justify-content: flex-start; gap: 5px; }
.dashboard-calendar-events { display: grid; gap: 6px; align-content: start; min-width: 0; }
.dashboard-calendar-event { display: grid; grid-template-columns: auto auto minmax(0,1fr); gap: 6px; align-items: center; border-radius: 10px; padding: 6px 7px; text-decoration: none; font-size: 11px; font-weight: 850; color: #0f172a; min-width: 0; }
.dashboard-calendar-event span, .dashboard-calendar-event b, .dashboard-calendar-event em { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: normal; }
.dashboard-calendar-event.consulta { background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; }
.dashboard-calendar-event.plantao { background: color-mix(in srgb, var(--event-color, #16a34a) 12%, #fff); border: 1px solid color-mix(in srgb, var(--event-color, #16a34a) 42%, #fff); border-left: 4px solid var(--event-color, #16a34a); color: #14532d; }
.dashboard-calendar-event.procedimento { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; }
.dashboard-mobile-list { display: none; }
.dashboard-mobile-item {
  display: grid;
  grid-template-columns: 18px minmax(0,1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  color: var(--text);
  text-decoration: none;
}
.dashboard-mobile-item.plantao { border-left: 5px solid var(--event-color, #16a34a); }
.dashboard-mobile-item.procedimento { border-left: 5px solid #f97316; }
.dashboard-mobile-item.consulta { border-left: 5px solid #2563eb; }
.dashboard-mobile-item strong,
.dashboard-mobile-item b,
.dashboard-mobile-item small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-mobile-item strong { font-size: 12px; }
.dashboard-mobile-item b { font-size: 13px; margin-top: 2px; }
.dashboard-mobile-item small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.duty-day { text-align: left; font: inherit; cursor: pointer; }
.duty-chip {
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 3px 5px;
  display: grid;
  grid-template-columns: minmax(0,1fr) 20px 20px;
  gap: 4px;
  align-items: center;
  cursor: grab;
}
.duty-chip span {
  color: #334155;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.duty-chip button {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 7px;
  background: #e2e8f0;
  color: #334155;
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
}
.duty-chip button:hover { background: #cbd5e1; }
.duty-mobile-list { display: none; }
.duty-mobile-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--border);
  border-left: 5px solid var(--primary);
  border-radius: 10px;
  background: #fff;
  padding: 9px 10px;
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 5px 14px rgba(15,23,42,.04);
}
.duty-mobile-item strong,
.duty-mobile-item span,
.duty-mobile-item small { display: block; min-width: 0; }
.duty-mobile-item > div:first-child { min-width: 0; }
.duty-mobile-item > div:first-child strong { font-size: 12px; line-height: 1.25; }
.duty-mobile-item > div:first-child span { font-size: 12px; font-weight: 900; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.duty-mobile-item > div:first-child small { color: var(--muted); font-size: 10px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.duty-mobile-pay { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; white-space: nowrap; }
.duty-mobile-pay strong { font-size: 12px; }
.duty-color-preview {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 9px;
  display: flex;
  align-items: center;
}
.duty-color-preview span {
  display: block;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: var(--primary);
}
.duty-mode-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #eef2f7;
}
.duty-mode-toggle button {
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
  font-weight: 850;
  padding: 10px 12px;
  cursor: pointer;
}
.duty-mode-toggle button.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 6px 16px rgba(15,23,42,.08);
}
.duty-mode-toggle button:disabled { opacity: .5; cursor: not-allowed; }
.duty-weekdays { display: flex; gap: 7px; flex-wrap: wrap; }
.duty-weekdays label input { position: absolute; opacity: 0; pointer-events: none; }
.duty-weekdays span {
  display: inline-flex;
  min-width: 34px;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 9px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}
.duty-weekdays input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.recurrence-preview {
  border: 1px dashed #bfdbfe;
  border-radius: 12px;
  background: #f8fbff;
  color: #475569;
  padding: 12px;
  font-size: 13px;
  line-height: 1.45;
}
.calendar-pills { display: flex; gap: 5px; margin-top: auto; }
.pill-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.pill-dot.yellow { background: var(--warning); }
.pill-dot.blue { background: var(--primary); }
.pill-dot.sky { background: var(--sky); }
.pill-dot.green { background: var(--success); }
.pill-dot.red { background: var(--danger); }

.medical-care-layout { display: grid; grid-template-columns: 260px minmax(0,1fr) 330px; gap: 18px; align-items: start; }
.medical-care-layout.summary-hidden { grid-template-columns: 260px minmax(0,1fr); }
.medical-care-layout.summary-hidden .patient-summary-panel { display: none; }
.day-queue-panel, .patient-summary-panel { position: sticky; top: 98px; max-height: calc(100vh - 118px); overflow: auto; }
.day-queue-panel .card-head, .patient-summary-panel .card-head { padding: 16px 18px; }
.queue-search { margin-bottom: 12px; }
.queue-search input { width: 100%; }
.day-queue-list { display: grid; gap: 10px; }
.day-queue-item {
  display: grid;
  grid-template-columns: 48px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
}
.day-queue-item:hover, .day-queue-item.selected { border-color: #93c5fd; background: #eff6ff; transform: none; box-shadow: 0 10px 26px rgba(37,99,235,.10); }
.day-queue-item h3 { margin: 0 0 3px; font-size: 14px; letter-spacing: 0; }
.day-queue-item span:not(.pill) { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.queue-time { color: #334155; font-size: 13px; }
.queue-context.procedure { background: #fff7ed; border-color: #fed7aa; cursor: pointer; }
.queue-context.duty { background: #eff6ff; border-color: #bfdbfe; cursor: default; }
.care-workspace { min-width: 0; display: grid; gap: 18px; }
.agenda-layout { display: grid; grid-template-columns: 130px minmax(420px,1fr) 370px; gap: 18px; align-items: start; }
.time-list { display: grid; gap: 10px; }
.time-slot { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px; text-align: center; font-weight: 800; color: #475569; }
.timeline-slot { text-align: left; display: grid; gap: 7px; padding: 12px; align-content: start; }
.timeline-slot strong { color: #334155; font-size: 13px; }
.timeline-slot.has-consultation { border-color: #fecaca; background: var(--danger-soft); }
.timeline-slot.has-procedure { border-color: #fed7aa; background: #fff7ed; }
.timeline-slot.has-duty { border-color: #bfdbfe; background: #eff6ff; }
.timeline-item { display: block; border-radius: 10px; padding: 6px 8px; font-size: 11px; line-height: 1.15; font-weight: 850; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.timeline-item.consultation { background: #ef4444; color: #fff; }
.timeline-item.procedure { background: #f59e0b; color: #111827; }
.timeline-item.duty { background: #2563eb; color: #fff; }
.appointment-list { display: grid; gap: 12px; }
.appointment-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  box-shadow: var(--shadow-soft);
  transition: .18s ease;
}
.appointment-card:hover, .appointment-card.selected { border-color: #93c5fd; box-shadow: 0 14px 34px rgba(37,99,235,.12); transform: translateY(-1px); }
.appointment-card h3 { margin: 0 0 6px; letter-spacing: -.02em; }
.appointment-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 13px; }
.day-queue-item.appointment-card {
  grid-template-columns: 48px minmax(0,1fr);
  padding: 12px;
  gap: 10px;
  box-shadow: none;
}
.day-queue-item.appointment-card:hover, .day-queue-item.appointment-card.selected {
  background: #eff6ff;
  transform: none;
  box-shadow: 0 10px 26px rgba(37,99,235,.10);
}
.day-queue-item.appointment-card h3 { margin: 0 0 3px; font-size: 14px; letter-spacing: 0; }
.clinical-section { display: none !important; }
.clinical-section.active { display: block !important; }
.clinical-section.grid.active { display: grid !important; }
.templates { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.template-btn { border: 1px solid #bfdbfe; background: #eff6ff; color: #1d4ed8; border-radius: 999px; padding: 9px 12px; font-weight: 800; }
.rx-paper { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 28px; min-height: 580px; box-shadow: var(--shadow); }
.rx-header { border-bottom: 2px solid #dbeafe; padding-bottom: 16px; display: flex; justify-content: space-between; gap: 20px; }
.rx-title { text-align: center; font-size: 22px; font-weight: 900; letter-spacing: .08em; margin: 30px 0; }
.medicine-list { display: grid; gap: 14px; margin: 20px 0; }
.medicine-item { background: #f8fafc; border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.medicine-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.check-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.check-row label { display: inline-flex; align-items: center; gap: 6px; font-weight: 750; }
.check-row input[type="text"], .check-row input:not([type]) { max-width: 220px; }
.pre-anesthesia-preview { position: relative; width: min(100%, 900px); margin: 22px auto 0; background: #fff; box-shadow: var(--shadow); }
.pre-anesthesia-preview img { display: block; width: 100%; height: auto; }
.pre-field { display: none; position: absolute; font-size: 9px; line-height: 1.15; color: #111; overflow: hidden; white-space: pre-wrap; pointer-events: none; }
.pre-check { position: absolute; font-size: 13px; line-height: 1; font-weight: 900; color: #111; transform: translate(-50%, -50%); }
.pre-fill-layout { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 18px; }
.pre-toolbox { position: sticky; top: 92px; border: 1px solid var(--border); background: #fff; border-radius: 16px; padding: 12px; display: grid; gap: 8px; box-shadow: var(--shadow-soft); }
#preFreeLayer { position: absolute; inset: 0; pointer-events: none; }
.pre-free-item {
  position: absolute;
  z-index: 5;
  color: #111;
  line-height: 1;
  font-weight: 800;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  white-space: pre;
  touch-action: none;
  user-select: none;
}
.pre-free-text, .pre-free-number { font-weight: 650; transform: translate(0, -50%); }
.pre-free-selected { outline: 1px dashed #ef4444; background: rgba(239,68,68,.08); }
.calibration-panel { border: 1px dashed #93c5fd; background: #f8fbff; border-radius: 16px; padding: 14px; margin-bottom: 16px; display: grid; gap: 12px; }
.calibration-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.calibration-panel textarea { min-height: 150px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.pre-anesthesia-preview.calibrating {
  background-image:
    linear-gradient(rgba(37,99,235,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,99,235,.10) 1px, transparent 1px),
    linear-gradient(rgba(37,99,235,.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,99,235,.22) 1px, transparent 1px);
  background-size: 1% 1%, 1% 1%, 10% 10%, 10% 10%;
}
.pre-anesthesia-preview.calibrating .pre-field {
  outline: 1px dashed #2563eb;
  background: rgba(37,99,235,.08);
  cursor: pointer;
}
.pre-anesthesia-preview.calibrating .pre-field::before {
  content: attr(data-pre-print);
  position: absolute;
  left: 0;
  top: -14px;
  background: #2563eb;
  color: #fff;
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 8px;
  white-space: nowrap;
}
.pre-anesthesia-preview.calibrating .pre-field.selected {
  outline: 2px solid #ef4444;
  background: rgba(239,68,68,.10);
}

.public header { position: sticky; top: 0; z-index: 20; background: rgba(248,250,252,.82); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(229,231,235,.75); }
.public .topbar-public { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.public nav { display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: 14px; font-weight: 700; }
.public nav a { text-decoration: none; }
.hero { padding: 64px 0 38px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--primary); border: 1px solid #bfdbfe; padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 850; box-shadow: var(--shadow-soft); }
h1 { font-size: clamp(40px, 5vw, 64px); line-height: 1.03; letter-spacing: -.07em; margin: 22px 0 18px; }
.hero p { font-size: 18px; line-height: 1.65; color: var(--muted); margin: 0 0 28px; max-width: 620px; }
.hero-actions, .trust-row { display: flex; gap: 12px; flex-wrap: wrap; }
.trust-row { gap: 10px; }
.trust { background: rgba(255,255,255,.75); border: 1px solid var(--border); border-radius: 999px; padding: 9px 12px; color: #475569; font-size: 13px; font-weight: 750; }
.hero-card, .booking-shell { background: rgba(255,255,255,.88); border: 1px solid rgba(229,231,235,.9); border-radius: 34px; box-shadow: 0 20px 50px rgba(15,23,42,.08); overflow: hidden; }
.hero-card { padding: 22px; position: relative; }
.doctor-visual { min-height: 420px; border-radius: 28px; background: linear-gradient(145deg, #eff6ff, #fff 45%, #e0f2fe); display: grid; place-items: center; position: relative; overflow: hidden; }
.doctor-circle { width: 210px; height: 210px; border-radius: 50%; background: linear-gradient(135deg, #2563eb, #0ea5e9); display: grid; place-items: center; color: #fff; font-size: 76px; font-weight: 900; box-shadow: 0 24px 70px rgba(37,99,235,.28); }
.floating { position: absolute; background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 14px; box-shadow: var(--shadow-soft); }
.floating.one { left: 18px; top: 26px; }
.floating.two { right: 18px; bottom: 28px; }
.floating.three { left: 30px; bottom: 36px; }
.floating strong { display: block; font-size: 14px; }
.floating span { color: var(--muted); font-size: 12px; }
.section { padding: 34px 0; }
.booking-head { padding: 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 18px; background: linear-gradient(180deg, #fff, #f8fafc); }
.booking-head h2 { margin: 0; font-size: 28px; letter-spacing: -.04em; }
.booking-head p { margin: 4px 0 0; color: var(--muted); }
.booking-body { padding: 24px; }
.progress { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.step-dot { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 850; }
.step-dot i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #f1f5f9; color: #64748b; font-style: normal; }
.step-dot.active i, .step-dot.done i { background: var(--primary); color: #fff; }
.step-dot.active { color: var(--primary); }
.step { display: none; animation: fade .2s ease; }
.step.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.step-title { margin: 0 0 18px; font-size: 23px; letter-spacing: -.04em; }
.cards-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.choice-card { border: 1px solid var(--border); background: #fff; border-radius: 22px; padding: 18px; min-height: 142px; text-align: left; transition: .18s ease; box-shadow: 0 4px 12px rgba(15,23,42,.03); }
.choice-card:hover, .choice-card.selected { border-color: #93c5fd; background: var(--primary-soft); transform: translateY(-2px); box-shadow: 0 16px 30px rgba(37,99,235,.10); }
.choice-card .icon { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: #f1f5f9; font-size: 24px; margin-bottom: 14px; }
.choice-card h3 { margin: 0 0 7px; font-size: 17px; }
.choice-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.doctor-list { display: grid; gap: 14px; }
.doctor-card { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; border: 1px solid var(--border); border-radius: 24px; padding: 16px; transition: .18s ease; }
.doctor-card:hover, .doctor-card.selected { border-color: #93c5fd; background: var(--primary-soft); box-shadow: 0 16px 34px rgba(37,99,235,.09); }
.doctor-avatar { width: 70px; height: 70px; border-radius: 24px; font-size: 28px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 850; background: #f1f5f9; color: #475569; margin-top: 8px; border: 1px solid #cbd5e1; }
.badge.green { background: var(--success-soft); color: #15803d; border-color: #bbf7d0; }
.calendar-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 14px; }
.day-card { border: 1px solid var(--border); border-radius: 22px; padding: 14px; background: #fff; }
.day-card h3 { margin: 0 0 12px; font-size: 15px; }
.day-card span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.times { display: grid; gap: 8px; }
.time-btn { border: 1px solid #bfdbfe; background: #eff6ff; color: #1d4ed8; border-radius: 14px; padding: 10px; font-weight: 850; }
.time-btn:not(.disabled), .public-calendar-day:not(:disabled), .public-doctor-card, .segmented button, .pill-action, .appointment-card, .btn, button:not(:disabled), a[href] { cursor: pointer; }
.time-btn:hover, .time-btn.selected { background: var(--primary); color: #fff; border-color: var(--primary); }
.time-btn.disabled { background: #f1f5f9; color: #94a3b8; border-color: #e2e8f0; cursor: not-allowed; text-decoration: line-through; }
.time-btn.booked { background: var(--danger-soft); color: #991b1b; border-color: #fecaca; text-decoration: none; display: grid; gap: 2px; text-align: left; }
.time-btn.booked:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.time-btn.booked span { font-size: 11px; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.time-btn.extra { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.time-btn.extra:hover, .time-btn.extra.selected { background: #f97316; color: #fff; border-color: #f97316; }
.time-btn.extra span { display: block; font-size: 11px; margin-top: 2px; }
.day-context { display: grid; gap: 8px; margin-bottom: 12px; }
.day-context-item { border: 1px solid var(--border); border-left: 5px solid #94a3b8; background: #f8fafc; border-radius: 14px; padding: 10px 12px; display: grid; gap: 3px; }
.day-context-item strong { font-size: 13px; color: var(--text); }
.day-context-item span, .day-context-item em { color: var(--muted); font-size: 12px; font-style: normal; }
.day-context-item.available { border-left-color: var(--success); background: var(--success-soft); }
.day-context-item.blocked, .day-context-item.procedure { border-left-color: var(--danger); background: var(--danger-soft); }
.public-calendar-day.has-context { border-color: #fbbf24; box-shadow: inset 0 0 0 1px rgba(245,158,11,.22); }
.section-inline-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.section-inline-head h3 { margin: 0; }
.segmented { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 14px; background: #f8fafc; }
.segmented button { border: 0; background: transparent; color: var(--muted); border-radius: 10px; padding: 8px 12px; font-weight: 850; cursor: pointer; }
.segmented a { border: 0; background: transparent; color: var(--muted); border-radius: 10px; padding: 8px 12px; font-weight: 850; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.segmented.small button { padding: 7px 10px; font-size: 12px; }
.segmented.small a { padding: 7px 10px; font-size: 12px; }
.segmented button.active, .segmented a.active { background: #fff; color: var(--primary); box-shadow: 0 8px 18px rgba(15,23,42,.08); }
.secretary-day-list { display: grid; gap: 8px; max-height: 430px; overflow: auto; padding-right: 2px; }
.secretary-day-list.page-day-list { max-height: 620px; }
.secretary-day-row { display: grid; grid-template-columns: 58px minmax(0,1fr); gap: 10px; align-items: start; border: 1px solid var(--border); border-radius: 14px; background: #fff; padding: 10px; }
.secretary-day-row > strong { color: #334155; font-size: 13px; padding-top: 5px; }
.secretary-day-row > div { display: grid; gap: 6px; min-width: 0; }
.secretary-day-row.has-consultation { border-color: #fecaca; background: var(--danger-soft); }
.secretary-day-row.has-procedure { border-color: #fed7aa; background: #fff7ed; }
.secretary-day-row.has-duty { border-color: #bfdbfe; background: #eff6ff; }
.secretary-day-row.is-blocked { background: #f8fafc; }
.timeline-item { border: 0; text-align: left; cursor: default; }
.timeline-item.consultation, .timeline-item.available { cursor: pointer; }
.timeline-item.available { background: var(--success-soft); color: #166534; border: 1px solid #bbf7d0; }
.timeline-item.blocked { background: #e2e8f0; color: #64748b; }
.patient-lookup-field { position: relative; }
.lookup-menu {
  position: absolute;
  z-index: 140;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  display: grid;
  gap: 4px;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(15,23,42,.18);
}
.lookup-menu button {
  border: 0;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 2px;
  text-align: left;
}
.lookup-menu button:hover { background: #eff6ff; }
.lookup-menu strong { color: var(--text); font-size: 13px; }
.lookup-menu span { color: var(--muted); font-size: 12px; }
.summary-box { background: #f8fafc; border: 1px solid var(--border); border-radius: 22px; padding: 18px; margin-bottom: 18px; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.summary-item { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 14px; }
.summary-item span { display: block; color: var(--muted); font-size: 12px; font-weight: 850; margin-bottom: 4px; }
.step-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); margin-top: 24px; padding-top: 20px; }
.success-screen { text-align: center; padding: 20px 0 10px; }
.success-icon { width: 86px; height: 86px; border-radius: 50%; background: var(--success-soft); color: var(--success); display: grid; place-items: center; margin: 0 auto 18px; font-size: 42px; font-weight: 900; }
.success-screen h2 { font-size: 34px; letter-spacing: -.05em; margin: 0 0 10px; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin-top: 20px; }
.feature { background: rgba(255,255,255,.82); border: 1px solid var(--border); border-radius: 24px; padding: 20px; box-shadow: var(--shadow-soft); }
footer { padding: 38px 0 50px; color: var(--muted); text-align: center; font-size: 14px; }

.public-booking-only .public-booking-main { min-height: calc(100vh - 76px); }
.public-booking-only .section { padding: 30px 0 18px; }
.public-header-actions { display: flex; gap: 10px; align-items: center; }
.public-booking-panel { overflow: visible; }
.public-booking-panel .booking-head h1 {
  max-width: 760px;
  margin: 14px 0 10px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: 0;
}
.public-booking-panel .booking-head p { max-width: 700px; }
.public-booking-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.public-doctor-panel, .public-calendar-panel {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  padding: 18px;
}
.panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.panel-title > span {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
}
.panel-title strong { display: block; font-size: 16px; }
.panel-title small { display: block; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.public-doctor-list { display: grid; gap: 10px; margin-top: 16px; }
.public-doctor-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  padding: 12px;
  text-align: left;
  transition: .18s ease;
}
.public-doctor-card:hover, .public-doctor-card.selected {
  border-color: #86efac;
  background: #f0fdf4;
  box-shadow: 0 14px 30px rgba(22, 163, 74, .10);
  transform: translateY(-1px);
}
.public-doctor-card .doctor-avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  font-size: 17px;
}
.public-doctor-card strong { display: block; }
.public-doctor-card small { display: block; color: var(--muted); line-height: 1.35; margin-top: 3px; }
.public-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.public-calendar-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}
.public-calendar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.public-calendar-legend i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}
.public-calendar-legend .available { background: var(--success); }
.public-calendar-legend .unavailable { background: #cbd5e1; }
.public-calendar-legend .symbol { border-radius: 2px; background: #2563eb; }
.public-calendar-legend .symbol.plantao { border-radius: 999px; background: var(--event-color, #16a34a); }
.public-calendar-legend .symbol.procedimento { transform: rotate(45deg); background: #f97316; }
.public-calendar-legend .symbol.consulta { background: #2563eb; }
.public-month-calendar { grid-template-columns: repeat(7, minmax(0,1fr)); }
.public-calendar-day {
  min-height: 108px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  padding: 12px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: .18s ease;
}
.public-calendar-day strong { font-size: 17px; }
.public-calendar-day .availability-label {
  display: inline-flex;
  align-self: flex-start;
  border-radius: 999px;
  padding: 5px 8px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}
.public-calendar-day.is-available {
  background: linear-gradient(180deg, #f0fdf4, #fff);
  border-color: #86efac;
  cursor: pointer;
}
.public-calendar-day.is-available:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(22, 163, 74, .14);
}
.public-calendar-day.is-available .availability-label {
  background: var(--success);
  color: #fff;
}
.public-calendar-day.is-full, .public-calendar-day.is-past {
  background: #f8fafc;
  color: #94a3b8;
}
.public-calendar-day:disabled { cursor: not-allowed; }
.public-calendar-day.muted-day { opacity: .45; }
.secretary-mobile-doctor-select,
.secretary-mobile-day-panel { display: none; }
.secretary-mobile-doctor-select label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.secretary-mobile-doctor-select select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
}
.secretary-mobile-day-panel {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.secretary-mobile-day-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.secretary-mobile-day-head strong { display: block; font-size: 15px; }
.secretary-mobile-day-head small { display: block; margin-top: 2px; color: var(--muted); }
.secretary-mobile-day-panel .summary-box,
.dashboard-mobile-list .summary-box,
.duty-mobile-list .summary-box {
  border-radius: 18px;
  line-height: 1.45;
}
.public-booking-modal { width: min(980px, 100%); }
.public-modal-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.public-modal-grid h3 { margin: 0 0 12px; }
.public-time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 9px;
}
.public-booking-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.public-booking-summary div {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 11px;
}
.public-booking-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  margin-bottom: 3px;
}

.reminders-style .card-body { padding: 24px; }
.reminder-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.reminder-head h2 { margin: 0; font-size: 24px; letter-spacing: -.04em; }
.reminder-head p { margin: 6px 0 0; color: var(--muted); }
.reminder-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.reminder-kpi { border-radius: 14px; padding: 16px; }
.reminder-kpi span { display: block; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 5px; }
.reminder-kpi strong { display: block; font-size: 29px; line-height: 1; letter-spacing: -.04em; }
.reminder-kpi.red { background: #fee2e2; color: #991b1b; }
.reminder-kpi.yellow { background: #fef3c7; color: #b45309; }
.reminder-kpi.orange { background: #ffedd5; color: #c2410c; }
.reminder-kpi.blue { background: #e0f2fe; color: #0f766e; }
.inline-form-panel { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; padding: 20px; margin-bottom: 22px; }
.inline-form-panel h3 { margin: 0 0 16px; }
.reminder-filter { display: flex; gap: 12px; align-items: flex-end; margin-bottom: 22px; background: #f8fafc; padding: 16px; border-radius: 10px; border: 1px solid var(--border); flex-wrap: wrap; }
.reminder-filter > div { flex: 2; min-width: 240px; }
.reminder-filter label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.report-top-actions { flex: 1; min-width: 0; justify-content: flex-end; }
.report-filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; max-width: 100%; }
.report-filters select, .report-filters input { width: 160px; min-width: 140px; }
.report-filters select[name="relatorio"],
.report-filters select[name="tipo"],
.report-filters select[name="parceiro"] { width: 175px; }
.patient-history-row td { background: #f8fafc; padding: 0 14px 16px; }
.patient-history-panel { border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; padding: 14px; box-shadow: var(--shadow-soft); }
.patient-history-list { display: grid; gap: 10px; }
.dashboard-month-item {
  display: grid;
  grid-template-columns: 90px 130px minmax(0, 1fr) 120px;
  gap: 12px;
  align-items: center;
}
.history-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.patient-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}
.history-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.patient-consultation-detail.focused {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.history-pre-view {
  position: relative;
  width: min(100%, 760px);
  margin: 10px auto 0;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.history-pre-view img { display: block; width: 100%; height: auto; }
.history-pre-layer { position: absolute; inset: 0; }
.history-pre-mark {
  position: absolute;
  z-index: 2;
  color: #111;
  line-height: 1;
  font-weight: 850;
  transform: translate(-50%, -50%);
  white-space: pre;
}
.history-pre-text, .history-pre-number { font-weight: 650; transform: translate(0, -50%); }

.modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.46); z-index: 80; padding: 20px; align-items: center; justify-content: center; }
.modal-backdrop.active { display: flex; }
.modal { width: min(760px,100%); max-height: 90vh; overflow: auto; background: #fff; border-radius: 24px; box-shadow: 0 30px 80px rgba(15,23,42,.28); }
.modal-head { padding: 20px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h2 { margin: 0; font-size: 20px; }
.modal-body { padding: 22px; }
.report-filters-inline { margin-bottom: 0; }
.close { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--border); background: #fff; font-size: 22px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 120; background: #0f172a; color: #fff; padding: 14px 18px; border-radius: 16px; box-shadow: 0 20px 50px rgba(15,23,42,.25); font-weight: 850; display: none; }
.toast.active { display: block; }
.mobile-menu { display: none; }

@media print {
  body.print-receita *, body.print-atestado * { visibility: hidden; }
  body.print-receita #receita, body.print-receita #receita *,
  body.print-atestado #atestado, body.print-atestado #atestado * { visibility: visible; }
  .sidebar, .topbar, .no-print, .toast { display: none !important; }
  .app { display: block; }
  .content { padding: 0; margin: 0; max-width: none; }
  body.print-receita #receita, body.print-atestado #atestado { display: block !important; }
  .rx-paper { border: 0; box-shadow: none; border-radius: 0; }
}

@media (max-width: 1280px) {
  .cols-6 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .layout, .agenda-layout, .medical-care-layout, .medical-care-layout.summary-hidden { grid-template-columns: 1fr; }
  .day-queue-panel, .patient-summary-panel { position: static; max-height: none; overflow: visible; }
  .medical-care-layout.summary-hidden .patient-summary-panel { display: none; }
  .side-panel { position: static; }
  .kanban { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 1050px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -290px; z-index: 70; transition: .2s; }
  .sidebar.open { left: 0; }
  .mobile-menu { display: inline-flex; }
  .filters { grid-template-columns: 1fr 1fr; }
  .search input { width: 220px; }
  .hero-grid { grid-template-columns: 1fr; }
  .cards-grid, .calendar-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .content { padding: 18px; }
  .topbar {
    padding: 12px 16px;
    height: auto;
    min-height: 64px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
  }
  .topbar .title, .topbar .page-title {
    min-width: 0;
    text-align: center;
  }
  .topbar .title h1, .topbar .page-title h1 {
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .topbar .mobile-menu {
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0;
    border-radius: 14px;
  }
  .topbar .title p, .topbar .page-title p { display: none; }
  .top-actions {
    width: auto;
    min-width: 0;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }
  .top-actions::-webkit-scrollbar { display: none; }
  .topbar .top-actions > .btn.small,
  .topbar .top-actions > a.btn.small {
    min-height: 38px;
    padding: 7px 10px;
    border-radius: 14px;
    font-size: 13px;
    white-space: nowrap;
  }
  .topbar .top-actions .avatar {
    width: 38px;
    height: 38px;
    font-size: 14px;
    flex: 0 0 auto;
  }
  .topbar .top-actions > .actions,
  .topbar .top-actions > form.actions {
    flex-wrap: nowrap;
    width: auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .topbar .top-actions > .actions input,
  .topbar .top-actions > .actions select,
  .topbar .top-actions > form.actions input,
  .topbar .top-actions > form.actions select,
  .topbar .top-actions > .actions .btn,
  .topbar .top-actions > form.actions .btn {
    min-height: 38px;
    border-radius: 14px;
    font-size: 13px;
  }
  .topbar .top-actions > .actions::-webkit-scrollbar,
  .topbar .top-actions > form.actions::-webkit-scrollbar { display: none; }
  .report-top-actions { width: auto; }
  .report-filters {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
    gap: 10px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    transform: none;
    max-height: none;
    overflow: visible;
  }
  .report-filters select, .report-filters input { width: 100%; min-width: 0; }
  .report-filters select[name="relatorio"],
  .report-filters input[name="mes"] { grid-column: 1 / -1; }
  .search, .public nav { display: none; }
  .cols-6, .cols-4, .cols-3, .cols-2, .kanban, .form-grid, .filters, .cards-grid, .calendar-grid, .summary-grid, .features, .reminder-kpis { grid-template-columns: 1fr; }
  .dashboard-month-item { grid-template-columns: 1fr; }
  .dashboard-calendar { grid-template-columns: 1fr; }
  .dashboard-calendar-day { min-height: auto; }
  .dashboard-calendar .calendar-weekday { display: none; }
  .unified-dashboard-calendar { grid-template-columns: repeat(7, minmax(0,1fr)) !important; gap: 2px; align-items: start; }
  .unified-dashboard-calendar .calendar-weekday { display: block; text-align: center; font-size: 10px; padding: 4px 0; letter-spacing: 0; text-transform: none; }
  .unified-dashboard-day {
    min-height: 44px;
    border: 0;
    box-shadow: none;
    border-radius: 999px;
    padding: 4px 2px;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    background: transparent;
    display: flex;
    flex-direction: column;
  }
  .unified-dashboard-day:hover, .unified-dashboard-day.today, .unified-dashboard-day.is-selected {
    transform: none;
    background: transparent;
    border-color: transparent;
  }
  .unified-dashboard-day.today > strong {
    background: #ef4444;
    color: #fff;
  }
  .unified-dashboard-day.is-selected > strong {
    background: #b45309;
    color: #fff;
  }
  .unified-dashboard-day > strong {
    width: 27px;
    height: 27px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 850;
  }
  .unified-dashboard-day .dashboard-calendar-events { display: none; }
  .unified-dashboard-day .dashboard-day-symbols { min-height: 8px; gap: 3px; justify-content: center; }
  .unified-dashboard-day .event-symbol { width: 5px; height: 5px; }
  .unified-dashboard-day .event-symbol.procedimento { width: 6px; height: 6px; }
  .dashboard-legend { justify-content: center; margin-bottom: 10px; }
  .dashboard-mobile-list { display: grid; gap: 8px; margin-top: 14px; }
  .dashboard-mobile-list h3 { margin: 0 0 2px; font-size: 14px; }
  .dashboard-mobile-list .summary-box { margin: 0; padding: 12px; }
  .calendar-month { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .calendar-weekday { display: none; }
  .duty-calendar-card .card-head { flex-direction: column; align-items: flex-start; }
  .duty-calendar-card .card-head > div:first-child { width: 100%; }
  .duty-calendar-card .card-head .actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 8px;
  }
  .duty-calendar-card .card-head .actions .segmented {
    grid-column: 1 / -1;
    width: 100%;
  }
  .duty-calendar-card .card-head .actions .segmented a,
  .duty-calendar-card .card-head .actions .segmented button {
    flex: 1 1 0;
    justify-content: center;
  }
  .duty-calendar-card .card-head .actions .btn,
  .duty-calendar-card .card-head .actions button { width: 100%; justify-content: center; }
  .duty-calendar { grid-template-columns: repeat(7, minmax(0,1fr)) !important; gap: 2px; align-items: start; }
  .duty-calendar .calendar-weekday { display: block; text-align: center; font-size: 10px; padding: 4px 0; letter-spacing: 0; text-transform: none; }
  .duty-day {
    min-height: 42px;
    border: 0;
    box-shadow: none;
    border-radius: 999px;
    padding: 4px 2px;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    background: transparent;
    position: relative;
  }
  .duty-day:hover, .duty-day.today, .duty-day.is-selected {
    transform: none;
    background: transparent;
    border-color: transparent;
  }
  .duty-day.today strong {
    background: #ef4444;
    color: #fff;
  }
  .duty-day.is-selected strong {
    background: #b45309;
    color: #fff;
  }
  .duty-day strong {
    width: 27px;
    height: 27px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 850;
  }
  .duty-day-count {
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: transparent;
    color: transparent !important;
    font-size: 0 !important;
    padding: 0;
  }
  .duty-day:has(.duty-chip) .duty-day-count { background: var(--duty-day-color, var(--primary)); }
  .duty-day .duty-chip { display: none; }
  .duty-mobile-list { display: grid; gap: 8px; margin-top: 14px; }
  .duty-mobile-list h3 { margin: 0 0 2px; font-size: 14px; }
  .duty-mobile-list .summary-box { margin: 0; padding: 12px; }
  .duty-mobile-item .pill { min-width: 74px; justify-content: center; }
  .panel-actions { grid-template-columns: 1fr; }
  .active-care-main { align-items: flex-start; flex-direction: column; padding: 16px; }
  .active-care-main h2 { font-size: 22px; }
  .active-care-status, .active-care-nav { width: 100%; justify-content: flex-start; }
  .active-care-nav .btn, .active-care-status .btn { flex: 1 1 auto; }
  .appointment-card, .doctor-card { grid-template-columns: 1fr; }
  .pre-fill-layout { grid-template-columns: 1fr; }
  .pre-toolbox { position: static; }
  .patient-history-item, .history-detail-head { align-items: stretch; flex-direction: column; }
  .step-actions, .hero-actions { flex-direction: column; align-items: stretch; }
  .card-head h2, .card-head h3 { font-size: 18px; }
  .card-head .muted, .panel-title small, .appointment-meta, .day-queue-item span:not(.pill), .dashboard-mobile-item small { font-size: 12px; line-height: 1.4; }
  .summary-box, .mini-card, .patient-history-item, .appointment-card, .secretary-day-row, .dashboard-mobile-item, .medicine-item, .patient-history-panel {
    border-radius: 18px;
    padding: 14px;
  }
  .appointment-card, .patient-history-item, .secretary-day-row {
    gap: 12px;
    box-shadow: 0 10px 26px rgba(15,23,42,.06);
  }
  .appointment-card h3, .patient-history-item strong, .secretary-day-row > strong { font-size: 15px; }
  .appointment-meta { gap: 6px; }
  .medical-care-layout { gap: 14px; }
  .day-queue-panel .card-head, .patient-summary-panel .card-head, .active-care-card .active-care-main { padding: 14px; }
  .day-queue-panel .card-body { padding: 14px; }
  .day-queue-list { gap: 8px; }
  .day-queue-item {
    grid-template-columns: 54px minmax(0,1fr);
    min-height: 74px;
    border-radius: 18px;
  }
  .queue-time {
    font-size: 14px;
    font-weight: 900;
  }
  .active-care-main h2 { font-size: 20px; }
  .active-care-meta { gap: 6px; line-height: 1.35; }
  .active-care-status {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 8px;
  }
  .active-care-status .pill { grid-column: 1 / -1; justify-content: center; }
  .active-care-status .btn {
    width: 100%;
    justify-content: center;
    min-height: 42px;
  }
  .active-care-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 8px;
    padding: 14px;
  }
  .active-care-nav .btn {
    width: 100%;
    justify-content: center;
    min-height: 42px;
  }
  .clinical-section .card-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .clinical-section .card-head .actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 8px;
  }
  .clinical-section .card-head .actions .btn,
  .clinical-section .card-head > .btn {
    width: 100%;
    justify-content: center;
  }
  .templates {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 8px;
  }
  .templates .template-btn,
  .templates select,
  .templates .muted {
    width: 100%;
    max-width: none !important;
  }
  .templates .muted { grid-column: 1 / -1; }
  .timeline-item {
    border-radius: 12px;
    padding: 10px 12px;
    min-height: 42px;
    display: flex;
    align-items: center;
    font-size: 12px;
    line-height: 1.25;
  }
  .timeline-item.procedure, .timeline-item.duty, .timeline-item.blocked { white-space: normal; }
  .pill, .badge {
    padding: 7px 11px;
    font-size: 11px;
    letter-spacing: .01em;
  }
  .dashboard-mobile-item,
  .secretary-day-row.has-consultation,
  .secretary-day-row.has-procedure,
  .secretary-day-row.has-duty,
  .appointment-card,
  .patient-history-item {
    border-width: 1px;
  }
  .dashboard-mobile-item.consulta,
  .secretary-day-row.has-consultation,
  .appointment-card.selected {
    box-shadow: inset 3px 0 0 #ef4444, 0 10px 26px rgba(15,23,42,.06);
  }
  .dashboard-mobile-item.procedimento,
  .secretary-day-row.has-procedure {
    box-shadow: inset 3px 0 0 #f97316, 0 10px 26px rgba(15,23,42,.06);
  }
  .dashboard-mobile-item.plantao,
  .secretary-day-row.has-duty {
    box-shadow: inset 3px 0 0 #2563eb, 0 10px 26px rgba(15,23,42,.06);
  }
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }
  .modal {
    width: 100%;
    max-height: min(88vh, 860px);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -24px 60px rgba(15,23,42,.24);
  }
  .modal-head {
    padding: 18px 18px 14px;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
  }
  .modal-head::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: #cbd5e1;
  }
  .modal-body { padding: 18px; }
  .public .btn { width: 100%; }
  .booking-head { align-items: flex-start; flex-direction: column; }
  .progress { justify-content: flex-start; }
  .step-dot span { display: none; }
  .public-booking-layout, .public-modal-grid { grid-template-columns: 1fr; }
  .public-calendar-panel, .public-doctor-panel { padding: 14px; border-radius: 20px; }
  #marcarConsulta .secretary-head-copy h2,
  .unified-dashboard-card .card-head h2,
  .duty-calendar-card .card-head h2 {
    font-size: 20px;
  }
  #marcarConsulta .secretary-head-copy .muted,
  .unified-dashboard-card .card-head .muted,
  .duty-calendar-card .card-head .muted {
    font-size: 13px;
    line-height: 1.45;
  }
  .public-calendar-head .actions { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
  .public-calendar-head .actions .btn { width: 100%; }
  .public-month-calendar { grid-template-columns: repeat(7, minmax(0,1fr)); gap: 6px; }
  .public-month-calendar .calendar-weekday { display: block; font-size: 10px; padding: 4px; }
  .public-calendar-day { min-height: 58px; border-radius: 12px; padding: 7px; }
  .public-calendar-day strong { font-size: 13px; }
  .public-calendar-day .availability-label { font-size: 9px; padding: 3px 5px; }
  .secretary-day-symbols { min-height: 8px; gap: 3px; }
  .secretary-day-symbols .event-symbol { width: 5px; height: 5px; }
  .secretary-day-symbols .event-symbol.procedimento { width: 6px; height: 6px; }
  .dashboard-mobile-item b,
  .dashboard-mobile-item small {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
  .public-booking-summary { grid-template-columns: 1fr; }
  .public-time-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  th:nth-child(3), td:nth-child(3), th:nth-child(4), td:nth-child(4) { display: none; }
  .reminders-style .card-body { padding: 18px; }
  .reminder-head {
    align-items: stretch;
    margin-bottom: 16px;
  }
  .reminder-head h2 { font-size: 20px; }
  .reminder-head p { font-size: 13px; line-height: 1.45; }
  .reminder-head .btn { width: 100%; justify-content: center; }
  .reminder-kpis {
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px;
    margin-bottom: 18px;
  }
  .reminder-kpi {
    border-radius: 16px;
    padding: 14px;
  }
  .reminder-kpi strong { font-size: 24px; }
  .inline-form-panel {
    border-radius: 18px;
    padding: 16px;
  }
  .reminder-filter {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
    padding: 14px;
    border-radius: 16px;
  }
  .reminder-filter > div { min-width: 0; grid-column: 1 / -1; }
  .reminder-filter .btn { width: 100%; justify-content: center; }
  .reminders-style table,
  .reminders-style thead,
  .reminders-style tbody,
  .reminders-style tr,
  .reminders-style td { display: block; width: 100%; }
  .reminders-style thead { display: none; }
  .reminders-style tbody { display: grid; gap: 12px; }
  .reminders-style tbody > tr:not(.patient-history-row) {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    padding: 14px;
    box-shadow: 0 10px 26px rgba(15,23,42,.06);
  }
  .reminders-style tbody > tr:not(.patient-history-row) td {
    padding: 0;
    border: 0;
    margin-bottom: 10px;
  }
  .reminders-style tbody > tr:not(.patient-history-row) td:last-child { margin-bottom: 0; }
  .reminders-style .patient {
    display: grid;
    grid-template-columns: 42px minmax(0,1fr);
    gap: 10px;
    align-items: center;
  }
  .reminders-style .patient strong { display: block; font-size: 15px; }
  .reminders-style .patient span { display: block; margin-top: 2px; color: var(--muted); }
  .reminders-style tbody > tr:not(.patient-history-row) td:nth-child(2)::before,
  .reminders-style tbody > tr:not(.patient-history-row) td:nth-child(3)::before,
  .reminders-style tbody > tr:not(.patient-history-row) td:nth-child(4)::before,
  .reminders-style tbody > tr:not(.patient-history-row) td:nth-child(5)::before {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .04em;
  }
  .reminders-style tbody > tr:not(.patient-history-row) td:nth-child(2)::before { content: "Telefone"; }
  .reminders-style tbody > tr:not(.patient-history-row) td:nth-child(3)::before { content: "Convênio"; }
  .reminders-style tbody > tr:not(.patient-history-row) td:nth-child(4)::before { content: "Parceiro"; }
  .reminders-style tbody > tr:not(.patient-history-row) td:nth-child(5)::before { content: "Última consulta"; }
  .reminders-style tbody > tr:not(.patient-history-row) td:nth-child(6) .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .reminders-style tbody > tr:not(.patient-history-row) td:nth-child(6) {
    margin-top: 4px;
    padding-top: 2px;
  }
  .reminders-style tbody > tr:not(.patient-history-row) td:nth-child(6) .actions .btn {
    width: 100%;
    justify-content: center;
  }
  .patient-history-row td {
    padding: 0;
    background: transparent;
  }
  .patient-history-panel { margin-top: -6px; }
  .relatorios-kpis { display: none; }
  .procedimentos-kpis,
  .consultas-kpis,
  .plantoes-kpis { display: none; }

  #marcarConsulta .card-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  #marcarConsulta .card-head .actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 8px;
  }
  #marcarConsulta .card-head .actions .segmented { display: none; }
  #marcarConsulta .card-head .actions .btn,
  #marcarConsulta .card-head .actions a { width: 100%; justify-content: center; }
  .secretary-booking-layout { gap: 14px; }
  .secretary-booking-layout .public-doctor-panel { display: none; }
  .secretary-mobile-doctor-select,
  .secretary-mobile-day-panel { display: block; }
  .secretary-mobile-doctor-select { margin-bottom: 14px; }
  .secretary-mobile-legend {
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 11px;
  }
  .secretary-mobile-legend span { gap: 5px; }
  .secretary-mobile-legend i { width: 9px; height: 9px; }
  .secretary-mobile-legend .symbol.procedimento { width: 8px; height: 8px; }
  .secretary-calendar-day {
    min-height: 46px;
    border: 0;
    box-shadow: none;
    border-radius: 999px;
    padding: 4px 2px;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    background: transparent;
  }
  .secretary-calendar-day:hover,
  .secretary-calendar-day.is-available,
  .secretary-calendar-day.is-full,
  .secretary-calendar-day.is-past,
  .secretary-calendar-day.has-context,
  .secretary-calendar-day.has-events {
    transform: none;
    box-shadow: none;
    background: transparent;
  }
  .secretary-calendar-day strong {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 850;
    color: var(--text);
  }
  .secretary-calendar-day.today strong,
  .secretary-calendar-day.is-selected strong {
    background: #2563eb;
    color: #fff;
  }
  .secretary-calendar-day.is-unavailable strong {
    background: #e2e8f0;
    color: #64748b;
  }
  .secretary-calendar-day.is-locked strong {
    background: #f1f5f9;
    color: #94a3b8;
  }
  .secretary-calendar-day.is-unavailable.is-selected strong,
  .secretary-calendar-day.is-locked.is-selected strong {
    background: #2563eb;
    color: #fff;
  }
  .secretary-calendar-day.is-past strong { color: #94a3b8; }
  .secretary-calendar-day .availability-label { display: none; }
  .secretary-calendar-day .secretary-day-symbols {
    min-height: 8px;
    gap: 3px;
    justify-content: center;
  }
  .secretary-calendar-day.muted-day { opacity: .35; }
  .secretary-calendar-day:disabled { cursor: default; }
  #secretaryCalendarPanel .public-calendar-head { display: none; }
  #secretaryCalendarPanel .month-title {
    text-align: center;
    font-size: 17px;
    margin-bottom: 10px;
  }
  .secretary-mobile-note {
    margin: 0;
    border-radius: 16px;
    background: #f8fafc;
    color: var(--text);
    line-height: 1.5;
  }
  #secretaryPageDayPanel { display: none; }
}
