/* zai-auth base template — design tokens + chrome, ported from
   docs/design_handoff_auth_page/SharedComputer.dc.html. Hover states are
   plain CSS (:hover/:focus-within) since this is server-rendered Django with
   no client router to fake them, unlike the original prototype. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter/Inter-latin-variable.260c81a4759b.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono/IBMPlexMono-Regular-latin.79936b18df9f.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono/IBMPlexMono-Medium-latin.b1c8a895f5fd.woff2") format("woff2");
}

:root {
  --bg: oklch(0.16 0.006 255);
  --surface: oklch(0.19 0.007 255);
  --inset: oklch(0.15 0.006 255);
  --border: oklch(0.28 0.008 255);
  --border-input: oklch(0.3 0.01 255);
  --border-hover: oklch(0.4 0.01 255);
  --text: oklch(0.94 0.004 255);
  --text-secondary: oklch(0.68 0.008 255);
  --text-muted: oklch(0.55 0.008 255);
  --text-muted-2: oklch(0.5 0.008 255);
  --text-disabled: oklch(0.42 0.008 255);
  --accent: oklch(0.62 0.17 255);
  --accent-hover: oklch(0.67 0.17 255);
  --success: oklch(0.7 0.16 150);
  --danger: oklch(0.75 0.09 20);
  --danger-hover-bg: oklch(0.24 0.03 20);
  --nav-active-bg: oklch(0.26 0.01 255);
  --font-sans: "Inter", -apple-system, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
}

::selection {
  background: oklch(0.55 0.16 255 / 0.35);
}

input::placeholder {
  color: oklch(0.55 0.01 255);
}

a {
  color: inherit;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Nav ------------------------------------------------------------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 64px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.nav__brand-text {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav__brand-accent {
  color: var(--accent);
}

.nav__items {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__item {
  padding: 8px 14px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nav__item:hover {
  background: var(--nav-active-bg);
  color: var(--text);
}

.nav__item.is-active {
  background: var(--nav-active-bg);
  color: var(--text);
}

.nav__divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  margin: 0 8px;
}

.nav__account {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
}

.nav__account:hover,
.nav__account.is-active {
  background: var(--nav-active-bg);
  color: var(--text);
}

.nav__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: oklch(0.5 0.01 255);
  flex-shrink: 0;
}

.nav__status-dot.is-online {
  background: var(--success);
}

/* --- Main / layout ----------------------------------------------------- */

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* --- Login view --------------------------------------------------------- */

.login-view {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.login-box {
  width: 100%;
  max-width: 380px;
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-header h1 {
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.login-header p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
}

.field-label-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.field-label-row label {
  font-size: 13px;
  font-weight: 500;
  color: oklch(0.82 0.006 255);
}

.info-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid oklch(0.5 0.01 255);
  color: oklch(0.58 0.01 255);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  flex-shrink: 0;
}

.input-row {
  display: flex;
  align-items: center;
  background: var(--inset);
  border: 1px solid var(--border-input);
  border-radius: 9px;
  padding: 0 14px;
  margin-bottom: 14px;
}

.input-row:focus-within {
  border-color: var(--accent);
}

.input-row__prefix {
  color: oklch(0.55 0.01 255);
  font-size: 14px;
  font-family: var(--font-mono);
  margin-right: 2px;
}

.input-row input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  padding: 12px 0;
  font-family: var(--font-mono);
}

.btn-primary {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: oklch(0.99 0.005 255);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

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

.btn-primary:disabled {
  opacity: 0.75;
  cursor: default;
}

.hint-text {
  font-size: 12px;
  color: oklch(0.52 0.008 255);
  text-align: center;
  margin: 16px 0 0;
  line-height: 1.5;
}

.hint-text a {
  color: oklch(0.68 0.15 255);
  text-decoration: none;
}

.alert {
  font-size: 13px;
  color: var(--danger);
  background: var(--danger-hover-bg);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

/* --- Account view -------------------------------------------------------- */

.account-view {
  flex: 1;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
  padding: 40px 24px;
}

.account-view h1 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 24px;
}

.account-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  margin-bottom: 16px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.account-meta__handle {
  font-size: 15px;
  font-weight: 600;
}

.account-meta__did {
  font-size: 12.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.btn-outline-danger {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--danger);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn-outline-danger:hover {
  background: var(--danger-hover-bg);
}

/* --- Footer -------------------------------------------------------------- */

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* The build stamp and the copyright are separated by .footer's own gap — no
   separator glyph between them, and nothing to lay out. */
.footer__copy,
.footer__version {
  font-size: 12px;
  color: var(--text-muted-2);
}

.footer__link {
  color: oklch(0.58 0.008 255);
  text-decoration: none;
}

.footer__link:hover {
  color: oklch(0.85 0.006 255);
}
