/**
 * Tema Claro Ultra-Limpo - Variedades da Gih
 * Minimalismo com Acentos Estratégicos
 * 2026
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@500;600;700&display=swap');

/* ============================================
   VARIÁVEIS CSS - Tema Claro Ultra-Limpo
   ============================================ */
:root {
    /* Paleta da Marca - Aplicada Estrategicamente */
    --light-bg: #f3fafa;
    --light-secondary: #92a4bd;
    --dark-primary: #0e1f3b;
    --blue-vibrant: #1617c8;
    --green-cyan: #18dab4;

    /* Whites e Neutros */
    --white: #ffffff;
    --off-white: #f3fafa;

    /* Grays Minimalistas */
    --gray-100: #f3f4f6;
    --gray-150: #eff1f5;
    --gray-200: #e8ecf1;
    --gray-300: #d9e0e8;
    --gray-400: #b4c1d4;
    --gray-500: #8a9bb5;
    --gray-600: #5a6b85;
    --gray-700: #3a4557;

    /* Semânticas */
    --success: #18dab4;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #1617c8;

    /* Sombras Ultra-Sutis */
    --shadow-xs: 0 1px 2px rgba(14, 31, 59, 0.03);
    --shadow-sm: 0 2px 6px rgba(14, 31, 59, 0.06);
    --shadow-md: 0 4px 12px rgba(14, 31, 59, 0.08);
    --shadow-lg: 0 8px 16px rgba(14, 31, 59, 0.10);
    --shadow-xl: 0 12px 24px rgba(14, 31, 59, 0.12);

    /* Transições */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET E ESTILOS GLOBAIS
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-primary);
    line-height: 1.6;
    font-size: 14px;
    font-weight: 400;
}

/* Tipografia */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
    color: var(--dark-primary);
    line-height: 1.3;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

h4 {
    font-size: 1.125rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
    color: var(--gray-600);
    line-height: 1.6;
}

/* Links */
a {
    color: var(--blue-vibrant);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--dark-primary);
    text-decoration: underline;
}

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* ============================================
   HEADER - Glass Light Premium
   ============================================ */
.header {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #1a1a2e;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 30px rgba(31, 38, 135, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    flex: 1;
}

.logo i {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.75rem;
}

.logo:hover {
    transform: scale(1.02);
}

/* RESPONSIVO MOBILE - Logo */
@media (max-width: 600px) {
    .logo {
        font-size: 1.2rem;
        gap: 0.5rem;
    }

    .logo i {
        font-size: 1.5rem;
    }
}

.navbar {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.navbar span {
    color: #4a5568;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.navbar a {
    color: #4a5568;
    font-weight: 600;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    text-decoration: none;
}

.navbar a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.navbar a:hover {
    color: #667eea;
    text-decoration: none;
}

.navbar a:hover::after {
    width: 100%;
}

.user-menu {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    color: #4a5568;
    font-weight: 500;
}

/* RESPONSIVO MOBILE */
@media (max-width: 600px) {
    .user-info {
        display: none;
    }

    .user-name {
        display: none;
    }

    .navbar {
        gap: 0.75rem;
    }
}

.btn-logout {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff !important;
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.85rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-logout i {
    color: #ffffff !important;
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.45);
    text-decoration: none !important;
    color: #ffffff !important;
}

/* ============================================
   SIDEBAR - Glass Light Premium
   ============================================ */
.sidebar {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.5);
    padding: 1.5rem 0;
    position: fixed;
    left: 0;
    top: 56px;
    width: 260px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 4px 0 30px rgba(31, 38, 135, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

/* MENU BURGER MOBILE */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #667eea;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-right: 1rem;
}

.menu-toggle:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.1);
}

.menu-toggle.active {
    color: #667eea;
}

/* RESPONSIVO MOBILE */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .sidebar {
        width: 100%;
        height: 100vh;
        top: 56px;
        left: -100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.5);
        box-shadow: 0 8px 30px rgba(31, 38, 135, 0.15);
        padding-top: 1rem;
        background: rgba(255, 255, 255, 0.95);
        z-index: 999;
        transition: left 0.3s ease;
    }

    .sidebar.active,
    .sidebar.open {
        left: 0;
        animation: slideInMenu 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    @keyframes slideInMenu {
        from {
            left: -100%;
            opacity: 0;
        }

        to {
            left: 0;
            opacity: 1;
        }
    }

    .main-content {
        margin-left: 0;
    }
}

.sidebar-menu {
    list-style: none;
    padding: 0 0.75rem;
}

.sidebar-menu li {
    margin: 0.35rem 0;
}

.sidebar-menu .menu-label {
    padding: 1.25rem 1rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #718096;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
}

.sidebar-menu .menu-label:first-child {
    margin-top: 0;
    padding-top: 0.5rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    color: #4a5568;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    position: relative;
    text-decoration: none;
    border: 1px solid transparent;
}

.sidebar-menu a i {
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 22px;
    text-align: center;
    color: #718096;
}

.sidebar-menu a span {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-menu a:hover {
    background: rgba(102, 126, 234, 0.08);
    border-color: rgba(102, 126, 234, 0.15);
    color: #667eea;
    transform: translateX(4px);
    text-decoration: none;
}

.sidebar-menu a:hover i {
    color: #667eea;
    transform: scale(1.1);
}

.sidebar-menu a.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.35);
    border-color: transparent;
}

.sidebar-menu a.active i {
    color: white;
    transform: scale(1.1);
}

.sidebar-menu a.active span {
    color: white;
}

/* RESPONSIVO MOBILE */
@media (max-width: 768px) {
    .sidebar-menu a {
        padding: 1rem 1.25rem;
        font-size: 1rem;
        border-radius: 10px;
        margin-bottom: 0.5rem;
    }

    .sidebar-menu a i {
        font-size: 1.3rem;
        min-width: 30px;
    }

    .sidebar-menu a span {
        font-size: 1rem;
    }

    .sidebar-menu .menu-label {
        padding: 1.5rem 1.25rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* ============================================
   CONTEÚDO PRINCIPAL - Glass Light
   ============================================ */
.main-content {
    margin-left: 260px;
    margin-top: 56px;
    padding: 2rem;
    min-height: calc(100vh - 56px);
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 50%, #dfe6f0 100%);
    background-attachment: fixed;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* RESPONSIVO MOBILE */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem 0.75rem;
    }
}

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-primary);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--light-secondary);
    font-size: 0.95rem;
}

/* RESPONSIVO MOBILE */
@media (max-width: 600px) {
    .page-title {
        font-size: 1.5rem;
    }

    .page-subtitle {
        font-size: 0.85rem;
    }
}

.dashboard-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.filter-tab {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--gray-200);
    background: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-600);
    transition: var(--transition);
}

.filter-tab:hover {
    border-color: var(--blue-vibrant);
    color: var(--dark-primary);
    text-decoration: none;
}

.filter-tab.active {
    background: var(--blue-vibrant);
    color: var(--white);
    border-color: var(--blue-vibrant);
    box-shadow: var(--shadow-sm);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    font-size: 0.8rem;
    color: var(--gray-600);
    box-shadow: var(--shadow-xs);
}

.pill-muted {
    background: var(--gray-100);
    color: var(--gray-600);
}

/* ============================================
   BENTO GRID LAYOUT
   ============================================ */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.bento-item {
    grid-column: span 1;
}

.bento-item.span-2 {
    grid-column: span 2;
}

.bento-item.span-3 {
    grid-column: span 3;
}

@media (max-width: 1200px) {

    .bento-item.span-2,
    .bento-item.span-3 {
        grid-column: span 1;
    }

    .bento-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* ============================================
   STAT CARDS - Minimalismo Ultra-Limpo
   ============================================ */
.stat-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--gray-300);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

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

.stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--dark-primary);
    margin: 0.5rem 0;
}

.stat-change {
    font-size: 0.875rem;
    font-weight: 500;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--danger);
}

.stat-meta {
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.stat-meta.positive {
    color: var(--success);
}

.stat-meta.negative {
    color: var(--danger);
}

.stat-meta.muted {
    color: var(--gray-400);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--gray-150);
    color: var(--light-secondary);
    transition: var(--transition);
}

.stat-card:hover .stat-icon {
    transform: scale(1.1);
}

/* ============================================
   CARDS GENÉRICOS - Minimalistas
   ============================================ */
.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

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

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dark-primary);
    margin: 0;
}

/* ============================================
   GRIDS UTILITÁRIOS
   ============================================ */
.grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1000px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   DASHBOARD EXTRAS
   ============================================ */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--gray-200);
    background: var(--gray-100);
    color: var(--dark-primary);
    font-weight: 600;
    transition: var(--transition);
}

.quick-action i {
    font-size: 1.25rem;
    color: var(--blue-vibrant);
}

.quick-action:hover {
    background: var(--white);
    border-color: var(--blue-vibrant);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.alert-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.alert-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    border-radius: 0.75rem;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    font-size: 0.9rem;
}

.alert-item .label {
    font-weight: 600;
    color: var(--dark-primary);
}

.alert-item .value {
    font-weight: 600;
    color: var(--dark-primary);
}

.alert-item.alert-danger {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
}

.alert-item.alert-warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.3);
}

.alert-item.alert-info {
    background: rgba(22, 23, 200, 0.08);
    border-color: rgba(22, 23, 200, 0.3);
}

/* ============================================
   BUTTONS - Acentos Estratégicos
   ============================================ */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--blue-vibrant);
    color: white;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1617c8 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 23, 200, 0.35);
}

.btn-primary:hover::before {
    opacity: 1;
}

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

.btn-secondary {
    background: var(--green-cyan);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #18dab4 0%, #0fa39e 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(24, 218, 180, 0.35);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--blue-vibrant);
    color: var(--blue-vibrant);
}

.btn-outline:hover {
    background: var(--gray-150);
    color: var(--dark-primary);
    border-color: var(--dark-primary);
}

.btn-text {
    background: transparent;
    color: var(--blue-vibrant);
    padding: 0.5rem 1rem;
}

.btn-text:hover {
    background: var(--gray-150);
    color: var(--dark-primary);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   FORMS - Minimalistas
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 150px;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-primary);
    font-size: 0.95rem;
}

input,
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
    color: var(--dark-primary);
    font-size: 14px;
}

input::placeholder,
textarea::placeholder {
    color: var(--light-secondary);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--blue-vibrant);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(22, 23, 200, 0.1);
}

input:disabled,
textarea:disabled,
select:disabled {
    background: var(--gray-150);
    color: var(--light-secondary);
    cursor: not-allowed;
}

/* ============================================
   TABLES - Minimalistas
   ============================================ */
.table-wrapper {
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: var(--white);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

thead {
    background: var(--gray-150);
    border-bottom: 1px solid var(--gray-300);
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--dark-primary);
}

tbody tr {
    border-bottom: 1px solid var(--gray-200);
    transition: var(--transition);
}

tbody tr:hover {
    background: var(--gray-150);
}

td {
    padding: 1rem;
    color: var(--dark-primary);
}

/* Striping sutil */
tbody tr:nth-child(even) {
    background: rgba(14, 31, 59, 0.01);
}

/* ============================================
   BADGES - Acentos Sutis
   ============================================ */
.badge {
    padding: 0.375rem 0.875rem;
    border-radius: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-primary {
    background: rgba(22, 23, 200, 0.1);
    color: var(--blue-vibrant);
}

.badge-success {
    background: rgba(24, 218, 180, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-secondary {
    background: rgba(146, 164, 189, 0.15);
    color: var(--light-secondary);
}

/* ============================================
   ALERTS - Minimalistas
   ============================================ */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
    animation: slideInDown 0.3s ease-out;
}

.alert-success {
    background: rgba(24, 218, 180, 0.08);
    border-left-color: var(--success);
    color: var(--success);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.08);
    border-left-color: var(--warning);
    color: var(--warning);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.08);
    border-left-color: var(--danger);
    color: var(--danger);
}

.alert-info {
    background: rgba(22, 23, 200, 0.08);
    border-left-color: var(--info);
    color: var(--info);
}

/* ============================================
   CHART CONTAINER
   ============================================ */
.chart-container {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.chart-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dark-primary);
    margin: 0 0 1rem 0;
}

.chart {
    height: 300px;
    position: relative;
}

@media (max-width: 768px) {
    .chart {
        height: 250px;
    }
}

/* ============================================
   ANIMAÇÕES
   ============================================ */
@keyframes slideInDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */
@media (max-width: 1200px) {
    .sidebar {
        width: 200px;
    }

    .main-content {
        margin-left: 200px;
        padding: 1.5rem;
    }

    .bento-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .navbar {
        gap: 1rem;
    }

    .header-content {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 13px;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .main-content {
        padding: 0.75rem;
    }

    .page-title {
        font-size: 1.25rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .card {
        padding: 1rem;
    }

    th,
    td {
        padding: 0.75rem 0.5rem;
    }
}

/* ============================================
   UTILIDADES
   ============================================ */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.p-1 {
    padding: 0.5rem;
}

.p-2 {
    padding: 1rem;
}

.p-3 {
    padding: 1.5rem;
}

.d-flex {
    display: flex;
}

.d-grid {
    display: grid;
}

.d-none {
    display: none;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-75 {
    opacity: 0.75;
}

.cursor-pointer {
    cursor: pointer;
}

.user-select-none {
    user-select: none;
}

/* ============================================
   MODALS / POPUPS
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(14, 31, 59, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
    /* Escondido por padrão */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal {
    background: var(--white);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-xl);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-primary);
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0.25rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--dark-primary);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .modal {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
}

/* ============================================
   PAGINAÇÃO
   ============================================ */
.pagination {
    margin: 2rem 0;
    text-align: center;
}

.pagination-list {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    background: white;
    color: var(--dark-primary);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-block;
}

.pagination-btn:hover:not(.disabled):not(.active) {
    border-color: var(--blue-vibrant);
    background: var(--gray-150);
    color: var(--blue-vibrant);
}

.pagination-btn.active {
    background: var(--blue-vibrant);
    color: white;
    border-color: var(--blue-vibrant);
    cursor: default;
}

.pagination-btn.disabled {
    color: var(--gray-400);
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-info {
    font-size: 12px;
    color: var(--light-secondary);
    margin-top: 1rem;
}

@media (max-width: 480px) {
    .pagination-list {
        gap: 0.25rem;
    }

    .pagination-btn {
        padding: 0.4rem 0.6rem;
        font-size: 12px;
    }
}