/* Shared access portal styles for student login, verification, and card downloads */
:root {
  --portal-bg-a: #eefbf9;
  --portal-bg-b: #fff5ea;
  --portal-bg-c: #dff3ff;
  --portal-ink: #10243a;
  --portal-text: #2b4058;
  --portal-muted: #5f7288;
  --portal-accent: #0f766e;
  --portal-accent-strong: #0c4a6e;
  --portal-accent-soft: #e0f2f1;
  --portal-warm: #f97316;
  --portal-warm-soft: #ffedd5;
  --portal-card-start: #0f2f45;
  --portal-card-mid: #0f4d68;
  --portal-card-end: #0f766e;
  --portal-card-text: #f8fcff;
  --portal-input-bg: #f8fafc;
  --portal-border: #d1deec;
  --portal-shadow: 0 24px 60px rgba(13, 62, 90, 0.16);
}

.portal-page {
  position: relative;
  padding: 0px 0px;
  overflow: hidden;
}

.portal-page::before,
.portal-page::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.portal-page::before {
  width: 360px;
  height: 360px;
  top: -120px;
  right: -110px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.24) 0%, rgba(249, 115, 22, 0) 68%);
}

.portal-page::after {
  width: 320px;
  height: 320px;
  bottom: -130px;
  left: -90px;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.22) 0%, rgba(15, 118, 110, 0) 70%);
}

.portal-shell {
  position: relative;
  border-radius: 28px;
  padding: 34px;
  background:
  linear-gradient(120deg, rgba(238, 251, 249, 0.8), rgba(255, 255, 255, 0.92) 40%, rgba(223, 243, 255, 0.82) 100%), linear-gradient(
35deg, #a405f3, #0419f5, #070eed);
  border: 1px solid rgba(17, 78, 110, 0.12);
  box-shadow: var(--portal-shadow);
  animation: portal-rise 0.65s ease;
}

.portal-shell::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.portal-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1fr);
  gap: 34px;
  align-items: stretch;
}

.portal-content {
  position: relative;
  z-index: 1;
  padding: 14px 6px;
}

.portal-kicker {
  display: inline-block;
  margin-bottom: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
    color: white;
    background: rgb(249 40 4);
  /* background: rgba(255, 255, 255, 0.72); */
  font-size: 14px;
  border: 1px solid rgba(12, 74, 110, 0.14);
}

.portal-heading {
  margin: 0;
  color: var(--portal-ink);
  font-family: "Inter Tight", "Poppins", sans-serif;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.portal-description {
  margin: 18px 0 0;
  color: var(--portal-text);
  font-size: 16px;
  line-height: 1.75;
  max-width: 600px;
}

.portal-benefits {
  margin-top: 30px;
  display: grid;
  gap: 12px;
}

.portal-benefit {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(12, 74, 110, 0.1);
  background: rgba(255, 255, 255, 0.8);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: portal-fade-in 0.65s ease both;
}

.portal-benefit:nth-child(2) {
  animation-delay: 0.08s;
}

.portal-benefit:nth-child(3) {
  animation-delay: 0.16s;
}

.portal-benefit i {
  flex-shrink: 0;
  font-size: 21px;
  line-height: 1;
  margin-top: 2px;
  color: var(--portal-accent);
}

.portal-benefit strong {
  display: block;
  color: var(--portal-ink);
  margin-bottom: 4px;
  font-size: 15px;
}

.portal-benefit p {
  margin: 0;
  color: var(--portal-muted);
  font-size: 14px;
  line-height: 1.5;
}

.portal-benefit:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 22px rgba(15, 76, 105, 0.12);
}

.portal-panel {
  display: flex;
  align-items: stretch;
}

.portal-card {
  position: relative;
  width: 100%;
  border-radius: 22px;
  padding: 30px;
  overflow: hidden;
  color: var(--portal-card-text);
  background: linear-gradient(145deg, var(--portal-card-start), var(--portal-card-mid) 55%, var(--portal-card-end));
  box-shadow: 0 18px 42px rgba(8, 36, 58, 0.36);
  animation: portal-slide-left 0.72s ease;
}

.portal-card::before {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  top: -90px;
  right: -95px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0) 72%);
}

.portal-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.05) 14px,
    transparent 14px,
    transparent 28px
  );
  opacity: 0.35;
  pointer-events: none;
}

.portal-card > * {
  position: relative;
  z-index: 1;
}

.portal-form-title {
  margin: 0 0 22px;
  color: #ffffff;
  font-family: "Inter Tight", "Poppins", sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.portal-form {
  display: grid;
  gap: 16px;
}

.portal-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.portal-field {
  display: grid;
  gap: 8px;
}

.portal-field label {
  color: rgba(248, 252, 255, 0.95);
  font-size: 14px;
  font-weight: 600;
}

.portal-field input,
.portal-field select,
.portal-field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(199, 219, 238, 0.7);
  background: var(--portal-input-bg);
  color: #1c3046;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.portal-field input::placeholder,
.portal-field textarea::placeholder {
  color: #7f8fa3;
}

.portal-field input:focus,
.portal-field select:focus,
.portal-field textarea:focus {
  outline: none;
  border-color: rgba(15, 118, 110, 0.95);
  box-shadow: 0 0 0 3px rgba(56, 189, 168, 0.25);
  transform: translateY(-1px);
}

.portal-actions {
  margin-top: 4px;
  display: flex;
  gap: 12px;
}

.portal-btn {
  width: 100%;
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 11px;
  border: none;
  font-family: "Inter Tight", "Poppins", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  background: linear-gradient(120deg, #fef3c7, #fb923c);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.34);
}

.portal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.36);
  filter: saturate(1.05);
}

.portal-btn:active {
  transform: translateY(0);
}

.portal-btn:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  transform: none;
  box-shadow: none;
}

.portal-btn-secondary {
  color: #1c3d21;
    background: linear-gradient(120deg, #bbf7d0, #fef08a);
    border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: none;
}

.portal-btn-secondary:hover {
  box-shadow: none;
  background: rgba(15, 35, 54, 0.42);
}

.portal-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  text-align: center;
}

.portal-footer p {
  margin: 0;
  color: rgba(240, 248, 255, 0.92);
  font-size: 13px;
}

.portal-footer a {
  color: #fef3c7;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#error_message,
#success_message,
.error-message,
.success-message,
#errorMessage,
.portal-alert {
  display: block;
  margin-bottom: 16px;
  padding: 11px 14px;
  border-radius: 10px;
  border-left: 4px solid;
  font-size: 13px;
  line-height: 1.5;
}

#error_message,
.error-message,
#errorMessage,
.portal-alert.error {
  background: rgba(248, 215, 218, 0.95);
  color: #7f1d1d;
  border-left-color: #dc2626;
}

#success_message,
.success-message,
.portal-alert.success {
  background: rgba(220, 252, 231, 0.96);
  color: #14532d;
  border-left-color: #16a34a;
}

#errorMessage {
  display: none;
  align-items: center;
  gap: 8px;
}

#errorMessage i {
  font-size: 17px;
}

#loadingSpinner {
  display: none;
  margin: 16px 0;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
}

.portal-spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.28);
  border-top-color: #fef3c7;
  margin: 0 auto;
  animation: portal-spin 0.7s linear infinite;
}

#loadingSpinner p {
  margin: 10px 0 0;
  font-size: 13px;
  color: rgba(245, 251, 255, 0.95);
}

.portal-result-card {
  display: none;
  margin-top: 18px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(7, 28, 45, 0.52);
}

.portal-result-head {
  padding: 13px 16px;
  background: linear-gradient(120deg, #1b0939, rgb(24 8 113 / 90%));
}

.portal-result-head h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  color: #f0fbff;
}

.portal-result-body {
  padding: 16px;
}

.portal-result-title {
  margin: 0 0 14px;
  color: #f0fbff;
  font-size: 22px;
  line-height: 1.35;
}

.portal-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.portal-result-col {
  display: grid;
}

.portal-student-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.portal-photo-wrap {
  flex: 0 0 160px;
}

.portal-photo {
  width: 160px;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.portal-meta {
  flex: 1;
  min-width: 240px;
}

.portal-row {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.portal-row:last-child {
  border-bottom: none;
}

.portal-row label {
  min-width: 145px;
  margin: 0;
  font-weight: 600;
  color: rgba(236, 248, 255, 0.95);
}

.portal-row span {
  color: rgba(236, 248, 255, 0.92);
}

.portal-result-actions {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.portal-result-actions .portal-btn {
  max-width: 220px;
}

.portal-result-wrap {
  margin-top: 60px;
}

.portal-result-card-open {
  display: block;
}

.portal-center-result-card {
  position: relative;
  border: 1px solid rgba(56, 189, 248, 0.32);
  background:
   radial-gradient(circle at 92% -15%, rgba(34, 211, 238, 0.18), transparent 48%), radial-gradient(circle at 6% 106%, rgba(250, 204, 21, 0.12), #00000000 42%), linear-gradient(135deg, rgb(7 28 45), rgb(201 10 237));
  
  }

.portal-center-result-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.035),
    rgba(255, 255, 255, 0.035) 13px,
    transparent 13px,
    transparent 26px
  );
  opacity: 0.38;
  pointer-events: none;
}

.portal-center-result-card .portal-result-body {
  position: relative;
  z-index: 1;
  padding: 22px;
}

.portal-center-result-card .portal-result-head h3 {
  font-family: "Inter Tight", "Poppins", sans-serif;
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.portal-center-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgb(9 48 107 / 94%);;
}

.portal-director-photo-wrap {
  width: 108px;
  height: 108px;
  border-radius: 18px;
  padding: 4px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #22d3ee, #f59e0b);
  box-shadow: 0 10px 28px rgba(8, 25, 44, 0.4);
}

.portal-director-photo {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
  background: #f8fafc;
}

.portal-center-title-wrap {
  min-width: 0;
}

.portal-center-title-wrap .portal-result-title {
  margin: 0;
  font-family: "Inter Tight", "Poppins", sans-serif;
  font-size: clamp(24px, 3.1vw, 38px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 2px;
  color: #ffffff;
      word-spacing: 6px;
}

.portal-verified-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #052e16;
  background: linear-gradient(120deg, #bbf7d0, #fef08a);
}

.portal-center-subtext {
  margin: 6px 0 0;
 color: white;
    font-size: 15px;
    line-height: 1.65;
    text-transform: capitalize;
}

.portal-center-result-card .portal-result-grid {
  gap: 20px;
}

.portal-center-result-card .portal-row {
  align-items: flex-start;
  padding: 12px 0;
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.portal-center-result-card .portal-row label {
    min-width: 152px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: white;
}

.portal-center-result-card .portal-row span,
.portal-center-result-card .portal-row strong {
     font-size: 17px;
    line-height: 1.6;
    color: white;
}

.portal-center-result-card .portal-result-actions .portal-btn {
  min-height: 50px;
  font-size: 15px;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge-success {
  background: #22c55e;
  color: #052e16;
}

.badge-primary {
  background: #38bdf8;
  color: #082f49;
}

.badge-danger {
  background: #f87171;
  color: #450a0a;
}

@keyframes portal-rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes portal-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes portal-slide-left {
  from {
    opacity: 0;
    transform: translateX(22px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes portal-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1080px) {
  .portal-shell {
    padding: 28px;
  }

  .portal-grid {
    gap: 24px;
  }

  .portal-heading {
    font-size: 30px;
  }

  .portal-card {
    padding: 24px;
  }
}

@media (max-width: 860px) {
  .portal-grid {
    grid-template-columns: 1fr;
  }

  .portal-form-grid,
  .portal-result-grid {
    grid-template-columns: 1fr;
  }

  .portal-content {
    padding: 4px;
  }

  .portal-heading {
    font-size: 28px;
  }

  .portal-description {
    font-size: 15px;
  }

  .portal-panel {
    max-width: 640px;
  }
}

@media (max-width: 580px) {
  .portal-page {
    padding: 10px 0;
  }

  .portal-shell {
    padding: 20px;
    border-radius: 20px;
  }

  .portal-form-title {
    font-size: 23px;
  }

  .portal-actions {
    flex-direction: column;
  }

  .portal-photo-wrap {
    flex-basis: auto;
  }

  .portal-photo {
    width: 130px;
    height: 170px;
  }

  .portal-row {
    flex-direction: column;
    gap: 5px;
  }

  .portal-row label {
    min-width: 0;
  }

  .portal-result-actions .portal-btn {
    max-width: 100%;
  }

  .portal-center-identity {
    flex-direction: column;
    align-items: flex-start;
  }

  .portal-director-photo-wrap {
    width: 92px;
    height: 92px;
    border-radius: 14px;
  }

  .portal-director-photo {
    border-radius: 10px;
  }

  .portal-center-result-card .portal-result-head h3 {
    font-size: 20px;
  }

  .portal-center-title-wrap .portal-result-title {
    font-size: 25px;
  }

  .portal-center-subtext {
    font-size: 14px;
  }

  .portal-center-result-card .portal-row label {
    min-width: 0;
    font-size: 12px;
    letter-spacing: 0.03em;
  }

  .portal-center-result-card .portal-row span,
  .portal-center-result-card .portal-row strong {
    font-size: 15px;
  }
}

.portal-page .wrapper{
  padding: 6px 4.8rem;
}