:root {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #171717;
  background: #f8f8f7;
  font-synthesis: none;
  --ink: #171717;
  --muted: #707070;
  --line: #dededb;
  --surface: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button, a, input { outline-offset: 4px; }
[hidden] { display: none !important; }

.eyebrow, .identity-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow { color: var(--muted); }
.eyebrow { margin: 0; }
main {
  width: 100%;
  min-height: 100dvh;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(24px, 6vw, 96px);
}
h1, h2, p { margin-top: 0; }
h1:focus { outline: none; }
h1 {
  font-size: clamp(45px, 6vw, 82px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -.065em;
}
h2 { font-size: 27px; font-weight: 550; letter-spacing: -.045em; }

.dashboard { min-height: 100dvh; display: flex; flex-direction: column; }
.dashboard-top {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.session-label { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.quiet {
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 10px 0;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 5px;
}
.quiet:hover { text-decoration-color: var(--ink); }
.dashboard-center {
  width: min(100%, 700px);
  margin: auto;
  padding: 72px 0 106px;
  text-align: center;
}
.hero-logo { display: block; width: min(225px, 70%); height: auto; margin: 0 auto 45px; }
.dashboard-center h1 { margin: 18px 0 16px; }
.hero-description { color: var(--muted); font-size: clamp(16px, 2vw, 19px); line-height: 1.7; }
.user-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(100%, 420px);
  margin: 48px auto 0;
  padding: 29px 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgb(0 0 0 / 4%);
}
.identity-label { color: var(--muted); }
.user-identity strong { max-width: 100%; overflow-wrap: anywhere; font-size: 30px; font-weight: 600; letter-spacing: -.04em; }
.identity-organization, .session-detail { color: var(--muted); font-size: 14px; }
.session-detail { margin: 28px 0 0; font-size: 13px; }
.session-detail span { padding: 0 7px; }
.loading-track {
  width: min(100%, 420px);
  height: 4px;
  margin: 50px auto 0;
  overflow: hidden;
  border-radius: 99px;
  background: #e6e6e4;
}
.loading-indicator {
  display: block;
  width: 35%;
  height: 100%;
  border-radius: inherit;
  background: var(--ink);
  animation: loading-sweep 1.8s ease-in-out infinite;
}
@keyframes loading-sweep {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(185%); }
}

.login-layout {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr minmax(300px, 420px);
  align-items: center;
  gap: clamp(40px, 8vw, 140px);
  padding: 80px 0;
}
.intro h1 { max-width: 640px; margin: 20px 0 26px; }
.login-logo { display: block; width: 180px; height: auto; margin-bottom: 36px; }
.lead { max-width: 460px; color: var(--muted); font-size: 17px; line-height: 1.7; }
.login-card {
  padding: clamp(28px, 4vw, 45px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 24px 65px rgb(0 0 0 / 5%);
}
.login-card h2 { margin: 0 0 12px; }
.login-card > p { color: var(--muted); line-height: 1.6; margin-bottom: 30px; }
.login-card label { display: block; margin: 20px 0 8px; font-size: 13px; font-weight: 600; }
.login-card input {
  display: block;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #cfcfcb;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.login-card input:focus { border-color: var(--ink); }
.primary {
  width: 100%;
  margin-top: 28px;
  padding: 14px 20px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.primary:hover { background: #3a3a3a; }
.error { margin: 16px 0 0; color: #333; font-size: 13px; line-height: 1.5; }
.error:empty { display: none; }
.expired-card {
  max-width: 620px;
  margin: 10vh auto;
  padding: clamp(28px, 5vw, 50px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.expired-card h1 { margin: 16px 0 22px; font-size: clamp(32px, 4vw, 48px); }
.expired-card p { color: var(--muted); line-height: 1.7; }
.expired-card a { display: inline-block; margin-top: 12px; color: var(--ink); text-underline-offset: 5px; }
#session-overlay, #connection-overlay { position: fixed; inset: 0; z-index: 1000; background: #f8f8f7; padding: 30px; }
#connection-overlay { display: grid; place-items: center; }
#blazor-error-ui { display: none; position: fixed; inset-inline: 0; bottom: 0; z-index: 1100; padding: 18px; background: #e8e8e6; }
@media (max-width: 780px) {
  main, .dashboard, .login-layout { min-height: 100dvh; }
  .dashboard-top { min-height: 78px; }
  .dashboard-center { padding: 55px 0 80px; }
  .hero-logo { margin-bottom: 35px; }
  .login-layout { grid-template-columns: 1fr; gap: 42px; padding: 55px 0; }
  .intro h1 { max-width: 500px; }
}
@media (prefers-reduced-motion: reduce) {
  .loading-indicator { animation-duration: 4s; }
}
