/* Стили для страниц */

.page-container {
    padding: 20px;
    min-height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
    overflow-y: auto;
}

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

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1e3a8a;
    margin: 0;
}

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

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f0f0f0;
    color: #1e3a8a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: #e0e0e0;
    transform: scale(1.05);
}

/* Дашборд пользователя */
.user-dashboard {
    max-width: 600px;
    margin: 0 auto;
}

.user-dashboard .profile-card {
    /* Убираем синий градиент для профиля на главной */
    /* background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%); */
    /* color: white; */
    background: white;
    border: 1px solid #e0e0e0;
}

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

.profile-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.profile-avatar i {
    font-size: 48px;
    color: white;
}

.profile-avatar img,
.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-info h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.profile-role {
    color: #666;
    margin: 4px 0 0 0;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
}

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

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e3a8a;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

/* Табы */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab {
    padding: 12px 24px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.tab.active {
    color: #1e3a8a;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #1e3a8a;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Карточки заданий */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.3s ease;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.task-card.active {
    border-left: 4px solid #1e3a8a;
}

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

.task-header h4 {
    margin: 0;
    font-size: 18px;
    color: #333;
    flex: 1;
}

.task-priority {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.task-priority.high {
    background: #ef4444;
    color: white;
    font-weight: 600;
}

.task-priority.medium {
    background: #fbbf24;
    color: #1f2937;
    font-weight: 600;
}

.task-priority.low {
    background: #e0e7ff;
    color: #4f46e5;
}

.task-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.task-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.task-detail i {
    font-size: 18px;
    color: #999;
}

.task-status {
    margin-top: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.task-status.assigned {
    background: #e0e7ff;
    color: #4f46e5;
}

.task-status.in_progress {
    background: #fbbf24;
    color: #1f2937;
    font-weight: 600;
}

.task-status.completed {
    background: #10b981;
    color: white;
    font-weight: 600;
}

/* Страница профиля */
.profile-page .profile-content {
    max-width: 600px;
    margin: 0 auto;
}

.profile-header-section {
    text-align: center;
    margin-bottom: 32px;
}

.profile-header-section h2 {
    color: #333 !important; /* Темный цвет для имени */
    margin: 10px 0 5px 0;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    overflow: hidden;
    flex-shrink: 0;
}

.profile-avatar-large i {
    font-size: 72px;
    color: white;
}

.profile-avatar-large img,
.profile-avatar-img-large {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-subtitle {
    color: #666 !important; /* Принудительно серый цвет для никнейма */
    font-size: 16px;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}

.stat-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-card i {
    font-size: 32px;
    color: #1e3a8a;
}

.stat-info {
    flex: 1;
}

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

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

.info-item i {
    color: #1e3a8a;
    font-size: 24px;
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.info-label {
    font-size: 12px;
    color: #666;
}

.info-value {
    font-size: 16px;
    color: #333;
}

/* Настройки */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.setting-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.setting-info i {
    color: #1e3a8a;
    font-size: 24px;
}

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

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

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

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

input:checked + .slider {
    background-color: #1e3a8a;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Страница поддержки */
.support-page .support-content {
    max-width: 600px;
    margin: 0 auto;
}

.faq-section {
    margin-bottom: 32px;
}

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

.faq-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.faq-question {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.faq-question i {
    color: #1e3a8a;
}

.expand-icon {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.faq-item.expanded .expand-icon {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 16px 16px 52px;
    color: #666;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.expanded .faq-answer {
    max-height: 200px;
}

/* История тикетов */
.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticket-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
}

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

.ticket-subject {
    font-weight: 600;
    color: #333;
}

.ticket-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
}

.ticket-status.open {
    background: #e0e7ff;
    color: #4f46e5;
}

.ticket-status.closed {
    background: #e5e7eb;
    color: #6b7280;
}

.ticket-message {
    color: #666;
    margin-bottom: 8px;
    line-height: 1.5;
}

.ticket-footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
}

.ticket-priority {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

.ticket-priority.high {
    background: #ef4444;
    color: white;
    font-weight: 600;
}

.ticket-priority.medium {
    background: #fbbf24;
    color: #1f2937;
    font-weight: 600;
}

.ticket-priority.low {
    background: #e0e7ff;
    color: #4f46e5;
}

/* Достижения */
.achievements-section {
    margin-top: 32px;
}

.achievements-section h3 {
    margin-bottom: 16px;
    color: #1e3a8a;
}

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

.achievement {
    background: #f0f0f0;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    filter: grayscale(1);
    transition: all 0.3s ease;
}

.achievement.earned {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    opacity: 1;
    filter: grayscale(0);
}

.achievement i {
    font-size: 32px;
    color: #666;
}

.achievement.earned i {
    color: #f59e0b;
}

.achievement span {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.achievement.earned span {
    color: #92400e;
}

/* Админская статистика */
.admin-stats-panel {
    position: absolute;
    bottom: var(--bottom-nav-height);
    left: 0;
    right: 0;
    background: white;
    padding: 20px;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.admin-stats-panel h3 {
    margin-bottom: 16px;
    color: #1e3a8a;
}

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

/* Состояния */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.btn-small {
    padding: 6px 12px;
    background: #1e3a8a;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-small:hover {
    background: #2563eb;
}
