:root {
  --bg: #060908; --panel: #0d130f; --panel-2: #121b15; --border: #1c2c21; --text: #e6f2ea; --muted: #7f9686;
  --green: #1fd65f; --green-dim: #14803c; --green-glow: rgba(31, 214, 95, .16); --red: #e5484d; --amber: #f5b301;
  --radius: 12px; --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5; }
body { min-height: 100vh; background: radial-gradient(900px 420px at 80% -10%, var(--green-glow), transparent 70%), var(--bg); }
a { color: var(--green); }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; }
h2 { font-size: 1.25rem; } h3 { font-size: 1rem; color: var(--green); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.muted { color: var(--muted); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.btn { background: var(--green); color: #04130a; border: 0; border-radius: 8px; padding: .5em 1em; font-weight: 700; }
.btn:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); font-weight: 500; }
.btn.ghost:hover { border-color: var(--green-dim); }
.btn.danger { background: transparent; color: var(--red); border: 1px solid var(--border); }
.btn.small { padding: .25em .7em; font-size: .85rem; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
input[type=text], input[type=number], select, textarea {
  width: 100%; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: .55em .7em; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-glow); }
textarea { min-height: 90px; resize: vertical; }
select option { background: #0d130f; }

/* strona glowna */
.hero { max-width: 640px; margin: 0 auto; padding: 14vh 20px 40px; text-align: center; }
.hero img { width: min(280px, 70vw); filter: drop-shadow(0 0 24px var(--green-glow)); }
.hero h1 { font-size: 1.6rem; margin-top: 1rem; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.steps { text-align: left; margin: 2rem 0; display: grid; gap: 10px; }
.steps .card b { color: var(--green); }
code { background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: .05em .4em; color: var(--green); }

/* panel */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--panel); border-right: 1px solid var(--border); padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.side .brand img { width: 84px; }
.side .guild { color: var(--muted); font-size: .8rem; padding: 0 8px 10px; word-break: break-word; }
.nav { background: transparent; border: 0; text-align: left; padding: .6em .8em; border-radius: 8px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.nav:hover { background: var(--panel-2); color: var(--text); }
.nav.active { background: var(--green-glow); color: var(--green); font-weight: 700; }
.side .spacer { flex: 1; }
.main { padding: 28px 32px 80px; max-width: 980px; width: 100%; }
.main > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.hint { border-left: 3px solid var(--green); background: var(--panel); padding: 10px 14px; border-radius: 0 8px 8px 0; margin-bottom: 18px; color: var(--muted); }
.group { margin-bottom: 26px; }
.row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(200px, 1.2fr); gap: 14px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: 0; }
.row label.name { font-weight: 600; }
.row .help { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.ctl { display: flex; gap: 8px; align-items: flex-start; }
.ctl > :first-child { flex: 1; }
.tag { font-size: .7rem; background: var(--green-glow); color: var(--green); border-radius: 99px; padding: .1em .6em; margin-left: 6px; vertical-align: middle; }
.modgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.mod { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.mod p { margin: .2em 0 0; color: var(--muted); font-size: .85rem; }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #26352b; border-radius: 99px; transition: .15s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #9bb0a1; border-radius: 50%; transition: .15s; }
.switch input:checked + span { background: var(--green-dim); }
.switch input:checked + span::before { transform: translateX(20px); background: var(--green); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat b { display: block; font-size: 1.9rem; color: var(--green); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .55em .6em; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.table-wrap { overflow-x: auto; }
.pill { border-radius: 99px; padding: .1em .65em; font-size: .78rem; font-weight: 600; background: var(--panel-2); }
.pill.ok { color: var(--green); } .pill.bad { color: var(--red); } .pill.wait { color: var(--amber); }
.editor-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.editor-row.roles { grid-template-columns: minmax(140px, 1fr) minmax(120px, 1fr) 80px auto; }
.editor-row label { display: flex; gap: 6px; align-items: center; white-space: nowrap; color: var(--muted); font-size: .85rem; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
#toast { position: fixed; right: 20px; bottom: 20px; background: var(--panel-2); border: 1px solid var(--green-dim); border-radius: 10px; padding: .7em 1.1em; opacity: 0; transform: translateY(8px); transition: .2s; pointer-events: none; max-width: 80vw; z-index: 10; }
#toast.show { opacity: 1; transform: none; }
#toast.err { border-color: var(--red); color: #ffb3b5; }
.empty { color: var(--muted); padding: 18px 0; }
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--border); padding: 10px; }
  .side .brand, .side .guild, .side .spacer { display: none; }
  .nav { padding: .45em .7em; font-size: .85rem; }
  .main { padding: 18px 16px 80px; }
  .row { grid-template-columns: 1fr; gap: 8px; }
  .editor-row, .editor-row.roles { grid-template-columns: 1fr; }
}
