/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Стили страницы авторизации */
.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    text-align: center;
}

.login-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.login-header p {
    color: #718096;
    font-size: 16px;
    margin-bottom: 32px;
}

.login-form {
    text-align: left;
}

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

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

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

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

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 16px;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
    border-left: 4px solid #e53e3e;
}

.login-footer {
    margin-top: 24px;
    text-align: center;
}

.login-footer p {
    color: #718096;
    font-size: 14px;
}

/* Стили дашборда */
.dashboard-container {
    width: 100%;
    min-height: 100vh;
    background: #f7fafc;
    padding: 20px;
}

.dashboard-header {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dashboard-title h1 {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 4px;
}

.dashboard-title p {
    color: #718096;
    font-size: 16px;
}

.dashboard-header {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header .header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logout-btn {
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.logout-btn:hover {
    background: #c53030;
}

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

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.stat-card h3 {
    font-size: 14px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 4px;
}

.stat-card .stat-unit {
    font-size: 14px;
    color: #718096;
}

.content-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

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

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.data-table th {
    font-weight: 600;
    color: #4a5568;
    background: #f7fafc;
    font-size: 14px;
}

.data-table td {
    color: #2d3748;
    font-size: 14px;
}

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

.error {
    background: #fed7d7;
    color: #c53030;
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.pagination button:hover:not(:disabled) {
    background: #f7fafc;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Адаптивность */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .dashboard-left {
        flex-direction: column;
        gap: 12px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 4px;
    }
}

/* Утилиты */
.hidden {
    display: none !important;
}

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

.mb-4 {
    margin-bottom: 16px;
}

.mt-4 {
    margin-top: 16px;
}

/* Стили для dashboard body */
.dashboard-body {
    background: #f7fafc;
    justify-content: flex-start;
    align-items: flex-start;
}

/* Быстрые ссылки */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.quick-link-card {
    display: block;
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e2e8f0;
}

.quick-link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
}

.quick-link-card h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

.quick-link-card p {
    margin: 0;
    color: #718096;
    font-size: 14px;
}

/* Стили для детальной страницы тикета */
.ticket-details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 16px;
}

.detail-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

    .detail-card.main-info {
        background: #f8fafc;
        border-left: 4px solid #4299e1;
    }
    
    .detail-card.processing-info {
        background: white;
        border-left: 4px solid #68d391;
    }

    .general-info-grid {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .processing-stats {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .additional-fields {
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid #e2e8f0;
    }
    








    @media (max-width: 768px) {
        .ticket-details-grid {
            gap: 16px;
        }
        
        .detail-card {
            padding: 16px;
        }
        
        .detail-row {
            flex-direction: column;
            align-items: flex-start;
            padding: 10px 12px;
            gap: 4px;
        }
        
        .detail-label {
            min-width: auto;
            margin-right: 0;
            margin-bottom: 2px;
            font-size: 12px;
        }
        
        .detail-value {
            width: 100%;
            font-size: 12px;
        }
        
        .processing-info .detail-label,
        .processing-info .detail-value {
            font-size: 11px;
        }
        
        .additional-fields {
            margin-top: 12px;
            padding-top: 12px;
        }
        
        .description-value,
        .bank-statement-value {
            margin-top: 6px;
            padding: 6px 8px;
            font-size: 12px;
        }
        
        .bank-statement-value {
            font-size: 11px;
        }
    }



.detail-card h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
}

.detail-card.main-info h3 {
    color: #2b6cb0;
    border-bottom-color: #4299e1;
}

.detail-card.processing-info h3 {
    color: #2f855a;
    border-bottom-color: #68d391;
    font-size: 14px;
}

.detail-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    border-left: 3px solid #e2e8f0;
    transition: background-color 0.2s ease;
}

.detail-row:hover {
    background: rgba(255, 255, 255, 0.8);
}

.detail-label {
    font-weight: 600;
    color: #4a5568;
    font-size: 13px;
    min-width: 120px;
    margin-right: 16px;
}

.detail-value {
    font-weight: 500;
    color: #2d3748;
    font-size: 13px;
    flex: 1;
    word-break: break-word;
}

/* Специальные стили для блока обработки */
.processing-info .detail-row {
    background: rgba(104, 211, 145, 0.1);
    border-left-color: #68d391;
}

.processing-info .detail-label {
    min-width: 80px;
    font-size: 12px;
}

.processing-info .detail-value {
    font-size: 12px;
    font-weight: 600;
}

/* Специальные стили для описания и банковской выписки */
.description-row,
.bank-statement-row {
    align-items: flex-start;
    min-height: auto;
}

.description-value,
.bank-statement-value {
    white-space: pre-wrap;
    line-height: 1.5;
    padding: 8px 12px;
    background: #f7fafc;
    border-radius: 6px;
    border-left: 3px solid #4299e1;
    margin-top: 4px;
}

.bank-statement-value {
    font-family: monospace;
    font-size: 12px;
    background: #f0fff4;
    border-left-color: #68d391;
}

.detail-value.resolved {
    color: #38a169;
}

.detail-value.pending {
    color: #ed8936;
}

.description-text {
    background: white;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    margin-top: 8px;
    line-height: 1.5;
    font-size: 14px;
}

.bank-statement {
    background: white;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    margin-top: 8px;
    font-family: monospace;
    font-size: 12px;
    white-space: pre-wrap;
}

/* Статусы и бейджи */
.status-badge {
    display: inline-flex;
    align-items: center;
}

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

.status.resolved {
    background: #c6f6d5;
    color: #22543d;
}

.status.pending {
    background: #fed7a1;
    color: #c05621;
}

.count-badge {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Решения */
.solutions-list {
    margin-top: 16px;
}

.solution-card {
    background: #f7fafc;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
}

.solution-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.solution-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}

.solution-type {
    background: #e2e8f0;
    color: #4a5568;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.solution-content {
    font-size: 14px;
}

.solution-meta {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.solution-employee {
    color: #4a5568;
    font-size: 12px;
}

.solution-employee strong {
    color: #2d3748;
}

.solution-date {
    color: #718096;
    font-size: 12px;
}

.solution-comment {
    color: #4a5568;
    line-height: 1.4;
}

/* Временная шкала */
.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}

.timeline-marker {
    position: absolute;
    left: -20px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #e2e8f0;
}

.timeline-marker.timeline-start {
    background: #48bb78;
}

.timeline-marker.timeline-solution {
    background: #667eea;
}

.timeline-content h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}

.timeline-content p {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #4a5568;
}

.timeline-date {
    font-size: 12px;
    color: #718096;
}

/* Медиа файлы */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.media-item {
    background: #f7fafc;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e2e8f0;
}

.media-info h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}

.media-content {
    background: white;
    padding: 12px;
    border-radius: 4px;
    font-size: 12px;
    overflow-x: auto;
    border: 1px solid #e2e8f0;
}

/* Аналитика сотрудников */
.employees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.employee-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.employee-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.employee-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

.employee-info {
    margin: 5px 0 0 0;
    font-size: 0.9em;
    color: #666;
}

.employee-info .tg-id {
    font-weight: 500;
    color: #3498db;
}

.employee-info .username {
    margin-left: 10px;
    color: #e74c3c;
    font-weight: 500;
}

.resolution-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.resolution-badge.high {
    background: #c6f6d5;
    color: #22543d;
}

.resolution-badge.medium {
    background: #fed7a1;
    color: #c05621;
}

.resolution-badge.low {
    background: #feb2b2;
    color: #c53030;
}

.employee-stats {
    margin-bottom: 16px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

.stat-label {
    color: #4a5568;
}

.stat-value {
    font-weight: 600;
    color: #2d3748;
}

.employee-actions {
    text-align: center;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* График сотрудников */
.chart-container {
    margin-top: 16px;
}

.chart-bar {
    margin-bottom: 16px;
}

.bar-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 14px;
}

.bar-label {
    font-weight: 600;
    color: #2d3748;
}

.bar-value {
    font-weight: 600;
    color: #667eea;
}

.bar-container {
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

/* Фильтры */
.filters-container, .filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.sort-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

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

.filter-group label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 6px;
    font-size: 14px;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

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

/* Таблица тикетов */
.tickets-table-container {
    overflow-x: auto;
    margin-top: 16px;
}

.tickets-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.tickets-table th {
    background: #f7fafc;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    font-size: 14px;
    border-bottom: 1px solid #e2e8f0;
}

.tickets-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
    color: #2d3748;
}

.ticket-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.ticket-row:hover {
    background: #f7fafc;
}

.uuid-short {
    font-family: monospace;
    font-size: 12px;
    color: #4a5568;
}

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

.problem-type.deposit {
    background: #c6f6d5;
    color: #22543d;
}

.problem-type.withdrawal {
    background: #fed7a1;
    color: #c05621;
}

.amount-cell {
    font-weight: 600;
    color: #2d3748;
}

.date-cell {
    color: #718096;
    font-size: 13px;
}

.actions-cell {
    text-align: center;
}

.status-badge {
    display: inline-block;
}

.status-badge .status {
    display: inline-block;
}

/* Пагинация */
.pagination-container {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

/* Дополнительные утилиты для страниц */
@media (max-width: 768px) {
    .ticket-details-grid {
        grid-template-columns: 1fr;
    }
    
    .employees-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-links {
        grid-template-columns: 1fr;
    }
    
    .tickets-table-container {
        font-size: 12px;
    }
    
    .tickets-table th,
    .tickets-table td {
        padding: 8px 4px;
    }
    
    .solution-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .solution-employee,
    .solution-date {
        font-size: 11px;
    }
}

/* Стили для медиа элементов */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.media-item {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.media-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.media-header {
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.media-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 8px;
}

.media-type {
    background: #4299e1;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.media-content {
    padding: 16px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7fafc;
}

.media-preview-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    object-fit: contain;
}

.media-preview-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    color: #718096;
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

.media-details {
    padding: 16px;
    border-top: 1px solid #e2e8f0;
}

.media-detail {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.media-detail:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.media-detail .detail-label {
    font-weight: 600;
    color: #4a5568;
    font-size: 12px;
    min-width: 80px;
    margin-right: 12px;
}

.media-detail .detail-value {
    font-size: 12px;
    color: #2d3748;
    word-break: break-all;
    white-space: pre-wrap;
    flex: 1;
}

.media-actions {
    padding: 12px 16px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.media-actions .btn {
    font-size: 12px;
    padding: 6px 12px;
}

/* Адаптивные стили для медиа */
@media (max-width: 768px) {
    .media-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .media-header {
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .media-header h4 {
        font-size: 14px;
    }
    
    .media-content {
        padding: 12px;
        min-height: 100px;
    }
    
    .media-details {
        padding: 12px;
    }
    
    .media-detail {
        flex-direction: column;
        gap: 4px;
        padding: 6px 0;
    }
    
    .media-detail .detail-label {
        min-width: auto;
        margin-right: 0;
        margin-bottom: 2px;
    }
    
    .media-actions {
        padding: 8px 12px;
        flex-wrap: wrap;
    }
}

/* Стили для индикатора загрузки infinite scroll */
.loading-indicator {
    padding: 20px;
    text-align: center;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.loading-indicator .loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #718096;
}

/* Стили для переключателя языка */
.language-switcher {
    display: flex;
    align-items: center;
}

.language-switcher select {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    color: #4a5568;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    min-width: 100px;
}

.language-switcher select:hover {
    border-color: #cbd5e0;
    background: #edf2f7;
}

.language-switcher select:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.loading-indicator .loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #4299e1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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