/* AlphaCharts sign-in page — a faithful port of the Alpha GEX (Alpha UAV)
   sign-in page's design: same layout, same spacing, same states, same
   colour tokens (production :root values from alphagextool.com), the
   same grid background, glow, gradient title and wolf mark. Only the
   product name differs. The React gate inside the app (src/styles/
   login.css) carries the identical rules; keep the two in step. */

@font-face {
  font-family: 'Geist';
  src: url('/fonts/geist-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('/fonts/geist-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('/fonts/geist-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('/fonts/geist-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --background: 222 35% 3%;
  --foreground: 210 20% 93%;
  --card: 222 28% 6.5%;
  --primary: 189 94% 55%;
  --primary-foreground: 222 35% 6%;
  --muted: 222 22% 9%;
  --muted-foreground: 220 10% 55%;
  --border: 222 20% 12%;
  --destructive: 0 84% 65%;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: 'Geist', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}

.ac-login {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  position: relative;
  overflow: hidden;
  background-color: hsl(var(--background));
  background-image:
    linear-gradient(hsl(222 25% 16% / 0.4) 1px, transparent 1px),
    linear-gradient(90deg, hsl(222 25% 16% / 0.4) 1px, transparent 1px);
  background-size: 40px 40px;
}

.ac-login-orb {
  position: absolute;
  border-radius: 9999px;
  pointer-events: none;
  filter: blur(64px);
}
.ac-login-orb-a {
  width: 384px;
  height: 384px;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: hsl(var(--primary) / 0.05);
}
.ac-login-orb-b {
  width: 256px;
  height: 256px;
  bottom: 25%;
  left: 25%;
  background: hsl(217 91% 60% / 0.05);
}
/* The GEX register page carries only the first orb. */
.ac-login[data-mode='register'] .ac-login-orb-b { display: none; }

.ac-login-col {
  width: 100%;
  max-width: 384px;
  position: relative;
  z-index: 10;
}

.ac-login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
}

.ac-login-tile-wrap {
  position: relative;
  margin-bottom: 16px;
}

.ac-login-tile {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: hsl(var(--primary) / 0.1);
  border: 1px solid hsl(var(--primary) / 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px hsl(174 100% 45% / 0.15), 0 0 40px hsl(174 100% 45% / 0.05);
}

.ac-login-tile img {
  width: 40px;
  height: 40px;
  display: block;
}

.ac-login-tile-halo {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: hsl(var(--primary) / 0.05);
  filter: blur(24px);
  pointer-events: none;
}

.ac-login-title {
  margin: 0;
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
  background: linear-gradient(100deg, #67e8f9, #38bdf8 30%, #6366f1, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ac-login-sub {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: hsl(var(--muted-foreground));
}

.ac-login-card {
  background: hsl(var(--card) / 0.8);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 0 20px hsl(174 100% 45% / 0.15), 0 0 40px hsl(174 100% 45% / 0.05);
}

.ac-login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ac-login-label {
  display: block;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: hsl(var(--foreground) / 0.8);
  margin-bottom: 6px;
}

.ac-login-input {
  width: 100%;
  background: hsl(var(--muted));
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 20px;
  font-family: inherit;
  color: hsl(var(--foreground));
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ac-login-input::placeholder { color: hsl(var(--muted-foreground)); }

.ac-login-input:focus {
  outline: none;
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 1px hsl(var(--primary));
}

.ac-login-passwrap { position: relative; }
.ac-login-passwrap .ac-login-input { padding-right: 40px; }

.ac-login-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: hsl(var(--muted-foreground));
  transition: color 0.15s ease;
}
.ac-login-eye:hover { color: hsl(var(--foreground)); }
.ac-login-eye svg { width: 16px; height: 16px; }

.ac-login-error {
  margin: 0;
  font-size: 12px;
  line-height: 16px;
  color: hsl(var(--destructive));
}

.ac-login-note {
  margin: 0;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
  color: hsl(var(--muted-foreground));
}

.ac-login-submit {
  width: 100%;
  padding: 10px 0;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: hsl(var(--primary-foreground));
  background: linear-gradient(to right, hsl(var(--primary)), #60a5fa);
  transition: opacity 0.15s ease;
}
.ac-login-submit:hover { opacity: 0.9; }
.ac-login-submit:disabled { opacity: 0.5; cursor: default; }

.ac-login-foot {
  margin: 24px 0 0;
  text-align: center;
  font-size: 14px;
  line-height: 20px;
  color: hsl(var(--muted-foreground));
}

.ac-login-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  color: hsl(var(--primary));
  transition: color 0.15s ease;
}
.ac-login-link:hover { color: hsl(var(--primary) / 0.8); }
