/* Admin paneli: oyunun altın-siyah teması, masaüstü ve telefon */
:root {
  --bg: #0d0906;
  --panel: #1a120b;
  --panel-2: #241a10;
  --line: rgba(217, 180, 90, 0.28);
  --gold: #d9b45a;
  --gold-soft: #f3dc9b;
  --text: #f4ecdc;
  --muted: #a89a82;
  --red: #e0463c;
  --orange: #f08a24;
  --green: #3fae6a;
  --blue: #5aa2ff;
  --radius: 12px;
  --font: 'Exo 2', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; color: var(--text); font: 15px/1.45 var(--font);
  background: radial-gradient(ellipse at top, #2a1b0e 0%, var(--bg) 60%) fixed;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--gold-soft); }
.muted { color: var(--muted); }
.center { text-align: center; }
.right { text-align: right; }

/* Üst çubuk */
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px;
  padding: 12px 24px; background: rgba(13, 9, 6, 0.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px);
}
.topbar .brand { font: 700 20px 'Libre Baskerville', serif; color: var(--gold-soft); text-decoration: none; }
.topbar .tag { padding: 2px 10px; border: 1px solid var(--red); border-radius: 999px; color: #ffb3ab; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.topbar .me { margin-left: auto; color: var(--muted); }
.topbar .back { text-decoration: none; font-weight: 600; }

main { max-width: 1180px; margin: 0 auto; padding: 24px; }

/* Özet kartları: ilk ikisi geniş, durum sayıları renkli */
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 20px; }
.stat {
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
}
.stat b { display: block; font-size: 28px; font-weight: 800; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 13px; }
.stat.gold b { color: var(--gold-soft); }
.stat.red b { color: #ff8a80; }
.stat.orange b { color: #ffb366; }

/* Sekmeler */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button {
  padding: 10px 18px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted);
  font-weight: 700; cursor: pointer;
}
.tabs button[aria-selected="true"] { color: var(--gold-soft); border-bottom-color: var(--gold); }
.tabs button:hover { color: var(--text); }

/* Düğmeler ve alanlar */
button {
  padding: 8px 14px; border: 1px solid var(--gold); border-radius: 8px; background: rgba(217, 180, 90, 0.12);
  font-weight: 700; cursor: pointer; transition: background 140ms, transform 80ms;
}
button:hover:not(:disabled) { background: rgba(217, 180, 90, 0.26); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 2px; }
button.small { padding: 5px 12px; font-size: 13px; }
button.link { padding: 2px 0; border: 0; background: none; color: var(--muted); text-decoration: underline; font-weight: 600; font-size: 13px; }
button.link:hover:not(:disabled) { background: none; color: var(--text); }
button.danger { border-color: var(--red); background: rgba(224, 70, 60, 0.15); color: #ffb3ab; }
button.danger:hover:not(:disabled) { background: rgba(224, 70, 60, 0.32); }
.primary, button.primary { display: inline-block; padding: 10px 22px; border: 0; border-radius: 8px; background: linear-gradient(180deg, #f3d07a, #c99a3e); color: #241603; font-weight: 800; text-decoration: none; }
input, select, textarea {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #0f0a06; min-width: 0;
}
textarea { width: 100%; resize: vertical; }

/* Üye listesi */
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar input { flex: 1; max-width: 420px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table.grid { width: 100%; border-collapse: collapse; }
.grid th { text-align: left; padding: 10px 14px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--panel-2); }
.grid td { padding: 10px 14px; border-bottom: 1px solid rgba(217, 180, 90, 0.1); vertical-align: middle; }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid tbody tr:hover td { background: rgba(217, 180, 90, 0.05); }
.grid td.who b { font-weight: 700; }
.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 14px; }

/* Durum etiketleri */
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid; white-space: nowrap; }
.chip.admin { color: #ffb3ab; border-color: var(--red); }
.chip.vip { color: #241603; background: linear-gradient(180deg, #f3d07a, #c99a3e); border-color: #f3d07a; }
.chip.ban { color: #fff; background: var(--red); border-color: var(--red); }
.chip.mute { color: #ffcf99; border-color: var(--orange); }
.chip.online { color: #9fe3b8; border-color: var(--green); }

/* Ayarlar */
.card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.settings { display: grid; gap: 16px; max-width: 640px; }
.field { display: grid; gap: 6px; font-weight: 600; }
.field small, .switch small { color: var(--muted); font-weight: 400; }
.field.narrow input { width: 120px; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--gold); }
.settings .primary { justify-self: start; }
.settings .bot-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.settings .bot-lists textarea { font-family: inherit; line-height: 1.6; }
.settings .hint { margin: -6px 0 0; font-size: 13px; }
@media (max-width: 560px) { .settings .bot-lists { grid-template-columns: 1fr; } }

/* Yetkisiz */
.denied { max-width: 460px; margin: 80px auto; text-align: center; }
.denied h1 { font: 700 22px 'Libre Baskerville', serif; color: var(--gold-soft); }

/* Üye yönetim penceresi */
dialog {
  width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0 24px 24px;
  border: 1px solid var(--gold); border-radius: 16px; background: var(--panel); color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}
dialog::backdrop { background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(2px); }
.close-row { position: sticky; top: 0; display: flex; justify-content: flex-end; padding-top: 12px; margin: 0; }
.close-row button { border: 0; background: none; font-size: 18px; color: var(--muted); }
.m-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.m-head h2 { margin: 0; font: 700 24px 'Libre Baskerville', serif; color: var(--gold-soft); }
.m-head p { margin: 4px 0 0; }
.m-facts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 16px 0; }
.m-facts div { padding: 10px; border-radius: 10px; background: var(--panel-2); }
.m-facts dt { font-size: 12px; color: var(--muted); }
.m-facts dd { margin: 2px 0 0; font-weight: 700; font-size: 14px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.action { display: grid; gap: 8px; align-content: start; padding: 14px; border: 1px solid var(--line); border-left-width: 3px; border-radius: 10px; background: #150e08; margin: 0; }
.action.gold { border-left-color: var(--gold); }
.action.orange { border-left-color: var(--orange); }
.action.red, .action.danger { border-left-color: var(--red); }
.action h3 { margin: 0; font-size: 15px; }
.action .hint { margin: 0; font-size: 13px; color: var(--muted); }
.action .row { display: flex; gap: 6px; flex-wrap: wrap; }
.action .row input { flex: 1 1 120px; }
.action .link { justify-self: start; }
.temp { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: 8px; background: rgba(63, 174, 106, 0.12); border: 1px solid var(--green); }
.temp code { font: 700 16px ui-monospace, monospace; color: #c9f5d9; letter-spacing: 0.06em; user-select: all; }

/* Bildirim */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100;
  padding: 10px 18px; border-radius: 10px; background: #2b2015; border: 1px solid var(--gold); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-weight: 600;
}
.toast.ok { border-color: var(--green); }
.toast.error { border-color: var(--red); color: #ffd0cb; }

@media (max-width: 820px) {
  main { padding: 16px; }
  .topbar { padding: 10px 16px; flex-wrap: wrap; }
  .topbar .me { display: none; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .m-facts { grid-template-columns: repeat(2, 1fr); }
  .actions { grid-template-columns: 1fr; }
}
