:root {
  --navy: #0e1c33;
  --blue: #084fbd;
  --red: #e3282c;
  --base: #fafaf7;
  --base-2: #d1e2ff;
  --ink: #0e1c33;
  --muted: #4a5568;
  --card: #ffffff;
  --line: rgba(14, 28, 51, 0.12);
  --gold: #f5d76e;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Libre Baskerville", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--base);
  min-height: 100vh;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(8, 79, 189, 0.18), transparent 60%),
    linear-gradient(165deg, #fafaf7 0%, #e8eef8 45%, #f7f3e8 100%);
}

.shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: 2rem 1.5rem 1.75rem;
  box-shadow: 0 18px 40px rgba(14, 28, 51, 0.08);
}

.login-panel { max-width: 420px; margin: 2rem auto 0; text-align: center; }

.seal-wrap {
  width: 168px;
  height: 168px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 4px var(--gold), 0 10px 28px rgba(14, 28, 51, 0.15);
  overflow: hidden;
}

.seal {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  background: #fff;
}

.seal-sm {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 0 0 2px var(--gold);
}

h1 {
  font-family: var(--display);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin: 0.25rem 0 0;
  line-height: 1.2;
}

.eyebrow {
  margin: 0.5rem 0 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blue);
}

.lede {
  color: var(--muted);
  margin: 0.75rem 0 1.5rem;
  font-size: 0.95rem;
}

form { text-align: left; display: grid; gap: 0.9rem; }
label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
}
input {
  font: inherit;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: var(--base);
  color: var(--ink);
}
input:focus {
  outline: 2px solid rgba(8, 79, 189, 0.35);
  border-color: var(--blue);
}

button {
  font: inherit;
  font-weight: 800;
  border: none;
  cursor: pointer;
  padding: 0.85rem 1rem;
  border-radius: 0.55rem;
  background: var(--blue);
  color: #fff;
  margin-top: 0.25rem;
}
button:hover { filter: brightness(1.05); }
button:disabled { opacity: 0.65; cursor: wait; }
button.ghost {
  background: transparent;
  color: var(--blue);
  border: 1px solid var(--line);
  font-weight: 700;
}

.error {
  color: var(--red);
  background: rgba(227, 40, 44, 0.08);
  border: 1px solid rgba(227, 40, 44, 0.25);
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.9rem;
  margin: 0;
}

.back {
  display: inline-block;
  margin-top: 1.25rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.back:hover { color: var(--blue); }

.portal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.portal-brand { display: flex; align-items: center; gap: 0.85rem; }
.portal-brand h1 { font-size: 1.35rem; }

.block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.15rem 1.2rem 1.25rem;
  margin-bottom: 1rem;
}
.block h2 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.65rem; }
.list li {
  padding: 0.85rem 0.95rem;
  border-radius: 0.7rem;
  background: var(--base);
  border: 1px solid var(--line);
}
.list li strong { display: block; margin-bottom: 0.2rem; }
.list li span { color: var(--muted); font-size: 0.88rem; }
.list .empty { color: var(--muted); border-style: dashed; }

[hidden] { display: none !important; }

@media (max-width: 520px) {
  .portal-top { flex-direction: column; align-items: flex-start; }
}
