/* ============================================
   КУХНИ НА ПАНИНА — SaaS Admin Theme
   Premium UI: Linear / Vercel уровень
   ============================================ */

/* ========== ПЕРЕМЕННЫЕ ========== */
:root {
    /* Фон */
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f8fafc;
    --bg-sidebar: rgba(255, 255, 255, 0.75);
    --bg-elevated: #ffffff;
    --bg-floating: rgba(255, 255, 255, 0.9);
    
    /* Текст */
    --text-primary: #1a1a2e;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    /* Границы */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    /* Акценты */
    --accent-blue: #3B82F6;
    --accent-blue-hover: #2563eb;
    --accent-green: #22C55E;
    --accent-green-hover: #16a34a;
    --accent-orange: #F59E0B;
    --accent-red: #EF4444;
    
    /* Тени */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.04), 0 8px 20px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.08);
    --shadow-card: 0 0 0 1px rgba(0,0,0,0.02), 0 1px 3px rgba(0,0,0,0.03), 0 4px 12px rgba(0,0,0,0.03);
    
    /* Радиусы */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Размеры */
    --sidebar-width: 260px;
    --topbar-height: 64px;
    
    /* Анимации */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;
}

/* ========== СБРОС ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== БАЗОВЫЕ СТИЛИ ========== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

/* ========== СЕТКА LAYOUT ========== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    backdrop-filter: blur(12px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    box-shadow: 0 0 0 1px var(--border-color), 
                0 10px 30px rgba(0,0,0,0.04);
}

/* Main */
.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Topbar */
.app-topbar {
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Content */
.app-content {
    flex: 1;
    padding: 32px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* ========== ТИПОГРАФИКА ========== */
h1, h2, h3 {
    line-height: 1.2;
}

h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; }
h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.3px; }
h3 { font-size: 18px; font-weight: 600; }
h4 { font-size: 16px; font-weight: 500; }

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 28px;
    letter-spacing: -0.6px;
}

.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-positive { color: var(--accent-green); }
.text-negative { color: var(--accent-red); }

/* ========== УТИЛИТЫ ========== */
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.w-full { width: 100%; }

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 16px 0;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { 
    background: rgba(148, 163, 184, 0.5); 
    border-radius: 3px; 
}
::-webkit-scrollbar-thumb:hover { 
    background: rgba(148, 163, 184, 0.7); 
}

/* ========== БАЗОВЫЙ АДАПТИВ ========== */
@media (max-width: 1024px) {
    .app-main { margin-left: 0; }
    .app-topbar { padding: 0 16px; }
    .app-content { padding: 20px; }
}