/* Technaus Sales – motion layer: HUD logo, sign-in intro, boot splash, loaders and page animations.
   Brand: navy #10233e / #22274f, sky #088ac2, globe #88d0f0. Everything calms down under prefers-reduced-motion. */
:root { --hud-a: #88d0f0; --hud-b: #088ac2; --hud-navy: #0a1a30; --ease-out: cubic-bezier(.16, 1, .3, 1); }
.mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }

/* =============================================================== HUD (globe in rings) */
.hud { position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.hud-lg { width: min(440px, 70vw); } .hud-md { width: 240px; } .hud-sm { width: 92px; }
.hud-rings { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hud .ring { fill: none; stroke: var(--hud-a); stroke-width: 1.2; opacity: .55; }
.hud .ring.faint { opacity: .16; }
.hud .ring.ticks { stroke-dasharray: 1 9.85; stroke-width: 7; opacity: .28; }
.hud .ring.dash { stroke-dasharray: 22 8 4 8; opacity: .35; stroke-width: 1.5; }
.hud .ring.thin { stroke-width: .8; opacity: .45; }
.hud .ring.draw { stroke-dasharray: 100; stroke-dashoffset: 100; animation: hud-draw 1.4s var(--ease-out) .15s forwards; }
.hud .arc { fill: none; stroke-width: 3; stroke-linecap: round; opacity: .9; }
.hud .arc.thick { stroke: var(--hud-a); stroke-width: 5; opacity: .55; }
.hud .node { fill: #d8f1fc; filter: drop-shadow(0 0 6px #88d0f0); }
.hud .node.dim { opacity: .5; }
.hud .cross path { stroke: var(--hud-a); stroke-width: 1.4; opacity: .5; fill: none; }
.hud .sweep-fill { fill: #88d0f0; opacity: .07; }
.hud .sweep { transform-origin: 200px 200px; animation: hud-spin 6s linear infinite; }
.hud .r { transform-origin: 200px 200px; opacity: 0; animation: hud-in .9s var(--ease-out) forwards; }
.hud .r1 { animation-delay: 0s; } .hud .r2 { animation-delay: .12s; } .hud .r3 { animation-delay: .24s; } .hud .r4 { animation-delay: .36s; }
.hud .r1 { --spin: 80s; } .hud .r2 { --spin: 22s; } .hud .r3 { --spin: -34s; } .hud .r4 { --spin: 14s; }
.hud.live .r { animation: hud-in .9s var(--ease-out) forwards, hud-rot var(--spin) linear infinite; }
.hud .hud-core { animation: hud-breathe 3.2s ease-in-out infinite; transform-origin: 200px 200px; }
.hud-globe { position: relative; width: 40%; height: 40%; object-fit: contain; border-radius: 50%;
  filter: drop-shadow(0 0 18px rgba(136, 208, 240, .55)); animation: globe-in 1.1s var(--ease-out) .35s both, globe-float 6s ease-in-out 1.6s infinite; }
@keyframes hud-draw { to { stroke-dashoffset: 0; } }
@keyframes hud-in { from { opacity: 0; transform: scale(.82) rotate(-25deg); } to { opacity: 1; transform: none; } }
@keyframes hud-rot { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes hud-spin { to { transform: rotate(360deg); } }
@keyframes hud-breathe { 50% { transform: scale(1.12); opacity: .7; } }
@keyframes globe-in { from { opacity: 0; transform: scale(.3) rotate(-120deg); filter: blur(10px) drop-shadow(0 0 0 transparent); }
  60% { opacity: 1; filter: blur(0) drop-shadow(0 0 34px rgba(136,208,240,.95)); } to { opacity: 1; transform: none; } }
@keyframes globe-float { 50% { transform: translateY(-5px) rotate(8deg); } }
.hud-sm .ring.ticks, .hud-sm .cross, .hud-sm .sweep, .hud-sm .arc.thick { display: none; }
.hud-sm .ring { stroke-width: 3; opacity: .7; }
.hud-sm .hud-globe { width: 46%; height: 46%; animation: globe-in .6s var(--ease-out) both, hud-spin 2.4s linear infinite; }

/* =============================================================== sign-in page
   One full-screen stage. Act 1 (about 3 s): the HUD, globe and wordmark play large in the centre.
   Act 2 (body.settled, added by motion.js): the logo shrinks and lifts, and the sign-in card rises in below. */
body.login-page { margin: 0; min-height: 100vh; color: var(--ink); overflow-x: hidden;
  background: radial-gradient(70% 60% at 50% 38%, #15375f 0%, #0d2442 45%, #081527 100%) fixed; }
.lp-bg { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.lp-particles { position: absolute; inset: 0; width: 100%; height: 100%; }
.lp-grid { position: absolute; inset: -50%; opacity: .12;
  background-image: linear-gradient(rgba(136,208,240,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(136,208,240,.5) 1px, transparent 1px);
  background-size: 46px 46px; transform: perspective(700px) rotateX(58deg) translateY(18%);
  mask-image: radial-gradient(50% 50% at 50% 50%, #000 20%, transparent 75%); animation: grid-move 14s linear infinite; }
@keyframes grid-move { to { background-position: 0 46px, 0 0; } }
.lp { position: relative; z-index: 1; min-height: 100vh; box-sizing: border-box; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 40px 16px 70px; }
.lp-intro { display: flex; flex-direction: column; align-items: center; gap: 26px; transition: gap 1s var(--ease-out); }
.hud-lg { width: min(440px, 72vw); transition: width 1.1s var(--ease-out); }
.lp-word { position: relative; overflow: hidden; height: 50px; aspect-ratio: 412 / 92; clip-path: inset(0 100% 0 0);
  animation: word-wipe 1s var(--ease-out) 1.25s forwards; transition: height 1.1s var(--ease-out); }
.lp-word-img { position: absolute; inset: 0; background-repeat: no-repeat; background-size: auto 100%; background-position: right center; }
.lp-sheen { position: absolute; top: -20%; bottom: -20%; width: 34%; left: -40%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent); animation: sheen-pass 1.4s ease 2.1s both; }
@keyframes word-wipe { to { clip-path: inset(0 0 0 0); } }
@keyframes sheen-pass { from { left: -40%; } to { left: 120%; } }
.lp-lines { display: grid; gap: 8px; justify-items: center; min-height: 72px; transition: min-height 1s var(--ease-out); }
.lp-line { font: 500 12.5px/1.2 "JetBrains Mono", monospace; letter-spacing: .22em; color: #bfe6f7; white-space: nowrap;
  max-height: 20px; transition: max-height .8s var(--ease-out), opacity .6s, margin .8s; }
.lp-line.dim { color: #6fa9c6; } .lp-line.ok { color: #7ee2a8; }
.lp-line.typing::after { content: "▍"; animation: blink .8s steps(1) infinite; margin-left: 2px; color: var(--hud-a); }
.lp-corner { position: fixed; width: 42px; height: 42px; border: 2px solid rgba(136, 208, 240, .45); opacity: 0; animation: fade .6s ease 1.6s forwards; z-index: 0; }
.lp-corner.tl { top: 22px; left: 22px; border-right: 0; border-bottom: 0; } .lp-corner.tr { top: 22px; right: 22px; border-left: 0; border-bottom: 0; }
.lp-corner.bl { bottom: 22px; left: 22px; border-right: 0; border-top: 0; } .lp-corner.br { bottom: 22px; right: 22px; border-left: 0; border-top: 0; }
.lp-status { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; font-size: 11px; color: #6fa9c6; opacity: 0; animation: fade .6s ease 2s forwards; }
.blip { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #34d399; margin-right: 8px; box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: blip 1.8s ease-out infinite; }
@keyframes blip { 70% { box-shadow: 0 0 0 9px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }

/* the card waits, folded away, until the intro settles */
.lp-card { width: 100%; max-width: 440px; box-sizing: border-box; background: rgba(255,255,255,.96); border-radius: 20px; padding: 0 30px;
  box-shadow: 0 0 0 1px rgba(136,208,240,.25), 0 30px 80px -30px rgba(0,0,0,.6), 0 0 60px -20px rgba(136,208,240,.35);
  max-height: 0; opacity: 0; overflow: hidden; transform: translateY(40px) scale(.97); margin-top: 0;
  transition: max-height 1.2s var(--ease-out), opacity .8s ease .15s, transform 1s var(--ease-out) .1s, margin 1s var(--ease-out), padding 1s var(--ease-out); }
.lp-card h1 { font-size: 23px; letter-spacing: -.02em; color: #22274f; margin: 4px 0 6px; }
.lp-card .lead { color: var(--ink-2); margin: 0 0 16px; }
.lp-kicker { font-size: 11px; text-transform: uppercase; color: var(--hud-b); font-weight: 600; }
.lp-consultant { display: grid; grid-template-columns: 22px 1fr 16px; gap: 10px; align-items: center; margin-top: 18px; padding: 12px 14px;
  border-radius: 12px; background: #f3f7fc; color: var(--ink-2); font-size: 13.5px; transition: background .2s, transform .2s; }
.lp-consultant:hover { background: #e8f1fb; text-decoration: none; transform: translateX(2px); }
.lp-consultant .ic { color: var(--hud-b); } .lp-consultant .chev { transform: rotate(180deg); color: var(--muted); }
.lp-demo { margin-top: 22px; padding-top: 16px; border-top: 1px dashed var(--line); }
.lp-demo table.demo-list td { padding: 8px 2px; }

/* act 2 */
body.settled .hud-lg { width: 128px; }
body.settled .lp-intro { gap: 12px; }
body.settled .lp-word { height: 32px; }
body.settled .lp-lines { min-height: 0; }
body.settled .lp-line.dim, body.settled .lp-line.ok { max-height: 0; opacity: 0; margin-top: -8px; }
body.settled .lp-card { max-height: 1600px; opacity: 1; transform: none; margin-top: 26px; padding: 28px 30px 24px; overflow: visible; }
body.settled .lp { justify-content: flex-start; padding-top: 5vh; }
.lp { transition: padding 1.1s var(--ease-out); }
body.settled .hud .hud-globe { animation: globe-float 6s ease-in-out infinite; }

/* repeat visits (and after an error message): short intro */
body.login-page.quick .lp-word { animation-delay: .2s; } body.login-page.quick .lp-sheen { animation-delay: .6s; }
body.login-page.quick .lp-corner, body.login-page.quick .lp-status { animation-delay: .2s; }
@media (max-width: 600px) {
  .hud-lg { width: min(300px, 76vw); } .lp-word { height: 34px; } body.settled .hud-lg { width: 96px; } body.settled .lp-word { height: 26px; }
  .lp-line { font-size: 10.5px; letter-spacing: .14em; } .lp-card { padding: 0 20px; } body.settled .lp-card { padding: 22px 20px; }
  .lp-corner { display: none; }
}

/* =============================================================== boot splash (once per session, after sign-in) */
.boot { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; align-content: center; gap: 18px;
  background: radial-gradient(60% 60% at 50% 45%, #15375f, #081527); transition: opacity .55s ease, visibility .55s; }
.boot[hidden] { display: none; }
.boot.done { opacity: 0; visibility: hidden; }
.boot .boot-word { height: 30px; aspect-ratio: 412/92; background-repeat: no-repeat; background-size: auto 100%; background-position: right center;
  clip-path: inset(0 100% 0 0); animation: word-wipe .8s var(--ease-out) .5s forwards; }
.boot .boot-bar { width: 180px; height: 2px; background: rgba(136,208,240,.18); border-radius: 2px; overflow: hidden; }
.boot .boot-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #088ac2, #88d0f0); transform-origin: left; animation: grow 1.2s var(--ease-out) .2s both; }
.boot .boot-msg { font-size: 11px; color: #8cc3dc; }

/* =============================================================== loader overlay (replaces the sun) */
.tn-loading { background: rgba(10, 26, 48, .38) !important; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.tn-loading .tnl-card { background: rgba(10, 26, 48, .92); color: #d8f1fc; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5), 0 0 0 1px rgba(136,208,240,.2); }
.tn-loading .tnl-msg { color: #fff; } .tn-loading .tnl-sub { color: #8cc3dc; }
.tn-loading .hud-sm { margin: 0 auto 12px; }
#loadbar i { background: linear-gradient(90deg, #088ac2, #88d0f0, #2563eb) !important; box-shadow: 0 0 10px rgba(136,208,240,.8); }

/* =============================================================== office app */
body.staff .main { max-width: none; padding: 26px 34px 60px; }
@media (min-width: 1700px) { .dash-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
body.staff .side .logo .globe { animation: globe-in 1s var(--ease-out) both, globe-spin-slow 40s linear 1s infinite; }
@keyframes globe-spin-slow { to { transform: rotate(360deg); } }
body.staff .side nav a { animation: nav-in .55s var(--ease-out) both; animation-delay: calc(var(--n, 0) * 40ms + .1s); }
@keyframes nav-in { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }

/* panels rise one after another, with a light line sweeping across the head */
body.staff .main > .panel, body.staff .dash-grid > .panel, body.staff .detail > div > .panel, body.staff .detail > aside > .panel, body.staff .detail > .panel {
  animation: rise .6s var(--ease-out) both; animation-delay: calc(var(--p, 0) * 70ms + .05s); }
body.staff .panel { position: relative; transition: box-shadow .25s, transform .25s; }
body.staff .panel:hover { box-shadow: var(--lift-2); }
body.staff .panel-head { position: relative; overflow: hidden; }
body.staff .panel-head::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
  background: linear-gradient(90deg, transparent, #88d0f0, #088ac2, transparent); transform: translateX(-100%);
  animation: head-sweep 1.3s var(--ease-out) both; animation-delay: calc(var(--p, 0) * 70ms + .35s); }
@keyframes head-sweep { 0% { transform: translateX(-100%); opacity: 1; } 100% { transform: translateX(100%); opacity: 0; } }
body.staff table.list tbody tr.row-in { animation: row-slide .45s var(--ease-out) both; animation-delay: calc(min(var(--i, 0), 20) * 24ms + .15s); }
@keyframes row-slide { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
body.staff table.list tbody tr { transition: background .15s; }
body.staff table.list tbody tr[data-href]:hover { background: linear-gradient(90deg, #f1f7fd, #fbfdff); }
body.staff table.list tbody tr[data-href]:hover td:first-child { box-shadow: inset 3px 0 0 #088ac2; }

/* page title: gradient underline that draws in */
body.staff .page-head h1, body.staff .cand-head h1 { position: relative; display: inline-block; }
body.staff .page-head h1::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 3px; width: 42px; border-radius: 3px;
  background: linear-gradient(90deg, #088ac2, #88d0f0); transform-origin: left; animation: grow .8s var(--ease-out) .25s both; }

/* live dots and pulses */
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; margin-right: 6px; vertical-align: 1px; animation: blip 1.8s ease-out infinite; }
body.staff .stage.g-visit::before { animation: dot-pulse 2s ease-in-out infinite; }
@keyframes dot-pulse { 50% { transform: scale(1.6); opacity: .5; } }
.overdue { animation: warn-glow 2.4s ease-in-out infinite; }
@keyframes warn-glow { 50% { text-shadow: 0 0 10px rgba(180, 35, 24, .35); } }

/* in-table bars */
.bar { display: block; height: 8px; border-radius: 6px; background: #eef2f7; overflow: hidden; min-width: 60px; }
.bar i { display: block; height: 100%; width: var(--w, 0%); border-radius: 6px; background: linear-gradient(90deg, #088ac2, #88d0f0);
  transform-origin: left; animation: grow 1s var(--ease-out) both; animation-delay: calc(min(var(--i, 0), 20) * 30ms + .3s); position: relative; }
.bar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent);
  transform: translateX(-100%); animation: bar-shine 2.8s ease-in-out 1.4s infinite; }
@keyframes bar-shine { 60%, 100% { transform: translateX(100%); } }
.bar.ok i { background: linear-gradient(90deg, #15803d, #4ade80); }
.bar.warn i { background: linear-gradient(90deg, #a15c07, #fbbf24); }
.cell-bar { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 10px; }

/* dashboard hero band */
.hero { position: relative; overflow: hidden; border-radius: 18px; margin-bottom: 20px; padding: 26px 30px; color: #e6f5fc;
  background: radial-gradient(80% 140% at 85% 30%, #1a4474 0%, #10233e 55%, #0a1a30 100%); box-shadow: 0 20px 40px -24px rgba(10,26,48,.7);
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px; animation: rise .7s var(--ease-out) both; }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .12; pointer-events: none;
  background-image: linear-gradient(rgba(136,208,240,.6) 1px, transparent 1px), linear-gradient(90deg, rgba(136,208,240,.6) 1px, transparent 1px);
  background-size: 34px 34px; mask-image: linear-gradient(90deg, transparent, #000 60%); }
.hero h1 { color: #fff !important; font-size: 26px; margin: 0; }
.hero h1::after { display: none; }
.hero .hero-sub { color: #9fcde3; margin-top: 6px; font-size: 14px; }
.hero .hero-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; font-size: 14px; color: #cfe9f6; }
.hero .hero-facts b { font-size: 22px; color: #fff; font-weight: 650; margin-right: 6px; font-variant-numeric: tabular-nums; }
.hero .hero-facts .warnf b { color: #fcd34d; }
.hero .hud { width: 150px; margin: -18px -6px -18px 0; }
.hero .hero-clock { position: absolute; top: 16px; right: 190px; font-size: 11px; color: #8cc3dc; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } .hero .hud, .hero .hero-clock { display: none; } }

/* count-up numbers keep their width steady */
[data-count] { font-variant-numeric: tabular-nums; }

/* =============================================================== consultant mobile */
body.mobile .m-hello { position: relative; overflow: hidden; border-radius: 18px; padding: 20px 18px; margin-bottom: 6px; color: #e6f5fc;
  background: radial-gradient(90% 140% at 90% 20%, #1a4474, #10233e 60%, #0a1a30); animation: rise .6s var(--ease-out) both; }
body.mobile .m-hello h1 { color: #fff; }
body.mobile .m-hello p { color: #9fcde3 !important; margin-bottom: 0; }
body.mobile .m-hello .hud { position: absolute; right: -26px; top: 50%; transform: translateY(-50%); width: 130px; opacity: .9; }
body.mobile .m-row { animation: row-slide .5s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 50ms + .15s); }
body.mobile .m-card { animation: rise .55s var(--ease-out) both; animation-delay: calc(var(--p, 0) * 70ms); }

/* =============================================================== calm mode */
@media (prefers-reduced-motion: reduce) {
  .hud *, .hud-globe, .lp-grid, .lp-word, .lp-sheen, .lp-corner, .lp-status, .boot *, .bar i, .bar i::after,
  body.staff .panel, body.staff .panel-head::after, body.staff .side nav a, .overdue, .live-dot, .blip, .hero, body.mobile * {
    animation: none !important; }
  .lp-word, .boot .boot-word { clip-path: none; } .lp-corner, .lp-status { opacity: 1; transform: none; }
  .hud .ring.draw { stroke-dashoffset: 0; } .hud .r { opacity: 1; }
}
