/* FX Utilities Portal — landing page
   Same design tokens as the HR/Onboarding/Training apps underneath it, so
   the picker reads as the front door of one product suite rather than a
   separate thing bolted on top. */

:root {
  --navy: #1f3864;
  --navy-dark: #142544;
  --border: #e2e5ea;
  --grey: #6b7280;
  --font: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font);
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #1a1d23;
}

.portal {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.portal-header {
  text-align: center;
  color: #ffffff;
  margin-bottom: 40px;
}

.portal-logo {
  max-height: 70px;
  max-width: 260px;
  margin-bottom: 20px;
}

.portal-header h1 {
  margin: 0 0 8px 0;
  font-size: 2em;
  font-weight: 700;
  color: #ffffff;
}

.portal-subtitle {
  margin: 0;
  font-size: 1.05em;
  color: #dce6f1;
}

/* Round 33b — which of the three things the page is showing.

   checking    : looking for a session. Nothing but a line of text.
   signed-out  : the sign-in panel. No tiles — we do not know them yet.
   ready       : their tiles, filtered.
   unfiltered  : signed in, but the grant could not be read or is slow.
                 Every tile, and a note saying why. */
[data-grid="checking"] .portal-cards,
[data-grid="signed-out"] .portal-cards { display: none; }

.portal-gate, .portal-checking { display: none; }
[data-grid="signed-out"] .portal-gate { display: block; text-align: center; }
[data-grid="checking"] .portal-checking { display: block; }

.portal-gate p, .portal-checking {
  color: #dce6f1;
  margin: 6px 0;
}
.portal-checking { opacity: 0.7; text-align: center; }
.portal-gate .portal-signin { font-size: 1em; padding: 8px 20px; margin-top: 4px; }

/* Round 33 — The Grid showing you your own systems.

   The note only appears when something could not be worked out, so it
   is quiet rather than alarming: every tile is still there and still
   works, which is the whole point of failing open. */
.portal-note {
  color: #dce6f1;
  opacity: 0.75;
  font-size: 0.95em;
  margin: 0 0 6px;
  text-align: center;
}

.portal-signin {
  background: transparent;
  color: #dce6f1;
  border: 1px solid rgba(220, 230, 241, 0.45);
  border-radius: 6px;
  padding: 6px 16px;
  font: inherit;
  font-size: 0.95em;
  cursor: pointer;
}
.portal-signin:hover { border-color: #dce6f1; }
.portal-signin:focus-visible { outline: 2px solid #dce6f1; outline-offset: 2px; }

/* A tile that is not yours is gone, not greyed out. Greying it out
   would advertise what everybody else can get into, which is the thing
   this was built to stop. */
.portal-card[hidden] { display: none; }

.portal-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1040px;
}

@media (max-width: 640px) {
  .portal-cards {
    grid-template-columns: 1fr;
  }
}

.portal-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  /* Every tile shares this floor so the grid reads as one uniform
     set regardless of how much a given system's description runs
     on for — grid rows already stretch items to match each other
     (the default align-items: stretch), so this min-height is what
     keeps tiles in *different* rows the same size as well. */
  min-height: 240px;
  background: #ffffff;
  border-radius: 10px;
  padding: 24px 22px;
  text-decoration: none;
  color: #1a1d23;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.portal-card:hover,
.portal-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.26);
}

.portal-card-logo {
  display: block;
  height: 48px;
  width: 48px;
  margin: 0 auto 4px;
  border-radius: 8px;
}

.portal-card-title {
  font-size: 1.15em;
  font-weight: 700;
  color: var(--navy);
}

.portal-card-desc {
  font-size: 0.92em;
  color: var(--grey);
  line-height: 1.4;
}

.portal-footer {
  margin-top: 40px;
  max-width: 560px;
  text-align: center;
}

.portal-footer p {
  margin: 0;
  font-size: 0.85em;
  color: #dce6f1;
}
