/*
 * The site's stylesheet.
 *
 * Same palette and spacing as the desktop app, deliberately: someone arriving
 * here from Kadr should not feel handed off to a different product.
 */

:root {
  color-scheme: dark;

  --bg: #0b0d12;
  --surface-1: #14171e;
  --surface-2: #1b1f28;
  --surface-3: #242a35;
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.11);

  --text: #e8eaef;
  --text-dim: #99a1ae;
  --text-faint: #666e7c;

  --accent: #4d8dff;
  --accent-hover: #6ba0ff;
  --accent-ink: #04101f;
  --danger: #ff4d42;

  --r-sm: 7px;
  --r-md: 10px;
  --r-lg: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ------------------------------------------------------------------ */

.top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
  text-decoration: none;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(77, 141, 255, 0.6);
}

.top__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.top__right form { margin: 0; }

.quiet {
  color: var(--text-dim);
  text-decoration: none;
}

.quiet:hover { color: var(--text); }

.page {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bottom {
  padding: 20px 24px 28px;
  text-align: center;
  color: var(--text-faint);
  font-size: 12px;
}

/* ------------------------------------------------------------------ */

h1 { margin: 0 0 6px; font-size: 22px; font-weight: 650; letter-spacing: -0.01em; }
h2 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }

p { margin: 0 0 14px; }
p:last-child { margin-bottom: 0; }

.muted { color: var(--text-dim); }
.hint { color: var(--text-faint); font-size: 12.5px; }

.alert {
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: rgba(255, 77, 66, 0.12);
  color: #ff8a82;
  font-size: 13px;
}

.card {
  padding: 24px;
  border-radius: var(--r-lg);
  background: var(--surface-1);
  box-shadow: 0 0 0 1px var(--line);
}

.card--center { text-align: center; }
.card--center .form { justify-content: center; }

.hero { padding: 40px 0 8px; }
.hero h1 { font-size: 30px; line-height: 1.2; }
.hero p { max-width: 46ch; color: var(--text-dim); }

/* ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.btn:hover { background: var(--surface-3); border-color: rgba(255, 255, 255, 0.18); }

.btn--primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
  font-weight: 650;
  box-shadow: 0 2px 12px rgba(77, 141, 255, 0.28);
}

.btn--primary:hover { background: var(--accent-hover); }

.btn--ghost {
  height: 30px;
  padding: 0 11px;
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text-dim);
  font-size: 12.5px;
}

.btn--ghost:hover { color: var(--text); }

.btn--lg { height: 42px; padding: 0 22px; font-size: 15px; }

/* ------------------------------------------------------------------ */

.form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.form--row { flex-direction: row; gap: 10px; margin-top: 22px; }

.form label { display: flex; flex-direction: column; gap: 6px; }
.form label > span { color: var(--text-dim); font-size: 13px; }

.form input[type="email"] {
  height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.form input[type="email"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(77, 141, 255, 0.18);
}

/* ------------------------------------------------------------------ */

.rows { display: flex; flex-direction: column; margin-top: 18px; }

.row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.row__label { width: 110px; flex: none; color: var(--text-dim); }
.row__value { min-width: 0; }
.row .btn { margin-left: auto; }

.meter {
  height: 5px;
  margin-top: 16px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.meter span { display: block; height: 100%; background: var(--accent); }

/* ------------------------------------------------------------------ */

.devices { list-style: none; margin: 16px 0 0; padding: 0; }

.device {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.device form { margin: 0 0 0 auto; }
.device__name { font-weight: 550; }
.device__meta { color: var(--text-faint); font-size: 12.5px; }
.device.is-revoked .device__name { color: var(--text-faint); text-decoration: line-through; }

.grants {
  margin: 18px auto 0;
  padding: 0;
  max-width: 44ch;
  list-style: none;
  text-align: left;
  color: var(--text-dim);
  font-size: 13.5px;
}

.grants li { padding: 7px 0 7px 22px; position: relative; }

.grants li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ------------------------------------------------------------------ */

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }

.plan {
  padding: 20px;
  border-radius: var(--r-md);
  background: var(--surface-1);
  box-shadow: 0 0 0 1px var(--line);
}

.plan--pro { box-shadow: 0 0 0 1px rgba(77, 141, 255, 0.4); }

.plan ul { margin: 12px 0 0; padding-left: 18px; color: var(--text-dim); font-size: 13.5px; }
.plan li { padding: 3px 0; }

@media (max-width: 560px) {
  .page { padding: 22px 14px 36px; }
  .card { padding: 18px; }
  .hero h1 { font-size: 24px; }
  .row__label { width: 88px; }
}
