/*
 * CruxQuotes Design System — Wave 1
 * Overrides existing page styles to match the marketing homepage.
 * No HTML changes. No class removals. Pure additive restyle.
 */

/* Google Font — Plus Jakarta Sans */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* Design tokens */
:root {
  --cq-ink: #1c1b3a;
  --cq-muted: #6b6a86;
  --cq-bg: #f5f4fa;
  --cq-card: #ffffff;
  --cq-line: #e6e4f2;
  --cq-brand: #6c55e0;
  --cq-brand-d: #2a3fb0;
  --cq-tint: #eeebff;
  --cq-ok: #1f9d63;
  --cq-ok-bg: #e3f6ec;
  --cq-warn: #d97706;
  --cq-warn-bg: #fef3c7;
  --cq-danger: #dc2626;
  --cq-danger-bg: #fee4e4;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cq-ink: #ecebff;
    --cq-muted: #a3a2c0;
    --cq-bg: #12112a;
    --cq-card: #1b1a38;
    --cq-line: #2c2a52;
    --cq-tint: #27244f;
    --cq-ok-bg: #173a2c;
    --cq-danger-bg: #4a1717;
    --cq-warn-bg: #3a2e0f;
  }
}
:root[data-theme="dark"] {
  --cq-ink: #ecebff;
  --cq-muted: #a3a2c0;
  --cq-bg: #12112a;
  --cq-card: #1b1a38;
  --cq-line: #2c2a52;
  --cq-tint: #27244f;
}

/* Base body font override */
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Topbar / header ---- */
.topbar {
  background: var(--cq-card) !important;
  border-bottom: 1px solid var(--cq-line) !important;
}
.topbar .brand,
header .brand {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  color: var(--cq-ink) !important;
  font-weight: 800 !important;
  letter-spacing: -0.6px !important;
}
.topbar .brand span,
header .brand span {
  color: var(--cq-brand) !important;
}

/* ---- Sidebar ---- */
.sidebar {
  background: var(--cq-card) !important;
  border: 1px solid var(--cq-line) !important;
  border-radius: 16px !important;
}
.side-label {
  color: var(--cq-muted) !important;
  font-weight: 800 !important;
  letter-spacing: 1.2px !important;
}
.nav-link {
  color: var(--cq-muted) !important;
  font-weight: 600 !important;
  border-radius: 10px !important;
  transition: background 0.15s, color 0.15s !important;
}
.nav-link:hover {
  background: var(--cq-tint) !important;
  color: var(--cq-brand) !important;
}
.nav-link.active {
  background: var(--cq-tint) !important;
  color: var(--cq-brand) !important;
  font-weight: 700 !important;
}

/* ---- Panels / cards ---- */
.panel {
  background: var(--cq-card) !important;
  border: 1px solid var(--cq-line) !important;
  border-radius: 16px !important;
}
.panel h2 {
  font-weight: 800 !important;
  letter-spacing: -0.2px !important;
  color: var(--cq-ink) !important;
}

/* ---- Primary buttons ---- */
button.primary,
a.primary,
button.save-button,
.primary-button {
  background: var(--cq-brand) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s !important;
  box-shadow: 0 6px 18px rgba(108, 85, 224, 0.28) !important;
}
button.primary:hover,
a.primary:hover,
button.save-button:hover,
.primary-button:hover {
  background: #5a44d0 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 22px rgba(108, 85, 224, 0.35) !important;
}

/* ---- Secondary buttons ---- */
button.secondary,
a.secondary,
button.btn-secondary,
a.btn-secondary {
  background: var(--cq-card) !important;
  color: var(--cq-ink) !important;
  border: 1px solid var(--cq-line) !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
}
button.secondary:hover,
a.secondary:hover {
  border-color: var(--cq-brand) !important;
  color: var(--cq-brand) !important;
}

/* ---- Inputs ---- */
input,
select,
textarea {
  font-family: inherit !important;
  border-color: var(--cq-line) !important;
  border-radius: 10px !important;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--cq-brand) !important;
  box-shadow: 0 0 0 3px rgba(108, 85, 224, 0.15) !important;
  outline: none !important;
}

/* ---- Bottom nav (mobile) ---- */
.bottom-nav {
  background: var(--cq-card) !important;
  border-top: 1px solid var(--cq-line) !important;
}
.bottom-nav a {
  color: var(--cq-muted) !important;
  font-weight: 600 !important;
}
.bottom-nav a:hover,
.bottom-nav a.active {
  color: var(--cq-brand) !important;
}
.bottom-nav a span {
  font-size: 18px !important;
}

/* ---- Status tabs ---- */
.status-tab {
  font-family: inherit !important;
  font-weight: 600 !important;
  border-radius: 20px !important;
  transition: all 0.15s !important;
}
.status-tab.active {
  background: var(--cq-brand) !important;
  border-color: var(--cq-brand) !important;
  color: #fff !important;
}
.status-tab:not(.active) {
  background: var(--cq-card) !important;
  border-color: var(--cq-line) !important;
  color: var(--cq-muted) !important;
}
.status-tab:not(.active):hover {
  border-color: var(--cq-brand) !important;
  color: var(--cq-brand) !important;
}

/* ---- Page headings ---- */
h1 {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
  color: var(--cq-ink) !important;
}
h2,
h3 {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 800 !important;
  color: var(--cq-ink) !important;
}
.muted {
  color: var(--cq-muted) !important;
}
a {
  color: var(--cq-brand);
}
a:hover {
  color: var(--cq-brand-d);
}

/* ---- Quote editor category tabs ---- */
.quote-category-tab {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 600 !important;
  transition: all 0.15s !important;
}
.quote-category-tab.active {
  background: var(--cq-brand) !important;
  border-color: var(--cq-brand) !important;
  color: #fff !important;
}
.quote-category-tab:not(.active) {
  background: var(--cq-card) !important;
  border-color: var(--cq-line) !important;
  color: var(--cq-muted) !important;
}
.quote-category-tab:not(.active):hover {
  border-color: var(--cq-brand) !important;
  color: var(--cq-brand) !important;
}

/* ---- Quote editor category headers ---- */
.quote-category h2 {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 800 !important;
  color: var(--cq-ink) !important;
}

/* ---- Editor input labels ---- */
.item-field label,
.template-field label,
.quote-description label {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 700 !important;
  color: var(--cq-ink) !important;
}

/* ---- Editor buttons ---- */
.item-done-button,
.add-item-button,
.plus-button,
.save-button,
.category-option {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}
.item-done-button,
.save-button {
  background: var(--cq-brand) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
}
.item-done-button:hover,
.save-button:hover {
  background: #5a44d0 !important;
}

/* ---- Editor compact cards ---- */
.compact-item {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}
.compact-title {
  font-weight: 700 !important;
}

/* ---- Templates page brand logo ---- */
.brand span {
  color: var(--cq-brand) !important;
}
