/**
 * Tema UFG Moderno (Bootstrap 5) - AtoM 2.10
 * Cabeçalho amplo com imagem fotográfica real (background.jpg) 100% visível, sem camada azul.
 * Cards dos Centros de Documentação com visual refinado e suporte a Modo Claro (padrão) e Escuro.
 */

/* ==========================================================================
   Variáveis Globais - Modo Claro (Light Mode - Padrão)
   ========================================================================== */
:root,
[data-bs-theme="light"] {
  color-scheme: light !important;
  --bs-body-bg: #f1f5f9;
  --bs-body-color: #0f172a;
  --bs-heading-color: #0a2540;
  --bs-card-bg: #ffffff;
  --bs-card-color: #0f172a;
  --bs-card-border-color: #e2e8f0;
  --bs-border-color: #e2e8f0;
  --bs-link-color: #0066cc;
  --bs-link-hover-color: #004080;
  --bs-primary: #0066cc;

  --ufg-page-bg: #f4f6fa;
  --ufg-card-surface: #ffffff;
  --ufg-text-primary: #0f172a;
  --ufg-text-secondary: #475569;
  --ufg-heading-color: #026aa7;
  --ufg-border-color: #e2e8f0;
  --ufg-action-bg: #f8fafc;
  --ufg-table-header: #f8fafc;
  --ufg-input-bg: #ffffff;
}

/* ==========================================================================
   Variáveis Globais - Modo Escuro (Dark Mode)
   ========================================================================== */
[data-bs-theme="dark"] {
  color-scheme: dark !important;
  --bs-body-bg: #0b1120;
  --bs-body-color: #e2e8f0;
  --bs-heading-color: #ffffff;
  --bs-card-bg: #1e293b;
  --bs-card-color: #e2e8f0;
  --bs-card-border-color: #334155;
  --bs-border-color: #334155;
  --bs-link-color: #38bdf8;
  --bs-link-hover-color: #7dd3fc;
  --bs-primary: #38bdf8;

  --ufg-page-bg: #0b1120;
  --ufg-card-surface: #1e293b;
  --ufg-text-primary: #f8fafc;
  --ufg-text-secondary: #94a3b8;
  --ufg-heading-color: #ffffff;
  --ufg-border-color: #334155;
  --ufg-action-bg: #1e293b;
  --ufg-table-header: #0f172a;
  --ufg-input-bg: #0f172a;
}

/* ==========================================================================
   Base e Fundo da Página
   ========================================================================== */
html, body {
  background-color: var(--ufg-page-bg) !important;
  color: var(--ufg-text-primary) !important;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

[data-bs-theme="light"] body {
  background: linear-gradient(180deg, #edf2f7 0%, #f4f6fa 40%, #e8eef5 100%) !important;
}

[data-bs-theme="dark"] body {
  background: radial-gradient(circle at 50% 0%, #172033 0%, #0b1120 100%) !important;
}

#wrapper {
  background-color: transparent !important;
}

#main-column {
  color: var(--ufg-text-primary) !important;
}

a {
  color: var(--bs-link-color) !important;
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--bs-link-hover-color) !important;
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--ufg-heading-color) !important;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p, span, div, label, li, td, th {
  color: inherit;
}

/* ==========================================================================
   Barra Superior (Top-Bar) - Dark Glassmorphism Elegante
   ========================================================================== */
.modern-topbar {
  background: rgba(10, 25, 47, 0.92) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  z-index: 1030;
}

.modern-site-title {
  color: #ffffff !important;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.modern-topbar .nav-link,
.modern-topbar .btn {
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 500;
}

.modern-topbar .nav-link:hover,
.modern-topbar .nav-link:focus {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.16);
  border-radius: 6px;
}

.modern-topbar-logo {
  height: 36px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* Botão Alternador de Tema */
.modern-theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modern-theme-btn:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  transform: rotate(15deg) scale(1.08);
}

.modern-site-description {
  background: rgba(6, 16, 30, 0.95) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
}

.modern-desc-badge {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Barra de Pesquisa Moderna na Section do Cabeçalho (#search-box)
   ========================================================================== */
.modern-header-search-bar {
  background: rgba(10, 25, 47, 0.95) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  padding: 0.65rem 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

[data-bs-theme="dark"] .modern-header-search-bar {
  background: rgba(11, 17, 32, 0.95) !important;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
}

.modern-hero-search-wrapper,
.modern-subbar-search-wrapper {
  position: relative;
  width: 100%;
  max-width: 820px;
  margin-left: auto !important;
  margin-right: auto !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  z-index: 1030;
  overflow: visible !important;
}

#search-box {
  margin: 0 auto !important;
  width: 100% !important;
  max-width: 820px !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  position: relative !important;
  z-index: 1030;
  overflow: visible !important;
}

/* Container de Entrada em Estilo Pílula Elevada */
#search-box .input-group {
  width: 100% !important;
  max-width: 100% !important;
  border-radius: 50rem !important;
  padding: 4px 5px !important;
  position: relative !important;
  display: flex;
  align-items: center;
  overflow: visible !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Modo Claro (Light Mode) */
[data-bs-theme="light"] #search-box .input-group,
#search-box .input-group {
  background-color: #ffffff !important;
  border: 2px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 10px 28px -4px rgba(0, 0, 0, 0.25), 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

[data-bs-theme="light"] #search-box .input-group:focus-within,
#search-box .input-group:focus-within {
  border-color: #0072ce !important;
  box-shadow: 0 14px 34px -4px rgba(0, 114, 206, 0.32), 0 0 0 4px rgba(0, 114, 206, 0.22) !important;
}

/* Modo Escuro (Dark Mode) */
[data-bs-theme="dark"] #search-box .input-group {
  background-color: rgba(30, 41, 59, 0.96) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 2px solid rgba(56, 189, 248, 0.35) !important;
  box-shadow: 0 10px 30px -4px rgba(0, 0, 0, 0.6) !important;
}

[data-bs-theme="dark"] #search-box .input-group:focus-within {
  border-color: #38bdf8 !important;
  box-shadow: 0 14px 36px -4px rgba(56, 189, 248, 0.4), 0 0 0 4px rgba(56, 189, 248, 0.25) !important;
}

/* Botão de Opções / Filtros */
#search-box #search-box-options {
  border: 0 !important;
  border-radius: 50rem !important;
  padding: 0.6rem 1.1rem !important;
  margin-right: 4px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
}

[data-bs-theme="light"] #search-box #search-box-options,
#search-box #search-box-options {
  background: #f1f5f9 !important;
  color: #0284c7 !important;
}

[data-bs-theme="light"] #search-box #search-box-options:hover,
#search-box #search-box-options:hover {
  background: #e2e8f0 !important;
  color: #0369a1 !important;
  transform: scale(1.03);
}

[data-bs-theme="dark"] #search-box #search-box-options {
  background: rgba(15, 23, 42, 0.85) !important;
  color: #38bdf8 !important;
}

[data-bs-theme="dark"] #search-box #search-box-options:hover {
  background: rgba(15, 23, 42, 1) !important;
  color: #7dd3fc !important;
  transform: scale(1.03);
}

#search-box #search-box-options::after {
  margin-left: 0.4rem;
  vertical-align: 0.15em;
}

/* Campo de Entrada de Texto */
#search-box #search-box-input {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 1.02rem !important;
  padding: 0.6rem 0.9rem !important;
  letter-spacing: -0.01em;
}

[data-bs-theme="light"] #search-box #search-box-input,
#search-box #search-box-input {
  color: #0f172a !important;
}

[data-bs-theme="light"] #search-box #search-box-input::placeholder,
#search-box #search-box-input::placeholder {
  color: #64748b !important;
  font-style: normal;
  font-weight: 400;
  opacity: 0.9;
}

[data-bs-theme="dark"] #search-box #search-box-input {
  color: #ffffff !important;
}

[data-bs-theme="dark"] #search-box #search-box-input::placeholder {
  color: #94a3b8 !important;
}

#search-box #search-box-input:focus {
  box-shadow: none !important;
  outline: none !important;
}

/* Botão de Submeter Pesquisa */
#search-box button[type="submit"] {
  border: 0 !important;
  border-radius: 50rem !important;
  padding: 0.62rem 1.55rem !important;
  font-weight: 600;
  font-size: 0.96rem;
  letter-spacing: 0.02em;
  transition: all 0.22s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

[data-bs-theme="light"] #search-box button[type="submit"],
#search-box button[type="submit"] {
  background: linear-gradient(135deg, #0072ce 0%, #0284c7 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 114, 206, 0.4) !important;
}

[data-bs-theme="light"] #search-box button[type="submit"]:hover,
#search-box button[type="submit"]:hover {
  background: linear-gradient(135deg, #005bb5 0%, #0369a1 100%) !important;
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 16px rgba(0, 114, 206, 0.5) !important;
}

[data-bs-theme="dark"] #search-box button[type="submit"] {
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%) !important;
  color: #0b1120 !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.4) !important;
}

[data-bs-theme="dark"] #search-box button[type="submit"]:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #7dd3fc 100%) !important;
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.55) !important;
}

#search-box button[type="submit"]:active {
  transform: translateY(0);
}

/* Dropdown de Opções (#search-box-options) */
#search-box .dropdown-menu[aria-labelledby="search-box-options"] {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 0 !important;
  right: auto !important;
  transform: none !important;
  margin: 0 !important;
  border-radius: 16px !important;
  z-index: 1060 !important;
  min-width: 270px !important;
}

[data-bs-theme="light"] #search-box .dropdown-menu[aria-labelledby="search-box-options"],
#search-box .dropdown-menu[aria-labelledby="search-box-options"] {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16) !important;
}

[data-bs-theme="dark"] #search-box .dropdown-menu[aria-labelledby="search-box-options"] {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55) !important;
}

#search-box .dropdown-menu[aria-labelledby="search-box-options"] .dropdown-item {
  border-radius: 8px;
  padding: 0.55rem 0.95rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

[data-bs-theme="light"] #search-box .dropdown-menu[aria-labelledby="search-box-options"] .dropdown-item,
#search-box .dropdown-menu[aria-labelledby="search-box-options"] .dropdown-item {
  color: #0066cc !important;
}

[data-bs-theme="light"] #search-box .dropdown-menu[aria-labelledby="search-box-options"] .dropdown-item:hover,
#search-box .dropdown-menu[aria-labelledby="search-box-options"] .dropdown-item:hover {
  background: #f0f9ff !important;
  color: #0284c7 !important;
}

[data-bs-theme="dark"] #search-box .dropdown-menu[aria-labelledby="search-box-options"] .dropdown-item {
  color: #38bdf8 !important;
}

[data-bs-theme="dark"] #search-box .dropdown-menu[aria-labelledby="search-box-options"] .dropdown-item:hover {
  background: rgba(56, 189, 248, 0.15) !important;
  color: #7dd3fc !important;
}

/* Dropdown de Resultados do Autocomplete (#search-box-results) - Perfeitamente Alinhado e Sem Cortes */
#search-box-results {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
  margin: 0 !important;
  border-radius: 16px !important;
  padding: 0.75rem 0.5rem !important;
  max-height: 420px !important;
  overflow-y: auto !important;
  z-index: 1060 !important;
  list-style: none !important;
}

[data-bs-theme="light"] #search-box-results,
#search-box-results {
  background: #ffffff !important;
  border: 1px solid #dee2e6 !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22) !important;
}

[data-bs-theme="dark"] #search-box-results {
  background: rgba(30, 41, 59, 0.98) !important;
  backdrop-filter: blur(16px) !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65) !important;
}

#search-box-results li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

#search-box-results .dropdown-header {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 0.5rem 0.95rem 0.25rem !important;
  margin-top: 0.25rem !important;
}

[data-bs-theme="light"] #search-box-results .dropdown-header,
#search-box-results .dropdown-header {
  color: #0284c7 !important;
}

[data-bs-theme="dark"] #search-box-results .dropdown-header {
  color: #38bdf8 !important;
}

#search-box-results .dropdown-item {
  border-radius: 8px !important;
  padding: 0.6rem 0.95rem !important;
  font-size: 0.92rem !important;
  line-height: 1.4 !important;
  white-space: normal !important;
  word-break: break-word !important;
  display: block !important;
  transition: all 0.15s ease !important;
}

[data-bs-theme="light"] #search-box-results .dropdown-item,
#search-box-results .dropdown-item {
  color: #0f172a !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

[data-bs-theme="light"] #search-box-results .dropdown-item:hover,
#search-box-results .dropdown-item:hover,
[data-bs-theme="light"] #search-box-results .dropdown-item:focus,
#search-box-results .dropdown-item:focus {
  background-color: #f0f9ff !important;
  color: #0284c7 !important;
  transform: translateX(3px);
}

[data-bs-theme="dark"] #search-box-results .dropdown-item {
  color: #f8fafc !important;
  border-bottom: 1px solid #334155 !important;
}

[data-bs-theme="dark"] #search-box-results .dropdown-item:hover,
[data-bs-theme="dark"] #search-box-results .dropdown-item:focus {
  background-color: rgba(56, 189, 248, 0.18) !important;
  color: #38bdf8 !important;
  transform: translateX(3px);
}

#search-box-results li:last-child .dropdown-item {
  border-bottom: 0 !important;
}

#search-box-results .dropdown-divider,
#search-box-results hr {
  margin: 0.4rem 0.5rem !important;
  opacity: 1 !important;
}

[data-bs-theme="light"] #search-box-results .dropdown-divider,
#search-box-results .dropdown-divider {
  border-top: 1px solid #e9ecef !important;
}

[data-bs-theme="dark"] #search-box-results .dropdown-divider {
  border-top: 1px solid #334155 !important;
}

/* ==========================================================================
   Hero Banner Amplo com Fundo Fotográfico Real (background.jpg - 100% Nítido)
   ========================================================================== */
.modern-hero {
  position: relative;
  background-color: #0f172a !important;
  color: #ffffff;
  overflow: visible !important;
  border-bottom: 3px solid #00a3e0;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
  min-height: 200px;
  z-index: 10;
}

.modern-hero-bg-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

/* A foto background.jpg é exibida nítida, com 100% de visibilidade */
.modern-hero-bg-img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  object-position: center 30%;
  opacity: 0.95 !important;
  filter: brightness(0.94) contrast(1.06);
  transition: transform 10s ease;
}

.modern-hero:hover .modern-hero-bg-img {
  transform: translate(-50%, -50%) scale(1.05);
}

/* Overlay sutil apenas para garantir legibilidade dos textos, sem camada azul */
.modern-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.12) 40%, rgba(0, 0, 0, 0.68) 100%);
  z-index: 1;
}

.modern-hero-inner {
  position: relative;
  z-index: 3;
  overflow: visible !important;
}

.modern-hero-title {
  color: #ffffff !important;
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.95), 0 1px 3px rgba(0, 0, 0, 0.9);
}

.modern-hero-subtitle {
  color: #f8fafc !important;
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  font-weight: 500;
  line-height: 1.5;
  max-width: 720px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
}

.modern-badge {
  background: rgba(0, 0, 0, 0.55) !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  color: #ffffff !important;
  padding: 0.35rem 0.95rem;
  border-radius: 50rem;
  font-size: 0.84rem;
  font-weight: 600;
  gap: 0.5rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.modern-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.modern-hero-logo-box {
  background: rgba(255, 255, 255, 0.96) !important;
  padding: 1rem 1.75rem;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  display: inline-block;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.modern-hero-logo {
  height: 58px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
}

/* ==========================================================================
   Centros de Documentação (Cards Modernos na Home)
   ========================================================================== */
body.ufg-modern-home-page #wrapper > .row > #sidebar {
  display: none !important;
}

body.ufg-modern-home-page #wrapper > .row > #main-column {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
}

body.ufg-modern-home-page #main-column > h1,
body.ufg-modern-home-page #main-column .h1 {
  margin: 2.75rem 0 1.75rem;
  color: var(--ufg-heading-color) !important;
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.03em;
}

body.ufg-modern-home-page #content,
body.ufg-modern-home-page #main-column .page {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.modern-repository-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
  max-width: 1150px;
  margin: 1.5rem auto 4.5rem;
  padding: 0 1rem;
}

.modern-repository-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
  padding: 1.35rem;
}

/* Card dos Centros no MODO CLARO */
[data-bs-theme="light"] .modern-repository-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
}

[data-bs-theme="light"] .modern-card-top-tag {
  background: #f0f9ff !important;
  border: 1px solid #bae6fd !important;
  color: #0284c7 !important;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.3rem 0.8rem;
  border-radius: 50rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  align-self: flex-start;
}

[data-bs-theme="light"] .modern-card-logo-container {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 85px;
  margin: 0.85rem 0;
  padding: 0.5rem 1rem;
  background: #f8fafc !important;
  border-radius: 12px;
  border: 1px solid #f1f5f9 !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s ease, background 0.3s ease;
}

[data-bs-theme="light"] .modern-card-label {
  color: #0f172a !important;
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

[data-bs-theme="light"] .modern-card-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #0066cc !important;
  font-size: 0.88rem;
  font-weight: 600;
}

[data-bs-theme="light"] .modern-card-btn-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e0f2fe !important;
  border: 1px solid #bae6fd !important;
  color: #0066cc !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

[data-bs-theme="light"] .modern-repository-card:hover {
  transform: translateY(-8px);
  border-color: #0066cc !important;
  box-shadow: 0 20px 30px -8px rgba(0, 102, 204, 0.18), 0 8px 12px -4px rgba(0, 0, 0, 0.06) !important;
}

[data-bs-theme="light"] .modern-repository-card:hover .modern-card-btn-arrow {
  background: #0066cc !important;
  color: #ffffff !important;
  transform: translateX(4px);
}

[data-bs-theme="light"] .modern-repository-card:hover .modern-card-logo-container {
  background: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Card dos Centros no MODO ESCURO */
[data-bs-theme="dark"] .modern-repository-card {
  background: linear-gradient(145deg, #131d2e 0%, #1e293b 100%) !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 6px 16px -2px rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .modern-card-top-tag {
  background: rgba(56, 189, 248, 0.15) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  color: #38bdf8 !important;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.3rem 0.8rem;
  border-radius: 50rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  align-self: flex-start;
}

[data-bs-theme="dark"] .modern-card-logo-container {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 85px;
  margin: 0.85rem 0;
  padding: 0.5rem 1rem;
  background: rgba(15, 23, 42, 0.6) !important;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  transition: transform 0.3s ease, background 0.3s ease;
}

[data-bs-theme="dark"] .modern-card-label {
  color: #ffffff !important;
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

[data-bs-theme="dark"] .modern-card-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #38bdf8 !important;
  font-size: 0.88rem;
  font-weight: 600;
}

[data-bs-theme="dark"] .modern-card-btn-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.2) !important;
  border: 1px solid rgba(56, 189, 248, 0.4) !important;
  color: #38bdf8 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

[data-bs-theme="dark"] .modern-repository-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 30px -6px rgba(0, 102, 204, 0.35), 0 10px 14px -4px rgba(0, 0, 0, 0.2) !important;
  border-color: rgba(56, 189, 248, 0.7) !important;
}

[data-bs-theme="dark"] .modern-repository-card:hover .modern-card-btn-arrow {
  background: #38bdf8 !important;
  color: #0a2540 !important;
  transform: translateX(4px);
}

/* Imagens do Card */
.modern-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  transition: transform 0.45s ease;
  z-index: 1;
}

.modern-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(10, 37, 64, 0.25) 0%, rgba(10, 37, 64, 0.6) 45%, rgba(6, 20, 36, 0.96) 100%);
  transition: background 0.3s ease;
}

.modern-card-logo-img {
  max-height: 65px;
  max-width: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
  transition: transform 0.3s ease;
}

.modern-card-bottom-box {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.modern-repository-card:hover .modern-card-img {
  transform: scale(1.08);
}

.modern-repository-card:hover .modern-card-logo-img {
  transform: scale(1.05);
}

/* ==========================================================================
   Páginas Internas - Containers, Cartões, Tabelas e Acordeões
   ========================================================================== */
#content,
.page,
#main-column > .card,
.search-result,
.digitalObjectMetadata,
.digitalObjectRights {
  background-color: var(--ufg-card-surface) !important;
  color: var(--ufg-text-primary) !important;
  border: 1px solid var(--ufg-border-color) !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.05);
}

#content {
  padding: 1.75rem !important;
  margin-bottom: 2rem;
}

/* Barra Lateral / Facetas / Filtros */
#sidebar,
#sidebar .card,
#sidebar .list-group,
#sidebar .list-group-item,
.facet,
.facet .facet-body {
  background-color: var(--ufg-card-surface) !important;
  color: var(--ufg-text-primary) !important;
  border-color: var(--ufg-border-color) !important;
  border-radius: 12px;
}

#sidebar .card-header,
#sidebar h2,
#sidebar h3,
#sidebar .facet-header a {
  color: var(--ufg-heading-color) !important;
  font-weight: 700;
  font-size: 1rem;
}

#sidebar .list-group-item-action:hover {
  background-color: var(--bs-secondary-bg) !important;
  color: var(--bs-link-color) !important;
}

/* Tabelas e Metadados */
.table,
table.table {
  --bs-table-bg: var(--ufg-card-surface) !important;
  --bs-table-color: var(--ufg-text-primary) !important;
  background-color: var(--ufg-card-surface) !important;
  color: var(--ufg-text-primary) !important;
  border-color: var(--ufg-border-color) !important;
}

table.table td,
table.table th {
  color: var(--ufg-text-primary) !important;
  background-color: var(--ufg-card-surface) !important;
  border-color: var(--ufg-border-color) !important;
  padding: 0.8rem 1rem !important;
}

table.table th {
  font-weight: 600;
  color: var(--ufg-text-secondary) !important;
  background-color: var(--ufg-table-header) !important;
}

/* Acordeões Modernos */
.accordion-item {
  background-color: var(--ufg-card-surface) !important;
  border: 1px solid var(--ufg-border-color) !important;
  margin-bottom: 0.75rem;
  border-radius: 12px !important;
  overflow: hidden;
}

.accordion-button {
  background-color: var(--ufg-table-header) !important;
  color: var(--ufg-heading-color) !important;
  font-weight: 600;
  box-shadow: none !important;
  padding: 1rem 1.25rem;
}

.accordion-button:not(.collapsed) {
  background-color: rgba(0, 102, 204, 0.1) !important;
  color: var(--bs-link-color) !important;
  border-bottom: 1px solid var(--ufg-border-color);
}

.accordion-body {
  background-color: var(--ufg-card-surface) !important;
  color: var(--ufg-text-primary) !important;
  padding: 1.25rem;
}

/* Treeview Hierárquico */
#treeview,
.jstree,
.jstree-default {
  background-color: var(--ufg-card-surface) !important;
  color: var(--ufg-text-primary) !important;
}

.jstree-default .jstree-anchor {
  color: var(--ufg-text-primary) !important;
  border-radius: 6px;
}

.jstree-default .jstree-clicked {
  background-color: rgba(0, 102, 204, 0.15) !important;
  color: var(--bs-link-color) !important;
  font-weight: 600;
}

/* Formulários */
.form-control,
.form-select,
input[type="text"],
input[type="search"],
input[type="password"],
input[type="email"],
select,
textarea {
  background-color: var(--ufg-input-bg) !important;
  color: var(--ufg-text-primary) !important;
  border: 1px solid var(--ufg-border-color) !important;
  border-radius: 8px !important;
  padding: 0.6rem 0.85rem !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--bs-primary) !important;
  box-shadow: 0 0 0 0.25rem rgba(0, 102, 204, 0.2) !important;
}

/* Barra de Ações Moderna */
.actions {
  background-color: var(--ufg-action-bg) !important;
  border: 1px solid var(--ufg-border-color) !important;
  border-radius: 12px !important;
  padding: 1rem 1.5rem !important;
  margin-top: 1.75rem;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.actions .btn {
  font-weight: 600;
  border-radius: 8px;
  padding: 0.5rem 1.15rem;
}

.atom-btn-outline-light,
.actions .atom-btn-outline-light {
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(0, 102, 204, 0.2);
}

.atom-btn-outline-light:hover,
.actions .atom-btn-outline-light:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

/* ==========================================================================
   Responsividade Mobile
   ========================================================================== */
@media (max-width: 768px) {
  .modern-hero {
    min-height: 180px;
  }
  .modern-hero-logo-box {
    margin-top: 0.5rem;
    padding: 0.6rem 1.25rem;
  }
  .modern-hero-logo {
    height: 44px;
  }
  .modern-repository-grid {
    grid-template-columns: 1fr;
    max-width: 380px;
  }
  .modern-repository-card {
    min-height: 200px;
  }
  #search-box #search-box-options {
    padding: 0.5rem 0.8rem !important;
    font-size: 0.85rem !important;
  }
  #search-box #search-box-input {
    font-size: 0.94rem !important;
    padding: 0.5rem 0.65rem !important;
  }
  #search-box button[type="submit"] {
    padding: 0.5rem 1.15rem !important;
    font-size: 0.9rem !important;
  }
}
