/* ============================================================
   Innovative X — SuperAdmin Login
   FILE: login.css
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #000000;
  --bg2:     #050a0e;
  --surface: #080f16;
  --surface2:#0c1520;
  --border:  #0d2035;
  --border2: #1a3550;
  --blue:    #0f8fff;
  --blue2:   #1a6bff;
  --green:   #aaee00;
  --green2:  #88cc00;
  --text:    #e0f0ff;
  --text2:   #8ab0cc;
  --muted:   #3a6080;
  --error:   #ff4455;
  --success: #00dd88;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* ── Background ── */
/* Dot grid — static, zero CPU cost */
.bg-grid {
  position: fixed; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(15,143,255,0.18) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center center;
}

/* Center glow pulse + corner accents */
.bg-radial {
  position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 55% at 50% 50%, rgba(15,143,255,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 15% 20%, rgba(15,143,255,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 55% 45% at 85% 80%, rgba(170,238,0,0.05) 0%, transparent 60%);
  animation: centerPulse 6s ease-in-out infinite;
}
@keyframes centerPulse {
  0%, 100% { opacity: 0.7; }
  50%       { opacity: 1; }
}

.circuit-line { position: fixed; pointer-events: none; opacity: 0.15; }
.circuit-line.tl {
  top: 40px; left: 0; width: 200px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue));
}
.circuit-line.tl::after {
  content: ''; position: absolute; right: 0; top: -30px;
  width: 2px; height: 32px; background: var(--blue);
}
.circuit-line.br {
  bottom: 60px; right: 0; width: 180px; height: 2px;
  background: linear-gradient(270deg, transparent, var(--green));
}
.circuit-line.br::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 2px; height: 40px; background: var(--green);
}

/* ── Card ── */
.login-wrap {
  width: 100%; max-width: 460px;
  margin: 20px;
  position: relative;
  animation: fadeUp 0.6s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes fadeUp {
  from { opacity:0; transform:translateY(24px); }
  to   { opacity:1; transform:translateY(0); }
}

.top-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--blue2), var(--blue), var(--green), var(--green2));
  border-radius: 3px 3px 0 0;
  position: relative; overflow: hidden;
}
.top-bar::after {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 60%; height: 100%;
  background: rgba(255,255,255,0.4);
  animation: shimmer 3s ease-in-out infinite;
}
@keyframes shimmer { 0%{left:-60%} 100%{left:160%} }

.login-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-top: none;
  border-radius: 0 0 20px 20px;
  padding: 44px 42px 40px;
  box-shadow:
    0 0 0 1px rgba(15,143,255,0.05),
    0 20px 60px rgba(0,0,0,0.7),
    0 0 80px rgba(15,143,255,0.04);
}

/* ── Logo ── */
.logo-section {
  display: flex; flex-direction: column; align-items: center;
  margin-bottom: 36px;
}
.logo-img-wrap {
  width: 110px; height: 72px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.logo-img-wrap img {
  width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(15,143,255,0.4)) drop-shadow(0 0 24px rgba(170,238,0,0.2));
}
.brand-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 600; letter-spacing: 0.22em;
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 40px;
  padding: 8px 24px;
  text-transform: uppercase;
  box-shadow:
    0 0 10px rgba(0, 229, 255, 0.2),
    0 0 24px rgba(0, 229, 255, 0.1),
    inset 0 0 12px rgba(0, 229, 255, 0.05);
  animation: badgeGlow 3s ease-in-out infinite;
}
@keyframes badgeGlow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(0,229,255,0.2), 0 0 24px rgba(0,229,255,0.1), inset 0 0 12px rgba(0,229,255,0.05);
    border-color: rgba(0,229,255,0.35);
  }
  50% {
    box-shadow: 0 0 18px rgba(0,229,255,0.38), 0 0 40px rgba(0,229,255,0.18), inset 0 0 18px rgba(0,229,255,0.08);
    border-color: rgba(0,229,255,0.6);
  }
}

/* ── Divider ── */
.divider { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.divider-line { flex: 1; height: 1px; background: var(--border2); }
.divider-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--muted);
  letter-spacing: 0.1em; white-space: nowrap;
}

/* ── Heading ── */
.card-heading {
  font-size: 28px; font-weight: 700; letter-spacing: 0.03em; margin-bottom: 4px;
  background: linear-gradient(90deg, var(--text), var(--text2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.card-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--muted);
  letter-spacing: 0.08em; margin-bottom: 28px;
}

/* ── Form ── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em;
  color: var(--text2); margin-bottom: 8px; text-transform: uppercase;
}
.label-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--blue); }

.input-wrap { position: relative; }
.input-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--muted); display: flex; align-items: center;
  pointer-events: none; transition: color 0.2s;
}
.form-input {
  width: 100%;
  background: rgba(15,143,255,0.04);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 13px 44px 13px 44px;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  outline: none;
  transition: all 0.25s;
}
.form-input::placeholder { color: #1e3a55; }
.form-input:focus {
  border-color: var(--blue);
  background: rgba(15,143,255,0.07);
  box-shadow: 0 0 0 3px rgba(15,143,255,0.12);
}

.pass-toggle {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--muted); cursor: pointer;
  display: flex; align-items: center; transition: color 0.2s; padding: 2px;
}
.pass-toggle:hover { color: var(--blue); }

/* ── Meta Row ── */
.form-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 26px;
}
.remember { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.remember > span { font-size: 13px; color: var(--text2); }

/* IX Toggle */
.ix-toggle { position: relative; width: 40px; height: 22px; display: inline-block; flex-shrink: 0; }
.ix-toggle input { opacity: 0; width: 0; height: 0; }
.ix-toggle-slider {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 22px; transition: all 0.25s; cursor: pointer;
}
.ix-toggle-slider::before {
  content: ''; position: absolute;
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(255,255,255,0.3);
  left: 2px; top: 2px; transition: all 0.25s;
}
.ix-toggle input:checked + .ix-toggle-slider {
  background: rgba(15,143,255,0.18);
  border-color: var(--blue);
}
.ix-toggle input:checked + .ix-toggle-slider::before {
  transform: translateX(18px);
  background: var(--blue);
  box-shadow: 0 0 8px rgba(15,143,255,0.5);
}
.forgot { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--blue); text-decoration: none; transition: color 0.2s; }
.forgot:hover { color: var(--green); }

/* ── Login Button ── */
.btn-login {
  width: 100%; padding: 15px;
  background: linear-gradient(135deg, var(--blue2) 0%, var(--blue) 50%, var(--green2) 100%);
  border: none; border-radius: 10px;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px; font-weight: 700; letter-spacing: 0.1em;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  position: relative; overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  text-transform: uppercase;
}
.btn-login::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,0.12); opacity: 0; transition: opacity 0.2s;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 10px 35px rgba(15,143,255,0.4); }
.btn-login:hover::before { opacity: 1; }
.btn-login:active { transform: translateY(0); }
.btn-login.loading .btn-text,
.btn-login.loading .btn-arrow { display: none; }
.btn-login.loading .btn-loader { display: block; }
.btn-arrow { flex-shrink: 0; }
.btn-loader {
  display: none;
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ── */
.card-footer {
  margin-top: 24px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
}
.footer-item {
  display: flex; align-items: center; gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: var(--muted); letter-spacing: 0.08em;
}
.status-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 6px var(--green);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }
.footer-sep { color: var(--border2); font-size: 14px; }

/* ── OTP Modal ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 20px;
  width: 100%; max-width: 420px; margin: 20px;
  position: relative;
  box-shadow: 0 0 100px rgba(15,143,255,0.12), 0 40px 80px rgba(0,0,0,0.7);
  transform: scale(0.92) translateY(16px);
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
  overflow: hidden;
}
.modal-overlay.active .modal { transform: scale(1) translateY(0); }

.modal-topbar {
  height: 3px;
  background: linear-gradient(90deg, var(--green2), var(--green), var(--blue), var(--blue2));
}
.modal-body { padding: 36px 36px 32px; }

.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border2);
  border-radius: 8px; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); cursor: pointer; font-size: 13px;
  transition: all 0.2s;
}
.modal-close:hover { background: rgba(255,68,85,0.1); border-color: var(--error); color: var(--error); }

.modal-icon {
  width: 58px; height: 58px;
  background: linear-gradient(135deg, rgba(15,143,255,0.12), rgba(170,238,0,0.08));
  border: 1px solid rgba(15,143,255,0.2);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
  margin-bottom: 18px;
}
.modal h2 { font-size: 24px; font-weight: 700; letter-spacing: 0.03em; margin-bottom: 6px; }
.modal-desc {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; color: var(--muted); margin-bottom: 28px; line-height: 1.7;
}
.timer-text { color: var(--green); font-weight: 500; }

.otp-wrap { display: flex; gap: 10px; justify-content: center; margin-bottom: 24px; }
.otp-input {
  width: 54px; height: 60px;
  text-align: center; font-size: 24px; font-weight: 700;
  background: rgba(15,143,255,0.05);
  border: 1px solid var(--border2);
  border-radius: 12px;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  outline: none;
  transition: all 0.2s;
  caret-color: var(--blue);
}
.otp-input:focus {
  border-color: var(--blue);
  background: rgba(15,143,255,0.1);
  box-shadow: 0 0 0 3px rgba(15,143,255,0.15);
  transform: translateY(-2px);
}
.otp-input.filled { border-color: var(--green2); color: var(--green); }

.resend-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.resend-timer { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted); }
.resend-timer span { color: var(--green); }
.btn-resend {
  background: none; border: none;
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: var(--blue); cursor: pointer; transition: color 0.2s;
}
.btn-resend:hover { color: var(--green); }
.btn-resend:disabled { color: var(--muted); cursor: default; }

.btn-verify {
  width: 100%; padding: 15px;
  background: linear-gradient(135deg, var(--blue2), var(--blue), var(--green2));
  border: none; border-radius: 10px;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; font-weight: 700; letter-spacing: 0.15em;
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
  text-transform: uppercase;
}
.btn-verify:hover { transform: translateY(-2px); box-shadow: 0 10px 35px rgba(15,143,255,0.4); }

/* ── Toast ── */
.toast-container {
  position: fixed; bottom: 28px; right: 28px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 999; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 12px;
  font-size: 14px; font-weight: 600;
  color: var(--text);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  pointer-events: all;
  animation: toastIn 0.35s cubic-bezier(0.16,1,0.3,1) both;
  max-width: 320px;
}
.toast.hide { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn  { from{opacity:0;transform:translateX(60px)} to{opacity:1;transform:translateX(0)} }
@keyframes toastOut { from{opacity:1;transform:translateX(0)} to{opacity:0;transform:translateX(60px)} }
.toast.success { border-color: rgba(0,221,136,0.3); }
.toast.error   { border-color: rgba(255,68,85,0.3); }
.toast-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.toast.success .toast-dot { background: var(--success); box-shadow: 0 0 8px var(--success); }
.toast.error   .toast-dot { background: var(--error);   box-shadow: 0 0 8px var(--error); }
.toast.info    .toast-dot { background: var(--blue);    box-shadow: 0 0 8px var(--blue); }

/* ── Core Loader ── */
#ixLoader {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  z-index: 99999;
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
#ixLoader.show { opacity: 1; visibility: visible; }
#ixLoader img {
  width: 110px; height: 110px; object-fit: contain;
  animation: ixSpin 1.2s linear infinite;
  filter: drop-shadow(0 0 20px rgba(15,143,255,0.5)) drop-shadow(0 0 40px rgba(170,238,0,0.2));
}
@keyframes ixSpin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
.ix-loader-dots {
  display: flex; align-items: center; gap: 12px; margin-top: 28px;
}
.ix-ld {
  width: 11px; height: 11px; border-radius: 50%;
  animation: ixDotPulse 1.4s ease-in-out infinite;
}
.ix-ld-blue {
  background: #0f8fff;
  box-shadow: 0 0 8px #0f8fff, 0 0 20px rgba(15,143,255,0.6), 0 0 40px rgba(15,143,255,0.3);
}
.ix-ld-green {
  background: #aaee00;
  box-shadow: 0 0 8px #aaee00, 0 0 20px rgba(170,238,0,0.6), 0 0 40px rgba(170,238,0,0.3);
  animation-delay: 0.22s;
}
.ix-ld:nth-child(3) { animation-delay: 0.44s; }
@keyframes ixDotPulse {
  0%, 100% { transform: scale(0.6); opacity: 0.35; }
  50%       { transform: scale(1.3); opacity: 1; }
}

/* ── Center Alert Modal ── */
.ix-alert-overlay {
  position: fixed; inset: 0; z-index: 99998;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.ix-alert-overlay.show { opacity: 1; visibility: visible; }
.ix-alert-card {
  background: #080f16; border: 1px solid #1a2a3a;
  border-left: 4px solid #0f8fff;
  border-radius: 14px; width: 100%; max-width: 420px;
  overflow: hidden; transform: scale(0.94);
  transition: transform 0.25s ease;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.ix-alert-overlay.show .ix-alert-card { transform: scale(1); }
.ix-alert-card.success { border-left-color: #aaee00; }
.ix-alert-card.error   { border-left-color: #ff4455; }
.ix-alert-card.warning { border-left-color: #f59e0b; }
.ix-alert-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px; border-bottom: 1px solid #1a2a3a;
}
.ix-alert-title-wrap { display: flex; align-items: center; gap: 10px; }
.ix-alert-icon { font-size: 18px; }
.ix-alert-icon.success { color: #aaee00; }
.ix-alert-icon.error   { color: #ff4455; }
.ix-alert-icon.warning { color: #f59e0b; }
.ix-alert-icon.info    { color: #0f8fff; }
.ix-alert-title { font-size: 15px; font-weight: 700; color: #fff; }
.ix-alert-close {
  background: none; border: none; color: #4a6070;
  font-size: 16px; cursor: pointer; padding: 4px; line-height: 1; transition: color 0.2s;
}
.ix-alert-close:hover { color: #fff; }
.ix-alert-body { padding: 16px 20px; font-size: 13px; color: #8899aa; line-height: 1.6; }
.ix-alert-footer { padding: 8px 20px 18px; display: flex; justify-content: flex-end; }
.ix-alert-ok-btn {
  background: #0d1a24; border: 1px solid #1a2a3a;
  color: #fff; font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 9px 24px; border-radius: 6px; cursor: pointer; transition: all 0.2s;
}
.ix-alert-ok-btn:hover { border-color: #0f8fff; color: #0f8fff; }

/* ── Responsive ── */
@media (max-width: 520px) {
  .login-card { padding: 32px 22px 28px; }
  .otp-input { width: 44px; height: 52px; font-size: 20px; }
  .otp-wrap { gap: 7px; }
  .modal-body { padding: 28px 20px 24px; }
}
@media (max-width: 360px) {
  .otp-input { width: 38px; height: 46px; font-size: 18px; }
  .otp-wrap { gap: 5px; }
}
