/* Trail Conditions Reports — Analytics Dashboard */
.tcr-analytics {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.tcr-analytics-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 30px;
  color: #1a202c;
}

.tcr-section {
  margin-bottom: 40px;
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

.tcr-help {
  color: #718096;
  font-size: 14px;
  margin: -10px 0 15px 0;
}

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

.tcr-stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
}

.tcr-stat-card:nth-child(2) {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.tcr-stat-card:nth-child(3) {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.tcr-stat-card:nth-child(4) {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.tcr-stat-value {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
}

.tcr-stat-label {
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
  margin-bottom: 4px;
}

.tcr-stat-sub {
  font-size: 13px;
  opacity: 0.8;
}

/* Grid Layouts */
.tcr-grid-2col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 900px) {
  .tcr-grid-2col {
    grid-template-columns: 1fr;
  }
}

/* Tables */
.tcr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

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

.tcr-table th {
  text-align: left;
  padding: 12px;
  font-weight: 600;
  color: #2d3748;
  border-bottom: 2px solid #e2e8f0;
}

.tcr-table td {
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #4a5568;
}

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

.tcr-table tbody tr:last-child td {
  border-bottom: none;
}

/* Trail Names */
.tcr-trail-name {
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 2px;
}

.tcr-trail-area {
  font-size: 12px;
  color: #718096;
}

.tcr-hazard-list {
  font-size: 13px;
  line-height: 1.6;
}

/* States */
.tcr-loading,
.tcr-error,
.tcr-empty {
  padding: 40px 20px;
  text-align: center;
  color: #718096;
  font-size: 16px;
}

.tcr-error {
  color: #e53e3e;
  background: #fff5f5;
  border: 1px solid #feb2b2;
  border-radius: 8px;
}

.tcr-empty {
  color: #a0aec0;
  font-style: italic;
}

/* Resolution Stats - Special Styling */
.tcr-resolution-section .tcr-stat-card.resolution {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.tcr-resolution-section .tcr-stat-card.active {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #78350f;
}

.tcr-resolution-section .tcr-stat-card:nth-child(3) {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  color: #fff;
}

/* Leaderboard Table */
.tcr-table.leaderboard th:first-child,
.tcr-table.leaderboard td.rank {
  width: 80px;
  text-align: center;
}

.tcr-table.leaderboard td.rank {
  font-size: 16px;
  font-weight: 700;
  color: #059669;
}

.tcr-table.leaderboard td.resolver-name {
  font-weight: 600;
  color: #1f2937;
}

.tcr-table.leaderboard td.date {
  color: #6b7280;
  font-size: 13px;
}

.tcr-table.leaderboard tbody tr:hover {
  background: #ecfdf5;
}

/* Resolution List */
.resolution-list {
  display: grid;
  gap: 20px;
}

.resolution-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  transition: all .2s ease;
}

.resolution-item:hover {
  background: #ecfdf5;
  border-color: #10b981;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16,185,129,.15);
}

.resolution-item img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
}

.resolution-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.resolution-trail {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.resolution-caption {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.5;
}

.resolution-meta {
  font-size: 13px;
  color: #6b7280;
  margin-top: auto;
}

.resolution-meta strong {
  color: #059669;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .tcr-analytics {
    padding: 15px;
  }

  .tcr-analytics-title {
    font-size: 24px;
  }

  .tcr-stats-grid {
    grid-template-columns: 1fr;
  }

  .tcr-section {
    padding: 16px;
  }

  .tcr-table {
    font-size: 13px;
  }

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

  .tcr-stat-value {
    font-size: 28px;
  }

  .tcr-table.leaderboard {
    font-size: 12px;
  }

  .tcr-table.leaderboard th:first-child,
  .tcr-table.leaderboard td.rank {
    width: 60px;
  }

  .resolution-item {
    grid-template-columns: 1fr;
  }

  .resolution-item img {
    width: 100%;
    height: 200px;
  }
}
