/* Vistrux client portal — only what Vistrux OS's app.css does not already
   cover: the sign-in screen, the logo in the rail, the project list, and a
   phone layout (clients open links on phones; the desktop app never needed one). */

[hidden]{ display:none!important; }
.brand-logo{ display:block; width:132px; height:auto; filter:brightness(0) invert(1); }
.rail-foot{ flex-direction:column; align-items:flex-start; gap:6px; }
.rail-foot .who{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:100%; color:rgba(255,255,255,.7); font-size:11px; }
.foot-links{ display:flex; gap:12px; flex-wrap:wrap; }
.linkbtn{ background:none; border:0; color:rgba(255,255,255,.7); cursor:pointer; font-size:10.5px; padding:0; }
.linkbtn:hover{ color:#fff; text-decoration:underline; }
.nav-item .nav-sub{ display:block; font-size:10.5px; color:rgba(255,255,255,.45); margin-top:1px; }
.nav-item{ flex-direction:column; align-items:flex-start; gap:0; }

/* ---------- sign-in ---------- */
.login{
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  padding:24px 16px; overflow-y:auto; height:100vh;
}
.login-card{
  width:100%; max-width:400px; background:var(--surface); border:1px solid var(--line);
  border-radius:8px; box-shadow:var(--shadow); padding:34px 30px 28px;
}
.login-card .logo{ width:150px; display:block; margin-bottom:6px; }
.login-card .eyebrow{ display:block; margin-bottom:22px; }
.login-card h2{ font-family:var(--f-head); font-weight:600; font-size:19px; margin:0 0 6px; color:var(--teal); }
.login-card p{ color:var(--muted); margin:0 0 18px; font-size:13px; }
.login-card .inp{ width:100%; margin-bottom:12px; }
.login-card .btn{ width:100%; justify-content:center; }
.login-msg{ margin-top:14px; font-size:12.5px; }
.login-foot{ margin-top:22px; font-size:11px; color:var(--muted); }

/* ---------- project list ---------- */
.proj-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:14px; }
.proj{ cursor:pointer; transition:border-color .12s; }
.proj:hover{ border-color:var(--teal); }
.proj .card-body{ display:flex; flex-direction:column; gap:6px; }
.proj-code{ font-family:var(--f-head); font-size:11px; font-weight:600; letter-spacing:.1em; color:var(--teal-2); }
.proj-title{ font-family:var(--f-head); font-weight:600; font-size:16px; line-height:1.3; }
.proj-meta{ display:flex; gap:10px; align-items:center; font-size:11.5px; color:var(--muted); }

.updated{ font-size:11.5px; color:var(--muted); }
.range-bar{ display:flex; flex-wrap:wrap; gap:10px 14px; align-items:flex-end; }
.range-bar .field{ margin:0; }
.range-bar .inp{ width:150px; }
.stage-hours{ cursor:pointer; }

/* ---------- phones ---------- */
@media (max-width:820px){
  body{ overflow:auto; }
  .app{ display:block; height:auto; }
  .rail{ height:auto; flex-direction:row; align-items:center; flex-wrap:wrap; }
  .brand{ padding:12px 16px; }
  .brand-logo{ width:96px; }
  .brand-sub{ display:none; }
  .nav{ display:none; }
  .rail-foot{ margin-left:auto; border-top:0; padding:10px 16px; align-items:flex-end; }
  .rail-foot .who{ display:none; }
  .main{ height:auto; }
  .view{ overflow:visible; padding:18px 16px 60px; }
  .tabs{ overflow-x:auto; flex-wrap:nowrap; }
  .tab{ white-space:nowrap; }
  .card-body.flush{ overflow-x:auto; }
  .range-bar .inp{ width:100%; }
  .range-bar .field{ flex:1 1 140px; }
}

/* ---------- welcome ---------- */
.welcome{ margin-bottom:16px; border-color:var(--teal); background:var(--teal-tint); }
.welcome .card-body{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.welcome-title{ font-family:var(--f-head); font-weight:600; font-size:15px; color:var(--teal); }
.proj-facts{ display:flex; gap:22px; margin:4px 0 2px; flex-wrap:wrap; }
.proj-facts > div{ display:flex; flex-direction:column; }
.proj-facts .eyebrow{ margin-bottom:1px; }
.proj-facts b{ font-family:var(--f-head); font-weight:600; font-size:15px; }

/* ---------- help panel ---------- */
.help-scrim{ position:fixed; inset:0; background:rgba(21,26,25,.28); z-index:300; }
.help{
  position:fixed; top:0; right:0; bottom:0; width:min(420px,100vw); z-index:301;
  background:var(--surface); border-left:1px solid var(--line); box-shadow:-8px 0 30px rgba(21,26,25,.12);
  display:flex; flex-direction:column;
}
.help-head{ display:flex; align-items:center; padding:18px 22px; border-bottom:1px solid var(--line); }
.help-head h3{ margin:0; font-family:var(--f-head); font-weight:600; font-size:16px; color:var(--teal); flex:1; }
.help-head .x{ background:none; border:0; font-size:15px; cursor:pointer; color:var(--muted); }
.help-body{ overflow-y:auto; padding:6px 22px 30px; }
.help-body h4{ font-family:var(--f-head); font-size:10px; font-weight:600; letter-spacing:.16em; text-transform:uppercase;
  color:var(--muted); margin:20px 0 10px; }
.help-body p{ margin:0 0 8px; font-size:13px; }
.help-row{ display:grid; grid-template-columns:118px 1fr; gap:12px; align-items:center; margin-bottom:9px; font-size:12.5px; }
.help-row > span:first-child{ justify-self:start; }

/* ---------- the tour, in Vistrux colours ---------- */
.driver-popover.vx-tour{
  background:var(--surface); color:var(--ink); border-radius:8px; border:1px solid var(--line);
  box-shadow:0 10px 30px rgba(21,26,25,.18); max-width:340px; padding:18px 18px 14px; font-family:var(--f-body);
}
.driver-popover.vx-tour .driver-popover-title{ font-family:var(--f-head); font-weight:600; font-size:15px; color:var(--teal); }
.driver-popover.vx-tour .driver-popover-description{ font-size:13px; line-height:1.55; color:var(--ink); margin-top:6px; }
.driver-popover.vx-tour .driver-popover-progress-text{ font-size:11px; color:var(--muted); }
.driver-popover.vx-tour .driver-popover-footer button{
  font-family:var(--f-body); font-size:12.5px; text-shadow:none; border-radius:var(--r);
  border:1px solid var(--line); background:var(--surface); color:var(--ink); padding:5px 12px;
}
.driver-popover.vx-tour .driver-popover-footer .driver-popover-next-btn{ background:var(--teal); border-color:var(--teal); color:#fff; }
.driver-popover.vx-tour .driver-popover-close-btn{ color:var(--muted); }
.driver-popover.vx-tour .driver-popover-arrow-side-left.driver-popover-arrow{ border-left-color:var(--surface); }
.driver-popover.vx-tour .driver-popover-arrow-side-right.driver-popover-arrow{ border-right-color:var(--surface); }
.driver-popover.vx-tour .driver-popover-arrow-side-top.driver-popover-arrow{ border-top-color:var(--surface); }
.driver-popover.vx-tour .driver-popover-arrow-side-bottom.driver-popover-arrow{ border-bottom-color:var(--surface); }

/* ============ MOTION ============
   Short and quiet — 160 to 300 ms, easing out, no bounce. app.css turns every
   animation and transition off for anyone who asks for reduced motion. */
:root{ --ease:cubic-bezier(.2,.7,.2,1); }
@keyframes vxIn{ from{ opacity:0; transform:translateX(14px); } to{ opacity:1; transform:none; } }
@keyframes vxInLeft{ from{ opacity:0; transform:translateX(-14px); } to{ opacity:1; transform:none; } }
@keyframes vxUp{ from{ opacity:0; transform:translateY(8px); } to{ opacity:1; transform:none; } }
@keyframes vxFade{ from{ opacity:0; } to{ opacity:1; } }
@keyframes vxFadeOut{ from{ opacity:1; } to{ opacity:0; } }
@keyframes vxGrow{ from{ transform:scaleX(0); } to{ transform:scaleX(1); } }
@keyframes vxSweep{ from{ stroke-dashoffset:100; } to{ stroke-dashoffset:0; } }
@keyframes vxSlideIn{ from{ transform:translateX(100%); } to{ transform:none; } }
@keyframes vxSlideOut{ from{ transform:none; } to{ transform:translateX(100%); } }
@keyframes vxPop{ from{ opacity:0; transform:translateY(6px) scale(.97); } to{ opacity:1; transform:none; } }
@keyframes vxShimmer{ from{ background-position:100% 0; } to{ background-position:0 0; } }

/* pages: slide in from the side they were reached from; cards rise in turn */
.view-inner.enter{ animation:vxIn .28s var(--ease) both; }
.view-inner.enter.from-left{ animation-name:vxInLeft; }
.enter .card, .tab-enter .card{ animation:vxUp .32s var(--ease) both; }
.tab-enter{ animation:vxFade .22s ease-out both; }

/* bars fill, donuts draw round, their labels follow */
.enter .bar > i, .tab-enter .bar > i, .pane-enter .bar > i{ transform-origin:left; animation:vxGrow .7s var(--ease) .1s both; }
.donut-sweep{ stroke-dashoffset:0; }
.enter .donut-sweep, .tab-enter .donut-sweep{ animation:vxSweep .9s var(--ease) .1s both; }
.enter .donut-lab, .tab-enter .donut-lab{ animation:vxFade .3s ease-out .75s both; }

/* tabs: one underline that glides */
.tabs{ position:relative; }
.tabs .tab.on{ border-bottom-color:transparent; }
.tab{ transition:color .15s; }
.tab-ink{ position:absolute; left:0; bottom:-1px; height:2px; width:0; background:var(--teal);
  border-radius:2px; transition:transform .3s var(--ease), width .3s var(--ease); pointer-events:none; }

/* work areas: the highlight slides to the area picked; its stages fade in */
.wk-list-body{ position:relative; }
.wk-item{ position:relative; z-index:1; transition:background-color .15s, border-color .15s; }
.wk-item.on{ background:transparent; border-color:transparent; }
.wk-ink{ position:absolute; top:0; left:6px; right:6px; z-index:0; border-radius:6px;
  background:var(--teal-tint); border:1px solid var(--teal);
  transition:transform .3s var(--ease), height .3s var(--ease); pointer-events:none; }
.pane-enter > *{ animation:vxFade .24s ease-out both; }

/* things you can touch respond to it */
.proj{ transition:transform .18s var(--ease), box-shadow .18s var(--ease), border-color .15s; }
.proj:hover{ transform:translateY(-2px); box-shadow:0 8px 24px rgba(21,26,25,.08); }
.btn{ transition:transform .08s, background-color .15s, border-color .15s, color .15s; }
.btn:active{ transform:scale(.97); }
.nav-item{ transition:background-color .15s, color .15s; }
.pill{ transition:background-color .15s, color .15s, border-color .15s; }

/* loading: the page's outline, shimmering */
.sk{ display:inline-block; border-radius:4px; vertical-align:middle;
  background:linear-gradient(90deg, var(--line-soft) 30%, #F8F6F1 50%, var(--line-soft) 70%);
  background-size:300% 100%; animation:vxShimmer 1.3s linear infinite; }
.sk-card{ min-height:420px; background:linear-gradient(90deg, var(--surface) 30%, #FBFAF7 50%, var(--surface) 70%);
  background-size:300% 100%; animation:vxShimmer 1.3s linear infinite; }

/* panels and pop-ups arrive and leave */
.help{ animation:vxSlideIn .28s var(--ease) both; }
.help-scrim{ animation:vxFade .2s ease-out both; }
#helpRoot.closing .help{ animation:vxSlideOut .2s ease-in both; }
#helpRoot.closing .help-scrim{ animation:vxFadeOut .2s ease-in both; }
.scrim{ animation:vxFade .18s ease-out both; }
.scrim .modal{ animation:vxPop .24s var(--ease) both; }
.scrim.closing{ animation:vxFadeOut .16s ease-in both; }
.login-card{ animation:vxUp .4s var(--ease) both; }
.welcome{ animation:vxUp .35s var(--ease) both; }
