/**
 * AgendaFull — estilos do front-end.
 *
 * Tudo é escrito sobre variáveis com valor de reserva, então o plugin
 * funciona sozinho em qualquer tema. Quando o agendafull-theme está ativo,
 * ele redefine --af-* e o agendamento assume as cores do cliente
 * automaticamente, sem tocar neste arquivo.
 *
 * Desenhado primeiro para 375px de largura.
 */

.af-booking,
.af-account,
.af-panel-page,
.af-settings-page,
/* A janela de ações é irmã do painel no HTML, não filha: sem ela nesta
   lista, os tokens não chegariam lá e a caixa ficaria transparente. */
.af-modal,
.af-lightbox {
	--af-c-bg: var(--af-cor-fundo, #ffffff);
	--af-c-surface: var(--af-cor-superficie, #f7f7f8);
	--af-c-text: var(--af-cor-texto, #16181d);
	--af-c-muted: var(--af-cor-texto-suave, #6b7280);
	--af-c-primary: var(--af-cor-primaria, #2563a8);
	--af-c-on-primary: var(--af-cor-primaria-texto, #ffffff);
	--af-c-line: var(--af-cor-borda, rgba(127, 127, 127, .28));
	/* Apelido: três regras antigas pedem --af-c-border, e sem esta linha
	   elas caem numa variável que não existe e simplesmente não desenham. */
	--af-c-border: var(--af-cor-borda, rgba(127, 127, 127, .28));
	--af-c-ok: var(--af-cor-sucesso, #2c7355);
	--af-c-alert: var(--af-cor-alerta, #a8512a);
	/* Roxo só para a gratuidade: verde já quer dizer "concluído", e duas
	   coisas diferentes na mesma cor não são legenda, são adivinhação. */
	--af-c-reward: var(--af-cor-fidelidade, #7c4dbe);
	--af-r: var(--af-raio, 10px);

	color: var(--af-c-text);
	font-size: 16px;
	line-height: 1.5;
	max-width: 720px;
	margin: 0 auto;
}

.af-booking *,
.af-account *,
.af-panel-page *,
.af-settings-page *,
.af-modal * {
	box-sizing: border-box;
}

/*
 * O atributo hidden do HTML vale display:none com especificidade zero, então
 * qualquer regra nossa com display o derrota — .af-field { display: flex }
 * deixava campos "escondidos" continuarem na tela. Aqui ele volta a ganhar.
 */
.af-booking [hidden],
.af-account [hidden],
.af-panel-page [hidden],
.af-settings-page [hidden],
.af-modal [hidden] {
	display: none !important;
}

.af-modal {
	color: var(--af-c-text);
	font-size: 16px;
	line-height: 1.5;
}

/* ---------------------------------------------------------------- *
 * Passos
 * ---------------------------------------------------------------- */

.af-steps {
	display: flex;
	gap: 4px;
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
	overflow-x: auto;
	scrollbar-width: none;
}

.af-steps::-webkit-scrollbar {
	display: none;
}

.af-step {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: none;
	font-size: 12px;
	color: var(--af-c-muted);
	padding: 6px 10px;
	border-radius: 999px;
	white-space: nowrap;
}

.af-step span {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--af-c-surface);
	border: 1px solid var(--af-c-line);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
}

.af-step.is-current {
	color: var(--af-c-text);
	font-weight: 600;
}

.af-step.is-current span {
	background: var(--af-c-primary);
	border-color: var(--af-c-primary);
	color: var(--af-c-on-primary);
}

.af-step.is-done span {
	background: var(--af-c-ok);
	border-color: var(--af-c-ok);
	color: #fff;
}

/* ---------------------------------------------------------------- *
 * Resumo com atalho para voltar
 * ---------------------------------------------------------------- */

.af-summary {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 18px;
}

.af-chip {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	background: var(--af-c-surface);
	border: 1px solid var(--af-c-line);
	border-radius: 999px;
	padding: 5px 12px;
	font-size: 13px;
	color: var(--af-c-text);
	cursor: pointer;
	font-family: inherit;
}

.af-chip em {
	font-style: normal;
	font-size: 11px;
	color: var(--af-c-primary);
}

.af-chip:hover {
	border-color: var(--af-c-primary);
}

/* ---------------------------------------------------------------- *
 * Títulos, avisos
 * ---------------------------------------------------------------- */

.af-title {
	font-size: 18px;
	margin: 0 0 14px;
	line-height: 1.25;
}

.af-loading,
.af-empty,
.af-notice {
	color: var(--af-c-muted);
	padding: 18px 0;
	margin: 0;
}

.af-error {
	color: var(--af-c-alert);
	background: color-mix(in srgb, var(--af-c-alert) 10%, transparent);
	border-radius: var(--af-r);
	padding: 12px 14px;
	margin: 12px 0 0;
}

.af-next {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 0 0 14px;
	color: var(--af-c-muted);
	font-size: 14px;
}

/* ---------------------------------------------------------------- *
 * Botões
 * ---------------------------------------------------------------- */

.af-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	/* 44px de alvo: o mínimo confortável para o polegar. */
	min-height: 44px;
	padding: 10px 18px;
	border-radius: var(--af-r);
	border: 1px solid transparent;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	line-height: 1.2;
}

.af-btn-primary {
	background: var(--af-c-primary);
	color: var(--af-c-on-primary);
}

.af-btn-primary:hover {
	filter: brightness(1.08);
}

.af-btn-ghost {
	background: transparent;
	border-color: var(--af-c-line);
	color: var(--af-c-text);
}

/* Verde só nas ações que a EQUIPE dispara de dentro do painel, onde ele
   significa "isto abre o WhatsApp" e não compete com nada. */
.af-btn-wa {
	background: #25d366;
	color: #06301a;
}

/* Para o cliente, o WhatsApp é a alternativa, não o caminho principal: em
   verde ele rouba o clique do agendamento online, que é justamente o que o
   dono quer que aconteça. */
.af-btn-wa-quiet {
	background: transparent;
	border-color: var(--af-c-line);
	color: var(--af-c-muted);
}

.af-btn-block {
	display: flex;
	width: 100%;
	margin-top: 16px;
}

.af-btn:disabled {
	opacity: .45;
	cursor: not-allowed;
}

/* ---------------------------------------------------------------- *
 * 1. Serviços
 * ---------------------------------------------------------------- */

.af-toolbar {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0 0 16px;
}

.af-search {
	width: 100%;
	min-height: 44px;
	padding: 10px 14px;
	border-radius: var(--af-r);
	border: 1px solid var(--af-c-line);
	background: var(--af-c-surface);
	color: var(--af-c-text);
	font: inherit;
}

.af-sort {
	display: flex;
	align-items: center;
	gap: 8px;
	justify-content: flex-end;
	font-size: 13px;
}

.af-sort-label {
	color: var(--af-c-muted);
}

.af-sort-btn {
	background: transparent;
	border: 1px solid var(--af-c-line);
	border-radius: 999px;
	padding: 6px 14px;
	font: inherit;
	font-size: 13px;
	color: var(--af-c-text);
	cursor: pointer;
}

.af-sort-btn.is-active {
	border-color: var(--af-c-primary);
	color: var(--af-c-primary);
	font-weight: 600;
}

.af-services {
	list-style: none;
	margin: 0;
	padding: 0;
}

.af-service {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 0;
	border-bottom: 1px solid var(--af-c-line);
}

.af-service:last-child {
	border-bottom: 0;
}

.af-service-img {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	object-fit: cover;
	flex: none;
}

.af-service-info {
	flex: 1;
	min-width: 0;
}

.af-service-name {
	font-size: 15px;
	margin: 0 0 4px;
	line-height: 1.3;
}

.af-service-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	font-size: 13px;
}

.af-price {
	color: var(--af-c-ok);
	font-weight: 600;
}

.af-duration {
	color: var(--af-c-muted);
}

.af-service .af-btn {
	flex: none;
	min-height: 40px;
	padding: 8px 16px;
	font-size: 14px;
}

/* ---------------------------------------------------------------- *
 * 2. Datas
 * ---------------------------------------------------------------- */

/* O dia escolhido continua visível ao lado dos outros: trocar de data é um
   toque, não voltar uma etapa. */
.af-day.is-selected {
	border-color: var(--af-c-primary);
	background: color-mix(in srgb, var(--af-c-primary) 14%, var(--af-c-surface));
	font-weight: 600;
}

.af-day-today {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--af-c-primary);
}

.af-days {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding: 4px 2px 12px;
	scrollbar-width: thin;
}

.af-day {
	flex: none;
	width: 62px;
	padding: 10px 4px;
	border-radius: var(--af-r);
	border: 1px solid var(--af-c-line);
	background: var(--af-c-surface);
	color: var(--af-c-text);
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	font: inherit;
}

.af-day-weekday {
	font-size: 11px;
	color: var(--af-c-muted);
	text-transform: uppercase;
	letter-spacing: .04em;
}

.af-day-number {
	font-size: 19px;
	line-height: 1.1;
}

.af-day:hover:not(.is-disabled) {
	border-color: var(--af-c-primary);
}

.af-day.is-disabled {
	opacity: .32;
	cursor: not-allowed;
}

/* ---------------------------------------------------------------- *
 * 3. Profissionais
 * ---------------------------------------------------------------- */

.af-pros {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
	gap: 12px;
}

.af-pro {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 14px 8px;
	border-radius: var(--af-r);
	border: 1px solid var(--af-c-line);
	background: var(--af-c-surface);
	color: var(--af-c-text);
	cursor: pointer;
	font: inherit;
	text-align: center;
}

.af-pro:hover:not(.is-disabled) {
	border-color: var(--af-c-primary);
}

.af-pro.is-disabled {
	opacity: .35;
	cursor: not-allowed;
}

.af-pro-photo {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	object-fit: cover;
}

.af-pro-name {
	font-size: 14px;
	line-height: 1.2;
}

.af-pro-price {
	font-size: 12px;
	color: var(--af-c-ok);
	font-weight: 600;
}

.af-pro-hint {
	font-size: 11px;
	color: var(--af-c-muted);
	line-height: 1.3;
}

.af-pro-any-icon {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: color-mix(in srgb, var(--af-c-primary) 14%, transparent);
	color: var(--af-c-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
}

/* ---------------------------------------------------------------- *
 * 4. Horários
 * ---------------------------------------------------------------- */

.af-group-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin: 20px 0 10px;
}

.af-group-title {
	font-size: 15px;
	margin: 0;
}

.af-group-count {
	font-size: 12px;
	color: var(--af-c-muted);
	background: var(--af-c-surface);
	border-radius: 999px;
	padding: 3px 10px;
}

.af-slots {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
	gap: 8px;
}

.af-slot {
	min-height: 44px;
	border-radius: var(--af-r);
	border: 1px solid var(--af-c-primary);
	background: transparent;
	color: var(--af-c-text);
	font: inherit;
	font-variant-numeric: tabular-nums;
	cursor: pointer;
}

.af-slot:hover {
	background: var(--af-c-primary);
	color: var(--af-c-on-primary);
}

/* ---------------------------------------------------------------- *
 * 5. Confirmação
 * ---------------------------------------------------------------- */

.af-confirm,
.af-success {
	background: var(--af-c-surface);
	border: 1px solid var(--af-c-line);
	border-radius: var(--af-r);
	padding: 20px;
}

.af-confirm-list {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 8px 16px;
	margin: 0;
	font-size: 15px;
}

.af-confirm-list dt {
	color: var(--af-c-muted);
	font-size: 13px;
}

.af-confirm-list dd {
	margin: 0;
	font-weight: 600;
	text-align: right;
}

.af-login-hint {
	margin: 16px 0 0;
	color: var(--af-c-muted);
	font-size: 14px;
}

.af-success {
	text-align: center;
}

.af-success-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 12px;
	border-radius: 50%;
	background: color-mix(in srgb, var(--af-c-ok) 16%, transparent);
	color: var(--af-c-ok);
	font-size: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ---------------------------------------------------------------- *
 * Área do cliente
 * ---------------------------------------------------------------- */

.af-card {
	background: var(--af-c-surface);
	border: 1px solid var(--af-c-line);
	border-radius: var(--af-r);
	padding: 18px;
	margin: 0 0 16px;
}

.af-card h2 {
	font-size: 16px;
	margin: 0 0 12px;
}

.af-next-appointment {
	border-left: 3px solid var(--af-c-primary);
}

.af-appointment-when {
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 4px;
}

.af-appointment-meta {
	color: var(--af-c-muted);
	font-size: 14px;
	margin: 0 0 14px;
}

.af-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.af-history {
	list-style: none;
	margin: 0;
	padding: 0;
}

.af-history li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid var(--af-c-line);
	font-size: 14px;
}

.af-history li:last-child {
	border-bottom: 0;
}

.af-history-date {
	color: var(--af-c-muted);
	font-size: 13px;
}

.af-status {
	/* inline-flex centraliza nos dois eixos; com padding e line-height o
	   texto encostava na borda de cima, e os três balões saíam de alturas
	   diferentes conforme o tamanho da palavra. */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	/* A linha do histórico é flex, e sem isto o balão esticava até a altura
	   inteira do item — virava um círculo com a palavra no meio. */
	align-self: center;
	flex: none;
	min-height: 24px;
	/* Largura suficiente para a palavra mais longa ("CANCELADO") caber sem
	   empurrar: assim os balões da lista ficam alinhados entre si. */
	min-width: 104px;
	font-size: 11px;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: .04em;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--af-c-bg);
	border: 1px solid var(--af-c-line);
	white-space: nowrap;
	text-align: center;
}

.af-status.is-completed {
	color: var(--af-c-ok);
	border-color: var(--af-c-ok);
}

.af-status.is-cancelled,
.af-status.is-no_show {
	color: var(--af-c-alert);
	border-color: var(--af-c-alert);
}

/* Fidelidade */

.af-loyalty {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.af-loyalty-card {
	border: 1px solid var(--af-c-line);
	border-radius: var(--af-r);
	padding: 14px;
	background: var(--af-c-bg);
}

.af-loyalty-name {
	font-size: 14px;
	font-weight: 600;
	margin: 0 0 8px;
}

.af-bar {
	height: 8px;
	border-radius: 999px;
	background: var(--af-c-surface);
	overflow: hidden;
	margin: 0 0 8px;
}

.af-bar span {
	display: block;
	height: 100%;
	background: var(--af-c-primary);
	border-radius: 999px;
}

.af-loyalty-hint {
	font-size: 13px;
	color: var(--af-c-muted);
	margin: 0;
}

.af-loyalty-card.has-reward {
	border-color: var(--af-c-reward);
}

.af-loyalty-card.has-reward .af-bar span {
	background: var(--af-c-reward);
}

.af-loyalty-card.has-reward .af-loyalty-hint {
	color: var(--af-c-reward);
	font-weight: 600;
}

.af-counts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 4px;
	padding: 0;
	list-style: none;
}

.af-counts li {
	background: var(--af-c-bg);
	border: 1px solid var(--af-c-line);
	border-radius: 999px;
	padding: 4px 12px;
	font-size: 13px;
}

.af-counts strong {
	font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- *
 * Entrar e criar conta
 * ---------------------------------------------------------------- */

.af-auth {
	max-width: 440px;
}

.af-google-card {
	text-align: center;
}

.af-google-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 48px;
	padding: 12px 18px;
	/* Branco e cinza são as cores que o Google exige no botão oficial,
	   e são também as que as pessoas reconhecem sem ler. */
	background: #fff;
	color: #1f1f1f;
	border: 1px solid #dadce0;
	border-radius: var(--af-r);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}

.af-google-button:hover {
	background: #f7f8f8;
	text-decoration: none;
}

.af-google-hint {
	margin: 10px 0 0;
	font-size: 13px;
	color: var(--af-c-muted);
}

.af-divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 16px;
	color: var(--af-c-muted);
	font-size: 13px;
}

.af-divider::before,
.af-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--af-c-line);
}

.af-form-intro {
	margin: 0 0 16px;
	font-size: 14px;
	color: var(--af-c-muted);
}

.af-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.af-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
	margin: 0;
	border: 0;
	padding: 0;
}

.af-field label,
.af-field legend {
	font-size: 13px;
	font-weight: 600;
	color: var(--af-c-text);
	padding: 0;
}

.af-field small {
	font-size: 12.5px;
	color: var(--af-c-muted);
	line-height: 1.4;
}

.af-field input,
.af-field select {
	width: 100%;
	/* 16px evita o zoom automático do iOS ao focar o campo. */
	font-size: 16px;
	font-family: inherit;
	min-height: 48px;
	padding: 11px 14px;
	border: 1px solid var(--af-c-line);
	border-radius: var(--af-r);
	background: var(--af-c-bg);
	color: var(--af-c-text);
}

.af-field input:focus,
.af-field select:focus {
	outline: 2px solid var(--af-c-primary);
	outline-offset: 1px;
	border-color: var(--af-c-primary);
}

.af-field-birthday {
	gap: 6px;
}

.af-birthday-inputs {
	display: grid;
	grid-template-columns: 90px 1fr;
	gap: 8px;
}

.af-check {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	font-size: 13.5px;
	line-height: 1.45;
	color: var(--af-c-muted);
	cursor: pointer;
}

.af-check input {
	/* Alvo grande o bastante para o polegar acertar de primeira. */
	width: 20px;
	height: 20px;
	margin: 1px 0 0;
	flex: none;
	accent-color: var(--af-c-primary);
}

.af-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.af-form-foot {
	margin: 14px 0 0;
	font-size: 13.5px;
}

.af-switch {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.af-switch p {
	margin: 0;
	font-size: 14px;
	color: var(--af-c-muted);
}

/* O formulário nativo do WordPress, quando algum tema o injeta aqui. */
.af-auth .login-username,
.af-auth .login-password {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

/* ---------------------------------------------------------------- *
 * Painel da equipe
 * ---------------------------------------------------------------- */

.af-agenda-day {
	margin: 0 0 22px;
}

.af-agenda-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--af-c-line);
}

.af-agenda-head h2 {
	font-size: 16px;
	margin: 0;
}

.af-agenda-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.af-appointment {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 12px 14px;
	border: 1px solid var(--af-c-line);
	border-left: 3px solid var(--af-c-primary);
	border-radius: var(--af-r);
	background: var(--af-c-surface);
}

.af-appointment.is-completed {
	border-left-color: var(--af-c-ok);
}

.af-appointment.is-cancelled,
.af-appointment.is-no_show {
	border-left-color: var(--af-c-alert);
	opacity: .6;
}

.af-appointment-time {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	flex: none;
	width: 48px;
}

.af-appointment-body {
	flex: 1;
	min-width: 0;
}

.af-appointment-client {
	font-weight: 600;
	display: block;
	margin-bottom: 2px;
}

.af-appointment-service {
	font-size: 13px;
	color: var(--af-c-muted);
}

/* ---------------------------------------------------------------- *
 * Painel: barra superior
 * ---------------------------------------------------------------- */

.af-panel-page {
	max-width: 1080px;
}

.af-panel-bar {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 10px 14px;
	align-items: center;
	margin: 0 0 14px;
}

.af-panel-nav {
	display: flex;
	gap: 6px;
	align-items: center;
}

.af-panel-date {
	font-size: 16px;
	margin: 0;
	line-height: 1.25;
}

.af-panel-date.is-today::after {
	content: " • hoje";
	color: var(--af-c-primary);
	font-weight: 700;
}

.af-panel-tools {
	grid-column: 1 / -1;
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}

.af-select {
	flex: 1;
	min-width: 160px;
	min-height: 40px;
	padding: 8px 12px;
	font: inherit;
	font-size: 14px;
	color: var(--af-c-text);
	background: var(--af-c-surface);
	border: 1px solid var(--af-c-line);
	border-radius: var(--af-r);
}

.af-icon-btn {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--af-c-surface);
	border: 1px solid var(--af-c-line);
	border-radius: var(--af-r);
	color: var(--af-c-text);
	font: inherit;
	font-size: 17px;
	cursor: pointer;
}

.af-icon-btn:hover {
	border-color: var(--af-c-primary);
	color: var(--af-c-primary);
}

.af-btn-sm {
	min-height: 40px;
	padding: 8px 14px;
	font-size: 14px;
}

@media (min-width: 720px) {
	.af-panel-bar {
		grid-template-columns: auto 1fr auto;
	}

	.af-panel-tools {
		grid-column: auto;
		justify-content: flex-end;
	}

	.af-select {
		flex: none;
	}
}

/* ---------------------------------------------------------------- *
 * Faixa dos próximos dias
 * ---------------------------------------------------------------- */

.af-week {
	display: flex;
	gap: 6px;
	overflow-x: auto;
	padding: 2px 2px 10px;
	margin: 0 0 14px;
	scrollbar-width: thin;
}

.af-week-day {
	flex: none;
	width: 58px;
	padding: 8px 4px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1px;
	background: var(--af-c-surface);
	border: 1px solid var(--af-c-line);
	border-radius: var(--af-r);
	color: var(--af-c-text);
	font: inherit;
	cursor: pointer;
}

.af-week-day.is-active {
	border-color: var(--af-c-primary);
	background: color-mix(in srgb, var(--af-c-primary) 12%, transparent);
}

.af-week-day.is-today .af-week-number {
	color: var(--af-c-primary);
}

.af-week-weekday {
	font-size: 10.5px;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--af-c-muted);
}

.af-week-number {
	font-size: 17px;
	line-height: 1.1;
}

.af-week-count {
	font-size: 11px;
	color: var(--af-c-muted);
	font-variant-numeric: tabular-nums;
}

.af-week-count.is-empty {
	opacity: .4;
}

/* ---------------------------------------------------------------- *
 * Linha do tempo
 * ---------------------------------------------------------------- */

.af-col-tabs {
	display: flex;
	gap: 6px;
	overflow-x: auto;
	margin: 0 0 10px;
	padding-bottom: 4px;
}

.af-col-tab {
	flex: none;
	padding: 7px 14px;
	border-radius: 999px;
	border: 1px solid var(--af-c-line);
	background: transparent;
	color: var(--af-c-muted);
	font: inherit;
	font-size: 13.5px;
	cursor: pointer;
	white-space: nowrap;
}

.af-col-tab.is-active {
	border-color: var(--af-c-primary);
	color: var(--af-c-primary);
	font-weight: 600;
}

.af-timeline {
	position: relative;
	display: flex;
	/* Sem rolagem própria: o dia inteiro aparece e quem rola é a página.
	   Duas barras de rolagem aninhadas — uma da página, outra dentro do
	   quadro — são desconfortáveis no celular, que é onde este painel é
	   usado de pé, entre um cliente e outro. O eixo de horas acompanha
	   grudado no topo em vez de sair junto. */
	overflow: visible;
	border: 1px solid var(--af-c-line);
	border-radius: var(--af-r);
	background: var(--af-c-surface);
}

.af-axis {
	position: relative;
	width: 52px;
	flex: none;
	border-right: 1px solid var(--af-c-line);
}

.af-axis-hour {
	position: absolute;
	left: 0;
	right: 0;
	height: 0;
	border-top: 1px solid var(--af-c-line);
}

.af-axis-hour span {
	position: absolute;
	top: -8px;
	right: 6px;
	font-size: 11px;
	color: var(--af-c-muted);
	font-variant-numeric: tabular-nums;
	background: var(--af-c-surface);
	padding: 0 2px;
}

.af-columns {
	position: relative;
	flex: 1;
	display: grid;
	grid-template-columns: 1fr;
	min-width: 0;
}

.af-column {
	position: relative;
	min-width: 0;
	border-left: 1px solid var(--af-c-line);
}

.af-column:first-child {
	border-left: 0;
}

/* No celular só a coluna ativa aparece; as abas trocam qual é. */
.af-column--secondary {
	display: none;
}

.af-column-head {
	position: sticky;
	top: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 7px 10px;
	background: var(--af-c-surface);
	border-bottom: 1px solid var(--af-c-line);
	font-size: 13px;
	font-weight: 600;
}

.af-column-photo {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	object-fit: cover;
}

/* Com abas no celular, o nome já está na aba ativa: repeti-lo no topo da
   coluna só gastaria altura de tela. */
@media (max-width: 719px) {
	.af-timeline.has-tabs .af-column-head {
		display: none;
	}
}

.af-column-body {
	position: relative;
	height: 100%;
}

.af-closed-layer {
	position: absolute;
	inset: 0;
}

.af-closed {
	position: absolute;
	left: 0;
	right: 0;
	background: repeating-linear-gradient(
		135deg,
		color-mix(in srgb, var(--af-c-muted) 12%, transparent),
		color-mix(in srgb, var(--af-c-muted) 12%, transparent) 5px,
		transparent 5px,
		transparent 10px
	);
}

.af-now {
	position: absolute;
	left: 52px;
	right: 0;
	height: 0;
	border-top: 2px solid #e5484d;
	z-index: 4;
	pointer-events: none;
}

.af-now-label {
	position: absolute;
	left: 0;
	top: -9px;
	background: #e5484d;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	padding: 1px 5px;
	border-radius: 3px;
	font-variant-numeric: tabular-nums;
}

.af-event {
	position: absolute;
	left: 4px;
	right: 4px;
	overflow: hidden;
	padding: 5px 8px;
	border: 0;
	border-left: 3px solid var(--af-c-primary);
	border-radius: var(--af-r-sm, 6px);
	background: color-mix(in srgb, var(--af-c-primary) 15%, var(--af-c-bg));
	color: var(--af-c-text);
	font: inherit;
	text-align: left;
	cursor: pointer;
	z-index: 2;
	display: block;
}

.af-event:hover {
	filter: brightness(1.12);
}

.af-event.is-completed {
	border-left-color: var(--af-c-ok);
	background: color-mix(in srgb, var(--af-c-ok) 15%, var(--af-c-bg));
}

.af-event.is-cancelled,
.af-event.is-no_show {
	border-left-color: var(--af-c-alert);
	background: color-mix(in srgb, var(--af-c-alert) 12%, var(--af-c-bg));
	opacity: .65;
}

.af-event.has-reward {
	box-shadow: inset 0 0 0 1px var(--af-c-reward);
}

.af-event-head {
	display: flex;
	align-items: baseline;
	gap: 7px;
	min-width: 0;
}

.af-event-time {
	font-size: 12px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	flex: none;
}

.af-event-client {
	font-size: 13px;
	font-weight: 600;
	color: var(--af-c-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.af-event-meta {
	font-size: 11.5px;
	color: var(--af-c-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.af-event-flag {
	display: inline-block;
	margin-top: 2px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--af-c-reward);
}

@media (min-width: 720px) {
	/*
	 * Só a faixa de abas da AGENDA some no desktop, onde os profissionais
	 * aparecem em colunas lado a lado. A tela de Ajustes reaproveita a mesma
	 * classe — e mora dentro de .af-panel-page também, então o escopo por
	 * ancestral não resolve. Sem esta exceção as abas dela sumiam junto: o
	 * proprietário ficava preso em "Estabelecimento", sem como trocar.
	 */
	.af-col-tabs:not(.af-settings-tabs) {
		display: none;
	}

	.af-columns {
		grid-template-columns: repeat(var(--af-col-count, 1), minmax(0, 1fr));
	}

	.af-column--secondary {
		display: block;
	}
}

/* ---------------------------------------------------------------- *
 * Janela de atendimento e encaixe
 * ---------------------------------------------------------------- */

.af-modal {
	position: fixed;
	inset: 0;
	z-index: 80;
	background: rgba(0, 0, 0, .6);
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 0;
	/*
	 * O bloco de tokens lá em cima dá 720px de largura máxima a todas as
	 * telas do plugin, e a janela de ações entrou junto na lista. No
	 * desktop isso virava uma tarja escura no meio da tela em vez de um
	 * escurecimento da tela inteira.
	 */
	max-width: none;
	margin: 0;
}

.af-modal[hidden] {
	display: none;
}

.af-modal-box {
	width: 100%;
	max-width: 460px;
	max-height: 92vh;
	overflow-y: auto;
	background: var(--af-c-bg);
	border-radius: var(--af-r) var(--af-r) 0 0;
	padding: 18px;
}

.af-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 14px;
}

.af-modal-head h2 {
	font-size: 17px;
	margin: 0;
}

.af-modal-intro {
	font-size: 13.5px;
	color: var(--af-c-muted);
	margin: 0 0 14px;
}

.af-modal-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 14px;
}

.af-modal-actions .af-btn {
	flex: 1;
	min-width: 120px;
}

.af-btn-danger {
	color: var(--af-c-alert);
	border-color: var(--af-c-alert);
}

.af-modal-note {
	margin: 12px 0 0;
	font-size: 13px;
	color: var(--af-c-muted);
}

/* Atendimentos simultâneos dividem a largura da coluna, como numa agenda
   de verdade. Sem isto o segundo cobriria o primeiro por inteiro. */
/* Atendimento curto: uma linha só, com o serviço ao lado do nome. Inflar a
   altura resolveria o corte, mas faria um "pezinho" de 15 minutos ocupar o
   espaço de meia hora na agenda — a altura é a duração. */
.af-event.is-compact {
	padding: 4px 8px;
}

.af-event.is-compact .af-event-head {
	gap: 6px;
}

.af-event-inline {
	font-size: 11.5px;
	color: var(--af-c-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	min-width: 0;
}

.af-event.is-split {
	box-shadow: 0 0 0 1px var(--af-c-surface);
}

.af-toggle {
	padding: 12px 0;
	border-bottom: 1px solid var(--af-c-border);
}

.af-toggle:last-of-type {
	border-bottom: 0;
}

.af-toggle.is-disabled {
	opacity: 0.5;
}

.af-toggle-line {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.af-toggle-hint {
	margin: 5px 0 0 25px;
	font-size: 12.5px;
	color: var(--af-c-muted);
}

.af-guest-switch {
	display: flex;
	gap: 6px;
	margin: 0 0 12px;
}

.af-slots-inline {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: -6px 0 12px;
}

.af-upcoming-item {
	padding: 12px 0;
	border-bottom: 1px solid var(--af-c-line);
}

.af-upcoming-item:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.af-account-bar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	margin: 0 0 12px;
}

.af-appointment-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* ------------------------------------------------------------------ *
 * Ajustes do proprietário
 * ------------------------------------------------------------------ */

.af-settings-tabs {
	margin: 0 0 16px;
}

.af-settings-body {
	padding-bottom: 20px;
}

.af-settings-body .af-form {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.af-hours-day {
	padding: 12px 0;
	border-bottom: 1px solid var(--af-c-line);
}

.af-hours-day:last-of-type {
	border-bottom: 0;
}

.af-hours-day > strong {
	display: block;
	margin-bottom: 8px;
	font-size: 14px;
}

.af-hours-blocks {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 8px;
}

.af-hours-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.af-hours-row input {
	flex: 1;
	min-width: 0;
	min-height: 44px;
	padding: 8px 10px;
	border-radius: var(--af-r);
	border: 1px solid var(--af-c-line);
	background: var(--af-c-bg);
	color: var(--af-c-text);
	font: inherit;
}

.af-btn-link {
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	font-size: 13.5px;
	color: var(--af-c-primary);
	text-decoration: underline;
	cursor: pointer;
}

.af-panel-out {
	margin-left: 4px;
}

.af-profile-out {
	margin: 16px 0 0;
	text-align: center;
}

.af-service-form {
	padding: 12px;
	margin: 0 0 10px;
	border: 1px solid var(--af-c-primary);
	border-radius: var(--af-r);
}

/* ------------------------------------------------------------------ *
 * Lembretes de hoje
 * ------------------------------------------------------------------ */

.af-reminder-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin: 0 0 14px;
	padding: 12px 14px;
	border-radius: 10px;
	background: color-mix(in srgb, var(--af-c-alert) 12%, var(--af-c-surface));
	border: 1px solid color-mix(in srgb, var(--af-c-alert) 35%, transparent);
	font-size: 14px;
	font-weight: 600;
	color: var(--af-c-text);
}

.af-reminder-count {
	margin: 0 0 12px;
	font-size: 13px;
	color: var(--af-c-muted);
}

.af-reminder-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.af-reminder-row {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	padding: 10px 12px;
	border: 1px solid var(--af-c-border);
	border-radius: 9px;
}

.af-reminder-row.is-sent {
	opacity: 0.62;
}

.af-reminder-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 150px;
}

.af-reminder-info strong {
	font-size: 14px;
}

.af-reminder-meta {
	font-size: 12.5px;
	color: var(--af-c-muted);
}

.af-reminder-undo {
	background: none;
	border: 0;
	padding: 0;
	font-size: 12.5px;
	color: var(--af-c-muted);
	text-decoration: underline;
	cursor: pointer;
}

@media (max-width: 420px) {
	.af-reminder-row .af-btn {
		width: 100%;
	}
}

.af-reward-note {
	margin: 12px 0 0;
	padding: 10px 12px;
	border-radius: var(--af-r);
	background: color-mix(in srgb, var(--af-c-reward) 14%, transparent);
	color: var(--af-c-reward);
	font-size: 13.5px;
	font-weight: 600;
}

.af-search-results {
	display: flex;
	flex-direction: column;
	gap: 2px;
	max-height: 180px;
	overflow-y: auto;
}

.af-search-option {
	text-align: left;
	padding: 10px 12px;
	background: var(--af-c-surface);
	border: 1px solid var(--af-c-line);
	border-radius: var(--af-r);
	color: var(--af-c-text);
	font: inherit;
	font-size: 14px;
	cursor: pointer;
}

.af-search-option:hover {
	border-color: var(--af-c-primary);
}

.af-when {
	display: grid;
	grid-template-columns: 1fr 120px;
	gap: 8px;
}

@media (min-width: 560px) {
	.af-modal {
		align-items: center;
		padding: 20px;
	}

	.af-modal-box {
		border-radius: var(--af-r);
	}
}

/* ---------------------------------------------------------------- *
 * Indicadores
 * ---------------------------------------------------------------- */

.af-dashboard {
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid var(--af-c-line);
}

.af-dash-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin: 0 0 16px;
}

.af-dash-head .af-title {
	margin: 0;
}

.af-range-toggle {
	display: flex;
	gap: 6px;
}

.af-range-btn {
	padding: 7px 16px;
	border-radius: 999px;
	border: 1px solid var(--af-c-line);
	background: transparent;
	color: var(--af-c-muted);
	font: inherit;
	font-size: 13.5px;
	cursor: pointer;
}

.af-range-btn.is-active {
	border-color: var(--af-c-primary);
	color: var(--af-c-primary);
	font-weight: 600;
}

.af-tiles {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	margin: 0 0 20px;
}

@media (min-width: 720px) {
	.af-tiles {
		grid-template-columns: repeat(4, 1fr);
	}
}

.af-tile {
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 14px;
	background: var(--af-c-surface);
	border: 1px solid var(--af-c-line);
	border-radius: var(--af-r);
}

.af-tile-label {
	font-size: 11.5px;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--af-c-muted);
}

.af-tile-value {
	font-size: 21px;
	line-height: 1.15;
	font-variant-numeric: tabular-nums;
}

/* Barra de progresso rumo ao total do período anterior. */
.af-tile-bar {
	height: 5px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--af-c-muted) 22%, transparent);
	overflow: hidden;
	margin: 4px 0 2px;
}

.af-tile-bar span {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--af-c-primary);
}

.af-tile--goal.is-beat .af-tile-bar span {
	background: var(--af-c-ok);
}

.af-tile-status {
	font-size: 12px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--af-c-muted);
}

.af-tile-status.is-beat {
	color: var(--af-c-ok);
	text-transform: uppercase;
	letter-spacing: .04em;
	font-size: 11px;
}

.af-tile-foot {
	font-size: 11.5px;
	color: var(--af-c-muted);
	margin-top: 2px;
}

.af-dash-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--af-c-line);
	border-radius: var(--af-r);
}

.af-dash-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	min-width: 420px;
}

.af-dash-table th {
	text-align: left;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--af-c-muted);
	padding: 10px 12px;
	background: var(--af-c-surface);
	border-bottom: 1px solid var(--af-c-line);
	white-space: nowrap;
}

.af-dash-table td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--af-c-line);
}

.af-dash-table tr:last-child td {
	border-bottom: 0;
}

.af-dash-name {
	font-weight: 600;
}

.af-dash-num {
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.af-dash-muted {
	color: var(--af-c-muted);
	font-size: 13px;
}

/* Serviço que aconteceu no período anterior e ainda não aconteceu neste. */
.af-dash-gone .af-dash-name,
.af-dash-gone .af-dash-num {
	opacity: .55;
}

/* ---------------------------------------------------------------- *
 * Painel da equipe
 * ---------------------------------------------------------------- */

@media (min-width: 640px) {
	.af-toolbar {
		flex-direction: row;
		align-items: center;
	}

	.af-search {
		flex: 1;
	}
}

/* ---------------------------------------------------------------- *
 * Dias da semana e combos, na tela de ajustes
 * ---------------------------------------------------------------- */

.af-weekdays {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.af-weekday {
	display: flex;
	align-items: center;
	justify-content: center;
	/* Alvo confortável para o polegar, sete cabendo em duas fileiras. */
	min-width: 52px;
	min-height: 44px;
	padding: 0 10px;
	border: 1px solid var(--af-c-line);
	border-radius: var(--af-r);
	background: var(--af-c-bg);
	color: var(--af-c-muted);
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	user-select: none;
}

/* A caixa some, mas continua no DOM: é ela que o teclado e o leitor de
   tela enxergam, e é dela que o JavaScript lê o estado. */
.af-weekday input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
}

.af-weekday.is-on {
	border-color: var(--af-c-primary);
	background: color-mix(in srgb, var(--af-c-primary) 14%, transparent);
	color: var(--af-c-text);
}

.af-weekday input:focus-visible + span {
	outline: 2px solid var(--af-c-primary);
	outline-offset: 3px;
	border-radius: 3px;
}

.af-checklist {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 10px 12px;
	border: 1px solid var(--af-c-line);
	border-radius: var(--af-r);
	background: var(--af-c-bg);
}

.af-field.is-disabled {
	opacity: .55;
}

.af-combo-note {
	color: var(--af-c-primary) !important;
	font-weight: 600;
}

/* Regra de fidelidade na área do cliente. */
.af-loyalty-rule {
	margin: 0 0 12px;
	font-size: 13px;
	line-height: 1.45;
	color: var(--af-c-muted);
}

/* Escolha da gratuidade, na tela de concluir o atendimento. */
.af-reward-choice {
	margin: 14px 0 0;
	padding: 12px;
	border: 1px solid var(--af-c-line);
	border-radius: var(--af-r);
	background: var(--af-c-bg);
}

.af-reward-choice .af-check {
	color: var(--af-c-text);
	font-weight: 600;
}

.af-reward-choice .af-reward-note {
	margin: 8px 0 0 29px;
}

/* Qual item do combo foi o gratuito. Só aparece quando a gratuidade é
 * marcada — antes disso é uma pergunta sem assunto. */
.af-reward-items {
	margin: 10px 0 0 29px;
	padding-top: 10px;
	border-top: 1px solid var(--af-c-line);
}

.af-reward-items-title {
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--af-c-muted);
}

.af-reward-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 5px 0;
	font-weight: 500;
}

/* O nome cede espaço; a etiqueta e o rádio não. Sem isto, um nome comprido
 * empurrava a etiqueta para fora e a linha quebrava em duas. */
.af-reward-item > span:not(.af-reward-flag) {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.af-reward-item input {
	flex: none;
}

.af-reward-flag {
	margin-left: auto;
	flex: none;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .02em;
}

.af-reward-flag.is-ready {
	background: color-mix(in srgb, var(--af-c-reward) 16%, transparent);
	color: var(--af-c-reward);
}

.af-reward-flag.is-short {
	background: color-mix(in srgb, var(--af-c-muted) 16%, transparent);
	color: var(--af-c-muted);
}

/* ---------------------------------------------------------------- *
 * Atalhos do painel: fidelidade e aniversários
 * ---------------------------------------------------------------- */

/*
 * Grade de duas colunas em vez de flex-wrap: com larguras diferentes, a
 * quebra deixava uma linha com dois botões e a seguinte com um, e o
 * conjunto parecia desalinhado. Na grade, todos têm a mesma largura.
 */
/*
 * Atalhos do painel.
 *
 * Flex, e não grade fixa: o profissional vê só "Minha conta" e o dono vê
 * cinco. Numa grade de duas colunas o botão solitário do profissional ficava
 * com meia linha e um buraco do lado — parecia defeito. Com flex-grow cada
 * fila se distribui pelo que existe nela.
 */
.af-panel-shortcuts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0 0 12px;
}

.af-panel-shortcuts > .af-btn {
	flex: 1 1 calc(50% - 4px);
	min-width: 0;
	margin: 0;
}

/* O de nome comprido ocupa a linha inteira. */
.af-shortcut-wide {
	flex-basis: 100%;
}

@media (min-width: 720px) {
	.af-panel-shortcuts > .af-btn {
		flex-basis: calc(25% - 6px);
	}
}

.af-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	margin-left: 6px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--af-c-primary);
	color: var(--af-c-on-primary);
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}

.af-loyalty-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 12px;
}

.af-loyalty-client {
	padding: 12px;
	border: 1px solid var(--af-c-line);
	border-radius: var(--af-r);
	background: var(--af-c-surface);
}

.af-loyalty-client.has-reward {
	border-color: var(--af-c-reward);
}

.af-loyalty-head {
	display: flex;
	align-items: baseline;
	gap: 4px 12px;
	flex-wrap: wrap;
	margin-bottom: 10px;
}

/*
 * O nome ocupa a linha inteira. Dividir a linha com a tarja e o link fazia
 * um nome comprido quebrar no meio do flex e passar por baixo dos dois.
 */
.af-loyalty-head strong {
	flex: 1 0 100%;
	font-size: 14.5px;
	line-height: 1.3;
}

.af-loyalty-client .af-loyalty {
	gap: 8px;
}

.af-loyalty-client .af-loyalty-card {
	padding: 10px;
}

/*
 * Campo solto das janelas do painel. O JavaScript já pedia .af-input em
 * sete lugares, mas a classe nunca existiu: dentro de .af-field a regra do
 * campo salvava a aparência, fora dela o campo saía cru.
 */
.af-input {
	width: 100%;
	/* 16px evita o zoom automático do iOS ao focar o campo. */
	font-size: 16px;
	font-family: inherit;
	min-height: 48px;
	padding: 11px 14px;
	border: 1px solid var(--af-c-line);
	border-radius: var(--af-r);
	background: var(--af-c-bg);
	color: var(--af-c-text);
}

.af-input:focus {
	outline: 2px solid var(--af-c-primary);
	outline-offset: 1px;
	border-color: var(--af-c-primary);
}

.af-loyalty-list + .af-input,
.af-modal-intro + .af-input {
	margin-top: 12px;
}

/*
 * Convite para o lembrete no celular, por cima da tela.
 *
 * Encaixado na página ele passava batido — o cliente acabou de ler
 * "Horário confirmado" e já está saindo. A caixa para o movimento e pede a
 * decisão enquanto o assunto ainda é o horário que ele marcou.
 *
 * Os tokens vêm repetidos aqui porque a caixa é filha do body, fora das
 * telas do plugin, e sem eles ficaria transparente.
 */
.af-push-overlay {
	--af-c-bg: var(--af-cor-fundo, #ffffff);
	--af-c-surface: var(--af-cor-superficie, #f7f7f8);
	--af-c-text: var(--af-cor-texto, #16181d);
	--af-c-muted: var(--af-cor-texto-suave, #6b7280);
	--af-c-primary: var(--af-cor-primaria, #2563a8);
	--af-c-on-primary: var(--af-cor-primaria-texto, #ffffff);
	--af-c-line: var(--af-cor-borda, rgba(127, 127, 127, .28));
	--af-r: var(--af-raio, 10px);

	position: fixed;
	inset: 0;
	z-index: 90;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, .6);
	color: var(--af-c-text);
	font-size: 16px;
	line-height: 1.5;
}

.af-push-box {
	width: 100%;
	max-width: 380px;
	padding: 22px;
	border-radius: var(--af-r);
	background: var(--af-c-bg);
	box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .6);
	text-align: left;
}

.af-push-box * {
	box-sizing: border-box;
}

.af-push-title {
	margin: 0 0 8px;
	font-size: 18px;
	line-height: 1.25;
}

.af-push-text {
	margin: 0;
	font-size: 14px;
	line-height: 1.45;
	color: var(--af-c-muted);
}

.af-push-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 18px;
}

.af-push-actions .af-btn {
	width: 100%;
}

/* ---------------------------------------------------------------- *
 * Legenda de cores da agenda
 * ---------------------------------------------------------------- */

.af-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
	font-size: 12px;
	color: var(--af-c-muted);
}

.af-legend li {
	display: flex;
	align-items: center;
	gap: 6px;
}

.af-legend-key {
	width: 14px;
	height: 14px;
	flex: none;
	border-radius: 3px;
	border-left: 3px solid var(--af-c-primary);
	background: color-mix(in srgb, var(--af-c-primary) 15%, var(--af-c-bg));
}

.af-legend-key.is-completed {
	border-left-color: var(--af-c-ok);
	background: color-mix(in srgb, var(--af-c-ok) 15%, var(--af-c-bg));
}

.af-legend-key.is-no_show {
	border-left-color: var(--af-c-alert);
	background: color-mix(in srgb, var(--af-c-alert) 12%, var(--af-c-bg));
	opacity: .65;
}

.af-legend-key.is-reward {
	border-left-color: var(--af-c-reward);
	background: color-mix(in srgb, var(--af-c-reward) 18%, var(--af-c-bg));
}

/* As mesmas listras da faixa de fora do expediente, em miniatura. */
.af-legend-key.is-closed {
	border-left: 0;
	background: repeating-linear-gradient(
		135deg,
		var(--af-c-surface),
		var(--af-c-surface) 3px,
		transparent 3px,
		transparent 6px
	);
	box-shadow: inset 0 0 0 1px var(--af-c-line);
}

.af-legend-key.is-now {
	border-left: 0;
	height: 3px;
	border-radius: 2px;
	background: #d64545;
}

/* Voltar para hoje, ao lado da data. */
.af-back-today {
	font-size: 13px;
	white-space: nowrap;
}

/* Filtro de profissional, no rodapé dos indicadores. */
.af-dash-filter {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin: 0 0 14px;
}

.af-dash-filter-label {
	font-size: 13px;
	color: var(--af-c-muted);
}

.af-dash-filter .af-select {
	flex: 1;
	min-width: 180px;
}

/* Dia já passado na faixa: consulta, não trabalho por fazer. */
.af-week-day.is-past {
	opacity: .6;
}

.af-week-day.is-past.is-active {
	opacity: 1;
}

/* Feriado fechado: risco na base, na mesma cor do "fora do expediente" da
 * legenda — quem já leu a legenda entende sem precisar tocar no dia. */
.af-week-day.is-holiday {
	border-bottom: 3px solid var(--af-c-muted);
}

.af-holiday-note {
	margin: 0 0 10px;
	padding: 10px 12px;
	border-radius: 8px;
	background: var(--af-c-surface);
	border: 1px solid var(--af-c-line);
	font-size: 14px;
	font-weight: 600;
}

/* ---------------------------------------------------------------- *
 * Barra de ferramentas do painel, no celular
 *
 * Quatro botões dividindo a linha em quatro colunas iguais: assim eles têm
 * alvo grande e ficam sempre no mesmo lugar, em vez de reflowarem conforme
 * o tamanho do texto de cada um.
 * ---------------------------------------------------------------- */

@media (max-width: 719px) {
	/*
	 * Só a barra do PAINEL vira grade de quatro. A tela de Ajustes usa a
	 * mesma classe com um botão só — e virava um quarto de linha com
	 * "Voltar à agen…" cortado no meio.
	 */
	[data-af-panel] .af-panel-tools {
		display: flex;
		gap: 6px;
	}

	/*
	 * Flex em vez de quatro colunas fixas. O dono tem quatro botões, o
	 * profissional tem dois — e numa grade de quatro o profissional ficava
	 * com "Sair" espremido num quarto da tela e metade da linha vazia.
	 */
	[data-af-panel] .af-panel-tools .af-btn {
		flex: 1 1 0;
		width: auto;
		padding: 10px 4px;
		font-size: 12.5px;
		gap: 4px;
		/* Margem herdada empurra o item para fora da própria coluna do
		   grid — foi o que jogava o "Sair" para fora da tela. */
		margin: 0;
	}

	/* Com quatro colunas de 375px sobra pouco: o texto pode encolher, mas
	   não pode sumir nem estourar a caixa. */
	/* display:block é o que faz o "…" funcionar: um item de flex vira caixa
	   de flex, e ali text-overflow não tem efeito. */
	[data-af-panel] .af-panel-tools .af-btn {
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		display: block;
		text-align: center;
		line-height: 24px;
	}
}

.af-tool-settings span[aria-hidden] {
	margin-right: 4px;
}

/* ---------------------------------------------------------------- *
 * Bloco em coluna dividida
 *
 * Com dois atendimentos no mesmo horário a largura cai pela metade, e ali
 * precisam caber horário, cliente e serviço. Quem cede é o tamanho da
 * fonte: sem o horário, o dono não sabe de que bloco se trata.
 * ---------------------------------------------------------------- */

.af-event.is-tight {
	padding-inline: 6px;
}

.af-event.is-tight .af-event-time {
	font-size: 10.5px;
	margin-right: 3px;
}

.af-event.is-tight .af-event-client {
	font-size: 11.5px;
}

.af-event.is-tight .af-event-inline,
.af-event.is-tight .af-event-meta {
	font-size: 10.5px;
}

/* Numa coluna estreita o nome longo tem que ceder antes do serviço. */
.af-event.is-tight .af-event-client {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
}

.af-event.is-tight.is-compact .af-event-head {
	gap: 4px;
}

/* ---------------------------------------------------------------- *
 * Lista de clientes
 * ---------------------------------------------------------------- */

.af-client-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 12px;
}

.af-client-row {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	padding: 12px;
	border: 1px solid var(--af-c-line);
	border-radius: var(--af-r);
	background: var(--af-c-surface);
}

.af-client-name {
	font-size: 14.5px;
}

.af-client-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	font-size: 12.5px;
	color: var(--af-c-muted);
}

/* Aviso forte antes do campo: quem lê depois de escrever já decidiu. */
.af-modal-warn {
	margin: 0 0 14px;
	padding: 12px 14px;
	border-radius: var(--af-r);
	background: color-mix(in srgb, var(--af-c-alert) 12%, transparent);
	border-left: 3px solid var(--af-c-alert);
	font-size: 13.5px;
	line-height: 1.45;
	color: var(--af-c-text);
}

/* Foto de quem está no painel, na tela "Minha conta". */
.af-me-photo {
	display: flex;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 12px;
}

/* "Remover foto" acompanha o campo, não a linha de ações do rodapé. */
.af-me-photo .af-btn-danger {
	flex: none;
	margin: 0;
}

/* Estado da conversão da foto: "preparando", ou o motivo de não ter dado. */
.af-photo-note {
	margin: 6px 0 0;
}

/* "você", ao lado do nome do dono na lista de Equipe. */
.af-you-tag {
	margin-left: 6px;
	padding: 1px 7px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--af-c-primary) 16%, transparent);
	color: var(--af-c-primary);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .03em;
	vertical-align: middle;
}

.af-me-photo .af-field {
	flex: 1;
	min-width: 0;
}

.af-me-photo-img {
	width: 72px;
	height: 72px;
	flex: none;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid var(--af-c-line);
	background: var(--af-c-surface);
}


