/* ============================================
   Sentinel Business Dashboard — ZeroDay
   Cyber dark theme, enterprise aesthetic
   ============================================ */

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

:root {
  --bg-primary: #070b14;
  --bg-secondary: #0d1424;
  --bg-card: #111d35;
  --bg-card-hover: #162040;
  --bg-input: #0a1628;
  --border: rgba(0, 240, 255, 0.12);
  --border-bright: rgba(0, 240, 255, 0.3);
  --cyan: #00F0FF;
  --cyan-dim: rgba(0, 240, 255, 0.15);
  --cyan-glow: 0 0 20px rgba(0, 240, 255, 0.25);
  --green: #00FF88;
  --green-dim: rgba(0, 255, 136, 0.15);
  --green-glow: 0 0 20px rgba(0, 255, 136, 0.25);
  --red: #FF3366;
  --red-dim: rgba(255, 51, 102, 0.15);
  --orange: #FF9500;
  --orange-dim: rgba(255, 149, 0, 0.15);
  --yellow: #FFD60A;
  --yellow-dim: rgba(255, 214, 10, 0.15);
  --blue: #4D9FFF;
  --blue-dim: rgba(77, 159, 255, 0.15);
  --text-primary: #E0E6ED;
  --text-secondary: #8899AA;
  --text-muted: #4A5A6A;
  --sidebar-w: 240px;
  --header-h: 64px;
}

html, body {
  height: 100%;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: rgba(0,240,255,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,240,255,0.4); }

/* ========== LAYOUT ========== */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sentinel-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: var(--bg-primary);
  letter-spacing: -1px;
}

.sentinel-wordmark {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.sentinel-wordmark span {
  color: var(--cyan);
}

.sentinel-sub {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.nav-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 12px 20px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  border-left: 2px solid transparent;
  font-size: 13px;
  font-weight: 500;
  user-select: none;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(0, 240, 255, 0.05);
}

.nav-item.active {
  color: var(--cyan);
  background: var(--cyan-dim);
  border-left-color: var(--cyan);
}

.nav-item.active svg {
  opacity: 1;
  color: var(--cyan);
}

.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.nav-badge.green { background: var(--green); color: #000; }
.nav-badge.orange { background: var(--orange); }

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

.sidebar-plan {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}

.sidebar-plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.sidebar-plan-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--cyan);
}

.sidebar-plan-badge {
  font-size: 9px;
  background: var(--green-dim);
  color: var(--green);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-plan-info {
  font-size: 11px;
  color: var(--text-muted);
}

.sidebar-plan-info strong {
  color: var(--text-secondary);
}

/* Main content area */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Top header bar */
.top-bar {
  height: var(--header-h);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  width: 220px;
  transition: border-color 0.2s;
}

.search-box:focus-within {
  border-color: var(--cyan);
}

.search-box svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 13px;
  width: 100%;
}

.search-box input::placeholder { color: var(--text-muted); }

.icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  background: none;
  border: 1px solid transparent;
  color: var(--text-secondary);
}

.icon-btn:hover {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text-primary);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.notif-dot {
  width: 7px;
  height: 7px;
  background: var(--red);
  border-radius: 50%;
  position: absolute;
  top: 7px;
  right: 7px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1a3a5c, #0a2a40);
  border: 1px solid var(--border-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan);
  cursor: pointer;
}

/* Content scroll area */
.content-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* ========== PAGE SECTIONS ========== */
.page-section {
  display: none;
}

.page-section.active {
  display: block;
}

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

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.15s;
}

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

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  opacity: 0.6;
}

.stat-card.red-card::before { background: linear-gradient(90deg, var(--red), var(--orange)); }
.stat-card.orange-card::before { background: linear-gradient(90deg, var(--orange), var(--yellow)); }
.stat-card.green-card::before { background: linear-gradient(90deg, var(--green), var(--cyan)); }

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.stat-icon.cyan { background: var(--cyan-dim); color: var(--cyan); }
.stat-icon.red { background: var(--red-dim); color: var(--red); }
.stat-icon.orange { background: var(--orange-dim); color: var(--orange); }
.stat-icon.green { background: var(--green-dim); color: var(--green); }

.stat-icon svg { width: 20px; height: 20px; }

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.stat-sub strong {
  color: var(--green);
}

/* Charts grid */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

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

.chart-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.chart-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.chart-tabs {
  display: flex;
  gap: 4px;
}

.chart-tab {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  background: none;
  border: none;
  transition: all 0.15s;
}

.chart-tab:hover { color: var(--text-secondary); }
.chart-tab.active { background: var(--cyan-dim); color: var(--cyan); }

/* Line chart (pure CSS bars) */
.threat-chart {
  height: 120px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  margin-bottom: 12px;
}

.chart-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
}

.chart-bar {
  width: 100%;
  border-radius: 3px 3px 0 0;
  min-height: 4px;
  transition: opacity 0.2s;
  position: relative;
}

.chart-bar.highlight {
  background: linear-gradient(180deg, var(--cyan), rgba(0,240,255,0.4));
  box-shadow: var(--cyan-glow);
}

.chart-bar.normal {
  background: rgba(0, 240, 255, 0.25);
}

.chart-bar-label {
  font-size: 9px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1;
  margin-top: 6px;
}

.chart-legend {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

/* Pie chart */
.pie-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
}

.pie-chart {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: conic-gradient(
    var(--red) 0deg 90deg,
    var(--orange) 90deg 162deg,
    var(--yellow) 162deg 234deg,
    var(--blue) 234deg 306deg,
    var(--cyan) 306deg 360deg
  );
  position: relative;
  flex-shrink: 0;
}

.pie-chart::after {
  content: '';
  position: absolute;
  inset: 25px;
  background: var(--bg-card);
  border-radius: 50%;
}

.pie-legend {
  flex: 1;
}

.pie-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.pie-item-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.pie-item-label { flex: 1; }
.pie-item-val { font-weight: 600; color: var(--text-primary); font-size: 12px; }

/* Recent alerts */
.alerts-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.alerts-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.alerts-title {
  font-size: 13px;
  font-weight: 600;
}

.view-all-btn {
  font-size: 11px;
  color: var(--cyan);
  cursor: pointer;
  background: none;
  border: none;
  font-weight: 500;
}

.alerts-list { padding: 8px 0; }

.alert-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.15s;
}

.alert-row:hover { background: rgba(0, 240, 255, 0.03); }

.alert-sev {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.alert-sev.critical { background: var(--red); box-shadow: 0 0 8px var(--red); }
.alert-sev.high { background: var(--orange); }
.alert-sev.medium { background: var(--yellow); }
.alert-sev.low { background: var(--blue); }

.alert-info { flex: 1; }
.alert-name { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.alert-detail { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.alert-time { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

.alert-action-btn {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: var(--red-dim);
  color: var(--red);
  transition: all 0.15s;
  opacity: 0;
}

.alert-row:hover .alert-action-btn { opacity: 1; }
.alert-action-btn:hover { background: var(--red); color: #fff; }

/* Separator */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ========== DATA TABLES ========== */
.data-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.table-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  flex: 1;
  max-width: 320px;
  transition: border-color 0.2s;
}

.table-search:focus-within { border-color: var(--cyan); }

.table-search svg { width: 14px; height: 14px; color: var(--text-muted); flex-shrink: 0; }

.table-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 13px;
  width: 100%;
}

.table-search input::placeholder { color: var(--text-muted); }

.filter-tabs {
  display: flex;
  gap: 4px;
}

.filter-tab {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  background: none;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.filter-tab:hover { border-color: var(--border); color: var(--text-secondary); }
.filter-tab.active { background: var(--cyan-dim); color: var(--cyan); border-color: var(--cyan); }

.btn {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn svg { width: 14px; height: 14px; }

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), #00c8d4);
  color: var(--bg-primary);
}

.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-outline {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-outline:hover { border-color: var(--cyan); color: var(--cyan); }

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(255,51,102,0.2);
}

.btn-danger:hover { background: var(--red); color: #fff; }

.btn-ghost {
  background: none;
  color: var(--text-secondary);
  border: none;
}

.btn-ghost:hover { color: var(--text-primary); }

.btn-sm { padding: 5px 10px; font-size: 11px; }
.btn-xs { padding: 3px 8px; font-size: 10px; }

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

thead th {
  padding: 10px 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-align: left;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

thead th:hover { color: var(--text-secondary); }

thead th .sort-icon {
  display: inline-block;
  margin-left: 4px;
  opacity: 0.5;
  font-size: 9px;
}

tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 0.12s;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(0, 240, 255, 0.03); }

tbody td {
  padding: 12px 20px;
  font-size: 13px;
  color: var(--text-primary);
  vertical-align: middle;
}

.td-secondary { color: var(--text-secondary) !important; font-size: 12px !important; }
.td-muted { color: var(--text-muted) !important; font-size: 12px !important; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-pill.protected {
  background: var(--green-dim);
  color: var(--green);
}

.status-pill.protected::before { background: var(--green); }

.status-pill.warning {
  background: var(--orange-dim);
  color: var(--orange);
}

.status-pill.warning::before { background: var(--orange); }

.status-pill.critical {
  background: var(--red-dim);
  color: var(--red);
}

.status-pill.critical::before { background: var(--red); }

.status-pill.offline {
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
}

.status-pill.offline::before { background: var(--text-muted); }

.sev-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
}

.sev-pill.critical { background: var(--red-dim); color: var(--red); }
.sev-pill.high { background: var(--orange-dim); color: var(--orange); }
.sev-pill.medium { background: var(--yellow-dim); color: var(--yellow); }
.sev-pill.low { background: var(--blue-dim); color: var(--blue); }
.sev-pill.safe { background: var(--green-dim); color: var(--green); }

.role-badge {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
}

.role-badge.admin { background: var(--cyan-dim); color: var(--cyan); }
.role-badge.member { background: rgba(77,159,255,0.15); color: var(--blue); }
.role-badge.viewer { background: rgba(255,255,255,0.05); color: var(--text-muted); }

.os-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 11px;
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
}

/* ========== INCIDENT TIMELINE ========== */
.timeline-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.timeline-body { padding: 20px; }

.timeline-row {
  display: flex;
  gap: 16px;
  position: relative;
  padding-bottom: 24px;
}

.timeline-row:last-child { padding-bottom: 0; }

.timeline-row::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 28px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline-row:last-child::before { display: none; }

.timeline-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
  position: relative;
}

.timeline-dot svg { width: 14px; height: 14px; }

.timeline-dot.detected { background: var(--red-dim); color: var(--red); }
.timeline-dot.action { background: var(--orange-dim); color: var(--orange); }
.timeline-dot.resolved { background: var(--green-dim); color: var(--green); }
.timeline-dot.neutral { background: var(--blue-dim); color: var(--blue); }

.timeline-content { flex: 1; }
.timeline-time { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.timeline-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.timeline-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

/* ========== COMPLIANCE ========== */
.compliance-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  width: fit-content;
}

.comp-tab {
  padding: 8px 20px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  background: none;
  border: none;
  transition: all 0.15s;
}

.comp-tab:hover { color: var(--text-secondary); }
.comp-tab.active { background: var(--cyan-dim); color: var(--cyan); }

.compliance-framework {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: none;
}

.compliance-framework.active { display: block; }

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

.comp-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.comp-score-ring {
  position: relative;
  width: 64px;
  height: 64px;
}

.comp-score-ring svg {
  width: 64px;
  height: 64px;
}

.comp-score-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--cyan);
}

.checklist { display: flex; flex-direction: column; gap: 8px; }

.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}

.checklist-item:hover { border-color: var(--border); }

.checklist-check {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 2px solid var(--border-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.checklist-check.checked {
  background: var(--green);
  border-color: var(--green);
}

.checklist-check svg { width: 12px; height: 12px; color: #000; opacity: 0; }

.checklist-check.checked svg { opacity: 1; }

.checklist-text { flex: 1; }
.checklist-label { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.checklist-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.checklist-status {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.checklist-status.complete { background: var(--green-dim); color: var(--green); }
.checklist-status.pending { background: var(--orange-dim); color: var(--orange); }
.checklist-status.not-done { background: rgba(255,255,255,0.05); color: var(--text-muted); }

/* ========== INTELLIGENCE FEED ========== */
.intel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.intel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s;
}

.intel-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-1px);
}

.intel-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.intel-threat-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.intel-threat-family {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.intel-body {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.intel-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
}

.intel-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.intel-meta svg { width: 12px; height: 12px; }

/* ========== SETTINGS ========== */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.settings-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.settings-card-title {
  font-size: 13px;
  font-weight: 600;
}

.settings-card-body { padding: 20px; }

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.setting-row:last-child { border-bottom: none; }

.setting-label { font-size: 13px; color: var(--text-primary); }
.setting-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Toggle switch */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-track {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  transition: background 0.2s;
}

.toggle input:checked + .toggle-track { background: var(--green); }

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.toggle input:checked ~ .toggle-thumb { transform: translateX(20px); }

/* Settings form */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: block;
}

.form-input, .form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus { border-color: var(--cyan); }
.form-input::placeholder { color: var(--text-muted); }

.form-select { cursor: pointer; }

.billing-card {
  background: linear-gradient(135deg, #0d1f3c, #0a1628);
  border: 1px solid var(--cyan);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

.billing-plan-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 4px;
}

.billing-plan-price {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
}

.billing-plan-period {
  font-size: 13px;
  color: var(--text-muted);
}

.billing-features {
  list-style: none;
  text-align: left;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.billing-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.billing-features li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ========== TEAM INVITE MODAL ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}

.modal-overlay.open { display: flex; }

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: 16px;
  width: 420px;
  max-width: 90vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), var(--cyan-glow);
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title { font-size: 16px; font-weight: 700; }

.modal-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text-muted);
  transition: all 0.15s;
}

.modal-close:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }

.modal-body { padding: 24px; }

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.form-row { display: flex; gap: 10px; }
.form-row .form-group { flex: 1; }

/* ========== INCIDENT DETAIL DRAWER ========== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  z-index: 90;
}

.drawer-overlay.open { display: block; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 91;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.drawer.open { transform: translateX(0); }

.drawer-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-shrink: 0;
}

.drawer-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.drawer-sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

.drawer-actions {
  display: flex;
  gap: 8px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.drawer-section {
  margin-bottom: 24px;
}

.drawer-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.info-item {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 12px;
}

.info-label { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.info-value { font-size: 14px; font-weight: 600; color: var(--text-primary); }

/* Threat map */
.threat-map {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  position: relative;
}

.map-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  margin-bottom: 16px;
}

.map-cell {
  aspect-ratio: 1;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  color: rgba(255,255,255,0.3);
}

.map-cell.level-0 { background: rgba(0,240,255,0.05); }
.map-cell.level-1 { background: rgba(0,240,255,0.15); color: rgba(0,240,255,0.7); }
.map-cell.level-2 { background: rgba(255,149,0,0.2); color: var(--orange); }
.map-cell.level-3 { background: rgba(255,51,102,0.3); color: var(--red); }

.map-regions {
  display: flex;
  justify-content: space-around;
  font-size: 10px;
  color: var(--text-muted);
}

/* Live pulse animation */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
}

.live-dot::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
  box-shadow: 0 0 8px var(--green);
}

/* Gauge chart */
.gauge-wrapper {
  display: flex;
  align-items: center;
  gap: 24px;
}

.gauge-svg { flex-shrink: 0; }

.gauge-info { flex: 1; }

.gauge-score {
  font-size: 32px;
  font-weight: 800;
  color: var(--cyan);
  line-height: 1;
  margin-bottom: 4px;
}

.gauge-label { font-size: 12px; color: var(--text-muted); }

/* Bar chart */
.bar-chart { display: flex; flex-direction: column; gap: 10px; }

.bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bar-label { font-size: 12px; color: var(--text-secondary); width: 80px; flex-shrink: 0; }

.bar-track {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease;
}

.bar-fill.cyan { background: linear-gradient(90deg, var(--cyan), rgba(0,240,255,0.5)); }
.bar-fill.green { background: linear-gradient(90deg, var(--green), rgba(0,255,136,0.4)); }
.bar-fill.orange { background: linear-gradient(90deg, var(--orange), rgba(255,149,0,0.4)); }
.bar-fill.red { background: linear-gradient(90deg, var(--red), rgba(255,51,102,0.4)); }
.bar-fill.blue { background: linear-gradient(90deg, var(--blue), rgba(77,159,255,0.4)); }

.bar-val {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  width: 36px;
  text-align: right;
  flex-shrink: 0;
}

/* Quick action bar */
.quick-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

/* Endpoint detail drawer */
.endpoint-status-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}

.endpoint-stat {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.endpoint-stat-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.endpoint-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Pagination */
.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

.table-count { font-size: 12px; color: var(--text-muted); }

.pagination { display: flex; gap: 4px; }

.page-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  transition: all 0.15s;
}

.page-btn:hover { border-color: var(--border); color: var(--text-secondary); }
.page-btn.active { background: var(--cyan-dim); color: var(--cyan); border-color: var(--cyan); }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* Responsive */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .charts-grid { grid-template-columns: 1fr; }
  .intel-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}