/**
 * 404 Monitor - Premium Professional Design
 * Modern UI with glassmorphism, gradients, and smooth animations
 */

/* Container */
.prorank-404-monitor-premium {
  padding: 0;
  max-width: 100%;
}

/* ============================================
   STATS CARDS
   ============================================ */

.prorank-404-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.prorank-404-stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.prorank-404-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.prorank-404-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 12px 32px rgba(0, 0, 0, 0.06);
}

.prorank-404-stat-card:hover::before {
  opacity: 1;
}

.prorank-404-stat-danger::before {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.prorank-404-stat-warning::before {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.prorank-404-stat-success::before {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.prorank-404-stat-info::before {
  background: linear-gradient(90deg, #3b82f6, #a78bfa);
}

.prorank-404-stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.prorank-404-stat-danger .prorank-404-stat-icon {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  color: #ef4444;
}

.prorank-404-stat-warning .prorank-404-stat-icon {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  color: #f59e0b;
}

.prorank-404-stat-success .prorank-404-stat-icon {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #10b981;
}

.prorank-404-stat-info .prorank-404-stat-icon {
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  color: #3b82f6;
}

.prorank-404-stat-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prorank-404-stat-value {
  font-size: 32px;
  font-weight: 700;
  color: #1f2937;
  line-height: 1;
  letter-spacing: -0.02em;
}

.prorank-404-stat-label {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   FILTERS BAR
   ============================================ */

.prorank-404-filters-bar {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 20px 24px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
  margin-bottom: 24px;
}

.prorank-404-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prorank-404-filter-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prorank-404-filter-select {
  padding: 10px 36px 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  background: #f9fafb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") no-repeat right 10px center;
  background-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 140px;
  -webkit-appearance: none;
  appearance: none;
}

.prorank-404-filter-select:hover {
  border-color: #d1d5db;
  background-color: #fff;
}

.prorank-404-filter-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.prorank-404-search-group {
  flex: 1;
}

.prorank-404-search-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  color: #374151;
  background: #f9fafb;
  transition: all 0.2s ease;
}

.prorank-404-search-input:hover {
  border-color: #d1d5db;
  background-color: #fff;
}

.prorank-404-search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  background-color: #fff;
}

.prorank-404-search-input::placeholder {
  color: #9ca3af;
}

.prorank-404-refresh-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.prorank-404-refresh-btn:hover {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

/* ============================================
   TOP ERRORS SECTION
   ============================================ */

.prorank-404-top-section {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
  margin-bottom: 24px;
  overflow: hidden;
}

.prorank-404-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: linear-gradient(180deg, #fafafa, #f5f5f5);
  border-bottom: 1px solid #e5e7eb;
}

.prorank-404-section-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

.prorank-404-section-badge {
  padding: 4px 12px;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  color: #dc2626;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.prorank-404-count-badge {
  padding: 4px 12px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #2563eb;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.prorank-404-top-list {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prorank-404-top-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(180deg, #fff, #fafafa);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.prorank-404-top-item:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.prorank-404-top-rank {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  color: #dc2626;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.prorank-404-top-content {
  flex: 1;
  min-width: 0;
}

.prorank-404-url {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
  background: transparent;
  padding: 0;
  word-break: break-all;
}

.prorank-404-top-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.prorank-404-hits-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  color: #dc2626;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.prorank-404-suggestion-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
  color: #2563eb;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.prorank-404-action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.prorank-404-action-primary {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.prorank-404-action-primary:hover {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

/* ============================================
   TABLE SECTION
   ============================================ */

.prorank-404-table-section {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.prorank-404-table-wrapper {
  overflow-x: auto;
}

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

.prorank-404-table thead {
  background: linear-gradient(180deg, #f9fafb, #f3f4f6);
}

.prorank-404-table th {
  padding: 14px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

.prorank-404-table td {
  padding: 16px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}

.prorank-404-row {
  transition: background 0.15s ease;
}

.prorank-404-row:hover {
  background: #f9fafb;
}

.prorank-404-row-resolved {
  background: #f0fdf4;
}

.prorank-404-row-resolved:hover {
  background: #dcfce7;
}

.prorank-404-url-code {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #1f2937;
  background: #f3f4f6;
  padding: 6px 10px;
  border-radius: 6px;
  word-break: break-all;
  max-width: 300px;
}

.prorank-404-suggestion-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border-radius: 8px;
  border-left: 3px solid #10b981;
}

.prorank-404-suggestion-inline code {
  font-size: 12px;
  color: #059669;
  background: transparent;
  padding: 0;
}

.prorank-404-match-score {
  padding: 2px 8px;
  background: #10b981;
  color: #fff;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

.prorank-404-td-hits {
  text-align: center;
}

.prorank-404-hits {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 28px;
  padding: 0 10px;
  background: #f3f4f6;
  color: #374151;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.prorank-404-hits-medium {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  color: #b45309;
}

.prorank-404-hits-high {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  color: #dc2626;
}

.prorank-404-td-date {
  font-size: 13px;
  color: #6b7280;
  white-space: nowrap;
}

.prorank-404-referrer-link {
  display: inline-block;
  max-width: 180px;
  font-size: 12px;
  color: #3b82f6;
  text-decoration: none;
  background: #eff6ff;
  padding: 4px 8px;
  border-radius: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.prorank-404-referrer-link:hover {
  background: #dbeafe;
  color: #2563eb;
}

.prorank-404-no-referrer {
  color: #d1d5db;
}

.prorank-404-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.prorank-404-status-unresolved {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  color: #dc2626;
}

.prorank-404-status-resolved {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #059669;
}

.prorank-404-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prorank-404-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.prorank-404-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.prorank-404-btn-primary {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.prorank-404-btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1px);
}

.prorank-404-btn-success {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.prorank-404-btn-success:hover:not(:disabled) {
  background: linear-gradient(180deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
}

.prorank-404-btn-danger {
  background: #f3f4f6;
  color: #6b7280;
}

.prorank-404-btn-danger:hover:not(:disabled) {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  transform: translateY(-1px);
}

/* ============================================
   EMPTY STATE
   ============================================ */

.prorank-404-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  text-align: center;
}

.prorank-404-empty-icon {
  margin-bottom: 24px;
}

.prorank-404-empty-state h4 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 700;
  color: #1f2937;
}

.prorank-404-empty-state p {
  margin: 0;
  font-size: 15px;
  color: #6b7280;
}

/* ============================================
   PAGINATION
   ============================================ */

.prorank-404-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px 24px;
  border-top: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #fafafa, #f5f5f5);
}

.prorank-404-page-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: #fff;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.prorank-404-page-btn:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #d1d5db;
}

.prorank-404-page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.prorank-404-page-info {
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
}

/* ============================================
   LOADING STATE
   ============================================ */

.prorank-404-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 40px;
  text-align: center;
}

.prorank-404-loading-spinner {
  margin-bottom: 24px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
  .prorank-404-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .prorank-404-stats-grid {
    grid-template-columns: 1fr;
  }

  .prorank-404-stat-card {
    padding: 20px;
  }

  .prorank-404-filters-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .prorank-404-filter-group {
    width: 100%;
  }

  .prorank-404-filter-select,
  .prorank-404-search-input {
    width: 100%;
  }

  .prorank-404-refresh-btn {
    width: 100%;
    justify-content: center;
  }

  .prorank-404-top-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .prorank-404-action-btn {
    width: 100%;
    justify-content: center;
    margin-top: 12px;
  }

  .prorank-404-table th,
  .prorank-404-table td {
    padding: 12px 10px;
  }

  .prorank-404-th-referrer,
  .prorank-404-td-referrer {
    display: none;
  }

  .prorank-404-url-code {
    max-width: 200px;
  }
}

@media (max-width: 480px) {
  .prorank-404-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .prorank-404-pagination {
    flex-direction: column;
    gap: 12px;
  }

  .prorank-404-page-btn {
    width: 100%;
    justify-content: center;
  }
}
