/* Mageness admin panel - minimal look (2026-11-12, user: "daha basit, minimal bir site; kocaman gözüküyor").
   Flat dark surfaces, thin borders, one accent, small type, no glows or animations. Class names are
   the ones index.html / admin.js already use. */
:root {
  --bg: #0d0d11;
  --surface: #15151b;
  --surface-2: #1b1b23;
  --line: #272731;
  --line-2: #34343f;
  --accent: #8b7cf6;
  --arcane: #8b7cf6;
  --mana: #5cc8e0;
  --gold: #e0b352;
  --gold-hi: #ecd28c;
  --emerald: #4cc38a;
  --ember: #e8935a;
  --danger: #e5484d;
  --text: #ececf1;
  --text-2: #a4a4b3;
  --text-3: #6f6f80;
  --obsidian: #15151b;
  --obsidian-deep: #0d0d11;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; }
body { font: 13px/1.45 "Noto Sans", system-ui, sans-serif; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
.muted { color: var(--text-2); }
.small { font-size: 12px; }
.error { color: var(--danger); font-weight: 600; }
.ok { color: var(--emerald); font-weight: 600; }
code { font-family: ui-monospace, Consolas, monospace; color: var(--text-2); font-size: 12px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-weight: 600; }
p { margin: 0 0 8px; }

/* no decoration */
.sky, .rune { display: none; }
.section { margin: 0 0 10px; font-size: 11px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--text-3); }

/* cards */
.card { position: relative; min-width: 0; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.glow-gold, .glow-arcane { box-shadow: none; }
.glow-danger { border-color: rgba(229, 72, 77, .5); }

/* buttons */
.btn-seal { font: inherit; font-weight: 600; color: #fff; background: var(--accent); border: 0; border-radius: 7px; padding: 6px 14px; cursor: pointer;
  text-decoration: none; display: inline-block; transition: filter .12s; }
.btn-seal:hover { filter: brightness(1.1); text-decoration: none; }
.btn-seal:disabled { background: var(--line-2); color: var(--text-3); cursor: default; filter: none; }
.btn-seal.big { margin-top: 12px; padding: 9px 18px; font-size: 14px; }
.btn-seal.danger { background: var(--danger); }
.btn-ghost { font: inherit; color: var(--text-2); background: transparent; border: 1px solid var(--line-2); border-radius: 7px; padding: 5px 12px; cursor: pointer; }
.btn-ghost:hover { color: var(--text); border-color: var(--text-3); }
.btn-ghost.small { padding: 2px 9px; font-size: 11.5px; }
.btn-ghost.danger { color: #f0898c; border-color: rgba(229, 72, 77, .45); }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--c, var(--text-2)); }

/* login */
.login { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { max-width: 380px; text-align: center; padding: 26px 22px; }
.rune-title { display: flex; align-items: center; justify-content: center; }
.rune-title h1 { margin: 0 0 6px; font-size: 20px; color: var(--text); }
.tg-login { margin-top: 6px; min-height: 44px; }
.or { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; color: var(--text-3); font-size: 11px; text-transform: uppercase; letter-spacing: .8px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* app shell */
.app { position: relative; }
.topbar { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar-row { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 8px 18px 0; }
.brand { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); white-space: nowrap; }
.brand b { color: var(--text); font-weight: 600; }
.me { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.navbar { max-width: 1080px; margin: 0 auto; display: flex; gap: 2px; padding: 4px 12px 0; overflow-x: auto; scrollbar-width: none; }
.navbar::-webkit-scrollbar { display: none; }
.nav-item { position: relative; flex: none; display: flex; align-items: center; gap: 6px; padding: 7px 10px 8px; color: var(--text-3);
  font-size: 12.5px; font-weight: 500; border-bottom: 2px solid transparent; }
.nav-item:hover { color: var(--text-2); text-decoration: none; }
.nav-item svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.active { color: var(--text); border-bottom-color: var(--accent); }
.badge { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; font-size: 10.5px; line-height: 16px; text-align: center; color: #fff; background: var(--accent); }

.content { max-width: 1080px; margin: 0 auto; padding: 16px 18px 48px; }
.content > section { display: grid; gap: 12px; align-content: start; }

/* players */
.search { display: flex; align-items: center; gap: 8px; padding: 5px 5px 5px 12px; }
.search input { flex: 1; min-width: 0; font: inherit; color: var(--text); background: transparent; border: 0; outline: none; padding: 5px 0; }
.search:focus-within { border-color: var(--accent); }
.results { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.result { cursor: pointer; padding: 10px 12px; }
.result:hover { border-color: var(--line-2); }
.result .name { font-weight: 600; }
.result .sub { color: var(--text-3); font-size: 11.5px; margin-top: 2px; word-break: break-all; }
.player { display: grid; gap: 12px; }
.player-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.player-head h1 { margin: 0 0 4px; font-size: 18px; color: var(--text); }
.head-actions { display: flex; gap: 8px; }
.meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.meta code { word-break: break-all; }
.stats { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.stat { flex: 1 1 110px; padding: 7px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.stat .k { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .6px; }
.stat .v { font-size: 14px; font-weight: 600; margin-top: 1px; }
.stat.gold .v { color: var(--gold); }
.grid2 { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.progress { display: grid; gap: 4px; }
.progress .row { display: flex; justify-content: space-between; padding: 4px 8px; border-radius: 6px; background: var(--surface-2); }
.progress .row b { color: var(--mana); font-weight: 600; }
.tabs { display: flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); width: fit-content; max-width: 100%; flex-wrap: wrap; }
.tabs button { flex: none; font: inherit; font-weight: 500; color: var(--text-2); background: transparent; border: 0; border-radius: 6px; padding: 4px 11px; cursor: pointer; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); background: var(--line-2); }
.tab-body { overflow-x: auto; }

/* tables and logs: small type, tight rows, a scroll of their own instead of a long page */
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { text-align: left; color: var(--text-3); font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; padding: 5px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
.log { max-height: 360px; overflow: auto; }
details summary { cursor: pointer; color: var(--accent); }
pre { white-space: pre-wrap; word-break: break-word; font-size: 11.5px; color: var(--text-2); margin: 6px 0 0; }
.ticket { padding: 10px 0; border-bottom: 1px solid var(--line); }
.ticket h3 { margin: 0 0 6px; font-size: 13px; }
.msg { margin: 4px 0; padding: 6px 10px; border-radius: 8px; max-width: 720px; }
.msg.player { background: var(--surface-2); border: 1px solid var(--line-2); }
.msg.admin { background: rgba(139, 124, 246, .1); border: 1px solid rgba(139, 124, 246, .35); }
.msg .who { font-size: 10.5px; color: var(--text-3); margin-bottom: 1px; }
.empty { color: var(--text-3); padding: 6px 0; }

/* forms */
.form { display: grid; gap: 10px; margin-top: 8px; }
.form label { display: grid; gap: 4px; font-size: 11.5px; font-weight: 500; color: var(--text-2); }
.form input, .form textarea, .form select { font: inherit; font-size: 13px; font-weight: 400; color: var(--text); padding: 6px 9px; border-radius: 7px; outline: none; min-width: 0;
  background: var(--bg); border: 1px solid var(--line-2); }
.form input:focus, .form textarea:focus, .form select:focus { border-color: var(--accent); }
.form select option { background: var(--surface); }
.form .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.form .row > input:first-child, .form .row > select { flex: 1; }
.form .n { width: 80px; }
.form .check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.form .check input { width: 15px; height: 15px; padding: 0; accent-color: var(--accent); }
.grid3 { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rules { display: grid; gap: 3px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); border: 1px dashed var(--line-2); font-size: 12px; color: var(--text-2); }

/* settings */
.settings { display: grid; gap: 10px; margin-top: 10px; }
.settings .group { display: grid; gap: 8px; padding: 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); margin-top: 0; }
.settings .group.off, .settings .group.sev-critical { border-color: rgba(229, 72, 77, .55); }
.settings .group.gated, .settings .group.sev-warning { border-color: rgba(224, 179, 82, .55); }
.settings .group h3 { margin: 0; font-size: 13px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.settings .group h4 { margin: 6px 0 0; font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--text-3); }
.settings .state { font-size: 10.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: rgba(76, 195, 138, .15); color: var(--emerald); }
.settings .off .state { background: rgba(229, 72, 77, .15); color: #f0898c; }
.settings .gated .state { background: rgba(224, 179, 82, .15); color: var(--gold); }
.settings .fields { display: grid; gap: 8px 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: end; }
.settings .fields .wide { grid-column: 1 / -1; }
.settings label.changed { color: var(--mana); }
.settings label.changed input { border-color: var(--mana); }
.settings textarea { resize: vertical; }
.settings .notice { display: grid; gap: 8px; padding: 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.settings .notice.sev-warning { border-left: 3px solid var(--gold); }
.settings .notice.sev-critical { border-left: 3px solid var(--danger); }
.settings .notice.sev-info { border-left: 3px solid var(--mana); }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.tags button { font: inherit; font-size: 12px; font-weight: 500; color: var(--text-2); cursor: pointer; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 6px; }
.tags button::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); }
.tags button.off::before { background: var(--danger); }
.tags button.gated::before { background: var(--gold); }
.tags button.plain::before { display: none; }
.tags button.active { color: var(--text); border-color: var(--accent); background: rgba(139, 124, 246, .12); }
.tags button.dirty::after { content: "•"; color: var(--mana); }
.diff { display: grid; gap: 3px; font-size: 12px; }
.diff b { color: var(--mana); font-weight: 600; }

/* approvals */
.approvals { display: grid; gap: 10px; }
.approval { display: grid; gap: 8px; }
.approval .top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; }
.approval .who { font-weight: 600; }
.approval .rewards { font-size: 14px; font-weight: 600; color: var(--gold); }
.warn { padding: 7px 10px; border-radius: 8px; background: rgba(232, 147, 90, .08); border: 1px solid rgba(232, 147, 90, .4); color: #efc4a6; font-size: 12.5px; }
.warn b { color: var(--ember); }

/* modal + toast */
.modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .6); }
.modal .card { width: min(460px, 100%); display: grid; gap: 10px; background: var(--surface); }
.modal h3 { margin: 0; color: var(--text); font-size: 14px; }
.modal .body { color: var(--text-2); display: grid; gap: 8px; }
.modal .actions { justify-content: flex-end; }
.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 40; padding: 6px 14px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); font-size: 12.5px; }

/* moderation */
.moderation-ban { margin-bottom: 10px; }
.moderation-ban .banned { padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(229, 72, 77, .45); background: rgba(229, 72, 77, .08); }
.row.quick { gap: 6px; flex-wrap: wrap; margin: 2px 0 8px; }
.sub-title { font-size: 12.5px; font-weight: 600; margin: 10px 0 6px; display: flex; align-items: center; gap: 6px; }

@media (max-width: 760px) {
  .topbar-row { padding: 8px 12px 0; }
  .me #me-name { display: none; }
  .navbar { padding: 4px 6px 0; }
  .content { padding: 12px 10px 40px; }
}
.settings .notice h3 { margin: 0; font-size: 12.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.settings .notice .state { background: rgba(76, 195, 138, .15); color: var(--emerald); }
.settings .notice h3 .btn-ghost { margin-left: auto; }
.settings .notice-new { display: grid; gap: 8px; justify-items: start; }
.settings .notice-new .form { width: 100%; padding: 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
:root { color-scheme: dark; }

/* spells page */
.skills-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 10px; }
.skills-side { display: grid; gap: 8px; }
.skills-side input { font: inherit; font-size: 13px; color: var(--text); padding: 6px 9px; border-radius: 7px; outline: none; background: var(--bg); border: 1px solid var(--line-2); }
.skills-side .tags { margin-top: 0; }
.skills-list { display: grid; gap: 1px; max-height: 560px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.skills-list button { font: inherit; font-size: 12.5px; text-align: left; color: var(--text-2); background: transparent; border: 0; padding: 5px 9px; cursor: pointer; display: flex; gap: 6px; align-items: center; }
.skills-list button:hover { background: var(--surface-2); color: var(--text); }
.skills-list button.active { background: rgba(139, 124, 246, .14); color: var(--text); }
.skills-list .el { font-size: 10.5px; color: var(--text-3); margin-left: auto; }
.skills-list .mark { color: var(--mana); }
.stat-block { display: grid; gap: 6px; padding: 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.stat-block.edited { border-color: rgba(92, 200, 224, .5); }
.stat-block h3 { margin: 0; font-size: 12.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stat-block h3 .btn-ghost:first-of-type { margin-left: auto; }
.stat-block table { font-size: 11.5px; }
.stat-block th, .stat-block td { padding: 3px 6px; text-align: right; border-bottom: 0; }
.stat-block th:first-child, .stat-block td:first-child { text-align: left; color: var(--text-3); white-space: nowrap; }
.stat-block tbody tr:hover td { background: transparent; }
.stat-block td.now { color: var(--mana); font-weight: 600; }
.points { display: flex; flex-wrap: wrap; gap: 6px; }
.points label { display: grid; gap: 2px; font-size: 10.5px; color: var(--text-3); }
.points input { width: 78px; font: inherit; font-size: 12.5px; color: var(--text); padding: 4px 7px; border-radius: 6px; outline: none; background: var(--bg); border: 1px solid var(--line-2); }
.points input:focus { border-color: var(--accent); }
@media (max-width: 760px) { .skills-layout { grid-template-columns: 1fr; } }
#skill-editor > h3 { margin: 0; font-size: 14px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }

/* balance version bar on the spells page */
#skills-patch { gap: 8px; }
.patch-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.patch-row b { color: var(--text); font-weight: 600; }
.patch-row.draft { padding: 8px 10px; border-radius: 8px; background: rgba(139, 124, 246, .1); border: 1px solid rgba(139, 124, 246, .4); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.skill-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; background: var(--surface); border: 1px solid var(--line-2); }
.skill-tag a { color: var(--text); }
.skill-tag button { font: inherit; color: var(--text-3); background: transparent; border: 0; padding: 0 0 0 2px; cursor: pointer; line-height: 1; }
.skill-tag button:hover { color: var(--danger); }
.btn-ghost:disabled { opacity: .55; cursor: default; }

/* events page */
.check-row { display: flex; flex-wrap: wrap; gap: 6px 14px; }
