/* Portal Empório Casa Moraes — estilos comuns (entrada, início, administração). */
:root {
  --fundo: #f7f1e8; --cartao: #fff; --texto: #0f172a; --suave: #64748b; --borda: #e6dccd; --escuro: #0f172a;
  --ok: #15803d; --ok-fundo: #ecfdf3; --aviso: #a16207; --aviso-fundo: #fefce8; --erro: #b91c1c; --erro-fundo: #fef2f2;
  --azul: #1d4ed8; --azul-fundo: #eff6ff; --laranja: #e8572a; --raio: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--fundo); color: var(--texto); font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.esconde { display: none !important; }
.suave { color: var(--suave); }
a { color: var(--azul); }

/* ── telas de porta (entrar, pedir cadastro, convite, senhas) — versão terracota aprovada por ele em 16/10:
      foto dos produtos à esquerda, papel claro à direita. O início (body.dentro) não tem o painel. ── */
.palco { min-height: 100vh; min-height: 100dvh; position: relative; overflow-x: hidden;
  display: grid; grid-template-columns: minmax(0, 59fr) minmax(0, 41fr); grid-template-rows: auto 1fr; }
.faixa-teste { grid-column: 1 / -1; position: relative; z-index: 2; background: #fde68a; color: #713f12; text-align: center; font-weight: 700; font-size: 13px; padding: 6px; letter-spacing: .04em; }
.dentro .palco { display: block; }
.dentro .marca { display: none; }

.marca { position: sticky; top: 0; height: 100vh; height: 100dvh; color: #f8f1e5;
  background: #38231d url("/estatico/img/fundo-produtos.jpg") center bottom / cover no-repeat;
  padding: clamp(30px, 5.8vh, 58px) clamp(27px, 5.6vw, 96px); }
.marca::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(29,14,10,.18), rgba(29,14,10,.06) 50%, transparent 70%); }
.marca > * { position: relative; }
.marca-logo { display: block; width: clamp(245px, 21vw, 365px); height: auto; }
.marca-frase { margin-top: clamp(48px, 6.2vh, 72px); }
.marca-tit { font: 400 clamp(37px, 5.05vw, 88px)/1.04 Georgia, "Times New Roman", serif; letter-spacing: -.04em; white-space: nowrap; margin: 0; }
.marca-sub { font-size: clamp(15px, 1.72vw, 28px); line-height: 1.4; margin: 12px 0 0; }

.lado { --terra: #884b34; --terra-2: #703b2a; --tinta: #16231e; --cinza: #747780; --linha: #cdd0d5;
  background: #faf8f3; color: var(--tinta); display: flex; flex-direction: column; min-width: 0; }
.dentro .lado { background: var(--papel); color: var(--tinta); }

.centro { flex: 1; display: flex; align-items: center; justify-content: center; padding: clamp(40px, 9vh, 96px) clamp(24px, 5.1vw, 88px) 24px; }
.caixa { width: 100%; max-width: 464px; }
.caixa .logo { display: none; }   /* o logo já está no painel da foto */
.olho { margin: 0 0 26px; text-align: center; text-transform: uppercase; letter-spacing: .29em; font-size: clamp(11px, .77vw, 13px); font-weight: 600; }
.caixa h2 { margin: 0 0 12px; text-align: center; font: 400 clamp(34px, 3.4vw, 56px)/1.08 Georgia, "Times New Roman", serif; letter-spacing: -.045em; }
.caixa .sub { text-align: center; color: var(--cinza); margin: 0 0 clamp(30px, 4.4vh, 44px); font-size: clamp(15px, 1.2vw, 19px); }
.lado .campo + .campo { margin-top: 22px; }
.lado label { font-size: 16px; margin-bottom: 10px; }
.lado input, .lado select { min-height: 56px; border: 1px solid var(--linha); border-radius: 9px; background: rgba(255,255,255,.7); padding: 0 17px; font-size: 17px; }
.lado select { padding-right: 42px; background: #fff 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='%23707782' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 18px center; }
.lado input::placeholder { color: #999ba5; }
.lado input:focus, .lado select:focus { outline: none; border-color: var(--terra); box-shadow: 0 0 0 3px rgba(136,75,52,.16); }
.lado .dica { color: var(--cinza); }
.senha-wrap { position: relative; }
.senha-wrap input { padding-right: 56px; }
.senha-wrap .ver { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: none; cursor: pointer; color: #707782; display: grid; place-items: center; }
.senha-wrap .ver svg, .pe svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.esqueci { text-align: right; margin-top: 14px; }
#modoChave, #modoEmail { margin-top: 22px; }
.dica-equipe { margin: 18px 0 0; padding: 12px 14px; border-radius: 9px; background: #f2ece5; color: #5c4a3f; font-size: 14px; line-height: 1.45; }
.lado .link { color: var(--tinta); font-size: 15px; text-underline-offset: 3px; }
.lado .link:hover { color: var(--terra); }
.lado .btn.primario { background: var(--terra); border-color: var(--terra); border-radius: 8px; font-weight: 500; }
.lado .btn.primario:hover { background: var(--terra-2); }
.lado .btn.largo { min-height: 64px; margin-top: 30px; font-size: 19px; }
.lado .btn.seta { position: relative; }
.lado .btn.seta::after { content: "→"; position: absolute; right: 28px; font-size: 26px; font-weight: 300; line-height: 1; }
.lado .troca { margin-top: 24px; font-size: 16px; color: var(--tinta); }
.lado .troca .link { font-size: 16px; }
.pe { display: flex; align-items: center; justify-content: center; gap: 10px; width: min(100% - 48px, 400px); margin: 0 auto 32px;
  border-top: 1px solid #e4e1dc; padding-top: 20px; color: #858995; font-size: 14px; }
.pe svg { width: 17px; height: 17px; }

/* mensagens e campos comuns */
.campo + .campo { margin-top: 14px; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.dica { color: var(--suave); font-size: 13px; margin-top: 6px; }
input, select, textarea { width: 100%; font: inherit; color: inherit; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 14px; min-height: 48px; }
select { -webkit-appearance: none; appearance: none; padding-right: 42px; cursor: pointer;
  background: #fff 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='%2364748b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 16px center; }
input:focus, select:focus { outline: 2px solid var(--azul); outline-offset: 1px; border-color: transparent; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 10px;
  border: 1px solid #e2e8f0; background: #fff; color: var(--texto); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: #f8fafc; }
.btn.primario { background: var(--escuro); color: #fff; border-color: var(--escuro); }
.btn.primario:hover { background: #1e293b; }
.btn.perigo { color: var(--erro); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.largo { width: 100%; margin-top: 20px; min-height: 48px; }
.link { background: none; border: 0; color: var(--azul); font: inherit; font-size: 14px; padding: 4px 0; cursor: pointer; text-decoration: underline; }
.troca { text-align: center; margin-top: 14px; font-size: 14px; color: var(--suave); }
.msg { border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; font-weight: 500; font-size: 15px; }
.msg.ok { background: var(--ok-fundo); color: var(--ok); border: 1px solid #bbf7d0; }
.msg.erro { background: var(--erro-fundo); color: var(--erro); border: 1px solid #fecaca; }
.msg.info { background: var(--azul-fundo); color: var(--azul); border: 1px solid #bfdbfe; }
.lado .msg.info { background: #f6ede6; color: #74412e; border-color: #e7cfc0; }

/* ── início e Administração: mesma família da entrada (terracota, 16/10) ── */
:root { --terra: #884b34; --terra-2: #703b2a; --marrom: #38231d; --papel: #faf8f3; --tinta: #16231e; --cinza: #6f7178; --linha: #e4e1dc; }
.dentro { background: var(--papel); color: var(--tinta); }
.topo { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 18px; padding: 14px clamp(16px, 4vw, 48px);
  background: var(--marrom); color: #f8f1e5; }
.topo .logo { height: 38px; width: auto; display: block; }
.topo .nome-portal { font: 400 19px/1 Georgia, "Times New Roman", serif; letter-spacing: -.01em; white-space: nowrap; padding-left: 18px; border-left: 1px solid rgba(248,241,229,.25); }
.topo .esp { flex: 1; }
.topo .btn { background: transparent; color: #f8f1e5; border-color: rgba(248,241,229,.35); border-radius: 8px; font-weight: 500; white-space: nowrap; }
.topo .btn:hover { background: rgba(248,241,229,.1); }

.saudacao { position: relative; color: #f8f1e5; background: var(--marrom) url("/estatico/img/fundo-produtos.jpg") center 58% / cover no-repeat;
  padding: clamp(36px, 7vh, 64px) clamp(16px, 4vw, 48px) clamp(80px, 13vh, 120px); }
.saudacao::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(29,14,10,.78), rgba(29,14,10,.35) 60%, rgba(29,14,10,.1)); }
.saudacao > * { position: relative; max-width: 1080px; margin-left: auto; margin-right: auto; }
.saudacao h1 { font: 400 clamp(36px, 4.6vw, 64px)/1.04 Georgia, "Times New Roman", serif; letter-spacing: -.035em; margin: 0 auto; }
.saudacao p { margin: 10px auto 0; font-size: clamp(15px, 1.3vw, 19px); color: rgba(248,241,229,.88); }

.conteudo { max-width: 1176px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) 72px; }
.conteudo .msg { margin-top: 20px; }
.rotulo { font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--cinza); margin: 36px 0 14px; }
.grade-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: -48px; position: relative; }
.app { display: flex; flex-direction: column; gap: 6px; text-align: left; background: #fff; border: 1px solid var(--linha); border-radius: 12px;
  padding: 22px 22px 18px; min-height: 178px; cursor: pointer; font: inherit; color: inherit; box-shadow: 0 10px 28px rgba(56,35,29,.08);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.app:hover { transform: translateY(-2px); border-color: #d9c3b6; box-shadow: 0 16px 34px rgba(56,35,29,.13); }
.app:focus-visible { outline: 3px solid rgba(136,75,52,.35); outline-offset: 2px; }
.app .icone { width: 40px; height: 40px; border-radius: 10px; background: #f4ebe4; color: var(--terra); display: grid; place-items: center; margin-bottom: 8px; }
.app .icone svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.app b { font: 400 22px/1.15 Georgia, "Times New Roman", serif; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app small { color: var(--cinza); font-size: 14px; line-height: 1.4; }
.app .selo { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--cinza); white-space: nowrap; }
.app .selo .abrir { color: var(--terra); font-weight: 600; font-size: 15px; }
.app.breve { cursor: default; background: var(--papel); box-shadow: none; border-style: dashed; }
.app.breve:hover { transform: none; border-color: var(--linha); }
.app.breve .icone { background: #efece7; color: #9a9ca3; }
.app.breve b { color: #6f7178; }
.app .cadeado { display: inline-flex; align-items: center; gap: 5px; }
.app .cadeado svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dentro .msg.ok { background: #eef5ef; }
.dentro .pe-dentro { text-align: center; color: #9a9ca3; font-size: 13px; padding: 0 16px 28px; }

@media (max-width: 1100px) {
  .marca { padding-left: 5vw; padding-right: 3vw; }
  .marca-tit { font-size: clamp(33px, 4.5vw, 58px); }
  .olho { letter-spacing: .17em; }
}
@media (max-width: 760px) {
  .palco { display: block; }
  /* no celular a foto fica alinhada por cima, para a parede escura ficar atrás da frase */
  .marca { position: relative; height: auto; min-height: 340px; padding: 24px 22px; background-position: center top; }
  .marca::before { background: linear-gradient(180deg, rgba(29,14,10,.5), rgba(29,14,10,.32) 55%, transparent 78%); }
  .marca-logo { width: min(50vw, 210px); }
  .marca-frase { margin-top: 22px; }
  .marca-tit { font-size: clamp(26px, 7.4vw, 40px); }
  .marca-sub { font-size: 15px; }
  .centro { padding: 40px 20px 20px; }
  .caixa h2 { font-size: clamp(32px, 9vw, 44px); }
  .topo { gap: 10px; padding: 10px 14px; }
  .topo .logo { height: 30px; }
  .topo .nome-portal { display: none; }
  .topo .btn { min-height: 38px; padding: 6px 10px; font-size: 14px; }
  .saudacao { padding: 28px 18px 76px; background-position: center 62%; }
  .saudacao::before { background: linear-gradient(180deg, rgba(29,14,10,.82), rgba(29,14,10,.62) 70%, rgba(29,14,10,.4)); }
  .grade-apps { grid-template-columns: 1fr; }
  .app { min-height: 0; }
}
.app-icone { width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 14px; background: #f4ebe4; color: var(--terra); display: grid; place-items: center; }
.app-icone svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ── a porta do Estoque (senha do app): a arte de caixotes e balança, no lugar da foto (17/10) ── */
.marca-estoque { display: none; }
.porta-estoque .marca { background: #f3e9da; color: var(--tinta); }
.porta-estoque .marca::before { background: radial-gradient(rgba(120,82,45,.13) 1px, transparent 1.3px) 0 0 / 22px 22px; }
.porta-estoque .marca > .marca-logo, .porta-estoque .marca > .marca-frase { display: none; }
.porta-estoque .marca-estoque { display: block; position: static; }
.marca-logo-escura { display: block; width: clamp(220px, 19vw, 330px); height: auto; mix-blend-mode: multiply; }
.marca-estoque .marca-tit { margin-top: clamp(40px, 5.6vh, 64px); white-space: normal; font-size: clamp(36px, 4.4vw, 76px); color: #3b2418; }
.marca-estoque .marca-sub { max-width: 30ch; color: #5c4a3f; }
.arte-estoque { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-end; justify-content: space-between; pointer-events: none; }
.arte-estoque svg { width: 47%; height: auto; display: block; }
.arte-estoque svg:last-child { margin-bottom: 6%; }
@media (max-width: 760px) {
  .porta-estoque .marca { min-height: 0; padding-bottom: 150px; }
  .marca-logo-escura { width: min(46vw, 190px); }
  .marca-estoque .marca-tit { margin-top: 18px; font-size: clamp(28px, 8vw, 40px); }
  .marca-estoque .marca-sub { font-size: 15px; }
  .arte-estoque { justify-content: center; gap: 4%; }
  .arte-estoque svg { width: 40%; max-width: 200px; }
}

/* ── modo noturno (18/10, pedido dele: "todo o portal deve ter modo noturno") ──
   Igual ao do Contas a Pagar: segue o claro/escuro do aparelho, sem botão. Tons do Estoque e da Administração
   (terracota #b68471, fundo #0f1113, cartões #181b1e). Tudo aqui dentro só vale no escuro: o claro ficou como era.
   As fotos (painel da entrada e saudação do Início) e o cabeçalho marrom já são escuros e não mudam.
   A arte da porta do Estoque continua clara: é uma ilustração, como a foto, e o logo dela só existe em fundo claro. */
:root { color-scheme: light dark; }
@media (prefers-color-scheme: dark) {
  :root {
    --fundo: #0f1113; --cartao: #181b1e; --texto: #eceae5; --suave: #878c93; --borda: #2a2e34; --escuro: #b68471;
    --ok: #5cae8b; --ok-fundo: #152b23; --aviso: #cfa348; --aviso-fundo: #2e2716; --erro: #d4685a; --erro-fundo: #2f1a17;
    --azul: #8fb3ec; --azul-fundo: #16213a;
    --terra: #b68471; --terra-2: #c69886; --papel: #0f1113; --tinta: #eceae5; --cinza: #878c93; --linha: #2a2e34;
  }
  .lado { --terra: #b68471; --terra-2: #c69886; --tinta: #eceae5; --cinza: #878c93; --linha: #3a3f46; background: #0f1113; }
  .lado input, .lado select { background-color: #181b1e; }
  .lado input::placeholder { color: #6b7078; }
  .lado input:focus, .lado select:focus { box-shadow: 0 0 0 3px rgba(182,132,113,.3); }
  .senha-wrap .ver { color: #9a9fa6; }
  .dica-equipe { background: #231d1a; color: #cdbcb0; }
  .pe { border-top-color: #2a2e34; color: #878c93; }
  input, select, textarea { background-color: #181b1e; border-color: #3a3f46; }
  .btn { background: #181b1e; border-color: #3a3f46; }
  .btn:hover { background: #23272c; }
  .btn.primario { background: var(--terra); border-color: var(--terra); color: #fff; }
  .btn.primario:hover { background: var(--terra-2); border-color: var(--terra-2); }
  .msg.ok { border-color: #2b5a47; }
  .msg.erro { border-color: #5a2a23; }
  .msg.info { border-color: #2a3c5e; }
  .lado .msg.info { background: #2a1d17; color: #e0b9a6; border-color: #4a3328; }
  .app { background: #181b1e; box-shadow: 0 10px 28px rgba(0,0,0,.35); }
  .app:hover { border-color: #5a4036; box-shadow: 0 16px 34px rgba(0,0,0,.45); }
  .app:focus-visible { outline-color: rgba(182,132,113,.45); }
  .app .icone, .app-icone { background: #2e1e18; }
  .app.breve .icone { background: #23272c; color: #878c93; }
  .app.breve b { color: #878c93; }
  .dentro .msg.ok { background: #152b23; }
  .dentro .pe-dentro { color: #6b7078; }
  .porta-estoque .marca { color: #16231e; }
}
