/**
 * Estilos compartidos para Sistema SSOMA
 * Aplicable a todos los módulos
 */

/* ========== TAMAÑO DE FUENTE GLOBAL ========== */
body, .table, .modal-body, .modal-footer, .modal-header,
.input-group-text, .form-control, .btn, .table th, .table td,
.form-label, .form-select {
    font-size: 12px;
    font-family: Arial, sans-serif;
}

/* ========== NAVBAR PRINCIPAL ========== */
.navbar-brand {
    font-weight: bold;
    font-size: 18px;
}

.nav-link {
    font-size: 14px;
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* ========== TÍTULOS ========== */
h1, h2, h3, h4, h5, h6 {
    font-family: Arial, sans-serif;
    color: #343a40;
}

h2 {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* ========== TABLAS ========== */
.table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.table thead {
    background: #343a40;
    color: #ffffff;
}

.table th {
    padding: 10px;
    text-align: center;
    font-weight: bold;
}

.table thead th:first-child {
    border-top-left-radius: 8px;
}

.table thead th:last-child {
    border-top-right-radius: 8px;
}

.table td {
    padding: 10px;
    border-bottom: 1px solid #dee2e6;
    text-align: center;
}

.table tbody tr:nth-child(odd) {
    background: #f8f9fa;
}

.table tbody tr:hover {
    background: rgba(0, 123, 255, 0.1);
    transition: background 0.3s;
}

/* ========== BOTONES ========== */
.btn {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 5px;
    transition: 0.3s;
}

.btn-sm {
    font-size: 11px;
    padding: 4px 8px;
}

.btn-warning {
    background: #ffc107;
    color: #000;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success:hover {
    background: #218838;
}

.btn-primary:hover {
    background: #0056b3;
}

/* ========== TARJETAS/CARDS ========== */
.card {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-header {
    font-weight: bold;
    font-size: 14px;
}

/* ========== MODALES ========== */
.modal-title {
    font-size: 16px;
    font-weight: bold;
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* ========== FORMULARIOS ========== */
.form-label {
    font-weight: 600;
    margin-bottom: 4px;
}

.form-control:focus,
.form-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.input-group-text {
    background-color: #007bff;
    color: white;
    font-weight: bold;
}

.bg-success .input-group-text {
    background-color: #28a745;
}

.bg-warning .input-group-text {
    background-color: #ffc107;
    color: #000;
}

/* ========== BADGES ========== */
.badge {
    font-size: 11px;
    padding: 4px 8px;
}

/* ========== DATATABLES CUSTOM ========== */
.dataTables_wrapper .dataTables_filter input {
    border-radius: 4px;
    padding: 4px 8px;
}

.dataTables_wrapper .dataTables_length select {
    border-radius: 4px;
    padding: 4px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    body {
        font-size: 11px;
    }

    h2 {
        font-size: 16px;
    }

    .table th, .table td {
        padding: 8px;
        font-size: 11px;
    }

    .btn {
        font-size: 11px;
    }

    .navbar-brand {
        font-size: 16px;
    }
}

/* ========== UTILIDADES ========== */
.text-small {
    font-size: 11px;
}

.fw-bold {
    font-weight: bold;
}

.cursor-pointer {
    cursor: pointer;
}

/* ========== ANIMACIONES ========== */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========== IMPRESIÓN ========== */
@media print {
    .navbar, .btn, .modal, .no-print {
        display: none !important;
    }

    .table {
        font-size: 10px;
    }

    body {
        background: white;
    }
}
