/* ========================================================================
   AutoHub - Estilos Centralizados de Páginas
   Arquivo criado para consolidar todos os estilos inline das páginas .cshtml
   ======================================================================== */

/* ========================================================================
   1. CSS VARIABLES (Paleta de Cores)
   ======================================================================== */

/* As variáveis de cores agora vêm do sistema de temas global (cores.css) para respeitar light/dark. */

/* ========================================================================
   2. RESET E ESTILOS GLOBAIS
   ======================================================================== */

body {
    background-color: var(--color-primary);
    color: var(--color-light);
}

.page-content {
    padding: 0.5rem 0;
}

/* ========================================================================
   3. PAGE HEADER (Cabeçalho de Página)
   ======================================================================== */

.page-header {
    background: var(--color-accent);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 75, 107, 0.3);
}

.page-header h2 {
    color: white;
    margin: 0;
    font-weight: 600;
    font-size: 1.8rem;
}

.page-header h2 i {
    color: white;
}

.page-header .breadcrumb {
    background: transparent;
    margin: 0;
    padding: 0;
    margin-bottom: 0.5rem;
}

.page-header .breadcrumb-item {
    color: rgba(230, 232, 235, 0.7);
    font-size: 0.875rem;
}

.page-header .breadcrumb-item.active {
    color: white;
    font-weight: 700;
}

.page-header .breadcrumb-item a {
    color: rgba(230, 232, 235, 0.8);
    text-decoration: none;
    transition: color 0.2s;
}

.page-header .breadcrumb-item a:hover {
    color: var(--color-light);
}

/* ========================================================================
   4. STATS CARDS (Cards de Estatísticas)
   ======================================================================== */

.stats-card {
    background: var(--color-secondary);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--color-border);
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: var(--color-hover);
}

.stats-card .icon,
.stats-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stats-card.primary .icon,
.stats-card-icon.primary {
    background: var(--color-accent);
    color: white;
}

.stats-card-icon.success {
    background: var(--color-success);
    color: white;
}

.stats-card-icon.warning {
    background: var(--color-warning);
    color: white;
}

.stats-card-icon.info {
    background: var(--color-info);
    color: white;
}

.stats-card h3,
.stats-card-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: var(--color-light);
}

.stats-card p,
.stats-card-label {
    color: var(--color-muted);
    font-size: 0.875rem;
    margin: 0;
}

/* ========================================================================
   5. SEARCH BAR (Barra de Pesquisa)
   ======================================================================== */

.search-bar,
.search-box {
    position: relative;
    max-width: 100%;
    flex: 1;
    min-width: 400px;
}

    .search-bar input,
    .search-box input {
        
        border: 2px solid var(--color-border);
        border-radius: 8px;
        font-size: 0.9rem;
        transition: all 0.3s;
        width: 100%;
        padding: 0.625rem 1rem 0.625rem 40px !important;
        background-color: var(--color-secondary);
        color: var(--color-light);
    }

        .search-bar input:focus,
        .search-box input:focus {
            border-color: var(--color-accent);
            box-shadow: 0 0 0 3px rgba(0, 75, 107, 0.2);
            background-color: var(--color-focus);
            outline: none;
        }

        .search-bar input::placeholder,
        .search-box input::placeholder {
            color: var(--color-muted);
        }

    .search-bar i,
    .search-box i {
        position: absolute;
        left: 0.9rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--color-muted);
        font-size: 0.9rem;
        pointer-events: none; /* não atrapalha o clique */
    }


/* ========================================================================
   6. BUTTONS (Botões)
   ======================================================================== */

.btn-add-new {
    background: var(--color-accent);
    color: white;
    padding: 0.625rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    border: none;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 75, 107, 0.4);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-add-new i {
    color: white;
}

.btn-add-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 75, 107, 0.5);
    color: white;
    background: #003A52;
}

.btn-action {
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.btn-action.btn-edit {
    background: var(--color-status);
    color: white;
}

.btn-action.btn-edit:hover {
    background: #E67E22;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(245, 166, 35, 0.4);
}

.btn-action.btn-details {
    background: var(--color-info);
    color: white;
}

.btn-action.btn-details:hover {
    background: #2980B9;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.4);
}

.btn-action.btn-success {
    background: var(--color-success);
    color: white;
}

.btn-action.btn-success:hover {
    background: #2EA043;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(63, 185, 80, 0.4);
}

.btn-action.btn-delete {
    background: var(--color-error);
    color: white;
    cursor: pointer;
}

.btn-action.btn-delete:hover {
    background: #C0392B;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.4);
}

.btn-danger {
    background: var(--color-error);
    color: white;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
    cursor: pointer;
}

.btn-danger:hover {
    background: #C0392B;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.btn-danger i {
    font-size: 1rem;
}

.btn-secondary {
    background: var(--color-hover);
    color: var(--color-light);
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    border: 2px solid var(--color-border);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--color-focus);
    border-color: var(--color-muted);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary i {
    font-size: 1rem;
}

/* ========================================================================
   7. TABLE CARDS (Cards de Tabela)
   ======================================================================== */

.table-card {
    background: var(--color-primary);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.table-card-header {
    background: var(--color-hover);
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid var(--color-border);
}

.table-card-header h5 {
    margin: 0;
    font-weight: 600;
    color: var(--color-light);
    font-size: 1.1rem;
}

.table-card-footer {
    background: var(--color-hover);
    padding: 1rem 1.5rem;
    border-top: 2px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-light);
    font-size: 0.875rem;
}
/* 
.footer-info i {
    color: black !important;
} */

.footer-info strong {
    color: var(--color-light);
}

.footer-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-muted);
    font-size: 0.85rem;
}

.footer-stat-item i {
    color: var(--color-light) !important;
}

.footer-stat-item strong {
    color: var(--color-light);
    font-weight: 600;
}

/* ========================================================================
   8. TABLES (Tabelas)
   ======================================================================== */

.table-modern {
    margin: 0;
    background-color: var(--color-primary) !important;
}

.table-modern tbody,
.table-modern tbody tr,
.table-modern tbody td {
    background-color: var(--color-primary) !important;
}

.table-modern thead th {
    background: var(--color-hover);
    color: var(--color-light);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 1rem;
    border-bottom: 2px solid var(--color-border);
    border-top: none;
}

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

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

.table-modern tbody td {
    padding: 1rem;
    vertical-align: middle;
    color: var(--color-light);
    font-size: 0.9rem;
}

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

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

/* ========================================================================
   9. BADGES (Etiquetas)
   ======================================================================== */

.badge-cpf,
.badge-cnpj {
    background: var(--color-hover);
    color: var(--color-light);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid var(--color-border);
}

.status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.status-badge.pending {
    background: rgba(243, 156, 18, 0.15);
    color: var(--color-warning);
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.status-badge.approved {
    background: rgba(39, 174, 96, 0.15);
    color: var(--color-success);
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.status-badge.rejected {
    background: rgba(231, 76, 60, 0.15);
    color: var(--color-error);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.status-badge.in-progress {
    background: rgba(52, 152, 219, 0.15);
    color: var(--color-info);
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.location-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--color-light);
}

.location-badge i {
    color: var(--color-accent);
    font-size: 0.75rem;
}

.location-badge span {
    color: var(--color-light);
}

/* ========================================================================
   10. USER INFO (Informações de Usuário)
   ======================================================================== */

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 75, 107, 0.3);
}

.user-details h6 {
    margin: 0;
    font-weight: 700;
    color: var(--color-highlight);
    font-size: 1rem;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.user-details p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--color-muted);
}

/* ========================================================================
   11. MODALS (Diálogos)
   ======================================================================== */

.modal-dialog {
    margin: 1.75rem auto;
}

.modal-content {
    border-radius: 16px;
    border: 2px solid var(--color-border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    background: var(--color-secondary);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.15) 0%, rgba(192, 57, 43, 0.15) 100%);
    border-bottom: 2px solid rgba(231, 76, 60, 0.3);
    border-radius: 0;
    padding: 1.5rem;
}

.modal-header .modal-title {
    color: var(--color-error);
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-header .modal-title i {
    font-size: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.modal-header .btn-close {
    background-color: rgba(231, 76, 60, 0.1);
    border-radius: 50%;
    padding: 0.5rem;
    opacity: 1;
    transition: all 0.2s;
}

.modal-header .btn-close:hover {
    background-color: rgba(231, 76, 60, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
    background: var(--color-secondary);
}

.modal-footer {
    border-top: 2px solid var(--color-border);
    padding: 1.25rem 1.5rem;
    background: var(--color-hover);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-backdrop.show {
    opacity: 0.7;
}

.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: scale(0.9);
}

.modal.show .modal-dialog {
    transform: scale(1);
}

/* ========================================================================
   12. ALERTS (Alertas)
   ======================================================================== */

.alert-warning {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.12) 0%, rgba(241, 196, 15, 0.08) 100%);
    color: var(--color-light);
    border: 2px solid rgba(243, 156, 18, 0.3);
    border-left: 5px solid var(--color-warning);
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    align-items: start;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.15);
}

.alert-warning i {
    font-size: 2rem;
    flex-shrink: 0;
    color: var(--color-warning);
    animation: shake 3s ease-in-out infinite;
}

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

.alert-warning strong {
    color: var(--color-warning);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.alert-warning p {
    color: var(--color-light);
    line-height: 1.6;
}

.alert-warning p strong {
    color: var(--color-highlight);
    font-weight: 700;
    font-size: 1.05rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.alert-warning div {
    flex: 1;
}

/* ========================================================================
   13. EMPTY STATE (Estado Vazio)
   ======================================================================== */

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    font-size: 4rem;
    color: var(--color-muted);
    margin-bottom: 1rem;
}

.empty-state h5 {
    color: var(--color-light);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--color-muted);
    margin-bottom: 1.5rem;
}

/* ========================================================================
   14. FORM CARDS (Cards de Formulário)
   ======================================================================== */

.form-card {
    background: var(--color-secondary);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid var(--color-border);
}

.form-card-header {
    background: linear-gradient(135deg, var(--color-hover) 0%, var(--color-secondary) 100%);
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid var(--color-border);
}

.form-card-header h5 {
    margin: 0;
    font-weight: 600;
    color: var(--color-light);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-card-header i {
    color: var(--color-accent);
}

.form-card-body {
    padding: 1.5rem;
}

/* ========================================================================
   15. FORM ELEMENTS (Elementos de Formulário)
   ======================================================================== */

.form-label {
    color: var(--color-light);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-control,
.form-select {
    background-color: var(--color-hover);
    color: var(--color-light);
    border: 2px solid var(--color-border);
    border-radius: 8px;
    padding: 0.625rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.form-control:focus,
.form-select:focus {
    background-color: var(--color-focus);
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(0, 75, 107, 0.2);
    color: var(--color-light);
    outline: none;
}

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

.form-control:disabled,
.form-select:disabled {
    background-color: var(--color-secondary);
    color: var(--color-muted);
    cursor: not-allowed;
}

.invalid-feedback {
    color: var(--color-error);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--color-error);
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

/* ========================================================================
   16. UTILITY CLASSES (Classes Utilitárias)
   ======================================================================== */

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

/* Icon colors */
/* .fas.fa-envelope,
.fab.fa-whatsapp,
.fas.fa-map-marker-alt,
.fas.fa-info-circle,
.fas.fa-calendar-alt {
    color: white !important;
} */

.fas.fa-exclamation-triangle,
.fas.fa-exclamation-circle {
    color: var(--color-warning);
}

/* Contact and location text */
div:has(.fas.fa-envelope) span,
div:has(.fab.fa-whatsapp) span,
div:has(.fas.fa-map-marker-alt) span {
    color: var(--color-light) !important;
}

/* Estado/bairro in location */
td div[style*="color: #718096"] {
    color: var(--color-muted) !important;
}

/* ========================================================================
   17. RESPONSIVE DESIGN (Design Responsivo)
   ======================================================================== */

@media (max-width: 768px) {
    .page-header {
        padding: 1.5rem;
    }

    .page-header h2 {
        font-size: 1.5rem;
    }

    .table-modern {
        font-size: 0.85rem;
    }

    .search-bar {
        max-width: 100%;
        min-width: 100%;
        margin-bottom: 1rem;
    }

    .table-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-stats {
        width: 100%;
    }
}

/* ========================================================================
   18. DETAILS PAGE (Páginas de Detalhes)
   ======================================================================== */

.details-card {
    background: var(--color-secondary);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid var(--color-border);
}

.details-card-header {
    background: var(--color-hover);
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.details-card-header h5 {
    margin: 0;
    font-weight: 600;
    color: var(--color-light);
    font-size: 1.1rem;
}

.details-card-header i {
    color: var(--color-light);
    font-size: 1.2rem;
}

.details-card-body {
    padding: 1.5rem;
}

.detail-row {
    display: flex;
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border);
    align-items: start;
}

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

.detail-label {
    flex: 0 0 200px;
    font-weight: 600;
    color: var(--color-light);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-label i {
    color: var(--color-light);
    font-size: 0.875rem;
    width: 20px;
}

.detail-value {
    flex: 1;
    color: var(--color-light);
    font-size: 0.9rem;
    word-break: break-word;
}

.detail-value.empty {
    color: var(--color-muted);
    font-style: italic;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--color-secondary);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    margin-bottom: 1.5rem;
    border: 1px solid var(--color-border);
}

.user-profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--color-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 2rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 75, 107, 0.3);
}

.user-profile-info h3 {
    margin: 0 0 0.5rem 0;
    color: var(--color-highlight);
    font-weight: 700;
    font-size: 1.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.user-profile-info p {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--color-secondary);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    justify-content: flex-end;
    flex-wrap: wrap;
    border: 1px solid var(--color-border);
}

.btn-primary {
    background: var(--color-accent);
    border: none;
    color: var(--color-light);
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 75, 107, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 75, 107, 0.5);
    color: var(--color-light);
    background: #003A52;
}

.btn-warning {
    background: var(--color-status);
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(245, 166, 35, 0.4);
}

.btn-warning:hover {
    background: #E67E22;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 166, 35, 0.5);
}

.btn-details {
    background: var(--color-info);
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.4);
}

.btn-details:hover {
    background: #2980B9;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.5);
}

/* ========================================================================
   BADGES - Classes Bootstrap 4 (badge-*) usadas nos cards mobile
   Cores sólidas para funcionar em ambos os temas
   ======================================================================== */
.badge-primary {
    background-color: #0969DA !important;
    color: #fff !important;
}
.badge-secondary {
    background-color: #57606A !important;
    color: #fff !important;
}
.badge-success {
    background-color: #1A7F37 !important;
    color: #fff !important;
}
.badge-warning {
    background-color: #D4900A !important;
    color: #fff !important;
}
.badge-danger {
    background-color: #CF222E !important;
    color: #fff !important;
}
.badge-info {
    background-color: #0284C7 !important;
    color: #fff !important;
}
    background: rgba(231, 76, 60, 0.15);
    color: var(--color-error);
    border: 2px solid rgba(231, 76, 60, 0.3);
    border-left: 5px solid var(--color-error);
}

.alert-success {
    background: rgba(39, 174, 96, 0.15);
    color: var(--color-success);
    border: 2px solid rgba(39, 174, 96, 0.3);
    border-left: 5px solid var(--color-success);
}

.alert-info {
    background: rgba(52, 152, 219, 0.15);
    color: var(--color-info);
    border: 2px solid rgba(52, 152, 219, 0.3);
    border-left: 5px solid var(--color-info);
}

.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-item i {
    color: var(--color-light);
    width: 20px;
}

/* ========================================================================
   19. RESPONSIVE DESIGN - DETAILS PAGE
   ======================================================================== */

@media (max-width: 768px) {
    .detail-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .detail-label {
        flex: none;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-primary,
    .btn-warning {
        width: 100%;
        justify-content: center;
    }

    .user-profile {
        flex-direction: column;
        text-align: center;
    }
}

/* ========================================================================
   20. CONTENT CARDS (Cards de Conteúdo)
   ======================================================================== */

.content-card {
    background: var(--color-secondary);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid var(--color-border);
}

.content-card-header {
    background: var(--color-hover);
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.content-card-title {
    margin: 0;
    font-weight: 600;
    color: var(--color-light);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-card-title i {
    color: var(--color-accent);
}

.content-card-body {
    padding: 1.5rem;
}

/* ========================================================================
   21. PERFIL CARDS (Cards de Perfil)
   ======================================================================== */

.perfil-card {
    background: var(--color-hover);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--color-border);
    display: flex;
    gap: 1.5rem;
    align-items: center;
    transition: all 0.3s;
}

.perfil-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: var(--color-focus);
}

.perfil-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: var(--color-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 75, 107, 0.3);
}

.perfil-info {
    flex: 1;
    min-width: 0;
}

.perfil-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-highlight);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.perfil-description {
    color: var(--color-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.perfil-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.perfil-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-light);
    font-size: 0.85rem;
}

.perfil-stat i {
    color: var(--color-accent);
    font-size: 0.875rem;
}

.perfil-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ========================================================================
   22. BUTTON ICONS (Botões com Ícones)
   ======================================================================== */

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    font-size: 1rem;
    transition: all 0.2s;
    text-decoration: none;
    cursor: pointer;
}

.btn-icon.btn-info {
    background: var(--color-info);
    color: white;
}

.btn-icon.btn-info:hover {
    background: #2980B9;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.4);
}

.btn-icon.btn-edit {
    background: var(--color-status);
    color: white;
}

.btn-icon.btn-edit:hover {
    background: #E67E22;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(245, 166, 35, 0.4);
}

.btn-icon i {
    color: white;
}

/* ========================================================================
   23. EMPTY STATE ENHANCED (Estado Vazio Aprimorado)
   ======================================================================== */

.empty-state-icon {
    font-size: 4rem;
    color: var(--color-muted);
    margin-bottom: 1rem;
}

.empty-state-icon i {
    font-size: 4rem;
    color: var(--color-muted);
}

.empty-state-title {
    color: var(--color-light);
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: var(--color-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* ========================================================================
   24. RESPONSIVE DESIGN - PERFIL CARDS
   ======================================================================== */

@media (max-width: 768px) {
    .perfil-card {
        flex-direction: column;
        text-align: center;
    }

    .perfil-stats {
        justify-content: center;
    }

    .perfil-actions {
        width: 100%;
        justify-content: center;
    }

    .search-box {
        min-width: 100%;
    }
}

/* ========================================================================
   25. REQUIRED FIELD (Campos Obrigatórios)
   ======================================================================== */

.required-field::after {
    content: " *";
    color: var(--color-error);
    font-weight: 700;
}

/* ========================================================================
   26. PERMISSÕES CARD (Cards de Permissões)
   ======================================================================== */

.permissoes-card {
    background: var(--color-secondary);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid var(--color-border);
}

.permissoes-header {
    background: var(--color-hover);
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.permissoes-header h5 {
    margin: 0;
    font-weight: 600;
    color: var(--color-light);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.permissoes-header i {
    color: var(--color-accent);
}

.btn-select-all {
    background: var(--color-accent);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-select-all:hover {
    background: #003A52;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 75, 107, 0.4);
}

/* ========================================================================
   27. CATEGORIA SECTION (Seção de Categorias)
   ======================================================================== */

.categoria-section {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: var(--color-hover);
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

.categoria-section:last-child {
    margin-bottom: 0;
}

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

.categoria-header h5 {
    margin: 0;
    font-weight: 700;
    color: var(--color-light);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.categoria-header h5 i {
    color: var(--color-accent);
    font-size: 1.5rem;
}

.select-all-categoria {
    color: var(--color-accent);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(0, 75, 107, 0.1);
    border: 1px solid rgba(0, 75, 107, 0.2);
}

.select-all-categoria:hover {
    background: rgba(0, 75, 107, 0.2);
    color: #006B94;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 75, 107, 0.15);
}

/* ========================================================================
   28. MÓDULO GROUP (Grupo de Módulos)
   ======================================================================== */

.modulo-group {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1.5rem;
}

.modulo-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.modulo-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--color-hover);
    border-radius: 8px;
    border-left: 4px solid var(--color-accent);
}

.modulo-header i {
    color: var(--color-accent);
    font-size: 1.25rem;
}

.modulo-header h6 {
    margin: 0;
    font-weight: 600;
    color: var(--color-light);
    font-size: 1rem;
    flex: 1;
}

.select-all-modulo {
    color: var(--color-accent);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    background: rgba(0, 75, 107, 0.1);
}

.select-all-modulo:hover {
    background: rgba(0, 75, 107, 0.2);
    color: #006B94;
}

/* ========================================================================
   29. PERMISSÕES GRID (Grid de Permissões)
   ======================================================================== */

.permissoes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 0.5rem;
}

.permissao-item {
    background: var(--color-hover);
    border: 2px solid var(--color-border);
    border-radius: 8px;
    transition: all 0.2s;
}

.permissao-item:hover {
    border-color: var(--color-accent);
    background: var(--color-focus);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 75, 107, 0.2);
}

.permissao-checkbox {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    padding: 1rem;
}

.permissao-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 0.1rem;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--color-accent);
}

.permissao-info {
    flex: 1;
    cursor: pointer;
    margin: 0;
}

.permissao-nome {
    font-weight: 600;
    color: var(--color-light);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.permissao-descricao {
    color: var(--color-muted);
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.4;
}

/* ========================================================================
   29. INFO CARD (Cards de Informação)
   ======================================================================== */

.info-card {
    background: var(--color-secondary);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    border: 1px solid var(--color-border);
    position: sticky;
    top: 1rem;
}

.info-card-header {
    background: linear-gradient(135deg, var(--color-accent) 0%, #003A52 100%);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card-header i {
    color: white;
    font-size: 1.1rem;
}

.info-card-header h6 {
    margin: 0;
    font-weight: 600;
    color: white;
    font-size: 1rem;
}

.info-card-body {
    padding: 1.5rem;
}

.info-item {
    margin-bottom: 1.5rem;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item h6 {
    color: var(--color-light);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-item h6 i {
    color: var(--color-accent);
    font-size: 0.875rem;
}

.info-item p {
    color: var(--color-muted);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

/* ========================================================================
   30. FORM ENHANCEMENTS (Melhorias de Formulário)
   ======================================================================== */

.form-check-input {
    background-color: var(--color-hover);
    border: 2px solid var(--color-border);
    width: 3rem;
    height: 1.5rem;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 75, 107, 0.2);
    border-color: var(--color-accent);
}

.form-check-label {
    color: var(--color-light);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-label i {
    color: var(--color-accent);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* ========================================================================
   31. ALERT IMPROVEMENTS (Melhorias de Alertas)
   ======================================================================== */

.alert-danger {
    background: rgba(231, 76, 60, 0.15);
    color: var(--color-error);
    border: 2px solid rgba(231, 76, 60, 0.3);
    border-left: 5px solid var(--color-error);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-danger i {
    font-size: 1.25rem;
    flex-shrink: 0;
    color: var(--color-error);
}

/* ========================================================================
   32. RESPONSIVE DESIGN - PERMISSÕES
   ======================================================================== */

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

    .modulo-header {
        flex-wrap: wrap;
    }

    .select-all-modulo {
        width: 100%;
        justify-content: center;
    }

    .info-card {
        position: relative;
        margin-top: 1.5rem;
    }
}

/* ========================================================================
   33. PERFIL PROFILE (Perfil do Usuário)
   ======================================================================== */

.perfil-profile {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-hover) 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    border: 1px solid var(--color-border);
}

.perfil-profile-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent) 0%, #003A52 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 2.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 75, 107, 0.5);
}

.perfil-profile-info {
    flex: 1;
}

.perfil-profile-info h3 {
    margin: 0 0 0.5rem 0;
    color: var(--color-highlight);
    font-weight: 700;
    font-size: 1.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.perfil-profile-info p {
    margin: 0;
    color: var(--color-muted);
    font-size: 1rem;
    line-height: 1.5;
}

/* ========================================================================
   34. LIST GROUP (Grupos de Lista)
   ======================================================================== */

.list-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.list-group-item {
    background: var(--color-hover);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
}

.list-group-item:hover {
    background: var(--color-focus);
    border-color: var(--color-accent);
    transform: translateX(5px);
}

.list-group-item i {
    color: var(--color-success);
    font-size: 1rem;
    flex-shrink: 0;
}

.list-group-item > span:first-of-type {
    flex: 1;
    color: var(--color-light);
    font-weight: 500;
}

.module-badge {
    background: rgba(0, 75, 107, 0.2);
    color: var(--color-accent);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(0, 75, 107, 0.3);
}

/* ========================================================================
   35. STATS ROW (Linha de Estatísticas)
   ======================================================================== */

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.stat-box {
    background: var(--color-hover);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.2s;
}

.stat-box:hover {
    background: var(--color-focus);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.stat-box-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.stat-box-label {
    color: var(--color-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================================================
   36. USER ITEM (Item de Usuário)
   ======================================================================== */

.user-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-hover);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
}

.user-item:last-child {
    margin-bottom: 0;
}

.user-item:hover {
    background: var(--color-focus);
    border-color: var(--color-accent);
    transform: translateX(5px);
}

.user-item-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--color-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 75, 107, 0.3);
}

.user-item-info {
    flex: 1;
    min-width: 0;
}

.user-item-name {
    font-weight: 600;
    color: var(--color-light);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.user-item-email {
    color: var(--color-muted);
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========================================================================
   37. RESPONSIVE DESIGN - PERFIL DETAILS
   ======================================================================== */

@media (max-width: 768px) {
    .perfil-profile {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .perfil-profile-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }

    .perfil-profile-info h3 {
        font-size: 1.5rem;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .list-group-item {
        flex-wrap: wrap;
    }

    .module-badge {
        margin-left: auto;
    }
}
