/* === ЦВЕТОВЫЕ ПЕРЕМЕННЫЕ === */
:root {
    /* Светлая тема (по умолчанию) - ВЫСОКАЯ КОНТРАСТНОСТЬ */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --bg-hover: #f3f4f6;
    --text-primary: #111827; /* Очень тёмный, почти чёрный */
    --text-secondary: #374151; /* Тёмно-серый */
    --border-color: #e5e7eb;
    --border-hover: #d1d5db;
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    
    /* Статусы - яркие цвета для светлой темы */
    --status-active-bg: rgba(34, 197, 94, 0.15);
    --status-active-text: #15803d;
    --status-active-border: rgba(34, 197, 94, 0.4);
    --status-suspended-bg: rgba(234, 179, 8, 0.15);
    --status-suspended-text: #a16207;
    --status-suspended-border: rgba(234, 179, 8, 0.4);
    --status-blocked-bg: rgba(239, 68, 68, 0.15);
    --status-blocked-text: #b91c1c;
    --status-blocked-border: rgba(239, 68, 68, 0.4);
    --status-reserved-bg: rgba(59, 130, 246, 0.15);
    --status-reserved-text: #1e40af;
    --status-reserved-border: rgba(59, 130, 246, 0.4);
    --status-pending-bg: rgba(139, 92, 246, 0.15);
    --status-pending-text: #6d28d9;
    --status-pending-border: rgba(139, 92, 246, 0.4);
}

/* Темная тема (неоновая) */
[data-theme="dark"] {
    --bg-primary: #0f0f1e;
    --bg-secondary: #1a1a2e;
    --bg-card: #16213e;
    --bg-input: #1a1a2e;
    --bg-hover: #2a2a3e;
    --text-primary: #e4e4e7;
    --text-secondary: #a1a1aa;
    --border-color: #2a2a3e;
    --border-hover: #3a3a4e;
    --accent-primary: #06b6d4;
    --accent-secondary: #a855f7;
    --accent-gradient: linear-gradient(135deg, #06b6d4, #a855f7);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
    
    --status-active-bg: rgba(34, 197, 94, 0.15);
    --status-active-text: #4ade80;
    --status-active-border: rgba(34, 197, 94, 0.3);
    --status-suspended-bg: rgba(234, 179, 8, 0.15);
    --status-suspended-text: #facc15;
    --status-suspended-border: rgba(234, 179, 8, 0.3);
    --status-blocked-bg: rgba(239, 68, 68, 0.15);
    --status-blocked-text: #f87171;
    --status-blocked-border: rgba(239, 68, 68, 0.3);
    --status-reserved-bg: rgba(59, 130, 246, 0.15);
    --status-reserved-text: #60a5fa;
    --status-reserved-border: rgba(59, 130, 246, 0.3);
    --status-pending-bg: rgba(168, 85, 247, 0.15);
    --status-pending-text: #c084fc;
    --status-pending-border: rgba(168, 85, 247, 0.3);
}

/* === БАЗОВЫЕ СТИЛИ === */
* {
    box-sizing: border-box;
}

html, body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overscroll-behavior-y: contain;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* === КОМПОНЕНТЫ === */
.glow-border {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    position: relative;
    transition: all 0.3s;
}

[data-theme="dark"] .glow-border::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: var(--accent-gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

[data-theme="dark"] .glow-border:hover::after {
    opacity: 1;
}

.input-field {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: all 0.2s;
}

.input-field:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

[data-theme="dark"] .input-field:focus {
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    transition: all 0.2s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.15);
}

/* === СТАТУСЫ === */
.status-active {
    background: var(--status-active-bg);
    color: var(--status-active-text);
    border: 1px solid var(--status-active-border);
}

.status-suspended {
    background: var(--status-suspended-bg);
    color: var(--status-suspended-text);
    border: 1px solid var(--status-suspended-border);
}

.status-blocked {
    background: var(--status-blocked-bg);
    color: var(--status-blocked-text);
    border: 1px solid var(--status-blocked-border);
}

.status-reserved {
    background: var(--status-reserved-bg);
    color: var(--status-reserved-text);
    border: 1px solid var(--status-reserved-border);
}

.status-pending {
    background: var(--status-pending-bg);
    color: var(--status-pending-text);
    border: 1px solid var(--status-pending-border);
}

/* === КНОПКИ === */
.btn-action {
    transition: all 0.2s;
}

.btn-action:hover:not(:disabled) {
    transform: translateY(-1px);
}

.btn-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === ПЕРЕКЛЮЧАТЕЛЬ ТЕМЫ === */
.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.theme-toggle:hover {
    border-color: var(--accent-primary);
    background: var(--bg-hover);
}

/* === ПРОФИЛЬ === */
.profile-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px 12px 8px 16px;
    transition: all 0.2s;
}

.profile-card:hover {
    border-color: var(--border-hover);
}

[data-theme="dark"] .profile-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

.profile-avatar {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

[data-theme="dark"] .profile-avatar {
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
}

.profile-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.profile-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.profile-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.profile-logout {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
}

.profile-logout:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    transform: translateX(2px);
}

/* === TOGGLE PASSWORD === */
.toggle-password {
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.toggle-password:hover {
    color: var(--accent-primary);
}

/* === АНИМАЦИИ === */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

/* === СКРОЛЛБАР === */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* === УТИЛИТЫ === */
.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}