/* static/css/styles.css */

/* Estilos globales */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background-color: #f5f5f5;
}

/* Navbar superior */
.navbar-brand img {
    height: 30px;
    width: auto;
    display: block;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    background-color: #343a40;
    color: #fff;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border-left: 3px solid #0dcaf0;
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
    border-left: 3px solid #0dcaf0;
}

.sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.sidebar-heading {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.6);
    padding: 1rem 1.5rem 0.5rem;
}

/* Estilos para el menú dinámico de módulos */
.sidebar-divider {
    margin: 0.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Estilos para submenús en el sidebar */
.sidebar .collapse .nav-link {
    padding-left: 3rem;
    font-size: 0.9rem;
}

.sidebar .collapse .nav-link:hover,
.sidebar .collapse .nav-link.active {
    border-left: 3px solid #0ba9c7; /* Un tono más claro que el principal */
}

/* Ajustes para iconos en submenús */
.sidebar .collapse .nav-link i {
    font-size: 0.8rem;
}


/* Cards del dashboard */
.dashboard-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    height: 100%;
    border: none;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.dashboard-card .card-value {
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0;
    line-height: 1;
}

.dashboard-card .card-title {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 5px;
}

/* Tablas */
.table-container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    padding: 15px;
    border-top: none;
}

.table td {
    padding: 15px;
    vertical-align: middle;
}

/* Responsive */
@media (max-width: 767.98px) {
    .sidebar {
        position: relative;
        padding: 0;
        height: auto;
    }
    
    .navbar-brand img {
        height: 24px;
    }
    
    .dashboard-card {
        margin-bottom: 20px;
    }
}

/* Dropdown de usuario */
.user-dropdown .dropdown-toggle::after {
    display: none;
}

.user-dropdown .dropdown-toggle {
    display: flex;
    align-items: center;
}

.user-dropdown .dropdown-toggle img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
}

/* Toast personalizado */
.toast-success {
    background-color: #28a745;
    color: white;
}

.toast-error {
    background-color: #dc3545;
    color: white;
}

.toast-warning {
    background-color: #ffc107;
    color: #333;
}