@font-face { font-family: 'DM Sans'; src: url(/fonts/dm-sans.woff2) format('woff2'); font-weight: 100 1000; font-display: swap; }
@font-face { font-family: 'DM Serif Display'; src: url(/fonts/dm-serif-display.woff2) format('woff2'); font-weight: 400; font-display: swap; }

/* Barbearia do Campus
   Mobile-first: tudo desenhado a partir de 360px e so depois respirando pra
   tablet e desktop. Azul-marinho e dourado da marca, superficies brancas com
   sombra bem leve, icone de traco e uma cor de destaque por vez.
   Guia completo em docs/DESIGN.md. */

:root {
  --navy: #0A1230;
  --navy-2: #17213F;
  --navy-3: #243058;
  --gold: #F0D090;           /* o dourado da logo */
 --gold-deep: #B78A4A;      /* o mesmo dourado, escurecido, pra texto e ícone em fundo claro */
  --gold-ink: #7A5A26;
  --gold-soft: #F5EDE0;
  --gold-line: rgba(183, 138, 74, .35);
  --bg: #F4F5F8;
  --surface: #FFFFFF;
  --surface-2: #F8F9FB;
  --ink: #141927;
  --success: #2F7658;
  --success-soft: rgba(47, 118, 88, .09);
  --danger: #A64045;
  --danger-soft: rgba(166, 64, 69, .08);

  --muted: #636A7A;
  --muted-2: #9AA0AC;
  --line: #E6E8ED;
  --line-strong: #D2D6DE;

  --shadow-sm: 0 1px 2px rgba(10, 18, 48, .05);
  --shadow: 0 1px 2px rgba(10, 18, 48, .04), 0 8px 24px -12px rgba(10, 18, 48, .14);
  --shadow-lg: 0 12px 40px -12px rgba(10, 18, 48, .28);

  --radius: 16px;
  --radius-sm: 12px;
  --tap: 46px;

  --sans: 'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --serif: 'DM Serif Display', 'Iowan Old Style', Georgia, 'Times New Roman', serif;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 66px;
  --ease: cubic-bezier(.22, .9, .3, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body { overflow-x: hidden; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.015em; }

.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.005em; }

/* Fora da tela, mas presente pra leitor de tela. */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: 16px; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 2px; }

/* ---------- estrutura ---------- */

.app {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--navy);
  color: #fff;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  border-bottom: 1px solid rgba(183, 138, 74, .18);
}

.topbar--light {
  background: var(--surface);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.topbar__title { font-size: 16px; font-weight: 600; letter-spacing: -0.005em; }
.topbar__sub { font-size: 12px; color: rgba(255, 255, 255, 0.62); margin-top: 1px; }
.topbar--light .topbar__sub { color: var(--muted); }
.topbar__spacer { margin-left: auto; }
.topbar .btn--ghost { border-color: rgba(255, 255, 255, .24); color: #fff; background: transparent; }

.main {
  flex: 1;
  padding: 18px 16px calc(var(--nav-h) + var(--safe-bottom) + 28px);
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
}

.main--flush { padding-left: 0; padding-right: 0; padding-top: 0; }

/* Titulo de tela: serifado, com uma linha de apoio embaixo. */
.page-head { margin: 4px 0 16px; }
.page-title { font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; }
.page-sub { font-size: 14px; color: var(--muted); margin: 6px 0 0; }

/* ---------- navegacao inferior ---------- */

.bottomnav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-top: 1px solid var(--line);
  padding: 4px 4px var(--safe-bottom);
}

.bottomnav a {
  min-height: var(--tap);
  padding: 6px 2px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  transition: color .15s ease;
}

.bottomnav svg {
  width: 54px; height: 30px;
  padding: 4px 16px;
  border-radius: 999px;
  stroke-width: 1.75;
  transition: background .18s ease, color .18s ease;
}
.bottomnav a.is-active { color: var(--navy); font-weight: 600; }
.bottomnav a.is-active svg { background: var(--gold-soft); color: var(--gold-ink); }

/* ---------- cartoes e listas ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.card + .card { margin-top: 12px; }
.card--flat { border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; }
.card--list { padding: 0 16px; }
.card--navy { background: var(--navy); color: #fff; border-color: var(--navy); }
.card--navy .muted { color: rgba(255, 255, 255, 0.62); }
.card--soft { background: var(--surface-2); box-shadow: none; }
.card--gold { background: var(--gold-soft); border-color: var(--gold-line); box-shadow: none; }

.stack > * + * { margin-top: 12px; }
.stack-sm > * + * { margin-top: 8px; }
.row { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.row--top { align-items: flex-start; }
.row--wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

.section-title {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
  margin: 26px 2px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.section-title svg { width: 15px; height: 15px; stroke-width: 1.8; color: var(--gold-deep); }

.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.tiny { font-size: 12px; }
.strong { font-weight: 600; }
.right { text-align: right; }
.center { text-align: center; }
.gold { color: var(--gold-deep); }
.ok { color: var(--success); }
.bad { color: var(--danger); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.price { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* Icone + texto pequeno em linha (duracao, endereco, horario). */
.meta { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); }
.meta svg { width: 14px; height: 14px; stroke-width: 1.9; flex: 0 0 auto; }
.metas { display: flex; flex-wrap: wrap; gap: 4px 12px; }

/* Tabela vira lista no celular: cada linha e um item tocavel. */
.list { border-top: 1px solid var(--line); }
.list__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
  min-height: var(--tap);
  width: 100%;
  background: none;
  border-left: 0; border-right: 0; border-top: 0;
  text-align: left;
  cursor: pointer;
}
.card--list .list { border-top: 0; }
.card--list .list__item:last-child { border-bottom: 0; }
.list__item:disabled { cursor: default; }
.list__time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 15px;
  min-width: 46px;
}
.list__chev { width: 18px; height: 18px; color: var(--muted-2); stroke-width: 1.8; flex: 0 0 auto; }

/* Pares rotulo / valor (resumo, revisao, detalhes). */
.kv { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv:first-child { padding-top: 0; }
.kv:last-child { border-bottom: 0; padding-bottom: 0; }
.kv__k { font-size: 13.5px; color: var(--muted); flex: 0 0 auto; }
.kv__v { font-weight: 600; text-align: right; min-width: 0; }
.kv--total .kv__v { font-size: 19px; font-variant-numeric: tabular-nums; }

/* Iniciais em circulo (cliente sem foto). */
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy-2); color: var(--gold);
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 15px;
  flex: 0 0 auto;
}
.avatar--sm { width: 32px; height: 32px; font-size: 13px; }

/* Quadrado de icone: o mesmo desenho dos servicos, reaproveitado em atalhos. */
.icon-tile {
  width: 44px; height: 44px; border-radius: 13px;
  background: var(--gold-soft); color: var(--gold-ink);
  display: grid; place-items: center; flex: 0 0 auto;
}
.icon-tile svg { width: 23px; height: 23px; stroke-width: 1.6; }
.icon-tile--navy { background: var(--navy); color: var(--gold); }
.icon-tile--sm { width: 36px; height: 36px; border-radius: 11px; }
.icon-tile--sm svg { width: 19px; height: 19px; }

/* ---------- servicos ---------- */

.svc-list { display: grid; gap: 10px; }

.svc {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s var(--ease);
}
.svc:active { transform: scale(.985); }
.svc--static { cursor: default; }
.svc--static:active { transform: none; }
.svc__icon {
  width: 54px; height: 54px; border-radius: 14px;
  background: #F4EDE1; color: #92703D;
  display: grid; place-items: center; flex: 0 0 auto;
  transition: background .15s ease, color .15s ease;
}
.svc__icon svg { width: 25px; height: 25px; stroke-width: 1.6; }
.ico-marca {
  display: block; width: 30px; height: 30px; background-color: currentColor;
  -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
}
.icon-tile .ico-marca { width: 26px; height: 26px; }
.icon-tile--sm .ico-marca { width: 22px; height: 22px; }
.svc__body { flex: 1; min-width: 0; }
.svc__name, .svc__desc { display: block; }
.svc__name { font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.svc__desc { font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.svc__foot { display: flex; align-items: center; gap: 12px; margin-top: 7px; }
.svc__price { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 15px; white-space: nowrap; }
.svc__side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; align-self: stretch; justify-content: center; }
.svc__check {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: grid; place-items: center;
  color: transparent; flex: 0 0 auto;
  transition: all .15s ease;
}
.svc__check svg { width: 15px; height: 15px; stroke-width: 2.6; }
.svc.is-selected { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy), var(--shadow); }
.svc.is-selected .svc__icon { background: var(--navy); color: var(--gold); }
.svc.is-selected .svc__check { background: var(--navy); border-color: var(--navy); color: #fff; }
.svc.is-off { opacity: .55; }

/* ---------- botoes ---------- */

.btn {
  min-height: var(--tap);
  padding: 0 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--navy);
  background: var(--navy);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-align: center;
  transition: opacity .15s ease, background .15s ease, transform .12s var(--ease), box-shadow .15s ease;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.btn--block { width: 100%; }
.btn--lg { min-height: 52px; font-size: 16px; border-radius: 14px; }
.btn--ghost { background: var(--surface); color: var(--navy); border-color: var(--line-strong); }
.btn--plain { background: transparent; color: var(--navy); border-color: transparent; }
.btn--gold { background: var(--gold); border-color: var(--gold); color: #1B1206; }
.btn--danger { background: var(--surface); color: var(--danger); border-color: rgba(166, 64, 69, .35); }
.btn--ok { background: var(--success); border-color: var(--success); }
.btn--wa { background: #1F7A4D; border-color: #1F7A4D; color: #fff; }
.btn--sm { min-height: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.btn--icon { padding: 0; width: var(--tap); }
.btn--sm.btn--icon { width: 38px; }
.btn svg { width: 18px; height: 18px; stroke-width: 1.8; flex: 0 0 auto; }

.btn-row { display: flex; gap: 8px; }
.btn-row > * { flex: 1; }
.btn-row > .btn--fit { flex: 0 0 auto; }

/* Barra de acao fixa no rodape, acima da navegacao. */
.sticky-action {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--nav-h) + var(--safe-bottom));
  padding: 22px 16px 10px;
  background: linear-gradient(to top, var(--bg) 78%, rgba(244, 245, 248, 0));
  z-index: 30;
}
.sticky-action .inner { max-width: 780px; margin: 0 auto; }
/* Espaco no fim da tela pra barra fixa nao cobrir o ultimo cartao. */
.main:has(.sticky-action) { padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 140px); }
.sticky-action__sum { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin: 0 2px 8px; }
.sticky-action__sum strong { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- chips ---------- */

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease;
}
.chip svg { width: 15px; height: 15px; stroke-width: 1.9; }
.chip.is-active { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.chip__count { font-size: 11px; opacity: .7; font-variant-numeric: tabular-nums; }

/* Abas em bloco (segmentado). */
.segmented { display: flex; background: #E9EBF0; border-radius: 12px; padding: 3px; gap: 3px; }
.segmented > * {
  flex: 1; min-height: 36px; border: 0; background: transparent; border-radius: 9px;
  font-size: 13.5px; font-weight: 500; color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.segmented > .is-active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.badge--ok { color: var(--success); border-color: rgba(47, 118, 88, .22); background: var(--success-soft); }
.badge--bad { color: var(--danger); border-color: rgba(166, 64, 69, .22); background: var(--danger-soft); }
.badge--gold { color: var(--gold-ink); border-color: var(--gold-line); background: var(--gold-soft); }
.badge--navy { color: #fff; background: var(--navy-2); border-color: var(--navy-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }

/* Pilula de status com bolinha (aberto agora / fechado). */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 500;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .86);
  border: 1px solid rgba(255, 255, 255, .12);
}
.pill svg { width: 14px; height: 14px; stroke-width: 1.9; }
.pill .dot { width: 8px; height: 8px; }
.pill--open .dot { background: #4CC38A; box-shadow: 0 0 0 3px rgba(76, 195, 138, .2); }
.pill--closed .dot { background: #E0A458; }

/* ---------- formularios ---------- */

.field { display: block; }
.field + .field { margin-top: 14px; }
.field__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.field__hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.field__error { font-size: 12.5px; color: var(--danger); margin-top: 5px; }

.input, .select, .textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--navy-3);
  box-shadow: 0 0 0 4px rgba(23, 33, 63, .08);
}
.textarea { min-height: 88px; resize: vertical; line-height: 1.45; }
.select { appearance: none; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23636A7A' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--tap); }
.switch input { width: 46px; height: 27px; appearance: none; background: var(--line-strong); border-radius: 999px; position: relative; cursor: pointer; transition: background .18s ease; flex: 0 0 auto; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; background: #fff; border-radius: 50%; transition: transform .18s ease; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.switch input:checked { background: var(--success); }
.switch input:checked::after { transform: translateX(19px); }

/* ---------- seletor de horario ---------- */

.slot-group + .slot-group { margin-top: 18px; }
.slot-group__title { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 2px 9px; }
.slot-group__title svg { width: 16px; height: 16px; stroke-width: 1.8; color: var(--gold-deep); }
.slot-group__title .chip__count { margin-left: auto; font-weight: 500; }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.slot {
  min-height: var(--tap);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .12s var(--ease);
}
.slot:active { transform: scale(.96); }
.slot.is-active { background: var(--navy); color: #fff; border-color: var(--navy); box-shadow: var(--shadow); }

.daystrip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px; scrollbar-width: none; scroll-snap-type: x proximity; }
.daystrip::-webkit-scrollbar { display: none; }
.day {
  flex: 0 0 auto;
  width: 64px;
  min-height: 80px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  padding: 8px 4px;
  scroll-snap-align: start;
  transition: background .15s ease, border-color .15s ease;
}
.day__wd { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 500; }
.day__n { font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.day__free { font-size: 10.5px; color: var(--success); font-weight: 500; }
.day.is-today .day__wd { color: var(--gold-ink); font-weight: 700; }
.day.is-active { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: var(--shadow); }
.day.is-active .day__wd, .day.is-active .day__free { color: rgba(255, 255, 255, .75); }
.day.is-off { opacity: .4; cursor: not-allowed; }
.day.is-off .day__free { color: var(--muted); }

/* ---------- stepper ---------- */

.steps { display: flex; gap: 5px; margin-bottom: 8px; }
.steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); transition: background .2s ease; }
.steps span.is-done { background: var(--gold-deep); }
.steps span.is-now { background: var(--navy); }
.steps__label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin: 0 0 16px; }
.steps__label strong { color: var(--ink); font-weight: 600; }

/* Botao de voltar discreto no topo do fluxo. */
.backlink { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 500; color: var(--muted); background: none; border: 0; padding: 6px 0; cursor: pointer; }
.backlink svg { width: 16px; height: 16px; stroke-width: 2; }

/* ---------- painel inferior (sheet) ---------- */

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(10, 18, 48, .45);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .18s ease;
}
.sheet {
  background: var(--surface);
  width: 100%;
  max-width: 640px;
  max-height: 90svh;
  border-radius: 22px 22px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: up .26s var(--ease);
}
.sheet__head {
  padding: 18px 16px 12px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
  position: relative;
}
.sheet__head::before {
  content: ''; position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
  width: 38px; height: 4px; border-radius: 2px; background: var(--line-strong);
}
.sheet__head [data-fechar] { border-color: transparent; background: var(--surface-2); width: 36px; padding: 0; border-radius: 50%; min-height: 36px; }
.sheet__title { font-size: 17px; font-weight: 600; margin-top: 4px; }
.sheet__body { padding: 16px; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.sheet__foot { padding: 12px 16px calc(12px + var(--safe-bottom)); border-top: 1px solid var(--line); }

@keyframes fade { from { opacity: 0 } }
@keyframes up { from { transform: translateY(24px); opacity: .5 } }
@keyframes pop { from { transform: scale(.6); opacity: 0 } }

/* ---------- toast ---------- */

.toasts {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 12px);
  z-index: 120;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--navy);
  color: #fff;
  padding: 13px 16px;
  border-radius: 14px;
  font-size: 14px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: up .22s var(--ease);
  border-left: 4px solid var(--gold);
}
.toast--ok { border-left-color: #4CC38A; }
.toast--bad { border-left-color: #E0727A; }

/* ---------- estados ---------- */

.empty { text-align: center; padding: 36px 18px; color: var(--muted); }
.empty > svg { width: 52px; height: 52px; padding: 13px; stroke-width: 1.6; color: var(--gold-ink); background: var(--gold-soft); border-radius: 16px; margin: 0 auto 12px; display: block; }
.empty__title { font-weight: 600; color: var(--ink); margin-bottom: 4px; font-size: 16px; }

.skeleton { background: linear-gradient(90deg, #ECEEF2 25%, #F5F6F8 50%, #ECEEF2 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; height: 14px; }
.skeleton + .skeleton { margin-top: 8px; }
@keyframes sk { to { background-position: -200% 0 } }

/* Marca de sucesso (agendamento feito, pagamento ok). */
.done-mark {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--gold); color: var(--navy);
  display: grid; place-items: center; margin: 0 auto 16px;
  animation: pop .35s var(--ease);
}
.done-mark svg { width: 32px; height: 32px; stroke-width: 2.4; }

/* ---------- metricas ---------- */

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-sm); }
.kpi__label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi__label svg { width: 14px; height: 14px; stroke-width: 1.9; color: var(--gold-deep); }
.kpi__value { font-size: 23px; font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1.15; }
.kpi__hint { font-size: 12px; color: var(--muted); margin-top: 3px; }
.kpi--navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.kpi--navy .kpi__label, .kpi--navy .kpi__hint { color: rgba(255, 255, 255, .62); }

.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quick button, .quick a {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 6px;
  min-height: 84px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  font-size: 12px; font-weight: 500; line-height: 1.25; text-align: center;
  cursor: pointer; color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform .12s var(--ease), border-color .15s ease;
}
.quick button:active, .quick a:active { transform: scale(.97); }
.quick svg { width: 38px; height: 38px; padding: 9px; border-radius: 12px; stroke-width: 1.7; color: var(--gold-ink); background: var(--gold-soft); }

/* ---------- timeline da agenda ---------- */

.tl { position: relative; padding-left: 54px; }
.tl::before { content: ''; position: absolute; left: 47px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.tl__row { position: relative; padding: 0 0 10px; }
.tl__hour {
  position: absolute; left: -54px; top: 10px;
  width: 40px; text-align: right;
  font-size: 12.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums;
}
.tl__card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 12px 13px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  box-shadow: var(--shadow-sm);
}
.tl__card--free { border-left-color: var(--line-strong); border-style: dashed; border-left-style: solid; background: transparent; color: var(--muted); min-height: 44px; display: flex; align-items: center; gap: 8px; box-shadow: none; font-size: 14px; }
.tl__card--free svg { width: 16px; height: 16px; stroke-width: 2; }
.tl__card--block { border-left-color: var(--muted-2); background: var(--surface-2); box-shadow: none; }
.tl__card--done { border-left-color: var(--success); }
.tl__card--canceled { border-left-color: var(--danger); opacity: .6; }
.tl__card--running { border-left-color: var(--gold); background: #FFFBF4; }

/* ---------- graficos simples ---------- */

.bars { display: flex; align-items: flex-end; gap: 4px; height: 100px; }
.bars__col { flex: 1; background: var(--navy-3); border-radius: 4px 4px 0 0; min-height: 2px; opacity: .8; }
.bars__col:last-child { background: var(--gold-deep); opacity: 1; }

.meter { height: 7px; border-radius: 4px; background: var(--line); overflow: hidden; }
.meter__fill { height: 100%; background: var(--gold-deep); border-radius: 4px; }

/* ---------- marca ---------- */

.brand { display: flex; align-items: center; gap: 10px; }
/* logo.png e a versao oficial em dourado com fundo transparente. */
.brand__logo { height: 36px; width: auto; object-fit: contain; display: block; }
.brand__mark {
  width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid var(--gold);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 14px; letter-spacing: .02em;
  flex: 0 0 auto;
}
.brand__name { font-family: var(--serif); font-size: 15px; line-height: 1.15; }
.brand__tag { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; opacity: .62; }

.hero { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.hero__img { position: absolute; inset: 0; display: block; }
.hero__img img { width: 100%; height: 100%; object-fit: cover; object-position: 78% 50%; display: block; }
/* Véu azul-marinho: garante a leitura do texto sobre a foto. */
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 18, 48, .1) 0%, rgba(10, 18, 48, .55) 45%, rgba(10, 18, 48, .96) 100%);
}
.hero__inner { position: relative; z-index: 2; display: flex; flex-direction: column; min-height: 440px; padding: 24px 20px 30px; }
.hero__fim { margin-top: auto; padding-top: 150px; max-width: 520px; }
.hero__title { font-family: var(--serif); font-size: 34px; line-height: 1.1; margin: 0 0 20px; color: #fff; }
.hero__cta { width: 100%; max-width: 340px; }
.hero__status { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
/* Entrada discreta, só opacidade e um pequeno deslocamento. */
.hero__fim > * { animation: entrada .55s ease-out both; }
.hero__fim > :nth-child(3) { animation-delay: .06s; }
.hero__fim > :nth-child(4) { animation-delay: .12s; }
@keyframes entrada { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .hero__fim > * { animation: none; } }

/* Barbeiros em cartões verticais: foto grande, nome e corações sobre a imagem. */
.retratos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.retrato {
  position: relative; display: block;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--navy);
}
.retrato__foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.retrato__iniciais {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 44px; color: var(--gold);
}
.retrato__selo {
  position: absolute; top: 10px; left: 10px;
  background: var(--gold); color: #1B1206;
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px;
}
.retrato__legenda {
  position: absolute; inset: auto 0 0 0;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 36px 12px 12px;
  background: linear-gradient(180deg, rgba(10, 18, 48, 0), rgba(10, 18, 48, .9));
  color: #fff; text-align: left;
}
.retrato__nome { font-family: var(--serif); font-size: 18px; line-height: 1.15; min-width: 0; overflow-wrap: anywhere; }
.retrato-card { display: flex; flex-direction: column; gap: 8px; }
.retrato-card__bio { margin: 0; }
.retrato-card .btn { margin-top: auto; }
.retrato-opcao {
  position: relative; display: block; width: 100%; padding: 0;
  background: none; border: 0; border-radius: calc(var(--radius) + 3px);
  cursor: pointer; font: inherit;
  outline: 3px solid transparent; outline-offset: 0;
  transition: outline-color .15s;
}
.retrato-opcao.is-selected { outline-color: var(--gold-deep); }
.retrato-opcao:focus-visible { outline-color: var(--navy); }
.retrato-opcao__check { position: absolute; top: 10px; right: 10px; border-color: #fff; }
.retrato-opcao.is-selected .retrato-opcao__check { background: var(--gold); border-color: var(--gold); color: #1B1206; }

.atender-agora { margin-top: 12px; }

/* Card "de post": foto grande no topo, legenda embaixo. */
.barber-post {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.barber-post__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 22%;
  display: block;
  background: var(--surface-2);
}
.barber-post__body { padding: 16px; }
.barber-post__name { font-size: 20px; }
.barber-post__role {
  display: inline-block;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold-ink); margin-top: 3px;
}
.barber-post__bio { margin: 10px 0 0; }

/* Sem foto: layout compacto de linha (monograma + texto). */
.barber-card { display: flex; align-items: center; gap: 16px; }
.barber-card__mark {
  width: 48px; height: 48px; border-radius: 12px;
  flex: 0 0 auto;
  border: 1px solid var(--gold); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 17px;
}

/* Horario de funcionamento com o dia de hoje marcado. */
.hours { margin: 0; padding: 0; list-style: none; }
.hours li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.hours li:last-child { border-bottom: 0; }
.hours li.is-closed span:last-child { color: var(--muted-2); }
.hours li.is-today { font-weight: 600; color: var(--ink); }
.hours li.is-today span:first-child::after { content: 'hoje'; margin-left: 8px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--gold-ink); background: var(--gold-soft); padding: 2px 7px; border-radius: 999px; vertical-align: 1px; }

/* ---------- tablet ---------- */

@media (min-width: 640px) {
  .svc-list--grid { grid-template-columns: 1fr 1fr; }
  .retratos { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .hero__inner { padding: 32px 40px 44px; min-height: 420px; }
  .hero__fim { padding-top: 40px; max-width: 520px; }
  .hero__title { font-size: 44px; }
  .hero::after { background: linear-gradient(90deg, rgba(10, 18, 48, .96) 0%, rgba(10, 18, 48, .78) 38%, rgba(10, 18, 48, 0) 70%); }
  .hero__img img { object-position: 85% 60%; }
}

/* ---------- desktop ---------- */

@media (min-width: 1024px) {
  :root { --nav-h: 0px; }

  .app { flex-direction: row; }

  .bottomnav {
    position: sticky;
    top: 0;
    height: 100svh;
    width: 240px;
    flex: 0 0 240px;
    grid-auto-flow: row;
    grid-auto-rows: max-content;
    align-content: start;
    border-top: 0;
    border-right: 1px solid var(--line);
    background: var(--surface);
    padding: 20px 12px;
    gap: 2px;
  }
  .bottomnav a {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    font-size: 14px;
    padding: 0 12px;
    border-radius: 12px;
    min-height: 46px;
  }
  .bottomnav svg { width: 20px; height: 20px; padding: 0; border-radius: 0; }
  .bottomnav a:hover { background: var(--surface-2); color: var(--ink); }
  .bottomnav a.is-active { background: var(--gold-soft); color: var(--gold-ink); }
  .bottomnav a.is-active svg { background: transparent; }

  .pane { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .main { max-width: 960px; padding: 28px 32px 60px; }
  .main--flush { padding-top: 0; }
  .sticky-action { position: static; padding: 0; background: none; margin-top: 20px; }
  .main:has(.sticky-action) { padding-bottom: 60px; }
  .sticky-action .inner { max-width: none; }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .quick { grid-template-columns: repeat(6, 1fr); }
  .sheet-backdrop { align-items: center; }
  .sheet { border-radius: 20px; max-height: 84svh; }
  .toasts { bottom: 20px; right: 20px; left: auto; align-items: flex-end; }
  .grid-2--wide { grid-template-columns: repeat(2, 1fr); gap: 16px; align-items: start; }
  .btn:hover:not(:disabled) { opacity: .92; }
  .svc:not(.svc--static):hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
  .day:not(.is-off):not(.is-active):hover, .slot:not(.is-active):hover { border-color: var(--navy-3); }
}

@media (min-width: 1024px) {
  .only-mobile { display: none !important; }
}
@media (max-width: 1023px) {
  .only-desktop { display: none !important; }
}

/* Telas bem estreitas (360px): aperta o passo sem quebrar. */
@media (max-width: 374px) {
  .main { padding-left: 12px; padding-right: 12px; }
  .kpi__value { font-size: 20px; }
  .quick { grid-template-columns: repeat(2, 1fr); }
  .slots { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
  .svc { gap: 12px; padding: 12px; }
  .svc__icon { width: 46px; height: 46px; }
  .svc__icon .ico-marca { width: 27px; height: 27px; }
  .bottomnav svg { width: 46px; padding: 4px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- fidelidade ---------- */
.stamps-card__title { font-family: var(--serif); font-size: 15px; margin-bottom: 12px; }
.stamps { display: grid; grid-template-columns: repeat(var(--cols, 5), 1fr); gap: 10px; max-width: 300px; }
.stamp {
  aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--line-strong); background: var(--surface-2); color: #fff;
}
.stamp svg { width: 55%; height: 55%; stroke-width: 1.8; }
.stamp.is-on { background: var(--gold); border-color: var(--gold); box-shadow: var(--shadow-sm); }
.stamps-card__text { margin-top: 12px; }
.stamps__win {
  color: var(--gold-ink); background: var(--gold-soft); border: 1px solid var(--gold-line);
  border-radius: var(--radius-sm); padding: 10px 12px; font-weight: 600; font-size: 14px; margin-bottom: 6px;
}
.stamps-card--sm { padding: 12px; }
.stamps-card--sm .stamps { gap: 7px; max-width: 220px; }
.stamps-card--sm .stamps-card__title { font-size: 13px; margin-bottom: 8px; }
.cortesia-switch { background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: var(--radius-sm); padding: 10px 12px; }

/* ---------- nossa historia ---------- */
.story { position: relative; }
.story__text { font-family: var(--serif); font-size: 15.5px; line-height: 1.7; margin: 0; color: var(--ink); }
.story__rule { width: 42px; height: 1px; background: var(--gold); margin: 16px 0 10px; }
.story__sign { font-size: 13px; color: var(--gold-ink); letter-spacing: .02em; }

/* Página de privacidade */
.privacidade { max-width: 640px; margin: 0 auto; padding: 24px 20px 48px; line-height: 1.6; }
.privacidade h1 { margin: 16px 0 12px; }
.privacidade h2 { font-size: 16px; margin: 24px 0 6px; }
.privacidade ul { padding-left: 20px; margin: 0; }
