/* img23D: shared styles for the public pages (home, login, register) */
:root {
  --bg: #f5f6fa; --card: #ffffff; --text: #0f172a; --muted: #64748b; --line: #e4e7ee;
  --accent: #4f46e5; --accent-hover: #4338ca; --accent-soft: #eef2ff;
  --ok-bg: #ecfdf5; --ok: #047857; --err-bg: #fef2f2; --err: #b91c1c;
  --checker: #e9ecf2;
  --viewer: linear-gradient(180deg, #f8fafc 0%, #e6eaf2 100%);
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 28px rgba(15, 23, 42, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020; --card: #121a2e; --text: #e6e9f2; --muted: #94a3b8; --line: #24304a;
    --accent: #6366f1; --accent-hover: #818cf8; --accent-soft: #1e2547;
    --ok-bg: #0b2a22; --ok: #34d399; --err-bg: #2d1414; --err: #fca5a5;
    --checker: #1a2337;
    --viewer: linear-gradient(180deg, #151d33 0%, #0d1324 100%);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .25);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; box-shadow: 0 4px 14px rgba(79, 70, 229, .35); }
.brand b { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 10px; }
.nav a.link { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14px; }
.nav a.link:hover { color: var(--text); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: 15px; border-radius: 12px; border: 1px solid transparent; padding: 11px 18px; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(79, 70, 229, .28); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }

/* Auth pages */
.auth { max-width: 420px; margin: 24px auto 60px; }
.auth h1 { font-size: 26px; letter-spacing: -.02em; margin: 0 0 6px; }
.auth p.lead { margin: 0 0 20px; color: var(--muted); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input { width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; outline: none; }
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99, 102, 241, .18); }
.field small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.alert { border-radius: 12px; padding: 11px 14px; font-size: 14px; margin-bottom: 16px; }
.alert-err { background: var(--err-bg); color: var(--err); }
.alert-ok { background: var(--ok-bg); color: var(--ok); }
.auth .switch { text-align: center; font-size: 14px; color: var(--muted); margin-top: 18px; }

footer.site { text-align: center; font-size: 13px; color: var(--muted); padding: 10px 16px 36px; }

@media (max-width: 600px) {
  .card { padding: 18px; }
}
