/**
 * PRODMAIS UMC - Design System Elegante
 * CSS Profissional sem cara de IA
 * Inspirado em: Stripe, Linear, Vercel
 */

/* ========== VARIÁVEIS E FUNDAÇÕES ========== */
:root {
    /* Cores principais - Paleta sofisticada */
    --primary: #1a56db;
    --primary-dark: #1e429f;
    --primary-light: #3f83f8;
    --secondary: #0369a1;
    --accent: #f59e0b;
    
    /* Cinzas elegantes */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Tipografia */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Cal Sans', 'Inter', sans-serif;
    
    /* Espaçamento */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Raios de borda */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Sombras sutis */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Transições */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== RESET E BASE ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: clip;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--gray-900);
    background: var(--gray-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
    padding-top: 64px; /* compensar navbar fixa */
}

/* ========== HERO SECTION ELEGANTE ========== */
.hero-elegant {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 6rem 0 8rem;
    overflow: hidden;
}

.hero-elegant::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-elegant .container {
    position: relative;
    z-index: 1;
}

.hero-elegant h1 {
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    font-weight: 700;
    color: white;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-elegant .lead {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.9);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

/* ========== CARDS MODERNOS ========== */
.card-elegant {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-base);
    height: 100%;
}

.card-elegant:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--gray-300);
}

.card-elegant-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.card-elegant h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.card-elegant p {
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* ========== ESTATÍSTICAS MODERNAS ========== */
.stat-card-modern {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--gray-200);
    transition: all var(--transition-base);
}

.stat-card-modern:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========== BOTÕES ELEGANTES ========== */
.btn-elegant {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

.btn-elegant-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 2px 8px rgba(26, 86, 219, 0.25);
}

.btn-elegant-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 86, 219, 0.4);
    color: white;
}

.btn-elegant-outline {
    background: transparent;
    color: var(--gray-700);
    border: 1.5px solid var(--gray-300);
}

.btn-elegant-outline:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    color: var(--gray-900);
}

/* ========== BUSCA ELEGANTE ========== */
.search-elegant {
    display: flex;
    align-items: center;
    max-width: 680px;
    margin: 0 auto;
    background: #fff;
    border-radius: 999px;
    box-shadow: 0 8px 36px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.45);
}

.search-elegant input[type="search"],
.search-elegant input[type="text"] {
    flex: 1;
    padding: 1rem 1rem 1rem 1.5rem;
    font-size: 0.9375rem;
    border: none;
    outline: none;
    background: transparent;
    color: var(--gray-900);
    min-width: 0;
    box-shadow: none;
}

.search-elegant input::placeholder { color: var(--gray-400); }

.search-elegant input:focus { outline: none; box-shadow: none; }

.search-elegant button[type="submit"] {
    flex-shrink: 0;
    padding: 0.875rem 1.5rem;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 0.9375rem;
    font-weight: 700;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 50px;
    white-space: nowrap;
    border-radius: 0 999px 999px 0;
    padding-right: 1.75rem;
}

.search-elegant button[type="submit"]:hover { background: var(--primary-dark); }

/* ========== NAVEGAÇÃO — WHITE CLEAN NAVBAR ========== */
.navbar-elegant {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    height: 64px;
    display: flex;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    padding: 0;
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
}

.navbar-elegant .container {
    display: flex;
    align-items: center;
    height: 64px;
}

/* ── Brand ── */
.navbar-elegant .navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0;
    margin-right: 2rem;
    text-decoration: none;
    flex-shrink: 0;
}

.navbar-elegant .navbar-logo {
    height: 36px;
    width: auto;
    flex-shrink: 0;
    display: block;
    transition: opacity 0.2s ease;
    /* sem filtro — logo UMC aparece no azul original */
}

.navbar-elegant .navbar-brand:hover .navbar-logo { opacity: 0.75; }

.navbar-elegant .brand-text {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.04em;
    line-height: 1;
}

.navbar-elegant .brand-text .highlight {
    color: var(--primary);
}

/* ── Links de nav ── */
.navbar-elegant .navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: nowrap;
}

.nav-link-elegant {
    color: var(--gray-500);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0;
    transition: color 0.15s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
    letter-spacing: 0.005em;
    border-bottom: 2px solid transparent;
    line-height: 1;
    position: relative;
    top: 1px; /* alinha a border-bottom com a borda do navbar */
}

.nav-link-elegant i {
    font-size: 0.75rem;
}

.nav-link-elegant:hover {
    color: var(--gray-900);
}

.nav-link-elegant.active {
    color: var(--primary);
    font-weight: 600;
    border-bottom-color: var(--primary);
}

/* CTA Admin — botão azul sólido */
.nav-cta-admin {
    color: #fff;
    background: var(--primary);
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    margin-left: 0.5rem;
}

.nav-cta-admin:hover {
    background: var(--primary-dark);
    color: #fff;
    box-shadow: 0 4px 14px rgba(26,86,219,0.3);
}

/* divisor vertical */
.nav-divider {
    width: 1px;
    height: 20px;
    background: var(--gray-200);
    margin: 0 0.5rem;
    flex-shrink: 0;
}

/* menu do usuário logado */
.nav-user-toggle,
.nav-user-toggle:link,
.nav-user-toggle:visited {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.75rem 0.3rem 0.3rem;
    border-radius: 100px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    text-decoration: none;
    color: #111827;
    margin-left: 0.5rem;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.nav-user-toggle:hover,
.nav-user-toggle:focus {
    background: var(--gray-100);
    border-color: var(--primary);
    color: #111827;
    text-decoration: none;
}

.nav-user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #111827;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.nav-user-greeting {
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    color: #111827;
}

.nav-pending-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 .3rem;
    background: #ef4444;
    color: #fff;
    font-size: .65rem;
    font-weight: 800;
    border-radius: 100px;
    line-height: 1;
}

.nav-pending-badge--inline {
    margin-left: .5rem;
}

.nav-user-caret {
    font-size: 0.6875rem;
    color: var(--gray-400);
    transition: transform 0.2s ease;
}

.nav-user-toggle[aria-expanded="true"] .nav-user-caret {
    transform: rotate(180deg);
}

.nav-user-menu {
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    box-shadow: var(--shadow-md, 0 8px 24px rgba(0,0,0,.12));
    padding: 0.5rem;
    margin-top: 0.5rem;
    min-width: 220px;
    inset-inline-end: 0 !important;
    inset-inline-start: auto !important;
    right: 0 !important;
    left: auto !important;
    transform: none !important;
}

.nav-user-menu .dropdown-item {
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.nav-user-menu .dropdown-item:hover {
    background: var(--gray-50);
}

.nav-user-menu .dropdown-item.text-danger:hover {
    background: #fef2f2;
}

/* toggler para fundo branco — só aparece no mobile */
@media (min-width: 992px) {
    .navbar-elegant .navbar-toggler { display: none !important; }
}

/* menu mobile — off-canvas lateral (desliza da direita pra esquerda ao abrir,
   e da esquerda pra direita ao fechar; nativo do Bootstrap Offcanvas, some
   automaticamente em >=992px via .navbar-expand-lg .offcanvas do próprio Bootstrap) */
@media (max-width: 991px) {
    .navbar-elegant .offcanvas {
        width: min(260px, 75vw);
    }
    .navbar-elegant .offcanvas-header {
        border-bottom: 1px solid var(--gray-100);
        padding: 1.25rem 1.5rem;
    }
    .navbar-elegant .offcanvas-title {
        font-weight: 700;
        font-size: 1.375rem;
        color: var(--gray-900);
    }
    .navbar-elegant .offcanvas-header .btn-close {
        font-size: 0.85rem;
        opacity: 0.6;
    }
    .navbar-elegant .offcanvas-body {
        padding: 0;
    }
    .navbar-elegant .navbar-nav {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
    }
    .navbar-elegant .navbar-nav > .nav-item {
        border-bottom: 1px solid var(--gray-100);
    }
    .nav-link-elegant {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        padding: 1.1rem 1.5rem;
        border-radius: 0;
        font-size: 1.0625rem;
        font-weight: 500;
        color: var(--gray-600);
        text-align: left;
        border-bottom: none;
        top: 0;
    }
    /* Ícones somem no drawer mobile — só texto, alinhado à esquerda.
       Exceção: a setinha do acordeão de usuário é funcional, não decorativa. */
    .navbar-elegant .offcanvas .nav-link-elegant > i:not(.nav-user-accordion-caret) {
        display: none;
    }
    .nav-link-elegant.active {
        background: var(--gray-50);
        color: var(--primary);
        font-weight: 700;
        border-bottom: none;
    }
    .nav-cta-admin {
        margin: 1.25rem 1.5rem 0;
        justify-content: center;
    }
    .nav-divider { display: none; }

    /* Acordeão do usuário (substitui o dropdown redondo, só no mobile) */
    .nav-user-accordion-toggle {
        background: none;
        border: none;
        cursor: pointer;
        gap: 0.65rem;
    }
    .nav-user-accordion-name {
        font-weight: 500;
        max-width: 150px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        text-align: left;
    }
    .nav-user-accordion-caret {
        margin-left: auto;
        font-size: 0.75rem;
        color: var(--gray-400);
        transition: transform 0.25s ease;
    }
    .nav-user-accordion-toggle[aria-expanded="true"] .nav-user-accordion-caret {
        transform: rotate(180deg);
    }
    .nav-user-accordion-toggle[aria-expanded="true"] {
        background: var(--gray-50);
        color: var(--primary);
        font-weight: 700;
    }
    .nav-user-accordion-panel {
        background: var(--gray-50);
    }
    .nav-link-elegant--sub {
        padding: 0.85rem 1.5rem;
        font-size: 0.9375rem;
        font-weight: 500;
        color: var(--gray-500);
        border-bottom: 1px solid var(--gray-100);
    }
    .nav-user-accordion-panel .nav-link-elegant--sub:last-child {
        border-bottom: none;
    }
}

/* ========== BADGES MODERNOS ========== */
.badge-elegant {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 1px solid;
}

.badge-primary {
    background: rgba(26, 86, 219, 0.1);
    color: var(--primary);
    border-color: rgba(26, 86, 219, 0.2);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.2);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.2);
}

.badge-neutral {
    background: var(--gray-100);
    color: var(--gray-700);
    border-color: var(--gray-200);
}

/* ========== ANIMAÇÕES SUAVES ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp var(--transition-slow) ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight var(--transition-base) ease-out;
}

/* ========== GRID RESPONSIVO ========== */
.grid-elegant {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* ========== FOOTER ELEGANTE ========== */
.footer-elegant {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 3rem 0 1.5rem;
    margin-top: 6rem;
}

.footer-elegant h5 {
    color: white;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer-elegant a {
    color: var(--gray-400);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-elegant a:hover {
    color: white;
}

/* ========== RESPONSIVIDADE ========== */
@media (max-width: 768px) {
    .hero-elegant {
        padding: 4rem 0 5rem;
    }
    
    .hero-elegant h1 {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .card-elegant {
        padding: 1.5rem;
    }
}

/* ========== UTILITÁRIOS ========== */
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255,255,255,0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.hover-lift {
    transition: transform var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-4px);
}

/* ========== MOBILE-FIRST ADDITIONS ========== */

/* Tipografia fluida */
:root {
    --font-title-fluid: clamp(1.5rem, 4vw, 2.5rem);
    --font-subtitle-fluid: clamp(1rem, 2.5vw, 1.25rem);
    --touch-min: 44px;
}

body {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Touch targets mínimos WCAG 2.1 */
.btn,
.btn-elegant,
.nav-link,
.nav-link-elegant {
    min-height: var(--touch-min);
}

/* Evita zoom automático no iOS em inputs */
.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
    font-size: 16px !important;
}

@media (min-width: 768px) {
    .form-control,
    .form-select,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    textarea,
    select {
        font-size: 0.9375rem !important;
    }
}

/* Hamburger animation (Bootstrap toggler) */
.navbar-toggler {
    border: none;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    min-height: var(--touch-min);
    min-width: var(--touch-min);
    transition: background var(--transition-fast);
}

.navbar-toggler:focus,
.navbar-toggler:focus-visible,
.navbar-toggler:active {
    box-shadow: none !important;
    outline: none !important;
}

.navbar-toggler:hover {
    background: var(--gray-100);
}

.navbar-toggler-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    margin: 5px auto;
}

/* Tabelas responsive no mobile */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Cards no mobile — padding reduzido */
@media (max-width: 575px) {
    .card-elegant {
        padding: 1.25rem;
    }

    .stat-card-modern {
        padding: 1.25rem;
    }

    .hero-elegant {
        padding: 3rem 0 4rem;
    }

    .hero-elegant h1 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .hero-elegant .lead {
        font-size: 0.938rem;
    }
}

/* Charts responsive */
.chart-container {
    position: relative;
    width: 100%;
    height: 250px;
}

@media (min-width: 768px) {
    .chart-container {
        height: 350px;
    }
}

/* Imagens lazy */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Utilitários de espaçamento mobile */
@media (max-width: 575px) {
    .px-mobile-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
    .py-mobile-3 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
    .gap-mobile-2 { gap: 0.5rem !important; }
    .fs-mobile-sm { font-size: 0.875rem !important; }
}

/* ═══════════════════════════════════════════════════
   HERO SECTION COMPONENT (HeroSection.php)
═══════════════════════════════════════════════════ */

.hero-section { position: relative; overflow: hidden; }

.hero-bg-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.hero-dot-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

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

.hero-badge-wrapper { margin-bottom: 1rem; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.hero-title {
    font-size: clamp(1.875rem, 4.5vw, 2.875rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 0.875rem;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
}

.hero-subtitle {
    font-size: clamp(0.875rem, 2vw, 1.05rem);
    color: rgba(255, 255, 255, 0.82);
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
    line-height: 1.65;
}

/* Alert de ES dentro do hero — leitura sobre gradiente escuro */
.hero-section .alert-warning.glass-panel {
    background: rgba(0, 0, 0, 0.22) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    border-radius: 12px;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

/* ═══════════════════════════════════════════════════
   NAVBAR BRAND
═══════════════════════════════════════════════════ */

.brand-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.03em;
    line-height: 1;
}

.brand-text .highlight { color: var(--primary); }

/* ═══════════════════════════════════════════════════
   STAT CARD (design branco com acento colorido)
═══════════════════════════════════════════════════ */

.stat-card-wrapper { height: 100%; }

.stat-card {
    background: #fff;
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    height: 100%;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    overflow: hidden;
    position: relative;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card-content { position: relative; z-index: 1; }

.stat-card-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 1.1rem;
}

.stat-card-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: 0.375rem;
    letter-spacing: -0.04em;
}

.stat-card-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 1rem;
}

.stat-card-link {
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: gap 0.15s ease;
}

.stat-card-link:hover { gap: 0.625rem; }
.stat-card-link i { font-size: 0.7rem; }
.stat-card-decor { display: none; }

/* Variantes de cor para .stat-card (sem inline styles) */
.stat-card--primary { border-top: 4px solid var(--primary); }
.stat-card--primary .stat-card-icon { background: linear-gradient(135deg, var(--primary-light), var(--primary)); }
.stat-card--primary .stat-card-link { color: var(--primary); }

.stat-card--success { border-top: 4px solid #059669; }
.stat-card--success .stat-card-icon { background: linear-gradient(135deg, #10b981, #059669); }
.stat-card--success .stat-card-link { color: #059669; }

.stat-card--warning { border-top: 4px solid #d97706; }
.stat-card--warning .stat-card-icon { background: linear-gradient(135deg, #fbbf24, #d97706); }
.stat-card--warning .stat-card-link { color: #d97706; }

.stat-card--info { border-top: 4px solid var(--secondary); }
.stat-card--info .stat-card-icon { background: linear-gradient(135deg, #38bdf8, var(--secondary)); }
.stat-card--info .stat-card-link { color: var(--secondary); }

@media (max-width: 575px) {
    .stat-card { padding: 1.1rem; }
    .stat-card-value { font-size: 1.875rem; }
}

/* Mobile (grid 2 colunas): garante que "Ver todos" fique sempre no rodapé do
   card, mesmo quando o card vizinho na mesma linha tem um label mais alto
   (ex.: "Produções Científicas" quebra em 2 linhas, "Pesquisadores" não) */
@media (max-width: 991px) {
    .stat-card {
        display: flex;
        flex-direction: column;
    }

    .stat-card-content {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .stat-card-link {
        margin-top: auto;
    }
}

/* ═══════════════════════════════════════════════════
   A1.1 — PREFERS-REDUCED-MOTION
═══════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .fade-in-up, .slide-in-right { animation: none !important; }
}

/* ═══════════════════════════════════════════════════
   A1.2 — FOOTER PRODMAIS (redesign navy)
═══════════════════════════════════════════════════ */
.footer-prodmais {
    background: #0f172a;
    color: rgba(255,255,255,0.6);
    padding: 4rem 0 0;
    margin-top: 5rem;
}

.footer-prodmais .footer-brand-logo {
    height: 36px;
    width: auto;
    max-width: 140px;
    display: block;
    object-fit: contain;
    margin-bottom: 0.875rem;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.footer-prodmais .footer-brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.footer-prodmais .footer-brand-name .highlight { color: var(--primary-light); }

.footer-prodmais .footer-tagline {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.45);
    line-height: 1.5;
    max-width: 220px;
}

.footer-prodmais .footer-col-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.footer-prodmais .footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-prodmais .footer-links-list li { margin-bottom: 0.625rem; }

.footer-prodmais .footer-links-list a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.15s ease;
}

.footer-prodmais .footer-links-list a:hover { color: #fff; }

.footer-prodmais .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 3rem;
    padding: 1.25rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-prodmais .footer-copyright {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
    margin: 0;
}

.footer-prodmais .footer-version {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.25);
    font-family: 'Courier New', monospace;
}

@media (max-width: 767px) {
    .footer-prodmais { padding-top: 3rem; }
    .footer-prodmais .footer-bottom { justify-content: center; text-align: center; }
}

/* ═══════════════════════════════════════════════════
   A1.3 — CONTENT CARD (card branco com acento no topo)
═══════════════════════════════════════════════════ */
.content-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    height: 100%;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    overflow: hidden;
}

.content-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.content-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.content-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

.content-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 0.25rem;
    line-height: 1.3;
}

.content-card-body {
    font-size: 0.875rem;
    color: var(--gray-500);
    line-height: 1.6;
    margin: 0;
}

.content-card-accent { border-top: 4px solid var(--primary); }

/* ── Feature Icon — substitui inline gradient nos feature cards ── */
.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.375rem;
    color: #fff;
    flex-shrink: 0;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.content-card:hover .feature-icon {
    transform: scale(1.08);
}

.feature-icon.fi-blue   { background: linear-gradient(135deg, var(--primary-light), var(--primary)); box-shadow: 0 6px 16px rgba(26,86,219,.22); }
.feature-icon.fi-green  { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 6px 16px rgba(5,150,105,.22); }
.feature-icon.fi-amber  { background: linear-gradient(135deg, #fbbf24, #d97706); box-shadow: 0 6px 16px rgba(217,119,6,.22); }
.feature-icon.fi-navy   { background: linear-gradient(135deg, var(--primary-light), var(--primary-dark)); box-shadow: 0 6px 16px rgba(30,66,159,.22); }
.feature-icon.fi-orcid  { background: linear-gradient(135deg, #b5e042, #a6ce39); box-shadow: 0 6px 16px rgba(166,206,57,.25); }
.feature-icon.fi-sky    { background: linear-gradient(135deg, #38bdf8, #0891b2); box-shadow: 0 6px 16px rgba(8,145,178,.22); }

/* ── Variante pequena dos botões ── */
.btn-primary-ds--sm {
    font-size: 0.8125rem;
    padding: 0.45rem 1rem;
}
.btn-outline-ds--sm {
    font-size: 0.8125rem;
    padding: 0.45rem 1rem;
}
/* Centralizar conteúdo quando o botão ocupa largura total (d-grid) */
.d-grid .btn-primary-ds,
.d-grid .btn-outline-ds { justify-content: center; }

/* ═══════════════════════════════════════════════════
   A1.3b — RESEARCHER CARDS (página Pesquisadores)
═══════════════════════════════════════════════════ */
.researcher-card {
    background: #fff;
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.researcher-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.researcher-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.researcher-avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.375rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(26,86,219,.22);
}

.researcher-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.3;
    margin: 0 0 0.5rem;
}

.researcher-meta {
    background: rgba(26,86,219,.04);
    border-radius: var(--radius-md);
    padding: 0.7rem 1rem;
    margin-bottom: 1.125rem;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.researcher-meta i { color: var(--primary); }

.badge-lattes {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: #fff;
    padding: 0.25rem 0.625rem;
    border-radius: 7px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.badge-orcid {
    background: linear-gradient(135deg, #b5e042, #a6ce39);
    color: #fff;
    padding: 0.25rem 0.625rem;
    border-radius: 7px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.badge-ppg {
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 0.25rem 0.625rem;
    border-radius: 7px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-researcher {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    color: #fff;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 42px;
    transition: all var(--transition-fast);
    box-shadow: 0 3px 10px rgba(26,86,219,.2);
}

.btn-researcher:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(26,86,219,.32);
    color: #fff;
}

.btn-orcid-link {
    background: #a6ce39;
    color: #fff;
    padding: 0.65rem 0.875rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    min-width: 42px;
    transition: all var(--transition-fast);
    box-shadow: 0 3px 10px rgba(166,206,57,.22);
}

.btn-orcid-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(166,206,57,.38);
    color: #fff;
    background: #8ab62d;
}

/* Search box — pesquisadores */
.researcher-search-box {
    background: #fff;
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem 1.5rem;
}

.researcher-search-box .search-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    letter-spacing: 0.01em;
    margin-bottom: 0.5rem;
}

.researcher-search-box .search-label i { color: var(--primary); }

.search-input-wrap { position: relative; }

.search-input-wrap .fa-search {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 0.875rem;
    pointer-events: none;
}

.search-input-wrap .form-control {
    padding-left: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--gray-200);
    font-size: 0.9375rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input-wrap .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,86,219,.1);
}

.search-stats {
    color: var(--gray-500);
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

@media (max-width: 575px) {
    .researcher-card { padding: 1.125rem; }
    .researcher-name { font-size: 1rem; }
    .researcher-avatar { width: 48px; height: 48px; font-size: 1.2rem; }
}

/* ═══════════════════════════════════════════════════
   A1.4 — PPG CARD
═══════════════════════════════════════════════════ */
.ppg-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-top: 4px solid var(--primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.ppg-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.ppg-card-header {
    padding: 1.5rem 1.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ppg-card-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #1e3a8a, #1a56db);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.ppg-card-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.3;
    margin: 0 0 0.375rem;
}

.ppg-card-badges { display: flex; flex-wrap: wrap; gap: 0.375rem; }

.ppg-card-body { padding: 0 1.5rem 1rem; flex: 1; }

.ppg-areas-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-400);
    margin-bottom: 0.5rem;
}

.ppg-areas-list { list-style: none; padding: 0; margin: 0; }

.ppg-areas-list li {
    font-size: 0.8125rem;
    color: var(--gray-600);
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ppg-areas-list li:last-child { border-bottom: none; }

.ppg-areas-list li::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}

.ppg-card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ppg-stat-mini {
    font-size: 0.75rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.ppg-stat-mini strong { color: var(--gray-900); font-weight: 700; }

/* ═══════════════════════════════════════════════════
   A1.5 — PROJECT CARD + STATUS BADGE
═══════════════════════════════════════════════════ */
.project-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.project-card-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.4;
    margin: 0;
    flex: 1;
}

.project-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid;
}

.project-status-badge.ativo    { background: rgba(16,185,129,0.1); color: #059669; border-color: rgba(16,185,129,0.25); }
.project-status-badge.concluido { background: rgba(26,86,219,0.1); color: var(--primary); border-color: rgba(26,86,219,0.2); }
.project-status-badge.andamento { background: rgba(245,158,11,0.1); color: #d97706; border-color: rgba(245,158,11,0.2); }
.project-status-badge.inativo  { background: var(--gray-100); color: var(--gray-500); border-color: var(--gray-200); }

.project-card-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.project-meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.project-meta-item i { color: var(--gray-400); font-size: 0.75rem; }

.project-card-desc {
    font-size: 0.85rem;
    color: var(--gray-600);
    line-height: 1.55;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════
   A1.6 — RESULT CARD (busca)
═══════════════════════════════════════════════════ */
.result-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.875rem;
    transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
    position: relative;
}

.result-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--gray-300);
}

.result-card-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.4;
    margin: 0 0 0.375rem;
    text-decoration: none;
    display: block;
}

.result-card-title:hover { text-decoration: underline; }

.result-card-authors {
    font-size: 0.8125rem;
    color: var(--gray-600);
    margin: 0 0 0.5rem;
    line-height: 1.5;
}

.result-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--gray-500);
}

.result-card-meta .separator { color: var(--gray-300); }

.result-card-badges { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.625rem; }

/* ── Result card layout ── */
.result-card-header {
    display: flex;
    gap: 0.875rem;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}
.result-card-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(26,86,219,.2);
}
.result-card-content { flex: 1; min-width: 0; }
.result-card-authors i { color: var(--primary); font-size: .75rem; }
.result-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.875rem;
}
.result-card-actions .btn-primary-ds { flex: 1; justify-content: center; }
.pagination-ds { gap: 0.5rem; }

.qualis-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    border: 1.5px solid;
}

.qualis-a1 { background: rgba(5,150,105,0.1); color: #059669; border-color: rgba(5,150,105,0.3); }
.qualis-a2 { background: rgba(16,185,129,0.1); color: #10b981; border-color: rgba(16,185,129,0.3); }
.qualis-b1 { background: rgba(26,86,219,0.1); color: var(--primary); border-color: rgba(26,86,219,0.25); }
.qualis-b2 { background: rgba(63,131,248,0.1); color: var(--primary-light); border-color: rgba(63,131,248,0.25); }
.qualis-b3,.qualis-b4 { background: rgba(245,158,11,0.1); color: #d97706; border-color: rgba(245,158,11,0.25); }
.qualis-c  { background: var(--gray-100); color: var(--gray-500); border-color: var(--gray-200); }
.qualis-np { background: var(--gray-50); color: var(--gray-400); border-color: var(--gray-200); }

mark.search-highlight {
    background: rgba(245,158,11,0.22);
    color: inherit;
    border-radius: 2px;
    padding: 0 2px;
}

/* ═══════════════════════════════════════════════════
   A1.7 — FILTER PANEL + FILTER GROUP
═══════════════════════════════════════════════════ */
.filter-panel {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    position: sticky;
    /* navbar-elegant é fixed com 64px de altura — sem esse offset o painel
       gruda embaixo dela, sobrepondo o topo em vez de respeitar o espaço. */
    top: calc(64px + 1rem);
}

.filter-panel-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--gray-400);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--gray-100);
}

.filter-group:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

.filter-group-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.625rem;
    display: block;
}

.filter-group .form-select,
.filter-group .form-control {
    font-size: 0.875rem;
    border-color: var(--gray-200);
    border-radius: var(--radius-md);
    color: var(--gray-700);
}

.filter-group .form-select:focus,
.filter-group .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,86,219,0.12);
}

.filter-check-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.filter-check-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
    cursor: pointer;
}

.filter-count { margin-left: auto; font-size: 0.72rem; color: var(--gray-400); font-weight: 500; }

/* ═══════════════════════════════════════════════════
   A1.7b — FAB DE FILTROS (mobile) + BOTTOM-SHEET
   Reaproveitado nas páginas com painel de filtros lateral (Resultados,
   Projetos). Desktop mantém o painel como sidebar sticky; no mobile o
   painel some da tela e só aparece como bottom-sheet ao clicar no FAB,
   no mesmo padrão visual já usado no painel administrativo.
═══════════════════════════════════════════════════ */
.filter-fab {
    display: none;
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    /* Abaixo do menu off-canvas (backdrop 1040 / painel 1045) — nunca deve
       flutuar por cima do menu mobile quando ele estiver aberto. */
    z-index: 1020;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    border: none;
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 8px 24px rgba(79, 70, 229, .45);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: transform .2s, box-shadow .2s, opacity .2s;
}

.filter-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 30px rgba(79, 70, 229, .55);
}

/* Escondido enquanto o próprio bottom-sheet de filtros está aberto */
.filter-fab.is-hidden {
    opacity: 0;
    transform: scale(0.7);
    pointer-events: none;
}

.filter-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(0, 0, 0, .45);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.filter-drawer-overlay.open { display: block; }

.filter-drawer-handle {
    display: none;
    width: 40px;
    height: 4px;
    border-radius: 99px;
    background: var(--gray-300);
    margin: 0 auto .75rem;
    cursor: pointer;
}

@media (max-width: 991px) {
    .filter-fab { display: flex; }
    .filter-drawer-handle { display: block; }

    .filter-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        z-index: 1045;
        max-height: 85vh;
        overflow-y: auto;
        overscroll-behavior: contain;
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -8px 40px rgba(0, 0, 0, .18);
        transform: translateY(100%);
        transition: transform .3s cubic-bezier(.32, .72, 0, 1);
    }

    .filter-panel.open {
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════════════════
   A1.8 — EXPORT BAR
═══════════════════════════════════════════════════ */
.export-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.export-bar-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--gray-400);
    margin-right: 0.25rem;
}

.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.4rem 0.875rem;
    border-radius: var(--radius-md);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: 1px solid;
    background: transparent;
    white-space: nowrap;
}

.export-btn-bibtex { color: #1e429f; border-color: rgba(30,66,159,0.3); }
.export-btn-bibtex:hover { background: rgba(30,66,159,0.08); }
.export-btn-ris    { color: #065f46; border-color: rgba(6,95,70,0.3); }
.export-btn-ris:hover { background: rgba(6,95,70,0.08); }
.export-btn-csv    { color: #d97706; border-color: rgba(217,119,6,0.3); }
.export-btn-csv:hover { background: rgba(217,119,6,0.08); }
.export-btn-json   { color: var(--gray-600); border-color: var(--gray-300); }
.export-btn-json:hover { background: var(--gray-50); }

@media (max-width: 575px) {
    .export-bar { padding: 0.75rem; gap: 0.375rem; }
    .export-btn { padding: 0.35rem 0.625rem; font-size: 0.72rem; }
}

/* ═══════════════════════════════════════════════════
   A1.9 — EMPTY STATE
═══════════════════════════════════════════════════ */
.empty-state { text-align: center; padding: 4rem 2rem; }

.empty-state-icon {
    font-size: 3rem;
    color: var(--gray-300);
    margin-bottom: 1.25rem;
    display: block;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.empty-state-sub {
    font-size: 0.875rem;
    color: var(--gray-500);
    max-width: 380px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════
   A1.10 — ADMIN TABLE
═══════════════════════════════════════════════════ */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.admin-table thead tr { background: var(--gray-50); }

.admin-table thead th {
    padding: 0.875rem 1.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-500);
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

.admin-table tbody tr { transition: background var(--transition-fast); }
.admin-table tbody tr:hover { background: var(--gray-50); }

.admin-table tbody td {
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.admin-table tbody tr:last-child td { border-bottom: none; }

.admin-table .table-actions { display: flex; gap: 0.375rem; align-items: center; }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid;
}

.status-ativo, .status-aprovado { background: rgba(16,185,129,0.1); color: #059669; border-color: rgba(16,185,129,0.25); }
.status-pendente { background: rgba(245,158,11,0.1); color: #d97706; border-color: rgba(245,158,11,0.25); }
.status-inativo, .status-rejeitado { background: rgba(239,68,68,0.08); color: #dc2626; border-color: rgba(239,68,68,0.2); }

/* ═══════════════════════════════════════════════════
   A1.11 — UPLOAD ZONE
═══════════════════════════════════════════════════ */
.upload-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    text-align: center;
    background: var(--gray-50);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--primary);
    background: rgba(26,86,219,0.04);
}

.upload-zone-icon {
    font-size: 2.5rem;
    color: var(--gray-300);
    margin-bottom: 1rem;
    display: block;
    transition: color var(--transition-fast);
}

.upload-zone:hover .upload-zone-icon,
.upload-zone.drag-over .upload-zone-icon { color: var(--primary); }

.upload-zone-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 0.375rem;
}

.upload-zone-sub {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-bottom: 1.25rem;
}

.upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.import-log {
    background: #0f172a;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    max-height: 320px;
    overflow-y: auto;
    line-height: 1.7;
}

.import-log .log-success { color: #34d399; }
.import-log .log-error   { color: #f87171; }
.import-log .log-warning { color: #fbbf24; }
.import-log .log-info    { color: rgba(255,255,255,0.65); }

/* ═══════════════════════════════════════════════════
   A1.12 — PAGE SECTION
═══════════════════════════════════════════════════ */
.page-section { padding: 4rem 0; }
.page-section-white { background: #fff; }
.page-section-gray  { background: var(--gray-50); }

.page-section-title {
    font-size: clamp(1.375rem, 2.5vw, 1.875rem);
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.03em;
    margin-bottom: 0.375rem;
}

.page-section-sub {
    font-size: 0.9375rem;
    color: var(--gray-500);
    max-width: 540px;
}

.page-section-header { margin-bottom: 2.5rem; }

@media (max-width: 575px) {
    .page-section { padding: 2.5rem 0; }
    .page-section-header { margin-bottom: 1.75rem; }
}

/* ═══════════════════════════════════════════════════
   BOTÕES DO DESIGN SYSTEM
═══════════════════════════════════════════════════ */
.btn-primary-ds {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 700;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(26,86,219,0.3);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-primary-ds:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26,86,219,0.42);
    color: #fff;
}

.btn-outline-ds {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.375rem;
    background: transparent;
    color: var(--primary);
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--primary);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.btn-outline-ds:hover {
    background: rgba(26,86,219,0.06);
    color: var(--primary-dark);
}

/* ═══════════════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════════════ */
.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 0.625rem;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--gray-200);
    background: #fff;
    color: var(--gray-700);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.pagination-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(26,86,219,0.05);
}

.pagination-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 3px 10px rgba(26,86,219,0.28);
}

/* ═══════════════════════════════════════════════════
   MODAL HEADER DESIGN SYSTEM
═══════════════════════════════════════════════════ */
.modal-header-ds {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: none;
}

.modal-header-ds .modal-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

/* Modal content com estilo do design system */
.modal-content-ds {
    border-radius: var(--radius-xl);
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.28);
    overflow: hidden;
}

.modal-footer-ds {
    border: none;
    background: var(--gray-50);
    padding: 1rem 1.5rem;
}

/* Detail list — dl/dt/dd em modais e páginas de detalhe */
.detail-list { font-size: 0.875rem; }
.detail-list dt {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--gray-400);
    margin-bottom: 0.25rem;
    font-weight: 700;
}
.detail-list dd { color: var(--gray-700); line-height: 1.6; margin-bottom: 0; }
.detail-list dd.dd-strong { color: var(--gray-800); font-weight: 600; }

/* Filter panel extras */
.filter-divider { border-color: var(--gray-100); margin: 1.25rem 0; }
.filter-count-value { font-size: 1.75rem; font-weight: 800; color: var(--gray-900); line-height: 1; }
.filter-count-sub { font-size: 0.78rem; color: var(--gray-400); margin-top: 0.5rem; margin-bottom: 0; }
.filter-link-clear {
    font-size: 0.8rem; color: var(--gray-500); text-decoration: none;
    display: block; text-align: center; margin-top: 0.5rem;
    transition: color 0.15s ease;
}
.filter-link-clear:hover { color: var(--danger, #dc2626); }

/* Badge tamanho extra-pequeno */
.badge-xs { font-size: 0.72rem; }

/* Ícone de status dot nos project cards */
.project-status-badge .fa-circle { font-size: 0.45rem; }

/* ═══════════════════════════════════════════════════
   DASHBOARD PAGE
═══════════════════════════════════════════════════ */
.dashboard-chart-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}
.dashboard-chart-card h5 {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--gray-900);
    margin-bottom: 1.25rem;
}
.dashboard-chart-card h5 i { color: var(--primary); }
.quick-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    display: block;
    text-decoration: none;
}
.quick-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}
.quick-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.qci-blue  { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.qci-green { background: linear-gradient(135deg, #10b981, #059669); }
.qci-amber { background: linear-gradient(135deg, #f59e0b, #d97706); }
.quick-card-label { font-weight: 700; font-size: 1rem; color: var(--gray-900); margin-bottom: 0.2rem; }
.quick-card-sub   { font-size: 0.8rem; color: var(--gray-600); }
@media (max-width: 575px) {
    .stats-grid > [class*="col-"] { flex: 0 0 50%; max-width: 50%; }
}

/* ── Filter panel stats (ResultPage sidebar) ── */
.filter-stats {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-100);
}
.filter-stats-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.filter-stats-body {
    font-size: 0.875rem;
    color: var(--gray-600);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.filter-stats-row { display: flex; justify-content: space-between; }
.filter-stats-row strong { color: var(--primary); }

/* ── Modal body e detail items (ResultPage modais) ── */
.modal-body-ds { padding: 1.5rem; }
.modal-detail-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}
.modal-detail-item:last-child { border-bottom: none; margin-bottom: 0; }
.modal-detail-label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}
.modal-detail-label i { color: var(--primary); }
.modal-detail-value { color: var(--gray-900); font-size: 0.875rem; }
.modal-detail-value--lg { font-size: 1rem; }
.modal-doi-box .modal-detail-label i { color: #059669; }
.modal-doi-link { color: #059669; text-decoration: none; font-weight: 600; }
.modal-doi-link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════
   PRESEARCH PAGE — categorias de busca
═══════════════════════════════════════════════════ */
.result-category {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    text-align: center;
    border: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
    height: 100%;
}
.result-category::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--primary), #0369a1);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}
.result-category:hover::before { transform: scaleX(1); }
.result-category:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(26,86,219,.15);
    border-color: var(--primary);
}
.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary), #0369a1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(26,86,219,.25);
    transition: all 0.3s ease;
}
.result-category:hover .category-icon {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 12px 28px rgba(26,86,219,.35);
}
.category-icon i { font-size: 2.25rem; color: #fff; }
.result-count {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary);
    margin: 1rem 0 0.5rem;
    line-height: 1;
}
.result-label {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}
.result-category > p { font-size: .875rem; color: var(--gray-600); margin-bottom: 1.5rem; }
.btn-cat {
    background: linear-gradient(135deg, var(--primary), #0369a1);
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 700;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 4px 12px rgba(26,86,219,.3);
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    font-size: 1rem;
}
.btn-cat:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26,86,219,.4);
    color: #fff;
}
.btn-cat:disabled,
.btn-cat[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    background: var(--gray-300);
}
.search-info-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}
.stats-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    padding: 1rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    color: #1e3a8a;
    box-shadow: 0 2px 10px rgba(26,86,219,.1);
}
.stats-badge i { font-size: 1.5rem; color: var(--primary); }
.search-term-display {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
}
.search-term-text { font-size: 1.5rem; font-weight: 700; color: #1e3a8a; margin: 0; }
.refine-search-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--primary);
}
.search-refine-group {
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.search-refine-group .btn-cat { border-radius: 0; }

/* ── Autocomplete de pesquisadores ── */
.ac-suggest-list {
    display: none;
    position: absolute;
    top: calc(100% + .5rem);
    left: 0;
    right: 0;
    z-index: 40;
    margin: 0;
    padding: .4rem;
    list-style: none;
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15,23,42,.14);
    max-height: 320px;
    overflow-y: auto;
}
.ac-suggest-list.is-open { display: block; }
.ac-suggest-item {
    display: flex;
    align-items: center;
    gap: .625rem;
    padding: .6rem .75rem;
    border-radius: 10px;
    font-size: .875rem;
    color: #1e293b;
    cursor: pointer;
}
.ac-suggest-item i { color: #6366f1; flex-shrink: 0; }
.ac-suggest-item.is-active,
.ac-suggest-item:hover { background: rgba(99,102,241,.08); }
.ac-suggest-main { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.ac-suggest-sub { font-size: .75rem; color: #94a3b8; font-weight: 400; }
.input-group-text i { color: var(--primary); }
