@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    /* Light Mode Palette */
    --bg-primary: #F3F4F6;
    --bg-surface: #FFFFFF;
    --bg-card: rgba(255, 255, 255, 0.85);
    
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --text-muted: #9CA3AF;
    
    --border-color: rgba(0, 0, 0, 0.1);
    
    --accent: #2563EB;
    --accent-hover: #1D4ED8;
    --accent-light: rgba(37, 99, 235, 0.1);
    
    --danger: #EF4444;
    --success: #10B981;
    --warning: #F59E0B;
    
    --shadow-color: rgba(0, 0, 0, 0.05);
    --icon-color: #6B7280;
}

[data-theme="dark"] {
    /* Dark Mode Palette */
    --bg-primary: #0F172A;
    --bg-surface: #1E293B;
    --bg-card: rgba(30, 41, 59, 0.85);
    
    --text-primary: #F9FAFB;
    --text-secondary: #CBD5E1;
    --text-muted: #64748B;
    
    --border-color: rgba(255, 255, 255, 0.1);
    
    --accent: #3B82F6;
    --accent-hover: #60A5FA;
    --accent-light: rgba(59, 130, 246, 0.15);
    
    --danger: #F87171;
    --success: #34D399;
    --warning: #FBBF24;
    
    --shadow-color: rgba(0, 0, 0, 0.3);
    --icon-color: #94A3B8;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6 { font-weight: 600; color: var(--text-primary); }
p { color: var(--text-secondary); }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

/* Glassmorphism Classes */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -1px var(--shadow-color);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.glass-card:hover {
    box-shadow: 0 10px 15px -3px var(--shadow-color), 0 4px 6px -2px var(--shadow-color);
    transform: translateY(-2px);
}

/* Layout Utilities */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    z-index: 40;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s;
}

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

.nav-item.active {
    background-color: var(--accent);
    color: #FFFFFF;
}

.nav-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Main Content */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Topbar */
.topbar {
    height: 72px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn-primary {
    background-color: var(--accent);
    color: #FFFFFF;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-icon {
    padding: 0.5rem;
    border-radius: 50%;
    background: transparent;
    color: var(--icon-color);
    border: 1px solid transparent;
}

.btn-icon:hover {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.875rem;
}
.form-control {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background-color: var(--bg-surface);
    color: var(--text-primary);
    font-family: inherit;
    transition: all 0.2s;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

/* Content Area */
.content-area {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
}

/* Utilities */
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-muted { color: var(--text-muted); }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.w-full { width: 100%; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-4 { gap: 1rem; }
