/* ========================================
   SIDEBAR LATERAL
   ======================================== */
:root {
    --primary-yellow: #FFC107;
    --primary-black: #1A1A1A;
    --secondary-gray: #F5F5F5;
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
}

/* Estructura principal */
.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--primary-black);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 999;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
}

/* Scroll personalizado */
.sidebar::-webkit-scrollbar {
    width: 5px;
}
.sidebar::-webkit-scrollbar-track {
    background: var(--primary-black);
}
.sidebar::-webkit-scrollbar-thumb {
    background: var(--primary-yellow);
    border-radius: 10px;
}

/* Logo */
.sidebar-logo {
    padding: 20px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo img {
    height: 45px;
    width: auto;
}

.sidebar-logo .brand-text {
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
}

.sidebar-logo .brand-text span {
    color: var(--primary-yellow);
}

/* Menú */
.sidebar-menu {
    flex: 1;
    padding: 20px 0;
}

.sidebar-menu .menu-label {
    font-size: 11px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    padding: 8px 20px;
    font-weight: 600;
    letter-spacing: 1px;
}

.sidebar-menu .nav-item {
    margin: 2px 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar-menu .nav-item a {
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.sidebar-menu .nav-item a i {
    width: 22px;
    font-size: 18px;
    text-align: center;
    transition: all 0.3s ease;
}

.sidebar-menu .nav-item a .menu-text {
    flex: 1;
}

.sidebar-menu .nav-item a .badge {
    background: var(--primary-yellow);
    color: var(--primary-black);
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
}

.sidebar-menu .nav-item:hover a {
    color: #fff;
    background: rgba(255, 193, 7, 0.1);
}

.sidebar-menu .nav-item.active a {
    color: var(--primary-black);
    background: var(--primary-yellow);
    font-weight: 600;
}

.sidebar-menu .nav-item.active a i {
    color: var(--primary-black);
}

/* Perfil en sidebar */
.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-footer .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-black);
    font-weight: 700;
    font-size: 18px;
}

.sidebar-footer .user-name {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.sidebar-footer .user-role {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.sidebar-footer .logout-btn {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.sidebar-footer .logout-btn:hover {
    color: #fff;
    background: rgba(255, 0, 0, 0.2);
}

/* ========================================
   CONTENIDO PRINCIPAL
   ======================================== */
.content-wrapper {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    background: var(--secondary-gray);
    transition: all 0.3s ease;
}

.content-wrapper .content-page {
    padding: 25px 30px;
}

/* ========================================
   BOTÓN TOGGLE PARA MÓVIL
   ======================================== */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1000;
    background: var(--primary-black);
    color: #fff;
    border: none;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.sidebar-toggle:hover {
    background: var(--primary-yellow);
    color: var(--primary-black);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 992px) {
    .sidebar {
        margin-left: -260px;
    }
    
    .sidebar.active {
        margin-left: 0;
    }
    
    .content-wrapper {
        margin-left: 0;
        width: 100%;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
    }
    
    .overlay.active {
        display: block;
    }
}

/* ========================================
   ESTILOS EXISTENTES (se mantienen)
   ======================================== */
body {
    background-color: var(--secondary-gray);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card.bg-dark {
    background-color: var(--primary-black) !important;
}

.btn-warning {
    background-color: var(--primary-yellow);
    border-color: var(--primary-yellow);
    color: var(--primary-black);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-warning:hover {
    background-color: #e6a800;
    border-color: #e6a800;
    color: var(--primary-black);
    transform: scale(1.02);
}

.form-control:focus {
    border-color: var(--primary-yellow);
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
}

.table-dark {
    background-color: var(--primary-black);
}

.table-dark thead th {
    border-bottom: 2px solid var(--primary-yellow);
    color: var(--primary-yellow);
}

.table-dark tbody tr:hover {
    background-color: rgba(255, 193, 7, 0.1);
}

/* Ajustes para contenido */
.content-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-black);
}

.content-title i {
    color: var(--primary-yellow);
    margin-right: 10px;
}

.breadcrumb-custom {
    background: transparent;
    padding: 0;
    margin: 5px 0 20px 0;
}

.breadcrumb-custom .breadcrumb-item a {
    color: var(--primary-black);
    text-decoration: none;
}

.breadcrumb-custom .breadcrumb-item.active {
    color: var(--primary-yellow);
    font-weight: 600;
}

/* Animaciones */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}


/* ========================================
   CORRECCIÓN: LABELS EN COLOR BLANCO
   ======================================== */
.form-label {
    color: #ffffff !important;
    font-weight: 500;
    font-size: 0.85rem;
}

.form-label.text-muted {
    color: #adb5bd !important;
}

/* Labels dentro de modales */
.modal-content .form-label {
    color: #ffffff !important;
}

.modal-content .form-label.text-muted {
    color: #adb5bd !important;
}

/* Para inputs en modo lectura */
.form-control[readonly] {
    background-color: #2d2d2d !important;
    color: #ffffff !important;
    cursor: not-allowed;
}

/* Para selects */
.form-select {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    border-color: #FFC107 !important;
}

.form-select option {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

/* Input group text */
.input-group-text {
    background-color: #1a1a1a !important;
    color: #FFC107 !important;
    border-color: #FFC107 !important;
}