/* SentryOps Dashboard — embedded React app styles */
/* Uses same design tokens as landing page theme.css */

.dashboard-shell {
  display: flex;
  height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 220px;
  min-width: 220px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 20px 16px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.nav-item:hover { background: var(--bg3); color: var(--text); }
.nav-item.active { background: var(--accent-dim); color: var(--accent); }
.nav-icon { font-size: 16px; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg3);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid rgba(0,230,118,0.3);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
}

.user-info { display: flex; flex-direction: column; gap: 1px; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text); }
.user-role { font-size: 11px; color: var(--accent); }

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.topbar {
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(13,17,23,0.5);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.page-title { font-family: var(--font-head); font-size: 18px; font-weight: 700; color: var(--text); }

.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-date { font-size: 13px; color: var(--text-muted); }

.status-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-dim);
  border: 1px solid rgba(0,230,118,0.2);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.status-pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

.page-content { padding: 24px 28px; flex: 1; }

/* ===== OVERVIEW CARDS ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--border);
}

.stat-card-value {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -1px;
  margin: 8px 0 4px;
}

.stat-card-value.accent-value { color: var(--accent); }

.stat-card-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card-sub { font-size: 12px; color: var(--border); margin-top: 2px; }

/* ===== TWO COL ===== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  margin-bottom: 24px;
}

/* ===== CHART ===== */
.chart-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
}

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

.chart-header h2 { font-family: var(--font-head); font-size: 15px; font-weight: 600; color: var(--text); }

.chart-legend { display: flex; gap: 16px; }
.leg-item { font-size: 11px; font-weight: 500; }

/* ===== QUICK ACTIONS ===== */
.quick-actions {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
}

.qa-title { font-family: var(--font-head); font-size: 15px; font-weight: 600; margin-bottom: 16px; }

.qa-buttons { display: flex; flex-direction: column; gap: 10px; }

.qa-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
}

.qa-primary {
  background: var(--accent);
  color: #0d1117;
  border-color: var(--accent);
}
.qa-primary:hover { background: #00c96b; border-color: #00c96b; }

.qa-secondary {
  background: var(--bg3);
  color: var(--text);
  border-color: var(--border);
}
.qa-secondary:hover { background: var(--border); }

/* ===== ALERT FEED ===== */
.alert-feed {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}

.section-header h2 { font-family: var(--font-head); font-size: 15px; font-weight: 600; }

.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

.live-label { font-size: 11px; font-weight: 600; color: var(--accent); letter-spacing: 0.5px; }

.alert-table-wrap { overflow-x: auto; }

.alert-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.alert-table thead tr {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.alert-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.alert-table tbody tr {
  border-bottom: 1px solid rgba(48,54,61,0.5);
  transition: background 0.1s;
}

.alert-table tbody tr:last-child { border-bottom: none; }
.alert-table tbody tr:hover { background: rgba(33,38,45,0.5); }

.alert-table td { padding: 12px 16px; color: var(--text); vertical-align: middle; }

.sev-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #0d1117;
  white-space: nowrap;
}

.time-cell { color: var(--text-muted) !important; font-size: 12px; white-space: nowrap; }
.client-cell { font-weight: 500; white-space: nowrap; }
.desc-cell { max-width: 300px; }
.ep-cell { font-family: monospace; font-size: 11px; color: var(--text-muted); white-space: nowrap; }

.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.badge-open  { background: rgba(255,68,68,0.15); color: #ff4444; border: 1px solid rgba(255,68,68,0.3); }
.badge-inv   { background: rgba(224,179,65,0.15); color: #e3b341; border: 1px solid rgba(224,179,65,0.3); }
.badge-res   { background: rgba(0,230,118,0.12); color: #00e676; border: 1px solid rgba(0,230,118,0.25); }

/* ===== PLACEHOLDER PAGES ===== */
.placeholder-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  text-align: center;
  gap: 16px;
}

.placeholder-icon { font-size: 48px; color: var(--border); }
.placeholder-page h2 { font-family: var(--font-head); font-size: 24px; font-weight: 700; }
.placeholder-page p { color: var(--text-muted); max-width: 400px; line-height: 1.6; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .sidebar { display: none; }
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .page-content { padding: 16px; }
  .topbar { padding: 16px; }
}

@media (max-width: 600px) {
  .cards-grid { grid-template-columns: 1fr; }
  .alert-table { font-size: 12px; }
  .alert-table th, .alert-table td { padding: 10px 10px; }
  .desc-cell { display: none; }
}