/* ================================================================================
   STYLE.CSS v4.5 - Основные стили приложения
   ================================================================================
   
   Изменения v4.5:
   ✅ A11y: Focus visible стили для клавиатурной навигации
   ✅ A11y: Минимальные touch targets 44x44px на мобильных
   ✅ FIX: Стандартизация z-index (nav: 1000, modal: 2000, notification: 3000)
   ✅ FIX: Удалены дублирующиеся CSS классы
   
   ================================================================================ */

/* -------------------- RESET & BASE -------------------- */

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

/* ✅ A11y: Focus visible для клавиатурной навигации */
:focus-visible {
    outline: 2px solid var(--accent, #6366f1);
    outline-offset: 2px;
}

/* ✅ A11y: Убрать outline для мыши/тача */
:focus:not(:focus-visible) {
    outline: none;
}

html {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 
                 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding-top: var(--nav-height);
}

/* -------------------- LAYOUT -------------------- */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
}

h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
}

h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

/* -------------------- NAVIGATION -------------------- */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.nav-brand {
    font-size: 20px;
    font-weight: 700;
    margin-right: 40px;
}

.nav-links {
    display: flex;
    gap: 30px;
    flex: 1;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent);
}

#theme-toggle {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    margin-left: 8px;
    padding: 8px 12px;
    /* ✅ A11y: минимум 44x44px для touch targets */
    min-width: 44px;
    min-height: 44px;
    transition: transform 0.2s;
}

#theme-toggle:hover {
    transform: scale(1.1);
}

/* ✅ A11y: Стандартизация z-index
 * 100: dropdowns, tooltips
 * 1000: navigation
 * 2000: modals
 * 3000: notifications
 */

/* -------------------- PANELS & CARDS -------------------- */

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

/* -------------------- FORM GROUPS -------------------- */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text);
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text);
    opacity: 0.6;
    line-height: 1.4;
}

/* -------------------- GRIDS -------------------- */

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

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

/* -------------------- KPI CARDS -------------------- */

.kpi {
    background: var(--panel);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    text-align: center;
}

.kpi-label {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--accent);
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.kpi-card {
    background: var(--panel);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    text-align: center;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.kpi-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border-color: var(--border);
}

.kpi-icon {
    display: block;
    font-size: 28px;
    margin-bottom: 10px;
    line-height: 1;
    opacity: 0.9;
}

/* SVG-иконки в KPI (умеренный размер: 18px) */
.kpi-icon--svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.kpi-icon--svg svg {
    width: 18px;
    height: 18px;
    max-width: 18px;
    max-height: 18px;
    min-width: 18px;
    min-height: 18px;
    color: var(--accent);
}
.kpi-card--sessions .kpi-icon--svg svg { color: #3a7afe; }
.kpi-card--hits .kpi-icon--svg svg { color: #f66151; }
.kpi-card--accuracy .kpi-icon--svg svg { color: #33d17a; }
.kpi-card--best .kpi-icon--svg svg { color: #ffaa00; }

/* Цвет KPI по смыслу (точность): зелёный ≥70%, жёлтый ≥50%, красный <50% */
.kpi-value--good { color: #33d17a !important; }
.kpi-value--medium { color: #ffaa00 !important; }
.kpi-value--low { color: #f66151 !important; }

/* -------------------- CHARTS -------------------- */

.chart-container {
    position: relative;
    height: 300px;
    margin-top: 20px;
}

/* -------------------- RINGS (ACCURACY) -------------------- */

.rings-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 20px;
}

.ring-wrapper {
    text-align: center;
}

.ring-wrapper canvas {
    max-width: 180px;
    margin: 0 auto;
}

.ring-label {
    margin-top: 15px;
}

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

/* -------------------- SESSION ROWS -------------------- */

.session-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.session-row:hover {
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
}

.session-row:last-child {
    border-bottom: none;
}

/* -------------------- LOG ROWS -------------------- */

.log-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.log-row:last-child {
    border-bottom: none;
}

/* -------------------- SEARCH -------------------- */

.search-box {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    font-size: 16px;
    margin-bottom: 20px;
    transition: border-color 0.2s;
}

.search-box:focus {
    outline: none;
    border-color: var(--accent);
}

/* -------------------- FILTERS -------------------- */

.filters-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
}

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

.filter-select-grow {
    flex: 1;
    min-width: 200px;
}

.filter-select-lg {
    padding: 12px 16px;
    font-size: 15px;
}

.filter-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    font-size: 14px;
}

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

/* -------------------- PAGINATION -------------------- */

.pagination {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.pagination button {
    min-width: 40px;
}

/* -------------------- BUTTONS -------------------- */

.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

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

.btn-secondary {
    background: var(--panel);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-compact {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-wide {
    padding: 12px 24px;
}

.btn-block {
    width: 100%;
}

.btn-block-gap {
    margin-bottom: 12px;
}

.btn-top {
    margin-top: 12px;
}

/* -------------------- MODALS -------------------- */
/* ✅ z-index: 2000 для консистентности (nav: 1000, modal: 2000, notification: 3000) */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal[style*="flex"], .modal.active {
    display: flex;
}

.modal-content {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    max-width: 560px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-content h2 {
    margin-bottom: 20px;
}

.modal-content input,
.modal-content textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
}

.modal-content input:focus,
.modal-content textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.modal-content textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.modal-buttons button {
    flex: 1;
}

/* -------------------- NOTIFICATIONS -------------------- */
/* z-index: 3000 (выше modals: 2000, ниже criticals: 9999) */

.error-notification,
.success-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 3000;
    min-width: 300px;
    max-width: 500px;
    animation: slideIn 0.3s ease-out;
}

.error-content,
.success-content {
    background: var(--panel);
    border: 2px solid #ff4757;
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.success-content {
    border-color: #33d17a;
}

.error-content button,
.success-content button {
    background: none;
    border: none;
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    padding: 0 0 0 12px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.error-content button:hover,
.success-content button:hover {
    opacity: 1;
}

.fade-out {
    animation: slideOut 0.3s ease-out forwards;
}

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

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

/* -------------------- LOADING SPINNER -------------------- */

.loading-spinner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* -------------------- RESPONSIVE -------------------- */

@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }

    h1 {
        font-size: 28px;
    }

    .nav-links {
        gap: 15px;
        font-size: 14px;
    }

    .kpi-value {
        font-size: 28px;
    }

    .chart-container {
        height: 250px;
    }

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

    .filter-select {
        width: 100%;
    }
}
.panel {
    margin-bottom: 28px;
}
/* ================================================================================
   ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ КОММЕНТАРИЕВ И МОДАЛОК
   ================================================================================ */

/* -------------------- SESSION ROWS (ОБНОВЛЕНО) -------------------- */

.session-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.session-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.session-row:last-child {
    border-bottom: none;
}

.session-info {
    flex: 1;
    cursor: pointer;
}

.session-notes {
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(58, 122, 254, 0.08);
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    font-size: 14px;
    font-style: italic;
    opacity: 0.85;
    word-wrap: break-word;
}

.edit-notes-btn {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.edit-notes-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.15);
}

.edit-notes-btn:active {
    transform: scale(0.95);
}

/* -------------------- MODAL EXTRAS -------------------- */
/* Основные стили .modal определены выше - это дополнительные стили */

.modal-content textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.2s;
}

.modal-content textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* Кнопки в модальных окнах имеют flex: 1 */
.modal-actions .btn-primary,
.modal-actions .btn-secondary {
    flex: 1;
}

/* -------------------- SEARCH WRAPPER -------------------- */

.search-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.search-wrapper::before {
    content: "🔍";
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    opacity: 0.5;
    pointer-events: none;
}

.search-wrapper input[type="search"] {
    padding-left: 44px;
}

/* -------------------- MOBILE OPTIMIZATION -------------------- */

@media (max-width: 768px) {
    /* Компактный header */
    nav {
        height: 50px;
        padding: 0 12px;
    }

    .nav-brand {
        font-size: 16px;
    }

    .nav-links {
        gap: 12px;
        font-size: 13px;
    }

    /* Компактный контент */
    .container {
        padding: 15px 12px;
        padding-top: 60px; /* С учетом navbar */
    }

    h1 {
        font-size: 22px;
        margin-bottom: 15px;
    }

    /* Поля ввода */
    input[type="text"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px; /* Не меньше 16px для iOS! */
        padding: 12px;
    }

    input[type="text"],
    input[type="search"],
    select {
        height: 44px; /* Минимум для удобства нажатия */
    }

    /* Фильтры в столбик */
    .filters-bar {
        flex-direction: column;
        gap: 10px;
    }

    .filter-select {
        width: 100%;
    }

    /* KPI карточки */
    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .kpi-value {
        font-size: 28px;
    }

    /* Графики */
    .chart-container {
        height: 220px;
    }

    /* Кольца точности */
    .rings-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ring-wrapper canvas {
        max-width: 160px;
    }

    /* Session rows */
    .session-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .edit-notes-btn {
        align-self: flex-end;
    }

    /* Модалка на полный экран */
    .modal-content {
        width: 95%;
        padding: 20px;
    }

    .modal-content h2 {
        font-size: 20px;
    }
}

/* -------------------- SAFE AREA (для вырезов экрана) -------------------- */

@supports (padding: max(0px)) {
    body {
        padding-top: max(60px, env(safe-area-inset-top));
        padding-bottom: env(safe-area-inset-bottom);
    }

    nav {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
}

/* -------------------- AUTH LOGO -------------------- */

.logo-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* -------------------- DASHBOARD -------------------- */

/* Приветствие */
.dashboard-greeting {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 28px;
    letter-spacing: -0.02em;
}

/* Блок «пустой дашборд» */
.dashboard-welcome-empty {
    text-align: center;
    padding: 56px 24px !important;
    margin-top: 32px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(58, 122, 254, 0.06) 0%, transparent 50%);
}

.dashboard-welcome-icon-wrap {
    margin-bottom: 24px;
}

.dashboard-welcome-icon {
    width: 120px;
    height: 120px;
    object-fit: contain;
    opacity: 0.95;
}

.dashboard-welcome-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

.dashboard-welcome-text {
    opacity: 0.75;
    margin-bottom: 28px;
    font-size: 16px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

.dashboard-welcome-cta {
    display: inline-block;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
}

/* Заголовок секции с SVG-иконкой (иконка на одной линии с текстом) */
.dashboard-section-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1.2;
    vertical-align: middle;
}
.dashboard-section-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2em;
    height: 1.2em;
    flex-shrink: 0;
    color: var(--text);
    opacity: 0.85;
    vertical-align: middle;
}
.dashboard-section-title-icon svg {
    width: 1em !important;
    height: 1em !important;
    max-width: 1em !important;
    max-height: 1em !important;
    min-width: 1em;
    min-height: 1em;
    vertical-align: middle;
}

/* Иконка в заголовках секций */
.section-title-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.section-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    vertical-align: middle;
}

/* Разделители между секциями дашборда (у каждого следующего блока — линия сверху) */
.dashboard-section + .dashboard-section {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

/* Анимация появления блоков дашборда */
@keyframes dashboardFadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-animate-item {
    animation: dashboardFadeInUp 0.5s ease-out forwards;
}

.dashboard-container .dashboard-animate-item:nth-child(1) { animation-delay: 0.05s; opacity: 0; }
.dashboard-container .dashboard-animate-item:nth-child(2) { animation-delay: 0.1s; opacity: 0; }
.dashboard-container .dashboard-animate-item:nth-child(3) { animation-delay: 0.15s; opacity: 0; }
.dashboard-container .dashboard-animate-item:nth-child(4) { animation-delay: 0.2s; opacity: 0; }
.dashboard-container .dashboard-animate-item:nth-child(5) { animation-delay: 0.25s; opacity: 0; }
.dashboard-container .dashboard-animate-item:nth-child(6) { animation-delay: 0.3s; opacity: 0; }
.dashboard-container .dashboard-animate-item:nth-child(7) { animation-delay: 0.35s; opacity: 0; }
.dashboard-container .dashboard-animate-item:nth-child(8) { animation-delay: 0.4s; opacity: 0; }

.dashboard-animate-item--delay-4 {
    animation-delay: 0.4s !important;
    opacity: 0;
}

/* -------------------- A11Y: TOUCH TARGETS -------------------- */
/* ✅ Минимум 44x44px для touch на мобильных (WCAG 2.1 Level AAA) */

@media (pointer: coarse) {
    button,
    .btn-primary,
    .btn-secondary,
    a.nav-link,
    input[type="checkbox"],
    input[type="radio"],
    select {
        min-height: 44px;
    }
    
    /* Увеличенные padding для кнопок на touch устройствах */
    .btn-primary,
    .btn-secondary {
        padding: 14px 24px;
    }
    
    /* Больше пространства для навигации */
    .nav-links a {
        padding: 14px 16px;
    }
}

/* -------------------- A11Y: REDUCED MOTION -------------------- */
/* ✅ Уважаем настройки пользователя для анимаций */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ================================================================================
   SESSION ROWS - Компонент строки сессии
   ================================================================================ */

.session-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s, border-color 0.2s;
}

.session-row:hover {
    background: var(--hover, rgba(255, 255, 255, 0.05));
    border-color: var(--accent);
}

.session-main {
    flex: 1;
}

.session-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 4px;
}

.session-hits {
    font-size: 1.1rem;
    font-weight: 600;
}

.session-accuracy {
    font-size: 0.9rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.session-accuracy.accuracy-high {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.session-accuracy.accuracy-medium {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
}

.session-accuracy.accuracy-low {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.session-date {
    font-size: 0.85rem;
    color: var(--text-secondary, #888);
}

.session-notes-preview {
    font-size: 0.8rem;
    color: var(--text-secondary, #888);
    margin-top: 4px;
    font-style: italic;
}

.session-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: var(--hover, rgba(255, 255, 255, 0.1));
}

/* ================================================================================
   DEVICE CARDS - Компонент карточки устройства
   ================================================================================ */

.device-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.device-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.device-name {
    font-size: 1.1rem;
    font-weight: 600;
}

.device-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.device-status.status-active {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.device-status.status-inactive {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.device-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.device-stat {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.stat-label {
    color: var(--text-secondary, #888);
}

.device-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-danger:hover {
    background: #c0392b;
}

/* ================================================================================
   EMPTY STATE - Пустое состояние
   ================================================================================ */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary, #888);
}

.empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 8px;
}
