/* Sign-in, Developer and Account pages. Builds on theme.css / app.css / charge.css. */

.navlink--btn {
  appearance: none;
  background: transparent;
  border: 0;
  font-family: inherit;
  cursor: pointer;
  color: var(--text-muted);
}

/* ---- sign-in ------------------------------------------------------------------ */
.signin {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--sp-4);
}
.signin__card {
  width: 100%;
  max-width: 380px;
  background: var(--surface-1);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: var(--sp-6) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.signin__logo { height: 28px; align-self: flex-start; }
.signin__title { margin: 0; font-size: 24px; line-height: 32px; font-weight: 600; color: var(--text-strong); }
.signin__sub { margin: calc(var(--sp-3) * -1) 0 0; color: var(--text-muted); font-size: 14px; line-height: 20px; }
.signin__error { color: var(--danger); font-size: 14px; line-height: 20px; }

/* ---- rows (chargers, users, firmware files) --------------------------------------- */
.rows { display: flex; flex-direction: column; gap: var(--sp-2); margin: var(--sp-3) 0; }
.row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  background: var(--surface-3);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
}
.row__main { flex: 1 1 220px; min-width: 0; }
.row__title { color: var(--text-strong); font-weight: 600; font-size: 15px; line-height: 22px; overflow-wrap: anywhere; }
.row__meta { color: var(--text-muted); font-size: 13px; line-height: 18px; overflow-wrap: anywhere; }
.row__actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.mono { font-family: var(--mono); }

/* An address or a secret to copy. */
.copyrow {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--surface-3);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  margin-top: var(--sp-2);
}
.copyrow__label { flex: none; width: 150px; color: var(--text-muted); font-size: 13px; line-height: 18px; }
.copyrow__value { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; color: var(--text-strong); overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .copyrow { flex-wrap: wrap; }
  .copyrow__label { width: 100%; }
}

/* Shown once: a new password or connection key. */
.once {
  margin: var(--sp-3) 0;
  padding: var(--sp-4);
  border-radius: var(--r-md);
  background: var(--accent-dim);
  color: var(--text-strong);
  font-size: 14px;
  line-height: 20px;
}
.once .copyrow { background: rgba(0, 0, 0, 0.25); }

/* ---- Developer page ---------------------------------------------------------------- */
.pick { display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; margin-bottom: var(--sp-4); }
.pick select { min-width: 240px; }
.logbar { display: flex; gap: var(--sp-3); align-items: flex-end; flex-wrap: wrap; margin-bottom: var(--sp-3); }
.logbar .field { flex: 0 1 200px; }
.logbar .field--grow { flex: 1 1 220px; }
.logbox {
  background: var(--surface-3);
  border-radius: var(--r-md);
  padding: var(--sp-3);
  height: 460px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 18px;
}
.logbox .log-line__time { white-space: nowrap; }
.lognote { color: var(--text-muted); font-size: 13px; line-height: 18px; margin-top: var(--sp-2); }
.answer {
  background: var(--surface-3);
  border-radius: var(--r-md);
  padding: var(--sp-3);
  margin-top: var(--sp-3);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 18px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 260px;
  overflow: auto;
}
textarea.mono { font-family: var(--mono); font-size: 13px; }

a.btn { text-decoration: none; }

/* Five links do not fit beside each other on a phone: let them wrap. */
@media (max-width: 640px) {
  nav.segment { flex-wrap: wrap; justify-content: center; max-width: 100%; }
  nav.segment .navlink { padding: 6px 10px; font-size: 13px; white-space: nowrap; }
}
