* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f7fb;
  color: #1f2937;
}
.shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}
.card {
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
  margin-bottom: 16px;
}
h1, h2 { margin: 0 0 12px; line-height: 1.2; }
.eyebrow {
  margin: 0 0 8px;
  color: #64748b;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stack {
  display: grid;
  gap: 14px;
}
label span {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}
input, select, button {
  font: inherit;
}
input, select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
}
button {
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
}
.primary {
  background: #2563eb;
  color: #fff;
  font-weight: 700;
}
.secondary {
  background: #e2e8f0;
  color: #0f172a;
}
.error { color: #b91c1c; min-height: 1.2em; }
.muted { color: #475569; }
.small { color: #64748b; font-size: 0.92rem; }
.details {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
}
.details div {
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 10px;
}
.details dt {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 6px;
}
.details dd {
  margin: 0;
  word-break: break-word;
}
a { color: #2563eb; }

[hidden] { display: none !important; }
.provisioning-wait {
  padding: 16px;
  margin: 16px 0;
  border-radius: 10px;
  background: #eff6ff;
}
.provisioning-wait p { margin: 0 0 12px; line-height: 1.6; }
.provisioning-wait p:last-child { margin-bottom: 0; }
.provisioning-wait progress { width: 100%; height: 12px; accent-color: #2563eb; }
.credential-box { margin-top: 24px; }
.credential-box h3 { margin-bottom: 12px; }
#credentials-status:empty, #credentials-error:empty { display: none; }
.login-cards { display: grid; gap: 14px; }
.login-card { padding: 16px; border: 1px solid #dbe3ee; border-radius: 10px; background: #f8fafc; }
.login-card h4 { margin: 0 0 12px; font-size: 1rem; }
.login-card dl { display: grid; gap: 12px; margin: 0; }
.login-card dt { color: #64748b; font-size: .85rem; margin-bottom: 4px; }
.login-value { margin: 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; user-select: all; }
a.primary { display: inline-block; padding: 12px 16px; border-radius: 10px; text-decoration: none; }


.demo-language {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.demo-language label { font-size: 13px; color: #64748b; }
.demo-language select { width: auto; min-width: 150px; }
.terms-consent {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    line-height: 1.5;
    align-content: center;
}
.terms-consent input { width: auto; margin-top: 3px; flex: 0 0 auto; }

.link-button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: #2563eb;
  text-decoration: underline;
  font: inherit;
  cursor: pointer;
}

.terms-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: min(82vh, 900px);
  border: 0;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .25);
}
.terms-dialog::backdrop { background: rgba(15, 23, 42, .55); }
.terms-dialog article { padding: 24px; overflow: auto; max-height: inherit; }
.terms-dialog h2 { margin-top: 0; }
.terms-dialog h3 { margin: 20px 0 6px; font-size: 16px; }
.terms-dialog p { line-height: 1.65; }
.terms-dialog form { display: flex; justify-content: flex-end; margin-top: 20px; }
label.terms-consent span span:last-child{display:inline;}
@media (max-width: 560px) {
  .demo-language { align-items: stretch; flex-direction: column; }
  .demo-language select { width: 100%; }
  .terms-dialog article { padding: 18px; }
}
