:root {
    --topbar-height: 72px;
    --sidebar-width: 260px;

    --primary-color: #4f46e5;
    --primary-hover: #4338ca;

    --sidebar-background: #111827;
    --sidebar-background-hover: #1f2937;
    --sidebar-text: #9ca3af;
    --sidebar-text-active: #ffffff;

    --body-background: #f4f6f9;
    --border-color: #e5e7eb;

    --text-dark: #111827;
    --text-muted: #6b7280;
}


/*
|--------------------------------------------------------------------------
| General
|--------------------------------------------------------------------------
*/

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--body-background);
    color: var(--text-dark);
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

a {
    text-decoration: none;
}


/*
|--------------------------------------------------------------------------
| Wrapper
|--------------------------------------------------------------------------
*/

.app-wrapper {
    min-height: 100vh;
}


/*
|--------------------------------------------------------------------------
| Topbar
|--------------------------------------------------------------------------
*/

.app-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;

    height: var(--topbar-height);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 24px;

    background: #ffffff;
    border-bottom: 1px solid var(--border-color);

    z-index: 1040;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
}

.topbar-left {
    gap: 15px;
}

.topbar-right {
    gap: 12px;
}

.sidebar-toggle {
    width: 42px;
    height: 42px;

    display: none;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 10px;

    background: #f3f4f6;
    color: var(--text-dark);

    font-size: 18px;
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 10px;

    color: var(--text-dark);
    font-size: 21px;
    font-weight: 750;
}

.app-logo:hover {
    color: var(--text-dark);
}

.app-logo-icon {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: var(--primary-color);
    color: #ffffff;
}

.topbar-center {
    width: min(480px, 40%);
}

.topbar-search {
    height: 42px;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 0 15px;

    background: #f3f4f6;
    border: 1px solid transparent;
    border-radius: 12px;
}

.topbar-search:focus-within {
    background: #ffffff;
    border-color: var(--primary-color);
}

.topbar-search i {
    color: var(--text-muted);
}

.topbar-search input {
    width: 100%;

    border: 0;
    outline: 0;

    background: transparent;
    color: var(--text-dark);
}

.topbar-icon-button {
    position: relative;

    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 12px;

    background: #f3f4f6;
    color: var(--text-dark);
}

.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;

    width: 7px;
    height: 7px;

    border: 2px solid #ffffff;
    border-radius: 50%;

    background: #ef4444;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 5px 8px;

    border: 0;
    border-radius: 12px;

    background: transparent;
}

.user-menu:hover {
    background: #f3f4f6;
}

.user-avatar {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: #eef2ff;
    color: var(--primary-color);

    font-weight: 700;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    line-height: 1.2;
}

.user-info strong {
    font-size: 14px;
}

.user-info small {
    margin-top: 3px;

    color: var(--text-muted);
    font-size: 12px;
}


/*
|--------------------------------------------------------------------------
| Sidebar
|--------------------------------------------------------------------------
*/

.app-sidebar {
    position: fixed;
    top: var(--topbar-height);
    bottom: 0;
    left: 0;

    width: var(--sidebar-width);

    display: flex;
    flex-direction: column;

    background: var(--sidebar-background);

    overflow-y: auto;
    z-index: 1030;
}

.sidebar-nav {
    flex: 1;

    padding: 22px 14px;
}

.sidebar-section-title {
    padding: 0 14px;
    margin-bottom: 9px;

    color: #6b7280;
    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;

    min-height: 46px;

    padding: 10px 14px;
    margin-bottom: 5px;

    border-radius: 10px;

    color: var(--sidebar-text);
    font-size: 14px;
    font-weight: 500;

    transition: all 0.2s ease;
}

.sidebar-link:hover {
    background: var(--sidebar-background-hover);
    color: #ffffff;
}

.sidebar-link.active {
    background: var(--primary-color);
    color: var(--sidebar-text-active);
}

.sidebar-icon {
    width: 24px;

    text-align: center;
    font-size: 17px;
}

.sidebar-footer {
    padding: 18px;

    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.sidebar-version {
    color: #9ca3af;
    font-size: 12px;
}

.sidebar-version span {
    float: right;
    color: #6b7280;
}


/*
|--------------------------------------------------------------------------
| Main content
|--------------------------------------------------------------------------
*/

.app-main {
    min-height: 100vh;

    padding-top: var(--topbar-height);
    margin-left: var(--sidebar-width);
}

.app-content {
    padding: 28px;
}


/*
|--------------------------------------------------------------------------
| Cards
|--------------------------------------------------------------------------
*/

.card {
    border-radius: 16px;
}

.card-header:first-child {
    border-radius: 16px 16px 0 0;
}


/*
|--------------------------------------------------------------------------
| Sidebar overlay
|--------------------------------------------------------------------------
*/

.sidebar-overlay {
    display: none;
}


/*
|--------------------------------------------------------------------------
| Responsive
|--------------------------------------------------------------------------
*/

@media (max-width: 991.98px) {

    .sidebar-toggle {
        display: flex;
    }

    .app-sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    .app-sidebar.show {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0;
    }

    .sidebar-overlay {
        position: fixed;
        inset: var(--topbar-height) 0 0 0;

        display: none;

        background: rgba(17, 24, 39, 0.55);

        z-index: 1025;
    }

    .sidebar-overlay.show {
        display: block;
    }

    .topbar-center {
        display: none;
    }

}

@media (max-width: 575.98px) {

    .app-topbar {
        padding: 0 14px;
    }

    .app-logo-text {
        display: none;
    }

    .user-info {
        display: none;
    }

    .user-menu > .fa-chevron-down {
        display: none;
    }

    .app-content {
        padding: 18px 14px;
    }

}