/* ============================================================
   Innovative X — Bullion Admin
   FILE: index.css
   DESCRIPTION: All styles for the Bullion Admin login page
   TEAM: Do not add inline styles to index.html
         All design changes go here only
   ============================================================ */

/* ============================================================
   RESET & BOX MODEL
============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ============================================================
   CSS VARIABLES — Brand colors, surfaces, typography sizes
   Team: update --blue and --green if brand colors change
============================================================ */
:root {
  /* Brand Colors */
  --blue:      #0f8fff;
  --blue2:     #1a6bff;
  --green:     #aaee00;
  --green2:    #88cc00;

  /* Background Layers */
  --bg:        #000000;
  --bg2:       #050a0e;
  --surface:   #080f16;
  --surface2:  #0c1520;

  /* Borders */
  --border:    #0d2035;
  --border2:   #1a3550;

  /* Text */
  --text:      #e0f0ff;
  --text2:     #8ab0cc;
  --muted:     #3a6080;

  /* Status */
  --success:   #00dd88;
  --error:     #ff4455;
  --warning:   #ffaa00;
}

/* ============================================================
   BODY — Full screen centered layout
============================================================ */
body {
  font-family: 'Rajdhani', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* ============================================================
   BACKGROUND — Animated grid lines
============================================================ */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15,143,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,143,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridScroll 25s linear infinite;
  z-index: 0;
}

@keyframes gridScroll {
  from { transform: translateY(0); }
  to   { transform: translateY(60px); }
}

/* ============================================================
   BACKGROUND — Dual radial glow (blue left + green right)
============================================================ */
.bg-radial {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 15% 20%, rgba(15,143,255,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 80%, rgba(170,238,0,0.06) 0%, transparent 60%);
  z-index: 0;
}

/* ============================================================
   BACKGROUND — Corner circuit line decorations
============================================================ */
.circuit-line {
  position: fixed;
  pointer-events: none;
  opacity: 0.15;
  z-index: 0;
}

/* Top-left circuit line */
.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);
}

/* Bottom-right circuit line */
.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);
}

/* ============================================================
   LOGIN CARD WRAPPER — Centered container with fade-up animation
============================================================ */
.login-wrap {
  width: 100%;
  max-width: 460px;
  margin: 20px;
  position: relative;
  z-index: 1;
  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 ACCENT BAR — Gradient shimmer line above card
============================================================ */
.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;
}

/* Shimmer sweep animation */
.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 — Main card body
============================================================ */
.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 SECTION — Centered logo + badge
============================================================ */
.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: 10px;
}

.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));
}

/* BULLION ADMIN PANEL badge */
.brand-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
  background: rgba(15,143,255,0.06);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 4px 14px;
  text-transform: uppercase;
}

/* ============================================================
   DIVIDER — Horizontal line with centered label
============================================================ */
.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 + SUBTEXT
============================================================ */
.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 GROUPS
============================================================ */
.form-group {
  margin-bottom: 18px;
}

/* Field label */
.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;
}

/* Blue dot before label */
.label-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
}

/* ============================================================
   INPUT WRAPPER — Holds icon + input + optional toggle
============================================================ */
.input-wrap {
  position: relative;
}

/* Left icon inside input */
.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 15px;
  pointer-events: none;
  transition: color 0.2s;
  z-index: 1;
}

/* ============================================================
   FORM INPUT — Text and password fields
============================================================ */
.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;
  appearance: none;
  -webkit-appearance: none;
}

.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);
}

/* Icon color change on input focus */
.form-input:focus + .input-icon,
.input-wrap:focus-within .input-icon {
  color: var(--blue);
}

/* ============================================================
   SELECT DROPDOWN — Company selector
============================================================ */
.form-select {
  cursor: pointer;
  padding-right: 44px; /* space for custom arrow */
}

/* Custom dropdown arrow icon (right side) */
.select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 12px;
  pointer-events: none;
  transition: color 0.2s;
  z-index: 1;
}

/* Style dropdown options */
.form-select option {
  background: var(--surface2);
  color: var(--text);
  padding: 8px;
}

/* ============================================================
   PASSWORD TOGGLE BUTTON
============================================================ */
.pass-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  transition: color 0.2s;
  padding: 2px;
  z-index: 1;
}

.pass-toggle:hover {
  color: var(--blue);
}

/* ============================================================
   FORM META ROW — Remember me + Forgot password
============================================================ */
.form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.remember input {
  width: 14px;
  height: 14px;
  accent-color: var(--blue);
  cursor: pointer;
}

.remember span {
  font-size: 13px;
  color: var(--text2);
}

.forgot {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.04em;
}

.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: 'Rajdhani', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Hover shine overlay */
.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:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ============================================================
   BUTTON LOADER — Spinner for API calls
============================================================ */
.btn-loader {
  display: flex;
  align-items: center;
  font-size: 15px;
}

/* ============================================================
   CARD FOOTER — Status dot + version info
============================================================ */
.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;
}

/* Animated green status dot */
.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 OVERLAY — Full screen backdrop with blur
============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ============================================================
   OTP MODAL — Card
============================================================ */
.modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  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 top gradient bar (green to blue) */
.modal-topbar {
  height: 3px;
  background: linear-gradient(90deg, var(--green2), var(--green), var(--blue), var(--blue2));
}

/* Modal close button (top right) */
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  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 body padding */
.modal-body {
  padding: 36px 36px 32px;
}

/* Shield icon box */
.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;
  font-size: 26px;
  color: var(--blue);
  margin-bottom: 18px;
}

/* Modal heading */
.modal h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

/* Modal description text */
.modal-desc {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 28px;
  line-height: 1.9;
}

/* Blue masked email */
.modal-desc .highlight {
  color: var(--blue);
}

/* Green expiry timer */
.modal-desc .timer-text {
  color: var(--green);
  font-weight: 500;
}

/* ============================================================
   OTP INPUT BOXES — 6 digit row
============================================================ */
.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);
}

/* Filled state — turns green */
.otp-input.filled {
  border-color: var(--green2);
  color: var(--green);
}

/* ============================================================
   RESEND ROW — Timer text + resend button
============================================================ */
.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;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-resend:hover {
  color: var(--green);
}

.btn-resend:disabled {
  color: var(--muted);
  cursor: default;
}

/* ============================================================
   VERIFY BUTTON
============================================================ */
.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: 'Rajdhani', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-verify:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 35px rgba(15,143,255,0.4);
}

.btn-verify:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ============================================================
   TOAST NOTIFICATION — Bottom center popup
============================================================ */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Toast color variants */
.toast.success { border-color: var(--success); }
.toast.success .toast-icon { color: var(--success); }

.toast.error   { border-color: var(--error); }
.toast.error   .toast-icon { color: var(--error); }

.toast.warning { border-color: var(--warning); }
.toast.warning .toast-icon { color: var(--warning); }

.toast.info    { border-color: var(--blue); }
.toast.info    .toast-icon { color: var(--blue); }

/* ============================================================
   RESPONSIVE — Tablet & Mobile adjustments
============================================================ */

/* Tablet (max 600px) */
@media (max-width: 600px) {
  .login-card {
    padding: 32px 24px 28px;
  }

  .card-heading {
    font-size: 24px;
  }

  .otp-input {
    width: 46px;
    height: 54px;
    font-size: 20px;
  }

  .otp-wrap {
    gap: 8px;
  }

  .modal-body {
    padding: 28px 22px 24px;
  }
}

/* Small mobile (max 400px) */
@media (max-width: 400px) {
  .login-card {
    padding: 28px 18px 24px;
  }

  .otp-input {
    width: 40px;
    height: 48px;
    font-size: 18px;
  }

  .otp-wrap {
    gap: 6px;
  }

  .brand-badge {
    font-size: 9px;
    letter-spacing: 0.12em;
  }

  .card-sub {
    font-size: 10px;
  }

  .modal-body {
    padding: 24px 16px 20px;
  }
}

/* Landscape mobile — allow scroll */
@media (max-height: 600px) and (orientation: landscape) {
  body {
    overflow-y: auto;
    align-items: flex-start;
    padding: 20px 0;
  }
  .login-wrap {
    margin: 20px auto;
  }
}
