/* ================================================
   MAXEMM — Início do MEI (visual premium, pensado primeiro para o celular)
   ================================================ */
.mx { --mx-ouro: #ffffff; --mx-ouro2: #ffffff; max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 14px; font-family: var(--f-corpo, 'Inter', sans-serif); }
.mx * { box-sizing: border-box; }
.mx h1, .mx h2, .mx h3 { font-family: var(--f-titulo, 'Poppins', sans-serif); margin: 0; letter-spacing: -.02em; }
.mx :where(p) { margin: 0; }
.mx svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Cartão de destaque */
.mx-hero { position: relative; overflow: hidden; border-radius: var(--raio); padding: 22px 20px 20px; color: #fff; background: var(--tinta-fundo); box-shadow: var(--sombra-2); }
.mx-hero::after { content: ''; position: absolute; right: -60px; bottom: -80px; width: 220px; height: 220px; border-radius: 50%; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 0 0 38px rgba(255,255,255,.025); }
.mx-hero-topo { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; position: relative; z-index: 1; }
.mx-selo { font-size: 11px; font-weight: 700; letter-spacing: .16em; padding: 5px 11px; border-radius: 99px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); }
.mx-hero-ano { font-size: 12px; letter-spacing: .12em; color: rgba(255,255,255,.62); font-weight: 600; }
.mx-hero h1 { font-size: 27px; font-weight: 600; line-height: 1.15; position: relative; z-index: 1; }
.mx-hero-sub { font-size: 14px; color: rgba(255,255,255,.72); margin: 6px 0 20px; line-height: 1.45; position: relative; z-index: 1; }
.mx-limite { position: relative; z-index: 1; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: var(--raio); padding: 14px 16px 15px; backdrop-filter: blur(6px); }
.mx-limite-linha { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mx-limite-linha span { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.65); font-weight: 600; }
.mx-limite-linha b { font-family: var(--f-titulo, 'Poppins', sans-serif); font-size: 24px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mx-barra { height: 9px; border-radius: 99px; background: rgba(255,255,255,.16); margin: 11px 0 9px; overflow: hidden; }
.mx-barra i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--mx-ouro), var(--mx-ouro2)); transition: width .6s ease; }
.mx-barra.alerta i { background: linear-gradient(90deg, var(--aviso-forte), var(--mx-vermelho)); }
.mx-barra.estourou i { background: var(--mx-vermelho); }
.mx-limite-nota { font-size: 12.5px; color: rgba(255,255,255,.78); line-height: 1.45; }

/* Cartões */
.mx-card { background: var(--n-0); border: 1px solid var(--cinza-borda, var(--n-200)); border-radius: var(--raio); padding: 18px 18px 20px; box-shadow: var(--sombra-2); }
.mx-card-topo { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.mx-card-topo h3 { font-size: 16px; font-weight: 600; }
.mx-card-topo p { font-size: 13px; color: var(--texto-leve, var(--n-500)); margin-top: 2px; line-height: 1.4; }
.mx-ico { width: 42px; height: 42px; border-radius: var(--raio); display: inline-flex; align-items: center; justify-content: center; background: var(--erro-suave); color: var(--azul, var(--erro)); flex: none; }

/* Guia do mês */
.mx-das-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.mx-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 99px; background: var(--n-100); color: var(--n-600); white-space: nowrap; }
.mx-pill.verde { background: var(--ok-suave); color: var(--ok); } .mx-pill.amarelo { background: var(--aviso-suave); color: var(--aviso); } .mx-pill.vermelho { background: var(--erro-suave); color: var(--erro); } .mx-pill.azul { background: var(--n-100); color: var(--info); }
.mx-valor { font-family: var(--f-titulo, 'Poppins', sans-serif); font-size: 34px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; margin: 10px 0 4px; font-variant-numeric: tabular-nums; color: var(--texto, var(--n-900)); }
.mx-sub { font-size: 13.5px; color: var(--texto-leve, var(--n-500)); line-height: 1.5; }
.mx-acoes { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.mx-btn { appearance: none; border: 1px solid var(--cinza-borda, var(--n-200)); background: var(--n-0); color: var(--texto, var(--n-900)); border-radius: var(--raio); min-height: 48px; padding: 0 18px; font-size: 15px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; transition: transform .12s ease, box-shadow .2s ease; }
.mx-btn:active { transform: scale(.98); }
.mx-btn-primario { background: var(--mx-vermelho); color: #fff; border-color: transparent; box-shadow: var(--sombra-2); }
.mx-btn-bloco { width: 100%; }
.mx-btn[disabled] { opacity: .6; }

/* Atalhos */
.mx-atalhos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mx-atalho { appearance: none; background: var(--n-0); border: 1px solid var(--cinza-borda, var(--n-200)); border-radius: var(--raio); padding: 16px 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; text-align: left; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--texto, var(--n-900)); box-shadow: var(--sombra-2); min-height: 104px; transition: transform .12s ease; }
.mx-atalho:active { transform: scale(.97); }
.mx-atalho .mx-ico { width: 40px; height: 40px; }
.mx-atalho small { display: block; font-weight: 500; font-size: 12px; color: var(--texto-leve, var(--n-500)); margin-top: 2px; }

/* Formulário */
.mx-form { display: grid; gap: 12px; }
.mx-campo { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--n-700); }
.mx-campo select, .mx-campo input { width: 100%; height: 52px; border-radius: var(--raio); border: 1.5px solid var(--cinza-borda, var(--n-200)); background: var(--n-25); padding: 0 14px; font-size: 16px; color: var(--texto, var(--n-900)); outline: none; appearance: none; -webkit-appearance: none; }
.mx-campo select { background-image: linear-gradient(45deg, transparent 50%, var(--n-500) 50%), linear-gradient(135deg, var(--n-500) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 14px) 22px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.mx-campo select:focus, .mx-campo input:focus { border-color: var(--azul, var(--mx-vermelho)); box-shadow: 0 0 0 4px rgba(210,29,13,.1); background: var(--n-0); }
.mx-moeda { position: relative; }
.mx-moeda i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--n-500); font-weight: 600; font-size: 15px; }
.mx-moeda input { padding-left: 42px; font-variant-numeric: tabular-nums; }
.mx-linhas { margin-top: 16px; border-top: 1px solid var(--cinza-borda, var(--n-200)); }
.mx-linha { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 12px 2px; border-bottom: 1px solid var(--cinza-borda, var(--n-200)); }
.mx-linha:last-child { border-bottom: 0; }
.mx-linha b { font-size: 14.5px; font-weight: 600; }
.mx-linha .v { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.mx-linha .s { font-size: 12px; color: var(--texto-leve, var(--n-500)); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mx-linha .s button { appearance: none; border: 0; background: none; color: var(--azul, var(--erro)); font-weight: 600; font-size: 12px; padding: 4px 0; cursor: pointer; }
.mx-msg-erro { margin-top: 10px; padding: 10px 12px; border-radius: var(--raio); background: var(--erro-suave); color: var(--erro); font-size: 13px; }

/* Declaração anual e dicas */
.mx-dasn { display: flex; gap: 14px; align-items: center; }
.mx-dasn .mx-sub { margin-top: 3px; }
.mx-dicas { background: var(--n-0); border: 1px solid var(--cinza-borda, var(--n-200)); border-radius: var(--raio); padding: 4px 18px; box-shadow: var(--sombra-2); }
.mx-dicas summary { cursor: pointer; list-style: none; padding: 16px 0; font-family: var(--f-titulo, 'Poppins', sans-serif); font-weight: 600; font-size: 15px; display: flex; align-items: center; justify-content: space-between; }
.mx-dicas summary::-webkit-details-marker { display: none; }
.mx-dicas summary::after { content: '+'; font-size: 22px; font-weight: 400; color: var(--texto-leve, var(--n-500)); }
.mx-dicas[open] summary::after { content: '–'; }
.mx-dicas ul { margin: 0 0 16px 18px; padding: 0; line-height: 1.8; color: var(--texto-leve, var(--n-500)); font-size: 14px; }
.mx-cta { display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; border-radius: var(--raio); min-height: 54px; background: var(--tinta-fundo); color: #fff; font-weight: 600; font-size: 15px; box-shadow: var(--sombra-2); }
.mx-cta svg { stroke: var(--mx-ouro2); }

/* Computador: duas colunas */
@media (min-width: 900px) {
  .mx { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .mx-hero, .mx-full { grid-column: 1 / -1; }
  .mx-hero { padding: 30px 32px 28px; } .mx-hero h1 { font-size: 34px; }
  .mx-atalhos { grid-template-columns: repeat(2, 1fr); }
  .mx-form { grid-template-columns: 1fr 1fr auto; align-items: end; }
  .mx-form .mx-btn { min-width: 190px; }
}

/* Tema escuro */
body.tema-escuro .mx-card, body.tema-escuro .mx-atalho, body.tema-escuro .mx-dicas { background: var(--n-50); border-color: var(--n-200); box-shadow: none; color: var(--n-900); }
body.tema-escuro .mx-valor, body.tema-escuro .mx-atalho, body.tema-escuro .mx-btn { color: var(--n-900); }
body.tema-escuro .mx-btn { background: var(--n-0); border-color: var(--n-200); } body.tema-escuro .mx-btn-primario { background: var(--mx-vermelho); color: #fff; }
body.tema-escuro .mx-campo { color: var(--n-600); } body.tema-escuro .mx-campo select, body.tema-escuro .mx-campo input { background: var(--n-0); border-color: var(--n-200); color: var(--n-900); }
body.tema-escuro .mx-ico { background: rgba(210,29,13,.18); } body.tema-escuro .mx-pill { background: var(--n-25); color: var(--n-700); }
body.tema-escuro .mx-linhas, body.tema-escuro .mx-linha { border-color: var(--n-200); }

/* Campo de valor em destaque (janela do faturamento) */
.mx-moeda.mx-grande input { height: 68px; font-size: 28px; font-weight: 600; padding-left: 58px; letter-spacing: -.01em; border-radius: var(--raio); }
.mx-moeda.mx-grande i { left: 18px; font-size: 18px; }

/* Campo de valor com "R$" (usado fora de .mx-campo, como na janela do faturamento) */
.mx-moeda { display: block; width: 100%; }
.mx-moeda input { width: 100%; height: 52px; border-radius: var(--raio); border: 1.5px solid var(--cinza-borda, var(--n-200)); background: var(--n-25); padding: 0 14px 0 42px; font-size: 16px; color: var(--texto, var(--n-900)); outline: none; appearance: none; -webkit-appearance: none; box-sizing: border-box; }
.mx-moeda input:focus { border-color: var(--azul, var(--mx-vermelho)); box-shadow: 0 0 0 4px rgba(210,29,13,.1); background: var(--n-0); }
body.tema-escuro .mx-moeda input { background: var(--n-0); border-color: var(--n-200); color: var(--n-900); }

/* Chat do WhatsApp: cartão do perfil do cliente (MEI / já é cliente?). Mesmo estilo das etiquetas Regular/Bloqueado. */
.wz-tag-cliente { background: var(--aviso-forte); }
.wz-tag-gratis { background: var(--tinta-fundo); }
