:root {
  --bg: #0d1117;
  --bg2: #161b22;
  --bg3: #21262d;
  --border: #30363d;
  --text: #e6edf3;
  --text2: #8b949e;
  --accent: #5865f2;
  --accent-hover: #4752c4;
  --green: #3fb950;
  --red: #f85149;
  --blue: #58a6ff;
  --yellow: #d29922;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Cairo', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ── Navbar ── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
}
.brand-icon { font-size: 1.4rem; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.nav-link {
  color: var(--text2);
  font-weight: 600;
  transition: color .2s;
}
.nav-link:hover { color: var(--text); }
.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background .2s, transform .1s;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--text2); color: var(--text); }
.btn-sm { padding: 4px 12px; font-size: .85rem; }
.btn-lg { padding: 12px 28px; font-size: 1.1rem; }

/* ── Hero ── */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5rem 2rem 4rem;
}
.hero-content {
  text-align: center;
  max-width: 600px;
  margin-bottom: 4rem;
}
.hero-icon { font-size: 4rem; margin-bottom: 1rem; }
.hero-title { font-size: 2.8rem; font-weight: 900; margin-bottom: .8rem; }
.hero-sub { font-size: 1.2rem; color: var(--text2); margin-bottom: 2rem; }
.error-msg { color: var(--red); margin-top: 1rem; font-size: .9rem; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 900px;
}
.feature-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem 1.5rem;
  text-align: center;
  transition: border-color .2s, transform .2s;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.feature-icon { font-size: 2.5rem; display: block; margin-bottom: .8rem; }
.feature-card h3 { font-weight: 700; margin-bottom: .4rem; }
.feature-card p { color: var(--text2); font-size: .9rem; }

/* ── Page layout ── */
.page-container {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  width: 100%;
}
.page-header { margin-bottom: 2rem; }
.page-title { font-size: 1.8rem; font-weight: 900; }
.page-sub { color: var(--text2); margin-top: .3rem; }

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2.5rem;
}
.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
}
.stat-icon { font-size: 2.2rem; }
.stat-value { display: block; font-size: 2rem; font-weight: 900; }
.stat-label { color: var(--text2); font-size: .85rem; }

/* ── Quick links ── */
.quick-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.quick-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 2rem;
  display: flex;
  align-items: center;
  gap: .8rem;
  font-weight: 700;
  transition: border-color .2s, background .2s;
}
.quick-card:hover { border-color: var(--accent); background: var(--bg3); }
.qc-icon { font-size: 1.5rem; }

/* ── Tables ── */
.table-container {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  background: var(--bg3);
  padding: .9rem 1.2rem;
  text-align: right;
  font-size: .85rem;
  color: var(--text2);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: .85rem 1.2rem;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg3); }
.loading-row { text-align: center; color: var(--text2); }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 700;
  background: var(--bg3);
  border: 1px solid var(--border);
}
.badge-green { background: rgba(63,185,80,.15); color: var(--green); border-color: var(--green); }
.badge-red { background: rgba(248,81,73,.15); color: var(--red); border-color: var(--red); }
.badge-blue { background: rgba(88,166,255,.15); color: var(--blue); border-color: var(--blue); }
.rank-badge { font-weight: 900; font-size: 1rem; }
.level-badge {
  background: rgba(88,101,242,.15);
  color: var(--accent);
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: .82rem;
  border: 1px solid var(--accent);
}
.user-id { font-family: monospace; color: var(--text2); font-size: .82rem; }

/* ── Pagination ── */
.pagination { display: flex; gap: .5rem; flex-wrap: wrap; }
.page-btn {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: .85rem;
  transition: background .2s;
}
.page-btn:hover { background: var(--bg3); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Filter row ── */
.filter-row { display: flex; gap: .6rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.filter-btn {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 6px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: all .2s;
}
.filter-btn.active, .filter-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Settings form ── */
.settings-form {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.form-group { display: flex; flex-direction: column; gap: .5rem; }
.form-group label { font-weight: 700; font-size: .9rem; color: var(--text2); }
.form-group input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: .95rem;
  outline: none;
  transition: border-color .2s;
}
.form-group input:focus { border-color: var(--accent); }

/* ── Alerts ── */
.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.alert-success { background: rgba(63,185,80,.15); border: 1px solid var(--green); color: var(--green); }
.alert-error { background: rgba(248,81,73,.15); border: 1px solid var(--red); color: var(--red); }

/* ── Error page ── */
.error-page {
  text-align: center;
  padding: 5rem 2rem;
}
.error-icon { font-size: 4rem; display: block; margin-bottom: 1rem; }

/* ── Footer ── */
.footer {
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text2);
  font-size: .85rem;
}
.footer a { color: var(--accent); }

/* ── Responsive ── */
@media (max-width: 600px) {
  .navbar { padding: 0 1rem; }
  .hero-title { font-size: 2rem; }
  .page-container { padding: 1.5rem 1rem; }
  .settings-form { padding: 1.2rem; }
}
﻿
/* ══════════ Guild Picker + Settings v2 ══════════ */
.guild-picker-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.picker-label { font-weight: 700; color: var(--text2); white-space: nowrap; }

/* Custom select */
.custom-select { position: relative; flex: 1; max-width: 420px; }
.cs-trigger {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cs-trigger:hover { border-color: var(--accent); }
.cs-arrow { color: var(--text2); transition: transform .2s; }
.custom-select.open .cs-arrow { transform: rotate(180deg); }
.cs-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 50;
  max-height: 320px;
  overflow-y: auto;
}
.custom-select.open .cs-menu { display: block; }
.cs-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background .15s;
}
.cs-option:hover { background: var(--bg3); }
.guild-icon { width: 28px; height: 28px; border-radius: 50%; }
.guild-icon-ph {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text2);
}
.empty-icon { font-size: 3rem; display: block; margin-bottom: 1rem; }

/* Settings groups */
.settings-group {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.2rem;
}
.group-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--border);
}
.group-fields { display: flex; flex-direction: column; gap: 1rem; }
.cfg-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  align-items: center;
  gap: 1rem;
}
.cfg-label { font-weight: 600; color: var(--text2); font-size: .9rem; }
.cfg-input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: .9rem;
  outline: none;
  width: 100%;
}
select.cfg-input { cursor: pointer; }
.cfg-input:focus { border-color: var(--accent); }

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 48px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 26px; transition: .2s;
}
.slider::before {
  content: ""; position: absolute;
  height: 18px; width: 18px; right: 3px; bottom: 3px;
  background: var(--text2); border-radius: 50%; transition: .2s;
}
.switch input:checked + .slider { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(-22px); background: #fff; }

/* Role chips */
.chip-group { display: flex; flex-wrap: wrap; gap: .5rem; }
.role-chip {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 5px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  transition: all .15s;
}
.role-chip:hover { border-color: var(--accent); }
.role-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.btn-save { width: 100%; justify-content: center; padding: 12px; font-size: 1rem; margin-top: .5rem; }

@media (max-width: 600px) {
  .cfg-row { grid-template-columns: 1fr; gap: .4rem; }
  .guild-picker-card { flex-direction: column; align-items: stretch; }
  .custom-select { max-width: none; }
}
