:root {
  --blue-dark: #061c55;
  --blue: #1e3a8a;
  --orange: #f6b04c;
  --text: #111827;
  --muted: #6b7280;
  --white: #ffffff;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  background: linear-gradient(135deg, #061c55, #0d5c8f);
  min-height: 100vh;
  color: var(--text);
}

.portal-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.portal-container {
  width: min(1100px, 100%);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 28px;
  padding: 34px;
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
}

.back-link {
  position: absolute;
  top: 24px;
  left: 28px;
  text-decoration: none;
  color: var(--blue);
  font-weight: 800;
  font-size: 14px;
}

.portal-logo {
  width: 92px;
  height: auto;
  margin-bottom: 16px;
}

.portal-container h1 {
  margin: 0;
  color: var(--blue-dark);
  font-size: clamp(30px, 4vw, 46px);
}

.register-access {
  margin-top: 34px;
  text-align: center;
}

.register-access p {
  color: #5f6b7a;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
}

.register-btn {
  display: inline-block;
  background: transparent;
  color: #061c55;
  border: 2px solid #ffb13c;
  padding: 14px 26px;
  border-radius: 18px;
  font-weight: 800;
  transition: 0.25s ease;
}

.register-btn:hover {
  background: #ffb13c;
  color: #061c55;
  transform: translateY(-2px);
}
.portal-container > p {
  margin: 12px auto 34px;
  color: var(--muted);
  font-size: 17px;
  max-width: 640px;
  line-height: 1.6;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.portal-card {
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  padding: 34px 24px;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: 0.25s ease;
}

.portal-card:hover {
  transform: translateY(-6px);
  border-color: var(--orange);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.16);
}

.portal-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 36px;
  background: #eef4ff;
}

.teacher-card .portal-icon { background: #fff7ed; }
.admin-card .portal-icon { background: #f3f4f6; }

.portal-card h2 {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 22px;
}

.admin-card h2 { color: #111827; }
.teacher-card h2 { color: #b45309; }

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

.portal-card span {
  display: inline-block;
  margin-top: 20px;
  background: var(--orange);
  color: var(--blue-dark);
  padding: 11px 16px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 14px;
}

@media (max-width: 900px) {
  .portal-grid { grid-template-columns: 1fr; }
  .back-link { position: static; display: inline-block; margin-bottom: 20px; }
  .portal-container { padding: 28px 20px; }
}
