/* ===============================================
   IK Labs Portal — Login CSS (Phishing / Rope Theme)
   =============================================== */

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  min-height: 100vh;
  overflow: hidden;
  background: #d97706;
}

/* ─── BACKGROUND ─────────────────────────────── */
.bg-layer {
  position: fixed; inset: 0; z-index: 0;
}
.bg-img {
  width: 100%; height: 100%;
  object-fit: cover;
  will-change: transform;
  transform: scale(1.05);
  transition: transform 0.12s linear;
}
.bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg,
    rgba(251,191,36,0.5) 0%,
    rgba(245,158,11,0.38) 40%,
    rgba(180,83,9,0.32) 100%);
}



/* ─── PAGE LAYOUT ─────────────────────────────── */
.page-wrap {
  position: relative; z-index: 10;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  padding: 20px 40px;
}

/* ─── HERO TEXT GLASS CARD ─────────────────────── */
.hero-text {
  flex: 1;
  max-width: 440px;
  display: none;
  background: rgba(255, 251, 239, 0.52);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-radius: 28px;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.65),
    0 20px 45px rgba(120, 53, 15, 0.18),
    0 6px 18px rgba(0, 0, 0, 0.1);
  padding: 36px 36px 32px;
}
@media (min-width: 1024px) { .hero-text { display: block; } }

.hero-eyebrow {
  font-size: 0.7rem; font-weight: 800;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: #78350f; margin-bottom: 12px;
}

.hero-logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
  margin-bottom: 20px;
  display: block;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1.1;
  color: #1c0a00;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.6);
  margin-bottom: 16px;
  letter-spacing: -0.025em;
}

.hero-sub {
  font-size: 0.92rem;
  font-weight: 600;
  color: #4a1c03;
  line-height: 1.65;
  max-width: 100%;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.hero-highlight {
  font-weight: 800;
  color: #1c0a00;
  background: rgba(245, 158, 11, 0.22);
  padding: 1px 6px;
  border-radius: 6px;
  display: inline-block;
  margin: 1px 0;
}

.hero-laa-notice {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.38);
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #4a1c03;
  line-height: 1.45;
}
.hero-laa-notice strong {
  color: #1c0a00;
  font-weight: 800;
}

/* ─── HANG ROOT ───────────────────────────────── */
.hang-root {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  position: relative;
  margin-top: 0;
  /* Pivot point for smooth subtle hover/loading */
  transform-origin: 50% 50%;
  transition: transform 0.3s ease;
}

/* ─── LOADING STATE: Lift up + Emerald Laser Scanner Aura ─── */
.hang-root.is-loading {
  transform: translateY(-12px) scale(1.02);
  animation: loadingPulse 1.2s ease-in-out infinite alternate;
}

@keyframes loadingPulse {
  0%   { filter: drop-shadow(0 15px 35px rgba(34, 197, 94, 0.45)); }
  100% { filter: drop-shadow(0 30px 65px rgba(34, 197, 94, 0.85)); }
}

/* ─── HIGH-VISIBILITY 3D EMERALD LASER SCANNER BEAM ─── */
.scanner-beam {
  position: absolute;
  left: -2px; right: -2px;
  height: 6px;
  background: linear-gradient(90deg, 
    rgba(34, 197, 94, 0) 0%, 
    #22c55e 15%, 
    #4ade80 35%, 
    #ffffff 50%, 
    #4ade80 65%, 
    #22c55e 85%, 
    rgba(34, 197, 94, 0) 100%
  );
  box-shadow: 
    0 0 14px #22c55e, 
    0 0 28px #4ade80, 
    0 0 50px #22c55e, 
    0 2px 6px rgba(255, 255, 255, 0.95);
  opacity: 0;
  z-index: 45;
  pointer-events: none;
}

/* Trailing laser scan cone / light wave */
.scanner-beam::after {
  content: '';
  position: absolute;
  top: -50px;
  left: 0; right: 0;
  height: 50px;
  background: linear-gradient(180deg, 
    rgba(34, 197, 94, 0) 0%, 
    rgba(74, 222, 128, 0.22) 65%, 
    rgba(34, 197, 94, 0.65) 100%
  );
  pointer-events: none;
}

.hang-root.is-loading .scanner-beam {
  opacity: 1;
  animation: scanSweep 1.35s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate;
}

@keyframes scanSweep {
  0%   { top: 52px; }
  100% { top: calc(100% - 12px); }
}

/* Progress bar along the metallic cap */
.cap-progress-bar {
  position: absolute;
  bottom: 0; left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, #f59e0b 0%, #22c55e 50%, #4ade80 100%);
  box-shadow: 0 0 12px #22c55e, 0 0 20px #4ade80;
  z-index: 30;
  transition: width 0.1s linear;
}

/* ─── ERROR STATE: Shake/Sway on wrong credentials / error ─── */
.hang-root.is-error {
  animation: errorShake 0.65s ease-in-out;
}

@keyframes errorShake {
  0%, 100% { transform: rotate(0deg); }
  15%      { transform: rotate(-6deg); }
  30%      { transform: rotate(5.5deg); }
  45%      { transform: rotate(-3.5deg); }
  60%      { transform: rotate(3deg); }
  75%      { transform: rotate(-1.5deg); }
  90%      { transform: rotate(1deg); }
}

/* ─── ROPE EXTENSION ──────────────────────────── */
.rope-extension {
  position: absolute;
  top: -500px;
  height: 500px;
  width: 8px;
  background: repeating-linear-gradient(
    45deg,
    #8a5a36,
    #8a5a36 4px,
    #b88358 4px,
    #b88358 8px
  );
  box-shadow: 
    2px 0 5px rgba(0,0,0,0.25),
    inset -1px 0 2px rgba(0,0,0,0.3);
  z-index: 15;
  left: 50%;
  transform: translateX(-50%);
}

/* ─── ROPE & RING SVG WRAPPER ──────────────────── */
.rope-ring-wrapper {
  position: absolute;
  top: -131px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 160px;
  z-index: 25;
}

.rope-ring-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ─── HANGING CARD CONTAINER ───────────────────── */
.login-card-container {
  width: 360px;
  background: #fffbef;
  border-radius: 28px;
  box-shadow:
    0 20px 45px rgba(120,53,15,0.3),
    0 6px 18px rgba(0,0,0,0.18);
  border: 1px solid rgba(180,83,9,0.18);
  overflow: hidden;
  z-index: 20;
  position: relative;
}

/* Premium Metallic Top Cap (Brushed Silver/Champagne) */
.card-metallic-cap {
  height: 54px;
  background: linear-gradient(180deg, 
    #ece6d7 0%, 
    #d4caa7 30%, 
    #b3a78c 70%, 
    #998d72 100%
  );
  border-bottom: 2px solid #857a62;
  position: relative;
  box-shadow: 
    inset 0 1.5px 0 rgba(255,255,255,0.7),
    0 3px 6px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cap-reflection {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, 
    rgba(255,255,255,0) 0%, 
    rgba(255,255,255,0.3) 40%, 
    rgba(255,255,255,0.4) 50%, 
    rgba(255,255,255,0) 70%
  );
  transform: skewX(-30deg);
  animation: shineCap 6s ease-in-out infinite;
}

/* Hole in the Metallic Cap where the Ring connects */
.cap-hole-wrapper {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 22;
}

.cap-hole {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2a1200, #0a0400);
  box-shadow:
    inset 0 3px 6px rgba(0,0,0,0.95),
    0 1px 2px rgba(255,255,255,0.4);
  border: 1.5px solid #786d57;
}

@keyframes shineCap {
  0%   { left: -100%; }
  35%, 100% { left: 150%; }
}

/* Card Body Content */
.card-body {
  padding: 32px 32px 28px;
}

.card-brand {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.brand-badge {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 4px 0 #78350f, 0 6px 14px rgba(180,83,9,0.4);
  color: #fff; font-weight: 900; font-size: 0.75rem;
  display: flex; align-items: center; justify-content: center;
}
.brand-logo-img {
  height: 36px;
  width: auto;
  object-fit: contain;
}
.brand-label {
  font-size: 0.65rem; font-weight: 800;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: #92400e;
}
.card-title {
  font-size: 1.45rem; font-weight: 900;
  color: #1c0a00; margin-bottom: 4px;
}
.card-sub {
  font-size: 0.8rem;
  font-weight: 600;
  color: #78350f;
  margin-bottom: 20px;
  line-height: 1.4;
}

/* Flash error & success */
.flash-error {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 12px; margin-bottom: 14px;
  background: rgba(239,68,68,0.1); border: 1.5px solid rgba(239,68,68,0.3);
  color: #dc2626; font-size: 0.78rem; font-weight: 600;
}
.flash-success {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 12px; margin-bottom: 14px;
  background: rgba(34,197,94,0.12); border: 1.5px solid rgba(34,197,94,0.35);
  color: #15803d; font-size: 0.78rem; font-weight: 600;
}


/* ─── FORM FIELDS ─────────────────────────────── */
.field-group { margin-bottom: 14px; }
.field-label {
  display: block;
  font-size: 0.65rem; font-weight: 800;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: #78350f; margin-bottom: 6px;
}
.field-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.7);
  border: 1.5px solid rgba(180,83,9,0.22);
  box-shadow: inset 0 2px 5px rgba(180,83,9,0.05), 0 1px 2px rgba(255,255,255,0.8);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field-wrap:focus-within {
  border-color: #f59e0b;
  background: rgba(255,255,255,0.95);
  box-shadow: inset 0 2px 4px rgba(180,83,9,0.03), 0 0 0 3px rgba(245,158,11,0.22);
}
.field-icon {
  width: 16px; height: 16px;
  color: #d97706; flex-shrink: 0;
}
.field-input {
  flex: 1; background: transparent; border: none; outline: none;
  font-size: 0.82rem; font-weight: 600; color: #1c0a00;
  font-family: inherit;
}
.field-input::placeholder { color: rgba(180,83,9,0.4); }

/* Validation hint */
.field-hint {
  display: none; align-items: center;
  font-size: 0.72rem; font-weight: 700;
  margin-top: 5px; padding-left: 3px;
}

/* Eye toggle button */
.eye-btn {
  background: transparent; border: none; cursor: pointer;
  color: #d97706; display: flex; align-items: center;
  padding: 0; margin-left: 4px;
}

/* ─── SUBMIT BUTTON ───────────────────────────── */
.btn-submit {
  width: 100%; padding: 14px;
  margin-top: 6px; margin-bottom: 4px;
  border: none; border-radius: 16px; cursor: pointer;
  font-family: inherit; font-size: 0.82rem; font-weight: 900;
  letter-spacing: 0.12em; text-transform: uppercase; color: #fff;
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  box-shadow:
    0 6px 0 #92400e,
    0 10px 24px rgba(146,64,14,0.45),
    inset 0 2px 0 rgba(255,255,255,0.35);
  transition: all 0.12s ease;
}
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #92400e, 0 14px 30px rgba(146,64,14,0.5), inset 0 2px 0 rgba(255,255,255,0.4);
}
.btn-submit:active {
  transform: translateY(5px);
  box-shadow: 0 1px 0 #92400e, 0 4px 10px rgba(146,64,14,0.3), inset 0 2px 0 rgba(0,0,0,0.1);
}

.forgot-link {
  text-align: center; font-size: 0.75rem; color: #92400e; margin-top: 12px;
}
.forgot-link a { font-weight: 700; text-decoration: none; }
.forgot-link a:hover { text-decoration: underline; }

.account-help-text {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: #78350f;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(180, 83, 9, 0.22);
  line-height: 1.45;
}
.account-help-text strong {
  color: #1c0a00;
  font-weight: 800;
}

/* ─── MOBILE-ONLY LAA NOTICE ──────────────────── */
.mobile-laa-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #4a1c03;
  line-height: 1.4;
  text-align: left;
}
.mobile-laa-notice strong {
  color: #1c0a00;
  font-weight: 800;
}

@media (min-width: 1024px) {
  .mobile-laa-notice {
    display: none !important;
  }
}

/* ─── FOOTER ──────────────────────────────────── */
.footer-copy {
  position: fixed; bottom: 14px; left: 0; right: 0; text-align: center;
  font-size: 0.7rem; color: rgba(124,45,18,0.65); z-index: 10;
}
