/* ==========================================================
   ESTILOS GLOBAIS - PAINEL SAAS WEB RELÓGIO DE PONTO
   (Aplicável a todas as views: Auditoria, Anomalias, etc.)
========================================================== */

/* --- 1. BASE E TIPOGRAFIA --- */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin-bottom: 60px;
    background-color: #f8f9fa; /* Fundo subtil recomendado para destacar os cards brancos */
}

/* Foco global limpo para acessibilidade e inputs */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus, .form-select:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
    border-color: #86b7fe;
    outline: none;
}

/* --- 2. ESTRUTURA DE TABELAS DESKTOP (.app-table) --- */
.app-table {
    table-layout: fixed;
    width: 100%;
}

    .app-table th {
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #6c757d;
        padding-top: 1.2rem;
        padding-bottom: 1.2rem;
        border-bottom: 2px solid #e9ecef;
    }

    .app-table td {
        font-size: 0.875rem;
        vertical-align: top; /* Melhor para alinhar blocos de JSON em cima */
        padding: 1rem;
        border-bottom: 1px solid #f1f3f5;
    }

    .app-table tbody tr {
        transition: background-color 0.15s ease;
    }

        .app-table tbody tr:hover {
            background-color: #f8faff !important; /* Azul muito claro ao passar o rato */
        }

/* --- 3. ESTRUTURA DE CARDS PARA MOBILE (.app-list-card) --- */
.app-list-card {
    border: 1px solid #e9ecef;
    border-radius: 16px; /* Ajustado para um visual mais moderno (equivalente a rounded-4) */
    padding: 1rem;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .app-list-card:hover {
        box-shadow: 0 8px 24px rgba(0,0,0,.05) !important;
        transform: translateY(-2px);
    }

    .app-list-card + .app-list-card {
        margin-top: 0.75rem;
    }

    .app-list-card .card-header-row {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 0.6rem;
    }

    .app-list-card .card-title-text {
        font-weight: 600;
        font-size: 0.95rem;
        color: #212529;
        line-height: 1.2;
    }

    .app-list-card .card-meta-row {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
        align-items: center;
        margin-bottom: 0.75rem;
    }

/* --- 4. SCROLLBARS PERSONALIZADAS (.custom-scrollbar) --- */
/* Ideal para blocos de código (pre, code) ou tabelas com scroll horizontal */
.custom-scrollbar {
    overflow-y: auto;
    overflow-x: auto;
}

    .custom-scrollbar::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }

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

    .custom-scrollbar::-webkit-scrollbar-thumb {
        background: #ced4da;
        border-radius: 10px;
    }

        .custom-scrollbar::-webkit-scrollbar-thumb:hover {
            background: #adb5bd;
        }

/* --- 5. COMPONENTES VISUAIS (Estados Vazios, Avatares, Ícones) --- */
.app-empty-state {
    padding: 3.5rem 1rem;
    text-align: center;
}

    .app-empty-state i {
        font-size: 2.5rem;
        color: #ced4da;
        margin-bottom: 1rem;
        display: block;
    }

.avatar-circle, .icon-square {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* --- 6. COMPONENTES DE BADGES E PÍLULAS --- */
.badge-subtle {
    border-radius: 20px;
    padding: 0.25rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
}

.pill-info {
    font-size: 0.78rem;
    font-weight: 500;
    background: #f8f9fa;
    color: #495057;
    border-radius: 20px;
    padding: 0.2rem 0.65rem;
    border: 1px solid #e9ecef;
}

/* Cores Subtis Globais (Compatibilidade com Bootstrap) */
.bg-primary-subtle {
    background-color: #cfe2ff !important;
}

.bg-success-subtle {
    background-color: #d1e7dd !important;
}

.bg-danger-subtle {
    background-color: #f8d7da !important;
}

.bg-warning-subtle {
    background-color: #fff3cd !important;
}

.bg-info-subtle {
    background-color: #cff4fc !important;
}

.bg-secondary-subtle {
    background-color: #e2e3e5 !important;
}

/* Badges */
.badge-system {
    background: #fff3cd;
    color: #92600a;
    border: 1px solid #f0c040;
}

.badge-absence {
    background: #fde8e8;
    color: #a12a2a;
    border: 1px solid #f5b0b0;
}

.badge-justified {
    background: #e8f0fe;
    color: #2a5aa1;
    border: 1px solid #b0c8f5;
}

.badge-extra {
    background: #e8f8ee;
    color: #1a6e3c;
    border: 1px solid #90dbb0;
}
