/* ============================================
   ROOT VARIABLES
   ============================================ */
:root {
    /* Базовые цвета */
    --color-bg-primary: #0a0e17;
    --color-bg-secondary: #111827;
    --color-bg-card: #1a2332;
    --color-bg-card-hover: #1f2b3d;
    --color-bg-sidebar: #0d111c;
    --color-bg-input: #0d111c;
    --color-border: #2a3a4a;
    --color-border-light: #3a4a5a;
    --color-border-hover: #4a5a6a;
    
    /* Текст — улучшенная контрастность для тёмной темы */
    --color-text-primary: #e8edf5;
    --color-text-secondary: #a0b0c0;
    --color-text-muted: #7a8a9a;
    --color-text-inverse: #0a0e17;
    
    /* Акценты */
    --color-gold: #f0c27f;
    --color-gold-dark: #c8954e;
    --color-gold-light: #f5d6a8;
    --color-gold-gradient: linear-gradient(135deg, #f0c27f 0%, #d4a85e 100%);
    
    --color-blue: #4fc3f7;
    --color-green: #66bb6a;
    --color-red: #ef5350;
    --color-orange: #ffa726;
    --color-purple: #ab47bc;
    --color-pink: #ec407a;
    --color-cyan: #26c6da;
    --color-teal: #4dd0e1;
    
    /* Статусы */
    --color-status-active: #66bb6a;
    --color-status-paused: #ffa726;
    --color-status-finished: #4fc3f7;
    --color-status-cancelled: #ef5350;
    --color-status-draft: #7a8a9a;
    --color-status-planning: #ffa726;
    --color-status-ready: #66bb6a;
    --color-status-archived: #4a5a6a;
    
    /* Размеры */
    --size-sidebar-width: 250px;
    --size-sidebar-collapsed: 70px;
    --size-header-height: 60px;
    --size-footer-height: 44px;
    
    /* Отступы */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 48px;
    
    /* Скругления */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Тени */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 40px 80px rgba(0, 0, 0, 0.8);
    --shadow-glow: 0 0 40px rgba(240, 194, 127, 0.15);
    --shadow-glow-blue: 0 0 40px rgba(79, 195, 247, 0.1);
    
    /* Анимации */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Шрифты */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-size-xs: 11px;
    --font-size-sm: 13px;
    --font-size-md: 15px;
    --font-size-lg: 18px;
    --font-size-xl: 24px;
    --font-size-2xl: 32px;
    --font-size-3xl: 40px;
    
    /* Z-индексы */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-sidebar: 1030;
    --z-modal: 1040;
    --z-popover: 1050;
    --z-tooltip: 1060;
    --z-toast: 1070;
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-primary);
}

/* Display-шрифт для заголовков — «космическое» настроение сторителлинга */
h1, h2, .logo-text {
    font-family: 'Playfair Display', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }
h5 { font-size: var(--font-size-md); }
h6 { font-size: var(--font-size-sm); }

a {
    color: var(--color-gold);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-gold-light);
}

.text-gold { color: var(--color-gold); }
.text-muted { color: var(--color-text-muted); }
.text-secondary { color: var(--color-text-secondary); }

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gold-dark);
}

/* ============================================
   SELECTION
   ============================================ */
::selection {
    background: var(--color-gold);
    color: var(--color-text-inverse);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gap-xs { gap: var(--spacing-xs); }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

/* ============================================
   PAGE TRANSITION — плавное появление контента
   ============================================ */
.page-content {
    animation: fadeIn 0.35s ease both;
}

/* ============================================
   BREADCRUMB (глобальная тёмная тема для
   встроенных <ol class="breadcrumb">)
   ============================================ */
.breadcrumb {
    background: transparent;
    margin: 0;
    padding: 0;
}

.breadcrumb-item {
    font-size: var(--font-size-sm);
}

.breadcrumb-item a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb-item a:hover {
    color: var(--color-gold);
}

.breadcrumb-item.active {
    color: var(--color-text-primary);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--color-text-muted);
}
