* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: #f5f7fa;
  color: #1a202c;
  padding: 20px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

/* Header */
.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px 40px;
  border-radius: 16px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.header h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.header .subtitle {
  font-size: 16px;
  opacity: 0.9;
}

/* Filters */
.filters {
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin-bottom: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 150px;
}

.filter-group label {
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group input,
.filter-group select {
  padding: 10px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s;
  background: white;
  font-family: inherit;
}

.filter-group input:focus,
.filter-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  height: 42px;
  white-space: nowrap;
}

.btn-primary {
  background: #667eea;
  color: white;
}

.btn-primary:hover {
  background: #5a67d8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
  background: #e2e8f0;
  color: #4a5568;
}

.btn-secondary:hover {
  background: #cbd5e0;
}

.btn-success {
  background: #48bb78;
  color: white;
}

.btn-success:hover {
  background: #38a169;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.btn-success:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Stats Summary */
.stats-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 20px 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.stat-icon {
  font-size: 32px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7fafc;
  border-radius: 10px;
}

.stat-info {
  flex: 1;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #2d3748;
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: #718096;
  font-weight: 500;
}

/* Table */
.table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin-bottom: 30px;
}

.table-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.table-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: #2d3748;
}

.table-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.table-controls span {
  color: #718096;
  font-size: 14px;
}

.table-wrapper {
  overflow-x: auto;
  padding: 0 24px 24px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead {
  background: #f7fafc;
}

th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #4a5568;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

th.photo-column {
  color: #667eea;
  text-align: center;
}

th.video-column {
  color: #48bb78;
  text-align: center;
}

th.total-column {
  color: #ed8936;
  text-align: center;
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid #f0f4f8;
  color: #2d3748;
}

td:not(:first-child) {
  text-align: center;
}

td.channel-name {
  font-weight: 600;
  color: #2d3748;
  text-align: left;
}

td.date-cell {
  color: #718096;
  font-size: 13px;
}

td.photo-cell {
  color: #667eea;
  font-weight: 600;
}

td.video-cell {
  color: #48bb78;
  font-weight: 600;
}

td.total-cell {
  color: #ed8936;
  font-weight: 700;
  background: #fffbeb;
}

tbody tr:hover {
  background: #f7fafc;
}

.loading {
  text-align: center;
  color: #a0aec0;
  padding: 40px;
  font-size: 16px;
}

/* Badge для количества */
.badge {
  display: inline-block;
  padding: 2px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
}

.badge-photo {
  background: #ebf4ff;
  color: #667eea;
}

.badge-video {
  background: #f0fff4;
  color: #48bb78;
}

.badge-total {
  background: #fffbeb;
  color: #ed8936;
}

/* Responsive */
@media (max-width: 768px) {
  .header {
    padding: 20px;
  }

  .header h1 {
    font-size: 24px;
  }

  .filters {
    flex-direction: column;
    gap: 12px;
  }

  .filter-group {
    min-width: 100%;
  }

  .stats-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .table-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .table-controls {
    justify-content: space-between;
  }

  th,
  td {
    padding: 10px 12px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .stats-summary {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 14px 18px;
  }
}
