:root {
    --primary-color: #150a44;
    --secondary-color: #2a1a8f;
    --background-gray: #f5f6fa;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --card-white: #ffffff;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.2);
    --border-radius: 10px;
    --header-height: 80px;
    --sidebar-width: 250px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    background-color: var(--background-gray);
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--card-white);
    box-shadow: var(--shadow);
    height: 100vh;
    position: fixed;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}


.sidebar-content {
    padding: 2rem 0 0 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
    position: relative;

}

.sidebar-header {
    padding: 0 1rem;
    margin-bottom: 2rem;
}

.logo {
    height: 60px;
    display: block;
    margin: 0 auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    margin: 0.5rem 1rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.nav-item:hover {
    background-color: var(--background-gray);
    color: var(--primary-color);
    transform: translateX(5px);
}

.nav-item.active {
    background-color: var(--primary-color);
    color: white;
}

.nav-icon {
    margin-right: 1rem;
    width: 20px;
    text-align: center;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.page-header {
    background: var(--card-white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2rem;
    color: var(--primary-color);

}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.action-card {
    background: var(--card-white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-content {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-icon {
    width: 50px;
    height: 50px;
    background-color: var(--background-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: var(--primary-color);
}

.card-text h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.card-text p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.card-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-button:hover {
    background-color: var(--secondary-color);
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem;
    background-color: var(--background-gray);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.logout-btn {
    color: #ff4d4d !important;
    margin: 0 !important;
    padding: 0.75rem 1.5rem !important;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

.logout-btn:hover {
    background: rgba(255, 77, 77, 0.1) !important;
    transform: translateX(5px);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 65px;
}


@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1000;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .page-header {
        padding: 1rem;
        margin-bottom: 2rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }
}

/* Sidebar styles for mobile */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 280px;
        height: 100%;
        max-height: -webkit-fill-available;
        /* For iOS */
        background: var(--card-white);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }


    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .sidebar-nav {
        padding-bottom: 100px;

    }

    .sidebar-footer {
        padding: 1.25rem;

    }

    .logout-btn {
        padding: 1rem 1.5rem !important;

    }
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--secondary-color);
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: white;
    margin: 5px auto;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Overlay for mobile menu */
.sidebar.active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

/* Improve sidebar navigation items on mobile */
@media (max-width: 1024px) {
    .sidebar-nav {
        padding: 1rem 0;
    }

    .nav-item {
        padding: 1rem 1.5rem;
        margin: 0.25rem 1rem;
    }

    .nav-text {
        font-size: 1rem;
    }
}