/* Controle de Frequência: cores solicitadas para as ocorrências, sem afetar outras tabelas. */
html body .gp-compact-navigation + .gp-content .gp-attendance-title-row{height:0!important;min-height:0!important;margin:0!important;}
html body .gp-compact-navigation + .gp-content .gp-attendance-toolbar{position:absolute!important;top:11px!important;right:var(--gp-desktop-actions-edge,clamp(1rem,1.8vw,2rem))!important;z-index:30!important;display:flex!important;align-items:center!important;gap:7px!important;width:max-content!important;height:38px!important;min-height:38px!important;margin:0!important;padding:0!important;}
html body .gp-compact-navigation + .gp-content .gp-attendance-toolbar>vaadin-button{position:static!important;transform:none!important;flex:0 0 auto!important;margin:0!important;}
.gp-attendance-filters{display:flex;align-items:center;flex:0 1 auto;gap:7px!important;min-width:0;}
.gp-attendance-filter{pointer-events:auto!important;}
.gp-attendance-filter{position:relative!important;flex:0 1 auto!important;width:max-content!important;max-width:min(320px,calc(100vw - 40px))!important;min-width:0!important;padding-inline:10px!important;box-sizing:border-box!important;overflow:hidden!important;text-align:left!important;}
.gp-attendance-filter>h3{width:max-content!important;max-width:100%!important;white-space:nowrap!important;}
.gp-attendance-filter.gp-summary-period-kpi>h3{justify-content:flex-start!important;}
.gp-attendance-filter>vaadin-combo-box{width:100%!important;height:100%!important;}
@media(max-width:700px){html body .gp-attendance-filter>h3{font-size:17px!important;}}
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 .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:8px 0 0;padding-inline:14px;box-sizing:border-box;font-weight:600;margin-inline-start:calc(6px - clamp(1rem,1.8vw,2rem));}

/* 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;color:#fff!important;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:28px;height:28px;box-sizing:border-box;border:0;border-radius:50%;
  background:#e02020;z-index:-1;pointer-events:none;
}

@media screen and (max-width:700px) {html body .gp-attendance-count {margin-inline-start:-.75rem;}}

@media(max-width:700px){html body .gp-compact-navigation + .gp-content .gp-attendance-title-row{height:auto!important;min-height:58px!important;}html body .gp-compact-navigation + .gp-content .gp-attendance-toolbar{position:relative!important;top:auto!important;right:auto!important;width:100%!important;height:58px!important;min-height:58px!important;}.gp-attendance-filters{flex:1 1 auto;}}
html body .gp-shell>.gp-compact-navigation+.gp-content.gp-content .gp-attendance-toolbar{gap:20px!important;}
@layer gp-desktop-toolbar,gp-mobile-toolbar;
@layer gp-desktop-toolbar{html body .gp-shell>.gp-compact-navigation+.gp-content.gp-content .gp-attendance-toolbar{gap:20px!important;}}
@layer gp-mobile-toolbar{html body .gp-shell>.gp-compact-navigation+.gp-content.gp-content .gp-attendance-toolbar{gap:20px!important;}}

html body .gp-content .gp-attendance-filter{display:flex!important;align-items:center!important;height:38px!important;min-height:38px!important;}

.gp-attendance-filters{position:relative;top:3px;}

html body :is(.gp-attendance-day,.gp-attendance-option).gp-attendance-code-fj{background-color:rgb(255 192 0 / .28)!important;}
/* Reserva o diâmetro real dentro do conteúdo, evitando cortar o pseudo-elemento. */
html body .gp-attendance-day-header{height:22px!important;min-height:22px!important;}
html body vaadin-grid.gp-attendance-grid vaadin-grid-cell-content:has(>.gp-attendance-day-header){overflow:visible!important;}
