﻿.btn-sm {
    padding: 2px 6px 2px 6px !important;
}

/* ======================================
   VARIÁVEIS CSS - Light Mode
   ====================================== */
:root {
    --primary-color: #2563eb;
    --primary-light: #3b82f6;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --border-radius: 8px;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    /* Backgrounds e borders light */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
}

    /* ======================================
   VARIÁVEIS CSS - Dark Mode
   ====================================== */
    :root[data-theme="dark"],
    body.dark-mode,
    [data-bs-theme="dark"] {
        --primary-color: #60a5fa;
        --primary-light: #93c5fd;
        --success-color: #10b981;
        --warning-color: #f59e0b;
        --danger-color: #ef4444;
        /* Tons de cinza invertidos para dark mode */
        --gray-50: #0f172a;
        --gray-100: #1e293b;
        --gray-200: #334155;
        --gray-300: #475569;
        --gray-400: #64748b;
        --gray-500: #94a3b8;
        --gray-600: #cbd5e1;
        --gray-700: #e2e8f0;
        --gray-800: #f1f5f9;
        --gray-900: #f8fafc;
        --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.4);
        --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
        /* Backgrounds e borders dark */
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --bg-card: #1e293b;
        --bg-hover: #334155;
        --border-color: #334155;
        --border-light: #475569;
        --text-primary: #f1f5f9;
        --text-secondary: #94a3b8;
    }

/* ======================================
   LAYOUT PRINCIPAL
   ====================================== */
.page-container {
    margin: 0 auto;
    background-color: var(--bg-primary);
}

.page-header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.page-title p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

/* ======================================
   FILTROS
   ====================================== */
.filters-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .filter-group label {
        font-weight: 500;
        color: var(--text-primary);
        font-size: 0.875rem;
    }

    .filter-group input,
    .filter-group select {
        padding: 8px 12px;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        font-size: 0.875rem;
        transition: border-color 0.2s ease;
        background-color: var(--bg-secondary);
        color: var(--text-primary);
    }

        .filter-group input::placeholder {
            color: var(--gray-400);
        }

        .filter-group input:focus,
        .filter-group select:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
            background-color: var(--bg-secondary);
        }

.filter-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.advanced-filters {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    margin-top: 16px;
}

/* ======================================
   BOTÕES
   ====================================== */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .btn-secondary:hover {
        background: var(--bg-hover);
        border-color: var(--gray-400);
    }

/* ======================================
   TABELA
   ====================================== */
.results-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.results-header {
    background: var(--bg-secondary);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-legend {
    display: flex;
    gap: 16px;
    align-items: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

    .status-dot.pending {
        background: var(--warning-color);
    }

    .status-dot.analyzing {
        background: var(--primary-color);
    }

    .status-dot.reject {
        background: var(--danger-color);
    }

    .status-dot.completed {
        background: var(--success-color);
    }

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

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

    .data-table th {
        background: var(--bg-secondary);
        color: var(--text-secondary);
        font-weight: 500;
        padding: 9px 16px;
        text-align: left;
        border-bottom: 1px solid var(--border-color);
        font-size: 0.8125rem;
        letter-spacing: 0.5px;
    }

    .data-table td {
        padding: 6px 16px;
        border-bottom: 1px solid var(--border-light);
        font-size: 0.775rem;
        vertical-align: middle;
        color: var(--text-primary);
    }

    .data-table tbody tr:nth-child(even) {
        background: rgba(148, 163, 184, 0.03);
    }

    .data-table tbody tr:hover {
        background: var(--bg-hover);
    }

/* ======================================
   BADGES
   ====================================== */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-primary {
    background: var(--primary-color);
    color: white;
}

.badge-secondary {
    background: var(--gray-200);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* ======================================
   STATUS BADGES - Light Mode
   ====================================== */
.status-badge.pending {
    background: rgb(217 119 6 / 0.1);
    color: #d97706;
    border: 1px solid rgb(217 119 6 / 0.2);
}

.status-badge.reject {
    background: rgb(220 38 38 / 0.1);
    color: #dc2626;
    border: 1px solid rgb(220 38 38 / 0.2);
}

.status-badge.analyzing {
    background: rgb(37 99 235 / 0.1);
    color: #2563eb;
    border: 1px solid rgb(37 99 235 / 0.2);
}

.status-badge.completed {
    background: rgb(5 150 105 / 0.1);
    color: #059669;
    border: 1px solid rgb(5 150 105 / 0.2);
}

/* ======================================
   STATUS BADGES - Dark Mode
   ====================================== */
:root[data-theme="dark"] .status-badge.pending,
body.dark-mode .status-badge.pending,
[data-bs-theme="dark"] .status-badge.pending {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

:root[data-theme="dark"] .status-badge.reject,
body.dark-mode .status-badge.reject,
[data-bs-theme="dark"] .status-badge.reject {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

:root[data-theme="dark"] .status-badge.analyzing,
body.dark-mode .status-badge.analyzing,
[data-bs-theme="dark"] .status-badge.analyzing {
    background: rgba(96, 165, 250, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

:root[data-theme="dark"] .status-badge.completed,
body.dark-mode .status-badge.completed,
[data-bs-theme="dark"] .status-badge.completed {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ======================================
   PRIORITY BADGES
   ====================================== */
.priority-badge.high {
    background: rgb(220 38 38 / 0.1);
    color: var(--danger-color);
    border: 1px solid rgb(220 38 38 / 0.2);
}

.priority-badge.normal {
    background: rgb(100 116 139 / 0.1);
    color: var(--gray-500);
    border: 1px solid rgb(100 116 139 / 0.2);
}

.priority-badge.low {
    background: rgb(5 150 105 / 0.1);
    color: var(--success-color);
    border: 1px solid rgb(5 150 105 / 0.2);
}

/* ======================================
   TIPO BADGES - Light Mode
   ====================================== */
.tipo-badge.inclusao-beneficiario {
    background: rgb(5 150 105 / 0.1);
    color: #059669;
    border: 1px solid rgb(5 150 105 / 0.2);
}

.tipo-badge.exclusao-beneficiario {
    background: rgb(220 38 38 / 0.1);
    color: #dc2626;
    border: 1px solid rgb(220 38 38 / 0.2);
}

.tipo-badge.alteracao-dados {
    background: rgb(37 99 235 / 0.1);
    color: #2563eb;
    border: 1px solid rgb(37 99 235 / 0.2);
}

.tipo-badge.cancelamento-assinatura {
    background: rgb(127 29 29 / 0.1);
    color: #7f1d1d;
    border: 1px solid rgb(127 29 29 / 0.2);
}

.tipo-badge.inclusao-beneficio {
    background: rgb(16 185 129 / 0.1);
    color: #10b981;
    border: 1px solid rgb(16 185 129 / 0.2);
}

.tipo-badge.exclusao-beneficio {
    background: rgb(217 119 6 / 0.1);
    color: #d97706;
    border: 1px solid rgb(217 119 6 / 0.2);
}

.tipo-badge.tipo-indefinido {
    background: rgb(100 116 139 / 0.1);
    color: #64748b;
    border: 1px solid rgb(100 116 139 / 0.2);
}

/* ======================================
   TIPO BADGES - Dark Mode
   ====================================== */
:root[data-theme="dark"] .tipo-badge.inclusao-beneficiario,
body.dark-mode .tipo-badge.inclusao-beneficiario,
[data-bs-theme="dark"] .tipo-badge.inclusao-beneficiario,
:root[data-theme="dark"] .tipo-badge.inclusao-beneficio,
body.dark-mode .tipo-badge.inclusao-beneficio,
[data-bs-theme="dark"] .tipo-badge.inclusao-beneficio {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

:root[data-theme="dark"] .tipo-badge.exclusao-beneficiario,
body.dark-mode .tipo-badge.exclusao-beneficiario,
[data-bs-theme="dark"] .tipo-badge.exclusao-beneficiario,
:root[data-theme="dark"] .tipo-badge.exclusao-beneficio,
body.dark-mode .tipo-badge.exclusao-beneficio,
[data-bs-theme="dark"] .tipo-badge.exclusao-beneficio {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

:root[data-theme="dark"] .tipo-badge.alteracao-dados,
body.dark-mode .tipo-badge.alteracao-dados,
[data-bs-theme="dark"] .tipo-badge.alteracao-dados {
    background: rgba(96, 165, 250, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

:root[data-theme="dark"] .tipo-badge.cancelamento-assinatura,
body.dark-mode .tipo-badge.cancelamento-assinatura,
[data-bs-theme="dark"] .tipo-badge.cancelamento-assinatura {
    background: rgba(127, 29, 29, 0.2);
    color: #f87171;
    border: 1px solid rgba(127, 29, 29, 0.4);
}

:root[data-theme="dark"] .tipo-badge.tipo-indefinido,
body.dark-mode .tipo-badge.tipo-indefinido,
[data-bs-theme="dark"] .tipo-badge.tipo-indefinido {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

/* ======================================
   BOTÕES DE AÇÃO
   ====================================== */
.action-buttons {
    display: flex;
    gap: 4px;
}

.btn-action {
    width: 28px;
    height: 28px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

    .btn-action:hover {
        background: var(--bg-hover);
    }

    .btn-action.view:hover {
        background: rgb(37 99 235 / 0.1);
        border-color: var(--primary-color);
        color: var(--primary-color);
    }

    .btn-action.edit:hover {
        background: rgb(217 119 6 / 0.1);
        border-color: var(--warning-color);
        color: var(--warning-color);
    }

    .btn-action.approve:hover {
        background: rgb(5 150 105 / 0.1);
        border-color: var(--success-color);
        color: var(--success-color);
    }

    .btn-action.reject:hover {
        background: rgb(220 38 38 / 0.1);
        border-color: var(--danger-color);
        color: var(--danger-color);
    }

/* Dark Mode - Botões de Ação */
:root[data-theme="dark"] .btn-action.view:hover,
body.dark-mode .btn-action.view:hover,
[data-bs-theme="dark"] .btn-action.view:hover {
    background: rgba(96, 165, 250, 0.15);
    border-color: #60a5fa;
    color: #93c5fd;
}

:root[data-theme="dark"] .btn-action.edit:hover,
body.dark-mode .btn-action.edit:hover,
[data-bs-theme="dark"] .btn-action.edit:hover {
    background: rgba(245, 158, 11, 0.15);
    border-color: #f59e0b;
    color: #fbbf24;
}

:root[data-theme="dark"] .btn-action.approve:hover,
body.dark-mode .btn-action.approve:hover,
[data-bs-theme="dark"] .btn-action.approve:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    color: #6ee7b7;
}

:root[data-theme="dark"] .btn-action.reject:hover,
body.dark-mode .btn-action.reject:hover,
[data-bs-theme="dark"] .btn-action.reject:hover,
:root[data-theme="dark"] .btn-action.deactivate:hover,
body.dark-mode .btn-action.deactivate:hover,
[data-bs-theme="dark"] .btn-action.deactivate:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #fca5a5;
}

/* ======================================
   ESTADOS LOADING E EMPTY
   ====================================== */
.loading-state, .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    text-align: center;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ======================================
   FORMULÁRIOS
   ====================================== */
.form-group {
    margin-bottom: 16px;
}

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

    .form-group textarea,
    .form-group input,
    .form-group select {
        width: 100%;
        padding: 8px 12px;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        font-size: 0.875rem;
        resize: vertical;
        background-color: var(--bg-secondary);
        color: var(--text-primary);
    }

    .form-group textarea {
        min-height: 80px;
    }

        .form-group textarea::placeholder,
        .form-group input::placeholder {
            color: var(--gray-400);
        }

        .form-group textarea:focus,
        .form-group input:focus,
        .form-group select:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
            background-color: var(--bg-secondary);
        }

.client-info strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.client-info small {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.code-cell {
    font-family: 'Monaco', 'Menlo', monospace;
    font-weight: 500;
    color: var(--text-secondary);
}

.icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

/* ======================================
   OFFCANVAS
   ====================================== */
.modern-offcanvas {
    width: 80% !important;
    max-width: 800px;
    background-color: var(--bg-card);
    border-left: 1px solid var(--border-color);
}

.offcanvas-header {
    border-bottom: 1px solid var(--border-color);
}

    .offcanvas-header h2 {
        margin: 0;
        color: var(--text-primary);
        font-size: 1.5rem;
        font-weight: 600;
    }

.offcanvas-title {
    color: var(--text-primary);
}

/* ======================================
   COLUNA DE AÇÕES
   ====================================== */
.actions-column {
    min-width: 280px !important;
    width: 280px !important;
    padding: 8px 3px 4px 8px !important;
}

/* ======================================
   BOTÕES AGRUPADOS
   ====================================== */
.btn-group {
    width: 100% !important;
    display: flex !important;
}

.btn-action-grouped {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0.5px 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.15s ease;
    border: 1px solid;
    flex: 1;
    margin: 0 !important;
}

.btn-group > .btn-action-grouped:not(:first-child) {
    border-left: 0 !important;
    margin-left: 0 !important;
}

.btn-group > .btn-action-grouped:not(:last-child) {
    border-right: 1px solid rgba(255,255,255,0.2) !important;
}

.btn-action-grouped:hover {
    transform: none;
    z-index: 1;
    box-shadow: none;
}

.btn-action-grouped i {
    font-size: 13px;
}

/* Cores dos botões agrupados */
.btn-action-grouped.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

    .btn-action-grouped.btn-success:hover {
        background-color: #218838;
        border-color: #1e7e34;
        color: white;
    }

.btn-action-grouped.btn-primary {
    background-color: #2859B5;
    border-color: #2859B5;
    color: white;
}

    .btn-action-grouped.btn-primary:hover {
        background-color: #0056b3;
        border-color: #004085;
        color: white;
    }

.btn-action-grouped.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

    .btn-action-grouped.btn-danger:hover {
        background-color: #c82333;
        border-color: #bd2130;
        color: white;
    }

/* Dark Mode - Botões Agrupados */
:root[data-theme="dark"] .btn-action-grouped.btn-success,
body.dark-mode .btn-action-grouped.btn-success,
[data-bs-theme="dark"] .btn-action-grouped.btn-success {
    background-color: #059669;
    border-color: #059669;
}

    :root[data-theme="dark"] .btn-action-grouped.btn-success:hover,
    body.dark-mode .btn-action-grouped.btn-success:hover,
    [data-bs-theme="dark"] .btn-action-grouped.btn-success:hover {
        background-color: #047857;
        border-color: #047857;
    }

:root[data-theme="dark"] .btn-action-grouped.btn-primary,
body.dark-mode .btn-action-grouped.btn-primary,
[data-bs-theme="dark"] .btn-action-grouped.btn-primary {
    background-color: #2563eb;
    border-color: #2563eb;
}

    :root[data-theme="dark"] .btn-action-grouped.btn-primary:hover,
    body.dark-mode .btn-action-grouped.btn-primary:hover,
    [data-bs-theme="dark"] .btn-action-grouped.btn-primary:hover {
        background-color: #1d4ed8;
        border-color: #1d4ed8;
    }

:root[data-theme="dark"] .btn-action-grouped.btn-danger,
body.dark-mode .btn-action-grouped.btn-danger,
[data-bs-theme="dark"] .btn-action-grouped.btn-danger {
    background-color: #dc2626;
    border-color: #dc2626;
}

    :root[data-theme="dark"] .btn-action-grouped.btn-danger:hover,
    body.dark-mode .btn-action-grouped.btn-danger:hover,
    [data-bs-theme="dark"] .btn-action-grouped.btn-danger:hover {
        background-color: #b91c1c;
        border-color: #b91c1c;
    }

/* Loading state para botões agrupados */
.btn-action-grouped.btn-loading {
    position: relative;
    color: transparent !important;
}

    .btn-action-grouped.btn-loading::after {
        content: "";
        position: absolute;
        width: 12px;
        height: 12px;
        top: 50%;
        left: 50%;
        margin-left: -6px;
        margin-top: -6px;
        border: 1.5px solid transparent;
        border-top: 1.5px solid currentColor;
        border-radius: 50%;
        animation: spinner 0.8s linear infinite;
    }

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

/* ======================================
   BOTÕES DE AÇÃO COLORIDOS
   ====================================== */
.btn-action .icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.btn-action.edit {
    background-color: #e8f0fe;
    color: #1967d2;
}

    .btn-action.edit:hover {
        background-color: #d2e3fc;
        transform: translateY(-1px);
    }

.btn-action.reject {
    background-color: #fce8e6;
    color: #d93025;
}

    .btn-action.reject:hover {
        background-color: #f5c8c5;
        transform: translateY(-1px);
    }

.btn-action.deactivate {
    background-color: #fef7e0;
    color: #ea8600;
}

    .btn-action.deactivate:hover {
        background-color: #feefc3;
        transform: translateY(-1px);
    }

.btn-action.approve {
    background-color: #e6f4ea;
    color: #1e8e3e;
}

    .btn-action.approve:hover:not(:disabled) {
        background-color: #ceead6;
        transform: translateY(-1px);
    }

.btn-action.activate {
    background-color: #e6f4ea;
    color: #1e8e3e;
}

    .btn-action.activate:hover {
        background-color: #ceead6;
        transform: translateY(-1px);
    }

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

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

    .btn-action:disabled:hover {
        transform: none;
    }

/* Dark Mode - Botões de Ação Coloridos */
:root[data-theme="dark"] .btn-action.edit,
body.dark-mode .btn-action.edit,
[data-bs-theme="dark"] .btn-action.edit {
    background-color: rgba(96, 165, 250, 0.15);
    color: #93c5fd;
}

    :root[data-theme="dark"] .btn-action.edit:hover,
    body.dark-mode .btn-action.edit:hover,
    [data-bs-theme="dark"] .btn-action.edit:hover {
        background-color: rgba(96, 165, 250, 0.25);
    }

:root[data-theme="dark"] .btn-action.reject,
body.dark-mode .btn-action.reject,
[data-bs-theme="dark"] .btn-action.reject {
    background-color: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

    :root[data-theme="dark"] .btn-action.reject:hover,
    body.dark-mode .btn-action.reject:hover,
    [data-bs-theme="dark"] .btn-action.reject:hover {
        background-color: rgba(239, 68, 68, 0.25);
    }

:root[data-theme="dark"] .btn-action.deactivate,
body.dark-mode .btn-action.deactivate,
[data-bs-theme="dark"] .btn-action.deactivate {
    background-color: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

    :root[data-theme="dark"] .btn-action.deactivate:hover,
    body.dark-mode .btn-action.deactivate:hover,
    [data-bs-theme="dark"] .btn-action.deactivate:hover {
        background-color: rgba(245, 158, 11, 0.25);
    }

:root[data-theme="dark"] .btn-action.approve,
body.dark-mode .btn-action.approve,
[data-bs-theme="dark"] .btn-action.approve,
:root[data-theme="dark"] .btn-action.activate,
body.dark-mode .btn-action.activate,
[data-bs-theme="dark"] .btn-action.activate {
    background-color: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
}

    :root[data-theme="dark"] .btn-action.approve:hover:not(:disabled),
    body.dark-mode .btn-action.approve:hover:not(:disabled),
    [data-bs-theme="dark"] .btn-action.approve:hover:not(:disabled),
    :root[data-theme="dark"] .btn-action.activate:hover,
    body.dark-mode .btn-action.activate:hover,
    [data-bs-theme="dark"] .btn-action.activate:hover {
        background-color: rgba(16, 185, 129, 0.25);
    }

/* ======================================
   MELHORIAS NA TABELA
   ====================================== */
.btn-group .btn {
    flex: 1 1 0%;
}

.table tbody tr:hover {
    background-color: var(--bg-hover);
}

.offcanvas-start.hx-offcanvas-lg[b-d2qb2c6y39],
.offcanvas-end.hx-offcanvas-lg[b-d2qb2c6y39] {
    width: 80%;
}

.btn-group-sm > .btn, .btn-sm {
    --vz-btn-padding-y: -1.75rem;
    --vz-btn-padding-x: 0.5rem;
    --vz-btn-font-size: calc(var(--vz-font-base) * 0.875);
    --vz-btn-border-radius: var(--vz-border-radius-sm);
}

/* ======================================
   STATUS COLORS PERSONALIZADOS
   ====================================== */

/* VERDE - Sucesso */
.bg-success-custom {
    background-color: #33d0aa !important;
    border-color: #42bc9c !important;
    color: #000 !important;
}

.text-success-custom {
    color: #166534 !important;
}

.bg-success-light-custom {
    background-color: #f0fdf4 !important;
    border: 1px solid #a7f3d0 !important;
    color: #15803d !important;
}

/* Dark Mode - Verde */
:root[data-theme="dark"] .bg-success-custom,
body.dark-mode .bg-success-custom,
[data-bs-theme="dark"] .bg-success-custom {
    background-color: #059669 !important;
    border: 1px solid #047857 !important;
    color: #FFF !important;
}

:root[data-theme="dark"] .text-success-custom,
body.dark-mode .text-success-custom,
[data-bs-theme="dark"] .text-success-custom {
    color: #6ee7b7 !important;
}

:root[data-theme="dark"] .bg-success-light-custom,
body.dark-mode .bg-success-light-custom,
[data-bs-theme="dark"] .bg-success-light-custom {
    background-color: rgba(16, 185, 129, 0.15) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    color: #6ee7b7 !important;
}

/* AZUL - Aguardando */
.bg-primary-custom {
    background-color: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    color: #1e40af !important;
}

.bg-blue-custom {
    background-color: #f0f4ff !important;
    border: 1px solid #c7d2fe !important;
    color: #3730a3 !important;
}

.bg-info-custom {
    background-color: #f0f9ff !important;
    border: 1px solid #bae6fd !important;
    color: #0c4a6e !important;
}

.bg-info-dark-custom {
    background-color: #f0f9ff !important;
    border: 1px solid #7dd3fc !important;
    color: #075985 !important;
}

/* Dark Mode - Azul */
:root[data-theme="dark"] .bg-primary-custom,
body.dark-mode .bg-primary-custom,
[data-bs-theme="dark"] .bg-primary-custom,
:root[data-theme="dark"] .bg-blue-custom,
body.dark-mode .bg-blue-custom,
[data-bs-theme="dark"] .bg-blue-custom,
:root[data-theme="dark"] .bg-info-custom,
body.dark-mode .bg-info-custom,
[data-bs-theme="dark"] .bg-info-custom {
    background-color: rgba(96, 165, 250, 0.15) !important;
    border: 1px solid rgba(96, 165, 250, 0.3) !important;
    color: #93c5fd !important;
}

/* AMARELO/LARANJA - Pendente */
.bg-warning-custom {
    background-color: #fffbeb !important;
    border: 1px solid #fed7aa !important;
    color: #c2410c !important;
}

.bg-warning-light-custom {
    background-color: #fefce8 !important;
    border: 1px solid #fde68a !important;
    color: #ca8a04 !important;
}

.bg-warning-dark-custom {
    background-color: #fffbeb !important;
    border: 1px solid #fdba74 !important;
    color: #ea580c !important;
}

.bg-orange-custom {
    background-color: #fff7ed !important;
    border: 1px solid #fed7aa !important;
    color: #ea580c !important;
}

/* Dark Mode - Amarelo */
:root[data-theme="dark"] .bg-warning-custom,
body.dark-mode .bg-warning-custom,
[data-bs-theme="dark"] .bg-warning-custom,
:root[data-theme="dark"] .bg-warning-light-custom,
body.dark-mode .bg-warning-light-custom,
[data-bs-theme="dark"] .bg-warning-light-custom,
:root[data-theme="dark"] .bg-orange-custom,
body.dark-mode .bg-orange-custom,
[data-bs-theme="dark"] .bg-orange-custom {
    background-color: rgba(245, 158, 11, 0.15) !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
    color: #fbbf24 !important;
}

/* VERMELHO - Erros */
.bg-danger-custom {
    background-color: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    color: #dc2626 !important;
}

.bg-danger-light-custom {
    background-color: #fef2f2 !important;
    border: 1px solid #f9a8a8 !important;
    color: #b91c1c !important;
}

/* Dark Mode - Vermelho */
:root[data-theme="dark"] .bg-danger-custom,
body.dark-mode .bg-danger-custom,
[data-bs-theme="dark"] .bg-danger-custom,
:root[data-theme="dark"] .bg-danger-light-custom,
body.dark-mode .bg-danger-light-custom,
[data-bs-theme="dark"] .bg-danger-light-custom {
    background-color: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    color: #fca5a5 !important;
}

/* CINZA - Neutro */
.bg-secondary-custom {
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
}

.bg-dark-custom {
    background-color: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
}

.bg-muted-custom {
    background-color: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    color: #6b7280 !important;
}

.bg-neutral-custom {
    background-color: #fafafa !important;
    border: 1px solid #e4e4e7 !important;
    color: #71717a !important;
}

/* Dark Mode - Cinza */
:root[data-theme="dark"] .bg-secondary-custom,
body.dark-mode .bg-secondary-custom,
[data-bs-theme="dark"] .bg-secondary-custom,
:root[data-theme="dark"] .bg-dark-custom,
body.dark-mode .bg-dark-custom,
[data-bs-theme="dark"] .bg-dark-custom,
:root[data-theme="dark"] .bg-muted-custom,
body.dark-mode .bg-muted-custom,
[data-bs-theme="dark"] .bg-muted-custom,
:root[data-theme="dark"] .bg-neutral-custom,
body.dark-mode .bg-neutral-custom,
[data-bs-theme="dark"] .bg-neutral-custom {
    background-color: rgba(148, 163, 184, 0.1) !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    color: #94a3b8 !important;
}

/* ROXO - Especiais */
.bg-purple-custom {
    background-color: #faf5ff !important;
    border: 1px solid #e9d5ff !important;
    color: #7c2d12 !important;
}

:root[data-theme="dark"] .bg-purple-custom,
body.dark-mode .bg-purple-custom,
[data-bs-theme="dark"] .bg-purple-custom {
    background-color: rgba(168, 85, 247, 0.15) !important;
    border: 1px solid rgba(168, 85, 247, 0.3) !important;
    color: #c4b5fd !important;
}

/* ======================================
   BADGES PROFISSIONAIS
   ====================================== */
.badge-status {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    padding: 0.20rem 0.6rem;
    border-radius: 50px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 70px;
    justify-content: center;
    line-height: 1.25;
    white-space: nowrap;
}

    .badge-status i {
        font-size: 0.75rem;
        opacity: 0.8;
    }

    .badge-status:hover {
        opacity: 0.9;
        transition: opacity 0.15s ease;
    }

/* ======================================
   VARIAÇÕES DE BADGES
   ====================================== */
.badge-compact {
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    min-width: 60px;
    border-radius: 3px;
}

.badge-minimal {
    background-color: transparent !important;
    border: 1px solid currentColor !important;
    color: inherit !important;
    font-weight: 400;
}

/* ======================================
   ESTADOS ESPECÍFICOS
   ====================================== */
.status-concluido {
    background-color: #dcfce7 !important;
    border: 1px solid #bbf7d0 !important;
    color: #166534 !important;
}

.status-andamento {
    background-color: #dbeafe !important;
    border: 1px solid #93c5fd !important;
    color: #1d4ed8 !important;
}

.status-pendente {
    background-color: #fef3c7 !important;
    border: 1px solid #fde68a !important;
    color: #d97706 !important;
}

.status-rejeitado {
    background-color: #fee2e2 !important;
    border: 1px solid #fca5a5 !important;
    color: #dc2626 !important;
}

.status-aguardando {
    background-color: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
}

/* Dark Mode - Estados */
:root[data-theme="dark"] .status-concluido,
body.dark-mode .status-concluido,
[data-bs-theme="dark"] .status-concluido {
    background-color: rgba(16, 185, 129, 0.15) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    color: #6ee7b7 !important;
}

:root[data-theme="dark"] .status-andamento,
body.dark-mode .status-andamento,
[data-bs-theme="dark"] .status-andamento {
    background-color: rgba(96, 165, 250, 0.15) !important;
    border: 1px solid rgba(96, 165, 250, 0.3) !important;
    color: #93c5fd !important;
}

:root[data-theme="dark"] .status-pendente,
body.dark-mode .status-pendente,
[data-bs-theme="dark"] .status-pendente {
    background-color: rgba(245, 158, 11, 0.15) !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
    color: #fbbf24 !important;
}

:root[data-theme="dark"] .status-rejeitado,
body.dark-mode .status-rejeitado,
[data-bs-theme="dark"] .status-rejeitado {
    background-color: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    color: #fca5a5 !important;
}

:root[data-theme="dark"] .status-aguardando,
body.dark-mode .status-aguardando,
[data-bs-theme="dark"] .status-aguardando {
    background-color: rgba(148, 163, 184, 0.1) !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    color: #94a3b8 !important;
}

/* ======================================
   TABELA MELHORADA
   ====================================== */
.table-status {
    border-collapse: separate;
    border-spacing: 0;
}

    .table-status th {
        background-color: var(--bg-secondary);
        color: var(--text-secondary);
        font-weight: 500;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        padding: 0.75rem 0.5rem;
        border-bottom: 1px solid var(--border-color);
    }

    .table-status td {
        padding: 0.75rem 0.5rem;
        border-bottom: 1px solid var(--border-light);
        vertical-align: middle;
    }

    .table-status tbody tr:hover {
        background-color: var(--bg-hover);
    }

/* ======================================
   PULSE ANIMATION
   ====================================== */
.status-pulse {
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

/* ======================================
   UTILIDADES
   ====================================== */
.text-truncate-status {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-group {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.status-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.status-block {
    display: block;
    text-align: center;
    margin: 0.125rem 0;
}

/* ======================================
   RESPONSIVO
   ====================================== */
@media (max-width: 768px) {
    .modern-offcanvas {
        width: 100% !important;
        max-width: 100% !important;
    }

    .offcanvas-body {
        padding: 0;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

        .page-header > div {
            width: 100%;
        }

            .page-header > div.d-flex {
                flex-direction: column;
                width: 100%;
            }

                .page-header > div.d-flex button {
                    width: 100%;
                    justify-content: center;
                }

    .actions-column {
        min-width: 200px !important;
        width: 200px !important;
    }

    .btn-action-grouped {
        font-size: 11px;
        padding: 6px 8px;
    }

        .btn-action-grouped span {
            display: none;
        }

        .btn-action-grouped i {
            margin: 0;
        }

    .badge-status {
        font-size: 0.5625rem;
        padding: 0.125rem 0.25rem;
        min-width: 50px;
        gap: 0.125rem;
    }

        .badge-status i {
            font-size: 0.625rem;
        }
}

@media (max-width: 992px) and (min-width: 769px) {
    .modern-offcanvas {
        width: 90% !important;
    }
}

/* ======================================
   TRANSIÇÕES SUAVES
   ====================================== */
.table-status tbody tr {
    transition: background-color 0.15s ease;
}

.badge-status {
    transition: all 0.15s ease;
}

.btn-action {
    transition: all 0.2s ease;
}

.filter-group input,
.filter-group select,
.form-group input,
.form-group textarea,
.form-group select {
    transition: all 0.2s ease;
}
