/* ========================================
   DESIGN SYSTEM - MAPLINK HUB
   Sistema de design moderno e profissional
   ======================================== */

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

* {
    font-family: 'Poppins', sans-serif;
}

/* ========================================
   PALETA DE CORES
   ======================================== */
:root {
    /* Cores Primárias */
    --primary-color: #460087;        /* Roxo principal */
    --secondary-color: #764ba2;      /* Roxo secundário */
    --accent-color: #ff7e65;         /* Laranja de destaque */
    
    /* Cores de Texto */
    --text-color: #202124;           /* Texto principal */
    --text-secondary: #6b6b6b;       /* Texto secundário */
    --text-muted: #909090;           /* Texto desabilitado */
    
    /* Cores de Fundo */
    --background-color: #ffffff;     /* Fundo principal */
    --sidebar-color: #fbfbfb;        /* Fundo sidebar */
    --card-background: #f9f9f9;      /* Fundo cards */
    
    /* Cores de Status */
    --success-color: #0db281;        /* Verde sucesso */
    --warning-color: #f59e0b;        /* Amarelo aviso */
    --error-color: #ff7e65;          /* Vermelho erro */
    --info-color: #3b82f6;           /* Azul informação */
    
    /* Cores Neutras */
    --border-color: #ececec;         /* Bordas */
    --gray-light: #f5f5f5;           /* Cinza claro */
    --gray-medium: #909090;          /* Cinza médio */
    --gray-dark: #3f3f3f;            /* Cinza escuro */
}

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

:root {
    /* Hierarquia de Tamanhos */
    --font-size-xs: 11px;      /* Texto pequeno */
    --font-size-sm: 12px;      /* Texto secundário */
    --font-size-base: 14px;    /* Texto padrão */
    --font-size-lg: 16px;      /* Texto destacado */
    --font-size-xl: 18px;      /* Títulos pequenos */
    --font-size-2xl: 24px;     /* Títulos médios */
    --font-size-3xl: 32px;     /* Títulos grandes */
    
    /* Pesos */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
}

/* Fonte Principal */
* {
    font-family: 'Poppins', sans-serif;
}

/* ========================================
   ESPAÇAMENTOS
   ======================================== */
:root {
    /* Sistema de Espaçamento (múltiplos de 4px) */
    --space-1: 4px;     /* Espaço mínimo */
    --space-2: 8px;     /* Espaço pequeno */
    --space-3: 12px;    /* Espaço médio-pequeno */
    --space-4: 16px;    /* Espaço médio */
    --space-5: 20px;    /* Espaço médio-grande */
    --space-6: 24px;    /* Espaço grande */
    --space-8: 32px;    /* Espaço extra grande */
    --space-10: 40px;   /* Espaço máximo */
}

/* ========================================
   COMPONENTES PRINCIPAIS
   ======================================== */

/* Botão Primário */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    transition: background 200ms ease;
    min-height: 48px;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

/* Botão Secundário */
.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 25px;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    transition: all 200ms ease;
    min-height: 48px;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ========================================
   CARDS
   ======================================== */
.card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ========================================
   FORMULÁRIOS
   ======================================== */
.form-input {
    background-color: white;
    border: 1px solid #cecece;
    border-radius: 15px;
    padding: 16px;
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    min-height: 48px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ========================================
   TABELAS MODERNAS
   ======================================== */
.modern-table-container {
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background-color: white;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Header da Tabela */
.modern-table-header {
    display: flex;
    background-color: var(--gray-light);
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.modern-table-header-cell {
    display: flex;
    align-items: center;
    padding: 0 8px;
}

.modern-table-header-cell.id-column {
    width: 200px;
    min-width: 200px;
}

.modern-table-header-cell.name-column {
    flex: 1;
    min-width: 150px;
}

.modern-table-header-cell.vehicle-column {
    width: 150px;
    min-width: 150px;
}

.modern-table-header-cell.plate-column {
    width: 120px;
    min-width: 120px;
}

.modern-table-header-cell.region-column {
    width: 120px;
    min-width: 120px;
}

.modern-table-header-cell.status-column {
    width: 120px;
    min-width: 120px;
}

.modern-table-header-cell.actions-column {
    width: 100px;
    min-width: 100px;
}

.modern-table-header-text {
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* Linhas da Tabela */
.modern-table-row {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.modern-table-row:hover {
    background-color: #fafafa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

/* Células da Tabela */
.modern-table-cell {
    display: flex;
    align-items: center;
    padding: 0 8px;
}

.modern-table-cell.id-column {
    width: 200px;
    min-width: 200px;
}

.modern-table-cell.name-column {
    flex: 1;
    min-width: 150px;
}

.modern-table-cell.vehicle-column {
    width: 150px;
    min-width: 150px;
}

.modern-table-cell.plate-column {
    width: 120px;
    min-width: 120px;
}

.modern-table-cell.region-column {
    width: 120px;
    min-width: 120px;
}

.modern-table-cell.status-column {
    width: 120px;
    min-width: 120px;
}

.modern-table-cell.actions-column {
    width: 100px;
    min-width: 100px;
}

.modern-table-cell-text {
    font-size: var(--font-size-sm);
    color: var(--text-color);
    word-break: break-word;
}

/* Status Badge */
.status-badge-container {
    display: flex;
    align-items: center;
}

.status-badge-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.status-text {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--success-color);
}

/* Actions Container */
.actions-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-icon {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.action-icon:hover {
    background-color: var(--gray-light);
}

.action-icon img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* Flex Utilities */
.flex-start {
    justify-content: flex-start;
}

.flex-center {
    justify-content: center;
}

.flex-end {
    justify-content: flex-end;
}

/* Responsividade para Tabelas */
@media (max-width: 1200px) {
    .modern-table-header-cell.vehicle-column,
    .modern-table-cell.vehicle-column {
        width: 120px;
        min-width: 120px;
    }
    
    .modern-table-header-cell.plate-column,
    .modern-table-cell.plate-column {
        width: 100px;
        min-width: 100px;
    }
    
    .modern-table-header-cell.region-column,
    .modern-table-cell.region-column {
        width: 100px;
        min-width: 100px;
    }
}

@media (max-width: 768px) {
    .modern-table-container {
        overflow-x: auto;
    }
    
    .modern-table-header,
    .modern-table-row {
        min-width: 800px;
    }
    
    .modern-table-header-cell.id-column,
    .modern-table-cell.id-column {
        width: 150px;
        min-width: 150px;
    }
    
    .modern-table-header-cell.name-column,
    .modern-table-cell.name-column {
        width: 120px;
        min-width: 120px;
    }
}

/* ========================================
   LAYOUT E ESTRUTURA
   ======================================== */

/* SIDEBAR */
.sidebar {
    background-color: var(--sidebar-color);
    border-right: 1px solid var(--border-color);
    min-width: 15%;
    height: 100vh;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 200ms ease;
    color: var(--text-secondary);
}

.nav-item:hover,
.nav-item.active {
    background-color: var(--gray-light);
}

/* CONTEÚDO PRINCIPAL */
.main-content {
    background-color: white;
    padding: 42px;
    flex: 1;
    overflow: auto;
    height: 100vh;
}

/* ========================================
   MODAIS E POPUPS
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    width: 500px;
    max-width: 90vw;
    height: 100vh;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: rgba(0, 0, 0, 0.08) 2px 2px 24px 13px;
}

.modal-overlay.show .modal-content {
    transform: translateX(0);
}

/* ========================================
   COMPONENTES DE DADOS
   ======================================== */

/* ESTATÍSTICAS */
.stat-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.stat-icon {
    background-color: var(--gray-light);
    color: var(--text-secondary);
    border-radius: 20px;
    padding: 3px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

/* BADGES DE STATUS */
.status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 400;
    text-align: center;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    min-width: 120px;
}

/* ========================================
   SISTEMA DE BUSCA
   ======================================== */
.search-container {
    background-color: #f9f9f9;
    border: 1px solid #e5e5ea;
    border-radius: 116px;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 200ms, border-color 200ms;
}

.search-input {
    border: none;
    background: none;
    outline: none;
    width: 320px;
    font-size: 12px;
    color: var(--text-color);
}

/* ========================================
   ANIMAÇÕES E TRANSIÇÕES
   ======================================== */

/* Transições Padrão */
* {
    transition: all 0.2s ease;
}

/* Hover Effects */
.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Fade In Animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Slide In Animation */
@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* ========================================
   RESPONSIVIDADE
   ======================================== */

/* Mobile First */
@media (max-width: 768px) {
    .page-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        min-height: auto;
        order: 1;
    }
    
    .main-content {
        order: 2;
        padding: 20px;
    }
    
    .stats-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .actions-bar {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
}

/* ========================================
   UTILITÁRIOS
   ======================================== */

/* Classes de Espaçamento */
.m-1 { margin: var(--space-1); }
.m-2 { margin: var(--space-2); }
.m-3 { margin: var(--space-3); }
.m-4 { margin: var(--space-4); }
.m-5 { margin: var(--space-5); }
.m-6 { margin: var(--space-6); }
.m-8 { margin: var(--space-8); }
.m-10 { margin: var(--space-10); }

.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }
.p-10 { padding: var(--space-10); }

/* Classes de Texto */
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-error { color: var(--error-color); }
.text-info { color: var(--info-color); }

/* Classes de Tamanho de Fonte */
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }

/* Classes de Peso da Fonte */
.font-light { font-weight: var(--font-weight-light); }
.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

/* Classes de Background */
.bg-primary { background-color: var(--primary-color); }
.bg-secondary { background-color: var(--secondary-color); }
.bg-light { background-color: var(--gray-light); }
.bg-white { background-color: white; }

/* Classes de Border */
.border { border: 1px solid var(--border-color); }
.border-primary { border: 1px solid var(--primary-color); }
.border-radius { border-radius: 8px; }
.border-radius-lg { border-radius: 16px; }
.border-radius-xl { border-radius: 20px; }

/* Classes de Display */
.d-flex { display: flex; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-none { display: none; }

/* Classes de Alinhamento */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Classes de Flexbox */
.flex-column { flex-direction: column; }
.flex-row { flex-direction: row; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }

/* Classes de Gap */
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.gap-10 { gap: var(--space-10); }

/* ========================================
   COMPONENTES ESPECÍFICOS DO ADMIN
   ======================================== */

/* Flash Messages */
.flash-messages {
    margin-bottom: 1.5rem;
}

.flash-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideIn 0.3s ease;
}

.flash-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.flash-error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.flash-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.flash-info {
    background-color: rgba(59, 130, 246, 0.1);
    color: #1e40af;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Form Controls */
.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background-color: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(70, 0, 135, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.875rem;
}

.form-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    margin: 0;
}

.form-check-label {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-color);
}

/* Modal Enhancements */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: var(--gray-light);
    color: var(--text-color);
}

.modal-body {
    padding: 1.5rem;
}

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

/* Table Enhancements */
.table-container {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background-color: var(--gray-light);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 0.875rem;
}

.table tbody tr:hover {
    background-color: #fafafa;
}

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

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.action-btn.edit {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.action-btn.edit:hover {
    background-color: #3b82f6;
    color: white;
}

.action-btn.delete {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.action-btn.delete:hover {
    background-color: #ef4444;
    color: white;
}

.action-btn.view {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.action-btn.view:hover {
    background-color: #10b981;
    color: white;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.status-badge.active {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-badge.inactive {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.status-badge.pending {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.status-badge.completed {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

/* Search Box */
.search-box {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    background-color: var(--card-background);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(70, 0, 135, 0.1);
}

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.search-section {
    flex: 1;
    max-width: 400px;
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
}

.page-subtitle {
    color: var(--text-secondary);
    margin: 0;
    font-size: 1rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}


.stat-icon {
    width: 24px;
    height: 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.stat-content {
    flex: 1;
}

.stat-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0 0 0.25rem 0;
}

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

.stat-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .action-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .search-section {
        max-width: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .action-buttons {
        justify-content: center;
    }
}

/* ========================================
   PAGINAÇÃO
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 30px 0;
    padding: 20px 0;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-right: 20px;
}

.pagination-controls {
    display: flex;
    gap: 4px;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: var(--background-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.pagination-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    text-decoration: none;
}

.pagination-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-btn:disabled {
    background: #f8f9fa;
    color: #6c757d;
    border-color: #e9ecef;
    cursor: not-allowed;
}

.pagination-btn:disabled:hover {
    background: #f8f9fa;
    color: #6c757d;
    border-color: #e9ecef;
}

.pagination-ellipsis {
    padding: 8px 4px;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

@media (max-width: 768px) {
    .pagination {
        flex-direction: column;
        gap: 15px;
    }
    
    .pagination-info {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination-btn {
        min-width: 36px;
        padding: 6px 10px;
        font-size: 12px;
    }
}