*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* ===========================
   Colours (change them here)
   =========================== */
:root {
  --brand: #0B3D91;
  --brand-dark: #082C6B;
  --line: #E4E4EA;
  --ink: #2B2B38;
  --muted: #6B6B7B;
  --link: #1F7A57;
  --bad: #B93A2D;
}

/* ===========================
   Page basics
   =========================== */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  padding: 24px;
  display: grid;
  place-items: center;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(rgba(255, 255, 255, 0.06) 1.5px, transparent 1.5px) 0 0 / 30px 30px,
    linear-gradient(135deg, #0B3D91 0%, #1565C0 55%, #2A8BE0 100%);
  background-attachment: fixed;
}

/* ===========================
   Login card
   =========================== */
.card {
  width: 100%;
  max-width: 480px;
  padding: 36px 26px 30px;
  background: #FFFFFF;
  border-radius: 4px;
  text-align: center;
}

.crest {
  display: block;
  width: 116px;
  height: 50px;
  margin: 0 auto 14px;
  object-fit: contain;
}

.card h1 {
  margin: 0;
  font-size: 19px;
  text-transform: uppercase;
  font-weight: 500;
}

.portal {
  margin: 2px 0 30px;
  font-size: 14px;
  color: #222222;
}

/* ===========================
   Input fields
   =========================== */
.field {
  position: relative;
  margin-bottom: 22px;
  text-align: left;
}

.field input {
  width: 100%;
  padding: 22px 0 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
}

.field input:focus {
  outline: none;
  padding-bottom: 7px;
  border-bottom: 2px solid var(--brand);
}

.field label {
  position: absolute;
  top: 20px;
  left: 0;
  font-size: 17px;
  color: var(--muted);
  pointer-events: none;
  transition: all 0.15s ease;
}

/* label floats up when the box is focused or has text */
.field input:focus + label,
.field input:not(:placeholder-shown) + label {
  top: 0;
  font-size: 12px;
  color: var(--brand);
}

/* ===========================
   Links row
   =========================== */
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 24px;
  font-size: 16px;
}

.row a {
  color: var(--link);
  text-decoration: none;
}

.row a:hover {
  text-decoration: underline;
}

.row a.lock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

/* ===========================
   Button and messages
   =========================== */
button.go {
  width: 100%;
  padding: 15px;
  border: 1px solid var(--brand);
  border-radius: 3px;
  background: var(--brand);
  color: #FFFFFF;
  font: inherit;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.2px;
  cursor: pointer;
}

button.go:hover {
  background: var(--brand-dark);
}

button.go:disabled {
  opacity: 0.65;
  cursor: wait;
}

:focus-visible {
  outline: 3px solid #7FB2F0;
  outline-offset: 2px;
}

.error {
  min-height: 20px;
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--bad);
  text-align: left;
}

.foot {
  margin: 28px 0 0;
  font-size: 14px;
  color: var(--link);
}

/* ===========================
   Portal picker (home page only)
   =========================== */
.picker {
  display: grid;
  gap: 12px;
  margin-top: 6px;
}

.picker a {
  display: block;
  padding: 15px;
  border: 1px solid var(--brand);
  border-radius: 3px;
  color: var(--brand);
  font-weight: 500;
  text-decoration: none;
}

.picker a:hover {
  background: var(--brand);
  color: #FFFFFF;
}

/* ===========================
   Small phones
   =========================== */
@media (max-width: 420px) {
  .card {
    padding: 28px 18px 24px;
  }

  .row {
    font-size: 14px;
  }
}

/* ===========================
   Respect "reduce motion" setting
   =========================== */
@media (prefers-reduced-motion: reduce) {
  .field label {
    transition: none;
  }
}

/* ===========================
   Show / hide password eye
   =========================== */
.field input.has-eye {
  padding-right: 42px;
}

.field .eye {
  position: absolute;
  right: 0;
  bottom: 4px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.field .eye:hover,
.field .eye.is-on {
  color: var(--brand);
}

.field .eye:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

/* eye open = password hidden (click to show); eye crossed = password showing (click to hide) */
.field .eye .eye-shut { display: none; }
.field .eye.is-on .eye-open { display: none; }
.field .eye.is-on .eye-shut { display: block; }