/* Sidebar Styles */
.sidebar {
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar .nav-link {
    border-radius: 8px;
    transition: all 0.3s ease;
    padding: 10px 15px;
}

.sidebar .nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    color: white !important;
    transform: translateX(5px);
}

.sidebar .nav-link.active {
    background-color: #667eea;
    color: white !important;
}

/* Estilos para menús expandibles */
.sidebar .dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.sidebar .dropdown-toggle:hover {
    background-color: rgba(255,255,255,0.1);
    color: white !important;
    transform: translateX(5px);
}

.sidebar .dropdown-toggle[aria-expanded="true"] {
    background-color: rgba(255,255,255,0.1);
    color: white !important;
}

.sidebar .dropdown-toggle[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

.sidebar .dropdown-toggle .fa-chevron-down {
    transition: transform 0.3s ease;
}

.sidebar .collapse .nav-link {
    padding-left: 2rem;
    font-size: 0.9em;
    border-left: 2px solid rgba(255,255,255,0.2);
    margin-left: 0.5rem;
}

.sidebar .collapse .nav-link:hover {
    border-left-color: #667eea;
}

/* Main content adjustment */
.main-content {
    margin-left: 250px;
    transition: all 0.3s ease;
    flex: 1;
}

/* Ensure main content takes available space */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Sidebar toggle button */
.sidebar-toggle {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: #667eea;
    border: none;
    color: white;
    padding: 10px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: #5a6fd8;
    transform: scale(1.05);
}

/* Overlay for mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px !important;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding-top: 60px;
        flex: 1;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
}

@media (min-width: 1025px) {
    .sidebar-toggle {
        display: none;
    }
    
    .sidebar-overlay {
        display: none !important;
    }
}


/* User Status Bar - Barra de estado sutil */
.user-status-bar {
    background: #f8f9fa !important;
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 100;
    margin-left: 250px;
    width: calc(100% - 250px);
}

.user-status-info small {
    font-weight: 500;
}

.user-status-info .text-success {
    font-weight: 600;
}

.user-status-info .text-muted span {
    font-size: 0.9em;
    opacity: 0.8;
}

.user-roles-minimal .badge {
    font-size: 0.7em;
    padding: 0.3em 0.6em;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-right: 0.5rem;
}

.user-roles-minimal .badge:last-child {
    margin-right: 0;
}

.user-actions-minimal .btn {
    border: 1px solid #6c757d;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.85em;
    padding: 0.4rem 0.8rem;
}

.user-actions-minimal .btn:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
    transform: translateY(-1px);
}

.user-actions-minimal .dropdown-menu {
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 0.5rem 0;
}

.user-actions-minimal .dropdown-item {
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.9em;
}

.user-actions-minimal .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.user-actions-minimal .dropdown-item i {
    width: 18px;
    text-align: center;
}

/* Responsive adjustments for user status bar */
@media (max-width: 1024px) {
    .user-status-bar {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .user-status-bar .row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .user-status-bar .col-md-6 {
        width: 100%;
    }
    
    .user-status-bar .col-md-6:last-child {
        justify-content: center !important;
    }
    
    .user-roles-minimal .badge {
        font-size: 0.65em;
        padding: 0.25em 0.5em;
    }
    
    .user-actions-minimal .btn {
        font-size: 0.8em;
        padding: 0.3rem 0.6rem;
    }
}

@media (max-width: 576px) {
    .user-status-bar {
        padding: 0.5rem 0 !important;
    }
    
    .user-roles-minimal {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .user-roles-minimal .badge {
        font-size: 0.6em;
        padding: 0.2em 0.4em;
    }
}

/* SweetAlert2 z-index fix */
.swal2-container {
    z-index: 1002 !important;
}

.swal2-toast {
    z-index: 1002 !important;
}

/* Ocultar mensajes Bootstrap para evitar duplicados */
.alert {
    display: none !important;
}

/* Estilos personalizados para SweetAlert2 */
.swal2-popup-custom {
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.swal2-toast.swal2-show {
    border-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Ajustar posición para que no se superponga con el sidebar */
@media (min-width: 1025px) {
    .swal2-toast {
        right: 20px !important;
        top: 20px !important;
        left: auto !important;
        width: 300px !important;
    }
}

@media (max-width: 1024px) {
    .swal2-toast {
        right: 10px !important;
        top: 70px !important;
        left: 10px !important;
        width: auto !important;
    }
}

/* Footer Styles */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-top: 1px solid #34495e;
    margin-top: auto;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
}

/* Desktop footer positioning with sidebar */
@media (min-width: 1025px) {
    .footer {
        margin-left: 250px;
        width: calc(100% - 250px);
    }
}

.footer-brand h5 {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.footer-brand p {
    line-height: 1.6;
    font-size: 0.9em;
    opacity: 0.8;
}

.footer-links li a {
    transition: all 0.3s ease;
    font-size: 0.9em;
    display: flex;
    align-items: center;
}

.footer-links li a:hover {
    color: #667eea !important;
    transform: translateX(5px);
    text-decoration: none !important;
}

.footer-links li a i {
    width: 16px;
    text-align: center;
}


.footer-contact small {
    display: flex;
    align-items: center;
    font-size: 0.9em;
}

.footer-contact i {
    width: 16px;
    text-align: center;
}

/* Copyright text styling - only for the copyright section */
.footer .col-md-6 .text-muted {
    color: #e9ecef !important;
    opacity: 0.9;
}

/* Contact email styling - desktop */
.footer-contact small.text-muted {
    color: #e9ecef !important;
    opacity: 0.9;
}

/* Responsive Footer */
@media (max-width: 1024px) {
    .footer {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 992px) {
    .footer .col-lg-4,
    .footer .col-lg-2 {
        margin-bottom: 2rem;
    }
    
    .footer-brand {
        text-align: center;
    }
    
    .footer h6 {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .footer-links {
        text-align: center;
    }
    
}

@media (max-width: 768px) {
    .footer {
        padding: 2rem 0 !important;
    }
    
    .footer .row {
        margin: 0;
    }
    
    .footer .col-lg-4,
    .footer .col-lg-2,
    .footer .col-md-6 {
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }
    
    .footer-brand h5 {
        font-size: 1.1rem;
    }
    
    .footer-brand p {
        font-size: 0.85em;
    }
    
    .footer h6 {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
    }
    
    .footer-links li {
        margin-bottom: 0.5rem !important;
    }
    
    .footer-links li a {
        font-size: 0.85em;
        justify-content: center;
    }
    
    
    .footer-contact {
        text-align: center;
    }
    
    .footer-contact small {
        justify-content: center;
    }
    
    /* Copyright text styling in responsive */
    .footer .col-md-6 .text-muted {
        color: #e9ecef !important;
        opacity: 0.9;
    }
    
    /* Contact email styling in responsive */
    .footer-contact small.text-muted {
        color: #e9ecef !important;
        opacity: 0.9;
    }
}

@media (max-width: 576px) {
    .footer {
        padding: 1.5rem 0 !important;
    }
    
    .footer-brand h5 {
        font-size: 1rem;
    }
    
    .footer-brand p {
        font-size: 0.8em;
    }
    
    .footer h6 {
        font-size: 0.9rem;
    }
    
    .footer-links li a {
        font-size: 0.8em;
    }
    
    
    .footer-contact small {
        font-size: 0.8em;
    }
    
    /* Copyright section responsive */
    .footer .row:last-child {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .footer .row:last-child .col-md-6 {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Copyright text styling in small mobile */
    .footer .col-md-6 .text-muted {
        color: #e9ecef !important;
        opacity: 0.9;
    }
    
    /* Contact email styling in small mobile */
    .footer-contact small.text-muted {
        color: #e9ecef !important;
        opacity: 0.9;
    }
}

/* Footer spacing */
footer.footer {
    margin-top: 3rem !important;
} 