/* upload.rpe8 - hand-rolled styles, no framework */
:root {
  --bg: #f3f1ec;
  --card: #fffdf8;
  --ink: #23201b;
  --muted: #6f6a60;
  --line: #ddd7cb;
  --accent: #d9622b;
  --accent-ink: #fff;
  --err: #b42318;
  --err-bg: #fdecea;
  --ok: #2f7d4f;
  --radius: 10px;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1916; --card: #22211d; --ink: #ece8df; --muted: #a39d91; --line: #3a3832;
    --accent: #ee7a43; --err: #ff8a7a; --err-bg: #3a1f1b;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--bg);
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--ink);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wrap { max-width: 420px; margin: 0 auto; padding: 32px 16px 24px; min-height: 100vh; display: flex; flex-direction: column; }

.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font: 600 18px/1 var(--mono); }
.brand .dim { color: var(--muted); font-weight: 400; }
.brand-icon { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.badge { font: 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border: 1px dashed var(--line); padding: 5px 8px; border-radius: 99px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; box-shadow: 0 1px 0 var(--line), 0 12px 30px -18px rgba(0,0,0,.25); }
h1 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.01em; }
.lead { margin: 0 0 20px; color: var(--muted); font-size: 14px; }

.alert { margin: 0 0 16px; padding: 10px 12px; border-radius: 8px; font-size: 14px; background: var(--err-bg); color: var(--err); border: 1px solid currentColor; }
.alert.shake { animation: shake .35s; }
@keyframes shake { 20%,60% { transform: translateX(-4px); } 40%,80% { transform: translateX(4px); } }

.field { margin-bottom: 16px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
input[type=text], input[type=password] {
  width: 100%; padding: 10px 12px; font: inherit; color: inherit;
  background: transparent; border: 1px solid var(--line); border-radius: 8px;
  transition: border-color .15s, box-shadow .15s;
}
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field.invalid input { border-color: var(--err); }
.hint, .error { display: block; margin-top: 5px; font-size: 12px; }
.hint { color: var(--muted); }
.error { color: var(--err); }
.field.invalid .hint { display: none; }

.pw { position: relative; }
.pw input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); font: 12px var(--mono); cursor: pointer; padding: 6px 8px; border-radius: 6px; }
.pw-toggle:hover { color: var(--ink); background: var(--bg); }

.check { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 14px; margin: 4px 0 20px; cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }

.btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px; border: 0; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font: 600 15px/1 inherit; font-family: inherit; cursor: pointer; transition: filter .15s, opacity .15s; }
.btn:hover { filter: brightness(1.05); }
.btn:disabled { opacity: .7; cursor: progress; }
.spinner { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; display: none; animation: spin .7s linear infinite; }
.btn.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.small { margin: 18px 0 0; font-size: 13px; color: var(--muted); }
.foot { margin-top: auto; padding-top: 28px; display: flex; justify-content: center; gap: 6px; font: 12px var(--mono); color: var(--muted); }
.noscript { text-align: center; font-size: 13px; color: var(--muted); }
