:root {
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: #202e41;
  background: #edf1f6;
  font-synthesis: none;
  --accent: #2858cc;
  --ink: #202e41;
  --muted: #647185;
  --line: #dce3ec;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
:focus-visible {
  outline: 3px solid #7f9ce9;
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
.topbar {
  max-width: 1180px;
  margin: auto;
  padding: 32px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.7px;
}
.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 8px);
  gap: 3px;
  padding: 4px;
}
.brand-mark i {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
}
.brand-mark i:last-child {
  background: #9bb2ec;
}
.environment {
  color: #536481;
  font-size: 12px;
  padding: 8px 12px;
  border: 1px solid #ccd6e5;
  border-radius: 6px;
}
.environment > span {
  display: none;
}
main {
  max-width: 1180px;
  padding: 0 32px;
  margin: 50px auto 70px;
  min-height: 650px;
}
#form-view {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(0, 1.5fr);
  align-items: start;
  gap: 76px;
}
.intro {
  padding-top: 36px;
}
h1 {
  font-weight: 700;
  font-size: clamp(42px, 4.3vw, 58px);
  letter-spacing: -2.7px;
  line-height: 1.06;
  margin: 0 0 25px;
}
.lead {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
}
.intro .lead {
  max-width: 320px;
}
.intro-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 55px;
  max-width: 310px;
}
.intro-note p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
.note-mark {
  display: grid;
  place-items: center;
  flex: 0 0 19px;
  height: 19px;
  border: 1px solid #a6b4c8;
  border-radius: 50%;
  font-size: 12px;
  color: #647185;
  margin-top: 2px;
}
form {
  background: #fff;
  border-radius: 16px;
  padding: 8px 32px 0;
  box-shadow: 0 6px 24px #243d6310;
}
.form-section {
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.35px;
  margin: 0 0 20px;
}
label,
legend {
  font-size: 13px;
  line-height: 1.5;
  color: #435169;
}
label:not(.choice) {
  display: block;
  margin-bottom: 8px;
}
input[type="text"],
input[type="password"] {
  width: 100%;
  height: 48px;
  background: #f8fafc;
  border: 1px solid #d5dfe9;
  border-radius: 7px;
  padding: 0 13px;
  color: var(--ink);
  font-size: 14px;
}
input::placeholder {
  color: #778499;
}
input:hover {
  border-color: #a9b8cf;
}
input:focus {
  border-color: var(--accent);
  background: #fff;
}
#order-id {
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 14px;
}
.hint {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 10px 0 0;
}
.parameter-grid {
  display: grid;
  gap: 22px;
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
legend {
  padding: 0;
  margin-bottom: 10px;
}
.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  min-height: 48px;
  border: 1px solid #d5dfe9;
  border-radius: 7px;
  font-size: 14px;
  cursor: pointer;
  color: #435169;
}
.choice:has(input:checked) {
  background: #eef3ff;
  border-color: #2858cc;
  color: #214db4;
}
.choice input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.credentials-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.password-wrap {
  position: relative;
}
.password-wrap input {
  padding-right: 75px;
}
.password-wrap button {
  position: absolute;
  top: 2px;
  right: 2px;
  height: 44px;
  background: transparent;
  border: 0;
  font-size: 11px;
  padding: 0 9px;
  color: #526987;
}
.form-actions {
  display: flex;
  flex-direction: column-reverse;
  align-items: stretch;
  gap: 14px;
  padding: 26px 0 25px;
}
.form-actions p {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.form-actions br {
  display: none;
}
.primary,
.secondary {
  border: 1px solid var(--accent);
  border-radius: 7px;
  padding: 14px 20px;
  min-height: 48px;
  font-size: 14px;
  font-weight: 700;
}
.primary {
  background: var(--accent);
  color: #fff;
}
.primary:hover {
  background: #214bad;
}
.primary:active {
  transform: translateY(1px);
}
.secondary {
  background: #fff;
  color: var(--accent);
}
.secondary:hover {
  background: #eef3ff;
}
.inline-error {
  font-size: 13px;
  color: #a13036;
  line-height: 1.6;
  padding-bottom: 24px;
  margin: 0;
}
.eyebrow {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 14px;
}
.status-view {
  width: min(100%, 670px);
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  padding: 42px;
  box-shadow: 0 6px 24px #243d6310;
}
.status-view h1 {
  font-size: 36px;
  letter-spacing: -1.2px;
}
.status-view .lead {
  font-size: 16px;
}
.status-note {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}
.result-symbol {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 26px;
  margin-bottom: 28px;
  background: #eaf4ee;
  color: #28704b;
}
.status-view:is(
    [data-state="declined"],
    [data-state="error"],
    [data-state="invalid"],
    [data-state="missingQr"]
  )
  .result-symbol {
  color: #a13036;
  background: #faecec;
}
.status-view:is([data-state="pending"], [data-state="unknown"]) .result-symbol {
  color: #916110;
  background: #fbf2dd;
}
.receipt {
  margin: 28px 0;
  padding: 16px 0;
  border-block: 1px solid var(--line);
}
.receipt > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 0;
  font-size: 13px;
}
.receipt dt {
  color: var(--muted);
  flex-shrink: 0;
}
.receipt dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
#receipt-order {
  font-size: 12px;
}
.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.reference {
  font-size: 10px;
  margin: 24px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #e4ebf8;
  border-top-color: var(--accent);
  border-radius: 50%;
  margin-bottom: 28px;
  animation: spin 1s linear infinite;
}
footer {
  max-width: 1180px;
  padding: 0 32px;
  margin: 0 auto 28px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 11px;
  color: var(--muted);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
  }
  .primary:active {
    transform: none;
  }
}
@media (max-width: 900px) {
  #form-view {
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: 620px;
    margin: auto;
  }
  main {
    margin-top: 22px;
  }
  .intro {
    padding-top: 0;
  }
  h1 {
    font-size: 42px;
    letter-spacing: -1.7px;
    margin-bottom: 15px;
  }
  .intro .lead {
    max-width: 520px;
  }
  .intro-note {
    margin-top: 18px;
    max-width: 520px;
  }
}
@media (max-width: 540px) {
  .topbar {
    padding: 24px 20px;
  }
  .brand {
    font-size: 18px;
  }
  .environment {
    font-size: 10px;
    padding: 7px 9px;
  }
  main {
    padding: 0 16px;
    margin: 20px auto 40px;
    min-height: 570px;
  }
  .intro {
    padding: 0 4px;
  }
  h1 {
    font-size: 38px;
    letter-spacing: -1.7px;
  }
  .lead {
    font-size: 14px;
  }
  .intro-note {
    margin-top: 18px;
  }
  .intro-note p {
    font-size: 11px;
  }
  form {
    border-radius: 12px;
    padding: 2px 20px 0;
  }
  .form-section {
    padding: 22px 0;
  }
  h2 {
    font-size: 17px;
    margin-bottom: 17px;
  }
  .credentials-grid {
    grid-template-columns: 1fr;
    gap: 17px;
  }
  .choice {
    padding: 12px 10px;
    gap: 8px;
    font-size: 12px;
  }
  input[type="text"],
  input[type="password"],
  #order-id {
    font-size: 16px;
  }
  .hint {
    font-size: 11px;
  }
  .status-view {
    padding: 28px 22px;
    border-radius: 12px;
  }
  .status-view h1 {
    font-size: 29px;
  }
  .receipt > div {
    flex-direction: column;
    gap: 6px;
  }
  .receipt dd {
    text-align: left;
  }
  .result-actions > * {
    width: 100%;
  }
  footer {
    padding: 0 20px;
    font-size: 10px;
  }
}

.install-button {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--accent);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
footer {
  flex-wrap: wrap;
  align-items: center;
}
.offline-notice {
  padding: 14px 18px;
  border: 1px solid #d9c99d;
  border-radius: 7px;
  color: #76551b;
  background: #fbf2dd;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 24px;
}
#install-dialog {
  width: min(520px, calc(100% - 32px));
  border: 0;
  border-radius: 16px;
  padding: 30px;
  color: var(--ink);
  box-shadow: 0 15px 60px #202e4130;
}
#install-dialog::backdrop {
  background: #202e4166;
}
#install-dialog p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}
#install-dialog strong {
  color: var(--ink);
}
#install-dialog .primary {
  margin-top: 12px;
}
@media (display-mode: standalone) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
}
