/* ========================================
   AI DEMO CENTER - Authentik Login Theme
   Cyberpunk/Futuristic Command Center

   Mounted into Authentik at /web/dist/custom.css
   ======================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;900&family=Rajdhani:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap');

/* ---- Variables ---- */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #0d0d14;
  --bg-tertiary: #12121a;
  --bg-card: #15151f;
  --accent-primary: #00f0ff;
  --accent-secondary: #ff00aa;
  --accent-tertiary: #7b2dff;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.4);
  --glow-primary: 0 0 20px rgba(0, 240, 255, 0.5);
  --border-color: rgba(0, 240, 255, 0.2);
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
}

/* ---- Page Background ---- */
.pf-c-login,
.pf-c-background-image {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(0, 240, 255, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(255, 0, 170, 0.08) 0%, transparent 50%),
    var(--bg-primary) !important;
}

/* Hide the "Background image" attribution link at bottom of login page */
.pf-c-login__footer a[href*="unsplash"],
.pf-c-login__footer .ak-flow-background-link,
a.ak-flow_background {
  display: none !important;
}

/* Grid overlay */
.pf-c-login::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
  animation: gridPulse 8s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

/* Scan lines */
.pf-c-login::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent 50%, rgba(0, 240, 255, 0.02) 50%);
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 0;
}

/* ---- Typography ---- */
body,
.pf-c-login {
  font-family: var(--font-body) !important;
  color: var(--text-primary) !important;
}

/* ---- Login Card ---- */
.pf-c-login__main {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
  box-shadow:
    0 0 30px rgba(0, 240, 255, 0.1),
    0 0 60px rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(10px) !important;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* Top glow line */
.pf-c-login__main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), var(--accent-tertiary), transparent);
}

/* ---- Layout: Title → GB10 Image → Tagline ---- */
.pf-c-login__main-header {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  padding-top: 1rem !important;
}

/* Title stays first */
.pf-c-login__main-header .pf-c-title {
  order: 1 !important;
  margin-bottom: 0.5rem !important;
}

/* GB10 image second (cropped to remove top/bottom whitespace) */
.pf-c-login__main-header::before {
  content: '';
  display: block;
  order: 2;
  width: 280px;
  height: 110px;
  margin-bottom: 0.25rem;
  background: url('/static/dist/assets/custom/dell-gb10.avif') center/cover no-repeat;
}

/* Tagline third */
.pf-c-login__main-header::after {
  content: 'Run exclusively on a Dell Pro Max GB10';
  display: block;
  order: 3;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

/* ---- Header / Branding ---- */
.pf-c-login__main-header,
.pf-c-login__header {
  text-align: center !important;
}

.pf-c-login__main-header .pf-c-title,
.pf-c-login__header .pf-c-title,
.pf-c-title {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  color: var(--accent-primary) !important;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5) !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
}

/* Hide the Authentik logo entirely */
.pf-c-brand,
.ak-brand {
  display: none !important;
}

/* ---- Form Labels ---- */
.pf-c-form__label-text,
label {
  font-family: var(--font-mono) !important;
  color: var(--text-secondary) !important;
  font-size: 0.85rem !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
}

/* ---- Input Fields ---- */
.pf-c-form-control,
input[type="text"],
input[type="password"],
input[type="email"] {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 6px !important;
  color: var(--text-primary) !important;
  font-family: var(--font-body) !important;
  font-size: 1rem !important;
  padding: 0.75rem 1rem !important;
  transition: all 0.2s ease !important;
}

.pf-c-form-control:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.3) !important;
  outline: none !important;
}

/* ---- Primary Button (Login) ---- */
.pf-c-button.pf-m-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary)) !important;
  border: none !important;
  border-radius: 6px !important;
  color: var(--bg-primary) !important;
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  padding: 0.75rem 2rem !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.pf-c-button.pf-m-primary:hover {
  box-shadow: var(--glow-primary) !important;
  transform: translateY(-1px);
  filter: brightness(1.1);
}

/* ---- Secondary / Link Buttons ---- */
.pf-c-button.pf-m-link,
.pf-c-button.pf-m-secondary {
  color: var(--accent-primary) !important;
  font-family: var(--font-body) !important;
  letter-spacing: 0.5px !important;
  transition: all 0.2s ease !important;
}

.pf-c-button.pf-m-link:hover,
.pf-c-button.pf-m-secondary:hover {
  color: var(--text-primary) !important;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.5) !important;
}

/* ---- Partner Logos (bottom of login card) ---- */
.pf-c-login__main-body::after {
  content: '';
  display: block;
  width: 100%;
  height: 40px;
  margin-top: 1rem;
  background:
    url('/static/dist/assets/custom/dell-logo.png') calc(50% - 90px) center / auto 40px no-repeat,
    url('/static/dist/assets/custom/nvidia-logo.png') calc(50% + 90px) center / auto 28px no-repeat;
  opacity: 0.7;
}

/* ---- Footer ---- */
.pf-c-login__main-footer,
.pf-c-login__footer {
  border-top: 1px solid var(--border-color) !important;
}

.pf-c-login__main-footer-links-item-link,
.pf-c-login__footer a {
  color: var(--text-muted) !important;
  font-family: var(--font-mono) !important;
  font-size: 0.75rem !important;
  letter-spacing: 1px !important;
  transition: color 0.2s ease !important;
}

.pf-c-login__main-footer-links-item-link:hover,
.pf-c-login__footer a:hover {
  color: var(--accent-primary) !important;
}

/* ---- Social / SSO Band ---- */
.pf-c-login__main-footer-band {
  background: var(--bg-tertiary) !important;
  border-top: 1px solid var(--border-color) !important;
}

/* ---- Alerts ---- */
.pf-c-alert {
  background: rgba(255, 51, 102, 0.1) !important;
  border: 1px solid rgba(255, 51, 102, 0.3) !important;
  border-radius: 6px !important;
  color: #ff3366 !important;
  font-family: var(--font-body) !important;
}

.pf-c-alert.pf-m-success {
  background: rgba(0, 255, 136, 0.1) !important;
  border-color: rgba(0, 255, 136, 0.3) !important;
  color: #00ff88 !important;
}

.pf-c-alert.pf-m-info {
  background: rgba(0, 240, 255, 0.1) !important;
  border-color: rgba(0, 240, 255, 0.3) !important;
  color: var(--accent-primary) !important;
}

/* ---- Checkbox ---- */
.pf-c-check__label {
  color: var(--text-secondary) !important;
  font-family: var(--font-body) !important;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent-primary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-secondary); }

/* ---- Selection ---- */
::selection {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .pf-c-login__main {
    margin: 1rem !important;
    border-radius: 8px !important;
  }
}
