/* 
 * Стили Helpdesk-системы (Service Desk)
 * 
 * Современный дизайн с тёмной/светлой темой,
 * гласморфизм-эффектами и микро-анимациями.
 * Шрифт: Inter (Google Fonts).
 */

/* ══════════════════════════════════════════════════════════════════
   CSS Custom Properties (Design Tokens)
   ══════════════════════════════════════════════════════════════════ */

:root {
    /* Цвета основной палитры */
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-dark: #3730a3;
    --secondary: #0ea5e9;
    --accent: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;

    /* Нейтральные оттенки */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Семантические цвета */
    --bg-primary: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;

    /* Тени */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.15);

    /* Скругления */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Переходы */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ══════════════════════════════════════════════════════════════════
   Базовые стили
   ══════════════════════════════════════════════════════════════════ */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

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

/* ══════════════════════════════════════════════════════════════════
   Навигация (Верхнее меню)
   ══════════════════════════════════════════════════════════════════ */

.navbar-helpdesk {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0 1rem;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: blur(10px);
}

.navbar-helpdesk .navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 0.5rem 0;
}

.navbar-helpdesk .nav-link {
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.navbar-helpdesk .nav-link:hover,
.navbar-helpdesk .nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.navbar-helpdesk .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-light), var(--accent));
    border-radius: 1px;
}

/* ══════════════════════════════════════════════════════════════════
   Хлебные крошки (Breadcrumbs)
   ══════════════════════════════════════════════════════════════════ */

.breadcrumb-wrapper {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
}

.breadcrumb-helpdesk {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    font-size: 0.85rem;
}

.breadcrumb-helpdesk li {
    display: flex;
    align-items: center;
    color: var(--text-muted);
}

.breadcrumb-helpdesk li + li::before {
    content: '›';
    margin-right: 0.5rem;
    color: var(--gray-400);
    font-size: 1rem;
}

.breadcrumb-helpdesk li a {
    color: var(--text-secondary);
    font-weight: 500;
}

.breadcrumb-helpdesk li a:hover {
    color: var(--primary);
}

.breadcrumb-helpdesk li:last-child {
    color: var(--text-primary);
    font-weight: 600;
}

/* ══════════════════════════════════════════════════════════════════
   Боковая панель (Sidebar)
   ══════════════════════════════════════════════════════════════════ */

.layout-wrapper {
    display: flex;
    flex: 1;
    min-height: calc(100vh - 56px);
}

.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    padding: 1.5rem 0;
    flex-shrink: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    overflow-y: auto;
}

.sidebar-heading {
    color: var(--gray-400);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.75rem 1.25rem 0.5rem;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.sidebar-nav .nav-item {
    margin: 2px 0.5rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.sidebar-nav .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-nav .nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.sidebar-nav .nav-link .icon {
    font-size: 1.1rem;
    width: 1.25rem;
    text-align: center;
}

.sidebar-badge {
    margin-left: auto;
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
}

.main-content {
    flex: 1;
    padding: 1.5rem 2rem;
    max-width: 100%;
    overflow-x: hidden;
}

.main-content-full {
    flex: 1;
    padding: 0;
    max-width: 100%;
}

/* ══════════════════════════════════════════════════════════════════
   Карточки
   ══════════════════════════════════════════════════════════════════ */

.card-helpdesk {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-slow);
    overflow: hidden;
}

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

.card-helpdesk .card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.card-helpdesk .card-body {
    padding: 1.25rem;
}

/* Стат-карточки */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition-slow);
}

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

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-card .stat-icon.primary {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(99, 102, 241, 0.08));
    color: var(--primary);
}

.stat-card .stat-icon.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(16, 185, 129, 0.08));
    color: var(--success);
}

.stat-card .stat-icon.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.08));
    color: var(--warning);
}

.stat-card .stat-icon.danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.08));
    color: var(--danger);
}

.stat-card .stat-icon.info {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(6, 182, 212, 0.08));
    color: var(--info);
}

.stat-card .stat-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.stat-card .stat-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════════
   Таблицы
   ══════════════════════════════════════════════════════════════════ */

.table-helpdesk {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-helpdesk thead th {
    background: var(--gray-50);
    border-bottom: 2px solid var(--border-color);
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.table-helpdesk tbody tr {
    transition: var(--transition);
}

.table-helpdesk tbody tr:hover {
    background-color: rgba(79, 70, 229, 0.03);
}

.table-helpdesk tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    vertical-align: middle;
}

.table-helpdesk a.ticket-link {
    color: var(--text-primary);
    font-weight: 600;
}

.table-helpdesk a.ticket-link:hover {
    color: var(--primary);
}

/* ══════════════════════════════════════════════════════════════════
   Бейджи / Метки
   ══════════════════════════════════════════════════════════════════ */

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.badge-status .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.badge-priority {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════════
   Кнопки
   ══════════════════════════════════════════════════════════════════ */

.btn-helpdesk {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary-helpdesk {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.btn-primary-helpdesk:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
    color: #ffffff;
}

.btn-secondary-helpdesk {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary-helpdesk:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--text-primary);
}

.btn-success-helpdesk {
    background: linear-gradient(135deg, var(--success), #059669);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-success-helpdesk:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
    color: #ffffff;
}

.btn-danger-helpdesk {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: #ffffff;
}

/* ══════════════════════════════════════════════════════════════════
   Формы
   ══════════════════════════════════════════════════════════════════ */

.form-control,
.form-select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
    transition: var(--transition);
    background: var(--bg-card);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
    outline: none;
}

.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.form-text {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════════
   Герой-секция (Главная страница)
   ══════════════════════════════════════════════════════════════════ */

.hero-section {
    background: linear-gradient(135deg, var(--gray-900) 0%, #1a1a4e 50%, #2d1b69 100%);
    padding: 5rem 0 4rem;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #c7d2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 550px;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
    max-width: 700px;
}

.hero-stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
}

.hero-stat-item h3 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat-item p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.25rem;
}

/* ══════════════════════════════════════════════════════════════════
   Секции контента
   ══════════════════════════════════════════════════════════════════ */

.section {
    padding: 3rem 0;
}

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

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* ══════════════════════════════════════════════════════════════════
   FAQ — Аккордеон
   ══════════════════════════════════════════════════════════════════ */

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: var(--transition-slow);
}

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

.faq-question {
    padding: 1rem 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    user-select: none;
}

.faq-question::after {
    content: '▸';
    font-size: 1rem;
    color: var(--text-muted);
    transition: var(--transition);
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-item.open .faq-question::after {
    transform: rotate(90deg);
    color: var(--primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 500px;
}

.faq-answer-inner {
    padding: 0 1.25rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

/* ══════════════════════════════════════════════════════════════════
   Карточки статей (База знаний)
   ══════════════════════════════════════════════════════════════════ */

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition-slow);
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.article-card .article-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.article-card .article-title a {
    color: inherit;
}

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

.article-card .article-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
}

.article-card .article-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
}

/* ══════════════════════════════════════════════════════════════════
   Тикет — Переписка / Timeline
   ══════════════════════════════════════════════════════════════════ */

.ticket-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ticket-info-item {
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

.ticket-info-item .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.ticket-info-item .value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.comment-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.comment-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.comment-internal-badge {
    font-size: 0.7rem;
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    font-weight: 600;
}

.comment-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ══════════════════════════════════════════════════════════════════
   Подвал (Footer)
   ══════════════════════════════════════════════════════════════════ */

.footer-helpdesk {
    background: var(--gray-900);
    color: rgba(255, 255, 255, 0.6);
    padding: 2.5rem 0 1.5rem;
    margin-top: auto;
}

.footer-helpdesk h5 {
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.footer-helpdesk a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    transition: var(--transition);
}

.footer-helpdesk a:hover {
    color: #ffffff;
}

.footer-helpdesk .footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-helpdesk .footer-links li {
    margin-bottom: 0.4rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
}

/* ══════════════════════════════════════════════════════════════════
   Страницы авторизации / регистрации
   ══════════════════════════════════════════════════════════════════ */

.auth-wrapper {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 2.5rem;
}

.auth-card .auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.auth-card .auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* ══════════════════════════════════════════════════════════════════
   Уведомления (alerts)
   ══════════════════════════════════════════════════════════════════ */

.alert-helpdesk {
    padding: 0.8rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    animation: slideIn 0.3s ease;
}

.alert-success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #065f46;
}

.alert-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #991b1b;
}

.alert-info {
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.2);
    color: #155e75;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #92400e;
}

/* ══════════════════════════════════════════════════════════════════
   Фильтры
   ══════════════════════════════════════════════════════════════════ */

.filter-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 1rem 0;
    margin-bottom: 1rem;
}

.filter-bar .form-control,
.filter-bar .form-select {
    max-width: 200px;
    font-size: 0.85rem;
    padding: 0.45rem 0.75rem;
}

/* ══════════════════════════════════════════════════════════════════
   Текстовые страницы
   ══════════════════════════════════════════════════════════════════ */

.text-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.text-page h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.text-page h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    color: var(--text-primary);
}

.text-page p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.text-page ul, .text-page ol {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.text-page li {
    margin-bottom: 0.5rem;
}

/* ══════════════════════════════════════════════════════════════════
   Профиль пользователя
   ══════════════════════════════════════════════════════════════════ */

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    flex-shrink: 0;
}

.profile-info h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.profile-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* ══════════════════════════════════════════════════════════════════
   Анимации
   ══════════════════════════════════════════════════════════════════ */

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ══════════════════════════════════════════════════════════════════
   Адаптивность
   ══════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    /* .sidebar hides automatically due to .offcanvas-md class */

    .main-content {
        padding: 1rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar .form-control,
    .filter-bar .form-select {
        max-width: 100%;
    }

    .ticket-info-grid {
        grid-template-columns: 1fr 1fr;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }
}

/* ══════════════════════════════════════════════════════════════════
   Утилиты
   ══════════════════════════════════════════════════════════════════ */

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }

.w-100 { width: 100%; }

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
