/* ============================================================================
   IceBreakers Admin — Auth (Login) Revamp
   File: webroot/css/revamp-auth.css
   Scoped to body.admin-login-page so it never leaks into the authenticated UI.
   ============================================================================ */

body.admin-login-page {
  background: #5B21B6 !important;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
  min-height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
  position: relative !important;
  overflow: hidden !important;
  color: #1C252E;
}

/* Reset AdminLTE's white-box wrapper defaults when on this page */
body.admin-login-page .login-box,
body.admin-login-page .login-box-body {
  all: unset;
}

/* ── Decorative page-level blobs (behind the card) ───────── */
.ib-bg-blob {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.ib-blob-tl  { width: 320px; height: 320px; top: -90px; left: -90px; background: rgba(123,63,228,0.45); }
.ib-blob-br  { width: 240px; height: 240px; bottom: -70px; right: 180px; background: rgba(239,68,68,0.5); border: 5px solid rgba(239,68,68,0.7); }
.ib-blob-bc  { width: 18px;  height: 18px;  bottom: 110px; left: 43%; background: #22C55E; }
.ib-blob-sm1 { width: 28px;  height: 28px;  top: 55px; right: 50%; background: rgba(255,255,255,0.22); }
.ib-blob-sm2 { width: 12px;  height: 12px;  top: 40%;  left: 20px; background: rgba(255,255,255,0.30); }

/* ── Card wrapper ────────────────────────────────────────── */
.ib-login-card {
  width: 100%;
  max-width: 960px;
  min-height: 560px;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  position: relative;
  z-index: 10;
  box-shadow:
    0 32px 80px rgba(0,0,0,0.28),
    0 8px 24px rgba(0,0,0,0.16);
}

/* ── Left panel: white form ──────────────────────────────── */
.ib-login-left {
  width: 44%;
  background: #FFFFFF;
  padding: 44px 48px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

/* Logo */
.ib-auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 44px;
}
.ib-auth-logo-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7B3FE4, #5B21B6);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(123,63,228,0.38);
  flex-shrink: 0;
  color: #fff;
  font-size: 16px;
}
.ib-auth-logo-icon img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.ib-auth-logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.ib-brand-name { font-size: 13px; font-weight: 800; color: #5B21B6; letter-spacing: 0.3px; }
.ib-brand-role { font-size: 10.5px; font-weight: 600; color: #919EAB; letter-spacing: 0.6px; text-transform: uppercase; }

/* Heading */
.ib-auth-title {
  font-size: 28px;
  font-weight: 800;
  color: #1C252E;
  letter-spacing: -0.6px;
  margin-bottom: 6px;
  line-height: 1.15;
}
.ib-auth-sub {
  font-size: 13px;
  color: #637381;
  font-weight: 500;
  margin-bottom: 28px;
}

/* Flash error (override AdminLTE .alert-login + generic .alert) */
body.admin-login-page .alert-login,
body.admin-login-page .alert {
  display: flex !important;
  align-items: center;
  gap: 8px;
  background: #FEE2E2 !important;
  border: 1.5px solid #FECACA !important;
  color: #DC2626 !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  margin-bottom: 20px !important;
  box-shadow: none !important;
  text-shadow: none;
}

/* Fields */
.ib-field { margin-bottom: 22px; }
.ib-field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #1C252E;
  margin-bottom: 6px;
  letter-spacing: 0.1px;
}
.ib-field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.ib-field-wrap { position: relative; }

/* Underline style input (override Bootstrap 3 .form-control so old markup also looks right) */
.ib-input,
body.admin-login-page .ib-login-left .form-control {
  width: 100% !important;
  border: none !important;
  border-bottom: 1.5px solid #E2E8F0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 10px 0 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 14px !important;
  color: #1C252E !important;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color 220ms ease !important;
  height: auto !important;
}
.ib-input::placeholder,
body.admin-login-page .ib-login-left .form-control::placeholder {
  color: #919EAB !important;
  font-weight: 400;
}
.ib-input:focus,
body.admin-login-page .ib-login-left .form-control:focus {
  border-bottom-color: #7B3FE4 !important;
  box-shadow: none !important;
}

/* Eye toggle */
.ib-eye-toggle {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #919EAB;
  font-size: 15px;
  padding: 4px;
  transition: color 200ms ease;
  z-index: 2;
}
.ib-eye-toggle:hover { color: #7B3FE4; }

/* Forgot link */
.ib-forgot-link {
  font-size: 12px;
  font-weight: 600;
  color: #7B3FE4;
  text-decoration: none;
  transition: color 200ms ease;
}
.ib-forgot-link:hover { color: #5B21B6; text-decoration: none; }

/* Remember me */
.ib-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #637381;
  margin-bottom: 26px;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}
.ib-remember input[type=checkbox] {
  width: 16px; height: 16px;
  accent-color: #7B3FE4;
  cursor: pointer;
  margin: 0;
}

/* Submit button — override bootstrap .btn-primary for this page only */
.ib-btn-submit,
body.admin-login-page .ib-login-left .btn-primary {
  width: 100%;
  padding: 13px !important;
  background: linear-gradient(135deg, #7B3FE4, #5B21B6) !important;
  color: #FFFFFF !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  border: none !important;
  border-radius: 99px !important;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(123,63,228,0.40) !important;
  transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s !important;
  letter-spacing: 0.2px;
  text-align: center;
  display: block;
}
.ib-btn-submit:hover,
body.admin-login-page .ib-login-left .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(123,63,228,0.50) !important;
  color: #fff !important;
}
.ib-btn-submit:active,
body.admin-login-page .ib-login-left .btn-primary:active {
  transform: translateY(0);
  opacity: 0.92;
}

/* Sign up / contact row */
.ib-signup-row {
  margin-top: 24px;
  font-size: 13px;
  color: #637381;
  text-align: center;
  font-weight: 500;
}
.ib-signup-row a {
  color: #7B3FE4;
  font-weight: 700;
  text-decoration: none;
  margin-left: 4px;
  transition: color 200ms ease;
}
.ib-signup-row a:hover { color: #5B21B6; text-decoration: none; }

/* ── Right panel: dark brand visual ──────────────────────── */
.ib-login-right {
  flex: 1;
  background: #1B0A38;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 36px 32px 32px;
  min-height: 560px;
}
.ib-login-right::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 55%;
  background: linear-gradient(to top, rgba(27,10,56,0.98) 0%, rgba(27,10,56,0.65) 55%, transparent 100%);
  pointer-events: none;
  z-index: 5;
}

/* Geometric circles */
.ib-geo {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.ib-geo-1 { width: 220px; height: 220px; top: -40px; left: -30px; background: linear-gradient(135deg,#22C55E,#16A34A); opacity: .82; }
.ib-geo-2 { width: 160px; height: 160px; top: -20px; right: 18px;  background: rgba(59,130,246,.22); }
.ib-geo-3 { width: 130px; height: 130px; top: 60px;  right: -18px; background: rgba(96,165,250,.28); }
.ib-geo-4 { width: 100px; height: 100px; top: 150px; left: 60px;   background: linear-gradient(135deg,#7B3FE4,#5B21B6); opacity: .65; }
.ib-geo-5 { width: 180px; height: 180px; bottom: 160px; right: -40px; background: linear-gradient(135deg,#22C55E,#059669); opacity: .78; }
.ib-geo-6 { width: 80px;  height: 80px;  top: 42%;  left: 48%; background: #EF4444; opacity: .88; transform: translateX(-50%); }
.ib-geo-7 { width: 50px;  height: 50px;  bottom: 260px; left: 22px; background: rgba(34,197,94,.55); }
.ib-geo-8 { width: 30px;  height: 30px;  top: 55%; right: 60px; background: rgba(59,130,246,.5); }

/* Floating profile images */
.ib-float-imgs {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
}
.ib-fp {
  position: absolute;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,0.16);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.ib-fp img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.ib-fp-1 { width: 120px; height: 120px; top: 16px;  left: 50%; transform: translateX(-50%); }
.ib-fp-2 { width: 90px;  height: 90px;  top: 24px;  right: 8px; }
.ib-fp-3 { width: 108px; height: 108px; top: 178px; right: -10px; }
.ib-fp-4 { width: 78px;  height: 78px;  bottom: 136px; right: 8px; }

/* Bottom tagline */
.ib-right-text {
  position: relative;
  z-index: 10;
}
.ib-right-tagline {
  font-size: 20px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.3;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.ib-right-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.70);
  line-height: 1.6;
  max-width: 300px;
  font-weight: 500;
}
.ib-dots {
  display: flex;
  gap: 6px;
  margin-top: 20px;
}
.ib-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.32);
  transition: background 220ms ease, transform 220ms ease;
}
.ib-dot-active {
  background: #C4B5FD;
  transform: scale(1.25);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 720px) {
  body.admin-login-page { overflow: auto !important; padding: 16px !important; }
  .ib-login-card  { flex-direction: column; max-width: 420px; min-height: auto; }
  .ib-login-left  { width: 100%; padding: 32px 28px; }
  .ib-login-right { min-height: 260px; padding: 24px 24px 20px; }
  .ib-fp-2, .ib-fp-3, .ib-fp-4 { display: none; }
  .ib-fp-1 { width: 90px; height: 90px; top: 12px; }
  .ib-auth-logo { margin-bottom: 28px; }
}

/* ── Neutralise legacy revamp.css gradient rules ─────────── */
body.admin-login-page.login-page,
body.hold-transition.admin-login-page {
  background: #5B21B6 !important;
}

/* ============================================================================
   LOGIN BACKGROUND VIDEO — faded + purple-blended behind the card.
   ============================================================================ */

.ib-login-bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
  border: none;
  outline: none;
  /* Fade so the purple brand tone stays dominant */
  opacity: 0.45;
  transform: scale(1.03);
  filter: saturate(1.05);
}

.ib-login-bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  pointer-events: none;
  /* Purple wash so text stays readable and the video blends with the brand */
  background:
    radial-gradient(ellipse at center, rgba(91,33,182,0.35) 0%, rgba(59,7,100,0.70) 100%),
    linear-gradient(135deg, rgba(91,33,182,0.55) 0%, rgba(123,63,228,0.35) 100%);
}

/* Put the decorative blobs above the video overlay so they still read */
body.admin-login-page .ib-bg-blob { z-index: 2; }

/* Ensure the card stays above everything */
body.admin-login-page .ib-login-card {
  z-index: 10;
  position: relative;
}

/* On smaller screens, drop the video opacity further so the form stays legible */
@media (max-width: 720px) {
  .ib-login-bg-video { opacity: 0.30; }
}

/* Respect users who prefer reduced motion — pause + hide the video */
@media (prefers-reduced-motion: reduce) {
  .ib-login-bg-video { display: none; }
}

/* Flash success — used by forgot_password and any other success flash on auth pages */
body.admin-login-page .alert-success {
  background: #DCFCE7 !important;
  border: 1.5px solid #86EFAC !important;
  color: #16A34A !important;
}

/* Confirm-account status icons */
.ib-ca-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ib-ca-icon--success {
  background: linear-gradient(135deg, #7B3FE4, #5B21B6);
  box-shadow: 0 8px 24px rgba(123,63,228,0.35);
}
.ib-ca-icon--error {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  box-shadow: 0 8px 24px rgba(239,68,68,0.35);
}
