/* VIORA NET — sculpted cards and blue-to-violet controls. */
:root {
  color-scheme: dark;
  --depth-bg:#222730;
  --depth-card:#222730;
  --depth-high:#303641;
  --depth-low:#1a1f28;
  --depth-edge:#373e4b;
  --depth-line:#424957;
  --depth-ink:#f7f8fb;
  --depth-muted:#c2c8d3;
  --depth-focus:#ad93ff;
  --depth-surface:linear-gradient(155deg,#2b313c 0%,#222730 54%,#242a34 100%);
  --depth-pad:linear-gradient(153deg,#353c48,#242a33 54%,#212630);
  --depth-action:linear-gradient(43deg,#0762ed 3%,#2949e1 30%,#6438e0 60%,#a83bd0 89%);
  --depth-icon:linear-gradient(25deg,#3e76ff 10%,#656bff 48%,#cf6eef 95%);
  --depth-shadow:inset 0 1px 2px #ffffff16, 0 2px 5px #080b1240, 0 10px 18px #0a0e1680;
  --depth-small-shadow:inset 0 1px 1px #ffffff24,0 4px 8px #080b1260;
}
:root[data-theme="light"] {
  color-scheme: light;
  --depth-bg:#e8ecf5; --depth-card:#eef1f9; --depth-high:#f8faff; --depth-low:#d9deeb;
  --depth-edge:#fff; --depth-line:#c5cddd; --depth-ink:#202847; --depth-muted:#4c5670; --depth-focus:#4b39b8;
  --depth-surface:linear-gradient(151deg,#f6f8fe,#e9edf6 51%,#e5eaf4);
  --depth-pad:linear-gradient(151deg,#fff,#e5eaf5);
  --depth-icon:linear-gradient(25deg,#1358dc,#4939bd 55%,#9630b5);
  --depth-shadow:inset 0 1px 1px #fff,0 2px 4px #52628a20,0 10px 18px #52628a2c;
  --depth-small-shadow:inset 0 1px 1px #fff,0 4px 8px #52628a35;
}
body.wg-dashboard,
body.wg-login,
body.wg-offline {
  background:radial-gradient(ellipse at 16% 5%, color-mix(in srgb,var(--depth-bg),#7986b4 8%),transparent 52%), var(--depth-bg);
  color:var(--depth-ink);
  --wg-bg:var(--depth-bg); --wg-card:var(--depth-card); --wg-ink:var(--depth-ink);
  --wg-muted:var(--depth-muted); --wg-line:var(--depth-line); --wg-badge:var(--depth-high);
  --wg-action:#3d48dc; --wg-action-ink:#fff;
  --surface:var(--depth-card); --surface-2:var(--depth-high); --rule:var(--depth-line); --rule-2:var(--depth-line);
  --paper:var(--depth-bg); --ink:var(--depth-ink); --muted:var(--depth-muted);
  --accent:#6867f4; --accent-d:var(--depth-focus); --accent-soft:var(--depth-high);
}
:root[data-theme] :is(body.wg-dashboard,body.wg-login,body.wg-offline) {
  --wg-bg:var(--depth-bg); --wg-card:var(--depth-card); --wg-ink:var(--depth-ink);
  --wg-muted:var(--depth-muted); --wg-line:var(--depth-line); --wg-badge:var(--depth-high);
  --wg-action:#3d48dc; --wg-action-ink:#fff;
}
[data-theme="dark"] body.wg-dashboard { color-scheme:dark; }
[data-theme="light"] body.wg-dashboard { color-scheme:light; }
body :is(button,a,input,select,textarea,summary):focus-visible {
  outline:2px solid var(--depth-focus); outline-offset:3px;
}
body.wg-dashboard .topbar { background:none; }
body.wg-dashboard .wg-wordmark { width:clamp(108px,28vw,190px); }
[data-theme="dark"] body.wg-dashboard .wg-wordmark { filter:none; }
[data-theme="light"] body.wg-dashboard .wg-wordmark { filter:brightness(0) saturate(100%); }
body.wg-public .wg-public-header .wg-wordmark { width:clamp(145px,38vw,255px); }
body.wg-dashboard .topactions { gap:clamp(.55rem,2vw,.85rem); }
body.wg-dashboard .topactions :is(.langtop,.langlink),
body.wg-dashboard .topactions .js-theme {
  background:var(--depth-pad); color:var(--depth-ink); border:1px solid var(--depth-edge);
  border-radius:999px; box-shadow:var(--depth-small-shadow);
}
body.wg-dashboard .topactions .js-theme {
  display:flex; gap:.42rem; justify-content:center; align-items:center; padding:.35rem .48rem;
  width:auto; height:auto; min-height:38px; min-width:59px; aspect-ratio:auto;
}
body.wg-dashboard .topactions .js-theme .i { width:clamp(17px,4vw,25px); height:auto; aspect-ratio:1; }
body.wg-dashboard .topactions .js-theme::after {
  content:""; width:clamp(19px,4.5vw,34px); aspect-ratio:1; border-radius:50%;
  background:var(--depth-action); box-shadow:inset 0 1px 3px #fff6,0 1px 3px #10142455;
}
body.wg-dashboard .topactions :is(.langtop,.langlink) {
  min-inline-size:0; min-block-size:36px; font-size:.79rem; gap:.3rem; padding:.15rem .6rem;
}
body.wg-dashboard .topactions :is(.langtop,.langlink):hover { background:var(--depth-high); color:var(--depth-ink); }
body.wg-dashboard :is(.wg-pagehead h1,.wg-inner main>h1,.pagehead h1,.wg-list-heading h1,.wg-router-list-title h1,.wg-public h1) {
  color:var(--depth-ink); font-weight:900; letter-spacing:normal;
}
body.wg-dashboard .wg-pagehead h1 { font-size:clamp(1.64rem,7.3vw,3.4rem); line-height:1.08; }
body.wg-dashboard .wg-fleet-heading h2 { font-weight:860; font-size:clamp(1.05rem,4.3vw,1.8rem); }
body.wg-dashboard .wg-pagehead { margin-block-end:clamp(14px,4vw,25px); }
body.wg-dashboard :is(.panel,.stat,.unit,.wg-router,.wg-public-card,.table-wrap table,.subrow,.wg-stats,.depth-usage-card) {
  background:var(--depth-surface); color:var(--depth-ink); border:1px solid var(--depth-edge);
  box-shadow:var(--depth-shadow);
}
body.wg-dashboard :is(.wg-stats,.wg-router,.wg-public-card,.depth-usage-card) { border-radius:clamp(15px,4vw,25px); }
body.wg-dashboard .wg-router { gap:.62rem; padding:clamp(.7rem,2.6vw,1.15rem); grid-template-columns:auto minmax(0,1fr) auto; }
.depth-router-icon {
  display:grid; place-items:center; align-self:stretch; min-width:clamp(30px,9vw,56px);
  padding-inline-end:.48rem; border-inline-end:1px solid var(--depth-line); color:var(--depth-focus);
}
.depth-router-icon .i { width:clamp(21px,6vw,35px); height:auto; aspect-ratio:1; }
body.wg-dashboard .wg-router-info { gap:.18rem .6rem; }
body.wg-dashboard .wg-router-signal .meter i.on,
body.wg-dashboard .wg-router-signal .meter i:last-child { background:var(--depth-icon); opacity:1; }
body.wg-dashboard .wg-fleet { margin-block:clamp(16px,4.7vw,34px) 0; }
body.wg-dashboard .wg-fleet-heading { margin-bottom:clamp(9px,2.85vw,18px); }
body.wg-dashboard .wg-badges span {
  background:var(--depth-pad); color:var(--depth-ink); border:1px solid var(--depth-edge); box-shadow:var(--depth-small-shadow);
}
body.wg-dashboard .wg-badges .wg-healthy:before {
  content:"✓"; display:inline-grid; place-items:center; width:1.12em; height:1.12em;
  border-radius:50%; background:var(--depth-action); color:white; margin-inline-end:.33em;
}
.depth-usage-card {
  position:relative; isolation:isolate; overflow:hidden;
  display:grid; align-content:center; gap:.1rem;
  min-height:clamp(80px,21vw,140px); padding:clamp(.8rem,3.6vw,1.9rem);
  margin-block-end:clamp(12px,3.4vw,22px);
}
.depth-usage-card span { font-weight:780; font-size:clamp(.95rem,3.4vw,1.56rem); color:var(--depth-muted); }
.depth-usage-card b { font-weight:900; font-size:clamp(2.1rem,9.2vw,4.2rem); line-height:1; }
.depth-usage-card .depth-wave { position:absolute; z-index:-1; inset-inline-end:1%; inset-block-end:6%; width:55%; height:87%; }
[dir="rtl"] .depth-wave { transform:scaleX(-1); }
body.wg-dashboard .wg-stats {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr));
  padding:clamp(.4rem,1.8vw,.85rem) clamp(.52rem,2.6vw,1.1rem);
}
body.wg-dashboard .wg-stats .wg-status {
  display:grid; grid-template-columns:auto minmax(0,1fr); grid-template-rows:auto auto; align-content:center; align-items:center;
  gap:.12rem clamp(.4rem,2.45vw,1rem); padding:clamp(.48rem,2.5vw,1.12rem) clamp(.34rem,1.8vw,.8rem);
  border-bottom:1px solid var(--depth-line); min-width:0;
}
body.wg-dashboard .wg-stats .wg-status:nth-child(2n+1) { border-inline-end:1px solid var(--depth-line); }
body.wg-dashboard .wg-stats .wg-status:nth-last-child(-n+2) { border-bottom:0; }
.depth-metric-icon {
  grid-row:1 / span 2; display:grid!important; place-items:center; align-self:center!important;
  width:clamp(29px,9.5vw,60px); aspect-ratio:1; border-radius:32%;
  background:var(--depth-pad); color:var(--depth-focus); box-shadow:var(--depth-small-shadow);
  border:1px solid var(--depth-edge);
}
body.wg-dashboard .wg-stats .wg-status > :is(span,b) { border-bottom:0; }
body.wg-dashboard .wg-stats .wg-status .depth-metric-icon .i { width:62%; height:auto; aspect-ratio:1; }
body.wg-dashboard .wg-stats .wg-status .depth-metric-name {
  color:var(--depth-muted); font-size:clamp(.65rem,2.65vw,1.16rem); overflow-wrap:anywhere; line-height:1.25;
}
body.wg-dashboard .wg-stats .wg-status b { font-size:clamp(1.16rem,5.1vw,2.22rem); line-height:1; padding:0; font-weight:850; }
body.wg-dashboard .wg-stats .wg-status:hover { background:var(--depth-high); text-decoration:none; }
body.wg-dashboard :is(.wg-create,.wg-download,.btn:not(.ghost):not(.danger)),
.wg-login .wg-submit, body.wg-offline .btn {
  background:var(--depth-action); color:#fff; border:1px solid #ffffff35;
  box-shadow:inset 0 1px 2px #ffffff50, 0 5px 10px #111b4770;
}
body.wg-dashboard :is(.wg-create,.wg-download,.btn:not(.ghost):not(.danger)):hover,
.wg-login .wg-submit:hover, body.wg-offline .btn:hover {
  background:var(--depth-action); color:#fff; filter:brightness(1.08); text-decoration:none;
}
body.wg-dashboard :is(.wg-create,.wg-download,.btn:not(.ghost):not(.danger)):active,
.wg-login .wg-submit:active { box-shadow:inset 0 2px 4px #11163270; }
body.wg-dashboard .btn.ghost:not(.danger),
body.wg-dashboard :is(.chip,summary.btn,.wg-select-page):not(.on) {
  background:var(--depth-pad); color:var(--depth-ink); border-color:var(--depth-edge);
  box-shadow:var(--depth-small-shadow);
}
body.wg-dashboard :is(.chip.on,.btn.ghost:hover) { background:var(--depth-high); color:var(--depth-ink); }
body.wg-dashboard .bulkbar .btn.ghost { color:var(--depth-ink); }
body.wg-dashboard .bulkbar {
  border:1px solid var(--depth-edge); background:var(--depth-surface); color:var(--depth-ink);
  box-shadow:var(--depth-shadow);
}
body.wg-dashboard .bulkbar .linkbtn { color:var(--depth-focus); }
body.wg-dashboard :is(input.field,select.field,textarea.field,.inline-speed input,pre.conf) {
  background:var(--depth-low); color:var(--depth-ink); border-color:var(--depth-line);
  box-shadow:inset 0 2px 5px #151b263d;
}
body.wg-dashboard :is(input,textarea)::placeholder { color:var(--depth-muted); }
body.wg-dashboard .subs { background:transparent; border-color:var(--depth-line); }
body.wg-dashboard .subrow { border-color:var(--depth-line); box-shadow:inset 0 1px 1px #ffffff12; }
body.wg-dashboard .subrow:has(.rowchk:checked) { background:var(--depth-high); }
body.wg-dashboard .subhead { background:var(--depth-high); color:var(--depth-muted); }
body.wg-dashboard .table-wrap { padding-bottom:.32rem; }
body.wg-dashboard .rtable td { border-color:var(--depth-line); }
body.wg-dashboard .tabbar {
  background:var(--depth-surface); border-color:var(--depth-edge); box-shadow:var(--depth-shadow);
  border-radius:clamp(20px,5vw,34px);
}
body.wg-dashboard .tabbar>a.on {
  background:var(--depth-pad); border-radius:clamp(12px,3.3vw,22px);
  margin:.4rem .1rem; box-shadow:var(--depth-small-shadow);
}
body.wg-dashboard .tabbar>a.on .i { color:var(--depth-focus); }
body.wg-dashboard .tabbar>a.plus {
  width:clamp(40px,11.1vw,69px); height:clamp(40px,11.1vw,69px); color:white;
  background:var(--depth-action); border-radius:50%; box-shadow:inset 0 1px 3px #fff6,0 6px 14px #080d2390;
}
body.wg-dashboard .tabbar details.more[open] .menu,
body.wg-dashboard .unit .uact details.more[open] .menu {
  background:var(--depth-card); border-color:var(--depth-edge); box-shadow:var(--depth-shadow);
}
body.wg-public .wg-public-card { background:var(--depth-surface); }
body.wg-public .wg-public-status { background:var(--depth-pad); }
body.wg-public .ring .val { stroke:#816bf4; }
body.wg-public .ring.warn .val { stroke:var(--warn); }
body.wg-public .ring.crit .val { stroke:var(--crit); }
body.wg-public .qr { background:#fff; border:0; border-radius:0; }
body.wg-public .wg-install-links .btn { min-height:48px; border-radius:13px; }
body.wg-login .wg-hero { background:var(--depth-surface); border-radius:0 0 clamp(20px,6vw,36px) clamp(20px,6vw,36px); }
body.wg-login .wg-form {
  background:var(--depth-surface); border:1px solid var(--depth-edge); border-radius:clamp(23px,6vw,38px);
  box-shadow:var(--depth-shadow); min-height:0; margin-block:clamp(12px,4vw,23px);
}
body.wg-login .wg-form :is(h1,label) { color:var(--depth-ink); }
body.wg-login .wg-field input {
  background:var(--depth-low); color:var(--depth-ink); border-color:var(--depth-line); box-shadow:inset 0 2px 5px #11172566;
}
body.wg-login .wg-field :is(.wg-icon,.wg-reveal) { color:var(--depth-muted); }
body.wg-login .wg-field .wg-reveal[aria-pressed="true"],
body.wg-login .wg-login-heading .langlink { background:var(--depth-pad); color:var(--depth-ink); border-color:var(--depth-edge); }
body.wg-login .wg-submit { border-radius:999px; }
body.wg-offline .wg-offline-card {
  background:var(--depth-surface); color:var(--depth-ink); border-color:var(--depth-edge); box-shadow:var(--depth-shadow);
}
body.wg-offline .wg-offline-card .muted { color:var(--depth-muted); }
body.wg-offline .wg-offline-brand { background:var(--depth-pad); box-shadow:var(--depth-small-shadow); }
[data-theme="light"] body.wg-offline .wg-offline-brand img,
[data-theme="light"] body.wg-login .wg-logo { filter:brightness(0); }
@media (max-width:900px) {
  body.wg-dashboard .subrow { border-radius:17px; box-shadow:var(--depth-small-shadow); }
  body.wg-dashboard :is(.table-wrap .rtable,.tabbar .menu .rtable) { background:none; border:0; box-shadow:none; }
  body.wg-dashboard .table-wrap .rtable tr { background:var(--depth-surface); box-shadow:var(--depth-small-shadow); border-color:var(--depth-edge); }
}
@media (max-width:350px) {
  body.wg-dashboard .topactions { gap:.35rem; }
  body.wg-dashboard .topactions :is(.langtop,.langlink) { padding-inline:.35rem; }
  body.wg-dashboard .wg-fleet-heading { padding-inline:0; }
}
@media (prefers-reduced-motion:reduce) {
  body.wg-dashboard :is(a,button), body.wg-login :is(a,button) { transition:none; }
}

/* The active language is a gradient segment inside the raised control. */
:root:not([data-theme="light"]) { --depth-bg:#1f252f; }
.depth-lang-switch {
  display:inline-grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:center; border:1px solid var(--depth-edge);
  border-radius:999px; padding:3px; background:var(--depth-pad);
  box-shadow:var(--depth-small-shadow);
}
body.wg-dashboard .topactions .depth-lang-switch :is(.langtop,.langlink),
body.wg-login .wg-login-heading .depth-lang-switch .langlink,
.depth-lang-switch .depth-lang-active {
  display:grid; place-items:center;
  min-width:clamp(27px,7vw,47px); min-height:clamp(30px,5.6vw,40px);
  color:var(--depth-ink); font:800 clamp(.7rem,2.4vw,.88rem)/1 Vazirmatn,system-ui,sans-serif;
  border:0; padding:0 .27rem; border-radius:999px; background:none; box-shadow:none;
}
.depth-lang-switch :is(.langtop,.langlink)::before { display:none; }
.depth-lang-switch .depth-lang-active {
  color:#fff; background:var(--depth-action); box-shadow:inset 0 1px 3px #ffffff45,0 2px 5px #0d153d73;
}
body.wg-dashboard .topactions .depth-lang-switch :is(.langtop,.langlink):hover,
body.wg-login .wg-login-heading .depth-lang-switch .langlink:hover {
  background:var(--depth-high); text-decoration:none;
}
.depth-metric-icon .i,.depth-router-icon .i { stroke:url(#depth-icon-stroke); }
@media (max-width:350px) {
  body.wg-dashboard .topbar, body.wg-public .wg-public-header { padding-inline:.35rem; gap:.3rem; }
  body.wg-dashboard .topactions .js-theme { min-width:51px; }
  body.wg-public .wg-public-header .wg-wordmark { width:130px; }
}

/* Keep the navy canvas continuous beneath short pages and their fixed navigation. */
body.wg-dashboard { min-height:100svh; }
body.wg-dashboard .wg-badges .wg-healthy::before { content:none; }
body.wg-dashboard .tabbar > a.on .i { filter:drop-shadow(0 2px 3px #3c49de80); }

/* Login backdrop: keep the form treatment, soften the area behind the wordmark. */
body.wg-login {
  min-height:100svh;
  background:
    radial-gradient(ellipse 430px 265px at 50% 10%, #394d9638, transparent 78%),
    radial-gradient(ellipse 560px 370px at 51% 15%, #60369525, transparent 81%),
    #181d27;
}
body.wg-login .wg-hero {
  background:transparent;
  border-radius:0;
}
body.wg-login .wg-hero .wg-login-wave {
  display:block; inset:0; width:100%; height:100%;
  z-index:-1; opacity:.9; pointer-events:none;
}
body.wg-login .wg-hero .wg-logo { filter:drop-shadow(0 3px 5px #070b16ba); }
:root[data-theme="light"] body.wg-login .wg-hero .wg-login-wave { opacity:.62; }
:root[data-theme="light"] body.wg-login .wg-hero .wg-logo { filter:brightness(0); }
:root[data-theme="light"] body.wg-login {
  background:
    radial-gradient(ellipse 430px 265px at 50% 10%, #8faff850, transparent 78%),
    radial-gradient(ellipse 560px 370px at 51% 15%, #b08de52c, transparent 81%),
    #e8ecf5;
}

/* Span the entire hero and separate the logo from the luminous strokes. */
body.wg-login .wg-hero::after {
  content:""; position:absolute; inset-inline:13%; inset-block-start:51%; height:20%;
  z-index:-1; pointer-events:none;
  background:radial-gradient(ellipse at center, #070b16a6 0%, #10172865 38%, transparent 72%);
  filter:blur(8px);
}
body.wg-login .wg-hero .wg-logo {
  filter:drop-shadow(0 6px 6px #060913c9) drop-shadow(0 13px 16px #0509158c);
}
:root[data-theme="light"] body.wg-login .wg-hero::after { opacity:.28; }
:root[data-theme="light"] body.wg-login .wg-hero .wg-logo {
  filter:brightness(0) drop-shadow(0 5px 7px #32436c45);
}

@media (max-width:640px) {
  /* Counter the shared mobile main padding on the artwork only. */
  body.wg-login .wg-hero { margin-inline:-.9rem; }
  body.wg-login .wg-hero .wg-logo { width:calc(69% - 1.242rem); }
}
