:root { color-scheme:light; font-family:system-ui,sans-serif; color:#232b3a; background:#f2f0e9; }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; }
header { background:#172640; color:#fff2cf; display:flex; align-items:center; justify-content:space-between; padding:20px max(18px,calc((100% - 960px)/2)); gap:15px; border-bottom:3px solid #bb914d; }
header small { color:#e5c99a; letter-spacing:.12em; }
h1,h2,p { margin:0; }
h1 { font-size:27px; }
h2 { font-size:20px; }
main { width:min(960px,calc(100% - 32px)); margin:20px auto; }
section { background:#fffdf7; border:1px solid #d9cfb9; border-radius:12px; padding:18px; margin-bottom:16px; }
section h2 { margin-bottom:12px; }
#login { max-width:450px; margin-inline:auto; }
form,fieldset,#manager,#codes { display:grid; gap:12px; }
fieldset { margin:0; border:1px solid #ded4bd; border-radius:7px; padding:10px; }
label { display:grid; gap:5px; font-size:14px; font-weight:650; }
input,select,button { font:inherit; min-height:42px; border-radius:6px; }
input,select { width:100%; min-width:0; border:1px solid #b6aa93; padding:6px 9px; background:#fff; color:inherit; }
button { border:1px solid #75501f; padding:5px 12px; background:#a36b28; color:#fff; font-weight:700; cursor:pointer; }
button:disabled { opacity:.55; cursor:default; }
button.secondary { border-color:#b4a27e; background:#f7efda; color:#4c3d27; }
#logout { white-space:nowrap; }
#status:not(:empty) { margin-bottom:14px; color:#385c36; }
#status[data-error] { color:#a32e26; }
.limits { display:grid; grid-template-columns:2fr 1fr 1fr; gap:10px; }
.reward-row { display:grid; grid-template-columns:2fr 2fr 1fr 1fr auto; align-items:end; gap:6px; margin-bottom:7px; }
.reward-row.simple { grid-template-columns:2fr 1fr auto; }
.actions,.section-head { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.section-head { justify-content:space-between; margin-bottom:10px; }
.section-head h2 { margin:0; }
#created { display:grid; gap:6px; margin-top:12px; padding:10px; background:#fff1c8; border-radius:6px; }
#new-code { font-family:monospace; width:min(100%,270px); }
.code { border-bottom:1px solid #e7dfcd; display:grid; gap:5px; padding:8px 0 12px; }
.code small { color:#5a5360; }
.code .section-head { margin:0; }
#older { margin-top:12px; }
@media(max-width:580px) {
  .limits { grid-template-columns:1fr 1fr; }
  .limits label:first-child { grid-column:1/-1; }
  .reward-row { grid-template-columns:1fr 1fr; }
  .reward-row.simple { grid-template-columns:1.4fr 1fr auto; }
}
