/* Command Center — app styles, ported from the v0 dashboard. Keep CSS here, not inline. */

:root {
  --cc-bg: #14161c;
  --cc-card: #1d2027;
  --cc-elevated: #23262e;
  --cc-fg: #f1f2f5;
  --cc-muted: #9499a5;
  --cc-primary: #36c2d6;
  --cc-primary-strong: #4fd2e4;
  --cc-border: rgba(255, 255, 255, 0.07);
  --cc-green: #57d99a;
  --cc-amber: #e7c14b;
  --cc-red: #f06a6a;
}

body.cc-body {
  background-color: var(--cc-bg);
  color: var(--cc-fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  position: relative;
  min-height: 100vh;
}

/* ── Ambient backdrop ───────────────────────────────────────────────────── */
.cc-aurora, .cc-grid, .cc-grain { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.cc-aurora::before, .cc-aurora::after { content: ""; position: absolute; border-radius: 9999px; filter: blur(90px); }
.cc-aurora::before {
  width: 50vw; height: 50vw; top: -12vw; left: -6vw; opacity: 0.16;
  background: radial-gradient(circle at center, var(--cc-primary), transparent 68%);
  animation: cc-drift 26s ease-in-out infinite;
}
.cc-aurora::after {
  width: 42vw; height: 42vw; bottom: -14vw; right: -8vw; opacity: 0.13;
  background: radial-gradient(circle at center, #8a7bff, transparent 68%);
  animation: cc-drift 32s ease-in-out infinite reverse;
}
.cc-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px),
    radial-gradient(rgba(54,194,214,0.22) 1px, transparent 1.5px);
  background-size: 44px 44px, 44px 44px, 44px 44px;
  background-position: -1px -1px, -1px -1px, 22px 22px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 78%);
}
.cc-grain {
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes cc-drift {
  0% { transform: translate3d(-4%, -2%, 0) scale(1); }
  50% { transform: translate3d(4%, 3%, 0) scale(1.12); }
  100% { transform: translate3d(-4%, -2%, 0) scale(1); }
}

.cc-wrap {
  position: relative; z-index: 1; max-width: 1180px; margin: 0 auto;
  padding: 2rem 1.25rem 3rem; display: flex; flex-direction: column; gap: 2rem;
}

/* ── Cards ──────────────────────────────────────────────────────────────── */
.cc-card {
  position: relative;
  background: linear-gradient(to bottom, rgba(255,255,255,0.04), transparent 38%), var(--cc-card);
  border: 1px solid var(--cc-border); border-radius: 18px;
  box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.06), 0 18px 40px -24px rgba(0,0,0,0.7);
  padding: 1.5rem;
}
@media (min-width: 576px) { .cc-card { padding: 1.75rem; } }
.cc-card-glow::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(130deg, var(--cc-primary), transparent 40%); opacity: 0.35;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}

/* ── Top bar ────────────────────────────────────────────────────────────── */
.cc-topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cc-brand { display: flex; align-items: center; gap: 0.7rem; }
.cc-mark {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(140deg, var(--cc-primary), #2a93a3); color: #06262b;
  box-shadow: 0 0 22px rgba(54,194,214,0.45);
}
.cc-mark svg { width: 20px; height: 20px; }
.cc-wordmark {
  font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em;
  background: linear-gradient(100deg, var(--cc-fg) 30%, var(--cc-primary-strong) 50%, var(--cc-fg) 70%);
  background-size: 200% auto; -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; animation: cc-text-shimmer 6s linear infinite;
}
@keyframes cc-text-shimmer { to { background-position: 200% center; } }
.cc-topmeta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.cc-clock { font-variant-numeric: tabular-nums; font-size: 0.95rem; color: var(--cc-muted); font-feature-settings: "tnum"; }
.cc-navlink { color: var(--cc-muted); text-decoration: none; font-size: 0.85rem; font-weight: 500; }
.cc-navlink:hover, .cc-navlink.active { color: var(--cc-primary-strong); }
.cc-status-pill {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.8rem;
  border-radius: 9999px; font-size: 0.8rem; font-weight: 600; border: 1px solid var(--cc-border);
}
.cc-status-pill.attn { background: rgba(240,106,106,0.1); color: #f4a0a0; border-color: rgba(240,106,106,0.25); }
.cc-status-pill.clear { background: rgba(87,217,154,0.1); color: #8fe5bd; border-color: rgba(87,217,154,0.25); }

/* ── Status dots ────────────────────────────────────────────────────────── */
.cc-dot { width: 9px; height: 9px; border-radius: 9999px; display: inline-block; flex: 0 0 auto; }
.cc-dot.critical { background: var(--cc-red); box-shadow: 0 0 8px 0 var(--cc-red); }
.cc-dot.warning { background: var(--cc-amber); box-shadow: 0 0 8px 0 var(--cc-amber); }
.cc-dot.info { background: var(--cc-primary); box-shadow: 0 0 8px 0 var(--cc-primary); }
.cc-dot.healthy { background: var(--cc-green); box-shadow: 0 0 8px 0 var(--cc-green); }

/* ── Section headers ────────────────────────────────────────────────────── */
.cc-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.cc-section-title { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.cc-section-meta { font-size: 0.8rem; color: var(--cc-muted); }

/* ── Capture ────────────────────────────────────────────────────────────── */
.cc-capture { position: relative; }
.cc-capture input {
  width: 100%; background: var(--cc-card); border: 1px solid var(--cc-border);
  border-radius: 14px; color: var(--cc-fg); padding: 1rem 1.1rem 1rem 3rem;
  font-size: 0.95rem; box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.05);
}
.cc-capture input:focus { outline: none; border-color: var(--cc-primary); box-shadow: 0 0 0 3px rgba(54,194,214,0.16); }
.cc-capture input::placeholder { color: #6b707b; }
.cc-capture .cc-cap-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--cc-primary); line-height: 0; }
.cc-capture .cc-cap-hint { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); font-size: 0.7rem; color: var(--cc-muted); border: 1px solid var(--cc-border); border-radius: 6px; padding: 0.15rem 0.4rem; }

/* ── Generic rows ───────────────────────────────────────────────────────── */
.cc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cc-row { position: relative; display: flex; align-items: flex-start; gap: 0.85rem; padding: 0.85rem 0.75rem; margin: 0 -0.75rem; border-radius: 12px; transition: background-color 0.2s ease; }
.cc-row:hover { background: var(--cc-elevated); }
.cc-row + .cc-row { border-top: 1px solid var(--cc-border); }
.cc-row:hover, .cc-row:hover + .cc-row { border-top-color: transparent; }
.cc-row-title { font-size: 0.92rem; font-weight: 500; margin: 0; }
.cc-row-sub { font-size: 0.8rem; color: var(--cc-muted); margin: 0.15rem 0 0; }
.cc-tag { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--cc-muted); border: 1px solid var(--cc-border); border-radius: 6px; padding: 0.1rem 0.4rem; white-space: nowrap; }
.cc-rail { align-self: stretch; width: 3px; border-radius: 9999px; flex: 0 0 auto; }
.cc-rail.critical { background: var(--cc-red); box-shadow: 0 0 10px 0 var(--cc-red); }
.cc-rail.warning { background: var(--cc-amber); box-shadow: 0 0 10px 0 var(--cc-amber); }
.cc-rail.info { background: var(--cc-primary); box-shadow: 0 0 10px 0 var(--cc-primary); }
.cc-actions { opacity: 0; transition: opacity 0.18s ease; display: flex; align-items: center; gap: 0.4rem; }
.cc-row:hover .cc-actions { opacity: 1; }
@media (hover: none) { .cc-actions { opacity: 1; } }
.cc-btn-ghost { display: inline-flex; align-items: center; gap: 0.35rem; background: var(--cc-elevated); color: var(--cc-fg); border: 1px solid var(--cc-border); border-radius: 9px; padding: 0.35rem 0.6rem; font-size: 0.75rem; font-weight: 500; cursor: pointer; white-space: nowrap; }
.cc-btn-ghost:hover { border-color: var(--cc-primary); color: var(--cc-primary-strong); }
.cc-btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: var(--cc-elevated); border: 1px solid var(--cc-border); border-radius: 8px; color: var(--cc-muted); cursor: pointer; }
.cc-btn-icon:hover { color: var(--cc-fg); border-color: var(--cc-primary); }
.cc-toggle.on { background: rgba(54,194,214,0.14); border-color: rgba(54,194,214,0.4); color: var(--cc-primary-strong); }
.cc-row.queued { background: rgba(54,194,214,0.07); box-shadow: inset 0 0 0 1px rgba(54,194,214,0.18); }
.cc-row.queued .cc-actions { opacity: 1; }

/* ── Vitals ─────────────────────────────────────────────────────────────── */
.cc-vitals-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 768px) { .cc-vitals-grid { grid-template-columns: repeat(4, 1fr); } }
.cc-vital { position: relative; overflow: hidden; background: rgba(35,38,46,0.6); border-radius: 14px; padding: 1rem; display: flex; flex-direction: column; gap: 0.65rem; transition: transform 0.25s ease, background-color 0.25s ease; }
.cc-vital:hover { background: var(--cc-elevated); transform: translateY(-2px); }
.cc-vital-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--cc-muted); font-weight: 600; }
.cc-vital-value { font-size: 1.85rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.cc-vital-value.problem { color: var(--cc-red); }
.cc-vital-delta { font-size: 0.75rem; color: var(--cc-muted); display: flex; align-items: center; gap: 0.3rem; }
.cc-spark { width: 100%; height: 34px; display: block; }
.cc-budget { height: 6px; border-radius: 9999px; background: rgba(255,255,255,0.1); overflow: hidden; }
.cc-budget > span { display: block; height: 100%; border-radius: 9999px; background: var(--cc-primary); box-shadow: 0 0 8px 0 var(--cc-primary); }

/* ── KPI cards (Needs you now) ──────────────────────────────────────────── */
.cc-kpis { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) { .cc-kpis { grid-template-columns: repeat(3, 1fr); } }
.cc-kpi {
  background: rgba(35,38,46,0.6); border: 1px solid var(--cc-border); border-radius: 14px;
  padding: 1.1rem 1.25rem; display: flex; flex-direction: column; gap: 0.35rem;
}
.cc-kpi-value { font-size: 2.1rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.cc-kpi-value.attn { color: var(--cc-amber); }
.cc-kpi-value.good { color: var(--cc-green); }
.cc-kpi-label { font-size: 0.78rem; color: var(--cc-muted); }

/* ── System strip ───────────────────────────────────────────────────────── */
.cc-sys-strip { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.cc-sys-pill { display: inline-flex; align-items: center; gap: 0.45rem; background: rgba(35,38,46,0.6); border: 1px solid var(--cc-border); border-radius: 9999px; padding: 0.35rem 0.7rem; font-size: 0.76rem; color: var(--cc-muted); }
.cc-sys-pill strong { color: var(--cc-fg); font-weight: 500; }

/* ── Filters ────────────────────────────────────────────────────────────── */
.cc-filters { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.cc-filter { background: transparent; border: 1px solid var(--cc-border); color: var(--cc-muted); border-radius: 9999px; padding: 0.3rem 0.7rem; font-size: 0.76rem; cursor: pointer; }
.cc-filter.active { background: rgba(54,194,214,0.14); border-color: rgba(54,194,214,0.4); color: var(--cc-primary-strong); }

/* ── Type / priority / SLA ──────────────────────────────────────────────── */
.cc-type { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 9px; background: var(--cc-elevated); flex: 0 0 auto; }
.cc-type.idea { color: var(--cc-primary); }
.cc-type.error { color: var(--cc-red); }
.cc-type.bug { color: var(--cc-amber); }
.cc-type.email { color: var(--cc-green); }
.cc-prio { width: 56px; flex: 0 0 auto; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.cc-prio.urgent { color: var(--cc-red); }
.cc-prio.high { color: var(--cc-amber); }
.cc-prio.medium { color: var(--cc-primary); }
.cc-prio.low { color: var(--cc-muted); }
.cc-sla { font-variant-numeric: tabular-nums; font-size: 0.78rem; color: var(--cc-muted); flex: 0 0 auto; }
.cc-sla.overdue { color: var(--cc-red); }
.cc-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; color: var(--cc-muted); }

/* ── Pipeline ───────────────────────────────────────────────────────────── */
.cc-deals { display: grid; gap: 1rem; }
@media (min-width: 768px) { .cc-deals { grid-template-columns: repeat(2, 1fr); } }
.cc-deal { background: rgba(35,38,46,0.5); border-radius: 14px; padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; transition: transform 0.25s ease, background-color 0.25s ease; }
.cc-deal:hover { background: var(--cc-elevated); transform: translateY(-2px); }
.cc-stages { display: flex; gap: 0.35rem; }
.cc-stage { height: 5px; flex: 1; border-radius: 9999px; background: rgba(255,255,255,0.1); }
.cc-stage.done { background: var(--cc-primary); box-shadow: 0 0 8px 0 var(--cc-primary); }
.cc-deal-next { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.82rem; color: var(--cc-fg); }
.cc-deal-next svg { color: var(--cc-primary); flex: 0 0 auto; margin-top: 2px; }

.cc-empty { text-align: center; padding: 2rem 1rem; color: var(--cc-muted); }
.cc-empty .cc-dot { margin: 0 auto 0.75rem; width: 12px; height: 12px; }
.cc-grid-2 { display: grid; gap: 2rem; }
@media (min-width: 992px) { .cc-grid-2 { grid-template-columns: repeat(2, 1fr); } }
.text-muted-cc { color: var(--cc-muted); }
.cc-hidden { display: none !important; }

/* ── Login ──────────────────────────────────────────────────────────────── */
.cc-brand-badge { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 0.75rem; background: rgba(54,194,214,0.15); color: var(--cc-primary); }
.cc-brand-badge .cc-pulse-ring { position: absolute; inset: 0; border-radius: 0.75rem; background: rgba(54,194,214,0.30); filter: blur(8px); animation: cc-breathe 2.8s ease-in-out infinite; }
@keyframes cc-breathe { 0%, 100% { opacity: 0.45; transform: scale(0.92); } 50% { opacity: 1; transform: scale(1.15); } }
.cc-label { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--cc-muted); }
.cc-field { display: flex; align-items: center; gap: 0.75rem; border-radius: 0.75rem; padding: 0.7rem 0.85rem; background: rgba(35,38,46,0.7); border: 1px solid var(--cc-border); transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease; }
.cc-field:focus-within { background: var(--cc-elevated); border-color: rgba(54,194,214,0.5); box-shadow: 0 0 0 4px rgba(54,194,214,0.08); }
.cc-field svg { flex: 0 0 auto; color: var(--cc-muted); transition: color 0.25s ease; }
.cc-field:focus-within svg.cc-lead { color: var(--cc-primary); }
.cc-field input { width: 100%; border: 0; background: transparent; outline: none; color: var(--cc-fg); font-size: 0.9rem; }
.cc-field input::placeholder { color: #6b707b; }
.cc-eye { background: 0; border: 0; padding: 0; cursor: pointer; color: var(--cc-muted); }
.cc-eye:hover { color: var(--cc-fg); }
.cc-btn-primary { display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; border: 0; border-radius: 0.75rem; padding: 0.8rem 1rem; font-size: 0.9rem; font-weight: 600; cursor: pointer; background: var(--cc-primary); color: #06262b; box-shadow: 0 0 24px -6px var(--cc-primary); transition: filter 0.2s ease; }
.cc-btn-primary:hover { filter: brightness(1.1); }
.cc-error { color: var(--cc-red); font-size: 0.875rem; }
.cc-muted { color: var(--cc-muted); }
.cc-footnote { color: rgba(148,153,165,0.7); font-size: 0.75rem; }

/* ── Forms / table / buttons (admin pages) ──────────────────────────────── */
.cc-input {
  width: 100%; background: rgba(35,38,46,0.7); border: 1px solid var(--cc-border);
  border-radius: 10px; color: var(--cc-fg); padding: 0.55rem 0.8rem; font-size: 0.9rem;
}
.cc-input:focus { outline: none; border-color: rgba(54,194,214,0.5); box-shadow: 0 0 0 4px rgba(54,194,214,0.08); }
.cc-input::placeholder { color: #6b707b; }

.cc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  border: 1px solid var(--cc-border); background: var(--cc-elevated); color: var(--cc-fg);
  border-radius: 10px; padding: 0.5rem 0.9rem; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.cc-btn:hover { border-color: var(--cc-primary); color: var(--cc-primary-strong); }
.cc-btn-cyan { background: var(--cc-primary); border-color: var(--cc-primary); color: #06262b; }
.cc-btn-cyan:hover { filter: brightness(1.08); color: #06262b; }
.cc-btn-danger:hover { border-color: var(--cc-red); color: #f4a0a0; }
.cc-btn-success:hover { border-color: var(--cc-green); color: #8fe5bd; }
.cc-btn-sm { padding: 0.3rem 0.65rem; font-size: 0.76rem; }

.cc-table { width: 100%; border-collapse: collapse; }
.cc-table th {
  text-align: left; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--cc-muted); font-weight: 600; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--cc-border);
}
.cc-table td { padding: 0.7rem 0.6rem; border-bottom: 1px solid var(--cc-border); font-size: 0.9rem; vertical-align: middle; }
.cc-table tbody tr:last-child td { border-bottom: 0; }
.cc-table tbody tr:hover { background: var(--cc-elevated); }

.cc-badge { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.72rem; font-weight: 600; padding: 0.2rem 0.55rem; border-radius: 9999px; border: 1px solid var(--cc-border); }
.cc-badge.ok { background: rgba(87,217,154,0.1); color: #8fe5bd; border-color: rgba(87,217,154,0.25); }
.cc-badge.off { background: rgba(148,153,165,0.1); color: var(--cc-muted); }

.cc-alert { border-radius: 12px; padding: 0.7rem 1rem; font-size: 0.9rem; border: 1px solid var(--cc-border); }
.cc-alert.ok { background: rgba(87,217,154,0.1); color: #bff0d8; border-color: rgba(87,217,154,0.25); }
.cc-alert.err { background: rgba(240,106,106,0.1); color: #f6b6b6; border-color: rgba(240,106,106,0.25); }

@media (prefers-reduced-motion: reduce) {
  .cc-aurora::before, .cc-aurora::after, .cc-wordmark, .cc-brand-badge .cc-pulse-ring { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
