:root {
  --bg: #f6f5f3;
  --surface: #ffffff;
  --text: #1f1b18;
  --muted: #6b6560;
  --line: #e4e0db;
  --accent: #b5361c;
  --accent-text: #ffffff;
  --error: #a32020;
  --ok: #2f6b3a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171514;
    --surface: #211e1c;
    --text: #ece7e2;
    --muted: #a39b94;
    --line: #34302d;
    --accent: #e0573a;
    --accent-text: #ffffff;
    --error: #f08a8a;
    --ok: #8fd19e;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}
a { color: var(--accent); }
.dev-banner { background: #6a4b00; color: #fff; text-align: center; padding: 4px 16px; font-size: 13px; }
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 24px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand a { color: var(--text); text-decoration: none; font-weight: 600; }
.brand .account { color: var(--muted); margin-left: 8px; }
.right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.who { display: flex; align-items: center; gap: 8px; }
.who form { margin: 0; }
.modules { display: flex; gap: 4px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.modules a { padding: 10px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; }
.modules a.active { color: var(--text); border-bottom-color: var(--accent); }
main { max-width: 920px; margin: 24px auto; padding: 0 16px; }
section { margin-bottom: 28px; }
h1 { font-size: 22px; margin: 0 0 12px; }
h2 { font-size: 18px; margin: 0 0 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 24px; }
.narrow { max-width: 440px; margin: 40px auto; }
label { display: block; font-weight: 600; margin: 12px 0 6px; }
input[type="email"], input[name="code"] {
  width: 100%; padding: 10px 12px; font: inherit; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text);
}
input[name="code"] { letter-spacing: 6px; font-size: 20px; }
button, .button {
  display: inline-block; margin-top: 14px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--accent); color: var(--accent-text); border: 0; border-radius: 8px; position: relative;
}
.file button { margin-top: 0; padding: 6px 12px; }
button.link { background: none; color: var(--accent); padding: 0; margin: 0; font-weight: 400; text-decoration: underline; }
.muted { color: var(--muted); font-size: 14px; }
.error { color: var(--error); }
.notice { color: var(--ok); }
.files { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.file { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 16px; border-top: 1px solid var(--line); }
.file:first-child { border-top: 0; }
.file-main, .file-side { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.file-side { align-items: flex-end; text-align: right; }
.file-side form { margin: 0; }
.file-name { font-weight: 600; overflow-wrap: anywhere; }
.note { font-style: italic; }
.upload { margin-top: 16px; }
.file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.progress { margin-top: 12px; }
.progress-line { display: flex; justify-content: space-between; gap: 12px; }
.bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 6px; }
.bar-fill { height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
.accounts { padding-left: 18px; }
.foot { max-width: 920px; margin: 40px auto 24px; padding: 0 16px; color: var(--muted); font-size: 13px; }
@media (max-width: 600px) {
  .top { padding: 12px 16px; }
  .modules { padding: 0 8px; }
  .file { flex-direction: column; align-items: flex-start; }
  .file-side { align-items: flex-start; text-align: left; }
}
