/* =========================================================
   COMMON APP CSS
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {

    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #4f46e5;

    --bg: #f5f7fb;
    --card: #ffffff;

    --text: #111827;
    --text-light: #374151;
    --muted: #6b7280;

    --border: #e8ebf0;

    --success: #16a34a;
    --danger: #dc2626;

    --sidebar-width: 250px;
}

html {
    scroll-behavior: smooth;
}

body {

    font-family: "Inter", sans-serif;

    background: var(--bg);

    color: var(--text);

    min-height: 100vh;

    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}


/* =========================================================
   APP LAYOUT
========================================================= */

.app-layout {

    min-height: 100vh;

    display: flex;
}


/* =========================================================
   SIDEBAR
========================================================= */

.sidebar {

    width: var(--sidebar-width);

    height: 100vh;

    position: fixed;

    left: 0;
    top: 0;

    background: #ffffff;

    border-right: 1px solid var(--border);

    display: flex;

    flex-direction: column;

    z-index: 1000;

    transition: transform 0.3s ease;
}

.sidebar-logo {

    height: 75px;

    padding: 0 22px;

    display: flex;

    align-items: center;

    gap: 11px;

    font-size: 18px;

    font-weight: 800;

    border-bottom: 1px solid var(--border);
}

.logo-icon {

    width: 38px;
    height: 38px;

    border-radius: 11px;

    display: flex;

    align-items: center;
    justify-content: center;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--secondary)
        );

    box-shadow:
        0 7px 18px rgba(37, 99, 235, 0.22);
}

.logo-highlight {
    color: var(--primary);
}

.sidebar-menu {

    flex: 1;

    padding: 22px 13px;

    overflow-y: auto;
}

.menu-title {

    padding: 0 12px;

    margin-bottom: 9px;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 0.08em;

    color: #9ca3af;
}

.second-title {
    margin-top: 25px;
}

.menu-item {

    min-height: 44px;

    padding: 0 12px;

    margin-bottom: 4px;

    border-radius: 11px;

    display: flex;

    align-items: center;

    gap: 12px;

    font-size: 13px;

    font-weight: 500;

    color: #6b7280;

    transition: 0.2s ease;
}

.menu-item i {

    width: 19px;

    text-align: center;

    font-size: 15px;
}

.menu-item:hover {

    background: #f5f7ff;

    color: var(--primary);
}

.menu-item.active {

    color: var(--primary);

    background: rgba(37, 99, 235, 0.09);

    font-weight: 650;
}

.notification-count {

    margin-left: auto;

    min-width: 19px;
    height: 19px;

    padding: 0 5px;

    border-radius: 20px;

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 10px;

    color: white;

    background: var(--primary);
}

.sidebar-bottom {

    padding: 12px 13px 18px;

    border-top: 1px solid var(--border);
}

.logout-item:hover {

    color: var(--danger);

    background: rgba(220, 38, 38, 0.06);
}


/* =========================================================
   MAIN CONTENT
========================================================= */

.main-content {

    width: calc(100% - var(--sidebar-width));

    margin-left: var(--sidebar-width);

    min-height: 100vh;
}


/* =========================================================
   TOPBAR
========================================================= */

.topbar {

    height: 75px;

    padding: 0 30px;

    background: rgba(255,255,255,0.94);

    border-bottom: 1px solid var(--border);

    display: flex;

    align-items: center;

    justify-content: space-between;

    position: sticky;

    top: 0;

    z-index: 900;

    backdrop-filter: blur(12px);
}

.topbar-left {

    display: flex;

    align-items: center;

    gap: 16px;
}

.menu-toggle {

    display: none;

    border: none;

    background: #f3f4f6;

    width: 40px;
    height: 40px;

    border-radius: 10px;

    cursor: pointer;

    color: #374151;
}

.page-heading span {

    font-size: 11px;

    color: var(--muted);
}

.page-heading h1 {

    font-size: 18px;

    font-weight: 750;

    margin-top: 2px;
}

.topbar-right {

    display: flex;

    align-items: center;

    gap: 18px;
}

.top-icon-btn {

    width: 40px;
    height: 40px;

    border: 1px solid var(--border);

    background: white;

    border-radius: 11px;

    color: #6b7280;

    cursor: pointer;

    position: relative;
}

.notification-dot {

    width: 7px;
    height: 7px;

    background: #ef4444;

    border-radius: 50%;

    position: absolute;

    right: 8px;
    top: 7px;

    border: 2px solid white;
}

.profile-mini {

    display: flex;

    align-items: center;

    gap: 9px;
}

.profile-avatar {

    width: 39px;
    height: 39px;

    border-radius: 12px;

    display: flex;

    align-items: center;
    justify-content: center;

    color: white;

    font-size: 14px;

    font-weight: 700;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--secondary)
        );
}

.profile-info {

    display: flex;

    flex-direction: column;

    gap: 2px;
}

.profile-info strong {
    font-size: 12px;
}

.profile-info span {

    font-size: 10px;

    color: var(--muted);
}

.profile-arrow {

    font-size: 9px;

    color: #9ca3af;
}


/* =========================================================
   MOBILE BOTTOM NAV
========================================================= */

.mobile-bottom-nav {

    display: none;
}


/* =========================================================
   MOBILE COMMON
========================================================= */

@media (max-width: 768px) {

    .sidebar {

        transform: translateX(-100%);

        box-shadow:
            15px 0 40px rgba(15,23,42,0.10);
    }

    .sidebar.open {

        transform: translateX(0);
    }

    .main-content {

        width: 100%;

        margin-left: 0;

        padding-bottom: 72px;
    }

    .topbar {

        height: 64px;

        padding: 0 15px;
    }

    .menu-toggle {

        display: flex;

        align-items: center;

        justify-content: center;
    }

    .page-heading span {

        display: none;
    }

    .page-heading h1 {

        font-size: 16px;
    }

    .profile-info,
    .profile-arrow {

        display: none;
    }

    .topbar-right {

        gap: 8px;
    }

    .mobile-bottom-nav {

        position: fixed;

        display: flex;

        left: 0;
        right: 0;
        bottom: 0;

        height: 66px;

        background: rgba(255,255,255,0.96);

        border-top: 1px solid var(--border);

        z-index: 1100;

        backdrop-filter: blur(15px);

        padding: 5px 7px;

        justify-content: space-around;
    }

    .bottom-nav-item {

        flex: 1;

        display: flex;

        flex-direction: column;

        align-items: center;

        justify-content: center;

        gap: 4px;

        color: #9ca3af;

        font-size: 9px;

        font-weight: 600;
    }

    .bottom-nav-item i {

        font-size: 16px;
    }

    .bottom-nav-item.active {

        color: var(--primary);
    }

    .wallet-nav-icon {

        width: 39px;
        height: 39px;

        margin-top: -20px;

        border-radius: 13px;

        display: flex;

        align-items: center;
        justify-content: center;

        color: white;

        background:
            linear-gradient(
                135deg,
                var(--primary),
                var(--secondary)
            );

        border: 4px solid var(--bg);

        box-shadow:
            0 7px 18px rgba(37,99,235,0.25);
    }

    .wallet-nav span {

        margin-top: 1px;
    }

    body.sidebar-open::after {

        content: "";

        position: fixed;

        inset: 0;

        background: rgba(15,23,42,0.35);

        z-index: 999;
    }

}