/* Ajustes de uso no celular e no computador.
   Mantém as cores e fontes do site; só organiza, aproxima e esclarece. */

/* ---------- Comum ---------- */
h1.title { margin: 5px 0; line-height: 1.05; }
.top { align-items: flex-start; }
.topoBotoes { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; padding-top: 6px; }

/* Avançar tarefa em destaque; Excluir/Remover discretos */
.filter.forte { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; }
.filter.discreto { background: transparent; border-color: transparent; color: var(--muted); }
.filter.discreto:hover { color: #b3261e; text-decoration: underline; }
.itemAcoes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* Pendências e Próximo ensaio não esticam para a mesma altura */
.two { align-items: start; }

/* Colunas da Produção: vazias não ocupam espaço à toa; no celular nenhuma tem altura fixa */
@media (max-width: 900px) { .col { min-height: 0; } }
.col.vazia { min-height: 0; }
.col.vazia .empty { padding: 4px 5px 8px; font-size: 13px; }

/* ---------- Diálogos e avisos da plataforma ---------- */
#avisos { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.aviso { background: var(--ink); color: #fff; border-radius: 12px; padding: 13px 14px 13px 16px; display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.45; box-shadow: 0 10px 30px #0003; animation: avisoEntra .2s ease-out; }
.aviso.erro { box-shadow: inset 4px 0 0 var(--pink2), 0 10px 30px #0003; }
.aviso.saindo { opacity: 0; transform: translateY(6px); transition: .25s ease; }
.avisoTexto { flex: 1; }
.avisoFechar { background: none; border: 0; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px; opacity: .7; }
.avisoFechar:hover { opacity: 1; }
@keyframes avisoEntra { from { opacity: 0; transform: translateY(8px); } }
.dlgFundo { position: fixed; inset: 0; background: #211d2299; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 20px; }
.dlg { background: #fff; border-radius: 18px; padding: 24px; width: min(460px, 100%); box-shadow: 0 20px 60px #0004; }
.dlg h2 { font-size: 19px; margin: 0 0 8px; letter-spacing: -.02em; }
.dlg p { color: var(--muted); margin: 0 0 12px; font-size: 14px; line-height: 1.5; }
.dlg input, .dlg textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font: inherit; font-size: 15px; margin-top: 4px; }
.dlg input:focus, .dlg textarea:focus { outline: 2px solid var(--pink2); outline-offset: 1px; }
.dlgAcoes { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.dlgAcoes .filter { padding: 10px 15px; font-size: 13px; }
.btn.perigo { background: #b3261e; box-shadow: none; }

/* Elementos só do celular ficam escondidos no computador */
#topoCelular, #barraInferior, #folhaMais { display: none; }

/* ---------- Computador ---------- */
@media (min-width: 651px) {
  /* Barra lateral: rola por dentro quando o menu é maior que a tela,
     então "Minha conta" e "Sair" ficam sempre sobre o fundo escuro */
  .side { display: flex; flex-direction: column; overflow-y: auto; flex-shrink: 0; scrollbar-width: thin; scrollbar-color: #ffffff33 transparent; }
  .nav { margin-top: 30px; display: flex; flex-direction: column; flex: 1; }
  .nav button { padding: 9px 13px; margin: 1px 0; }
  .side .usuario { margin-top: auto; padding-top: 16px; }
  .side .usuario button { color: #fff; border-color: #ffffff55; }

  /* Conteúdo com largura confortável em telas largas */
  .main { max-width: 1240px; }
}
@media (min-width: 651px) and (max-height: 760px) {
  .brandlogo { width: 120px; margin-top: 10px; }
  .nav { margin-top: 18px; }
  .nav button { padding: 7px 13px; }
}

/* ---------- Celular ---------- */
@media (max-width: 650px) {
  /* Topo: faixa fina no lugar do bloco escuro com logo e menu */
  .side { display: none; }
  #topoCelular { display: flex; position: sticky; top: 0; z-index: 30; align-items: center; justify-content: space-between; gap: 12px;
    background: #211d22; color: #fff; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); }
  #topoCelular button { background: none; border: 0; color: #fff; font: inherit; font-weight: 900; font-size: 15px; letter-spacing: -.01em; padding: 4px 0; cursor: pointer; }
  #topoCelular img { height: 18px; width: auto; opacity: .9; }
  .main { padding: 18px 16px 24px; }
  body.comBarra .main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .top { margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
  .title { font-size: 26px; }

  /* Barra inferior com atalhos */
  #barraInferior { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #211d22;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid #ffffff14; }
  #barraInferior button { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0;
    color: #bfb4ba; font: inherit; font-size: 11px; padding: 6px 2px; min-height: 52px; border-radius: 10px; cursor: pointer; }
  #barraInferior svg { width: 22px; height: 22px; }
  #barraInferior button.ativo { color: #fff; }
  #barraInferior button.ativo svg { color: var(--pink2); }
  #barraInferior .ponto { position: absolute; top: 6px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--pink2); }

  /* Folha "Mais" com todas as páginas */
  #folhaMais.aberta { display: block; }
  .folhaFundo { position: fixed; inset: 0; background: #211d2299; z-index: 50; }
  .folha { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; background: #fff; border-radius: 20px 20px 0 0; max-height: 85vh; overflow-y: auto;
    padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); animation: folhaSobe .2s ease-out; }
  @keyframes folhaSobe { from { transform: translateY(30px); opacity: 0; } }
  .folhaTopo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
  .folhaTopo b { font-size: 17px; }
  .folhaLista { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .folhaLista button { text-align: left; background: #f6f3f5; border: 0; border-radius: 12px; padding: 14px 12px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; min-height: 48px; }
  .folhaLista button.ativo { background: var(--ink); color: #fff; }
  .folhaUsuario { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
  .folhaUsuario b { display: block; font-size: 14px; }
  .folhaUsuario span { font-size: 12px; color: var(--muted); }
  .folhaBotoes { display: flex; gap: 6px; }
  .folhaInsta { display: block; margin-top: 14px; font-size: 13px; color: var(--muted); text-decoration: none; }
  body.semRolagem { overflow: hidden; }

  /* Área de toque maior para botões pequenos */
  .filter { min-height: 40px; padding: 9px 14px; font-size: 13px; }
  .filter.discreto { padding-left: 8px; padding-right: 8px; }
  .close { width: 40px; height: 40px; }

  /* Grade: números numa faixa compacta em vez de quatro quadros */
  .gradeStats { grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
  .gradeStats .stat { border: 0; border-radius: 0; box-shadow: none; padding: 10px 8px; border-right: 1px solid var(--line); }
  .gradeStats .stat:last-child { border-right: 0; }
  .gradeStats .stat b { font-size: 18px; }
  .gradeStats .stat span { font-size: 9.5px; letter-spacing: .04em; line-height: 1.3; display: block; margin-top: 3px; }

  /* Avisos acima da barra inferior; diálogo encostado embaixo, fácil de alcançar */
  #avisos { left: 16px; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); max-width: none; }
  .dlgFundo { align-items: flex-end; padding: 0; }
  .dlg { border-radius: 20px 20px 0 0; width: 100%; padding: 22px 18px calc(20px + env(safe-area-inset-bottom)); }
  .dlgAcoes { flex-direction: column-reverse; }
  .dlgAcoes button { width: 100%; min-height: 46px; }
}

@media print {
  #topoCelular, #barraInferior, #folhaMais, #avisos, #dialogos, .topoBotoes { display: none !important; }
}
