body {
    overflow-x: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

#sidebar-wrapper {
    min-height: 100vh;
    width: 250px;
    margin-left: -250px;
    transition: margin 0.25s ease-out;
    z-index: 1000;
    position: fixed;
}

#sidebar-wrapper .sidebar-heading {
    padding: 0.875rem 1.25rem;
    font-size: 1.2rem;
}

#sidebar-wrapper .list-group {
    width: 250px;
}

#page-content-wrapper {
    width: 100%;
    transition: margin 0.25s ease-out;
    position: relative;
}

#wrapper.toggled #sidebar-wrapper {
    margin-left: 0;
}

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

.cursor-pointer {
    cursor: pointer;
}

/* Modo oscuro */
[data-bs-theme="dark"] body {
    background-color: #212529;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .bg-light {
    background-color: #212529 !important;
}

[data-bs-theme="dark"] .bg-white {
    background-color: #2b3035 !important;
}

[data-bs-theme="dark"] .card {
    background-color: #2b3035;
    border-color: #495057;
}

[data-bs-theme="dark"] .table {
    color: #f8f9fa;
}

[data-bs-theme="dark"] .table-light {
    background-color: #343a40;
    color: #f8f9fa;
}

@media (min-width: 768px) {
    #sidebar-wrapper {
        margin-left: 0;
        position: relative;
    }
    #page-content-wrapper {
        min-width: 0;
        width: 100%;
    }
    #wrapper.toggled #sidebar-wrapper {
        margin-left: -250px;
    }
    .sidebar-overlay {
        display: none !important;
    }
}

/* Better mobile tables and cards */
.table-responsive {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.btn {
    min-height: 44px; /* Better touch target */
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    z-index: 1030;
    padding-bottom: env(safe-area-inset-bottom);
}

.mobile-bottom-nav .nav-item {
    transition: all 0.2s ease;
}

.mobile-bottom-nav .nav-item:active {
    transform: scale(0.95);
}

/* Dark mode adjustments for bottom nav and navbar */
[data-bs-theme="dark"] .mobile-bottom-nav {
    background-color: #2b3035 !important;
    border-top-color: #495057 !important;
}

[data-bs-theme="dark"] .mobile-bottom-nav .text-secondary {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .navbar .text-dark {
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .dropdown-menu {
    background-color: #2b3035;
    border-color: #495057;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #f8f9fa;
}

[data-bs-theme="dark"] .dropdown-item:hover {
    background-color: #343a40;
    color: #fff;
}

[data-bs-theme="dark"] .dropdown-header {
    color: #adb5bd;
}

[data-bs-theme="dark"] .dropdown-divider {
    border-top-color: #495057;
}

[data-bs-theme="dark"] .modal-content {
    background-color: #2b3035;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .modal-header {
    border-bottom-color: #495057;
}

[data-bs-theme="dark"] .modal-footer {
    border-top-color: #495057;
}

[data-bs-theme="dark"] .form-control, 
[data-bs-theme="dark"] .form-select {
    background-color: #212529;
    border-color: #495057;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .form-control:focus, 
[data-bs-theme="dark"] .form-select:focus {
    background-color: #212529;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .text-muted {
    color: #adb5bd !important;
}
