:root {
  --bg: #0d0f17;
  --panel: #161a26;
  --panel-2: #1d2230;
  --border: #2a3142;
  --text: #e7e9ef;
  --muted: #8b93a7;
  --accent: #5865f2;
  --accent-2: #00d8c0;
  --good: #57f287;
  --warn: #faa61a;
  --danger: #ed4245;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(1200px 600px at 80% -10%, #1a1f33 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
}
a { color: var(--accent-2); text-decoration: none; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; border-bottom: 1px solid var(--border);
  background: rgba(13,15,23,.7); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 800; font-size: 20px; letter-spacing: .5px; }
.logo { filter: drop-shadow(0 0 8px var(--accent)); }
.userbox { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.userbox img { width: 30px; height: 30px; border-radius: 50%; }
main { max-width: 960px; margin: 0 auto; padding: 26px 18px 60px; }
.loading { color: var(--muted); text-align: center; padding: 60px 0; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff; border: none; border-radius: 8px;
  padding: 9px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: filter .15s;
}
.btn:hover { filter: brightness(1.12); }
.btn.ghost { background: var(--panel-2); border: 1px solid var(--border); }
.btn.danger { background: var(--danger); }
.btn.small { padding: 5px 10px; font-size: 12px; }

.hero { text-align: center; padding: 80px 0; }
.hero h1 { font-size: 38px; margin: 0 0 10px; }
.hero p { color: var(--muted); font-size: 16px; margin: 0 0 26px; }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px; transition: transform .12s, border-color .12s;
}
.guild-card { cursor: pointer; display: flex; align-items: center; gap: 12px; }
.guild-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.guild-card img, .guild-ph {
  width: 46px; height: 46px; border-radius: 12px; object-fit: cover;
  background: var(--panel-2); display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--muted);
}

.section { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 20px; margin-bottom: 16px; }
.section h2 { margin: 0 0 4px; font-size: 17px; }
.section .hint { color: var(--muted); font-size: 13px; margin: 0 0 16px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
input[type=text], input[type=number], select, textarea {
  width: 100%; background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 9px 11px; font-size: 14px; font-family: inherit;
}
textarea { resize: vertical; min-height: 64px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > .field { flex: 1; min-width: 140px; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); }

.crumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--muted); font-size: 14px; }
.crumbs a { color: var(--muted); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 14px; }
th { color: var(--muted); font-weight: 600; }
.lr-row td { vertical-align: middle; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 20px; background: var(--panel-2); border: 1px solid var(--border); font-size: 12px; }
.avatar-sm { width: 24px; height: 24px; border-radius: 50%; vertical-align: middle; margin-right: 6px; }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--good); color: #08130c; padding: 11px 18px; border-radius: 10px;
  font-weight: 600; box-shadow: 0 8px 30px rgba(0,0,0,.4); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.toast.err { background: var(--danger); color: #fff; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 26px 0 40px; }
.color-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
