:root {
  --bg: #1e1f22;
  --surface: #2b2d31;
  --surface-2: #313338;
  --text: #f2f3f5;
  --muted: #b5bac1;
  --accent: #5865f2;
  --accent-hover: #4752c4;
  --green: #248046;
  --red: #da373c;
  --border: #3f4147;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "gg sans", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 700; font-size: 1.15rem; }
.topbar nav { display: flex; align-items: center; gap: 12px; }
.user { color: var(--muted); }

.container { width: 100%; max-width: 880px; margin: 0 auto; padding: 32px 24px; flex: 1; }

.hero { text-align: center; padding: 48px 0; }
.hero h1 { font-size: 2rem; margin-bottom: 8px; }
.lead { color: var(--muted); font-size: 1.05rem; max-width: 520px; margin: 0 auto 24px; }
.muted { color: var(--muted); font-size: 0.9rem; margin-top: 12px; }

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s ease;
}
.btn-lg { padding: 13px 26px; font-size: 1.05rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--red); color: #fff; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card h3 { margin: 0; }
.card .icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--surface-2); display: grid; place-items: center; font-size: 1.4rem;
}
.row { display: flex; align-items: center; gap: 12px; }
.badge { font-size: 0.75rem; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge.on { background: rgba(36,128,70,.2); color: #4ade80; }
.badge.off { background: rgba(218,55,60,.2); color: #f87171; }

form.settings { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; }
.field .hint { color: var(--muted); font-size: 0.85rem; }
.field input[type="text"], .field input[type="url"], .field input[type="number"], .field select {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  padding: 10px 12px; border-radius: 8px; font-size: 0.95rem;
}
.switch { display: flex; align-items: center; gap: 10px; }

.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; }
.flash.ok { background: rgba(36,128,70,.15); border: 1px solid var(--green); }
.flash.err { background: rgba(218,55,60,.15); border: 1px solid var(--red); }

.footer { padding: 18px 24px; text-align: center; color: var(--muted); border-top: 1px solid var(--border); font-size: 0.85rem; }

h1, h2 { font-weight: 700; }
.back { color: var(--muted); display: inline-block; margin-bottom: 16px; }
