:root {
  --auth-primary: #0646d9;
  --auth-secondary: #00a9a5;
  --auth-accent: #6c48e5;
  --auth-dark: #05266f;
  --auth-ink: #071f60;
  --auth-muted: #60719f;
  --auth-border: #d9e4f5;
  --auth-soft: #f6f9ff;
  --auth-surface: #ffffff;
}

body.auth-page {
  min-width: 320px;
  color: var(--auth-ink);
  background: var(--auth-soft);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-page .authentication-wrapper.auth-shell {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 48%, #effaf9 100%);
}

.auth-page .authentication-inner {
  min-height: 100vh;
}

.auth-page .auth-cover-brand {
  position: absolute;
  z-index: 10;
  top: 30px;
  left: 34px;
  max-width: min(420px, calc(100vw - 68px));
  padding: 8px 10px 8px 8px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  text-decoration: none;
  backdrop-filter: blur(14px);
}

.auth-page .auth-brand-logo {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  padding: 5px;
  border-radius: 8px;
  background: #ffffff;
  object-fit: contain;
  box-shadow: 0 12px 26px rgba(5, 38, 111, 0.12);
}

.auth-page .auth-cover-brand span {
  display: grid;
  min-width: 0;
}

.auth-page .auth-cover-brand strong {
  overflow: hidden;
  max-width: 320px;
  color: inherit;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-page .auth-cover-brand small {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.72rem;
  font-weight: 700;
}

.auth-page .auth-cover-bg {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    var(--auth-hero-image),
    linear-gradient(135deg, var(--auth-dark), var(--auth-primary));
  background-size: cover, auto;
  background-position: 75% center, center;
}

.auth-page .auth-cover-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(-45deg, rgba(5, 38, 111, 0.84), rgba(6, 70, 217, 0.68), rgba(0, 169, 165, 0.58), rgba(108, 72, 229, 0.52));
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  pointer-events: none;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.auth-page .auth-cover-panel {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  color: #ffffff;
}

.auth-page .auth-cover-kicker,
.auth-page .auth-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.auth-page .auth-cover-kicker {
  margin-bottom: 18px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.auth-page .auth-cover-panel h1 {
  max-width: 660px;
  margin: 0 0 16px;
  color: #ffffff;
  font-size: clamp(2.45rem, 4vw, 4.35rem);
  font-weight: 800;
  line-height: 1.02;
}

.auth-page .auth-cover-panel p {
  max-width: 580px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.02rem;
  line-height: 1.62;
}

.auth-page .auth-feature-grid {
  display: grid;
  max-width: 600px;
  margin-top: 30px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.auth-page .auth-feature-item {
  display: grid;
  min-height: 104px;
  align-content: center;
  gap: 10px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.auth-page .auth-feature-item i {
  font-size: 1.6rem;
}

.auth-page .auth-feature-item span {
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.32;
}

.auth-page .auth-form-bg {
  justify-content: center;
  min-height: 100vh;
  padding-top: 28px !important;
  padding-bottom: 28px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.96)),
    var(--auth-soft);
}

.auth-page .auth-form-column {
  width: min(100%, 476px) !important;
  max-width: 476px;
  min-height: auto;
  display: flex;
  flex-direction: column;
}

.auth-page .auth-form-wrap {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100% !important;
  max-width: 100%;
  padding-top: 0 !important;
}

.auth-page .auth-shell-wide .auth-form-column,
.auth-page .auth-shell-wide .auth-form-wrap {
  width: 100% !important;
  max-width: 1040px;
}

.auth-page .auth-card {
  display: flex;
  min-height: auto;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.auth-page .auth-form-inner-limit {
  width: 100% !important;
  max-width: 440px !important;
}

.auth-page .auth-brand-logo-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  padding: 6px;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(5, 38, 111, 0.06);
}

.auth-page .auth-form-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

@media (min-width: 992px) {
  .auth-page .auth-shell:not(.auth-shell-wide) .auth-form-bg {
    justify-content: center;
    padding-left: 32px !important;
    padding-right: 32px !important;
  }
}

.auth-page .auth-card-head {
  margin-bottom: 18px;
}

.auth-page .auth-mode-badge {
  min-height: 30px;
  margin-bottom: 12px;
  color: var(--auth-primary);
  background: color-mix(in srgb, var(--auth-primary) 10%, #ffffff);
}

.auth-page .auth-card h4 {
  margin: 0 0 7px;
  color: var(--auth-ink);
  font-size: 1.56rem;
  font-weight: 800;
  line-height: 1.18;
}

.auth-page .auth-card p {
  margin: 0;
  color: var(--auth-muted);
  line-height: 1.48;
  text-align: center;
}

@media (min-width: 992px) {
  .auth-page .auth-card p {
    font-size: 13.5px;
    text-align: justify;
    text-align-last: justify;
    letter-spacing: -0.25px;
  }
}

.auth-page .captcha-box {
  background: repeating-linear-gradient(
    45deg,
    #f3f6fa,
    #f3f6fa 8px,
    #e9eff6 8px,
    #e9eff6 16px
  );
  border: 1px solid #dce6f5;
  border-radius: 8px;
  height: 46px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 5px;
  color: var(--auth-primary);
  user-select: none;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.12);
}

.auth-page .auth-login-form {
  display: grid;
  gap: 14px;
}

.auth-page .form-floating-outline .form-control,
.auth-page .input-group-text {
  min-height: 46px;
  border-color: #dce6f5;
  border-radius: 8px;
}

.auth-page .input-group.input-group-merge .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.auth-page .input-group.input-group-merge .input-group-text {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.auth-page .form-control:focus,
.auth-page .form-check-input:focus {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 0.18rem color-mix(in srgb, var(--auth-primary) 18%, transparent);
}

.auth-page .form-check-input:checked {
  border-color: var(--auth-primary);
  background-color: var(--auth-primary);
}

.auth-page .auth-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
  min-height: 28px;
}

.auth-page .auth-form-options a,
.auth-page .auth-register-prompt a {
  color: var(--auth-primary);
  font-weight: 700;
  text-decoration: none;
}

.auth-page .auth-form-options a:hover,
.auth-page .auth-register-prompt a:hover {
  text-decoration: underline;
}

.auth-page .auth-submit,
.auth-page .auth-google-btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 8px;
  font-weight: 800;
}

.auth-page .btn-primary {
  --bs-btn-bg: var(--auth-primary);
  --bs-btn-border-color: var(--auth-primary);
  --bs-btn-hover-bg: var(--auth-dark);
  --bs-btn-hover-border-color: var(--auth-dark);
  --bs-btn-active-bg: var(--auth-dark);
  --bs-btn-active-border-color: var(--auth-dark);
  box-shadow: 0 12px 22px color-mix(in srgb, var(--auth-primary) 24%, transparent);
}

.auth-page .auth-divider {
  margin: 18px 0;
}

.auth-page .auth-google-btn {
  width: 100%;
}

.auth-page .auth-google-btn i {
  font-size: 1.25rem;
}

.auth-page .auth-register-prompt {
  margin: 18px 0 0;
  text-align: center;
}

.auth-page .alert {
  border-radius: 8px;
  font-size: 0.88rem;
}

.auth-page .auth-card-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #e8eef8;
  color: var(--auth-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.auth-page .auth-copyright-footer {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.45;
}

.auth-page .auth-copyright-desktop {
  position: absolute;
  z-index: 3;
  left: 34px;
  bottom: 24px;
  max-width: min(760px, calc(58.333vw - 68px));
}

.auth-page .auth-copyright-mobile {
  display: none;
}

.auth-page .auth-shell-wide .auth-cover-brand {
  color: var(--auth-ink);
  border-color: var(--auth-border);
  background: rgba(255, 255, 255, 0.88);
}

.auth-page .auth-shell-wide .auth-cover-brand small {
  color: var(--auth-muted);
}

@media (max-width: 991.98px) {
  .auth-page .auth-cover-brand {
    top: 22px;
    left: 22px;
    max-width: calc(100vw - 44px);
    color: var(--auth-ink);
    border-color: var(--auth-border);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 38px rgba(5, 38, 111, 0.08);
  }

  .auth-page .auth-cover-brand small {
    color: var(--auth-muted);
  }

  .auth-page .auth-form-bg {
    align-items: flex-start !important;
    min-height: 100vh;
    padding-top: 96px !important;
    padding-bottom: 22px !important;
  }

  .auth-page .auth-form-column,
  .auth-page .auth-form-wrap {
    width: 100% !important;
    max-width: 460px;
  }

  .auth-page .auth-form-column,
  .auth-page .auth-card {
    min-height: auto;
  }

  .auth-page .auth-copyright-desktop {
    display: none;
  }

  .auth-page .auth-copyright-mobile {
    display: block;
    margin-top: 12px;
    color: var(--auth-muted);
    text-align: center;
  }
}

@media (max-width: 575.98px) {
  .auth-page .auth-cover-brand {
    top: 16px;
    left: 16px;
    max-width: calc(100vw - 32px);
  }

  .auth-page .auth-brand-logo {
    width: 42px;
    height: 42px;
  }

  .auth-page .auth-cover-brand strong {
    max-width: 240px;
    font-size: 0.9rem;
  }

  .auth-page .auth-form-bg {
    padding: 88px 16px 22px !important;
  }

  .auth-page .auth-form-column,
  .auth-page .auth-form-wrap {
    max-width: min(100%, 420px);
  }

  .auth-page .auth-card {
    padding: 22px 18px 16px;
  }

  .auth-page .auth-card h4 {
    font-size: 1.42rem;
  }

  .auth-page .auth-form-options {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
  }
}

/* Registration Page Upgrades */
.auth-page .auth-info-card {
  background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-dark) 100%);
  border: none !important;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(6, 70, 217, 0.12);
  color: #ffffff;
}

.auth-page .auth-info-card-item {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  backdrop-filter: blur(8px);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.auth-page .auth-register-form-card {
  background: #ffffff;
  border: 1px solid var(--auth-border) !important;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(5, 38, 111, 0.06);
}

/* Premium form controls for registration */
.auth-page .form-control {
  min-height: 44px;
  border: 1px solid #dce6f5;
  border-radius: 8px;
  transition: all 0.25s ease;
  font-size: 0.92rem;
  background-color: #ffffff;
}

.auth-page .form-control:focus {
  border-color: var(--auth-primary);
  background-color: #ffffff;
  box-shadow: 0 0 0 0.18rem color-mix(in srgb, var(--auth-primary) 18%, transparent);
}

/* Interactive checkbox and term card */
.auth-page .auth-register-terms.border {
  border-color: #dce6f5 !important;
  background: #fdfefe;
  transition: all 0.2s ease;
}

.auth-page .auth-register-terms.border:hover {
  border-color: var(--auth-primary) !important;
  background: #fbfdff;
  cursor: pointer;
}

/* Interactive animations for buttons */
.auth-page .btn {
  border-radius: 8px;
  font-weight: 700;
  transition: all 0.25s ease;
}

.auth-page .btn-primary {
  box-shadow: 0 8px 20px color-mix(in srgb, var(--auth-primary) 20%, transparent);
}

.auth-page .btn-primary:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 12px 26px color-mix(in srgb, var(--auth-primary) 30%, transparent);
}

.auth-page .btn-outline-secondary:hover {
  background-color: #f6f9ff;
  color: var(--auth-primary);
  border-color: var(--auth-primary);
}

/* Wide Layout Logo Header & Footer Styles */
.auth-page .auth-copyright-wide {
  display: block;
  text-align: center;
  color: var(--auth-muted);
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 32px;
  width: 100%;
}

@media (min-width: 992px) {
  .auth-page .auth-shell-wide .auth-form-wrap {
    padding-top: 80px !important;
  }
}

@media (min-width: 1200px) {
  .auth-page .auth-shell-wide .auth-cover-brand {
    left: calc((100% - 1040px) / 2 + 12px) !important;
    top: 30px;
  }
}

/* SweetAlert2 Compact Toast Styles */
.colored-toast.swal2-toast {
  padding: 0.5rem 0.75rem !important;
  font-size: 0.85rem !important;
  max-width: 300px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}
.colored-toast .swal2-title {
  font-size: 0.9rem !important;
  margin: 0 !important;
}
.colored-toast .swal2-html-container {
  font-size: 0.8rem !important;
  margin: 0.25rem 0 0 0 !important;
}
.colored-toast .swal2-icon {
  width: 2em !important;
  height: 2em !important;
  margin: 0 0.5rem 0 0 !important;
}

/* Professional Registration Button on Student Login Page */
.auth-page .auth-register-btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-width: 1.5px;
}

.auth-page .auth-register-btn:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 8px 20px rgba(6, 70, 217, 0.1);
}

.auth-page .auth-register-section p {
  font-size: 0.88rem !important;
  margin-bottom: 6px !important;
  color: var(--auth-muted) !important;
  text-align: left !important;
  text-align-last: left !important;
}
