/* =========================================================
   AJUDA - Estilos específicos
   ========================================================= */

:root {
  /* Definições de cores (ajuste baseado em style.css) */
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-300: #93c5fd;
  --primary-50: #eff6ff;

  --success-600: #16a34a;
  --success-700: #15803d;
  --success-50: #f0fdf4;
  --success-300: #86efac;

  --warning-50: #fffbeb;
  --warning-500: #f59e0b;
  --warning-600: #d97706;
  --warning-700: #b45309;

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;

  --violet-50: #f5f3ff;
  --violet-300: #d8b4fe;
  --violet-600: #8b5cf6;
  --violet-700: #6d28d9;

  --error-600: #dc2626;

  --radius-xl: 1rem;
  --radius-lg: 0.5rem;
  --radius-md: 0.375rem;

  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;

  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-3xl: 1.875rem;
}


.help-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* quando a ajuda estiver dentro do index (painel SPA) */
.panel-container.help-container {
  max-width: 1400px;
  width: 100%;
}


/* HERO / CABEÇALHO DA PÁGINA DE AJUDA */
.help-hero {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: #fff;
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  margin-bottom: var(--space-8);
  position: relative;
  overflow: hidden;
}

.help-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 0%, rgba(255, 255, 255, .1), transparent 55%);
  opacity: .8;
  pointer-events: none;
}

.help-hero-content {
  position: relative;
  z-index: 1;
}

.help-hero h2 {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: var(--font-size-3xl);
  margin-bottom: .25rem;
}

.help-hero p {
  opacity: .95;
  max-width: 720px;
}

.help-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: var(--space-3);
}

.help-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .75rem;
  border-radius: 999px;
  font-size: var(--font-size-xs);
  font-weight: 700;
  background: rgba(255, 255, 255, .12);
  color: #f9fafb;
  border: 1px solid rgba(255, 255, 255, .25);
}

/* GRID PRINCIPAL: CONTEÚDO + SIDEBAR */
.help-grid {
  /* Manter 100% de largura para o main */
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (max-width: 992px) {
  .help-grid {
    grid-template-columns: 1fr;
  }
}

/* COLUNAS INTERNAS (duas colunas de expansores) */
.help-grid-2col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-4);
}

@media (max-width: 992px) {
  .help-grid-2col {
    grid-template-columns: 1fr;
  }
}

.help-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* TÍTULOS DE SEÇÃO DA AJUDA */
.help-section-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--gray-800);
}


/* EXPANSORES (details/summary) */
.help-expander {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: var(--space-4);
  margin-bottom: var(--space-2);
}

.help-expander summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 600;
  font-size: var(--font-size-lg);
  color: var(--gray-800);
}

.help-expander summary::-webkit-details-marker {
  display: none;
}

.help-expander summary .material-icons {
  font-size: 22px;
}

.help-expander[open] {
  border-color: var(--primary-300);
  box-shadow: var(--shadow-lg);
}

.help-expander .expander-content {
  margin-top: var(--space-3);
  color: var(--gray-700);
  font-size: var(--font-size-sm);
}

.help-expander .bullets {
  margin: var(--space-2) 0 var(--space-1);
  padding-left: 1.25rem;
  list-style: disc; /* Garante que listas não ordenadas usem disco */
}

.help-expander .bullets li {
  margin-bottom: .25rem;
}

/* Sub-expander dentro do help-expander (do regras_verbas.css) */
.help-expander .sub-expander {
    margin-top: var(--space-3);
    margin-bottom: var(--space-3);
    border: 1px solid var(--gray-100);
    box-shadow: none;
    background: #fff;
}

.help-expander .sub-expander summary {
    padding: var(--space-3);
    font-size: var(--font-size-base);
    font-weight: 500;
}

.help-expander .sub-expander .expander-content {
    border-top: none;
    padding-top: var(--space-1);
    padding-bottom: var(--space-3);
    padding-left: var(--space-6);
    padding-right: var(--space-6);
}


/* Pequenos badges de legenda */
.help-badge {
  display: inline-block;
  font-size: var(--font-size-xs);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
  border-radius: 6px;
  padding: .15rem .4rem;
}

/* Destaque temporário ao navegar pelo índice rápido */
.help-highlight {
  animation: helpHighlight 1.2s ease-out;
}

@keyframes helpHighlight {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, .45);
  }

  60% {
    box-shadow: 0 0 0 6px rgba(37, 99, 235, .15);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

/* Cores auxiliares de texto */
.text-primary {
  color: #2563eb;
}

.text-success {
  color: #16a34a;
}

.text-warning {
  color: #d97706;
}

.text-danger {
  color: #dc2626;
}

.text-info {
  color: #0ea5e9;
}

.text-purple {
  color: #9333ea;
}

/* NOTAS / AVISOS (Padrão) */
.help-note {
  background: var(--warning-50);
  border: 1px solid var(--warning-500);
  color: #7a4d08;
  border-radius: var(--radius-md);
  padding: .5rem .75rem;
  font-size: var(--font-size-sm);
}


/* --- NOTAS ESPECÍFICAS DE REGRAS DE VERBAS (do regras_verbas.css) --- */

.regra-note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
  margin-top: var(--space-4);
  line-height: 1.4;
  white-space: normal;
}

.regra-note .material-icons{
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-right: var(--space-2);
  padding-top: 2px;
}

.regra-note > span:last-child,
.regra-note > strong:first-child {
    display: inline;
    white-space: normal;
}

/* Nota de Dinheiro (Ajuda de Custo) - Verde */
.note-money{
  background: var(--success-50);
  border: 1px solid var(--success-300, #86efac);
  color: var(--success-700, #15803d);
}
.note-money .material-icons{ color: var(--success-600, #16a34a); }

/* Nota de Escala - Roxo/Rave */
.note-scale{
  background: var(--violet-50, #f5f3ff);
  border: 1px solid var(--violet-300, #d8b4fe);
  color: var(--violet-700, #6d28d9);
}
.note-scale .material-icons{ color: var(--violet-600, #8b5cf6); }

/* Nota de Intrajornada - Azul */
.note-intra{
  background: var(--primary-50);
  border: 1px solid var(--primary-300);
  color: var(--primary-700);
}
.note-intra .material-icons{ color: var(--primary-600); }

/* Nota de Sem Pagamento - Vermelho/Cinza */
.note-no-pay{
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
}
.note-no-pay .material-icons{ color: var(--gray-500); }

/* Ajuste específico para a "Nota de Inconsistência" */
.regra-note.note-scale strong {
    white-space: nowrap;
    display: inline-block;
}

/* TABELA DE TEMPOS LEGAIS */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: var(--space-4);
    font-size: var(--font-size-sm);
}

.data-table th, .data-table td {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--gray-200);
    text-align: center;
    vertical-align: middle;
}

.data-table th {
    background: var(--gray-100);
    font-weight: 600;
    color: var(--gray-700);
}

.data-table tbody tr:nth-child(odd) {
    background: #fff;
}

.data-table tbody tr:nth-child(even) {
    background: var(--gray-50);
}


/* CABEÇALHO SUPERIOR DA AJUDA (Fixo) */
.help-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  height: 64px;
  background: var(--primary-600, #2563eb);
  color: #fff;

  display: flex;
  align-items: center;

  padding: 0 1.5rem;
  box-shadow: var(--shadow-md);
  z-index: 9999;
}


.help-topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.help-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: none;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 0.875rem;
  cursor: pointer;
}

.help-back-btn .material-icons {
  font-size: 18px;
}

.help-back-btn:hover {
  background: rgba(255,255,255,0.18);
}

.help-topbar-text .help-app-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.help-topbar-text .help-app-subtitle {
  font-size: 0.8rem;
  opacity: 0.85;
}