/* ==================== ADMIN PANEL STYLES ==================== */

.admin-section {
    background: var(--bg-light);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    margin-top: 20px;
    display: none;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.admin-tabs button {
    flex: 1;
    min-width: 120px;
    padding: 12px;
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.admin-tabs button:hover {
    background: #cbd5e0;
}

.admin-tabs button.active {
    background: var(--primary-color);
    color: white;
}

.admin-tab-content {
    background: #f7fafc;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    display: none;
}

.admin-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Upload Form */
.upload-form {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.file-upload {
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload:hover {
    border-color: var(--primary-color);
    background: #f0f4ff;
}

.file-upload.dragover {
    border-color: var(--primary-color);
    background: #f0f4ff;
    transform: scale(1.02);
}

.file-selected {
    text-align: center;
}

.file-selected .filename {
    font-weight: bold;
    margin: 10px 0;
    word-break: break-all;
}

.file-selected .file-details {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
    font-size: 0.9em;
    color: #718096;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #667eea;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(102, 126, 234, 0.1);
    margin: 20px 0;
}

.upload-area:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: #764ba2;
}

.upload-area i {
    color: #667eea;
    margin-bottom: 15px;
}

.upload-area p {
    margin: 15px 0;
    color: #666;
}

.upload-progress {
    margin-top: 20px;
}

.upload-progress .progress-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.upload-progress .progress {
    height: 100%;
    background: #4ecdc4;
    width: 0%;
    transition: width 0.3s ease;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-top: 4px solid var(--primary-color);
}

.stat-card.primary { border-top-color: var(--primary-color); }
.stat-card.success { border-top-color: var(--success-color); }
.stat-card.warning { border-top-color: var(--warning-color); }
.stat-card.info { border-top-color: var(--info-color); }

.stat-card .stat-number {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-card .stat-label {
    color: #718096;
    font-size: 0.9em;
}

.stat-card i {
    font-size: 2em;
    color: #4ecdc4;
    margin-bottom: 10px;
}

.stat-card h5 {
    margin: 10px 0;
    font-size: 14px;
    opacity: 0.8;
}

.stat-card span {
    font-size: 24px;
    font-weight: bold;
}

/* System Info */
.system-info {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #4a5568;
}

.info-value {
    color: #718096;
}

.info-value.success { color: var(--success-color); font-weight: 600; }
.info-value.error { color: var(--error-color); font-weight: 600; }

/* Quick Actions */
.quick-actions {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    color: white;
}

.action-btn.primary { background: var(--primary-color); }
.action-btn.success { background: var(--success-color); }
.action-btn.warning { background: var(--warning-color); }
.action-btn.info { background: var(--info-color); }

.action-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Track Management */
.management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.header-info {
    flex: 1;
}

.track-stats {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.stat-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.stat-badge.total { background: #e2e8f0; color: #4a5568; }
.stat-badge.working { background: #c6f6d5; color: #276749; }
.stat-badge.problematic { background: #fed7d7; color: #c53030; }

.header-actions {
    display: flex;
    gap: 10px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.empty-state i {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #4a5568;
}

.empty-state p {
    color: #718096;
    margin-bottom: 20px;
}

.tracks-container {
    max-height: 500px;
    overflow-y: auto;
}

.track-management-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: rgb(228, 188, 233);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.track-management-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.track-management-item.problematic {
    border-left-color: var(--error-color);
}

.track-main-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.track-number {
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    color: rgb(228, 188, 233);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
}

.track-details {
    flex: 1;
}

.track-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: #2d3748;
}

.track-artist-album {
    font-size: 0.9em;
    color: #718096;
    margin-bottom: 5px;
}

.track-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85em;
    color: #a0aec0;
}

.meta-item i {
    margin-right: 5px;
}

.meta-item.error {
    color: var(--error-color);
}

.track-actions {
    display: flex;
    gap: 5px;
}

.action-btn.play { background: var(--success-color); }
.action-btn.edit { background: var(--primary-color); }
.action-btn.test { background: var(--info-color); }
.action-btn.delete { background: var(--error-color); }

/* Charts Container */
.charts-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.chart-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chart-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.chart-card.wide {
    grid-column: span 2;
}

.chart-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f4f8;
}

.chart-header h5 {
    margin: 0;
    color: #2d3748;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-header h5 i {
    color: #667eea;
}

.chart-wrapper {
    position: relative;
    height: 250px;
}

.chart-card.wide .chart-wrapper {
    height: 200px;
}

@media (max-width: 768px) {
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .chart-card.wide {
        grid-column: span 1;
    }
    
    .chart-wrapper {
        height: 200px;
    }
    
    .chart-card.wide .chart-wrapper {
        height: 180px;
    }
}

/* Recent Tracks in Sidebar */
.recent-tracks {
    margin-top: 20px;
}

.recent-tracks h4 {
    margin-bottom: 15px;
    color: #2d3748;
}

.recent-track-item {
    padding: 10px;
    margin: 5px 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-left: 3px solid var(--primary-color);
}


/* ========== ПРОФИЛЬ ПОЛЬЗОВАТЕЛЯ ========== */
.user-profile-info {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
}

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

.profile-avatar {
    font-size: 2.5em;
    color: var(--primary-color, #667eea);
}

.profile-display-name {
    font-weight: 600;
    font-size: 1.05em;
    color: #2d3748;
}

.profile-username {
    font-size: 0.85em;
    color: #718096;
}

.profile-details {
    margin-bottom: 12px;
}

.profile-field {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    font-size: 0.9em;
}

.profile-label {
    color: #718096;
    min-width: 55px;
}

.profile-value {
    color: #4a5568;
    flex: 1;
}

.profile-confirm-badge {
    color: #48bb78;
    font-size: 1em;
}

.profile-confirm-badge.not-confirmed {
    color: #f56565;
    font-size: 1em;
}

.profile-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 12px 0;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85em;
    width: 100%;
}

/* Модалка редактирования профиля */
.profile-edit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.profile-edit-grid .form-group {
    margin-bottom: 0;
}

.profile-edit-grid .full-width {
    grid-column: 1 / -1;
}

@media (max-width: 500px) {
    .profile-edit-grid {
        grid-template-columns: 1fr;
    }
}
