/* Nodara web app — shared styling.
 *
 * Same design language as nodara.me: identical palette, self-hosted Space
 * Grotesk and JetBrains Mono, lime→cyan accent. Kept dependency-free and
 * same-origin so the app inherits a strict CSP and adds no third-party request.
 *
 * This is the interim static shell that makes the auth flows reachable — the
 * links in transactional email land here. It is deliberately plain HTML so it
 * works before the full dashboard exists, and the visual language is shared so
 * replacing it later is not a redesign. */

@import url("./fonts/fonts.css");

:root {
  --bg: #070809;
  --panel: #0a0b0e;
  --panel-2: #101216;
  --fg: #c9cfd8;
  --heading: #e9edf0;
  --muted: #6a7180;
  --dim: #454c58;
  --rule: #15191f;
  --rule-2: #1d222a;
  --lime: #b6ff3b;
  /* Canonical button pairing, shared with nodara.me. */
  --btn-ink: #070809;
  --cyan: #36d6ff;
  --teal: #2de2c0;
  --danger: #ff6b6b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--lime); color: var(--bg); }

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--lime); }

/* ── Centred auth card ───────────────────────────────────────────────────── */

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.25rem;
}

.card {
  width: 100%;
  max-width: 27rem;
  background: var(--panel);
  border: 1px solid var(--rule-2);
  border-radius: 16px;
  overflow: hidden;
}

.card-accent {
  height: 3px;
  background: linear-gradient(90deg, var(--lime), var(--cyan));
}

.card-body { padding: 2rem 2rem 2.25rem; }

.brand { display: block; margin-bottom: 1.75rem; }
.brand img { display: block; height: 30px; width: auto; }

h1 {
  color: var(--heading);
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin: 0 0 .5rem;
}

.sub { color: var(--muted); font-size: .93rem; margin: 0 0 1.75rem; }

/* ── Form controls ───────────────────────────────────────────────────────── */

label {
  display: block;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  margin: 0 0 .45rem;
}

input {
  width: 100%;
  padding: .8rem .9rem;
  background: var(--bg);
  border: 1px solid var(--rule-2);
  border-radius: 9px;
  color: var(--heading);
  font-family: inherit;
  font-size: .95rem;
  transition: border-color .15s ease;
}
input:focus {
  outline: none;
  border-color: var(--cyan);
}
input::placeholder { color: var(--dim); }

.field { margin-bottom: 1.15rem; }

button {
  width: 100%;
  padding: .85rem 1rem;
  background: var(--lime);
  color: var(--btn-ink);
  border: 0;
  border-radius: 9px;
  font-family: inherit;
  font-weight: 700;
  font-size: .97rem;
  cursor: pointer;
  transition: filter .15s ease;
}
button:hover:not(:disabled) { filter: brightness(1.08); }
button:disabled { opacity: .5; cursor: not-allowed; }

.alt {
  margin-top: 1.4rem;
  text-align: center;
  font-size: .9rem;
  color: var(--muted);
}

/* ── Status messages ─────────────────────────────────────────────────────── */

.msg {
  padding: .8rem 1rem;
  border-radius: 9px;
  font-size: .9rem;
  margin-bottom: 1.25rem;
  border-left: 2px solid;
}
.msg[hidden] { display: none; }
.msg.err { background: #1a0f10; border-color: var(--danger); color: #ffb4b4; }
.msg.ok  { background: #0d1710; border-color: var(--lime); color: #d8ffab; }
.msg.info { background: var(--panel-2); border-color: var(--cyan); color: var(--fg); }

.hint {
  font-size: .8rem;
  color: var(--dim);
  margin-top: .45rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 1.25rem 2rem;
  text-align: center;
  color: var(--dim);
  font-size: .8rem;
}
footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin-bottom: .9rem; }
footer nav a { color: var(--muted); font-size: .85rem; }
footer nav a:hover { color: var(--lime); }
footer .bcube {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: .82rem;
}
footer .bcube img { opacity: .8; display: block; }
footer .bcube:hover { color: var(--teal); }
footer .bcube strong { color: var(--fg); font-weight: 600; }

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

/* Live password rule checklist. */
.rules {
  list-style: none;
  margin: .6rem 0 0;
  padding: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .74rem;
  color: var(--dim);
}
.rules li { margin: .22rem 0; padding-left: 1.1rem; position: relative; }
.rules li::before { content: "○"; position: absolute; left: 0; }
.rules li.met { color: var(--lime); }
.rules li.met::before { content: "●"; }

.hint.good { color: var(--lime); }
.hint.bad  { color: var(--danger); }

/* ── Ambient backdrop ────────────────────────────────────────────────────── */
/* Ported from the Author sign-in screen's graph backdrop, so signing in on the
 * web looks like signing in to the desktop app. */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--bg) url("/assets/graph-backdrop.svg") center / cover no-repeat;
}

/* Lift the card off the backdrop so the field never competes with the form. */
.card {
  background: rgba(10, 11, 14, .92);
  backdrop-filter: blur(10px);
  box-shadow: 0 30px 80px -40px #000;
}
