/* AVIEL dark mode (html[data-theme=dark], set by theme.js). Screen only; printing stays light.
   Bootstrap follows data-bs-theme; dark-auto.css (generated) darkens literal colours; this file sets AVIEL's colours. */
@media screen{
html[data-theme=dark]{--blueberry:#c3c5ff;--primary:#6a6ed6;--primary-dark:#b4b7ff;--cream:#101126;--card:#1a1c38;--field:#14152e;
  --band:#1d1f3f;--head:#26295a;--line:#33366a;--input:#4c5091;--ink:#ecebf8;--muted:#cfc7b3;--green:#86dba6;--green-soft:#15301f;
  --red:#ffa48d;--red-soft:#3b1e15;--amber:#ffc96f;
  --bs-body-bg:#101126;--bs-body-color:#ecebf8;--bs-border-color:#33366a;--bs-secondary-color:#c2c2dc;--bs-tertiary-bg:#171935}
html[data-theme=dark] body,html[data-theme=dark] body.sp{color:#ecebf8;background:#101126}
html[data-theme=dark] body.sp{
  --sp-glass:rgba(26,28,58,.74);--sp-glass-strong:rgba(30,32,64,.92);--sp-line:rgba(255,255,255,.09);
  --sp-shadow:0 26px 52px -26px rgba(0,0,0,.75),0 8px 18px -12px rgba(0,0,0,.45);
  --sp-shadow-hi:0 36px 66px -26px rgba(0,0,0,.8),0 12px 26px -12px rgba(0,0,0,.5);
  background:radial-gradient(42vmax 42vmax at 88% 2%,rgba(255,255,255,.04),transparent 70%),
    linear-gradient(135deg,#17140c 0%,#121226 55%,#0e1030 100%) fixed}
html[data-theme=dark] body.sp::before{opacity:.5}html[data-theme=dark] body.sp::after{opacity:.3}
html[data-theme=dark] .sp :is(.panel,.kpi,.table-wrap,.card,.box,.w-feat,.w-plan,.list-group,.accordion-item,.app-header,.w-top){
  box-shadow:var(--sp-shadow),inset 0 1px 0 rgba(255,255,255,.05)!important}
html[data-theme=dark] .sp .app-header .btn-light,html[data-theme=dark] .btn-light,html[data-theme=dark] .btn-outline-secondary{
  background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.14);color:#ecebf8;box-shadow:none}
html[data-theme=dark] .btn-primary:hover,html[data-theme=dark] .btn-primary:focus{background:#5d61c8;border-color:#5d61c8}
html[data-theme=dark] .sidebar .offcanvas-header,html[data-theme=dark] .sidebar.offcanvas-lg{background:#1b1d45}
html[data-theme=dark] .sp .w-cta,html[data-theme=dark] .w-cta{background:linear-gradient(130deg,#1d1f4a,#2d3080)}
html[data-theme=dark] .w-cta .btn-primary{background:#fff;color:#2b2d6e}
html[data-theme=dark] .side-badge{background:#f6ecd4;color:#2b2d6e}
html[data-theme=dark] .sp table.t th{background:rgba(255,255,255,.06);color:#c9cbff}
html[data-theme=dark] .sp table.t tbody tr:nth-child(even) td{background:rgba(255,255,255,.025)}
html[data-theme=dark] .sp table.t tbody tr:hover td{background:rgba(255,255,255,.05)}
html[data-theme=dark] .sp table.t td{border-top-color:rgba(255,255,255,.07)}
html[data-theme=dark] .sp :is(.form-control,.form-select){background-color:#14152e;border-color:#3b3f78;color:#ecebf8}
html[data-theme=dark] .sp :is(.form-control,.form-select):focus{background-color:#181a38}
html[data-theme=dark] ::placeholder{color:#8e8fb3}
html[data-theme=dark] .sp .seg{background:rgba(255,255,255,.06)}
html[data-theme=dark] .sp .meter{background:rgba(255,255,255,.07)}
html[data-theme=dark] :is(.pill-info,.s-Open,.s-Sent,.s-Pending,.s-Unmatched,.s-trial,.s-pending,.alert-info){background:rgba(106,110,214,.2)!important;color:#c9cbff!important}
html[data-theme=dark] .sp .alert-success{background:rgba(31,94,56,.35);color:#a8e7bf}
html[data-theme=dark] .sp .alert-danger{background:rgba(148,53,28,.32);color:#ffbfae}
html[data-theme=dark] .sp .alert-warning{background:rgba(122,74,6,.35);color:#ffd896}
html[data-theme=dark] .sp :is(.dropdown-menu,.modal-content,.popover,.toast){background:rgba(28,30,62,.96)}
html[data-theme=dark] .sp .bottom-bar{background:rgba(24,26,54,.92)}
html[data-theme=dark] :is(h1,h2,h3,h4,h5,h6){color:#f1f0fb}
html[data-theme=dark] .muted,html[data-theme=dark] .text-muted{color:#c2c2dc!important}

/* sign-in pages: neumorphism on a deep blueberry base */
html[data-theme=dark] body.sp-auth{--nm-base:#1a1b33;--nm-dark:rgba(0,0,0,.55);--nm-light:rgba(255,255,255,.05);
  background:radial-gradient(60vmax 50vmax at 50% -10%,#24264a,transparent 70%),var(--nm-base) fixed}
html[data-theme=dark] .sp-auth .auth .card{background:linear-gradient(145deg,rgba(38,40,76,.75),rgba(22,23,46,.7));border-color:rgba(255,255,255,.08)}
html[data-theme=dark] .sp-auth .auth :is(.form-control,.form-select){background-color:var(--nm-base);color:#f1f0fb}
html[data-theme=dark] .sp-auth .auth :is(.form-control,.form-select):focus{background-color:#1f2140}
html[data-theme=dark] .sp-auth .auth .btn-light{background:var(--nm-base);color:#d6d7ff}
html[data-theme=dark] .sp-auth .auth .btn-link{color:#b4b7ff}
}

/* the light/dark button */
.theme-toggle{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;border:1px solid rgba(43,45,110,.18);background:rgba(255,255,255,.7);
  color:#2b2d6e;border-radius:999px;padding:5px 11px;font-size:.85rem;font-weight:700;cursor:pointer;line-height:1.2}
.theme-toggle .tt-icon{font-size:1rem}
html[data-theme=dark] .theme-toggle{background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.18);color:#f1f0fb}
.auth-theme{position:fixed;top:14px;right:14px;z-index:10}
[dir=rtl] .auth-theme{right:auto;left:14px}
@media(max-width:700px){.theme-toggle .tt-text{display:none}}
@media print{.theme-toggle{display:none!important}}
@media screen{
html[data-theme=dark] .sp :is(.btn-light,.btn-outline-secondary){background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.14);color:#ecebf8;box-shadow:0 8px 16px -10px rgba(0,0,0,.6)}
html[data-theme=dark] .sp :is(.btn-light,.btn-outline-secondary):hover{background:rgba(255,255,255,.13)}
html[data-theme=dark] .sp .bottom-bar{border-color:rgba(255,255,255,.1)!important;box-shadow:0 20px 40px -10px rgba(0,0,0,.7)!important}
}

html[data-theme=dark] .sp .dropdown-menu{background:rgba(28,30,62,.985)}
