
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
@import url("responsive.css");

/* Zoom aplicado apenas na página index.php */
html.index-page-html {
    zoom: 92%;  /* zoom padrão de 92% para index.php */
}

*,
*::after,
*::before {
    box-sizing: inherit;
}

label,
button {
    cursor: pointer;
}

figure {
    margin-inline: 0;
    margin-block: 0.25rem;
}

h1,h2,h3,h4,p {
    margin: 0;
    font-size: inherit;
    line-height: 1.1;
}

.vertical-sidebar input[type="checkbox"] {
    display: none;
}

/* Estilos do body aplicados apenas na página index.php */
body:not(.pessoas-page) {
    box-sizing: border-box;
    margin: 0;
    min-block-size: 100vh;
    font-family: "Poppins", sans-serif;
    display: flex;        
    align-items: flex-start;   
    justify-content: flex-start;
}

.vertical-sidebar {
    display: flex;
    inline-size: var(--expanded);
    margin: 0;
    position: fixed;   
    top: 0;            
    left: 10px;          
    height: auto;      
    z-index: 99999;
}

:root {
    --bg--primary: hsl(203, 7%, 92%);
    --bg--active: hsla(203, 86%, 93%, 0.7);
    --bg--hover: hsl(200, 7%, 84%);
    --bg--focus: hsl(203, 100%, 100%);
    --gray--primary: hsl(200, 10%, 50%);
    --gray--secondary: hsl(200, 14%, 30%);

    --dark--primary: hsl(203, 13%, 14%);
    --dark--secondary: hsl(203, 4%, 29%);

    --accent--primary: hsl(206, 90%, 56%);
    --accent--secondary: hsl(206, 79%, 58%);

    --expanded: 16.875rem;
    --collapsed: 3.25rem;
    --svg: 1.125rem;
    --item: 2.25rem;
    --brad-outer: 15px;
    --frame-space: 0.5rem;
    --brad-inner: calc(var(--brad-outer) - var(--frame-space));
}

.vertical-sidebar {
    display: flex;
    inline-size: var(--expanded);
    margin-block: 5vmin;
}

/* Evita area invisivel bloqueando cliques quando recolhida */
.vertical-sidebar {
    inline-size: var(--collapsed);
}

.vertical-sidebar.is-expanded,
.vertical-sidebar:has(:checked) {
    inline-size: var(--expanded);
}

nav {
    background: var(--bg--primary);
    display: flex;
    flex-flow: column;
    min-width: var(--collapsed);
    border-radius: var(--brad-outer);
    flex: 0 0 auto;
    transition: flex-basis 300ms ease-out;
    will-change: flex-basis;
    padding: var(--frame-space);
    box-shadow: 0 3px 5px #1233, 0 5px 17px #0003;
    position: relative;
    z-index: 99999;
}

.vertical-sidebar.is-expanded nav,
.vertical-sidebar :checked ~ nav {
    flex-basis: var(--expanded);
}

.vertical-sidebar:not(.is-expanded) #checkbox-input:not(:checked) ~ nav {
    flex-basis: var(--collapsed);
}

header {
    display: flex;
    flex-flow: column;
    justify-content: center;
    gap: 0.5rem;
}

.sidebar__toggle-container {
    block-size: var(--item);
    display: flex;
    justify-content: end;
}

.nav__toggle {
    block-size: 100%;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: all 233ms ease-in;
    border-radius: var(--brad-inner);
    outline: 2px solid transparent;
    outline-offset: -2px;
    overflow: hidden;
}

.toggle--icons {
    block-size: inherit;
    aspect-ratio: 1;
    display: inline-grid;
    place-content: center;
    grid-template-areas: "svg";
    z-index: 10;
}

.toggle-svg-icon {
    grid-area: svg;
    fill: var(--gray--primary);
    transition: fill 233ms ease-in;
}

.nav__toggle:hover {
    outline: 2px solid var(--accent--primary);
}

.toggle--icons:hover .toggle-svg-icon {
    fill: var(--dark--primary);
}

figure {
    display: flex;
    flex-direction: column;
    justify-content: center;
    container-type: inline-size;
    gap: 0.375rem;
}

.codepen-logo {
    display: block;
    margin-inline: auto;
    width: 40px; 
    height: auto;
    transform-origin: center top;
    
}

/* ao fechar a sidebar, aumenta visualmente */
.sidebar.closed.codepen-logo {
    width: 30px; 
}

figcaption {
    text-align: center;
}

.user-id {
    font-size: 1.0625rem;
    font-weight: 500;
    margin-block-end: 0.25rem;
    color: var(--gray--secondary);
}

.user-role {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray--primary);
}

.sidebar__wrapper {
    --list-gap: 0.5rem;
    display: flex;
    flex-flow: column;
    gap: var(--list-gap);
}

.sidebar__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-flow: column;
    gap: 0.125rem;
    overflow: hidden;
}

.sidebar__item {
    block-size: var(--item);
    border-radius: var(--brad-inner);
}

.item--heading {
    display: flex;
    align-items: end;
}

.sidebar__item--heading {
    margin-block-end: 0.4rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.35px;
    font-weight: 500;
    color: var(--gray--primary);
    transition: color 200ms ease-in;
}

.sidebar__list:has(.sidebar__link):hover .sidebar__item--heading {
    color: var(--gray--secondary);
}

.sidebar__link {
    display: flex;
    text-decoration: none;
    block-size: 100%;
    align-items: center;
    gap: 0.5rem;
    outline: 2px solid transparent;
    border-radius: inherit;
}

.icon {
    aspect-ratio: 1;
    block-size: 100%;
    display: inline-grid;
    svg {
        place-self: center;
        inline-size: var(--svg);
        block-size: var(--svg);
        fill: var(--gray--primary);
    }
}

.text {
    pointer-events: none;
    color: var(--gray--secondary);
    font-size: 0.875em;
    font-weight: 500;
    transition: color 266ms ease-out;
}

.sidebar__link:hover {
    background: var(--bg--hover);
    .icon svg {
        fill: var(--accent--primary);
    }
    .text {
        color: var(--dark--primary);
    }
}

.sidebar__link:focus {
    outline: 2px solid var(--accent--secondary);
    outline-offset: -2px;
    background: var(--bg--focus);
    .icon svg {
        fill: var(--accent--primary);
    }
}

.sidebar__link:active {
    background-color: var(--bg--active);
}

aside:not(.is-expanded):not(:has(:checked)) .toggle--open,
aside.is-expanded .toggle--close,
aside:has(:checked) .toggle--close {
    opacity: 0;
}

aside:not(.is-expanded):not(:has(:checked)) :where(figcaption, .item--heading) {
    opacity: 0;
}

aside.is-expanded :where(figcaption, .item--heading),
aside:has(:checked) :where(figcaption, .item--heading) {
    opacity: 1;
    transition: opacity 300ms ease-in 200ms;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: fixed;
    translate: calc(var(--item) * 1.5) calc(var(--item) * 0.125);
    border-radius: var(--brad-inner);
    padding: 0.5rem 0.75rem;
    color: #ddd;
    background-color: hsl(198 16 30);
    box-shadow: 0 6px 12px -6px #0003;
    opacity: 0;
    pointer-events: none;
    scale: 0 0;
    z-index: 999;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 350ms ease-out;
}

aside:not(:has(:checked))
    .sidebar__link:where(:hover, :focus-visible)[data-tooltip]::before {
    opacity: 1;
    scale: 1;
}

/* Stats Cards Styles */
.main-content {
    margin-left: calc(var(--collapsed) + 30px);
    width: calc(100% - var(--collapsed) - 30px);
    transition: margin-left 300ms ease-out, width 300ms ease-out;
    background: #ffffff00;
    border-radius: 30px;
    padding: 20px;
    margin-top: 20px;
    overflow-x: auto;
    overflow-y: visible;
    min-height: 100vh;
    box-sizing: border-box;
}


/* Sidebar agora se sobrepõe sem empurrar o conteúdo */
/* aside:has(:checked) ~ .main-content {
    margin-left: calc(var(--expanded) + 30px);
    width: calc(100% - var(--expanded) - 30px);
} */

/* 3 boxes de entrada: Faturamento (CEO), Pessoas (todos), Jornada (dep. Jornada) */
.dashboard-entrada-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 28px;
    padding: 0 4px;
}

.dashboard-entrada-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    max-width: 260px;
    flex: 1;
    padding: 28px 24px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.40);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.15), 0 0 60px rgba(255, 255, 255, 0.1) inset;
    backdrop-filter: blur(25px) saturate(150%);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.dashboard-entrada-box:hover {
    background: rgba(255, 255, 255, 0.55);
    transform: translateY(-4px);
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.2), 0 0 80px rgba(255, 255, 255, 0.12) inset;
}

.dashboard-entrada-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.dashboard-entrada-faturamento .dashboard-entrada-icon {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: #fff;
}

.dashboard-entrada-pessoas .dashboard-entrada-icon {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #fff;
}

.dashboard-entrada-jornada .dashboard-entrada-icon {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
}

.dashboard-entrada-label {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.dashboard-entrada-desc {
    font-size: 13px;
    color: #64748b;
}

.main-box-container {
    border-radius: 24px;
    padding: 25px;
    margin: 40px auto;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    min-height: auto;
}

/* Área principal dos cards do dashboard — coluna esquerda com largura mínima fixa (2×280 + gap) */
.stats-cards-container {
    display: grid;
    grid-template-columns: minmax(585px, auto) minmax(260px, 1fr) minmax(260px, 1fr);
    gap: 25px;
    align-items: start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Coluna esquerda: grid 2×280 + gap; linha1 = ATIVOS | TURNOVER; linha2 = RANKING em span 2 */
.dashboard-left-column {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    display: grid;
    grid-template-columns: 280px 280px;
    grid-template-rows: auto auto;
    column-gap: 25px;
    row-gap: 25px;
    width: 585px;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* ATIVOS = célula (1,1) */
.dashboard-left-column > .stat-card:first-of-type {
    grid-column: 1;
    grid-row: 1;
}

/* TURNOVER = célula (2,1) — sempre ao lado de ATIVOS */
.dashboard-left-column > .stat-card-turnover {
    grid-column: 2;
    grid-row: 1;
}

/* RANKING = linha 2, ocupa as duas colunas (mesma largura visual que os dois cards de cima) */
.dashboard-left-column > .ranking-wrapper-container {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.stats-cards-container > .stat-card-experiencia {
    grid-column: 2;
    grid-row: 1;
}

.stats-cards-container > .stat-card-aniversarios {
    grid-column: 3;
    grid-row: 1;
}

/* Sobrescreve largura fixa 600px dos cards grandes para caber no grid */
.stats-cards-container > .stat-card-experiencia,
.stats-cards-container > .stat-card-aniversarios {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.ranking-wrapper-container {
    width: 100%;
}

.ranking-box-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.dashboard-left-column .stat-card-ranking {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Responsividade para telas médias (tablets) */
@media (max-width: 1024px) {
    .stats-cards-container {
        grid-template-columns: 1fr;
    }

    .dashboard-left-column,
    .stats-cards-container > .stat-card-experiencia,
    .stats-cards-container > .stat-card-aniversarios {
        grid-column: 1;
        grid-row: auto;
    }

    .dashboard-left-column {
        width: 100%;
        max-width: 100%;
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .dashboard-left-column > .stat-card:first-of-type,
    .dashboard-left-column > .stat-card-turnover,
    .dashboard-left-column > .ranking-wrapper-container {
        grid-column: 1;
        grid-row: auto;
    }
}

.stat-card {
    width: 280px;
    height: 470px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.40);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 0 30px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(255, 255, 255, 0.1) inset;
    backdrop-filter: blur(25px) saturate(150%);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease-in-out;
    position: relative;
    justify-content: flex-start;
}

.stat-card .stat-icon {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 36px;
    height: 36px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card .stat-icon svg {
    width: 36px;
    height: 36px;
}

.stat-icon-chart {
    color: #2563eb;
}

/* Nome da box no centro absoluto do topo */
.stat-card .stat-label {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    max-width: calc(100% - 110px); /* Espaço para ícone (48px) + número (62px) */
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 4px;
    z-index: 1;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Quantidade no topo direito absoluto */
.stat-card .stat-number {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    padding-left: 7px;
    line-height: 1;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Card TURNOVER — donut centralizado + legenda */
.stat-card-turnover {
    overflow: hidden;
}

.stat-card-turnover .stat-label {
    top: 16px;
    z-index: 1;
}

.stat-card-turnover .stat-separator,
.stat-card-turnover .stat-number-turn {
    display: none;
}

.stat-card-turnover .turnover-visual {
    position: absolute;
    top: 44px;
    left: 10px;
    right: 10px;
    bottom: 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    min-height: 0;
}

/* Gráfico ocupa a parte superior (mais alto que % e legenda) */
.stat-card-turnover .turnover-chart-container {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    padding-top: 2px;
}

.stat-card-turnover .turnover-chart-container #turnoverChart {
    width: 100% !important;
    max-width: 100%;
    height: 100% !important;
    max-height: 100%;
    margin: 0;
    overflow: hidden;
}

.stat-card-turnover .turnover-chart-container .apexcharts-canvas,
.stat-card-turnover .turnover-chart-container svg {
    margin: 0 auto !important;
}

/* Percentual abaixo do gráfico, acima da legenda */
.stat-card-turnover .turnover-center-value {
    position: relative;
    flex: 0 0 auto;
    z-index: 2;
    margin: 0 0 6px;
    padding: 0;
    font-size: clamp(1.65rem, 4.5vw, 2.35rem);
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    text-align: center;
    pointer-events: none;
    text-shadow: 0 2px 14px rgba(15, 23, 42, 0.35);
}

.stat-card-turnover .turnover-legend {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    margin: 0;
    padding: 0 8px;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 12px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.92);
    z-index: 3;
}

.stat-card-turnover .turnover-legend__dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.stat-card-turnover .turnover-legend__dot--adm {
    background: #4caf50;
}

.stat-card-turnover .turnover-legend__dot--dem {
    background: #f44336;
}

.stat-card-turnover .turnover-legend__dot--perm {
    background: #2196f3;
}

/* Container de departamentos dentro da box de ATIVOS */
.stat-departments {
    position: absolute;
    top: 60px;
    left: 16px;
    right: 16px;
    bottom: 7px;
    overflow-y: auto;
    overflow-x: hidden;  /* sem scroll horizontal */
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
}

.stat-departments::-webkit-scrollbar {
    width: 3px;  /* reduzido de 4px para 3px */
}

.stat-departments::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.stat-departments::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.stat-departments::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Remove setas da scrollbar da box ATIVOS */
.stat-departments::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

/* Firefox - scrollbar sem setas para box ATIVOS */
.stat-departments {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.1);
}

/* ============================
   Ranking de Funcionários Mais Antigos
   ============================ */

.stat-card-ranking {
    width: 100%;
    height: 295px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.40);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 0 30px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(255, 255, 255, 0.1) inset;
    backdrop-filter: blur(25px) saturate(150%);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease-in-out;
    position: relative;
    justify-content: flex-start;
}

.stat-icon-ranking {
    color: #8b5cf6;
}

.ranking-content {
    position: absolute;
    top: 60px;
    left: 16px;
    right: 16px;
    bottom: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

.ranking-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
}

.ranking-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ranking-column-header {
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    padding: 4px 0;
    margin-bottom: 2px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ranking-item:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.ranking-position {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.ranking-photo {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ranking-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ranking-nome {
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.ranking-tempo {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

/* Scrollbar para ranking box */
.ranking-content::-webkit-scrollbar {
    width: 6px;
}

.ranking-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.ranking-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.ranking-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.ranking-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.1);
}

/* Responsividade para ranking */
@media (max-width: 1200px) {
    .ranking-wrapper-container {
        justify-content: center;
    }
    
    .ranking-box-container {
        width: calc(280px * 2 + 25px);
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .ranking-wrapper-container {
        margin-top: 12px;
    }
    
    .ranking-box-container {
        width: 100%;
        max-width: 100%;
    }
    
    .stat-card-ranking {
        height: auto;
        min-height: 400px;
    }
    
    .ranking-container {
        grid-template-columns: 1fr;
    }
    
    .ranking-item {
        padding: 8px 10px;
    }
    
    .ranking-photo {
        width: 36px;
        height: 36px;
    }
    
    .ranking-nome {
        font-size: 12px;
    }
    
    .ranking-tempo {
        font-size: 10px;
    }
    
    .ranking-column-header {
        font-size: 0.75rem;
    }
}

/* Item de departamento */
.stat-department-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 0;
    gap: 8px;
    transition: all 0.2s ease;
}

.stat-department-item:hover {
    transform: translateX(2px);
}

/* Separador entre tipos de contrato e departamentos */
.stat-department-name.dep-badge.turno-t1,
.stat-department-name.dep-badge.turno-t2,
.stat-department-name.dep-badge.turno-t3,
.stat-department-name.dep-badge.turno-12x36,
.stat-department-name.dep-badge.turno-comercial,
.stat-department-name.dep-badge.turno-outro {
    font-weight: 700;
}

.stat-department-name.dep-badge.turno-t1 {
    background: #d1fae5;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.stat-department-name.dep-badge.turno-t2 {
    background: #dbeafe;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.stat-department-name.dep-badge.turno-t3 {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.stat-department-name.dep-badge.turno-12x36 {
    background: #fffbeb;
    color: #f59e0b;
    border: 1px solid #fde68a;
}

.stat-department-name.dep-badge.turno-comercial {
    background: #f5f3ff;
    color: #7c3aed;
    border: 1px solid #e9d5ff;
}

.stat-department-name.dep-badge.turno-outro {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.stat-separator {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0;
    margin: 0;
    height: 0;
    width: 100%;
    display: block;
    overflow: hidden;
}

/* Badge de departamento - estilo similar aos filtros */
.stat-department-name.dep-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #334155;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 0;
    min-width: 0;
}

/* Cores dos badges de departamento - mesmo padrão dos filtros */
.stat-department-name.dep-badge.dep-risk {
    background: #dcfce7;
    color: #16a34a;
    border-color: #bbf7d0;
}

.stat-department-name.dep-badge.dep-journey {
    background: #dbeafe;
    color: #2563eb;
    border-color: #bfdbfe;
}

.stat-department-name.dep-badge.dep-rh {
    background: #fce7f3;
    color: #be185d;
    border-color: #f9a8d4;
}

.stat-department-name.dep-badge.dep-score {
    background: #ffedd5;
    color: #c2410c;
    border-color: #fed7aa;
}

.stat-department-name.dep-badge.dep-sac {
    background: #fef9c3;
    color: #854d0e;
    border-color: #facc15;
}

.stat-department-name.dep-badge.dep-adm {
    background: #e5e7eb;
    color: #374151;
    border-color: #d1d5db;
}

.stat-department-name.dep-badge.dep-administrativo {
    background: #ede9fe;
    color: #7c3aed;
    border-color: #c4b5fd;
}

.stat-department-name.dep-badge.dep-desenvolvimento {
    background: #ccfbf1;
    color: #0f766e;
    border-color: #5eead4;
}

.stat-department-name.dep-badge.dep-limpeza {
    background: #ccfbf1;
    color: #0d9488;
    border-color: #5eead4;
}

/* Cores dos badges de tipos de contrato - mesmo padrão dos departamentos */
.stat-department-name.dep-badge.contrato-pj {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

.stat-department-name.dep-badge.contrato-clt {
    background: #d1fae5;
    color: #065f46;
    border-color: #6ee7b7;
}

.stat-department-name.dep-badge.contrato-estagio {
    background: #fed7aa;
    color: #92400e;
    border-color: #fdba74;
}

.stat-department-count {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    min-width: 24px;
    text-align: right;
    flex-shrink: 0;
}

/* Container de aniversários dentro da box */
.stat-aniversarios-list {
    position: absolute;
    top: 60px;
    left: 16px;
    right: 16px;
    bottom: 16px;
    overflow-y: auto;
    overflow-x: hidden;  /* sem scroll horizontal */
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
}

.stat-aniversarios-list::-webkit-scrollbar {
    width: 3px;  /* reduzido de 4px para 3px */
}

.stat-aniversarios-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.stat-aniversarios-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.stat-aniversarios-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Remove setas da scrollbar da box ANIVERSÁRIOS */
.stat-aniversarios-list::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

/* Firefox - scrollbar sem setas para box ANIVERSÁRIOS */
.stat-aniversarios-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.1);
}

/* Scrollbar da box EXPERIÊNCIA - scrollbar menor e mais discreta */
.stat-experincia-list::-webkit-scrollbar {
    width: 3px;  /* reduzido de 4px para 3px */
}

.stat-experincia-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.stat-experincia-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.stat-experincia-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Remove setas da scrollbar da box EXPERIÊNCIA */
.stat-experincia-list::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

/* Configuração base da box EXPERIÊNCIA - mesma da box ATIVOS */
.stat-experincia-list {
    overflow-y: auto;
    overflow-x: hidden;  /* sem scroll horizontal */
    scrollbar-width: thin;  /* Firefox - scrollbar sem setas */
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.1);
}

/* Item de aniversário */
.stat-aniversario-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 5px;
}

.stat-aniversario-item:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateX(2px);
    cursor: pointer;
}

.stat-aniversario-photo {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    margin-top: 2px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.stat-aniversario-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stat-aniversario-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-aniversario-name {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.stat-aniversario-details {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 6px;
    align-items: center;
    align-content: flex-start;
    margin-top: 2px;
    width: 100%;
}

.stat-aniversario-turno,
.stat-aniversario-departamento,
.stat-aniversario-anos {
    font-size: 10px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.25;
    max-width: 100%;
}

.stat-aniversario-milestone {
    flex: 1 1 100%;
    white-space: normal;
    text-align: center;
    font-size: 10px;
    padding: 5px 10px;
    order: 10;
}

/* Cores de turno */
.stat-aniversario-turno.turno-t1 {
    background: #d1fae5;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.stat-aniversario-turno.turno-t2 {
    background: #dbeafe;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.stat-aniversario-turno.turno-t3 {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.stat-aniversario-turno.turno-12x36 {
    background: #fffbeb;
    color: #f59e0b;
    border: 1px solid #fde68a;
}

.stat-aniversario-turno.turno-comercial {
    background: #f5f3ff;
    color: #7c3aed;
    border: 1px solid #e9d5ff;
}

/* Cores de departamento */
.stat-aniversario-departamento.dep-risk {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.stat-aniversario-departamento.dep-journey {
    background: #dbeafe;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.stat-aniversario-departamento.dep-adm {
    background: #e5e7eb;
    color: #374151;
    border: 1px solid #d1d5db;
}

.stat-aniversario-departamento.dep-sac {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #facc15;
}

.stat-aniversario-departamento.dep-score {
    background: #ffedd5;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.stat-aniversario-departamento.dep-rh {
    background: #fce7f3;
    color: #be185d;
    border: 1px solid #f9a8d4;
}

.stat-aniversario-departamento.dep-administrativo {
    background: #ede9fe;
    color: #7c3aed;
    border: 1px solid #c4b5fd;
}

.stat-aniversario-departamento.dep-desenvolvimento {
    background: #ccfbf1;
    color: #0f766e;
    border: 1px solid #5eead4;
}

.stat-aniversario-departamento.dep-limpeza {
    background: #ccfbf1;
    color: #0d9488;
    border: 1px solid #5eead4;
}

/* Badge de anos / marcos */
.stat-aniversario-anos {
    background: #dbeafe;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.stat-aniversario-anos--empresa {
    background: #e0e7ff;
    color: #4338ca;
    border-color: #c7d2fe;
}

.stat-aniversario-anos--idade {
    background: #fce7f3;
    color: #be185d;
    border-color: #f9a8d4;
}

/* Badge de dias restantes para aniversários */
.stat-aniversario-dias {
    background: #fef3c7 !important;
    color: #d97706 !important;
    border: 1px solid #fcd34d !important;
    font-weight: 700 !important;
    flex: 0 1 auto;
    order: 11;
    white-space: nowrap;
}

/* Badge de dias restantes de experiência - cor de alerta */
.stat-experiencia-dias {
    background: #fee2e2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
    font-weight: 700 !important;
}

.stat-aniversario-date {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    align-self: center;
    gap: 6px;
    background: #dbeafe;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.stat-aniversario-date .calendar-icon {
    width: 14px;
    height: 14px;
    fill: #2563eb;
}

.stat-aniversario-empty {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.stat-card-departments {
    width: 190px;
    height: 254px;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 
        0 0 35px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(255, 255, 255, 0.15) inset;
    transform: translateY(-10px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.stat-icon svg {
    width: 36px;
    height: 36px;
}

.stat-icon-person {
    color: #0066cc;
}

.stat-icon-tools {
    color: #28a745;
}

.stat-icon-birthday {
    color: #2563eb;
}

/* Card de aniversários com largura maior */
.stat-card-aniversarios {
    width: 600px;
    min-height: 800px;
    max-width: 100%;
    height: auto;
}

/* Quando houver mais de 4 itens, aumenta a altura mínima */
.stat-card-aniversarios.has-many-items {
    min-height: 800px;
}


.stat-card-experiencia {
    width: 600px;
    max-width: 100%;
    min-height: 800px;
}

/* Responsividade para tablets */
@media (max-width: 1024px) {
    .stat-card-aniversarios .stat-card-experiencia  {
        width: 100%;
        max-width: 100%;
    }
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
    line-height: 1;
}

.stat-number-turn {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}
.stat-label {
    font-size: 11px;
    font-weight: 500;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.stat-content-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}


/* Cards de Departamentos */
.stat-card-department {
    background: white;
}

.stat-icon-department {
    color: #6b7280;
}

/* Cores dos cards de departamentos */
.stat-card-department.dep-risk {
    background: #dcfce7;
    border-top: 4px solid #16a34a;
}

.stat-card-department.dep-risk .stat-icon-department {
    color: #16a34a;
}

.stat-card-department.dep-journey {
    background: #dbeafe;
    border-top: 4px solid #2563eb;
}

.stat-card-department.dep-journey .stat-icon-department {
    color: #2563eb;
}

.stat-card-department.dep-rh {
    background: #fce7f3;
    border-top: 4px solid #db2777;
}

.stat-card-department.dep-rh .stat-icon-department {
    color: #db2777;
}

.stat-card-department.dep-score {
    background: #fed7aa;
    border-top: 4px solid #ea580c;
}

.stat-card-department.dep-score .stat-icon-department {
    color: #ea580c;
}

.stat-card-department.dep-sac {
    background: #fef9c3;
    border-top: 4px solid #854d0e;
}

.stat-card-department.dep-sac .stat-icon-department {
    color: #854d0e;
}

.stat-card-department.dep-adm {
    background: #e5e7eb;
    border-top: 4px solid #374151;
}

.stat-card-department.dep-adm .stat-icon-department {
    color: #374151;
}

.stat-card-department.dep-administrativo {
    background: #ede9fe;
    border-top: 4px solid #8b5cf6;
}

.stat-card-department.dep-administrativo .stat-icon-department {
    color: #8b5cf6;
}

.stat-card-department.dep-desenvolvimento {
    background: #ccfbf1;
    border-top: 4px solid #14b8a6;
}

.stat-card-department.dep-desenvolvimento .stat-icon-department {
    color: #14b8a6;
}

.stat-card-department.dep-limpeza {
    background: #ccfbf1;
    border-top: 4px solid #0d9488;
}

.stat-card-department.dep-limpeza .stat-icon-department {
    color: #0d9488;
}

#departmentsCardsContainer {
    display: contents;
}


@media (max-width: 768px) {
    /* Largura total no mobile (sobrescreve .main-content com margin-left da sidebar) */
    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
        overflow-x: clip;
        overflow-y: visible;
        box-sizing: border-box;
    }
    
    .main-box-container {
        padding: 20px 15px;
        margin: 15px auto;
        border-radius: 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .stats-cards-container {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 16px;
        width: 100%;
    }

    .dashboard-left-column {
        width: 100%;
        max-width: 100%;
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .dashboard-left-column > .stat-card:first-of-type,
    .dashboard-left-column > .stat-card-turnover,
    .dashboard-left-column > .ranking-wrapper-container {
        grid-column: 1;
        grid-row: auto;
    }

    .dashboard-left-column,
    .stats-cards-container > .stat-card-experiencia,
    .stats-cards-container > .stat-card-aniversarios {
        grid-column: 1;
        grid-row: auto;
    }
    
    .stat-card {
        width: 100%;
        max-width: 100%;
        padding: 16px 12px;
    }
    
    .stat-card-aniversarios {
        width: 100%;
        max-width: 100%;
    }
    
    .stat-card-experiencia {
        width: 100%;
        max-width: 100%;
    }
    
    .stat-card .stat-label {
        font-size: 11px;
        max-width: calc(100% - 100px);
        padding: 0 6px;
    }
    
    .stat-card .stat-number {
        font-size: 28px;
        max-width: 60px;
        right: 12px;
    }
    
    .stat-card .stat-icon {
        left: 12px;
        width: 32px;
        height: 32px;
    }
    
    .stat-card .stat-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .stat-card-turnover .turnover-center-value {
        font-size: 2rem;
        margin-bottom: 4px;
    }
    
    .stat-departments {
        top: 56px;
        left: 12px;
        right: 12px;
        gap: 6px;
    }
    
    .stat-department-item {
        padding: 0px 0;
        gap: 6px;
    }
    
    .stat-department-name.dep-badge {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
    
    .stat-department-count {
        font-size: 12px;
    }
    
    .stat-aniversarios-list .stat-experiencia-list{
        top: 56px;
        left: 12px;
        right: 12px;
        gap: 6px;
    }
    
    .stat-aniversario-item .stat-experiencia-item {
        padding: 4px 8px;
        gap: 8px;
    }
    
    .stat-aniversario-photo .stat-experiencia-photo {
        width: 36px;
        height: 36px;
    }
    
    .stat-aniversario-name .stat-experiencia-name {
        font-size: 11px;
    }
    
    .stat-aniversario-details .stat-experiencia-details {
        gap: 3px;
    }
    
    .stat-aniversario-turno,
    .stat-aniversario-departamento,
    .stat-aniversario-anos {
        font-size: 9px;
        padding: 3px 8px;
    }

    .stat-aniversario-milestone {
        font-size: 9px;
        padding: 4px 8px;
        line-height: 1.3;
    }
    
    .stat-aniversario-date {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .stat-aniversario-date .calendar-icon {
        width: 12px;
        height: 12px;
    }
    
    /* Card de aniversários/experiência responsivo em tablets */
    .stat-card-aniversarios {
        width: 100%;
        max-width: 100%;
    }
}

/* Responsividade para telas muito pequenas */
@media (max-width: 480px) {
    .stat-card {
        width: 100%;
        max-width: 100%;
        padding: 14px 10px;
    }
    
    .stat-card-aniversarios {
        width: 100%;
        max-width: 100%;
    }
    
    .stat-aniversario-item {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 8px;
    }

    .stat-aniversario-info {
        flex: 1 1 calc(100% - 58px);
        min-width: 0;
    }
    
    .stat-aniversario-date {
        width: 100%;
        justify-content: center;
        margin-top: 2px;
        order: 3;
    }
    
    .stat-aniversario-details {
        flex-wrap: wrap;
        width: 100%;
        justify-content: flex-start;
        gap: 4px 5px;
    }

    .stat-aniversario-milestone {
        flex: 1 1 100%;
        text-align: left;
    }

    .stat-aniversario-dias {
        margin-left: auto;
    }
    
    .stat-card .stat-label {
        font-size: 10px;
        max-width: calc(100% - 90px);
        padding: 0 4px;
        top: 14px;
    }
    
    .stat-card .stat-number {
        font-size: 24px;
        max-width: 50px;
        right: 10px;
        top: 14px;
    }
    
    .stat-card .stat-icon {
        left: 10px;
        width: 28px;
        height: 28px;
        top: 14px;
    }
    
    .stat-card .stat-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .stat-card-turnover .turnover-center-value {
        font-size: 2rem;
    }
}

@media (max-width: 320px) {
    .stat-card .stat-label {
        font-size: 9px;
        max-width: calc(100% - 80px);
    }
    
    .stat-card .stat-number {
        font-size: 20px;
        max-width: 45px;
    }
    
    .stat-card-turnover .turnover-center-value {
        font-size: 1.75rem;
    }
}


/* Card de Gráfico */
.grafico-card {
    background: rgba(255, 255, 255, 0.40);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 18px;
    padding: 24px 20px 20px 20px;
    margin-top: 24px;
    box-shadow: 
        0 0 30px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(255, 255, 255, 0.1) inset;
    backdrop-filter: blur(25px) saturate(150%);
}

.grafico-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.grafico-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark--primary);
    margin: 0;
}

.btn-voltar-lista {
    padding: 8px 16px;
    background: var(--accent--primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-voltar-lista:hover {
    background: var(--accent--secondary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.grafico-container {
    position: relative;
    height: 400px;
    width: 100%;
}

.stat-icon-chart {
    color: #2563eb;
}

@media (max-width: 768px) {
    .list-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .list-item-actions {
        width: 100%;
    }
    
    .btn-ver-perfil {
        width: 100%;
        text-align: center;
    }
}