:root { color-scheme: dark; }
* { box-sizing: border-box; }
html, body, #app { min-height: 100%; margin: 0; }
body {
  font-family: Rajdhani, ui-sans-serif, system-ui, sans-serif;
  background: #0b1220;
  color: #e2ebf5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input { font-family: inherit; }
.page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  background: #0b1220;
}
.hero-radial {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 90% 55% at 50% 110%, rgba(232,61,42,0.14), transparent 58%),
    radial-gradient(ellipse 55% 35% at 50% -5%, rgba(232,61,42,0.2), transparent 70%),
    radial-gradient(ellipse 40% 60% at 0% 50%, rgba(11,18,32,0.95), transparent),
    radial-gradient(ellipse 40% 60% at 100% 50%, rgba(11,18,32,0.95), transparent),
    linear-gradient(180deg, #0a111c 0%, #0b1220 42%, #0a111c 100%);
}
.grid-steel {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: .32;
  background-color: transparent;
  background-image:
    linear-gradient(rgba(107,145,188,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(107,145,188,0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.35) 12%, rgba(0,0,0,.85) 28%, rgba(0,0,0,.85) 72%, rgba(0,0,0,.35) 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.35) 12%, rgba(0,0,0,.85) 28%, rgba(0,0,0,.85) 72%, rgba(0,0,0,.35) 88%, transparent 100%);
}
.scan-line {
  position: absolute;
  left: 18%;
  right: 18%;
  top: 33%;
  z-index: 2;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(232,61,42,.55), transparent);
  animation: pulse-line 3.2s ease-in-out infinite;
  pointer-events: none;
  opacity: .7;
}
@keyframes pulse-line {
  0%, 100% { opacity: .25; }
  50% { opacity: .75; }
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-rise { animation: rise-in .55s ease-out both; }
.animate-rise-delay { animation: rise-in .7s .12s ease-out both; }
.login-side-art {
  display: none;
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 3;
  width: clamp(260px, 34vw, 480px);
  pointer-events: none;
  overflow: hidden;
  background: transparent;
}
.login-side-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  opacity: 1;
  filter: saturate(1.02) brightness(0.96);
  -webkit-user-drag: none;
  user-select: none;
}
.login-side-art-left {
  left: 0;
}
.login-side-art-left img {
  object-position: 42% bottom;
  mask-image: linear-gradient(to right, #000 0%, #000 62%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 62%, transparent 100%);
}
.login-side-art-right {
  right: 0;
}
.login-side-art-right img {
  object-position: 58% bottom;
  mask-image: linear-gradient(to left, #000 0%, #000 62%, transparent 100%);
  -webkit-mask-image: linear-gradient(to left, #000 0%, #000 62%, transparent 100%);
}
.login-side-fade {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    linear-gradient(to right,
      #0b1220 0%,
      rgba(11,18,32,.92) 8%,
      rgba(11,18,32,.55) 16%,
      transparent 26%,
      transparent 74%,
      rgba(11,18,32,.55) 84%,
      rgba(11,18,32,.92) 92%,
      #0b1220 100%),
    linear-gradient(to top, #0b1220 0%, rgba(11,18,32,.75) 12%, transparent 28%);
}
@media (min-width: 1024px) {
  .login-side-art { display: block; }
}
@media (min-width: 1400px) {
  .login-side-art {
    width: clamp(300px, 36vw, 520px);
  }
}
.wrap {
  position: relative; z-index: 10;
  margin: 0 auto;
  min-height: 100vh;
  max-width: 32rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 1rem;
}
.brand {
  font-family: Orbitron, sans-serif;
  font-size: clamp(2.4rem, 6vw, 3.75rem);
  font-weight: 700;
  letter-spacing: .08em;
  text-align: center;
  margin: 0;
}
.ember { color: #e83d2a; }
.sub {
  margin: .75rem 0 0;
  text-align: center;
  color: #9bb6d6;
  font-size: 1.125rem;
}
.card {
  margin-top: 2.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(50,75,108,.8);
  background: rgba(21,32,51,.85);
  padding: 2rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 0 40px rgba(232,61,42,.25);
}
.muted { color: #9bb6d6; text-align: center; margin: 0 0 1.5rem; }
label { display: block; margin-bottom: 1rem; }
label span, .label {
  display: block;
  margin-bottom: .4rem;
  font-size: .9rem;
  font-weight: 600;
  color: #c5d6ea;
}
input {
  width: 100%;
  border-radius: .75rem;
  border: 1px solid #324b6c;
  background: rgba(11,18,32,.8);
  color: #fff;
  padding: .8rem 1rem;
  outline: none;
}
input:focus { border-color: #e83d2a; }
.pw { position: relative; }
.pw input { padding-right: 3.5rem; }
.pw button {
  position: absolute; right: 0; top: 0; bottom: 0;
  background: none; border: 0; color: #6b91bc;
  padding: 0 .75rem; font-size: .7rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
  opacity: 0;
}
.pw:hover button { opacity: 1; color: #ff6b55; }
.btn {
  width: 100%;
  border: 0;
  border-radius: .75rem;
  background: #e83d2a;
  color: #fff;
  padding: .85rem 1rem;
  font-family: Orbitron, sans-serif;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .08em;
  cursor: pointer;
}
.btn:hover { background: #c92818; }
.btn:disabled { opacity: .6; cursor: default; }
.btn.ghost {
  background: transparent;
  border: 1px solid #324b6c;
  margin-top: .75rem;
}
.error {
  margin-bottom: 1rem;
  border-radius: .5rem;
  background: rgba(232,61,42,.1);
  color: #ff6b55;
  padding: .6rem .75rem;
  font-size: .9rem;
}
.ok { color: #34d399; font-size: .95rem; }
.right { text-align: right; margin: -.5rem 0 1.5rem; }
.right a, .foot a { color: #ff6b55; font-weight: 600; text-decoration: none; }
.foot { text-align: center; margin: 1.5rem 0 0; color: #6b91bc; font-size: .9rem; }
.foot a { color: #fff; }
.foot a:hover { color: #ff6b55; }
.files { display: flex; flex-direction: column; gap: .75rem; }
.file {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  border: 1px solid #324b6c; border-radius: .75rem; padding: .9rem 1rem;
  background: rgba(11,18,32,.6);
}
.file button { width: auto; padding: .7rem 1rem; }
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  margin-bottom: 1rem; color: #9bb6d6; font-size: .95rem;
}
.topbar button {
  background: none; border: 0; color: #ff6b55; font-weight: 700; cursor: pointer;
}
.install-help {
  margin-top: 1.25rem;
  text-align: left;
  border: 1px solid #324b6c;
  border-radius: .75rem;
  background: rgba(11,18,32,.6);
  padding: .75rem 1rem;
}
.install-help summary {
  cursor: pointer;
  color: #f0b232;
  font-weight: 700;
}
.install-help-body {
  margin-top: .75rem;
  color: #b5bac1;
  font-size: .9rem;
  line-height: 1.45;
}
.install-help-body ol { margin: .5rem 0 .75rem 1.1rem; padding: 0; }
.install-help-body p { margin: .5rem 0; }
