/* ============================================================================
   AXIOM OS — COMMAND CENTER
   Draft redesign. Ember / metallic / glass. Built on the owner-supplied
   prototype (examples/crm-redesign/axiom-command-center.html @ 88c813e).
   ========================================================================== */

:root{
  color-scheme: dark;

  --bg:#070708;
  --bg-2:#0a0a0c;
  --surface:#121214;
  --surface-2:#181818;
  --surface-3:#1e1c1a;

  --line:#3a2c22;
  --line-soft:rgba(255,255,255,.06);
  --line-strong:#8a5326;

  --ember:#ff5f00;
  --ember-2:#ff7a15;
  --amber:#ff9d2e;
  --amber-soft:#ffbe6b;
  --gold:#ffd7a1;

  --text:#f6f2ee;
  --muted:#aaa5a0;
  --dim:#7e7873;

  --ok:#54e39b;
  --warn:#ffc247;

  --metal:linear-gradient(160deg,#fff7ec 0%,#c9a887 28%,#f3e2cf 50%,#a97c53 74%,#e8d3ba 100%);

  --r-xl:22px;
  --r-lg:18px;
  --r-md:13px;
  --r-sm:9px;

  --shadow-card:0 18px 40px -26px rgba(0,0,0,.95), 0 2px 0 rgba(255,255,255,.02) inset;
  --shadow-float:0 30px 70px -34px rgba(0,0,0,1), 0 0 0 1px rgba(255,150,70,.05);

  --font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, Roboto, system-ui, sans-serif;
  --mono:ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;

  --ease:cubic-bezier(.22,.61,.36,1);
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
html{ overflow-x:clip; }
body{
  font-family:var(--font);
  font-size:14px;
  line-height:1.45;
  color:var(--text);
  background:
    radial-gradient(1100px 520px at 50% -10%, #1d0e05 0%, transparent 62%),
    radial-gradient(900px 480px at 50% 108%, rgba(255,95,0,.16), transparent 70%),
    var(--bg);
  -webkit-font-smoothing:antialiased;
  min-height:100vh;
  overflow-x:hidden;
}
h1,h2,h3,p{ margin:0; }
button,input,select{ font:inherit; color:inherit; }
button{ cursor:pointer; background:none; border:0; }
a{ color:inherit; text-decoration:none; }
svg{ width:22px; height:22px; flex:none; vertical-align:middle; }
::selection{ background:rgba(255,122,21,.32); }

:where(button,a,input,[tabindex]):focus-visible{
  outline:2px solid #ffc071;
  outline-offset:3px;
  border-radius:6px;
}

/* ================================ app shell ================================ */

.app{ min-height:100vh; display:flex; flex-direction:column; }

.top{
  height:74px;
  display:flex;
  align-items:center;
  gap:16px;
  padding:0 20px;
  position:sticky;
  top:0;
  z-index:60;
  background:linear-gradient(180deg, rgba(10,9,9,.96), rgba(10,9,9,.82));
  border-bottom:1px solid #221d19;
  backdrop-filter:blur(16px) saturate(1.1);
}
.menu-toggle{ display:none; padding:9px; border-radius:10px; color:var(--muted); }
.menu-toggle:hover{ background:rgba(255,255,255,.05); color:#fff; }

.brand{ display:flex; align-items:center; gap:11px; min-width:0; }
.brand .mark{ width:44px; height:37px; filter:drop-shadow(0 0 12px rgba(255,110,20,.35)); }
.brand-txt b{ display:block; font-size:21px; letter-spacing:-.5px; line-height:1; font-weight:750; }
.brand-txt b em{ font-style:normal; color:var(--amber); }
.brand-txt small{ display:block; font-size:8.5px; letter-spacing:1.9px; color:#9d9892; margin-top:5px; font-weight:600; }

.search{
  flex:1 1 auto;
  max-width:520px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 12px 9px 13px;
  border-radius:999px;
  border:1px solid #3a322c;
  background:linear-gradient(180deg,#161514,#111011);
  color:var(--dim);
  font-size:12.5px;
  min-width:0;
  transition:border-color .2s, box-shadow .2s;
}
.search:hover{ border-color:#5a4433; color:var(--muted); }
.search svg{ width:15px; height:15px; }
.search-ph{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; flex:1; text-align:left; }
.search kbd, .palette kbd{
  font-family:var(--mono); font-size:9.5px; padding:2px 5px; border-radius:5px;
  border:1px solid rgba(255,255,255,.13); color:var(--muted); background:rgba(255,255,255,.04);
}

.modes{ display:flex; gap:8px; }
.mode{
  display:flex; align-items:center; gap:10px;
  padding:8px 13px;
  border-radius:14px;
  border:1px solid #3d3631;
  background:linear-gradient(150deg,#211f1e,#0e0e10);
  text-align:left;
  transition:border-color .2s, background .2s, transform .2s;
}
.mode svg{ width:18px; height:18px; color:var(--muted); }
.mode b{ display:block; font-size:12px; font-weight:650; }
.mode small{ display:block; font-size:9.5px; color:#a5a09b; margin-top:1px; }
.mode:hover{ border-color:#6a5038; }
.mode.active{
  border-color:#ffab45;
  background:linear-gradient(155deg,#ff9409,#a43900 52%,#3a1500);
  box-shadow:inset 0 0 14px rgba(255,178,61,.35), 0 8px 26px -14px rgba(255,109,0,.9);
  color:#fff;
}
.mode.active svg{ color:#fff; }
.mode.active small{ color:rgba(255,255,255,.78); }

.top-actions{ display:flex; align-items:center; gap:4px; margin-left:auto; }
.icon-btn{
  position:relative;
  width:36px; height:36px;
  display:grid; place-items:center;
  border-radius:50%;
  color:#9c9690;
  transition:background .2s, color .2s;
}
.icon-btn svg{ width:17px; height:17px; }
.icon-btn:hover{ background:rgba(255,255,255,.06); color:#fff; }
.live-dot{
  position:absolute; top:7px; right:8px;
  width:6px; height:6px; border-radius:50%;
  background:var(--ok);
  box-shadow:0 0 8px rgba(84,227,155,.9);
  animation:pulse 2.4s ease-in-out infinite;
}
.avatar{
  width:34px; height:34px; border-radius:50%;
  display:grid; place-items:center;
  font-size:11.5px; font-weight:750; letter-spacing:.03em;
  color:#241003;
  background:var(--metal);
  border:1px solid rgba(255,255,255,.25);
  margin-left:6px;
}

.shell{ flex:1; display:grid; grid-template-columns:248px minmax(0,1fr); align-items:start; }

/* ================================== rail ================================== */

.side{
  position:sticky;
  top:74px;
  height:calc(100vh - 74px);
  padding:16px 12px 14px;
  border-right:1px solid #1e1a17;
  background:linear-gradient(170deg,#0e0d0d,#080808 65%);
  display:flex;
  flex-direction:column;
  gap:10px;
  overflow-y:auto;
  scrollbar-width:thin;
  scrollbar-color:#332a24 transparent;
  z-index:40;
}

.nav{ position:relative; display:flex; flex-direction:column; gap:2px; }
.nav-item{
  position:relative;
  display:flex; align-items:center; gap:11px;
  padding:9px 10px;
  border-radius:11px;
  border:1px solid transparent;
  color:#b9b3ad;
  font-size:12.5px;
  text-align:left;
  transition:background .18s, color .18s, border-color .18s;
  z-index:1;
}
.nav-item svg{ width:17px; height:17px; opacity:.85; }
.nav-item .nav-label{ flex:1; }
.nav-item .nav-arrow{ opacity:0; transform:translateX(-3px); transition:.18s; font-size:13px; color:var(--amber); }
.nav-item:hover{ background:rgba(255,255,255,.045); color:#fff; }
.nav-item:hover .nav-arrow{ opacity:.8; transform:none; }
.nav-item.active{
  color:#fff;
  font-weight:650;
  background:linear-gradient(90deg, rgba(255,122,21,.22), rgba(255,122,21,.04));
  border-color:rgba(255,150,60,.45);
  box-shadow:inset 0 1px 0 rgba(255,190,140,.16);
}
.nav-item.active svg{ color:var(--amber); opacity:1; }
.nav-item.active .nav-arrow{ opacity:1; transform:none; }

.rail-spacer{ flex:1; }

.rail-ai{ padding:12px; border-radius:16px; }
.rail-ai-top{ display:flex; align-items:center; gap:9px; }
.rail-ai-top > div{ min-width:0; flex:1; }
.rail-ai-top small{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mini-orb{
  width:26px; height:26px; border-radius:50%;
  background:
    radial-gradient(circle at 38% 32%, #fff3dd 0%, #ffc178 22%, #ff7a15 52%, #8f2c00 78%, #2a0a00 100%);
  box-shadow:0 0 16px rgba(255,110,20,.55), inset 0 0 8px rgba(0,0,0,.5);
  flex:none;
}
.rail-ai b{ font-size:12.5px; font-weight:650; display:block; }
.rail-ai small{ font-size:9.5px; color:var(--dim); display:block; margin-top:2px; }
.rail-ai-line{
  display:flex; align-items:flex-start; gap:7px;
  font-size:10.5px; color:#9b958f; line-height:1.45;
  padding:7px 0;
  border-top:1px solid rgba(255,255,255,.045);
  margin-top:7px;
}
.rail-ai-line svg{ width:12px; height:12px; color:var(--amber); margin-top:1px; }
.rail-ai-line span{ margin-left:auto; color:#6d6761; font-size:9px; white-space:nowrap; padding-left:6px; }
.rail-ai-cta{ width:100%; margin-top:9px; justify-content:space-between; font-size:11.5px; }
.rail-ai-cta svg{ width:13px; height:13px; }

/* ================================= buttons ================================ */

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  min-height:40px;
  padding:0 15px;
  border-radius:12px;
  border:1px solid #443a32;
  background:linear-gradient(180deg,#211f1e,#141313);
  color:#efe9e3;
  font-size:12.5px;
  font-weight:600;
  transition:transform .16s var(--ease), border-color .2s, box-shadow .2s, background .2s;
}
.btn svg{ width:15px; height:15px; }
.btn:hover{ border-color:#7a5636; transform:translateY(-1px); }
.btn:active{ transform:translateY(0) scale(.985); }

.btn-primary{
  border-color:#ffb04a;
  background:linear-gradient(155deg,#ff9c18,#d05000 46%,#4a1a00);
  color:#fff;
  box-shadow:inset 0 1px 0 rgba(255,230,200,.5), inset 0 -8px 20px rgba(120,30,0,.4), 0 10px 30px -16px rgba(255,110,0,.95);
}
.btn-primary:hover{ box-shadow:inset 0 1px 0 rgba(255,230,200,.6), 0 14px 36px -16px rgba(255,110,0,1); }

.btn-ghost{
  background:linear-gradient(180deg, rgba(255,122,21,.14), rgba(255,122,21,.04));
  border-color:rgba(255,150,60,.4);
  color:#ffd9b4;
}
.btn-glass{ background:rgba(255,255,255,.05); backdrop-filter:blur(8px); }

.chip-btn{
  display:inline-flex; align-items:center; gap:5px;
  margin-left:auto;
  padding:5px 9px;
  border-radius:999px;
  border:1px solid #453b33;
  background:rgba(255,255,255,.035);
  color:#b9b2ab;
  font-size:10px;
  white-space:nowrap;
  transition:.18s;
}
.chip-btn svg{ width:10px; height:10px; }
.chip-btn:hover{ color:#fff; border-color:rgba(255,150,60,.5); background:rgba(255,122,21,.1); }

/* ================================== main ================================== */

.main{
  min-width:0;
  padding:22px 24px 34px;
  position:relative;
  perspective:1600px;
}
.view{ display:none; }
.view.is-active{ display:block; animation:viewIn .42s var(--ease) both; }
@keyframes viewIn{
  from{ opacity:0; transform:translateY(10px); }
  to{ opacity:1; transform:none; }
}

/* intro */
.intro{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:22px;
  position:relative;
  z-index:2;
}
.eyebrow-row{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.eyebrow{ font-size:9px; font-weight:750; letter-spacing:2.4px; color:#b9b2ab; text-transform:uppercase; }
.tag{
  border:1px solid #7d4415;
  border-radius:999px;
  color:#ffb968;
  padding:3px 8px;
  font-size:9px;
  letter-spacing:.7px;
  background:rgba(255,122,21,.07);
}
.tag-live{ display:inline-flex; align-items:center; gap:5px; border-color:rgba(84,227,155,.3); color:#a9f0cb; background:rgba(84,227,155,.07); }
.tag-live i{ width:5px; height:5px; border-radius:50%; background:var(--ok); box-shadow:0 0 7px rgba(84,227,155,.9); animation:pulse 2.4s infinite; }

.intro h1{
  margin:10px 0 8px;
  font-size:clamp(24px, 2.3vw, 34px);
  line-height:1.1;
  letter-spacing:-1.1px;
  font-weight:700;
  background:linear-gradient(180deg,#fffdfa,#efe4d8 70%,#d8c6b6);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.intro h1 .orange{
  background:linear-gradient(180deg,#ffcf8f,#ff8a21 55%,#f25d00);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.intro p{ max-width:62ch; font-size:12.5px; color:#a6a09a; line-height:1.6; }
.intro-actions{ display:flex; gap:9px; flex-wrap:wrap; }

/* ================================== hub =================================== */

.hub{
  position:relative;
  min-height:342px;
  margin:14px 0 4px;
  display:grid;
  grid-template-columns:minmax(210px,1fr) minmax(260px,1.08fr) minmax(210px,1fr);
  gap:24px;
  align-items:center;
  isolation:isolate;
}
.hub-horizon{
  position:absolute;
  left:2%; right:2%; bottom:-30px; height:120px;
  border-radius:50% 50% 0 0 / 100% 100% 0 0;
  border-top:2px solid rgba(255,170,100,.7);
  background:linear-gradient(180deg, rgba(255,110,20,.10), transparent 70%);
  box-shadow:0 -8px 40px rgba(255,110,20,.35), 0 -2px 10px rgba(255,150,60,.5);
  z-index:-2;
  opacity:.75;
  pointer-events:none;
}
.hub::before{
  content:"";
  position:absolute; inset:-8% -4%;
  background:radial-gradient(ellipse at 50% 52%, rgba(255,106,0,.18), transparent 58%);
  z-index:-3; pointer-events:none;
}

.wires{ position:absolute; inset:0; width:100%; height:100%; z-index:0; pointer-events:none; overflow:visible; }
.wire-base path{ fill:none; stroke:#6b3714; stroke-width:1.2; opacity:.75; }
.wire-flow path{
  fill:none;
  stroke:url(#wireGrad);
  stroke-width:2;
  stroke-linecap:round;
  stroke-dasharray:26 210;
  filter:drop-shadow(0 0 5px rgba(255,120,20,.8));
  animation:flow 4.2s linear infinite;
}
.wire-flow .f2{ animation-delay:-.7s; }
.wire-flow .f3{ animation-delay:-1.4s; }
.wire-flow .f4{ animation-delay:-2.1s; }
.wire-flow .f5{ animation-delay:-2.8s; }
.wire-flow .f6{ animation-delay:-3.5s; }
.wire-ports circle{ fill:#ffd9a0; filter:drop-shadow(0 0 6px #ff8a15); animation:portPulse 3.6s ease-in-out infinite; }
.wire-ports circle:nth-child(2n){ animation-delay:-1.2s; }
.wire-ports circle:nth-child(3n){ animation-delay:-2.4s; }
@keyframes flow{ to{ stroke-dashoffset:-236; } }
@keyframes portPulse{ 0%,100%{ opacity:.45; } 50%{ opacity:1; } }

.nodes{ display:flex; flex-direction:column; gap:13px; z-index:2; }

.node{
  --mx:50%; --my:0%;
  display:flex; align-items:center; gap:12px;
  padding:12px 13px;
  min-height:74px;
  width:100%;
  text-align:left;
  border-radius:15px;
  border:1px solid #6d4526;
  background:
    radial-gradient(180px circle at var(--mx) var(--my), rgba(255,155,18,.14), transparent 72%),
    linear-gradient(155deg,#332013,#121316 62%);
  box-shadow:inset 0 1px 0 rgba(255,210,160,.12), inset 0 0 22px rgba(255,114,0,.06), 0 14px 30px -24px #000;
  transform:perspective(900px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));
  transition:transform .2s var(--ease), border-color .22s, box-shadow .22s;
  position:relative;
  overflow:hidden;
}
.node::after{
  content:"";
  position:absolute; top:0; left:14%; right:14%; height:1px;
  background:linear-gradient(90deg,transparent,rgba(255,190,120,.75),transparent);
}
.node:hover{
  border-color:#ff9d3a;
  box-shadow:inset 0 1px 0 rgba(255,220,180,.2), 0 0 30px rgba(255,106,0,.16), 0 18px 34px -24px #000;
}
.node:active{ transform:perspective(900px) scale(.99); }

.node-ico{
  width:44px; height:44px; flex:none;
  display:grid; place-items:center;
  border-radius:13px;
  color:#ffbe6b;
  background:
    radial-gradient(circle at 38% 30%, rgba(255,190,120,.28), rgba(255,106,0,.08) 70%),
    linear-gradient(160deg,#2a1b10,#141314);
  border:1px solid rgba(255,160,80,.42);
  box-shadow:inset 0 1px 0 rgba(255,225,190,.22), 0 0 18px rgba(255,110,20,.12);
}
.node-ico svg{ width:21px; height:21px; }
.node-txt{ min-width:0; }
.node-txt strong{ display:block; font-size:13.5px; font-weight:650; letter-spacing:-.1px; }
.node-txt small{ display:block; font-size:10.5px; color:#a49d97; margin-top:3px; line-height:1.35; }
.node .arrow{ margin-left:auto; color:#c98a4a; font-size:15px; opacity:.7; transition:.18s; }
.node:hover .arrow{ opacity:1; transform:translateX(2px); }
.nodes.left .node{ border-top-right-radius:6px; }
.nodes.right .node{ border-top-left-radius:6px; flex-direction:row-reverse; text-align:right; }
.nodes.right .node .arrow{ display:none; }

/* ================================== orb =================================== */

.orb-scene{
  position:relative;
  width:100%;
  max-width:300px;
  aspect-ratio:1;
  margin:0 auto;
  display:grid;
  place-items:center;
  transform-style:preserve-3d;
  will-change:transform;
}
.orb-halo{
  position:absolute; inset:-14%;
  border-radius:50%;
  background:radial-gradient(closest-side, rgba(255,120,22,.34), rgba(255,90,0,.10) 55%, transparent 74%);
  filter:blur(10px);
  animation:breathe 7s ease-in-out infinite;
}
#particles{ position:absolute; inset:0; width:100%; height:100%; pointer-events:none; opacity:.9; }

.ring{
  position:absolute;
  border-radius:50%;
  border:1px solid rgba(255,150,60,.35);
  pointer-events:none;
  transform:rotateX(74deg) rotateZ(0deg);
  animation:ringSpin 26s linear infinite;
}
.ring.r1{ inset:0; border-color:rgba(255,170,90,.45); border-top:2px solid rgba(255,228,185,.9); border-bottom:2px solid rgba(255,120,0,.75); box-shadow:0 0 34px rgba(255,106,0,.3); }
.ring.r2{ inset:-7%; border-style:dashed; opacity:.5; animation-direction:reverse; animation-duration:38s; }
.ring.r3{ inset:-14%; opacity:.28; animation-duration:52s; }
@keyframes ringSpin{ to{ transform:rotateX(74deg) rotateZ(360deg); } }

.orb{
  position:relative;
  width:86%;
  aspect-ratio:1;
  border-radius:50%;
  border:1.5px solid rgba(255,214,160,.75);
  background:
    radial-gradient(circle at 40% 34%, #4a2412 0%, #150c09 46%, #240c02 70%, #f0600a 99%);
  box-shadow:
    0 0 10px rgba(255,240,190,.55),
    0 0 34px rgba(255,120,20,.5),
    0 0 90px rgba(255,86,0,.35),
    inset 0 0 34px rgba(255,118,0,.4),
    inset -14px -18px 40px rgba(30,6,0,.6);
  overflow:hidden;
  display:grid;
  place-items:center;
  transition:transform .3s var(--ease), box-shadow .3s;
  transform-style:preserve-3d;
}
.orb:hover{ transform:scale(1.015); box-shadow:0 0 14px rgba(255,240,190,.7), 0 0 44px rgba(255,120,20,.6), 0 0 110px rgba(255,86,0,.42), inset 0 0 34px rgba(255,118,0,.45); }
.orb:active{ transform:scale(.99); }

.orb-globe{ position:absolute; inset:0; width:100%; height:100%; opacity:.45; }
.orb-sheen{
  position:absolute; inset:0; border-radius:50%;
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,.16), transparent 38%),
    conic-gradient(from 200deg at 50% 50%, transparent 0 62%, rgba(255,210,150,.16) 74%, transparent 86%);
  mix-blend-mode:screen;
  animation:sheen 18s linear infinite;
}
.orb-face{ position:relative; z-index:3; display:flex; flex-direction:column; align-items:center; text-shadow:0 3px 14px rgba(0,0,0,.85); }
.orb-mark{ width:44px; height:36px; margin-bottom:9px; filter:drop-shadow(0 0 10px rgba(255,120,20,.55)); }
.orb-face strong{ font-size:19px; font-weight:800; letter-spacing:-.3px; line-height:1; }
.orb-face strong span{ color:var(--amber); }
.orb-face small{ font-size:7.5px; letter-spacing:2px; font-weight:800; margin-top:4px; color:#ffd9b6; }
.orb-status{
  display:inline-flex; align-items:center; gap:5px;
  margin-top:9px; padding:3px 8px;
  border-radius:999px;
  border:1px solid rgba(255,190,130,.3);
  background:rgba(20,8,2,.55);
  font-size:8px; letter-spacing:.7px; color:#ffe0c0;
}
.orb-status i{ width:4px; height:4px; border-radius:50%; background:var(--ok); box-shadow:0 0 6px var(--ok); animation:pulse 2.2s infinite; }
.orb-ellipse{
  position:absolute; width:118%; height:26%;
  border:1px solid rgba(255,184,92,.55);
  border-top:0;
  border-radius:50%;
  transform:rotate(-13deg);
  bottom:10%;
  box-shadow:0 5px 14px rgba(255,117,0,.28);
  pointer-events:none;
}

@keyframes breathe{ 0%,100%{ transform:scale(1); opacity:.9; } 50%{ transform:scale(1.05); opacity:1; } }
@keyframes sheen{ to{ transform:rotate(360deg); } }
@keyframes pulse{ 0%,100%{ opacity:.55; } 50%{ opacity:1; } }

/* ================================== kpis ================================== */

.kpis{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
  margin:12px 0;
  position:relative; z-index:2;
}
.kpi{
  --mx:50%; --my:0%;
  position:relative;
  display:flex; align-items:center; gap:10px;
  padding:12px 13px 14px;
  border-radius:15px;
  border:1px solid #4a3b2e;
  background:
    radial-gradient(160px circle at var(--mx) var(--my), rgba(255,155,18,.12), transparent 75%),
    linear-gradient(160deg,#1b1817,#101012 60%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05), 0 14px 26px -24px #000;
  overflow:hidden;
  transform:perspective(900px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));
  transition:transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.kpi:hover{ border-color:#8a5b31; box-shadow:inset 0 1px 0 rgba(255,255,255,.08), 0 0 28px rgba(255,106,0,.10); }
.kpi-ico{
  width:34px; height:34px; flex:none; display:grid; place-items:center;
  border-radius:10px;
  color:#ffbe6b;
  background:radial-gradient(circle at 40% 32%, rgba(255,170,90,.22), rgba(255,106,0,.05));
  border:1px solid rgba(255,150,70,.3);
}
.kpi-ico svg{ width:16px; height:16px; }
.kpi-body{ min-width:0; }
.kpi-num{ font-size:20px; font-weight:700; letter-spacing:-.5px; line-height:1.05; font-variant-numeric:tabular-nums; }
.kpi-lbl{ font-size:9.5px; color:#9a938d; margin-top:2px; white-space:nowrap; }
.kpi-delta{ margin-left:auto; font-size:9px; font-weight:650; color:var(--ok); background:rgba(84,227,155,.09); border:1px solid rgba(84,227,155,.2); padding:2px 6px; border-radius:999px; }
.spark{ position:absolute; right:8px; bottom:6px; height:22px; width:44%; opacity:.35; pointer-events:none; }
.spark path{ fill:none; stroke:url(#sparkGrad); stroke-width:1.4; }
.spark .area{ fill:rgba(255,122,21,.10); stroke:none; }

/* ================================= panels ================================= */

.grid{
  display:grid;
  grid-template-columns:1.1fr 1fr 1fr;
  gap:11px;
  align-items:stretch;
}
.card{
  --mx:50%; --my:0%;
  position:relative;
  border-radius:var(--r-lg);
  border:1px solid #45372b;
  background:
    radial-gradient(220px circle at var(--mx) var(--my), rgba(255,155,18,.10), transparent 76%),
    linear-gradient(158deg,#1a1817,#111113 55%,#0f0f11);
  box-shadow:var(--shadow-card);
  transform:perspective(1200px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));
  transition:transform .2s var(--ease), border-color .22s, box-shadow .22s;
}
.card::after{
  content:"";
  position:absolute; top:0; left:12%; right:12%; height:1px;
  background:linear-gradient(90deg,transparent,rgba(255,181,91,.65),transparent);
  pointer-events:none;
}
.card:hover{ border-color:#8f5b2c; box-shadow:var(--shadow-card), 0 0 30px rgba(255,106,0,.10); }

.panel{ padding:14px 15px 15px; min-width:0; display:flex; flex-direction:column; }
.panel-head{ display:flex; align-items:flex-start; gap:9px; margin-bottom:12px; }
.panel-head > svg{ width:18px; height:18px; color:var(--amber); margin-top:1px; }
.panel-head h2{ font-size:12.5px; font-weight:650; letter-spacing:.1px; }
.panel-head small{ display:block; font-size:9.5px; color:#8f8882; margin-top:2px; }

.stages{ display:flex; gap:5px; margin:2px 0 14px; }
.stage{
  flex:1; min-width:0;
  padding:8px 8px 9px;
  border-radius:9px;
  border:1px solid rgba(255,150,60,.32);
  background:linear-gradient(160deg, rgba(255,122,21,.16), rgba(255,122,21,.02));
  position:relative;
  overflow:hidden;
}
.stage span{ display:block; font-size:9px; color:#e8bb92; letter-spacing:.2px; }
.stage b{ display:block; font-size:15px; font-weight:700; margin-top:3px; font-variant-numeric:tabular-nums; }
.stage-bar{
  display:block; height:2px; margin-top:7px; border-radius:2px;
  background:linear-gradient(90deg,#ffbe6b,#ff6a00);
  box-shadow:0 0 8px rgba(255,106,0,.7);
  transform-origin:left;
  transform:scaleX(0);
  transition:transform .8s var(--ease);
}
.stage[data-stage="0"] .stage-bar{ transition-delay:.05s; }
.stage[data-stage="1"] .stage-bar{ transition-delay:.12s; }
.stage[data-stage="2"] .stage-bar{ transition-delay:.19s; }
.stage[data-stage="3"] .stage-bar{ transition-delay:.26s; }
.stage[data-stage="4"] .stage-bar{ transition-delay:.33s; }
.is-drawn .stage-bar{ transform:scaleX(1); }
.stage.won{ border-color:rgba(84,227,155,.32); background:linear-gradient(160deg, rgba(84,227,155,.14), rgba(84,227,155,.02)); }
.stage.won span{ color:#a8ecc9; }
.stage.won .stage-bar{ background:linear-gradient(90deg,#8ff0bb,#2f9e64); box-shadow:0 0 8px rgba(84,227,155,.6); }

.stats{ display:flex; gap:14px; margin-top:auto; padding-top:11px; border-top:1px solid rgba(255,255,255,.06); }

.pipe-moves{ display:flex; flex-direction:column; gap:6px; margin-top:auto; padding-top:11px; border-top:1px solid rgba(255,255,255,.06); }
.pipe-moves div{ display:flex; align-items:center; gap:7px; font-size:10.3px; color:#b3aca5; }
.pipe-moves i{ width:5px; height:5px; border-radius:50%; background:var(--ember); box-shadow:0 0 7px rgba(255,95,0,.7); flex:none; }
.pipe-moves time{ margin-left:auto; font-size:9px; color:#8e8781; }
.pipe-moves + .stats{ margin-top:12px; }
.stats small{ display:block; font-size:9px; color:#8b847e; }
.stats b{ display:block; margin-top:2px; font-size:14px; font-weight:650; font-variant-numeric:tabular-nums; }
.ok{ color:var(--ok); }

.list{ display:flex; flex-direction:column; }
.item{
  display:flex; align-items:center; gap:8px;
  min-height:33px;
  font-size:10.8px;
  color:#cfc8c1;
  border-bottom:1px solid rgba(255,255,255,.05);
}
.item:last-child{ border-bottom:0; }
.item .dot{ width:5px; height:5px; border-radius:50%; background:var(--ember); box-shadow:0 0 7px rgba(255,95,0,.8); flex:none; }
.item .dot.ok{ background:var(--ok); box-shadow:0 0 7px rgba(84,227,155,.7); }
.item time, .item .right{ margin-left:auto; color:#8e8781; font-size:9.5px; white-space:nowrap; }
.item:hover{ color:#fff; }

.ops{ display:flex; flex-direction:column; }
.op{
  display:flex; align-items:center; gap:8px;
  padding:8px 0;
  border-bottom:1px solid rgba(255,255,255,.05);
  font-size:10.8px;
}
.op:last-child{ border-bottom:0; }
.op strong{ display:block; font-size:11.5px; font-weight:600; }
.op small{ color:#8e8781; font-size:9.5px; }
.op .amount{ margin-left:auto; font-weight:650; white-space:nowrap; font-variant-numeric:tabular-nums; }
.pill{
  border:1px solid #8a4d17;
  background:rgba(255,122,21,.10);
  color:#ffd7aa;
  padding:2px 7px;
  border-radius:999px;
  font-size:8.5px;
  white-space:nowrap;
}
.pill-ok{ border-color:rgba(84,227,155,.3); background:rgba(84,227,155,.09); color:#a9f0cb; }

.cal-row{ display:flex; gap:12px; align-items:flex-start; }
.cal-date{
  flex:none; text-align:center;
  padding:8px 11px 9px;
  border-radius:11px;
  border:1px solid #57483c;
  background:linear-gradient(170deg,#26221f,#151414);
}
.cal-date small{ display:block; font-size:8px; letter-spacing:1.4px; color:#c9a887; }
.cal-date b{ display:block; font-size:20px; line-height:1.1; }
.cal-row .list{ flex:1; min-width:0; }

.donut-row{ display:flex; align-items:center; gap:16px; }
.donut{
  --p:1;
  position:relative;
  width:112px; aspect-ratio:1; flex:none;
  border-radius:50%;
  display:grid; place-items:center;
  background:conic-gradient(
    #ff9500 0 42.3%,
    #ff6700 42.3% 66.4%,
    #ffbc28 66.4% 81.2%,
    #d85000 81.2% 92.4%,
    #7d3e10 92.4%);
  transform:rotate(-90deg) scale(var(--p));
  transition:transform .8s var(--ease);
  box-shadow:0 0 24px rgba(255,106,0,.18);
}
.donut::before{
  content:"";
  position:absolute;
  width:64%; aspect-ratio:1;
  border-radius:50%;
  background:radial-gradient(circle at 50% 40%, #17161a, #0e0e10);
  box-shadow:inset 0 0 16px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.04);
}
.donut > div{ position:relative; z-index:1; transform:rotate(90deg); display:flex; flex-direction:column; align-items:center; justify-content:center; width:64%; line-height:1.25; }
.donut b{ display:block; font-size:16px; font-weight:700; font-variant-numeric:tabular-nums; line-height:1.15; }
.donut small{ font-size:8px; color:#9a938d; display:block; white-space:nowrap; }
.legend{ flex:1; display:grid; gap:6px; font-size:9.8px; color:#a9a29c; }
.legend div{ display:flex; align-items:center; gap:7px; }
.legend i{ width:7px; height:7px; border-radius:50%; background:var(--c,var(--amber)); box-shadow:0 0 6px color-mix(in srgb, var(--c,var(--amber)) 70%, transparent); }
.legend b{ margin-left:auto; color:#e9e2db; font-weight:600; font-variant-numeric:tabular-nums; }

.auto-top{ display:flex; align-items:baseline; gap:8px; margin-bottom:6px; }
.auto-top b{ font-size:26px; font-weight:700; color:var(--amber); line-height:1; font-variant-numeric:tabular-nums; }
.auto-top span{ font-size:9.5px; color:#8e8781; }
.auto-top .pill{ margin-left:auto; }

.preview-label{
  display:flex; justify-content:space-between; gap:10px;
  margin-top:16px;
  font-size:9px; letter-spacing:.8px; color:#6f6963;
}

.reveal{ opacity:0; animation:rise .55s var(--ease) both; animation-delay:var(--delay,0ms); }
@keyframes rise{ from{ opacity:0; transform:translateY(10px) scale(.995); } to{ opacity:1; transform:none; } }

/* ================================ workspace ================================ */

.ws-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:18px; flex-wrap:wrap; }
.ws-head h1{ margin:9px 0 6px; font-size:clamp(22px,2vw,30px); letter-spacing:-.9px; }
.ws-head p{ color:#a6a09a; font-size:12.5px; max-width:70ch; }
.ws-actions{ display:flex; gap:8px; }

.ws-stats{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:16px 0 12px; }
.ws-stat{
  --mx:50%; --my:0%;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid #44372b;
  background:
    radial-gradient(220px circle at var(--mx) var(--my), rgba(255,155,18,.11), transparent 76%),
    linear-gradient(160deg,#1a1716,#101012);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
  transition:border-color .2s, box-shadow .2s;
}
.ws-stat:hover{ border-color:#7a5330; box-shadow:inset 0 1px 0 rgba(255,255,255,.08), 0 0 24px rgba(255,106,0,.10); }
.ws-stat small{ display:block; font-size:9.5px; color:#8e8781; letter-spacing:.3px; }
.ws-stat b{ display:block; font-size:20px; margin-top:3px; font-variant-numeric:tabular-nums; letter-spacing:-.3px; }
.ws-stat em{ font-style:normal; font-size:9px; color:var(--ok); }

.ws-table-card{ overflow:hidden; }
.ws-toolbar{ display:flex; align-items:center; gap:9px; padding:11px 13px; border-bottom:1px solid rgba(255,255,255,.06); }
.ws-search{
  display:flex; align-items:center; gap:8px;
  padding:7px 11px;
  border-radius:999px;
  border:1px solid #403832;
  background:#141314;
  min-width:220px;
}
.ws-search svg{ width:13px; height:13px; color:#8e8781; }
.ws-search input{ all:unset; flex:1; font-size:11.5px; color:var(--text); }
.ws-search input::placeholder{ color:#7c7570; }
.ws-count{ margin-left:auto; font-size:9.5px; color:#8e8781; }
.ws-toolbar .chip-btn{ margin-left:0; }

.table-wrap{ overflow-x:auto; }
.table{ width:100%; border-collapse:collapse; font-size:11px; }
.table th{
  text-align:left;
  font-size:8.5px; letter-spacing:.9px; text-transform:uppercase; font-weight:700;
  color:#8a837d;
  padding:9px 13px;
  border-bottom:1px solid rgba(255,255,255,.07);
  white-space:nowrap;
  background:rgba(255,255,255,.015);
}
.table td{
  padding:10px 13px;
  border-bottom:1px solid rgba(255,255,255,.045);
  color:#d4cdc6;
  white-space:nowrap;
}
.table tbody tr{
  --mx:50%; --my:50%;
  background:radial-gradient(240px circle at var(--mx) var(--my), rgba(255,140,30,.07), transparent 78%);
  transition:background .15s;
}
.table tbody tr:hover{ background:radial-gradient(240px circle at var(--mx) var(--my), rgba(255,140,30,.12), transparent 78%), rgba(255,122,21,.04); }
.table tbody tr:last-child td{ border-bottom:0; }
.table .t-strong{ color:#fff; font-weight:600; }
.table .t-muted{ color:#8e8781; }
.table .t-num{ font-variant-numeric:tabular-nums; }
.table .t-right{ text-align:right; }
.status{ display:inline-flex; align-items:center; gap:5px; font-size:9.5px; }
.status i{ width:5px; height:5px; border-radius:50%; background:var(--ok); box-shadow:0 0 6px rgba(84,227,155,.8); }
.status.warn i{ background:var(--warn); box-shadow:0 0 6px rgba(255,194,71,.8); }
.status.idle i{ background:#8e8781; box-shadow:none; }
.ws-note{ margin-top:10px; font-size:9.5px; color:#6f6963; }

/* ================================ palette ================================= */

.palette{ position:fixed; inset:0; z-index:120; display:grid; justify-items:center; align-items:start; padding-top:14vh; }
.palette[hidden]{ display:none; }
.palette-scrim{ position:absolute; inset:0; background:rgba(4,3,3,.66); backdrop-filter:blur(6px); animation:fade .2s ease both; }
.palette-box{
  position:relative;
  width:min(620px, 92vw);
  border-radius:20px;
  border:1px solid #8a5a30;
  background:linear-gradient(170deg,#1a1614,#0e0e10);
  box-shadow:0 40px 90px -30px #000, 0 0 60px rgba(255,106,0,.14), inset 0 1px 0 rgba(255,200,150,.12);
  overflow:hidden;
  animation:pop .24s var(--ease) both;
}
@keyframes fade{ from{ opacity:0; } to{ opacity:1; } }
@keyframes pop{ from{ opacity:0; transform:translateY(-8px) scale(.985); } to{ opacity:1; transform:none; } }
.palette-input{ display:flex; align-items:center; gap:10px; padding:14px 16px; border-bottom:1px solid rgba(255,255,255,.07); }
.palette-input svg{ width:16px; height:16px; color:var(--amber); }
.palette-input input{ all:unset; flex:1; font-size:14px; color:var(--text); }
.palette-input input::placeholder{ color:#7f7873; }
.palette-list{ max-height:min(56vh,420px); overflow-y:auto; padding:8px; }
.palette-group{ font-size:8.5px; letter-spacing:1.2px; color:#7f7873; text-transform:uppercase; padding:8px 10px 5px; font-weight:700; }
.palette-item{
  display:flex; align-items:center; gap:10px;
  width:100%;
  padding:9px 10px;
  border-radius:10px;
  text-align:left;
  color:#d8d1ca;
  font-size:12px;
  border:1px solid transparent;
}
.palette-item svg{ width:15px; height:15px; color:#b08a63; }
.palette-item small{ margin-left:auto; color:#7f7873; font-size:9.5px; }
.palette-item.active{ background:linear-gradient(90deg, rgba(255,122,21,.18), rgba(255,122,21,.03)); border-color:rgba(255,150,60,.4); color:#fff; }
.palette-item.active svg{ color:var(--amber); }
.palette-empty{ padding:18px 12px; font-size:11.5px; color:#8e8781; }
.palette-foot{ display:flex; gap:14px; align-items:center; padding:9px 14px; border-top:1px solid rgba(255,255,255,.06); font-size:9px; color:#7f7873; }
.palette-hint{ margin-left:auto; color:#9d7a54; }

/* ================================= toasts ================================= */

.toasts{ position:fixed; right:18px; bottom:18px; z-index:140; display:flex; flex-direction:column; gap:8px; align-items:flex-end; }
.toast{
  display:flex; align-items:center; gap:9px;
  padding:10px 13px;
  border-radius:12px;
  border:1px solid rgba(255,150,60,.35);
  background:linear-gradient(160deg,#221b15,#131213);
  box-shadow:0 20px 40px -22px #000, inset 0 1px 0 rgba(255,200,150,.12);
  font-size:11.5px;
  animation:toastIn .28s var(--ease) both;
}
.toast svg{ width:14px; height:14px; color:var(--ok); }
.toast.out{ animation:toastOut .24s ease both; }
@keyframes toastIn{ from{ opacity:0; transform:translateY(8px) scale(.98); } to{ opacity:1; transform:none; } }
@keyframes toastOut{ to{ opacity:0; transform:translateX(12px); } }

/* =============================== responsive =============================== */

@media (max-width:1280px){
  .modes .mode:not(.active){ display:none; }
  .grid{ grid-template-columns:1.05fr 1fr; }
  .grid .panel:nth-child(3){ grid-column:1 / -1; }
  .kpis{ grid-template-columns:repeat(3,minmax(0,1fr)); }
  .hub{ gap:16px; }
}

@media (max-width:1080px){
  .shell{ grid-template-columns:78px minmax(0,1fr); }
  .side{ padding:14px 8px; }
  .nav-item{ justify-content:center; padding:11px 8px; }
  .nav-item .nav-label, .nav-item .nav-arrow{ display:none; }
  .rail-ai{ display:none; }
  .search{ max-width:320px; }
  .main{ padding:18px 18px 28px; }
  .hub{ grid-template-columns:minmax(180px,1fr) minmax(230px,1fr) minmax(180px,1fr); min-height:310px; }
  .orb-scene{ max-width:250px; }
}

@media (max-width:900px){
  .search{ display:none; }
  .top{ gap:10px; }
  .hub{ min-height:290px; }
  .node-txt small{ display:none; }
  .node{ min-height:64px; padding:10px; }
  .intro{ flex-direction:column; align-items:flex-start; gap:12px; }
  .ws-stats{ grid-template-columns:1fr; }
}

@media (max-width:760px){
  .menu-toggle{ display:grid; }
  .top{ height:64px; padding:0 12px; }
  .brand .mark{ width:36px; height:30px; }
  .brand-txt b{ font-size:17px; }
  .brand-txt small{ display:none; }
  .top-actions .icon-btn:not(#aiBtn){ display:none; }
  .modes{ display:none; }

  .shell{ display:block; }
  .side{
    position:fixed;
    top:0; left:0; bottom:0;
    width:264px;
    height:100vh;
    padding:76px 12px 16px;
    transform:translateX(-104%);
    transition:transform .26s var(--ease);
    background:linear-gradient(170deg,#100f0f,#080808);
    box-shadow:24px 0 60px rgba(0,0,0,.7);
    z-index:80;
  }
  .side.open{ transform:none; }
  .side .nav-item{ justify-content:flex-start; padding:11px 12px; }
  .side .nav-item .nav-label, .side .nav-item .nav-arrow{ display:inline; }
  .rail-ai{ display:block; }
  .scrim{ position:fixed; inset:0; background:rgba(0,0,0,.55); backdrop-filter:blur(2px); z-index:70; }
  .scrim[hidden]{ display:none; }

  .main{ padding:16px 12px 30px; }
  .btn{ min-height:44px; }
  .menu-toggle{ width:44px; height:44px; display:grid; place-items:center; }
  .icon-btn{ width:40px; height:40px; }
  .chip-btn{ min-height:32px; }
  .intro h1{ font-size:26px; letter-spacing:-.8px; }
  .intro-actions{ width:100%; }
  .intro-actions .btn{ flex:1; }

  .hub{
    grid-template-columns:1fr;
    gap:10px;
    min-height:0;
    margin-top:6px;
  }
  .wires, .hub-horizon{ display:none; }
  .orb-scene{ max-width:210px; order:-1; margin-bottom:6px; }
  .nodes{ gap:8px; }
  .nodes.right .node{ flex-direction:row; text-align:left; }
  .nodes.right .node .arrow{ margin-left:auto; margin-right:0; transform:none; }
  .node{ min-height:62px; }

  .kpis{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .kpi-lbl{ white-space:normal; }
  .grid{ grid-template-columns:1fr; }
  .grid .panel:nth-child(3){ grid-column:auto; }
  .preview-label{ flex-direction:column; gap:4px; }

  .ws-head{ flex-direction:column; align-items:flex-start; }
  .ws-actions{ width:100%; }
  .ws-actions .btn{ flex:1; }
  .ws-search{ min-width:0; flex:1; }
  .ws-toolbar{ flex-wrap:wrap; }
}

@media (max-width:440px){
  .brand-txt b{ font-size:15px; }
  .kpi{ padding-right:54px; }
  .kpi-delta{ position:absolute; top:10px; right:9px; margin-left:0; font-size:8px; padding:1px 5px; }
  .kpis{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .node-txt small{ display:block; font-size:10px; }
  .stages{ flex-wrap:wrap; }
  .stage{ flex:1 1 30%; }
  .panel-head small{ display:none; }
  .toasts{ left:12px; right:12px; align-items:stretch; }
}

/* =========================== accessible motion ============================ */

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
    scroll-behavior:auto !important;
  }
  .reveal{ opacity:1; }
  .stage-bar{ transform:scaleX(1); }
  .donut{ transform:rotate(-90deg); }
}

/* ==========================================================================
   v2 — glass rail, compact header, global cursor glow, spinning planet
   Owner direction: keep this dashboard layout, restyle the existing sidebar
   as the glassy floating menu, remove the headline/mode/send block.
   ========================================================================== */

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:radial-gradient(520px circle at var(--gx,50%) var(--gy,36%), rgba(255,120,20,.10), transparent 72%);
}
.app{ position:relative; z-index:1; }

/* compact: everything moves up now that the intro block is gone */
.main{ padding-top:14px; }
.hub{ margin-top:0; margin-bottom:2px; min-height:330px; }

/* rail becomes a floating glass panel */
.side{
  border-right:0;
  background:transparent;
  padding:14px 10px 16px 14px;
}
.rail-glass{
  height:100%;
  display:flex;
  flex-direction:column;
  gap:3px;
  padding:11px 10px 12px;
  border-radius:22px;
  border:1px solid rgba(255,150,80,.16);
  background:
    radial-gradient(320px 170px at 50% 0%, rgba(255,120,20,.10), transparent 72%),
    linear-gradient(168deg, rgba(42,26,18,.72), rgba(11,9,8,.9) 62%);
  backdrop-filter:blur(20px) saturate(1.15);
  -webkit-backdrop-filter:blur(20px) saturate(1.15);
  box-shadow:
    inset 0 1px 0 rgba(255,220,180,.10),
    inset 0 0 0 1px rgba(0,0,0,.22),
    0 26px 60px -32px rgba(0,0,0,.95);
  overflow-y:auto;
  scrollbar-width:thin;
  scrollbar-color:#332a24 transparent;
}

.rail-top-ai{
  display:flex; align-items:center; gap:10px;
  width:100%;
  padding:10px 11px;
  margin-bottom:2px;
  border-radius:12px;
  border:1px solid rgba(255,150,80,.12);
  background:linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.01));
  color:#e9e1d8;
  font-size:12.5px;
  font-weight:600;
  text-align:left;
  transition:.18s;
}
.rail-top-ai svg{ width:17px; height:17px; color:var(--amber); }
.rail-top-ai .rail-chev{ margin-left:auto; color:#9b8268; }
.rail-top-ai:hover{ border-color:rgba(255,150,60,.35); background:rgba(255,122,21,.08); }

.nav{ gap:1px; }
.nav-item{ padding:9px 10px; font-size:12.5px; }
.nav-item svg{ width:18px; height:18px; }
.nav-item.active{
  background:linear-gradient(90deg, rgba(255,122,21,.34), rgba(255,122,21,.05));
  border-color:rgba(255,178,96,.8);
  box-shadow:
    0 0 24px rgba(255,106,0,.38),
    inset 0 0 20px rgba(255,122,21,.18),
    inset 0 1px 0 rgba(255,226,190,.22);
}

.nav-more{ position:relative; }
.nav-more-btn{ width:100%; }
.nav-caret{ margin-left:auto; color:#9b8268; font-size:11px; }
.more-menu{
  margin:2px 0 4px 10px;
  padding:5px;
  border-radius:12px;
  border:1px solid rgba(255,150,80,.18);
  background:rgba(20,14,11,.92);
  display:flex; flex-direction:column; gap:2px;
  animation:pop .18s var(--ease) both;
}
.more-menu[hidden]{ display:none; }
.more-menu a, .more-menu button{
  padding:8px 10px;
  border-radius:8px;
  color:#b8b0a8;
  font-size:11.5px;
  text-align:left;
}
.more-menu a:hover, .more-menu button:hover{ background:rgba(255,122,21,.12); color:#fff; }

.rail-ai{
  padding:11px;
  border-color:rgba(255,150,80,.22);
  background:linear-gradient(170deg, rgba(52,31,20,.62), rgba(16,11,8,.82));
  box-shadow:inset 0 1px 0 rgba(255,220,180,.10);
  backdrop-filter:blur(6px);
}
.voice-chip{
  margin-left:auto;
  flex:none;
  font-size:8px;
  color:#a79c92;
  border:1px solid rgba(255,255,255,.10);
  border-radius:999px;
  padding:2px 6px;
  white-space:nowrap;
}
.voice-chip::before{ content:"● "; color:#7d746c; font-size:7px; }
.rail-ai-line{ padding:6px 0; margin-top:6px; font-size:10px; line-height:1.4; }

.rail-ai-head{ display:flex; align-items:center; gap:10px; }
.rail-ai-avatar{
  position:relative;
  width:42px; height:42px; flex:none;
  display:grid; place-items:center;
  border-radius:50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255,160,80,.30), rgba(62,27,9,.55) 46%, rgba(8,6,5,.98) 79%),
    #0b0706;
  border:1px solid rgba(255,150,70,.28);
  box-shadow: inset 0 0 14px rgba(0,0,0,.85), 0 0 16px rgba(255,106,0,.22);
}
.rail-ai-avatar::after{
  content:""; position:absolute; inset:4px;
  border-radius:50%; border:1px solid rgba(255,150,70,.16);
}
.rail-ai-avatar svg{ width:29px; height:29px; filter:drop-shadow(0 0 6px rgba(255,120,20,.45)); }
.rail-ai-id{ min-width:0; flex:1; }
.rail-ai-id b{ display:block; font-size:13px; font-weight:700; letter-spacing:-.1px; color:#f4ece3; }
.rail-ai-id small{ display:block; margin-top:2px; font-size:10px; color:#9a9087; }

.ai-convos{ display:flex; flex-direction:column; gap:6px; margin-top:11px; }
.ai-convo{
  display:flex; align-items:center; gap:8px;
  width:100%; padding:9px 10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.07);
  background:linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  color:#e8e0d7; font-size:10.5px; text-align:left;
  transition:border-color .18s, background .18s;
}
.ai-convo:hover{ border-color:rgba(255,150,60,.35); background:rgba(255,122,21,.07); }
.ai-convo-txt{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ai-convo time{ margin-left:auto; flex:none; font-size:9.5px; color:#7f766e; }

.rail-ai-cta{
  position:relative;
  margin-top:11px;
  justify-content:center;
  white-space:nowrap; font-size:10.5px; gap:6px;
  background:linear-gradient(180deg, rgba(82,37,13,.78), rgba(40,18,8,.92));
  border-color:rgba(255,150,60,.5);
  box-shadow: inset 0 1px 0 rgba(255,200,150,.18), 0 0 18px rgba(255,106,0,.12);
}
.rail-ai-cta svg{ position:absolute; right:10px; width:13px; height:13px; }

/* the planet turns */
.globe-turn{
  transform-box:view-box;
  transform-origin:120px 120px;
  animation:globeSpin 60s linear infinite;
  will-change:transform;
}
@keyframes globeSpin{ to{ transform:rotate(360deg); } }

.rail-close{ display:none; }

@media (prefers-reduced-motion: reduce){
  .globe-turn{ animation:none; }
}

@media (max-width:1080px){
  .side{ padding:10px 6px 12px 8px; }
  .rail-glass{ padding:9px 7px; border-radius:18px; }
  .rail-top-ai{ justify-content:center; padding:10px 6px; }
  .rail-top-ai span{ display:none; }
}

@media (max-width:760px){
  .side{
    padding:0;
    background:linear-gradient(170deg,#100f0f,#080808);
    box-shadow:24px 0 60px rgba(0,0,0,.7);
  }
  .rail-glass{
    height:100%;
    border:0;
    border-radius:0;
    padding:74px 12px 16px;
    background:transparent;
    backdrop-filter:none;
    box-shadow:none;
  }
  .rail-top-ai{ justify-content:flex-start; }
  .rail-top-ai span{ display:inline; }
  .rail-glass{ padding:70px 12px 12px; overflow:hidden; }
  .nav{ flex:1 1 auto; min-height:0; overflow-y:auto; scrollbar-width:none; }
  .rail-spacer{ display:none; }
  .nav-item{ padding:8px 10px; }
  .rail-ai{ padding:10px; }
  .ai-convo{ padding:8px 9px; }
  .rail-ai-cta{ margin-top:9px; min-height:38px; }
  .rail-close{
    display:grid; place-items:center;
    position:absolute; top:14px; right:12px;
    width:40px; height:40px;
    border-radius:12px;
    border:1px solid rgba(255,150,80,.22);
    background:rgba(255,255,255,.045);
    color:#d8d0c8;
    font-size:18px; line-height:1;
    z-index:4;
  }
  .main{ padding-top:12px; }
  .hub{ min-height:0; padding-top:6px; }
}

