html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html,
body {
    height: 100%;
    overflow-x: hidden;
}

body {
    margin-bottom: 0;
    /* Remove default margin */
}

/* Sidebar Layout */
#wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

#sidebar-wrapper {
    min-height: 100vh;
    margin-left: -16rem;
    transition: margin .25s ease-out;
    background: linear-gradient(180deg, #1a1d2e 0%, #2c3e50 100%);
    color: #fff;
    width: 16rem;
    flex-shrink: 0;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
}

#sidebar-wrapper .sidebar-heading {
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

#sidebar-wrapper .list-group {
    width: 16rem;
}

#sidebar-wrapper .list-group-item {
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    border: none;
    padding: 0.875rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

#sidebar-wrapper .list-group-item i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
    opacity: 0.8;
}

#sidebar-wrapper .list-group-item:hover {
    background: rgba(102, 126, 234, 0.15);
    color: #fff;
    border-left-color: #667eea;
}

#sidebar-wrapper .list-group-item:hover i {
    opacity: 1;
}

#sidebar-wrapper .list-group-item.active {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.3) 0%, transparent 100%);
    color: #fff;
    font-weight: 600;
    border-left-color: #667eea;
}

#sidebar-wrapper .list-group-item.active i {
    opacity: 1;
    color: #667eea;
}

#sidebar-wrapper .list-group-item.text-danger {
    color: rgba(231, 76, 60, 0.9);
}

#sidebar-wrapper .list-group-item.text-danger:hover {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border-left-color: #e74c3c;
}

#page-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

#page-content-wrapper>.container-fluid {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

body.sb-sidenav-toggled #sidebar-wrapper {
    margin-left: 0;
}

@media (min-width: 768px) {
    #sidebar-wrapper {
        margin-left: 0;
    }

    #page-content-wrapper {
        min-width: 0;
        width: 100%;
    }

    body.sb-sidenav-toggled #sidebar-wrapper {
        margin-left: -16rem;
    }
}

/* Top Navbar in Content */
.navbar-light {
    background: #f8f9fa !important;
    border-bottom: 1px solid #e0e6ed !important;
}

.navbar-light .navbar-nav .nav-link {
    color: #495057;
    font-weight: 500;
    transition: color 0.2s ease;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus {
    color: #667eea;
}

/* Sidebar Toggle Button */
#sidebarToggle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

#sidebarToggle:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

#sidebarToggle:active {
    transform: translateY(0);
}

#sidebarToggle i {
    color: #fff;
}

/* Dropdown menu styling */
.dropdown-menu {
    border: 1px solid #e0e6ed;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.dropdown-item {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    transition: all 0.15s ease;
}

.dropdown-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}