/* BizzyNexa Workspace — design system (CONTRACTS §1)
   BizzyNexa 2.0 visual direction (5 Dec 2026): violet palette, Nexa mascot,
   bottom nav, metric cards, friendly empty states.
   Brief tokens (exact): primary #7950DD, deep #382079, lavender #EAE3FF,
   mint #DFF5E9, peach #FFF0D9, soft blue #E2ECFF, light bg #F6F5FA,
   text #242139, dark bg #181624, dark accent #9B7BEE.
   Scoping: the unscoped html[data-theme] blocks below are the pre-2.0
   navy/blue/teal baseline, so Admin (which shares this file and sets no
   data-app) is unaffected. All violet values live only under
   html[data-app="workspace"][data-theme=...] (set in core.js boot via
   document.documentElement.dataset.app = 'workspace').
   System font stack only. No external fonts or CDN.
   NOTE: no fictional metrics are shown anywhere — stat cards render only
   real dashboard totals; there are no invented % changes. */

:root {
  --navy: #080F1E;
  --violet: #7950DD;
  --violet-light: #9B7BEE;
  --violet-deep: #382079;
  --violet-soft: #EAE3FF;
  --violet-bg: #F6F5FA;
  --mint: #DFF5E9;
  --peach: #FFF0D9;
  --soft-blue: #E2ECFF;
  --blue: #7950DD;
  --blue-dark: #382079;
  --teal: #20E3CF;
  --green: #15803D;
  --green-bg: #DCFCE7;
  --amber: #B45309;
  --amber-bg: #FEF3C7;
  --red: #B91C1C;
  --red-bg: #FEE2E2;
  --grey: #64748B;
}

html[data-theme="light"] {
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-muted: #F1F5F9;
  --surface-hover: #E2E8F0;
  --text: #0F172A;
  --text-muted: #64748B;
  --text-faint: #94A3B8;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --sidebar-bg: #080F1E;
  --sidebar-text: #E2E8F0;
  --sidebar-muted: #94A3B8;
  --sidebar-active-bg: rgba(56, 123, 255, 0.18);
  --sidebar-active-text: #FFFFFF;
  --accent: #387BFF;
  --accent-text: #FFFFFF;
  --accent-soft: #DBEAFE;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.15);
  --input-bg: #FFFFFF;
  --code-bg: #F1F5F9;
}

/* BizzyNexa 2.0 (workspace only): brief violet tokens, light theme. */
html[data-app="workspace"][data-theme="light"] {
  --bg: #F6F5FA;
  --surface-hover: #EAE3FF;
  --text: #242139;
  --border: #EAE3FF;
  --sidebar-bg: #382079;
  --sidebar-active-bg: rgba(121, 80, 221, 0.28);
  --accent: #7950DD;
  --accent-text: #FFFFFF;
  --accent-soft: #EAE3FF;
  --shadow: 0 1px 3px rgba(56, 32, 121, 0.08), 0 1px 2px rgba(56, 32, 121, 0.05);
  --shadow-lg: 0 10px 25px rgba(56, 32, 121, 0.15);
}

html[data-theme="dark"] {
  --bg: #0B1220;
  --surface: #111C33;
  --surface-muted: #16223C;
  --surface-hover: #1D2C4A;
  --text: #F1F5F9;
  --text-muted: #94A3B8;
  --text-faint: #64748B;
  --border: #22304E;
  --border-strong: #334155;
  --sidebar-bg: #060B16;
  --sidebar-text: #E2E8F0;
  --sidebar-muted: #94A3B8;
  --sidebar-active-bg: rgba(56, 123, 255, 0.25);
  --sidebar-active-text: #FFFFFF;
  --accent: #5B93FF;
  --accent-text: #FFFFFF;
  --accent-soft: rgba(56, 123, 255, 0.22);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
  --input-bg: #0F1A2E;
  --code-bg: #16223C;
  --green-bg: rgba(21, 128, 61, 0.25);
  --amber-bg: rgba(180, 83, 9, 0.25);
  --red-bg: rgba(185, 28, 28, 0.25);
}

/* BizzyNexa 2.0 (workspace only): brief violet tokens, dark theme.
   Surfaces/borders use the brief dark accent (#9B7BEE = 155,123,238) and
   light bg (#F6F5FA) as translucent tints, so no extra hex is introduced. */
html[data-app="workspace"][data-theme="dark"] {
  --bg: #181624;
  --surface: rgba(155, 123, 238, 0.07);
  --surface-muted: rgba(155, 123, 238, 0.13);
  --surface-hover: rgba(155, 123, 238, 0.2);
  --text: #F6F5FA;
  --text-muted: rgba(246, 245, 250, 0.65);
  --text-faint: rgba(246, 245, 250, 0.45);
  --border: rgba(155, 123, 238, 0.25);
  --border-strong: rgba(155, 123, 238, 0.45);
  --sidebar-bg: #382079;
  --sidebar-active-bg: rgba(155, 123, 238, 0.32);
  --accent: #9B7BEE;
  --accent-text: #181624;
  --accent-soft: rgba(155, 123, 238, 0.22);
  --input-bg: rgba(155, 123, 238, 0.08);
  --code-bg: rgba(155, 123, 238, 0.12);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 8px; line-height: 1.25; font-weight: 650; }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; padding-left: 20px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

button { font-family: inherit; cursor: pointer; }
button:disabled, .btn:disabled { opacity: 0.55; cursor: not-allowed; }
input, select, textarea { font-family: inherit; font-size: 15px; }

/* ---------- Layout ---------- */
.app-shell { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { flex: 1; padding: 24px; max-width: 1200px; width: 100%; margin: 0 auto; }
.content-narrow { max-width: 760px; }

.sidebar {
  width: 248px; flex-shrink: 0;
  background: var(--sidebar-bg); color: var(--sidebar-text);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-brand { padding: 20px 20px 12px; }
.sidebar-brand-name { font-size: 19px; font-weight: 750; color: #fff; letter-spacing: -0.01em; }
.sidebar-brand-name span { color: var(--teal); }
.sidebar-org { font-size: 13px; color: var(--sidebar-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 12px; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin: 1px 0; border-radius: 8px;
  color: var(--sidebar-text); font-size: 14.5px; text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.sidebar-nav a:hover { background: rgba(255, 255, 255, 0.07); text-decoration: none; }
.sidebar-nav a.active { background: var(--sidebar-active-bg); color: var(--sidebar-active-text); font-weight: 600; }
.sidebar-nav .nav-icon { width: 20px; text-align: center; flex-shrink: 0; font-size: 15px; }
.sidebar-footer { padding: 14px 16px; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 13px; color: var(--sidebar-muted); }
.sidebar-footer .plan-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sidebar-footer .plan-name { color: #fff; font-weight: 600; }
.sidebar-footer .status-line { margin-top: 6px; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.topbar-org { font-weight: 650; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-spacer { flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; color: var(--text-muted); font-size: 17px; text-decoration: none;
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.icon-btn:hover { transform: translateY(-1px); }
.icon-btn:hover { background: var(--surface-muted); color: var(--text); text-decoration: none; }
.icon-btn .count-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* Global search */
.search-wrap { position: relative; width: 280px; max-width: 38vw; }
.search-wrap .input { padding-left: 34px; }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-faint); pointer-events: none; }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-lg); max-height: 380px; overflow-y: auto; padding: 6px;
}
.search-results .search-group { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); padding: 8px 10px 4px; }
.search-results .search-item {
  display: block; padding: 8px 10px; border-radius: 6px; color: var(--text);
  cursor: pointer; font-size: 14px; text-decoration: none;
}
.search-results .search-item:hover { background: var(--surface-muted); text-decoration: none; }
.search-results .search-item small { display: block; color: var(--text-muted); font-size: 12.5px; }
.search-results .search-empty { padding: 12px 10px; color: var(--text-muted); font-size: 14px; }

/* User menu */
.user-menu-wrap { position: relative; }
.user-menu-btn {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 20px; padding: 5px 12px 5px 6px; font-size: 14px; font-weight: 600;
}
.user-menu-btn:hover { background: var(--surface-muted); }
.avatar-circle {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: var(--accent-text);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  min-width: 220px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px;
}
.dropdown-menu .menu-head { padding: 8px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.dropdown-menu .menu-head strong { display: block; font-size: 14px; }
.dropdown-menu .menu-head span { font-size: 12.5px; color: var(--text-muted); word-break: break-all; }
.dropdown-menu a, .dropdown-menu button.menu-item {
  display: flex; width: 100%; text-align: left; padding: 9px 10px; border: 0; border-radius: 6px;
  background: transparent; color: var(--text); font-size: 14px; text-decoration: none;
}
.dropdown-menu a:hover, .dropdown-menu button.menu-item:hover { background: var(--surface-muted); text-decoration: none; }

/* Bottom nav (mobile) — 2.0: violet active state, soft top shadow */
.bottom-nav {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 4px 2px calc(4px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(56, 32, 121, 0.08);
}
.bottom-nav .bottom-nav-inner { display: flex; }
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 0 4px; color: var(--text-muted); font-size: 11px; text-decoration: none;
  position: relative;
}
.bottom-nav a.active { color: var(--accent); font-weight: 650; }
.bottom-nav .nav-icon { font-size: 19px; line-height: 1; }
.bottom-nav .bottom-nav-badge {
  position: absolute; top: 2px; right: calc(50% - 20px);
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--violet); color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Page head ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; margin: 0; }
.page-head .page-sub { color: var(--text-muted); margin: 4px 0 0; font-size: 14.5px; }
.page-head .page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Components ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.card h2 { font-size: 17px; }
.card h3 { font-size: 15px; }
.card-flat { box-shadow: none; }
.card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-title-row h2, .card-title-row h3 { margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: 8px; border: 1px solid transparent;
  font-size: 14.5px; font-weight: 600; line-height: 1.3; text-decoration: none;
  background: var(--surface-muted); color: var(--text); white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease, filter .15s ease;
}
.btn:hover { text-decoration: none; filter: brightness(0.97); }
.btn-primary { background: linear-gradient(135deg, var(--violet-light), var(--violet)); color: var(--accent-text); }
.btn-primary:hover { background: linear-gradient(135deg, var(--violet), var(--violet-deep)); filter: none; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(121, 80, 221, 0.4); }
.btn:active { transform: translateY(0); }
html[data-theme="dark"] .btn-primary:hover { background: linear-gradient(135deg, var(--violet-light), var(--violet)); }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-danger { background: var(--red); color: #fff; }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-sm { padding: 6px 11px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn .spinner { width: 15px; height: 15px; border-width: 2px; }

.input, select.input, textarea.input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong);
  border-radius: 8px; background: var(--input-bg); color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:hover { border-color: var(--accent); }
.input:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; }
.input::placeholder { color: var(--text-faint); }
textarea.input { min-height: 96px; resize: vertical; }
.label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 5px; }
.label .req { color: var(--red); }
.field { margin-bottom: 16px; }
.field .hint { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }
.form-error {
  background: var(--red-bg); color: var(--red); border: 1px solid rgba(185, 28, 28, 0.25);
  border-radius: 8px; padding: 10px 12px; font-size: 14px; margin-bottom: 16px;
}
.form-error:empty { display: none; }
.check-row { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 12px; font-size: 14.5px; }
.check-row input[type="checkbox"], .check-row input[type="radio"] { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); }
.radio-group { display: flex; gap: 16px; flex-wrap: wrap; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 20px; font-size: 12.5px; font-weight: 650; line-height: 1.6;
  background: var(--surface-muted); color: var(--text-muted); white-space: nowrap;
}
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-grey { background: var(--surface-muted); color: var(--text-muted); }
.badge-blue { background: var(--accent-soft); color: var(--accent); }
html[data-theme="dark"] .badge-green { color: #86EFAC; }
html[data-theme="dark"] .badge-amber { color: #FCD34D; }
html[data-theme="dark"] .badge-red { color: #FCA5A5; }
html[data-theme="dark"] .badge-blue { color: #93C5FD; }

.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); font-weight: 650; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .15s ease; }
.table tbody tr:hover { background: var(--surface-muted); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

.empty-state { text-align: center; padding: 36px 20px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 34px; margin-bottom: 10px; }
.empty-state .empty-illustration { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; display: block; box-shadow: 0 6px 18px rgba(121, 80, 221, 0.25); }
.empty-state h3 { color: var(--text); font-size: 16px; margin-bottom: 6px; }
.empty-state p { max-width: 460px; margin: 0 auto 14px; font-size: 14.5px; }

.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: bz-spin 0.8s linear infinite; display: inline-block; vertical-align: middle;
}
@keyframes bz-spin { to { transform: rotate(360deg); } }
.loading-block { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 48px 16px; color: var(--text-muted); }

/* ---------- Loading skeletons (shimmer) ---------- */
.skeleton { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.skel {
  position: relative; overflow: hidden; border-radius: 8px;
  background: var(--surface-muted); min-height: 18px;
}
.skel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  transform: translateX(-100%);
  animation: bz-shimmer 1.4s infinite;
}
html[data-theme="dark"] .skel::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.10), transparent);
}
@keyframes bz-shimmer { to { transform: translateX(100%); } }
.skel-line { height: 18px; }
.skel-line.short { width: 55%; }
.skel-card { height: 110px; border-radius: 12px; }
.skel-title { height: 26px; width: 38%; }
.skel-stat { height: 86px; border-radius: 12px; }
.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }

.toast-root { position: fixed; bottom: 56px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); padding-bottom: 8px; }
.toast {
  background: var(--navy); color: #fff; border-radius: 10px; padding: 12px 16px;
  box-shadow: var(--shadow-lg); font-size: 14.5px; display: flex; gap: 10px; align-items: flex-start;
}
.toast-error { background: var(--red); }
.toast-success { background: var(--green); }
.toast-info { background: var(--navy); }

.modal-overlay {
  position: fixed; inset: 0; z-index: 150; background: rgba(8, 15, 30, 0.55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal {
  background: var(--surface); color: var(--text); border-radius: 14px;
  box-shadow: var(--shadow-lg); width: 100%; max-width: 480px; max-height: 88vh;
  overflow-y: auto; padding: 24px;
}
.modal h2 { font-size: 18px; margin-bottom: 8px; }
.modal .modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.modal-wide { max-width: 720px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs button {
  border: 0; background: transparent; color: var(--text-muted);
  padding: 9px 14px; font-size: 14.5px; font-weight: 600; border-bottom: 2px solid transparent;
  margin-bottom: -1px; white-space: nowrap;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.stat-card .stat-icon { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 10px; background: var(--accent-soft); color: var(--accent); }
.stat-card.stat-tint-green .stat-icon { background: var(--green-bg); color: var(--green); }
.stat-card.stat-tint-amber .stat-icon { background: var(--amber-bg); color: var(--amber); }
.stat-card.stat-tint-teal .stat-icon { background: rgba(32, 227, 207, 0.16); color: #0E7490; }
html[data-theme="dark"] .stat-card.stat-tint-teal .stat-icon { color: #5EEAD4; }
.stat-card .stat-label { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.stat-card .stat-value { font-size: 28px; font-weight: 750; line-height: 1.2; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.stat-card .stat-sub { font-size: 12.5px; color: var(--text-muted); }

.alert { border-radius: 10px; padding: 12px 14px; font-size: 14.5px; margin-bottom: 16px; border: 1px solid transparent; }
.alert-error { background: var(--red-bg); color: var(--red); border-color: rgba(185, 28, 28, 0.25); }
.alert-success { background: var(--green-bg); color: var(--green); border-color: rgba(21, 128, 61, 0.25); }
.alert-info { background: var(--accent-soft); color: var(--accent); border-color: rgba(56, 123, 255, 0.25); }
html[data-theme="dark"] .alert-success { color: #86EFAC; }
html[data-theme="dark"] .alert-error { color: #FCA5A5; }
html[data-theme="dark"] .alert-info { color: #93C5FD; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2 > .card { margin-bottom: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.list-plain li:last-child { border-bottom: 0; }
.list-plain .item-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 6px 14px; font-size: 14.5px; }
.kv dt { color: var(--text-muted); font-weight: 600; }
.kv dd { margin: 0; word-break: break-word; }
.progress { height: 8px; border-radius: 4px; background: var(--surface-muted); overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); border-radius: 4px; }
.progress-label { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-muted); margin-bottom: 4px; }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
pre.code-block {
  background: var(--code-bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; overflow-x: auto; font-size: 12.5px; line-height: 1.55; margin: 0 0 12px; white-space: pre-wrap; word-break: break-all;
}

/* ---------- Auth pages (entry screens: vibrant, electric, inviting) ---------- */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(125deg, #080F1E 0%, #382079 34%, #7950DD 62%, #080F1E 100%);
  background-size: 220% 220%;
  animation: bz-auth-pan 18s ease-in-out infinite;
}
.auth-wrap::before, .auth-wrap::after {
  content: ""; position: absolute; border-radius: 50%; z-index: 0;
  filter: blur(70px); pointer-events: none;
}
.auth-wrap::before {
  width: min(480px, 85vw); height: min(480px, 85vw); top: -140px; left: -120px;
  background: radial-gradient(circle, rgba(155, 123, 238, 0.55), transparent 65%);
  animation: bz-auth-float 11s ease-in-out infinite;
}
.auth-wrap::after {
  width: min(420px, 80vw); height: min(420px, 80vw); bottom: -160px; right: -100px;
  background: radial-gradient(circle, rgba(32, 227, 207, 0.45), transparent 65%);
  animation: bz-auth-float 13s ease-in-out infinite reverse;
}
@keyframes bz-auth-pan { 0%, 100% { background-position: 0% 40%; } 50% { background-position: 100% 60%; } }
@keyframes bz-auth-float { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(28px, -22px) scale(1.08); } }
.auth-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 32px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(121, 80, 221, 0.18), 0 0 44px rgba(121, 80, 221, 0.28);
  animation: bz-auth-rise 0.45s ease both;
}
@keyframes bz-auth-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.auth-hero {
  text-align: center; font-size: 17px; font-weight: 700; line-height: 1.35; margin: 0 0 4px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--accent);
}
.auth-features { list-style: none; margin: 0 0 20px; padding: 14px 16px; border-radius: 10px; background: var(--surface-muted); border: 1px solid var(--border); }
.auth-features li { font-size: 13.5px; color: var(--text-muted); padding: 3px 0 3px 24px; position: relative; }
.auth-features li::before { content: "\2713"; position: absolute; left: 0; color: var(--teal); font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
  .auth-wrap, .auth-wrap::before, .auth-wrap::after, .auth-card, .skel::after, .spinner { animation: none !important; }
}
.auth-card-wide { max-width: 560px; }
.auth-brand { text-align: center; margin-bottom: 24px; }
.auth-brand .brand-name { font-size: 24px; font-weight: 750; color: var(--navy); }
html[data-theme="dark"] .auth-brand .brand-name { color: #fff; }
.auth-brand .brand-name span { color: var(--teal); }
.auth-brand .brand-tag { color: var(--text-muted); font-size: 14px; margin-top: 2px; }
.auth-card h1 { font-size: 21px; text-align: center; margin-bottom: 4px; }
.auth-card .auth-sub { text-align: center; color: var(--text-muted); font-size: 14.5px; margin-bottom: 20px; }
.auth-links { text-align: center; font-size: 14px; margin-top: 18px; color: var(--text-muted); }
.auth-links a { margin: 0 4px; }
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 96px; }
.password-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--accent); font-size: 13.5px; font-weight: 600; padding: 6px 8px; }
.pw-checks { list-style: none; margin: 6px 0 0; padding: 0; font-size: 13px; color: var(--text-muted); }
.pw-checks li::before { content: "○ "; }
.pw-checks li.ok { color: var(--green); }
.pw-checks li.ok::before { content: "● "; }
.preview-code-box {
  background: var(--amber-bg); border: 1px solid rgba(180, 83, 9, 0.3); border-radius: 10px;
  padding: 16px; margin: 16px 0; text-align: center;
}
.preview-code-box .preview-code { font-size: 30px; font-weight: 750; letter-spacing: 6px; margin: 10px 0 4px; font-variant-numeric: tabular-nums; }
.preview-code-box p { font-size: 13.5px; margin: 0 0 6px; color: var(--text); }
.code-input { text-align: center; font-size: 24px; letter-spacing: 8px; font-variant-numeric: tabular-nums; }

/* ---------- Chatbot appearance selects: stacked full-width so option values display fully ---------- */
.ap-selects { display: grid; grid-template-columns: 1fr; gap: 0; }
.ap-selects select.input { width: 100%; min-width: 0; }

/* ---------- Onboarding wizard ---------- */
.wizard-steps { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.wizard-step-dot {
  flex: 1; min-width: 60px; text-align: center; font-size: 12px; color: var(--text-muted);
  padding-top: 8px; border-top: 3px solid var(--border); font-weight: 600;
}
.wizard-step-dot.done { color: var(--accent); border-top-color: var(--accent); }
.wizard-step-dot.current { color: var(--text); border-top-color: var(--accent); }
.wizard-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.wizard-nav .nav-right { display: flex; gap: 8px; flex-wrap: wrap; }
.dynamic-row { border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 12px; background: var(--surface-muted); }
.dynamic-row .row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.dynamic-row .row-head strong { font-size: 14px; }
.hours-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 16px; }
.hours-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.hours-row .day { width: 44px; font-weight: 600; flex-shrink: 0; }
.hours-row .input { padding: 7px 9px; }
.hours-row .closed-label { color: var(--text-muted); font-size: 13px; }

/* ---------- Kanban ---------- */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; }
.kanban-col { flex: 0 0 272px; background: var(--surface-muted); border: 1px solid var(--border); border-radius: 12px; padding: 10px; }
.kanban-col h3 { font-size: 13.5px; margin: 2px 4px 10px; display: flex; justify-content: space-between; align-items: center; }
.kanban-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px; margin-bottom: 8px; box-shadow: var(--shadow); cursor: pointer; font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.kanban-card:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.kanban-card .kc-name { font-weight: 650; margin-bottom: 2px; }
.kanban-card .kc-meta { font-size: 12.5px; color: var(--text-muted); }

/* ---------- Chat / inbox ---------- */
.chat-layout { display: grid; grid-template-columns: 320px 1fr; gap: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); min-height: 560px; }
.chat-list { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-width: 0; }
.chat-list-search { padding: 12px; border-bottom: 1px solid var(--border); }
.chat-list-items { overflow-y: auto; flex: 1; }
.chat-list-item { display: block; padding: 12px 14px; border-bottom: 1px solid var(--border); cursor: pointer; color: var(--text); text-decoration: none; transition: background-color .15s ease; }
.chat-list-item:hover { background: var(--surface-muted); text-decoration: none; }
.chat-list-item.active { background: var(--accent-soft); }
.chat-list-item .cli-name { font-weight: 650; font-size: 14.5px; display: flex; justify-content: space-between; gap: 8px; }
.chat-list-item .cli-preview { font-size: 13.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.chat-list-item .cli-time { font-size: 12px; color: var(--text-faint); flex-shrink: 0; }
.chat-pane { display: flex; flex-direction: column; min-width: 0; }
.chat-pane-head { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.chat-pane-head h2 { font-size: 16px; margin: 0; }
.chat-messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 78%; padding: 10px 13px; border-radius: 12px; font-size: 14.5px; line-height: 1.45; }
.chat-msg .msg-meta { font-size: 11.5px; color: var(--text-faint); margin-top: 4px; }
.chat-msg-customer { align-self: flex-start; background: var(--surface-muted); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-msg-assistant, .chat-msg-agent { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg-assistant .msg-meta, .chat-msg-agent .msg-meta { color: rgba(255, 255, 255, 0.75); }
.chat-msg-system { align-self: center; background: transparent; color: var(--text-muted); font-size: 12.5px; padding: 4px 8px; text-align: center; max-width: 92%; }
.chat-composer { padding: 12px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.chat-composer .input { flex: 1; }
.chat-note { font-size: 12.5px; color: var(--text-muted); padding: 8px 14px; border-top: 1px solid var(--border); background: var(--surface-muted); }

/* ---------- Charts ---------- */
.chart-card svg { width: 100%; height: auto; display: block; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.chart-legend .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }

/* ---------- Misc ---------- */
.muted { color: var(--text-muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mt-3 { margin-top: 12px; }
.flex { display: flex; } .flex-gap { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.divider { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.tag-list { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { background: var(--surface-muted); border: 1px solid var(--border); border-radius: 20px; padding: 3px 10px; font-size: 13px; }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot-green { background: #22C55E; } .dot-amber { background: #F59E0B; } .dot-red { background: #EF4444; } .dot-grey { background: #94A3B8; }

/* ---------- BizzyNexa 2.0: Nexa hero, filter chips, sidebar mascot ---------- */
.nexa-hero {
  display: flex; align-items: center; gap: 18px;
  background: linear-gradient(135deg, #9B7BEE 0%, #7950DD 55%, #382079 100%);
  color: #fff; border-radius: 20px; padding: 20px 22px; margin-bottom: 16px;
  box-shadow: 0 10px 28px rgba(121, 80, 221, 0.35);
}
.nexa-hero .nexa-hero-text { flex: 1; min-width: 0; }
.nexa-hero h2 { font-size: 20px; margin: 0 0 4px; color: #fff; }
.nexa-hero p { margin: 0 0 14px; color: rgba(255, 255, 255, 0.88); font-size: 14.5px; }
.nexa-hero .btn { background: #fff; color: #382079; border-color: transparent; }
.nexa-hero .btn:hover { background: #F6F5FA; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2); }
.nexa-hero .nexa-mascot { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex-shrink: 0; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); }
@media (max-width: 520px) {
  .nexa-hero .nexa-mascot { width: 72px; height: 72px; }
  .nexa-hero h2 { font-size: 18px; }
}
.sidebar-brand-row { display: flex; align-items: center; gap: 10px; }
.sidebar-nexa { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 0 2px rgba(155, 123, 238, 0.5); }
/* Pill filter chips (Inbox / Leads: All / Unread / Resolved style) */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 20px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 600;
  min-height: 44px; cursor: pointer; font-family: inherit;
}
.chip.active { background: var(--violet); border-color: var(--violet); color: #fff; }
.chip .chip-count { background: rgba(255, 255, 255, 0.25); border-radius: 10px; padding: 0 6px; font-size: 12px; }
.chip:not(.active) .chip-count { background: var(--accent-soft); color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .chat-layout { grid-template-columns: 260px 1fr; }
}

@media (max-width: 768px) {
  .sidebar { display: none; }
  .bottom-nav { display: block; }
  .main { padding-bottom: 64px; }
  .content { padding: 16px; }
  .topbar { padding: 10px 14px; }
  .search-wrap { display: none; }
  .topbar-org { font-size: 15px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card .stat-value { font-size: 23px; }
  .chat-layout { grid-template-columns: 1fr; min-height: 0; }
  .chat-list { border-right: 0; border-bottom: 1px solid var(--border); max-height: 300px; }
  .chat-pane { min-height: 480px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .hours-grid { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 21px; }
  .toast-root { bottom: 96px; }
}

@media (max-width: 390px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card { padding: 12px; }
  .auth-card { padding: 24px 18px; }
  .btn { padding: 9px 12px; }
  .content { padding: 12px; }
  .user-menu-btn .user-name-label { display: none; }
}

@media (max-width: 320px) {
  body { font-size: 14px; }
  .stat-grid { grid-template-columns: 1fr; }
}

/* ---------- BizzyNexa 2.0 overview: quick actions, welcome, launchpad ---------- */
.section-head { margin: 20px 0 12px; }
.section-head:first-child { margin-top: 0; }
.section-head h2 { font-size: 17px; margin: 0 0 2px; }
.section-head p { margin: 0; }
.quick-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.welcome-block { display: flex; gap: 16px; align-items: center; }
.welcome-block img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.welcome-block h2 { font-size: 18px; margin: 0 0 4px; }
.welcome-block p { margin: 0 0 12px; color: var(--text-muted); font-size: 14.5px; }
.welcome-block .welcome-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.launchpad-step { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.launchpad-step .step-done { color: var(--green); font-weight: 650; }
@media (max-width: 520px) {
  .welcome-block { flex-direction: column; align-items: flex-start; }
}

/* ---------- BizzyNexa 2.0 components (workspace + admin share this file;
   classes below are used by the workspace app; Admin does not reference
   them) ---------- */

/* Inline SVG icons (BZ.ui.icon). */
.bz-icon { width: 20px; height: 20px; flex-shrink: 0; }
.nav-icon { display: inline-flex; align-items: center; justify-content: center; }
.nav-icon .bz-icon { width: 20px; height: 20px; display: block; }
.icon-btn .bz-icon { width: 20px; height: 20px; }
.search-icon .bz-icon { width: 18px; height: 18px; color: var(--text-muted); }
.btn .bz-icon { vertical-align: -4px; margin-right: 2px; }
.modal .btn .bz-icon { margin-right: 6px; }

/* Nexa mascot: gentle float + occasional blink (whole-image scaleY dip).
   translate (own property) + transform compose, so both run together. */
@keyframes nexa-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes nexa-blink { 0%, 91%, 100% { transform: scaleY(1); } 94% { transform: scaleY(0.85); } }
.nexa-hero .nexa-mascot { animation: nexa-float 5s ease-in-out infinite, nexa-blink 4.5s ease-in-out infinite; }
.empty-state .nexa-mascot { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; display: block; box-shadow: 0 6px 18px rgba(121, 80, 221, 0.25); }

/* Hero card (Assistant page): mascot + real assistant name/status. */
.hero-card { display: flex; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.hero-card .nexa-mascot { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; box-shadow: 0 6px 18px rgba(121, 80, 221, 0.25); }
.hero-card .hero-body { flex: 1; min-width: 0; }
.hero-card h2 { margin: 0 0 4px; font-size: 19px; }
.hero-card p { margin: 0 0 10px; color: var(--text-muted); font-size: 14px; }
.hero-card .hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Bento grid (automations / integrations / analytics card grids). */
.bento-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* Quick actions (Overview): icon tiles, not plain buttons. */
.qa-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.qa-item { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px; color: var(--text); text-decoration: none; font-weight: 650; font-size: 14px; min-height: 44px; box-shadow: var(--shadow); transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.qa-item:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-lg); text-decoration: none; }
.qa-item .qa-icon { width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }

/* Setup launchpad item (alias of .launchpad-step). */
.launchpad-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.launchpad-item .step-done { color: var(--green); font-weight: 650; }

/* Recent-activity timeline (Overview). */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.timeline-icon .bz-icon { width: 16px; height: 16px; }
.timeline-body { flex: 1; min-width: 0; font-size: 14px; }
.timeline-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

/* PWA install card + iOS guide (Install page). */
.install-card { background: linear-gradient(135deg, #9B7BEE 0%, #7950DD 55%, #382079 100%); color: #fff; border-radius: 20px; padding: 20px 22px; margin-bottom: 16px; box-shadow: 0 10px 28px rgba(121, 80, 221, 0.35); }
.install-card h2 { color: #fff; margin: 0 0 4px; font-size: 19px; }
.install-card p { color: rgba(255, 255, 255, 0.88); margin: 0 0 14px; font-size: 14.5px; }
.install-card .btn { background: #fff; color: #382079; border-color: transparent; }
.install-card .btn:hover { background: #F6F5FA; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2); }
.ios-guide { background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 12px; padding: 14px 16px; margin-top: 14px; font-size: 14px; }
.ios-guide strong { display: block; margin-bottom: 6px; }
.ios-guide ol { margin: 0; padding-left: 20px; }
.ios-guide li { margin-bottom: 4px; }

/* Avatars (initials, real names only — never invented people). */
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--violet-soft); color: var(--violet-deep); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.unread-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--violet); flex-shrink: 0; }

/* Pastel icon-tile tones (brief pastels + matching tints). */
.tone-violet { background: #EAE3FF; color: #382079; }
.tone-blue { background: #E2ECFF; color: #1E40AF; }
.tone-mint { background: #DFF5E9; color: #065F46; }
.tone-peach { background: #FFF0D9; color: #92400E; }
.tone-rose { background: #FFE4E6; color: #9F1239; }
.tone-sky { background: #E0F2FE; color: #075985; }
.tone-lime { background: #ECFCCB; color: #3F6212; }
.tone-grape { background: #EFE9FB; color: #4C1D95; }

.badge-violet { background: var(--violet-soft); color: var(--violet-deep); }
html[data-theme="dark"] .badge-violet { background: rgba(121, 80, 221, 0.28); color: #C4B5FD; }

/* Inbox: responsive 3-column grid (stacks on smaller screens) + items. */
.inbox-grid { display: grid; grid-template-columns: 300px 1fr 280px; gap: 16px; align-items: start; }
.inbox-item { display: block; width: 100%; text-align: left; margin-bottom: 8px; padding: 12px; cursor: pointer; }
.inbox-item-active { border-color: var(--accent); background: var(--accent-soft); }
.inbox-item .ii-top { display: flex; gap: 10px; align-items: center; }
.inbox-item .ii-name { font-weight: 650; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Lead cards (kanban + lists). */
.lead-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 8px; box-shadow: var(--shadow); transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.lead-card:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.lead-card .lc-top { display: flex; gap: 10px; align-items: center; }
.lead-card .lc-name { font-weight: 650; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-card .lc-meta { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

/* Appointment cards with a date block. */
.appt-card { display: flex; gap: 14px; }
.appt-date { width: 56px; text-align: center; background: var(--violet-soft); color: var(--violet-deep); border-radius: 12px; padding: 8px 4px; flex-shrink: 0; align-self: flex-start; }
.appt-date .ad-day { font-size: 22px; font-weight: 750; line-height: 1.1; }
.appt-date .ad-mon { font-size: 12px; font-weight: 650; text-transform: uppercase; }
.appt-card .ac-body { flex: 1; min-width: 0; }

/* Integration cards + connection health summary. */
.integration-card { display: flex; flex-direction: column; }
.integration-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.health-summary { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.health-summary .hs-text { font-weight: 650; }
.health-summary .hs-bar { flex: 1; min-width: 120px; }

/* Knowledge-base cards. */
.kb-card .kb-top { display: flex; gap: 10px; align-items: flex-start; }
.kb-icon { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex-shrink: 0; text-transform: uppercase; }
.kb-card .kb-title { font-weight: 650; flex: 1; min-width: 0; }
.kb-card .kb-preview { color: var(--text-muted); margin-top: 6px; white-space: pre-wrap; }

/* Two-column split layouts (tickets list + detail, appearance form + preview). */
.split-layout { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
.ap-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.ap-colors { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

@media (max-width: 1024px) {
  .inbox-grid { grid-template-columns: 1fr; }
  .split-layout { grid-template-columns: 1fr; }
  .ap-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .ap-colors { grid-template-columns: 1fr; }
  .hero-card { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  .qa-grid { grid-template-columns: 1fr 1fr; }
}

/* Reduced motion: disable ALL animation, including Nexa float/blink. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
