/* Dashboard Styles - Matching Homepage V2 Dark Theme */
/* Using the same CSS variables and design language as homepage.css */

/* ============================================ */
/* DASHBOARD HEADER */
/* ============================================ */
.dashboard-v2 {
  padding: 40px 0 80px;
}

.dashboard-header {
  margin-bottom: 40px;
}

.dashboard-header h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-white);
  margin: 0;
}

/* ============================================ */
/* ALERT BANNERS */
/* ============================================ */
.dashboard-alerts {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.alert-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.3s var(--ease-out);
}

.alert-card:hover {
  border-color: var(--accent);
}

.alert-card.info {
  border-left: 3px solid var(--accent);
}

.alert-icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.alert-content {
  flex: 1;
  min-width: 0;
}

.alert-content h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-white);
  margin: 0 0 4px;
}

.alert-content p {
  font-size: 14px;
  color: var(--text-gray);
  margin: 0;
  line-height: 1.5;
}

.alert-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
}

.alert-action:hover {
  background: var(--accent);
  color: var(--bg-black);
  transform: translateY(-2px);
}

/* ============================================ */
/* STATS GRID */
/* ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

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

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

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

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s var(--ease-out);
}

.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.stat-card h3 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.stat-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: all 0.2s;
}

.stat-link:hover {
  color: var(--text-white);
}

.stat-link::after {
  content: '→';
  transition: transform 0.2s;
}

.stat-link:hover::after {
  transform: translateX(4px);
}

/* ============================================ */
/* EVENTS TABLE SECTION */
/* ============================================ */
.events-section {
  margin-top: 48px;
}

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

.events-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-white);
  margin: 0;
}

.events-header .view-all {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.events-header .view-all:hover {
  color: var(--text-white);
}

/* Events Table */
.events-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

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

.events-table thead {
  background: var(--bg-elevated);
}

.events-table th {
  padding: 16px 20px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.events-table tbody tr {
  transition: background 0.15s;
  cursor: pointer;
}

.events-table tbody tr:hover {
  background: rgba(200, 255, 0, 0.03);
}

.events-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-gray);
}

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

.events-table .timestamp {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.events-table .source {
  font-weight: 600;
  color: var(--text-white);
}

.events-table .preview {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-badge.success {
  background: rgba(39, 201, 63, 0.15);
  color: #27c93f;
  border: 1px solid rgba(39, 201, 63, 0.3);
}

.status-badge.failed {
  background: rgba(255, 59, 59, 0.15);
  color: #ff3b3b;
  border: 1px solid rgba(255, 59, 59, 0.3);
}

.status-badge.processing {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
  animation: pulse-processing 2s infinite;
}

.status-badge.pending {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

@keyframes pulse-processing {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ============================================ */
/* EMPTY STATE */
/* ============================================ */
.empty-state-v2 {
  padding: 80px 40px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  color: var(--text-muted);
  opacity: 0.5;
}

.empty-state-v2 h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-white);
  margin: 0 0 8px;
}

.empty-state-v2 p {
  font-size: 15px;
  color: var(--text-gray);
  margin: 0 0 32px;
}

.empty-state-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary-v2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: var(--accent);
  color: var(--bg-black);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s var(--ease-out);
}

.btn-primary-v2:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-secondary-v2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: transparent;
  color: var(--text-white);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s var(--ease-out);
}

.btn-secondary-v2:hover {
  border-color: var(--accent);
  color: var(--accent);
}
