/* ============================================================
   BuscarPDF Web - Estilos do Dashboard Executivo de Inteligência
   Padrão: Apple / Linear Luxury (Perfeição em Modo Claro e Escuro)
   Ref: media_1789937731964.png e media_1789938824188.png
   ============================================================ */

.dashboard-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
}

/* Header Hero com Frase Inspiradora */
.dash-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.25rem;
  flex-wrap: wrap;
}

.dash-hero-left {
  flex: 1;
  min-width: 320px;
}

.dash-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--accent-light);
  border: 1px solid rgba(37, 99, 235, 0.25);
  color: var(--accent-primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}

.dash-main-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}

html[data-theme="dark"] .dash-main-title {
  background: linear-gradient(135deg, var(--text-primary) 40%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dash-main-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 620px;
}

/* Card Frase Inspiradora */
.dash-quote-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.35rem;
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  max-width: 440px;
  position: relative;
  overflow: hidden;
}

.dash-quote-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #38bdf8, #2563eb);
}

.dash-quote-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #10b981);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.35);
  flex-shrink: 0;
}

.dash-quote-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.dash-quote-text {
  font-size: 0.86rem;
  font-weight: 500;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.35;
  margin: 0;
}

.dash-quote-author {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   Grid de 4 Cards Funil de Métricas (Neon Accents)
   ============================================================ */
.dash-funnel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (max-width: 1024px) {
  .dash-funnel-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .dash-funnel-grid {
    grid-template-columns: 1fr;
  }
}

.dash-funnel-card {
  padding: 1.35rem 1.4rem;
  background: var(--bg-surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-apple);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dash-funnel-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}

/* Bordas e Acentos Coloridos */
.dash-funnel-card.border-cyan {
  border-top: 3px solid #06b6d4;
}
.dash-funnel-card.border-cyan:hover {
  border-color: #06b6d4;
  box-shadow: 0 12px 30px -4px rgba(6, 182, 212, 0.2);
}

.dash-funnel-card.border-emerald {
  border-top: 3px solid #10b981;
}
.dash-funnel-card.border-emerald:hover {
  border-color: #10b981;
  box-shadow: 0 12px 30px -4px rgba(16, 185, 129, 0.2);
}

.dash-funnel-card.border-purple {
  border-top: 3px solid #8b5cf6;
}
.dash-funnel-card.border-purple:hover {
  border-color: #8b5cf6;
  box-shadow: 0 12px 30px -4px rgba(139, 92, 246, 0.2);
}

.dash-funnel-card.border-blue {
  border-top: 3px solid #3b82f6;
}
.dash-funnel-card.border-blue:hover {
  border-color: #3b82f6;
  box-shadow: 0 12px 30px -4px rgba(59, 130, 246, 0.2);
}

.funnel-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.funnel-card-label-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.funnel-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.border-cyan .funnel-icon { background: rgba(6, 182, 212, 0.15); color: #0891b2; }
.border-emerald .funnel-icon { background: rgba(16, 185, 129, 0.15); color: #059669; }
.border-purple .funnel-icon { background: rgba(139, 92, 246, 0.15); color: #7c3aed; }
.border-blue .funnel-icon { background: rgba(59, 130, 246, 0.15); color: #2563eb; }

html[data-theme="dark"] .border-cyan .funnel-icon { color: #06b6d4; }
html[data-theme="dark"] .border-emerald .funnel-icon { color: #10b981; }
html[data-theme="dark"] .border-purple .funnel-icon { color: #a78bfa; }
html[data-theme="dark"] .border-blue .funnel-icon { color: #60a5fa; }

.funnel-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.funnel-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-pill);
}

/* Badges em Modo Claro */
.border-cyan .funnel-badge { background: #ecfeff; color: #0891b2; border: 1px solid #cffafe; }
.border-emerald .funnel-badge { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
.border-purple .funnel-badge { background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe; }
.border-blue .funnel-badge { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }

/* Badges em Modo Escuro */
html[data-theme="dark"] .border-cyan .funnel-badge { background: rgba(6, 182, 212, 0.15); color: #22d3ee; border: none; }
html[data-theme="dark"] .border-emerald .funnel-badge { background: rgba(16, 185, 129, 0.15); color: #34d399; border: none; }
html[data-theme="dark"] .border-purple .funnel-badge { background: rgba(139, 92, 246, 0.15); color: #c084fc; border: none; }
html[data-theme="dark"] .border-blue .funnel-badge { background: rgba(59, 130, 246, 0.15); color: #93c5fd; border: none; }

.funnel-value {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.funnel-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ============================================================
   Layout Principal em 2 Colunas (Ref Imagem 4)
   ============================================================ */
.dash-columns-layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 960px) {
  .dash-columns-layout {
    grid-template-columns: 1fr;
  }
}

.dash-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Painel Padrão Glass Luxury */
.dash-card-box {
  padding: 1.5rem 1.6rem;
  background: var(--bg-surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
}

.dash-card-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.dash-card-title-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.dash-card-box-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-card-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.dash-card-subheading {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* Barras de Produtividade por Secretaria */
.secretaria-progress-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sec-progress-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sec-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-primary);
}

.sec-progress-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
}

.sec-count-badge {
  color: var(--text-muted);
}

.sec-pct-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  background: var(--badge-bg);
  color: var(--accent-primary);
  border: 1px solid var(--border-subtle);
}

.sec-progress-track {
  height: 8px;
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
}

.sec-progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.8s var(--ease-apple);
}

/* Cores Alternadas para as Barras */
.fill-blue { background: linear-gradient(90deg, #2563eb, #38bdf8); }
.fill-cyan { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
.fill-purple { background: linear-gradient(90deg, #8b5cf6, #c084fc); }
.fill-emerald { background: linear-gradient(90deg, #10b981, #34d399); }
.fill-amber { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

/* Lista de Documentos Mais Recentes */
.recent-docs-stream {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.recent-doc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast);
  gap: 1rem;
}

.recent-doc-row:hover {
  background: var(--badge-bg);
  border-color: var(--border-strong);
  transform: translateX(3px);
}

.recent-doc-main {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
  min-width: 0;
}

.doc-type-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.type-oficio { background: rgba(59, 130, 246, 0.15); color: #2563eb; border: 1px solid rgba(59, 130, 246, 0.3); }
.type-contrato { background: rgba(16, 185, 129, 0.15); color: #059669; border: 1px solid rgba(16, 185, 129, 0.3); }
.type-decreto { background: rgba(139, 92, 246, 0.15); color: #7c3aed; border: 1px solid rgba(139, 92, 246, 0.3); }
.type-portaria { background: rgba(6, 182, 212, 0.15); color: #0891b2; border: 1px solid rgba(6, 182, 212, 0.3); }
.type-padrao { background: var(--badge-bg); color: var(--text-primary); border: 1px solid var(--border-subtle); }

html[data-theme="dark"] .type-oficio { color: #60a5fa; }
html[data-theme="dark"] .type-contrato { color: #34d399; }
html[data-theme="dark"] .type-decreto { color: #c084fc; }
html[data-theme="dark"] .type-portaria { color: #22d3ee; }

.doc-title-box {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.doc-title-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-sub-text {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.doc-action-btn {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--accent-light);
  border: 1px solid rgba(37, 99, 235, 0.25);
  color: var(--accent-primary);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--duration-fast);
  white-space: nowrap;
}

.doc-action-btn:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ============================================================
   Coluna Direita: Atalhos Rápidos & Pesquisas Frequentes
   ============================================================ */

/* Ações e Atalhos [Alt + 1..5] */
.shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.shortcut-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.95rem;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-apple);
  text-decoration: none;
  color: var(--text-primary);
}

.shortcut-action-row:hover {
  background: var(--accent-light);
  border-color: rgba(37, 99, 235, 0.35);
  transform: translateX(3px);
}

.shortcut-action-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.shortcut-action-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--badge-bg);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.shortcut-action-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.shortcut-action-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.kbd-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.55rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.shortcut-action-row:hover .kbd-badge {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* Nuvem de Pesquisas Mais Frequentes */
.frequent-queries-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.query-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast);
  text-decoration: none;
}

.query-pill-tag:hover {
  background: var(--accent-light);
  border-color: rgba(37, 99, 235, 0.4);
  color: var(--accent-primary);
  transform: translateY(-1px);
}

.query-pill-count {
  font-size: 0.68rem;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-pill);
  background: var(--badge-bg);
  color: var(--text-muted);
}

.query-pill-tag:hover .query-pill-count {
  background: var(--accent-primary);
  color: #ffffff;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
