// admin.jsx — internal operations console (cookie-auth, separate from the customer app). // Loaded from index.html as an ordered `text/babel` classic script (position 7 of 8). // Classic scripts share one global scope — see docs/engineering/Patterns.md §9. // ─── Admin Form Primitives ────────────────────────────────────────────────── // One copy of the field chrome — it used to be re-declared, identically, in // four separate sections. AdminField owns the label↔control wiring so a new // field cannot be added without one: the generated id lands on both halves, // and a child that carries its own `id` keeps it. const ADMIN_FIELD_STYLE = { width: "100%", padding: "9px 12px", background: "#0d0d0d", border: "1px solid #2a2a2a", borderRadius: 7, color: "#e8e8f0", fontSize: 13, boxSizing: "border-box", fontFamily: "'DM Sans', sans-serif" }; const ADMIN_SELECT_STYLE = { ...ADMIN_FIELD_STYLE, appearance: "none" }; const ADMIN_LABEL_STYLE = { display: "block", fontSize: 11, color: "#888", marginBottom: 5, textTransform: "uppercase", letterSpacing: "0.05em" }; function AdminField({ label, style, children }) { const generatedId = useId(); // Children.only so a future conditional child ({cond && }) fails with // React's own invariant rather than a bare "cannot read property of false". const control = React.Children.only(children); const id = control.props.id || generatedId; return (