/* Base styles and reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

:root {
    --teal: #4DD0E1;
    --teal-light: rgba(77, 208, 225, 0.1);
    --blue: #64B5F6;
    --blue-light: rgba(100, 181, 246, 0.1);
    --pink: #F06292;
    --pink-light: rgba(240, 98, 146, 0.1);
    --purple: #B39DDB;
    --purple-light: rgba(179, 157, 219, 0.1);
    --success: #66BB6A;
    --warning: #FFA726;
    --danger: #EF5350;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #0F172A;
    --radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
    background-color: #f4f4f8;
    color: var(--gray-800);
    line-height: 1.5;
    margin: 0;
    overflow-y: scroll;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 12px 25px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-sizing:unset;
}

/* Left Section (Logo) */
.navbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    height: 40px;
}

.brand-name {
    font-size: 20px;
    font-weight: bold;
    color: #f4a31e;
}

/* Center Section (Nav Links) */
.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-links li {
    display: inline;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    padding: 10px 15px;
    transition: color 0.3s ease-in-out;
}

.nav-links a.active {
    color: #f4a31e;
    border-bottom: 3px solid #f4a31e;
}

.nav-links a:hover {
    color: #f4a31e;
}

/* Right Section (Profile + Logout) */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.profile img {
    height: 35px;
    width: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.profile span {
    font-size: 14px;
    color: #333;
}

/* Logout Button */
.logout-btn {
    background-color: #8835e6;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0px 3px 10px rgba(162, 0, 255, 0.2);
    position: relative;
    overflow: hidden;
    margin-right: 35px;
}

.logout-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.4s ease;
}

.logout-btn:hover::before {
    left: 100%;
}

.logout-btn:hover {
    transform: scale(1.05);
    box-shadow: 0px 5px 15px rgba(204, 0, 255, 0.4);
}

/* App Layout */
.app-container {
    min-height: 100vh;
}

/* Main Content */
.main-content {
    padding: 2rem;
    margin-top: -20px
}

/* Dashboard Title */
.dashboard-title {
    padding-top: 20px;
    text-align: left;
    margin: 20px 0;
    font-size: 2rem;
    color: #5a2d82;
}

hr {
    border: none;
    border-top: 1px solid var(--gray-200);
    margin-bottom: 2rem;
}

/* Metric Cards */
.metric-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    display: flex;
    gap: 1rem;
    box-shadow: var(--shadow);
}

.metric-card.teal .metric-icon {
    background-color: var(--teal-light);
    color: var(--teal);
}

.metric-card.blue .metric-icon {
    background-color: var(--blue-light);
    color: var(--blue);
}

.metric-card.pink .metric-icon {
    background-color: var(--pink-light);
    color: var(--pink);
}

.metric-card.purple .metric-icon {
    background-color: var(--purple-light);
    color: var(--purple);
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.metric-content {
    flex: 1;
}

.metric-content h3 {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.metric-change {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.metric-change.positive {
    color: var(--success);
}

.metric-change.negative {
    color: var(--danger);
}

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-container {
    background-color: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    width: 100%;
}

.chart-wrapper {
    position: relative;
    height: auto; 
    min-height: 200px; 
    width: 100%;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
}

.time-select {
    padding: 0.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    font-size: 0.875rem;
    color: var(--gray-600);
    outline: none;
}

/* Recent Activity */
.recent-activity {
    background-color: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    overflow-y: scroll;
    height: 400px;
    scrollbar-width: thin;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
}

.view-all {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    background-color: white;
    color: var(--gray-600);
    font-size: 0.875rem;
    cursor: pointer;
}

.activity-table {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-500);
    border-bottom: 1px solid var(--gray-200);
}

td {
    padding: 1rem;
    font-size: 0.875rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-200);
}

.category-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--blue-light);
    color: var(--blue);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status.completed {
    background-color: var(--success);
    color: white;
}

.status.pending {
    background-color: var(--warning);
    color: white;
}

/* Menu Toggle for Mobile */
.menu-toggle {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 1024px) {
    .charts-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        background: white;
        width: 200px;
        box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
        padding: 10px 0;
        border-radius: 8px;
    }
    
    .nav-links.show {
        display: flex;
    }
    
    .nav-links li {
        text-align: center;
        padding: 10px 0;
    }

    .dashboard-title {
        padding-top: 12%;
    }
    
    .metric-cards {
        grid-template-columns: 1fr;
    }
    
    .charts-section {
        grid-template-columns: 1fr;
    }
}