/* v0.1.0 — Central Fit. Celular primeiro; a cor de cada personal vem em --cor-1/--cor-2 (layout.php).
   Nunca escrever a cor de um personal aqui: tudo pelas variáveis. */

:root {
  --cor-1: #16a34a; --cor-1-texto: #fff; --cor-2: #0f172a; --cor-2-texto: #fff;
  --fundo: #f4f6f8; --superficie: #ffffff; --texto: #111827; --texto-2: #5b6573; --borda: #dde2e8;
  --ok: #15803d; --ok-fundo: #dcfce7; --erro: #b91c1c; --erro-fundo: #fee2e2;
  --raio: 14px; --sombra: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --fonte: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fundo: #0b0f14; --superficie: #151b23; --texto: #e7ecf2; --texto-2: #9aa5b4; --borda: #263040;
    --ok: #4ade80; --ok-fundo: #0f2a1a; --erro: #f87171; --erro-fundo: #2c1212;
    --sombra: 0 1px 2px rgba(0, 0, 0, .4);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 16px/1.5 var(--fonte); color: var(--texto); background: var(--fundo);
  min-height: 100vh; min-height: 100dvh;
}
body.com-menu { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
a { color: var(--cor-1); }
@media (prefers-color-scheme: dark) { a { color: color-mix(in srgb, var(--cor-1) 70%, #fff); } }
h1 { font-size: 1.45rem; line-height: 1.25; margin: 0 0 .5rem; }
h2 { font-size: 1.1rem; margin: 1.25rem 0 .5rem; }
h1 small { font-size: .9rem; font-weight: 500; color: var(--texto-2); }
code { font-size: .9em; background: var(--fundo); padding: 0 .25em; border-radius: 4px; }
[hidden] { display: none !important; }

/* topo */
.topo {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: .5rem;
  padding: calc(.6rem + env(safe-area-inset-top)) 1rem .6rem; background: var(--cor-1); color: var(--cor-1-texto);
}
.topo a { color: inherit; text-decoration: none; }
.topo-marca { display: flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1.05rem; min-width: 0; flex: 1; }
.topo-marca span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topo-logo { width: 30px; height: 30px; object-fit: contain; border-radius: 8px; background: #fff; padding: 2px; }
.topo-voltar { font-size: 1.8rem; line-height: 1; padding: 0 .4rem 0 0; }
.topo-conta { position: relative; }
.topo-conta summary { list-style: none; cursor: pointer; }
.topo-conta summary::-webkit-details-marker { display: none; }
.avatar {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: color-mix(in srgb, var(--cor-1-texto) 22%, transparent); font-weight: 700;
}
.topo-conta-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; padding: .5rem; display: grid;
  background: var(--superficie); color: var(--texto); border: 1px solid var(--borda); border-radius: var(--raio);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.topo-conta-menu a, .topo-conta-menu .link { display: block; width: 100%; text-align: left; padding: .6rem .7rem; border-radius: 10px; color: var(--texto); }
.topo-conta-menu a:hover, .topo-conta-menu .link:hover { background: var(--fundo); }
.topo-conta-menu form { margin: 0; }
.topo-conta-nome { margin: .25rem .7rem .5rem; font-weight: 600; }
.topo-conta-nome small { display: block; font-weight: 400; color: var(--texto-2); }

/* conteúdo */
.conteudo { max-width: 640px; margin: 0 auto; padding: 1rem; }
.cartao {
  background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio);
  box-shadow: var(--sombra); padding: 1.1rem; margin-bottom: 1rem;
}
.cartao > :last-child { margin-bottom: 0; }
.cartao h2:first-child { margin-top: 0; }
.cartao.centro { text-align: center; margin-top: 12vh; }
.cartao.destaque { border-color: var(--cor-1); border-width: 2px; }
.cartao-topo { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.cartao-topo h1 { margin: 0; }
.nota { color: var(--texto-2); font-size: .92rem; }
.rodape { text-align: center; color: var(--texto-2); font-size: .75rem; margin: 1rem 0 1.5rem; }

/* avisos */
.aviso { padding: .7rem .9rem; border-radius: 10px; margin: 0 0 1rem; font-weight: 500; }
.aviso.ok { background: var(--ok-fundo); color: var(--ok); }
.aviso.erro { background: var(--erro-fundo); color: var(--erro); }

/* formulários */
.form { display: grid; gap: .9rem; }
.campo { display: grid; gap: .3rem; }
.campo > span:first-child { font-weight: 600; font-size: .92rem; }
.campo small { color: var(--texto-2); font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=time],
input[type=number], input:not([type]), select, textarea {
  width: 100%; font: inherit; font-size: 16px; /* 16px: o iPhone não dá zoom ao tocar */
  padding: .7rem .8rem; border: 1px solid var(--borda); border-radius: 10px; background: var(--superficie); color: var(--texto);
}
input:focus-visible, select:focus-visible, textarea:focus-visible, .botao:focus-visible, a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--cor-1) 55%, transparent); outline-offset: 1px;
}
input[type=color] { width: 100%; height: 46px; padding: 3px; border: 1px solid var(--borda); border-radius: 10px; background: var(--superficie); }
input[type=file] { font: inherit; font-size: .9rem; }
.campos-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.marcar { display: flex; gap: .55rem; align-items: flex-start; }
.marcar input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--cor-1); }
.marcar small { color: var(--texto-2); }
.prefixo { display: flex; align-items: stretch; }
.prefixo > span { display: flex; align-items: center; padding: 0 .6rem; border: 1px solid var(--borda); border-right: 0;
  border-radius: 10px 0 0 10px; background: var(--fundo); color: var(--texto-2); font-size: .85rem; white-space: nowrap; }
.prefixo input { border-radius: 0 10px 10px 0; min-width: 0; }

/* botões */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 46px; padding: .65rem 1.1rem;
  font: inherit; font-weight: 600; border: 0; border-radius: 12px; cursor: pointer; text-decoration: none;
  background: var(--cor-1); color: var(--cor-1-texto);
}
.botao:hover { filter: brightness(1.06); }
.botao.grande { width: 100%; min-height: 52px; font-size: 1.05rem; }
.botao.pequeno { min-height: 36px; padding: .35rem .8rem; font-size: .9rem; }
.botao.secundario { background: transparent; color: var(--texto); border: 1px solid var(--borda); }
.link { background: none; border: 0; font: inherit; cursor: pointer; color: var(--cor-1); padding: 0; }

/* entrar */
.entrar { margin-top: 6vh; }
.entrar-marca { text-align: center; margin-bottom: 1rem; }
.entrar-marca img { border-radius: 18px; box-shadow: var(--sombra); }
.entrar-marca h1 { margin: .6rem 0 0; }
.entrar .botao.secundario { width: 100%; margin-top: .5rem; }

/* listas */
.lista { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.lista-linha { display: grid; gap: .1rem; padding: .75rem .85rem; border: 1px solid var(--borda); border-radius: 12px; color: var(--texto); text-decoration: none; }
.lista-linha:hover { border-color: var(--cor-1); }
.lista-linha.apagado { opacity: .6; }
.lista-titulo { font-weight: 600; }
.lista-sub { color: var(--texto-2); font-size: .88rem; overflow-wrap: anywhere; }

.codigo-grande { font: 700 1.6rem/1.2 ui-monospace, "Cascadia Mono", Menlo, monospace; letter-spacing: .05em; text-align: center;
  padding: .8rem; background: var(--fundo); border-radius: 12px; user-select: all; }

.previa-icone { display: flex; flex-direction: column; align-items: center; gap: .35rem; font-size: .8rem; color: var(--texto-2); }
.previa-icone img { border-radius: 16px; box-shadow: var(--sombra); }

.checagem { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .25rem; }
.checagem li.ok b { color: var(--ok); }
.checagem li.erro { color: var(--erro); }
.checagem small { color: var(--texto-2); }

/* menu de baixo (celular) */
.menu-baixo {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: space-around;
  background: var(--superficie); border-top: 1px solid var(--borda); padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom));
}
.menu-baixo a { flex: 1; display: grid; justify-items: center; gap: .1rem; padding: .3rem; font-size: .75rem; color: var(--texto-2); text-decoration: none; border-radius: 10px; }
.menu-baixo a[aria-current="page"] { color: var(--cor-1); font-weight: 700; }
.ic { width: 24px; height: 24px; background: currentColor; -webkit-mask: var(--ic) center/contain no-repeat; mask: var(--ic) center/contain no-repeat; }
.ic-inicio { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 10.5 12 3l9 7.5V21h-6v-6H9v6H3z'/%3E%3C/svg%3E"); }

@media (min-width: 720px) {
  .conteudo { padding: 1.5rem; }
  .cartao { padding: 1.4rem; }
}
body.solto .conteudo { max-width: 760px; }
