/* NEXXO EVO-01 E5a · Central de Alertas: contador na navegação, grupos e itens.
   UX-05 · Apresentação premium: contador discreto, data em destaque com a cor da criticidade,
   quando e onde em linhas próprias e ações sempre com texto. Nenhuma regra de alerta depende deste arquivo. */
.nav-badge{
  display:inline-grid;place-items:center;flex:none;min-width:19px;height:19px;padding:0 5px;border-radius:10px;
  background:var(--green-soft);color:var(--green-fg);border:1px solid var(--green-fg);
  font-size:11px;font-weight:750;line-height:1;font-variant-numeric:tabular-nums;
}
.nav-badge[hidden]{display:none}
.navbtn .nav-badge{margin-left:auto}
.bn-ico{position:relative}
.bn-ico .nav-badge{position:absolute;top:-6px;right:-4px;box-shadow:0 0 0 2px var(--card)}

/* Cabeçalho e grupos */
.alert-screen .pagehead{flex-direction:row;align-items:flex-end;gap:12px;margin-bottom:14px}
.alert-screen .pagehead>div:first-child{min-width:0;flex:1}
.alert-screen .pagehead .actions{width:auto;flex:none;align-self:flex-end}
.alert-screen .eyebrow{display:none}
.alert-screen .subhead{margin:4px 0 0;font-size:13px}
.alert-screen .c-head{margin-bottom:6px}
.alert-screen .c-head p{font-size:12.5px;line-height:1.45}
.alert-readall{min-height:44px}
.alert-groups{display:flex;width:100%;max-width:560px;margin-bottom:14px}
.alert-groups button{flex:1 1 0;min-width:0;min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:6px;line-height:1.2;white-space:nowrap;cursor:pointer}
.alert-count{color:var(--sub);font-variant-numeric:tabular-nums}
.alert-dot{flex:none;width:7px;height:7px;border-radius:50%;background:var(--action)}
.alert-groups .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* Itens */
.alert-list{list-style:none;margin:0;padding:0}
.alert-list .alert-item{display:grid;grid-template-columns:auto minmax(0,1fr) auto;column-gap:13px;align-items:start;padding:13px 2px}
.alert-item .alert-marker{
  display:grid;place-items:center;align-content:center;width:44px;height:44px;border-radius:12px;line-height:1;
  background:var(--red-soft);color:var(--red-fg);
}
.alert-marker b{font-size:16px;font-weight:700;font-variant-numeric:tabular-nums}
.alert-marker small{margin:3px 0 0;font-size:10.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:inherit}
.alert-main{
  min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:10px;align-items:start;
  padding:2px 4px;margin:-2px -4px;border:0;border-radius:8px;background:transparent;color:inherit;font:inherit;text-align:left;
}
.alert-main>*{grid-column:1}
.alert-main>.go{grid-column:2;grid-row:1/span 5;align-self:center;display:inline-flex;color:var(--sub2)}
.alert-main>.go .ui-icon{width:16px;height:16px}
button.alert-main{cursor:pointer}
button.alert-main:hover{background:var(--raised)}
button.alert-main:focus-visible,.alert-act:focus-visible,.alert-groups button:focus-visible,.alert-readall:focus-visible{outline:2px solid var(--mint);outline-offset:2px}
.alert-kind{font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--sub)}
.alert-item.tone-late .alert-kind{color:var(--red-fg)}
.alert-item strong{font-size:14.5px;font-weight:600;line-height:1.35;margin-top:1px}
.alert-item.is-novo strong{font-weight:750}
.alert-item .alert-main small{margin:3px 0 0;font-size:12.5px;line-height:1.4}
.alert-item .alert-main .alert-when{color:var(--text)}
.alert-item .alert-main .alert-where{margin-top:1px;color:var(--sub)}
.alert-pills{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}
.alert-pills:empty{display:none}
.alert-actions{display:flex;gap:6px;align-self:center}
.alert-act{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:0 12px;
  font:inherit;font-size:12.5px;font-weight:650;white-space:nowrap;color:var(--text);
  background:transparent;border:1px solid var(--line);border-radius:var(--r-sm);cursor:pointer;
}
.alert-act:hover{background:var(--raised);border-color:var(--line2)}
.alert-act .ui-icon{width:15px;height:15px;color:var(--sub)}
.alert-item.tone-soon .alert-marker{background:var(--orange-soft);color:var(--orange-fg)}
.alert-item.tone-mark .alert-marker{background:var(--blue-soft);color:var(--blue-fg)}
.alert-item.tone-done .alert-marker{background:var(--green-soft);color:var(--green-fg)}
.alert-item.tone-off .alert-marker{background:var(--raised);color:var(--sub)}

/* Registro aberto a partir de um alerta: realce discreto da linha de destino. */
tr.alert-target>td{background:var(--blue-soft)}
tr.alert-target:focus{outline:none}
tr.alert-target:focus-visible{outline:2px solid var(--mint);outline-offset:-2px}

@media(max-width:700px){
  .alert-list .alert-item{grid-template-columns:auto minmax(0,1fr);row-gap:10px}
  .alert-actions{grid-column:2;align-self:start;flex-wrap:wrap;min-width:0}
  .alert-act{flex:1 1 auto;min-width:0}
  .alert-groups{max-width:none}
  .alert-groups button{padding-inline:6px;font-size:12px}
  .alert-screen .pagehead{flex-wrap:wrap;align-items:center}
  .alert-screen .subhead{display:none}
}
@media(max-width:430px){
  /* Telas estreitas: nos três grupos o nome fica em uma linha e a contagem na de baixo, para que nenhum quebre sozinho. */
  .alert-groups button{flex-wrap:wrap;align-content:center;row-gap:3px;padding-block:6px}
  .alert-groups button>span:first-child{flex:0 0 100%;text-align:center}
}
@media(max-width:400px){
  /* Telas estreitas: as ações ocupam a largura toda do item, abaixo do texto. */
  .alert-list .alert-item{column-gap:10px}
  .alert-actions{grid-column:1/-1}
  .alert-act{padding:0 8px;gap:6px}
}
@media print{
  .nav-badge,.alert-actions,.alert-groups{display:none!important}
}
