/* ==========================================================================
   arushan.bio — Cabinet redesign (stages 2–5)
   Only visual layer. Scoped to body.nl-app (logged-in dashboard).
   Loaded last, so it wins over app-1/app-2/ui-polish.
   ========================================================================== */

html body.nl-app {
  --ds-bg: #f6f4ff;
  --ds-surface: rgba(255,255,255,.78);
  --ds-surface-2: #faf9ff;
  --ds-line: rgba(104,71,238,.12);
  --ds-line-2: rgba(104,71,238,.22);
  --ds-ink: #14121f;
  --ds-ink-2: #3b3850;
  --ds-mute: #6e6a85;
  --ds-acc: #6847ee;
  --ds-acc-600: #5532e0;
  --ds-acc-soft: #efeaff;
  --ds-r-sm: 12px; --ds-r: 14px; --ds-r-lg: 20px; --ds-r-xl: 26px;
  --ds-sh-sm: 0 1px 2px rgba(20,18,31,.04), 0 2px 8px rgba(104,71,238,.05);
  --ds-sh: 0 2px 6px rgba(20,18,31,.04), 0 12px 32px -8px rgba(104,71,238,.14);
  --ds-sh-acc: 0 10px 28px -8px rgba(104,71,238,.55);
  --nl-grad: linear-gradient(135deg,#7b5cff 0%,#6847ee 45%,#5130d8 100%);
  --nl-glass: linear-gradient(180deg,rgba(255,255,255,.86),rgba(255,255,255,.66));
  --nl-ease: cubic-bezier(.22,1,.36,1);
  background: #f6f4ff !important;
  color: var(--ds-ink) !important;
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

/* ---------- animated background ---------- */
html body.nl-app::before,
html body.nl-app::after {
  content: ""; position: fixed; z-index: 0; pointer-events: none;
  width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(80px); opacity: .55; will-change: transform;
}
html body.nl-app::before {
  top: -22vmax; right: -18vmax;
  background: radial-gradient(circle, rgba(123,92,255,.45), rgba(123,92,255,0) 65%);
  animation: nlBlobA 22s ease-in-out infinite alternate;
}
html body.nl-app::after {
  bottom: -26vmax; left: -16vmax;
  background: radial-gradient(circle, rgba(56,189,248,.28), rgba(232,121,249,.18) 40%, rgba(255,255,255,0) 68%);
  animation: nlBlobB 26s ease-in-out infinite alternate;
}
@keyframes nlBlobA { to { transform: translate(-8vmax, 10vmax) scale(1.12); } }
@keyframes nlBlobB { to { transform: translate(10vmax, -8vmax) scale(1.08); } }
html body.nl-app #root { position: relative; z-index: 1; }
html body.nl-app .app, html body.nl-app .main { background: transparent !important; }

/* ---------- typography ---------- */
html body.nl-app h1, html body.nl-app h2, html body.nl-app h3,
html body.nl-app .top h1, html body.nl-app .settings-card h3,
html body.nl-app .brand-name {
  font-family: 'Outfit', 'Inter', sans-serif !important;
  letter-spacing: -.02em !important;
}
html body.nl-app .top h1, html body.nl-app .main > .top h1 {
  font-size: clamp(26px, 3.2vw, 38px) !important; font-weight: 700 !important;
  background: linear-gradient(90deg,#14121f 0%,#3b2a8c 60%,#6847ee 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent !important;
}

/* ---------- sidebar ---------- */
html body.nl-app .side {
  background: var(--nl-glass) !important;
  backdrop-filter: blur(28px) saturate(160%); -webkit-backdrop-filter: blur(28px) saturate(160%);
  border-right: 1px solid rgba(104,71,238,.10) !important;
  box-shadow: inset -1px 0 0 rgba(255,255,255,.7), 8px 0 40px -24px rgba(104,71,238,.25) !important;
}
html body.nl-app .snav button {
  border-radius: 14px !important; border: 1px solid transparent !important;
  transition: background .25s var(--nl-ease), color .25s, transform .25s var(--nl-ease), box-shadow .25s !important;
  position: relative;
}
html body.nl-app .snav button:hover { background: rgba(104,71,238,.07) !important; transform: translateX(2px); }
html body.nl-app .snav button.active {
  background: #fff !important; color: var(--ds-acc) !important;
  border-color: rgba(104,71,238,.16) !important;
  box-shadow: 0 6px 20px -8px rgba(104,71,238,.35), inset 0 1px 0 #fff !important;
}
html body.nl-app .snav button.active::before {
  content: ""; position: absolute; left: -8px; top: 22%; bottom: 22%; width: 3px;
  border-radius: 3px; background: var(--nl-grad);
}
html body.nl-app .snav button.active .snav-icon { color: var(--ds-acc) !important; }
html body.nl-app .telegram-side {
  border-radius: 14px !important;
  background: linear-gradient(135deg, rgba(34,158,217,.10), rgba(104,71,238,.10)) !important;
  border: 1px solid rgba(104,71,238,.18) !important; color: #3b2a8c !important;
  transition: transform .25s var(--nl-ease), box-shadow .25s !important;
}
html body.nl-app .telegram-side:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(104,71,238,.45) !important; }
html body.nl-app .sideuser { border-top-color: rgba(104,71,238,.12) !important; }

/* ---------- buttons ---------- */
html body.nl-app .btn, html body.nl-app .spl-btn, html body.nl-app .sh-btn, html body.nl-app .wr-test, html body.nl-app .stage9-btn {
  border-radius: 12px !important;
  transition: transform .2s var(--nl-ease), box-shadow .25s, background .25s, border-color .25s, color .2s !important;
}
html body.nl-app .btn:not(.primary):not(.danger), html body.nl-app .spl-btn:not(.primary), html body.nl-app .sh-btn:not(.sh-primary), html body.nl-app .wr-test, html body.nl-app .stage9-btn {
  background: rgba(255,255,255,.9) !important; border: 1px solid rgba(104,71,238,.16) !important; color: var(--ds-ink) !important;
}
html body.nl-app .btn:not(.primary):not(.danger):hover, html body.nl-app .spl-btn:not(.primary):hover, html body.nl-app .sh-btn:not(.sh-primary):hover, html body.nl-app .wr-test:hover, html body.nl-app .stage9-btn:hover {
  border-color: rgba(104,71,238,.4) !important; color: var(--ds-acc) !important; transform: translateY(-1px);
  box-shadow: 0 8px 18px -10px rgba(104,71,238,.4) !important;
}
html body.nl-app .btn.primary, html body.nl-app .spl-btn.primary, html body.nl-app .sh-btn.sh-primary,
html body.nl-app #saveLinkBtn, html body.nl-app .btnlink.primary {
  background: var(--nl-grad) !important; background-size: 160% 160% !important;
  color: #fff !important; border: 1px solid rgba(255,255,255,.18) !important;
  box-shadow: var(--ds-sh-acc), inset 0 1px 0 rgba(255,255,255,.28) !important;
  position: relative; overflow: hidden;
}
html body.nl-app .btn.primary::after, html body.nl-app .spl-btn.primary::after, html body.nl-app .sh-btn.sh-primary::after, html body.nl-app #saveLinkBtn::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-18deg); transition: left .7s var(--nl-ease); pointer-events: none;
}
html body.nl-app .btn.primary:hover::after, html body.nl-app .spl-btn.primary:hover::after, html body.nl-app .sh-btn.sh-primary:hover::after, html body.nl-app #saveLinkBtn:hover::after { left: 120%; }
html body.nl-app .btn.primary:hover, html body.nl-app .spl-btn.primary:hover, html body.nl-app .sh-btn.sh-primary:hover, html body.nl-app #saveLinkBtn:hover {
  transform: translateY(-1px); box-shadow: 0 14px 32px -10px rgba(104,71,238,.65), inset 0 1px 0 rgba(255,255,255,.3) !important;
}
html body.nl-app .btn:active, html body.nl-app .spl-btn:active, html body.nl-app .sh-btn:active, html body.nl-app .iconbtn:active { transform: scale(.97) !important; }
html body.nl-app .btn.danger { background: rgba(255,255,255,.85) !important; border: 1px solid rgba(217,56,58,.25) !important; color: #c42f31 !important; }
html body.nl-app .btn.danger:hover { background: #fdecec !important; }

/* language switch */
html body.nl-app .lang {
  background: rgba(255,255,255,.75) !important; border: 1px solid rgba(104,71,238,.14) !important;
  border-radius: 999px !important; padding: 3px !important; backdrop-filter: blur(14px);
  box-shadow: var(--ds-sh-sm) !important;
}
html body.nl-app .lang button { border-radius: 999px !important; transition: all .25s var(--nl-ease) !important; }
html body.nl-app .lang button.active { background: var(--nl-grad) !important; color: #fff !important; box-shadow: 0 4px 12px -4px rgba(104,71,238,.6) !important; }

/* ---------- stat cards / surfaces ---------- */
html body.nl-app .cards .stat, html body.nl-app .settings-card, html body.nl-app .table, html body.nl-app .spl-card {
  background: var(--nl-glass) !important;
  border: 1px solid rgba(255,255,255,.9) !important;
  outline: 1px solid rgba(104,71,238,.08);
  border-radius: 22px !important;
  box-shadow: var(--ds-sh), inset 0 1px 0 #fff !important;
  backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
}
html body.nl-app .cards .stat {
  position: relative; overflow: hidden;
  transition: transform .35s var(--nl-ease), box-shadow .35s !important;
  animation: nlRise .7s var(--nl-ease) both;
}
html body.nl-app .cards .stat:nth-child(2) { animation-delay: .07s; }
html body.nl-app .cards .stat:nth-child(3) { animation-delay: .14s; }
html body.nl-app .cards .stat:nth-child(4) { animation-delay: .21s; }
html body.nl-app .cards .stat::before {
  content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(104,71,238,.16), transparent 70%); transition: transform .6s var(--nl-ease);
  pointer-events: none;
}
html body.nl-app .cards .stat:hover { transform: translateY(-3px); box-shadow: 0 20px 44px -16px rgba(104,71,238,.32), inset 0 1px 0 #fff !important; }
html body.nl-app .cards .stat:hover::before { transform: scale(1.35); }
html body.nl-app .cards .stat .num, html body.nl-app .stat .num {
  font-family: 'Outfit', sans-serif !important; font-weight: 700 !important; letter-spacing: -.03em !important;
  background: linear-gradient(135deg,#14121f,#6847ee); -webkit-background-clip: text; background-clip: text; color: transparent !important;
}

/* ---------- links table / cards ---------- */
html body.nl-app .table { overflow: hidden; animation: nlRise .7s .12s var(--nl-ease) both; }
html body.nl-app .table .thead, html body.nl-app .table .thead > * {
  background: linear-gradient(180deg,rgba(247,244,255,.95),rgba(242,238,255,.85)) !important;
  border-bottom: 1px solid rgba(104,71,238,.08) !important; color: var(--ds-mute) !important;
}
html body.nl-app .table .row {
  border-bottom-color: rgba(104,71,238,.07) !important; background: transparent !important;
  transition: background .25s, box-shadow .25s !important;
  animation: nlRise .6s var(--nl-ease) both;
}
html body.nl-app .table .row:nth-of-type(2) { animation-delay: .18s; }
html body.nl-app .table .row:nth-of-type(3) { animation-delay: .24s; }
html body.nl-app .table .row:nth-of-type(4) { animation-delay: .30s; }
html body.nl-app .table .row:nth-of-type(n+5) { animation-delay: .36s; }
html body.nl-app .table .row:hover { background: rgba(104,71,238,.035) !important; box-shadow: inset 3px 0 0 #6847ee !important; }
html body.nl-app .row-name { font-weight: 600 !important; color: var(--ds-ink) !important; }
html body.nl-app .slug { color: var(--ds-acc) !important; }
html body.nl-app .status.is-on {
  background: #e6f6ee !important; color: #127a52 !important; border-radius: 999px !important; border: 1px solid rgba(22,134,92,.18) !important;
}
html body.nl-app .status.is-on::before { animation: nlPulse 2s ease-in-out infinite; }
html body.nl-app .status.is-off { background: #f1f0f5 !important; color: #6e6a85 !important; border-radius: 999px !important; }
html body.nl-app .iconbtn {
  border-radius: 11px !important; background: rgba(255,255,255,.85) !important;
  border: 1px solid rgba(104,71,238,.12) !important;
  transition: transform .2s var(--nl-ease), background .2s, color .2s, border-color .2s, box-shadow .2s !important;
}
html body.nl-app .iconbtn:hover {
  background: #fff !important; color: var(--ds-acc) !important; border-color: rgba(104,71,238,.35) !important;
  transform: translateY(-2px); box-shadow: 0 8px 16px -8px rgba(104,71,238,.45) !important;
}
html body.nl-app .iconbtn.iconbtn-del:hover { color: #d9383a !important; border-color: rgba(217,56,58,.35) !important; box-shadow: 0 8px 16px -8px rgba(217,56,58,.4) !important; }
html body.nl-app .iconbtn.iconbtn-split { background: var(--ds-acc-soft) !important; color: var(--ds-acc) !important; }

/* floating analytics button */
html body.nl-app .spl-fab {
  border-radius: 999px !important; background: var(--nl-grad) !important; color: #fff !important;
  box-shadow: 0 16px 36px -10px rgba(104,71,238,.6), inset 0 1px 0 rgba(255,255,255,.3) !important;
  animation: nlFloat 4s ease-in-out infinite;
}

/* ---------- inputs ---------- */
html body.nl-app input[type="text"], html body.nl-app input[type="email"], html body.nl-app input[type="password"],
html body.nl-app input[type="url"], html body.nl-app input[type="number"], html body.nl-app input[type="search"],
html body.nl-app textarea, html body.nl-app select, html body.nl-app .input {
  background: rgba(255,255,255,.92) !important; border: 1px solid rgba(104,71,238,.16) !important;
  border-radius: 12px !important; color: var(--ds-ink) !important;
  transition: border-color .2s, box-shadow .2s, background .2s !important;
}
html body.nl-app input:focus, html body.nl-app textarea:focus, html body.nl-app select:focus {
  outline: none !important; border-color: #6847ee !important; background: #fff !important;
  box-shadow: 0 0 0 4px rgba(104,71,238,.14) !important;
}
html body.nl-app ::selection { background: rgba(104,71,238,.22); }

/* iOS-style switches */
html body.nl-app .wr-switch input[type="checkbox"], html body.nl-app input[type="checkbox"].nl-ios {
  -webkit-appearance: none; appearance: none; width: 46px !important; height: 28px !important; flex: 0 0 46px;
  border-radius: 999px !important; background: #dcd9e6 !important; position: relative; cursor: pointer;
  border: 0 !important; transition: background .3s var(--nl-ease) !important; margin: 0;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.08) !important;
}
html body.nl-app .wr-switch input[type="checkbox"]::after, html body.nl-app input[type="checkbox"].nl-ios::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.18), 0 0 0 .5px rgba(0,0,0,.04);
  transition: transform .35s var(--nl-ease), width .2s;
}
html body.nl-app .wr-switch input[type="checkbox"]:checked, html body.nl-app input[type="checkbox"].nl-ios:checked { background: #6847ee !important; }
html body.nl-app .wr-switch input[type="checkbox"]:checked::after, html body.nl-app input[type="checkbox"].nl-ios:checked::after { transform: translateX(18px); }

/* split-ui switches */
html body.nl-app .spl-toggle-track { border-radius: 999px !important; transition: background .3s var(--nl-ease) !important; }
html body.nl-app .spl-toggle-thumb { box-shadow: 0 2px 6px rgba(0,0,0,.2) !important; transition: transform .35s var(--nl-ease) !important; }

/* range sliders */
html body.nl-app input[type="range"] {
  -webkit-appearance: none; appearance: none; height: 6px; border-radius: 999px; border: 0 !important;
  background: linear-gradient(90deg, #6847ee, #a48bff) !important; box-shadow: none !important; padding: 0 !important;
}
html body.nl-app input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff;
  border: 0; box-shadow: 0 2px 8px rgba(104,71,238,.45), 0 0 0 4px rgba(104,71,238,.14); cursor: grab;
  transition: transform .2s var(--nl-ease);
}
html body.nl-app input[type="range"]::-webkit-slider-thumb:active { transform: scale(1.15); cursor: grabbing; }
html body.nl-app input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 0;
  box-shadow: 0 2px 8px rgba(104,71,238,.45), 0 0 0 4px rgba(104,71,238,.14);
}

/* ---------- settings ---------- */
html body.nl-app .settings-card { animation: nlRise .7s var(--nl-ease) both; transition: box-shadow .3s, transform .3s var(--nl-ease) !important; }
html body.nl-app .settings-grid > *:nth-child(2) { animation-delay: .06s; }
html body.nl-app .settings-grid > *:nth-child(3) { animation-delay: .12s; }
html body.nl-app .settings-grid > *:nth-child(4) { animation-delay: .18s; }
html body.nl-app .settings-grid > *:nth-child(5) { animation-delay: .24s; }
html body.nl-app .settings-card:hover { box-shadow: 0 22px 48px -20px rgba(104,71,238,.3), inset 0 1px 0 #fff !important; }
html body.nl-app .bot-steps-box { background: rgba(104,71,238,.035) !important; border: 1px dashed rgba(104,71,238,.22) !important; border-radius: 16px !important; }
html body.nl-app .bot-steps-box code, html body.nl-app .settings-card code { background: #efeaff !important; color: #5532e0 !important; border-radius: 6px !important; }
html body.nl-app .bot-status-pill { border-radius: 999px !important; }

/* ==========================================================================
   MODALS: editor / split / stats / share
   ========================================================================== */
html body.nl-app .editorbg, html body.nl-app .spl-overlay, html body.nl-app .rs-modal, html body.nl-app .sh-modal, html body.nl-app .spl-modal {
  background: rgba(24,16,60,.38) !important;
  backdrop-filter: blur(10px) saturate(130%); -webkit-backdrop-filter: blur(10px) saturate(130%);
}
html body.nl-app .editorbg.open, html body.nl-app .rs-modal.is-open, html body.nl-app .sh-modal.is-open { animation: nlFade .3s ease both; }
html body.nl-app .editor, html body.nl-app .spl-dialog, html body.nl-app .rs-sheet, html body.nl-app .sh-sheet {
  border-radius: 26px !important; border: 1px solid rgba(255,255,255,.9) !important;
  background: linear-gradient(180deg,#ffffff 0%, #fbfaff 100%) !important;
  box-shadow: 0 40px 100px -30px rgba(40,20,120,.5), 0 0 0 1px rgba(104,71,238,.08) !important;
  animation: nlPop .45s var(--nl-ease) both;
}
html body.nl-app .editorhead, html body.nl-app .spl-dialog-head, html body.nl-app .rs-mhead, html body.nl-app .sh-head {
  border-bottom: 1px solid rgba(104,71,238,.08) !important; background: rgba(255,255,255,.7) !important;
}
html body.nl-app .editorfoot, html body.nl-app .spl-dialog-foot {
  border-top: 1px solid rgba(104,71,238,.08) !important; background: rgba(250,249,255,.9) !important;
}
html body.nl-app #closeEditor, html body.nl-app button.rs-x, html body.nl-app .sh-x {
  border-radius: 12px !important; transition: transform .3s var(--nl-ease), background .2s, color .2s !important;
}
html body.nl-app #closeEditor:hover, html body.nl-app button.rs-x:hover, html body.nl-app .sh-x:hover { transform: rotate(90deg); color: var(--ds-acc) !important; background: var(--ds-acc-soft) !important; }

/* editor */
html body.nl-app .builder-outline, html body.nl-app .builder-inspector { background: rgba(255,255,255,.75) !important; }
html body.nl-app .builder-stage {
  background:
    radial-gradient(circle at 50% 35%, rgba(104,71,238,.12), transparent 55%),
    radial-gradient(rgba(104,71,238,.12) 1px, transparent 1px) 0 0/18px 18px,
    #f7f5ff !important;
}
html body.nl-app .builder-node {
  border-radius: 16px !important; border: 1px solid rgba(104,71,238,.10) !important; background: #fff !important;
  transition: transform .25s var(--nl-ease), border-color .25s, box-shadow .25s !important;
}
html body.nl-app .builder-node:hover { transform: translateX(3px); border-color: rgba(104,71,238,.3) !important; box-shadow: 0 10px 22px -14px rgba(104,71,238,.5) !important; }
html body.nl-app .builder-node.active {
  border-color: #6847ee !important; background: linear-gradient(135deg,#fff,#f4f0ff) !important;
  box-shadow: 0 0 0 3px rgba(104,71,238,.14), 0 12px 24px -14px rgba(104,71,238,.55) !important;
}
html body.nl-app .node-icon { border-radius: 12px !important; transition: transform .3s var(--nl-ease) !important; }
html body.nl-app .builder-node:hover .node-icon { transform: rotate(-6deg) scale(1.06); }
html body.nl-app .btn-builder-mode { border-radius: 10px !important; transition: all .25s var(--nl-ease) !important; }
html body.nl-app .btn-builder-mode.active { background: #fff !important; color: var(--ds-acc) !important; box-shadow: 0 4px 14px -6px rgba(104,71,238,.5) !important; }
html body.nl-app .mini-phone {
  box-shadow: 0 40px 80px -30px rgba(40,20,120,.55), 0 0 0 1px rgba(0,0,0,.05) !important;
  animation: nlFloatSoft 6s ease-in-out infinite;
}
html body.nl-app .device-preview-toolbar { border-radius: 999px !important; background: rgba(255,255,255,.85) !important; backdrop-filter: blur(14px); border: 1px solid rgba(104,71,238,.12) !important; box-shadow: var(--ds-sh-sm) !important; }
html body.nl-app .preview-tool { border-radius: 999px !important; }
html body.nl-app .preview-tool.active { background: var(--ds-acc) !important; color: #fff !important; border-color: transparent !important; }
html body.nl-app .builder-add { border: 1.5px dashed rgba(104,71,238,.35) !important; color: var(--ds-acc) !important; background: rgba(104,71,238,.03) !important; border-radius: 16px !important; transition: all .25s var(--nl-ease) !important; }
html body.nl-app .builder-add:hover { background: rgba(104,71,238,.08) !important; border-style: solid !important; }
html body.nl-app .builder-status, html body.nl-app .context-chip { border-radius: 999px !important; }
html body.nl-app .stage9-profile-card, html body.nl-app .sectionbox { border-radius: 20px !important; border-color: rgba(104,71,238,.12) !important; }
html body.nl-app .stage9-profile-visual { background: linear-gradient(135deg,#1a1240 0%,#3b1f9e 55%,#6847ee 100%) !important; }

/* split / traffic rules */
html body.nl-app .spl-card, html body.nl-app .spl-toggle-card, html body.nl-app .spl-item {
  border-radius: 18px !important; transition: transform .25s var(--nl-ease), box-shadow .25s, border-color .25s !important;
}
html body.nl-app .spl-toggle-card { background: #fff !important; border: 1px solid rgba(104,71,238,.12) !important; }
html body.nl-app .spl-toggle-card:hover, html body.nl-app .spl-item:hover { border-color: rgba(104,71,238,.3) !important; box-shadow: 0 12px 26px -16px rgba(104,71,238,.5) !important; }
html body.nl-app .spl-tabs { background: rgba(104,71,238,.06) !important; border-radius: 14px !important; padding: 4px !important; }
html body.nl-app .spl-tabs button { border-radius: 10px !important; transition: all .25s var(--nl-ease) !important; }
html body.nl-app .spl-tabs button.active, html body.nl-app .spl-tabs button.is-on, html body.nl-app .spl-tabs [aria-selected="true"] { background: #fff !important; color: var(--ds-acc) !important; box-shadow: 0 4px 12px -6px rgba(104,71,238,.5) !important; }
html body.nl-app .spl-chipcheck { border-radius: 999px !important; transition: all .2s var(--nl-ease) !important; }
html body.nl-app .spl-table { border-radius: 16px !important; overflow: hidden; }

/* stats */
html body.nl-app .rs-periods { background: rgba(104,71,238,.06) !important; border-radius: 999px !important; padding: 3px !important; }
html body.nl-app .rs-periods button { border-radius: 999px !important; transition: all .25s var(--nl-ease) !important; }
html body.nl-app .rs-periods button.is-on { background: var(--nl-grad) !important; color: #fff !important; box-shadow: 0 4px 12px -4px rgba(104,71,238,.6) !important; }
html body.nl-app .rs-kpis > * { border-radius: 18px !important; border: 1px solid rgba(104,71,238,.10) !important; background: linear-gradient(180deg,#fff,#faf8ff) !important; animation: nlRise .5s var(--nl-ease) both; }
html body.nl-app .rs-kpis > *:nth-child(2) { animation-delay: .05s; }
html body.nl-app .rs-kpis > *:nth-child(3) { animation-delay: .1s; }
html body.nl-app .rs-kpis > *:nth-child(4) { animation-delay: .15s; }
html body.nl-app .rs-csv, html body.nl-app .rs-mshare { border-radius: 12px !important; }
html body.nl-app .rs-empty { border-radius: 18px !important; border: 1.5px dashed rgba(104,71,238,.22) !important; background: rgba(104,71,238,.03) !important; }

/* share */
html body.nl-app .sh-card, html body.nl-app .sh-qrcard { border-radius: 20px !important; border: 1px solid rgba(104,71,238,.10) !important; background: linear-gradient(180deg,#fff,#faf8ff) !important; }
html body.nl-app .sh-chip { border-radius: 999px !important; border: 1px solid rgba(104,71,238,.16) !important; background: #fff !important; transition: all .2s var(--nl-ease) !important; }
html body.nl-app .sh-chip:hover { border-color: rgba(104,71,238,.4) !important; transform: translateY(-1px); }
html body.nl-app .sh-chip.is-on { background: var(--nl-grad) !important; color: #fff !important; border-color: transparent !important; box-shadow: 0 6px 14px -6px rgba(104,71,238,.6) !important; }
html body.nl-app .sh-qrwrap { border-radius: 18px !important; background: #fff !important; box-shadow: 0 0 0 1px rgba(104,71,238,.1), 0 18px 34px -18px rgba(104,71,238,.5) !important; }
html body.nl-app .sh-url { border-radius: 12px !important; }

/* toasts */
html body.nl-app .toast, html body.nl-app #toast {
  border-radius: 14px !important; background: rgba(20,18,31,.92) !important; color: #fff !important;
  backdrop-filter: blur(16px); box-shadow: 0 18px 40px -14px rgba(20,18,31,.55) !important;
}

/* scrollbars */
html body.nl-app *::-webkit-scrollbar { width: 10px; height: 10px; }
html body.nl-app *::-webkit-scrollbar-thumb { background: rgba(104,71,238,.28); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
html body.nl-app *::-webkit-scrollbar-thumb:hover { background: rgba(104,71,238,.5); background-clip: padding-box; }
html body.nl-app *::-webkit-scrollbar-track { background: transparent; }

/* keyframes */
@keyframes nlRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes nlFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nlPop { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes nlFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes nlFloatSoft { 0%,100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes nlPulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* mobile */
@media (max-width: 860px) {
  html body.nl-app::before, html body.nl-app::after { filter: blur(60px); opacity: .45; }
  html body.nl-app .cards .stat, html body.nl-app .settings-card, html body.nl-app .table { border-radius: 18px !important; }
  html body.nl-app .table .row { border-radius: 18px !important; }
  html body.nl-app .iconbtn:hover { transform: none; }
  html body.nl-app .mini-phone { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  html body.nl-app *, html body.nl-app *::before, html body.nl-app *::after { animation: none !important; transition: none !important; }
}

/* ===== Stage 3: split rules cards ===== */
html body.nl-app .spl-item {
  display: grid !important; grid-template-columns: 1fr !important; gap: 12px !important;
  padding: 14px 16px !important; border-radius: 18px !important; position: relative; overflow: hidden;
  animation: nlRise .5s var(--nl-ease) both;
}
html body.nl-app .spl-item::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--nl-grad); opacity: .9;
}
html body.nl-app .spl-item.spl-off::before { background: #c9c5d8; }
html body.nl-app .spl-item.spl-off { opacity: .72 !important; }
html body.nl-app .spl-item:nth-child(2) { animation-delay: .06s; }
html body.nl-app .spl-item:nth-child(3) { animation-delay: .12s; }
html body.nl-app .spl-item:nth-child(4) { animation-delay: .18s; }
html body.nl-app .spl-item-main { min-width: 0 !important; }
html body.nl-app .spl-item-name { display: flex !important; flex-wrap: wrap !important; align-items: center !important; gap: 6px !important; }
html body.nl-app .spl-item-title { font-family: Outfit, Inter, sans-serif; font-size: 14px !important; font-weight: 700 !important; color: var(--ds-ink) !important; word-break: normal !important; overflow-wrap: anywhere; writing-mode: horizontal-tb !important; }
html body.nl-app .spl-item-sum, html body.nl-app .spl-item-url { white-space: normal !important; overflow-wrap: anywhere; }
html body.nl-app .spl-item-url { color: var(--ds-acc) !important; font-weight: 500; }
html body.nl-app .spl-badge { border-radius: 999px !important; padding: 2px 8px !important; font-size: 11px !important; font-weight: 600 !important; background: #f1eff8 !important; color: var(--ds-mute) !important; border: 0 !important; }
html body.nl-app .spl-badge.on { background: #e6f8ee !important; color: #13834a !important; }
html body.nl-app .spl-badge.limit { background: #fff1e8 !important; color: #c2540a !important; }
html body.nl-app .spl-item-actions {
  display: flex !important; flex-wrap: nowrap !important; justify-content: flex-start !important; align-items: center !important; gap: 6px !important;
  padding-top: 10px; border-top: 1px dashed var(--ds-line);
}
html body.nl-app .spl-mini-toggle-wrap { margin-right: auto; }
html body.nl-app .spl-item-actions .spl-btn.icon {
  width: 34px !important; height: 34px !important; min-width: 34px !important; min-height: 34px !important; padding: 0 !important;
  border-radius: 11px !important; font-size: 0 !important; color: transparent !important; position: relative;
  background: #fff !important; border: 1px solid var(--ds-line-2) !important;
  transition: transform .2s var(--nl-ease), background .2s, border-color .2s, box-shadow .2s !important;
}
html body.nl-app .spl-item-actions .spl-btn.icon::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; background: var(--ds-ink-2);
  -webkit-mask: var(--ic) center/contain no-repeat; mask: var(--ic) center/contain no-repeat;
}
html body.nl-app .spl-item-actions .spl-btn.icon:hover { transform: translateY(-2px); border-color: var(--ds-acc) !important; box-shadow: 0 6px 16px rgba(104,71,238,.18); }
html body.nl-app .spl-item-actions .spl-btn.icon:hover::after { background: var(--ds-acc); }
html body.nl-app .spl-btn.icon[aria-label^="Изменить"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z'/%3E%3C/svg%3E"); }
html body.nl-app .spl-btn.icon[aria-label^="Дублировать"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E"); }
html body.nl-app .spl-btn.icon[aria-label^="Поднять"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5M5 12l7-7 7 7'/%3E%3C/svg%3E"); }
html body.nl-app .spl-btn.icon[aria-label^="Опустить"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M19 12l-7 7-7-7'/%3E%3C/svg%3E"); }
html body.nl-app .spl-btn.icon[aria-label^="Удалить"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6M10 11v6M14 11v6'/%3E%3C/svg%3E"); }
html body.nl-app .spl-btn.icon[aria-label^="Удалить"]:hover { border-color: #ef4444 !important; box-shadow: 0 6px 16px rgba(239,68,68,.18); }
html body.nl-app .spl-btn.icon[aria-label^="Удалить"]:hover::after { background: #ef4444; }
html body.nl-app .spl-preset-card { border-radius: 16px !important; transition: transform .25s var(--nl-ease), box-shadow .25s, border-color .25s !important; }
html body.nl-app .spl-preset-card:hover { transform: translateY(-2px); border-color: rgba(104,71,238,.35) !important; box-shadow: 0 10px 24px rgba(104,71,238,.12) !important; }
html body.nl-app .spl-preset-icon { width: 34px; height: 34px; display: inline-grid !important; place-items: center; border-radius: 11px; background: var(--ds-acc-soft); font-size: 18px; flex: none; }
html body.nl-app .spl-preset-add-badge { border-radius: 999px !important; background: var(--ds-acc-soft) !important; color: var(--ds-acc) !important; font-weight: 600 !important; white-space: nowrap; transition: background .2s, color .2s; }
html body.nl-app .spl-preset-card:hover .spl-preset-add-badge { background: var(--nl-grad) !important; color: #fff !important; }
html body.nl-app .spl-guide-card { border-radius: 18px !important; border: 1px solid rgba(104,71,238,.18) !important; background: linear-gradient(135deg,#f5f1ff,#eef4ff) !important; }
html body.nl-app .spl-add-rule-btn { border-radius: 14px !important; border: 1.5px dashed rgba(104,71,238,.45) !important; background: rgba(255,255,255,.7) !important; color: var(--ds-acc) !important; font-weight: 700 !important; transition: background .2s, transform .2s var(--nl-ease) !important; }
html body.nl-app .spl-add-rule-btn:hover:not(:disabled) { background: var(--ds-acc-soft) !important; transform: translateY(-1px); }
html body.nl-app .spl-btn-analytics { border-radius: 14px !important; }
html body.nl-app #pane-split select { text-overflow: ellipsis; min-width: 0; }
@media (max-width: 860px) {
  html body.nl-app .spl-item-actions .spl-btn.icon { width: 38px !important; height: 38px !important; }
  html body.nl-app .spl-item-actions .spl-btn.icon:hover, html body.nl-app .spl-preset-card:hover { transform: none; }
}

/* ===== v3: кабинет = дизайн главной (белый фон, #171717, black/5 рамки, пилюли, градиент #6847ee→#9d88ff) ===== */
html body.nl-app {
  --ds-bg: #ffffff; --ds-surface: #ffffff; --ds-line: rgba(0,0,0,.06); --ds-line-2: rgba(0,0,0,.1);
  --ds-ink: #171717; --ds-ink-2: #404040; --ds-mute: #737373; --ds-acc: #6847ee; --ds-acc-600: #4e2fcc; --ds-acc-soft: #f3f0ff;
  --nl-grad: linear-gradient(135deg,#9d88ff 0%,#6847ee 55%,#4e2fcc 100%);
  --nl-glass: linear-gradient(135deg,rgba(255,255,255,.85),rgba(255,255,255,.6));
  --nl-card-shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 32px -4px rgba(104,71,238,.10);
  background: #ffffff !important; color: #171717 !important;
}
html body.nl-app::before { opacity: .35 !important; }
html body.nl-app::after { opacity: .25 !important; }
/* заголовки как на главной */
html body.nl-app .top h1, html body.nl-app .editorhead h2, html body.nl-app .editorhead h3, html body.nl-app .settings-card h2, html body.nl-app .settings-card h3,
html body.nl-app .rs-sheet h2, html body.nl-app .rs-sheet h3, html body.nl-app .sh-sheet h2, html body.nl-app .sh-sheet h3, html body.nl-app .spl-title {
  font-family: Outfit, Inter, sans-serif !important; font-weight: 900 !important; letter-spacing: -.03em !important; color: #171717 !important;
}
html body.nl-app .top h1 { background: none !important; -webkit-text-fill-color: #171717 !important; }
html body.nl-app .top p, html body.nl-app .top .sub { color: rgba(0,0,0,.6) !important; }
/* сайдбар */
html body.nl-app aside.side { background: rgba(255,255,255,.8) !important; border-right: 1px solid rgba(0,0,0,.06) !important; box-shadow: none !important; }
html body.nl-app .snav button, html body.nl-app .snav a { border-radius: 999px !important; color: rgba(0,0,0,.7) !important; }
html body.nl-app .snav .active { background: rgba(104,71,238,.08) !important; color: #6847ee !important; box-shadow: none !important; }
html body.nl-app .snav .active::before { display: none !important; }
html body.nl-app .btnlink.telegram-side { border-radius: 999px !important; background: #fff !important; border: 1px solid rgba(0,0,0,.08) !important; color: #171717 !important; }
/* все карточки и окна — один цвет: белый */
html body.nl-app .cards .stat, html body.nl-app .settings-card, html body.nl-app .table, html body.nl-app .spl-card,
html body.nl-app .spl-toggle-card, html body.nl-app .spl-item, html body.nl-app .spl-preset-card, html body.nl-app .spl-head,
html body.nl-app .rs-kpis > *, html body.nl-app .sh-card, html body.nl-app .sh-qrcard, html body.nl-app .builder-node,
html body.nl-app .stage9-profile-card, html body.nl-app .builder-inspector > *, html body.nl-app [class*="spl-pv"], html body.nl-app .spl-preview {
  background: #ffffff !important; border: 1px solid rgba(0,0,0,.06) !important; box-shadow: var(--nl-card-shadow) !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
html body.nl-app .builder-inspector > * { box-shadow: none !important; }
html body.nl-app .cards .stat { border-radius: 24px !important; }
html body.nl-app .cards .stat::before { opacity: .5; }
html body.nl-app .cards .stat .num { background: none !important; -webkit-text-fill-color: #171717 !important; color: #171717 !important; font-family: Outfit, Inter, sans-serif; font-weight: 900; letter-spacing: -.03em; }
html body.nl-app .table .thead, html body.nl-app .table .thead > * { background: #fafafa !important; color: rgba(0,0,0,.5) !important; }
html body.nl-app .table .row { border-color: rgba(0,0,0,.05) !important; }
/* окна (модалки): белые, как на главной */
html body.nl-app .editor, html body.nl-app .spl-dialog, html body.nl-app .rs-sheet, html body.nl-app .sh-sheet {
  background: #ffffff !important; border: 1px solid rgba(0,0,0,.06) !important; box-shadow: 0 30px 80px -20px rgba(23,16,60,.35) !important;
}
html body.nl-app .editorhead, html body.nl-app .editorfoot, html body.nl-app .builder-outline, html body.nl-app .builder-inspector,
html body.nl-app .spl-dialog-head, html body.nl-app .spl-dialog-foot { background: #ffffff !important; border-color: rgba(0,0,0,.06) !important; }
html body.nl-app .builder-stage { background-color: #fafafa !important; }
html body.nl-app .editorbg, html body.nl-app .spl-overlay, html body.nl-app .rs-modal, html body.nl-app .sh-modal, html body.nl-app .spl-modal { background: rgba(23,23,23,.35) !important; }
/* кнопки: пилюли, как на главной */
html body.nl-app .btn, html body.nl-app .spl-btn:not(.icon), html body.nl-app .sh-btn, html body.nl-app #saveLinkBtn, html body.nl-app .spl-add-rule-btn,
html body.nl-app .spl-btn-analytics, html body.nl-app .rs-csv, html body.nl-app .btn-builder-mode, html body.nl-app .builder-add, html body.nl-app #logout { border-radius: 999px !important; }
html body.nl-app .btn:not(.primary):not(.danger), html body.nl-app .spl-btn:not(.primary):not(.icon), html body.nl-app .sh-btn:not(.sh-primary), html body.nl-app .spl-btn-analytics, html body.nl-app .rs-csv {
  background: #ffffff !important; color: #171717 !important; border: 1px solid rgba(0,0,0,.1) !important;
}
html body.nl-app .btn.primary, html body.nl-app #newLink, html body.nl-app .spl-btn.primary, html body.nl-app .sh-btn.sh-primary, html body.nl-app .spl-fab {
  background: linear-gradient(135deg,#6847ee,#9d88ff) !important; color: #fff !important; border: 0 !important; box-shadow: 0 4px 12px rgba(104,71,238,.3) !important;
}
html body.nl-app #saveLinkBtn { background: #171717 !important; color: #fff !important; border: 0 !important; }
/* выбранные пилюли */
html body.nl-app .lang, html body.nl-app .rs-periods, html body.nl-app .spl-tabs, html body.nl-app .device-preview-toolbar { background: rgba(0,0,0,.04) !important; border: 1px solid rgba(0,0,0,.05) !important; border-radius: 999px !important; }
html body.nl-app .lang .active, html body.nl-app .rs-periods .is-on, html body.nl-app .sh-chip.is-on { background: linear-gradient(135deg,#6847ee,#9d88ff) !important; color: #fff !important; }
html body.nl-app .sh-chip { background: rgba(0,0,0,.04) !important; border: 1px solid rgba(0,0,0,.05) !important; color: #171717 !important; }
/* подсказки и пустые блоки */
html body.nl-app .spl-guide-card { background: rgba(104,71,238,.05) !important; border: 1px solid rgba(104,71,238,.12) !important; }
html body.nl-app .rs-empty, html body.nl-app .bot-steps-box { background: #fafafa !important; border: 1px dashed rgba(0,0,0,.12) !important; }
/* поля */
html body.nl-app input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), html body.nl-app select, html body.nl-app textarea {
  background: #ffffff !important; border: 1px solid rgba(0,0,0,.1) !important; color: #171717 !important;
}
html body.nl-app input:focus, html body.nl-app select:focus, html body.nl-app textarea:focus { border-color: #6847ee !important; box-shadow: 0 0 0 4px rgba(104,71,238,.12) !important; outline: none !important; }
/* мобильная нижняя панель — liquid glass */
@media (max-width: 860px) {
  html body.nl-app [class*="bottom-nav"], html body.nl-app [class*="mnav"], html body.nl-app [class*="tabbar"] {
    background: linear-gradient(135deg,rgba(255,255,255,.85),rgba(255,255,255,.6)) !important; -webkit-backdrop-filter: blur(20px) !important; backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(0,0,0,.06) !important;
  }
}
