/* Light: porcelain, emerald and jewel colours. Dark: midnight with neon edges. */
:root[data-crm-theme="light"] {
  --crm-bg:#f6f8fc; --crm-paper:#ffffff; --crm-ink:#24334c; --crm-muted:#53647b;
  --crm-primary:#075e56; --crm-primary-hover:#044a43; --crm-line:#dce3ef;
  --crm-sage:#e8f3ef; --crm-mint:#ddf5ec; --crm-blue:#e5efff; --crm-gold:#fff1d5;
  --crm-lavender:#eee8ff; --crm-blush:#fce7f1; --crm-coral:#ffebe5;
  --theme-accent:#075e56; --theme-button-ink:#fff; --theme-ring:#087f8c;
  --theme-soft:#edf2f9; --theme-nav:#ffffffed;
  --crm-shadow:0 8px 28px #22385808;
}
:root[data-crm-theme="dark"] {
  --crm-bg:#090e1c; --crm-paper:#131c30; --crm-ink:#e8edf8; --crm-muted:#adbbd3;
  --crm-primary:#63f5da; --crm-primary-hover:#93ffe9; --crm-line:#2c3b56;
  --crm-sage:#172e36; --crm-mint:#113c37; --crm-blue:#172e50; --crm-gold:#3d301b;
  --crm-lavender:#2e234a; --crm-blush:#3d233c; --crm-coral:#402a2b;
  --theme-accent:#63f5da; --theme-button-ink:#081b20; --theme-ring:#65e8ff;
  --theme-soft:#1b2942; --theme-nav:#101a2eef;
  --crm-shadow:0 12px 32px #00000030;
}
.crm-appearance-toolbar { position:fixed;top:max(8px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));z-index:60;width:68px;height:44px; }
html[data-crm-theme] body .crm-theme-toggle { display:grid;place-items:center;width:68px;min-width:68px;height:44px;min-height:44px;padding:5px;border:1px solid var(--crm-line);border-radius:999px;background:var(--crm-paper);color:var(--crm-muted);box-shadow:0 3px 14px #00000010; }
.crm-theme-track { position:relative;display:flex;align-items:center;justify-content:space-between;width:54px;height:30px;padding:0 7px;border-radius:999px;background:var(--theme-soft);font-size:14px;line-height:1; }
.crm-theme-thumb { position:absolute;left:3px;top:3px;width:24px;height:24px;border-radius:50%;background:var(--theme-accent);box-shadow:0 2px 6px #0002;transition:transform .16s ease; }
.crm-theme-sun,.crm-theme-moon { position:relative;z-index:1; }
.crm-theme-sun { color:var(--theme-button-ink); }
.crm-theme-toggle[aria-checked="true"] .crm-theme-thumb { transform:translateX(24px); }
.crm-theme-toggle[aria-checked="true"] .crm-theme-sun { color:var(--crm-muted); }
.crm-theme-toggle[aria-checked="true"] .crm-theme-moon { color:var(--theme-button-ink); }
html[data-crm-theme] body .crm-theme-toggle:focus-visible { outline:3px solid var(--theme-ring);outline-offset:2px; }
/* Keep existing header actions clear of the floating control without adding a row. */
html[data-crm-theme] body .shell > main > header > .light { margin-inline-end:76px; }
html[data-crm-theme] body .landing-nav { position:absolute;top:8px;right:92px;z-index:61;display:flex;gap:8px;padding:0;background:transparent; }
html[data-crm-theme] body .landing-nav button { min-height:44px;padding:10px 14px; }
html[data-crm-theme] body .dashboard-view .hero .eyebrow { padding-inline-end:64px; }
html[data-crm-theme] body { background:var(--crm-bg);color:var(--crm-ink); }
html[data-crm-theme] body :is(header,.dashboard-business-header) { background-color:var(--crm-bg); }
html[data-crm-theme] body :is(.card,.auth-panel,.benefit,dialog,.crm-slide-preview,.action-tile) { background-color:var(--crm-paper);border-color:var(--crm-line);color:var(--crm-ink); }
html[data-crm-theme] body .shell > aside { background-color:var(--theme-nav);border-color:var(--crm-line); }
html[data-crm-theme] body :is(input,textarea,select) { background-color:var(--crm-paper);color:var(--crm-ink);border-color:var(--crm-line); }
html[data-crm-theme] body :is(input,textarea)::placeholder { color:var(--crm-muted);opacity:.85; }
html[data-crm-theme] body :is(.light,.white,.button.white) { background-color:var(--theme-soft);color:var(--crm-ink);border-color:var(--crm-line); }
html[data-crm-theme] body :is(td,th,.row,.dashboard-row,.package-gate details) { border-color:var(--crm-line); }
html[data-crm-theme] body :is(.plan-card,.plan-card:hover) { background-color:var(--crm-sage)!important;color:var(--crm-ink)!important;border-color:var(--crm-line); }
html[data-crm-theme] body .plan-card:hover { border-color:var(--theme-accent); }
html[data-crm-theme] body .dashboard-stats .stat { border-color:var(--crm-line); }
html[data-crm-theme] body :is(.crm-cloud-art,.business-story h2,.business-story p,.hero-intro,.landing,.scroll-hero) { background-color:var(--crm-bg); }
html[data-crm-theme="dark"] body { background-image:radial-gradient(ellipse at 0% 0%,#19344645,transparent 48%),radial-gradient(ellipse at 100% 20%,#45245b22,transparent 48%);background-attachment:fixed; }
html[data-crm-theme="dark"] body :is(h1,h2,h3,.brand,.stat b) { color:var(--crm-ink); }
html[data-crm-theme="dark"] body :is(.muted,small,header small,.hero p,.stat span,.dashboard-row p,.crm-slide-preview p) { color:var(--crm-muted); }
html[data-crm-theme="dark"] body :is(button,.button) { color:var(--theme-button-ink); }
html[data-crm-theme="dark"] body :is(.link,.row-open,.action-tile,.crm-slide-controls button) { color:var(--theme-accent); }
html[data-crm-theme="dark"] body :is(.light,.white,.button.white) { color:var(--crm-ink); }
html[data-crm-theme="dark"] body :is(.hero .hero-cta,.plan-badge,#toast) { background-color:var(--crm-primary);color:var(--theme-button-ink); }
html[data-crm-theme="dark"] body .dashboard-view .hero { background:linear-gradient(120deg,#142c39,#201c3c);border:1px solid #3d6870;box-shadow:0 0 28px #39e8cf0c; }
html[data-crm-theme="dark"] body .dashboard-view .hero::before { opacity:.05; }
html[data-crm-theme="dark"] body :is(.badge,.count-badge,.crm-slide-icon) { color:#c5f6f1;background-color:var(--crm-sage); }
html[data-crm-theme="dark"] body :is(.avatar,.dashboard-row .avatar) { color:#79f9d9;background-color:var(--crm-mint); }
html[data-crm-theme="dark"] body .reminder-icon { color:#8ccaff;background-color:var(--crm-blue); }
html[data-crm-theme="dark"] body .action-tile { box-shadow:inset 0 1px #ffffff05; }
html[data-crm-theme="dark"] body .action-tile:nth-child(1) { border-color:#28685d; }
html[data-crm-theme="dark"] body .action-tile:nth-child(2) { border-color:#365f9c; }
html[data-crm-theme="dark"] body .action-tile:nth-child(3) { border-color:#87682e; }
html[data-crm-theme="dark"] body .action-tile:nth-child(4) { border-color:#6e4c9e; }
html[data-crm-theme="dark"] body .action-tile:nth-child(1) .action-icon { color:#70fbd4; }
html[data-crm-theme="dark"] body .action-tile:nth-child(2) .action-icon { color:#89caff; }
html[data-crm-theme="dark"] body .action-tile:nth-child(3) .action-icon { color:#ffd484; }
html[data-crm-theme="dark"] body .action-tile:nth-child(4) .action-icon { color:#d6adff; }
html[data-crm-theme="dark"] body .dashboard-stats .stat:nth-child(1) { border-color:#28685d;box-shadow:0 5px 25px #37ffb509; }
html[data-crm-theme="dark"] body .dashboard-stats .stat:nth-child(2) { border-color:#365f9c;box-shadow:0 5px 25px #54a3ff09; }
html[data-crm-theme="dark"] body .dashboard-stats .stat:nth-child(3) { border-color:#87682e;box-shadow:0 5px 25px #ffc95709; }
html[data-crm-theme="dark"] body .dashboard-stats .stat:nth-child(4) { border-color:#6e4c9e;box-shadow:0 5px 25px #c084ff0c; }
html[data-crm-theme="dark"] body .shell > aside nav button { --crm-tab-ink:#cce3ff;color:var(--crm-muted); }
html[data-crm-theme="dark"] body .shell > aside nav button.selected,
html[data-crm-theme="dark"] body .shell > aside nav button.selected svg { color:var(--theme-button-ink); }
html[data-crm-theme="dark"] body .shell > aside nav button.selected { background:var(--crm-primary);box-shadow:0 0 20px #63f5da24; }
html[data-crm-theme="dark"] body .shell > aside nav button.selected:is(:hover,:focus-visible,:active) { background:var(--crm-primary-hover)!important;color:var(--theme-button-ink)!important; }
html[data-crm-theme="dark"] body .notice { background:var(--crm-coral);color:#ffcbbd;border-color:#7e4c48; }
html[data-crm-theme="dark"] body .followup-queues > .card:nth-child(1) :is(.badge,.count-badge) { color:#ffcbbd; }
html[data-crm-theme="dark"] body .followup-queues > .card:nth-child(2) :is(.badge,.count-badge),
html[data-crm-theme="dark"] body .followup-queues > .card:nth-child(3) :is(.badge,.count-badge) { color:#a9d6ff; }
html[data-crm-theme="dark"] body .stat:not(.dashboard-stats .stat) { background-color:var(--crm-paper); }
html[data-crm-theme="dark"] body :is(.calendar .today,.calendar .today b) { color:#ffe3a5;background-color:var(--crm-gold); }
html[data-crm-theme="dark"] body .growth-chart text { fill:var(--crm-muted); }
html[data-crm-theme="dark"] body :is(.welcome, .auth-overlay) { background-color:#090e1ce8; }
html[data-crm-theme="dark"] body .welcome :is(h1,p) { color:var(--crm-ink); }
html[data-crm-theme="dark"] body :is(button,input,textarea,select,summary,a):focus-visible { outline:3px solid var(--theme-ring);outline-offset:3px; }
@media(prefers-reduced-motion:reduce) { .crm-appearance-toolbar *,html[data-crm-theme] body .plan-card { transition:none!important; } }

/* Photographic branch cutouts, with natural bark and foliage detail. */
html[data-crm-theme] body { isolation:isolate; }
.crm-forest { position:fixed;inset:0;z-index:-1;overflow:hidden;pointer-events:none;contain:strict; }
.crm-tree { position:absolute;bottom:-120px;height:calc(100vh + 220px);height:calc(100svh + 220px);width:auto;max-width:none;object-fit:contain;opacity:.18;filter:none;transition:opacity .4s ease,filter .4s ease; }
.crm-tree-left { left:-180px;transform:rotate(-5deg);transform-origin:bottom left; }
.crm-tree-right { right:-170px;transform:scaleX(-1) rotate(-6deg);transform-origin:bottom center;opacity:.14; }
html[data-crm-theme="dark"] .crm-tree { opacity:.30;filter:grayscale(1) sepia(1) saturate(3) hue-rotate(110deg) brightness(1.5) drop-shadow(0 0 3px #51f5d47d) drop-shadow(0 0 13px #38dbbc40); }
html[data-crm-theme="dark"] .crm-tree-right { opacity:.25;filter:grayscale(1) sepia(1) saturate(3) hue-rotate(210deg) brightness(1.65) drop-shadow(0 0 3px #c195ff7d) drop-shadow(0 0 14px #a26deb40); }
html[data-crm-theme] body:has(.crm-forest) :is(.shell > main,.landing,.scroll-hero,.dashboard-business-header) { background-color:transparent; }
@media(max-width:650px) {
 .crm-tree { height:112svh;bottom:-75px;opacity:.13; }
 .crm-tree-left { left:-240px; }
 .crm-tree-right { right:-235px; }
 html[data-crm-theme="dark"] .crm-tree { opacity:.22; }
 html[data-crm-theme="dark"] .crm-tree-right { opacity:.18; }
}
@media(prefers-reduced-motion:reduce) { .crm-tree { transition:none; } }

/* Money plant vines hang naturally from the upper corners. */
.crm-tree { top:-28px;bottom:auto;height:110vh;height:110svh; }
.crm-tree-left { left:-130px;transform:rotate(3deg);transform-origin:top left; }
.crm-tree-right { right:-130px;transform:scaleX(-1) rotate(3deg);transform-origin:top center; }
@media(max-width:650px) { .crm-tree { top:-12px;bottom:auto;height:108svh; }.crm-tree-left { left:-240px; }.crm-tree-right { right:-240px; } }

/* Quiet botanical texture and consistent dark dashboard surfaces. */
html[data-crm-theme] body .crm-tree { opacity:.10;filter:none; }
html[data-crm-theme] body .crm-tree-right { opacity:.08;filter:none; }
html[data-crm-theme="dark"] body { --crm-paper:#131e32;--crm-line:#29364c;--crm-ink:#f1f5fc;--crm-muted:#afbdd2;background-image:none; }
html[data-crm-theme="dark"] body .dashboard-view :is(.card,.stat,.action-tile,.hero) { background:#131e32;border:1px solid #29364c;box-shadow:0 5px 18px #00000016; }
html[data-crm-theme="dark"] body .dashboard-view .hero::before { opacity:.025; }
html[data-crm-theme="dark"] body .dashboard-view .hero :is(.crm-slide-preview,.crm-slide-copy) { background:transparent; }
html[data-crm-theme="dark"] body .dashboard-stats .stat:nth-child(1) b { color:#70e3bf; }
html[data-crm-theme="dark"] body .dashboard-stats .stat:nth-child(2) b { color:#91c7fb; }
html[data-crm-theme="dark"] body .dashboard-stats .stat:nth-child(3) b { color:#edcc85; }
html[data-crm-theme="dark"] body .dashboard-stats .stat:nth-child(4) b { color:#c5a9eb; }
html[data-crm-theme="dark"] body .dashboard-actions .action-tile { height:100%;box-shadow:none; }
html[data-crm-theme="dark"] body .dashboard-actions .action-tile:hover { background:#1a2940;color:var(--crm-primary);border-color:#436379; }
html[data-crm-theme="dark"] body .shell > aside { background:#0e1829f5;box-shadow:none;border-color:#253149; }
html[data-crm-theme="dark"] body .shell > aside nav button.selected,
html[data-crm-theme="dark"] body .shell > aside nav button.selected:is(:hover,:focus-visible,:active) { background:#203b43!important;color:#83ead6!important;box-shadow:inset 0 -2px #63d7c0; }
html[data-crm-theme="dark"] body .shell > aside nav button.selected svg { color:#83ead6; }
.reminder-copy { white-space:pre-wrap;overflow-wrap:anywhere;padding:12px;border:1px solid var(--crm-line);border-radius:10px; }

/* Neon botanical dark theme: visible on the welcome screen and throughout CRM. */
html[data-crm-theme="dark"] body { background:#070d19;background-image:radial-gradient(ellipse at 0 20%,#075b4d35,transparent 42%),radial-gradient(ellipse at 100% 65%,#34206235,transparent 45%);background-attachment:fixed; }
html[data-crm-theme="dark"] .crm-forest { z-index:0; }
html[data-crm-theme="dark"] #root { position:relative;z-index:1; }
html[data-crm-theme="dark"] body .welcome { position:relative;isolation:isolate;background:radial-gradient(ellipse at center,#0c1529a6 0%,#090f1b40 55%,transparent 80%);min-height:100svh; }
html[data-crm-theme="dark"] body .welcome::before { content:'';position:absolute;z-index:-1;left:50%;top:48%;width:min(78vw,560px);height:420px;transform:translate(-50%,-50%);background:radial-gradient(ellipse,#34eeb715,transparent 65%);pointer-events:none; }
html[data-crm-theme="dark"] body .welcome img { border:2px solid #8af5d5;box-shadow:0 0 0 7px #3df0c20b,0 0 26px #36efbf33,0 0 85px #5372ff24,0 22px 60px #0007;border-radius:28px; }
html[data-crm-theme="dark"] body :is(h1,h2,.brand) { color:#d5fff3;text-shadow:0 0 12px #49f5c750,0 0 30px #36dba32b; }
html[data-crm-theme="dark"] body .welcome h1 { color:#bcffe9;font-size:clamp(26px,3.2vw,38px);letter-spacing:-.04em;text-shadow:0 0 10px #3ef0bb70,0 0 35px #1be8b14a; }
html[data-crm-theme="dark"] body .welcome p { color:#c8dedf;text-shadow:0 0 16px #7bd9ff33;line-height:1.6; }
html[data-crm-theme="dark"] body .dashboard-view .hero { border-color:#376c68;background:linear-gradient(120deg,#102b30ed,#181e38f5);box-shadow:inset 0 1px #c0ffe91a,0 0 24px #27e6b710; }
html[data-crm-theme="dark"] body .dashboard-view .card { box-shadow:inset 0 1px #8ce9e30a,0 8px 24px #0002; }
html[data-crm-theme="dark"] body :is(.stat b,.action-icon) { text-shadow:0 0 15px currentColor; }
html[data-crm-theme="dark"] body :is(button,.button):not(.light):not(.link):hover { box-shadow:0 0 22px #4aebc43b; }
html[data-crm-theme="dark"] body .crm-theme-toggle { border-color:#4a9c91;box-shadow:0 0 16px #43efc923; }
@media(max-width:650px) {
 html[data-crm-theme="dark"] body .welcome { padding:72px 30px; }
 html[data-crm-theme="dark"] body .welcome img { width:min(72vw,300px);height:auto;aspect-ratio:1; }
 html[data-crm-theme="dark"] body .welcome p { font-size:16px;max-width:310px; }
}

/* Real money-plant photograph, retaining the shape, variegation and veins. */
html[data-crm-theme="dark"] body .crm-tree {
 display:block;top:-18px;bottom:auto;width:clamp(260px,32vw,470px);
 height:110vh;height:110svh;max-width:none;object-fit:cover;object-position:top left;
 opacity:.72;mix-blend-mode:screen;
 filter:saturate(1.35) brightness(1.18) drop-shadow(0 0 5px #43f7b07a) drop-shadow(0 0 18px #19e6a442);
 mask-image:linear-gradient(to right,#000 0%,#000 46%,transparent 100%);
 -webkit-mask-image:linear-gradient(to right,#000 0%,#000 46%,transparent 100%);
}
html[data-crm-theme="dark"] body .crm-tree-left { left:-40px;transform:rotate(2deg);transform-origin:top left; }
html[data-crm-theme="dark"] body .crm-tree-right { right:-40px;transform:scaleX(-1) rotate(2deg);transform-origin:top center;opacity:.60;filter:saturate(1.2) brightness(1.08) drop-shadow(0 0 6px #4fffc970) drop-shadow(0 0 20px #18ddb33b); }
@media(max-width:650px) {
 html[data-crm-theme="dark"] body .crm-tree { width:200px;height:106svh;opacity:.60; }
 html[data-crm-theme="dark"] body .crm-tree-left { left:-76px; }
 html[data-crm-theme="dark"] body .crm-tree-right { right:-76px;opacity:.48; }
}

/* Simple dark mode: plain canvas, vibrant type and neon logo frames. */
html[data-crm-theme="dark"] body { background:#090e1a;background-image:none; }
html[data-crm-theme="dark"] body .crm-forest { display:none; }
html[data-crm-theme="dark"] body :is(.welcome,.landing,.scroll-hero,.shell > main,.dashboard-business-header) { background:#090e1a;background-image:none; }
html[data-crm-theme="dark"] body .welcome::before,
html[data-crm-theme="dark"] body .dashboard-view .hero::before { display:none; }
html[data-crm-theme="dark"] body .dashboard-view .hero { background:#131e32;box-shadow:none;border-color:#2b3c54; }
html[data-crm-theme="dark"] body :is(h1,.brand,.welcome h1) { color:#74f4d3;text-shadow:0 0 16px #40eec32b; }
html[data-crm-theme="dark"] body h2 { color:#8edaff;text-shadow:none; }
html[data-crm-theme="dark"] body h3 { color:#c6b5ff;text-shadow:none; }
html[data-crm-theme="dark"] body .welcome p { color:#d1dced;text-shadow:none; }
html[data-crm-theme="dark"] body :is(.stat b,.action-icon) { text-shadow:none; }
html[data-crm-theme="dark"] body :is(.welcome > img,.brand > img) {
 border:2px solid transparent;
 background:linear-gradient(#0c1422,#0c1422) padding-box,linear-gradient(135deg,#66ffcc,#64d8ff 48%,#c28aff 78%,#66ffcc) border-box;
 box-shadow:0 0 7px #59f4cc70,0 0 22px #4ae5c536,0 0 42px #9e75ff24;
}
html[data-crm-theme="dark"] body .welcome > img { border-radius:28px; }
html[data-crm-theme="dark"] body .brand > img { box-sizing:border-box; }

/* Desktop navigation: retain the existing buttons, routes and mobile dock. */
@media (min-width: 851px) {
 .shell { display:block; padding-bottom:0; }
 .shell > aside {
  position:sticky; top:0; bottom:auto; left:auto; right:auto;
  display:flex; align-items:center; gap:12px; width:100%; height:auto;
  min-height:60px; padding:8px 92px 8px 20px; overflow:visible;
  border-top:0; border-bottom:1px solid var(--crm-line); border-radius:0;
  box-shadow:0 2px 12px #00000008;
 }
 .shell > aside > .brand { display:flex; flex:0 0 auto; margin:0; }
 .shell > aside > .brand > img {
  width:40px !important; height:40px !important; padding:3px !important;
  border-radius:10px !important;
 }
 .shell > aside > .muted { display:none; }
 .shell > aside nav {
  display:flex; flex:1; flex-direction:row; align-items:center;
  gap:4px; margin:0; width:auto; min-width:0;
 }
 .shell > aside nav button {
  flex:1 0 auto; flex-direction:row; width:auto; min-width:max-content; min-height:40px;
  padding:8px; gap:6px; border-radius:10px; font-size:12px; line-height:1.3;
  white-space:nowrap;
 }
 .shell > aside nav button svg { width:18px; height:18px; }
 .shell > aside nav button .nav-label { min-height:0; }
 .shell > aside > .link {
  display:block; flex:0 0 auto; min-height:40px; padding:8px;
  margin:0; font-size:12px; color:var(--crm-muted);
 }
 .shell > main > header { padding:12px 28px; gap:16px; }
 .shell > main > header h1 { font-size:24px; line-height:1.2; margin:4px 0 0; }
 .shell > main > header .light { min-height:36px; padding:8px 14px; }
 html[data-crm-theme] body .shell > main > header > .light { margin-inline-end:0; }
 .shell .page { padding-top:20px; }
 .shell .dashboard-business-header { padding:4px 0 12px; gap:12px; }
 .shell .dashboard-business-header h1 { font-size:24px; margin:4px 0 0; }
}

