/* ============================================================================
   VisionPro Admin Login · Linear-grade
   ============================================================================ */

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

html, body { height: 100%; }

.al-body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei UI", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #07090d;
  color: #eef2f8;
  line-height: 1.5;
  font-size: 14px;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }

/* ===== Layout ===== */
.al-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  min-height: 100vh;
}

/* ===== Left: Brand ===== */
.al-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px clamp(48px, 6vw, 96px);
  background: #05070a;
  overflow: hidden;
  min-width: 0;
}

/* Grid background */
.al-brand-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 90%);
  pointer-events: none;
  z-index: 0;
}

/* Glow orbs */
.al-brand-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.al-glow-1 {
  width: 480px;
  height: 480px;
  top: -120px;
  right: -120px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.4), transparent 70%);
}

.al-glow-2 {
  width: 360px;
  height: 360px;
  bottom: -100px;
  left: -100px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.35), transparent 70%);
}

.al-brand-inner {
  position: relative;
  z-index: 1;
  max-width: 520px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

/* Logo */
.al-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.al-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  position: relative;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 8px 24px rgba(59, 130, 246, 0.4);
  flex-shrink: 0;
}

.al-logo-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid #fff;
  border-radius: 3px;
  opacity: 0.9;
}

.al-logo-text {
  font-size: 16px;
  font-weight: 600;
}

.al-logo-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #60a5fa;
  text-transform: uppercase;
  margin-left: 4px;
}

/* Hero */
.al-brand-hero {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.al-brand-eyebrow {
  display: inline-flex;
  align-self: flex-start;
  padding: 5px 12px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #60a5fa;
  text-transform: uppercase;
}

.al-brand-title {
  font-size: clamp(40px, 4.2vw, 60px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: #eef2f8;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.al-brand-title-accent {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.al-brand-desc {
  font-size: 15px;
  line-height: 1.7;
  color: #8b95a8;
  max-width: 480px;
}

/* Features */
.al-brand-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.al-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.al-feature:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(59, 130, 246, 0.3);
}

.al-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  flex-shrink: 0;
}

.al-feature-body {
  flex: 1;
  min-width: 0;
}

.al-feature-title {
  font-size: 14px;
  font-weight: 600;
  color: #eef2f8;
  margin-bottom: 2px;
}

.al-feature-desc {
  font-size: 12.5px;
  color: #6b7280;
  line-height: 1.4;
}

/* Footer */
.al-brand-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #4b5563;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: auto;
}

.al-brand-footer-sep {
  color: #374151;
}

/* ===== Right: Form ===== */
.al-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px clamp(40px, 5vw, 96px);
  background: #0a0d13;
  position: relative;
  min-width: 0;
}

.al-form-inner {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Header */
.al-form-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.al-form-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 10px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #3b82f6;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.al-form-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.028em;
  color: #eef2f8;
  line-height: 1.2;
}

.al-form-subtitle {
  font-size: 14px;
  color: #8b95a8;
  line-height: 1.5;
}

/* Alert */
.al-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  font-size: 13px;
  color: #fca5a5;
  line-height: 1.5;
}

.al-alert svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* Form body */
.al-form-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.al-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.al-label {
  font-size: 13px;
  font-weight: 500;
  color: #9ca3af;
}

.al-field-hint {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

.al-field-hint a {
  color: #60a5fa;
  font-weight: 500;
}

.al-field-hint a:hover {
  text-decoration: underline;
}

/* Input */
.al-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.al-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  pointer-events: none;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.al-input-wrap input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 42px;
  background: #11151d;
  border: 1px solid #1f242f;
  border-radius: 10px;
  font-size: 14px;
  color: #eef2f8;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.al-input-wrap input::placeholder {
  color: #4b5563;
}

.al-input-wrap input:hover {
  border-color: #2a3140;
}

.al-input-wrap input:focus {
  border-color: #3b82f6;
  background: #151a24;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.al-input-wrap:focus-within .al-input-icon {
  color: #60a5fa;
}

/* Captcha */
.al-captcha-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.al-captcha-row .al-input-wrap {
  flex: 1;
  min-width: 0;
}

.al-captcha-img {
  height: 46px;
  width: 120px;
  border-radius: 10px;
  border: 1px solid #1f242f;
  cursor: pointer;
  transition: border-color 0.15s ease, opacity 0.15s ease;
  object-fit: cover;
  flex-shrink: 0;
  background: #11151d;
}

.al-captcha-img:hover {
  border-color: #3b82f6;
  opacity: 0.9;
}

/* Button */
.al-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  margin-top: 6px;
  padding: 0 20px;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  border: 1px solid #1e40af;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 4px 14px rgba(37, 99, 235, 0.3);
  letter-spacing: -0.01em;
}

.al-btn:hover {
  background: linear-gradient(180deg, #4f90f7 0%, #3b82f6 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.15) inset,
    0 6px 24px rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}

.al-btn:active {
  transform: translateY(0);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 2px 8px rgba(37, 99, 235, 0.3);
}

.al-btn svg {
  transition: transform 0.2s ease;
}

.al-btn:hover svg {
  transform: translateX(2px);
}

/* Secure note */
.al-secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  background: rgba(59, 130, 246, 0.04);
  border: 1px solid rgba(59, 130, 246, 0.12);
  border-radius: 8px;
  font-size: 12px;
  color: #60a5fa;
}

.al-secure-note svg {
  flex-shrink: 0;
  opacity: 0.7;
}

/* Footer */
.al-form-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 13px;
  color: #6b7280;
  padding-top: 4px;
}

.al-link {
  color: #9ca3af;
  transition: color 0.15s ease;
}

.al-link:hover {
  color: #60a5fa;
}

.al-divider {
  color: #374151;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #07090d; }
::-webkit-scrollbar-thumb { background: #2a3140; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3b82f6; }

/* ===== Focus visible ===== */
:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .al-wrap {
    grid-template-columns: 1fr;
  }
  .al-brand {
    display: none;
  }
  .al-form {
    min-height: 100vh;
    padding: 40px 24px;
    background: #07090d;
  }
  .al-form-inner {
    max-width: 380px;
  }
}

@media (max-width: 480px) {
  .al-form {
    padding: 32px 16px;
  }
  .al-form-title {
    font-size: 24px;
  }
  .al-captcha-img {
    width: 100px;
  }
}

/* ===== Entrance animation ===== */
@keyframes alFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.al-brand-inner > * {
  animation: alFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.al-brand-inner > *:nth-child(1) { animation-delay: 0.05s; }
.al-brand-inner > *:nth-child(2) { animation-delay: 0.1s; }
.al-brand-inner > *:nth-child(3) { animation-delay: 0.15s; }
.al-brand-inner > *:nth-child(4) { animation-delay: 0.2s; }

.al-form-inner > * {
  animation: alFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.al-form-inner > *:nth-child(1) { animation-delay: 0.1s; }
.al-form-inner > *:nth-child(2) { animation-delay: 0.15s; }
.al-form-inner > *:nth-child(3) { animation-delay: 0.2s; }
.al-form-inner > *:nth-child(4) { animation-delay: 0.25s; }
.al-form-inner > *:nth-child(5) { animation-delay: 0.3s; }

/* ===== Ring decoration (left panel) ===== */
.al-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 700px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.8;
}

/* ===== Eyebrow dot pulse ===== */
.al-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
  margin-right: 8px;
  box-shadow: 0 0 8px #3b82f6;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ===== Feature card with arrow ===== */
.al-feature {
  position: relative;
  padding-right: 44px;
}

.al-feature-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  color: #6b7280;
  font-size: 16px;
  opacity: 0;
  transition: all 0.2s ease;
}

.al-feature:hover .al-feature-arrow {
  opacity: 1;
  color: #60a5fa;
  transform: translateY(-50%) translateX(0);
}

/* ===== Password toggle ===== */
.al-toggle-pwd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 6px;
  color: #6b7280;
  cursor: pointer;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.al-toggle-pwd:hover {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.08);
}

.al-toggle-pwd:active {
  transform: translateY(-50%) scale(0.94);
}

/* Password input needs right padding for the toggle */
.al-input-wrap input[name="password"] {
  padding-right: 44px;
}

/* ===== Remember checkbox ===== */
.al-remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -4px;
  margin-bottom: 4px;
}

.al-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: #9ca3af;
  transition: color 0.15s ease;
}

.al-checkbox:hover {
  color: #eef2f8;
}

.al-checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.al-checkbox-box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: #11151d;
  border: 1px solid #1f242f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  color: transparent;
  flex-shrink: 0;
}

.al-checkbox input:checked + .al-checkbox-box {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

.al-checkbox input:focus-visible + .al-checkbox-box {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* ===== Button loading state ===== */
.al-btn.loading {
  pointer-events: none;
  opacity: 0.85;
}

.al-btn.loading .al-btn-label,
.al-btn.loading .al-btn-arrow {
  opacity: 0;
}

.al-btn-spinner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  opacity: 0;
}

.al-btn.loading .al-btn-spinner {
  opacity: 1;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Form shake on error ===== */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
  20%, 40%, 60%, 80% { transform: translateX(6px); }
}

.al-form-body.shake {
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* ===== Alert entrance ===== */
@keyframes alertSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

.al-alert {
  animation: alertSlide 0.25s ease both;
}

/* ===== Input focus glow enhancement ===== */
.al-input-wrap input:focus {
  border-color: #3b82f6;
  background: #151a24;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), 0 0 24px rgba(59, 130, 246, 0.08);
}

/* ===== Captcha smooth transition ===== */
.al-captcha-img {
  transition: all 0.2s ease;
}

.al-captcha-img:active {
  transform: scale(0.96);
}

