/* Peekeasy login — skinned to the app's Cream theme (Palette.swift → warmCream):
   paper-cream surfaces, warm near-black ink, purple accent #6b5bd6. */
:root {
  --cream: #f5f1e8;
  --paper: #fbf9f3;
  --ink: #1c1a17;
  --muted: #6a655c;
  --faint: #9a938a;
  --border: #e4ddcf;
  --accent: #6b5bd6;
  --accent-ink: #ffffff;
  --error: #b53b46;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  display: grid;
  place-items: center;
  padding: 24px;
}
.card {
  width: 100%;
  max-width: 380px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 26px;
  box-shadow: 0 12px 40px rgba(28, 26, 23, 0.08);
}
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.brand h1 { font-size: 20px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.lede { color: var(--muted); margin: 0 0 18px; }
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); margin: 14px 0 6px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(107, 91, 214, 0.15); }

button { font: inherit; cursor: pointer; border-radius: 10px; border: 1px solid transparent; }
button:disabled { opacity: 0.55; cursor: default; }

.primary {
  width: 100%;
  height: 42px;
  margin-top: 12px;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
}
.primary:hover:not(:disabled) { filter: brightness(1.05); }

.oauth {
  width: 100%;
  height: 44px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
}
.oauth:hover:not(:disabled) { border-color: var(--faint); }
.oauth .glyph { font-weight: 800; color: var(--accent); }

.link {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: none;
  color: var(--muted);
  font-size: 13px;
}
.link:hover { color: var(--ink); }

.divider { display: flex; align-items: center; gap: 10px; margin: 18px 0 4px; color: var(--faint); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.note { margin-top: 18px; font-size: 11.5px; color: var(--faint); }
.err { margin: 14px 0 0; color: var(--error); font-size: 13px; }

#status { text-align: center; padding: 18px 0; }
.spinner {
  width: 28px; height: 28px; margin: 4px auto 14px;
  border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-color-scheme: dark) {
  :root {
    --cream: #17150f; --paper: #201d16; --ink: #f0ebe0; --muted: #a49c8d;
    --faint: #766e60; --border: #322d22; --accent: #8b7bf0; --accent-ink: #14110b;
  }
  input { background: #14110b; }
  .oauth { background: #14110b; }
}
