/* RobertoRH - Candidatos: cards em sidebar, busca e filtros no topo.
   Somente /admin/painel, usando a classe aplicada no componente de candidatos.
   Não altera os filtros nem as ações do React. */
@media screen and (min-width: 1120px) {
  body:has(main > .rrh-candidate-stats) main {
    display: grid;
    grid-template-columns: 184px minmax(0, 1fr);
    grid-auto-rows: min-content;
    column-gap: 16px;
    row-gap: 0;
    align-content: start;
    min-width: 0;
  }
  body:has(main > .rrh-candidate-stats) main > :not(.rrh-candidate-stats) {
    grid-column: 2;
    min-width: 0;
  }
  body:has(main > .rrh-candidate-stats) main > .rrh-candidate-stats {
    grid-column: 1;
    grid-row: 1 / span 24;
    display: flex !important;
    flex-direction: column;
    gap: 9px !important;
    margin: 0 !important;
    padding: 10px !important;
    position: sticky;
    top: 76px;
    align-self: start;
    max-height: calc(100dvh - 92px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(71, 85, 105, .52);
    border-radius: 14px;
    scrollbar-width: thin;
    scrollbar-color: #475569 transparent;
  }
  body:has(main > .rrh-candidate-stats) main > .rrh-candidate-stats > * {
    min-width: 0 !important;
    width: 100% !important;
    flex-shrink: 0 !important;
    padding: 12px !important;
    min-height: 75px;
    box-sizing: border-box;
  }
  body:has(main > .rrh-candidate-stats) main > .rrh-candidate-stats > * > div:first-child {
    margin: -12px -12px 8px !important;
    height: 3px !important;
  }
  body:has(main > .rrh-candidate-stats) main > .rrh-candidate-stats > * > p:first-of-type {
    font-size: 10px !important;
    line-height: 1.35;
    letter-spacing: .055em;
    white-space: normal !important;
    overflow: visible !important;
  }
  body:has(main > .rrh-candidate-stats) main > .rrh-candidate-stats > * > p:nth-of-type(2) {
    font-size: 25px !important;
    line-height: 1.2;
    margin-top: 6px !important;
  }
  body:has(main > .rrh-candidate-stats) main > .rrh-candidate-stats > .skeleton {
    height: 75px !important;
  }
}

/* Recolhimento visual do menu principal somente em Candidatos, desktop/tablet.
   O menu continua navegável e mantém as preferências das demais telas. */
@media screen and (min-width: 768px) {
  body:has(main > .rrh-candidate-stats) .no-print.hidden.md\:flex > aside {
    width: 72px !important;
  }
  body:has(main > .rrh-candidate-stats) .no-print.hidden.md\:flex > aside > div:first-child > div:nth-child(2),
  body:has(main > .rrh-candidate-stats) .no-print.hidden.md\:flex > aside > nav > p,
  body:has(main > .rrh-candidate-stats) .no-print.hidden.md\:flex > aside > nav .truncate,
  body:has(main > .rrh-candidate-stats) .no-print.hidden.md\:flex > aside > div:last-child button span:nth-child(2),
  body:has(main > .rrh-candidate-stats) .no-print.hidden.md\:flex > aside > div:last-child button:last-child {
    display: none !important;
  }
  body:has(main > .rrh-candidate-stats) .no-print.hidden.md\:flex > aside > nav a,
  body:has(main > .rrh-candidate-stats) .no-print.hidden.md\:flex > aside > nav button,
  body:has(main > .rrh-candidate-stats) .no-print.hidden.md\:flex > aside > div:last-child button:first-child {
    justify-content: center !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    gap: 0 !important;
  }
  body:has(main > .rrh-candidate-stats) .no-print.hidden.md\:flex > aside > div:first-child {
    justify-content: center !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
  }
}

/* Responsividade: em notebook estreito / tablet, cartões em faixa superior.
   No celular, continuam dois por linha com a listagem abaixo. */
@media screen and (max-width: 1119px) and (min-width: 641px) {
  main > .rrh-candidate-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 9px !important;
    margin-bottom: 12px !important;
  }
  main > .rrh-candidate-stats > * { min-width: 0 !important; }
}
@media screen and (max-width: 640px) {
  main > .rrh-candidate-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px !important;
  }
  main > .rrh-candidate-stats > * { min-width: 0 !important; padding: 12px !important; }
  main > .rrh-candidate-stats > * > p:nth-of-type(2) { font-size: 24px !important; }
}

/* Impressão sem sidebar flutuante */
@media print {
  main > .rrh-candidate-stats { position: static !important; max-height: none !important; }
}
