/* ALLTRACE CRM — Marketing Panel visual parity v20. Presentation only. */
html[data-theme="light"] body {
  background: radial-gradient(900px 520px at 79% -12%, rgba(52,120,246,.05), transparent 62%), linear-gradient(180deg,#f7f9fc,#f2f5f8);
  color:#18212f;
}
html[data-theme="dark"] body {
  background: radial-gradient(900px 520px at 79% -12%, rgba(59,130,246,.06), transparent 62%), radial-gradient(620px 420px at 10% 100%, rgba(99,200,51,.035), transparent 68%), #090b0f;
  color:#f2f5f8;
}
html[data-theme="light"] [data-admin-shell] {
  --color-primary:#4fb82c; --color-primary-dark:#3f9d22; --color-primary-light:#e9f7e4; --color-primary-hover:#46a927;
  --color-bg-light:#f3f5f8; --color-bg-dark:#fff; --color-surface:#fff; --color-surface-dark:#f7f9fc;
  --color-text-main:#18212f; --color-text-secondary:#526177;
  --color-slate-300:#536278; --color-slate-400:#64748b; --color-slate-500:#75849a;
  --color-slate-700:#d8dee8; --color-slate-800:#eef2f7; --color-slate-900:#fff;
}
html[data-theme="dark"] [data-admin-shell] {
  --color-primary:#63c833; --color-primary-dark:#4ca23e; --color-primary-light:#172419; --color-primary-hover:#75db48;
  --color-bg-light:#090b0f; --color-bg-dark:#090b0f; --color-surface:#121720; --color-surface-dark:#0c0f14;
  --color-text-main:#f2f5f8; --color-text-secondary:#9aa5b7;
  --color-slate-50:#f7f9fc; --color-slate-100:#edf2f8; --color-slate-200:#d9e0ea; --color-slate-300:#c4cedb;
  --color-slate-400:#9aa5b7; --color-slate-500:#647087; --color-slate-600:#445064; --color-slate-700:#2b3545;
  --color-slate-800:#171d27; --color-slate-900:#0c0f14; --color-slate-950:#090b0f;
  --color-gray-50:#171d27; --color-gray-100:#1b2230; --color-gray-200:#232c3a; --color-gray-300:#364152;
  --color-gray-400:#647087; --color-gray-500:#9aa5b7; --color-gray-600:#b7c0cf; --color-gray-700:#d0d8e4;
  --color-gray-800:#e2e8f0; --color-gray-900:#f2f5f8;
}
[data-admin-shell] { transition:background-color .18s ease,color .18s ease; }
[data-admin-shell] > header {
  backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px);
  transition:background-color .18s ease,border-color .18s ease;
}
html[data-theme="dark"] [data-admin-shell] > header {
  background:rgba(9,12,17,.92)!important; border-color:rgba(120,140,170,.12)!important;
  box-shadow:0 12px 32px -28px rgba(0,0,0,.95);
}
html[data-theme="light"] [data-admin-shell] > header {
  background:rgba(255,255,255,.94)!important; border-color:#e1e6ee!important;
  box-shadow:0 10px 28px -24px rgba(33,45,62,.32);
}
html[data-theme="dark"] [data-admin-shell] > div > aside {
  background:linear-gradient(180deg,rgba(14,18,25,.98),rgba(9,12,17,.99))!important;
  border-color:rgba(120,140,170,.13)!important; box-shadow:18px 0 42px -38px rgba(0,0,0,.9)!important;
}
html[data-theme="light"] [data-admin-shell] > div > aside {
  background:linear-gradient(180deg,#fbfcfe,#f6f8fb)!important;
  border-color:#dfe5ed!important; box-shadow:14px 0 32px -32px rgba(33,45,62,.35)!important;
}
html[data-theme="dark"] [data-admin-shell] > div > main {
  background:radial-gradient(900px 520px at 79% -12%,rgba(59,130,246,.05),transparent 62%),#090b0f!important;
}
html[data-theme="light"] [data-admin-shell] > div > main {
  background:linear-gradient(180deg,#f7f9fc,#f2f5f8)!important;
}
html[data-theme="dark"] [data-admin-shell] .bg-white { background-color:#121720!important; }
html[data-theme="dark"] [data-admin-shell] input,
html[data-theme="dark"] [data-admin-shell] select,
html[data-theme="dark"] [data-admin-shell] textarea { color:#f2f5f8; }
html[data-theme="dark"] [data-admin-shell] option { color:#f2f5f8; background:#121720; }
html[data-theme="dark"] [data-admin-shell] .shadow-sm,
html[data-theme="dark"] [data-admin-shell] .shadow-md,
html[data-theme="dark"] [data-admin-shell] .shadow-lg,
html[data-theme="dark"] [data-admin-shell] .shadow-xl {
  box-shadow:0 14px 42px -28px rgba(0,0,0,.95),inset 0 1px 0 rgba(255,255,255,.018)!important;
}
#alltrace-theme-control {
  height:36px; display:inline-flex; align-items:center; gap:6px; padding:0 9px; flex:0 0 auto;
  border:1px solid rgba(126,145,175,.16); border-radius:11px; background:rgba(18,24,33,.78); color:#aab5c8;
}
#alltrace-theme-control .material-symbols-outlined { font-size:18px; }
#alltrace-theme-control select {
  appearance:none; border:0; outline:0; background:transparent; color:inherit; font:inherit;
  font-size:12px; font-weight:600; cursor:pointer;
}
html[data-theme="light"] #alltrace-theme-control { background:#f5f7fa; border-color:#dce3ec; color:#526177; }
html[data-theme="light"] #alltrace-theme-control option { background:#fff; color:#18212f; }
html[data-theme="dark"] #alltrace-theme-control option { background:#121720; color:#f2f5f8; }
@media (max-width:767px) {
  #alltrace-theme-control { width:36px; padding:0; justify-content:center; position:relative; }
  #alltrace-theme-control select { position:absolute; inset:0; width:36px; height:36px; opacity:0; }
}

/* v21 — exact marketing-panel typography + light-theme contrast fixes. */
html body,
html body button,
html body input,
html body select,
html body textarea {
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

[data-admin-shell] {
  --font-family-display: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  letter-spacing: -.01em;
}

[data-admin-shell] h1,
[data-admin-shell] h2,
[data-admin-shell] h3,
[data-admin-shell] h4,
[data-admin-shell] [class*="text-2xl"],
[data-admin-shell] [class*="text-3xl"],
[data-admin-shell] [class*="text-4xl"] {
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -.02em;
}

/* Light header: slightly darker than the workspace and with a subtle brand rail. */
html[data-theme="light"] [data-admin-shell] > header {
  background: linear-gradient(180deg, #AEB8C5 0%, #98A5B5 100%) !important;
  border-color: #8C99A9 !important;
  box-shadow: 0 12px 30px -22px rgba(33,45,62,.42);
}

/* Keep the header visually continuous: no separate dark plaque behind the logo. */
html[data-theme="light"] [data-admin-shell] > header img[src*="alltrace-full-logo.svg"] {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 1px 1px rgba(17,23,32,.28));
}

/* Tailwind's hover:text-white is correct in dark mode but disappears on the
   light sidebar. Keep hover text/icons legible, while active green stays green. */
html[data-theme="light"] [data-admin-shell] .hover\:text-white:hover {
  color: #18212f !important;
}
html[data-theme="light"] [data-admin-shell] .text-primary.hover\:text-white:hover {
  color: #3f9d22 !important;
}
html[data-theme="light"] [data-admin-shell] .hover\:bg-slate-800\/90:hover,
html[data-theme="light"] [data-admin-shell] .hover\:bg-slate-800\/80:hover,
html[data-theme="light"] [data-admin-shell] .hover\:bg-slate-800:hover {
  background-color: #e2e7ed !important;
}

/* Clear hover/active treatment for left navigation in the light theme. */
html[data-theme="light"] [data-admin-shell] aside nav a:hover {
  color: #18212f !important;
}
html[data-theme="light"] [data-admin-shell] aside nav a:hover .material-symbols-outlined {
  color: inherit !important;
}
html[data-theme="light"] [data-admin-shell] aside nav a.text-primary,
html[data-theme="light"] [data-admin-shell] aside nav a.text-primary:hover {
  color: #3f9d22 !important;
}
