:root {
  --bg: #0a0916; --panel: #171531; --panel-2: #11102a; --line: #2c2764;
  --text: #f2f4ff; --muted: #8a87b0; --indigo: #7c6cff; --cyan: #22d3ee; --red: #ff5c6c;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--cyan); }
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 24px; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 18px; }
.brand em { color: var(--indigo); font-style: normal; }
nav { display: flex; gap: 6px; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; padding: 6px 14px; border-radius: 20px; }
nav a.on, nav a:hover { color: #fff; background: var(--panel); }
main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
h1 { font-size: 24px; margin: 8px 0 14px; }
h2 { font-size: 19px; margin: 0; }
.muted { color: var(--muted); font-weight: 400; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 28px; }
.card.narrow { max-width: 380px; margin: 60px auto; }
.row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; }
.row > label { flex: 1 1 200px; }
.row > label.grow { flex: 2 1 280px; }
label { display: block; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; margin-bottom: 12px; }
.row > label { margin-bottom: 0; }
input, select { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
input:focus, select:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(124,108,255,.25); }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px 16px; margin: 0 0 14px; }
legend { padding: 0 6px; font-weight: 700; }
button, .btn { display: inline-block; padding: 10px 20px; font: inherit; font-weight: 700; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, var(--indigo), var(--cyan)); border: 0; border-radius: 22px; cursor: pointer; }
button.ghost, .btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
button.danger { background: transparent; border: 1px solid var(--red); color: var(--red); }
button.small, .btn.small { padding: 5px 12px; font-size: 13px; }
.flash { background: rgba(34,211,238,.1); border: 1px solid var(--cyan); border-radius: 10px; padding: 10px 14px; }
.error { color: var(--red); font-weight: 600; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 10px; background: var(--line); color: var(--cyan); }
.pill.red { color: var(--red); }
.list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.search input { margin: 0; min-width: 260px; }
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
tr:last-child td { border-bottom: 0; }
tr.off td { opacity: .55; }
.code { font: 700 15px/1 ui-monospace, Consolas, monospace; letter-spacing: .08em; color: var(--cyan); }
.actions { display: flex; gap: 6px; align-items: center; }
.actions form { margin: 0; }
textarea { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; resize: vertical; }
textarea:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(124,108,255,.25); }
input[type=file] { padding: 8px; }
td.wrap { white-space: normal; max-width: 360px; }
.who { color: var(--muted); font-weight: 400; margin-left: 4px; }
.inline-reset { display: flex; gap: 6px; align-items: center; }
.inline-reset input { margin: 0; width: 150px; padding: 5px 10px; }
.card.flush { margin: 0; }
label.choice { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; font-weight: 400; letter-spacing: 0; margin-bottom: 8px; }
label.choice input { display: inline-block; width: auto; margin: 0; padding: 0; box-shadow: none; accent-color: var(--indigo); }
.choices { margin: 4px 0 8px 26px; }
.small { font-size: 12px; }
