@font-face { font-family: Holta; src: url('/assets/holta.woff') format('woff'); font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/assets/dm-sans.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
:root {
  color-scheme:light;
  --paper:#f3f1ea; --white:#fffefa; --ink:#242851; --muted:#444a6e;
  --violet:#393b66; --lilac:#e7e3f2; --lilac-strong:#797cb3;
  --coral:#bd6b65; --red:#a2474d; --amber:#e8bc73; --line:#dfdae3;
  --tblr-body-font-family:'DM Sans',system-ui,sans-serif;
  --tblr-body-bg:var(--paper);
  --tblr-body-color:var(--ink);
  --tblr-heading-color:var(--ink);
  --tblr-primary:var(--violet);
  --tblr-primary-rgb:57,59,102;
  --tblr-secondary:var(--muted);
  --tblr-bg-surface:var(--white);
  --tblr-bg-surface-tertiary:#f2eff8;
  --tblr-border-color:var(--line);
  --tblr-border-color-translucent:var(--line);
  --tblr-border-radius:.55rem;
  --tblr-border-radius-lg:.8rem;
  --tblr-focus-ring-color:var(--violet);
  --tblr-control-bg:var(--white);
  --tblr-control-fg:var(--ink);
  --tblr-control-border-color:#a19aaf;
  --tblr-control-focus-border-color:var(--violet);
  --tblr-control-padding-y:.55rem;
}
[hidden] { display:none !important; }
body { min-height:100vh; }
p, h1, h2, dl, dd { margin:0; }
button { font:inherit; color:inherit; }
button { cursor:pointer; }
button:disabled { opacity:.65; cursor:wait; }
a { color:inherit; }
:focus-visible { outline:2px solid var(--violet); outline-offset:3px; }
img { display:block; max-width:100%; height:auto; }
svg { width:20px; height:20px; flex:none; fill:none; stroke:currentColor; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round; }
.symbols, .sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
h1 { font:400 clamp(38px,6vw,78px)/.96 Holta,'DM Sans',sans-serif; text-transform:uppercase; }
h2 { font-size:23px; }
.btn { --tblr-btn-font-weight:700; min-height:40px; gap:8px; white-space:nowrap; }
.btn svg { width:17px; height:17px; }
.btn.btn-primary {
  --tblr-btn-variant:var(--amber);
  --tblr-btn-variant-fg:var(--ink);
  --tblr-btn-variant-darken:#ddb165;
  --tblr-btn-border-radius:1.35rem .6rem .6rem 1.35rem;
  min-height:43px;
}
.btn.btn-outline-secondary {
  --tblr-btn-color:var(--violet);
  --tblr-btn-border-color:#a19aaf;
  --tblr-btn-hover-color:var(--ink);
  --tblr-btn-hover-border-color:#a19aaf;
  --tblr-btn-hover-bg:var(--lilac);
}
.text-button, .row-link { border:0; background:none; }
.login-view { display:grid; grid-template-columns:minmax(240px,1fr) minmax(0,1fr); width:min(calc(100% - 40px), 940px); min-height:min(610px,90svh); margin:clamp(20px,8vh,96px) auto; border-radius:14px 82px 14px 14px; overflow:hidden; border:1px solid var(--line); background:var(--white); }
.login-brand { position:relative; isolation:isolate; min-height:100%; padding:36px; background:var(--lilac); overflow:hidden; }
.login-art { position:absolute; inset:0; z-index:-1; }
.login-art i { position:absolute; display:block; }
.login-art i:nth-child(1) { width:46%; height:63%; bottom:13%; left:16%; border-radius:60% 60% 10px 10px / 38% 38% 10px 10px; background:var(--amber); }
.login-art i:nth-child(2) { width:19%; height:51%; bottom:17%; right:20%; border-radius:99px 99px 12px 12px; background:var(--coral); }
.login-art i:nth-child(3) { width:30%; height:25%; bottom:11%; left:44%; border-radius:10px 10px 50% 50%; background:var(--lilac-strong); }
.login-art i:nth-child(4) { width:11%; aspect-ratio:1; top:33%; right:17%; border-radius:50%; background:#2346aa; }
.login-content { padding:clamp(28px,5vw,70px); align-self:center; }
.login-content h1 { font-size:clamp(38px,5.2vw,68px); }
.login-content > p { margin-top:16px; color:var(--muted); }
.eyebrow { font-size:11px; font-weight:700; letter-spacing:.11em; text-transform:uppercase; margin-bottom:14px; }
#login-form { margin-top:26px; }
.form-label { margin-bottom:6px; font-weight:650; }
.form-control, .form-select { min-height:42px; min-width:0; }
.form-select {
  appearance:auto;
  background-image:none;
  padding-inline-end:var(--tblr-control-padding-x);
}
#login-form input { margin-bottom:14px; }
#login-form .btn { margin-top:8px; }
.error { --tblr-alert-variant-color:#842f39; margin-bottom:0; }
.workspace { display:grid; grid-template-columns:218px minmax(0,1fr); min-height:100svh; }
.sidebar {
  position:sticky; top:0; align-self:start; min-height:100svh;
  display:flex; flex-direction:column; gap:30px; padding:25px 16px 18px;
  background:var(--white); border-inline-end:1px solid var(--line);
}
.sidebar img { margin-inline-start:12px; }
.sidebar nav {
  --tblr-nav-pills-border-radius:1.5rem;
  --tblr-nav-pills-link-active-color:var(--white);
  --tblr-nav-pills-link-active-bg:var(--violet);
  display:grid; gap:4px;
}
.sidebar .nav-link {
  --tblr-nav-link-color:var(--ink);
  --tblr-nav-link-hover-color:var(--ink);
  --tblr-nav-link-font-weight:650;
  display:flex; align-items:center; gap:10px; min-height:44px; padding:8px 12px;
  text-align:left; font-size:14px; border-radius:1.5rem;
}
.sidebar .nav-link:hover { background:var(--lilac); }
.sidebar .nav-link.active { color:var(--white); background:var(--violet); }
.account { display:grid; gap:4px; margin-top:auto; padding-top:12px; border-top:1px solid var(--line); }
.account span { padding-inline:12px; overflow-wrap:anywhere; font-size:13px; color:var(--muted); }
.main { width:min(100%,1370px); margin-inline:auto; padding:clamp(22px,3.4vw,52px); }
.page-heading { display:flex; justify-content:space-between; align-items:end; gap:20px; margin-bottom:24px; }
.page-heading p { margin-top:6px; color:var(--muted); font-size:15px; }
.demo {
  --tblr-badge-color:var(--violet); --tblr-badge-border-radius:1rem;
  --tblr-badge-padding-x:.65rem; --tblr-badge-padding-y:.35rem;
  letter-spacing:0; background:var(--lilac);
}
.notice { --tblr-alert-variant-color:#72501c; }
.numbers { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:22px; }
.numbers .card { border-top:3px solid var(--lilac-strong); }
.numbers .card:nth-child(2) { border-top-color:var(--amber); }
.numbers .card:nth-child(3) { border-top-color:var(--coral); }
.numbers dt { font-size:14px; font-weight:650; }
.numbers dd { margin-top:8px; font-size:clamp(32px,4vw,46px); font-weight:700; line-height:.95; }
.registry { overflow:hidden; }
.toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.search { position:relative; flex:1; max-width:395px; }
.search svg { position:absolute; left:12px; top:50%; translate:0 -50%; color:var(--muted); pointer-events:none; }
.search input { padding-left:41px; }
.filters { display:flex; padding:3px; gap:3px; border-radius:22px 10px 10px 22px; background:var(--lilac); }
.filters button { background:transparent; border:0; border-radius:20px 8px 8px 20px; padding:8px 13px; font-weight:650; font-size:13px; min-height:38px; }
.filters button[aria-pressed="true"] { background:var(--violet); color:var(--white); }
.table :is(td, th) { overflow-wrap:anywhere; }
.table td:nth-child(3) { white-space:nowrap; }
.table td:first-child { font-weight:700; }
.badge.patient-status {
  --tblr-badge-color:var(--ink); --tblr-badge-border-radius:1rem;
  --tblr-badge-font-weight:650;
  min-height:0; letter-spacing:0; background:#efe6c9;
}
.patient-status.archived { background:var(--lilac); }
.row-link { display:grid; width:40px; height:40px; place-items:center; border-radius:50%; background:var(--lilac); margin-left:auto; }
.row-link:hover { background:var(--amber); }
.empty { padding:20px; color:var(--muted); }
.backup-panel > p { margin:8px 0 12px; color:var(--muted); }
.backup-list { list-style:none; margin:0; padding:0; }
.backup-list li { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0; border-top:1px solid var(--line); }
.backup-list a { font-weight:700; }
dialog { width:min(calc(100% - 24px),650px); max-height:calc(100dvh - 24px); padding:clamp(18px,4vw,33px); border:1px solid var(--line); border-radius:14px 46px 14px 14px; background:var(--paper); color:var(--ink); }
dialog::backdrop { background:#24285180; }
body:has(dialog[open]) { overflow:hidden; }
.dialog-header { display:flex; align-items:center; justify-content:space-between; gap:15px; margin-bottom:18px; }
.dialog-header h2 { font:400 clamp(28px,5vw,42px)/1 Holta,sans-serif; text-transform:uppercase; }
.btn.icon-button { --tblr-btn-border-radius:50%; width:42px; height:42px; min-height:0; padding:0; flex:none; }
fieldset { margin:0 0 18px; padding:13px; border:1px solid var(--line); border-radius:12px; min-width:0; }
legend { float:none; width:auto; padding:0 5px; margin:0; font-size:inherit; font-weight:700; }
.fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.patient-fields { grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); }
.fields label span { color:var(--muted); font-size:12px; font-weight:400; }
.dialog-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; align-items:center; gap:16px; margin-top:16px; }
.text-button { min-height:44px; font-weight:700; color:var(--red); margin-right:auto; text-decoration:underline; text-underline-offset:4px; }
@media (max-width:850px) {
  .workspace { grid-template-columns:1fr; }
  .sidebar { align-items:center; border-inline-end:0; border-bottom:1px solid var(--line); }
  .sidebar img { width:78px; margin:0; }
  .sidebar nav { display:flex; flex-wrap:wrap; }
  .account { margin:0; padding:0; border:0; }
  .account span { display:none; }
}
@media (max-width:620px) {
  .main { padding:22px 14px 36px; }
  .page-heading { align-items:start; flex-direction:column; gap:14px; margin-bottom:20px; }
  .numbers { gap:5px; }
  .numbers .card { padding:12px 8px; }
  .numbers dt { font-size:12px; }
  .toolbar { flex-direction:column; align-items:stretch; }
  .search { max-width:none; }
  .filters { align-self:start; }
  .table { table-layout:fixed; }
  .table :is(th, td):nth-child(3) { display:none; }
  .table tr > :is(th, td):nth-child(n) { padding:8px; font-size:12px; }
  .table th:nth-child(4) { width:28%; }
  .table th:last-child { width:56px; }
  .badge.patient-status { display:inline-block; max-width:100%; white-space:normal; overflow-wrap:anywhere; text-align:left; }
  .login-view { grid-template-columns:1fr; width:calc(100% - 24px); border-top-right-radius:54px; }
  .login-brand { min-height:138px; padding:24px; }
  .login-brand img { width:100px; }
  .login-art { left:34%; }
}
@media (max-width:460px) {
  .fields { grid-template-columns:minmax(0,1fr); }
}

.topline { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; min-height:36px; margin-bottom:22px; }
.topline time { margin-inline-start:auto; color:var(--muted); font-size:13px; }
.topline time::first-letter { text-transform:uppercase; }
.topline .demo { margin:0; }
.workspace h1 { font-size:clamp(30px,3.5vw,45px); }
.text-button { display:inline-flex; align-items:center; gap:6px; font-size:13px; }
.panel-title .text-button { text-decoration:none; color:var(--violet); margin:0; text-align:left; }
.panel-title svg { width:16px; height:16px; }
.muted { color:var(--muted); }
.tone-lilac { --tint:#ece9f5; --accent:#5a4f8b; }
.tone-amber { --tint:#f4e7c9; --accent:#8a5a25; }
.tone-blue { --tint:#e5edfa; --accent:#3f5986; }
.tone-rose { --tint:#f6e7e4; --accent:#984954; }
.tone-neutral { --tint:#e9ece3; --accent:#536044; }
.metric-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:20px; }
.metric {
  display:grid; grid-template-columns:auto minmax(0,1fr); align-content:center;
  gap:4px 10px; min-height:95px; text-align:left;
}
.metric:hover { --tblr-card-bg:var(--tint); border-color:var(--accent); }
.metric-icon, .initials { color:var(--accent); --tblr-avatar-bg:var(--tint); --tblr-avatar-box-shadow:none; }
.metric-icon { grid-row:span 2; align-self:center; }
.metric-label { font-size:13px; font-weight:650; }
.metric-number { font-size:28px; line-height:1; }
.overview-grid { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:16px; }
.panel-title { display:flex; justify-content:space-between; align-items:center; gap:8px; padding-block:4px; }
.panel-title h2 { font-size:17px; }
.overview-panel .empty { padding:12px 0; font-size:14px; }
.stage-summary { display:grid; gap:9px; }
.stage-stat-label { display:flex; justify-content:space-between; gap:8px; font-size:13px; }
.stage-progress { display:block; width:100%; height:8px; margin-top:4px; appearance:none; border:0; border-radius:12px; accent-color:var(--accent); }
.stage-progress::-webkit-progress-bar { border-radius:12px; background:var(--tint); }
.stage-progress::-webkit-progress-value { border-radius:12px; background:var(--accent); }
.stage-progress::-moz-progress-bar { border-radius:12px; background:var(--accent); }

.funnel-search { margin-bottom:15px; }
#funnel-error:not([hidden]), #professional-error:not([hidden]) { margin-bottom:12px; }
.funnel-board { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; align-items:start; }
.lane { min-width:0; min-height:245px; padding:9px; border-radius:12px 24px 12px 12px; background:var(--tint); }
.lane-title { display:flex; justify-content:space-between; gap:4px; align-items:center; padding:5px 2px 10px; }
.lane-title h2 { font-size:13px; line-height:1.2; }
.badge.count { --tblr-badge-color:var(--accent); --tblr-badge-border-radius:1rem; background:var(--white); }
.lane-empty { margin:4px; color:var(--muted); font-size:12px; }
.funnel-card { padding:10px; align-items:start; overflow-wrap:anywhere; }
.funnel-card + .funnel-card { margin-top:8px; }
.card-name { border:0; padding:3px 0; text-align:left; background:none; font-weight:700; }
.card-name:hover { text-decoration:underline; }
.funnel-card p { font-size:12px; margin:3px 0 8px; }
.stage-select { min-height:36px; }

.agenda-panel { overflow:visible; }
.agenda-controls { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; padding-block:12px; }
.week-nav, .agenda-filters { display:flex; align-items:center; gap:7px; }
.week-nav h2 { font-size:14px; white-space:nowrap; }
.week-nav .icon-button { width:35px; height:35px; }
.week-nav .previous svg { rotate:180deg; }
.week-nav .btn { min-height:35px; padding:5px 10px; }
.agenda-filters input, .agenda-filters select { width:auto; min-height:38px; padding:5px 9px; font-size:13px; }
.agenda-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); min-height:385px; }
.agenda-loading, .agenda-error { grid-column:1 / -1; margin:14px; }
.agenda-day { min-width:0; border-right:1px solid var(--line); }
.agenda-day:last-child { border-right:0; }
.day-heading { display:flex; justify-content:center; align-items:center; gap:6px; width:100%; min-height:50px; padding:4px; color:var(--muted); border:0; border-bottom:1px solid var(--line); background:transparent; }
.day-heading[aria-current="date"] .day-number { color:white; background:var(--violet); }
.day-heading[aria-pressed="true"] { background:var(--lilac); }
.day-number { display:grid; width:29px; height:29px; place-items:center; border-radius:50%; font-size:15px; }
.day-name { font-size:13px; text-transform:capitalize; }
.day-bookings { display:grid; align-content:start; gap:6px; padding:6px; }
.day-empty { min-height:36px; padding:6px; color:var(--muted); font-size:11px; }
.add-day, .booking { display:flex; text-align:left; border:0; }
.add-day { align-items:center; gap:3px; min-height:34px; padding:4px; color:var(--violet); background:none; font-size:11px; }
.add-day svg { width:16px; height:16px; }
.add-day:hover { text-decoration:underline; }
.booking { flex-direction:column; gap:3px; width:100%; padding:8px 7px; border-radius:8px; border-inline-start:3px solid #8473ac; background:#eeeaf7; color:var(--ink); overflow-wrap:anywhere; }
.booking:hover { outline:2px solid var(--accent,var(--violet)); outline-offset:-2px; }
.booking-time, .booking-status, .booking-type { font-size:11px; line-height:1.2; }
.booking-name { font-size:12px; line-height:1.3; }
.booking-time, .booking-status { font-weight:700; }
.booking-type { color:var(--muted); }
.booking-status { margin-top:3px; }
.booking-confirmado { background:#e4edf9; border-color:#5372a1; }
.booking-realizado { background:#e8ecdf; border-color:#687c54; }
.booking-cancelado { background:#f5e7e2; border-color:#a2474d; }
.booking-blocked:not(.booking-cancelado) { background:#eeece7; border-color:#797681; }
.booking-compact { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:6px 12px; padding:10px; margin-bottom:7px; }
.booking-compact .booking-type { grid-column:2; }
.booking-compact .booking-status { grid-area:1 / 3 / 3; margin:0; }
.booking-compact .booking-time { grid-row:span 2; }
.booking-compact .booking-name { font-size:14px; }

.professional-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr)); gap:14px; }
.professional-card { align-items:start; }
.professional-head { display:flex; gap:12px; align-items:center; margin-bottom:14px; }
.professional-head h2 { font-size:18px; overflow-wrap:anywhere; }
.professional-head p, .office-hours, .no-hours { font-size:13px; }
.initials { flex:none; font-weight:700; }
.office-hours { width:100%; margin-bottom:14px; }
.office-hours div { display:grid; grid-template-columns:minmax(72px,.65fr) minmax(0,1.35fr); gap:6px; border-top:1px solid var(--line); padding:7px 0; }
.office-hours dt { font-weight:700; }
.professional-card .btn { margin-top:auto; }
.no-hours { margin-bottom:14px; }
.drawer { position:fixed; inset:0 0 0 auto; margin:0; width:min(100%,485px); height:100dvh; max-height:none; border-radius:22px 0 0 22px; }
.drawer .dialog-header h2 { font:700 clamp(23px,5vw,29px)/1.15 'DM Sans',sans-serif; text-transform:none; }
.drawer form > :is(input,select), #appointment-patient-field, .drawer .fields, .drawer fieldset, .slot-area { margin-bottom:14px; }
.drawer .error:not([hidden]) { margin-top:8px; }
.field-hint { color:var(--muted); font-size:13px; margin-bottom:11px; }
.slot-area { padding:9px; border-radius:10px; background:var(--lilac); }
.hours-row { display:grid; grid-template-columns:minmax(88px,1fr) minmax(68px,.8fr) minmax(68px,.8fr) auto; align-items:center; gap:5px; margin-bottom:7px; }
.hours-row input { min-width:0; padding:4px; font-size:13px; }
.hours-row select { padding:5px; font-size:13px; }
.hours-row .icon-button { width:32px; height:32px; padding:0; }
.hours-row .icon-button svg { width:17px; height:17px; }

@media (max-width:1050px) {
  .funnel-board { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .agenda-grid { min-height:275px; }
}
@media (max-width:850px) {
  .workspace { grid-template-columns:minmax(0,1fr); }
  .sidebar { position:static; min-height:0; display:grid; grid-template-columns:auto 1fr auto; padding:12px 16px; gap:10px; }
  .sidebar nav { justify-content:center; }
  .main { min-width:0; }
}
@media (max-width:670px) {
  .metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .overview-grid { grid-template-columns:minmax(0,1fr); }
  .funnel-board { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .lane { min-height:110px; }
  .agenda-grid { min-height:160px; }
  .agenda-day:not(.selected-day) .day-bookings { display:none; }
  .agenda-day { display:contents; }
  .day-heading { grid-row:1; flex-direction:column; }
  .day-bookings { grid-area:2 / 1 / 3 / -1; border-top:1px solid var(--line); padding:11px; }
  .booking { padding:9px; }
  .week-nav { flex-wrap:wrap; }
  .agenda-controls { align-items:stretch; }
  .agenda-filters { flex-wrap:wrap; }
  .agenda-filters input { min-width:0; }
  .sidebar { grid-template-columns:1fr auto; }
  .sidebar nav { grid-column:1 / -1; grid-row:2; justify-content:start; gap:3px; }
  .sidebar .nav-link { min-height:38px; padding:6px 8px; font-size:12px; gap:5px; }
  .nav-link svg { width:16px; height:16px; }
  .topline { margin-bottom:13px; gap:6px; }
  .topline time { font-size:12px; }
}
@media (max-width:365px) {
  .hours-row { grid-template-columns:repeat(2,minmax(0,1fr)) auto; }
  .hours-row select { grid-column:1 / -1; }
  .metric { padding-inline:10px; }
  .metric-icon { --tblr-avatar-size:1.8rem; }
  .agenda-controls { padding-inline:10px; }
}
