/* Стили для админ-панели */

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px 16px 0 0;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.stat-icon {
    font-size: 32px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.admin-functions {
    margin-top: 40px;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 24px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.admin-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.admin-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px 20px 0 0;
}

.admin-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.admin-card-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.admin-card-title {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.admin-card-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    margin-bottom: 24px;
}

.admin-card-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.admin-card-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.admin-card-button:hover::before {
    left: 100%;
}

.admin-card-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    margin: 5% auto;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    width: 90%;
    max-width: 1200px;
    max-height: 80vh;
    overflow: hidden;
    position: relative;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.close {
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Таблицы */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.data-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #333;
}

.data-table tr:hover {
    background-color: #f8f9ff;
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* Кнопки действий */
.btn-action {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 2px;
}

.btn-delete {
    background: #ff4757;
    color: #fff;
}

.btn-delete:hover {
    background: #ff3742;
    transform: translateY(-1px);
}

.btn-edit {
    background: #3742fa;
    color: #fff;
}

.btn-edit:hover {
    background: #2f3542;
    transform: translateY(-1px);
}

/* Статусы */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background: #2ed573;
    color: #fff;
}

.status-inactive {
    background: #ffa502;
    color: #fff;
}

.status-banned {
    background: #ff4757;
    color: #fff;
}

.role-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.role-admin {
    background: #3742fa;
    color: #fff;
}

.role-user {
    background: #2ed573;
    color: #fff;
}

/* Фильтры */
.filters {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Загрузка */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Аккордеон в стиле iOS26 Glassmorphism */
.admin-accordion {
    display: flex;
    flex-direction: column;
    margin-top: 24px;
}

.accordion-item {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin-bottom: 16px;
    max-width: 100%;
}

/* Убрана синяя полоска при наведении */
/*.accordion-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(0, 122, 255, 0.3) 0%, 
        rgba(0, 122, 255, 0.6) 50%, 
        rgba(0, 122, 255, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.accordion-item:hover::before {
    opacity: 1;
}*/

.accordion-item:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.accordion-header {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.accordion-header.active {
    background: rgba(255, 255, 255, 0.1);
}

.accordion-header.active .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-icon {
    font-size: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-right: 16px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.accordion-item:hover .accordion-icon {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.accordion-content {
    flex: 1;
    min-width: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
}

.accordion-content.active {
    max-height: 10000px;
    overflow-y: auto;
}

.accordion-title {
    font-size: 20px;
    font-weight: 600;
    color: rgba(29, 29, 31, 0.95);
    margin: 0 0 4px 0;
    transition: color 0.3s ease;
}

.accordion-description {
    font-size: 14px;
    color: rgba(29, 29, 31, 0.6);
    margin: 0;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.accordion-arrow {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-left: 16px;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.arrow-icon {
    font-size: 20px;
    color: rgba(29, 29, 31, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.accordion-item.active .arrow-icon {
    transform: rotate(180deg);
    color: rgba(0, 122, 255, 1);
}

.accordion-item.active .accordion-arrow {
    background: rgba(0, 122, 255, 0.2);
    border-color: rgba(0, 122, 255, 0.3);
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.03);
}

.accordion-item.active .accordion-body {
    max-height: 10000px;
    overflow-y: auto;
}

.accordion-actions {
    padding: 0 28px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Кнопки действий в стиле приложения */
.admin-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    user-select: none;
}

.admin-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        transparent);
    transition: left 0.6s ease;
}

.admin-action-btn:hover::before {
    left: 100%;
}

.admin-action-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.admin-action-btn:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

.btn-icon {
    font-size: 18px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-text {
    flex: 1;
    text-align: left;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Анимации для аккордеона */
@keyframes accordionSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.accordion-item.active .accordion-actions {
    animation: accordionSlideDown 0.3s ease-out;
}

/* Стили для управления пользователями */
.users-management-content {
    padding: 20px 0;
}

.users-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.users-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 12px 16px 12px 40px;
    color: #000000;
    font-size: 14px;
    font-weight: 500;
    width: 280px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input::placeholder {
    color: rgba(0, 0, 0, 0.6);
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.search-icon {
    position: absolute;
    left: 12px;
    color: rgba(0, 0, 0, 0.6);
    font-size: 16px;
    pointer-events: none;
}

.users-header h4 {
    color: #000000;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #000000;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.refresh-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Компактный дизайн пользователей в стиле iOS 26 */
.user-item-compact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 6px;
    min-height: 48px;
    position: relative;
    overflow: hidden;
}

.user-item-compact:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.user-avatar-compact {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 50%, #FF2D92 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #ffffff;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 
        0 4px 16px rgba(0, 122, 255, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.user-info-compact {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name-compact {
    color: #000000;
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email-compact {
    color: #000000;
    font-size: 13px;
    margin: 0;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-status-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
}

.user-status-compact.online {
    background: rgba(52, 199, 89, 0.15);
    color: #34C759;
    border: 1px solid rgba(52, 199, 89, 0.3);
}

.user-status-compact.offline {
    background: rgba(142, 142, 147, 0.15);
    color: #8E8E93;
    border: 1px solid rgba(142, 142, 147, 0.3);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.user-status-compact.online .status-indicator {
    background: #34C759;
    box-shadow: 0 0 8px rgba(52, 199, 89, 0.5);
}

.user-status-compact.offline .status-indicator {
    background: #8E8E93;
}

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

.action-btn-compact {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.action-btn-compact::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        transparent);
    transition: left 0.6s ease;
}

.action-btn-compact:hover::before {
    left: 100%;
}

.action-btn-compact:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-btn-compact.password-btn:hover {
    background: rgba(0, 122, 255, 0.15);
    border-color: rgba(0, 122, 255, 0.3);
}

.action-btn-compact.delete-btn:hover {
    background: rgba(255, 59, 48, 0.15);
    border-color: rgba(255, 59, 48, 0.3);
}

.btn-icon-compact {
    font-size: 16px;
    color: #000000;
    transition: all 0.3s ease;
}

.action-btn-compact.password-btn:hover .btn-icon-compact {
    color: #007AFF;
}

.action-btn-compact.delete-btn:hover .btn-icon-compact {
    color: #FF3B30;
}

/* Старые стили для совместимости */
.user-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 8px;
}

.user-item:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #ffffff;
    font-weight: 600;
    flex-shrink: 0;
}

.user-name {
    color: #000000;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    min-width: 120px;
    flex-shrink: 0;
}

.user-email {
    color: #000000;
    font-size: 14px;
    margin: 0;
    min-width: 200px;
    flex-shrink: 0;
}

.user-role-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
    width: fit-content;
}

.user-role-badge.admin {
    background: rgba(0, 122, 255, 0.2);
    color: #007AFF;
    border: 1px solid rgba(0, 122, 255, 0.3);
}

.user-role-badge.user {
    background: rgba(52, 199, 89, 0.2);
    color: #34C759;
    border: 1px solid rgba(52, 199, 89, 0.3);
}

.user-role {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 12px;
}

.user-role.admin {
    background: rgba(0, 122, 255, 0.2);
    color: #007AFF;
    border: 1px solid rgba(0, 122, 255, 0.3);
}

.user-role.user {
    background: rgba(52, 199, 89, 0.2);
    color: #34C759;
    border: 1px solid rgba(52, 199, 89, 0.3);
}

.user-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 80px;
    text-align: center;
}

.user-status.status-active {
    background: rgba(52, 199, 89, 0.2);
    color: #34C759;
    border: 1px solid rgba(52, 199, 89, 0.3);
}

.user-status.status-inactive {
    background: rgba(142, 142, 147, 0.2);
    color: #8E8E93;
    border: 1px solid rgba(142, 142, 147, 0.3);
}

/* iOS 26 Glassmorphism стили для пользователей */
.user-item-glassmorphism {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
}

.user-item-glassmorphism::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.user-item-glassmorphism:hover::before {
    opacity: 1;
}

.user-item-glassmorphism:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.user-avatar-glassmorphism {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 50%, #FF2D92 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ffffff;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 
        0 4px 16px rgba(0, 122, 255, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.user-info-glassmorphism {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name-glassmorphism {
    color: rgba(29, 29, 31, 0.95);
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email-glassmorphism {
    color: rgba(29, 29, 31, 0.6);
    font-size: 14px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-actions-glassmorphism {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.action-btn-glassmorphism {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(29, 29, 31, 0.8);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    outline: none;
}

.action-btn-glassmorphism::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.5s ease;
}

.action-btn-glassmorphism:hover::before {
    left: 100%;
}

.action-btn-glassmorphism:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.action-btn-glassmorphism.password-btn:hover {
    background: rgba(0, 122, 255, 0.15);
    border-color: rgba(0, 122, 255, 0.3);
    color: #007AFF;
}

.action-btn-glassmorphism.delete-btn:hover {
    background: rgba(255, 59, 48, 0.15);
    border-color: rgba(255, 59, 48, 0.3);
    color: #FF3B30;
}

.btn-icon-glassmorphism {
    font-size: 16px;
    flex-shrink: 0;
}

.btn-text-glassmorphism {
    font-weight: 600;
    letter-spacing: 0.3px;
}

.action-btn-glassmorphism.password-btn:hover .btn-icon-glassmorphism {
    color: #007AFF;
}

.action-btn-glassmorphism.delete-btn:hover .btn-icon-glassmorphism {
    color: #FF3B30;
}

.user-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.action-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.action-btn:hover::before {
    left: 100%;
}

.delete-btn {
    background: rgba(255, 59, 48, 0.15);
    color: #FF3B30;
    border: 1px solid rgba(255, 59, 48, 0.25);
}

.delete-btn:hover {
    background: rgba(255, 59, 48, 0.25);
    border-color: rgba(255, 59, 48, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 59, 48, 0.2);
}

.password-btn {
    background: rgba(0, 122, 255, 0.15);
    color: #007AFF;
    border: 1px solid rgba(0, 122, 255, 0.25);
}

.password-btn:hover {
    background: rgba(0, 122, 255, 0.25);
    border-color: rgba(0, 122, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.2);
}

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

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #000000;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #007AFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #000000;
    text-align: center;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Модальное окно для смены пароля */
.password-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.password-modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    margin: 10% auto;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    overflow: hidden;
}

.password-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.password-modal-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.password-modal-close {
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.password-modal-close:hover {
    opacity: 0.7;
}

.password-modal-body {
    padding: 30px;
}

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

.password-form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.password-form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.3s ease;
}

.password-form-input:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.password-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 30px;
}

.password-form-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.password-form-btn.cancel {
    background: #f0f0f0;
    color: #666;
}

.password-form-btn.cancel:hover {
    background: #e0e0e0;
}

.password-form-btn.save {
    background: #007AFF;
    color: #fff;
}

.password-form-btn.save:hover {
    background: #0056CC;
}

/* Стили для статистики модулей */
.module-stats-container {
    margin-bottom: 40px;
    padding: 0 20px;
}

.module-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.module-stat-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}


.module-stat-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.stat-icon {
    font-size: 32px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #000000;
    line-height: 1;
    margin: 0;
}

.stat-label {
    font-size: 14px;
    color: #000000;
    font-weight: 500;
    margin: 0;
    opacity: 0.8;
}

/* Стили для центрированного контента админ-панели */
.admin-center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 40px;
}

/* Контейнер для аккордеонов */
.admin-accordion-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px 20px;
}

/* Блок с общим количеством пользователей */
.users-total-info {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 32px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 24px;
    margin-bottom: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.users-total-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.1) 0%, 
        rgba(118, 75, 162, 0.05) 50%, 
        rgba(102, 126, 234, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.users-total-info:hover::before {
    opacity: 1;
}

.users-total-info:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.users-total-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
    box-shadow: 
        0 4px 16px rgba(102, 126, 234, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.users-total-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.users-total-label {
    color: rgba(0, 0, 0, 0.8);
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

.users-total-count {
    color: #000000;
    font-size: 36px;
    font-weight: 700;
    margin: 0;
    text-shadow: none;
}

@media (max-width: 768px) {
    .users-total-info {
        padding: 20px 24px;
        gap: 16px;
    }
    
    .users-total-icon {
        width: 56px;
        height: 56px;
        font-size: 28px;
    }
    
    .users-total-label {
        font-size: 14px;
    }
    
    .users-total-count {
        font-size: 28px;
    }
}

.admin-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 20px 0;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

.admin-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

@keyframes titleGlow {
    0% {
        text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }
    100% {
        text-shadow: 
            0 4px 8px rgba(0, 0, 0, 0.3),
            0 0 20px rgba(102, 126, 234, 0.3),
            0 0 40px rgba(118, 75, 162, 0.2);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .admin-title {
        font-size: 2.5rem;
    }
    
    .admin-subtitle {
        font-size: 1.2rem;
    }
    
    .admin-center-content {
        min-height: 50vh;
        padding: 20px 15px;
    }
    
    .module-stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .module-stat-card {
        padding: 20px;
        gap: 16px;
    }
    
    .stat-icon {
        font-size: 24px;
        width: 48px;
        height: 48px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 13px;
    }
    
    .user-item {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .user-name {
        min-width: 100px;
        font-size: 14px;
    }
    
    .user-email {
        min-width: 150px;
        font-size: 13px;
    }
    
    .action-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
}
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .admin-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 6px;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .accordion-header {
        padding: 20px 20px;
    }
    
    .accordion-icon {
        width: 48px;
        height: 48px;
        font-size: 28px;
        margin-right: 16px;
    }
    
    .accordion-title {
        font-size: 18px;
    }
    
    .accordion-description {
        font-size: 13px;
    }
    
    .accordion-actions {
        padding: 0 20px 20px 20px;
    }
    
    .admin-action-btn {
        padding: 14px 16px;
        font-size: 14px;
    }
    
    .btn-icon {
        font-size: 16px;
        width: 20px;
        height: 20px;
    }

@media (max-width: 480px) {
    .accordion-header {
        padding: 16px 16px;
    }
    
    .accordion-icon {
        width: 44px;
        height: 44px;
        font-size: 24px;
        margin-right: 12px;
    }
    
    .accordion-title {
        font-size: 16px;
    }
    
    .accordion-description {
        font-size: 12px;
    }
    
    .accordion-actions {
        padding: 0 16px 16px 16px;
        gap: 10px;
    }
    
    .admin-action-btn {
        padding: 12px 14px;
        font-size: 13px;
        gap: 10px;
    }
}

/* Стили для статистики пользователей */
.user-statistics-content {
    padding: 20px;
}

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

.statistics-header h4 {
    color: #000000;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.statistics-controls {
    display: flex;
    gap: 12px;
}

.user-statistics-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.user-statistics-item {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-statistics-item:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.user-statistics-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-statistics-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #ffffff;
    font-weight: 600;
    flex-shrink: 0;
}

.user-statistics-info {
    flex: 1;
}

.user-statistics-name {
    color: #000000;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.user-statistics-email {
    color: #000000;
    font-size: 14px;
    margin: 0 0 4px 0;
    opacity: 0.8;
}

.user-statistics-role {
    color: #000000;
    font-size: 12px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

.user-statistics-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.statistics-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
}

.statistics-section h5 {
    color: #000000;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.module-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.module-stat-item {
    color: #000000;
    font-size: 14px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.no-stats, .no-logs {
    color: #000000;
    font-size: 14px;
    font-style: italic;
    opacity: 0.6;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.login-logs, .logout-logs {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.log-item {
    color: #000000;
    font-size: 13px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

/* Адаптивность для компактного дизайна пользователей */
@media (max-width: 768px) {
    .user-item-compact {
        padding: 10px 12px;
        gap: 12px;
        min-height: 56px;
    }
    
    .user-avatar-compact {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .user-name-compact {
        font-size: 14px;
    }
    
    .user-email-compact {
        font-size: 12px;
    }
    
    .user-status-compact {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .action-btn-compact {
        width: 32px;
        height: 32px;
    }
    
    .btn-icon-compact {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .user-item-compact {
        padding: 8px 10px;
        gap: 10px;
        min-height: 52px;
    }
    
    .user-avatar-compact {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    
    .user-name-compact {
        font-size: 13px;
    }
    
    .user-email-compact {
        font-size: 11px;
    }
    
    .user-status-compact {
        padding: 3px 6px;
        font-size: 10px;
    }
    
    .action-btn-compact {
        width: 28px;
        height: 28px;
    }
    
    .btn-icon-compact {
        font-size: 12px;
    }
}

/* Адаптивность для статистики пользователей */
@media (max-width: 768px) {
    .user-statistics-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .user-statistics-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .user-statistics-name {
        font-size: 16px;
    }
    
    .user-statistics-email {
        font-size: 13px;
    }
    
    .statistics-section {
        padding: 12px;
    }
    
    .statistics-section h5 {
        font-size: 14px;
    }
    
    .module-stat-item, .log-item {
        font-size: 12px;
        padding: 6px 8px;
    }
}

/* Модальное окно для статистики пользователя */
.stats-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

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

.stats-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.stats-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.stats-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    background: linear-gradient(135deg, 
        rgba(0, 122, 255, 0.1) 0%, 
        rgba(88, 86, 214, 0.1) 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.stats-modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: rgba(29, 29, 31, 0.95);
}

.stats-modal-close {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    font-size: 24px;
    color: rgba(29, 29, 31, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-modal-close:hover {
    background: rgba(255, 59, 48, 0.15);
    color: #FF3B30;
    transform: rotate(90deg);
}

.stats-modal-body {
    padding: 32px;
    max-height: calc(85vh - 100px);
    overflow-y: auto;
}

.stats-user-info {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(0, 122, 255, 0.05);
    border-radius: 16px;
    margin-bottom: 24px;
}

.stats-user-avatar-large {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 50%, #FF2D92 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 
        0 8px 24px rgba(0, 122, 255, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.1);
}

.stats-user-details {
    flex: 1;
}

.stats-user-name {
    font-size: 22px;
    font-weight: 700;
    color: rgba(29, 29, 31, 0.95);
    margin-bottom: 4px;
}

.stats-user-email {
    font-size: 16px;
    color: rgba(29, 29, 31, 0.6);
    margin-bottom: 8px;
}

.stats-user-total {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0, 122, 255, 0.1);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #007AFF;
}

.stats-section {
    margin-bottom: 24px;
}

.stats-section-title {
    font-size: 18px;
    font-weight: 700;
    color: rgba(29, 29, 31, 0.95);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats-section-icon {
    font-size: 20px;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stats-list-item {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    font-size: 14px;
    color: rgba(29, 29, 31, 0.8);
    transition: all 0.2s ease;
}

.stats-list-item:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 122, 255, 0.2);
    transform: translateX(4px);
}

.stats-empty {
    padding: 20px;
    text-align: center;
    color: rgba(29, 29, 31, 0.4);
    font-style: italic;
}

/* Скроллбар для модального окна */
.stats-modal-body::-webkit-scrollbar {
    width: 8px;
}

.stats-modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.stats-modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 122, 255, 0.3);
    border-radius: 4px;
}

.stats-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 122, 255, 0.5);
}

/* Стили для поиска пользователей */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 122, 255, 0.2);
    border-radius: 12px;
    padding: 0 12px;
    transition: all 0.3s ease;
    margin-right: 12px;
    min-width: 300px;
}

.search-box:focus-within {
    border-color: rgba(0, 122, 255, 0.5);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
    background: rgba(255, 255, 255, 1);
}

.search-icon {
    font-size: 18px;
    margin-right: 8px;
    color: #666;
    transition: color 0.3s ease;
}

.search-box:focus-within .search-icon {
    color: #007AFF;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 8px;
    font-size: 14px;
    color: #333;
    outline: none;
    font-weight: 500;
}

.search-input::placeholder {
    color: #999;
    font-weight: 400;
}

.clear-search-btn {
    background: rgba(255, 59, 48, 0.1);
    border: none;
    color: #FF3B30;
    font-size: 16px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.clear-search-btn:hover {
    background: rgba(255, 59, 48, 0.2);
    transform: scale(1.1);
}

.clear-search-btn:active {
    transform: scale(0.95);
}

/* Скрытие элементов при поиске */
.user-card.hidden,
.user-stat-card.hidden,
.user-item-glassmorphism.hidden {
    display: none !important;
}

/* Сообщение "Ничего не найдено" */
.no-results-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px dashed rgba(0, 122, 255, 0.3);
    margin: 20px 0;
}

.no-results-message .icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-results-message .title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.no-results-message .subtitle {
    font-size: 14px;
    color: #999;
}

/* Адаптивность для поиска */
@media (max-width: 768px) {
    .search-box {
        min-width: 200px;
        margin-right: 8px;
    }
    
    .users-controls {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* ============================================================================
   ПРОФЕССИОНАЛЬНАЯ ИНТЕРПРЕТАЦИЯ АНАЛИЗОВ
   ============================================================================ */

.professional-analysis-content {
    padding: 20px 0;
}

.analysis-header {
    text-align: center;
    margin-bottom: 30px;
}

.analysis-header h4 {
    color: #000;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.analysis-description {
    color: #000;
    font-size: 1rem;
    line-height: 1.6;
}

.analysis-form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glassmorphism-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #000;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.label-icon {
    font-size: 1.2rem;
}

.select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.select-wrapper::after {
    content: '▼';
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    pointer-events: none;
    color: #333;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    z-index: 1;
}

.select-wrapper:hover::after {
    color: rgba(59, 130, 246, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.select-wrapper:focus-within::after,
.select-wrapper:has(select:focus)::after {
    color: rgba(59, 130, 246, 1);
    transform: translateY(-50%) rotate(180deg) scale(1.1);
}

.glassmorphism-input {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    color: #000;
    font-size: 1rem;
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.glassmorphism-input:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.glassmorphism-input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

.glassmorphism-input select,
.glassmorphism-input.gender-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none;
    padding-right: 45px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.glassmorphism-input select:hover,
.glassmorphism-input.gender-select:hover {
    border-color: rgba(59, 130, 246, 0.5);
    background-color: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.15);
}

.glassmorphism-input select:focus,
.glassmorphism-input.gender-select:focus {
    border-color: rgba(59, 130, 246, 0.7);
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), 0 2px 12px rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

.glassmorphism-input select option,
.glassmorphism-input.gender-select option {
    padding: 14px 20px;
    background-color: #fff;
    color: #000;
    font-weight: 400;
    font-size: 1rem;
    border: none;
}

.glassmorphism-input select option:hover,
.glassmorphism-input.gender-select option:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

.glassmorphism-input select option:checked,
.glassmorphism-input.gender-select option:checked {
    background: linear-gradient(to right, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.1));
    color: #000;
    font-weight: 600;
}

textarea.glassmorphism-input {
    resize: vertical;
    min-height: 150px;
    line-height: 1.6;
}

.textarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.char-count {
    color: #000;
    font-size: 0.85rem;
}

.clear-btn {
    background: transparent;
    border: none;
    color: #333;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.clear-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.7);
    border: 2px dashed rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.file-upload-label:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.5);
}

.file-upload-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.file-upload-text {
    color: #000;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
}

.file-upload-hint {
    color: #000;
    font-size: 0.85rem;
    font-weight: 400;
    display: block;
}

.file-input {
    display: none;
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin-top: 10px;
}

.file-info span {
    color: #000;
    font-size: 0.9rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.remove-file-btn {
    background: transparent;
    border: none;
    color: #666;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin-left: 10px;
}

.remove-file-btn:hover {
    background: rgba(255, 59, 48, 0.1);
    color: #FF3B30;
}

/* ============================================================================
   СПИСОК ФАЙЛОВ И ПРОГРЕСС БАР
   ============================================================================ */

.files-list {
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 20px;
}

.files-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.files-list-header h5 {
    color: #000;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.files-count {
    background: rgba(59, 130, 246, 0.1);
    color: rgba(59, 130, 246, 1);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.files-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.file-item:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.file-item-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    flex-shrink: 0;
}

.file-item-info {
    flex: 1;
    min-width: 0;
}

.file-item-name {
    color: #000;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-item-size {
    color: #000;
    font-size: 0.8rem;
}

.file-item-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.file-item-status.pending {
    color: #666;
}

.file-item-status.processing {
    color: rgba(59, 130, 246, 1);
}

.file-item-status.ready {
    color: #34C759;
}

.file-item-status.error {
    color: #FF3B30;
}

.file-item-status .spinner {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-top: 2px solid rgba(59, 130, 246, 1);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.file-item-remove {
    background: transparent;
    border: none;
    color: #999;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.file-item-remove:hover {
    background: rgba(255, 59, 48, 0.1);
    color: #FF3B30;
}

.files-processing-progress {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(59, 130, 246, 1), rgba(147, 51, 234, 1));
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    color: #000;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 500;
}

/* ============================================================================
   ПРОГРЕСС БАРЫ ПОД КАЖДЫМ ФАЙЛОМ
   ============================================================================ */

.file-item-progress {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.file-progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 8px;
}

.progress-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    border-radius: 8px;
    transition: all 0.3s ease;
    opacity: 0.4;
}

.progress-step.active {
    opacity: 1;
    background: rgba(59, 130, 246, 0.1);
}

.progress-step.completed {
    opacity: 1;
    background: rgba(52, 199, 89, 0.15);
}

.progress-step.active.completed {
    background: rgba(52, 199, 89, 0.2);
    box-shadow: 0 2px 8px rgba(52, 199, 89, 0.2);
}

.progress-step .step-icon {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.progress-step .step-label {
    font-size: 0.7rem;
    color: #666;
    text-align: center;
    font-weight: 500;
    line-height: 1.2;
}

.progress-step.active .step-label {
    color: rgba(59, 130, 246, 1);
    font-weight: 600;
}

.progress-step.completed .step-label {
    color: #34C759;
    font-weight: 600;
}

.file-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.file-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(59, 130, 246, 1), rgba(147, 51, 234, 1));
    border-radius: 3px;
    transition: width 0.4s ease;
    width: 0%;
}

.file-progress-status {
    font-size: 0.75rem;
    color: #666;
    text-align: center;
    font-weight: 500;
    min-height: 16px;
}

/* ============================================================================
   КНОПКА "ДОБАВИТЬ ЕЩЕ ФАЙЛЫ"
   ============================================================================ */

.add-more-files-container {
    margin-top: 15px;
    text-align: center;
}

.add-more-files-container .glassmorphism-btn {
    padding: 12px 24px;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ============================================================================
   ЖАЛОБЫ ПАЦИЕНТА
   ============================================================================ */

.form-group-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #000;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.complaints-section {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 20px;
}

.complaints-toggles {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.toggle-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.complaint-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
}

.complaint-toggle:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* iOS26 Style Toggle Switch */
.complaint-toggle .toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: relative;
    display: inline-block;
    width: 51px;
    height: 31px;
    background: rgba(142, 142, 147, 0.4);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    cursor: pointer;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 27px;
    height: 27px;
    left: 2px;
    top: 2px;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.complaint-toggle .toggle-input:checked + .toggle-slider {
    background: rgba(52, 199, 89, 1);
}

.complaint-toggle .toggle-input:checked + .toggle-slider::before {
    transform: translateX(20px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.complaint-toggle .toggle-input:active + .toggle-slider {
    transform: scale(0.95);
}

.complaint-toggle .toggle-input:checked:active + .toggle-slider {
    transform: scale(0.95);
}

.toggle-label {
    color: #000;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    flex: 1;
}

.complaint-toggle .toggle-input:checked ~ .toggle-label {
    font-weight: 600;
    color: rgba(52, 199, 89, 1);
}

.complaints-extra {
    margin-bottom: 20px;
    width: 100%;
}

.complaints-extra label {
    display: block;
    color: #000;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.complaints-textarea-full {
    width: 100% !important;
    box-sizing: border-box;
}

.complaints-duration {
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.complaints-duration > label {
    display: block;
    color: #000;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.duration-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.duration-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    flex: 1;
    min-width: 150px;
}

.duration-option:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.duration-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: rgba(59, 130, 246, 1);
    flex-shrink: 0;
}

.duration-option span {
    color: #000;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.duration-option input[type="radio"]:checked ~ span {
    font-weight: 600;
    color: rgba(59, 130, 246, 1);
}

.duration-option input[type="radio"]:checked {
    background: rgba(59, 130, 246, 1);
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.glassmorphism-btn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    pointer-events: auto !important;
}

.glassmorphism-btn:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

.glassmorphism-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.glassmorphism-btn.primary-btn {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.3));
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    flex: 1;
}

.glassmorphism-btn.primary-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.5), rgba(147, 51, 234, 0.5));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.glassmorphism-btn.primary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.glassmorphism-btn.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.glassmorphism-btn.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 1.1rem;
}

.btn-text {
    font-weight: 500;
}

.analysis-result-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.result-header h4 {
    color: #000;
    font-size: 1.5rem;
    font-weight: 600;
}

.result-actions {
    display: flex;
    gap: 10px;
}

.analysis-result-content {
    color: #000;
    line-height: 1.8;
    font-size: 1rem;
}

.analysis-result-content h4,
.analysis-result-content h5 {
    color: #000;
    margin: 20px 0 10px 0;
    font-weight: 600;
}

.analysis-result-content p {
    margin: 10px 0;
    color: #000;
}

.analysis-result-content ul,
.analysis-result-content ol {
    margin: 10px 0;
    padding-left: 25px;
}

.analysis-result-content li {
    margin: 8px 0;
    color: #000;
}

.analysis-error {
    text-align: center;
    padding: 30px;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.error-message {
    color: #000;
    font-size: 1.1rem;
}

.analysis-loading {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    margin-top: 30px;
}

.loading-spinner-large {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 0, 0, 0.2);
    border-top: 4px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.analysis-loading p {
    color: #000;
    font-size: 1.1rem;
    margin: 10px 0;
}

.loading-note {
    color: #666 !important;
    font-size: 0.9rem !important;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Адаптивность для профессионального модуля */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .result-actions {
        flex-wrap: wrap;
    }
    
    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* ============================================================================
   ПРИНУДИТЕЛЬНО ЧЕРНЫЙ ШРИФТ ДЛЯ СТРАНИЦЫ /analysis
   ============================================================================ */
body:has(.professional-analysis-content) .professional-analysis-content,
body:has(.professional-analysis-content) .professional-analysis-content *,
body:has(.professional-analysis-content) .analysis-header *,
body:has(.professional-analysis-content) .analysis-form-container *,
body:has(.professional-analysis-content) .glassmorphism-form *,
body:has(.professional-analysis-content) .form-group *,
body:has(.professional-analysis-content) .complaints-section *,
body:has(.professional-analysis-content) .complaint-toggle *,
body:has(.professional-analysis-content) .toggle-label,
body:has(.professional-analysis-content) .complaints-extra *,
body:has(.professional-analysis-content) .complaints-duration *,
body:has(.professional-analysis-content) .duration-option *,
body:has(.professional-analysis-content) .file-upload-label *,
body:has(.professional-analysis-content) .files-list *,
body:has(.professional-analysis-content) .analysis-result-container *,
body:has(.professional-analysis-content) .analysis-result-content *,
body:has(.professional-analysis-content) .analysis-loading * {
    color: #000 !important;
}

/* Специфичные правила для элементов на странице /analysis */
body:has(.professional-analysis-content) .analysis-description {
    color: #000 !important;
}

body:has(.professional-analysis-content) .file-upload-text,
body:has(.professional-analysis-content) .file-upload-hint {
    color: #000 !important;
}

body:has(.professional-analysis-content) .file-item-size {
    color: #000 !important;
}

body:has(.professional-analysis-content) .char-count {
    color: #000 !important;
}

body:has(.professional-analysis-content) .widget-label,
body:has(.professional-analysis-content) .widget-value,
body:has(.professional-analysis-content) .widget-date,
body:has(.professional-analysis-content) .widget-time {
    color: #000 !important;
}

body:has(.professional-analysis-content) h2,
body:has(.professional-analysis-content) h3,
body:has(.professional-analysis-content) h4,
body:has(.professional-analysis-content) h5,
body:has(.professional-analysis-content) h6 {
    color: #000 !important;
}

body:has(.professional-analysis-content) p,
body:has(.professional-analysis-content) span,
body:has(.professional-analysis-content) div,
body:has(.professional-analysis-content) label,
body:has(.professional-analysis-content) a {
    color: #000 !important;
}

body:has(.professional-analysis-content) .result-header h4,
body:has(.professional-analysis-content) .analysis-result-content h4,
body:has(.professional-analysis-content) .analysis-result-content h5,
body:has(.professional-analysis-content) .analysis-result-content p,
body:has(.professional-analysis-content) .analysis-result-content li,
body:has(.professional-analysis-content) .analysis-result-content ul,
body:has(.professional-analysis-content) .analysis-result-content ol {
    color: #000 !important;
}

/* Исключения только для иконок и служебных элементов */
body:has(.professional-analysis-content) .btn-icon,
body:has(.professional-analysis-content) .label-icon,
body:has(.professional-analysis-content) .file-upload-icon {
    color: inherit !important;
}

/* ============================================================================
   СТИЛИ ДЛЯ ГЕНЕРАТОРА НАУЧНЫХ СТАТЕЙ
   ============================================================================ */

.article-generator-content {
    padding: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.article-generator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.article-generator-header h4 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #000 !important;
}

.article-generator-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #000 !important;
}

.article-generator-status .status-icon {
    font-size: 16px;
}

.article-generator-form {
    margin-bottom: 24px;
}

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

.article-generator-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #000 !important;
    font-size: 14px;
}

.article-topic-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #000 !important;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.article-topic-input:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.6);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.article-topic-input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

.form-hint {
    margin-top: 8px;
    font-size: 12px;
    color: #000 !important;
    line-height: 1.5;
}

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

.generate-article-btn,
.cancel-article-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.generate-article-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.generate-article-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cancel-article-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.cancel-article-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.article-generator-progress {
    margin: 24px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: #000 !important;
}

.article-generator-result {
    margin-top: 24px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #000 !important;
}

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

.copy-article-btn,
.download-article-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #000 !important;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-article-btn:hover,
.download-article-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.result-info {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    flex-wrap: wrap;
}

.result-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 12px;
    color: #000 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 16px;
    font-weight: 600;
    color: #000 !important;
}

.result-content {
    max-height: 600px;
    overflow-y: auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-content::-webkit-scrollbar {
    width: 8px;
}

.result-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.result-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.result-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.article-text {
    color: #000 !important;
    line-height: 1.8;
    font-size: 15px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.article-text h1,
.article-text h2,
.article-text h3,
.article-text h4 {
    color: #000 !important;
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 600;
}

.article-text h1 {
    font-size: 24px;
}

.article-text h2 {
    font-size: 20px;
}

.article-text h3 {
    font-size: 18px;
}

.article-text p {
    margin-bottom: 16px;
}

.article-text ul,
.article-text ol {
    margin-left: 24px;
    margin-bottom: 16px;
}

.article-text li {
    margin-bottom: 8px;
}

/* Анимации для уведомлений */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* ============================================================================
   СТИЛИ ДЛЯ ЭКГ-АНАЛИЗАТОРА
   ============================================================================ */

.ecg-analyzer-content {
    padding: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ecg-analyzer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ecg-analyzer-header h4 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #000 !important;
}

.ecg-analyzer-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #000 !important;
}

.ecg-analyzer-status .status-icon {
    font-size: 16px;
}

.ecg-analyzer-form {
    margin-bottom: 24px;
}

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

.ecg-analyzer-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 768px) {
    .ecg-analyzer-form .form-row {
        grid-template-columns: 1fr;
    }
}

.ecg-analyzer-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 500;
    color: #000 !important;
    font-size: 14px;
}

.ecg-analyzer-form .label-icon {
    font-size: 16px;
}

/* Увеличенная высота полей формы ЭКГ */
.ecg-analyzer-form .form-input {
    padding: 16px 20px !important;
    min-height: 50px;
    font-size: 15px;
    line-height: 1.5;
}

.ecg-analyzer-form input[type="number"].form-input {
    padding: 16px 20px !important;
    min-height: 50px;
}

.ecg-analyzer-form select.form-input {
    padding: 16px 20px !important;
    min-height: 50px;
    padding-right: 45px !important; /* Для стрелки выпадающего списка */
}

.ecg-analyzer-form textarea.form-input {
    padding: 16px 20px !important;
    min-height: 100px;
    resize: vertical;
}

.ecg-file-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #000 !important;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.ecg-file-input:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.6);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ecg-file-input::file-selector-button {
    padding: 8px 16px;
    margin-right: 12px;
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    color: #000 !important;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ecg-file-input::file-selector-button:hover {
    background: rgba(102, 126, 234, 0.3);
}

.analyze-ecg-btn,
.cancel-ecg-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.analyze-ecg-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.analyze-ecg-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cancel-ecg-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.cancel-ecg-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.ecg-preview {
    margin: 24px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ecg-preview h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #000 !important;
}

.ecg-preview-image-container {
    text-align: center;
}

.ecg-preview-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ecg-analyzer-progress {
    margin: 24px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ecg-analyzer-result {
    margin-top: 24px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ecg-analyzer-result .result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ecg-analyzer-result .result-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #000 !important;
}

.copy-result-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #000 !important;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-result-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.ecg-analyzer-result .result-content {
    color: #000 !important;
    line-height: 1.6;
}

.ecg-analyzer-result .result-content pre {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.5;
}

.ecg-analyzer-result .result-content h3,
.ecg-analyzer-result .result-content h4 {
    color: #1e40af !important;
    margin-top: 20px;
    margin-bottom: 10px;
}

.ecg-analyzer-result .result-content h3:first-child,
.ecg-analyzer-result .result-content h4:first-child {
    margin-top: 0;
}
