/* Letra própria (alojada na aplicação, sem serviços externos). Hanken Grotesk, SIL OFL 1.1 — ver /fonts/OFL.txt */
@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/hanken-grotesk-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/hanken-grotesk-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF;
}

/* Letra de títulos e horas: Bricolage Grotesque, SIL OFL 1.1 — ver /fonts/OFL-bricolage.txt */
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(/fonts/bricolage-grotesque-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(/fonts/bricolage-grotesque-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF;
}

/*
 * Tema: todos os valores partilhados vivem aqui. --brand é substituída pela cor de cada negócio.
 * Larguras onde o layout muda (não podem ser variáveis em @media): 560px, 720px, 1024px.
 */
:root {
  /* cor */
  --bg: #F3F4F2;
  --surface: #FFFFFF;
  --ink: #16181B;
  --on-ink: #FFFFFF;
  --muted: #6B7078;
  --line: #E4E5E1;
  --line-strong: #C9CBC5;
  --brand: #6B2E5A;
  --brand-ink: #FFFFFF;
  --brand-soft: color-mix(in srgb, var(--brand) 9%, var(--surface));
  --ok: #2E6B4F;
  --ok-soft: color-mix(in srgb, var(--ok) 10%, var(--surface));
  --warn: #8A5300;
  --warn-soft: #FFF3DC;
  --warn-line: #F0D39A;
  --danger: #A3302B;
  --danger-soft: color-mix(in srgb, var(--danger) 7%, var(--surface));
  --danger-line: color-mix(in srgb, var(--danger) 30%, var(--surface));
  /* espaçamento, base 4 */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;
  /* letra: tamanhos */
  --t-xs: .78rem; --t-s: .875rem; --t-m: 1rem; --t-l: 1.125rem; --t-xl: 1.375rem; --t-2xl: 1.75rem;
  --t-display: clamp(2.25rem, 8vw, 3.5rem);
  /* cantos e sombras */
  --radius-s: 8px; --radius-m: 12px; --radius-l: 20px; --radius-pill: 999px;
  --shadow-1: 0 1px 2px rgb(22 24 27 / .04), 0 4px 14px rgb(22 24 27 / .04);
  --shadow-2: 0 -6px 24px rgb(22 24 27 / .08);
  --shadow-3: 0 24px 64px rgb(22 24 27 / .28);
  --shadow-knob: 0 1px 2px rgb(22 24 27 / .25); /* botão do interruptor */
  --scrim: rgb(22 24 27 / .45);
  /* letras */
  --font: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Bricolage Grotesque", var(--font);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, var(--surface)); outline-offset: 2px; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: 0 1.15em; border-radius: var(--radius-m);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--ink); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { border-color: var(--brand); filter: brightness(1.08); }
.btn-danger { color: var(--danger); border-color: var(--danger-line); }
.btn-danger:hover { border-color: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); border-color: transparent; }
.btn-small { min-height: 36px; padding: 0 var(--s-3); font-size: var(--t-s); }
.btn-block { width: 100%; }

/* Formulários */
.field { display: grid; gap: var(--s-1); align-content: start; }
.field > span, .field > label { font-weight: 600; font-size: var(--t-s); }
.field small { color: var(--muted); font-size: var(--t-s); }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: var(--s-2) var(--s-3);
  border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface);
}
textarea.input { min-height: 88px; resize: vertical; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.check { display: flex; gap: var(--s-2); align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }

.alert { padding: var(--s-3) var(--s-4); border-radius: var(--radius-m); border: 1px solid; font-size: var(--t-m); }
.alert-error { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-line); }
.alert-ok { color: var(--ok); background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, var(--surface)); }
.alert-warn { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }

/* ---------- Peças partilhadas pelas marcações e pela gestão ---------- */

/* Hora e números (.num): a peça marcante. Horas grandes na letra de títulos, minutos mais pequenos. */
.time, .num { font-family: var(--font-display); font-variant-numeric: tabular-nums; font-weight: 650; letter-spacing: -0.02em; }
.time { white-space: nowrap; }
.time-m { font-size: .72em; font-weight: 550; opacity: .72; margin-left: 1px; }

/* Cartão: a superfície única (lista de serviços, painéis, ficha, confirmação) */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow-1); }
.card-pad { padding: var(--s-6); }
@media (max-width: 560px) { .card-pad { padding: var(--s-5); } }

/* Chip (filtros, seleção de opções) */
.chip {
  display: inline-flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3);
  border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface);
  font-size: var(--t-s); cursor: pointer; color: var(--ink);
}
.chip input { accent-color: var(--brand); margin: 0; }
.chip:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

/* Etiqueta de estado (marcações) */
.badge {
  display: inline-block; padding: 2px var(--s-2); border-radius: var(--radius-pill);
  font-size: var(--t-xs); font-weight: 650; background: var(--bg); color: var(--muted); white-space: nowrap;
}
.badge.s-pending { background: var(--warn-soft); color: var(--warn); }
.badge.s-confirmed { background: var(--brand-soft); color: var(--brand); }
.badge.s-completed { background: var(--ok-soft); color: var(--ok); }
.badge.s-no_show, .badge.s-cancelled { background: var(--danger-soft); color: var(--danger); }

/* Bloco da marca: a cor e o logótipo do negócio (topo das marcações, login, instalação e gestão) */
.brand-band { background: var(--brand); color: var(--brand-ink); position: relative; overflow: hidden; }
.brand-band::after { /* brilho subtil para dar profundidade à cor lisa */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--brand-ink) 14%, transparent), transparent 60%);
}
.brand-band > * { position: relative; z-index: 1; }
.brand-band :focus-visible { outline-color: currentColor; }
.brand-logo img {
  max-height: 56px; width: auto; border-radius: var(--radius-s); background: var(--surface); padding: var(--s-1);
}
.brand-name { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; text-wrap: balance; }

/* Conteúdo do bloco da marca (marcações, página da marcação, login e instalação) */
.biz-inner { max-width: 680px; margin: 0 auto; padding: var(--s-10) var(--s-4) var(--s-8); }
.biz-logo { margin-bottom: var(--s-5); }
.biz-name { font-size: var(--t-display); }
.biz-tagline { margin-top: var(--s-2); font-size: var(--t-l); opacity: .86; max-width: 46ch; }
.biz-address { margin-top: var(--s-4); font-size: var(--t-m); opacity: .8; }
.biz-actions { margin-top: var(--s-4); display: flex; flex-wrap: wrap; gap: var(--s-2); }
.biz-actions:empty { display: none; }
.biz-btn {
  display: inline-flex; align-items: center; gap: .45em; min-height: 40px; padding: 0 1em;
  border-radius: var(--radius-pill); font-weight: 600; font-size: var(--t-m); text-decoration: none; color: inherit;
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
}
.biz-btn:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.biz-btn svg { width: 16px; height: 16px; flex: none; }


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
