/* Feedback Dashboard CSS */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #333;
  min-height: 100vh;
}

.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.dashboard-header {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  padding: 20px 30px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dashboard-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #2d3748;
}

.header-nav {
  display: flex;
  gap: 12px;
  align-items: center;
}

.nav-link {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s;
  border: 1px solid rgba(102, 126, 234, 0.2);
}

.nav-link:hover {
  background: rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}

.back-button {
  background: #667eea;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s;
}

.back-button:hover {
  background: #5a67d8;
}

/* Statistics Panel */
.stats-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-5px);
}

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

.stat-number {
  font-size: 36px;
  font-weight: 700;
  color: #2d3748;
}

.stat-card.positive .stat-number {
  color: #48bb78;
}

.stat-card.negative .stat-number {
  color: #f56565;
}

.stat-card.comments .stat-number {
  color: #4299e1;
}

/* Filter Section */
.filter-section {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.filter-section h2 {
  font-size: 20px;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 20px;
}

.filter-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  align-items: end;
}

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

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

.filter-group select,
.filter-group input {
  padding: 10px;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  transition: border-color 0.2s;
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: #667eea;
}

.filter-actions {
  display: flex;
  gap: 10px;
  grid-column: span 2;
}

.btn-primary,
.btn-secondary {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: #667eea;
  color: white;
}

.btn-primary:hover {
  background: #5a67d8;
}

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

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

/* Feedback Table Section */
.feedback-table-section {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

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

.record-count {
  font-size: 14px;
  color: #718096;
}

.table-container {
  overflow-x: auto;
}

.feedback-table {
  width: 100%;
  border-collapse: collapse;
}

.feedback-table thead {
  background: #f7fafc;
}

.feedback-table th {
  padding: 12px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  color: #4a5568;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e2e8f0;
}

.feedback-table th.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 20px;
}

.feedback-table th.sortable:hover {
  background: #edf2f7;
}

.feedback-table th.sortable::after {
  content: '⇅';
  position: absolute;
  right: 5px;
  opacity: 0.3;
}

.feedback-table th.sort-asc::after {
  content: '↑';
  opacity: 1;
}

.feedback-table th.sort-desc::after {
  content: '↓';
  opacity: 1;
}

.feedback-table tbody tr {
  border-bottom: 1px solid #e2e8f0;
  transition: background 0.2s;
}

.feedback-table tbody tr:hover {
  background: #f7fafc;
}

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

.filename {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: 'Courier New', monospace;
  font-size: 12px;
}

.comment-cell {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

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

.badge-negative {
  background: #fed7d7;
  color: #742a2a;
}

.badge-comment {
  background: #bee3f8;
  color: #2c5282;
}

/* Play Button */
.btn-play {
  background: #667eea;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-play:hover {
  background: #5a67d8;
  transform: scale(1.05);
}

/* No Results / Loading */
.no-results,
.loading {
  text-align: center;
  padding: 40px;
  color: #718096;
  font-size: 16px;
}

/* Video Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  border-radius: 12px;
  padding: 20px;
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 32px;
  font-weight: bold;
  color: #718096;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 1001;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 4px;
}

.close-modal:hover {
  color: #2d3748;
}

.video-container {
  margin-bottom: 20px;
}

.video-container video {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.video-metadata {
  padding: 20px;
  background: #f7fafc;
  border-radius: 8px;
}

.video-metadata h3 {
  font-size: 18px;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 15px;
}

.video-metadata p {
  font-size: 14px;
  color: #4a5568;
  margin-bottom: 10px;
  line-height: 1.6;
}

.video-metadata strong {
  color: #2d3748;
}

/* Responsive Design */
@media (max-width: 768px) {
  .dashboard-header h1 {
    font-size: 22px;
  }

  .stats-panel {
    grid-template-columns: repeat(2, 1fr);
  }

  .filter-controls {
    grid-template-columns: 1fr;
  }

  .filter-actions {
    grid-column: span 1;
    flex-direction: column;
  }

  .feedback-table {
    font-size: 12px;
  }

  .feedback-table th,
  .feedback-table td {
    padding: 8px;
  }

  .modal-content {
    width: 95%;
    padding: 15px;
  }
}
