/* Base Styling & CSS Variables for Classic Light Mode */
:root {
    --bg-primary: #f8fafc;
    --bg-surface: #ffffff;
    --bg-sidebar: #ffffff;
    --text-primary: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --color-accent: #f1f5f9;
    --color-accent-dark: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
}

/* Application CSS Grid Layout Shell */
#app-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    height: 100vh;
    width: 100vw;
}

/* Sidebar Navigation */
#sidebar {
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.sidebar-nav {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-muted);
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background-color: var(--color-accent);
    color: var(--text-primary);
}

.nav-item.active {
    background-color: var(--color-accent);
    color: var(--text-primary);
    font-weight: 600;
}

.nav-item i {
    width: 20px;
    height: 20px;
}

/* Main Content Area */
#main-content {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Top Navigation Header */
#topbar {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.search-container {
    display: flex;
    align-items: center;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 16px;
    width: 350px;
}

.search-icon {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    margin-right: 8px;
}

.search-container input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-button {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.icon-button:hover {
    background-color: var(--color-accent);
    color: var(--text-primary);
}

.avatar {
    width: 40px;
    height: 40px;
    background-color: var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

/* Views & Dynamic Tabs */
#views-container {
    padding: 32px;
    flex: 1;
}

.tab-view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-view.active {
    display: block;
}

.view-header {
    margin-bottom: 24px;
}

.view-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.view-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Generic Cards */
.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
}
