:root {
  --brand: #8B5CF6;
  --bg: #0f0f13;
  --panel: #17171d;
  --panel-2: #1e1e26;
  --border: #2a2a34;
  --text: #e9e9ef;
  --muted: #9a9aa8;
  --green: #22c55e;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
}
a { color: var(--brand); text-decoration: none; }
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; background: var(--panel); border-right: 1px solid var(--border);
  padding: 24px 16px; flex-shrink: 0;
}
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; padding: 0 8px; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.brand span { font-weight: 700; font-size: 18px; }
.nav-item {
  display: block; padding: 10px 12px; border-radius: 8px; color: var(--muted);
  font-size: 14px; margin-bottom: 4px; font-weight: 500; cursor: pointer; border: none; background: none;
  width: 100%; text-align: left; font-family: inherit;
}
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item.active { background: var(--brand); color: white; }
.main { flex: 1; padding: 36px 48px; max-width: 920px; }
h1 { font-size: 24px; margin: 0 0 4px 0; }
.subtitle { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 22px 24px; margin-bottom: 18px;
}
.card h2 { font-size: 15px; margin: 0 0 16px 0; color: var(--text); }
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input[type=text], .field input[type=number], .field select, .field textarea {
  width: 100%; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 9px 12px; font-size: 14px; font-family: inherit;
}
.field textarea { min-height: 80px; resize: vertical; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toggle-row label { margin: 0; color: var(--text); font-size: 14px; }
.switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 24px; cursor: pointer; transition: .15s;
}
.switch .slider:before {
  content: ""; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px;
  background: var(--muted); border-radius: 50%; transition: .15s;
}
.switch input:checked + .slider { background: var(--brand); border-color: var(--brand); }
.switch input:checked + .slider:before { transform: translateX(18px); background: white; }
.btn {
  display: inline-block; background: var(--brand); color: white; border: none;
  padding: 11px 22px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: inherit;
}
.btn:hover { opacity: .9; }
.note { color: var(--muted); font-size: 13px; line-height: 1.5; }
.guild-badge { display: flex; align-items: center; gap: 10px; padding: 8px 8px 20px 8px; }
.guild-badge .name { font-size: 14px; font-weight: 600; }
.flash {
  background: rgba(34,197,94,.12); border: 1px solid var(--green); color: var(--green);
  padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 20px;
}
.error {
  background: rgba(239,68,68,.12); border: 1px solid #ef4444; color: #ef4444;
  padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 20px;
}
.landing {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  flex-direction: column; text-align: center; gap: 18px;
}
.landing h1 { font-size: 32px; }
.guild-link {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px; margin-bottom: 8px;
  background: var(--panel-2); border-radius: 8px; cursor: pointer; border: none; width: 100%;
  color: var(--text); font-family: inherit; text-align: left; font-size: 14px;
}
.guild-link:hover { background: var(--border); }
.guild-link .bump { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); display: inline-block; }
