:root {
  --bg: #0f1117;
  --panel: #1a1d27;
  --text: #e8eaef;
  --muted: #9aa3b2;
  --accent: #7c5cff;
  --border: #2a2f3d;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); }
.topbar { display: flex; gap: 1rem; align-items: center; padding: 1rem 1.5rem; background: var(--panel); border-bottom: 1px solid var(--border); }
.muted { color: var(--muted); }
.shell { display: flex; min-height: calc(100vh - 56px); }
.sidebar { width: 220px; padding: 1rem; background: var(--panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: .35rem; }
.sidebar a { color: var(--text); text-decoration: none; padding: .45rem .6rem; border-radius: 6px; }
.sidebar a.active, .sidebar a:hover { background: #252a38; }
.content { flex: 1; padding: 1.5rem 2rem; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.25rem; margin-bottom: 1rem; }
label { display: block; margin: .5rem 0 .25rem; color: var(--muted); font-size: .9rem; }
input, select, textarea { width: 100%; max-width: 480px; padding: .5rem .65rem; border-radius: 6px; border: 1px solid var(--border); background: #12151c; color: var(--text); }
button, .btn { display: inline-block; padding: .5rem 1rem; background: var(--accent); color: #fff; border: none; border-radius: 6px; cursor: pointer; text-decoration: none; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .5rem; border-bottom: 1px solid var(--border); }
.alert { padding: .75rem 1rem; border-radius: 6px; margin-bottom: 1rem; }
.alert.ok { background: #1a3d2a; }
.alert.err { background: #3d1a1a; }
.login-wrap { max-width: 400px; margin: 4rem auto; text-align: center; }
fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 1rem; margin: 1rem 0; }
legend { color: var(--muted); padding: 0 .5rem; }
.hint { font-size: .85rem; margin: .25rem 0 .75rem; }
.field-hint { font-size: .85rem; color: var(--muted); margin: -.15rem 0 .45rem; line-height: 1.45; max-width: 52rem; }
.field { margin-bottom: 1rem; }
.check-row { display: flex; align-items: center; gap: .5rem; margin: .35rem 0; color: var(--text); }
.check-row input { width: auto; max-width: none; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .25rem; margin-bottom: 1rem; }
.embed-box .embed-fields { margin-top: .75rem; }
.btn-secondary { background: #353b4d; margin-top: .5rem; }
.btn-secondary:hover { background: #454d66; }
.repeat-table input { max-width: none; width: 100%; }
.repeat-table .input-emoji { max-width: 4rem; }
.repeat-table td { vertical-align: middle; }
input[type="color"] { height: 2.5rem; padding: .2rem; cursor: pointer; }
