/* Layout: barra do produto → (equipe/planilha) → faixa de status que filtra → busca → lista por prazo; o detalhe abre no item.
   Identidade do site ciencialicita.com.br: fundo escuro, acento verde-água, Space Grotesk / Inter Tight / JetBrains Mono. */
@font-face { font-family: "Space Grotesk Variable"; font-weight: 300 700; font-display: swap; src: url("fontes/space-grotesk-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter Tight Variable"; font-weight: 100 900; font-display: swap; src: url("fontes/inter-tight-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono Variable"; font-weight: 100 800; font-display: swap; src: url("fontes/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); }

:root {
  --bg: #05080c; --bg-2: #080d13; --surface: #0c131b; --surface-2: #111a24; --surface-3: #17222e;
  --line: rgb(255 255 255 / 0.07); --line-2: rgb(255 255 255 / 0.13); --line-3: rgb(255 255 255 / 0.22);
  --fg: #eef3f7; --fg-2: #b9c5cf; --muted: #8494a3; --dim: #56646f;
  --accent: #34f0d4; --accent-2: #8ff7e7; --accent-ink: #022420;
  --amber: #ffb547; --green: #7cf0a2; --red: #ff7b86;
  /* Status: mesmas cores da demonstração do site */
  --novas: var(--accent);   --novas-bg: rgb(52 240 212 / 0.08);
  --em_estudo: var(--amber); --em_estudo-bg: rgb(255 181 71 / 0.08);
  --participar: var(--green); --participar-bg: rgb(124 240 162 / 0.08);
  --excluido: #94a2ae;       --excluido-bg: rgb(148 162 174 / 0.08);
  --erro: var(--red);
  --f-display: "Space Grotesk Variable", "Segoe UI", system-ui, sans-serif;
  --f-ui: "Inter Tight Variable", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono Variable", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--f-ui); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: var(--accent); }
.apoio { color: var(--muted); margin: 4px 0 0; }
.erro { color: var(--erro); margin: 8px 0 0; }
.mono { font-family: var(--f-mono); font-size: 0.82rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

input, select, textarea { font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line-2);
                          border-radius: 10px; padding: 9px 12px; max-width: 100%; transition: border-color .2s; }
input::placeholder, textarea::placeholder { color: var(--dim); }
input:hover, select:hover, textarea:hover { border-color: var(--line-3); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgb(52 240 212 / 0.15); }
textarea { width: 100%; min-height: 84px; resize: vertical; }
select option { background: var(--surface-2); }

.botao { font: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer; border-radius: 999px; padding: 9px 20px; min-height: 40px;
         color: var(--accent-ink); background: var(--accent); border: 1px solid var(--accent);
         transition: transform .25s var(--ease), background-color .2s, border-color .2s, box-shadow .25s; }
.botao:hover { background: var(--accent-2); border-color: var(--accent-2); transform: translateY(-1px); box-shadow: 0 10px 34px -10px rgb(52 240 212 / 0.55); }
.botao.secundario { color: var(--fg); background: transparent; border-color: var(--line-3); }
.botao.secundario:hover { border-color: var(--fg-2); box-shadow: none; }
.botao.perigo { color: var(--red); background: transparent; border-color: rgb(255 123 134 / 0.45); }
.botao.perigo:hover { border-color: var(--red); box-shadow: none; }
.botao:disabled { opacity: 0.5; cursor: progress; transform: none; }
.linha { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.linha input[type=email], .linha input[type=url] { flex: 1 1 260px; min-width: 0; }

/* Logotipo (o mesmo do site) */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; }
.logo svg { width: 34px; height: 34px; flex: none; }
.logo .no { fill: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }
.logo-palavra { display: grid; line-height: 1; }
.logo-nome { font-family: var(--f-display); font-weight: 600; font-size: 1.2rem; letter-spacing: -0.03em; }
.logo-sub { font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }

/* Entrada */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
         background: radial-gradient(60% 50% at 50% 0%, rgb(52 240 212 / 0.10), transparent 70%), var(--bg); }
.cartao-login { width: min(440px, 100%); display: grid; gap: 18px; padding: 32px;
                background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line-2); border-radius: 16px;
                box-shadow: 0 40px 80px -40px rgb(0 0 0 / 0.8), inset 0 1px 0 rgb(255 255 255 / 0.04); }
.cartao-login h1 { margin: 6px 0 0; font-size: 1.7rem; line-height: 1.1; }
.cartao-login label { font-size: 0.85rem; color: var(--muted); display: block; margin-bottom: 6px; }
.cartao-login .rodape { font-size: 0.82rem; color: var(--dim); border-top: 1px solid var(--line); padding-top: 14px; }
.cartao-login .rodape a { color: var(--fg-2); text-decoration: none; }
.cartao-login .rodape a:hover { color: var(--accent); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: 0.7rem; font-weight: 500;
           letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }

/* Barra do produto */
.barra { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgb(5 8 12 / 0.82);
         backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--line); }
.barra-in { max-width: 1240px; margin: 0 auto; padding: 12px 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
.quem { color: var(--muted); font-size: 0.85rem; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.quem b { color: var(--fg); font-weight: 600; }
.acoes-topo { display: flex; flex-wrap: wrap; gap: 8px; }
.acoes-topo .botao { min-height: 36px; padding: 6px 16px; }

/* Painel */
.pagina { max-width: 1240px; margin: 0 auto; padding-inline: 20px; padding-block: 28px 72px; display: grid; gap: 20px; }
header.topo { display: grid; gap: 6px; }
header.topo h1 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); margin: 0; line-height: 1.05; }

.painel-equipe { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line-2); border-radius: 14px;
                 padding: 20px; display: grid; gap: 14px; }
.painel-equipe h2 { margin: 0; font-size: 1.2rem; }
.passos { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--fg-2); }
.passos code { font-family: var(--f-mono); font-size: 0.8rem; overflow-wrap: anywhere; color: var(--accent); background: var(--bg);
               border: 1px solid var(--line-2); padding: 2px 8px; border-radius: 6px; }
.passos .botao { min-height: 30px; padding: 3px 12px; font-size: 0.8rem; margin-left: 4px; }
.falha-texto { color: var(--erro); margin: 4px 0; }
.tabela-rolagem { overflow-x: auto; }
.tabela { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
.tabela th, .tabela td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabela th { color: var(--muted); font-family: var(--f-mono); font-weight: 500; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; }
.tabela tr.inativo td { color: var(--dim); text-decoration: line-through; }

.status-faixa { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.chip-status { display: grid; gap: 6px; text-align: left; cursor: pointer; font: inherit; color: var(--fg);
               background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
               opacity: 0.55; transition: opacity .2s, border-color .2s, background-color .2s, transform .25s var(--ease); }
.chip-status:hover { opacity: 0.85; transform: translateY(-1px); }
.chip-status[aria-pressed="true"] { opacity: 1; border-color: color-mix(in srgb, var(--cor) 45%, transparent); background: var(--cor-bg, var(--surface)); }
.chip-status .rotulo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 0.68rem;
                       letter-spacing: 0.1em; text-transform: uppercase; color: var(--cor); }
.chip-status .rotulo::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.chip-status .numero { font-family: var(--f-display); font-size: 1.9rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }

.ferramentas { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ferramentas input[type=search] { flex: 1 1 300px; min-width: 0; }
.contagem { color: var(--muted); font-family: var(--f-mono); font-size: 0.75rem; font-variant-numeric: tabular-nums; }

.valor-filtro { width: 150px; }
.barra-lote { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 14px; border-radius: 14px;
              background: var(--bg-2); border: 1px dashed var(--line-2); }
.barra-lote .botao { min-height: 34px; padding: 5px 14px; }
.barra-lote .separador { flex: 1 1 auto; }
.rotulo-lote { font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.lista { display: grid; gap: 10px; }
.linha-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; }
.linha-item > input[type=checkbox] { margin-top: 20px; width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.linha-item.selecionada details.item { border-color: rgb(52 240 212 / 0.55); }
.pilula.categoria { --cor: var(--fg-2); --cor-bg: transparent; }
.pilula.categoria::before { display: none; }
details.item { background: linear-gradient(180deg, var(--surface-3), var(--surface-2)); border: 1px solid var(--line-2); border-radius: 14px;
               transition: border-color .2s, box-shadow .25s; }
details.item:hover { border-color: rgb(52 240 212 / 0.35); }
details.item[open] { border-color: rgb(52 240 212 / 0.45); box-shadow: 0 20px 50px -30px rgb(52 240 212 / 0.45); }
details.item > summary { list-style: none; cursor: pointer; display: grid; gap: 6px 20px; padding: 16px 18px;
                         grid-template-columns: 132px minmax(0, 1fr) auto; align-items: start; }
details.item > summary::-webkit-details-marker { display: none; }
.prazo { display: grid; gap: 4px; font-variant-numeric: tabular-nums; }
.prazo .data { font-family: var(--f-mono); font-weight: 600; color: var(--amber); }
.marca { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.04em; text-transform: uppercase; border-radius: 999px; padding: 2px 8px; justify-self: start; }
.marca.urgente { color: var(--amber); border: 1px solid rgb(255 181 71 / 0.4); background: rgb(255 181 71 / 0.08); }
.marca.encerrada { color: var(--muted); border: 1px solid var(--line-2); }
.principal { min-width: 0; display: grid; gap: 4px; }
.orgao { font-weight: 600; font-size: 1rem; }
.local { color: var(--muted); font-size: 0.84rem; }
.objeto { font-size: 0.92rem; color: var(--fg-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
details[open] .objeto { -webkit-line-clamp: unset; display: block; }
.lado { display: grid; gap: 8px; justify-items: end; text-align: right; }
.valor { font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.valor.nd { color: var(--muted); font-family: var(--f-ui); font-weight: 400; font-size: 0.84rem; }
.pilula { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase;
          border-radius: 999px; padding: 3px 10px; white-space: nowrap; color: var(--cor); background: var(--cor-bg);
          border: 1px solid color-mix(in srgb, var(--cor) 40%, transparent); }
.pilula::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.desconto { font-family: var(--f-mono); font-size: 0.78rem; font-variant-numeric: tabular-nums; color: var(--muted); }

.detalhe { border-top: 1px solid var(--line); padding: 18px; display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.detalhe h3 { margin: 0 0 10px; font-family: var(--f-mono); font-size: 0.68rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); }
.carregando { color: var(--muted); padding: 16px 18px; border-top: 1px solid var(--line); }
dl.campos { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; font-size: 0.9rem; }
dl.campos dt { color: var(--muted); }
dl.campos dd { margin: 0; overflow-wrap: anywhere; }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.links a { color: var(--fg); font-weight: 600; text-decoration: none; border: 1px solid var(--line-3); border-radius: 999px; padding: 6px 14px; font-size: 0.84rem;
           transition: border-color .2s, color .2s; }
.links a:hover { border-color: var(--accent); color: var(--accent); }
.nv { color: var(--dim); font-style: italic; }

.form-triagem { display: grid; gap: 12px; }
.form-triagem .grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.form-triagem label { display: grid; gap: 6px; font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.form-triagem label > * { color: var(--fg); font-family: var(--f-ui); font-size: 0.92rem; letter-spacing: 0; text-transform: none; }
.form-triagem .botao { justify-self: start; }
.form-triagem input, .form-triagem select { width: 100%; min-width: 0; }

ol.obs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
ol.obs li { border-left: 2px solid var(--accent); padding-left: 12px; }
ol.obs li.automatica { border-left: 2px dashed var(--line-3); }
ol.obs li.automatica .texto { color: var(--muted); font-size: 0.88rem; }
ol.obs .quando { font-family: var(--f-mono); font-size: 0.7rem; color: var(--muted); font-variant-numeric: tabular-nums; }
ol.obs .texto { white-space: pre-line; overflow-wrap: anywhere; }
.nova-obs { display: grid; gap: 8px; margin-top: 14px; }
.nova-obs .botao { justify-self: start; }

.trechos-edital { grid-column: 1 / -1; border-top: 1px dashed var(--line-2); padding-top: 16px; display: grid; gap: 12px; min-width: 0; }
.trechos-edital .botao { justify-self: start; }
.arquivo-edital { display: grid; gap: 8px; }
details.assunto { border: 1px solid var(--line-2); border-radius: 12px; padding: 0 14px; background: var(--bg-2); }
details.assunto > summary { cursor: pointer; padding: 10px 0; font-weight: 600; }
details.assunto .contador { font-family: var(--f-mono); font-weight: 400; color: var(--muted); font-size: 0.72rem; margin-left: 8px; }
details.assunto blockquote { margin: 0 0 12px; padding: 10px 14px; border-left: 2px solid var(--accent); background: var(--surface); border-radius: 0 10px 10px 0; }
details.assunto .quando { font-family: var(--f-mono); font-size: 0.7rem; color: var(--muted); font-variant-numeric: tabular-nums; }
details.assunto .texto { white-space: pre-line; overflow-wrap: anywhere; font-size: 0.88rem; color: var(--fg-2); }
mark { background: rgb(255 181 71 / 0.22); color: var(--fg); border-radius: 3px; padding: 0 2px; }

.vazio { color: var(--muted); padding: 32px; text-align: center; background: var(--bg-2); border: 1px dashed var(--line-2); border-radius: 14px; }
.mais { justify-self: center; }
.aviso { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 30;
         background: var(--surface-3); color: var(--fg); border: 1px solid rgb(124 240 162 / 0.4); padding: 12px 20px; border-radius: 999px;
         font-weight: 500; font-size: 0.9rem; max-width: calc(100% - 32px); box-shadow: 0 20px 50px -10px rgb(0 0 0 / 0.8); }
.aviso.falha { border-color: rgb(255 123 134 / 0.6); color: #ffd9dc; }

@media (max-width: 720px) {
  details.item > summary { grid-template-columns: minmax(0, 1fr) auto; }
  .prazo { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .detalhe { grid-template-columns: minmax(0, 1fr); }
  .quem { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
