:root {
  --bg: #1b1d22; --panel: #24262d; --text: #e6e6e6; --muted: #9a9ca3;
  --accent: #5b8def; --good: #4caf7d; --bad: #e06464; --border: #34363e;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: -apple-system, system-ui, Segoe UI, sans-serif;
  background: var(--bg); color: var(--text);
}
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: var(--panel); border-bottom: 1px solid var(--border);
  flex-wrap: wrap; gap: 10px;
}
header h1 { font-size: 18px; margin: 0; }
nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
nav.hidden { display: none; }
button {
  background: var(--accent); color: white; border: none; border-radius: 6px;
  padding: 8px 14px; cursor: pointer; font-size: 14px;
}
button:hover { opacity: 0.9; }
button.secondary { background: var(--panel); border: 1px solid var(--border); color: var(--text); }
button.danger { background: var(--bad); }
button.good { background: var(--good); }
#whoami { color: var(--muted); margin-left: 8px; }
main { max-width: 900px; margin: 0 auto; padding: 24px 16px; }
section.hidden { display: none; }
input[type=text], input[type=password] {
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  padding: 8px 10px; border-radius: 6px; font-size: 14px; margin-right: 8px; margin-bottom: 8px;
}
#loginForm { display: flex; flex-direction: column; max-width: 280px; gap: 10px; }
.error { color: var(--bad); }
.hint { color: var(--muted); font-size: 13px; }
.result-list { list-style: none; padding: 0; }
.result-list li {
  padding: 10px 12px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 6px; margin-bottom: 6px; cursor: pointer; display: flex; justify-content: space-between;
}
.result-list li:hover { border-color: var(--accent); }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  padding: 16px; margin-top: 16px;
}
.field-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.field-row label { width: 180px; color: var(--muted); font-size: 13px; }
.field-row input { width: 140px; }
.slot-row {
  display: flex; align-items: center; gap: 10px; padding: 6px 0;
  border-bottom: 1px solid var(--border); font-size: 14px;
}
.slot-row .slot-idx { width: 36px; color: var(--muted); }
.slot-row .item-name { flex: 1; }
.slot-row input { width: 90px; }
.pill {
  display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px;
  background: #333642; color: var(--muted); margin-left: 6px;
}
.pill.pending { background: #4a3f1f; color: #e0c168; }
.pill.approved { background: #1f3f2b; color: var(--good); }
.pill.rejected { background: #4a1f1f; color: var(--bad); }
.submission-text { font-size: 14px; }
.submission-meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
.toast {
  position: fixed; bottom: 20px; right: 20px; background: var(--good); color: white;
  padding: 10px 16px; border-radius: 6px; opacity: 0; transition: opacity 0.3s;
}
.toast.show { opacity: 1; }

/* v2 additions */
.hidden { display: none !important; }
nav button { padding: 6px 10px; font-size: 13px; }
.picker { position: relative; display: inline-block; }
.picker-menu {
  position: absolute; z-index: 10; top: 100%; left: 0; min-width: 320px; max-height: 260px; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--accent); border-radius: 6px;
}
.picker-menu div { padding: 6px 10px; cursor: pointer; font-size: 13px; }
.picker-menu div:hover { background: #2f3340; }
.resolved { color: var(--muted); font-size: 12px; display: block; margin-top: 2px; }
.field-row { flex-wrap: wrap; }
.field-row .current { width: 280px; font-size: 13px; }
.warn { background: #4a3f1f; color: #e0c168; padding: 10px 12px; border-radius: 6px; margin-bottom: 10px; font-size: 14px; }
.bad { background: #4a1f1f; color: var(--bad); padding: 10px 12px; border-radius: 6px; margin-bottom: 10px; font-size: 14px; }
.op { border-left: 3px solid var(--border); padding: 4px 10px; margin: 6px 0; }
.op h4 { margin: 2px 0 6px; font-size: 13px; color: var(--muted); font-weight: normal; }
a.link { color: var(--accent); cursor: pointer; text-decoration: underline; }
table.simple { border-collapse: collapse; width: 100%; font-size: 13px; }
table.simple td, table.simple th { border-bottom: 1px solid var(--border); padding: 6px; text-align: left; }
select { background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 7px; }

.field-row input, .slot-row input { margin: 0; }
