:root {
  --orange: #ee7428;
  --orange-dark: #c95a14;
  --orange-soft: #fff1e6;
  --ink: #2b2420;
  --muted: #7a6f68;
  --bg: #fbf6f1;
  --card: #ffffff;
  --line: #eadfd5;
  --warn-bg: #fff4e0;
  --warn-ink: #8a5a00;
  --err-bg: #fde8e6;
  --err-ink: #a3261b;
  --ok-bg: #eaf6ec;
  --ok-ink: #1f6b33;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: 16px; display: grid; place-items: center;
}
body.wide { place-items: start center; }
main {
  width: 100%; max-width: 520px; background: var(--card);
  border: 1px solid var(--line); border-radius: 16px; padding: 32px;
  box-shadow: 0 8px 30px rgba(80, 40, 10, .06);
}
body.wide main { max-width: 980px; margin-top: 24px; }
h1 { margin: 0 0 4px; font-size: 1.5rem; }
h1 span { color: var(--orange); }
h2 { font-size: 1.1rem; margin: 28px 0 12px; }
.sub { margin: 0 0 24px; color: var(--muted); }
.topbar { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
[hidden] { display: none !important; }
label { font-weight: 600; font-size: .9rem; display: block; margin-bottom: 6px; }
input[type=password], input[type=text], select {
  width: 100%; padding: 11px 14px; font: inherit; color: inherit; background: #fff;
  border: 1px solid var(--line); border-radius: 10px;
}
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }
button, .btn {
  font: inherit; font-weight: 600; cursor: pointer; border: 0; border-radius: 10px;
  padding: 11px 18px; background: var(--orange); color: #fff; text-decoration: none;
  display: inline-block; white-space: nowrap;
}
button:hover, .btn:hover { background: var(--orange-dark); }
button:disabled { opacity: .45; cursor: not-allowed; background: var(--orange); }
button.secondary, .btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
button.secondary:hover, .btn.secondary:hover { background: var(--orange-soft); }
button.danger { background: #fff; color: var(--err-ink); border: 1px solid #f1c6c1; }
button.danger:hover:not(:disabled) { background: var(--err-bg); }
button.link, a.link {
  background: none; color: var(--muted); padding: 0; font-weight: 400;
  text-decoration: underline; border: 0;
}
button.link:hover { background: none; color: var(--ink); }
.msg { margin-top: 16px; padding: 12px 14px; border-radius: 10px; }
.msg.warn { background: var(--warn-bg); color: var(--warn-ink); }
.msg.err { background: var(--err-bg); color: var(--err-ink); }
.msg.ok { background: var(--ok-bg); color: var(--ok-ink); }
.msg ul { margin: 0; padding-left: 18px; }
#login input { margin-bottom: 12px; }
footer { margin-top: 24px; display: flex; justify-content: space-between; gap: 12px; }
