/* Labby Digital — visual leve: fundo claro, cartões brancos, um destaque só. Escuro automático. */
:root {
  --fundo: #f5f6f8;
  --painel: #ffffff;
  --painel2: #f1f3f6;
  --linha: #e4e7ec;
  --texto: #171a1f;
  --suave: #6b7280;
  --acento: #2563eb;
  --acento-suave: #eaf1ff;
  --verde: #16a34a;
  --vermelho: #dc2626;
  --ambar: #d97706;
  --sombra: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --raio: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fundo: #0f1115;
    --painel: #171a20;
    --painel2: #1e222a;
    --linha: #2a2f38;
    --texto: #eceef2;
    --suave: #9aa1ad;
    --acento: #3b82f6;
    --acento-suave: #1b2740;
    --verde: #3fb950;
    --vermelho: #f87171;
    --ambar: #fbbf24;
    --sombra: none;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--fundo); color: var(--texto);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(86px + env(safe-area-inset-bottom));
}
a { color: inherit; text-decoration: none; }
h1 { font-size: 1.55rem; font-weight: 700; margin: 6px 0 16px; letter-spacing: -.02em; }
h2 { font-size: .95rem; font-weight: 600; color: var(--texto); margin: 28px 0 10px; }
h2 .direita { float: right; color: var(--suave); font-weight: 400; font-size: .85rem; }
h2 .direita a, a.direita { color: var(--acento); }
p { margin: 0 0 10px; }
.suave { color: var(--suave); }
.pequeno-txt { font-size: .86rem; }
.vermelho { color: var(--vermelho); }
.verde { color: var(--verde); }

/* topo */
.topo {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 18px 10px;
  background: color-mix(in srgb, var(--fundo) 85%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
}
.topo .logo { color: var(--texto); display: flex; }
.menu-pc { display: none; gap: 2px; align-items: center; }
.menu-pc a { padding: 8px 12px; border-radius: 10px; color: var(--suave); font-size: .95rem; transition: background .15s, color .15s; }
.menu-pc a:hover { color: var(--texto); }
.menu-pc a.ativo { color: var(--texto); background: var(--painel2); font-weight: 600; }
.menu-pc a.botao { color: #fff; margin-left: 10px; }

main { max-width: 720px; margin: 0 auto; padding: 8px 16px 16px; overflow-x: clip; animation: entra .22s ease-out; }
@keyframes entra { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* abas do celular */
.abas {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: space-around; align-items: center;
  background: color-mix(in srgb, var(--painel) 88%, transparent); border-top: 1px solid var(--linha);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
}
.abas a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; color: var(--suave); padding: 4px 0; transition: color .15s; }
.abas a.ativo { color: var(--acento); font-weight: 600; }
.abas .mais-botao {
  flex: 0 0 52px; height: 52px; border-radius: 18px; background: var(--acento); color: #fff; justify-content: center;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--acento) 35%, transparent);
}
.abas .mais-botao svg { width: 26px; height: 26px; }

@media (min-width: 900px) {
  body { padding-bottom: 30px; }
  .abas { display: none; }
  .menu-pc { display: flex; }
  .topo { padding: 14px 28px; border-bottom: 1px solid var(--linha); }
  main { padding: 26px 16px; }
}

/* avisos */
.aviso { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; background: color-mix(in srgb, var(--verde) 12%, var(--painel)); color: var(--texto); animation: entra .25s ease-out; }
.aviso.erro { background: color-mix(in srgb, var(--vermelho) 12%, var(--painel)); }

/* cartões */
.cartao { background: var(--painel); border-radius: var(--raio); padding: 16px; margin-bottom: 10px; box-shadow: var(--sombra); border: 1px solid var(--linha); }
.numeros { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.numero { background: var(--painel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 14px 16px; display: block; box-shadow: var(--sombra); transition: transform .15s; }
.numero:active { transform: scale(.98); }
.numero .rot { font-size: .8rem; color: var(--suave); }
.numero .val { font-size: 1.4rem; font-weight: 700; margin-top: 2px; letter-spacing: -.02em; }
.numero .sub { font-size: .78rem; color: var(--suave); }
.numero.destaque { background: var(--acento); border-color: var(--acento); color: #fff; }
.numero.destaque .rot, .numero.destaque .sub { color: rgba(255, 255, 255, .82); }
.numero.alerta .val { color: var(--vermelho); }

.trabalho { display: flex; gap: 10px; padding: 14px; transition: transform .15s; }
.trabalho:active { transform: scale(.99); }
.trabalho.atrasado { box-shadow: inset 3px 0 0 var(--vermelho), var(--sombra); }
.trabalho .corpo { flex: 1; min-width: 0; }
.trabalho .linha1 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.trabalho .desc { margin-top: 2px; }
.trabalho .info { font-size: .82rem; color: var(--suave); margin-top: 2px; }
.trabalho .lado { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; text-align: right; }
.trabalho .valor { font-weight: 700; white-space: nowrap; }
.selo { font-size: .72rem; font-weight: 600; padding: 2px 9px; border-radius: 99px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); white-space: nowrap; }
.pago { font-size: .76rem; color: var(--verde); font-weight: 600; }
.pendente { color: var(--ambar); }
span.pendente, small.pendente { font-size: inherit; }
a.pendente { color: var(--acento); }

.lista-simples { background: var(--painel); border: 1px solid var(--linha); border-radius: var(--raio); overflow: hidden; box-shadow: var(--sombra); }
.lista-simples a, .lista-simples .item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--linha); transition: background .12s; }
.lista-simples a:active { background: var(--painel2); }
.lista-simples > :last-child { border-bottom: 0; }
.lista-simples .dir { text-align: right; white-space: nowrap; }
.vazio { text-align: center; color: var(--suave); padding: 28px 12px; }

/* filtros */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips a { white-space: nowrap; padding: 7px 14px; border-radius: 99px; background: var(--painel); border: 1px solid var(--linha); color: var(--suave); font-size: .9rem; transition: all .15s; }
.chips a.ativo { background: var(--texto); border-color: var(--texto); color: var(--fundo); }
.chips a b { font-weight: 700; margin-left: 4px; }
.busca { display: flex; gap: 8px; margin-bottom: 12px; }
.busca > * { flex: 1; min-width: 0; }

/* formulários */
label { display: block; font-size: .84rem; color: var(--suave); margin: 14px 0 6px; font-weight: 500; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--texto); background: var(--painel2);
  border: 1px solid transparent; border-radius: 12px; padding: 12px 13px; outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
input:focus, select:focus, textarea:focus { background: var(--painel); border-color: var(--acento); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acento) 15%, transparent); }
textarea { min-height: 80px; resize: vertical; }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--acento); padding: 0; flex: 0 0 22px; }
.duas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 10px; }
.tres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; }
.duas > *, .tres > * { min-width: 0; }
/* iPhone: o campo de data tem largura própria e passava da tela */
input[type=date], input[type=month] {
  -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%;
  height: 48px; line-height: 1.2; padding-top: 0; padding-bottom: 0; font-size: 15px;
}
input[type=date]::-webkit-date-and-time-value, input[type=month]::-webkit-date-and-time-value { text-align: left; margin: 0; }
.campo-ajuda { font-size: .8rem; color: var(--suave); margin-top: 5px; }
.status-escolha { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.status-escolha label { margin: 0; }
.status-escolha input { display: none; }
.status-escolha span { display: block; text-align: center; padding: 10px 2px; border-radius: 11px; background: var(--painel2); font-size: .8rem; color: var(--suave); transition: all .15s; }
.status-escolha input:checked + span { background: var(--acento); color: #fff; font-weight: 600; }

.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600;
  background: var(--acento); color: #fff; border: 0; border-radius: 13px; padding: 13px 18px; cursor: pointer; text-align: center;
  transition: transform .12s, filter .15s, background .15s;
}
.botao:hover { filter: brightness(1.05); }
.botao:active { transform: scale(.97); }
.botao:disabled { opacity: .6; }
.botao.largo { width: 100%; }
.botao.pequeno { padding: 8px 13px; font-size: .86rem; border-radius: 11px; }
.botao.contorno { background: var(--acento-suave); color: var(--acento); }
.botao.cinza { background: var(--painel2); color: var(--texto); }
.botao.verde { background: var(--verde); }
.botao.perigo { background: transparent; color: var(--vermelho); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--vermelho) 35%, transparent); }
.acoes { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.acoes .botao { flex: 1; }
.total-caixa { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding: 14px 16px; border-radius: 13px; background: var(--acento-suave); }
.total-caixa strong { font-size: 1.35rem; color: var(--acento); }

/* cobrança */
.item-cob { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-bottom: 1px solid var(--linha); cursor: pointer; }
.item-cob:last-child { border-bottom: 0; }
.item-cob .meio { flex: 1; min-width: 0; }
.item-cob .meio small { display: block; color: var(--suave); }
.item-cob .v { font-weight: 600; white-space: nowrap; }
.resumo-linha { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
.resumo-linha.total { font-size: 1.3rem; font-weight: 700; border-top: 1px solid var(--linha); margin-top: 6px; padding-top: 12px; }
.grupo-titulo { padding: 10px 16px; font-size: .78rem; font-weight: 600; color: var(--suave); background: var(--painel2); border-bottom: 1px solid var(--linha); }

/* preços */
.preco-linha { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 10px; align-items: center; padding: 9px 16px; border-bottom: 1px solid var(--linha); }
.preco-linha:last-child { border-bottom: 0; }
.preco-linha input { padding: 9px 10px; text-align: right; }
.preco-linha .padrao { font-size: .78rem; color: var(--suave); }

/* login */
.login { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; max-width: 380px; margin: 0 auto; }
.login .marca { color: var(--texto); text-align: center; margin-bottom: 28px; }
