:root {
  /* Encaixou — paleta oficial da marca (encaixou-brand/colors.css) */
  --bg: #FFF6EC;
  --surface: #FFFFFF;
  --surface-2: #FFEFDD;
  --surface-3: #FFE6CC;
  --border: #F0DFC9;
  --text: #2B2620;
  --muted: #8A8177;
  --primary: #FF6B3D;
  --primary-dark: #E85526;
  --primary-soft: rgba(255, 107, 61, 0.14);
  --green: #22B8A6;
  --green-soft: rgba(34, 184, 166, 0.15);
  --danger: #E5484D;
  --on-primary: #2B2620;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(43, 38, 32, 0.10);
  --beta-h: 2.1rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #FFFAF3 0%, var(--bg) 60%);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 1.55rem; margin: 0 0 .25rem; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; margin: 0; }
.muted { color: var(--muted); }
.error { color: var(--danger); font-size: 0.85rem; }

/* ---------- Topbar ---------- */
.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.15rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--primary); }
.brand svg { height: 30px; width: auto; display: block; }
.sidebar .brand svg { height: 34px; }
.public-header .brand svg { height: 44px; }
@media (max-width: 560px) {
  .public-header .brand svg { height: 36px; }
}

/* ---------- Aviso de versão beta ---------- */
.beta-banner {
  height: var(--beta-h); display: flex; align-items: center; justify-content: center;
  background: var(--text); color: var(--surface-2); font-size: .76rem; font-weight: 600;
  text-align: center; padding: 0 1rem; overflow: hidden; white-space: nowrap;
  text-overflow: ellipsis; position: sticky; top: 0; z-index: 55;
}

/* ---------- Mobile bar (só no celular) ---------- */
.mobile-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem 1rem; background: rgba(255,246,236,0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border); position: sticky; top: var(--beta-h); z-index: 40;
}
.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
  width: 42px; height: 38px; padding: 0 9px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
}
.nav-toggle span { height: 2px; background: var(--text); border-radius: 2px; transition: .2s; }
.nav-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 45;
}
body.nav-open .nav-backdrop { display: block; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; top: var(--beta-h); left: 0; bottom: 0; width: 240px;
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 1.2rem 0.9rem; display: flex; flex-direction: column;
  gap: 1rem; z-index: 50; overflow-y: auto;
}
.sidebar .brand { padding: 0 .3rem .3rem; font-size: 1.2rem; border-bottom: 1px solid var(--border); padding-bottom: .9rem; }
.side-nav { display: flex; flex-direction: column; gap: .2rem; }
.side-group {
  font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em;
  font-weight: 700; padding: .8rem .6rem .25rem;
}
.side-nav a {
  display: block; padding: .65rem .75rem; color: var(--text); font-weight: 500;
  border-radius: 9px; font-size: .92rem;
}
.side-nav a:hover { text-decoration: none; background: var(--surface-2); color: var(--primary); }
.side-nav a.active {
  background: var(--primary-soft); color: var(--primary); font-weight: 700;
}
.side-cta { background: var(--primary) !important; color: var(--on-primary) !important; font-weight: 700; text-align: center; }
.side-logout { color: var(--danger) !important; }
.side-logout:hover { background: rgba(229,72,77,.12) !important; color: var(--danger) !important; }
.side-user { margin-top: auto; padding: .8rem .75rem; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--border); }

/* Mobile: sidebar vira drawer */
@media (max-width: 899px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; width: 270px; }
  body.nav-open .sidebar { transform: translateX(0); box-shadow: 6px 0 24px rgba(0,0,0,.35); }
}
@media (min-width: 900px) {
  .mobile-bar, .nav-backdrop { display: none !important; }
}

/* ---------- Layout ---------- */
.container { max-width: 1100px; margin: 1.5rem auto 3rem; padding: 0 1.25rem; }
@media (min-width: 900px) {
  body.has-sidebar .container { margin-left: 240px; max-width: none; padding: 1.75rem 2rem 3rem; }
}

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.page-head p { margin: 0; }
.back { margin: 0 0 .6rem; }
.back a { color: var(--muted); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; box-shadow: var(--shadow);
}
.card.narrow { max-width: 440px; margin-left: auto; margin-right: auto; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 820px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.step { display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem; }
.step-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: .9rem; }

/* ---------- Forms ---------- */
.field { margin-bottom: 1rem; display: flex; flex-direction: column; gap: .4rem; }
.field label { font-weight: 600; font-size: .9rem; }
input[type=text], input[type=password], input[type=time], input[type=number],
input[type=tel], input[type=email], select {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: .7rem .8rem; color: var(--text); font-size: 16px; width: 100%; min-height: 46px;
}
input:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.help { color: var(--muted); font-size: .8rem; }
.has-error input { border-color: var(--danger); }

/* Caixa de e-mail em destaque (Meu perfil) */
.email-box {
  background: var(--primary-soft); border: 1.5px solid var(--primary);
  border-radius: 12px; padding: .9rem 1rem;
}
.email-box label { color: var(--primary-dark); }
.email-box input[type=email] {
  background: var(--surface); border-color: var(--primary);
}
.email-box input[type=email]:focus { box-shadow: 0 0 0 3px var(--primary-soft); }
.form-errors { background: rgba(229,72,77,.12); border: 1px solid var(--danger);
  border-radius: 10px; padding: .6rem .85rem; margin-bottom: 1rem; }
.form-errors p { margin: .15rem 0; color: var(--danger); }

/* toggle "atende neste dia" */
.switch { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; margin: .2rem 0 1rem; font-weight: 600; }
.switch input { appearance: none; -webkit-appearance: none; width: 46px; height: 26px; min-height: 0;
  background: var(--border); border-radius: 999px; position: relative; cursor: pointer; transition: .2s; flex: none; padding: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(20px); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 11px; padding: .75rem 1.2rem; font-size: .98rem; font-weight: 600;
  cursor: pointer; min-height: 46px; }
.btn:hover { border-color: var(--primary); text-decoration: none; }
.btn.primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); font-weight: 700; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.ghost { background: transparent; }
.btn.full, .day-form .btn, form > .btn { width: 100%; }
@media (min-width: 620px) { form > .btn, .day-form .btn { width: auto; } }

.chip-btn { background: var(--surface-3); color: var(--text); border: 1px solid var(--border);
  border-radius: 999px; padding: .4rem .85rem; font-size: .85rem; cursor: pointer; }
.chip-btn:hover { border-color: var(--primary); }
.btn-link { background: none; border: none; color: var(--primary); cursor: pointer; padding: 0; font: inherit; }
.btn-link.danger { color: var(--danger); }

/* ---------- Messages ---------- */
.messages { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.msg { padding: .75rem 1rem; border-radius: 11px; margin-bottom: .5rem; border: 1px solid var(--border); }
.msg.success { background: var(--green-soft); border-color: var(--green); }
.msg.error { background: rgba(229,72,77,.15); border-color: var(--danger); }
.msg.info { background: var(--surface-2); }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .7rem .55rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.table .actions { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.table .actions form { display: inline; }
.row-inactive { opacity: .55; }
.badge-status { font-size: .72rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; white-space: nowrap; }
.badge-status.on { color: var(--green); background: var(--green-soft); }
.badge-status.off { color: var(--muted); background: var(--surface-3); }

/* ---------- Hero (home cliente) ---------- */
.hero h1 { font-size: 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }

/* ---------- Lista de barbeiros (agendar) ---------- */
.barber-grid { display: grid; grid-template-columns: 1fr; gap: .8rem; }
@media (min-width: 620px) { .barber-grid { grid-template-columns: 1fr 1fr; } }
.barber-card { display: flex; align-items: center; gap: .9rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px; padding: 1rem; color: var(--text); box-shadow: var(--shadow); }
.barber-card:hover { border-color: var(--primary); text-decoration: none; }
.barber-avatar { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary); color: var(--on-primary); font-weight: 800; font-size: 1.2rem; flex: none; }
.barber-info { display: flex; flex-direction: column; gap: .1rem; flex: 1; }
.barber-info .avail { color: var(--green); }
.barber-go { color: var(--muted); font-size: 1.6rem; }

/* ---------- Agendar: hero do barbeiro ---------- */
.book-hero { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.barber-avatar.lg { width: 64px; height: 64px; font-size: 1.6rem; }
.book-hero h1 { margin: 0; }

/* ---------- Seleção de serviço (cards) ---------- */
.svc-grid { display: grid; grid-template-columns: 1fr; gap: .6rem; }
@media (min-width: 520px) { .svc-grid { grid-template-columns: 1fr 1fr; } }
.svc-card { position: relative; display: flex; align-items: center; justify-content: space-between;
  gap: .6rem; background: var(--surface-2); border: 1.5px solid var(--border);
  border-radius: 12px; padding: .8rem .9rem; cursor: pointer; transition: .12s; }
.svc-card input { position: absolute; opacity: 0; pointer-events: none; }
.svc-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.svc-card-name { font-weight: 700; }
.svc-card-meta { color: var(--muted); font-size: .82rem; }
.svc-sub { color: var(--green); }
.svc-card-price { font-weight: 800; color: var(--primary); flex: none; }
.svc-card:hover { border-color: var(--primary); }
.svc-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px var(--primary-soft); }

/* ---------- Assinaturas / planos ---------- */
.sub-active { border-color: var(--green); }
.sub-active h2 { color: var(--green); }
.bal-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.bal-chip { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px;
  padding: .35rem .7rem; font-size: .85rem; color: var(--muted); }
.bal-chip.has { color: var(--text); border-color: var(--green); }
.bal-chip strong { color: var(--green); }

.plan-cards { display: grid; grid-template-columns: 1fr; gap: .7rem; }
@media (min-width: 620px) { .plan-cards { grid-template-columns: 1fr 1fr; } }
.plan-card { display: flex; flex-direction: column; gap: .6rem; justify-content: space-between;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1rem; }
.plan-card-foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.plan-price { font-weight: 800; color: var(--primary); font-size: 1.05rem; }

.use-sub-row { display: flex; align-items: flex-start; gap: .55rem; margin: 0 0 1rem;
  background: var(--green-soft); border: 1px solid var(--green); border-radius: 11px;
  padding: .7rem .85rem; cursor: pointer; font-size: .92rem; position: relative; }

/* lista de planos (barbeiro) */
.plan-list, .plan-items { display: flex; flex-direction: column; gap: .55rem; }
.plan-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: .8rem 1rem; }
.plan-resumo { font-size: .85rem; margin: .15rem 0; }
.plan-row .plan-price { font-size: .95rem; }
.plan-item { display: flex; align-items: center; justify-content: space-between;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: .55rem .8rem; }
.plan-item form { margin: 0; }
.add-item-form { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 1rem; }

/* saldo (minhas assinaturas) */
.bal-list { display: flex; flex-direction: column; gap: .4rem; margin-top: .6rem; }
.bal-row { display: flex; align-items: center; justify-content: space-between;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: .55rem .85rem; }
.bal-count { font-weight: 800; color: var(--green); }

/* ---------- Aviso / lembrete ---------- */
.notice { background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--primary);
  border-radius: 8px; padding: .8rem 1rem; margin-bottom: 1.25rem; font-size: .9rem; }
.notice ul { margin: .5rem 0 0; padding-left: 1.1rem; color: var(--muted); }
.notice li { margin: .2rem 0; }
.notice strong { color: var(--text); }
.cancel-hint { font-size: .82rem; margin: 0 0 1rem; }
.cancel-note { font-size: .82rem; }
.tag-sub { color: var(--green); font-weight: 700; }

/* Dica de ajuda (?) — mostra no hover ou clique */
.help-tip { display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; background: var(--surface-3);
  color: var(--muted); font-size: .72rem; font-weight: 700; cursor: help;
  position: relative; margin-left: .35rem; border: 1px solid var(--border); vertical-align: middle; }
.help-tip:hover { border-color: var(--primary); color: var(--primary); }
.help-tip::after { content: attr(data-tip); position: absolute; bottom: 135%; left: 50%;
  transform: translateX(-50%); width: 220px; max-width: 60vw; background: var(--surface);
  color: var(--text); border: 1px solid var(--border); border-radius: 9px; padding: .6rem .75rem;
  font-size: .78rem; font-weight: 400; line-height: 1.45; text-align: left; white-space: normal;
  box-shadow: var(--shadow); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .12s; }
.help-tip:hover::after, .help-tip:focus::after, .help-tip.show::after { opacity: 1; }

/* ---------- Relatórios ---------- */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .8rem; margin-bottom: 1.25rem; }
.metric { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: .9rem 1rem; display: flex; flex-direction: column; gap: .2rem; }
.metric-label { color: var(--muted); font-size: .8rem; }
.metric-val { font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.metric-val.sm { font-size: 1.1rem; }
.metric-sub { color: var(--muted); font-size: .8rem; }
.rep-row { display: grid; grid-template-columns: 5.5rem 1fr auto; align-items: center;
  gap: .6rem; margin: .4rem 0; font-size: .86rem; }
.rep-label { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rep-bar { background: var(--surface-3); border-radius: 6px; height: 14px; overflow: hidden; }
.rep-fill { display: block; height: 100%; background: var(--primary); border-radius: 6px; min-width: 2px; }
.rep-val { color: var(--muted); white-space: nowrap; font-size: .8rem; }
.chip-btn.active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.rep-filter-card { display: flex; flex-direction: column; gap: 1rem; }
.rep-presets { display: flex; flex-wrap: wrap; gap: .5rem; }
.rep-range { display: flex; flex-direction: column; gap: .55rem; padding-top: 1rem;
  border-top: 1px dashed var(--border); }
.rep-range-title { font-size: .82rem; color: var(--muted); text-transform: uppercase;
  letter-spacing: .05em; font-weight: 600; }
.rep-range-fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; }
.field-inline { display: flex; flex-direction: column; gap: .3rem; min-width: 160px; }
.field-inline > span { font-size: .85rem; color: var(--muted); }
.field-inline input[type=date] { min-height: 42px; padding: .55rem .7rem;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-size: .95rem; color-scheme: light; }
.field-inline input[type=date]:focus { outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft); }

/* Planos (tier) da barbearia no painel da plataforma */
.tier-list { display: grid; grid-template-columns: 1fr; gap: .55rem; margin-bottom: 1rem; }
@media (min-width: 520px) { .tier-list { grid-template-columns: 1fr 1fr; } }
.tier-opt { position: relative; display: flex; justify-content: space-between; align-items: center;
  background: var(--surface-2); border: 1.5px solid var(--border); border-radius: 11px;
  padding: .75rem .9rem; cursor: pointer; }
.tier-opt input { position: absolute; opacity: 0; }
.tier-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.tier-name { font-weight: 600; }
.tier-price { color: var(--primary); font-weight: 800; }

/* Item travado na sidebar (feature premium indisponível) */
.side-locked {
  display: block; padding: .65rem .75rem; color: var(--muted); font-style: italic;
  font-size: .88rem; border-radius: 9px; cursor: not-allowed;
}

/* ---------- Header público (sem sidebar) ---------- */
.public-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; flex-wrap: wrap;
  padding: 1rem 1.5rem; background: rgba(255,246,236,0.92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.public-nav { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.public-nav a { color: var(--text); font-weight: 500; }
.public-nav a:hover { text-decoration: none; color: var(--primary); }
.public-nav .btn.primary { padding: .55rem 1rem; }
.public-footer { text-align: center; padding: 2rem 1rem; border-top: 1px solid var(--border); margin-top: 3rem; }
.public-footer p { margin: 0; font-size: .88rem; }
.public-footer a { color: var(--muted); }

@media (max-width: 560px) {
  .public-header { padding: .8rem 1rem; }
  .public-nav {
    flex-direction: column; align-items: stretch; width: 100%;
    gap: .35rem; font-size: .92rem; margin-top: .5rem;
  }
  .public-nav a:not(.btn) { text-align: center; padding: .35rem 0; }
  .public-nav .btn.primary { padding: .6rem .85rem; font-size: .95rem; margin-top: .15rem; }
}

/* Footer do app logado */
.app-footer { text-align: center; padding: 2rem 0 1rem; margin-top: 2rem;
  border-top: 1px solid var(--border); font-size: .82rem; }
.app-footer a { color: var(--muted); margin: 0 .35rem; }

/* Aceite dos Termos / checkboxes inline */
.field-check { display: flex; align-items: flex-start; gap: .55rem; margin: .6rem 0 1rem;
  font-size: .9rem; cursor: pointer; position: relative; }
.field-check.has-error span { color: var(--danger); }
.field-check a { text-decoration: underline; }

/* Checkbox customizado — usado em .field-check, .recur-row e .use-sub-row
   (os únicos lugares do app com checkbox "de verdade" visível; os demais —
   .switch, .slot, .cbslot, .mini-cell — já têm visual próprio totalmente
   customizado e não usam esta regra). O <input> fica visualmente escondido
   (mesma técnica de .mini-cell) e o quadrado visível é um ::before do
   <label>, pintado via :has(input:checked) — appearance:none + :checked
   direto no input nativo não repinta o background neste navegador. */
.field-check input[type="checkbox"],
.recur-row input[type="checkbox"],
.use-sub-row input[type="checkbox"] {
  position: absolute; opacity: 0; pointer-events: none;
}
.field-check::before,
.recur-row::before,
.use-sub-row::before {
  content: ""; width: 20px; height: 20px; min-width: 20px; margin-top: .1rem;
  border: 2px solid var(--border); border-radius: 6px; background-color: var(--surface);
  display: flex; align-items: center; justify-content: center; flex: none;
  color: var(--on-primary); font-size: 13px; font-weight: 900; line-height: 1;
}
.field-check:hover::before,
.recur-row:hover::before,
.use-sub-row:hover::before {
  border-color: var(--primary);
}
.field-check:has(input:focus-visible)::before,
.recur-row:has(input:focus-visible)::before,
.use-sub-row:has(input:focus-visible)::before {
  outline: 2px solid var(--primary); outline-offset: 2px;
}
.field-check:has(input:checked)::before,
.recur-row:has(input:checked)::before,
.use-sub-row:has(input:checked)::before {
  background-color: var(--primary); border-color: var(--primary); content: "\2713";
}
.use-sub-row:has(input:checked)::before {
  background-color: var(--green); border-color: var(--green);
}

/* Páginas legais (Termos / Privacidade) */
.legal { max-width: 760px; margin: 1.5rem auto; line-height: 1.7; }
.legal h1 { margin-bottom: .4rem; }
.legal h2 { margin-top: 1.8rem; font-size: 1.15rem; color: var(--primary); }
.legal ul { padding-left: 1.3rem; }
.legal li { margin: .25rem 0; }
.legal p { margin: .6rem 0; color: var(--text); }

/* Link clicável para o site da barbearia (tenant) */
.tenant-link { color: var(--primary); font-weight: 600; text-decoration: none; }
.tenant-link:hover { text-decoration: underline; }
.tenant-link code {
  background: var(--surface-2); padding: .15rem .45rem; border-radius: 6px;
  color: var(--primary); font-size: .9em;
}
.tenant-link.big { font-size: 1.05rem; display: inline-block; margin-top: .25rem; }
.tenant-link.big code { padding: .35rem .65rem; font-size: 1rem; }

.site-link-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.site-link-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.mp-pay-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }

/* Tag "Você está em..." em landings e cadastros contextuais */
.tenant-eyebrow {
  color: var(--primary); font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; font-size: .78rem; margin-bottom: .35rem;
}

/* ---------- Landing pública ---------- */
.hero { text-align: center; padding: 3rem 1rem 2rem; }
.hero-eyebrow {
  display: inline-block; font-family: 'Fredoka', sans-serif; font-weight: 600;
  font-size: 1.15rem; color: var(--primary); background: var(--primary-soft, #FFE9DD);
  padding: .4rem 1rem; border-radius: 999px; margin: 0 0 1rem;
}
.hero h1 { font-size: 2.4rem; letter-spacing: -0.02em; margin-bottom: 1rem; }
.hero-sub { font-size: 1.1rem; color: var(--muted); max-width: 640px; margin: 0 auto 1.6rem; line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }
.btn.lg { padding: .9rem 1.6rem; font-size: 1.02rem; }
.hero-tip {
  display: inline-flex; align-items: center; gap: .4rem; margin: 1.4rem auto 0;
  background: var(--green-soft); color: var(--text); border: 1px solid var(--green);
  border-radius: 999px; padding: .5rem 1.1rem; font-size: .85rem; font-weight: 500;
  max-width: 90%;
}

.features { padding: 1rem 0 2.5rem; }
.section-title { text-align: center; font-size: 1.5rem; margin-bottom: 1.4rem; }
.feat-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 620px) { .feat-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .feat-grid { grid-template-columns: repeat(3, 1fr); } }
.feat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.3rem; }
.feat-ico { font-size: 2rem; margin-bottom: .5rem; }
.feat h3 { margin: 0 0 .3rem; font-size: 1.1rem; }
.feat p { color: var(--muted); margin: 0; font-size: .92rem; line-height: 1.55; }

.cta-bottom { text-align: center; padding: 2rem 1rem 3rem; border-top: 1px solid var(--border); margin-top: 2rem; }
.cta-bottom h2 { font-size: 1.6rem; margin-bottom: .4rem; }
.cta-bottom p { margin-bottom: 1.2rem; }

/* ---------- Como usar ---------- */
.howto-group { margin: 2.5rem 0; }
.howto-group h2 { font-size: 1.4rem; margin-bottom: .3rem; }
.howto-group > .muted { margin-bottom: 1.4rem; }
.howto-step {
  display: grid; grid-template-columns: 1fr; gap: 1.4rem;
  align-items: center; padding: 1.6rem 0; border-top: 1px solid var(--border);
}
.howto-step:first-of-type { border-top: none; }
@media (min-width: 800px) {
  .howto-step { grid-template-columns: 1fr 1.15fr; gap: 2.2rem; }
  .howto-step.reverse .howto-copy { order: 2; }
  .howto-step.reverse .mock-window { order: 1; }
}
.howto-copy .step-n {
  background: var(--primary); color: var(--on-primary); font-weight: 800;
}
.howto-copy h3 { font-size: 1.25rem; margin: .6rem 0 .5rem; }
.howto-copy p { color: var(--muted); line-height: 1.6; margin: 0; }

.mock-window {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow); overflow: hidden;
}
.mock-bar {
  display: flex; gap: .3rem; padding: .6rem .7rem; background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.mock-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.mock-body { padding: 1rem 1.1rem; font-size: .85rem; }
.mock-body .card { margin-bottom: .7rem; padding: .8rem 1rem; box-shadow: none; }
.mock-body .card:last-child { margin-bottom: 0; }
.mock-row { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.mock-row + .mock-row { margin-top: .5rem; }
.mock-title { font-weight: 700; margin: 0 0 .5rem; }
.mock-slot {
  display: flex; justify-content: space-between; align-items: center;
  padding: .5rem .7rem; border: 1px solid var(--border); border-radius: 9px; margin-bottom: .4rem;
  background: var(--surface-2);
}
.mock-slot:last-child { margin-bottom: 0; }
.mock-slot.taken { opacity: .55; }
.mock-slot.picked { border-color: var(--primary); background: var(--primary-soft); }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 620px) { .pricing-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .pricing-grid { grid-template-columns: repeat(4, 1fr); } }
.pricing-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 1.4rem; display: flex; flex-direction: column; gap: .8rem;
}
.pricing-card h3 { margin: 0; font-size: 1.05rem; }
.pricing-free { border-color: var(--muted); }
.pricing-price strong { font-size: 1.8rem; color: var(--primary); }
.pricing-price small { color: var(--muted); }
.pricing-limit { color: var(--muted); font-size: .85rem; }
.pricing-feats { list-style: none; padding: 0; margin: .5rem 0; font-size: .87rem; flex: 1; }
.pricing-feats li { padding: .25rem 0; }
.pricing-feats li.muted { color: var(--muted); }
.pricing-card .btn { width: 100%; margin-top: auto; }
.svc-combo { font-size: .78rem; color: var(--primary); margin-top: .15rem; }

/* ---------- Confirmar assinatura / renovação ---------- */
.sub-detail { display: flex; gap: 2rem; flex-wrap: wrap; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.sub-detail > div { display: flex; flex-direction: column; gap: .15rem; }
.pay-methods { display: flex; flex-wrap: wrap; gap: .6rem; margin: .3rem 0 1rem; }
.pay-opt { position: relative; border: 1.5px solid var(--border); border-radius: 11px; padding: .65rem 1.2rem; cursor: pointer; font-weight: 600; }
.pay-opt input { position: absolute; opacity: 0; }
.pay-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.sub-meta { display: flex; flex-wrap: wrap; gap: .4rem; font-size: .85rem; margin-bottom: .5rem; align-items: center; }
.sub-actions { display: flex; gap: 1rem; align-items: center; }
.payment-method-form { display: inline-block; }
.payment-method-form select {
  font-size: .85rem; padding: .15rem .4rem; border-radius: 7px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}

/* ---------- Cashback / saldo ---------- */
.cbslot { display: flex; flex-direction: column; align-items: center; gap: .1rem;
  background: var(--surface-2); border: 1.5px solid var(--border); border-radius: 11px;
  padding: .6rem .3rem; cursor: pointer; text-align: center; user-select: none; }
.cbslot input { display: none; }
.cbslot .slot-time { font-weight: 700; }
.cbslot small { color: var(--muted); font-size: .68rem; }
.cbslot.cb-on { border-color: var(--primary); background: var(--primary-soft); }
.cbslot.cb-on .slot-time, .cbslot.cb-on small { color: var(--primary); }
.cb-tag { color: var(--primary); font-weight: 700; font-size: .72rem; margin-left: .3rem; }
.btn-link.ok { color: var(--green); font-weight: 700; }
.balance-banner { background: var(--green-soft); border: 1px solid var(--green); border-radius: 11px;
  padding: .7rem 1rem; margin-bottom: 1.25rem; font-size: .92rem; }
.balance-banner strong { color: var(--green); }

/* destaque de cashback: horários (agendar) */
.time-pill { flex-direction: column; gap: 1px; }
.time-pill.has-cashback { border-color: var(--primary); background: var(--primary-soft); }
.time-pill.has-cashback:has(input:checked) { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.tp-cb { display: block; font-size: .6rem; font-weight: 700; color: var(--primary); }
.time-pill.has-cashback:has(input:checked) .tp-cb { color: var(--on-primary); }
/* horário ocupado (entrar na fila) */
button.time-pill { font: inherit; color: var(--text); }
.time-pill.taken { background: var(--surface); border-style: dashed; color: var(--muted); }
.time-pill.taken:hover { border-color: var(--primary); color: var(--text); }
.time-pill.taken.disabled { opacity: .55; cursor: not-allowed; }
.time-pill.taken.disabled:hover { border-color: var(--border); color: var(--muted); }
.tp-fila { display: block; font-size: .6rem; font-weight: 700; color: var(--muted); }
/* destaque de cashback: seletor de datas */
.date-pill { position: relative; }
.date-pill.has-cashback { border-color: var(--primary); }
.dp-cb { position: absolute; top: 2px; right: 3px; font-size: .6rem; line-height: 1; }
/* destaque de cashback: calendário do painel */
.cal-cell.has-cashback { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.cal-cb { font-size: .72rem; }

/* extrato / carteira */
.balance-big { font-size: 2rem; font-weight: 800; color: var(--green); }
.txn-list { display: flex; flex-direction: column; gap: .5rem; }
.txn { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: .7rem 1rem; }
.txn-info small { display: block; }
.txn-amount { font-weight: 800; white-space: nowrap; }
.txn-amount.pos { color: var(--green); }
.txn-amount.neg { color: var(--danger); }

/* Pix copia e cola */
.pix-box { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--border); }
.pix-box strong { color: var(--green); }
.pix-code { width: 100%; min-height: 70px; margin: .6rem 0; resize: vertical;
  font-family: var(--font-mono, monospace); font-size: .78rem; word-break: break-all;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); padding: .6rem .7rem; }
.pix-qr { text-align: center; margin: .6rem 0; }
.pix-qr img { width: 220px; max-width: 100%; background: #fff; padding: 8px; border-radius: 10px; }

/* ---------- Trilho de datas ---------- */
.date-rail { display: flex; gap: .5rem; overflow-x: auto; padding: .2rem .1rem .7rem;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.date-pill { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: .12rem;
  width: 58px; padding: .55rem 0; background: var(--surface-2); border: 1.5px solid var(--border);
  border-radius: 12px; cursor: pointer; color: var(--text); }
.date-pill:hover { border-color: var(--primary); }
.date-pill.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.dp-wd { font-size: .66rem; text-transform: uppercase; opacity: .85; }
.dp-day { font-size: 1.25rem; font-weight: 800; line-height: 1.05; }
.dp-mon { font-size: .66rem; text-transform: uppercase; opacity: .85; }
.inline-step { margin-top: 1.1rem; }

/* ---------- Grade de horários (agendar) ---------- */
.time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: .5rem; }
.time-pill { position: relative; display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1.5px solid var(--border); border-radius: 10px;
  padding: .7rem .3rem; cursor: pointer; font-weight: 700; transition: .12s; }
.time-pill input { position: absolute; opacity: 0; pointer-events: none; }
.time-pill:hover { border-color: var(--primary); }
.time-pill:has(input:checked) { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

/* ---------- Barra fixa de confirmação ---------- */
.book-bar { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center;
  justify-content: space-between; gap: 1rem; margin: 1.25rem -1rem -3rem; padding: .85rem 1rem;
  background: rgba(255,246,236,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--border); }
.book-summary { font-size: .92rem; line-height: 1.25; }
.book-bar .btn { flex: 0 0 auto; }
@media (max-width: 480px) { .book-bar .btn { padding: .7rem .85rem; } .book-summary { font-size: .82rem; } }

/* ---------- Lista de agendamentos ---------- */
.appt-list { display: flex; flex-direction: column; gap: .6rem; }
.appt { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 11px; padding: .8rem 1rem; }
.appt.past { opacity: .7; }
.appt-when { min-width: 130px; }
.appt-info { flex: 1; }
.appt form { margin-left: auto; }
@media (max-width: 560px) { .table { display: block; overflow-x: auto; white-space: nowrap; } }

/* ---------- Calendário ---------- */
.calendar-card { padding: 1rem; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.cal-title { font-size: 1.15rem; }
.cal-title strong { text-transform: capitalize; }
.cal-today { font-size: .72rem; margin-left: .5rem; background: var(--primary-soft); color: var(--primary);
  padding: .15rem .5rem; border-radius: 999px; }
.cal-nav { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text); font-size: 1.4rem; line-height: 1; }
.cal-nav:hover { border-color: var(--primary); text-decoration: none; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-weekdays { margin-bottom: 5px; }
.cal-wd { text-align: center; color: var(--muted); font-size: .72rem; font-weight: 600; padding: .2rem 0; }
.cal-grid + .cal-grid { margin-top: 5px; }

.cal-cell { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
  min-height: 52px; padding: .35rem; border-radius: 10px; background: var(--surface-2);
  border: 1px solid transparent; color: var(--text); overflow: hidden; }
.cal-cell:hover { text-decoration: none; border-color: var(--primary); }
.cal-cell.out { opacity: .38; }
.cal-cell.working { background: var(--green-soft); }
.cal-cell.closed { background: var(--surface); }
.cal-cell.today { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.cal-num { font-size: .9rem; font-weight: 700; }
.cal-tag { margin-top: auto; font-size: .62rem; font-weight: 700; color: var(--green);
  background: rgba(34,184,166,.18); padding: .05rem .35rem; border-radius: 6px; }
.cal-tag.off { color: var(--muted); background: transparent; padding: 0; font-weight: 500; }

.cal-legend { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; margin-top: .9rem;
  font-size: .78rem; color: var(--muted); }
.cal-legend i.lg { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: .3rem; vertical-align: -1px; }
.lg.working { background: var(--green); }
.lg.closed { background: var(--surface-3); }
.lg.today { background: transparent; border: 2px solid var(--primary); }

@media (min-width: 620px) {
  .cal-cell { min-height: 76px; padding: .5rem; }
  .cal-num { font-size: 1rem; }
  .cal-tag { font-size: .7rem; }
}

/* ---------- Resumo da semana ---------- */
.week-list { display: flex; flex-direction: column; gap: .5rem; }
.week-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: .8rem 1rem; color: var(--text); }
.week-row:hover { border-color: var(--primary); text-decoration: none; }
.week-row.on { border-left: 3px solid var(--green); }
.week-row.off { border-left: 3px solid var(--muted); }
.week-day { font-weight: 600; }
.week-info { font-size: .88rem; }

/* ---------- Grade de horários ---------- */
.slot-toolbar { display: flex; gap: .6rem; margin-bottom: .9rem; flex-wrap: wrap; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: .55rem; margin-bottom: 1.2rem; }
.slot { display: flex; flex-direction: column; align-items: center; gap: .1rem;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px;
  padding: .6rem .3rem; cursor: pointer; text-align: center; user-select: none; transition: .12s; }
.slot:hover { border-color: var(--primary); }
.slot input { display: none; }
.slot-time { font-weight: 700; font-size: 1rem; }
.slot small { color: var(--muted); font-size: .68rem; }
.slot.active { border-color: var(--green); background: var(--green-soft); }
.slot.active .slot-time { color: var(--green); }

/* ---------- Replicar ---------- */
.copy-days { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1rem; }
.chk { display: inline-flex; align-items: center; gap: .45rem; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 999px; padding: .5rem .85rem; cursor: pointer; font-size: .9rem; }
.chk input { width: 18px; height: 18px; min-height: 0; accent-color: var(--primary); }
.chk:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }

/* ---------- Day form ---------- */
.day-fields { display: grid; grid-template-columns: 1fr; gap: .8rem; }
@media (min-width: 520px) { .day-fields { grid-template-columns: repeat(3, 1fr); } }
.day-form .field { margin-bottom: 0; }

/* ---------- Pausa ---------- */
.break-box { background: var(--surface-2); border: 1px dashed var(--border);
  border-radius: 12px; padding: .85rem; margin: 1rem 0; }
.break-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  font-weight: 600; font-size: .92rem; margin-bottom: .7rem; }
.break-head em { color: var(--muted); font-style: normal; font-weight: 400; font-size: .82rem; }
.break-row { display: flex; align-items: center; gap: .5rem; margin-bottom: .55rem; }
.break-row input[type=time] { flex: 1; min-width: 0; }
.break-sep { color: var(--muted); font-size: .85rem; flex: none; }
.break-rm { background: var(--surface-3); border: 1px solid var(--border); color: var(--muted);
  width: 40px; height: 46px; border-radius: 9px; cursor: pointer; flex: none; font-size: .9rem; }
.break-rm:hover { color: var(--danger); border-color: var(--danger); }
.add-break { display: inline-block; margin: .2rem 0 .6rem; }

/* ---------- Mini-calendários (replicar) ---------- */
.picker-nav { display: flex; align-items: center; justify-content: center; gap: 1.2rem; margin-bottom: .7rem; }
.picker-nav strong { min-width: 9rem; text-align: center; text-transform: capitalize; }
#picker-months .mini-cal { max-width: 480px; margin: 0 auto 1rem; }
.mini-cal { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; }
.mini-title { text-align: center; font-weight: 700; margin-bottom: .5rem; text-transform: capitalize; }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.mini-grid + .mini-grid { margin-top: 5px; }
.mini-wd { margin-bottom: 5px; }
.mini-wd span { text-align: center; color: var(--muted); font-size: .72rem; font-weight: 600; }
.mini-cell { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1;
  border-radius: 8px; font-size: .95rem; color: var(--text); position: relative; }
.mini-cell.empty { color: transparent; }
.mini-cell.source { background: var(--primary); color: var(--on-primary); font-weight: 800; }
.mini-cell.selectable { cursor: pointer; background: var(--surface-3); border: 1px solid transparent; }
.mini-cell.selectable:hover { border-color: var(--primary); }
.mini-cell.selectable.has { box-shadow: inset 0 0 0 1px var(--green); }
.mini-cell input { position: absolute; opacity: 0; pointer-events: none; }
.mini-cell.selectable:has(input:checked) { background: var(--primary); color: var(--on-primary); font-weight: 800; }
.mini-legend { display: flex; gap: 1rem; align-items: center; font-size: .8rem; margin: 0 0 1rem; }
.mini-legend i.lg { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: .3rem; vertical-align: -1px; }
.lg.has { background: transparent; box-shadow: inset 0 0 0 2px var(--green); }
.lg.src { background: var(--primary); }
.break-note { display: inline-block; background: var(--primary-soft); color: var(--primary);
  border-radius: 8px; padding: .35rem .7rem; font-size: .85rem; font-weight: 600; margin: 0 0 .9rem; }

/* ---------- Recorrência (repetir no dia da semana) ---------- */
.recur-row { display: flex; align-items: flex-start; gap: .55rem; margin: .2rem 0 1.1rem;
  font-size: .92rem; cursor: pointer; color: var(--text); position: relative; }
.recur-row strong { color: var(--primary); }
.fill-box { margin-top: 1.2rem; padding-top: 1.1rem; border-top: 1px dashed var(--border); }
.fill-box > strong { color: var(--primary); }
