/* ============================================
   Estilos principales del sistema
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #1f2937;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================
   Scrollbar Personalizado - Global
   ============================================ */

/* Webkit (Chrome, Safari, Edge) */
*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

*::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #0d7377 0%, #14a085 100%);
    border-radius: 10px;
    border: 2px solid #f1f1f1;
    transition: background 0.3s ease;
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0a5d61 0%, #0f8a73 100%);
}

*::-webkit-scrollbar-corner {
    background: #f1f1f1;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #0d7377 #f1f1f1;
}

/* Scrollbar para elementos específicos */
.sidebar-nav::-webkit-scrollbar,
.content-wrapper::-webkit-scrollbar,
.login-card::-webkit-scrollbar {
    width: 8px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.content-wrapper::-webkit-scrollbar-track,
.login-card::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.content-wrapper::-webkit-scrollbar-thumb,
.login-card::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #0d7377 0%, #14a085 100%);
    border-radius: 10px;
}

.content-wrapper::-webkit-scrollbar-thumb:hover,
.login-card::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0a5d61 0%, #0f8a73 100%);
}

/* Scrollbar para tablas y contenedores con scroll */
table::-webkit-scrollbar,
.dashboard::-webkit-scrollbar,
.scrollable::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

table::-webkit-scrollbar-track,
.dashboard::-webkit-scrollbar-track,
.scrollable::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

table::-webkit-scrollbar-thumb,
.dashboard::-webkit-scrollbar-thumb,
.scrollable::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #0d7377 0%, #14a085 100%);
    border-radius: 10px;
}

table::-webkit-scrollbar-thumb:hover,
.dashboard::-webkit-scrollbar-thumb:hover,
.scrollable::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0a5d61 0%, #0f8a73 100%);
}

/* Firefox para elementos específicos */
table,
.dashboard,
.scrollable {
    scrollbar-width: thin;
    scrollbar-color: #0d7377 #f1f1f1;
}

.main-content {
    margin-left: 280px;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
}

.sidebar.collapsed ~ .main-content,
body:not(:has(.sidebar)) .main-content {
    margin-left: 80px;
}

.content-wrapper {
    margin-top: 70px;
    padding: 2rem;
    min-height: calc(100vh - 70px);
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
    }
    
    .content-wrapper {
        padding: 1rem;
    }
}

