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

:root {
    /* Color Palette - Premium Hybrid Mode */
    --bg-base: #f3f4f6;
    --bg-surface: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.75);
    
    --text-main: #1f2937;
    --text-muted: #6b7280;
    
    --accent-primary: #4f46e5;
    --accent-hover: #4338ca;
    
    --status-green: #10b981;
    --status-yellow: #f59e0b;
    --status-red: #ef4444;
    
    --border-light: rgba(0, 0, 0, 0.08);
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --shadow-glass: 0 4px 30px rgba(0, 0, 0, 0.05);
    
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-base: #111827;
        --bg-surface: #1f2937;
        --bg-glass: rgba(31, 41, 55, 0.75);
        
        --text-main: #f9fafb;
        --text-muted: #9ca3af;
        
        --border-light: rgba(255, 255, 255, 0.08);
        --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
        --shadow-glass: 0 4px 30px rgba(0, 0, 0, 0.2);
    }
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

/* Glassmorphism utility */
.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-glass);
}

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

/* Sidebar */
.sidebar {
    width: 260px;
    height: 100%;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 10;
    transition: var(--transition);
}

.brand {
    font-size: 24px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
}

.nav-item {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
}

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

/* Main Content */
.main-content {
    flex: 1;
    height: 100%;
    overflow-y: auto;
    padding: 32px;
    position: relative;
}

/* Views */
.view {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.view.active {
    display: block;
}

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

/* Cards & Widgets */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.card {
    padding: 24px;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.card-title {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 32px;
    font-weight: 700;
}

/* Forms & Inputs */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
}

input, select {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    background: var(--bg-surface);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: var(--transition);
}

input:focus, select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
    transform: scale(1.02);
}

/* Auth Container */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-box {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: var(--radius-lg);
    text-align: center;
}

.auth-box h2 {
    margin-bottom: 8px;
}

.auth-box p {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.auth-box .btn {
    width: 100%;
    margin-top: 16px;
}

/* Utilities */
.text-green { color: var(--status-green); }
.text-yellow { color: var(--status-yellow); }
.text-red { color: var(--status-red); }

/* Responsive */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        padding: 16px;
        flex-direction: row;
        align-items: center;
        overflow-x: auto;
    }
    
    .nav-links {
        flex-direction: row;
    }
    
    .main-content {
        padding: 16px;
    }
}
