/* PROYOOO login: a single centred card, no workspace content before sign-in.
 * Self-contained (the page loads nothing else). Light / dark follow the saved
 * appearance through html[data-scheme], which js/theme-boot.js sets before
 * first paint, so this file is not part of scripts/build-dark-theme.mjs. */

html:not([data-scheme="dark"]) {
  color-scheme: light;
  --a-page: #f5f5f5; --a-card: #ffffff; --a-edge: #e5e5e5; --a-edge-strong: #d4d4d4;
  --a-ink: #0a0a0a; --a-dim: #737373; --a-faint: #a3a3a3;
  --a-field: #ffffff; --a-ring: rgba(10, 10, 10, .08);
  --a-btn: #171717; --a-btn-hover: #333333; --a-btn-ink: #ffffff;
  --a-err: #dc2626; --a-err-bg: #fef2f2; --a-note-bg: #f5f5f5;
  --a-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .04);
}
html[data-scheme="dark"] {
  color-scheme: dark;
  --a-page: #0a0a0a; --a-card: #111111; --a-edge: #232323; --a-edge-strong: #3a3a3a;
  --a-ink: #fafafa; --a-dim: #a3a3a3; --a-faint: #6b6b6b;
  --a-field: #171717; --a-ring: rgba(255, 255, 255, .1);
  --a-btn: #fafafa; --a-btn-hover: #e0e0e0; --a-btn-ink: #0a0a0a;
  --a-err: #f87171; --a-err-bg: rgba(248, 113, 113, .08); --a-note-bg: #1a1a1a;
  --a-shadow: none;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body.auth-page {
  margin: 0;
  background: var(--a-page);
  color: var(--a-ink);
  font: 14px/1.5 Inter, "Segoe UI", "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.auth-shell {
  min-height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 24px;
  padding: 48px 20px;
}

.auth-brand {
  color: var(--a-ink); text-decoration: none;
  font-size: 18px; font-weight: 800; letter-spacing: 3px;
}

.auth-card {
  width: 100%; max-width: 380px;
  padding: 32px 28px 28px;
  background: var(--a-card);
  border: 1px solid var(--a-edge);
  border-radius: 12px;
  box-shadow: var(--a-shadow);
}

.auth-head { margin-bottom: 24px; }
.auth-head h1 { margin: 0 0 6px; font-size: 20px; font-weight: 700; letter-spacing: .2px; }
.auth-head p { margin: 0; color: var(--a-dim); font-size: 13px; }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-label { font-size: 13px; font-weight: 500; color: var(--a-ink); }

.auth-input {
  width: 100%; height: 40px;
  padding: 0 12px;
  font: inherit; color: var(--a-ink);
  background: var(--a-field);
  border: 1px solid var(--a-edge);
  border-radius: 8px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.auth-input::placeholder { color: var(--a-faint); }
.auth-input:hover { border-color: var(--a-edge-strong); }
.auth-input:focus { border-color: var(--a-edge-strong); box-shadow: 0 0 0 3px var(--a-ring); }
select.auth-input { cursor: pointer; }

.auth-password { position: relative; display: block; }
.auth-password .auth-input { padding-right: 56px; }
.auth-password button {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  height: 28px; padding: 0 8px;
  font: inherit; font-size: 12px; color: var(--a-dim);
  background: transparent; border: 0; border-radius: 6px; cursor: pointer;
}
.auth-password button:hover { color: var(--a-ink); background: var(--a-note-bg); }

.msg { margin: 0; font-size: 13px; color: var(--a-dim); }
.msg:empty { display: none; }
.msg:not(.err):not(:empty) { padding: 8px 10px; background: var(--a-note-bg); border-radius: 8px; }
.msg.err { padding: 8px 10px; color: var(--a-err); background: var(--a-err-bg); border-radius: 8px; }

.auth-submit {
  height: 40px; margin-top: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 600; color: var(--a-btn-ink);
  background: var(--a-btn);
  border: 0; border-radius: 8px; cursor: pointer;
  transition: background-color .15s, opacity .15s;
}
.auth-submit:hover:not(:disabled) { background: var(--a-btn-hover); }
.auth-submit:disabled { opacity: .6; cursor: progress; }

.auth-brand:focus-visible, .auth-submit:focus-visible, .auth-password button:focus-visible {
  outline: 2px solid var(--a-faint); outline-offset: 2px;
}

.auth-foot { margin: 0; font-size: 12px; color: var(--a-faint); }

@media (max-width: 420px) {
  .auth-shell { justify-content: flex-start; padding-top: 56px; }
  .auth-card { padding: 28px 20px 22px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
