/* Lightning Leads office layer: manager, rep, company, and sign-in surfaces.
   Loads after Tailwind (site.css) and ll-site.css, and everything is scoped to
   body.ls-office. Page scripts still write Tailwind classes into the DOM, so
   base utilities are re-themed with :where(.ls-office) (same specificity as
   Tailwind, later in the cascade) while Tailwind's hover/focus variants keep
   working. Never set `display` on elements that scripts toggle with .hidden. */

/* ─── Frame ──────────────────────────────────────────────────────────────── */
.ls-office {
  --appbar-h: 62px;
  --panel: linear-gradient(180deg, rgba(21, 24, 31, 0.9), rgba(11, 13, 18, 0.94));
  --well: rgba(4, 5, 8, 0.5);
  --field: rgba(5, 6, 9, 0.72);
  --neutral-1: #12151c;
  --neutral-2: #1a1e27;
  --neutral-3: #232834;
  --neutral-4: #2c3240;
  background: var(--ink-0);
  color: var(--fg-2);
  line-height: 1.5;
  scrollbar-color: #2a2f3a transparent;
}
.ls-office::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1100px 520px at 8% -10%, rgba(253, 224, 71, 0.075), transparent 62%),
    radial-gradient(900px 520px at 100% -6%, rgba(79, 141, 253, 0.075), transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px) 0 0 / 64px 64px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.45) 45%, transparent 90%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.45) 45%, transparent 90%);
}
html:has(.ls-office .ls-appchrome) { scroll-padding-top: 132px; }
/* Entrance animations wait until the page's auth guard reveals the body. */
.ls-office.auth-pending *, .ls-office.auth-pending *::before, .ls-office.auth-pending *::after { animation-play-state: paused !important; }
/* The guard hides the whole body; a brand pulse on <html> covers slow checks. */
html:has(body.ls-office.auth-pending)::after {
  content: ""; position: fixed; left: 50%; top: 50%; z-index: 1; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: var(--volt); animation: ls-verify 1.3s ease-out 0.3s infinite both;
}
@keyframes ls-verify {
  0% { opacity: 0; transform: scale(0.6); box-shadow: 0 0 0 0 rgba(253, 224, 71, 0.45); }
  25% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); box-shadow: 0 0 0 22px rgba(253, 224, 71, 0); }
}
:where(.ls-office) strong { color: inherit; }
.ls-office-main { padding-block: clamp(24px, 3.2vw, 40px) 64px; }

/* ─── App chrome (sticky glass bar + optional tab rail) ──────────────────── */
.ls-appchrome { position: sticky; top: 0; z-index: 40; transition: box-shadow 0.4s; }
.ls-appchrome.is-scrolled { box-shadow: 0 18px 40px -26px rgba(0, 0, 0, 0.95); }
.ls-appbar, .ls-tabrail {
  background: rgba(6, 7, 10, 0.66);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--hair);
  transition: background-color 0.4s, border-color 0.4s;
}
.ls-appchrome.is-scrolled .ls-appbar,
.ls-appchrome.is-scrolled .ls-tabrail { background: rgba(8, 9, 12, 0.9); }
.ls-appbar-inner { display: flex; align-items: center; gap: 12px; height: var(--appbar-h); }
.ls-appbar .ls-brand { flex: none; }
.ls-appbar-tag {
  flex: none; padding: 5px 10px; border-radius: 999px;
  font: 500 0.66rem/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--volt); background: var(--volt-a06); box-shadow: 0 0 0 1px var(--volt-a24) inset;
}
.ls-appnav { display: flex; align-items: center; gap: 2px; min-width: 0; margin-left: 8px; }
.ls-appnav a {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 12px; border-radius: 11px;
  color: var(--fg-3); font-size: 0.875rem; font-weight: 550; white-space: nowrap;
  transition: color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.ls-appnav a svg { width: 17px; height: 17px; flex: none; opacity: 0.8; transition: opacity 0.2s, transform 0.35s var(--ease-out); }
.ls-appnav a:hover { color: var(--fg); background: rgba(255, 255, 255, 0.05); }
.ls-appnav a:hover svg { opacity: 1; transform: translateY(-1px); }
.ls-appnav a[aria-current="page"] { color: var(--fg); background: rgba(255, 255, 255, 0.06); box-shadow: 0 0 0 1px var(--hair-2) inset; }
.ls-appnav a[aria-current="page"] svg { color: var(--volt); opacity: 1; }
.ls-appbar-user { display: flex; align-items: center; gap: 10px; min-width: 0; margin-left: auto; }
.ls-avatar {
  display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%;
  color: var(--volt); font: 700 0.82rem/1 var(--font-display); text-transform: uppercase;
  background: radial-gradient(circle at 30% 25%, rgba(253, 224, 71, 0.2), transparent 60%), linear-gradient(135deg, #252a35, #12151c);
  box-shadow: 0 0 0 1px var(--hair-2) inset, 0 0 0 3px rgba(253, 224, 71, 0.06);
}
.ls-appbar-email { min-width: 0; max-width: 24ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-3); font-size: 0.85rem; }
.ls-appbar-out {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: none;
  height: 36px; padding: 0 13px; border-radius: 999px;
  color: var(--fg-2); font-size: 0.82rem; font-weight: 600;
  box-shadow: 0 0 0 1px var(--hair-2) inset;
  transition: color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.ls-appbar-out svg { width: 15px; height: 15px; }
.ls-appbar-out:hover { color: #fca5a5; background: rgba(248, 113, 113, 0.07); box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.4) inset; }
@media (max-width: 1023px) { .ls-appbar-email { display: none; } }
@media (max-width: 767px) {
  .ls-office { --appbar-h: 56px; }
  .ls-appbar .ls-brand span, .ls-appnav a span, .ls-appbar-out span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ls-appbar-inner { gap: 6px; }
  .ls-appnav { margin-left: 4px; }
  .ls-appnav a { width: 42px; padding: 0; justify-content: center; }
  .ls-appnav a svg { width: 19px; height: 19px; }
  .ls-appbar-out { width: 38px; padding: 0; }
  .ls-appbar-tag { display: none; }
}

/* Tab rail: the page's switchTab() toggles .active; ll-office.js slides the ink. */
.ls-tabrail-track {
  position: relative; display: flex; gap: 2px;
  overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
}
.ls-tabrail-track::-webkit-scrollbar { display: none; }
.ls-office .tab-btn {
  position: relative; flex: none; height: 48px; padding: 0 14px;
  color: var(--fg-3); font-size: 0.875rem; font-weight: 600; white-space: nowrap;
  transition: color 0.2s;
}
.ls-office .tab-btn::before {
  content: ""; position: absolute; inset: 8px 4px; z-index: -1; border-radius: 10px;
  background: rgba(255, 255, 255, 0.045); opacity: 0; transition: opacity 0.2s;
}
.ls-office .tab-btn:hover { color: var(--fg); }
.ls-office .tab-btn:hover::before { opacity: 1; }
.ls-office .tab-btn.active { color: var(--fg); }
.ls-office .tab-btn.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; border-radius: 2px;
  background: var(--volt); box-shadow: 0 0 12px var(--volt);
}
.ls-office .tab-btn:focus-visible { outline-offset: -6px; border-radius: 12px; }
.ls-tabrail-track { isolation: isolate; }
.ls-tabrail-ink {
  position: absolute; left: 0; bottom: 0; width: 1px; height: 2px; border-radius: 2px;
  background: var(--volt); box-shadow: 0 0 12px var(--volt), 0 0 3px var(--volt);
  transform-origin: 0 50%; transform: translateX(var(--x, 0px)) scaleX(var(--w, 0));
  opacity: 0; pointer-events: none;
  transition: transform 0.45s var(--ease-io), opacity 0.3s;
}
.is-ready > .ls-tabrail-ink, .is-ready .ls-tabrail-ink { opacity: 1; }
.ls-tabrail.is-ready .tab-btn.active::after, .ls-subtabs.is-ready [role="tab"]::after { opacity: 0; }
@media (max-width: 767px) { .ls-office .tab-btn { height: 44px; padding: 0 12px; font-size: 0.84rem; } }

/* Segmented tabs (company dashboard): script adds .active + bg-yellow-400. */
.ls-segtabs {
  display: flex; gap: 4px; width: max-content; max-width: 100%; padding: 5px;
  overflow-x: auto; scrollbar-width: none;
  border-radius: 16px; background: rgba(255, 255, 255, 0.03); box-shadow: 0 0 0 1px var(--hair) inset;
}
.ls-segtabs::-webkit-scrollbar { display: none; }
.ls-segtabs-group { display: flex; gap: 4px; }
.ls-office .ls-segtabs .tab-button,
.ls-office .ls-segtab-link {
  flex: none; padding: 9px 16px; border-radius: 11px;
  color: var(--fg-3); background: transparent; box-shadow: none;
  font-size: 0.9rem; font-weight: 600; white-space: nowrap;
  transition: color 0.2s, background-color 0.25s, box-shadow 0.3s var(--ease-out);
}
.ls-office .ls-segtabs .tab-button:hover,
.ls-office .ls-segtab-link:hover { color: var(--fg); background: rgba(255, 255, 255, 0.05); transform: none; }
.ls-office .ls-segtabs .tab-button.active,
.ls-office .ls-segtabs .tab-button.active:hover,
.ls-office .ls-segtab-link[aria-current="page"],
.ls-office .ls-segtab-link[aria-current="page"]:hover {
  color: var(--volt-ink); background: var(--volt); transform: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset, 0 8px 22px -12px rgba(253, 224, 71, 0.85);
}

/* Sub-tabs with an underline ink (commissions filters). */
.ls-subtabs { border-bottom: 1px solid var(--hair); }
.ls-subtabs [role="tablist"] { position: relative; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; isolation: isolate; }
.ls-subtabs [role="tablist"]::-webkit-scrollbar { display: none; }
.ls-office .ls-subtabs [role="tab"] {
  position: relative; flex: none; padding: 14px 12px; border: 0;
  font-size: 0.88rem; font-weight: 600; white-space: nowrap; transition: color 0.2s;
}
.ls-office .ls-subtabs [role="tab"].text-yellow-400 { color: var(--fg); }
.ls-office .ls-subtabs [role="tab"].text-yellow-400::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; border-radius: 2px;
  background: var(--volt); box-shadow: 0 0 12px var(--volt);
}

/* ─── Page heads ─────────────────────────────────────────────────────────── */
.ls-pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 32px; margin-bottom: clamp(20px, 2.6vw, 30px); }
.ls-pagehead-copy { display: grid; gap: 10px; max-width: 46rem; }
.ls-pagehead-title { color: var(--fg); font: 760 clamp(1.8rem, 1.3rem + 1.5vw, 2.6rem)/1.02 var(--font-display); letter-spacing: -0.035em; }
.ls-pagehead-sub { color: var(--fg-3); font-size: 0.98rem; }
.ls-steps-mini { display: flex; flex-wrap: wrap; gap: 8px; }
.ls-steps-mini li {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 7px; border-radius: 999px;
  font: 500 0.7rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-2);
  background: rgba(255, 255, 255, 0.03); box-shadow: 0 0 0 1px var(--hair-2) inset;
  animation: ls-rise 0.5s var(--ease-out) calc(0.15s + var(--i, 0) * 90ms) both;
}
.ls-steps-mini li:nth-child(2) { --i: 1; }
.ls-steps-mini li:nth-child(3) { --i: 2; }
.ls-steps-mini b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 0.64rem; color: var(--volt-ink); background: var(--volt); transition: background-color 0.3s, color 0.3s; }
.ls-steps-mini li { transition: color 0.3s, background-color 0.3s, box-shadow 0.3s; }
.ls-steps-mini[aria-label] li:not(.is-current):not(.is-done) { color: var(--fg-3); }
.ls-steps-mini[aria-label] li:not(.is-current):not(.is-done) b { color: var(--fg-2); background: #2a2f3a; }
.ls-steps-mini li.is-current { color: var(--fg); background: var(--volt-a06); box-shadow: 0 0 0 1px var(--volt-a40) inset; }
.ls-steps-mini li.is-done b { color: #03150e; background: var(--sold); }
@media (min-width: 640px) {
  .ls-steps-mini li + li::before { content: ""; width: 14px; height: 1px; margin-left: -18px; margin-right: 2px; background: var(--hair-3); }
}
@media (max-width: 639px) { .ls-steps-mini { gap: 6px; } .ls-steps-mini li { padding-right: 10px; font-size: 0.64rem; letter-spacing: 0.08em; } }

/* ─── Panels (shared .ls-panel at office density) ───────────────────────── */
.ls-office .ls-panel {
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 30px 60px -38px rgba(0, 0, 0, 0.95);
  transition: border-color 0.35s;
}
.ls-office .ls-panel:hover { border-color: var(--hair-2); }
.ls-office .ls-panel--pad { padding: clamp(18px, 2vw, 24px); }
.ls-office .ls-panel--volt { border-color: var(--volt-a24); background: linear-gradient(160deg, rgba(253, 224, 71, 0.08), rgba(253, 224, 71, 0.012) 60%), var(--panel); }
.ls-office .ls-panel--strike { border-color: rgba(251, 146, 60, 0.26); background: linear-gradient(160deg, rgba(251, 146, 60, 0.08), transparent 55%), var(--panel); }
.ls-panel-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; margin-bottom: 16px; }
.ls-panel-title { color: var(--fg); font: 700 1.12rem/1.2 var(--font-display); letter-spacing: -0.015em; }
.ls-panel-sub { margin-top: 3px; color: var(--fg-4); font-size: 0.82rem; }
.ls-panel-copy { color: var(--fg-2); }
.ls-stack { display: grid; gap: 16px; align-content: start; }
.ls-split-main { display: grid; gap: 16px; }
@media (min-width: 1024px) { .ls-split-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; } }
.ls-hint { margin-top: 12px; color: var(--fg-4); font-size: 0.8rem; }
.ls-hint strong { color: var(--fg-2); font-weight: 600; }
.ls-list { display: grid; gap: 8px; max-height: min(46vh, 460px); overflow-y: auto; padding-right: 2px; font-size: 0.875rem; }
.ls-empty { display: grid; justify-items: center; gap: 10px; padding: 26px 12px; text-align: center; color: var(--fg-4); }
.ls-empty svg { width: 34px; height: 34px; color: #3a414e; }
.ls-block { margin-bottom: clamp(16px, 2vw, 22px); }
.ls-callout { display: flex; align-items: flex-start; gap: 16px; }
.ls-callout-body { display: grid; gap: 10px; flex: 1; min-width: 0; }
.ls-callout-body .ls-hint { margin-top: 0; }
.ls-office .ls-icon--strike { flex: none; color: #fdba74; background: rgba(251, 146, 60, 0.1); box-shadow: 0 0 0 1px rgba(251, 146, 60, 0.3) inset; }
.ls-inline-form { display: flex; flex-wrap: wrap; gap: 10px; }
.ls-inline-form .ls-input { flex: 1 1 260px; max-width: 420px; }
.ls-withdraw { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; }
.ls-withdraw-cta { display: grid; justify-items: center; gap: 8px; }
.ls-withdraw-cta .ls-hint { margin-top: 0; }
.ls-table { border-collapse: collapse; }
.ls-table th {
  padding: 14px 24px; text-align: left; white-space: nowrap;
  color: var(--fg-4); font: 500 0.68rem/1.2 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase;
  background: rgba(255, 255, 255, 0.018); border-bottom: 1px solid var(--hair);
}
.ls-table th.text-right { text-align: right; }
.ls-spinner--sm { width: 28px; height: 28px; }
.ls-subtabs { margin-bottom: 16px; }
.ls-office .ls-icon--sm { width: 36px; height: 36px; border-radius: 11px; }
.ls-office .ls-icon--sm svg { width: 18px; height: 18px; }

/* Fields */
.ls-field { display: grid; gap: 6px; min-width: 0; }
.ls-field-label { color: var(--fg-3); font: 500 0.68rem/1.2 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; }
.ls-input, .ls-select {
  width: 100%; min-height: 42px; padding: 9px 13px; border-radius: 12px;
  color: var(--fg); background-color: var(--field); border: 1px solid var(--hair-2);
  font-size: 0.9rem; line-height: 1.3;
  transition: border-color 0.2s, box-shadow 0.25s, background-color 0.2s;
}
.ls-input::placeholder { color: var(--fg-4); }
.ls-input:hover, .ls-select:hover { border-color: var(--hair-3); }
.ls-input:focus, .ls-select:focus { outline: none; border-color: rgba(253, 224, 71, 0.55); box-shadow: 0 0 0 4px var(--volt-a12); }
.ls-input[readonly] { color: var(--fg-3); background-color: rgba(255, 255, 255, 0.025); cursor: not-allowed; }
.ls-select {
  -webkit-appearance: none; appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238d939e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.ls-select option { background: #12151c; color: var(--fg); }
/* Button additions on top of the shared .ls-btn */
.ls-office .ls-btn { min-height: 42px; padding: 10px 18px; font-size: 0.9rem; }
.ls-office .ls-btn--lg { min-height: 50px; padding: 13px 24px; font-size: 0.98rem; }
.ls-btn--sold {
  --btn-bg: linear-gradient(135deg, #4ee4ad, #22c38a);
  --btn-fg: #03150e;
  background: linear-gradient(135deg, #4ee4ad, #22c38a);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18) inset, 0 10px 26px -10px rgba(52, 211, 153, 0.6);
}
.ls-btn--sold:hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.24) inset, 0 16px 36px -10px rgba(52, 211, 153, 0.75); }
.ls-office .ls-btn:disabled {
  cursor: not-allowed; transform: none; opacity: 0.42; filter: saturate(0.4);
  box-shadow: 0 0 0 1px var(--hair-2) inset;
}
.ls-office .ls-btn:disabled::before { display: none; }
.ls-office .ls-btn--sm { min-height: 36px; padding: 7px 14px; font-size: 0.84rem; }
.ls-office .ls-btn svg { flex: none; }
.ls-office .ls-btn.is-busy:disabled { cursor: progress; opacity: 0.88; filter: none; }
.ls-spin { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: ls-spin 0.7s linear infinite; }
.ls-office kbd { margin-left: 2px; padding: 3px 6px; border-radius: 6px; color: var(--fg-3); font: 500 0.64rem/1 var(--font-mono); box-shadow: 0 0 0 1px var(--hair-3) inset; }
.ls-office button.ls-chip { cursor: pointer; }
.ls-office button.ls-chip:hover { border-color: var(--volt-a40); color: var(--volt); background: var(--volt-a06); transform: translateY(-2px); }

/* ─── Territory studio (create + assign) ─────────────────────────────────── */
.ls-studio-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: end; gap: 10px; }
@media (max-width: 639px) {
  .ls-studio-bar { grid-template-columns: 1fr 1fr; }
  .ls-studio-rep { grid-column: 1 / -1; }
  .ls-studio-bar .ls-btn { white-space: nowrap; }
}
.ls-strips { margin: 12px 0; }
.ls-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  min-height: 52px; padding: 10px 12px 10px 14px; border-radius: 14px;
  color: var(--fg-3); font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.025); box-shadow: 0 0 0 1px var(--hair) inset;
  animation: ls-strip-in 0.35s var(--ease-out) both;
}
.ls-strip > p, .ls-strip-text { flex: 1 1 260px; min-width: 0; }
@media (min-width: 1100px) { .ls-strip { min-height: 63px; } }
@media (pointer: coarse) { .ls-office .leaflet-draw-tooltip { display: none; } }
@media (max-width: 639px) {
  .ls-strip > p, .ls-strip-text { flex-basis: 180px; }
  .ls-draft-actions .ls-btn { flex: 1 1 auto; padding-inline: 10px; font-size: 0.85rem; }
  .ls-strip-help { display: none; }
  .ls-strip--drawing .ls-strip-actions { flex-wrap: nowrap; width: 100%; }
  .ls-strip--drawing .ls-strip-actions .ls-btn { flex: 1 1 0; padding-inline: 6px; }
  .ls-strip--drawing kbd { display: none; }
}
.ls-strip b { color: var(--fg); font-weight: 600; }
.ls-strip-warn { flex-basis: 100%; color: #fcd34d; font-size: 0.85rem; }
.ls-strip-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.ls-strip--drawing { color: var(--fg-2); background: linear-gradient(90deg, rgba(253, 224, 71, 0.11), rgba(253, 224, 71, 0.025)); box-shadow: 0 0 0 1px var(--volt-a40) inset; }
.ls-strip--saved { color: var(--fg-2); background: linear-gradient(90deg, rgba(52, 211, 153, 0.13), rgba(52, 211, 153, 0.025)); box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.36) inset; }
.ls-strip-icon { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; color: var(--sold); background: rgba(52, 211, 153, 0.16); }
.ls-strip-close { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--fg-3); transition: color 0.2s, background-color 0.2s; }
.ls-strip-close:hover { color: var(--fg); background: rgba(255, 255, 255, 0.07); }
.ls-live-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--volt); animation: ls-live-pulse 1.6s ease-out infinite; }
@keyframes ls-live-pulse { 0% { box-shadow: 0 0 0 0 rgba(253, 224, 71, 0.55); } 100% { box-shadow: 0 0 0 10px rgba(253, 224, 71, 0); } }
@keyframes ls-strip-in { from { opacity: 0; translate: 0 -6px; } }
.ls-draft {
  display: grid; gap: 10px 14px; padding: 14px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(253, 224, 71, 0.075), rgba(253, 224, 71, 0.015));
  box-shadow: 0 0 0 1px var(--volt-a24) inset;
  animation: ls-strip-in 0.35s var(--ease-out) both;
}
@media (min-width: 900px) { .ls-draft { grid-template-columns: minmax(0, 1fr) auto; align-items: end; } }
.ls-draft-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ls-draft-meta, .ls-draft .ls-alert { grid-column: 1 / -1; }
.ls-draft-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--fg-3); font-size: 0.82rem; }
.ls-draft-meta b { color: var(--fg); font-weight: 600; }
.ls-draft-tip { color: var(--fg-4); }
.ls-studio[data-state="saving"] .ls-draft { background: linear-gradient(180deg, rgba(52, 211, 153, 0.07), rgba(52, 211, 153, 0.015)); box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.3) inset; }
.ls-mapframe { transition: box-shadow 0.35s var(--ease-out); }
.ls-studio[data-state="drawing"] .ls-mapframe { box-shadow: 0 0 0 2px var(--volt-a40), 0 0 60px -14px rgba(253, 224, 71, 0.65); }
.ls-progress { position: absolute; left: 0; right: 0; top: 0; z-index: 520; height: 2px; overflow: hidden; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.ls-progress::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(90deg, transparent, var(--volt), transparent); animation: ls-indeterminate 1.1s var(--ease-io) infinite; }
.ls-studio.is-loading .ls-progress, .ls-studio[data-state="saving"] .ls-progress { opacity: 1; }
@keyframes ls-indeterminate { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.ls-studio[data-state="drawing"] .ls-map-tip { display: none; }
.ls-office .ls-map-tip { padding: 5px 9px; border: 1px solid var(--hair-2); border-radius: 8px; color: var(--fg); background: rgba(10, 12, 16, 0.92); font: 600 0.75rem/1.2 var(--font-body); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.8); }
.ls-office .ls-map-tip::before { display: none; }
.ls-count { min-width: 26px; padding: 4px 8px; border-radius: 999px; text-align: center; color: var(--fg-2); background: rgba(255, 255, 255, 0.06); font: 600 0.7rem/1.2 var(--font-mono); }
.ls-count:empty { display: none; }
.ls-notice { margin-bottom: 10px; padding: 9px 12px; border-radius: 10px; color: #fcd34d; background: rgba(253, 224, 71, 0.07); box-shadow: 0 0 0 1px var(--volt-a24) inset; font-size: 0.82rem; }
.ls-trow {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px;
  width: 100%; padding: 11px 12px; border-radius: 12px; text-align: left;
  background: rgba(255, 255, 255, 0.025); box-shadow: 0 0 0 1px var(--hair) inset;
  transition: background-color 0.2s, box-shadow 0.2s;
}
.ls-trow:hover { background: rgba(255, 255, 255, 0.05); box-shadow: 0 0 0 1px var(--hair-3) inset; }
.ls-trow.is-selected { background: linear-gradient(90deg, rgba(253, 224, 71, 0.12), rgba(253, 224, 71, 0.025)); box-shadow: 0 0 0 1px var(--volt-a40) inset; }
.ls-trow.is-new { animation: ls-row-new 1.8s var(--ease-out) 1; }
@keyframes ls-row-new { 0% { box-shadow: 0 0 0 1px var(--sold) inset, 0 0 0 5px rgba(52, 211, 153, 0.3); } }
.ls-trow-main { display: grid; gap: 2px; min-width: 0; }
.ls-trow-name { overflow: hidden; color: var(--fg); font-weight: 600; font-size: 0.9rem; text-overflow: ellipsis; white-space: nowrap; }
.ls-trow-meta { color: var(--fg-4); font-size: 0.76rem; }
.ls-trow-go { color: var(--fg-3); font: 500 0.64rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.ls-trow.is-selected .ls-trow-go { color: var(--volt); }
.ls-status { padding: 4px 8px; border-radius: 999px; font: 600 0.6rem/1.1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.ls-status--ok { color: #6ee7b7; background: rgba(52, 211, 153, 0.12); }
.ls-status--warn { color: #fcd34d; background: rgba(253, 224, 71, 0.12); }
.ls-status--bad { color: #fca5a5; background: rgba(248, 113, 113, 0.12); }
.ls-status--muted { color: var(--fg-3); background: rgba(255, 255, 255, 0.06); }
.ls-status--new { color: #03150e; background: var(--sold); }
.ls-skel { height: 56px; border-radius: 12px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 20%, rgba(255, 255, 255, 0.075) 50%, rgba(255, 255, 255, 0.03) 80%) 0 0 / 220% 100%; animation: ls-shimmer 1.4s linear infinite; }
.ls-list-error { display: grid; justify-items: start; gap: 10px; }
.ls-assign-lead { margin: -8px 0 14px; }
.ls-assign-owner { margin-top: -4px; color: var(--fg-3); font-size: 0.84rem; }
.ls-assign-owner b { color: var(--fg); font-weight: 600; }
.ls-assign-action { justify-self: start; }
.ls-assign-status { display: grid; gap: 6px; font-size: 0.85rem; animation: ls-strip-in 0.35s var(--ease-out) both; }
.ls-assign-ok { color: #6ee7b7; }
.ls-assign-bad { color: #fca5a5; }
.ls-assign-ok b, .ls-assign-bad b { color: var(--fg); font-weight: 600; }
.ls-assign-ok::before { content: "\2713  "; }
.ls-assign-bad::before { content: "\2715  "; }
#assign-card.is-flash { animation: ls-card-flash 1.3s var(--ease-out) 1; }
@keyframes ls-card-flash { 0% { box-shadow: 0 0 0 2px rgba(79, 141, 253, 0.75), 0 0 44px -8px rgba(79, 141, 253, 0.85); } }
.ls-office .leaflet-div-icon.leaflet-editing-icon { border: 2px solid var(--volt); border-radius: 4px; background: #0b0d11; box-shadow: 0 0 0 3px rgba(253, 224, 71, 0.18); }
.ls-office .leaflet-div-icon.leaflet-editing-icon:hover { background: var(--volt); }

/* ─── KPI cards ──────────────────────────────────────────────────────────── */
.ls-kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.ls-kpi {
  --kpi-accent: var(--volt);
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; align-content: start; gap: 4px;
  padding: 18px 20px 18px; border-radius: 18px;
  background: var(--panel); border: 1px solid var(--hair);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 24px 48px -34px rgba(0, 0, 0, 0.95);
  transition: border-color 0.3s, transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.ls-kpi::before {
  content: ""; position: absolute; left: 18px; right: 18px; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--kpi-accent), transparent); opacity: 0.55;
}
.ls-kpi::after {
  content: ""; position: absolute; right: -40px; top: -60px; z-index: -1; width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--kpi-accent) 12%, transparent), transparent 68%);
  opacity: 0.35; transition: opacity 0.4s;
}
.ls-kpi:hover { transform: translateY(-2px); border-color: var(--hair-2); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 28px 50px -30px rgba(0, 0, 0, 0.95); }
.ls-kpi:hover::after { opacity: 0.9; }
.ls-kpi-label { color: var(--fg-3); font: 500 0.68rem/1.25 var(--font-mono); letter-spacing: 0.13em; text-transform: uppercase; }
.ls-kpi-value {
  justify-self: start; margin-top: 8px;
  color: var(--fg); font: 760 clamp(2rem, 1.6rem + 0.9vw, 2.55rem)/1 var(--font-display); letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}
.ls-kpi-value--sm { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.ls-kpi-value--volt { color: var(--volt); }
.ls-kpi-value--sold { color: var(--sold); }
.ls-kpi-sub { color: var(--fg-4); font-size: 0.82rem; }
.ls-kpi .ls-btn { margin-top: 10px; }
@media (max-width: 520px) {
  .ls-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ls-kpi { padding: 14px 16px; border-radius: 16px; }
  .ls-kpi-value { font-size: 1.6rem; }
  .ls-kpi-value--sm { font-size: 1.05rem; }
}
.ls-kpi--sold { --kpi-accent: var(--sold); }
.ls-kpi--route { --kpi-accent: var(--route); }
.ls-kpi--appt { --kpi-accent: var(--appt); }
.ls-kpi.is-loading .ls-kpi-value {
  min-width: 3.2ch; border-radius: 8px; color: transparent;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 20%, rgba(255, 255, 255, 0.11) 50%, rgba(255, 255, 255, 0.04) 80%) 0 0 / 220% 100%;
  animation: ls-shimmer 1.4s linear infinite;
}
.ls-kpi.is-updated .ls-kpi-value { animation: ls-kpi-in 0.7s var(--ease-out) both; }
.ls-kpi.is-updated::before { animation: ls-kpi-flash 1.3s var(--ease-out) both; }
@keyframes ls-shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@keyframes ls-kpi-in { from { opacity: 0; translate: 0 10px; filter: blur(5px); } }
@keyframes ls-kpi-flash { 0% { opacity: 1; box-shadow: 0 0 18px 1px var(--kpi-accent); } 100% { opacity: 0.55; box-shadow: none; } }

/* ─── Manager command hero ───────────────────────────────────────────────── */
.ls-command {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: var(--r-xl); border: 1px solid var(--hair-2);
  background:
    radial-gradient(700px 360px at 0% 0%, rgba(253, 224, 71, 0.09), transparent 60%),
    linear-gradient(180deg, #0f1218, #090b0f);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 40px 80px -46px rgba(0, 0, 0, 0.95);
}
.ls-command-art {
  position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent 12%, rgba(0, 0, 0, 0.6) 36%, #000 52%);
  mask-image: linear-gradient(90deg, transparent 12%, rgba(0, 0, 0, 0.6) 36%, #000 52%);
}
.ls-command-body { display: grid; gap: 28px; padding: clamp(24px, 3.4vw, 40px); }
.ls-command-copy { display: grid; gap: 16px; align-content: start; max-width: 40rem; }
.ls-command-title { color: var(--fg); font: 780 clamp(2rem, 1.35rem + 2vw, 3.1rem)/1 var(--font-display); letter-spacing: -0.04em; text-wrap: balance; }
.ls-command-lead { color: var(--fg-2); font-size: 1rem; max-width: 31rem; text-wrap: pretty; }
.ls-command .ls-chip-row { margin-top: 4px; }
.ls-command .ls-chip { padding: 8px 14px; font-size: 0.84rem; background: rgba(8, 9, 12, 0.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ls-focus {
  position: relative; align-self: center; display: grid; gap: 8px; width: 100%;
  padding: 20px; border-radius: 20px;
  background: rgba(10, 12, 16, 0.78); border: 1px solid var(--hair-2);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 30px 60px -30px rgba(0, 0, 0, 0.9);
}
.ls-focus::before {
  content: ""; position: absolute; left: 20px; right: 20px; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--volt), transparent);
}
.ls-focus-label { display: inline-flex; align-items: center; gap: 8px; color: var(--fg-3); font: 500 0.68rem/1.2 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; }
.ls-focus-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--volt); box-shadow: 0 0 0 3px var(--volt-a12); animation: ls-live 2.4s ease-in-out infinite; }
.ls-focus-title { color: var(--fg); font: 740 1.45rem/1.15 var(--font-display); letter-spacing: -0.025em; text-wrap: balance; }
.ls-focus-detail { color: var(--fg-3); font-size: 0.88rem; }
.ls-focus .ls-btn { margin-top: 8px; white-space: normal; text-align: center; }
@keyframes ls-live { 50% { box-shadow: 0 0 0 6px rgba(253, 224, 71, 0); } }
@media (min-width: 900px) {
  .ls-command-body { grid-template-columns: minmax(0, 1fr) minmax(280px, 330px); align-items: center; gap: 40px; }
}
@media (max-width: 899px) {
  .ls-command-art { opacity: 0.45; -webkit-mask-image: linear-gradient(180deg, transparent 10%, #000 70%); mask-image: linear-gradient(180deg, transparent 10%, #000 70%); }
}
/* Faster sequence than the marketing canvas: territory, homes, route, flow. */
.ls-command .cv-route, .ls-portal-visual .cv-route { animation-duration: 1.7s; animation-delay: 1.35s; }
.ls-command .cv-current, .ls-portal-visual .cv-current { animation-delay: 3.1s, 3.1s; }

/* ─── Theme layer over Tailwind (page + script markup) ───────────────────── */
/* Surfaces */
.ls-office .glass {
  background: var(--panel);
  border: 1px solid var(--hair);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 30px 60px -38px rgba(0, 0, 0, 0.95);
  transition: border-color 0.35s;
}
.ls-office .glass:hover { border-color: var(--hair-2); }
.ls-office .stat-card {
  position: relative; overflow: hidden;
  background: var(--panel); border: 1px solid var(--hair); border-radius: 18px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
  transition: border-color 0.3s, transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.ls-office .stat-card::before {
  content: ""; position: absolute; left: 16px; right: 16px; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--volt), transparent); opacity: 0.4;
}
.ls-office .stat-card:hover { transform: translateY(-2px); border-color: var(--hair-2); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 26px 48px -30px rgba(0, 0, 0, 0.95); }

.ls-office div.bg-gray-800:is(.rounded-lg, .rounded-xl, .rounded-2xl) {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(0, 0, 0, 0.16));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.045) inset;
}
/* Padded gray-800 blocks are content cards on the company dashboard. */
.ls-office div.bg-gray-800.rounded-lg:is(.p-5, .p-6):not(.stat-card) {
  border-radius: 18px; background: var(--panel);
  box-shadow: 0 0 0 1px var(--hair) inset, 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 30px 60px -38px rgba(0, 0, 0, 0.95);
}

:where(.ls-office) .bg-gray-900 { background-color: #0b0d11; }
:where(.ls-office) .bg-gray-900\/50 { background-color: rgba(4, 5, 8, 0.45); }
:where(.ls-office) .bg-gray-900\/60 { background-color: rgba(4, 5, 8, 0.5); }
:where(.ls-office) .bg-gray-900\/70 { background-color: var(--field); }
:where(.ls-office) .bg-gray-900\/80 { background-color: rgba(6, 7, 10, 0.8); }
:where(.ls-office) .bg-gray-800 { background-color: var(--neutral-2); }
:where(.ls-office) .bg-gray-800\/50 { background-color: rgba(26, 30, 39, 0.5); }
:where(.ls-office) .bg-gray-800\/80 { background-color: rgba(26, 30, 39, 0.8); }
:where(.ls-office) .bg-gray-700 { background-color: var(--neutral-3); }
:where(.ls-office) .bg-gray-700\/50 { background-color: rgba(35, 40, 52, 0.5); }
:where(.ls-office) .bg-gray-600 { background-color: var(--neutral-4); }
:where(.ls-office) .hover\:bg-gray-800:hover { background-color: var(--neutral-2); }
:where(.ls-office) .hover\:bg-gray-800\/50:hover { background-color: rgba(255, 255, 255, 0.04); }
:where(.ls-office) .hover\:bg-gray-700:hover { background-color: var(--neutral-3); }
:where(.ls-office) .hover\:bg-gray-600:hover { background-color: var(--neutral-4); }

/* Grid items may shrink below their content so wide rows scroll inside
   their own wrappers instead of widening the page on phones. */
.ls-office .grid > * { min-width: 0; }
.ls-office select, .ls-office .flex-wrap > div { max-width: 100%; }

/* Lines */
:where(.ls-office) .border-gray-800 { border-color: var(--hair); }
:where(.ls-office) .border-gray-700 { border-color: var(--hair-2); }
:where(.ls-office) .border-gray-600 { border-color: var(--hair-3); }
:where(.ls-office) .divide-gray-800 > :not([hidden]) ~ :not([hidden]) { border-color: var(--hair); }
:where(.ls-office) .divide-gray-700 > :not([hidden]) ~ :not([hidden]) { border-color: var(--hair); }

/* Text */
:where(.ls-office) .text-white { color: var(--fg); }
:where(.ls-office) .text-gray-300 { color: var(--fg-2); }
:where(.ls-office) .text-gray-400 { color: var(--fg-3); }
:where(.ls-office) .text-gray-500 { color: var(--fg-4); }
:where(.ls-office) .text-gray-600 { color: #737a86; }
:where(.ls-office) :is(.bg-gray-700, .bg-gray-800) .text-gray-500 { color: var(--fg-3); }
:where(.ls-office) .text-yellow-400 { color: var(--volt); }
:where(.ls-office) .hover\:text-yellow-300:hover { color: #fef08a; }
:where(.ls-office) .hover\:text-white:hover { color: var(--fg); }
:where(.ls-office) .border-yellow-400 { border-color: var(--volt); }
:where(.ls-office) .placeholder-gray-500::placeholder { color: var(--fg-4); }

/* Type */
:where(.ls-office) :is(h1, h2, h3, h4) { font-family: var(--font-display); letter-spacing: -0.018em; text-wrap: balance; }
:where(.ls-office) h1 { letter-spacing: -0.03em; }
:where(.ls-office) .uppercase { font-family: var(--font-mono); font-weight: 500; }
:where(.ls-office) .uppercase.text-sm { font-size: 0.75rem; line-height: 1.2; }
:where(.ls-office) .tracking-\[0\.4em\], :where(.ls-office) .tracking-\[0\.25em\] { letter-spacing: 0.16em; }
:where(.ls-office) .uppercase.tracking-wider, :where(.ls-office) .uppercase.tracking-wide { letter-spacing: 0.12em; }
:where(.ls-office) :is(.text-4xl, .text-3xl).font-bold { font-family: var(--font-display); letter-spacing: -0.035em; font-weight: 760; }

/* Buttons written by page markup and scripts */
.ls-office :is(button, a):is(.bg-yellow-400, .bg-yellow-500) {
  color: var(--volt-ink);
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%) -160% 0 / 60% 100% no-repeat, var(--volt);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16) inset, 0 8px 22px -12px rgba(253, 224, 71, 0.6);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), background-position 0.75s var(--ease-out), opacity 0.2s;
}
.ls-office :is(button, a):is(.bg-yellow-400, .bg-yellow-500):hover:not(:disabled) {
  background-position: 260% 0, 0 0;
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22) inset, 0 14px 30px -12px rgba(253, 224, 71, 0.75);
}
.ls-office :is(button, a):is(.bg-yellow-400, .bg-yellow-500):active:not(:disabled) { transform: translateY(0) scale(0.985); }
.ls-office :is(button, a).bg-gray-800 { box-shadow: 0 0 0 1px var(--hair-2) inset; transition: background-color 0.2s, color 0.2s, box-shadow 0.2s; }
.ls-office :is(button, a).bg-gray-800:hover { color: var(--fg); background-color: var(--neutral-3); box-shadow: 0 0 0 1px var(--hair-3) inset; }
.ls-office :is(button, a).bg-gray-700 { box-shadow: 0 0 0 1px var(--hair-2) inset; }
.ls-office button:disabled:not(.ls-btn) { cursor: not-allowed; opacity: 0.5; }

/* Fields written by page markup */
.ls-office :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]), select, textarea):focus-visible {
  outline: none; border-color: rgba(253, 224, 71, 0.55); box-shadow: 0 0 0 4px var(--volt-a12);
}
.ls-office :is(input, select, textarea) { transition: border-color 0.2s, box-shadow 0.25s, background-color 0.2s; }
.ls-office select option { background: #12151c; color: var(--fg); }

/* Tables */
.ls-office thead tr { letter-spacing: 0.1em; }
.ls-office tbody > tr { transition: background-color 0.2s; }
.ls-office tbody > tr:hover { background-color: rgba(255, 255, 255, 0.022); }

/* Progress tracks keep their color; add a soft sheen. */
.ls-office .rounded-full.h-2, .ls-office .rounded-full.h-3 { transition: width 0.8s var(--ease-out); }

/* ─── Motion: tab entrance, soft reveals, toasts, modals ─────────────────── */
.ls-office .tab-content.active { animation: ls-tab-in 0.45s var(--ease-out) both; }
.ls-office .tab-content:not(.hidden):not(.active) { animation: ls-tab-in 0.45s var(--ease-out) both; }
@keyframes ls-tab-in { from { opacity: 0; translate: 0 10px; } }
.js .ls-office [data-reveal]:not(.is-in) { translate: 0 18px; }
.js .ls-office [data-reveal].is-in { animation: ls-reveal-soft 0.7s var(--ease-out) calc(var(--i, 0) * 70ms) both; }
@keyframes ls-reveal-soft { from { opacity: 0; translate: 0 18px; } }
.ls-rise { animation: ls-reveal-soft 0.7s var(--ease-out) calc(0.05s + var(--i, 0) * 70ms) both; }

.ls-office :is(#team-toast, #territory-toast):not(.hidden) {
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.07) inset, 0 24px 50px -16px rgba(0, 0, 0, 0.85);
  animation: ls-toast-in 0.55s var(--ease-spring) both;
}
@keyframes ls-toast-in { from { opacity: 0; translate: 0 16px; scale: 0.95; } }
.ls-office .fixed.inset-0:not(.hidden) { animation: ls-fade-in 0.25s ease both; }
.ls-office .fixed.inset-0:not(.hidden) > .glass { animation: ls-pop-in 0.45s var(--ease-out) both; }

/* ─── Maps (Leaflet + leaflet.draw) ──────────────────────────────────────── */
.ls-office .leaflet-container { isolation: isolate; background: #0b0d11; font-family: var(--font-body); }
/* OpenStreetMap tiles recolored to a dark basemap; overlays stay untouched. */
.ls-office .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.9) contrast(0.88) saturate(0.35); }
.ls-office .leaflet-bar { border: 1px solid var(--hair-2); border-radius: 12px; overflow: hidden; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.9); }
.ls-office .leaflet-bar a,
.ls-office .leaflet-bar a:hover { border-bottom: 1px solid var(--hair); background-color: rgba(12, 14, 19, 0.92); color: var(--fg-2); }
.ls-office .leaflet-control-zoom a { width: 32px; height: 32px; line-height: 32px; }
.ls-office .leaflet-bar a:hover { color: var(--volt); background-color: #1a1e27; }
.ls-office .leaflet-bar a:last-child { border-bottom: 0; }
.ls-office .leaflet-bar a.leaflet-disabled { color: #4a515e; background-color: rgba(12, 14, 19, 0.92); }
/* leaflet.draw icons are dark sprites: invert a light button so the glyph reads light on dark. */
.ls-office .leaflet-draw-toolbar a,
.ls-office .leaflet-draw-toolbar a:hover { background-color: #eceef2; filter: invert(0.94); border-bottom-color: #d7dae0; }
.ls-office .leaflet-draw-toolbar a:hover { background-color: #d9dde5; }
.ls-office .leaflet-draw-toolbar a.leaflet-disabled { background-color: #eceef2; opacity: 0.45; }
.ls-office .leaflet-draw-toolbar { margin-top: 10px; }
.ls-office .leaflet-draw-actions a {
  height: 32px; line-height: 32px; padding: 0 12px; border-left: 1px solid var(--hair);
  background: rgba(12, 14, 19, 0.94); color: var(--fg-2); font: 600 0.78rem/32px var(--font-body);
}
.ls-office .leaflet-draw-actions a:hover { background: #1a1e27; color: var(--volt); }
.ls-office .leaflet-draw-actions li:first-child a { border-left: 0; }
.ls-office .leaflet-draw-actions { left: 38px; border-radius: 10px; overflow: hidden; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.9); }
.ls-office .leaflet-draw-tooltip { background: rgba(10, 12, 16, 0.9); border: 1px solid var(--hair-2); border-radius: 8px; color: var(--fg); font: 500 0.75rem/1.35 var(--font-body); }
.ls-office .leaflet-draw-tooltip::before { border-right-color: rgba(10, 12, 16, 0.9); }
.ls-office .leaflet-draw-tooltip-subtext { color: var(--fg-3); }
.ls-office .leaflet-control-attribution { background: rgba(5, 6, 8, 0.72) !important; color: var(--fg-4); border-top-left-radius: 8px; padding: 2px 8px; font-size: 10.5px; }
.ls-office .leaflet-control-attribution a { color: var(--fg-3); }
.ls-office .leaflet-popup-content-wrapper,
.ls-office .leaflet-popup-tip { background: #12151c; color: var(--fg-2); box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.85); }
.ls-office .leaflet-popup-content-wrapper { border: 1px solid var(--hair-2); border-radius: 14px; }
.ls-office .leaflet-popup-content strong, .ls-office .leaflet-popup-content b { color: var(--fg); }
.ls-office .leaflet-container a.leaflet-popup-close-button { color: var(--fg-3); }
.ls-mapframe {
  position: relative; overflow: hidden; border-radius: 18px;
  border: 1px solid var(--hair-2); background: #0b0d11;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.018);
}
.ls-mapframe .leaflet-container { border-radius: inherit; }
/* Vignette sits above overlays (400) but under markers (600) and controls. */
.ls-mapframe .leaflet-container::after {
  content: ""; position: absolute; inset: 0; z-index: 450; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 0 70px rgba(5, 6, 8, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ─── Sign-in portal (login, reset, invite) ──────────────────────────────── */
.ls-portal { min-height: 100vh; min-height: 100dvh; }
.ls-portal-shell { display: grid; align-content: start; min-height: 100vh; min-height: 100dvh; }
.ls-portal-side { position: relative; display: flex; flex-direction: column; gap: 28px; padding: 22px var(--gutter); }
.ls-portal-visual, .ls-portal-pitch { display: none; }
.ls-portal-main { display: grid; place-items: center; padding: 8px var(--gutter) 56px; }
.ls-portal-card {
  position: relative; width: min(440px, 100%); padding: clamp(26px, 4vw, 36px);
  border-radius: var(--r-l); border: 1px solid var(--hair-2);
  background: linear-gradient(180deg, rgba(22, 25, 32, 0.92), rgba(11, 13, 18, 0.95));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 50px 100px -40px rgba(0, 0, 0, 0.95);
  animation: ls-reveal-soft 0.7s var(--ease-out) 0.05s both;
}
.ls-portal-card::before {
  content: ""; position: absolute; left: 28px; right: 28px; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--volt), transparent); opacity: 0.8;
}
.ls-portal-title { color: var(--fg); font: 760 1.9rem/1.05 var(--font-display); letter-spacing: -0.035em; }
.ls-portal-lead { margin-top: 8px; color: var(--fg-3); font-size: 0.95rem; }
.ls-portal-form { display: grid; gap: 16px; margin-top: 26px; }
.ls-portal-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ls-portal .ls-field-label { color: var(--fg-2); font: 500 0.85rem/1.2 var(--font-body); letter-spacing: 0; text-transform: none; }
.ls-portal .ls-field { gap: 8px; }
.ls-portal-row .ls-link { font-size: 0.84rem; }
.ls-portal .ls-input { min-height: 48px; padding-inline: 15px; font-size: 0.95rem; }
.ls-portal-form .ls-btn { margin-top: 4px; }
.ls-store-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ls-portal-foot { display: grid; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--hair); color: var(--fg-3); font-size: 0.9rem; text-align: center; }
.ls-portal-foot a:not(.ls-link) { color: var(--fg-4); transition: color 0.2s; }
.ls-portal-foot a:not(.ls-link):hover { color: var(--fg); }
.ls-alert { padding: 12px 14px; border-radius: 12px; font-size: 0.88rem; line-height: 1.45; animation: ls-reveal-soft 0.4s var(--ease-out) both; }
.ls-alert--error { color: #fca5a5; background: rgba(248, 113, 113, 0.08); box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.3) inset; }
.ls-alert--ok { color: #6ee7b7; background: rgba(52, 211, 153, 0.08); box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.3) inset; }
.ls-state { display: grid; justify-items: center; gap: 12px; text-align: center; }
.ls-state-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; }
.ls-state-icon svg { width: 26px; height: 26px; }
.ls-state-icon--error { color: var(--alert); background: rgba(248, 113, 113, 0.1); box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.28) inset; }
.ls-state-icon--ok { color: var(--sold); background: rgba(52, 211, 153, 0.1); box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.28) inset; }
.ls-spinner { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--hair-2); border-top-color: var(--volt); animation: ls-spin 0.9s linear infinite; }
.ls-portal-visual {
  position: relative; overflow: hidden; border-radius: var(--r-xl);
  border: 1px solid var(--hair-2); background: #07090d;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 50px 100px -40px rgba(0, 0, 0, 0.95);
}
.ls-portal-visual svg { display: block; width: 100%; height: auto; }
.ls-portal-visual::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(5, 6, 8, 0.7));
}
.ls-portal-pitch { gap: 14px; max-width: 34rem; }
.ls-portal-headline { color: var(--fg); font: 780 clamp(2rem, 1.2rem + 1.9vw, 3rem)/1 var(--font-display); letter-spacing: -0.04em; text-wrap: balance; }
.ls-portal-pitch p:last-child { color: var(--fg-3); }
@media (min-width: 1024px) {
  .ls-portal-shell { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-content: stretch; }
  .ls-portal-side {
    justify-content: space-between; padding: 32px clamp(32px, 4vw, 64px) 40px;
    border-right: 1px solid var(--hair);
    background: radial-gradient(900px 520px at 0% 0%, rgba(253, 224, 71, 0.07), transparent 60%), linear-gradient(180deg, rgba(10, 12, 16, 0.6), rgba(5, 6, 8, 0.2));
  }
  .ls-portal-visual { display: block; width: min(560px, 100%); align-self: center; }
  .ls-portal-pitch { display: grid; }
  .ls-portal-main { padding: 48px clamp(32px, 4vw, 64px); }
}

/* ─── Lead import source chips (manager Upload Leads) ────────────────────── */
.ls-import-sources {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.ls-source-chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 8px 14px; border-radius: 999px;
  color: var(--fg-2); font-size: 0.88rem; font-weight: 650;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 0 1px var(--hair-2) inset;
  transition: color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.ls-source-chip:hover:not(:disabled) { color: var(--fg); background: rgba(255, 255, 255, 0.05); }
.ls-source-chip.is-active {
  color: var(--volt-ink); background: var(--volt);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset, 0 8px 22px -12px rgba(253, 224, 71, 0.85);
}
.ls-office .ls-source-chip:disabled,
.ls-office .ls-source-chip.is-soon {
  cursor: not-allowed; opacity: 0.55; color: var(--fg-3);
}
.ls-source-chip .ls-soon {
  font: 500 0.62rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-3); background: rgba(255, 255, 255, 0.06); padding: 4px 7px; border-radius: 999px;
}
.ls-import-howto {
  display: grid; gap: 10px; padding: 16px 18px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.03); box-shadow: 0 0 0 1px var(--hair) inset;
}
.ls-import-howto ol {
  display: grid; gap: 6px; padding-left: 1.25rem; list-style: decimal; color: var(--fg-2); font-size: 0.9rem;
}
.ls-import-howto a { color: var(--volt); text-decoration: underline; text-underline-offset: 3px; }
.ls-import-counts { display: flex; flex-wrap: wrap; gap: 8px; }
.ls-import-count {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 650; background: rgba(255, 255, 255, 0.04); box-shadow: 0 0 0 1px var(--hair-2) inset;
}
.ls-import-count--create { color: #86efac; }
.ls-import-count--skip { color: #fde047; }
.ls-import-count--invalid { color: #fca5a5; }
.ls-import-table-wrap { overflow-x: auto; }
.ls-import-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.ls-import-table th, .ls-import-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--hair); vertical-align: top; }
.ls-import-table th { color: var(--fg-4); font-weight: 650; }
.ls-import-map { display: grid; gap: 8px; }
@media (min-width: 768px) { .ls-import-map { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ls-import-map-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.ls-import-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ─── Reduced motion + print ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .ls-kpi.is-loading .ls-kpi-value { animation: none !important; }
  .ls-focus-label::before { animation: none !important; }
  .ls-office .animate-spin, .ls-office .ls-spinner, .ls-office .ls-spin { animation-duration: 1.6s !important; animation-iteration-count: infinite !important; }
  .ls-progress::after { animation: none !important; width: 100%; opacity: 0.5; }
  .ls-skel { animation: none !important; }
  .ls-tabrail-ink { transition: none !important; }
  html:has(body.ls-office.auth-pending)::after { animation: none !important; opacity: 0.85; }
}
@media print {
  .ls-appchrome { position: static; }
  .js .ls-office [data-reveal], .ls-office .tab-content { opacity: 1 !important; translate: none !important; animation: none !important; }
}
