/* ================================================================ */
/* CONFIGURAÇÕES - ESTILOS PADRONIZADOS */
/* ================================================================ */

/* ================================================================ */
/* ABAS DE CONFIGURAÇÃO */
/* ================================================================ */
.config-tabs {
    display: flex;
    border-bottom: 2px solid var(--gray-300);
    margin-bottom: 0;
    gap: 8px;
    background: var(--gray-100);
    padding: 8px 8px 0 8px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.config-tab-btn {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--gray-500);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.config-tab-btn:hover:not(.active) {
    background: rgba(0, 123, 255, 0.1);
    color: var(--primary-color);
}

.config-tab-btn.active {
    background: #fff;
    color: var(--primary-color);
    font-weight: 600;
    border-bottom-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.config-tab-btn i {
    font-size: 16px;
}

.config-tab-content {
    background: #fff;
    padding: 16px;
}

.config-tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.config-tab-pane.active {
    display: block;
}

/* ================================================================ */
/* CARDS DE CONFIGURAÇÃO */
/* ================================================================ */
.config-card {
    background: transparent;
    padding: 0;
    margin-bottom: 16px;
}

.config-card h3 {
    margin: 0 0 16px 0;
    color: var(--config-dark);
    font-weight: 600;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.config-card h3 i {
    color: var(--primary-color);
    font-size: 20px;
}

.config-card h4 {
    margin: 16px 0 12px 0;
    color: var(--config-dark);
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.config-card h4 i {
    color: var(--gray-500);
    font-size: 16px;
}

.config-card p {
    color: var(--gray-500);
    margin-bottom: 16px;
    line-height: 1.6;
    font-size: 14px;
}

.config-card.info-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid var(--info);
    padding: 16px;
}

.config-card ul {
    margin: 12px 0;
    padding-left: 24px;
    color: var(--gray-500);
}

.config-card ul li {
    margin-bottom: 8px;
    line-height: 1.5;
}

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

.input-group {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.input-group input[type="text"],
.input-group input[type="number"],
.input-group input[type="email"],
.input-group input[type="password"] {
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--config-dark);
    cursor: pointer;
}

/* Checkboxes - estilos em layoutGeral.css (SISTEMA UNIFICADO) */

/* ================================================================ */
/* CONTROLES DE GERENCIAMENTO */
/* ================================================================ */
.user-management-controls {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
}

.search-container {
    display: flex;
    gap: 8px;
}

.search-container input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.filter-container {
    display: flex;
}

/* ================================================================ */
/* TABELAS */
/* ================================================================ */
.table-responsive {
    overflow-x: auto;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    margin-bottom: 16px;
}

.tabela-usuarios {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.tabela-usuarios thead {
    background: #667eea;
}

.tabela-usuarios th {
    padding: 6px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 10px;
    color: #fff;
    border-bottom: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.tabela-usuarios th:last-child {
    border-right: none;
}

.tabela-usuarios tbody tr {
    border-bottom: 1px solid var(--gray-300);
    transition: background-color 0.2s ease;
}

.tabela-usuarios tbody tr:hover {
    background: var(--gray-100);
}

.tabela-usuarios td {
    padding: 4px 8px;
    font-size: 10px;
    color: #495057;
    border-right: 1px solid #e9ecef;
}

.tabela-usuarios td:last-child {
    border-right: none;
}

/* ================================================================ */
/* BADGES E ETIQUETAS */
/* ================================================================ */
.tipo-badge,
.status-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.tipo-badge.tipo-master {
    color: #f5576c;
}

.tipo-badge.tipo-admin {
    color: #667eea;
}

.tipo-badge.tipo-padrao {
    color: var(--gray-500);
}

.status-badge.status-ativo {
    color: #155724;
}

.status-badge.status-inativo {
    color: #856404;
}

.status-badge.status-bloqueado {
    color: #721c24;
}

/* ================================================================ */
/* PAGINAÇÃO */
/* ================================================================ */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding: 12px;
    background: var(--gray-100);
    border-radius: 6px;
}

#pagination-info {
    font-size: 14px;
    color: var(--gray-500);
    font-weight: 500;
}

/* ================================================================ */
/* CATEGORIAS */
/* ================================================================ */
.form-add-categoria {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.form-add-categoria input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-add-categoria input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.lista-categorias-container {
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    overflow: hidden;
}

.tabela-categorias {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.tabela-categorias thead {
    background: #667eea;
}

.tabela-categorias th {
    padding: 6px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 10px;
    color: #fff;
    border-bottom: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid rgba(255,255,255,0.2);
    white-space: nowrap;
}

.tabela-categorias th:last-child {
    border-right: none;
}

/* col 1: ID */
.tabela-categorias th:nth-child(1),
.tabela-categorias td:nth-child(1) {
    width: 60px;
    text-align: center;
}

/* col 2: Nome — ocupa o espaço restante */
.tabela-categorias th:nth-child(2),
.tabela-categorias td:nth-child(2) {
    width: auto;
}

/* col 3: Data de Criação */
.tabela-categorias th:nth-child(3),
.tabela-categorias td:nth-child(3) {
    width: 120px;
    text-align: center;
}

/* col 4: Última Edição */
.tabela-categorias th:nth-child(4),
.tabela-categorias td:nth-child(4) {
    width: 120px;
    text-align: center;
}

/* col 5: Favorito (★) */
.tabela-categorias th:nth-child(5),
.tabela-categorias td:nth-child(5) {
    width: 55px;
    text-align: center;
}

/* col 6: Status */
.tabela-categorias th:nth-child(6),
.tabela-categorias td:nth-child(6) {
    width: 70px;
    text-align: center;
}

/* col 7: Ações */
.tabela-categorias th:nth-child(7),
.tabela-categorias td:nth-child(7) {
    width: 110px;
    text-align: center;
}

.badge-categoria-ativo {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

.badge-categoria-inativo {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(148, 163, 184, 0.1);
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

.categoria-inativa td {
    opacity: 0.5;
}

.categoria-inativa td.categoria-acoes {
    opacity: 1;
}

.tabela-categorias tbody tr {
    border-bottom: 1px solid var(--gray-300);
    transition: background-color 0.2s ease;
}

.tabela-categorias tbody tr:hover {
    background: var(--gray-100);
}

.tabela-categorias tbody tr:last-child {
    border-bottom: none;
}

.tabela-categorias td {
    padding: 4px 8px;
    font-size: 10px;
    color: #495057;
    vertical-align: middle;
    border-right: 1px solid #e9ecef;
}

.tabela-categorias td:last-child {
    border-right: none;
}

.categoria-nome {
    font-weight: 500;
}

.categoria-data-criacao,
.categoria-data-edicao {
    font-size: 13px;
    color: var(--gray-500);
}



/* ================================================================ */
/* CARTÕES */
/* ================================================================ */
.cartoes-fixos-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.form-add-cartao {
    background: #fff;
    padding: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-add-cartao:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.form-add-cartao h4 {
    margin: 0 0 16px 0;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-100);
}

.form-add-cartao .input-group {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 12px;
    align-items: center;
}

.form-add-cartao input[type="text"],
.form-add-cartao input[type="number"] {
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-add-cartao input[type="text"]:focus,
.form-add-cartao input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-add-cartao label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--config-dark);
    cursor: pointer;
    white-space: nowrap;
}

/* Checkbox form-add-cartao - usa estilos de layoutGeral.css */

#btn-salvar-cartoes {
    width: 100%;
    padding: 14px;
    background: var(--success);
    color: #fff;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--shadow-sm);
}

#btn-salvar-cartoes:hover {
    background: var(--config-success-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

#btn-salvar-cartoes i {
    font-size: 18px;
}

/* ================================================================ */
/* INFORMAÇÕES E ALERTAS */
/* ================================================================ */
.info-list {
    margin: 16px 0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-300);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--config-dark);
    font-size: 14px;
}

.info-value {
    color: var(--gray-500);
    font-size: 14px;
}

.texto-alerta {
    color: var(--danger);
    font-weight: 500;
    font-size: 13px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.texto-sem-permissao {
    color: var(--gray-500);
    font-size: 13px;
    font-style: italic;
}

/* ================================================================ */
/* MENSAGENS VAZIAS */
/* ================================================================ */
.notification-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
}

.notification-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.notification-empty p {
    font-size: 16px;
    margin: 0;
}

/* ================================================================ */
/* UTILITÁRIOS */
/* ================================================================ */
.hidden {
    display: none !important;
}

.status-feedback {
    margin-top: 16px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-feedback.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
}

.status-feedback.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
}

.status-feedback.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
}

/* ================================================================ */
/* SCROLLBAR PERSONALIZADO */
/* ================================================================ */
/* Firefox */
.config-tab-content {
    scrollbar-width: thin;
    scrollbar-color: var(--gray-500) var(--gray-100);
}

/* ================================================================ */
/* RESPONSIVIDADE */
/* ================================================================ */
@media (max-width: 1024px) {
    .user-management-controls {
        grid-template-columns: 1fr;
    }

    .input-group,
    .form-add-cartao .input-group {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .config-tabs {
        flex-wrap: wrap;
    }

    .config-tab-btn {
        font-size: 13px;
        padding: 10px 16px;
    }

    .config-card {
        padding: 16px;
    }

    .config-tab-content {
        padding: 12px;
    }


    .table-responsive {
        font-size: 12px;
    }

    .tabela-usuarios th,
    .tabela-usuarios td,
    .tabela-categorias th,
    .tabela-categorias td {
        padding: 8px 12px;
        font-size: 12px;
    }

    .pagination-controls {
        flex-direction: column;
        gap: 12px;
    }

    .form-add-cartao {
        padding: 16px;
    }

    .form-add-cartao h4 {
        font-size: 14px;
    }
}

/* ================================================================ */
/* RESERVAS INLINE - DESIGN CLEAN */
/* ================================================================ */

.tab-actions-with-reservas {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    gap: 20px;
}

.reservas-inline {
    display: flex;
    align-items: center;
    gap: 16px;
}

.reservas-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--config-dark);
}

.reservas-info i {
    color: #667eea;
    font-size: 16px;
}

.reservas-label {
    font-weight: 500;
    color: var(--gray-500);
    font-size: 13px;
}

.reservas-valor {
    font-weight: 700;
    color: #667eea;
    font-size: 15px;
}

.reservas-valor.positivo {
    color: #28a745;
}

.reservas-valor.negativo {
    color: #dc3545;
}

.reservas-separator {
    color: var(--gray-300);
    margin: 0 4px;
}



/* ================================================================ */
/* RESPONSIVO - RESERVAS INLINE */
/* ================================================================ */

@media (max-width: 768px) {
    .tab-actions-with-reservas {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .reservas-inline {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .reservas-info {
        flex-wrap: wrap;
        justify-content: center;
    }

}

/* ================================================================ */
/* CSS DE REGISTROS MOVIDO PARA layoutGeral.css */
/* ================================================================ */

/* ================================================================ */
/* LOGS DO SISTEMA - ESTILOS */
/* ================================================================ */

/* Filtros de Logs - usa grid padrão de rel.css */
.filtros-linha-logs {
    grid-template-columns: repeat(5, 1fr) auto;
    margin-bottom: 12px;
}

/* Tabela de Logs */
.lista-logs-container {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    max-height: 500px;
    overflow-y: auto;
}

.tabela-logs {
    width: 100%;
    border-collapse: collapse;
}

.tabela-logs thead {
    background: #667eea !important;
    position: sticky;
    top: 0;
    z-index: 10;
}

.tabela-logs thead tr {
    background: #667eea !important;
}

.tabela-logs thead th {
    padding: 6px 8px;
    text-align: left;
    font-size: 10px;
    font-weight: 600;
    color: #fff !important;
    background: #667eea !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.tabela-logs thead th:last-child {
    border-right: none;
}

.tabela-logs tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background 0.2s ease;
}

.tabela-logs tbody tr:hover {
    background: #f8f9fa;
}

.tabela-logs tbody td {
    padding: 4px 8px;
    font-size: 10px;
    color: #495057;
    border-right: 1px solid #e9ecef;
}

.tabela-logs tbody td:last-child {
    border-right: none;
}

/* Badges de Módulo e Ação - Texto simples sem fundo */
.badge-modulo,
.badge-acao {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-modulo {
    color: #1565c0;
}

.acao-criado {
    color: #155724;
}

.acao-editado {
    color: #856404;
}

.acao-excluído {
    color: #721c24;
}

/* Linhas coloridas por tipo de ação */
.log-criado {
    border-left: 3px solid #28a745;
}

.log-editado {
    border-left: 3px solid #ffc107;
}

.log-excluido {
    border-left: 3px solid #dc3545;
}

/* Estado vazio */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 64px;
    color: var(--gray-300);
    margin-bottom: 20px;
}

.empty-state p {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 10px;
}

.empty-state small {
    font-size: 14px;
    color: var(--gray-500);
}


/* Responsividade */
@media (max-width: 768px) {
    .filtros-linha-logs {
        grid-template-columns: 1fr;
    }

    .lista-logs-container {
        overflow-x: auto;
    }

    .tabela-logs {
        min-width: 800px;
    }
}

/* ================================================================ */
/* LOADER GLOBAL - IMPORTAÇÃO DE DADOS */
/* ================================================================ */
#global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#global-loader.show {
    display: flex;
}

.loader-content {
    background: white;
    border-radius: 12px;
    padding: 40px 60px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    min-width: 300px;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loader-text {
    font-size: 16px;
    color: var(--config-dark);
    font-weight: 600;
    margin: 10px 0 5px;
}

.loader-subtext {
    font-size: 13px;
    color: var(--gray-500);
}

.loader-progress {
    margin-top: 15px;
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 700;
}

/* ================================================================ */
/* FORMULÁRIO DE REDEFINIR SENHA */
/* ================================================================ */
.form-redefinir-senha {
    max-width: 500px;
}

.form-redefinir-senha .form-group {
    margin-bottom: 20px;
}

.form-redefinir-senha label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--config-dark);
    font-size: 14px;
}

.form-redefinir-senha .form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-redefinir-senha .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-redefinir-senha .btn {
    margin-top: 10px;
}

/* Estilos do modal-alterar-senha movidos para modais.css */

/* ================================================================ */
/* CARTÕES DE CRÉDITO - SISTEMA DINÂMICO */
/* ================================================================ */
.form-add-cartao {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.form-add-cartao input {
    flex: 1;
    min-width: 150px;
    padding: 12px 16px;
    border: 2px solid var(--gray-300);
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-add-cartao input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.lista-cartoes-container {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 20px;
}

.tabela-cartoes {
    width: 100%;
    border-collapse: collapse;
}

.tabela-cartoes th {
    background: #667eea;
    color: #fff;
    padding: 6px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.tabela-cartoes th:last-child {
    border-right: none;
}

/* col 1: ID */
.tabela-cartoes th:nth-child(1),
.tabela-cartoes td:nth-child(1) { width: 55px; text-align: center; }

/* col 2: Banco — ocupa o espaço restante */
.tabela-cartoes th:nth-child(2),
.tabela-cartoes td:nth-child(2) { width: auto; }

/* col 3: Validade */
.tabela-cartoes th:nth-child(3),
.tabela-cartoes td:nth-child(3) { width: 80px; text-align: center; }

/* col 4: Fechamento */
.tabela-cartoes th:nth-child(4),
.tabela-cartoes td:nth-child(4) { width: 95px; text-align: center; }

/* col 5: Vencimento */
.tabela-cartoes th:nth-child(5),
.tabela-cartoes td:nth-child(5) { width: 95px; text-align: center; }

/* col 6: Limite */
.tabela-cartoes th:nth-child(6),
.tabela-cartoes td:nth-child(6) { width: 100px; text-align: right; }

/* col 7: Status */
.tabela-cartoes th:nth-child(7),
.tabela-cartoes td:nth-child(7) { width: 75px; text-align: center; }

/* col 8: Ações (crown + editar + excluir) */
.tabela-cartoes th:nth-child(8),
.tabela-cartoes td:nth-child(8) { width: 110px; text-align: center; }

.tabela-cartoes tbody tr {
    border-bottom: 1px solid #e9ecef;
}

.tabela-cartoes tbody tr:hover {
    background: #f8f9fa;
}

.tabela-cartoes td {
    padding: 4px 8px;
    font-size: 10px;
    color: #495057;
    vertical-align: middle;
    border-right: 1px solid #e9ecef;
}

.tabela-cartoes td:last-child {
    border-right: none;
}

.tabela-cartoes .cartao-id {
    font-size: 10px;
    color: #495057;
    font-weight: 500;
}

.tabela-cartoes .cartao-banco {
    font-weight: 500;
}

.tabela-cartoes .cartao-bandeira-icon {
    margin-left: 6px;
    vertical-align: middle;
}

.tabela-cartoes .cartao-digitos {
    display: inline-block;
    margin-left: 6px;
    font-size: 11px;
    color: #6c757d;
    font-family: monospace;
    letter-spacing: 1px;
}

.tabela-cartoes .cartao-validade {
    font-size: 10px;
}

.tabela-cartoes .cartao-limite {
    font-weight: 600;
    color: #28a745;
}

.tabela-cartoes .badge-status {
    display: inline-block;
    padding: 2px 6px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tabela-cartoes .badge-status.ativo {
    background: #d4edda;
    color: #155724;
}

.tabela-cartoes .badge-status.inativo {
    background: #e9ecef;
    color: #6c757d;
}

.btn-pagar-plano-cartao {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    color: #fff !important;
    border: none !important;
    font-size: 12px !important;
}

.btn-pagar-plano-cartao:hover {
    opacity: 0.85;
}

.form-add-cartao select {
    flex: 1;
    min-width: 130px;
    padding: 12px 16px;
    border: 2px solid var(--gray-300);
    font-size: 14px;
    border-radius: 0;
    background: #fff;
    transition: all 0.3s ease;
}

.form-add-cartao select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* ================================================================ */
/* MODAL EDITAR CARTÃO - ESTILIZAÇÃO MELHORADA */
/* ================================================================ */

.cartao-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.cartao-form-grid .form-group {
    margin-bottom: 0;
}

.cartao-form-grid .form-group-full {
    grid-column: 1 / -1;
}

.cartao-form-grid .form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 14px;
}

.cartao-form-grid .form-group label i {
    margin-right: 6px;
    color: #5680e9;
    width: 16px;
    text-align: center;
}

.cartao-form-grid .form-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.cartao-form-grid .form-input:focus {
    outline: none;
    border-color: #5680e9;
    box-shadow: 0 0 0 3px rgba(86, 128, 233, 0.1);
}

.cartao-form-grid .form-input::placeholder {
    color: #a0aec0;
    font-size: 14px;
}

/* Removido: container desnecessário - checkbox já é inline */

.checkbox-label-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    color: #2d3748;
    font-size: 15px;
}

.checkbox-label-inline input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #48bb78;
}

.checkbox-label-inline span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.checkbox-label-inline i {
    color: #48bb78;
}

/* Responsividade */
@media (max-width: 640px) {
    .cartao-form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ================================================================
   CATEGORIA FAVORITO — BADGES NA TABELA DE CATEGORIAS
   ================================================================ */

.th-favorito {
    width: 36px;
    min-width: 36px;
    text-align: center;
    font-size: 14px;
    color: #f59e0b;
}

.categoria-favorito {
    width: 36px;
    min-width: 36px;
    text-align: center;
    white-space: nowrap;
}

.badge-favorito-pix,
.badge-favorito-debito,
.badge-favorito-dinheiro,
.badge-favorito-credito {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
}

.badge-favorito-pix {
    background: #d1fae5;
    color: #065f46;
}

.badge-favorito-debito {
    background: #dbeafe;
    color: #1e40af;
}

.badge-favorito-dinheiro {
    background: #fef3c7;
    color: #92400e;
}

.badge-favorito-credito {
    background: #ede9fe;
    color: #5b21b6;
}

/* Campo de validade no form de cartão */
#novo-cartao-validade {
    flex: 1;
    min-width: 130px;
}
