/**
 * ADMIN-018 login — from html-dump/frontend/admin_login.html (U-019 live form pending)
 */
@import url("./demo-tokens.css");

* { box-sizing: border-box; margin: 0; padding: 0; }

body.login-body {
  font-family: var(--hy-font);
  background-color: #0F172A;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1E293B;
  overflow: hidden;
  position: relative;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.bg-lines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.bg-lines .line {
  position: absolute;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.15), rgba(6, 182, 212, 0.1), transparent);
  height: 1px;
  width: 200%;
  animation: lineMove linear infinite;
}
.bg-lines .line:nth-child(1) { top: 8%; animation-duration: 12s; }
.bg-lines .line:nth-child(2) { top: 18%; animation-duration: 15s; animation-delay: 2s; }
.bg-lines .line:nth-child(3) { top: 28%; animation-duration: 10s; animation-delay: 1s; }
.bg-lines .line:nth-child(4) { top: 38%; animation-duration: 14s; animation-delay: 3s; }
.bg-lines .line:nth-child(5) { top: 48%; animation-duration: 11s; animation-delay: 0.5s; }
.bg-lines .line:nth-child(6) { top: 58%; animation-duration: 13s; animation-delay: 2.5s; }
.bg-lines .line:nth-child(7) { top: 68%; animation-duration: 16s; animation-delay: 1.5s; }
.bg-lines .line:nth-child(8) { top: 78%; animation-duration: 9s; animation-delay: 4s; }
.bg-lines .vline {
  position: absolute;
  background: linear-gradient(180deg, transparent, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.08), transparent);
  width: 1px;
  height: 200%;
  animation: vlineMove linear infinite;
}
.bg-lines .vline:nth-child(9) { left: 10%; animation-duration: 14s; }
.bg-lines .vline:nth-child(10) { left: 25%; animation-duration: 11s; animation-delay: 2s; }
.bg-lines .vline:nth-child(11) { left: 40%; animation-duration: 16s; animation-delay: 1s; }
.bg-lines .vline:nth-child(12) { left: 55%; animation-duration: 12s; animation-delay: 3s; }
.bg-lines .vline:nth-child(13) { left: 70%; animation-duration: 13s; animation-delay: 0.5s; }
.bg-lines .vline:nth-child(14) { left: 85%; animation-duration: 15s; animation-delay: 2.5s; }

@keyframes lineMove {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0%); }
}
@keyframes vlineMove {
  0% { transform: translateY(-50%); }
  100% { transform: translateY(0%); }
}

.auth-wrapper {
  width: 100%;
  max-width: 480px;
  padding: 20px;
  position: relative;
  z-index: 10;
}
.auth-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(99, 102, 241, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  overflow: hidden;
  /* Demo scaleIn ends at scale(1); avoid leaving mid-animation for Diff */
  transform: scale(1);
  opacity: 1;
}
.form-group { margin-bottom: 20px; }
.auth-header {
  padding: 36px 36px 24px;
  text-align: center;
  border-bottom: 1px solid rgba(241, 245, 249, 0.8);
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.5), rgba(236, 254, 255, 0.3));
}
.auth-header .icon-box {
  width: 68px;
  height: 68px;
  background: linear-gradient(135deg, #4F46E5, #6366F1);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
  box-shadow: 0 8px 20px -4px rgba(79, 70, 229, 0.4);
}
.auth-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #1E293B;
}
.auth-header p {
  margin: 8px 0 0;
  font-size: 14px;
  color: #64748B;
}
.auth-body { padding: 28px 36px 36px; }
.auth-alert {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

.form-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.form-row .row-label {
  flex-shrink: 0;
  width: 80px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  text-align: right;
}
.form-row .row-input { flex: 1; position: relative; }
.input-wrapper { position: relative; }
/* Demo login.php: icon left inside input (padding-left 40px) */
.input-wrapper i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  font-size: 15px;
  pointer-events: none;
}
.input-wrapper .form-input { padding-left: 40px; }
.form-input.has-captcha { padding-right: 100px; }
.form-input {
  width: 100%;
  height: 44px;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  background: #FAFBFC;
  color: #1E293B;
}
.form-input:focus {
  border-color: #6366F1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
  background: #fff;
}
.form-input.has-captcha { padding-right: 100px; }
.captcha-text {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  color: #4F46E5;
  font-size: 15px;
  user-select: none;
  cursor: pointer;
  background: linear-gradient(135deg, #EEF2FF, #E0E7FF);
  padding: 5px 12px;
  border-radius: 8px;
  letter-spacing: 1px;
  border: 1px solid rgba(99, 102, 241, 0.15);
}
.btn-submit {
  width: 100%;
  height: 50px;
  background: linear-gradient(135deg, #4F46E5, #6366F1);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
  letter-spacing: 2px;
}
.btn-submit:hover {
  background: linear-gradient(135deg, #4338CA, #4F46E5);
  box-shadow: 0 8px 20px -4px rgba(79, 70, 229, 0.4);
}
.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: #94A3B8;
}
.card-bottom-line {
  height: 3px;
  background: linear-gradient(90deg, #4F46E5, #06B6D4, #8B5CF6, #4F46E5);
  background-size: 300% 100%;
}
