:root {
    --primary: #405189;
    /* Steex Primary */
    --primary-rgb: 64, 81, 137;
    --secondary: #3577f1;
    --success: #0ab39c;
    --info: #299cdb;
    --warning: #f7b84b;
    --danger: #f06548;
    --dark: #212529;
    --light: #f3f3f9;
    --sidebar-bg: #1b232d;
    --sidebar-color: #abb9e8;
    --sidebar-active: #ffffff;
    --header-bg: #ffffff;
    --card-bg: #ffffff;
    --border-color: #e9ebec;
    --shadow: 0 1px 2px rgba(56, 65, 74, 0.15);
    --font-main: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--light);
    font-family: var(--font-main);
    font-size: 0.9rem;
    color: #495057;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Desktop Sidebar */
.sidebar {
    width: 250px;
    height: 100vh;
    background: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

.sidebar-menu {
    padding: 10px 0;
    flex-grow: 1;
    overflow-y: auto;
}

.menu-title {
    padding: 12px 20px;
    letter-spacing: .05em;
    cursor: default;
    font-size: .65rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #838fb9;
    opacity: .5;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--sidebar-color);
    font-weight: 500;
    transition: all 0.2s;
}

.menu-link:hover,
.menu-link.active {
    color: var(--sidebar-active);
}

.menu-link i {
    width: 18px;
    font-size: 1.1rem;
}

/* Top Header */
.top-header {
    height: 70px;
    background: var(--header-bg);
    position: fixed;
    top: 0;
    right: 0;
    left: 250px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

/* Main Content Area */
.main-content {
    margin-left: 250px;
    padding-top: 70px;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* Sidebar Toggle Logic (Desktop) */
body.sidebar-hiding .sidebar {
    left: -250px;
}

body.sidebar-hiding .main-content {
    margin-left: 0;
}

body.sidebar-hiding .top-header {
    left: 0;
}

.auth-layout .main-content {
    margin-left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0;
}

.auth-layout .page-content {
    width: 100%;
    max-width: 450px;
}

.page-content {
    padding: 24px;
}

.grid-responsive {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
}

.dashboard-grid {
    grid-template-columns: 2fr 1fr;
}

.grid-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

@media (max-width: 991.98px) {

    .grid-responsive,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* UI Components */
.card {
    background: var(--card-bg);
    border: none;
    border-radius: 0.45rem;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    padding: 20px;
}

.card-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    color: #495057;
}

/* Summary Analytics Cards */
.mini-stats-card {
    display: flex;
    justify-content: space-between;
}

.stat-label {
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.75rem;
    color: #878a99;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

/* Buttons & Inputs */
.btn {
    padding: 10px 16px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
}

input,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #495057;
}

/* Mobile Responsiveness */
@media (max-width: 991.98px) {

    .sidebar,
    .sidebar-toggle-icon,
    .sidebar-backdrop {
        display: none !important;
    }

    .top-header {
        left: 0;
    }

    .main-content {
        margin-left: 0;
    }
}

@media (max-width: 575.98px) {
    .top-header div[style*="width: 250px"] {
        display: none !important;
    }
}

/* Bottom Nav (Mobile Only) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    height: 60px;
    display: none;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

@media (max-width: 767.98px) {
    .bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }

    .page-content {
        padding-bottom: 80px;
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #adb5bd;
    font-size: 0.7rem;
}

.nav-item.active {
    color: var(--primary);
}

.nav-icon {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

/* Profile Dropdown - Mini Modal Version */
.profile-dropdown-container {
    position: relative;
    display: inline-block;
}

.profile-menu-box {
    position: absolute;
    top: 45px;
    right: 0;
    width: 180px;
    background: #ffffff !important;
    border: 1px solid #e1e6f1 !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    display: none;
    z-index: 99999 !important;
    padding: 4px 0 !important;
}

.profile-dropdown-container.active .profile-menu-box {
    display: block !important;
}

.profile-menu-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 8px 16px !important;
    color: #333 !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
}

.profile-menu-item:hover {
    background: #f4f7fe !important;
    color: var(--primary) !important;
}

.profile-menu-item i {
    font-size: 0.9rem;
    color: #6c757d;
    width: 14px;
}

.profile-menu-divider {
    height: 1px;
    background: #f1f3f7;
    margin: 4px 0;
}