/* ==========================================================================
   LibraTech — Admin Access Page Stylesheet
   A single hardcoded security-code gate. No login, accounts, or session.
   Extends tokens and utilities defined in style.css
   ========================================================================== */

html, body.auth-body{ height: 100%; }

body.auth-body{
  min-height: 100vh;
  display: flex;
}

/* ==========================================================================
   SHELL — two-panel split layout
   ========================================================================== */
.auth-shell{
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  width: 100%;
}

/* ==========================================================================
   LEFT PANEL — brand / illustration
   ========================================================================== */
.auth-panel{
  position: relative;
  background: var(--gradient-primary);
  background-image:
    radial-gradient(circle at 15% 15%, rgba(255,255,255,0.14) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(255,255,255,0.10) 0%, transparent 50%),
    var(--gradient-primary);
  color: #fff;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.auth-brand{
  display: flex;
  align-items: center;
  gap: 12px;
}
.auth-panel .brand-icon{
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: none;
}
.auth-panel .brand-name{ color: #fff; }
.auth-panel .brand-dept{ color: rgba(255,255,255,0.75); }

.auth-panel-copy{
  max-width: 420px;
  margin-top: 40px;
}
.auth-panel-copy h1{
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.auth-panel-copy p{
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
}

/* mini illustration */
.auth-illustration{
  position: relative;
  height: 220px;
  margin: 20px 0;
}

.glow-blob.small{
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255,255,255,0.28) 0%, transparent 70%);
  top: 40%;
}

.auth-orbit{
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 160px;
  height: 160px;
}
.orbit-core{
  position: absolute;
  inset: 0;
  margin: auto;
  width: 64px; height: 64px;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  backdrop-filter: blur(6px);
  border-radius: 20px;
  display: grid;
  place-items: center;
  animation: pulseGlow 5s ease-in-out infinite;
}
.orbit-core .material-symbols-rounded{ font-size: 28px; color: #fff; }

.orbit-icon{
  position: absolute;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--primary);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  font-size: 18px;
  animation: orbitFloat 6s ease-in-out infinite;
}
.oi-1{ top: -6px; left: 8px; animation-delay: 0s; }
.oi-2{ bottom: 0; right: -6px; animation-delay: 1s; }
.oi-3{ bottom: 10px; left: -14px; animation-delay: 2s; }

@keyframes orbitFloat{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-10px); }
}

/* Admin variant — deeper gradient to visually separate from the student portal */
.auth-panel-admin{
  background-image:
    radial-gradient(circle at 15% 15%, rgba(255,255,255,0.12) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(255,255,255,0.08) 0%, transparent 50%),
    linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.admin-eyebrow{
  background: var(--bg-grey-dark);
  color: var(--primary-dark);
}

/* ==========================================================================
   RIGHT PANEL — form
   ========================================================================== */
.auth-form-wrap{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px;
  position: relative;
}

.back-home{
  position: absolute;
  top: 40px;
  left: 48px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-500);
  transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}
.back-home .material-symbols-rounded{ font-size: 18px; }
.back-home:hover{ color: var(--primary); transform: translateX(-3px); }

.auth-form-card{
  width: 100%;
  max-width: 560px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 44px 44px;
}

.auth-form-eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-grey-dark);
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 600;
  margin-bottom: 18px;
}
.auth-form-eyebrow .material-symbols-rounded{ font-size: 16px; }

.auth-form-title{
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.auth-form-sub{
  font-size: 0.9rem;
  color: var(--ink-500);
  margin-bottom: 28px;
}

/* form fields */
.auth-form{ display: flex; flex-direction: column; gap: 20px; }

.field-group{ display: flex; flex-direction: column; gap: 7px; }
.field-group label{
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-700);
}

.input-wrap{
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon{
  position: absolute;
  left: 14px;
  font-size: 19px;
  color: var(--ink-300);
  pointer-events: none;
  transition: color 0.25s var(--ease);
}
.input-wrap input{
  width: 100%;
  padding: 13px 16px 13px 44px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-soft);
  background: #fff;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--ink-900);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.input-wrap input::placeholder{ color: var(--ink-300); }
.input-wrap input:focus{
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 4px rgba(66, 165, 245, 0.15);
}
.input-wrap input:focus ~ .input-icon,
.input-wrap:focus-within .input-icon{ color: var(--primary); }

.input-wrap input.field-invalid{ border-color: #E53935; }
.input-wrap input.field-invalid:focus{ box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.12); }

.field-error{
  font-size: 0.76rem;
  color: #E53935;
  min-height: 14px;
  display: block;
}

/* ==========================================================================
   Admin Setup form — pair up the shorter fields (designation/department,
   PIN/confirm PIN) side by side instead of stacking every field full-
   width, so the whole form fits with a lot less scrolling. Full name,
   the submit button, and the status note still span the full width.
   ========================================================================== */
#adminSetupForm{
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 14px;
  row-gap: 18px;
}
#adminSetupForm :nth-child(1){
  grid-column: 1 / -1;
}
#adminSetupForm > button,
#adminSetupForm > .auth-note{
  grid-column: 1 / -1;
}

@media (max-width: 560px){
  #adminSetupForm{
    grid-template-columns: 1fr;
  }
}

/* submit */
.auth-submit{
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

.auth-note{
  text-align: center;
  font-size: 0.82rem;
  min-height: 18px;
  color: var(--primary);
  font-weight: 500;
}
.auth-note.error{ color: #E53935; }

.auth-text-link{
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 18px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-500);
  transition: color 0.2s var(--ease);
}
.auth-text-link:hover{ color: var(--primary); text-decoration: underline; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 980px){
  .auth-shell{ grid-template-columns: 1fr; }
  .auth-panel{ display: none; }
  .auth-form-wrap{ padding: 32px 20px; }
  .back-home{ top: 20px; left: 20px; }
}

@media (max-width: 480px){
  .auth-form-card{ padding: 32px 22px; }
  .auth-form-title{ font-size: 1.35rem; }
}