:root {
    --primary-color: #4F46E5;
    --primary-hover: #4338CA;
    --bg-color: #F3F4F6;
    --sidebar-bg: #111827;
    --sidebar-text: #9CA3AF;
    --sidebar-active: #FFFFFF;
    --text-color: #1F2937;
    --border-color: #E5E7EB;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
}

/* Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    transition: all 0.3s ease;
    z-index: 1040;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-link {
    color: var(--sidebar-text) !important;
    padding: 0.8rem 1.5rem;
    border-radius: 0.5rem;
    margin: 0.3rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.05);
    color: var(--sidebar-active) !important;
    transform: translateX(4px);
}

.nav-link.active {
    background-color: var(--primary-color);
    color: white !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.nav-link i {
    font-size: 1.2rem;
}

/* Main Content */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevents overflow */
    background: #f8fafc;
}

.top-navbar {
    height: 70px;
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    justify-content: space-between;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.content-area {
    padding: 2rem;
    overflow-y: auto;
}

/* Card overrides for premium look */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    background: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Mobile Responsiveness */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
}

@media (max-width: 768px) {
    .app-sidebar {
        position: fixed;
        left: -280px;
        height: 100vh;
        box-shadow: 4px 0 24px rgba(0,0,0,0.1);
    }

    .app-sidebar.show {
        left: 0;
    }

    .mobile-toggle {
        display: block;
    }
    
    .content-area {
        padding: 1rem;
    }
}

/* General overrides */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}