/* TTI admin login — same visual language as the landing page */
:root {
  --bg: #05080f;
  --text: #eef3f7;
  --muted: #93a1b2;
  --dim: #5d6b7c;
  --line: rgba(255, 255, 255, .1);
  --teal: #31aec5;
  --green: #6fc08d;
  --lime: #d4de20;
  --err: #ff8a8a;
  --grad: linear-gradient(115deg, #d4de20 0%, #6fc08d 45%, #31aec5 100%);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/1.55 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden;
  background-image: radial-gradient(60% 70% at 25% 50%, rgba(49, 174, 197, .14), transparent 70%), radial-gradient(40% 50% at 90% 10%, rgba(212, 222, 32, .06), transparent 70%);
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 8px; }

.login-gl { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
.login-grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0%,100% { transform: translate(0,0) } 33% { transform: translate(-3%,2%) } 66% { transform: translate(2%,-3%) } }

.login { position: relative; z-index: 2; min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: 1.15fr minmax(380px, .85fr); }

/* ---- left: the drone-show logo ---- */
.login__visual { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 72px 48px 190px; }
.login__mark { width: min(40vh, 28vw); aspect-ratio: 1020 / 1220; position: relative; }
.login__fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; filter: drop-shadow(0 0 50px rgba(49, 174, 197, .45)); }
.no-webgl .login__fallback, .no-js .login__fallback { opacity: .9; }
.login__tagline { position: absolute; left: 48px; bottom: 48px; max-width: 30ch; }
.login__kicker { display: inline-flex; align-items: center; gap: 10px; font: 600 11px/1 "Space Grotesk", sans-serif; letter-spacing: .22em; text-transform: uppercase; color: var(--green); }
.login__kicker::before { content: ""; width: 26px; height: 1px; background: var(--grad); }
.login__tagline p { margin: 14px 0 0; font: 600 clamp(22px, 2.2vw, 30px)/1.15 "Space Grotesk", sans-serif; letter-spacing: -.02em; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login__coords { position: absolute; left: 48px; top: 40px; display: flex; flex-direction: column; gap: 6px; font: 500 11px/1 ui-monospace, monospace; color: var(--dim); letter-spacing: .06em; }

/* ---- right: glass card ---- */
.login__panel { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 18px; padding: 40px clamp(20px, 4vw, 56px); }
.login-card {
  position: relative; width: min(420px, 100%); padding: 36px 32px 28px; border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .025));
  border: 1px solid var(--line); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06);
  animation: cardIn .9s var(--ease) both .15s;
}
.login-card::before { /* gradient hairline */
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(212, 222, 32, .55), rgba(49, 174, 197, .15) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
.has-error .login-card { animation: cardIn .9s var(--ease) both .15s, shake .5s .9s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

.login-card__logo img { height: 28px; width: auto; display: block; }
.login-card__chip { display: inline-flex; align-items: center; gap: 8px; margin: 22px 0 0; padding: 7px 12px; border-radius: 99px; font-size: 13px; color: var(--muted); background: rgba(49, 174, 197, .1); border: 1px solid rgba(49, 174, 197, .3); }
.login-card__chip strong { color: var(--text); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgba(212, 222, 32, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(212, 222, 32, 0); } 100% { box-shadow: 0 0 0 0 rgba(212, 222, 32, 0); } }
.login-card__title { margin: 22px 0 6px; font: 600 30px/1.1 "Space Grotesk", sans-serif; letter-spacing: -.03em; }
.login-card__lead { margin: 0 0 22px; color: var(--muted); font-size: 14px; }
.login-card__foot { margin: 18px 0 0; text-align: center; font-size: 13px; color: var(--dim); }

.login-alert { padding: 11px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 16px; }
.login-alert--err { background: rgba(255, 120, 120, .1); border: 1px solid rgba(255, 120, 120, .35); color: #ffc2c2; }
.login-alert--ok { background: rgba(111, 192, 141, .12); border: 1px solid rgba(111, 192, 141, .35); color: #c4ecd2; }

/* floating-label fields */
.lfield { position: relative; margin-bottom: 14px; }
.lfield input {
  width: 100%; height: 58px; padding: 22px 16px 8px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(5, 8, 15, .55); color: var(--text); font: 500 16px/1 Inter, sans-serif; transition: border-color .3s, background .3s;
}
.lfield input:focus { outline: none; border-color: transparent; background: rgba(5, 8, 15, .75); }
.lfield label { position: absolute; left: 17px; top: 19px; color: var(--muted); font-size: 15px; pointer-events: none; transform-origin: left top; transition: transform .25s var(--ease), color .25s; }
.lfield input:focus + label, .lfield input:not(:placeholder-shown) + label { transform: translateY(-10px) scale(.78); color: var(--green); }
.lfield__line { position: absolute; inset: 0; border-radius: 14px; pointer-events: none; padding: 1.5px; background: var(--grad); opacity: 0; transition: opacity .3s;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.lfield input:focus ~ .lfield__line { opacity: 1; }
.has-error .lfield input { border-color: rgba(255, 138, 138, .45); }
.lfield__eye { position: absolute; right: 8px; top: 9px; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; z-index: 1; }
.lfield__eye:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.lfield__eye .slash { opacity: 0; }
.lfield__eye[aria-pressed="true"] .slash { opacity: 1; }
#password { padding-right: 52px; }
.login-caps { margin: -6px 0 12px; font-size: 12px; color: var(--lime); }
.login-caps[hidden] { display: none; }

.login-btn {
  position: relative; overflow: hidden; width: 100%; height: 54px; margin-top: 6px; border: 0; border-radius: 99px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--grad); color: #041015; font: 700 16px/1 "Space Grotesk", sans-serif;
  box-shadow: 0 12px 40px -10px rgba(111, 192, 141, .6); transition: transform .3s var(--ease), box-shadow .3s;
}
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 50px -10px rgba(49, 174, 197, .7); }
.login-btn svg { transition: transform .3s var(--ease); }
.login-btn:hover svg { transform: translateX(4px); }
.login-btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%); transform: translateX(-120%); }
.login-btn:hover::after { transform: translateX(120%); transition: transform .8s var(--ease); }
.is-launching .login-btn { pointer-events: none; }
.is-launching .login-btn__label::after { content: "…"; }
.is-launching .login-card { transform: translateY(-6px) scale(.99); opacity: .85; transition: transform .6s var(--ease), opacity .6s; }

.login-back { font-size: 13px; color: var(--dim); }
.login-back:hover { color: var(--text); }

/* ---- small screens: logo on top, card below ---- */
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login__visual { padding: 36px 20px 0; }
  .login__mark { width: 120px; }
  .login__tagline, .login__coords { display: none; }
  .login__panel { justify-content: flex-start; padding: 22px 16px 32px; }
  .login-card { padding: 28px 22px 22px; border-radius: 22px; }
  .login-card__title { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .001ms !important; }
  .login-grain { display: none; }
}

/* forgot / reset */
.login-row { display: flex; justify-content: flex-end; margin: -2px 0 14px; }
.login-row--center { justify-content: center; margin: 18px 0 0; }
.login-link { font-size: 13px; color: var(--green); }
.login-link:hover { color: var(--lime); text-decoration: underline; }
.login-sent { margin: 0; color: var(--muted); font-size: 14px; }
.lfield input[data-pw] { padding-right: 52px; }
.pw-meter { height: 4px; margin: -6px 2px 16px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--err); transition: width .3s var(--ease), background .3s; }
.pw-meter[data-level="2"] span { background: var(--lime); }
.pw-meter[data-level="3"] span { background: var(--green); }
.pw-meter[data-level="4"] span { background: var(--grad); }

/* Google sign-in */
.login-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; font-size: 12px; color: var(--dim); }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, .1); }
.login-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .04); color: var(--text); font: 600 15px/1 "Inter", sans-serif; text-decoration: none; transition: border-color .25s, background .25s; }
.login-google:hover { border-color: var(--teal); background: rgba(255, 255, 255, .07); }
.login-google:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
