/* ============================================================
   TERMINALX999 - Cyber Admin Authentication Portal CSS
   Theme: Deep Cyber Void (#050508) + Neon Red (#ef4444) + White
   ============================================================ */

:root {
  --bg-void: #050508;
  --bg-card: rgba(14, 14, 20, 0.88);
  --bg-card-alt: rgba(20, 20, 28, 0.7);
  --accent-red: #ef4444;
  --accent-red-glow: rgba(239, 68, 68, 0.35);
  --accent-orange: #f97316;
  --accent-green: #22c55e;
  --accent-green-glow: rgba(34, 197, 94, 0.35);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(239, 68, 68, 0.4);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-void);
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Hide scrollbar ── */
html::-webkit-scrollbar, body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* ── Background Cyber Grid & Canvas ── */
.auth-bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.auth-bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  background-image: 
    linear-gradient(rgba(239, 68, 68, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(239, 68, 68, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.3) 70%, transparent 100%);
}

.auth-ambient-glow {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  filter: blur(60px);
}

/* ── HUD Top Navbar ── */
.auth-hud-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: rgba(5, 5, 8, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.hud-brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.hud-brand-icon {
  font-size: 16px;
  color: var(--accent-red);
  filter: drop-shadow(0 0 8px var(--accent-red));
}

.hud-brand-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #ffffff;
  font-family: var(--font-mono);
}

.hud-security-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #4ade80;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 3px;
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hud-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  animation: hudDotPulse 2s infinite;
}

@keyframes hudDotPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.hud-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hud-audio-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.hud-audio-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--accent-red);
  color: #ffffff;
}

.hud-return-link {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 14px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.hud-return-link:hover {
  background: var(--accent-red);
  border-color: var(--accent-red);
  box-shadow: 0 0 15px var(--accent-red-glow);
  transform: translateY(-1px);
}

/* ── Main Layout Container ── */
.auth-page-wrapper {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  padding: 85px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.auth-layout-grid {
  width: 100%;
  max-width: 1140px;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 28px;
  align-items: stretch;
}

/* ── Common Card Base ── */
.auth-glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(239, 68, 68, 0.08);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.auth-glass-card:hover {
  border-color: rgba(239, 68, 68, 0.3);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 35px var(--accent-red-glow);
}

/* Corner Cyber Accent */
.card-corner-tag {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 34px 34px 0;
  border-color: transparent var(--accent-red) transparent transparent;
  opacity: 0.6;
}

/* ============================================================
   LEFT COLUMN: SIMULATED AUTOMATED AUTHENTICATOR
   ============================================================ */
.sim-card {
  border-color: rgba(255, 255, 255, 0.1);
}

.sim-titlebar {
  background: rgba(10, 10, 15, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.sim-dots {
  display: flex;
  gap: 6px;
}

.sim-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.sim-dot-red { background: #ef4444; }
.sim-dot-yellow { background: #f97316; }
.sim-dot-green { background: #22c55e; }

.sim-titlebar-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.sim-mode-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--accent-red);
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 3px;
  padding: 2px 6px;
  font-weight: 700;
}

.sim-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.sim-header-desc {
  margin-bottom: 18px;
}

.sim-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-orange);
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.sim-heading {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.sim-subtext {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Simulated Interface Box */
.sim-viewport {
  background: rgba(8, 8, 12, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 5px;
  padding: 16px 18px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.sim-field {
  margin-bottom: 12px;
}

.sim-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
}

.sim-input-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 9px 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #ffffff;
  display: flex;
  align-items: center;
  min-height: 38px;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sim-input-box.typing {
  border-color: var(--accent-red);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.2);
}

.sim-cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--accent-red);
  margin-left: 2px;
  animation: cursorBlink 0.9s infinite;
  vertical-align: middle;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Simulated Sign-In Button */
.sim-btn-mock {
  width: 100%;
  padding: 10px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 4px;
  color: #ff6b6b;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  margin-top: 6px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}

.sim-btn-mock.active-press {
  background: var(--accent-red);
  color: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 0 20px var(--accent-red-glow);
  transform: scale(0.98);
}

/* Simulated Result Overlay (Tick / Cross) */
.sim-outcome-banner {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid transparent;
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sim-outcome-banner.visible {
  opacity: 1;
  transform: translateY(0);
}

.sim-outcome-banner.status-success {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
}

.sim-outcome-banner.status-error {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.25);
  animation: simShake 0.35s ease;
}

@keyframes simShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.outcome-badge-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  flex-shrink: 0;
}

.status-success .outcome-badge-icon {
  background: #22c55e;
  color: #050508;
  box-shadow: 0 0 12px #22c55e;
}

.status-error .outcome-badge-icon {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 12px #ef4444;
}

.outcome-details {
  flex: 1;
  min-width: 0;
}

.outcome-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.status-success .outcome-title { color: #4ade80; }
.status-error .outcome-title { color: #ff6b6b; }

.outcome-desc {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Simulator Telemetry Bottom Bar */
.sim-telemetry-bar {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
}

.telemetry-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.telemetry-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-red);
}

/* ============================================================
   RIGHT COLUMN: REAL FUNCTIONAL CYBER SIGN-IN CARD
   ============================================================ */
.real-auth-card {
  padding: 32px 36px;
  border-color: rgba(239, 68, 68, 0.25);
}

.auth-header {
  text-align: center;
  margin-bottom: 26px;
}

.auth-lock-shield {
  width: 58px;
  height: 58px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--accent-red);
  margin-bottom: 14px;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
  transition: transform 0.3s, box-shadow 0.3s;
}

.auth-lock-shield:hover {
  transform: scale(1.06);
  box-shadow: 0 0 25px var(--accent-red-glow);
}

.auth-brand-name {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #ffffff;
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.auth-brand-sub {
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Server Error Alert */
.auth-error-alert {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid var(--accent-red);
  border-radius: 4px;
  padding: 10px 14px;
  margin-bottom: 18px;
  color: #ff6b6b;
  font-size: 12px;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
  animation: simShake 0.35s ease;
}

/* Form Groups & Inputs */
.auth-form-group {
  margin-bottom: 16px;
}

.auth-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-prefix {
  position: absolute;
  left: 12px;
  font-size: 13px;
  color: var(--text-dim);
  pointer-events: none;
}

.auth-form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 11px 14px 11px 36px;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
}

.auth-form-control:focus {
  border-color: var(--accent-red);
  background: rgba(239, 68, 68, 0.03);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.25);
}

.auth-form-control::placeholder {
  color: #475569;
}

/* Password Toggle Eye Button */
.password-toggle-btn {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px 6px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.password-toggle-btn:hover {
  color: #ffffff;
}

/* Remember Me & Auxiliary Row */
.auth-aux-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.auth-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.auth-custom-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-red);
  cursor: pointer;
  border-radius: 3px;
}

.auth-session-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

/* High-Impact Submit Button */
.auth-submit-btn {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 0 22px var(--accent-red-glow);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.auth-submit-btn:hover {
  background: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.55);
  transform: translateY(-1px);
}

.auth-submit-btn:active {
  transform: translateY(1px);
}

.auth-submit-btn.submitting {
  pointer-events: none;
  opacity: 0.85;
}

.auth-card-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px dashed rgba(255, 255, 255, 0.07);
  text-align: center;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  line-height: 1.5;
}

/* ── Global Footer ── */
.auth-global-footer {
  position: relative;
  z-index: 10;
  margin-top: 24px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #475569;
  letter-spacing: 0.06em;
}

.hud-link-text-mobile {
  display: none;
}

/* ============================================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ============================================================ */
@media (max-width: 960px) {
  .auth-layout-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    gap: 22px;
  }
  .real-auth-card {
    padding: 24px 20px;
    order: 1 !important;
  }
  .sim-card {
    order: 2 !important;
  }
  .sim-body {
    padding: 16px;
  }
}

@media (max-width: 600px) {
  .auth-hud-nav {
    padding: 0 12px;
    height: 50px;
  }
  .hud-brand-title {
    font-size: 11.5px;
    letter-spacing: 0.04em;
  }
  .hud-security-badge {
    display: none;
  }
  .hud-actions {
    gap: 6px;
  }
  .hud-audio-btn {
    padding: 5px 8px;
    font-size: 10px;
  }
  .hud-return-link {
    padding: 5px 10px;
    font-size: 10px;
  }
  .hud-link-text {
    display: none !important;
  }
  .hud-link-text-mobile {
    display: inline !important;
  }
  .auth-page-wrapper {
    padding: 68px 12px 24px;
  }
  .real-auth-card {
    padding: 20px 16px;
  }
  .auth-brand-name {
    font-size: 19px;
  }
  .sim-viewport {
    padding: 12px 14px;
  }
}
