/* ===== LAYOUT BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cores Marketia - Primárias */
    --primary-color: #003366; /* Azul Escuro (Navy) - Marketia */
    --primary-hover: #004080; /* Azul Escuro Claro */
    --secondary-color: #28a745; /* Verde */
    --accent-color: #17a2b8; /* Azul Claro (Cyan) */
    
    /* Cores de Estado */
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    
    /* Background e Layout */
    --dark-bg: #0f172a;
    --sidebar-bg: linear-gradient(135deg, #003366 0%, #004080 100%);
    --sidebar-text: #ffffff;
    --sidebar-hover: rgba(255, 255, 255, 0.2);
    --sidebar-active: #28a745;
    --body-bg: #f8f9fa;
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --card-shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--body-bg);
    color: #111827;
}

/* ===== HEADER FIXA MELHORADA ===== */
.header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    z-index: 1030;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.header-fixed .container-fluid {
    width: 100%;
    padding: 0 2rem;
}

.header-fixed h4 {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

/* Botão toggle sidebar */
#sidebarToggle {
    color: #475569;
    font-size: 1.75rem;
    padding: 0.5rem;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#sidebarToggle:hover {
    color: var(--primary-color);
    background-color: #f1f5f9;
}

/* Botões de ação no header */
.header-fixed .btn-link {
    color: #64748b;
    transition: all 0.2s ease;
    text-decoration: none;
    padding: 0.6rem;
    border-radius: 0.75rem;
}

.header-fixed .btn-link:hover {
    color: var(--primary-color);
    background-color: #f1f5f9;
}

/* Dropdown menu fix */
.dropdown-menu {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    padding: 0.75rem;
    margin-top: 0.5rem !important;
}

/* ===== ESTILOS GLOBAIS COLORIDOS ===== */
.btn-group .btn {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-group .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* Cards com hover effect */
.card {
    border-radius: 12px;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

/* Tabelas melhoradas */
.table thead th {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
    transition: all 0.2s ease;
}

/* Badges coloridos aprimorados */
.badge {
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.badge.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #f56565 100%) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ffdd57 100%) !important;
    color: #000 !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, #17a2b8 0%, #20c9e0 100%) !important;
}

.badge.bg-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%) !important;
}

/* Bot\u00f5es de a\u00e7\u00e3o nas tabelas */
.btn-sm {
    border-radius: 6px;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
}

.btn-sm i {
    font-size: 0.9rem;
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Anima\u00e7\u00f5es suaves */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card, .gradient-header, .gradient-header-produtos, 
.gradient-header-pedidos, .gradient-header-crm,
.gradient-header-financeiro, .gradient-header-fornecedor,
.gradient-header-representante, .gradient-header-empresa,
.gradient-header-marketplace {
    animation: fadeInUp 0.5s ease-out;
}

/* Inputs de formul\u00e1rio melhorados */
.form-control, .form-select {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-label {
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Bot\u00f5es principais melhorados */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    font-weight: 600;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #f56565 100%);
    border: none;
    font-weight: 600;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ffdd57 100%);
    border: none;
    font-weight: 600;
    color: #000;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4);
    color: #000;
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #20c9e0 100%);
    border: none;
    font-weight: 600;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(23, 162, 184, 0.4);
}

/* Alertas melhorados */
.alert {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(32, 201, 151, 0.1) 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(245, 101, 101, 0.1) 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 221, 87, 0.1) 100%);
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.1) 0%, rgba(32, 201, 224, 0.1) 100%);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Responsividade melhorada */
@media (max-width: 768px) {
    .btn-group .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .table thead th {
        font-size: 0.75rem;
        padding: 0.75rem 0.5rem;
    }
    
    .table tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
}

.dropdown-item {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dropdown-item:hover {
    background-color: #f1f5f9;
    color: var(--primary-color);
}

.dropdown-item i {
    font-size: 1.1rem;
    width: 1.25rem;
    text-align: center;
}

/* ===== SIDEBAR MELHORADA ===== */
.sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    width: 280px;
    height: calc(100vh - 70px);
    background: var(--sidebar-bg);
    border-right: 1px solid #334155;
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1020;
    padding: 1.5rem 1rem;
    color: white;
}

/* Mobile: sidebar escondida por padrão */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
        box-shadow: 10px 0 15px -3px rgb(0 0 0 / 0.2);
    }
}

/* Desktop: sidebar sempre visível */
@media (min-width: 992px) {
    .sidebar {
        transform: translateX(0);
    }
}

.sidebar .nav {
    padding: 0;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar .nav-link {
    color: var(--sidebar-text);
    padding: 0.875rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 600;
}

.sidebar .nav-link:hover {
    background-color: var(--sidebar-hover);
    color: #ffffff;
    transform: translateX(4px);
}

.sidebar .nav-link.active {
    background-color: var(--sidebar-active);
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.4);
}

.sidebar .nav-link i {
    width: 1.5rem;
    text-align: center;
    font-size: 1.25rem;
}

/* Sidebar overlay para mobile - invisível mas clicável */
.sidebar-overlay {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: transparent;
    z-index: 1010;
    display: none;
    pointer-events: none;
}

.sidebar-overlay.show {
    display: block;
    pointer-events: auto;
}

/* ===== SCROLLBAR CUSTOMIZADO ===== */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

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

.sidebar::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 2px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-top: 64px;
    padding: 2rem;
    min-height: calc(100vh - 64px);
    background-color: var(--body-bg);
}

/* Desktop: espaço para sidebar */
@media (min-width: 992px) {
    .main-content {
        margin-left: 260px;
    }
}

/* Mobile: sem margem */
@media (max-width: 991px) {
    .main-content {
        margin-left: 0;
        padding: 1.25rem;
    }
}

/* ===== CARDS ===== */
.card {
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    background-color: #ffffff;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 15px 20px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.card-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 15px 20px;
}

/* ===== TABELAS DESKTOP ===== */
.table {
    background-color: #ffffff;
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    padding: 12px;
}

.table tbody td {
    padding: 12px;
    vertical-align: middle;
}

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

.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

/* Desktop: Mostrar tabelas */
@media (min-width: 768px) {
    .desktop-table {
        display: block;
    }
    
    .mobile-cards {
        display: none;
    }
}

/* ===== COMPONENTES MODERNOS ===== */
.card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.25rem 1.5rem;
    border-top-left-radius: 0.75rem !important;
    border-top-right-radius: 0.75rem !important;
}

.card-title {
    font-weight: 700;
    color: #111827;
    margin-bottom: 0;
}

.card-body {
    padding: 1.5rem;
}

/* Tabelas */
.table {
    color: #374151;
    font-size: 0.875rem;
}

.table thead th {
    background-color: #f9fafb;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.table tbody td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
    border-bottom: 1px solid #f3f4f6;
}

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

/* Botões */
.btn {
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 0.4rem;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

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

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

.btn-success {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-success:hover {
    background-color: #047857;
    border-color: #047857;
}

/* Formulários */
.form-label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    padding: 0.625rem 0.875rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Empty State */
.empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
    background: #ffffff;
    border-radius: 1rem;
    border: 2px dashed #e5e7eb;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: #f9fafb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

/* Subtle Backgrounds */
.bg-primary-subtle { background-color: rgba(26, 54, 93, 0.1) !important; }
.bg-success-subtle { background-color: rgba(5, 150, 105, 0.1) !important; }
.bg-info-subtle { background-color: rgba(14, 165, 233, 0.1) !important; }
.bg-warning-subtle { background-color: rgba(245, 158, 11, 0.1) !important; }
.bg-danger-subtle { background-color: rgba(239, 68, 68, 0.1) !important; }

/* KPI Cards Refinement */
.card.shadow-sm {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card.shadow-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

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

.page-title {
    font-size: 1.875rem;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.025em;
}

/* Badges */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 600;
    border-radius: 0.375rem;
}

/* KPI Cards */
.kpi-card {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
}

.kpi-card .card-body {
    padding: 1.5rem;
    z-index: 1;
}

.kpi-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.kpi-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0;
    letter-spacing: -0.025em;
}

.kpi-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.kpi-primary .kpi-icon { background-color: #e0e7ff; color: var(--primary-color); }
.kpi-success .kpi-icon { background-color: #dcfce7; color: var(--secondary-color); }
.kpi-warning .kpi-icon { background-color: #fef3c7; color: #d97706; }
.kpi-info .kpi-icon { background-color: #e0f2fe; color: var(--accent-color); }

/* ===== CARDS MOBILE ===== */
/* Mobile: Mostrar cards */
@media (max-width: 767px) {
    .desktop-table {
        display: none;
    }
    
    .mobile-cards {
        display: block;
    }
    
    .mobile-card {
        background: #ffffff;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 15px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .mobile-card-title {
        font-weight: 600;
        font-size: 16px;
        margin-bottom: 10px;
        color: #212529;
    }
    
    .mobile-card-info {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .mobile-card-row {
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .mobile-card-row:last-child {
        border-bottom: none;
    }
    
    .mobile-card-label {
        font-weight: 500;
        color: #6c757d;
        font-size: 13px;
    }
    
    .mobile-card-value {
        font-weight: 400;
        color: #212529;
        font-size: 14px;
        text-align: right;
    }
    
    .mobile-card-actions {
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid #dee2e6;
        display: flex;
        gap: 8px;
        justify-content: flex-end;
    }
    
    .mobile-card-actions .btn {
        flex: 1;
        max-width: 120px;
    }
}

/* ===== BOTÕES ===== */
.btn {
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-1px);
}

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

.btn-group {
    gap: 5px;
}

/* ===== BADGES ===== */
.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 12px;
}

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

.form-control,
.form-select {
    border-radius: 6px;
    border: 1px solid #ced4da;
    padding: 10px 12px;
}

.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.input-group-text {
    border-radius: 6px;
    background-color: #f8f9fa;
}

/* ===== ALERTS ===== */
.alert {
    border-radius: 8px;
    padding: 15px 20px;
    border-left: 4px solid;
}

.alert-success {
    border-left-color: #198754;
}

.alert-danger {
    border-left-color: #dc3545;
}

.alert-warning {
    border-left-color: #ffc107;
}

.alert-info {
    border-left-color: #0dcaf0;
}

/* ===== DROPDOWN ===== */
.dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid #dee2e6;
    padding: 8px 0;
}

.dropdown-item {
    padding: 10px 20px;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item i {
    margin-right: 10px;
    width: 20px;
}

/* ===== MODALS ===== */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 20px 24px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 16px 24px;
}

/* ===== FOOTER ===== */
.footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    margin-top: auto;
    padding: 20px 0;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 380px;
    padding: 15px;
}

.login-card {
    background: #ffffff;
    border-radius: 1.25rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    padding: 2.2rem 1.8rem;
    animation: slideUp 0.6s ease-out;
    border: 1px solid #e5e7eb;
}

/* Animação de entrada */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header do Login */
.login-header {
    text-align: center;
    margin-bottom: 1.6rem;
}

.logo-container {
    margin-bottom: 0.8rem;
}

.login-logo {
    max-width: 65px;
    height: auto;
    filter: drop-shadow(0 6px 10px rgba(26, 54, 93, 0.2));
}

.login-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 0.25rem 0;
    letter-spacing: -0.02em;
}

.login-subtitle {
    font-size: 0.75rem;
    color: #8b8b8b;
    margin: 0;
    font-weight: 500;
}

/* Formulário */
.login-form {
    margin: 1.5rem 0;
}

.form-group {
    margin-bottom: 0.95rem;
}

.form-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Input Groups */
.input-group-text {
    background: #f5f7fa;
    border: 1px solid #d1d5db;
    color: #64748b;
    padding: 0 0.75rem;
    font-size: 0.95rem;
}

.form-control {
    border: 1px solid #d1d5db;
    padding: 0.55rem 0.8rem;
    font-size: 0.9rem;
    color: #111827;
    height: auto;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2.5px rgba(102, 126, 234, 0.08);
}

.btn-login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    padding: 0.5rem 1.2rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 0.9rem;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.25);
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(102, 126, 234, 0.35);
    opacity: 0.95;
    color: white;
}

.input-group:focus-within .input-group-text {
    background: #f7f7f7;
    border-color: #667eea;
    color: #667eea;
}

/* Botão de toggle de senha */
.toggle-password {
    border-left: none !important;
    padding: 0 12px;
    color: #aaa;
    background: transparent;
    font-size: 0.9rem;
}

.toggle-password:hover,
.toggle-password:focus {
    color: #667eea;
    background: transparent;
}

/* Checkbox Lembrar-me */
.form-check-remember {
    margin: 0.9rem 0 1rem 0;
    display: flex;
    align-items: center;
}

.form-check-input {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    cursor: pointer;
    border: 2px solid #d1d5db;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.form-check-input:hover {
    border-color: #667eea;
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.form-check-label {
    font-size: 0.85rem;
    color: #666;
    cursor: pointer;
    margin: 0;
}

/* Botão de Login */
.btn-login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.5rem 1.2rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.25);
    position: relative;
    overflow: hidden;
    margin-top: 0.5rem;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    transition: left 0.3s ease;
    z-index: 0;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(102, 126, 234, 0.35);
}

.btn-login:hover::before {
    left: 100%;
}

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

/* Mensagens de Erro */
.alert {
    border-radius: 10px;
    border: none;
    margin-bottom: 20px;
    padding: 14px 16px;
    font-size: 14px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.alert-danger {
    background: #ffe8e8;
    color: #c41d1d;
}

.form-text.text-danger {
    font-size: 12px;
    margin-top: 6px !important;
}

/* Footer */
.login-footer {
    text-align: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
    margin-top: 20px;
}

.login-footer small {
    display: block;
    font-size: 13px;
    color: #999;
    margin-bottom: 8px;
}

.login-footer a {
    color: #667eea;
    transition: color 0.2s ease;
}

.login-footer a:hover {
    color: #764ba2;
}

/* Decorações */
.login-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: #fff;
    top: -150px;
    left: -150px;
    animation: float 6s ease-in-out infinite;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: #fff;
    bottom: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite reverse;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: #fff;
    top: 50%;
    right: 5%;
    animation: float 10s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(20px); }
}

/* Responsivo */
@media (max-width: 480px) {
    .login-container {
        padding: 15px;
    }

    .login-card {
        padding: 35px 25px;
    }

    .login-title {
        font-size: 26px;
    }

    .form-control-lg {
        font-size: 14px;
        padding: 10px 12px;
    }

    .input-group-text {
        padding: 0 12px;
    }

    .btn-login {
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 20px;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    color: #6c757d;
}

/* ===== PAGINAÇÃO ===== */
.pagination {
    margin-top: 20px;
}

.page-link {
    color: #0d6efd;
    border-radius: 6px;
    margin: 0 2px;
}

.page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* ===== LOADING ===== */
.spinner-border {
    width: 1.5rem;
    height: 1.5rem;
    border-width: 0.2em;
}

/* ===== UTILITIES ===== */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shadow-sm {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

.rounded {
    border-radius: 8px !important;
}

/* ===== RESPONSIVIDADE ADICIONAL ===== */
@media (max-width: 575px) {
    .main-content {
        padding: 15px;
    }
    
    h1, h2 {
        font-size: 1.5rem;
    }
    
    h3, h4 {
        font-size: 1.25rem;
    }
}
/* ===== PAGE HEADERS ===== */
.page-header {
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 30px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-header .text-muted {
    margin-top: 5px;
}

/* ===== TABLE IMPROVEMENTS ===== */
.table {
    font-size: 14px;
}

.table thead {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
}

.table thead th {
    border-bottom: 2px solid #e8ecf1;
    font-weight: 600;
    color: #2c3e50;
    padding: 15px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.table tbody td {
    vertical-align: middle;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f9f9ff;
    box-shadow: inset 0 0 0 1px #f0f0f0;
}

.table-light {
    background-color: #f8f9ff;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #ffffff;
}

.table-striped tbody tr:nth-of-type(even) {
    background-color: #f9faff;
}

/* ===== CARD IMPROVEMENTS ===== */
.card {
    border: none;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.card:not(.shadow-sm) {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.card-body {
    padding: 20px;
}

/* ===== BADGES ===== */
.badge {
    padding: 6px 12px;
    font-weight: 500;
    font-size: 12px;
    border-radius: 8px;
    letter-spacing: 0.3px;
}

.badge.bg-light {
    background-color: #f0f0f0 !important;
    color: #333 !important;
    font-weight: 600;
}

/* ===== MOBILE CARDS ===== */
.mobile-cards {
    display: none;
}

@media (max-width: 768px) {
    .desktop-table {
        display: none;
    }
    
    .mobile-cards {
        display: block;
    }
}

.mobile-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

.mobile-card:active {
    transform: scale(0.98);
}

.mobile-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.mobile-card-info {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.mobile-card-item {
    margin-bottom: 8px;
}

.mobile-card-actions {
    display: flex;
    gap: 8px;
    flex-direction: column;
}

.mobile-card-actions .btn {
    font-size: 13px;
    padding: 8px 12px;
}

/* ===== BUTTON GROUPS ===== */
.btn-group {
    gap: 4px;
}

.btn-group .btn {
    border-radius: 8px !important;
    padding: 8px 12px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.btn-outline-primary:hover,
.btn-outline-info:hover,
.btn-outline-danger:hover,
.btn-outline-success:hover {
    transform: translateY(-1px);
}

/* ===== SUCCESS & ACTION BUTTONS ===== */
.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 16px;
}

.empty-state h5 {
    color: #999;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.empty-state p {
    color: #bbb;
    font-size: 14px;
    margin: 0;
}

/* ===== ALERT IMPROVEMENTS ===== */
.alert {
    border: none;
    border-radius: 10px;
    border-left: 4px solid;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background-color: #ecf9f5;
    color: #065f46;
    border-left-color: #10b981;
}

.alert-danger {
    background-color: #ffe8e8;
    color: #c41d1d;
    border-left-color: #dc2626;
}

.alert-warning {
    background-color: #fff7e5;
    color: #92400e;
    border-left-color: #f59e0b;
}

.alert-info {
    background-color: #e0f2ff;
    color: #0c4a6e;
    border-left-color: #0284c7;
}

/* ===== FORM IMPROVEMENTS ===== */
.form-control,
.form-select {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ===== RESPONSIVE IMAGES ===== */
img {
    max-width: 100%;
    height: auto;
}

/* ===== LOADING STATE ===== */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn:disabled::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 6px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    padding: 20px;
    margin-top: 70px;
    margin-left: 0;
}

@media (min-width: 992px) {
    .main-content {
        margin-left: 250px;
    }
}

/* ===== FOOTER ===== */
footer {
    border-top: 1px solid #e0e0e0;
    background-color: #f9f9f9;
}

/* ===== KPI CARDS ===== */
.kpi-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border-left: 4px solid;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: -30px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    opacity: 0.1;
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.kpi-card.kpi-primary {
    border-left-color: #2563eb;
}

.kpi-card.kpi-primary::before {
    background-color: #2563eb;
}

.kpi-card.kpi-success {
    border-left-color: #10b981;
}

.kpi-card.kpi-success::before {
    background-color: #10b981;
}

.kpi-card.kpi-warning {
    border-left-color: #f59e0b;
}

.kpi-card.kpi-warning::before {
    background-color: #f59e0b;
}

.kpi-card.kpi-info {
    border-left-color: #0284c7;
}

.kpi-card.kpi-info::before {
    background-color: #0284c7;
}

.kpi-label {
    font-size: 12px;
    color: #999;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 8px 0 0 0;
}

.kpi-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    opacity: 0.15;
}

.kpi-card.kpi-primary .kpi-icon {
    background-color: #2563eb;
    color: #2563eb;
}

.kpi-card.kpi-success .kpi-icon {
    background-color: #10b981;
    color: #10b981;
}

.kpi-card.kpi-warning .kpi-icon {
    background-color: #f59e0b;
    color: #f59e0b;
}

.kpi-card.kpi-info .kpi-icon {
    background-color: #0284c7;
    color: #0284c7;
}

/* ===== CARD HEADERS ===== */
.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 12px 15px;
}

.card-header h5 {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}