/* Minhas tarefas — CSS sem framework. Paleta da SPEC, seção 12. */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../vendor/fonts/inter-latin-400-normal.f837d382a885.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("../vendor/fonts/inter-latin-500-normal.42b95430773b.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../vendor/fonts/inter-latin-600-normal.75fb76ec3559.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("../vendor/fonts/inter-latin-700-normal.3714175d15f3.woff2") format("woff2"); }

:root {
  --azul: #2457D6;
  --azul-escuro: #1B44A8;
  --azul-claro: #E8EEFC;
  --ambar: #7A4B00;
  --ambar-fundo: #FFF4D6;
  --ambar-borda: #F1D58A;
  --verde: #17613C;
  --verde-forte: #1E7A4C;
  --verde-fundo: #E3F4EA;
  --fundo: #F4F5F7;
  --texto: #14181F;
  --texto-2: #3B4452;
  --suave: #5B6472;
  --borda: #E3E6EB;
  --borda-forte: #C9CED8;
  --borda-botao: #D5D9E0;
  --chip: #ECEEF2;
  --erro: #B42318;
  --erro-fundo: #FDECEA;
}

* { box-sizing: border-box; }
[x-cloak] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.4;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
svg { flex: none; }

.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.conteudo {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px calc(96px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Cabeçalhos */
.topo { padding: 20px 4px 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.topo-data { font-size: 13px; font-weight: 600; color: var(--suave); letter-spacing: .04em; }
.topo h1 { margin: 2px 0 0; font-size: 30px; line-height: 1.1; font-weight: 700; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; background: var(--texto); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; flex: none;
}
.topo-voltar { padding: 14px 0 0; display: flex; align-items: center; gap: 4px; }
.topo-voltar h1 { margin: 0; font-size: 22px; font-weight: 700; }
.topo-voltar .rotulo { font-size: 13px; font-weight: 600; color: var(--suave); letter-spacing: .04em; }
.btn-icone {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; padding: 0; color: var(--texto); border-radius: 10px; flex: none;
}
.secao { margin: 6px 4px 0; font-size: 13px; font-weight: 700; color: var(--suave); letter-spacing: .02em; text-transform: uppercase; }

/* Caixas */
.caixa { background: #fff; border: 1px solid var(--borda); border-radius: 14px; padding: 14px; }
.caixa-lista { background: #fff; border: 1px solid var(--borda); border-radius: 14px; padding: 4px 14px; display: flex; flex-direction: column; }

/* Faixa em andamento */
.wip { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; }
.wip-texto { display: flex; flex-direction: column; gap: 2px; }
.wip-texto b { font-size: 13px; font-weight: 600; }
.wip-texto span { font-size: 12px; color: var(--suave); }
.wip-barras { display: flex; gap: 6px; }
.wip-barras span { width: 28px; height: 10px; border-radius: 5px; background: var(--borda-botao); }
.wip-barras span.on { background: var(--azul); }
.wip.over .wip-texto span { color: var(--ambar); font-weight: 600; }

/* Selos */
.selos { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.selo { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--chip); color: var(--texto-2); white-space: nowrap; }
.selo-tipo { background: var(--chip); color: var(--texto-2); }
.selo-tipo-forte { background: var(--azul-claro); color: var(--azul-escuro); }
.selo-andamento, .selo-junto, .selo-feita { background: var(--verde-fundo); color: var(--verde); }
.selo-aguardando, .selo-adiada { background: var(--ambar-fundo); color: var(--ambar); }
.selo-neutro { background: #fff; color: var(--texto-2); border: 1px solid var(--borda-forte); padding: 1px 7px; }
.selo-atrasada { background: var(--erro-fundo); color: var(--erro); }
.texto-suave { font-size: 12px; color: var(--suave); }

/* Cartão de Hoje */
.cartao { background: #fff; border: 1px solid var(--borda); border-radius: 14px; padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 6px; }
.cartao-linha { display: flex; align-items: center; gap: 4px; }
.cartao-corpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.cartao-titulo { font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--texto); }
.cartao-titulo.riscado { text-decoration: line-through; color: var(--suave); }
.check {
  width: 44px; height: 44px; flex: none; background: transparent; border: none; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.check span {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid #6B7585;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.check.feito span { background: var(--verde-forte); border-color: var(--verde-forte); }
.adiar { display: flex; align-items: center; gap: 6px; }
.adiar-rotulo { font-size: 12px; font-weight: 600; color: var(--suave); width: 38px; flex: none; }
.adiar form { flex: 1; display: flex; }
.adiar .btn-adiar { flex: 1; }
.btn-adiar {
  min-height: 44px; width: 100%; border-radius: 10px; border: 1px solid var(--borda-botao); background: #fff;
  color: var(--texto); font-size: 13px; font-weight: 600; padding: 0 4px;
}
.btn-cal { flex: none; width: 44px; min-height: 44px; border-radius: 10px; border: 1px solid var(--borda-botao); background: #fff; display: flex; align-items: center; justify-content: center; padding: 0; }
.btn-cal[aria-expanded="true"] { border-color: var(--azul); color: var(--azul); }
.data-escolha { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.resultado-acao { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.resultado-acao .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.resultado-acao .info b { font-size: 14px; font-weight: 600; color: var(--suave); }
.resultado-acao .info span { font-size: 12px; font-weight: 600; color: var(--ambar); }
.resultado-acao .info span.verde { color: var(--verde); }
.btn-desfazer { min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--borda-botao); background: #fff; color: var(--azul); font-size: 13px; font-weight: 600; flex: none; }

/* Botões gerais */
.btn {
  min-height: 46px; border-radius: 12px; border: 1px solid var(--borda-forte); background: #fff; color: var(--texto);
  font-size: 14px; font-weight: 600; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primario { background: var(--azul); border-color: var(--azul); color: #fff; }
.btn-primario:hover { background: var(--azul-escuro); }
.btn-grande { min-height: 50px; font-size: 15px; font-weight: 700; width: 100%; }
.btn-ambar { border-color: #D9B75A; color: var(--ambar); background: #fff; }
.btn-link { background: transparent; border: none; color: var(--azul); font-weight: 600; padding: 0; min-height: 44px; }
.btn:focus-visible, .btn-adiar:focus-visible, .btn-cal:focus-visible, .check:focus-visible, .chip:focus-visible,
.nav a:focus-visible, .btn-icone:focus-visible, .linha-todas:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(36, 87, 214, .45); outline-offset: 2px;
}

/* Campos */
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo > label, .campo > .rotulo { font-size: 13px; font-weight: 600; color: var(--suave); }
.input, .campo input[type=text], .campo input[type=date], .campo input[type=time], .campo input[type=password], .campo textarea, .campo select {
  border: 1px solid var(--borda-forte); border-radius: 12px; padding: 0 12px; min-height: 46px; font-size: 16px;
  background: #fff; color: var(--texto); width: 100%;
}
.campo textarea { padding: 12px; line-height: 1.4; resize: vertical; min-height: 80px; }
.erro-campo { font-size: 13px; color: var(--erro); font-weight: 600; }
.ajuda { font-size: 12px; color: var(--suave); line-height: 1.4; }
.linha-2 { display: flex; gap: 8px; }
.linha-2 > * { flex: 1; min-width: 0; }

/* Chips de escolha */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--borda-forte); background: #fff;
  color: var(--texto); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.chip[aria-pressed="true"], .chip.ativo { border: 2px solid var(--azul); background: var(--azul-claro); color: var(--azul-escuro); font-weight: 700; padding: 0 15px; }
.chips-rolagem { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.chips-rolagem .chip { flex: none; }
.chip-radio { position: relative; }
.chip-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-radio input:checked + .chip { border: 2px solid var(--azul); background: var(--azul-claro); color: var(--azul-escuro); font-weight: 700; padding: 0 15px; }
.chip-radio input:focus-visible + .chip { outline: 3px solid rgba(36, 87, 214, .45); outline-offset: 2px; }

/* Busca */
.busca {
  display: flex; align-items: center; gap: 10px; background: #fff; border: 2px solid var(--azul); border-radius: 14px;
  padding: 0 14px; min-height: 52px;
}
.busca input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 16px; min-height: 44px; }
.busca-link { border: 1px solid var(--borda); color: var(--suave); }
.resultado { min-height: 64px; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--borda); border-radius: 14px; padding: 10px 14px; }
.resultado .corpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.resultado .corpo b { font-size: 15px; font-weight: 600; line-height: 1.3; }
.aviso { background: var(--ambar-fundo); border: 1px solid var(--ambar-borda); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; color: var(--ambar); }
.aviso-titulo { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.aviso p { margin: 0; font-size: 14px; line-height: 1.4; }
.aviso-link { min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 13px; font-weight: 600; }
.acoes-2 { display: flex; gap: 8px; }
.acoes-2 > * { flex: 1; }
.form-caixa { display: flex; flex-direction: column; gap: 14px; }
.form-titulo span { font-size: 12px; font-weight: 600; color: var(--suave); display: block; }
.form-titulo b { font-size: 17px; font-weight: 700; line-height: 1.3; word-break: break-word; }

/* Mensagens */
.mensagens { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; }
.msg { border-radius: 12px; padding: 10px 14px; font-size: 14px; font-weight: 600; background: var(--verde-fundo); color: var(--verde); }
.msg.error { background: var(--erro-fundo); color: var(--erro); }
.msg.warning { background: var(--ambar-fundo); color: var(--ambar); }

/* Vazio */
.vazio { padding: 24px 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.vazio-icone { width: 56px; height: 56px; border-radius: 50%; background: var(--verde-fundo); color: var(--verde-forte); display: flex; align-items: center; justify-content: center; }
.vazio b { font-size: 18px; }
.vazio p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--suave); }

/* Todas */
.titulo-linha { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.linha-todas-bloco { background: #fff; border: 1px solid var(--borda); border-radius: 14px; overflow: hidden; }
.linha-todas {
  width: 100%; min-height: 64px; display: flex; align-items: center; gap: 10px; background: transparent; border: none;
  padding: 10px 14px; text-align: left;
}
.linha-todas .corpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.linha-todas .corpo b { font-size: 15px; font-weight: 600; line-height: 1.3; }
.linha-todas .corpo b.riscado { text-decoration: line-through; color: var(--suave); }
.progresso-mini { font-size: 13px; font-weight: 700; color: var(--texto-2); }
/* Selo de tarefa com subtarefas: abre o Projeto. A área de toque passa de 44 px. */
.selo-subs { position: relative; display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--azul-claro); color: var(--azul-escuro); white-space: nowrap; cursor: pointer; }
.selo-subs::after { content: ""; position: absolute; inset: -12px -6px; }
.selo-subs:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }
.seta { transition: transform .15s; color: var(--suave); }
.seta.aberta { transform: rotate(90deg); }
.expandido { border-top: 1px solid #EEF0F3; padding: 4px 14px 12px; display: flex; flex-direction: column; }
.expandido p { margin: 8px 0; font-size: 14px; color: var(--texto-2); line-height: 1.45; }
.acoes-linha { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
.ok-inline { display: inline-flex; align-items: center; min-height: 46px; padding: 0 12px; color: var(--verde); font-weight: 700; font-size: 14px; }

/* Subtarefas */
.sub { min-height: 48px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #EEF0F3; }
.sub:last-child { border-bottom: none; }
.sub-nome { flex: 1; font-size: 15px; font-weight: 500; min-width: 0; }
.sub-nome.riscado { color: var(--suave); }
.sub-nota { font-size: 12px; font-weight: 600; color: var(--suave); }
.estado { width: 22px; height: 22px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.estado-feita { background: var(--verde-forte); color: #fff; }
.estado-andamento { border: 2px solid var(--azul); }
.estado-andamento::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--azul); }
.estado-aguardando { background: var(--ambar-fundo); color: var(--ambar); border: 2px solid #D9B75A; }
.estado-nao_comecou { border: 2px solid #8B94A3; }
.add-sub { display: flex; gap: 8px; align-items: center; padding: 8px 0; }
.add-sub input { flex: 1; min-width: 0; border: 1px solid var(--borda-forte); border-radius: 12px; padding: 0 12px; min-height: 46px; font-size: 16px; }

/* Projeto */
.cab-projeto { padding: 0 4px; display: flex; flex-direction: column; gap: 8px; }
.cab-projeto h1 { margin: 0; font-size: 26px; line-height: 1.15; font-weight: 700; word-break: break-word; }
.barra { height: 10px; border-radius: 5px; background: var(--borda); overflow: hidden; }
.barra div { height: 100%; background: var(--azul); border-radius: 5px; }
.prog-topo { display: flex; align-items: baseline; justify-content: space-between; }
.prog-topo b { font-size: 14px; }
.prog-topo span { font-size: 13px; color: var(--suave); }
.descricao { margin: 0; font-size: 14px; line-height: 1.45; color: var(--texto-2); white-space: pre-line; }

/* Tarefa completa */
.form-completo { display: flex; flex-direction: column; gap: 18px; }
.bloco-campo { display: flex; flex-direction: column; gap: 8px; }
.bloco-campo > .rotulo, .bloco-campo > label { font-size: 13px; font-weight: 700; color: var(--texto-2); }
.sub-caixa { background: var(--ambar-fundo); border: 1px solid var(--ambar-borda); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.sub-caixa .campo > label, .sub-caixa .rotulo { color: var(--ambar); }
.switch-linha { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch-linha .txt { display: flex; flex-direction: column; gap: 2px; }
.switch-linha .txt b { font-size: 13px; font-weight: 700; color: var(--texto-2); }
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--borda-forte); transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--azul); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid rgba(36, 87, 214, .45); outline-offset: 2px; }
.tabela-leitura { display: flex; flex-direction: column; }
.tabela-leitura div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #EEF0F3; font-size: 14px; }
.tabela-leitura div:last-child { border-bottom: none; }
.tabela-leitura span:first-child { color: var(--suave); }
.tabela-leitura span:last-child { font-weight: 600; text-align: right; }
.barra-fixa {
  position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--borda);
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 8px; justify-content: center; z-index: 20;
}
.barra-fixa .dentro { width: 100%; max-width: 608px; display: flex; gap: 8px; }
.barra-fixa .btn { flex: 1; }
.confirmar { background: var(--ambar-fundo); border: 1px solid var(--ambar-borda); color: var(--ambar); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; font-weight: 600; font-size: 14px; }

/* Navegação inferior */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: center;
  background: #fff; border-top: 1px solid var(--borda); padding: 6px 8px calc(12px + env(safe-area-inset-bottom));
}
.nav .dentro { display: flex; width: 100%; max-width: 640px; }
.nav a {
  flex: 1; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--suave); font-size: 12px; font-weight: 600; border-radius: 12px;
}
.nav a[aria-current="page"] { color: var(--azul); }

/* Entrar */
.entrar { max-width: 420px; margin: 0 auto; padding: 48px 20px 32px; display: flex; flex-direction: column; gap: 24px; min-height: 100vh; }
.entrar-logo { display: flex; align-items: center; gap: 14px; }
.logo { width: 56px; height: 56px; border-radius: 16px; background: var(--azul); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.entrar h1 { margin: 0; font-size: 26px; font-weight: 700; }
.entrar-logo p { margin: 2px 0 0; color: var(--suave); font-size: 14px; }
.senha { position: relative; display: flex; }
.senha input { padding-right: 52px !important; }
.senha button { position: absolute; right: 2px; top: 1px; }
.dica { font-size: 13px; color: var(--suave); line-height: 1.45; margin: 0; }

@media (min-width: 700px) {
  .topo h1 { font-size: 34px; }
}
