/* Rehab+ · agenda (login, paciente e painel) */
body.app { background: var(--bg); min-height: 100vh; min-height: 100dvh; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Barra superior ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.86); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.topbar__in { display: flex; align-items: center; gap: 16px; height: 64px; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.topbar .logo img { height: 28px; }
.topbar__sp { flex: 1; }
.userbtn { display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 6px 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 14px; color: var(--navy-800); transition: box-shadow .2s, border-color .2s; }
.userbtn:hover { border-color: #CFD9E3; box-shadow: var(--sh-1); }
.userbtn__av { width: 30px; height: 30px; border-radius: 50%; background: var(--navy-800); color: var(--gold-500); display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-2); padding: 6px; transform-origin: top right; animation: rh-pop .22s var(--ease); }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 10px; background: none; text-align: left; font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--bg); }
.menu .ic { width: 18px; height: 18px; color: var(--muted); }
@keyframes rh-pop { from { opacity: 0; transform: translateY(-4px) scale(.97); } }

.page { max-width: 1240px; margin: 0 auto; padding: 24px var(--gutter) calc(48px + env(safe-area-inset-bottom)); }
.page__h { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page__h h1 { font-family: var(--font-d); font-weight: 700; font-size: clamp(30px, 4vw, 40px); color: var(--navy-800); }
.page__h p { color: var(--muted); }

/* ---------- Cartões ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--sh-1); }
.card + .card { margin-top: 16px; }
.card__h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card__h h2, .card__h h3 { font-size: 17px; font-weight: 800; color: var(--navy-800); }
.card__h .muted { font-size: 13px; }
.card--flush { padding: 0; overflow: clip; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.pill--agendado { background: #E8F1FA; color: var(--blue-500); }
.pill--realizado, .pill--ativo { background: var(--ok-bg); color: var(--ok); }
.pill--faltou, .pill--vencido { background: var(--danger-bg); color: var(--danger); }
.pill--cancelado, .pill--encerrado { background: var(--line-2); color: var(--muted); }
.pill--futuro, .pill--esgotado { background: var(--warn-bg); color: var(--warn); }

.av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; object-position: center top; background: linear-gradient(160deg, var(--navy-600), var(--navy-900)); flex: none; }
.av--sm { width: 26px; height: 26px; }
.av--lg { width: 52px; height: 52px; }
.av-stack { display: inline-flex; }
.av-stack .av { border: 2px solid #fff; }
.av-stack .av + .av { margin-left: -8px; }
.av--txt { display: grid; place-items: center; color: var(--gold-500); font-weight: 800; font-size: 13px; }

/* ---------- Formulários ---------- */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.c-12 { grid-column: span 12; } .c-8 { grid-column: span 8; } .c-6 { grid-column: span 6; } .c-4 { grid-column: span 4; } .c-3 { grid-column: span 3; } .c-5 { grid-column: span 5; } .c-7 { grid-column: span 7; }
@media (max-width: 640px) { .grid > [class*="c-"] { grid-column: span 12; } .grid > .c-m6 { grid-column: span 6; } }

.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.field > span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field > span i { font-style: normal; color: var(--danger); }
.field small { font-size: 12px; color: var(--muted); }
.field .err { color: var(--danger); font-size: 12px; font-weight: 600; min-height: 0; }
.input, select.input, textarea.input {
	width: 100%; min-height: 48px; padding: 11px 14px;
	border: 1px solid #D5DEE7; border-radius: 12px; background: #fff;
	font-size: 16px; color: var(--ink);
	transition: border-color .2s, box-shadow .2s;
	-webkit-appearance: none; appearance: none;
}
textarea.input { min-height: 84px; resize: vertical; line-height: 1.5; }
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235D6F82' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.input:hover { border-color: #BFCBD7; }
.input:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(20, 104, 168, .14); }
.input.is-err { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(185, 58, 42, .1); }
.pw { position: relative; }
.pw .input { padding-right: 52px; }
.pw button { position: absolute; right: 6px; top: 6px; width: 38px; height: 36px; border: 0; background: none; border-radius: 9px; color: var(--muted); display: grid; place-items: center; }
.pw button:hover { background: var(--bg); }

.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 13px; background: var(--line-2); position: relative; }
.seg button { position: relative; z-index: 1; border: 0; background: none; height: 38px; padding: 0 16px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--muted); transition: color .25s; }
.seg button[aria-pressed="true"] { color: var(--navy-800); }
.seg__thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; border-radius: 10px; background: #fff; box-shadow: var(--sh-1); transition: transform .35s var(--ease), width .35s var(--ease); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--navy-800); flex: none; }

.aviso { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: #fff; font-size: 14px; color: var(--ink-2); }
.aviso .ic { color: var(--blue-500); margin-top: 1px; }
.aviso--erro .ic { color: var(--danger); }
.aviso--gold { border-left: 3px solid var(--gold-500); }
.aviso--gold .ic { color: var(--gold-600); }
.aviso strong { color: var(--navy-800); }

/* ---------- Skeleton, vazio ---------- */
.sk { position: relative; overflow: hidden; background: var(--line-2); border-radius: 10px; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); animation: rh-sk 1.3s infinite; }
@keyframes rh-sk { to { transform: translateX(100%); } }
.vazio { text-align: center; padding: 28px 16px; color: var(--muted); display: grid; justify-items: center; gap: 10px; }
.vazio .ic { width: 34px; height: 34px; color: #B8C5D2; }
.vazio strong { color: var(--navy-800); font-size: 16px; }
.vazio p { max-width: 380px; font-size: 14px; }

/* ---------- Toast ---------- */
.toasts { position: fixed; z-index: 100; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 13px 14px 13px 16px; border-radius: 14px; background: var(--navy-900); color: #fff; box-shadow: var(--sh-3); font-size: 14px; font-weight: 600; animation: rh-toast .4s var(--ease); }
.toast .ic { width: 20px; height: 20px; color: var(--gold-500); }
.toast--erro .ic { color: #FF9C8F; }
.toast button { margin-left: auto; border: 0; background: rgba(255,255,255,.1); color: #fff; border-radius: 8px; padding: 6px 10px; font-weight: 700; font-size: 13px; }
.toast.is-out { animation: rh-toast-out .3s var(--ease-in) forwards; }
@keyframes rh-toast { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes rh-toast-out { to { opacity: 0; transform: translateY(10px); } }

/* ---------- Sheet (painel lateral no desktop, gaveta no celular) ---------- */
.ov { position: fixed; inset: 0; z-index: 60; background: rgba(2, 21, 38, .42); backdrop-filter: blur(2px); animation: rh-fade .3s var(--ease); }
.ov.is-out { animation: rh-fade-out .25s var(--ease-in) forwards; }
@keyframes rh-fade { from { opacity: 0; } }
@keyframes rh-fade-out { to { opacity: 0; } }
.sheet { position: fixed; z-index: 61; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--bg); display: flex; flex-direction: column; box-shadow: var(--sh-3); animation: rh-in-r .45s var(--ease); }
.sheet--sm { width: min(440px, 100vw); }
.sheet.is-out { animation: rh-out-r .3s var(--ease-in) forwards; }
@keyframes rh-in-r { from { transform: translateX(100%); } }
@keyframes rh-out-r { to { transform: translateX(100%); } }
.sheet__h { display: flex; align-items: center; gap: 12px; padding: 18px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.sheet__h h2 { font-size: 18px; font-weight: 800; color: var(--navy-800); flex: 1; min-width: 0; }
.sheet__x { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; color: var(--muted); }
.sheet__x:hover { color: var(--ink); }
.sheet__b { flex: 1; overflow-y: auto; padding: 20px; overscroll-behavior: contain; }
.sheet__f { padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }
@media (max-width: 640px) {
	.sheet, .sheet--sm { top: auto; left: 0; width: 100%; max-height: 92dvh; border-radius: 22px 22px 0 0; animation-name: rh-in-b; }
	.sheet.is-out { animation-name: rh-out-b; }
	.sheet__h { border-radius: 22px 22px 0 0; padding-top: 22px; position: relative; }
	.sheet__h::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; border-radius: 4px; background: #D5DEE7; transform: translateX(-50%); }
	.sheet__f .btn { flex: 1; }
}
@keyframes rh-in-b { from { transform: translateY(100%); } }
@keyframes rh-out-b { to { transform: translateY(100%); } }

/* ---------- Login ---------- */
.login { min-height: 100dvh; display: grid; grid-template-columns: 1fr minmax(380px, 520px); }
.login__brand { position: relative; overflow: hidden; color: #fff; background: radial-gradient(120% 90% at 85% 10%, #0E5A93 0%, var(--navy-800) 46%, var(--navy-900) 100%); padding: 40px clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; isolation: isolate; }
.login__brand .logo img { height: 34px; }
.login__brand h1 { font-family: var(--font-d); font-weight: 700; font-style: italic; font-size: clamp(42px, 5vw, 72px); line-height: .98; max-width: 560px; }
.login__brand h1 span { color: var(--gold-500); }
.login__brand p { color: rgba(255,255,255,.72); max-width: 440px; margin-top: 16px; }
.login__faces { display: flex; align-items: center; gap: 12px; font-size: 14px; color: rgba(255,255,255,.75); }
.login__faces .av { width: 44px; height: 44px; border: 2px solid var(--navy-800); }
.login__faces .av + .av { margin-left: -14px; }
.login__plus { display: none; }
.login__form { display: flex; flex-direction: column; justify-content: center; padding: 40px clamp(20px, 5vw, 56px); background: #fff; }
.login__form h2 { font-size: 26px; font-weight: 800; color: var(--navy-800); }
.login__form > p { color: var(--muted); margin: 6px 0 22px; }
.login__form form { display: grid; gap: 14px; margin-top: 18px; }
.login__back { margin-top: 26px; font-size: 14px; color: var(--muted); }
.login__back a { color: var(--navy-800); font-weight: 700; }
.enviado { display: grid; gap: 10px; justify-items: start; padding: 18px; border-radius: 16px; background: var(--ok-bg); color: var(--ink-2); animation: rh-pop .35s var(--ease); }
.enviado .ic { color: var(--ok); width: 26px; height: 26px; }
@media (max-width: 860px) {
	.login { grid-template-columns: 1fr; }
	.login__brand { padding-top: 28px; padding-bottom: 32px; gap: 28px; }
	.login__brand h1 { font-size: 40px; }
	.login__brand p { display: none; }
	.login__form { justify-content: flex-start; border-radius: 24px 24px 0 0; margin-top: -20px; position: relative; }
}

/* ---------- Paciente ---------- */
.pac { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.pac__lado { display: grid; gap: 16px; position: sticky; top: 84px; }
@media (max-width: 980px) { .pac { grid-template-columns: 1fr; } .pac__lado { position: static; } }

.plano { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 22px; color: #fff; background: radial-gradient(120% 130% at 100% 0%, #0E5A93, var(--navy-800) 58%, var(--navy-900)); box-shadow: var(--sh-2); }
.plano__top { display: flex; gap: 18px; align-items: center; }
.plano small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.plano h2 { font-size: 20px; font-weight: 800; margin: 2px 0; }
.plano__val { font-size: 13px; color: rgba(255,255,255,.72); }
.ring { position: relative; width: 92px; height: 92px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring .t { stroke: rgba(255,255,255,.14); }
.ring .v { stroke: var(--gold-500); stroke-linecap: round; transition: stroke-dasharray 1.2s var(--ease); }
.ring__n { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.ring__n b { font-family: var(--font-d); font-size: 32px; font-weight: 700; }
.ring__n span { font-size: 10px; font-weight: 700; color: rgba(255,255,255,.65); text-transform: uppercase; letter-spacing: .06em; margin-top: 3px; }
.plano__semana { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: rgba(255,255,255,.75); }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.18); transition: background-color .4s; }
.dots i.on { background: var(--gold-500); }
.plano__mais { margin-top: 10px; font-size: 13px; color: rgba(255,255,255,.65); }

.sessao { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line-2); }
.sessao:first-child { border-top: 0; padding-top: 2px; }
.data { width: 52px; flex: none; text-align: center; border-radius: 12px; background: var(--bg); padding: 7px 0 6px; line-height: 1.1; }
.data small { display: block; font-size: 10px; font-weight: 800; text-transform: uppercase; color: var(--muted); letter-spacing: .06em; }
.data b { font-family: var(--font-d); font-size: 24px; color: var(--navy-800); }
.sessao__txt { flex: 1; min-width: 0; }
.sessao__txt strong { display: block; color: var(--navy-800); font-size: 15px; }
.sessao__txt span { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.sessao__acts { display: flex; gap: 6px; }
.iconbtn { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; color: var(--muted); transition: color .2s, border-color .2s, background-color .2s; text-decoration: none; }
.iconbtn:hover { color: var(--navy-800); border-color: #CFD9E3; }
.iconbtn .ic { width: 18px; height: 18px; }
.iconbtn[disabled] { opacity: .45; pointer-events: none; }

/* Seletor de horários */
.pick__bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 16px; }
.semnav { display: inline-flex; align-items: center; gap: 4px; }
.semnav b { min-width: 150px; text-align: center; font-size: 14px; color: var(--navy-800); }
.profs { display: flex; gap: 8px; flex-wrap: wrap; }
.prof-f { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 4px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 13px; color: var(--ink-2); transition: border-color .2s, background-color .2s, color .2s, box-shadow .2s; }
.prof-f.todos { padding-left: 14px; }
.prof-f .av { width: 30px; height: 30px; }
.prof-f[aria-pressed="true"] { border-color: var(--navy-800); background: var(--navy-800); color: #fff; }
.dias { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 16px; }
.dia { display: grid; justify-items: center; gap: 2px; padding: 10px 0 9px; border-radius: 14px; border: 1px solid var(--line); background: #fff; color: var(--muted); transition: transform .25s var(--ease), border-color .2s, background-color .25s, color .2s; position: relative; }
.dia small { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.dia b { font-family: var(--font-d); font-size: 22px; line-height: 1; color: var(--navy-800); }
.dia i { font-style: normal; font-size: 10px; font-weight: 700; color: var(--ok); }
.dia:hover:not([disabled]) { border-color: #BFCBD7; transform: translateY(-1px); }
.dia[aria-pressed="true"] { background: var(--navy-800); border-color: var(--navy-800); color: rgba(255,255,255,.7); }
.dia[aria-pressed="true"] b { color: #fff; }
.dia[aria-pressed="true"] i { color: var(--gold-400); }
.dia[disabled] { opacity: .45; cursor: default; }
.dia[disabled] i { color: var(--muted-2); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.slot { display: grid; justify-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: 14px; border: 1px solid var(--line); background: #fff; font-weight: 800; font-size: 16px; color: var(--navy-800); transition: transform .25s var(--ease), border-color .2s, box-shadow .2s; animation: rh-slot .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 22ms); }
.slot:hover { border-color: var(--gold-500); box-shadow: 0 0 0 1px var(--gold-500) inset; transform: translateY(-1px); }
.slot .av { width: 24px; height: 24px; }
@keyframes rh-slot { from { opacity: 0; transform: translateY(6px); } }
.slots-vazio { padding: 26px 16px; border-radius: 14px; border: 1px dashed #D5DEE7; text-align: center; color: var(--muted); font-size: 14px; }
.remarcando { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--gold-500); margin-bottom: 16px; font-size: 14px; }
.remarcando .ic { color: var(--gold-600); }
.remarcando strong { color: var(--navy-800); }

.confirma { display: grid; gap: 16px; }
.confirma__quando { padding: 18px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.confirma__quando small { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.confirma__quando strong { display: block; font-size: 20px; color: var(--navy-800); margin-top: 4px; }
.escolha { display: grid; gap: 8px; }
.escolha label { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: #fff; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.escolha label:has(input:checked) { border-color: var(--navy-800); box-shadow: 0 0 0 1px var(--navy-800) inset; }
.escolha input { accent-color: var(--navy-800); width: 18px; height: 18px; margin: 0 0 0 auto; order: 3; }
.escolha strong { display: block; color: var(--navy-800); }
.escolha span { font-size: 13px; color: var(--muted); }
.ok-anim { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 10px 0 4px; }
.ok-anim svg { width: 64px; height: 64px; }
.ok-anim circle { fill: var(--ok-bg); }
.ok-anim path { fill: none; stroke: var(--ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; animation: rh-draw .6s var(--ease) .15s forwards; }
@keyframes rh-draw { to { stroke-dashoffset: 0; } }

/* Acordeão (grid 0fr/1fr) */
.acc__btn { display: flex; width: 100%; align-items: center; justify-content: space-between; border: 0; background: none; padding: 0; font-weight: 800; font-size: 17px; color: var(--navy-800); }
.acc__btn .ic { transition: transform .3s var(--ease); color: var(--muted); }
.acc__btn[aria-expanded="true"] .ic { transform: rotate(180deg); }
.acc__p { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .3s var(--ease), opacity .3s var(--ease); }
.acc__p.is-open { grid-template-rows: 1fr; opacity: 1; }
.acc__p > div { overflow: hidden; }

/* ---------- Painel ---------- */
.adm { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: calc(100dvh - 64px); }
.side { border-right: 1px solid var(--line); background: #fff; padding: 18px 12px; position: sticky; top: 64px; height: calc(100dvh - 64px); display: flex; flex-direction: column; gap: 4px; }
.side a { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 14px; border-radius: 12px; text-decoration: none; font-weight: 700; font-size: 14px; color: var(--muted); position: relative; transition: background-color .2s, color .2s; }
.side a:hover { background: var(--bg); color: var(--ink-2); }
.side a[aria-current="page"] { background: var(--navy-800); color: #fff; }
.side a[aria-current="page"] .ic { color: var(--gold-500); }
.side__foot { margin-top: auto; padding: 12px 14px; font-size: 12px; color: var(--muted); }
.adm__main { min-width: 0; }
.adm .page { max-width: 1280px; }
@media (max-width: 900px) {
	.adm { grid-template-columns: 1fr; }
	.side { position: fixed; z-index: 35; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; justify-content: space-around; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
	.side a { flex-direction: column; gap: 2px; height: 54px; padding: 6px 4px; font-size: 11px; justify-content: center; flex: 1; }
	.side a[aria-current="page"] { background: transparent; color: var(--navy-800); }
	.side a[aria-current="page"] .ic { color: var(--navy-800); }
	.side a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--gold-500); }
	.side__foot { display: none; }
	.adm .page { padding-bottom: 110px; }
}

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--sh-1); display: grid; gap: 4px; }
.kpi small { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.kpi b { font-family: var(--font-d); font-size: 40px; line-height: 1; color: var(--navy-800); }
.kpi span { font-size: 13px; color: var(--muted); }
.bar { height: 6px; border-radius: 6px; background: var(--line-2); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--blue-500), var(--navy-700)); transform-origin: left; animation: rh-bar 1s var(--ease); }
.bar--gold i { background: var(--gold-500); }
@keyframes rh-bar { from { transform: scaleX(0); } }
@media (max-width: 980px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.cols2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 980px) { .cols2 { grid-template-columns: 1fr; } }

.linha { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.linha:first-child { border-top: 0; }
.linha__h { font-weight: 800; color: var(--navy-800); width: 52px; flex: none; font-variant-numeric: tabular-nums; }
.linha__t { flex: 1; min-width: 0; }
.linha__t strong { display: block; color: var(--ink); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.linha__t span { font-size: 13px; color: var(--muted); }
.linha--btn { width: 100%; border: 0; background: none; text-align: left; border-radius: 12px; padding-left: 8px; padding-right: 8px; margin: 0 -8px; width: calc(100% + 16px); transition: background-color .2s; }
.linha--btn:hover { background: var(--bg); }
.acoes { display: flex; gap: 6px; flex-wrap: wrap; }

/* Agenda semanal */
.agbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.semana { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.semana__d { background: #fff; border: 1px solid var(--line); border-radius: var(--r); min-height: 220px; display: flex; flex-direction: column; scroll-snap-align: start; }
.semana__h { padding: 12px 12px 10px; border-bottom: 1px solid var(--line-2); display: flex; align-items: baseline; gap: 8px; }
.semana__h b { font-family: var(--font-d); font-size: 24px; color: var(--navy-800); line-height: 1; }
.semana__h small { font-size: 12px; font-weight: 800; text-transform: uppercase; color: var(--muted); letter-spacing: .05em; }
.semana__h span { margin-left: auto; font-size: 12px; color: var(--muted); }
.semana__d.hoje { border-color: var(--gold-500); box-shadow: 0 0 0 1px var(--gold-500) inset; }
.semana__l { padding: 8px; display: grid; gap: 6px; align-content: start; }
.ag { display: grid; gap: 2px; width: 100%; text-align: left; border: 1px solid var(--line); border-left: 3px solid var(--blue-500); border-radius: 10px; background: var(--bg); padding: 8px 10px; font-size: 13px; transition: transform .2s var(--ease), box-shadow .2s; }
.ag:hover { transform: translateY(-1px); box-shadow: var(--sh-1); background: #fff; }
.ag b { font-variant-numeric: tabular-nums; color: var(--navy-800); display: flex; align-items: center; gap: 6px; }
.ag b .av { width: 20px; height: 20px; margin-left: auto; }
.ag span { color: var(--ink-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag--realizado { border-left-color: var(--ok); }
.ag--faltou { border-left-color: var(--danger); }
.ag--cancelado { border-left-color: var(--muted-2); opacity: .6; }
.ag--passado.ag--agendado { border-left-color: var(--warn); }
.blq { font-size: 12px; padding: 8px 10px; border-radius: 10px; color: var(--muted); background: repeating-linear-gradient(135deg, var(--line-2) 0 6px, #fff 6px 12px); border: 1px solid var(--line); }
.semana__vazio { font-size: 12px; color: var(--muted-2); padding: 10px 4px; text-align: center; }

/* Lista de pacientes */
.busca { position: relative; flex: 1; max-width: 420px; }
.busca .input { padding-left: 42px; }
.busca .ic { position: absolute; left: 14px; top: 14px; color: var(--muted); width: 20px; height: 20px; }
.tabela { width: 100%; border-collapse: collapse; }
.tabela th { position: sticky; top: 64px; background: #fff; text-align: left; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); z-index: 1; }
.tabela td { padding: 14px 16px; border-bottom: 1px solid var(--line-2); font-size: 14px; vertical-align: middle; }
.tabela tbody tr { cursor: pointer; transition: background-color .15s; }
.tabela tbody tr:hover { background: #FAFBFD; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela .nome { display: flex; align-items: center; gap: 12px; }
.tabela .nome strong { display: block; color: var(--navy-800); }
.tabela .nome span { font-size: 13px; color: var(--muted); }
.uso { min-width: 140px; }
.uso small { font-size: 13px; color: var(--ink-2); font-weight: 600; }
@media (max-width: 760px) {
	.tabela thead { display: none; }
	.tabela, .tabela tbody, .tabela tr, .tabela td { display: block; width: 100%; }
	.tabela tr { padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
	.tabela td { padding: 4px 0; border: 0; }
	.tabela td.so-desk { display: none; }
}
.pag { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

/* Ficha do paciente */
.ficha__top { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.ficha__top .av { width: 56px; height: 56px; font-size: 20px; }
.ficha__top strong { display: block; font-size: 19px; color: var(--navy-800); }
.ficha__top span { font-size: 14px; color: var(--muted); }
.plc { border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 16px; display: grid; gap: 10px; }
.plc + .plc { margin-top: 10px; }
.plc__h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plc__h strong { color: var(--navy-800); }
.plc__m { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.plc__m b { color: var(--ink); }
.sec-t { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; display: flex; justify-content: space-between; align-items: center; }
.link-box { display: flex; gap: 8px; align-items: center; padding: 10px 10px 10px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.link-box code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, Menlo, monospace; }

/* Horários da equipe */
.equipe-g { display: grid; gap: 16px; }
.pro__h { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.pro__h .av { width: 56px; height: 56px; }
.pro__h strong { display: block; color: var(--navy-800); font-size: 17px; }
.pro__h span { font-size: 13px; color: var(--muted); }
.semhor { display: grid; gap: 6px; }
.dlin { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 0; border-top: 1px solid var(--line-2); }
.dlin:first-child { border-top: 0; }
.dlin__d { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; color: var(--ink-2); min-height: 40px; }
.tog { position: relative; width: 40px; height: 24px; flex: none; }
.tog input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.tog span { position: absolute; inset: 0; border-radius: 999px; background: #D5DEE7; transition: background-color .25s; }
.tog span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); transition: transform .3s var(--ease); }
.tog input:checked + span { background: var(--navy-800); }
.tog input:checked + span::after { transform: translateX(16px); }
.tog input:focus-visible + span { outline: 3px solid var(--gold-400); outline-offset: 2px; }
.ints { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 40px; }
.int { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.int input { width: 92px; min-height: 34px; border: 0; background: #fff; border-radius: 9px; padding: 0 8px; font-size: 15px; font-variant-numeric: tabular-nums; }
.int button { width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--muted); display: grid; place-items: center; }
.int button:hover { color: var(--danger); background: #fff; }
.ints .add { height: 34px; border-radius: 10px; border: 1px dashed #C6D2DE; background: none; padding: 0 12px; font-size: 13px; font-weight: 700; color: var(--muted); }
.ints .add:hover { color: var(--navy-800); border-color: var(--navy-800); }
.fechado { font-size: 13px; color: var(--muted-2); align-self: center; }
@media (max-width: 560px) { .dlin { grid-template-columns: 1fr; gap: 6px; } .int input { width: 84px; } }
.foto-up { position: relative; }
.foto-up input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.linkbtn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 12px; font: inherit; font-size: 12px; font-weight: 700; color: var(--navy-800); transition: border-color .2s, background-color .2s; }
.linkbtn:hover { border-color: var(--navy-800); }
[data-ch] { display: flex; gap: 6px; align-items: center; }
.linkbtn:hover { color: var(--blue-500); }

/* Seletor no celular: tudo numa linha, grade de 3 horários */
@media (max-width: 640px) {
	.pick__bar { flex-direction: column; align-items: stretch; }
	.semnav { justify-content: space-between; }
	.profs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px; padding: 2px 20px 4px; scrollbar-width: none; }
	.profs::-webkit-scrollbar { display: none; }
	.prof-f { flex: none; }
	.dias { gap: 4px; }
	.dia { padding: 8px 0 7px; border-radius: 12px; }
	.dia b { font-size: 20px; }
	.dia__l { display: none; }
	.slots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
	.slot { padding: 10px 4px 9px; font-size: 15px; }
	.card { padding: 18px 16px; }
	.profs { margin: 0 -16px; padding: 2px 16px 4px; }
}
.app--adm .topbar__in { max-width: none; padding-left: 24px; }

input.input[type=date], input.input[type=datetime-local], input.input[type=time] { min-width: 0; }
span.av.av--txt { color: var(--gold-500); font-size: 13px; font-weight: 800; }
.ficha__top span.av.av--txt { font-size: 20px; }
@media (max-width: 640px) {
	.page__h .acoes, .page__h > .btn { width: 100%; }
	.page__h .acoes .btn { flex: 1; }
}
