/* Controles do próprio Agendado (data, hora, listas, cor, dicas, caixas de marcar, rolagem).
   Usa os tokens do app (e da página pública), com valores de reserva. */
.ctl-hidden { display: none !important; }

/* botão que substitui o campo: herda a classe do campo (.input, .select...) e ganha ícone e texto */
.ctl-field { display: inline-flex; align-items: center; gap: 8px; text-align: left; cursor: default; font: inherit; color: var(--text, #121A2C); line-height: 1.2; white-space: nowrap; min-width: 0; }
.ctl-field > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ctl-field .ic { flex: none; color: var(--text-3, #8792A6); }
.ctl-field .ph { color: var(--text-3, #8792A6); }
.ctl-field:disabled { opacity: .5; }
.ctl-field.ctl-open { box-shadow: inset 0 0 0 1.5px var(--accent, #2563EB) !important; }
.ctl-select { justify-content: space-between; }
.ctl-time { font-variant-numeric: tabular-nums; }
.ctl-time > span { flex: none; }
/* campos de hora soltos (sem classe de campo) ficam como pílula */
.ctl-time:not(.input):not(.select), .ctl-date:not(.input):not(.select) { height: 32px; padding: 0 10px; border-radius: 10px; background: var(--surface-2, #F6F8FC); box-shadow: inset 0 0 0 1px var(--line, #E7EBF3); }
.ctl-select:not(.input):not(.select) { height: 34px; padding: 0 10px 0 12px; border-radius: 10px; background: var(--surface-2, #F6F8FC); box-shadow: inset 0 0 0 1px var(--line, #E7EBF3); }
.ctl-color:not(.input) { width: 30px; height: 30px; border-radius: 50%; padding: 0; justify-content: center; }

/* popover */
.ctl-layer { position: fixed; inset: 0; z-index: 90; }
.ctl-pop { position: fixed; z-index: 91; background: var(--surface, #fff); color: var(--text, #121A2C); border-radius: 18px; padding: 10px; box-shadow: 0 0 0 1px var(--line, #E7EBF3), 0 18px 50px rgba(16, 32, 72, .2), 0 2px 8px rgba(16, 32, 72, .08); animation: ctl-in .14s ease-out; font: 14px/1.4 var(--font, -apple-system, system-ui, sans-serif); max-height: calc(100vh - 16px); display: flex; flex-direction: column; }
@keyframes ctl-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.ctl-pop.sheet { left: 8px !important; right: 8px; top: auto !important; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto !important; border-radius: 22px; padding: 14px; animation: ctl-up .2s ease-out; max-height: 80vh; }
@keyframes ctl-up { from { transform: translateY(24px); opacity: .5; } }
.ctl-pop button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: default; }
.ctl-pop .ctl-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--text-2, #4A5568); }
.ctl-pop .ctl-ic:hover { background: var(--hover, #F1F4F9); }
.ctl-pop .ctl-btn { height: 34px; padding: 0 14px; border-radius: 10px; background: var(--hover, #F1F4F9); font-weight: 600 !important; font-size: 13px !important; display: inline-flex; align-items: center; justify-content: center; }
.ctl-pop .ctl-btn:hover { background: var(--line-strong, #D6DDEA); }
.ctl-pop .ctl-btn.primary { background: var(--accent, #2563EB); color: #fff !important; }
.ctl-in { height: 38px; padding: 0 12px; border-radius: 11px; border: 0; outline: none; background: var(--surface-2, #F6F8FC); box-shadow: inset 0 0 0 1px var(--line, #E7EBF3); font: inherit; color: inherit; min-width: 0; }
.ctl-in:focus { box-shadow: inset 0 0 0 1.5px var(--accent, #2563EB); background: var(--surface, #fff); }
.ctl-in.bad { box-shadow: inset 0 0 0 1.5px var(--high, #EF233C); }

/* calendário */
.ctl-cal-h { display: flex; align-items: center; gap: 2px; padding: 0 2px 6px 6px; }
.ctl-cal-h b { flex: 1; font-size: 14.5px; font-weight: 600; }
.ctl-cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px 0; justify-items: center; }
.ctl-cal-g small { font-size: 11px; color: var(--text-3, #8792A6); line-height: 24px; font-weight: 500; }
.ctl-cal-g button { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.ctl-cal-g button:hover:not(:disabled) { background: var(--hover, #F1F4F9); }
.ctl-cal-g button.out { color: var(--text-3, #8792A6); }
.ctl-cal-g button.today { color: var(--accent, #2563EB); font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--accent, #2563EB); }
.ctl-cal-g button.on { background: var(--accent, #2563EB) !important; color: #fff; font-weight: 700; box-shadow: none; }
.ctl-cal-g button:disabled { opacity: .3; }
.ctl-foot { display: flex; gap: 6px; justify-content: flex-end; padding-top: 8px; margin-top: 6px; border-top: 1px solid var(--line, #E7EBF3); }

/* hora */
.ctl-time-type { display: flex; gap: 6px; align-items: center; }
.ctl-time-type .ctl-in { flex: 1; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: .04em; }
.ctl-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 8px; max-height: 236px; overflow-y: auto; padding-right: 2px; }
.ctl-times button { height: 34px; border-radius: 10px; font-variant-numeric: tabular-nums; font-size: 13.5px; }
.ctl-times button:hover { background: var(--hover, #F1F4F9); }
.ctl-times button.on { background: var(--accent, #2563EB); color: #fff; font-weight: 600; }
.ctl-pop.sheet .ctl-times { grid-template-columns: repeat(4, 1fr); max-height: 46vh; }

/* lista */
.ctl-search { margin-bottom: 6px; }
.ctl-list { overflow-y: auto; display: flex; flex-direction: column; gap: 1px; max-height: 320px; }
.ctl-list button { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; padding: 6px 10px; border-radius: 10px; text-align: left; font-size: 13.5px; }
.ctl-list button:hover:not(:disabled) { background: var(--hover, #F1F4F9); }
.ctl-list button.on { font-weight: 600; }
.ctl-list button .ic { color: var(--accent, #2563EB); flex: none; }
.ctl-list button:disabled { opacity: .4; }
.ctl-list button[hidden] { display: none; }
.ctl-pop.sheet .ctl-list { max-height: 60vh; }
.ctl-pop.sheet .ctl-list button { min-height: 46px; font-size: 16px; }

/* cor */
.ctl-colors { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-bottom: 10px; }
.ctl-colors button { aspect-ratio: 1; border-radius: 50%; }
.ctl-colors button.on { box-shadow: 0 0 0 2px var(--surface, #fff), 0 0 0 4px var(--text, #121A2C); }
.ctl-hex-sw { width: 30px; height: 30px; border-radius: 50%; flex: none; }

/* dica ao passar o mouse */
.ctl-tip { position: fixed; z-index: 95; max-width: 260px; padding: 6px 10px; border-radius: 9px; background: #1F1F25; color: #F1F1F4; font: 500 12px/1.35 var(--font, -apple-system, system-ui, sans-serif); text-align: center; pointer-events: none; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); animation: ctl-in .12s ease-out; }

/* caixa de marcar redonda, número sem setinhas, detalhes sem triângulo, rolagem fina */
input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 0; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line-strong, #D6DDEA); background: var(--surface, #fff); display: inline-grid; place-content: center; flex: none; vertical-align: middle; transition: background .12s, box-shadow .12s; }
input[type="checkbox"]::before { content: ""; width: 10px; height: 10px; background: #fff; clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 26%, 86% 12%, 38% 70%); transform: scale(0); transition: transform .12s; }
input[type="checkbox"]:checked { background: var(--accent, #2563EB); box-shadow: none; }
input[type="checkbox"]:checked::before { transform: scale(1); }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
summary { list-style: none; cursor: default; display: inline-flex; align-items: center; gap: 6px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
details[open] > summary::after { transform: rotate(225deg) translate(-1px, -1px); }
* { scrollbar-width: thin; scrollbar-color: var(--line-strong, #D6DDEA) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong, #D6DDEA); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--text-3, #8792A6); }
::-webkit-scrollbar-corner { background: transparent; }
:focus-visible { outline: 2px solid var(--accent, #2563EB); outline-offset: 2px; }
input:focus-visible, textarea:focus-visible, [contenteditable]:focus-visible { outline: none; }
@media (max-width: 760px) { .ctl-layer { background: rgba(10, 16, 32, .3); animation: ctl-fade .15s; } } @keyframes ctl-fade { from { opacity: 0; } }
