:root {
    --primary-color: #6366f1;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --bg-color: #f8fafc;
    --sidebar-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --sidebar-width: 280px;
    --header-height: 70px;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --sidebar-bg: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --card-bg: #1e293b;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --shadow: 0 10px 15px -3px rgb(0 0 0 / 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 2rem 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.logo-icon {
    font-size: 1.8rem;
}

.logo-text span {
    color: var(--primary-color);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0 1rem;
}

.nav-section {
    margin-bottom: 2rem;
}

.section-title {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.1rem;
    padding-left: 1rem;
    margin-bottom: 0.75rem;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 4px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar-nav li.active a,
.sidebar-nav a:hover {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.sidebar-nav li.active a {
    font-weight: 600;
}

.sidebar-nav .icon {
    font-size: 1.1rem;
    width: 24px;
    display: flex;
    justify-content: center;
}

.sidebar-footer {
    padding: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

/* Content Area Styling */
.content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content-header {
    height: var(--header-height);
    padding: 0 3rem;
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    width: 400px;
    transition: box-shadow 0.2s;
}

.search-bar:focus-within {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
}

.search-bar input {
    background: transparent;
    border: none;
    outline: none;
    margin-left: 8px;
    width: 100%;
    color: var(--text-main);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn-theme-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

.btn-theme-toggle:hover {
    background: var(--border-color);
}

.avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    box-shadow: var(--shadow);
}

/* Content Body */
.content-body {
    padding: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    padding: 12px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 12px;
}

.card h3 {
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-muted);
}

.info-box {
    display: flex;
    gap: 1rem;
    background: rgba(99, 102, 241, 0.05);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 0 12px 12px 0;
    margin-bottom: 3rem;
}

.info-icon {
    font-size: 1.5rem;
}

hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 3rem 0;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    font-family: 'Monaco', 'Consolas', monospace;
    overflow-x: auto;
}

ul {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

ul li {
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .content {
        margin-left: 0;
    }

    .content-header {
        padding: 0 1.5rem;
    }

    .search-bar {
        width: 200px;
    }
}