/* =============================================================================
   Corte no Ponto — sistema visual "Clube"

   Referências (Dribbble, out/2026): apps de barbearia premium (Black Box, Squire,
   The Gentleman's Club, Modern Mane). O que eles têm em comum e foi trazido:
     - letra de título alta e estreita, como a das placas de barbearia antiga;
     - superfície grafite, cartões grandes, uma única ação clara por tela;
     - escolha de dia em faixa, horários em fichas, botão em pílula embaixo.
   O cabelo crescendo (campo de fios) continua como a marca do produto.

   Letras (Google Fonts, licença OFL):
     Big Shoulders Display 700/800 → títulos, nomes e números grandes.
     Mona Sans                      → texto, botões e tabelas (fácil de ler no celular).
   Cor tem função:
     texto claro sobre grafite → a ação principal (botão em pílula)
     cobre                     → destaque pequeno: linha do ponto, carimbo novo, "aberto agora"
     verde / amarelo / vermelho → em dia / hora de lembrar / passou do ponto (sempre com texto)

   Os nomes antigos das variáveis (--espuma, --branco, --fio…) foram mantidos para as
   páginas continuarem funcionando: agora querem dizer fundo, superfície e texto.
   ========================================================================== */

:root {
  color-scheme: dark;
  --espuma: #0f1011;          /* fundo da página */
  --branco: #18191b;          /* superfície: cartões, campos */
  --pedra: #222427;           /* superfície em destaque / passar o dedo */
  --fio: #f2efe8;             /* texto principal */
  --cinza: #a19e97;           /* texto secundário */
  --cinza-claro: #6f6c67;
  --linha: #26282b;
  --linha-forte: #3b3e42;

  --acao: #f2efe8;            /* botão principal */
  --acao-txt: #0f1011;
  --acento: #d9894d;          /* cobre */
  --acento-fundo: rgba(217, 137, 77, .14);

  /* nomes antigos que as páginas ainda usam */
  --barbicide: var(--acento);
  --barbicide-escuro: var(--acento);
  --barbicide-claro: var(--acento);
  --frasco: #08090a;
  --frasco-2: #141517;

  --locao: #4cc28c;
  --locao-fundo: rgba(76, 194, 140, .13);
  --navalha: #f0b443;
  --navalha-fundo: rgba(240, 180, 67, .13);
  --poste: #f2634f;
  --poste-fundo: rgba(242, 99, 79, .13);
  --zap: #1fa855;

  --titulo: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --texto: 'Mona Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r-ficha: 12px;
  --r-campo: 14px;
  --r-btn: 999px;
  --r-cartao: 20px;
  --r-folha: 26px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* espaço para o selo "Made in Higgsfield", fixo no canto de baixo à direita.
     Só existe no endereço antigo (o app.js põe a classe com-selo lá). */
  --selo: 0px;
}
html.com-selo { --selo: 46px; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--espuma); }
body {
  margin: 0; background: var(--espuma); color: var(--fio);
  font-family: var(--texto); font-size: 16.5px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 3px; }
::selection { background: var(--acento); color: var(--acao-txt); }

.titulo { font-family: var(--titulo); font-weight: 800; letter-spacing: .005em; line-height: .98; }
.num { }
.miudo { font-size: 14.5px; color: var(--cinza); }
.etiqueta { display: block; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--cinza); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* marca: o nome em letra de placa, com três fios aparados na frente */
.marca { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--fio); font-family: var(--titulo); font-weight: 800; font-size: 18px; letter-spacing: .04em; text-transform: uppercase; line-height: 1; white-space: nowrap; }
.marca::before {
  content: ""; width: 14px; height: 16px; flex: none;
  background: linear-gradient(var(--acento), var(--acento)) 0 4px / 100% 2px no-repeat,
              repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 4px) 0 7px / 100% 9px no-repeat;
}
.marca.clara { color: var(--fio); }

/* ----------------------------------------------------------------- botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 14px 26px; border: 1px solid transparent; border-radius: var(--r-btn);
  background: var(--acao); color: var(--acao-txt); font-weight: 600; font-size: 16.5px; line-height: 1.15; letter-spacing: .005em;
  text-decoration: none; text-align: center; cursor: pointer; touch-action: manipulation;
  transition: background .15s, color .15s, border-color .15s, transform .1s var(--ease), opacity .15s;
}
.btn:hover { background: #ffffff; }
.btn:active { transform: scale(.98); }
.btn:disabled { background: transparent; color: var(--cinza-claro); border-color: var(--linha-forte); cursor: not-allowed; transform: none; }
.btn.cheio { width: 100%; }
.btn.claro { background: transparent; color: var(--fio); border-color: var(--linha-forte); }
.btn.claro:hover { background: var(--pedra); }
.btn.tinta { background: var(--pedra); color: var(--fio); }
.btn.tinta:hover { background: var(--linha-forte); }
.btn.zap { background: var(--zap); color: #fff; }
.btn.zap:hover { background: #22b85d; }
.btn.cobre, .btn.escuro { background: var(--acento); color: var(--acao-txt); }
.btn.cobre:hover, .btn.escuro:hover { background: #e59a5f; }
.btn.fino { min-height: 42px; padding: 8px 16px; font-size: 14.5px; }
.btn svg { width: 19px; height: 19px; flex: none; }
.link-btn { background: none; border: 0; padding: 6px 0; cursor: pointer; font-weight: 600; color: inherit; text-decoration: underline; text-decoration-color: var(--linha-forte); text-underline-offset: 4px; }
.link-btn:hover { text-decoration-color: var(--acento); }

/* ---------------------------------------------------------------- cartões */
.cartao { background: var(--branco); border: 1px solid var(--linha); border-radius: var(--r-cartao); }
.cartao .faixa { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 18px 20px 0; font-weight: 600; font-size: 15px; }
.cartao .faixa > :last-child:not(:first-child) { color: var(--cinza); font-weight: 400; }
.cartao .corpo { padding: 14px 20px 20px; }

/* lista de preços */
.tabela { list-style: none; margin: 0; padding: 0; }
.tabela li { display: flex; align-items: baseline; gap: 8px; padding: 11px 0; }
.tabela .nome { flex: none; max-width: 70%; }
.tabela .pontos { flex: 1; min-width: 16px; }
.tabela .valor { flex: none; }

/* ------------------------------------------------------------ formulário */
.campo { display: block; margin-bottom: 18px; }
.campo > span, .rotulo { display: block; margin-bottom: 8px; font-size: 14.5px; font-weight: 600; color: var(--fio); }
.campo small { display: block; margin-top: 8px; color: var(--cinza); font-size: 13.5px; }
.entrada {
  width: 100%; min-height: 54px; padding: 13px 16px; background: var(--branco);
  border: 1px solid var(--linha-forte); border-radius: var(--r-campo); font-size: 17px; outline: 0;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.entrada:focus { border-color: var(--fio); background: var(--pedra); }
.entrada::placeholder { color: var(--cinza-claro); }
select.entrada {
  appearance: none; padding-right: 42px;
  background: var(--branco) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23f2efe8' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 18px center;
}
textarea.entrada { min-height: 88px; resize: vertical; }
/* iPhone: o campo de hora tem largura mínima própria e vazava da coluna */
.entrada { min-width: 0; max-width: 100%; }
input[type="time"].entrada, input[type="date"].entrada { -webkit-appearance: none; appearance: none; display: block; width: 100%; min-width: 0; text-align: left; }
input[type="time"].entrada::-webkit-date-and-time-value, input[type="date"].entrada::-webkit-date-and-time-value { text-align: left; margin: 0; }
.entrada.num { }
.msg-erro { color: var(--poste); font-weight: 600; font-size: 15px; margin-top: 8px; }

.fichas { display: flex; flex-wrap: wrap; gap: 8px; }
.ficha {
  min-height: 48px; min-width: 66px; padding: 9px 14px; background: var(--branco);
  border: 1px solid var(--linha-forte); border-radius: var(--r-ficha);
  font-size: 16px; font-weight: 500; cursor: pointer; touch-action: manipulation;
  transition: background .12s, color .12s, border-color .12s, transform .1s var(--ease);
}
.ficha:hover { border-color: var(--cinza-claro); }
.ficha:active { transform: scale(.97); }
.ficha[aria-pressed="true"], .ficha[aria-checked="true"] { background: var(--fio); border-color: var(--fio); color: var(--acao-txt); font-weight: 600; }
.ficha:disabled { opacity: .35; cursor: not-allowed; }

/* -------------------------------------------- situação do cliente (tufo) */
.sinal { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.sinal svg { width: 14px; height: 15px; flex: none; }
.sinal.verde { color: var(--locao); }
.sinal.amarelo { color: var(--navalha); }
.sinal.vermelho { color: var(--poste); }
.sinal.marcado { color: var(--fio); }
.sinal.novo { color: var(--cinza); }

/* ---------------------------------------------------------- campo de fios */
.fios { display: block; width: 100%; overflow: visible; }
.fios .guia, .no-escuro .fios .guia { stroke: var(--linha-forte); }
.fios .guia-txt, .no-escuro .fios .guia-txt { fill: var(--cinza-claro); font: 600 10.5px var(--texto); }
.fios .base, .no-escuro .fios .base { stroke: var(--cinza-claro); }
.fios .ponto, .fios .lamina, .no-escuro .fios .ponto, .no-escuro .fios .lamina { stroke: var(--acento); }
.fios .tufos, .no-escuro .fios .tufos { stroke: var(--fio); }
.fios .fantasma, .no-escuro .fios .fantasma { stroke: var(--linha-forte); }
.medida, .no-escuro .medida { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 13px; color: var(--cinza); }

/* mechas: o cartão fidelidade são fios aparados */
.mechas { display: flex; justify-content: space-between; align-items: flex-end; height: 48px; }
.mechas i, .no-escuro .mechas i { width: 2px; height: 100%; border-radius: 2px; background: var(--linha-forte); transition: height .55s var(--ease), width .3s, background .3s; }
.mechas i.ok, .no-escuro .mechas i.ok { width: 4px; height: 30%; background: var(--fio); }
.mechas i.novo, .no-escuro .mechas i.novo { background: var(--acento); }
.mechas .premio, .no-escuro .mechas .premio { width: auto; height: auto; background: none; font-style: normal; font-size: 11.5px; line-height: 1.15; color: var(--cinza); text-align: right; max-width: 64px; }

/* ------------------------------------------------------------------ aviso */
.aviso {
  position: fixed; left: 50%; bottom: calc(18px + var(--selo) + env(safe-area-inset-bottom)); z-index: 100;
  transform: translate(-50%, 180%); max-width: min(92vw, 440px); padding: 14px 20px;
  background: var(--fio); color: var(--acao-txt); border-radius: 16px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .5); font-weight: 600; transition: transform .3s var(--ease);
}
.aviso.ver { transform: translate(-50%, 0); }
.aviso.erro { background: var(--poste); color: #fff; }

.carregando { display: grid; place-items: center; min-height: 50vh; gap: 16px; text-align: center; padding: 24px; color: var(--cinza); }
.girando { width: 46px; height: 22px; background: repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 5px); color: var(--cinza-claro); -webkit-mask: linear-gradient(90deg, #000 40%, transparent 60%) 0 0 / 300% 100%; mask: linear-gradient(90deg, #000 40%, transparent 60%) 0 0 / 300% 100%; animation: varre 1s linear infinite; }
@keyframes varre { from { -webkit-mask-position: 100% 0; mask-position: 100% 0; } to { -webkit-mask-position: 0 0; mask-position: 0 0; } }

/* ------------------------------------------------ folha que sobe de baixo */
.veu { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .62); opacity: 0; transition: opacity .2s; }
.veu.ver { opacity: 1; }
.folha {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-height: 92vh; overflow: auto; overscroll-behavior: contain;
  background: var(--branco); border: 1px solid var(--linha); border-bottom: 0; border-radius: var(--r-folha) var(--r-folha) 0 0;
  padding: 10px 22px calc(24px + var(--selo) + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .3s var(--ease); box-shadow: 0 -20px 60px rgba(0, 0, 0, .5);
}
.folha.ver { transform: translateY(0); }
.folha .alca { width: 40px; height: 4px; border-radius: 2px; background: var(--linha-forte); margin: 2px auto 18px; }
.folha h3 { font-family: var(--titulo); font-weight: 800; font-size: 30px; line-height: 1; letter-spacing: .005em; }
.folha .entrada, .folha .ficha { background-color: var(--pedra); }
.folha .ficha[aria-pressed="true"], .folha .ficha[aria-checked="true"] { background-color: var(--fio); }
@media (min-width: 720px) {
  .folha { left: 50%; right: auto; width: 560px; transform: translate(-50%, 100%); }
  .folha.ver { transform: translate(-50%, 0); }
}

/* entrada da página: os blocos sobem em sequência */
@keyframes sobe { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.sobe { animation: sobe .5s var(--ease) both; }

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