/* ===================================================
   SPARK — design tokens
   Palette: deep navy sidebar + gold accent + light content area
=================================================== */
:root {
  --navy:        #1E40AF;
  --navy-2:      #1D4ED8;
  --navy-3:      #2563EB;
  --gold:        #2563EB;
  --gold-deep:   #1D4ED8;
  --gold-tint:   #EFF6FF;
  --bg:          #F5F6FA;
  --card:        #FFFFFF;
  --text:        #1B2436;
  --text-soft:   #6B7280;
  --border:      #E5E7EB;
  --border-strong: #D1D5DB;

  --icon-blue-bg:#EFF6FF;   --icon-blue:#3B82F6;
  --icon-green-bg:#ECFDF5;  --icon-green:#10B981;
  --icon-orange-bg:#FFFBEB; --icon-orange:#F59E0B;
  --icon-purple-bg:#F5F3FF; --icon-purple:#8B5CF6;
  --icon-pink-bg:#FDF2F8;   --icon-pink:#EC4899;
  --icon-red-bg:#FEF2F2;    --icon-red:#EF4444;
  --icon-teal-bg:#F0FDFA;   --icon-teal:#14B8A6;
  --icon-indigo-bg:#EEF2FF; --icon-indigo:#6366F1;
  --icon-navy-bg:#EEF1F7;   --icon-navy:#1B2436;

  --font-display: 'Poppins', sans-serif;
  --font-body:    'Inter', sans-serif;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16,24,40,0.04), 0 1px 3px rgba(16,24,40,0.06);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
}
a { text-decoration: none; color: inherit; }
ul { margin: 0; }
button { font-family: inherit; }

/* ---------------- App shell ---------------- */
.app { display: flex; min-height: 100vh; }

/* ---------------- Sidebar ---------------- */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 20px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.brand-mark {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}
.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.25;
  color: #fff;
  display: block;
}
.brand-tag {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  display: block;
  margin-top: 2px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,0.68);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.12s ease, color 0.12s ease;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item.active { background: var(--gold); color: var(--navy); font-weight: 700; }
.nav-icon { width: 18px; text-align: center; flex-shrink: 0; font-size: 13px; }

.journey-card {
  margin-top: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 14px;
  flex-shrink: 0;
}
.journey-card h4 {
  color: #fff;
  font-size: 12px;
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 600;
}
.journey-card p {
  color: rgba(255,255,255,0.55);
  font-size: 11px;
  margin: 0 0 10px;
  line-height: 1.4;
}
.journey-chart svg { width: 100%; height: 36px; display: block; }

/* ---------------- Main column ---------------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---------------- Topbar ---------------- */
.topbar {
  height: 68px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 5;
}
.search {
  flex: 1;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F1F2F6;
  border-radius: 8px;
  padding: 9px 14px;
}
.search-icon { color: var(--text-soft); font-size: 14px; }
.search input {
  border: none; background: none; outline: none; flex: 1;
  font-size: 13px; color: var(--text); font-family: var(--font-body);
}
.search-kbd { color: var(--text-soft); font-size: 13px; }

.topbar-right { display: flex; align-items: center; gap: 14px; }
.ai-pill {
  display: inline-flex;
  align-items: center;
  background: var(--gold-tint);
  border: 1px solid var(--gold);
  color: var(--gold-deep);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  font-size: 14px;
}
.profile { display: flex; align-items: center; gap: 10px; }
.profile-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-3), var(--navy));
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
}
.profile-text { display: flex; flex-direction: column; line-height: 1.3; }
.profile-name { font-size: 13px; font-weight: 600; }
.profile-role { font-size: 11px; color: var(--text-soft); }
.logout-link {
  font-size: 15px;
  color: var(--text-soft);
  padding: 6px;
  border-radius: 6px;
}
.logout-link:hover { color: var(--icon-red); background: var(--icon-red-bg); }

/* ---------------- Content ---------------- */
.content { padding: 24px 28px 40px; }

/* Hero */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-3) 100%);
  border-radius: 18px;
  padding: 38px 40px;
  color: #fff;
  margin-bottom: 22px;
}
.hero-text h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 4px;
}
.hero-text .accent { color: var(--gold); }
.hero-text h2 {
  font-size: 15px;
  font-weight: 500;
  color: rgba(255,255,255,0.82);
  margin: 0 0 12px;
}
.hero-text p {
  font-size: 13.5px;
  color: rgba(255,255,255,0.6);
  max-width: 460px;
  margin: 0 0 22px;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: #f0bd63; }
.btn-ghost { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.22); }
.btn-ghost:hover { background: rgba(255,255,255,0.16); }
.btn-text { background: none; color: rgba(255,255,255,0.75); padding: 11px 4px; }
.btn-text:hover { color: #fff; }
.hero-art { flex-shrink: 0; width: 220px; }
.hero-art svg { width: 100%; height: auto; display: block; }

/* Stat strip */
.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.icon-blue   { background: var(--icon-blue-bg);   color: var(--icon-blue); }
.icon-green  { background: var(--icon-green-bg);  color: var(--icon-green); }
.icon-orange { background: var(--icon-orange-bg); color: var(--icon-orange); }
.icon-purple { background: var(--icon-purple-bg); color: var(--icon-purple); }
.icon-pink   { background: var(--icon-pink-bg);   color: var(--icon-pink); }
.icon-red    { background: var(--icon-red-bg);    color: var(--icon-red); }
.icon-teal   { background: var(--icon-teal-bg);   color: var(--icon-teal); }
.icon-indigo { background: var(--icon-indigo-bg); color: var(--icon-indigo); }
.icon-navy   { background: var(--icon-navy-bg);   color: var(--icon-navy); }

.stat-card strong { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.stat-card span { display: block; font-size: 12px; color: var(--text-soft); margin-top: 1px; }

/* Categories */
.categories { margin-bottom: 22px; }
.categories-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.categories-head h3 { font-family: var(--font-display); font-size: 18px; margin: 0; }
.view-all { font-size: 13px; color: var(--gold-deep); font-weight: 600; }
.view-all:hover { text-decoration: underline; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.cat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  flex-direction: column;
}
.cat-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cat-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.cat-head h4 {
  font-size: 14px;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  display: flex; align-items: baseline; gap: 6px;
}
.cat-head .num { font-size: 10px; color: var(--text-soft); font-weight: 400; }
.cat-card ul { list-style: none; padding: 0; margin: 0 0 14px; flex: 1; }
.cat-card li {
  font-size: 12.5px;
  color: var(--text-soft);
  padding: 3px 0 3px 14px;
  position: relative;
}
.cat-card li::before { content: "•"; position: absolute; left: 0; color: var(--gold); }
.explore { font-size: 12.5px; font-weight: 600; color: var(--gold-deep); margin-top: auto; }
.explore:hover { text-decoration: underline; }
.explore-soon { color: var(--text-soft); font-weight: 500; cursor: default; }

/* Workflow */
.workflow {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  margin-bottom: 22px;
}
.workflow h3 { font-family: var(--font-display); font-size: 18px; margin: 0 0 20px; }
.workflow-track { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 4px; }
.wf-step {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 104px; text-align: center;
}
.wf-icon {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--gold-tint);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
}
.wf-step span { font-size: 11px; color: var(--text-soft); line-height: 1.35; }
.wf-arrow { color: var(--border-strong); font-size: 16px; padding: 12px 2px 0; flex-shrink: 0; }

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.f-icon { font-size: 20px; flex-shrink: 0; }
.feature strong { display: block; font-family: var(--font-display); font-size: 13.5px; margin-bottom: 4px; }
.feature p { font-size: 12px; color: var(--text-soft); margin: 0; line-height: 1.45; }

/* Footer */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 12px;
  gap: 16px;
}
.footer small { color: var(--text-soft); }
.footer-quote { font-style: italic; text-align: center; flex: 1; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1200px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .sidebar { display: none; }
  .hero { flex-direction: column; align-items: flex-start; }
  .hero-art { width: 160px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer { flex-direction: column; text-align: center; }
}
@media (max-width: 640px) {
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .search { display: none; }
  .stats { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
}

/* Real logo image support: white box for contrast against any background, replacing the old gradient+emoji mark. */
.brand-mark.logo-box { background: #fff; border: 1px solid var(--border, #E5E7EB); padding: 4px; }
.brand-mark.logo-box img { width: 100%; height: 100%; object-fit: contain; }
