/* =========================================
   LEEJO - ADMIN DASHBOARD
========================================= */

:root {
    --sidebar-width: 260px;
    --sidebar-collapsed: 78px;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --sidebar-bg: #111827;
    --sidebar-hover: #1f2937;
    --body-bg: #f5f7fb;
    --border-color: #e5e7eb;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
}


/* =========================================
   BASIC
========================================= */

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--body-bg) !important;
    color: var(--text-dark);
    font-family: "Segoe UI", Arial, sans-serif;
}


/* =========================================
   APP WRAPPER
========================================= */

.app-wrapper {
    min-height: 100vh;
    width: 100%;
}


/* =========================================
   SIDEBAR
========================================= */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: width 0.25s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
}


/* =========================================
   LOGO
========================================= */

.sidebar-logo {
    height: 72px;
    display: flex;
    align-items: center;
    padding: 0 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

    .sidebar-logo a {
        display: flex;
        align-items: center;
        gap: 12px;
        color: white;
        text-decoration: none;
        font-size: 22px;
        font-weight: 700;
    }

.logo-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--primary);
    font-size: 20px;
}

.logo-text {
    letter-spacing: 0.5px;
}


/* =========================================
   SIDEBAR MENU
========================================= */

.sidebar-menu {
    flex: 1;
    padding: 18px 12px;
    overflow-y: auto;
}

.menu-title {
    padding: 14px 12px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: #6b7280;
}


/* =========================================
   SIDEBAR LINKS
========================================= */

.sidebar-link {
    height: 46px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 14px;
    margin-bottom: 4px;
    border-radius: 9px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

    .sidebar-link i {
        width: 22px;
        text-align: center;
        font-size: 18px;
    }

    .sidebar-link:hover {
        background: var(--sidebar-hover);
        color: white;
        transform: translateX(2px);
    }

    .sidebar-link.active {
        background: var(--primary);
        color: white;
    }


/* =========================================
   SIDEBAR FOOTER
========================================= */

.sidebar-footer {
    padding: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.user-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
}

.user-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 18px;
}

    .user-info strong {
        font-size: 13px;
    }

    .user-info small {
        color: #9ca3af;
        font-size: 11px;
    }


/* =========================================
   MAIN AREA
========================================= */

.main-area {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
}


/* =========================================
   TOP HEADER
========================================= */

.top-header {
    height: 72px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 900;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.sidebar-toggle {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: #f3f4f6;
    color: #374151;
    font-size: 20px;
    cursor: pointer;
    transition: 0.2s;
}

    .sidebar-toggle:hover {
        background: #e5e7eb;
    }

.page-title {
    font-size: 18px;
    font-weight: 600;
}


/* =========================================
   HEADER RIGHT
========================================= */

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-icon {
    position: relative;
    border: none;
    background: transparent;
    font-size: 20px;
    color: #4b5563;
    cursor: pointer;
}

.notification-dot {
    position: absolute;
    width: 7px;
    height: 7px;
    background: #ef4444;
    border-radius: 50%;
    top: 1px;
    right: 1px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 9px;
}

.header-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.header-user-info {
    display: flex;
    flex-direction: column;
    line-height: 16px;
}

    .header-user-info strong {
        font-size: 13px;
    }

    .header-user-info small {
        font-size: 11px;
        color: var(--text-muted);
    }


/* =========================================
   CONTENT
========================================= */

.content-area {
    flex: 1;
    padding: 28px;
}


/* =========================================
   FOOTER
========================================= */

.main-footer {
    min-height: 55px;
    background: white;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    color: #9ca3af;
    font-size: 12px;
}


/* =========================================
   COLLAPSED SIDEBAR
========================================= */

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.main-area.expanded {
    margin-left: var(--sidebar-collapsed);
    width: calc(100% - var(--sidebar-collapsed));
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .sidebar-link span,
.sidebar.collapsed .menu-title,
.sidebar.collapsed .user-info,
.sidebar.collapsed .user-box > i {
    display: none;
}

.sidebar.collapsed .sidebar-logo {
    justify-content: center;
    padding: 0;
}

    .sidebar.collapsed .sidebar-logo a {
        gap: 0;
    }

.sidebar.collapsed .sidebar-link {
    justify-content: center;
    padding: 0;
}

.sidebar.collapsed .sidebar-footer {
    padding: 12px;
}

.sidebar.collapsed .user-box {
    justify-content: center;
}


/* =========================================
   SCROLLBAR
========================================= */

.sidebar-menu::-webkit-scrollbar {
    width: 5px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 10px;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {

    .sidebar {
        width: 0;
        overflow: hidden;
    }

    .main-area {
        margin-left: 0;
        width: 100%;
    }

    .sidebar:not(.collapsed) {
        width: var(--sidebar-width);
    }

    .main-area.expanded {
        margin-left: 0;
        width: 100%;
    }

    .content-area {
        padding: 18px;
    }

    .header-user-info,
    .header-user > i {
        display: none;
    }

    .top-header {
        padding: 0 16px;
    }

    .main-footer {
        padding: 0 18px;
    }
}
