/* Стили для пользовательского интерфейса */

.user-interface {
    padding: 20px;
    background: #f5f5f5;
    min-height: 100vh;
}

/* Карточка профиля */
.profile-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Кнопка редактирования профиля */
.profile-card .btn-icon {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

.profile-card .btn-icon:hover {
    background: rgba(0,0,0,0.05);
}

.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
}

.profile-info {
    flex: 1;
    margin-left: 15px;
}

.profile-info h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333; /* Темный цвет для контраста с белым фоном */
}

.profile-role {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Сетка статистики */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.stat-card {
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 12px;
}

.stat-card i {
    color: #1976D2;
    font-size: 24px;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #333 !important; /* Принудительно темный цвет для видимости */
}

/* Убедимся что текст профиля на главной виден */
.user-dashboard .profile-info h2,
.user-dashboard .profile-info p {
    color: #333 !important;
}

/* Статистика на главной */
.user-dashboard .profile-stats .stat-value,
.user-dashboard .profile-stats .stat-label {
    color: #333 !important;
}

.stat-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
}

/* Быстрые действия */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.action-card {
    background: white;
    border: none;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.action-card:active {
    transform: scale(0.95);
}

.action-card i {
    font-size: 28px;
    color: #1976D2;
}

.action-card span {
    font-size: 13px;
    color: #333;
}

/* Секции */
.section {
    background: white;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.section-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.btn-text {
    background: none;
    border: none;
    color: #1976D2;
    font-size: 14px;
    cursor: pointer;
}

/* Список заданий */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.task-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.task-info {
    flex: 1;
}

.task-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.task-meta {
    font-size: 12px;
    color: #666;
}

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

.task-status.active {
    background: #e3f2fd;
    color: #1976D2;
}

.task-status.completed {
    background: #e8f5e9;
    color: #4caf50;
}

/* Достижения */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.achievement-badge {
    text-align: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 12px;
    position: relative;
}

.achievement-badge i {
    font-size: 32px;
    color: #ffc107;
    margin-bottom: 4px;
}

.achievement-badge span {
    display: block;
    font-size: 11px;
    color: #333;
}

.achievement-badge.locked {
    opacity: 0.4;
}

.achievement-badge.locked i {
    color: #ccc;
}

/* График активности */
.activity-chart {
    height: 120px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding: 10px;
}

.activity-bar {
    width: 30px;
    background: linear-gradient(to top, #1976D2, #42a5f5);
    border-radius: 4px 4px 0 0;
    transition: height 0.3s;
}

/* Админский интерфейс */
.admin-interface {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.admin-controls {
    background: white;
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.admin-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background: white;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 14px;
}

.filter-btn.active {
    background: #1976D2;
    color: white;
    border-color: #1976D2;
}

.filter-btn i {
    font-size: 18px;
}

.admin-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #666;
}

.stat-item i {
    font-size: 18px;
    color: #1976D2;
}

.admin-map-container {
    flex: 1;
    position: relative;
}

#admin-map {
    width: 100%;
    height: 100%;
}

.admin-list-panel {
    background: white;
    border-top: 1px solid #e0e0e0;
    max-height: 300px;
    overflow-y: auto;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    background: white;
}

.details-list {
    padding: 10px;
}

/* Адаптивность */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
