/* Controle de Frequência: cores solicitadas para as ocorrências, sem afetar outras tabelas. */
html body vaadin-grid.gp-attendance-grid::part(attendance-day-column) {
  padding-inline:2px!important;
  text-align:center!important;
}
html body vaadin-grid.gp-attendance-grid vaadin-grid-cell-content:has(>.gp-attendance-day),
html body vaadin-grid.gp-attendance-grid vaadin-grid-cell-content:has(>.gp-attendance-day-header) {
  display:block!important;
  width:100%!important;
  min-width:0!important;
  padding-inline:0!important;
  margin-inline:0!important;
  text-align:center!important;
}
html body .gp-attendance-day-header {
  display:block!important;
  width:100%!important;
  text-align:center!important;
}
html body .gp-attendance-day {
  display:flex!important;
  align-items:center;
  justify-content:center;
  width:100%;
  min-width:0;
  min-height:26px;
  padding:0;
  border:0;
  border-radius:3px;
  font:inherit;
  color:var(--gp-text);
  background:transparent;
  cursor:pointer;
  text-align:center!important;
}
html body .gp-attendance-day[hidden] {display:none!important;}
html body .gp-attendance-day:focus-visible {outline:2px solid var(--gp-accent);outline-offset:1px;}
html body .gp-attendance-legend-code {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:30px;
  min-height:26px;
  border-radius:3px;
  font-weight:700;
}
html body .gp-attendance-option {
  display:block;
  width:100%;
  box-sizing:border-box;
  padding:4px 8px;
  border-radius:3px;
  color:var(--gp-text);
}
html body :is(.gp-attendance-day,.gp-attendance-option,.gp-attendance-legend-code).gp-attendance-code-fe {background-color:rgb(255 235 0 / .35)!important;}
html body :is(.gp-attendance-day,.gp-attendance-option,.gp-attendance-legend-code).gp-attendance-code-sa {background-color:rgb(85 145 40 / .28)!important;}
html body :is(.gp-attendance-day,.gp-attendance-option,.gp-attendance-legend-code).gp-attendance-code-af {background-color:rgb(245 177 137 / .30)!important;}
html body :is(.gp-attendance-day,.gp-attendance-option,.gp-attendance-legend-code).gp-attendance-code-f {background-color:rgb(255 50 50 / .25)!important;}
html body :is(.gp-attendance-day,.gp-attendance-option,.gp-attendance-legend-code).gp-attendance-code-lm {background-color:rgb(255 100 173 / .30)!important;}
html body :is(.gp-attendance-day,.gp-attendance-option,.gp-attendance-legend-code).gp-attendance-code-fo {background-color:rgb(0 176 240 / .28)!important;}
html body :is(.gp-attendance-day,.gp-attendance-option,.gp-attendance-legend-code).gp-attendance-code-tm {background-color:rgb(255 192 0 / .33)!important;}
html body :is(.gp-attendance-day,.gp-attendance-option,.gp-attendance-legend-code).gp-attendance-code-of {background-color:rgb(128 128 128 / .35)!important;}
html body :is(.gp-attendance-day,.gp-attendance-option,.gp-attendance-legend-code).gp-attendance-code-fr {background-color:rgb(0 235 235 / .28)!important;}
html body :is(.gp-attendance-day,.gp-attendance-option,.gp-attendance-legend-code).gp-attendance-code-lp {background-color:rgb(242 86 255 / .28)!important;}
html body :is(.gp-attendance-day,.gp-attendance-option,.gp-attendance-legend-code).gp-attendance-code-at {background-color:rgb(255 255 0 / .24)!important;}
html body vaadin-grid.gp-attendance-grid::part(attendance-sunday),
html body .gp-attendance-legend-code.gp-attendance-sunday {background-color:rgb(128 128 128 / .28)!important;}

/* Centralização real dos cabeçalhos e valores dentro de cada coluna do dia. */
html body vaadin-grid.gp-attendance-grid::part(attendance-day-column),
html body vaadin-grid.gp-attendance-grid::part(header-cell attendance-day-column) {
  padding-inline:0!important;
  text-align:center!important;
}
html body .gp-attendance-day-header {display:flex!important;align-items:center;justify-content:center;width:100%;margin:0!important;}
html body .gp-attendance-day {position:relative;box-sizing:border-box;justify-content:center;margin:0!important;}
html body .gp-attendance-day[data-note="true"]::after {
  content:"";position:absolute;right:2px;top:2px;width:6px;height:6px;
  border-radius:50%;background:#ff2020;box-shadow:0 0 0 1px rgb(255 255 255 / .75);
  pointer-events:none;
}
html body .gp-attendance-legend {display:grid;grid-template-columns:repeat(7,minmax(0,max-content));gap:8px 15px;align-items:center;justify-content:space-between;}
html body .gp-attendance-legend-item {display:inline-flex;align-items:center;white-space:nowrap;min-width:0;}
@media(max-width:1100px) {html body .gp-attendance-legend {grid-template-columns:repeat(auto-fit,minmax(125px,1fr));justify-content:start;}}

/* Vertically and horizontally center the header and marking in the whole day column. */
html body vaadin-grid.gp-attendance-grid::part(attendance-day-column) {vertical-align:middle!important;}
html body .gp-attendance-day-header {height:100%;min-height:28px;align-items:center!important;justify-content:center!important;}
html body .gp-attendance-day {height:100%;min-height:28px;align-items:center!important;justify-content:center!important;}

/* Herda as alturas, fonte e espaçamento da grade principal de Lançamentos.
   Apenas os conteúdos dos dias preservam a centralização e as cores. */
html body vaadin-grid.gp-attendance-grid {--vaadin-grid-row-height:var(--gp-attendance-launch-row-height,30px);--vaadin-grid-header-row-height:auto;}
html body vaadin-grid.gp-attendance-grid::part(attendance-day-column) {padding-block:var(--vaadin-grid-cell-padding,3px)!important;}
html body .gp-attendance-day-header,html body .gp-attendance-day {
  min-height:0!important;height:100%!important;line-height:inherit!important;
  align-items:center!important;justify-content:center!important;
}

/* O conteúdo e o cabeçalho ocupam exatamente o mesmo eixo central da célula. */
html body vaadin-grid.gp-attendance-grid::part(attendance-day-column) {
  --vaadin-grid-cell-padding:0px!important;
  padding-left:0!important;padding-right:0!important;
}
html body vaadin-grid.gp-attendance-grid vaadin-grid-cell-content:has(> .gp-attendance-day),
html body vaadin-grid.gp-attendance-grid vaadin-grid-cell-content:has(> .gp-attendance-day-header) {
  box-sizing:border-box!important;width:100%!important;display:flex!important;
  align-items:center!important;justify-content:center!important;
}
html body .gp-attendance-day-header,html body .gp-attendance-day {
  box-sizing:border-box!important;width:100%!important;text-align:center!important;
  margin-left:0!important;margin-right:0!important;
}

/* Ações permanece fixada na borda direita; respiro de 5px após a lixeira. */
html body vaadin-grid.gp-attendance-grid::part(attendance-actions) {padding-right:5px!important;}

/* Seleção de células por Alt/Shift preserva as cores das ocorrências. */
html body .gp-attendance-day[data-selected="true"] {
  box-shadow:inset 0 0 0 2px var(--gp-accent);
}
html body .gp-attendance-day {user-select:none;}

/* A tabela ocupa a área da página; o total acompanha os filtros. */
html body vaadin-grid.gp-attendance-grid {min-width:0;max-width:100%;box-sizing:border-box;}
html body .gp-attendance-count {display:block;margin:0 0 8px;font-weight:600;}

/* Sem divisória especial entre o último dia e Ações. */
html body vaadin-grid.gp-attendance-grid::part(first-frozen-to-end-cell) {border-inline-start:0!important;}
html body vaadin-grid.gp-attendance-grid::part(first-frozen-to-end-cell)::before {display:none!important;}

html body .gp-attendance-day-header.gp-attendance-today {position:relative;isolation:isolate;min-height:26px!important;color:var(--gp-accent-contrast);font-weight:600;}
html body .gp-attendance-day-header.gp-attendance-today::before {
  content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  width:26px;height:26px;box-sizing:border-box;border:0;border-radius:50%;
  background:var(--gp-accent-fill);z-index:-1;pointer-events:none;
}
