/**
 * 🎨 Business1 Main Styles
 * Основные стили приложения
 * 
 * ПРИМЕЧАНИЕ: User dropdown и auth стили перенесены в css/modules/auth-ui.css
 */

/* Импорт улучшенных стилей для клиентов */
@import url('./modules/clients-improved.css');

:root {
    /* Colors */
    --primary: #4f46e5;
    --secondary: #6366f1; 
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --light: #f8fafc;
    --dark: #1e293b;
    
    /* Text colors - DARK THEME BY DEFAULT */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    /* Background colors - DARK THEME BY DEFAULT */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-accent: #334155;
    
    /* Borders - DARK THEME BY DEFAULT */
    --border-light: #334155;
    --border-medium: #475569;
    
    /* Shadows - adjusted for dark theme */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Typography */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
}

/* Light theme (optional) */
[data-theme="light"] {
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-accent: #f1f5f9;
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --shadow-sm: 0 1px 2px 0 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);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s, color 0.3s;
}

/* ===== LAYOUT УПРАВЛЯЕТСЯ ЧЕРЕЗ layout.css ===== */
/* 
 * Все основные layout стили (header, sidebar, main-content) 
 * перенесены в layout.css для централизованного управления.
 * Здесь остались только модульные стили.
 */

/* Dashboard Module Styles */
.dashboard-module {
    width: 100%;
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
    position: relative; /* Явно задаем позицию */
    z-index: 1; /* Низкий z-index для dashboard модулей */
}

.dashboard-module .module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
}

.dashboard-module h2 {
    color: var(--text-primary);
    font-size: var(--font-size-xl);
    font-weight: 600;
}

.last-update {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* Loading states - управляется через layout.css */

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-light);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--spacing-md);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

h1 { font-size: var(--font-size-2xl); }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }

/* Responsive правила перенесены в layout.css */
