/* Embele — estilo base do painel (mobile primeiro, visual do mockup) */

:root {
  --fundo: #F6F1EA;
  --cartao: #FFFFFF;
  --texto: #1F1B17;
  --apagado: #6B625A;
  --borda: #E6DCCF;
  --borda-forte: #D9CFC2;
  --dourado: #8A6A2F;
  --areia: #F3E3C3;
  --areia-texto: #5C4A24;
  --erro-fundo: #F4D9D5;
  --erro-texto: #8A2F24;
  --ok-fundo: #DCEFE4;
  --ok-texto: #1F5C3E;
  --raio: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 20px calc(32px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 16px;
}

a { color: var(--dourado); font-weight: 700; }

/* Topo */
.topo-simples { display: flex; justify-content: space-between; align-items: center; }
.marca { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--dourado); }
.passo { font-size: 13px; color: var(--apagado); font-weight: 600; }

.cabecalho { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 48px; height: 48px; border-radius: 999px; flex-shrink: 0;
  background: var(--areia); color: var(--areia-texto);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 18px;
}
.data { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--apagado); font-weight: 700; }
.negocio { font-family: 'Fraunces', Georgia, serif; font-size: 24px; font-weight: 600; line-height: 1.1; }

.titulo { font-family: 'Fraunces', Georgia, serif; font-size: 28px; font-weight: 600; line-height: 1.1; margin: 4px 0 0; }
.sub { margin: 0; font-size: 14px; color: var(--apagado); }

/* Avisos */
.aviso, .erro { border-radius: 12px; padding: 12px 14px; font-size: 14px; font-weight: 600; }
.aviso { background: var(--areia); color: var(--areia-texto); }
.erro { background: var(--erro-fundo); color: var(--erro-texto); display: flex; flex-direction: column; gap: 4px; }

/* Formulários */
.form { display: flex; flex-direction: column; gap: 14px; }
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo > span { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--apagado); }
.campo input, .preco input {
  height: 50px; border-radius: 12px; border: 1.5px solid var(--borda-forte); background: var(--cartao);
  padding: 0 14px; font: inherit; font-weight: 600; color: var(--texto); width: 100%;
}
.campo input:focus, .preco input:focus { outline: 2px solid var(--dourado); outline-offset: 1px; }

.btn {
  display: flex; align-items: center; justify-content: center;
  min-height: 56px; border-radius: 16px; border: 0; padding: 0 18px;
  font: inherit; font-size: 17px; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn-escuro { background: var(--texto); color: var(--fundo); }
.btn-escuro:hover { background: #000; }

.rodape-link { text-align: center; font-size: 14px; color: var(--apagado); margin: 4px 0 0; }

/* Campo-isca anti-robô e texto só para leitor de tela */
.escondido, .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Chips de profissão */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  border-radius: 999px; border: 1.5px solid var(--borda-forte); background: var(--cartao);
  font-weight: 700; font-size: 14px;
}
.chip input:checked + span { background: var(--texto); color: var(--fundo); border-color: var(--texto); }
.chip input:focus-visible + span { outline: 2px solid var(--dourado); outline-offset: 2px; }

/* Lista de serviços do primeiro acesso */
.lista { background: var(--cartao); border-radius: 16px; border: 1px solid #EFE7DC; padding: 4px 14px; }
.linha-servico { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #EFE7DC; }
.linha-servico:last-child { border-bottom: 0; }
.check { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.check input { width: 24px; height: 24px; accent-color: var(--texto); flex-shrink: 0; }
.check span { font-weight: 600; font-size: 15px; display: flex; flex-direction: column; }
.check small, .item small { font-size: 12px; color: var(--apagado); font-weight: 500; }
.preco { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--apagado); flex-shrink: 0; }
.preco input { width: 92px; height: 44px; text-align: right; padding: 0 10px; }

/* Cartões do início */
.cartao { background: var(--cartao); border-radius: 16px; border: 1px solid #EFE7DC; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.rotulo { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--apagado); margin-bottom: 4px; }
.item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #EFE7DC; font-size: 15px; }
.item:last-of-type { border-bottom: 0; }
.item span { display: flex; flex-direction: column; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

/* ===================== Etapa 2 ===================== */

/* Menu inferior fixo */
.nav-espaco { height: 64px; }
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; justify-content: center;
  background: var(--cartao); border-top: 1px solid var(--borda);
  padding: 0 6px env(safe-area-inset-bottom, 0px);
}
.nav-item {
  flex: 1; max-width: 96px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0 8px; text-decoration: none; color: var(--apagado); font-size: 11px; font-weight: 700;
}
.nav-item[aria-current="page"] { color: var(--dourado); }
.nav-item small { font-size: 9px; font-weight: 600; letter-spacing: .02em; }
.nav-off { opacity: .45; }

/* Topos */
.topo-lista { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.topo-voltar { display: flex; align-items: center; gap: 10px; }
.titulo-tela { font-family: 'Fraunces', Georgia, serif; font-size: 26px; font-weight: 600; line-height: 1.1; margin: 2px 0 0; }
.voltar {
  width: 44px; height: 44px; border-radius: 12px; background: var(--cartao); border: 1.5px solid var(--borda);
  display: flex; align-items: center; justify-content: center; color: var(--texto); flex-shrink: 0;
}

/* Botões */
.btn-peq {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px;
  background: var(--texto); color: var(--fundo); text-decoration: none; font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.btn-claro { background: var(--cartao); color: var(--texto); border: 1.5px solid var(--borda-forte); min-height: 48px; font-size: 15px; }
.btn-off { opacity: .5; cursor: default; flex-direction: column; gap: 0; line-height: 1.1; }
.btn-off small { font-size: 11px; font-weight: 600; opacity: .8; }
.btn-sair { color: var(--erro-texto); margin-top: 8px; }
.acoes { display: flex; flex-direction: column; gap: 10px; }
.link-acao { font-size: 14px; align-self: flex-start; }

/* Cartões e textos */
.cartao { gap: 10px; }
.cartao-link { text-decoration: none; color: var(--texto); font-weight: 400; }
.inativo { opacity: .6; }
.linha-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.nome { font-weight: 700; font-size: 15px; }
.detalhe { font-size: 13px; color: var(--apagado); margin-top: 2px; }
.seta { color: #9A9088; flex-shrink: 0; margin-top: 3px; }
.nota { font-size: 12.5px; color: var(--apagado); margin: 0; }
.nota-rodape { font-size: 12.5px; color: var(--apagado); margin: 0; }
.mini { font-size: 12px; color: var(--apagado); font-weight: 600; }
.forte { font-weight: 700; font-size: 14px; }
.valor { font-family: 'Fraunces', Georgia, serif; font-size: 19px; font-weight: 600; }
.dupla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.caixinha { background: var(--fundo); border-radius: 10px; padding: 8px 10px; }
.caixinha.areia { background: var(--areia); }
.caixinha.areia .mini, .caixinha.areia .valor { color: #3F3115; }
.faixa-areia { background: var(--areia); border-radius: 16px; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #3F3115; }
.faixa-areia .mini, .faixa-areia .nota { color: var(--areia-texto); }
.faixa-areia .valor { font-size: 24px; color: #3F3115; }
.faixa-dica { background: var(--areia); border-color: transparent; }
.faixa-dica .detalhe { color: var(--areia-texto); }

/* Tags */
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.tag-verde { background: var(--ok-fundo); color: var(--ok-texto); }
.tag-cinza { background: #EBE3D8; color: #4F463E; }

/* Seções e listas */
.rotulo-secao { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--apagado); }
.rotulo-secao .mini { text-transform: none; letter-spacing: 0; }
.rotulo-linha { display: flex; justify-content: space-between; align-items: baseline; }
.rotulo-linha a { font-size: 13px; text-decoration: none; }
.linha-check { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 6px 0; border-bottom: 1px solid #EFE7DC; cursor: pointer; }
.linha-check:last-child { border-bottom: 0; }
.linha-check input { width: 24px; height: 24px; accent-color: var(--texto); flex-shrink: 0; }
.nome-prod { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; }
.item-link { text-decoration: none; color: var(--texto); font-weight: 400; }
.item-link strong { font-family: 'Fraunces', Georgia, serif; font-weight: 600; }

/* Resumo de custo / sobra */
.resumo-sobra { background: var(--areia); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; color: #3F3115; }
.resumo-sobra .linha { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.resumo-sobra .grande strong { font-family: 'Fraunces', Georgia, serif; font-size: 24px; font-weight: 600; }

/* Chave liga/desliga (checkbox real por baixo) */
.chave { display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; position: relative; }
.chave > span:first-child { display: flex; flex-direction: column; }
.chave small { font-size: 12px; color: var(--apagado); font-weight: 500; }
.chave input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.trilho { width: 52px; height: 30px; border-radius: 999px; background: #C9BDAE; flex-shrink: 0; position: relative; transition: background .15s; }
.trilho::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 999px; background: #fff; transition: transform .15s; }
.chave input:checked + .trilho { background: #2F6F4E; }
.chave input:checked + .trilho::after { transform: translateX(22px); }
.chave input:focus-visible + .trilho { outline: 2px solid var(--dourado); outline-offset: 2px; }
.chave-solta { background: var(--cartao); border: 1px solid #EFE7DC; border-radius: 16px; padding: 12px 16px; }
.campo-sinal { margin-top: 4px; }

/* Select e data no mesmo visual dos inputs */
.campo select, .campo input[type="date"] {
  height: 50px; border-radius: 12px; border: 1.5px solid var(--borda-forte); background: var(--cartao);
  padding: 0 12px; font: inherit; font-weight: 600; color: var(--texto); width: 100%;
}

/* Atalhos da tela Mais */
.grade-atalhos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.atalho { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 14px; background: var(--cartao); border: 1px solid #EFE7DC; text-decoration: none; color: var(--texto); font-weight: 400; }
.atalho svg { color: var(--dourado); }
.atalho span { font-size: 12.5px; color: var(--apagado); }
.atalho-off { opacity: .5; }

[hidden] { display: none !important; }

/* ===================== Etapa 3 ===================== */

.campo textarea {
  border-radius: 12px; border: 1.5px solid var(--borda-forte); background: var(--cartao);
  padding: 10px 14px; font: inherit; font-size: 15px; color: var(--texto); width: 100%; resize: vertical; line-height: 1.4;
}
.campo textarea:focus, .campo select:focus { outline: 2px solid var(--dourado); outline-offset: 1px; }

.btn-grande { min-height: 58px; gap: 10px; }
.btn-medio { min-height: 46px; font-size: 14px; border-radius: 12px; }

/* Números do dia */
.tres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tres a { text-decoration: none; color: inherit; font-weight: 400; }
.numero { font-family: 'Fraunces', Georgia, serif; font-size: 21px; font-weight: 600; line-height: 1.15; margin-top: 2px; overflow-wrap: anywhere; }
.laranja { color: #9A5A10; }

/* Alertas do início */
.alerta { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--cartao); border: 1px solid #EFE7DC; border-radius: 14px; text-decoration: none; color: var(--texto); font-weight: 400; }
.alerta-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--areia); color: #7A5A22; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.alerta-txt { display: flex; flex-direction: column; min-width: 0; }
.alerta-txt strong { font-size: 14px; }
.alerta-txt small { font-size: 12.5px; color: var(--apagado); }

/* Abas de Contas */
.abas { display: flex; background: #EBE3D8; border-radius: 14px; padding: 4px; gap: 4px; }
.abas a { flex: 1; text-align: center; padding: 10px 0; border-radius: 11px; text-decoration: none; color: var(--apagado); font-size: 14px; }
.abas a[aria-current="page"] { background: var(--cartao); color: var(--texto); box-shadow: 0 1px 2px rgba(31, 27, 23, .1); }
.total-linha { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14px; color: var(--apagado); }
.total-linha strong { font-family: 'Fraunces', Georgia, serif; font-size: 22px; font-weight: 600; color: var(--texto); }
.direita { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.nome-link { color: var(--texto); text-decoration: none; display: block; }
.tag-vermelha { background: var(--erro-fundo); color: var(--erro-texto); }
.tag-amarela { background: #F7E6CC; color: #7A4306; }

/* Caixa */
.seletor-mes { display: flex; justify-content: space-between; align-items: center; background: var(--cartao); border: 1px solid #EFE7DC; border-radius: 14px; padding: 4px; font-weight: 700; }
.seletor-mes a, .seletor-mes .vazio { width: 44px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 24px; text-decoration: none; color: var(--texto); }
.cartao-escuro { background: var(--texto); color: var(--fundo); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.mini-claro { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.grande-claro { font-family: 'Fraunces', Georgia, serif; font-size: 34px; font-weight: 600; line-height: 1.1; }
.cartao-escuro .forte { font-size: 16px; }

/* Clientes */
.busca-form .campo input { height: 48px; }
.chips-filtro { display: flex; gap: 6px; flex-wrap: wrap; }
.chips-filtro a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--borda-forte); background: var(--cartao); color: var(--texto); text-decoration: none; font-size: 13px; }
.chips-filtro a[aria-current="page"] { background: var(--texto); color: var(--fundo); border-color: var(--texto); }
.lista-pessoas { padding: 2px 14px; gap: 0; }
.pessoa { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #EFE7DC; text-decoration: none; color: var(--texto); font-weight: 400; }
.pessoa:last-child { border-bottom: 0; }
.pessoa-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pessoa-txt strong { font-size: 14px; }
.pessoa-txt small { font-size: 12.5px; color: var(--apagado); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 40px; height: 40px; border-radius: 999px; background: var(--areia); color: var(--areia-texto); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.avatar-g { width: 44px; height: 44px; font-size: 15px; }
.faixa-alerta { background: #F7E6CC; border-radius: 16px; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #5A3104; }
.faixa-alerta .mini, .faixa-alerta .nota { color: #7A4306; }
.coluna-botoes { display: flex; flex-direction: column; align-items: center; gap: 6px; }

/* Registrar atendimento */
.cliente-escolha { gap: 10px; }
.cliente-atual { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 16px; }
.link-btn { background: none; border: 0; color: var(--dourado); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; padding: 8px 0; min-height: 44px; }
.lista-clientes { display: flex; flex-wrap: wrap; gap: 6px; }
.opcao-cliente { min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--borda-forte); background: var(--cartao); font: inherit; font-weight: 600; font-size: 14px; color: var(--texto); cursor: pointer; }
.nova-cliente { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid #EFE7DC; padding-top: 10px; }
.grade-servicos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.opcao-servico { position: relative; cursor: pointer; }
.opcao-servico input, .segmento input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opcao-servico span { display: flex; flex-direction: column; gap: 2px; min-height: 56px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--borda-forte); background: var(--cartao); }
.opcao-servico strong { font-size: 14px; }
.opcao-servico small { font-size: 12px; opacity: .75; }
.opcao-servico input:checked + span, .segmento input:checked + span { background: var(--texto); color: var(--fundo); border-color: var(--texto); }
.opcao-servico input:focus-visible + span, .segmento input:focus-visible + span { outline: 2px solid var(--dourado); outline-offset: 2px; }
.segmentos { display: flex; gap: 8px; }
.segmento { flex: 1; cursor: pointer; position: relative; }
.segmento span { display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 12px; border: 1.5px solid var(--borda-forte); background: var(--cartao); font-weight: 700; font-size: 14px; text-align: center; padding: 0 6px; }
