/* assets/app.css - Painel de afiliados Comanda+ (afiliados.comanda.plus) */
:root { --laranja: #ff7f27; --laranja-esc: #e65100; --texto: #263238; --mudo: #6b7780; --borda: #e3e7ea; --fundo: #fff7f1; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--texto); background: var(--fundo); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--laranja-esc); }
.af-topo { background: #fff; border-bottom: 1px solid var(--borda); padding: 8px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: 0; z-index: 5; }
.af-topo-esq { display: flex; align-items: center; gap: 4px; min-width: 0; }
.af-marca { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--texto); font-size: 16px; padding: 4px 6px; border-radius: 10px; min-width: 0; }
.af-marca span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-marca:hover { background: var(--fundo); }
.af-marca img { border-radius: 8px; flex: 0 0 auto; }
.af-marca b { color: var(--laranja); }
.af-voltar { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; color: var(--mudo); text-decoration: none; flex: 0 0 auto; }
.af-voltar svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.af-voltar:hover { background: var(--fundo); color: var(--laranja-esc); }
.af-sair { margin: 0; display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.af-quem { color: var(--mudo); font-size: 13.5px; max-width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-sair button { background: none; border: 1px solid var(--borda); border-radius: 8px; padding: 5px 10px; cursor: pointer; color: var(--mudo); font: inherit; font-size: 13.5px; }
.af-sair button:hover { color: var(--laranja-esc); border-color: #ffd2b3; }
.af-entrar-link { text-decoration: none; font-weight: 700; font-size: 14px; padding: 6px 12px; border: 1px solid var(--laranja); border-radius: 8px; }
.af-main { width: 100%; max-width: 860px; margin: 0 auto; padding: 16px; flex: 1; }
.af-cartao { background: #fff; border: 1px solid var(--borda); border-radius: 14px; padding: 20px; margin-bottom: 16px; }
.af-estreito { max-width: 520px; margin-left: auto; margin-right: auto; }
h1 { font-size: 22px; margin: 0 0 6px; }
h2 { font-size: 18px; margin: 0 0 6px; }
.af-sub { color: var(--mudo); margin: 0 0 14px; }
.af-mudo { color: var(--mudo); font-size: 13.5px; }
.af-centro { text-align: center; }
.af-form { display: flex; flex-direction: column; gap: 12px; }
.af-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 14px; }
.af-form input, .af-form select { font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid #cfd8dc; border-radius: 10px; background: #fff; width: 100%; }
.af-form input:focus, .af-form select:focus { outline: 2px solid #ffd2b3; border-color: var(--laranja); }
.af-linha { display: flex; gap: 10px; }
.af-linha > label { flex: 1; }
.af-linha > label.af-uf { flex: 0 0 72px; }
.af-check { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 400 !important; }
.af-check input { width: auto; }
.af-sufixo { display: flex; align-items: stretch; }
.af-sufixo input { border-radius: 10px 0 0 10px; }
.af-sufixo em { font-style: normal; font-weight: 400; background: #f5f5f5; border: 1px solid #cfd8dc; border-left: 0; border-radius: 0 10px 10px 0; padding: 10px; color: var(--mudo); }
.af-btn { display: inline-block; text-align: center; background: var(--laranja); color: #fff; border: 0; border-radius: 10px; padding: 12px 18px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.af-btn:hover { background: var(--laranja-esc); color: #fff; }
.af-btn:disabled { opacity: .6; cursor: wait; }
.af-btn-inline { padding: 9px 14px; }
.af-btn-cinza { background: #546e7a; }
.af-btn-cinza:hover { background: #37474f; }
.af-btn-verde { background: #2e7d32; }
.af-btn-verde:hover { background: #1b5e20; }
.af-botoes { display: flex; gap: 10px; flex-wrap: wrap; }
.af-aviso { border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; background: #e8f5e9; color: #1b5e20; }
.af-aviso.erro { background: #ffebee; color: #b71c1c; }
.af-aviso.info { background: #e3f2fd; color: #0d47a1; }
.af-isca { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.af-codigo { font-family: ui-monospace, Menlo, monospace; letter-spacing: 2px; background: var(--fundo); padding: 1px 6px; border-radius: 6px; }
.af-link label { font-weight: 700; display: block; margin-bottom: 6px; }
.af-link-linha { display: flex; gap: 8px; }
.af-link-linha input { flex: 1; min-width: 0; font: inherit; padding: 10px 12px; border: 1px solid #cfd8dc; border-radius: 10px; background: #fafafa; }
.af-link-acoes { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.af-grade { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
@media (min-width: 720px) { .af-grade { grid-template-columns: repeat(4, 1fr); } }
.af-num { background: #fff; border: 1px solid var(--borda); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; }
.af-num small { color: var(--mudo); font-size: 12.5px; }
.af-num b { font-size: 22px; margin: 2px 0; }
.af-acoes-rapidas { display: flex; gap: 10px; flex-wrap: wrap; }
.af-lista { list-style: none; margin: 0; padding: 0; }
.af-lista li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--borda); }
.af-lista li:last-child { border-bottom: 0; }
.af-lista small { display: block; color: var(--mudo); font-size: 13px; }
.af-erro-txt { color: #b71c1c !important; }
.af-tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.af-tag.verde { background: #e8f5e9; color: #2e7d32; }
.af-tag.azul { background: #e3f2fd; color: #1565c0; }
.af-tag.amarelo { background: #fff3e0; color: #e65100; }
.af-tag.vermelho { background: #ffebee; color: #c62828; }
.af-tag.cinza { background: #eceff1; color: #546e7a; }
.af-tabela { overflow-x: auto; }
.af-tabela table { width: 100%; border-collapse: collapse; font-size: 14px; }
.af-tabela th, .af-tabela td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--borda); vertical-align: top; }
.af-tabela .num { text-align: right; white-space: nowrap; }
.af-tabela tr.af-neg td { color: #b71c1c; }
.af-dados { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin: 0 0 8px; }
.af-dados dt { color: var(--mudo); font-size: 12.5px; }
.af-dados dd { margin: 0; font-weight: 600; word-break: break-word; }
.af-texto ol { padding-left: 20px; }
.af-texto li { margin-bottom: 10px; }
.af-rodape { text-align: center; color: var(--mudo); font-size: 13px; padding: 18px 10px 24px; }
.af-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #263238; color: #fff; padding: 10px 16px; border-radius: 10px; opacity: 0; transition: .25s; z-index: 10; }
.af-toast.vis { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 520px) { .af-linha { flex-direction: column; } .af-linha > label.af-uf { flex: 1; } .af-dados { grid-template-columns: 1fr; } }

/* Tela de entrar (index.php): mesmo padrao da tela de login do sistema Comanda+ (code/dev/login.php):
   fundo #fafafa, card branco 360px com sombra, logo 32px + "Comanda+" laranja, campos com placeholder, botao laranja. */
body.af-login-corpo { background: #fafafa; color: #333; font-family: 'Segoe UI', sans-serif; }
.af-login-corpo .af-main { max-width: none; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 15px 8px; }
.af-login-corpo .af-main > .af-aviso { width: 100%; max-width: 360px; text-align: center; }
.af-login { width: 100%; max-width: 360px; }
.af-login-card { background: #fff; border-radius: 12px; box-shadow: 0 5px 15px rgba(0, 0, 0, .22); padding: 45px 45px 35px; display: flex; flex-direction: column; }
.af-login-marca { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 10px; }
.af-login-marca img { display: block; width: 32px; height: 32px; }
.af-login-marca h1 { margin: 0; font-size: 24px; line-height: 1; font-weight: 700; color: #ff7f27; }
.af-login-sub { text-align: center; color: #666; font-size: 14px; margin: 0 0 20px; }
.af-login-card .af-aviso { text-align: center; }
.af-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.af-login-input { width: 100%; padding: 10px; margin-bottom: 15px; border: 1px solid #ddd; border-radius: 8px; background: #fff; font: 15px 'Segoe UI', sans-serif; color: #333; }
.af-login-input:focus { outline: none; border-color: #ff7f27; box-shadow: 0 0 3px rgba(255, 127, 39, .4); }
.af-login-senha { position: relative; }
.af-login-senha .af-login-input { padding-right: 44px; }
.af-login-olho { position: absolute; right: 6px; top: 6px; width: 32px; height: 28px; display: flex; align-items: center; justify-content: center; border: 0; background: none; padding: 0; cursor: pointer; }
.af-login-olho svg { width: 20px; height: 20px; stroke: #777; stroke-width: 2; fill: none; }
.af-login-olho .af-olho-fechado, .af-login-olho.ativo .af-olho-aberto { display: none; }
.af-login-olho.ativo .af-olho-fechado { display: block; }
.af-login-lembrar { display: flex; align-items: center; gap: 10px; margin: -3px 0 15px; font-size: 14px; color: #555; cursor: pointer; user-select: none; }
.af-login-lembrar input { width: 18px; height: 18px; margin: 0; accent-color: #ff7f27; cursor: pointer; flex: none; }
.af-login-entrar { width: 100%; padding: 12px; border: 0; border-radius: 8px; background: #ff7f27; color: #fff; font: bold 16px 'Segoe UI', sans-serif; cursor: pointer; transition: background-color .2s; }
.af-login-entrar:hover:not(:disabled) { background: #e66d1f; }
.af-login-entrar:disabled { opacity: .6; cursor: wait; }
.af-login-erro { color: #e53935; font-weight: 700; font-size: 14px; text-align: center; margin: 15px 0 0; min-height: 0; }
.af-login-erro:empty { display: none; }
.af-login-divisor { display: flex; align-items: center; gap: 10px; margin: 20px 0 12px; color: #666; font-size: 13px; }
.af-login-divisor::before, .af-login-divisor::after { content: ''; flex: 1; height: 1px; background: #eee; }
.af-login-cadastro { display: block; text-align: center; padding: 11px; border: 1px solid #ff7f27; border-radius: 8px; color: #ff7f27; font-weight: 700; font-size: 15px; text-decoration: none; transition: background-color .2s; }
.af-login-cadastro:hover { background: #fff3ea; color: #e66d1f; }
.af-login-ajuda { text-align: center; margin: 15px 0 0; }
.af-login-ajuda a { color: #999; font-size: 12px; text-decoration: none; }
.af-login-ajuda a:hover { text-decoration: underline; }
.af-login-convite { text-align: center; color: #888; font-size: 13px; line-height: 1.45; margin: 16px 6px 0; }
.af-login-convite a { color: #e66d1f; white-space: nowrap; }
.af-login-corpo .af-rodape { color: #999; font-size: 12px; }
.af-login-corpo .af-rodape a { color: #999; }
@media (max-width: 380px) { .af-login-card { padding: 32px 22px 26px; } }

/* 2026-11-13 (Mariel 13:18): Inicio em blocos-botao, sem barra de botoes; seta de voltar so em tela de 2o nivel */
.af-ola { margin: 6px 2px 14px; }
.af-ola h1 { font-size: 24px; }
.af-ola .af-sub { margin: 0; }
.af-blocos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
@media (min-width: 720px) { .af-blocos { grid-template-columns: repeat(3, 1fr); } }
.af-bloco { display: flex; flex-direction: column; gap: 2px; background: #fff; border: 1px solid var(--borda); border-radius: 16px; padding: 16px 14px 14px; text-decoration: none; color: var(--texto); min-height: 132px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.af-bloco:hover, .af-bloco:focus-visible { border-color: #ffc59e; box-shadow: 0 4px 14px rgba(255, 127, 39, .14); transform: translateY(-1px); outline: none; }
.af-bloco:active { transform: translateY(0); }
.af-bloco-ic { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: #fff1e6; color: var(--laranja-esc); margin-bottom: 8px; }
.af-bloco-nova .af-bloco-ic { background: var(--laranja); color: #fff; }
.af-bloco-comissoes .af-bloco-ic { background: #e8f5e9; color: #2e7d32; }
.af-bloco-link .af-bloco-ic { background: #e3f2fd; color: #1565c0; }
.af-bloco-dados .af-bloco-ic { background: #f3e5f5; color: #6a1b9a; }
.af-bloco-regras .af-bloco-ic { background: #eceff1; color: #455a64; }
.af-bloco-tit { font-weight: 800; font-size: 16px; }
.af-bloco-l1 { font-size: 14px; font-weight: 600; color: var(--texto); }
.af-bloco-l2 { font-size: 12.5px; color: var(--mudo); }
.af-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.af-cab h1 { margin: 0; }
.af-vazio { text-align: center; padding: 18px 6px 6px; }
.af-grade-2 { grid-template-columns: 1fr 1fr !important; }
.af-passos { margin: 6px 0 0; padding-left: 20px; }
.af-passos li { margin-bottom: 8px; }
.af-quebra { word-break: break-all; }
/* nova loja: mesmo formulario da tela Nova loja do painel */
.af-nl { display: grid; gap: 0 16px; }
@media (min-width: 860px) { .af-nl { grid-template-columns: 3fr 2fr; align-items: start; } }
.af-endereco { display: flex; align-items: stretch; }
.af-endereco input { border-radius: 0 !important; min-width: 0; }
.af-endereco em { font-style: normal; font-weight: 400; background: #f5f5f5; border: 1px solid #cfd8dc; padding: 10px 8px; color: var(--mudo); font-size: 14px; white-space: nowrap; }
.af-endereco em:first-child { border-right: 0; border-radius: 10px 0 0 10px; }
.af-endereco em:last-child { border-left: 0; border-radius: 0 10px 10px 0; }
@media (max-width: 420px) { .af-endereco em:first-child { display: none; } .af-endereco input { border-radius: 10px 0 0 10px !important; } }
.af-sub-info { margin: -6px 0 0; font-size: 13px; color: var(--mudo); }
.af-sub-info.ok { color: #2e7d32; font-weight: 600; }
.af-sub-info.ruim { color: #c62828; font-weight: 600; }
.af-detalhes { border: 1px solid var(--borda); border-radius: 10px; padding: 8px 12px; }
.af-detalhes summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.af-detalhes[open] summary { margin-bottom: 8px; }
.af-detalhes .af-linha { margin-bottom: 10px; }
.af-aviso ul { margin: 6px 0 0; padding-left: 18px; }
.af-js .af-sem-js { display: none !important; }
/* meus dados */
.af-linhas { list-style: none; margin: 0 0 8px; padding: 0; }
.af-linhas li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--borda); }
.af-linhas li:last-child { border-bottom: 0; }
.af-linhas li > div { min-width: 0; }
.af-linhas small { display: block; color: var(--mudo); font-size: 12.5px; }
.af-form-linha { flex-direction: row !important; align-items: flex-end; flex-wrap: wrap; }
.af-form-linha label { flex: 1 1 180px; }
.af-codigo-input { font-family: ui-monospace, Menlo, monospace !important; font-size: 22px !important; letter-spacing: 6px; text-align: center; }
/* modais (dialog nativo; sem alert/confirm) */
.af-modal { border: 0; border-radius: 16px; padding: 0; width: min(440px, calc(100vw - 24px)); box-shadow: 0 18px 50px rgba(0, 0, 0, .28); color: var(--texto); }
.af-modal::backdrop { background: rgba(38, 50, 56, .45); }
.af-modal-corpo { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.af-modal-corpo h2 { margin: 0; }
.af-modal-corpo p { margin: 0; }
.af-modal-corpo label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 14px; }
.af-modal-corpo input, .af-modal-corpo select { font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid #cfd8dc; border-radius: 10px; background: #fff; width: 100%; }
.af-modal-botoes { justify-content: flex-end; margin-top: 4px; }
.af-modal-erro { color: #c62828; font-weight: 700; font-size: 14px; }
.af-modal-erro:empty { display: none; }
/* regras e termos */
.af-doc { max-width: 720px; margin: 0 auto; }
.af-doc-cab { background: linear-gradient(135deg, #fff 0%, #fff1e6 100%); border: 1px solid var(--borda); border-radius: 16px; padding: 22px 20px; margin-bottom: 16px; }
.af-doc-sobre { margin: 0 0 4px; color: var(--laranja-esc); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.af-doc-cab h1 { font-size: 26px; }
.af-doc-cab .af-sub { margin: 4px 0 0; }
.af-doc-indice { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.af-doc-indice a { background: #fff; border: 1px solid var(--borda); border-radius: 999px; padding: 4px 10px; font-size: 13px; text-decoration: none; color: var(--texto); }
.af-doc-indice a:hover { border-color: #ffc59e; color: var(--laranja-esc); }
.af-doc-sec { background: #fff; border: 1px solid var(--borda); border-radius: 14px; padding: 18px 20px; margin-bottom: 12px; scroll-margin-top: 70px; }
.af-doc-sec h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 10px; }
.af-doc-n { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--laranja); color: #fff; font-size: 14px; flex: 0 0 auto; }
.af-doc-lista { margin: 0; padding-left: 18px; }
.af-doc-lista li { margin-bottom: 8px; line-height: 1.55; }
.af-doc-itens { list-style: none; padding-left: 0; }
.af-doc-item-n { color: var(--mudo); font-weight: 700; font-size: 13px; margin-right: 4px; }
.af-doc-alerta { border-color: #ffd2b3; background: #fffaf6; }
.af-passos-num li::marker { color: var(--laranja-esc); font-weight: 800; }
.af-doc-acoes { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
@media (max-width: 400px) { .af-quem { display: none; } .af-marca { font-size: 15px; } }

/* 2026-11-13 (2FA por codigo): botao com cara de link dentro do texto do modal; tela Esqueci minha senha. */
.af-link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--laranja-esc); font-weight: 700; text-decoration: underline; cursor: pointer; }
.af-login-card .af-codigo-input { text-align: center; }
.af-login-texto { margin: 0 0 12px; color: var(--mudo); font-size: 14px; text-align: center; }
.af-login-ajuda .af-link-btn { color: #999; font-size: 12px; font-weight: 400; text-decoration: none; }
.af-login-ajuda .af-link-btn:hover { text-decoration: underline; }
.af-login-ok { color: #2e7d32; font-weight: 600; font-size: 14px; text-align: center; margin: 0 0 12px; }
/* 2026-11-14 (C+3): "Ja tenho um codigo" no Esqueci minha senha (codigo que o suporte mandou ou pagina fechada) */
.af-login-card .af-esqueci-tenho { display: block; margin: 14px auto 0; font-size: 14px; color: var(--laranja-esc); }
