:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0a0d12;
  color: #f4f7fb;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(64, 210, 159, 0.14), transparent 34rem),
    linear-gradient(180deg, #10151d 0%, #080b0f 100%);
}

button, input { font: inherit; }

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.card {
  width: min(100%, 38rem);
  border: 1px solid #2b3441;
  border-radius: 1.25rem;
  background: rgba(18, 23, 31, 0.96);
  box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, 0.42);
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.75rem 1.75rem 1.25rem;
  border-bottom: 1px solid #252d38;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  border-radius: 0.9rem;
  background: #41d09f;
  color: #04130e;
  font-size: 1.1rem;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 0.2rem;
  color: #8f9baa;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.35rem, 4vw, 1.75rem); line-height: 1.25; }
h2 { margin-bottom: 0.45rem; font-size: 1.15rem; line-height: 1.35; }

.notice {
  min-height: 3.2rem;
  padding: 0.9rem 1.75rem;
  border-bottom: 1px solid #252d38;
  background: #111720;
  color: #aeb8c6;
  font-size: 0.92rem;
  line-height: 1.5;
}

.notice[data-kind="error"] { color: #ffadb3; }
.notice[data-kind="success"] { color: #8ff0ce; }

.panel { padding: 1.75rem; }
.panel-heading p { margin-bottom: 1.5rem; color: #9aa6b5; line-height: 1.55; }

label {
  display: block;
  margin: 1rem 0 0.45rem;
  color: #cbd3dc;
  font-size: 0.92rem;
  font-weight: 650;
}

input {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #3b4655;
  border-radius: 0.7rem;
  outline: none;
  background: #0c1118;
  color: #f7f9fc;
}

input:focus { border-color: #41d09f; box-shadow: 0 0 0 3px rgba(65, 208, 159, 0.16); }

.button {
  min-height: 2.9rem;
  padding: 0.7rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 0.7rem;
  cursor: pointer;
  font-weight: 750;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:focus-visible { outline: 3px solid rgba(110, 231, 190, 0.38); outline-offset: 2px; }
.button:disabled { cursor: wait; opacity: 0.6; }
.button-primary { background: #41d09f; color: #04130e; }
.button-primary:hover:not(:disabled) { background: #55ddb0; }
.button-secondary { border-color: #4b5665; background: #171d26; color: #f4f7fb; }
.button-secondary:hover:not(:disabled) { background: #202833; }
.button-wide { width: 100%; margin-top: 1.35rem; }

.account {
  margin-bottom: 0.65rem !important;
  color: #8ff0ce !important;
  font-size: 0.9rem;
}

.details { margin: 1.5rem 0; border: 1px solid #2e3743; border-radius: 0.85rem; overflow: hidden; }
.details > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 1rem; padding: 1rem; }
.details > div + div { border-top: 1px solid #2e3743; }
.details dt { color: #8f9baa; font-size: 0.9rem; }
.details dd { margin: 0; color: #eef2f7; overflow-wrap: anywhere; }
.code-value { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.86rem; line-height: 1.55; }
.scope-list { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0; padding: 0; list-style: none; }
.scope-list li { padding: 0.25rem 0.55rem; border: 1px solid #3b4a57; border-radius: 999px; background: #14211f; color: #a9eed7; font-size: 0.83rem; }
.privacy-note { color: #98a4b2; font-size: 0.9rem; line-height: 1.55; }
.actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 0.75rem; margin-top: 1.5rem; }
.panel-error { color: #ffd6d9; }
.panel-error h2 { color: #ff9da5; }

footer {
  padding: 1rem 1.75rem 1.25rem;
  border-top: 1px solid #252d38;
  color: #778392;
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: center;
}

[hidden] { display: none !important; }

@media (max-width: 34rem) {
  .shell { padding: 0; place-items: stretch; }
  .card { min-height: 100vh; border: 0; border-radius: 0; }
  .brand, .panel { padding-left: 1.25rem; padding-right: 1.25rem; }
  .notice, footer { padding-left: 1.25rem; padding-right: 1.25rem; }
  .details > div { grid-template-columns: 1fr; gap: 0.45rem; }
}
