/* ========================================
   ESTILOS GLOBAIS E BASE
   ======================================== */
body {
    background: #2d3436;
    font-family: 'Poppins', sans-serif;
    color: #f1f2f6;
    position: relative;
}

/* Padrão animado de fundo - FIXO */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 193, 6, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 193, 6, 0.03) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}

/* Remover o grid pattern que estava causando problema */

/* Container principal sempre acima do background */
.container,
.main-container {
    position: relative;
    z-index: 10;
}

/* ========================================
   NAVBAR CUSTOMIZADA
   ======================================== */
.navbar-custom {
    background: linear-gradient(135deg, #2d3436 0%, #1e272e 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    padding: 15px 0;
    margin-bottom: 30px;
    position: relative;
    z-index: 1000;
    border-bottom: 2px solid rgba(255, 193, 6, 0.2);
}

.navbar-custom .navbar-brand img {
    max-width: 160px;
    height: auto;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(255, 193, 6, 0.3));
    transition: transform 0.3s ease;
}

.navbar-custom .navbar-brand img:hover {
    transform: scale(1.05);
}

.navbar-custom .navbar-nav {
    flex-wrap: wrap;
}

.navbar-custom .navbar-brand {
    color: #FFC106;
    font-weight: 700;
    font-size: 22px;
}

.navbar-custom .nav-link {
    color: #f1f2f6;
    font-weight: 500;
    margin: 0 10px;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 16px;
}

.navbar-custom .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #FFC106;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-custom .nav-link:hover::before,
.navbar-custom .nav-link.active::before {
    width: 80%;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: #FFC106;
    transform: translateY(-2px);
}

.user-info {
    background: linear-gradient(135deg, rgba(255, 193, 6, 0.2) 0%, rgba(255, 193, 6, 0.1) 100%);
    color: #FFC106;
    padding: 8px 15px;
    border-radius: 20px;
    margin-right: 15px;
    border: 1px solid rgba(255, 193, 6, 0.3);
    transition: all 0.3s ease;
}

.user-info:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 193, 6, 0.3);
}

/* ========================================
   CARDS E CONTAINERS
   ======================================== */
.main-container {
    padding: 40px 20px;
}

.card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    overflow: visible;
    background: #fff;
    position: relative;
    z-index: 5;
}

.card-header {
    background: linear-gradient(135deg, #2d3436 0%, #1e272e 100%);
    color: #FFC106;
    padding: 25px;
    border: none;
    position: relative;
    z-index: 2;
}

.card-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    position: relative;
    z-index: 3;
    text-shadow: 0 2px 10px rgba(255, 193, 6, 0.3);
}

.card-body {
    padding: 25px;
    background: #fff;
    color: #2d3436;
    position: relative;
    z-index: 2;
}

/* ========================================
   ESTATÍSTICAS
   ======================================== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    position: relative;
    z-index: 5;
}

.stat-card {
    background: linear-gradient(135deg, #2d3436 0%, #1e272e 100%);
    color: #FFC106;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 193, 6, 0.2);
    z-index: 5;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 40px rgba(255, 193, 6, 0.4);
    border-color: #FFC106;
}

.stat-number {
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
    position: relative;
    z-index: 1;
    text-shadow: 0 4px 15px rgba(255, 193, 6, 0.5);
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* ========================================
   TABELAS
   ======================================== */
.table-responsive {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    z-index: 3;
}

.table {
    margin: 0;
    position: relative;
    z-index: 3;
}

.table thead {
    background: linear-gradient(135deg, #2d3436 0%, #1e272e 100%);
    color: #FFC106;
}

.table thead th {
    border: none;
    padding: 15px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #e9ecef;
    position: relative;
    z-index: 2;
}

.table-wrap {
    overflow-x: auto;
}

.table th,
.table td {
    white-space: nowrap;
    vertical-align: middle;
}

/* Detalhes expandidos */
.details-row {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: none;
    color: #212529;
    border-left: 4px solid #FFC106;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    align-items: start;
    padding: 15px;
}

.details-grid>div {
    background: #fff;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ========================================
   BOTÕES
   ======================================== */
.btn-primary {
    background: linear-gradient(135deg, #FFC106 0%, #f39c12 100%);
    color: #2d3436;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 193, 6, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 5;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 193, 6, 0.5);
    color: #2d3436;
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: linear-gradient(135deg, #636e72 0%, #2d3436 100%);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 5;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    color: #fff;
}

.btn-secondary:active {
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
}

.btn-group {
    position: relative;
    z-index: 3;
}

.btn-group .btn {
    margin: 2px;
}

.badge {
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.badge.bg-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #FFC106 0%, #f39c12 100%) !important;
}

/* ========================================
   FORMULÁRIOS
   ======================================== */
.form-label {
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 8px;
}

.form-control,
.form-select {
    border-radius: 10px;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    z-index: 3;
}

.form-control:focus,
.form-select:focus {
    border-color: #FFC106;
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 6, 0.25);
    outline: none;
}

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    position: relative;
    z-index: 3;
}

.empty-state i {
    font-size: 80px;
    color: #FFC106;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h4 {
    color: #2d3436;
    margin-bottom: 10px;
}

/* ========================================
   ALERTAS
   ======================================== */
.alert {
    border-radius: 10px;
    margin-bottom: 20px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

/* ========================================
   CORREÇÕES CRÍTICAS DE Z-INDEX E EFEITOS
   ======================================== */
.bg-login::before,
.bg-login::after,
body::after {
    pointer-events: none !important;
    z-index: 0 !important;
}

/* Remover qualquer efeito de hover indesejado */
.card,
.card *,
.table tbody tr,
.table tbody tr * {
    transition: none !important;
}

/* Permitir apenas transições específicas */
.btn,
.stat-card,
.form-control,
.form-select {
    transition: all 0.3s ease !important;
}

.container,
.main-container,
#pane-membros,
#pane-cadastro,
.tab-content,
.tab-pane {
    position: relative;
    z-index: 10 !important;
    pointer-events: auto !important;
}

/* Garantir que todo conteúdo fique acima do background */
.container>*,
#pane-membros,
#pane-cadastro,
.tab-content,
.tab-pane {
    position: relative;
    z-index: 10 !important;
    pointer-events: auto !important;
}

/* ========================================
   RESPONSIVIDADE
   ======================================== */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #2d3436;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FFC106 0%, #f39c12 100%);
    border-radius: 10px;
    border: 2px solid #2d3436;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #f39c12 0%, #FFC106 100%);
}

* {
    scrollbar-width: thin;
    scrollbar-color: #FFC106 #2d3436;
}

/* ========================================
   RESPONSIVIDADE
   ======================================== */
@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: 1fr;
    }

    .card-header h2 {
        font-size: 22px;
    }

    .stat-number {
        font-size: 36px;
    }

    .btn-group {
        display: flex;
        flex-wrap: wrap;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   EFEITO RIPPLE
   ======================================== */
.btn {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    pointer-events: none;
    z-index: 1;
}

/* ========================================
   INFO BOX
   ======================================== */
.info-box {
    background: rgba(255, 193, 6, 0.12);
    border-left: 4px solid #FFC106;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    color: #2d3436;
    position: relative;
    z-index: 3;
}

.required {
    color: #dc3545;
}

/* ========================================
   LOADING STATE
   ======================================== */
.loading {
    background: #f0f0f0;
}

/* BOTÕES DO TOPO — corrigidos */
.top-buttons .btn-switch {
    padding: 12px 25px;
    font-weight: 600;
    border-radius: 12px;
    border: 2px solid #f1c40f;
    background: transparent;
    color: #f1c40f;
    transition: all 0.25s ease;
}

/* Botão ativo */
.top-buttons .btn-switch.active {
    background: #f1c40f;
    color: #2d3436;
    box-shadow: 0 0 12px rgba(241, 196, 15, 0.5);
}

/* Hover */
.top-buttons .btn-switch:not(.active):hover {
    background: rgba(241, 196, 15, 0.15);
    color: #f1c40f;
}