/* ================================================================
   Nova Command — Enterprise Dashboard Demo
   Nova AI Solutions Showcase Demo
   ================================================================ */

:root {
  /* Deep slate-navy "data platform" base (Palantir/Datadog/Snowflake feel)
     with an indigo product accent replacing Nova's neon on the app's own
     chrome. The Nova banner + attribution CTA stay Nova-branded. */
  --bg: #0a0e17;
  --surface: #121826;
  --surface-2: #1a2234;
  --surface-3: #2a3447;
  --border: rgba(148,163,184,0.12);
  --border-2: rgba(148,163,184,0.22);
  --text: #f1f5f9;
  --text-muted: #9aa7bd;
  --text-dim: #66738c;
  --accent: #6366f1;
  --accent-2: #818cf8;
  --accent-dim: rgba(99,102,241,0.14);
  --blue: #4b8bf5;
  --blue-dim: rgba(75,139,245,0.14);
  --cyan: #22d3ee;
  --green: #22c55e;
  --green-dim: rgba(34,197,94,0.14);
  --amber: #f59e0b;
  --amber-dim: rgba(245,158,11,0.14);
  --red: #ef4444;
  --purple: #a855f7;
  --purple-dim: rgba(168,85,247,0.14);
  --teal: #14b8a6;
  --teal-dim: rgba(20,184,166,0.14);
  --nova-blue: #00c8ff;
  --nova-purple: #a259ff;
  --radius: 10px;
  --shadow: 0 8px 30px rgba(0,0,0,0.45);
  --transition: 0.25s cubic-bezier(0.23,1,0.32,1);
  --sidebar-width: 230px;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; font-size:15px; }
body { background:var(--bg); color:var(--text); font-family:'IBM Plex Sans',sans-serif; line-height:1.5; overflow-x:hidden; }
h1,h2,h3,h4 { font-family:'IBM Plex Sans',sans-serif; line-height:1.2; letter-spacing:-0.02em; }
a { color:inherit; text-decoration:none; }
::-webkit-scrollbar { width:4px; }
::-webkit-scrollbar-track { background:var(--bg); }
::-webkit-scrollbar-thumb { background:var(--surface-3); border-radius:4px; }

/* ── NOVA BANNER ── */
.nova-banner {
  position:fixed; top:0; left:0; right:0; z-index:9999;
  background:rgba(9,9,11,0.96); backdrop-filter:blur(12px);
  border-bottom:1px solid rgba(0,200,255,0.25); padding:0 1.5rem;
  height:40px; display:flex; align-items:center;
}
.nova-banner-inner { display:flex; align-items:center; gap:0.75rem; font-size:0.76rem; width:100%; }
.nova-banner-logo { font-family:'IBM Plex Sans',sans-serif; font-weight:700; color:var(--nova-blue); }
.nova-banner-sep { color:var(--text-dim); }
.nova-banner-text { color:var(--text-muted); flex:1; }
.nova-banner-cta {
  padding:0.28rem 0.85rem; background:linear-gradient(135deg,var(--nova-blue),var(--nova-purple));
  border-radius:50px; color:#fff; font-family:'IBM Plex Sans',sans-serif;
  font-size:0.72rem; font-weight:700; white-space:nowrap; transition:opacity 0.2s;
}
.nova-banner-cta:hover { opacity:0.85; }

/* ── APP SHELL ── */
.app-shell {
  display:flex; min-height:100vh;
  padding-top:40px;
}

/* ── SIDEBAR ── */
.sidebar {
  width:var(--sidebar-width); flex-shrink:0;
  background:var(--surface); border-right:1px solid var(--border);
  position:fixed; top:40px; left:0; bottom:0;
  display:flex; flex-direction:column;
  overflow-y:auto; z-index:50;
  transition:transform var(--transition);
}
.sidebar-logo {
  display:flex; align-items:center; gap:0.65rem;
  padding:1.25rem 1.25rem 1rem; border-bottom:1px solid var(--border);
}
.sidebar-logo-mark {
  width:32px; height:32px; border-radius:8px;
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
  display:flex; align-items:center; justify-content:center;
  font-family:'IBM Plex Sans',sans-serif; font-size:0.9rem; font-weight:700; color:#fff;
  flex-shrink:0;
}
.sidebar-logo-name { font-family:'IBM Plex Sans',sans-serif; font-size:0.9rem; font-weight:700; display:block; }
.sidebar-logo-sub { font-size:0.65rem; color:var(--text-dim); display:block; }
.sidebar-nav { flex:1; padding:1rem 0.75rem; display:flex; flex-direction:column; gap:2px; }
.sidebar-section-label {
  font-size:0.62rem; font-weight:700; letter-spacing:0.1em; text-transform:uppercase;
  color:var(--text-dim); padding:0.75rem 0.5rem 0.35rem; display:block;
}
.sidebar-link {
  display:flex; align-items:center; gap:0.65rem;
  padding:0.55rem 0.75rem; border-radius:8px;
  font-size:0.82rem; font-weight:500; color:var(--text-muted);
  transition:background 0.2s, color 0.2s; cursor:pointer;
}
.sidebar-link svg { width:15px; height:15px; stroke:currentColor; flex-shrink:0; }
.sidebar-link:hover { background:var(--surface-2); color:var(--text); }
.sidebar-link.active { background:var(--accent-dim); color:var(--text); box-shadow:inset 2px 0 0 var(--accent); }
.sidebar-link.active svg { stroke:var(--accent-2); }
.sidebar-badge {
  margin-left:auto; padding:0.15rem 0.5rem;
  background:var(--surface-3); border-radius:50px;
  font-size:0.65rem; font-weight:600; color:var(--text-muted);
}
.sidebar-badge-green { background:var(--green-dim); color:var(--green); }
.sidebar-status {
  padding:1rem 1.25rem; border-top:1px solid var(--border);
  display:flex; align-items:center; gap:0.6rem;
}
.sidebar-status-dot { width:7px; height:7px; border-radius:50%; background:var(--green); box-shadow:0 0 8px var(--green); flex-shrink:0; animation:spulse 2s infinite; }
@keyframes spulse { 0%,100%{opacity:1;} 50%{opacity:0.4;} }
.sidebar-status-label { font-size:0.65rem; text-transform:uppercase; letter-spacing:0.08em; color:var(--text-dim); }
.sidebar-status-value { font-size:0.75rem; color:var(--green); font-weight:500; }

/* ── MAIN CONTENT ── */
.main-content { flex:1; margin-left:var(--sidebar-width); display:flex; flex-direction:column; min-height:100vh; }

/* ── TOPBAR ── */
.topbar {
  height:52px; display:flex; align-items:center; justify-content:space-between;
  padding:0 1.5rem; border-bottom:1px solid var(--border);
  background:var(--surface); flex-shrink:0; position:sticky; top:40px; z-index:40;
}
.topbar-left { display:flex; align-items:center; gap:1rem; }
.sidebar-toggle { background:none; border:none; cursor:pointer; color:var(--text-muted); padding:4px; border-radius:6px; display:flex; align-items:center; }
.sidebar-toggle:hover { background:var(--surface-2); color:var(--text); }
.topbar-breadcrumb { display:flex; align-items:center; gap:0.4rem; font-size:0.82rem; }
.topbar-org { color:var(--text-muted); }
.topbar-sep { color:var(--text-dim); }
.topbar-page { color:var(--text); font-weight:500; }
.topbar-right { display:flex; align-items:center; gap:1rem; }
.topbar-live { display:flex; align-items:center; gap:5px; font-size:0.72rem; font-weight:600; color:var(--green); }
.topbar-live-dot { width:6px; height:6px; border-radius:50%; background:var(--green); animation:spulse 1.5s infinite; }
.topbar-time { font-family:'IBM Plex Mono',monospace; font-size:0.78rem; color:var(--text-muted); }
.topbar-notif { position:relative; cursor:pointer; color:var(--text-muted); }
.topbar-notif:hover { color:var(--text); }
.topbar-notif-badge {
  position:absolute; top:-5px; right:-5px;
  width:15px; height:15px; border-radius:50%; background:var(--red);
  display:flex; align-items:center; justify-content:center;
  font-size:0.6rem; font-weight:700; color:#fff;
}
.topbar-avatar {
  width:32px; height:32px; border-radius:50%;
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
  display:flex; align-items:center; justify-content:center;
  font-family:'IBM Plex Sans',sans-serif; font-size:0.7rem; font-weight:700; color:#fff;
  cursor:pointer;
}

/* ── CONTENT AREA ── */
.content-area { padding:1.5rem; display:flex; flex-direction:column; gap:1.5rem; flex:1; }
.content-section {}
.section-row { display:flex; align-items:center; justify-content:space-between; margin-bottom:1rem; }
.content-title { font-size:1rem; font-weight:700; }
.section-row-right { display:flex; gap:0.75rem; }
.period-select {
  padding:0.35rem 0.85rem; background:var(--surface-2); border:1px solid var(--border);
  border-radius:8px; color:var(--text-muted); font-size:0.78rem; outline:none; cursor:pointer;
  font-family:'IBM Plex Sans',sans-serif;
}

/* ── KPI CARDS ── */
.kpi-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:1rem; }
.kpi-card {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius); padding:1.25rem;
  transition:border-color var(--transition), box-shadow var(--transition);
}
.kpi-card:hover { border-color:var(--border-2); box-shadow:var(--shadow); }
.kpi-header { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:0.85rem; }
.kpi-label { font-size:0.75rem; color:var(--text-muted); font-weight:400; line-height:1.4; }
.kpi-icon { width:28px; height:28px; border-radius:7px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.kpi-icon-blue { background:var(--blue-dim); }
.kpi-icon-blue svg { stroke:var(--blue); }
.kpi-icon-green { background:var(--green-dim); }
.kpi-icon-green svg { stroke:var(--green); }
.kpi-icon-amber { background:var(--amber-dim); }
.kpi-icon-amber svg { stroke:var(--amber); }
.kpi-icon-purple { background:var(--purple-dim); }
.kpi-icon-purple svg { stroke:var(--purple); }
.kpi-value { font-family:'IBM Plex Mono',monospace; font-size:1.85rem; font-weight:600; line-height:1; margin-bottom:0.4rem; letter-spacing:-0.02em; }
.kpi-unit { font-size:1.1rem; }
.kpi-trend { display:flex; align-items:center; gap:4px; font-size:0.72rem; margin-bottom:0.85rem; }
.kpi-trend-up { color:var(--green); }
.kpi-trend-up svg { stroke:var(--green); }
.kpi-trend-neutral { color:var(--text-muted); }
.kpi-trend-neutral svg { stroke:var(--text-muted); }
.kpi-bar { height:3px; background:var(--surface-2); border-radius:50px; overflow:hidden; }
.kpi-bar-fill { height:100%; border-radius:50px; transition:width 1.5s ease; }

/* ── DASHBOARD GRID ── */
.dashboard-grid { display:grid; grid-template-columns:1fr 1fr; gap:1.5rem; }

/* ── PANELS ── */
.dash-panel {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius); padding:1.25rem;
  display:flex; flex-direction:column;
}
.panel-header { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:1.25rem; flex-shrink:0; }
.panel-title { font-size:0.9rem; font-weight:700; margin-bottom:0.15rem; }
.panel-sub { font-size:0.72rem; color:var(--text-dim); }
.panel-header-right { display:flex; align-items:center; gap:0.75rem; }

/* Live indicator */
.live-indicator { display:flex; align-items:center; gap:5px; font-size:0.7rem; font-weight:600; color:var(--green); }
.live-dot { width:6px; height:6px; border-radius:50%; background:var(--green); animation:spulse 1.5s infinite; }

/* ── AGENT FEED ── */
.agent-feed { display:flex; flex-direction:column; gap:0; flex:1; overflow:hidden; max-height:320px; overflow-y:auto; }
.agent-event {
  display:flex; align-items:flex-start; gap:0.75rem;
  padding:0.65rem 0; border-bottom:1px solid var(--border);
  animation:feedIn 0.4s ease;
}
@keyframes feedIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.agent-event:last-child { border-bottom:none; }
.agent-event-icon {
  width:28px; height:28px; border-radius:7px;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.ae-blue { background:var(--blue-dim); }
.ae-blue svg { stroke:var(--blue); }
.ae-green { background:var(--green-dim); }
.ae-green svg { stroke:var(--green); }
.ae-amber { background:var(--amber-dim); }
.ae-amber svg { stroke:var(--amber); }
.ae-purple { background:var(--purple-dim); }
.ae-purple svg { stroke:var(--purple); }
.ae-teal { background:var(--teal-dim); }
.ae-teal svg { stroke:var(--teal); }
.agent-event-body { flex:1; min-width:0; }
.agent-event-title { font-size:0.8rem; font-weight:500; color:var(--text); margin-bottom:0.1rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.agent-event-detail { font-size:0.72rem; color:var(--text-dim); font-family:'IBM Plex Mono',monospace; }
.agent-event-time { font-size:0.68rem; color:var(--text-dim); flex-shrink:0; font-family:'IBM Plex Mono',monospace; }

/* ── WORKFLOW DIAGRAM ── */
.wf-status-badge {
  padding:0.2rem 0.65rem; border-radius:50px;
  background:var(--green-dim); border:1px solid rgba(34,197,94,0.25);
  font-size:0.68rem; font-weight:700; color:var(--green);
}
.wf-diagram { display:flex; flex-direction:column; gap:0.25rem; margin-bottom:1.25rem; }
.wf-node {
  display:flex; align-items:center; gap:0.75rem;
  padding:0.65rem 0.85rem; border-radius:8px;
  background:var(--surface-2); border:1px solid var(--border);
  transition:border-color 0.3s;
}
.wf-node:hover { border-color:var(--border-2); }
.wf-node-trigger { border-color:rgba(59,130,246,0.3); background:var(--blue-dim); }
.wf-node-end { border-color:rgba(20,184,166,0.3); background:var(--teal-dim); }
.wf-node-icon { width:28px; height:28px; border-radius:6px; display:flex; align-items:center; justify-content:center; flex-shrink:0; background:var(--surface-3); }
.wf-node-icon svg { stroke:var(--text-muted); }
.wf-icon-blue { background:var(--blue-dim); }
.wf-icon-blue svg { stroke:var(--blue); }
.wf-icon-green { background:var(--green-dim); }
.wf-icon-green svg { stroke:var(--green); }
.wf-icon-amber { background:var(--amber-dim); }
.wf-icon-amber svg { stroke:var(--amber); }
.wf-icon-teal { background:var(--teal-dim); }
.wf-icon-teal svg { stroke:var(--teal); }
.wf-node-name { font-size:0.8rem; font-weight:600; flex:1; }
.wf-node-sub { font-size:0.68rem; color:var(--text-dim); margin-left:auto; }
.wf-node-count { font-family:'IBM Plex Mono',monospace; font-size:0.72rem; font-weight:600; color:var(--blue); }
.wf-connector {
  display:flex; align-items:center; padding:0 1rem;
  height:16px; position:relative;
}
.wf-connector::before {
  content:''; position:absolute; left:1.5rem;
  width:2px; height:100%; background:var(--border-2);
}
.wf-connector-animated::before {
  background:linear-gradient(180deg,rgba(59,130,246,0.6),rgba(59,130,246,0.15));
  animation:connFlow 1.5s ease-in-out infinite;
}
@keyframes connFlow { 0%,100%{opacity:0.4;} 50%{opacity:1;} }
.wf-stats { display:flex; gap:0; border-top:1px solid var(--border); padding-top:1rem; }
.wf-stat { flex:1; text-align:center; }
.wf-stat:not(:last-child) { border-right:1px solid var(--border); }
.wf-stat-val { font-family:'IBM Plex Mono',monospace; font-size:1rem; font-weight:600; margin-bottom:0.1rem; }
.wf-stat-green { color:var(--green); }
.wf-stat-label { font-size:0.68rem; color:var(--text-dim); }

/* ── ANALYTICS CHART ── */
.analytics-grid { display:grid; grid-template-columns:1.4fr 1fr; gap:1.5rem; }
.chart-area { display:flex; flex-direction:column; gap:0.5rem; }
.chart-bars { display:flex; align-items:flex-end; gap:0.4rem; height:120px; }
.chart-bar-wrapper { flex:1; display:flex; flex-direction:column; align-items:center; gap:4px; height:100%; justify-content:flex-end; }
.chart-bar {
  width:100%; border-radius:4px 4px 0 0;
  background:linear-gradient(180deg,var(--blue),rgba(59,130,246,0.3));
  transition:height 1.2s cubic-bezier(0.23,1,0.32,1);
  min-height:4px;
}
.chart-bar:hover { background:linear-gradient(180deg,var(--cyan),rgba(6,182,212,0.3)); }
.chart-bar-val { font-family:'IBM Plex Mono',monospace; font-size:0.62rem; color:var(--text-dim); }
.chart-labels { display:flex; gap:0.4rem; }
.chart-label { flex:1; text-align:center; font-size:0.65rem; color:var(--text-dim); }

/* ── CRM RECORDS ── */
.sync-badge { display:flex; align-items:center; gap:5px; font-size:0.7rem; font-weight:600; color:var(--cyan); }
.sync-dot { width:6px; height:6px; border-radius:50%; background:var(--cyan); animation:spulse 1.5s infinite; }
.crm-records { display:flex; flex-direction:column; gap:0; }
.crm-record {
  display:flex; align-items:center; gap:0.75rem;
  padding:0.65rem 0; border-bottom:1px solid var(--border);
  transition:background 0.2s;
}
.crm-record:last-child { border-bottom:none; }
.crm-record-avatar {
  width:30px; height:30px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-family:'IBM Plex Sans',sans-serif; font-size:0.65rem; font-weight:700; color:#fff;
  flex-shrink:0;
}
.crm-record-info { flex:1; min-width:0; }
.crm-record-name { font-size:0.8rem; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.crm-record-company { color:var(--text-dim); font-weight:300; }
.crm-record-action { font-size:0.7rem; color:var(--text-dim); margin-top:0.1rem; }
.crm-record-time { font-size:0.68rem; color:var(--text-dim); flex-shrink:0; font-family:'IBM Plex Mono',monospace; }

/* ── INTEGRATIONS ── */
.bottom-grid { display:grid; grid-template-columns:1.5fr 1fr; gap:1.5rem; }
.integrations-count { font-size:0.72rem; color:var(--text-dim); }
.integrations-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:0.75rem; }
.integration-tile {
  display:flex; flex-direction:column; align-items:center; gap:0.4rem;
  padding:0.85rem 0.5rem; border:1px solid var(--border); border-radius:var(--radius);
  background:var(--surface-2); transition:border-color var(--transition), transform var(--transition);
  cursor:default;
}
.integration-tile:hover { border-color:var(--border-2); transform:translateY(-2px); }
.integration-tile-add { border-style:dashed; border-color:var(--surface-3); cursor:pointer; }
.integration-tile-add:hover { border-color:var(--accent); }
.integration-logo {
  width:32px; height:32px; border-radius:8px;
  display:flex; align-items:center; justify-content:center;
  font-family:'IBM Plex Sans',sans-serif; font-size:0.65rem; font-weight:800; color:#fff;
}
.integration-add-icon { font-size:1.2rem; color:var(--text-dim); }
.integration-name { font-size:0.68rem; font-weight:500; text-align:center; color:var(--text-muted); }
.integration-status { font-size:0.62rem; color:var(--text-dim); }
.integration-ok { color:var(--green); }

/* ── QUEUE ── */
.queue-items { display:flex; flex-direction:column; gap:0; }
.queue-item {
  display:flex; align-items:center; gap:0.75rem;
  padding:0.65rem 0; border-bottom:1px solid var(--border);
}
.queue-item:last-child { border-bottom:none; }
.queue-time { font-family:'IBM Plex Mono',monospace; font-size:0.72rem; color:var(--text-dim); width:55px; flex-shrink:0; }
.queue-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.queue-dot-blue { background:var(--blue); }
.queue-dot-green { background:var(--green); }
.queue-dot-amber { background:var(--amber); }
.queue-dot-purple { background:var(--purple); }
.queue-content { flex:1; min-width:0; }
.queue-name { font-size:0.8rem; font-weight:500; }
.queue-detail { font-size:0.7rem; color:var(--text-dim); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.queue-badge {
  padding:0.15rem 0.5rem; background:var(--surface-2); border:1px solid var(--border);
  border-radius:50px; font-size:0.62rem; color:var(--text-dim); font-weight:600;
}

/* ── NOVA CTA ── */
.nova-cta-section { border-top:1px solid var(--border); padding:3rem 0; }
.nova-cta-inner { max-width:640px; margin:0 auto; text-align:center; }
.nova-cta-badge {
  display:inline-block; padding:0.28rem 0.85rem; margin-bottom:1.25rem;
  background:rgba(0,200,255,0.08); border:1px solid rgba(0,200,255,0.2);
  border-radius:50px; font-size:0.68rem; font-weight:700;
  letter-spacing:0.1em; text-transform:uppercase; color:var(--nova-blue);
}
.nova-cta-title { font-family:'IBM Plex Sans',sans-serif; font-size:clamp(1.4rem,2.5vw,2rem); font-weight:800; margin-bottom:0.85rem; }
.nova-cta-sub { color:var(--text-muted); font-size:0.9rem; font-weight:300; line-height:1.7; margin-bottom:1.75rem; }
.nova-cta-actions { display:flex; gap:1rem; justify-content:center; flex-wrap:wrap; }
.nova-cta-btn-primary {
  padding:0.75rem 1.75rem; background:linear-gradient(135deg,var(--nova-blue),var(--nova-purple));
  border-radius:50px; color:#fff; font-family:'IBM Plex Sans',sans-serif; font-size:0.88rem; font-weight:700;
  transition:opacity 0.2s, transform 0.2s; box-shadow:0 0 24px rgba(0,200,255,0.25);
}
.nova-cta-btn-primary:hover { opacity:0.9; transform:translateY(-1px); }
.nova-cta-btn-ghost {
  padding:0.75rem 1.75rem; background:transparent;
  border:1px solid var(--border-2); border-radius:50px;
  color:var(--text-muted); font-family:'IBM Plex Sans',sans-serif; font-size:0.88rem; font-weight:600;
  transition:border-color 0.2s, color 0.2s;
}
.nova-cta-btn-ghost:hover { border-color:rgba(0,200,255,0.3); color:var(--text); }

/* ── RESPONSIVE ── */
@media (max-width:1200px) {
  .kpi-grid { grid-template-columns:repeat(2,1fr); }
  .dashboard-grid { grid-template-columns:1fr; }
  .analytics-grid { grid-template-columns:1fr; }
  .bottom-grid { grid-template-columns:1fr; }
  .integrations-grid { grid-template-columns:repeat(4,1fr); }
}
@media (max-width:768px) {
  :root { --sidebar-width: 0px; }
  .sidebar { transform:translateX(-220px); width:220px; }
  .sidebar.open { transform:translateX(0); }
  .main-content { margin-left:0; }
  .kpi-grid { grid-template-columns:repeat(2,1fr); }
  .integrations-grid { grid-template-columns:repeat(2,1fr); }
  .nova-banner-text { display:none; }
  .topbar-time { display:none; }
}
@media (max-width:480px) {
  .kpi-grid { grid-template-columns:1fr; }
}
