:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #180b05;
  color: #fff8f3;
  --argano-orange: #ff5c00;
  --argano-orange-light: #ff8f00;
  --argano-orange-dark: #ec5723;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 143, 0, 0.3), transparent 38%),
    radial-gradient(circle at 82% 88%, rgba(255, 92, 0, 0.18), transparent 34%),
    #180b05;
}

.card {
  width: min(100%, 560px);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow: auto;
  padding: 32px;
  border: 1px solid rgba(255, 92, 0, 0.54);
  border-radius: 18px;
  background: #24140d;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.46),
    0 0 42px rgba(255, 92, 0, 0.1);
}

h1 {
  margin: 0;
  font-size: clamp(1.7rem, 5vw, 2.15rem);
  line-height: 1.12;
}

.brand-logo,
.customer-brand-logo,
.product-name {
  display: block;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1rem, 5vw, 2rem);
  margin-bottom: 0.65rem;
}

.brand-logo {
  width: clamp(7.25rem, 28vw, 9.25rem);
  height: auto;
  margin-bottom: 0.65rem;
}

.brand-row .brand-logo {
  flex: 0 1 auto;
  margin-bottom: 0;
}

.customer-brand-logo {
  width: clamp(8.5rem, 32vw, 11rem);
  max-width: 48%;
  max-height: 3.1rem;
  object-fit: contain;
  object-position: right center;
}

h2 {
  margin: 24px 0 0;
  font-size: 1.15rem;
}

.intro {
  margin: 10px 0 26px;
  color: #d8c1b5;
  line-height: 1.5;
}

form {
  display: grid;
  gap: 10px;
}

fieldset {
  min-width: 0;
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding: 18px;
  border: 1px solid #754329;
  border-radius: 12px;
}

legend {
  padding: 0 7px;
  color: #fff1e8;
  font-weight: 750;
}

label {
  margin-top: 8px;
  font-weight: 650;
}

input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #805039;
  border-radius: 10px;
  background: #170c07;
  color: inherit;
  font: inherit;
}

input:focus {
  border-color: var(--argano-orange-light);
  outline: 3px solid rgba(255, 92, 0, 0.28);
}

button {
  margin-top: 14px;
  padding: 12px 16px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(98deg, var(--argano-orange) 59%, var(--argano-orange-light) 100%);
  color: #fff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

button.secondary {
  margin-top: 2px;
  background: transparent;
  color: #ffc6a3;
}

.status {
  min-height: 1.4em;
  margin: 18px 0 0;
  color: #ffb7b7;
}

.status.success {
  color: #91dfad;
}

.status.pending {
  color: #ffd28c;
}

.enrollment-summary {
  display: grid;
  gap: 8px;
  margin: 18px 0 4px;
  padding: 14px;
  border: 1px solid #754329;
  border-radius: 10px;
  background: #170c07;
}

.enrollment-summary > div {
  display: grid;
  grid-template-columns: minmax(112px, auto) minmax(0, 1fr);
  gap: 12px;
}

.enrollment-summary dt {
  color: #d8c1b5;
  font-size: 0.82rem;
  font-weight: 700;
}

.enrollment-summary dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.setup-copy,
.recovery-panel p,
fieldset small,
details {
  color: #d8c1b5;
  line-height: 1.45;
}

.setup-copy {
  margin: 0;
}

.enrollment-qr {
  width: min(100%, 286px);
  margin: 4px auto;
  padding: 10px;
  border-radius: 10px;
  background: #fff;
}

.enrollment-qr-svg {
  display: block;
  width: 100%;
  height: auto;
}

details {
  padding: 10px 0 2px;
}

summary {
  color: #ffd4b8;
  cursor: pointer;
  font-weight: 700;
}

.enrollment-secret {
  display: block;
  padding: 10px;
  border-radius: 8px;
  background: #120804;
  color: #fff8f3;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  overflow-wrap: anywhere;
  user-select: all;
}

.recovery-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #3b5e4c;
  border-radius: 12px;
  background: #101f1a;
}

.recovery-panel h2 {
  margin-top: 0;
}

.recovery-codes {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 18px 0;
  padding-left: 28px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.recovery-codes > li {
  min-width: 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
  user-select: all;
}

.recovery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.recovery-actions button {
  flex: 1 1 190px;
  margin-top: 0;
}

.recovery-actions button.secondary {
  border: 1px solid var(--argano-orange);
}

.recovery-copy-status {
  min-height: 1.4em;
  margin: 10px 0 0;
}

.recovery-copy-status.success {
  color: #91dfad;
}

.recovery-copy-status.error {
  color: #ffb7b7;
}

@media (max-width: 520px) {
  body {
    align-items: start;
    padding: 12px;
  }

  .card {
    max-height: calc(100dvh - 24px);
    padding: 22px 18px;
  }

  .enrollment-summary > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .enrollment-summary > div {
    gap: 2px;
  }
}
