/* Estilos generales para Sofitac */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    min-height: 100vh;
}

/* Mejoras para las tarjetas */
.card {
    overflow: hidden;
    transition: box-shadow .3s ease, transform .3s ease;
    border: none;
}

.card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.25rem;
}

.card-footer {
    background-color: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.25rem;
}

/* Avatar y badges */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-weight: 600;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
}

/* Colores para los avatars */
.bg-primary-subtle {
    background-color: rgba(13, 110, 253, 0.1);
}

.bg-success-subtle {
    background-color: rgba(25, 135, 84, 0.1);
}

.bg-warning-subtle {
    background-color: rgba(255, 193, 7, 0.1);
}

.bg-danger-subtle {
    background-color: rgba(220, 53, 69, 0.1);
}

.bg-info-subtle {
    background-color: rgba(13, 202, 240, 0.1);
}

/* Mejoras para las tablas */
.table {
    vertical-align: middle;
}

.table th {
    font-weight: 600;
    border-top: 0;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Botones y acciones */
.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

/* Estilos para las estadísticas */
.stat-card {
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border-radius: 50%;
    margin-bottom: 15px;
}

/* Utilidades */
.opacity-75 {
    opacity: 0.75;
}

.opacity-50 {
    opacity: 0.5;
}

.border-dashed {
    border-style: dashed !important;
}

.rotate-45 {
    transform: rotate(45deg);
}

.rotate-90 {
    transform: rotate(90deg);
}

.cursor-pointer {
    cursor: pointer;
}

/* Estilos para gráficos y visualizaciones */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
}

.chart-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 8px;
}

/* Personalización de tablas de datos */
.table-dataview th {
    white-space: nowrap;
    background-color: var(--light-color);
}

.table-dataview .table-action-col {
    width: 1%;
    white-space: nowrap;
}

.table-inner-border td, .table-inner-border th {
    border-left: 1px solid #dee2e6;
}

.table-inner-border td:first-child, .table-inner-border th:first-child {
    border-left: none;
}

/* Mejoras para formularios */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary-color);
}

.form-search {
    position: relative;
}

.form-search .form-control {
    padding-left: 38px;
}

.form-search-icon {
    position: absolute;
    left: 12px;
    top: 10px;
    color: var(--secondary-color);
    opacity: 0.7;
}

/* Animaciones y transiciones */
.fadeIn {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilos para notificaciones y alertas */
.notification-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    font-size: 10px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--danger-color);
    color: white;
    font-weight: bold;
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.notification-unread {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Estilos para impresión */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-full-width {
        width: 100% !important;
    }
    
    body {
        background-color: white !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .table-print-friendly th, .table-print-friendly td {
        padding: 5px 8px !important;
    }
}

/* Estilos responsivos adicionales */
@media (max-width: 992px) {
    .card-deck-responsive {
        display: block;
    }
    
    .card-deck-responsive .card {
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .btn-responsive {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .table-responsive-sm {
        font-size: 0.875rem;
    }
    
    .avatar-responsive {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.8rem !important;
    }
}