:root {
  color-scheme: light;
  --navy: #0a0420;
  --blue: #223180;
  --accent: #bebfdc;
  --page: #f2f2f8;
  --line: #d9daea;
  --muted: #626581;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; background: var(--page); color: var(--navy); }
.hidden { display: none !important; }

.portal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 60px;
  padding: 0 clamp(20px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--navy);
  color: #fff;
}

.portal-brand { display: flex; align-items: center; gap: 10px; }
.portal-brand img { display: block; width: 150px; }
.portal-brand span { color: rgb(255 255 255 / 25%); font-size: 18px; }
.portal-brand strong { color: #94a3b8; font-size: 14px; font-weight: 500; }
.portal-main { width: min(1120px, calc(100% - 32px)); min-height: calc(100vh - 60px); margin: 0 auto; padding: 32px 0; display: grid; place-items: center; }
.portal-loading { min-height: 320px; display: grid; place-content: center; justify-items: center; gap: 18px; color: var(--muted); }
.portal-spinner { width: 36px; height: 36px; border: 3px solid var(--accent); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
.portal-content { width: 100%; }
.portal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 280px)); justify-content: center; gap: 24px; }
.portal-card {
  min-height: 150px;
  padding: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--navy);
  text-align: center;
  text-decoration: none;
  box-shadow: 0 8px 28px rgb(24 38 64 / 7%);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.portal-card:hover, .portal-card:focus-visible { transform: translateY(-3px); border-color: var(--blue); box-shadow: 0 14px 36px rgb(24 38 64 / 12%); outline: none; }
.portal-card strong { font-size: 20px; }
.portal-empty { padding: 34px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--muted); text-align: center; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 800px) {
  .portal-grid { grid-template-columns: minmax(230px, 380px); }
  .portal-card { min-height: 110px; }
}

@media (max-width: 540px) {
  .portal-header { padding: 0 14px; }
  .portal-brand img { width: 120px; }
  .portal-brand strong { display: none; }
}
