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

:root {
    /* Color Palette */
    --primary-color: #4f46e5;      /* Indigo 600 */
    --primary-hover: #4338ca;
    --bg-color: #0f172a;           /* Slate 900 */
    --surface-color: rgba(30, 41, 59, 0.7); /* Glass surface */
    --surface-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    
    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Glassmorphism Specs */
    --glass-blur: blur(16px);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    /* Transitions */
    --transition-fast: 0.2s ease;

    /* Sizes */
    --sidebar-width: 260px;
}

[data-theme="light"] {
    --bg-color: #f1f5f9;
    --surface-color: rgba(255, 255, 255, 0.8);
    --surface-border: rgba(0, 0, 0, 0.05);
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

/* Typography elements */
h1, h2, h3, h4 { color: var(--text-primary); font-weight: 600; }
p { color: var(--text-secondary); line-height: 1.6; }

/* Reusable Glass Card */
.glass-panel {
    background: var(--surface-color);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    padding: 1.5rem;
}

/* Layout */
#app-container {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--surface-color);
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--surface-border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
}

.brand {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary-color);
}
.brand i {
    font-size: 1.8rem;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.nav-item:hover, .nav-item.active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.nav-item i {
    font-size: 1.25rem;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100vh;
    overflow-y: auto;
}

/* Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--surface-border);
    margin-bottom: 1rem;
}

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

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 700;
}

/* Buttons and Inputs */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: none;
    background: var(--primary-color);
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--surface-border);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background: var(--surface-border);
    transform: none;
    box-shadow: none;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--surface-border);
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all var(--transition-fast);
}

[data-theme="light"] .form-control {
    background: rgba(255, 255, 255, 0.5);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* Login specific */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    background: url('https://images.unsplash.com/photo-1620121478247-400fe4f51e04?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
}

.login-glass {
    width: 100%;
    max-width: 400px;
}

.login-glass h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
}
.stat-card .title {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
}
.stat-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
}
