/* Role picker + admin/faculty login — EMS navy theme (student login.html unchanged). */
:root {
  --primary: #1a3a6b;
  --primary-dark: #0f2447;
  --primary-light: #2c5aa0;
  --blue: #1a73e8;
  --text-dark: #1a1a2e;
  --text-muted: #6c757d;
  --gray-border: #dee2e6;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-dark);
}

.pg-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 28px 16px;
  box-sizing: border-box;
  position: relative;
  background: #0f2447;
}

.pg-bg,
.pg-bg-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.pg-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.pg-bg-overlay {
  z-index: 1;
  background: linear-gradient(135deg, rgba(26, 58, 107, 0.52), rgba(15, 36, 71, 0.62));
}

.pg-sheet {
  position: relative;
  z-index: 2;
  width: min(440px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 40px 32px 32px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
}

/* Welcome page: school campus behind a commercial slider + role card */
.pg-has-slides {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 32px 24px;
  overflow: auto;
}

.pg-slides {
  position: relative;
  z-index: 2;
  flex: 1 1 560px;
  width: min(860px, 100%);
  max-width: 860px;
  height: min(500px, 68vh);
  min-height: 340px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

.pg-slide {
  display: none;
  position: absolute;
  inset: 0;
}

.pg-slide.is-on {
  display: block;
}

.pg-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
  display: block;
}

.pg-slide-copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 42% 56px 40px;
  background: linear-gradient(90deg, rgba(15, 36, 71, 0.88) 0%, rgba(15, 36, 71, 0.5) 48%, rgba(15, 36, 71, 0.08) 78%, transparent 100%);
  color: #fff;
  box-sizing: border-box;
  pointer-events: none;
}

.pg-slide-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #93c5fd;
  font-weight: 700;
}

.pg-slide-copy h2 {
  margin: 0 0 10px;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.18;
  max-width: 420px;
}

.pg-slide-copy p {
  margin: 0;
  max-width: 400px;
  font-size: 15px;
  line-height: 1.55;
  color: #e2e8f0;
}

.pg-slide-cta {
  display: inline-flex;
  align-items: center;
  margin-top: 22px;
  width: fit-content;
  padding: 11px 24px;
  border-radius: 999px;
  background: #fff;
  color: #1a3a6b;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  pointer-events: auto;
}

.pg-slide-cta:hover {
  background: #f8fafc;
  color: #0f2447;
  text-decoration: none;
}

.pg-slide-dots {
  position: absolute;
  left: 40px;
  bottom: 18px;
  z-index: 3;
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.pg-slide-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.pg-slide-dots button.is-on {
  background: #fff;
}

.pg-has-slides .pg-sheet {
  flex: 0 0 auto;
  margin: 0;
}

@media (max-width: 980px) {
  .pg-has-slides {
    flex-direction: column;
    padding: 20px 16px 28px;
  }
  .pg-slides {
    width: 100%;
    max-width: 100%;
    height: 320px;
    min-height: 280px;
    flex-basis: auto;
  }
  .pg-slide-copy {
    padding: 24px 20px 48px;
    background: linear-gradient(180deg, rgba(15, 36, 71, 0.28) 0%, rgba(15, 36, 71, 0.86) 100%);
  }
  .pg-slide-copy h2 { font-size: 24px; }
  .pg-slide-copy p { font-size: 14px; }
  .pg-slide-dots { left: 20px; bottom: 14px; }
  .pg-has-slides .pg-sheet {
    width: min(440px, 100%);
  }
}

.pg-brand {
  text-align: center;
  margin-bottom: 18px;
}

.pg-brand img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
  margin: 0 auto 12px;
}

.pg-brand-name {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
}

.pg-welcome {
  text-align: center;
  margin: 0 0 22px;
}

.pg-welcome h1 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.pg-welcome p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.pg-roles {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pg-role {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--gray-border);
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: inherit;
}

.pg-role:hover,
.pg-role:focus-visible {
  border-color: var(--primary-light);
  background: #f3f8ff;
  outline: none;
  text-decoration: none;
}

.pg-role-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #fff;
  background: var(--primary);
}

.pg-role-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pg-role-icon.admin { background: var(--primary-dark); }
.pg-role-icon.faculty { background: var(--primary); }
.pg-role-icon.student { background: var(--primary-light); }

.pg-role-copy {
  flex: 1;
  min-width: 0;
}

.pg-role-copy strong {
  display: block;
  font-size: 15px;
  color: var(--text-dark);
}

.pg-role-copy small {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
}

.pg-chevron {
  color: var(--primary-light);
  font-size: 22px;
  line-height: 1;
}

.pg-card h1 {
  margin: 0 0 6px;
  text-align: center;
  font-size: 22px;
  color: var(--primary);
}

.pg-card .pg-sub {
  text-align: center;
  color: var(--text-muted);
  margin: 0 0 22px;
  font-size: 14px;
}

.pg-card label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 6px;
  color: #334155;
}

.pg-card input[type="text"],
.pg-card input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 15px;
}

.pg-card input:focus {
  outline: 2px solid rgba(26, 58, 107, 0.2);
  border-color: var(--primary);
}

.password-field {
  position: relative;
  display: block;
  margin-bottom: 14px;
}

.password-field input {
  margin-bottom: 0;
  padding-right: 42px;
}

.pg-submit {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

.pg-submit:hover { background: var(--primary-dark); }

.pg-error {
  color: #dc2626;
  min-height: 18px;
  font-size: 13px;
  margin: 0 0 10px;
  text-align: center;
}

.pg-back {
  display: block;
  text-align: center;
  margin-top: 16px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.pg-back:hover { text-decoration: underline; }
