@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Base Variables - Light Mode */
    --ethereal-blue: #007AFF;
    --ethereal-blue-soft: rgba(0, 122, 255, 0.1);
    --ethereal-blue-hover: #0056b3;
    
    --ethereal-bg: #F8FAFC;
    --ethereal-surface: #FFFFFF;
    --ethereal-border: rgba(226, 232, 240, 0.8);
    --ethereal-text-main: #1E293B;
    --ethereal-text-muted: #64748B;
    
    --ethereal-shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
    --ethereal-shadow-md: 0 10px 25px -5px rgba(0,0,0,0.04), 0 8px 10px -6px rgba(0,0,0,0.04);
    
    --ethereal-glass: rgba(255, 255, 255, 0.7);
    --ethereal-glass-border: rgba(255, 255, 255, 0.3);
    
    --radius-md: 12px;
    --radius-lg: 18px;
    --sidebar-width: 280px;
}

[data-bs-theme="dark"] {
    --ethereal-bg: #0F172A;
    --ethereal-surface: #1E293B;
    --ethereal-border: rgba(51, 65, 85, 0.8);
    --ethereal-text-main: #F1F5F9;
    --ethereal-text-muted: #94A3B8;
    
    --ethereal-shadow-sm: 0 2px 4px rgba(0,0,0,0.2);
    --ethereal-shadow-md: 0 10px 25px -5px rgba(0,0,0,0.3);
    
    --ethereal-glass: rgba(30, 41, 59, 0.7);
    --ethereal-glass-border: rgba(255, 255, 255, 0.1);
    
    --ethereal-blue-soft: rgba(0, 122, 255, 0.2);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--ethereal-bg);
    color: var(--ethereal-text-main);
    transition: background-color 0.3s, color 0.3s;
    -webkit-font-smoothing: antialiased;
}

/* Sidebar Modern - Full Height */
.sidebar-modern {
    background: var(--ethereal-surface);
    border-right: 1px solid var(--ethereal-border);
    height: 100%;
    width: var(--sidebar-width);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    height: 100%;
    overflow-y: auto;
    padding: 2.5rem;
    background-color: var(--ethereal-bg);
    position: relative;
}

/* Breakpoints Responsivos para Sidebar e Conteúdo Principal */
@media (max-width: 1400px) {
    :root {
        --sidebar-width: 230px;
    }
    .sidebar-modern {
        padding: 1.25rem 0.85rem !important;
    }
    .main-content {
        padding: 1.75rem 1.25rem;
    }
    .nav-link-pill {
        padding: 0.6rem 0.75rem;
        font-size: 0.875rem;
        gap: 8px;
    }
    .nav-link-pill i:not(.nav-chevron) {
        font-size: 1rem;
        min-width: 18px;
    }
    .nav-section-title {
        font-size: 0.68rem;
        padding-left: 0.5rem !important;
    }
    .sidebar-modern .ms-3 {
        margin-left: 0.65rem !important;
    }
}

@media (max-width: 992px) {
    :root {
        --sidebar-width: 210px;
    }
    .sidebar-modern {
        padding: 1rem 0.65rem !important;
    }
    .main-content {
        padding: 1.25rem 1rem;
    }
    .nav-link-pill {
        padding: 0.5rem 0.6rem;
        font-size: 0.825rem;
        gap: 6px;
    }
    .nav-link-pill span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .sidebar-logo-text {
        font-size: 0.65rem;
    }
    .sidebar-modern h5 {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 250px;
    }
    .main-content {
        padding: 1.25rem 0.75rem;
    }
    .nav-link-pill span {
        white-space: normal;
        overflow: visible;
    }
}

/* Cards & Elements */
.glass-card {
    background: var(--ethereal-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--ethereal-glass-border);
    box-shadow: var(--ethereal-shadow-md);
    border-radius: var(--radius-lg);
}

.modern-card {
    background: var(--ethereal-surface);
    border: 1px solid var(--ethereal-border);
    border-radius: var(--radius-md);
    box-shadow: var(--ethereal-shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Responsive Table Container */
.table-responsive-modern {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--ethereal-border);
    background: var(--ethereal-surface);
}

.table-responsive-modern .table {
    margin-bottom: 0;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--ethereal-border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ethereal-text-muted);
}

/* Table Modern - Fixed & Organized */
.table-modern {
    width: 100%;
    border-collapse: collapse !important;
    background: var(--ethereal-surface);
}

.table-modern thead th {
    background: var(--ethereal-bg) !important;
    border-bottom: 2px solid var(--ethereal-border) !important;
    color: var(--ethereal-text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    padding: 1.25rem 1rem;
    text-align: left;
}

.table-modern tbody tr {
    border-bottom: 1px solid var(--ethereal-border);
    transition: background-color 0.2s ease;
}

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

.table-modern tbody tr:hover {
    background-color: var(--ethereal-blue-soft) !important;
}

.table-modern td {
    padding: 1.25rem 1rem;
    color: var(--ethereal-text-main);
    font-size: 0.9rem;
    vertical-align: middle;
}

/* Search Container Modern */
.search-container-modern {
    position: relative;
    max-width: 450px;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.search-container-modern .form-control-modern {
    padding: 0.8rem 1.25rem !important;
    border-radius: 14px;
    border: 1px solid var(--ethereal-border);
    width: 100%;
    background: var(--ethereal-surface);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--ethereal-shadow-sm);
}

.search-container-modern .form-control-modern:focus {
    border-color: var(--ethereal-blue);
    box-shadow: 0 8px 20px -6px var(--ethereal-blue-soft);
    transform: translateY(-1px);
    outline: none;
}

/* Pagination - Premium Layout */
.pagination-container-modern {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--ethereal-border);
}

.pagination-pill {
    gap: 12px;
    display: flex;
    align-items: center;
}

.pagination-pill .btn {
    min-width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--ethereal-border);
    background: var(--ethereal-surface);
    color: var(--ethereal-text-main);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--ethereal-shadow-sm);
    white-space: nowrap;
}

/* Botões Numéricos com Cor Distinta */
.pagination-pill .btn.btn-page {
    background: rgba(0, 122, 255, 0.08);
    color: var(--ethereal-blue);
    border-color: rgba(0, 122, 255, 0.1);
}

/* Botões de Navegação Menores */
.pagination-pill .btn.btn-nav {
    min-width: 32px;
    height: 32px;
    opacity: 0.8;
}

.pagination-pill .btn:hover:not(:disabled) {
    background: var(--ethereal-blue);
    color: white;
    border-color: var(--ethereal-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
    opacity: 1;
}

.pagination-pill .btn.active {
    background: var(--ethereal-blue) !important;
    color: white !important;
    border-color: var(--ethereal-blue) !important;
    box-shadow: 0 6px 15px rgba(0, 122, 255, 0.3);
}

.pagination-pill .btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: var(--ethereal-bg);
    border-color: var(--ethereal-border);
    color: var(--ethereal-text-muted);
}

/* Utilities */
.nav-link-pill {
    color: var(--ethereal-text-muted);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    transition: all 0.2s;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2px;
    text-decoration: none;
}

.form-control-modern {
    background: var(--ethereal-surface);
    border: 1px solid var(--ethereal-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--ethereal-text-main);
}

.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ethereal-surface);
    border: 1px solid var(--ethereal-border);
    color: var(--ethereal-text-main);
    cursor: pointer;
    transition: all 0.2s;
}

.small { font-size: 0.75rem; }
.smaller { font-size: 0.6rem; }

/* Row Animations */
@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-row {
    animation: fadeInSlide 0.4s ease forwards;
}
