:root {
  --kaios-purple: #6b2fa4;
  --kaios-purple-dark: #552584;
  --kaios-purple-quiet: #f4eef9;
  --kaios-lavender: #af8ed8;
  --kaios-orange: #e8520e;
  --ink: #1a1a2e;
  --muted: #555770;
  --quiet: #8e90a6;
  --canvas: #f8f8fc;
  --surface: #ffffff;
  --surface-subtle: #fbfbfe;
  --line: #e2e2ea;
  --line-soft: #ededf2;
  --success: #0caf60;
  --success-ink: #075d34;
  --danger: #e5383b;
  --danger-ink: #8b1f22;
  --warning: #f2994a;
  --shadow-panel: 0 18px 44px rgba(26, 26, 46, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 0%, rgba(175, 142, 216, 0.22), transparent 32rem),
    linear-gradient(180deg, rgba(107, 47, 164, 0.08), rgba(248, 248, 252, 0) 30rem),
    var(--canvas);
  font-family: "Nunito Sans", "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.site-header {
  background: var(--kaios-purple);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.header-inner {
  width: min(1120px, calc(100% - 32px));
  min-height: 56px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-logo {
  width: 99px;
  height: 27px;
  flex: 0 0 auto;
}

.header-label {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  min-height: calc(100vh - 56px);
  margin: 0 auto;
  padding: clamp(34px, 8vh, 84px) 0 34px;
  display: grid;
  place-items: start center;
}

.verification-panel {
  width: min(100%, 620px);
  padding: clamp(26px, 5vw, 42px);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 226, 234, 0.92);
  border-radius: 8px;
  box-shadow: var(--shadow-panel);
}

.portal-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(107, 47, 164, 0.14);
  border-radius: 999px;
  background: var(--kaios-purple-quiet);
  color: var(--kaios-purple-dark);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(12, 175, 96, 0.13);
}

.verification-copy {
  margin-top: 22px;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.intro {
  max-width: 470px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.58;
}

.verify-form {
  margin-top: 32px;
  display: grid;
  gap: 12px;
}

label {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-subtle);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 1.14rem;
  letter-spacing: 0.04em;
  padding: 0 16px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input::placeholder {
  color: #a8a8b8;
  letter-spacing: 0;
}

input:focus {
  border-color: var(--kaios-purple);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(107, 47, 164, 0.13);
}

button {
  position: relative;
  min-height: 52px;
  border: 0;
  border-radius: 6px;
  background: var(--kaios-purple);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0 22px;
  transition: background 0.16s ease, transform 0.16s ease, opacity 0.16s ease;
}

button:hover {
  background: var(--kaios-purple-dark);
}

button:active {
  transform: translateY(1px);
}

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

.button-loading {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 999px;
  animation: spin 0.75s linear infinite;
}

button.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

button.is-loading .button-loading {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.result {
  margin-top: 22px;
  padding: 16px;
  border: 1px solid;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.result-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
}

.result strong {
  display: block;
  margin-top: 1px;
  font-size: 1.02rem;
}

.result p {
  margin: 4px 0 0;
  color: inherit;
  font-size: 0.94rem;
  line-height: 1.45;
}

.result-success {
  color: var(--success-ink);
  background: rgba(12, 175, 96, 0.1);
  border-color: rgba(12, 175, 96, 0.3);
}

.result-success .result-icon {
  background: var(--success);
}

.result-danger,
.result-error {
  color: var(--danger-ink);
  background: rgba(229, 56, 59, 0.09);
  border-color: rgba(229, 56, 59, 0.28);
}

.result-danger .result-icon,
.result-error .result-icon {
  background: var(--danger);
}

.security-note {
  margin-top: 26px;
  padding: 15px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(248, 248, 252, 0.7);
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  color: var(--muted);
}

.security-note strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.security-note p {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
}

.note-marker {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--kaios-orange);
  box-shadow: 0 0 0 5px rgba(232, 82, 14, 0.12);
}

@media (max-width: 640px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 14px 0;
    gap: 8px;
  }

  .header-label {
    white-space: normal;
  }

  .page-shell {
    min-height: auto;
    padding-top: 24px;
  }

  .verification-panel {
    padding: 24px;
  }
}
