/* =============================================
   ADMIN-AUTH.CSS — BiomedCraftHub Admin Portal
   Dark, authoritative, security-focused design.
   Complements auth.css without duplicating it.
   ============================================= */

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

/* ---------- Page ---------- */
body.admin-auth-page {
  font-family: 'Inter', system-ui, sans-serif;
  background: #070711;
  color: #e8eaf6;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2rem);
  position: relative;
  overflow: hidden;
}

/* Fine dot-grid background */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* Slow ambient glow — warmer amber tint vs main login's cyan */
.bg-glow {
  position: fixed;
  top: -40%; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251,191,36,0.06) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
  animation: driftGlow 20s ease-in-out infinite alternate;
}

@keyframes driftGlow {
  from { transform: translateX(-55%) translateY(0); }
  to   { transform: translateX(-45%) translateY(40px); }
}

/* ---------- Outer wrap ---------- */
.admin-login-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 80%;
}

/* ---------- Card ---------- */
.admin-login-card {
  width: min(96%, 440px);
  background: rgba(12,12,28,0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.07);
  padding: clamp(2rem, 5vw, 2.75rem) clamp(1.5rem, 4vw, 2.25rem);
  box-shadow:
    0 0 0 1px rgba(251,191,36,0.05),
    0 24px 56px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.04);
  animation: cardReveal 0.5s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Brand ---------- */
.admin-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.admin-brand-name {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.3rem, 3vw, 1.65rem);
  font-weight: 800;
  color: #f0f4ff;
  letter-spacing: -0.5px;
  line-height: 1;
}

.admin-brand-name span {
  color: #fbbf24;   /* amber — distinct from the cyan on the main login */
}

.admin-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.22);
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fbbf24;
  letter-spacing: 0.3px;
}

.admin-role-badge i { font-size: 0.65rem; }

/* Divider */
.card-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.08), transparent);
  margin-bottom: 1.5rem;
}

/* ---------- Headings ---------- */
.admin-login-title {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  font-weight: 700;
  color: #f0f4ff;
  letter-spacing: -0.3px;
  margin-bottom: 0.35rem;
}

.admin-login-sub {
  font-size: 0.8rem;
  color: rgba(200,210,240,0.5);
  margin-bottom: 1.6rem;
  line-height: 1.5;
}

/* ---------- Alerts ---------- */
.admin-error-box {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: rgba(239,68,68,0.1);
  border-left: 3px solid #ef4444;
  border-radius: 0 8px 8px 0;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1.25rem;
  font-size: 0.81rem;
  color: #fca5a5;
  line-height: 1.5;
}

.admin-success-box {
  background: rgba(34,197,94,0.1);
  border-left: 3px solid #22c55e;
  border-radius: 0 8px 8px 0;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1.25rem;
  font-size: 0.81rem;
  color: #86efac;
  line-height: 1.5;
}

/* ---------- Form ---------- */
.form-group { margin-bottom: 1.05rem; }

.form-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 500;
  color: rgba(200,210,240,0.65);
  margin-bottom: 0.38rem;
}

.input-wrap,
.input-with-toggle {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 12px;
  font-size: 0.78rem;
  color: rgba(160,175,215,0.35);
  pointer-events: none;
  z-index: 1;
}

.input-wrap input,
.input-with-toggle input {
  width: 100%;
  padding: 0.72rem 1rem 0.72rem 2.2rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 9px;
  color: #f0f4ff;
  font-family: 'Inter', sans-serif;
  font-size: 0.87rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrap input:focus,
.input-with-toggle input:focus {
  outline: none;
  border-color: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251,191,36,0.1);
}

.pwd-toggle {
  position: absolute;
  right: 11px;
  background: transparent;
  border: none;
  color: rgba(160,175,215,0.35);
  cursor: pointer;
  font-size: 0.88rem;
  padding: 0;
  transition: color 0.2s ease;
}
.pwd-toggle:hover { color: rgba(200,210,240,0.75); }

.forgot-link {
  color: #fbbf24;
  font-size: 0.71rem;
  text-decoration: none;
  font-weight: 500;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.forgot-link:hover { opacity: 1; text-decoration: underline; }

/* ---------- Primary Button ---------- */
.btn-admin-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 0.82rem 1rem;
  margin-top: 0.5rem;
  background: linear-gradient(95deg, #fbbf24, #d97706);
  border: none;
  border-radius: 10px;
  font-family: 'Sora', sans-serif;
  font-size: 0.91rem;
  font-weight: 700;
  color: #1a0f00;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  user-select: none;
}

.btn-admin-auth:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(251,191,36,0.28);
  filter: brightness(1.06);
}

.btn-admin-auth:active {
  transform: translateY(0);
  filter: brightness(0.97);
}

.btn-arrow { font-size: 0.82rem; }

/* ---------- Security Notice ---------- */
.security-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 1.4rem;
  padding: 0.7rem 0.9rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 9px;
  font-size: 0.73rem;
  color: rgba(160,175,215,0.5);
  line-height: 1.5;
}

.security-notice i {
  color: #fbbf24;
  font-size: 0.75rem;
  margin-top: 2px;
  flex-shrink: 0;
  opacity: 0.7;
}

/* ---------- Back Link ---------- */
.admin-back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 1.4rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(160,175,215,0.45);
  text-decoration: none;
  transition: color 0.2s ease;
}

.admin-back-link:hover { color: #f0f4ff; }

/* ---------- Autofill suppression ---------- */
input:-webkit-autofill,
input:-webkit-autofill:focus {
  transition: background-color 600000s, color 600000s;
}
input::placeholder { color: rgba(160,175,215,0.25); }

/* Spinner */
.fa-spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .admin-login-card {
    padding: 1.5rem 1.25rem;
    border-radius: 16px;
  }
  .admin-login-title { font-size: 1.1rem; }
  .btn-admin-auth    { padding: 0.75rem; }
}