/* Componentes do produto. Consomem exclusivamente os tokens --ds-* de definitions.js.
   Exportação: este arquivo + tokens.css. O editor possui seu próprio CSS. */
@import url("fonts/typography.css");
.ds-theme { font-family: var(--ds-font-family); font-size: var(--ds-font-size); color: var(--ds-text); background: var(--ds-surface); line-height: 1.5; overflow-wrap: anywhere; font-synthesis: none; }
.ds-theme *, .ds-theme *::before, .ds-theme *::after { box-sizing: border-box; }
.ds-theme :is(button, input, select, textarea) { font: inherit; }
.ds-theme .ds-button { min-height: var(--ds-control-height); min-width: 44px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 10px var(--ds-space); border: var(--ds-border-width) solid transparent; border-radius: var(--ds-button-radius); background: var(--ds-primary); color: var(--ds-on-primary); font-weight: var(--ds-font-weight); text-align: center; line-height: 1.35; text-decoration: none; cursor: pointer; transition: background var(--ds-motion-duration) ease-out, box-shadow var(--ds-motion-duration) ease-out, transform var(--ds-motion-duration) ease-out; overflow-wrap: anywhere; }
.ds-theme .ds-button--secondary { background: var(--ds-surface); border-color: var(--ds-border); color: var(--ds-text); }
.ds-theme .ds-button--subtle { background: transparent; color: var(--ds-primary); text-decoration: underline; text-underline-offset: 3px; }
.ds-theme .ds-button--danger { background: var(--ds-danger); color: var(--ds-on-primary); }
.ds-theme :is(.ds-button, .ds-control, .ds-choice input):focus-visible,
.ds-theme [data-demo-state="focus"] { outline: 3px solid var(--ds-focus); outline-offset: 3px; }
.ds-theme .ds-button:not(:disabled):active,
.ds-theme .ds-button[data-demo-state="pressed"] { box-shadow: inset 0 0 0 999px #0000001f; transform: translateY(1px); }
@media (hover: hover) { .ds-theme .ds-button:not(:disabled):hover { box-shadow: inset 0 0 0 999px #0000000d; } }
.ds-theme .ds-button:disabled { cursor: not-allowed; opacity: .48; }
.ds-theme .ds-button[aria-busy="true"] { opacity: .8; cursor: progress; }
.ds-theme .ds-spinner { width: 17px; height: 17px; flex: 0 0 17px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ds-spin .9s linear infinite; }
@keyframes ds-spin { to { transform: rotate(360deg); } }
.ds-theme .ds-stack { display: grid; gap: var(--ds-space); }
.ds-theme .ds-field { display: grid; align-content: start; gap: 6px; min-width: 0; }
.ds-theme .ds-label { font-weight: var(--ds-font-weight); line-height: 1.4; }
.ds-theme .ds-optional { font-weight: 400; font-size: .8125em; color: var(--ds-muted); }
.ds-theme .ds-control { width: 100%; min-width: 0; min-height: var(--ds-control-height); padding: 11px 13px; border: var(--ds-border-width) solid var(--ds-border); border-radius: var(--ds-radius); background: var(--ds-surface); color: var(--ds-text); line-height: 1.5; transition: outline-offset var(--ds-motion-duration); }
.ds-theme .ds-control::placeholder { color: var(--ds-muted); opacity: 1; }
.ds-theme .ds-money { position: relative; }
.ds-theme .ds-money > span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ds-muted); pointer-events: none; }
.ds-theme .ds-money .ds-control { padding-left: 46px; font-variant-numeric: tabular-nums; }
.ds-theme .ds-money .ds-control[aria-invalid="true"] { padding-left: 45px; }
.ds-theme .ds-search { position: relative; }
.ds-theme .ds-search .ds-control { padding-right: 54px; }
.ds-theme .ds-search .ds-control::-webkit-search-cancel-button { appearance: none; }
.ds-theme .ds-search > .ds-button { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); width: 44px; min-height: 44px; padding: 6px; font-size: 24px; line-height: 1; text-decoration: none; }
.ds-theme .ds-search > .ds-button:active { transform: translateY(-50%); }
.ds-theme textarea.ds-control { min-height: calc(var(--ds-control-height) * 2); resize: vertical; }
.ds-theme select.ds-control { padding-right: 28px; }
.ds-theme .ds-control:disabled { opacity: .65; cursor: not-allowed; background: color-mix(in srgb, var(--ds-border) 9%, var(--ds-surface)); }
.ds-theme .ds-control[aria-invalid="true"] { border-color: var(--ds-danger); border-width: 2px; padding: 10px 12px; }
.ds-theme .ds-help { margin: 0; font-size: .8125em; color: var(--ds-muted); }
.ds-theme .ds-error { margin: 0; display: flex; align-items: baseline; gap: 6px; font-size: .8125em; color: var(--ds-danger); }
.ds-theme .ds-error::before { content: '!'; border: 1px solid currentColor; border-radius: 50%; font-weight: 700; width: 15px; height: 15px; flex: 0 0 15px; line-height: 13px; text-align: center; }
.ds-theme .ds-choice { display: flex; gap: 10px; align-items: center; min-height: 44px; cursor: pointer; }
.ds-theme .ds-choice input { width: 21px; height: 21px; flex: 0 0 21px; margin: 0; accent-color: var(--ds-primary); }
.ds-theme fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.ds-theme legend { margin-bottom: 4px; padding: 0; }
.ds-theme .ds-actions { display: flex; flex-wrap: wrap; gap: calc(var(--ds-space) / 2); }
.ds-theme .ds-actions > .ds-button { flex: 1 1 140px; }
@media (prefers-reduced-motion: reduce) { .ds-theme *, .ds-theme *::before { animation: none !important; transition: none !important; } }

/* Famílias v0.2. As mesmas classes são usadas no catálogo e nas composições. */
.ds-theme :is(button, a, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid var(--ds-focus); outline-offset: 3px; }
.ds-theme p { margin-top: 0; }
.ds-theme .ds-icon { width: var(--ds-icon-size); height: var(--ds-icon-size); flex: 0 0 var(--ds-icon-size); vertical-align: middle; }
.ds-theme .ds-icon-button { width: var(--ds-control-height); padding: 10px; flex-shrink: 0; }
.ds-theme .ds-kicker { font-size: .625em; letter-spacing: .12em; font-weight: var(--ds-font-weight); color: var(--ds-muted); }
.ds-theme .ds-title { font: 400 var(--ds-heading-size)/1.18 var(--ds-heading-family); color: var(--ds-text); letter-spacing: -.035em; margin: 4px 0 10px; }
.ds-theme .ds-card-title { margin: 0 0 5px; color: var(--ds-text); font-size: 1.0625em; font-weight: var(--ds-font-weight); line-height: 1.4; }
.ds-theme .ds-card { min-width: 0; padding: var(--ds-space); border: var(--ds-border-width) solid color-mix(in srgb, var(--ds-border) 42%, var(--ds-surface)); border-radius: var(--ds-card-radius); background: var(--ds-surface); box-shadow: var(--ds-shadow); }
.ds-theme .ds-card--hero { background: var(--ds-primary-soft); }
.ds-theme .ds-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.ds-theme .ds-grow { min-width: 100px; flex: 1; }
.ds-theme .ds-wrap { justify-content: start; }
.ds-theme .ds-grid, .ds-theme .ds-metrics { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--ds-space); }
.ds-theme .ds-tag { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-height: 28px; padding: 5px 9px; border-radius: var(--ds-button-radius); font-size: .6875em; line-height: 1.4; font-weight: var(--ds-font-weight); color: var(--ds-muted); background: var(--ds-surface-alt); }
.ds-theme .ds-tag .ds-icon { width: calc(var(--ds-icon-size) * .7); height: calc(var(--ds-icon-size) * .7); flex-basis: calc(var(--ds-icon-size) * .7); }
.ds-theme .ds-tag--success { background: var(--ds-success-soft); color: var(--ds-success); }
.ds-theme .ds-tag--warning { background: var(--ds-warning-soft); color: var(--ds-warning); }
.ds-theme .ds-tag--danger { background: var(--ds-danger-soft); color: var(--ds-danger); }
.ds-theme .ds-tag--info { background: var(--ds-info-soft); color: var(--ds-info); }
.ds-theme .ds-time { display: inline-flex; align-items: center; gap: 6px; font-size: .875em; font-weight: var(--ds-font-weight); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ds-theme .ds-appointment .ds-card-title { margin-top: var(--ds-space); }
.ds-theme .ds-card-foot { margin-top: 8px; }
.ds-theme .ds-card-foot .ds-button--subtle { padding-inline: 0; font-size: .8125em; }
.ds-theme .ds-avatar { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: var(--ds-primary-soft); color: var(--ds-primary); font-size: .875em; font-weight: var(--ds-font-weight); }
.ds-theme .ds-divider { width: 100%; border: 0; border-top: var(--ds-border-width) solid color-mix(in srgb, var(--ds-border) 35%, var(--ds-surface)); margin: var(--ds-space) 0; }
.ds-theme .ds-value { display: block; margin: 8px 0; font-size: 1.5em; line-height: 1.3; font-weight: var(--ds-font-weight); font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.ds-theme .ds-notice { display: grid; grid-template-columns: var(--ds-icon-size) minmax(0, 1fr); align-items: start; gap: 10px; padding: var(--ds-space); border: var(--ds-border-width) solid currentColor; border-radius: var(--ds-radius); color: var(--ds-muted); background: var(--ds-surface-alt); }
.ds-theme .ds-notice strong { display: block; font-size: .875em; font-weight: var(--ds-font-weight); }
.ds-theme .ds-notice p { margin: 5px 0 0; font-size: .8125em; line-height: 1.65; }
.ds-theme .ds-notice--success { color: var(--ds-success); background: var(--ds-success-soft); }
.ds-theme .ds-notice--warning { color: var(--ds-warning); background: var(--ds-warning-soft); }
.ds-theme .ds-notice--danger { color: var(--ds-danger); background: var(--ds-danger-soft); }
.ds-theme .ds-notice--info { color: var(--ds-info); background: var(--ds-info-soft); }
.ds-theme .ds-tabs { display: flex; overflow-x: auto; gap: 4px; padding: 4px; border-radius: var(--ds-button-radius); border: var(--ds-border-width) solid color-mix(in srgb, var(--ds-border) 45%, var(--ds-surface)); background: var(--ds-surface-alt); scrollbar-width: thin; }
.ds-theme .ds-tabs > button { min-height: 44px; min-width: 72px; flex: 1 0 auto; padding: 8px 12px; border: 0; border-radius: var(--ds-button-radius); background: transparent; color: var(--ds-muted); font-size: .8125em; font-weight: var(--ds-font-weight); }
.ds-theme .ds-tabs > button[aria-selected="true"] { background: var(--ds-surface); color: var(--ds-primary); box-shadow: var(--ds-shadow); }
.ds-theme .ds-page-heading { display: flex; align-items: center; gap: 12px; }
.ds-theme .ds-page-heading .ds-title { margin-bottom: 0; }
.ds-theme .ds-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ds-theme .ds-chip { font-size: .8125em; min-height: 44px; }
.ds-theme .ds-chip[aria-pressed="true"] { color: var(--ds-primary); background: var(--ds-primary-soft); border-color: var(--ds-primary); }
.ds-theme .ds-bottom-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; background: var(--ds-surface); padding: 8px 6px max(10px, env(safe-area-inset-bottom)); border-radius: var(--ds-panel-radius) var(--ds-panel-radius) 0 0; box-shadow: var(--ds-shadow); border-top: var(--ds-border-width) solid color-mix(in srgb, var(--ds-border) 35%, var(--ds-surface)); }
.ds-theme .ds-bottom-nav button, .ds-theme .ds-side-nav button { min-height: var(--ds-control-height); min-width: 44px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 5px; padding: 8px 4px; border: 0; border-radius: var(--ds-radius); background: transparent; color: var(--ds-muted); font: inherit; font-size: .625em; font-weight: var(--ds-font-weight); }
.ds-theme .ds-bottom-nav button[aria-current], .ds-theme .ds-side-nav button[aria-current] { background: var(--ds-primary-soft); color: var(--ds-primary); }
.ds-theme .ds-side-nav { display: flex; flex-direction: column; align-items: stretch; gap: 6px; background: var(--ds-surface); padding: 12px; border-radius: var(--ds-card-radius); border: var(--ds-border-width) solid color-mix(in srgb, var(--ds-border) 35%, var(--ds-surface)); }
.ds-theme .ds-side-nav button { flex-direction: row; justify-content: start; gap: 12px; padding: 12px; min-height: var(--ds-control-height); font-size: .8125em; }
.ds-theme .ds-list { border-radius: var(--ds-card-radius); background: var(--ds-surface); border: var(--ds-border-width) solid color-mix(in srgb, var(--ds-border) 35%, var(--ds-surface)); padding: 0 var(--ds-space); }
.ds-theme .ds-list-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-block: var(--ds-space); }
.ds-theme .ds-list-row + .ds-list-row { border-top: 1px solid var(--ds-border); }
.ds-theme .ds-list-row strong { font-size: .875em; font-weight: var(--ds-font-weight); }
.ds-theme .ds-table-wrap { min-width: 0; }
.ds-theme .ds-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .8125em; text-align: left; }
.ds-theme .ds-table caption { font-size: .875em; text-align: left; color: var(--ds-muted); margin-bottom: 12px; }
.ds-theme .ds-table :is(th, td) { padding: 14px 10px; border-bottom: var(--ds-border-width) solid color-mix(in srgb, var(--ds-border) 40%, var(--ds-surface)); }
.ds-theme .ds-table thead { color: var(--ds-muted); }
.ds-theme .ds-table-sort { min-height: 44px; padding: 4px 0; border: 0; color: var(--ds-primary); background: none; font: inherit; text-decoration: underline; }
.ds-theme .ds-pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ds-theme .ds-pagination .ds-button { padding: 10px; }
.ds-theme .ds-empty { display: grid; justify-items: center; gap: var(--ds-space); padding: calc(var(--ds-space) * 1.5); text-align: center; background: var(--ds-canvas); border: var(--ds-border-width) dashed var(--ds-border); border-radius: var(--ds-card-radius); }
.ds-theme .ds-empty > .ds-icon { width: calc(var(--ds-icon-size) * 1.5); height: calc(var(--ds-icon-size) * 1.5); color: var(--ds-primary); }
.ds-theme .ds-skeleton { height: 16px; border-radius: var(--ds-radius); background: var(--ds-surface-alt); animation: ds-pulse 1.3s ease-in-out infinite alternate; }
.ds-theme .ds-skeleton--short { width: 60%; }
@keyframes ds-pulse { to { opacity: .45; } }
.ds-theme .ds-progress { width: 100%; height: 12px; accent-color: var(--ds-primary); }
.ds-theme .ds-dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ds-theme.ds-dialog { padding: var(--ds-space); border: var(--ds-border-width) solid var(--ds-border); border-radius: var(--ds-panel-radius); background: var(--ds-surface); color: var(--ds-text); box-shadow: var(--ds-shadow); width: min(520px, calc(100% - 32px)); max-width: calc(100% - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; animation: ds-enter var(--ds-motion-duration) ease-out; }
.ds-theme.ds-dialog p { font-size: 1em; margin: var(--ds-space) 0; }
.ds-theme.ds-dialog .ds-actions { margin-top: var(--ds-space); }
.ds-theme.ds-dialog::backdrop { background: #18221b66; backdrop-filter: blur(3px); }
.ds-theme.ds-dialog[data-kind="drawer"] { margin: 0 0 0 auto; width: min(440px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; border-radius: var(--ds-panel-radius) 0 0 var(--ds-panel-radius); }
.ds-theme.ds-dialog[data-kind="sheet"] { margin: auto auto 0; width: min(560px, 100%); max-width: 100%; border-radius: var(--ds-panel-radius) var(--ds-panel-radius) 0 0; padding-bottom: max(var(--ds-space), env(safe-area-inset-bottom)); }
.ds-theme.ds-toast { position: fixed; z-index: 50; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: var(--ds-border-width) solid var(--ds-primary); border-radius: var(--ds-radius); box-shadow: var(--ds-shadow); background: var(--ds-surface); color: var(--ds-text); width: min(500px, calc(100% - 32px)); font-size: var(--ds-font-size); }
.ds-theme.ds-toast > span { flex: 1; }
.ds-theme .ds-motion-example { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows var(--ds-motion-duration), opacity var(--ds-motion-duration); }
.ds-theme .ds-motion-example > span { min-height: 0; overflow: hidden; }
.ds-theme .ds-motion-example.is-visible { grid-template-rows: 1fr; opacity: 1; }
@keyframes ds-enter { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
.ds-theme .ds-app-shell { display: flex; flex-direction: column; min-height: 680px; background: var(--ds-canvas); }
.ds-theme .ds-app-shell > .ds-side-nav { display: none; }
.ds-theme .ds-app-content { min-width: 0; flex: 1; display: grid; align-content: start; gap: var(--ds-space); padding: var(--ds-space); }
.ds-theme .ds-screen-header > .ds-kicker { display: block; margin-bottom: var(--ds-space); }
.ds-theme .ds-screen-header .ds-title { margin-top: 6px; }
.ds-theme .ds-hero-time { font-size: 2.5em; font-weight: 400; font-variant-numeric: tabular-nums; line-height: 1.15; letter-spacing: -.05em; }
.ds-theme .ds-week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.ds-theme .ds-week button { display: grid; gap: 5px; min-height: 66px; min-width: 44px; border: var(--ds-border-width) solid transparent; border-radius: var(--ds-radius); padding: 8px 4px; background: var(--ds-surface); color: var(--ds-muted); }
.ds-theme .ds-week button span { font-size: .6875em; }
.ds-theme .ds-week button strong { font-size: 1em; }
.ds-theme .ds-week button[aria-pressed="true"] { background: var(--ds-primary); color: var(--ds-on-primary); }
.ds-theme .ds-steps { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; counter-reset: step; }
.ds-theme .ds-steps li { counter-increment: step; font-size: .75em; color: var(--ds-muted); }
.ds-theme .ds-steps li::before { content: counter(step) ' · '; }
.ds-theme .ds-steps li[aria-current] { color: var(--ds-primary); font-weight: var(--ds-font-weight); }
@container (min-width: 550px) { .ds-theme .ds-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ds-theme .ds-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (min-width: 700px) { .ds-theme .ds-app-shell { display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: start; } .ds-theme .ds-app-shell > .ds-side-nav { display: flex; margin: 20px 0 20px 16px; } .ds-theme .ds-app-shell > .ds-bottom-nav { display: none; } }
@container (max-width: 549px) { .ds-theme .ds-table { display: block; } .ds-theme .ds-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } .ds-theme .ds-table tbody { display: grid; gap: var(--ds-space); } .ds-theme .ds-table tr { display: grid; border: var(--ds-border-width) solid var(--ds-border); border-radius: var(--ds-radius); overflow: clip; } .ds-theme .ds-table :is(th, td) { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; padding: 12px; } .ds-theme .ds-table :is(th, td)::before { content: attr(data-label); font-weight: 400; color: var(--ds-muted); } .ds-theme .ds-table td:last-child { border-bottom: 0; } }

/* Cuidado: componentes compartilhados por Pro e MySister. */
.ds-theme .ds-sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.ds-theme .ds-timeline{list-style:none;margin:0;padding:0;display:grid;gap:0}.ds-theme .ds-timeline li{position:relative;display:grid;grid-template-columns:32px minmax(0,1fr);gap:14px;padding:0 0 26px}.ds-theme .ds-timeline li:not(:last-child)::before{content:"";position:absolute;left:15px;top:30px;bottom:0;border-left:1px solid var(--ds-border)}.ds-theme .ds-timeline-dot{display:grid;place-items:center;width:32px;height:32px;border:1px solid var(--ds-border);border-radius:50%;background:var(--ds-surface);color:var(--ds-muted)}.ds-theme .ds-timeline li[data-state=completed] .ds-timeline-dot{background:var(--ds-success-soft);color:var(--ds-success);border-color:var(--ds-success)}.ds-theme .ds-timeline li[data-state=current] .ds-timeline-dot{background:var(--ds-warning-soft);color:var(--ds-warning)}.ds-theme .ds-timeline .ds-tag{margin-top:8px}
.ds-theme .ds-care-steps{list-style:none;margin:0;padding:0;display:grid;gap:12px}.ds-theme .ds-care-step{border:var(--ds-border-width) solid var(--ds-border);border-radius:var(--ds-card-radius);padding:16px;background:var(--ds-surface);display:grid;gap:8px;transition:border-color var(--ds-motion-duration),background var(--ds-motion-duration)}.ds-theme .ds-care-step.is-complete{background:var(--ds-success-soft);border-color:var(--ds-success)}.ds-theme .ds-step-number{width:36px;height:36px;display:grid;place-items:center;background:var(--ds-primary-soft);color:var(--ds-primary);border-radius:50%;flex-shrink:0}.ds-theme .ds-step-check{min-width:44px;justify-content:center}.ds-theme .ds-photo-placeholder{background:var(--ds-surface-alt);color:var(--ds-muted);border-radius:var(--ds-radius);display:grid;justify-items:center;padding:10px;gap:5px;text-align:center}.ds-theme .ds-photo-placeholder svg{width:100%;max-width:180px;aspect-ratio:180/145}.ds-theme .ds-photo-placeholder span{font-size:.875em;font-weight:600}.ds-theme .ds-photo-placeholder small{font-size:.625em}

@container (min-width:700px){.ds-theme .ds-app-shell--patient{display:flex;max-width:480px;margin-inline:auto}.ds-theme .ds-app-shell--patient>.ds-bottom-nav{display:grid}}

.ds-theme :is(h1,h2,h3,.section-heading){font-family:var(--ds-heading-family,"Manrope"),system-ui,sans-serif}
