:root {
    --primary: #4e73df;
    --secondary: #858796;
    --success: #1cc88a;
    --info: #36b9cc;
    --warning: #f6c23e;
    --danger: #e74a3b;
    --light: #f8f9fc;
    --dark: #5a5c69;
    --gray-100: #f8f9fc;
    --gray-200: #eaecf4;
    --gray-300: #dddfeb;
    --gray-400: #d1d3e2;
    --gray-500: #b7b9cc;
    --gray-600: #858796;
    --gray-700: #6e707e;
    --gray-800: #5a5c69;
    --gray-900: #3a3b45;
    --sidebar-dark: #4e73df;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fc;
    color: #858796;
    font-size: 0.9rem;
}

#wrapper {
    display: flex;
}

#wrapper #content-wrapper {
    width: 100%;
    overflow-x: hidden;
    margin-left: 224px;
    transition: margin 0.25s ease;
}

#wrapper #content-wrapper #content {
    flex: 1 0 auto;
}

/* Scroll to top */
.scroll-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    display: none;
    width: 2.75rem;
    height: 2.75rem;
    text-align: center;
    color: #fff;
    background: rgba(90, 92, 105, 0.5);
    line-height: 46px;
    border-radius: 0.35rem;
    z-index: 1050;
}

.scroll-to-top:hover {
    color: #fff;
}

.scroll-to-top:focus {
    color: #fff;
}

/* Sidebar */
.sidebar {
    width: 224px;
    min-height: 100vh;
    background: linear-gradient(180deg, #6c757d5c 0%, #224abe 100%);
    background-size: cover;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1030;
    display: flex;
    flex-direction: column;
}

.sidebar .nav-item {
    position: relative;
}

.sidebar .nav-item .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    font-weight: 400;
    transition: all 0.15s;
}

.sidebar .nav-item .nav-link i {
    margin-right: 0.75rem;
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
}

.sidebar .nav-item .nav-link:hover {
    color: #fff;
}

.sidebar .nav-item .nav-link.active {
    color: #fff;
    font-weight: 700;
}

.sidebar .nav-item .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #fff;
    border-radius: 0 3px 3px 0;
}

.sidebar .sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 4.375rem;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    padding: 1.5rem 1rem;
    text-align: center;
    letter-spacing: 0.05rem;
    z-index: 1;
}

.sidebar .sidebar-brand i {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.sidebar .sidebar-brand img {
    width: 136px;
    transition: all 0.2s;
    height: max-content;
}

.sidebar hr.sidebar-divider {
    margin: 0 1rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar .sidebar-heading {
    text-align: left;
    padding: 0 1rem;
    font-weight: 800;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.13rem;
    color: rgba(255, 255, 255, 0.4);
}

.sidebar .nav-item .collapse,
.sidebar .nav-item .collapsing {
    background: rgba(0, 0, 0, 0.1);
}

/* Sidebar dark toggler */
.sidebar .sidebar-brand .sidebar-brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Topbar */
.topbar {
    height: 4.375rem;
    background: #fff;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.topbar .nav-item .nav-link {
    height: 4.375rem;
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    color: #d1d3e2;
    position: relative;
}

.topbar .nav-item .nav-link i {
    font-size: 1.2rem;
}

.topbar .nav-item .nav-link .badge-counter {
    position: absolute;
    transform: scale(0.7);
    transform-origin: top right;
    right: 0.25rem;
    margin-top: -0.25rem;
}

.topbar .nav-item .nav-link:hover {
    color: var(--gray-700);
}

.topbar .topbar-divider {
    width: 0;
    border-right: 1px solid #e3e6f0;
    height: calc(4.375rem - 2rem);
    margin: auto 1rem;
}

.topbar .dropdown-list {
    padding: 0;
    border: none;
    overflow: hidden;
}

.topbar .dropdown-list .dropdown-header {
    background: #4e73df;
    border: 1px solid #4e73df;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    color: #fff;
}

.topbar .user-info {
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    height: 4.375rem;
    cursor: pointer;
    color: var(--gray-700);
}

.topbar .user-info i {
    font-size: 1.8rem;
    margin-right: 0.5rem;
    color: var(--gray-400);
}

.topbar .user-info .user-name {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Cards */
.card {
    border: none;
    border-radius: 0.35rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.card .card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
}

.card.border-left-primary {
    border-left: 0.25rem solid #4e73df;
}

.card.border-left-success {
    border-left: 0.25rem solid #1cc88a;
}

.card.border-left-info {
    border-left: 0.25rem solid #36b9cc;
}

.card.border-left-warning {
    border-left: 0.25rem solid #f6c23e;
}

.card.border-left-danger {
    border-left: 0.25rem solid #e74a3b;
}

/* Text colors */
.text-gray-100 { color: #f8f9fc; }
.text-gray-200 { color: #eaecf4; }
.text-gray-300 { color: #dddfeb; }
.text-gray-400 { color: #d1d3e2; }
.text-gray-500 { color: #b7b9cc; }
.text-gray-600 { color: #858796; }
.text-gray-700 { color: #6e707e; }
.text-gray-800 { color: #5a5c69; }
.text-gray-900 { color: #3a3b45; }

.text-xs {
    font-size: 0.7rem;
}

.text-lg {
    font-size: 1.2rem;
}

.font-weight-800 {
    font-weight: 800;
}

/* Buttons */
.btn {
    border-radius: 0.35rem;
}

.btn-primary {
    background-color: #4e73df;
    border-color: #4e73df;
}

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
}

.btn-success {
    background-color: #1cc88a;
    border-color: #1cc88a;
}

.btn-info {
    background-color: #36b9cc;
    border-color: #36b9cc;
}

.btn-warning {
    color: #fff;
    background-color: #f6c23e;
    border-color: #f6c23e;
}

.btn-danger {
    background-color: #e74a3b;
    border-color: #e74a3b;
}

/* Footer */
footer.sticky-footer {
    padding: 2rem 0;
    flex-shrink: 0;
}

footer.sticky-footer .copyright {
    line-height: 1;
    font-size: 0.8rem;
    color: var(--gray-600);
}

/* Tables */
.table {
    color: #858796;
}

.table thead th {
    border-top: none;
    border-bottom: 2px solid #e3e6f0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-600);
    font-weight: 700;
    padding: 0.75rem;
}

.table td {
    border-top: 1px solid #e3e6f0;
    padding: 0.75rem;
    vertical-align: middle;
}

/* Badge */
.badge {
    font-weight: 600;
    font-size: 0.8rem;
}

/* Form controls */
.form-control {
    border-radius: 0.35rem;
    border: 1px solid #d1d3e2;
    font-size: 0.85rem;
    color: #6e707e;
}

.form-control:focus {
    border-color: #bac8f3;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

/* Modal */
.modal-content {
    border: none;
    border-radius: 0.35rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.modal-header {
    background: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
}

/* Pagination */
.pagination .page-link {
    color: #4e73df;
    border: 1px solid #dddfeb;
}

.pagination .page-item.active .page-link {
    background-color: #4e73df;
    border-color: #4e73df;
}

/* Page heading */
.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
    color: #5a5c69;
    font-weight: 400;
}

h1, .h1 {
    font-size: 1.75rem;
}

h2, .h2 {
    font-size: 1.5rem;
}

h3, .h3 {
    font-size: 1.25rem;
}

/* No-gutters override for container-fluid */
.container-fluid {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Page wrapper */
.container-fluid.page-content {
    padding-top: 1.5rem;
}

/* Dropdown */
.dropdown-menu {
    font-size: 0.85rem;
    border: 1px solid #e3e6f0;
    border-radius: 0.35rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.dropdown-menu .dropdown-item {
    padding: 0.5rem 1.5rem;
}

/* Alert */
.alert {
    border-radius: 0.35rem;
    border: none;
}

/* Sidebar toggled (hidden) */
#wrapper.sidebar-toggled .sidebar {
    width: 0 !important;
    overflow: hidden;
    padding: 0;
}

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

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 6.5rem;
        overflow: visible;
    }

    .sidebar .sidebar-brand {
        padding: 0.75rem;
    }

    .sidebar .sidebar-brand img {
        max-width: 40px;
        height: auto;
    }

    .sidebar .nav-item .nav-link {
        justify-content: center;
        padding: 0.75rem;
    }

    .sidebar .nav-item .nav-link i {
        margin-right: 0;
        font-size: 1.2rem;
    }

    .sidebar .nav-item .nav-link span,
    .sidebar .sidebar-heading,
    .sidebar hr.sidebar-divider {
        display: none;
    }

    #wrapper #content-wrapper {
        margin-left: 6.5rem;
    }

    #wrapper.sidebar-toggled .sidebar {
        width: 0 !important;
    }

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