/* Quadro da Alterego. Cores e fontes do kit da marca, as mesmas do portal. */
@font-face { font-family: "Neue Montreal"; src: url("/marca/NeueMontreal-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Neue Montreal"; src: url("/marca/NeueMontreal-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nexa"; src: url("/marca/NexaLight.woff2") format("woff2"); font-weight: 300 400; font-display: swap; }
@font-face { font-family: "Nexa"; src: url("/marca/NexaBold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --navy: #1F3B4D; --navy-2: #294F66; --azul: #3A7092; --claro: #D4EBF7; --gelo: #F3F8FB; --gelo-2: #F7FAFC;
  --vermelho: #B5473A; --vermelho-claro: #FBECEA; --verde: #4F7A41;
  --texto: #5F6B78; --tinta: #1F2937; --linha: #E4EAEF; --borda: #D8E6EE; --branco: #fff;
  --titulo: "Neue Montreal", system-ui, -apple-system, "Segoe UI", sans-serif;
  --corpo: "Nexa", system-ui, -apple-system, "Segoe UI", sans-serif;
  --raio: 12px; --sombra: 0 1px 2px rgba(31, 59, 77, .06), 0 8px 28px rgba(31, 59, 77, .10);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--gelo-2); color: var(--tinta); font: 14px/1.5 var(--corpo); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--titulo); color: var(--navy); margin: 0; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.carregando { padding: 80px; text-align: center; color: var(--texto); }
.oculto { display: none !important; }
.vazio { color: var(--texto); padding: 28px 0; }

/* ---------- entrada */
.entrada { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--navy); }
.entrada form { width: 100%; max-width: 380px; background: #fff; border-radius: 18px; padding: 32px 28px; box-shadow: var(--sombra); }
.entrada img { width: 150px; display: block; margin-bottom: 22px; }
.entrada h1 { font-size: 26px; }
.entrada p { color: var(--texto); margin: 4px 0 22px; }
.campo { display: block; margin-bottom: 14px; }
.campo > span { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--texto); margin-bottom: 5px; }
.campo input, .campo select, .campo textarea { width: 100%; min-height: 40px; border: 1px solid var(--borda); border-radius: 9px; padding: 8px 12px; background: #fff; }
.campo textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: 2px solid var(--claro); border-color: var(--azul); }
.aviso { background: var(--vermelho-claro); color: var(--vermelho); border-radius: 9px; padding: 10px 12px; margin-bottom: 14px; font-size: 13px; }
.btn { height: 38px; border-radius: 9px; border: 0; padding: 0 16px; background: var(--navy); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.btn:hover { background: var(--navy-2); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.largo { width: 100%; height: 44px; }
.btn.leve { background: #fff; color: var(--navy); border: 1px solid var(--borda); }
.btn.leve:hover { background: var(--gelo); }
.btn.perigo { background: #fff; color: var(--vermelho); border: 1px solid #EBC9C4; }

/* ---------- casca */
.casca { display: grid; grid-template-columns: 290px 1fr; grid-template-rows: 56px 1fr; height: 100vh; }
.topo { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 0 18px; background: var(--navy); color: #fff; }
.topo img { height: 26px; }
.topo .nome-app { font-family: var(--titulo); font-weight: 700; font-size: 16px; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.25); }
.topo .eu { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--claro); }
.topo .eu button { background: transparent; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 8px; padding: 4px 10px; }
.menu-btn { display: none; background: transparent; border: 0; color: #fff; font-size: 22px; line-height: 1; padding: 4px; }

.lado { background: #fff; border-right: 1px solid var(--linha); overflow-y: auto; padding: 12px 8px 40px; }
.lado .filtro-arvore { width: 100%; height: 34px; border: 1px solid var(--borda); border-radius: 8px; padding: 0 10px; margin: 0 0 10px; background: var(--gelo-2); }
.no { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; text-align: left; padding: 6px 8px; border-radius: 7px; color: var(--tinta); }
.no:hover { background: var(--gelo); }
.no .seta { width: 12px; color: var(--texto); font-size: 10px; transition: transform .15s; flex: none; }
.no.aberto .seta { transform: rotate(90deg); }
.no .ponto { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.no .rot { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.no .qtd { font-size: 11px; color: var(--texto); background: var(--gelo); border-radius: 10px; padding: 0 7px; }
.no.espaco { font-family: var(--titulo); font-weight: 700; color: var(--navy); margin-top: 4px; }
.no.pasta { padding-left: 26px; color: var(--texto); font-weight: 700; font-size: 13px; }
.no.lista { padding-left: 46px; }
.no.lista.solta { padding-left: 26px; }
.no.lista.ativa { background: var(--claro); color: var(--navy); font-weight: 700; }
.no.lista::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--borda); flex: none; }

.principal { overflow-y: auto; padding: 22px 28px 60px; }
.caminho { font-size: 12px; color: var(--texto); margin-bottom: 2px; }
.cab { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.cab h1 { font-size: 26px; margin-right: auto; }
.barra { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.barra select { height: 34px; border: 1px solid var(--borda); border-radius: 8px; padding: 0 10px; background: #fff; }
.barra label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--texto); }

.grupo { margin-bottom: 18px; }
.grupo-cab { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.pilula { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #fff; background: #87909e; white-space: nowrap; }
.grupo-cab .n { color: var(--texto); font-size: 12px; }
.grupo-cab .mais { margin-left: auto; border: 0; background: transparent; color: var(--azul); font-weight: 700; font-size: 13px; }
.tabela { background: #fff; border: 1px solid var(--linha); border-radius: var(--raio); overflow: hidden; }
.linha { display: grid; grid-template-columns: 1fr 170px 110px 54px; gap: 12px; align-items: center; padding: 9px 14px; border-top: 1px solid var(--linha); cursor: pointer; }
.linha:first-child { border-top: 0; }
.linha:hover { background: var(--gelo-2); }
.linha .tit { font-weight: 700; color: var(--tinta); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linha.fechada .tit { color: var(--texto); text-decoration: line-through; font-weight: 400; }
.linha .resp { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--texto); min-width: 0; }
.linha .resp span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--claro); color: var(--navy); font-size: 10px; font-weight: 700; display: grid; place-items: center; flex: none; }
.linha .data { font-size: 13px; color: var(--texto); }
.linha .data.atrasada { color: var(--vermelho); font-weight: 700; }
.linha .com { font-size: 12px; color: var(--texto); text-align: right; }
.grupo-vazio { padding: 10px 14px; color: var(--texto); font-size: 13px; }

/* ---------- gaveta da tarefa */
.fundo { position: fixed; inset: 0; background: rgba(31, 59, 77, .35); z-index: 20; }
.gaveta { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: #fff; z-index: 21; box-shadow: var(--sombra); display: flex; flex-direction: column; }
.gaveta-cab { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--linha); }
.gaveta-cab .caminho { margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fechar { border: 0; background: transparent; font-size: 24px; line-height: 1; color: var(--texto); padding: 2px 6px; }
.gaveta-corpo { overflow-y: auto; padding: 18px 20px 30px; }
.gaveta .titulo-input { width: 100%; border: 0; font-family: var(--titulo); font-weight: 700; font-size: 22px; line-height: 1.25; color: var(--navy); padding: 4px 0; margin-bottom: 10px; resize: none; field-sizing: content; min-height: 34px; overflow: hidden; }
.gaveta .titulo-input:focus { outline: none; border-bottom: 2px solid var(--claro); }
.dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.acoes { display: flex; gap: 10px; align-items: center; margin: 4px 0 22px; }
.acoes .btn.perigo { margin-left: auto; }
.secao { border-top: 1px solid var(--linha); padding-top: 16px; margin-top: 8px; }
.secao h3 { font-size: 15px; margin-bottom: 10px; }
.comentario { background: var(--gelo-2); border: 1px solid var(--linha); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.comentario .quem { font-size: 12px; color: var(--texto); margin-bottom: 4px; }
.comentario .quem b { color: var(--navy); }
.comentario .txt { white-space: pre-wrap; word-wrap: break-word; }
.historico { list-style: none; padding: 0; margin: 0; font-size: 12px; color: var(--texto); }
.historico li { padding: 5px 0; border-bottom: 1px dashed var(--linha); }
.historico b { color: var(--tinta); }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; border-radius: 9px; padding: 10px 16px; z-index: 40; font-size: 13px; box-shadow: var(--sombra); }
.toast.ruim { background: var(--vermelho); }

/* ---------- celular */
@media (max-width: 820px) {
  .casca { grid-template-columns: 1fr; }
  .menu-btn { display: block; }
  .topo .nome-app { display: none; }
  .topo .eu span { display: none; }
  .lado { position: fixed; top: 56px; left: 0; bottom: 0; width: 290px; z-index: 15; box-shadow: var(--sombra); transform: translateX(-100%); transition: transform .2s; }
  .casca.menu-aberto .lado { transform: none; }
  .principal { padding: 16px 16px 60px; }
  .linha { grid-template-columns: 1fr 86px; }
  .linha .resp, .linha .com { display: none; }
  .dupla { grid-template-columns: 1fr; gap: 0; }
}
