/* The pairing page: one calm card, in the visual language of the DriveStore CRM /admin
   (dark, lines instead of shadows, white primary button, orange only as accent). */

:root {
  --background: #171717;
  --card: #1d1d1d;
  --line: #2c2c2c;
  --line-strong: #3d3d3d;
  --text: #ececec;
  --muted: #9b9b9b;
  --accent: #ff5c0a;
  --alert-text: #ffb9a3;
  --alert-line: #5c2a17;
  --alert-background: #26170f;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--background);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.card {
  width: 100%;
  max-width: 420px;
  padding: 28px 28px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.logo {
  display: block;
  margin: 0 0 20px;
}

h1 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* The one place besides the focus ring where the accent is used: "it worked". */
h1.good::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}

p {
  margin: 0 0 16px;
}

.intro {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.alert {
  padding: 10px 12px;
  color: var(--alert-text);
  background: var(--alert-background);
  border: 1px solid var(--alert-line);
  border-radius: 8px;
}

.field {
  margin: 0 0 16px;
}

label {
  display: block;
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 500;
}

input,
select,
button {
  font: inherit;
  color: inherit;
}

input[type="text"],
input[type="email"],
input[type="password"],
select {
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  background: var(--background);
  border: 1px solid var(--line);
  border-radius: 8px;
}

input:hover,
select:hover {
  border-color: var(--line-strong);
}

input.code {
  font-family: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  font-size: 18px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

button {
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

button.primary {
  background: #ffffff;
  color: #171717;
}

button.primary:hover {
  background: #e4e4e4;
}

button.quiet {
  background: transparent;
  border-color: var(--line);
  font-weight: 500;
}

button.quiet:hover {
  border-color: var(--line-strong);
  background: #222222;
}

.actions {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
}

/* Keyboard users always see where they are. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

input:focus-visible,
select:focus-visible {
  border-color: var(--accent);
  outline-offset: 0;
}

.machine {
  margin: 0 0 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.machine > div {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
}

.machine > div:first-child {
  border-top: 0;
}

.machine dt {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 14px;
}

.machine dd {
  margin: 0;
  min-width: 0;
  text-align: right;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.machine dd.strong {
  font-weight: 600;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

.note {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.back {
  margin: 0;
}

.link {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link:hover {
  color: #ffffff;
}

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

  .card {
    padding: 22px 18px 20px;
  }

  .machine > div {
    flex-direction: column;
    gap: 2px;
  }

  .machine dd {
    text-align: left;
  }
}

@media (prefers-reduced-motion: no-preference) {
  button,
  input,
  select {
    transition: background-color 0.12s ease, border-color 0.12s ease;
  }
}
