/*
 * Palette read off the reference screens: near-black page, a card one step lighter,
 * hairline borders, and a single violet used for the logo, links and the primary button.
 */
:root {
  --page:        #0a0a0b;
  --card:        #141416;
  --field:       #101012;
  --line:        #26262a;
  --line-soft:   #1e1e21;

  --violet:      #6c5ce7;
  --violet-dim:  #5b4fd6;
  --violet-fill: #1a1830;

  --text:        #e6e6ea;
  --label:       #c9c9cf;
  --muted:       #7c7c86;
  --placeholder: #55555e;
  --danger:      #ff6b6b;

  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* ------------------------------------------------------------------ card */

.card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 40px;
}

/* The violet hairline along the top edge of the card in the reference. */
.card::before {
  content: '';
  position: absolute;
  inset: -1px -1px auto -1px;
  height: 1px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(90deg, transparent, var(--violet), transparent);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 34px;
}

.brand img { width: 46px; height: 46px; }

.brand span {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--violet);
}

/* ----------------------------------------------------------------- form */

label {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--label);
  margin-bottom: 8px;
}

input {
  width: 100%;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 14.5px;
  transition: border-color .15s ease;
}

input::placeholder { color: var(--placeholder); }

input:focus {
  outline: none;
  border-color: var(--violet-dim);
}

.field { margin-bottom: 20px; }

.hint {
  margin: 7px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.row-end {
  display: flex;
  justify-content: flex-end;
  margin: -12px 0 20px;
}

.row-end a { font-size: 12.5px; }

button {
  width: 100%;
  background: var(--violet-fill);
  border: 1px solid #2b2748;
  border-radius: 4px;
  padding: 13px;
  color: var(--violet);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

button:hover:not(:disabled) {
  background: #201d3a;
  border-color: var(--violet-dim);
}

button:disabled { opacity: .55; cursor: default; }

button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- links */

a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; }

.divider {
  height: 1px;
  background: var(--line-soft);
  margin: 26px 0 18px;
}

.foot {
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
}

/* --------------------------------------------------------------- status */

/*
 * One status line for both errors and successes, hidden until it has something to
 * say -- an always-present empty box shifts the form as soon as anything happens.
 */
.status {
  display: none;
  margin: 0 0 18px;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 13.5px;
  border: 1px solid transparent;
}

.status.show { display: block; }

.status.error {
  color: var(--danger);
  background: rgba(255, 107, 107, .07);
  border-color: rgba(255, 107, 107, .25);
}

.status.ok {
  color: #6be7a8;
  background: rgba(107, 231, 168, .07);
  border-color: rgba(107, 231, 168, .25);
}

@media (max-width: 480px) {
  .card { padding: 28px 22px; }
  .brand { margin-bottom: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
