/* ==========================================================================
   STUDENT MANAGEMENT — EXACT 3D REALISTIC LOGIN SCREEN STYLES
   Recreated pixel-perfect from reference image
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --sm-blue: #4f46e5;
  --sm-blue-dark: #4338ca;
  --sm-blue-gradient: linear-gradient(135deg, #4f46e5 0%, #6366f1 55%, #0ea5e9 100%);
  --sm-navy-900: #0a1b39;
  --sm-navy-800: #0f244a;
  --sm-slate-700: #334155;
  --sm-slate-500: #64748b;
  --sm-slate-400: #94a3b8;
  --sm-border: #e2e8f0;
  --sm-card-bg: #ffffff;
}

* {
  box-sizing: border-box;
}

body, html {
  margin: 0;
  padding: 0;
  min-height: 100%;
  width: 100%;
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Screen Wrapper */
#loginScreen {
  min-height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-color: #f0f6ff;
  background-image: url('assets/login_3d_bg.jpg');
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Soft ambient lighting overlay */
.login-backdrop-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(238, 244, 255, 0.45) 0%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Master Layout Container */
.login-master-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1400px;
  min-height: 100vh;
  padding: 40px 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Left Hero Column */
.login-hero-col {
  flex: 1;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-right: 40px;
}

/* Top Branding */
.login-brand-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

.brand-icon-3d {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-icon-3d svg {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 6px 12px rgba(29, 114, 254, 0.35));
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
}

.brand-main-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--sm-navy-900);
  line-height: 1.15;
  letter-spacing: -0.3px;
}

.brand-tagline {
  font-size: 13.5px;
  font-weight: 500;
  color: #5c6f84;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-tagline-separator {
  color: #94a3b8;
  font-weight: 300;
}

/* Hero Typography */
.hero-title-main {
  font-size: 40px;
  font-weight: 800;
  color: var(--sm-navy-900);
  line-height: 1.18;
  letter-spacing: -0.8px;
  margin: 0 0 18px 0;
}

.hero-subtitle-desc {
  font-size: 16px;
  line-height: 1.55;
  color: var(--sm-slate-500);
  margin: 0 0 42px 0;
  max-width: 440px;
}

/* 4 Feature Badges */
.feature-badges-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 56px;
}

.feature-badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.badge-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.badge-icon-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
}

.badge-icon-box svg {
  width: 24px;
  height: 24px;
}

.badge-icon-box.students {
  background: #e0f2fe;
  color: #0284c7;
}

.badge-icon-box.attendance {
  background: #dcfce7;
  color: #16a34a;
}

.badge-icon-box.exams {
  background: #ffe4e6;
  color: #e11d48;
}

.badge-icon-box.reports {
  background: #f3e8ff;
  color: #9333ea;
}

.badge-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--sm-navy-900);
}

/* Left Bottom Tagline */
.hero-footer-tagline {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: #64748b;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.hero-footer-tagline .bullet {
  color: #94a3b8;
  font-size: 12px;
}

/* Middle / Right Login Card Section */
.login-card-container {
  flex: 0 0 410px;
  margin-right: 180px; /* Space for the 3D books rendered on the right */
}

.login-card-3d {
  background: var(--sm-card-bg);
  border-radius: 20px;
  padding: 38px 36px 32px 36px;
  box-shadow: 0 20px 45px -12px rgba(10, 30, 70, 0.12),
              0 2px 8px -2px rgba(10, 30, 70, 0.05),
              0 0 0 1px rgba(226, 232, 240, 0.6);
  transition: box-shadow 0.3s ease;
}

.login-card-3d:hover {
  box-shadow: 0 24px 55px -10px rgba(10, 30, 70, 0.16),
              0 4px 12px -2px rgba(10, 30, 70, 0.06),
              0 0 0 1px rgba(226, 232, 240, 0.8);
}

.login-card-header {
  margin-bottom: 24px;
}

.login-card-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--sm-navy-900);
  letter-spacing: -0.5px;
  margin: 0 0 6px 0;
}

.login-card-subtitle {
  font-size: 13.5px;
  color: var(--sm-slate-500);
  margin: 0;
  font-weight: 400;
}

/* Error message banner */
.login-error-msg {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  animation: fadeIn 0.2s ease;
}

.login-error-msg.hidden {
  display: none !important;
}

/* Form Styles */
.login-form-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-field-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-field-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sm-slate-400);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-field-icon svg {
  width: 19px;
  height: 19px;
}

.custom-login-input {
  width: 100%;
  height: 50px;
  background: #ffffff;
  border: 1px solid var(--sm-border);
  border-radius: 12px;
  padding: 0 46px 0 46px;
  font-size: 14px;
  font-family: inherit;
  color: var(--sm-navy-900);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.custom-login-input:focus {
  border-color: var(--sm-blue);
  box-shadow: 0 0 0 3px rgba(29, 114, 254, 0.15);
  background: #ffffff;
}

.custom-login-input::placeholder {
  color: var(--sm-slate-400);
  font-weight: 400;
}

.input-toggle-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--sm-slate-400);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.2s;
}

.input-toggle-btn:hover {
  color: var(--sm-slate-700);
}

.input-toggle-btn svg {
  width: 18px;
  height: 18px;
}

/* Options row: remember & forgot */
.login-extra-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -2px;
  margin-bottom: 6px;
  font-size: 13.5px;
}

.remember-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--sm-slate-700);
  user-select: none;
}

.remember-checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid #cbd5e1;
  border-radius: 5px;
  outline: none;
  cursor: pointer;
  position: relative;
  background: #ffffff;
  transition: all 0.2s ease;
}

.remember-checkbox-label input[type="checkbox"]:checked {
  background-color: var(--sm-blue);
  border-color: var(--sm-blue);
}

.remember-checkbox-label input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.forgot-password-link {
  color: var(--sm-blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 13.5px;
  transition: color 0.15s ease;
}

.forgot-password-link:hover {
  color: var(--sm-blue-dark);
  text-decoration: underline;
}

/* Submit Button */
.login-primary-btn {
  width: 100%;
  height: 50px;
  background: var(--sm-blue-gradient);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 20px -3px rgba(29, 114, 254, 0.42);
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  margin-top: 4px;
}

.login-primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -3px rgba(29, 114, 254, 0.52);
}

.login-primary-btn:active {
  transform: translateY(1px);
  box-shadow: 0 4px 12px -2px rgba(29, 114, 254, 0.4);
}

.login-primary-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* OR Divider */
.login-or-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0 14px 0;
  color: var(--sm-slate-400);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.login-or-divider::before,
.login-or-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #f1f5f9;
}

.login-or-divider span {
  padding: 0 12px;
}

/* Card Footer */
.login-card-footer {
  text-align: center;
  font-size: 13.5px;
  color: var(--sm-slate-500);
}

.contact-admin-link {
  color: var(--sm-blue);
  font-weight: 700;
  text-decoration: none;
  margin-left: 4px;
  cursor: pointer;
}

.contact-admin-link:hover {
  text-decoration: underline;
}

/* Spinner */
.spinner-sm {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

.spinner-sm.hidden {
  display: none !important;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Media Queries */
@media (max-width: 1280px) {
  .login-card-container {
    margin-right: 40px;
  }
}

@media (max-width: 1080px) {
  .login-master-container {
    flex-direction: column;
    justify-content: center;
    padding: 40px 24px;
    gap: 40px;
  }

  .login-hero-col {
    max-width: 100%;
    padding-right: 0;
    align-items: center;
    text-align: center;
  }

  .brand-text-wrap {
    align-items: flex-start;
  }

  .feature-badges-row {
    justify-content: center;
  }

  .hero-subtitle-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-footer-tagline {
    justify-content: center;
  }

  .login-card-container {
    margin-right: 0;
    width: 100%;
    max-width: 440px;
  }
}

@media (max-width: 540px) {
  .login-master-container {
    padding: 24px 16px;
  }

  .hero-title-main {
    font-size: 28px;
  }

  .feature-badges-row {
    gap: 12px;
  }

  .badge-icon-box {
    width: 44px;
    height: 44px;
  }

  .login-card-3d {
    padding: 28px 20px;
  }
}
