/* ==========================================================================
   Enterprise AI Operations Platform — Shared Styles
   ========================================================================== */

:root {
  --navy-950: #0a0e1a;
  --navy-900: #0d1321;
  --navy-800: #121a2b;
  --navy-700: #182338;
  --navy-600: #202f4a;
  --accent-blue: #3b82f6;
  --accent-cyan: #22d3ee;
  --accent-violet: #8b5cf6;
  --accent-green: #22c55e;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --text-dim: #8b96ac;
}

* { box-sizing: border-box; }

body {
  background: radial-gradient(circle at 10% 0%, #101a2e 0%, #060911 55%, #04060b 100%);
  color: #e7ebf3;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #263250; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

.font-mono-num { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* Glass panel */
.glass-panel {
  background: linear-gradient(180deg, rgba(24,35,56,0.65), rgba(13,19,33,0.55));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  backdrop-filter: blur(6px);
}

.glass-card {
  background: linear-gradient(160deg, rgba(24,35,56,0.85), rgba(13,19,33,0.75));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  transition: border-color .15s ease, transform .15s ease;
}
.glass-card:hover { border-color: rgba(59,130,246,0.4); }

.kpi-card {
  background: linear-gradient(160deg, rgba(24,35,56,0.9), rgba(10,14,24,0.85));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(59,130,246,0.08), transparent 60%);
  pointer-events: none;
}

.section-title {
  font-size: 0.72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
}

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 0.68rem; font-weight: 600; letter-spacing: .02em;
}
.pill-green { background: rgba(34,197,94,0.14); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.pill-amber { background: rgba(245,158,11,0.14); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.pill-red { background: rgba(239,68,68,0.14); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.pill-blue { background: rgba(59,130,246,0.14); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.pill-gray { background: rgba(148,163,184,0.14); color: #cbd5e1; border: 1px solid rgba(148,163,184,0.3); }
.pill-violet { background: rgba(139,92,246,0.14); color: #c4b5fd; border: 1px solid rgba(139,92,246,0.3); }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.data-table thead th {
  text-align: left; padding: 8px 12px;
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-dim); border-bottom: 1px solid rgba(255,255,255,0.08);
  white-space: nowrap; position: sticky; top: 0; background: rgba(13,19,33,0.95); z-index: 5;
}
.data-table tbody td {
  padding: 9px 12px; border-bottom: 1px solid rgba(255,255,255,0.04);
  white-space: nowrap; color: #dbe1ee;
}
.data-table tbody tr { transition: background .1s ease; }
.data-table tbody tr:hover { background: rgba(59,130,246,0.06); cursor: default; }
.data-table tbody tr.clickable:hover { cursor: pointer; background: rgba(59,130,246,0.1); }

.table-scroll { overflow-x: auto; overflow-y: auto; max-height: 460px; border-radius: 10px; }

.progress-track { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; }

.nav-link {
  padding: 8px 14px; border-radius: 8px; font-size: 0.83rem; font-weight: 500;
  color: var(--text-dim); transition: all .15s ease;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,0.06); }
.nav-link.active { color: #fff; background: rgba(59,130,246,0.18); border: 1px solid rgba(59,130,246,0.35); }

.side-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px; font-size: 0.82rem; color: var(--text-dim);
  transition: all .12s ease; cursor: pointer; font-weight: 500;
}
.side-link:hover { background: rgba(255,255,255,0.05); color: #fff; }
.side-link.active { background: rgba(59,130,246,0.16); color: #fff; border-left: 2px solid var(--accent-blue); }

.tab-btn {
  padding: 7px 14px; border-radius: 8px; font-size: 0.78rem; font-weight: 600;
  color: var(--text-dim); border: 1px solid transparent; cursor: pointer;
}
.tab-btn.active { color: #fff; background: rgba(59,130,246,0.16); border-color: rgba(59,130,246,0.35); }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(3,5,10,0.72);
  backdrop-filter: blur(3px); z-index: 90; display: flex; align-items: center; justify-content: center;
}
.modal-panel {
  background: linear-gradient(165deg, #131b2c, #0a0e18);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px; width: 92%; max-width: 980px; max-height: 88vh; overflow-y: auto;
}

.lineage-node {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-radius: 10px; background: rgba(24,35,56,0.7); border: 1px solid rgba(255,255,255,0.08);
  min-width: 180px;
}
.lineage-arrow { color: #3b5578; font-size: 1.1rem; }

.blink-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.6);
  animation: pulse-dot 1.6s infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.55); }
  70% { box-shadow: 0 0 0 7px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

.activity-row { animation: slideIn .35s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

.scroll-thin::-webkit-scrollbar { width: 6px; }

input[type=text], input[type=search], select {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  color: #e7ebf3; border-radius: 8px; padding: 7px 12px; font-size: 0.82rem;
}
input:focus, select:focus { outline: none; border-color: var(--accent-blue); }

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white; font-weight: 600; font-size: 0.8rem;
  padding: 8px 16px; border-radius: 8px; transition: opacity .15s;
}
.btn-primary:hover { opacity: 0.88; }

.btn-ghost {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  color: #dbe1ee; font-weight: 500; font-size: 0.78rem;
  padding: 7px 14px; border-radius: 8px;
}
.btn-ghost:hover { background: rgba(255,255,255,0.09); }

.collapsible-header { cursor: pointer; user-select: none; }
.chip {
  display: inline-block; padding: 2px 8px; margin: 2px; border-radius: 6px;
  background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.25);
  color: #93c5fd; font-size: 0.68rem;
}
