/* Minha conta dos salões, redesenhada em 31/10/2026 (classes ct-). Mesmo vocabulário de Serviços, Equipe e Ajuda:
   escala --sp-*, cartões, barra fixa de 1 ação no celular, 2 colunas só a partir de 1280. Só tokens; nenhum hex.
   A conta da equipe Hermelo (renderTeamAccount) segue com as regras account-* de admin.css e navigation.css. */
.ct { --ct-safe: env(safe-area-inset-bottom, 0px); --ct-bar-b: 0px; --ct-bar: calc(76px + var(--ct-safe)); padding: var(--sp-2) 0 var(--sp-6); max-width: 100%; margin-inline: auto; color: var(--ink); }
/* Profissional no celular: a barra inferior do app (63 px + o maior entre 6 px e a área segura) fica embaixo; a barra de Salvar sobe acima dela. */
html[data-role="professional"] .ct { --ct-bar-b: calc(63px + max(6px, env(safe-area-inset-bottom, 0px))); --ct-safe: 0px; }
.ct.has-bar { padding-bottom: calc(var(--ct-bar) + var(--ct-bar-b) + var(--sp-6) + var(--sp-2)); }
/* O campo focado nunca fica atrás da barra fixa (nem com o teclado aberto): 16 px de folga acima dela. */
html:has(.ct.has-bar) { scroll-padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px) + var(--sp-4)); }
html[data-role="professional"]:has(.ct.has-bar) { scroll-padding-bottom: calc(63px + max(6px, env(safe-area-inset-bottom, 0px)) + 76px + var(--sp-4)); }
/* Até 1023 px a barra do salão (60 px) é fixa no topo: o campo focado ao rolar não fica atrás dela. */
@media (max-width: 1023px) { html:has(.ct) { scroll-padding-top: calc(60px + var(--sp-4)); } }
.ct-head { margin-bottom: var(--sp-4); }
.ct-head h1 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -.03em; line-height: 1.2; }
.ct-lede { margin: var(--sp-1) 0 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); text-wrap: balance; }
.ct-grid { display: grid; gap: var(--sp-4); }
.ct-card { display: grid; align-content: start; gap: var(--sp-3); padding: var(--sp-4); background: var(--surface); border: 1px solid var(--rule-soft); border-radius: 12px; min-width: 0; }
.ct-card > h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.ct-sub { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }
/* você */
.ct-who { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.ct-avatar { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-text); font-size: 18px; font-weight: 700; }
.ct-who > div { display: grid; gap: var(--sp-1); min-width: 0; justify-items: start; }
.ct-who b { font-size: 20px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; overflow-wrap: anywhere; }
.ct-tag { display: inline-flex; align-items: center; min-height: 28px; padding: 0 var(--sp-3); border-radius: 14px; background: var(--brand-soft); color: var(--brand-text); font-size: 13px; font-weight: 700; }
.ct-lines { margin: 0; display: grid; border-top: 1px solid var(--rule-soft); }
.ct-lines > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--sp-3); align-items: center; min-height: 44px; border-bottom: 1px solid var(--rule-soft); }
.ct-lines > div:last-child { border-bottom: 0; }
.ct-lines dt { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.ct-lines dd { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.ct-lines .is-skel { display: block; width: 60%; height: 14px; border-radius: 7px; background: var(--rule-strong); opacity: .55; animation: ct-pulse 1.4s ease-in-out infinite; }
@keyframes ct-pulse { 50% { opacity: .3; } }
/* aparência: interruptor nativo (button role=switch) */
.ct-switch { display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-height: 56px; padding: var(--sp-2) var(--sp-3); border: 1.5px solid var(--rule-strong); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; font-weight: 600; text-align: left; cursor: pointer; }
.ct-switch .ct-sw-state { margin-left: auto; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.ct-track { position: relative; flex: none; width: 48px; height: 28px; border-radius: 14px; background: var(--rule-strong); }
.ct-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); }
.ct-switch[aria-checked="true"] .ct-track { background: var(--brand); }
.ct-switch[aria-checked="true"] .ct-track::after { transform: translateX(20px); background: var(--brand-ink); }
@media (prefers-reduced-motion: no-preference) { .ct-track::after { transition: transform .15s; } }
/* botões e foco */
.ct .btn { min-height: 48px; justify-content: center; }
.ct-switch:focus-visible, .ct .btn:focus-visible, .ct-input:focus-visible, .ct-check input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ct .btn[aria-disabled="true"] { cursor: progress; }
.ct-sec-row { display: flex; align-items: center; gap: var(--sp-3); }
.ct-sec-row > span:last-child { display: grid; gap: 2px; min-width: 0; font-size: 15px; font-weight: 600; }
.ct-sec-row small { font-size: 14px; font-weight: 400; color: var(--ink-2); }
.ct-ico { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); }
.ct-open { width: 100%; }
/* formulário */
.ct-form { display: grid; gap: var(--sp-4); padding-top: var(--sp-3); border-top: 1px solid var(--rule-soft); }
.ct-field { display: grid; gap: var(--sp-1); }
.ct-field > label { font-size: 14px; font-weight: 600; }
.ct-input { box-sizing: border-box; width: 100%; min-height: 48px; margin: 0; padding: 0 var(--sp-3); border: 1.5px solid var(--rule-strong); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; letter-spacing: .08em; -webkit-appearance: none; appearance: none; }
.ct-input.is-text { letter-spacing: 0; }
.ct-input[aria-invalid="true"] { border-color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); }
.ct-field small { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.ct-err { display: flex; gap: var(--sp-2); align-items: flex-start; margin: 0; font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--bad); }
.ct-err svg { flex: none; margin-top: 2px; }
.ct-check { display: flex; align-items: center; gap: var(--sp-3); min-height: 44px; font-size: 15px; color: var(--ink-2); cursor: pointer; }
.ct-check input { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 24px; height: 24px; margin: 0; border: 1.5px solid var(--rule-strong); border-radius: 6px; background: var(--surface); }
.ct-check input:checked { background: var(--brand); border-color: var(--brand); }
.ct-check input:checked::after { content: ""; position: absolute; left: 7px; top: 2px; width: 6px; height: 12px; border: solid var(--brand-ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.ct-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.ct-actions .btn { flex: 1 1 100%; }
.ct-submit { display: none; }
.ct-box { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-3); align-items: start; padding: var(--sp-4); border-radius: 12px; }
.ct-box b { display: block; font-size: 16px; font-weight: 700; }
.ct-box p { margin: var(--sp-1) 0 0; font-size: 14px; line-height: 1.45; color: var(--ink); }
.ct-box > svg { margin-top: 2px; }
.ct-box.is-ok { background: var(--ok-bg); color: var(--ok); }
.ct-box.is-bad { background: var(--bad-bg); color: var(--bad); }
.ct-spin { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ct-rot .8s linear infinite; }
@keyframes ct-rot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ct-spin, .ct-lines .is-skel { animation: none; } }
/* Enviando: o botão mantém a cor cheia (sem opacidade) e a largura que tinha. */
.ct .btn.ct-busy, .ct .btn.ct-busy:hover { cursor: progress; }
.ct .btn-primary.ct-busy, .ct .btn-primary.ct-busy:hover { background: var(--btn-fill); border-color: var(--btn-fill); color: var(--btn-ink); }
/* sair */
.ct-out .btn { width: 100%; }
.ct-nw { white-space: nowrap; }
/* barra fixa (celular): 76 px, colada ao rodapé (Profissional: acima da barra inferior do app) */
.ct-bar { position: fixed; left: 0; right: 0; bottom: var(--ct-bar-b); z-index: 31; box-sizing: border-box; height: var(--ct-bar); padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + var(--ct-safe)); background: var(--surface); border-top: 1.5px solid var(--rule-strong); display: flex; align-items: center; }
.ct-bar .btn { width: 100%; }
@media (min-width: 768px) {
  .ct { max-width: 640px; }
  .ct-bar { display: none; }
  .ct-submit { display: inline-flex; }
  .ct.has-bar { padding-bottom: var(--sp-6); }
  .ct-open, .ct-out .btn { width: auto; justify-self: start; }
  .ct-actions .btn { flex: none; }
  /* botão, faixa, divisória e formulário alinhados na mesma margem e com a mesma largura */
  .ct-sec > :not(h2) { max-width: 440px; }
}
@media (min-width: 1280px) {
  .ct { max-width: 1040px; }
  /* A coluna da esquerda não se estica por causa da altura do Segurança: a última linha (1fr) absorve a sobra. */
  .ct-grid { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); grid-template-areas: "me sec" "ap sec" "out sec" ". sec"; grid-template-rows: min-content min-content min-content 1fr; grid-auto-rows: min-content; align-content: start; align-items: start; gap: var(--sp-4) var(--sp-5); }
  .ct-me { grid-area: me; } .ct-ap { grid-area: ap; } .ct-sec { grid-area: sec; } .ct-out { grid-area: out; }
}
@media (hover: hover) and (min-width: 1280px) {
  .ct-switch:hover, .ct .btn:not(.btn-primary):not([aria-disabled="true"]):hover { background: var(--surface-2); }
}
/* por último, para vencer o display dos componentes acima */
.ct [hidden] { display: none; }
.ct-live:empty, #ct-fail:empty { display: none; }
