:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: #182c41;
  background: #f2f7fc;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --navy: #0b1f3a;
  --blue: #086fc5;
  --docker-blue: #2496ed;
  --muted: #667c92;
  --line: #d3e2ef;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-width: 320px; min-height: 100vh; margin: 0; }
button, input { font: inherit; }
button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--blue);
  border-radius: 2px;
  padding: 10px 16px;
  color: white;
  background: var(--blue);
  font-size: .94rem;
  font-weight: 650;
  cursor: pointer;
  transition: background-color .15s ease, transform .15s ease;
}
button:hover { background: #07599e; }
button:active { transform: translateY(1px); }
button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
button.secondary { border-color: #9eb4c9; color: var(--navy); background: white; }
button.secondary:hover { border-color: var(--blue); background: #eaf5ff; }
button:focus-visible, input:focus-visible {
  outline: 3px solid #8bc7f4;
  outline-offset: 2px;
}
h1, h2, p { margin-top: 0; }

body.login-mode, body.loading-mode {
  color: #182c41;
  background: linear-gradient(145deg, #07182e, #0b2f52 58%, #145b92);
}
main { min-height: 100vh; }
body.login-mode main, body.loading-mode main {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}
.transition-loader {
  display: grid;
  justify-items: center;
  gap: 18px;
  color: #e8f4ff;
  text-align: center;
}
.transition-loader p { margin: 0; font-size: .96rem; }
.loader-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgb(255 255 255 / 28%);
  border-top-color: var(--docker-blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.login-page { width: min(440px, 100%); }
.login-card {
  padding: clamp(26px, 5vw, 42px);
  border: 1px solid #c9dced;
  border-top: 4px solid var(--docker-blue);
  border-radius: 2px;
  background: white;
  box-shadow: 0 18px 60px rgb(0 11 25 / 30%);
}
.login-mark, .brand-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: white;
  background: var(--docker-blue);
  font-weight: 800;
}
.login-mark { margin-bottom: 20px; font-size: .9rem; }
.eyebrow {
  margin-bottom: 7px;
  color: var(--blue);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .14em;
}
.login-card h1 { margin-bottom: 7px; color: var(--navy); font-size: 1.45rem; }
.login-description { margin-bottom: 22px; color: var(--muted); font-size: .92rem; }
#login-form { display: grid; gap: 16px; }
#login-form label { display: block; color: #182c41; font-size: .9rem; font-weight: 650; }
input {
  display: block;
  width: 100%;
  min-height: 46px;
  margin-top: 7px;
  padding: 10px 12px;
  border: 1px solid #aebfd0;
  border-radius: 2px;
  color: #182c41;
  background: white;
}
input:focus { border-color: var(--docker-blue); }
.login-submit-row { display: grid; gap: 8px; margin-top: 4px; }
.login-submit-row button { width: 100%; }
.login-submit-row p { min-height: 1.4em; margin: 0; }
.error-text { color: #a94854; font-size: .9rem; }

.dashboard-page { min-height: 100vh; background: #f2f7fc; }
.topbar {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 2.5vw, 42px);
  border-bottom: 4px solid var(--docker-blue);
  color: white;
  background: var(--navy);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-icon { border: 1px solid #8bc7f4; font-size: .8rem; }
.brand .eyebrow { margin-bottom: 2px; color: #afcde5; }
.brand strong { display: block; font-size: 18px; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.signed-in-user { color: #d5e8f8; font-size: .9rem; }
.dashboard-content { width: min(880px, 100%); margin: 0 auto; padding: 54px 24px; }
.dashboard-content > .eyebrow { margin-bottom: 7px; }
.dashboard-content h1 { margin-bottom: 8px; color: var(--navy); font-size: clamp(1.5rem, 3vw, 2rem); }
.dashboard-description { max-width: 650px; margin-bottom: 26px; color: var(--muted); line-height: 1.6; }
.status-card {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 22px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--docker-blue);
  background: white;
  box-shadow: 0 4px 14px rgb(11 31 58 / 5%);
}
.status-indicator {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  margin-top: 5px;
  border-radius: 50%;
  background: #40a879;
  box-shadow: 0 0 0 4px #e3f5ec;
}
.status-card h2 { margin: 0 0 6px; color: var(--navy); font-size: 1.05rem; }
.status-card p, .dashboard-note { margin: 0; color: var(--muted); line-height: 1.5; }
.dashboard-note { margin-top: 18px; font-size: .86rem; }

@media (max-width: 520px) {
  body.login-mode main, body.loading-mode main { padding: 16px; }
  .topbar { align-items: flex-start; padding: 14px 16px; }
  .top-actions { flex-direction: column-reverse; align-items: flex-end; gap: 7px; }
  .signed-in-user { max-width: 160px; overflow-wrap: anywhere; text-align: right; }
  .dashboard-content { padding: 36px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .loader-spinner { animation-duration: 1.8s; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
