/**
 * ZORIN Member - Интегрированная система стилей
 * Объединяет лучшие элементы из combined.css, public.css, base.css и всех стилей из /lk
 * Создает единую, последовательную стилевую систему для всей платформы
 */

/* ========================================
   1. CSS ПЕРЕМЕННЫЕ И ОСНОВЫ
   ======================================== */

:root {
    /* Основные цвета */
    --primary-color: #0088cc;
    --primary-color-hover: #006699;
    --primary-color-light: #e6f3ff;
    --primary-light: rgba(0, 136, 204, 0.1);
    --primary-dark: #006699;
    --primary-gradient: linear-gradient(135deg, #0088cc 0%, #0066aa 100%);
    
    /* Цветовая палитра */
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    
    /* Фоны светлой темы */
    --bg-color: #ffffff;
    --bg-secondary: #f8f9fa;
    --card-bg: #ffffff;
    --light-bg: #ffffff;
    --light-bg-alt: #f8f9fa;
    
    /* Фоны темной темы */
    --dark-bg: #18222d;
    --dark-bg-alt: #212e3c;
    
    /* Текст светлой темы */
    --text-color: #212529;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --light-text: #2c2c2c;
    --light-text-secondary: #6c757d;
    
    /* Текст темной темы */
    --dark-text: #e9ecef;
    --dark-text-secondary: #adb5bd;
    
    /* Границы */
    --border-color: #dee2e6;
    --border-light: #e9ecef;
    
    /* Тени */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --shadow-light: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.25);
    
    /* Радиусы скругления */
    --border-radius: 0.375rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    
    /* Переходы */
    --transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
    
    /* Шрифты */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    
    /* Отступы */
    --section-padding: 100px 0;
}

/* Темная тема */
[data-theme="dark"],
body.dark-mode {
    --primary-color: #4dabf7;
    --primary-color-hover: #339af0;
    --text-color: #f8f9fa;
    --text-secondary: #adb5bd;
    --text-muted: #6c757d;
    --bg-color: #212529;
    --bg-secondary: #343a40;
    --card-bg: #343a40;
    --border-color: #495057;
    --border-light: #495057;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.7);
}

/* ========================================
   2. СБРОС И БАЗОВЫЕ СТИЛИ
   ======================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    transition: var(--transition);
}

*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-family: var(--font-family);
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

body {
    margin: 0;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-secondary);
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
    min-height: 100vh;
}

body.dark-mode {
    background-color: var(--dark-bg);
    color: var(--dark-text);
}

/* ========================================
   3. ТИПОГРАФИКА
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-color);
    letter-spacing: -0.02em;
}

body.dark-mode h1,
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4, 
body.dark-mode h5, 
body.dark-mode h6 {
    color: var(--dark-text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

body.dark-mode p {
    color: var(--dark-text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

a:hover {
    color: var(--primary-color-hover);
}

/* Градиентный текст */
.text-gradient {
    background: linear-gradient(90deg, var(--primary-color), #00a1ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

/* ========================================
   4. КНОПКИ
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-color);
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-2px);
}

.btn:focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 186, 0.25);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Основные варианты кнопок */
.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.2);
}

.btn-primary:hover {
    color: #fff;
    background-color: var(--primary-color-hover);
    border-color: var(--primary-color-hover);
    box-shadow: 0 10px 25px rgba(0, 136, 204, 0.3);
}

.btn-secondary {
    color: #fff;
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-success {
    color: #fff;
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-danger {
    color: #fff;
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-warning {
    color: #212529;
    background-color: var(--warning-color);
    border-color: var(--warning-color);
}

.btn-info {
    color: #fff;
    background-color: var(--info-color);
    border-color: var(--info-color);
}

/* Контурные кнопки */
.btn-outline,
.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: transparent;
    box-shadow: none;
}

.btn-outline:hover,
.btn-outline-primary:hover {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Размеры кнопок */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.25rem;
    border-radius: 0.5rem;
}

/* Иконки в кнопках */
.btn svg {
    width: 1rem;
    height: 1rem;
}

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Текстовые кнопки */
.btn-text {
    background: none;
    border: none;
    color: var(--primary-color);
    padding: 0.5rem 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.btn-text:hover {
    background-color: var(--primary-light);
}

/* ========================================
   5. ФОРМЫ
   ======================================== */

.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--bg-color);
    background-image: none;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

body.dark-mode .form-control {
    color: var(--dark-text);
    background-color: var(--dark-bg-alt);
    border-color: var(--dark-bg);
}

.form-control:focus {
    color: var(--text-color);
    background-color: var(--bg-color);
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

body.dark-mode .form-control:focus {
    color: var(--dark-text);
    background-color: var(--dark-bg-alt);
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

/* Группы форм */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label,
.form-group label {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

body.dark-mode .form-label,
body.dark-mode .form-group label {
    color: var(--dark-text);
}

/* Дополнительные стили форм */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
}

body.dark-mode input[type="text"],
body.dark-mode input[type="email"],
body.dark-mode input[type="password"],
body.dark-mode input[type="number"],
body.dark-mode input[type="date"],
body.dark-mode select,
body.dark-mode textarea {
    border-color: var(--dark-bg);
    background-color: var(--dark-bg-alt);
    color: var(--dark-text);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Чекбоксы и радиокнопки */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.form-checkbox input[type="checkbox"],
.form-checkbox input[type="radio"] {
    width: 1.125rem;
    height: 1.125rem;
    margin: 0;
    accent-color: var(--primary-color);
}

.form-checkbox label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
}

/* Текст подсказок */
.form-group small,
small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

body.dark-mode .form-group small,
body.dark-mode small {
    color: var(--dark-text-secondary);
}

/* ========================================
   6. КАРТОЧКИ
   ======================================== */

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: var(--card-bg);
    background-clip: border-box;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

body.dark-mode .card {
    background-color: var(--dark-bg-alt);
    box-shadow: var(--shadow-dark);
    border-color: var(--dark-bg);
}

.card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

body.dark-mode .card:hover {
    box-shadow: var(--shadow-dark);
}

.card-body,
.card-content {
    flex: 1 1 auto;
    padding: 1.5rem;
}

.card-header {
    padding: 1rem 1.5rem;
    margin-bottom: 0;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    border-top-left-radius: calc(var(--border-radius-lg) - 1px);
    border-top-right-radius: calc(var(--border-radius-lg) - 1px);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body.dark-mode .card-header {
    background-color: var(--dark-bg);
    border-bottom-color: var(--dark-bg);
}

.card-footer {
    padding: 1rem 1.5rem;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom-right-radius: calc(var(--border-radius-lg) - 1px);
    border-bottom-left-radius: calc(var(--border-radius-lg) - 1px);
    display: flex;
    justify-content: center;
}

body.dark-mode .card-footer {
    background-color: var(--dark-bg);
    border-top-color: var(--dark-bg);
}

.card-title {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

body.dark-mode .card-title {
    color: var(--dark-text);
}

.card-text {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

body.dark-mode .card-text {
    color: var(--dark-text-secondary);
}

/* ========================================
   7. НАВИГАЦИЯ И МЕНЮ
   ======================================== */

/* Основная навигация */
.main-nav {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body.dark-mode .main-nav {
    background: var(--dark-bg-alt);
    border-bottom-color: var(--dark-bg);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

body.dark-mode .nav-logo {
    color: var(--dark-text);
}

.nav-logo:hover {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

body.dark-mode .nav-link {
    color: var(--dark-text);
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ========================================
   8. САЙДБАР ДЛЯ ЛК
   ======================================== */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    background-color: var(--light-bg);
    box-shadow: var(--shadow-light);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow-y: auto;
}

body.dark-mode .sidebar {
    background-color: var(--dark-bg-alt);
    box-shadow: var(--shadow-dark);
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    border-bottom: 1px solid var(--light-bg-alt);
}

body.dark-mode .sidebar-header {
    border-bottom-color: var(--dark-bg);
}

.sidebar .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--light-text);
    font-weight: 700;
    font-size: 1.25rem;
}

body.dark-mode .sidebar .logo {
    color: var(--dark-text);
}

.sidebar.collapsed .logo span {
    display: none;
}

/* Меню сайдбара */
.sidebar-menu,
.sidebar-nav {
    padding: 1.25rem 0;
    flex-grow: 1;
}

/* Переопределение nav-menu для вертикального отображения в sidebar */
.sidebar-nav .nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
}

.sidebar-nav .nav-item {
    width: 100%;
    margin-bottom: 0.25rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: var(--light-text);
    text-decoration: none;
    border-radius: 0.5rem;
    margin: 0 0.625rem;
    transition: var(--transition);
    gap: 0.75rem;
    width: calc(100% - 1.25rem);
}

body.dark-mode .sidebar-nav .nav-link {
    color: var(--dark-text);
}

.sidebar-nav .nav-link:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.sidebar-nav .nav-link.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
}

.sidebar-nav .nav-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.sidebar-nav .nav-text {
    flex: 1;
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-nav .nav-text {
    display: none;
}

.sidebar-menu ul,
.sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-menu li,
.sidebar-nav li {
    margin-bottom: 0.25rem;
}

.sidebar-menu a,
.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: var(--light-text);
    text-decoration: none;
    border-radius: 0.5rem;
    margin: 0 0.625rem;
    transition: var(--transition);
    gap: 0.75rem;
}

body.dark-mode .sidebar-menu a,
body.dark-mode .sidebar-nav a {
    color: var(--dark-text);
}

.sidebar-menu a:hover,
.sidebar-nav a:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.sidebar-menu a.active,
.sidebar-nav a.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
}

.sidebar-menu svg,
.sidebar-nav svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.sidebar.collapsed .sidebar-menu span,
.sidebar.collapsed .sidebar-nav span {
    display: none;
}

/* Разделители в сайдбаре */
.sidebar-divider,
.section-divider {
    margin: 1.25rem 0 0.625rem 0;
    padding: 0 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--light-text-secondary);
    border-bottom: 1px solid var(--light-bg-alt);
    padding-bottom: 0.3125rem;
}

body.dark-mode .sidebar-divider,
body.dark-mode .section-divider {
    color: var(--dark-text-secondary);
    border-bottom-color: var(--dark-bg);
}

.sidebar.collapsed .sidebar-divider,
.sidebar.collapsed .section-divider {
    display: none;
}

/* Подвал сайдбара */
.sidebar-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--light-bg-alt);
}

body.dark-mode .sidebar-footer {
    border-top-color: var(--dark-bg);
}

/* ========================================
   9. ОСНОВНОЙ КОНТЕНТ ЛК
   ======================================== */

.main-content {
    margin-left: 280px;
    padding: 1.25rem;
    transition: var(--transition);
    min-height: 100vh;
}

body.sidebar-collapsed .main-content {
    margin-left: 80px;
}

/* Верхняя панель */
.main-header,
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--light-bg-alt);
}

body.dark-mode .main-header,
body.dark-mode .top-bar {
    border-bottom-color: var(--dark-bg-alt);
}

.header-left h1 {
    margin: 0;
    font-size: 1.75rem;
    color: var(--light-text);
}

body.dark-mode .header-left h1 {
    color: var(--dark-text);
}

.header-right,
.top-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* Профиль пользователя */
.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.dropdown-toggle:hover {
    background-color: var(--light-bg-alt);
}

body.dark-mode .dropdown-toggle:hover {
    background-color: var(--dark-bg);
}

.avatar,
.avatar-placeholder {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    font-size: 1.125rem;
    text-transform: uppercase;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.username {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--light-text);
}

body.dark-mode .username {
    color: var(--dark-text);
}

.user-role,
.status {
    font-size: 0.75rem;
    color: var(--light-text-secondary);
}

body.dark-mode .user-role,
body.dark-mode .status {
    color: var(--dark-text-secondary);
}

/* Dropdown меню */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    min-width: 12rem;
    z-index: 1000;
    display: none;
    overflow: hidden;
}

body.dark-mode .dropdown-menu {
    background-color: var(--dark-bg-alt);
    border-color: var(--dark-bg);
    box-shadow: var(--shadow-dark);
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

body.dark-mode .dropdown-item {
    color: var(--dark-text);
}

.dropdown-item:hover {
    background-color: var(--light-bg-alt);
    color: var(--primary-color);
}

body.dark-mode .dropdown-item:hover {
    background-color: var(--dark-bg);
}

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

body.dark-mode .dropdown-divider {
    background-color: var(--dark-bg);
}

/* ========================================
   10. КОМПОНЕНТЫ ДАШБОРДА
   ======================================== */

/* Сетка дашборда */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

/* Статистические карточки */
.stat-card {
    background: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

body.dark-mode .stat-card {
    background: var(--dark-bg-alt);
    box-shadow: var(--shadow-dark);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

body.dark-mode .stat-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    background: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.stat-card:hover .stat-icon {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--light-text);
    line-height: 1;
    margin-bottom: 0.375rem;
    letter-spacing: -0.02em;
}

body.dark-mode .stat-number {
    color: var(--dark-text);
}


/* Stats row (subscriptions, dashboard) */
.stats-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    padding: 1.25rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-lg);
    min-width: 140px;
}

body.dark-mode .stat-item {
    background: var(--dark-bg-alt);
    border-color: var(--dark-bg);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

body.dark-mode .stat-value {
    color: var(--dark-text);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--light-text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

body.dark-mode .stat-label {
    color: var(--dark-text-secondary);
}

/* Баланс */
.balance-display,
.balance-summary {
    background: linear-gradient(135deg, var(--primary-light), rgba(0, 136, 204, 0.05));
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.25rem;
    text-align: center;
}

body.dark-mode .balance-display,
body.dark-mode .balance-summary {
    background: linear-gradient(135deg, rgba(0, 136, 204, 0.15), rgba(0, 136, 204, 0.05));
}

.balance-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.balance-label {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* Действия с балансом */
.balance-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.balance-actions .btn {
    flex: 1;
    min-width: 6rem;
}

/* ========================================
   11. ТРАНЗАКЦИИ И ФИНАНСЫ
   ======================================== */

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--light-bg-alt);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

body.dark-mode .transaction-item {
    background-color: var(--dark-bg);
}

.transaction-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

body.dark-mode .transaction-item:hover {
    box-shadow: var(--shadow-dark);
}

.transaction-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.transaction-icon.deposit,
.transaction-icon.income {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.transaction-icon.withdrawal,
.transaction-icon.purchase {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.transaction-icon.transfer {
    background-color: rgba(23, 162, 184, 0.1);
    color: var(--info-color);
}

.transaction-icon.subscription {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
}

.transaction-details,
.transaction-info {
    flex-grow: 1;
    min-width: 0;
}

.transaction-description,
.transaction-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--light-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

body.dark-mode .transaction-description,
body.dark-mode .transaction-name {
    color: var(--dark-text);
}

.transaction-date,
.transaction-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--light-text-secondary);
}

body.dark-mode .transaction-date,
body.dark-mode .transaction-meta {
    color: var(--dark-text-secondary);
}

.transaction-amount {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    gap: 0.25rem;
}

.amount {
    font-weight: 600;
    font-size: 0.875rem;
}

.transaction-amount.positive .amount {
    color: var(--success-color);
}

.transaction-amount.negative .amount {
    color: var(--danger-color);
}

/* Статусы транзакций */
.status,
.transaction-status {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-completed {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.status-pending {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
}

.status-failed,
.status-cancelled {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

/* ========================================
   12. УВЕДОМЛЕНИЯ
   ======================================== */

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.notification-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    background-color: var(--light-bg-alt);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

body.dark-mode .notification-item {
    background-color: var(--dark-bg);
}

.notification-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

body.dark-mode .notification-item:hover {
    box-shadow: var(--shadow-dark);
}

.notification-unread {
    border-left: 4px solid var(--primary-color);
}

.notification-unread::before {
    content: '';
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: var(--primary-color);
}

.notification-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--light-text);
    background-color: var(--light-bg);
}

body.dark-mode .notification-icon {
    color: var(--dark-text);
    background-color: var(--dark-bg-alt);
}

.notification-icon.system {
    background-color: rgba(23, 162, 184, 0.1);
    color: var(--info-color);
}

.notification-icon.payment {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.notification-icon.subscription {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
}

.notification-content {
    flex-grow: 1;
    overflow: hidden;
}

.notification-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--light-text);
    margin-bottom: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

body.dark-mode .notification-title {
    color: var(--dark-text);
}

.notification-message {
    font-size: 0.875rem;
    color: var(--light-text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.dark-mode .notification-message {
    color: var(--dark-text-secondary);
}

.notification-time {
    font-size: 0.75rem;
    color: var(--light-text-secondary);
}

body.dark-mode .notification-time {
    color: var(--dark-text-secondary);
}

/* ========================================
   13. БЕЙДЖИ И ИНДИКАТОРЫ
   ======================================== */

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-primary {
    color: #fff;
    background-color: var(--primary-color);
}

.badge-secondary {
    color: #fff;
    background-color: var(--secondary-color);
}

.badge-success {
    color: #fff;
    background-color: var(--success-color);
}

.badge-danger {
    color: #fff;
    background-color: var(--danger-color);
}

.badge-warning {
    color: #212529;
    background-color: var(--warning-color);
}

.badge-info {
    color: #fff;
    background-color: var(--info-color);
}

.badge-light {
    color: #212529;
    background-color: var(--light-color);
}

.badge-dark {
    color: #fff;
    background-color: var(--dark-color);
}

/* Author verification badges */
.author-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    vertical-align: middle;
    line-height: 1;
    white-space: nowrap;
    margin-left: 5px;
    text-transform: none;
    letter-spacing: 0;
}
.author-badge-official {
    background: rgba(29, 155, 240, 0.12);
    color: #1d9bf0;
    border: 1px solid rgba(29, 155, 240, 0.3);
}
body.dark-mode .author-badge-official {
    background: rgba(29, 155, 240, 0.18);
    border-color: rgba(29, 155, 240, 0.4);
}
.author-badge-mirror {
    background: rgba(128, 128, 128, 0.1);
    color: var(--text-secondary);
    border: 1px solid rgba(128, 128, 128, 0.25);
}

/* Статусные бейджи */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 1.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: var(--transition);
}

.status-active {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.status-beta {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.status-coming-soon {
    background: rgba(23, 162, 184, 0.1);
    color: var(--info-color);
    border: 1px solid rgba(23, 162, 184, 0.2);
}

.status-inactive {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.2);
}

/* ========================================
   14. МОДАЛЬНЫЕ ОКНА
   ======================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    display: none;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal.show,
.modal.visible {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 0.5rem;
    pointer-events: none;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 500px;
    pointer-events: auto;
    background-color: var(--card-bg);
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    outline: 0;
}

body.dark-mode .modal-content {
    background-color: var(--dark-bg-alt);
    border-color: var(--dark-bg);
    box-shadow: var(--shadow-dark);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    border-top-left-radius: calc(var(--border-radius-lg) - 1px);
    border-top-right-radius: calc(var(--border-radius-lg) - 1px);
}

body.dark-mode .modal-header {
    border-bottom-color: var(--dark-bg);
}

.modal-title {
    margin-bottom: 0;
    line-height: 1.5;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

body.dark-mode .modal-title {
    color: var(--dark-text);
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    border-bottom-right-radius: calc(var(--border-radius-lg) - 1px);
    border-bottom-left-radius: calc(var(--border-radius-lg) - 1px);
    gap: 0.75rem;
}

body.dark-mode .modal-footer {
    border-top-color: var(--dark-bg);
}

.close-modal {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: var(--transition);
}

body.dark-mode .close-modal {
    color: var(--dark-text-secondary);
}

.close-modal:hover {
    background-color: var(--light-bg-alt);
    color: var(--text-color);
}

body.dark-mode .close-modal:hover {
    background-color: var(--dark-bg);
    color: var(--dark-text);
}

/* ========================================
   15. АЛЕРТЫ И УВЕДОМЛЕНИЯ
   ======================================== */

.alert {
    position: relative;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert svg {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.alert-primary {
    color: #004085;
    background-color: #d1ecf1;
    border-color: #b8daff;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger,
.alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* Toast уведомления */
.toast,
.notification {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    color: white;
    font-weight: 600;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background-color: var(--light-bg);
    box-shadow: var(--shadow-light);
    max-width: 350px;
}

body.dark-mode .toast,
body.dark-mode .notification {
    background-color: var(--dark-bg-alt);
    box-shadow: var(--shadow-dark);
}

.toast.show,
.toast.visible,
.notification.visible {
    transform: translateX(0);
}

.toast.success,
.notification-success {
    border-left: 4px solid var(--success-color);
}

.toast.error,
.notification-error {
    border-left: 4px solid var(--danger-color);
}

.toast.warning {
    border-left: 4px solid var(--warning-color);
}

/* ========================================
   16. КОНТЕЙНЕРЫ И СЕТКИ
   ======================================== */

.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

.container-fluid {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* Сетки */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col {
    flex-basis: 0;
    flex-grow: 1;
    max-width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-auto {
    flex: 0 0 auto;
    width: auto;
    max-width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* ========================================
   17. УТИЛИТАРНЫЕ КЛАССЫ
   ======================================== */

/* Отображение */
.d-none { display: none !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-block { display: block !important; }
.d-table { display: table !important; }
.d-table-row { display: table-row !important; }
.d-table-cell { display: table-cell !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid { display: grid !important; }

/* Flexbox */
.justify-content-start { justify-content: flex-start !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }

.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-baseline { align-items: baseline !important; }
.align-items-stretch { align-items: stretch !important; }

.flex-column { flex-direction: column !important; }
.flex-row { flex-direction: row !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.flex-1 { flex: 1 !important; }

/* Текст */
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
.text-center { text-align: center !important; }

.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-success { color: var(--success-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-info { color: var(--info-color) !important; }
.text-light { color: var(--light-color) !important; }
.text-dark { color: var(--dark-color) !important; }
.text-muted { color: var(--text-muted) !important; }

/* Фоны */
.bg-primary { background-color: var(--primary-color) !important; }
.bg-secondary { background-color: var(--secondary-color) !important; }
.bg-success { background-color: var(--success-color) !important; }
.bg-danger { background-color: var(--danger-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.bg-info { background-color: var(--info-color) !important; }
.bg-light { background-color: var(--light-color) !important; }
.bg-dark { background-color: var(--dark-color) !important; }
.bg-card { background-color: var(--card-bg) !important; }
.bg-background { background-color: var(--bg-secondary) !important; }

/* Границы */
.border { border: 1px solid var(--border-color) !important; }
.border-top { border-top: 1px solid var(--border-color) !important; }
.border-right { border-right: 1px solid var(--border-color) !important; }
.border-bottom { border-bottom: 1px solid var(--border-color) !important; }
.border-left { border-left: 1px solid var(--border-color) !important; }

.border-0 { border: 0 !important; }
.border-top-0 { border-top: 0 !important; }
.border-right-0 { border-right: 0 !important; }
.border-bottom-0 { border-bottom: 0 !important; }
.border-left-0 { border-left: 0 !important; }

.rounded { border-radius: var(--border-radius) !important; }
.rounded-sm { border-radius: 0.25rem !important; }
.rounded-lg { border-radius: var(--border-radius-lg) !important; }
.rounded-xl { border-radius: var(--border-radius-xl) !important; }
.rounded-circle { border-radius: 50% !important; }
.rounded-full { border-radius: 50% !important; }
.rounded-0 { border-radius: 0 !important; }

/* Отступы */
.m-0 { margin: 0 !important; }
.m-1 { margin: 0.25rem !important; }
.m-2 { margin: 0.5rem !important; }
.m-3 { margin: 1rem !important; }
.m-4 { margin: 1.5rem !important; }
.m-5 { margin: 3rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.ml-0 { margin-left: 0 !important; }
.ml-1 { margin-left: 0.25rem !important; }
.ml-2 { margin-left: 0.5rem !important; }
.ml-3 { margin-left: 1rem !important; }
.ml-4 { margin-left: 1.5rem !important; }
.ml-5 { margin-left: 3rem !important; }

.mr-0 { margin-right: 0 !important; }
.mr-1 { margin-right: 0.25rem !important; }
.mr-2 { margin-right: 0.5rem !important; }
.mr-3 { margin-right: 1rem !important; }
.mr-4 { margin-right: 1.5rem !important; }
.mr-5 { margin-right: 3rem !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }

.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: 0.25rem !important; }
.pt-2 { padding-top: 0.5rem !important; }
.pt-3 { padding-top: 1rem !important; }
.pt-4 { padding-top: 1.5rem !important; }
.pt-5 { padding-top: 3rem !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: 0.25rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }
.pb-3 { padding-bottom: 1rem !important; }
.pb-4 { padding-bottom: 1.5rem !important; }
.pb-5 { padding-bottom: 3rem !important; }

.pl-0 { padding-left: 0 !important; }
.pl-1 { padding-left: 0.25rem !important; }
.pl-2 { padding-left: 0.5rem !important; }
.pl-3 { padding-left: 1rem !important; }
.pl-4 { padding-left: 1.5rem !important; }
.pl-5 { padding-left: 3rem !important; }

.pr-0 { padding-right: 0 !important; }
.pr-1 { padding-right: 0.25rem !important; }
.pr-2 { padding-right: 0.5rem !important; }
.pr-3 { padding-right: 1rem !important; }
.pr-4 { padding-right: 1.5rem !important; }
.pr-5 { padding-right: 3rem !important; }

/* Тени */
.shadow-none { box-shadow: none !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

/* Позиционирование */
.position-static { position: static !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; }

/* ========================================
   18. СПЕЦИАЛЬНЫЕ КОМПОНЕНТЫ
   ======================================== */

/* Переключатели */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 24px;
    display: inline-block;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 24px;
    transition: var(--transition);
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-switch input:checked + .slider {
    background-color: var(--primary-color);
}

.toggle-switch input:checked + .slider:before {
    transform: translateX(26px);
}

/* Прогресс-бары */
.progress {
    display: flex;
    height: 1rem;
    overflow: hidden;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    background-color: var(--primary-color);
    transition: width 0.6s ease;
}

/* Спиннеры */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.125em;
}

.spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   19. АНИМАЦИИ
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

@keyframes floating {
    0% { transform: translate(0, 0px); }
    50% { transform: translate(0, 15px); }
    100% { transform: translate(0, 0px); }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease forwards;
}

.slide-in-right {
    animation: slideInRight 0.6s ease forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.pulse {
    animation: pulse 2s infinite;
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

/* ========================================
   20. АДАПТИВНОСТЬ
   ======================================== */

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-icon {
        width: 3rem;
        height: 3rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.mobile-visible {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    body.sidebar-collapsed .main-content {
        margin-left: 0;
    }
    
    body.sidebar-mobile-visible::after {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
}

@media (max-width: 768px) {
    .container {
        padding-right: 10px;
        padding-left: 10px;
    }
    
    .card-body,
    .card-content {
        padding: 1rem;
    }
    
    .modal-content {
        margin: 0.5rem;
        max-height: calc(100vh - 1rem);
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
    }
    
    .user-info {
        display: none;
    }
    
    .notification-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .notification-icon {
        margin-bottom: 0.5rem;
    }
    
    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .transaction-amount {
        align-self: flex-end;
        align-items: flex-end;
    }
}

@media (max-width: 576px) {
    .nav-logo {
        font-size: 1.25rem;
    }
    
    .container {
        padding-right: 5px;
        padding-left: 5px;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.125rem; }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .card-body,
    .card-content {
        padding: 0.75rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .stat-icon {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .balance-amount {
        font-size: 2rem;
    }
    
    .balance-actions {
        flex-direction: column;
    }
    
    .toast,
    .notification {
        max-width: calc(100% - 2rem);
        left: 1rem;
        right: 1rem;
    }
}

/* ========================================
   21. ТЕМНАЯ ТЕМА
   ======================================== */

body.dark-mode {
    background-color: var(--dark-bg);
    color: var(--dark-text);
}

body.dark-mode .card {
    background-color: var(--dark-bg-alt);
    border-color: var(--dark-bg);
}

body.dark-mode .form-control {
    background-color: var(--dark-bg-alt);
    border-color: var(--dark-bg);
    color: var(--dark-text);
}

body.dark-mode .sidebar {
    background-color: var(--dark-bg-alt);
}

body.dark-mode .main-header,
body.dark-mode .top-bar {
    border-bottom-color: var(--dark-bg);
}

/* ========================================
   22. ACCESSIBILITY
   ======================================== */

*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus,
.btn:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 186, 0.25);
}

/* Скрытие для скринридеров */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   23. СКРОЛЛБАРЫ
   ======================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

body.dark-mode ::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: var(--dark-bg-alt);
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: var(--dark-text-secondary);
}

/* ========================================
   24. ПЕЧАТЬ
   ======================================== */

@media print {
    *,
    *::before,
    *::after {
        text-shadow: none !important;
        box-shadow: none !important;
    }
    
    a:not(.btn) {
        text-decoration: underline;
    }
    
    .sidebar,
    .nav-menu,
    .btn,
    .dropdown-menu {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    body {
        min-width: 992px !important;
    }
    
    .container {
        min-width: 992px !important;
    }
}

/* ========================================
   25. СОСТОЯНИЯ ЗАГРУЗКИ
   ======================================== */

.loading {
    position: relative;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: loading 1.5s infinite;
}

body.dark-mode .loading::after {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ========================================
   26. ДОПОЛНИТЕЛЬНЫЕ УТИЛИТЫ
   ======================================== */

/* Обрезка текста */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Переносы слов */
.text-break {
    word-wrap: break-word !important;
    word-break: break-word !important;
}

/* Трансформации */
.text-lowercase { text-transform: lowercase !important; }
.text-uppercase { text-transform: uppercase !important; }
.text-capitalize { text-transform: capitalize !important; }

/* Размеры шрифтов */
.fs-1 { font-size: 2.5rem !important; }
.fs-2 { font-size: 2rem !important; }
.fs-3 { font-size: 1.75rem !important; }
.fs-4 { font-size: 1.5rem !important; }
.fs-5 { font-size: 1.25rem !important; }
.fs-6 { font-size: 1rem !important; }

/* Веса шрифтов */
.fw-light { font-weight: 300 !important; }
.fw-lighter { font-weight: lighter !important; }
.fw-normal { font-weight: 400 !important; }
.fw-bold { font-weight: 700 !important; }
.fw-bolder { font-weight: bolder !important; }

/* Высота линий */
.lh-1 { line-height: 1 !important; }
.lh-sm { line-height: 1.25 !important; }
.lh-base { line-height: 1.5 !important; }
.lh-lg { line-height: 2 !important; }

/* Курсор */
.cursor-pointer { cursor: pointer !important; }
.cursor-default { cursor: default !important; }

/* Видимость */
.visible { visibility: visible !important; }
.invisible { visibility: hidden !important; }

/* Z-index */
.z-n1 { z-index: -1 !important; }
.z-0 { z-index: 0 !important; }
.z-1 { z-index: 1 !important; }
.z-2 { z-index: 2 !important; }
.z-3 { z-index: 3 !important; }

/* Переполнение */
.overflow-auto { overflow: auto !important; }
.overflow-hidden { overflow: hidden !important; }
.overflow-visible { overflow: visible !important; }
.overflow-scroll { overflow: scroll !important; }

/* Взаимодействие */
.user-select-all { user-select: all !important; }
.user-select-auto { user-select: auto !important; }
.user-select-none { user-select: none !important; }

.pe-none { pointer-events: none !important; }
.pe-auto { pointer-events: auto !important; }

/* ========================================
   27. СПЕЦИФИЧНЫЕ СТИЛИ MEMBER
   ======================================== */

/* Стили для страницы авторов */
.authors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.author-card {
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

body.dark-mode .author-card {
    background: var(--dark-bg-alt);
    border-color: var(--dark-bg);
}

.author-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.author-card > img,
.author-card .author-card-link > img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.75rem;
}

.author-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.author-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
}

.author-info h3 {
    margin: 0 0 0.25rem 0;
    color: var(--text-color);
}

body.dark-mode .author-info h3 {
    color: var(--dark-text);
}

.author-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

body.dark-mode .author-meta {
    color: var(--dark-text-secondary);
}

/* Планы подписок */
.subscription-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.plan-card {
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    transition: var(--transition);
    position: relative;
}

body.dark-mode .plan-card {
    background: var(--dark-bg-alt);
    border-color: var(--dark-bg);
}

.plan-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.plan-card.featured {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-light), transparent);
}

.plan-header {
    text-align: center;
    margin-bottom: 2rem;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

body.dark-mode .plan-name {
    color: var(--dark-text);
}

.plan-price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.plan-period {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

body.dark-mode .plan-period {
    color: var(--dark-text-secondary);
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.plan-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

body.dark-mode .plan-features li {
    border-bottom-color: var(--dark-bg);
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-features li::before {
    content: '✓';
    color: var(--success-color);
    font-weight: bold;
}

/* Фильтры */
.filters-section {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

body.dark-mode .filters-section {
    background: var(--dark-bg-alt);
    border-color: var(--dark-bg);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

/* Хлебные крошки */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

body.dark-mode .breadcrumb {
    color: var(--dark-text-secondary);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--text-secondary);
}

body.dark-mode .breadcrumb span {
    color: var(--dark-text-secondary);
}

/* Эффекты наведения */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Размытый фон */
.blur-bg {
    position: absolute;
    width: 60%;
    height: 40%;
    background: radial-gradient(circle, var(--primary-color) 0%, rgba(0,136,204,0) 70%);
    opacity: 0.08;
    filter: blur(80px);
    z-index: -1;
}

body.dark-mode .blur-bg {
    opacity: 0.12;
}

/* Специальные эффекты */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-light), transparent);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.card:hover::before {
    opacity: 0.03;
}

/* Центрирование контента */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Переходы */
.transition {
    transition: var(--transition);
}

.transition-fast {
    transition: all 0.15s ease;
}

.transition-slow {
    transition: all 0.5s ease;
}

/* ==========================================
   Member Cabinet - Articles & Catalog
   ========================================== */

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.article-card {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.article-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.article-cover {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #f0f0f0;
    position: relative;
}

.article-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.article-badge.premium {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.article-badge.progress {
    background: rgba(0, 136, 204, 0.9);
    color: white;
}

.article-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-content h3 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.4;
}

.article-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.article-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.article-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.article-stats svg {
    width: 16px;
    height: 16px;
}

/* Favorite Button */
.favorite-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: white;
    color: #ffd700;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.favorite-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.favorite-btn.favorited {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

/* Filters Bar */
.filters-bar {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.filters-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-item {
    flex: 0 1 auto;
}

.filter-item.filter-search {
    flex: 1 1 300px;
}

.filter-input,
.filter-select {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    font-size: 14px;
    width: 100%;
    transition: border-color 0.3s ease;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.results-info {
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

.results-info strong {
    color: var(--text-color);
    font-weight: 600;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    padding: 24px 0;
}

.pagination-btn {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background: #006699;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

.pagination-info {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Dark Mode for Articles */
body.dark-mode .article-card {
    background: var(--dark-bg-alt);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .article-content h3 {
    color: var(--dark-text);
}

body.dark-mode .article-description {
    color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .filters-bar {
    background: var(--dark-bg-alt);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .filter-input,
body.dark-mode .filter-select {
    background: var(--dark-bg);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--dark-text);
}

body.dark-mode .favorite-btn {
    background: var(--dark-bg-alt);
    color: #ffd700;
}

/* Responsive для статей */
@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .filters-form {
        flex-direction: column;
    }

    .filter-item,
    .filter-item.filter-search {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .article-cover {
        height: 160px;
    }

    .article-content {
        padding: 16px;
    }

    .article-content h3 {
        font-size: 16px;
    }

    .pagination {
        flex-direction: column;
        gap: 12px;
    }
}

/* Filter Buttons (for collections) */
.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.filter-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

body.dark-mode .filter-btn {
    background: var(--dark-bg-alt);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--dark-text);
}

body.dark-mode .filter-btn:hover,
body.dark-mode .filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ==========================================
   Sidebar Specific Styles (from sidebar.php)
   ========================================== */

/* Sidebar Header */
.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.brand-text strong {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
}

body.dark-mode .brand-text strong {
    color: var(--dark-text);
}

.sidebar-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    border-radius: 6px;
}

.sidebar-toggle:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

/* Navigation Sections */
.nav-section {
    padding: 1rem 1.5rem 0.5rem;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

body.dark-mode .section-title {
    color: var(--dark-text-secondary);
}

/* Active Link Indicator */
.sidebar-nav .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
}

body.dark-mode .sidebar-nav .nav-link.active {
    background: rgba(0, 136, 204, 0.2);
    color: #0088cc;
}

body.dark-mode .sidebar-nav .nav-link:hover {
    background: rgba(0, 136, 204, 0.15);
    color: #0088cc;
}

body.dark-mode .sidebar-nav .nav-link {
    color: #cbd5e1;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body.dark-mode .sidebar-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.user-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark-mode .user-name {
    color: var(--dark-text);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

body.dark-mode .user-role {
    color: var(--dark-text-secondary);
}

.sidebar-actions {
    display: flex;
    gap: 0.5rem;
}

.sidebar .action-btn {
    padding: 0.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar .action-btn:hover {
    background: var(--bg-secondary);
    color: #ef4444;
}

/* Collapsed State */
.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .section-title,
.sidebar.collapsed .user-details {
    display: none;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
}

.sidebar.collapsed .brand-link {
    justify-content: center;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 0.75rem;
}

.sidebar.collapsed .user-info {
    justify-content: center;
}

.sidebar.collapsed .sidebar-actions {
    display: none;
}

.sidebar.collapsed .sidebar-toggle {
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.sidebar.collapsed .sidebar-toggle svg {
    transform: rotate(180deg);
}

/* Main content adjustment when sidebar is collapsed */
body:has(.sidebar.collapsed) .main-content {
    margin-left: 80px;
}

body:has(.sidebar.collapsed) .header {
    left: 80px;
}

/* ========================================
   AUTHOR DASHBOARD & EDITOR
   ======================================== */

/* Content header row with button */
.content-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.content-header-row .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Author stats grid */
.author-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.author-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

body.dark-mode .author-stat-card {
    background: var(--dark-bg-alt);
    border-color: var(--dark-bg);
}

.author-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.author-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.author-stat-info {
    min-width: 0;
}

.author-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-color);
}

body.dark-mode .author-stat-value {
    color: var(--dark-text);
}

.author-stat-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

body.dark-mode .author-stat-label {
    color: var(--dark-text-secondary);
}

/* Articles toolbar */
.articles-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
}

/* Feed page tabs (Моё / Популярное / Авторы) */
.tabs {
    display: flex;
    gap: 0.25rem;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 4px;
    margin-bottom: 1.5rem;
}

body.dark-mode .tabs {
    background: var(--dark-bg-alt);
    border-color: var(--dark-bg);
}

.tab {
    padding: 0.5rem 1.25rem;
    border-radius: calc(var(--border-radius) - 2px);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab:hover {
    color: var(--text-color);
    background: var(--bg-secondary);
}

body.dark-mode .tab:hover {
    color: var(--dark-text);
    background: var(--dark-bg);
}

.tab.active {
    background: var(--primary-color);
    color: white;
}


.sort-tabs {
    display: flex;
    gap: 0.25rem;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 4px;
}

body.dark-mode .sort-tabs {
    background: var(--dark-bg-alt);
    border-color: var(--dark-bg);
}

.sort-tab {
    padding: 0.375rem 0.875rem;
    border-radius: calc(var(--border-radius) - 2px);
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.sort-tab:hover {
    color: var(--text-color);
    background: var(--bg-secondary);
}

body.dark-mode .sort-tab:hover {
    color: var(--dark-text);
    background: var(--dark-bg);
}

.sort-tab.active {
    background: var(--primary-color);
    color: white;
}

.articles-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Articles list */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.article-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-lg);
    transition: all 0.3s ease;
}

body.dark-mode .article-row {
    background: var(--dark-bg-alt);
    border-color: var(--dark-bg);
}

.article-row:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-color);
}

.article-row-cover {
    width: 80px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.article-row-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-row-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    color: var(--text-muted);
}

body.dark-mode .article-row-cover-placeholder {
    background: var(--dark-bg);
    color: var(--dark-text-secondary);
}

.article-row-content {
    flex: 1;
    min-width: 0;
}

.article-row-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark-mode .article-row-title {
    color: var(--dark-text);
}

.article-row-title:hover {
    color: var(--primary-color);
}

.article-row-excerpt {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark-mode .article-row-excerpt {
    color: var(--dark-text-secondary);
}

.article-row-meta {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.article-row-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: var(--card-bg);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

body.dark-mode .btn-icon {
    background: var(--dark-bg);
    border-color: var(--dark-bg);
    color: var(--dark-text-secondary);
}

.btn-icon:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-icon-danger:hover {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin-top: 1.5rem;
    padding: 1rem 0;
}

.pagination-btn {
    padding: 0.5rem 0.875rem;
    border-radius: var(--border-radius);
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s;
}

body.dark-mode .pagination-btn {
    background: var(--dark-bg-alt);
    border-color: var(--dark-bg);
    color: var(--dark-text);
}

.pagination-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Editor form */
.editor-form .card {
    margin-bottom: 1rem;
}

.editor-form .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

body.dark-mode .form-label {
    color: var(--dark-text);
}

.form-hint {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.9375rem;
    font-family: var(--font-family);
    transition: border-color 0.2s;
}

body.dark-mode .form-input {
    background: var(--dark-bg);
    border-color: var(--dark-bg);
    color: var(--dark-text);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.1);
}

.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.9375rem;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.2s;
}

body.dark-mode .form-textarea {
    background: var(--dark-bg);
    border-color: var(--dark-bg);
    color: var(--dark-text);
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.1);
}

.editor-textarea {
    min-height: 400px;
    tab-size: 4;
}

.cover-preview {
    margin-top: 0.75rem;
    max-width: 400px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.cover-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.editor-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    color: var(--text-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

body.dark-mode .btn-outline {
    background: var(--dark-bg-alt);
    border-color: var(--dark-bg);
    color: var(--dark-text);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* Responsive for author stats */
@media (max-width: 1024px) {
    .author-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .content-header-row {
        flex-direction: column;
        align-items: stretch;
    }

    .content-header-row .btn {
        text-align: center;
        justify-content: center;
    }

    .author-stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .articles-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .article-row {
        flex-wrap: wrap;
    }

    .article-row-cover {
        width: 60px;
        height: 42px;
    }

    .article-row-content {
        flex-basis: calc(100% - 76px);
    }

    .article-row-actions {
        width: 100%;
        justify-content: flex-end;
        padding-top: 0.5rem;
        border-top: 1px solid var(--border-light);
    }

    body.dark-mode .article-row-actions {
        border-top-color: var(--dark-bg);
    }

    .editor-textarea {
        min-height: 300px;
    }

    .editor-actions {
        flex-direction: column;
    }

    .editor-actions .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .author-stats-grid {
        grid-template-columns: 1fr;
    }

    .article-row-meta {
        flex-wrap: wrap;
    }
}

/* ===== Cover Upload Zone ===== */
.upload-zone {
    border: 2px dashed var(--border-color, #d1d5db);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-secondary, #f9fafb);
    position: relative;
    aspect-ratio: 16 / 9;
    max-width: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: var(--primary-color, #6366f1);
    background: rgba(99, 102, 241, 0.04);
}

.upload-zone.drag-over {
    border-color: var(--primary-color, #6366f1);
    background: rgba(99, 102, 241, 0.08);
    transform: scale(1.01);
}

.upload-zone.has-image {
    border-style: solid;
    border-color: var(--border-color, #d1d5db);
}

.upload-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary, #6b7280);
}

.upload-zone-content svg {
    opacity: 0.5;
}

.upload-zone-content .upload-hint {
    font-size: 0.85rem;
    opacity: 0.7;
}

.upload-zone-content .upload-formats {
    font-size: 0.75rem;
    opacity: 0.5;
}

/* Upload Progress */
.upload-progress {
    margin-top: 12px;
    display: none;
}

.upload-progress.active {
    display: block;
}

.progress-bar {
    height: 4px;
    background: var(--border-color, #e5e7eb);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color, #6366f1);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

.upload-error {
    color: var(--danger-color, #ef4444);
    font-size: 0.85rem;
    margin-top: 8px;
}

/* Cover Preview */
.cover-preview-wrapper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.cover-preview-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

.cover-remove-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    transition: background 0.2s;
    z-index: 2;
}

.cover-remove-btn:hover {
    background: rgba(239, 68, 68, 0.9);
}

/* Content Toolbar */
.content-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.content-toolbar .btn-sm {
    padding: 6px 14px;
    font-size: 0.82rem;
    border-radius: 6px;
    border: 1px solid var(--border-color, #d1d5db);
    background: var(--bg-primary, #fff);
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    font-weight: 500;
}

.content-toolbar .btn-sm:hover {
    border-color: var(--primary-color, #6366f1);
    color: var(--primary-color, #6366f1);
}

.content-toolbar .btn-sm.active {
    background: var(--primary-color, #6366f1);
    color: #fff;
    border-color: var(--primary-color, #6366f1);
}

.content-toolbar .btn-sm svg {
    width: 14px;
    height: 14px;
}

/* Markdown Preview */
.markdown-preview {
    display: none;
    padding: 20px 24px;
    min-height: 300px;
    line-height: 1.7;
    color: var(--text-primary, #1f2937);
    font-size: 0.95rem;
}

.markdown-preview.active {
    display: block;
}

.markdown-preview h1 {
    font-size: 1.8em;
    margin: 0.6em 0 0.4em;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    padding-bottom: 0.3em;
}

.markdown-preview h2 {
    font-size: 1.4em;
    margin: 0.6em 0 0.3em;
    font-weight: 600;
}

.markdown-preview h3 {
    font-size: 1.15em;
    margin: 0.5em 0 0.3em;
    font-weight: 600;
}

.markdown-preview p {
    margin: 0.5em 0;
}

.markdown-preview a {
    color: var(--primary-color, #6366f1);
    text-decoration: underline;
}

.markdown-preview code {
    background: var(--bg-secondary, #f3f4f6);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88em;
    font-family: 'JetBrains Mono', monospace;
}

.markdown-preview pre {
    background: var(--bg-secondary, #f3f4f6);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    margin: 1em 0;
}

.markdown-preview pre code {
    background: none;
    padding: 0;
    font-size: 0.85em;
}

.markdown-preview blockquote {
    border-left: 4px solid var(--primary-color, #6366f1);
    margin: 1em 0;
    padding: 8px 16px;
    color: var(--text-secondary, #6b7280);
    background: var(--bg-secondary, #f9fafb);
    border-radius: 0 8px 8px 0;
}

.markdown-preview ul, .markdown-preview ol {
    padding-left: 1.5em;
    margin: 0.5em 0;
}

.markdown-preview li {
    margin: 0.25em 0;
}

.markdown-preview img {
    max-width: 100%;
    border-radius: 8px;
}

.markdown-preview table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

.markdown-preview th, .markdown-preview td {
    border: 1px solid var(--border-color, #e5e7eb);
    padding: 8px 12px;
    text-align: left;
}

.markdown-preview th {
    background: var(--bg-secondary, #f3f4f6);
    font-weight: 600;
}

.markdown-preview hr {
    border: none;
    border-top: 1px solid var(--border-color, #e5e7eb);
    margin: 1.5em 0;
}

/* Dark mode overrides */
body.dark-mode .upload-zone {
    background: var(--bg-secondary, #1e293b);
    border-color: var(--border-color, #334155);
}

body.dark-mode .upload-zone:hover {
    border-color: var(--primary-color, #818cf8);
    background: rgba(129, 140, 248, 0.06);
}

body.dark-mode .upload-zone.drag-over {
    background: rgba(129, 140, 248, 0.1);
}

body.dark-mode .content-toolbar .btn-sm {
    background: var(--bg-secondary, #1e293b);
    border-color: var(--border-color, #334155);
    color: var(--text-secondary, #94a3b8);
}

body.dark-mode .content-toolbar .btn-sm:hover {
    border-color: var(--primary-color, #818cf8);
    color: var(--primary-color, #818cf8);
}

body.dark-mode .content-toolbar .btn-sm.active {
    background: var(--primary-color, #6366f1);
    color: #fff;
}

body.dark-mode .markdown-preview {
    color: var(--text-primary, #e2e8f0);
}

body.dark-mode .markdown-preview code {
    background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .markdown-preview pre {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color, #334155);
}

body.dark-mode .markdown-preview blockquote {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary, #94a3b8);
}

body.dark-mode .markdown-preview th {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .markdown-preview th, body.dark-mode .markdown-preview td {
    border-color: var(--border-color, #334155);
}

/* Responsive */
@media (max-width: 768px) {
    .upload-zone {
        padding: 24px 16px;
    }

    .content-toolbar {
        flex-wrap: wrap;
    }

    .content-toolbar .btn-sm {
        padding: 5px 10px;
        font-size: 0.78rem;
    }

    .markdown-preview {
        padding: 16px;
    }

    .cover-preview-wrapper img {
        border-radius: 8px;
    }
}

/* Subscription card */
.subscription-card {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}

body.dark-mode .subscription-card {
    background: var(--dark-bg-alt);
    border-color: rgba(255, 255, 255, 0.1);
}

/* History item card */
.history-item {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.history-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

body.dark-mode .history-item {
    background: var(--dark-bg-alt);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--dark-text);
}

body.dark-mode .history-item:hover {
    border-color: var(--primary-color);
}

body.dark-mode .history-item h3 {
    color: var(--dark-text);
}

/* ========================================
   VIEW TOGGLE COMPONENT
   ======================================== */

.view-toggle {
    display: inline-flex;
    gap: 4px;
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 4px;
    border: 1px solid var(--border-color);
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.view-toggle-btn:hover {
    color: var(--text-color);
    background: rgba(0, 0, 0, 0.05);
}

.view-toggle-btn.active {
    background: var(--bg-color);
    color: var(--primary-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body.dark-mode .view-toggle {
    background: var(--dark-bg);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .view-toggle-btn:hover {
    color: var(--dark-text);
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .view-toggle-btn.active {
    background: var(--dark-bg-alt);
    color: var(--primary-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ========================================
   UNIFIED ARTICLE ITEM
   ======================================== */

.article-item {
    text-decoration: none;
    color: inherit;
    display: flex;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
}

.article-item-cover {
    background-size: cover;
    background-position: center;
    background-color: var(--bg-secondary);
    flex-shrink: 0;
}

.article-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.article-item-title {
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 6px;
    line-height: 1.4;
}

.article-item-title a {
    color: inherit;
    text-decoration: none;
}

.article-item-title a:hover {
    color: var(--primary-color);
}

.article-item-desc {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    margin: 0 0 8px;
}

.article-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.article-item-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.article-author-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: color 0.2s;
}

.article-author-link:hover {
    color: var(--primary-color);
}

.author-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.article-item-dot {
    opacity: 0.5;
}

.article-item-stats {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.article-item-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.article-item-stats svg {
    width: 16px;
    height: 16px;
}

.article-item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.article-item-progress {
    margin-top: 10px;
}

.article-item-progress .progress-bar {
    margin-top: 0;
}

.article-item-progress-text {
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.article-item .favorite-btn {
    position: static;
    width: 32px;
    height: 32px;
    font-size: 18px;
    box-shadow: none;
    border: 1px solid var(--border-color);
}

/* ========================================
   DATE GROUP HEADERS (history/favorites)
   ======================================== */

.date-group {
    margin-bottom: 8px;
}

.date-group-header {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 12px 0 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.date-group:first-child .date-group-header {
    padding-top: 4px;
}

/* ========================================
   GRID MODE (.view-grid)
   ======================================== */

.view-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.view-grid .article-item {
    flex-direction: column;
    border-radius: 12px;
}

.view-grid .article-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.view-grid .article-item-cover {
    height: 180px;
}

.view-grid .article-item-body {
    padding: 16px;
}

.view-grid .article-item-title {
    font-size: 17px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.view-grid .article-item-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.view-grid .article-item-actions {
    padding: 0 16px 16px;
    justify-content: flex-end;
}

.view-grid .article-item .favorite-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
}

/* ========================================
   LIST MODE (.view-list)
   ======================================== */

.view-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 24px;
}

.view-list .article-item {
    flex-direction: row;
    align-items: center;
    padding: 12px 16px;
    border-radius: 12px;
    gap: 16px;
}

.view-list .article-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.view-list .article-item-cover {
    width: 100px;
    height: 70px;
    border-radius: 8px;
}

.view-list .article-item-body {
    flex: 1;
}

.view-list .article-item-title {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.view-list .article-item-desc {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.view-list .article-item-actions {
    flex-shrink: 0;
}

/* ========================================
   DARK MODE — UNIFIED ARTICLE ITEM
   ======================================== */

body.dark-mode .article-item {
    background: var(--dark-bg-alt);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--dark-text);
}

body.dark-mode .article-item-title,
body.dark-mode .article-item-title a {
    color: var(--dark-text);
}

body.dark-mode .article-item-desc {
    color: var(--dark-text-secondary);
}

body.dark-mode .article-item-meta {
    color: var(--dark-text-secondary);
}

body.dark-mode .article-item-stats {
    color: var(--dark-text-secondary);
}

body.dark-mode .view-grid .article-item:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

body.dark-mode .view-list .article-item:hover {
    border-color: var(--primary-color);
}

body.dark-mode .article-item .favorite-btn {
    background: var(--dark-bg);
    border-color: rgba(255, 255, 255, 0.1);
}

/* ========================================
   RESULTS ROW (with toggle)
   ======================================== */

.results-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
}

.results-row .results-info {
    margin-bottom: 0;
}

/* ========================================
   RESPONSIVE — UNIFIED ARTICLE ITEM
   ======================================== */

@media (max-width: 768px) {
    .view-grid {
        grid-template-columns: 1fr;
    }

    .view-list .article-item-cover {
        width: 80px;
        height: 56px;
    }

    .view-list .article-item {
        padding: 10px 12px;
        gap: 12px;
    }

    .view-list .article-item-title {
        font-size: 14px;
    }

    .view-list .article-item-desc {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .view-grid .article-item-cover {
        height: 150px;
    }

    .view-grid .article-item-body {
        padding: 12px;
    }

    .view-grid .article-item-title {
        font-size: 15px;
    }

    .view-toggle {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   COLLECTIONS (ПОДБОРКИ)
   ======================================== */

/* Badge on collection cover showing article count */
.collection-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 4px;
}

.collection-badge svg {
    flex-shrink: 0;
}

.article-item-cover {
    position: relative;
}

/* Article selector in collection editor */
.article-selector {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    max-height: 300px;
    overflow-y: auto;
    background: var(--bg-color);
}

.article-selector-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background 0.15s;
}

.article-selector-item:last-child {
    border-bottom: none;
}

.article-selector-item:hover {
    background: var(--bg-secondary);
}

.article-selector-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--primary-color);
}

.article-selector-item label {
    cursor: pointer;
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.article-selector-item .selector-date {
    font-size: 12px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

/* Ordered articles list in editor */
.ordered-articles {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    min-height: 60px;
    background: var(--bg-color);
}

.ordered-articles-empty {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

.ordered-article-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-color);
    transition: background 0.15s;
}

.ordered-article-item:last-child {
    border-bottom: none;
}

.ordered-article-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.ordered-article-title {
    flex: 1;
    font-size: 14px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ordered-article-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.ordered-article-actions button {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.15s;
}

.ordered-article-actions button:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.ordered-article-actions button.remove-btn:hover {
    color: var(--danger-color);
    border-color: var(--danger-color);
}

/* Collection article list on view page (numbered) */
.collection-article-list {
    counter-reset: collection-counter;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.collection-article-list .article-item {
    counter-increment: collection-counter;
}

.collection-article-list .article-item::before {
    content: counter(collection-counter);
    position: absolute;
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    z-index: 2;
}

.collection-article-list .article-item {
    position: relative;
}

/* Mini tabs (for sub-sections like fav_type, feed type) */
.mini-tabs {
    display: flex;
    gap: 4px;
    padding: 3px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    width: fit-content;
}

.mini-tab {
    padding: 6px 16px;
    border-radius: calc(var(--border-radius) - 2px);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s;
    white-space: nowrap;
}

.mini-tab:hover {
    color: var(--text-color);
}

.mini-tab.active {
    background: var(--card-bg, #fff);
    color: var(--text-color);
    box-shadow: var(--shadow-sm);
}

body.dark-mode .mini-tab.active {
    background: var(--dark-bg-alt, #2d3748);
}

/* Section tabs (reusable for my_articles, author_profile) */
.section-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
}

.section-tab {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.section-tab:hover {
    color: var(--text-color);
}

.section-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* ========================================
   PHASE 4: BILINGUAL — Language Toggle
   ======================================== */

.article-lang-toggle {
    display: inline-flex;
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    font-size: 13px;
}

.article-lang-toggle a {
    padding: 4px 12px;
    text-decoration: none;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    transition: all 0.2s;
    font-weight: 500;
}

.article-lang-toggle a:hover {
    color: var(--text-color);
}

.article-lang-toggle a.active {
    background: var(--primary-color);
    color: #fff;
}

.translation-notice {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    margin: 20px 0;
    color: var(--text-secondary);
}

.translation-notice svg {
    margin-bottom: 8px;
    opacity: 0.5;
}

/* ========================================
   PHASE 5: SKILLS — Marketplace
   ======================================== */

.skill-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.skill-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.skill-card-cover {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-secondary);
}

.skill-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.skill-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

.skill-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.skill-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.skill-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--success-color);
}

.skill-price .currency {
    font-size: 14px;
    font-weight: 400;
}

.skill-difficulty {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.skill-difficulty.beginner {
    background: #e8f5e9;
    color: #2e7d32;
}

.skill-difficulty.intermediate {
    background: #fff3e0;
    color: #e65100;
}

.skill-difficulty.advanced {
    background: #fce4ec;
    color: #c62828;
}

.dark-mode .skill-difficulty.beginner { background: rgba(46, 125, 50, 0.2); }
.dark-mode .skill-difficulty.intermediate { background: rgba(230, 81, 0, 0.2); }
.dark-mode .skill-difficulty.advanced { background: rgba(198, 40, 40, 0.2); }

.skill-preview-lock {
    background: linear-gradient(to bottom, transparent 0%, var(--card-bg) 100%);
    position: relative;
    padding: 40px 20px 20px;
    text-align: center;
    margin-top: -60px;
}

.skill-preview-lock .btn {
    margin-top: 12px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.skill-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

/* ========================================
   PHASE 6: DAILY DROP — Token Economy
   ======================================== */

/* Token balance in header */
.token-balance-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-color);
    position: relative;
}

.token-balance-badge:hover {
    background: var(--primary-color-light);
    border-color: var(--primary-color);
}

.token-balance-badge .coin-icon {
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #f7b731 0%, #eb9b0e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
}

/* Token dropdown */
.token-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    z-index: 1000;
    display: none;
    padding: 16px;
}

.token-dropdown.show {
    display: block;
}

.token-dropdown-header {
    text-align: center;
    margin-bottom: 16px;
}

.token-dropdown-balance {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
}

.token-dropdown-streak {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Daily Drop claim button */
.daily-drop-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.daily-drop-btn.can-claim {
    background: linear-gradient(135deg, #f7b731 0%, #fc5c65 100%);
    color: #fff;
    animation: pulse-glow 2s ease-in-out infinite;
}

.daily-drop-btn.claimed {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: default;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(247, 183, 49, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(247, 183, 49, 0); }
}

/* Tokens page */
.token-hero {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-secondary);
    border-radius: 16px;
    margin-bottom: 24px;
}

.token-hero-balance {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 8px;
}

.token-hero-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.streak-visual {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 16px;
}

.streak-day {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.streak-day.completed {
    background: var(--success-color);
    color: #fff;
    border-color: var(--success-color);
}

.streak-day.today {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.token-packages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.token-package {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.token-package:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.token-package.popular {
    border-color: var(--primary-color);
    position: relative;
}

.token-package.popular::before {
    content: 'Popular';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: #fff;
    padding: 2px 12px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.token-package-amount {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.token-package-price {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.token-package-bonus {
    font-size: 12px;
    color: var(--success-color);
    font-weight: 600;
    margin-top: 4px;
}

/* Transaction history */
.transaction-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.transaction-desc {
    font-size: 14px;
    font-weight: 500;
}

.transaction-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.transaction-amount {
    font-weight: 700;
    font-size: 15px;
}

.transaction-amount.positive {
    color: var(--success-color);
}

.transaction-amount.negative {
    color: var(--danger-color);
}

/* ========================================
   PHASE 7: B2B — KaaS Dashboard
   ======================================== */

.b2b-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.b2b-stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.b2b-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
}

.b2b-stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.b2b-usage-bar {
    background: var(--bg-secondary);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
    margin-top: 12px;
}

.b2b-usage-fill {
    background: var(--primary-color);
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.b2b-doc-list {
    list-style: none;
    padding: 0;
}

.b2b-doc-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
}

.b2b-doc-title {
    font-weight: 500;
    font-size: 14px;
}

.b2b-doc-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.b2b-pricing-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.b2b-plan-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
}

.b2b-plan-card.featured {
    border-color: var(--primary-color);
    position: relative;
}

.b2b-plan-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.b2b-plan-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.b2b-plan-period {
    font-size: 14px;
    color: var(--text-secondary);
}

.b2b-plan-features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}

.b2b-plan-features li {
    padding: 6px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.b2b-plan-features li::before {
    content: '';
    width: 16px;
    height: 16px;
    background: var(--success-color);
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   TOKEN ECONOMY & DAILY DROP STYLES
   ======================================== */

/* --- Header Token Badge --- */
.token-balance-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    cursor: pointer;
    position: relative;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    transition: var(--transition);
    user-select: none;
}

.dark-mode .token-balance-badge {
    background: var(--dark-bg-alt);
    border-color: var(--border-color);
}

.token-balance-badge:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 136, 204, 0.15);
}

.coin-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, #f7b731, #f5a623);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.token-badge-value {
    min-width: 20px;
}

.token-claim-dot {
    width: 8px;
    height: 8px;
    background: #f7b731;
    border-radius: 50%;
    display: inline-block;
    animation: token-pulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes token-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* --- Token Dropdown --- */
.token-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 260px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    padding: 16px;
    z-index: 1001;
}

.dark-mode .token-dropdown {
    background: var(--dark-bg-alt);
    border-color: var(--border-color);
}

.token-dropdown.show {
    display: block;
}

.token-dropdown-header {
    text-align: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 12px;
}

.token-dropdown-balance {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.2;
}

.dark-mode .token-dropdown-balance {
    color: var(--dark-text);
}

.token-dropdown-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.token-dropdown-streak {
    margin-top: 6px;
    font-size: 13px;
    color: var(--warning-color);
    font-weight: 500;
}

.token-dropdown-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.header-claim-btn {
    display: block;
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.header-claim-btn.can-claim {
    background: linear-gradient(135deg, #f7b731, #f5a623, #f39c12);
    color: #fff;
    animation: claim-glow 2s ease-in-out infinite;
}

.header-claim-btn.can-claim:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 166, 35, 0.4);
}

.header-claim-btn.claimed {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: default;
}

.dark-mode .header-claim-btn.claimed {
    background: var(--dark-bg);
    color: var(--dark-text-secondary);
}

@keyframes claim-glow {
    0%, 100% { box-shadow: 0 2px 8px rgba(245, 166, 35, 0.2); }
    50% { box-shadow: 0 2px 16px rgba(245, 166, 35, 0.5); }
}

.token-dropdown-link {
    display: block;
    text-align: center;
    font-size: 13px;
    color: var(--primary-color);
    text-decoration: none;
    padding: 4px;
}

.token-dropdown-link:hover {
    text-decoration: underline;
}

/* --- Tokens Page: Overview Cards --- */
.tokens-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.token-stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-color);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

.dark-mode .token-stat-card {
    background: var(--dark-bg-alt);
    border-color: var(--border-color);
}

.token-stat-card.token-stat-balance {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    border: none;
}

.token-stat-card.token-stat-balance .token-stat-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.token-stat-card.token-stat-balance .token-stat-value {
    color: #fff;
    font-size: 1.8rem;
}

.token-stat-card.token-stat-balance .token-stat-label {
    color: rgba(255, 255, 255, 0.8);
}

.token-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary-color);
    flex-shrink: 0;
}

.token-stat-icon-earned {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.token-stat-icon-spent {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.token-stat-icon-drops {
    background: rgba(247, 183, 49, 0.1);
    color: #f7b731;
}

.token-stat-info {
    display: flex;
    flex-direction: column;
}

.token-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.2;
}

.dark-mode .token-stat-value {
    color: var(--dark-text);
}

.token-stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* --- Daily Drop Widget --- */
.daily-drop-widget {
    background: var(--bg-color);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-xl);
    padding: 32px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.dark-mode .daily-drop-widget {
    background: var(--dark-bg-alt);
    border-color: var(--border-color);
}

.daily-drop-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f7b731, #f5a623, #e67e22, #f39c12);
}

.daily-drop-header h2 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.daily-drop-header p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.daily-drop-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-top: 24px;
}

/* Streak display */
.streak-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.streak-fire {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
}

.streak-fire.active {
    opacity: 1;
}

.streak-fire-icon {
    font-size: 40px;
    line-height: 1;
}

.streak-number {
    font-size: 48px;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1;
}

.dark-mode .streak-number {
    color: var(--dark-text);
}

.streak-label {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Streak milestones */
.streak-milestones {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 500px;
    width: 100%;
    justify-content: center;
}

.milestone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
    z-index: 1;
}

.milestone-day {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    transition: var(--transition);
}

.dark-mode .milestone-day {
    background: var(--dark-bg);
    border-color: var(--border-color);
    color: var(--dark-text-secondary);
}

.milestone.reached .milestone-day {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.milestone.current .milestone-day {
    background: #f7b731;
    border-color: #f5a623;
    color: #fff;
    box-shadow: 0 0 12px rgba(247, 183, 49, 0.4);
}

.milestone-reward {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.milestone.reached .milestone-reward {
    color: var(--primary-color);
}

.milestone.current .milestone-reward {
    color: #f7b731;
    font-weight: 700;
}

.milestone-line {
    flex: 1;
    height: 3px;
    background: var(--border-light);
    min-width: 30px;
    margin: 0 -4px;
    margin-bottom: 20px;
    border-radius: 2px;
}

.dark-mode .milestone-line {
    background: var(--border-color);
}

.milestone-line.active {
    background: var(--primary-color);
}

/* Daily Drop action button */
.daily-drop-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.btn-daily-drop {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-daily-drop.can-claim {
    background: linear-gradient(135deg, #f7b731, #f5a623, #e67e22);
    color: #fff;
    box-shadow: 0 4px 20px rgba(245, 166, 35, 0.3);
    animation: daily-drop-pulse 2s ease-in-out infinite;
}

.btn-daily-drop.can-claim:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(245, 166, 35, 0.5);
}

.btn-daily-drop.can-claim::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes daily-drop-pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(245, 166, 35, 0.3); }
    50% { box-shadow: 0 4px 30px rgba(245, 166, 35, 0.6); }
}

.btn-daily-drop.claiming {
    pointer-events: none;
    opacity: 0.8;
}

.btn-daily-drop.claimed {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: default;
    box-shadow: none;
    animation: none;
}

.dark-mode .btn-daily-drop.claimed {
    background: var(--dark-bg);
    color: var(--dark-text-secondary);
}

.btn-drop-icon {
    font-size: 20px;
    line-height: 1;
}

.btn-drop-text {
    font-size: 16px;
}

.btn-drop-reward {
    font-size: 14px;
    opacity: 0.9;
    padding-left: 8px;
    border-left: 1px solid rgba(255,255,255,0.3);
}

.next-drop-info {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* Token reward float animation */
.token-reward-float {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    font-weight: 800;
    color: #f7b731;
    pointer-events: none;
    opacity: 0;
    z-index: 10;
}

.token-reward-float.animate {
    animation: reward-float 1.8s ease-out forwards;
}

@keyframes reward-float {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.5);
    }
    30% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.3);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -150%) scale(1);
    }
}

/* --- Buy Tokens Section --- */
.buy-tokens-section {
    margin-bottom: 32px;
}

.buy-tokens-section h2 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.section-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.token-packages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.token-package {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 20px;
    background: var(--bg-color);
    border: 2px solid var(--border-light);
    border-radius: var(--border-radius-xl);
    transition: var(--transition);
    position: relative;
}

.dark-mode .token-package {
    background: var(--dark-bg-alt);
    border-color: var(--border-color);
}

.token-package:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 136, 204, 0.15);
}

.token-package.popular {
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(0, 136, 204, 0.15);
}

.package-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.package-badge-best {
    background: linear-gradient(135deg, #f7b731, #e67e22);
}

.package-tokens {
    margin: 12px 0;
}

.package-amount {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1;
}

.dark-mode .package-amount {
    color: var(--dark-text);
}

.package-tokens-label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.package-price {
    margin: 8px 0 16px;
}

.price-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
}

.dark-mode .price-value {
    color: var(--dark-text);
}

.price-bonus {
    display: inline-block;
    margin-left: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--success-color);
    background: rgba(40, 167, 69, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.btn-buy-tokens {
    width: 100%;
    max-width: 200px;
}

/* --- Transaction History --- */
.token-history-section {
    margin-bottom: 32px;
}

.token-history-section h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.token-transactions-list {
    background: var(--bg-color);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.dark-mode .token-transactions-list {
    background: var(--dark-bg-alt);
    border-color: var(--border-color);
}

.token-tx-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s ease;
}

.dark-mode .token-tx-row {
    border-bottom-color: var(--border-color);
}

.token-tx-row:last-child {
    border-bottom: none;
}

.token-tx-row:hover {
    background: var(--bg-secondary);
}

.dark-mode .token-tx-row:hover {
    background: var(--dark-bg);
}

.token-tx-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
}

.token-tx-icon.tx-positive {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.token-tx-icon.tx-negative {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.token-tx-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.token-tx-desc {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dark-mode .token-tx-desc {
    color: var(--dark-text);
}

.token-tx-date {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.token-tx-amount {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.token-tx-amount.tx-positive {
    color: var(--success-color);
}

.token-tx-amount.tx-negative {
    color: var(--danger-color);
}

.token-history-load-more {
    text-align: center;
    padding: 20px 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .tokens-overview {
        grid-template-columns: repeat(2, 1fr);
    }

    .token-packages {
        grid-template-columns: 1fr;
    }

    .streak-milestones {
        gap: 0;
    }

    .milestone-day {
        width: 34px;
        height: 34px;
        font-size: 12px;
    }

    .milestone-line {
        min-width: 20px;
    }

    .btn-daily-drop {
        padding: 14px 28px;
        font-size: 14px;
    }

    .daily-drop-widget {
        padding: 20px;
    }

    .token-balance-badge {
        padding: 4px 10px;
        font-size: 13px;
    }

    .coin-icon {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }

    .token-dropdown {
        right: -40px;
        width: 240px;
    }
}

@media (max-width: 480px) {
    .tokens-overview {
        grid-template-columns: 1fr;
    }

    .streak-number {
        font-size: 36px;
    }

    .streak-fire-icon {
        font-size: 32px;
    }

    .token-stat-card.token-stat-balance .token-stat-value {
        font-size: 1.4rem;
    }
}

/* End of Token Economy styles */

/* =============================================
   TRANSLATION EDITOR TABS & PANEL
   ============================================= */

.editor-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color, #e5e7eb);
    padding-bottom: 0;
}

.editor-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary, #6b7280);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.editor-tab:hover {
    color: var(--text-primary, #1f2937);
}

.editor-tab.active {
    color: var(--primary-color, #6366f1);
    border-bottom-color: var(--primary-color, #6366f1);
    font-weight: 600;
}

.editor-tab svg {
    flex-shrink: 0;
}

.translation-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.translation-badge--translated {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}

.translation-badge--in_progress {
    background: rgba(234, 179, 8, 0.12);
    color: #ca8a04;
}

.translation-badge--failed {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.translation-panel .card {
    margin-bottom: 1rem;
}

.translation-panel .editor-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* Dark mode */
body.dark-mode .editor-tabs {
    border-bottom-color: var(--border-color, #334155);
}

body.dark-mode .editor-tab {
    color: var(--text-secondary, #94a3b8);
}

body.dark-mode .editor-tab:hover {
    color: var(--text-primary, #e2e8f0);
}

body.dark-mode .editor-tab.active {
    color: var(--primary-color, #818cf8);
    border-bottom-color: var(--primary-color, #818cf8);
}

body.dark-mode .translation-badge--translated {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

body.dark-mode .translation-badge--in_progress {
    background: rgba(234, 179, 8, 0.15);
    color: #facc15;
}

body.dark-mode .translation-badge--failed {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* Responsive */
@media (max-width: 768px) {
    .editor-tabs {
        gap: 0;
    }

    .editor-tab {
        padding: 8px 14px;
        font-size: 0.82rem;
    }

    .translation-panel .editor-actions {
        flex-direction: column;
    }

    .translation-panel .editor-actions .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

/* ========================================
   PUBLICATION TYPE TOGGLE (Article/Skill)
   ======================================== */

.pub-type-toggle {
    display: flex;
    gap: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 20px;
    width: fit-content;
}

.pub-type-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.pub-type-btn:hover {
    color: var(--text-color);
}

.pub-type-btn.active {
    background: var(--card-bg);
    color: var(--text-color);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

body.dark-mode .pub-type-btn.active {
    background: var(--bg-secondary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* Skill-specific editor fields */
.skill-fields {
    display: none;
    margin-top: 16px;
}

.skill-fields.visible {
    display: block;
}

.skill-fields .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.skill-fields .form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

.price-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.price-input-group .form-input {
    flex: 1;
}

.price-input-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
}

.price-input-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* Skill type badge in article listing */
.article-item-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-item-type-badge--skill {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.article-item-type-badge--article {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .pub-type-toggle {
        width: 100%;
    }
    .pub-type-btn {
        flex: 1;
        justify-content: center;
        padding: 10px 16px;
    }
    .skill-fields .form-row,
    .skill-fields .form-row-3 {
        grid-template-columns: 1fr;
    }
}