/* Student portal sign-in modal — shared across primary academy pages */
.portal-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(28, 27, 24, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: clamp(16px, 4vw, 32px);
  box-sizing: border-box;
}

.portal-modal-card {
  position: relative;
  width: min(480px, 100%);
  border: 1px solid #1c1b18;
  background: #ffffff;
  padding: clamp(28px, 5vw, 40px);
  box-shadow: 4px 6px 0 rgba(20, 18, 16, 0.08);
  transform: translateY(18px) scale(0.97);
  opacity: 0;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.portal-modal-overlay.is-active .portal-modal-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.portal-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: none;
  background: transparent;
  color: #1c1b18;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.portal-modal-close:hover {
  color: #b54b32;
  transform: scale(1.08);
}

.portal-modal-brand {
  margin: 0 0 6px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  color: #1c1b18;
}

.portal-modal-title {
  margin: 0 0 28px;
  font-family: 'Newsreader', Georgia, serif;
  font-size: clamp(1.55rem, 4vw, 1.85rem);
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  color: #1c1b18;
}

.portal-modal-field {
  margin-bottom: 18px;
}

.portal-modal-field label {
  display: block;
  margin-bottom: 6px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1c1b18;
}

.portal-modal-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #1c1b18;
  background: #ffffff;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.05rem;
  color: #1c1b18;
  line-height: 1.5;
  box-sizing: border-box;
}

.portal-modal-field input:focus {
  outline: 2px solid rgba(181, 75, 50, 0.35);
  outline-offset: 1px;
}

.portal-modal-submit {
  display: block;
  width: 100%;
  margin-top: 24px;
  padding: 1rem 2.25rem;
  border: none;
  background: #b54b32;
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.portal-modal-submit:hover {
  background: #9e4f3f;
  transform: translateY(-1px);
}

.portal-modal-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.portal-modal-message {
  margin: 16px 0 0;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 0.98rem;
  line-height: 1.65;
  text-align: center;
  color: #8b2323;
}

.portal-modal-message[hidden] {
  display: none;
}
