:root {
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-hover: #e2e8f0;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.3s ease;
    
    --header-height: 70px;
    --sidebar-width: 280px;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    height: var(--header-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    height: 100%;
    padding: 0 var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 2000px;
    margin: 0 auto;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.logo-section i {
    font-size: 32px;
    color: var(--primary-color);
}

.logo-section h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.header-controls {
    display: flex;
    gap: var(--spacing-sm);
}

.btn-icon {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--text-secondary);
    font-size: 18px;
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--primary-color);
}

.app-main {
    flex: 1;
    display: flex;
    max-width: 2000px;
    width: 100%;
    margin: 0 auto;
    min-height: calc(100vh - var(--header-height));
}

input,
button,
select,
textarea {
    font-family: inherit;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

h2, h3, h4 {
    font-weight: 600;
    color: var(--text-primary);
}

h2 {
    font-size: 20px;
}

h3 {
    font-size: 16px;
}

h4 {
    font-size: 14px;
}

.scrollbar-custom {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.scrollbar-custom::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.scrollbar-custom::-webkit-scrollbar-track {
    background: transparent;
}

.scrollbar-custom::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.scrollbar-custom::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

@media (max-width: 1024px) {
    :root {
        --sidebar-width: 250px;
        --header-height: 60px;
    }
    
    .logo-section h1 {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 100%;
    }
    
    .app-main {
        flex-direction: column;
    }
}