/* Bloom Panel — tasarım sistemi. Kaynak token'lar: ox_lib/web/src/theme/index.ts (sunucunun soft turuncu teması) */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/inter-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/inter-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/inter-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/inter-latin-ext-400-normal.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/inter-latin-ext-500-normal.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/inter-latin-ext-600-normal.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: dark;
  --bg: #100E0D;
  --surface: #1C1917;
  --surface-2: #24201D;
  --surface-3: #2E2A27;
  --sunken: #141210;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.1);
  --hover: rgba(255, 255, 255, 0.04);
  --text: #F3EEE9;
  --text-2: #D4CCC5;
  --muted: #A69E97;
  --faint: #8A827B;
  --accent: #F2A06B;
  --accent-hover: #F5AD7C;
  --accent-strong: #E68C54;
  --accent-deep: #AD6034;
  --accent-soft: rgba(242, 160, 107, 0.14);
  --accent-line: rgba(242, 160, 107, 0.35);
  --accent-text: #FFD6B8;
  --on-accent: #2B1A10;
  --success: #86CBA8;
  --success-soft: rgba(134, 203, 168, 0.13);
  --danger: #EE8F83;
  --danger-soft: rgba(238, 143, 131, 0.13);
  --warning: #EFC56E;
  --warning-soft: rgba(239, 197, 110, 0.13);
  --info: #A9B8D6;
  --info-soft: rgba(169, 184, 214, 0.12);
  --series-1: #CF7641;
  --series-1-wash: rgba(207, 118, 65, 0.10);
  --grid: #2E2A27;
  --axis: #3E3935;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.25);
  --font: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Cascadia Code', 'Consolas', ui-monospace, monospace;
  --sidebar: 248px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
::selection { background: var(--accent-line); }
:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #3a3431; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.tight { gap: 6px; }
.stack.loose { gap: 20px; }
.between { justify-content: space-between; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------------------ yerleşim */

.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--sunken);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 16px 12px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 18px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; background: #000; }
.brand b { display: block; font-size: 15px; }
.brand span { font-size: 12px; color: var(--muted); }
.nav-group { margin-top: 14px; }
.nav-group > div { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); padding: 0 10px 6px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px;
  color: var(--text-2); font-weight: 500; font-size: 13.5px;
}
.nav a svg { color: var(--muted); flex: none; }
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent-text); }
.nav a.active svg { color: var(--accent); }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }
.server-pill { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; background: var(--surface); font-size: 12.5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.on { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.dot.off { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.dot.warn { background: var(--warning); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px; padding: 12px 28px;
  background: rgba(16, 14, 13, 0.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar .search { max-width: 420px; flex: 1; }
.content { padding: 24px 28px 48px; max-width: 1480px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin-top: 4px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); }
.user-chip .who { line-height: 1.2; }
.user-chip .who b { font-size: 13px; display: block; }
.user-chip .who span { font-size: 11.5px; color: var(--muted); }

/* ------------------------------------------------------------ kart / ızgara */

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-head h3 { display: flex; align-items: center; gap: 8px; }
.card-head p { color: var(--muted); font-size: 12.5px; }
.card-body { padding: 16px 18px; }
.card-body.flush { padding: 0; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.sidebar-right { grid-template-columns: minmax(0, 1fr) 360px; }
@media (max-width: 1200px) { .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.sidebar-right { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .topbar { padding: 10px 16px; }
}

/* ------------------------------------------------------------ istatistik kutuları */

.stat { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.stat .label { color: var(--muted); font-size: 12.5px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.stat .sub { font-size: 12px; color: var(--muted); }
.stat.hero .value { font-size: 44px; }

/* ------------------------------------------------------------ düğmeler / girdiler */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid transparent;
  font: 500 13.5px var(--font); cursor: pointer; white-space: nowrap;
  background: var(--surface-2); color: var(--text); transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn:hover { background: var(--surface-3); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--hover); color: var(--text); }
.btn-outline { background: transparent; border-color: var(--border-strong); }
.btn-outline:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: rgba(238, 143, 131, 0.22); }
.btn-success { background: var(--success-soft); color: var(--success); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 7px; gap: 5px; }
.btn-icon { width: 34px; padding: 0; }
.btn-sm.btn-icon { width: 30px; }
.btn-xs.btn-icon { width: 26px; }

.input, .select, .textarea {
  width: 100%; height: 36px; padding: 0 12px; border-radius: 10px;
  background: var(--sunken); border: 1px solid var(--border); color: var(--text);
  font: 14px var(--font); transition: border-color 120ms ease, box-shadow 120ms ease;
}
.textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.textarea.mono { font-family: var(--mono); font-size: 12.5px; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23A69E97' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.select option { background: var(--surface-2); }
.input-sm { height: 30px; font-size: 13px; border-radius: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.field .hint { font-size: 12px; color: var(--faint); }
.input-group { position: relative; }
.input-group svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.input-group .input { padding-left: 36px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: 13.5px; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }

/* ------------------------------------------------------------ rozet / sekme */

.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px;
  border-radius: 99px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.badge.accent { background: var(--accent-soft); color: var(--accent-text); }
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.outline { background: transparent; border: 1px solid var(--border-strong); color: var(--muted); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button {
  background: none; border: none; color: var(--muted); font: 500 13.5px var(--font); padding: 10px 14px;
  border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--accent-text); border-bottom-color: var(--accent); }
.tabs .count { font-size: 11px; background: var(--surface-3); color: var(--muted); padding: 1px 6px; border-radius: 99px; }

.seg { display: inline-flex; padding: 3px; background: var(--sunken); border: 1px solid var(--border); border-radius: 10px; gap: 2px; }
.seg button { background: none; border: none; color: var(--muted); font: 500 12.5px var(--font); padding: 5px 11px; border-radius: 7px; cursor: pointer; }
.seg button.active { background: var(--surface-3); color: var(--text); }

/* ------------------------------------------------------------ tablo */

.table-wrap { overflow-x: auto; }
.table-wrap.loading { opacity: 0.55; transition: opacity 120ms ease; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 10px 14px;
  border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface);
  position: sticky; top: 0;
}
.table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--hover); }
.table tr.clickable { cursor: pointer; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table .sub { display: block; font-size: 12px; color: var(--muted); }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }

.empty { padding: 36px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty svg { color: var(--faint); }

/* ------------------------------------------------------------ uyarı kutusu */

.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; font-size: 13.5px; align-items: flex-start; }
.alert svg { flex: none; margin-top: 1px; }
.alert.warning { background: var(--warning-soft); color: #f3d79b; }
.alert.danger { background: var(--danger-soft); color: #f5b8b0; }
.alert.info { background: var(--info-soft); color: #cbd5ea; }
.alert.success { background: var(--success-soft); color: #b9e2cd; }

/* ------------------------------------------------------------ modal / toast */

.modal-back { position: fixed; inset: 0; background: rgba(8, 7, 6, 0.66); backdrop-filter: blur(2px); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; overflow-y: auto; animation: fade 120ms ease; }
.modal { width: 100%; max-width: 520px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow); animation: rise 140ms ease; }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--border); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { min-width: 280px; max-width: 420px; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); display: flex; gap: 10px; animation: rise 140ms ease; }
.toast b { display: block; font-size: 13.5px; }
.toast span { color: var(--muted); font-size: 13px; }
.toast.success svg { color: var(--success); }
.toast.error svg { color: var(--danger); }
.toast.info svg { color: var(--accent); }

/* ------------------------------------------------------------ açılır liste (autocomplete) */

.ac { position: relative; }
.ac-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 50; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--shadow); max-height: 300px; overflow-y: auto; padding: 4px; }
.ac-item { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 7px; cursor: pointer; font-size: 13.5px; }
.ac-item:hover, .ac-item.active { background: var(--accent-soft); color: var(--accent-text); }
.ac-item .sub { color: var(--muted); font-size: 12px; margin-left: auto; }

/* ------------------------------------------------------------ oyuncu başlığı */

.player-head { display: flex; align-items: center; gap: 16px; padding: 18px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-weight: 600; color: var(--accent-text); flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; border-radius: 16px; }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 14px; font-size: 13.5px; }
.kv > dt { color: var(--muted); }
.kv > dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.money-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .money-cards { grid-template-columns: 1fr; } }
.money-card { background: var(--sunken); border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.money-card .v { font-size: 22px; font-weight: 600; }

/* ------------------------------------------------------------ envanter ızgarası */

.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.slot {
  position: relative; aspect-ratio: 1 / 1.08; background: var(--sunken); border: 1px solid var(--border); border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 6px 6px; cursor: pointer; transition: border-color 120ms ease, background 120ms ease;
}
.slot:hover { border-color: var(--accent-line); background: #181513; }
.slot.empty { cursor: default; opacity: 0.45; }
.slot.empty:hover { border-color: var(--border); background: var(--sunken); }
.slot img { width: 52%; height: 52%; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)); }
.slot .ph { width: 44px; height: 44px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; color: var(--muted); font-weight: 600; }
.slot .nm { font-size: 11.5px; text-align: center; margin-top: 6px; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot .cnt { position: absolute; top: 5px; right: 7px; font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.slot .sn { position: absolute; top: 5px; left: 7px; font-size: 10.5px; color: var(--faint); }
.slot .dur { position: absolute; left: 8px; right: 8px; bottom: 5px; height: 3px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.slot .dur i { display: block; height: 100%; background: var(--success); }
.item-icon { width: 28px; height: 28px; border-radius: 7px; background: var(--sunken); display: grid; place-items: center; flex: none; overflow: hidden; font-size: 11px; font-weight: 600; color: var(--muted); }
.item-icon img { width: 80%; height: 80%; object-fit: contain; }

/* ------------------------------------------------------------ log listesi */

.log-row td { vertical-align: top; }
.log-level { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; }
.log-level.l0 { color: var(--muted); }
.log-level.l1 { color: var(--info); }
.log-level.l2 { color: var(--warning); }
.log-level.l3 { color: var(--danger); }
.log-msg { max-width: 640px; overflow-wrap: anywhere; }
.log-detail { background: var(--sunken); border-radius: 10px; padding: 12px; margin-top: 8px; }
.json { font-family: var(--mono); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; color: var(--text-2); max-height: 420px; overflow: auto; }
.json .k { color: var(--accent-text); }
.json .s { color: #b7d7a8; }
.json .n { color: #e9c79a; }
.json .b { color: #c9b3f0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.filters .input, .filters .select { width: auto; min-width: 160px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 28px; padding: 0 11px; border-radius: 99px; border: 1px solid var(--border-strong); background: transparent; color: var(--muted); font: 500 12.5px var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { color: var(--text); border-color: var(--accent-line); }
.chip.on { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-line); }

.timeline { display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 92px 18px minmax(0, 1fr); gap: 10px; padding: 8px 0; }
.tl-item .t { font-size: 12px; color: var(--faint); text-align: right; padding-top: 2px; }
.tl-item .m { position: relative; }
.tl-item .m::before { content: ''; position: absolute; left: 8px; top: 0; bottom: -16px; width: 1px; background: var(--border-strong); }
.tl-item:last-child .m::before { display: none; }
.tl-item .m i { position: absolute; left: 4px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--surface); }
.tl-item .m i.l1 { background: var(--info); }
.tl-item .m i.l2 { background: var(--warning); }
.tl-item .m i.l3 { background: var(--danger); }

/* ------------------------------------------------------------ grafikler */

.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid-line { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .base-line { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--series-1-wash); }
.chart .bar { fill: var(--series-1); }
.chart .bar.hover, .chart .bar:hover { fill: var(--accent-strong); }
.chart .cross { stroke: var(--text-2); stroke-width: 1; opacity: 0.5; }
.chart .marker { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }
.chart .end-label { fill: var(--text); font-size: 12px; font-weight: 600; }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 5; transform: translate(-50%, calc(-100% - 10px));
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 8px; padding: 7px 10px; box-shadow: var(--shadow);
  font-size: 12px; white-space: nowrap;
}
.chart-tip b { display: block; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.chart-tip .k { display: inline-block; width: 12px; height: 2px; background: var(--series-1); vertical-align: middle; margin-right: 6px; }
.chart-tip span { color: var(--muted); }
.hbars { display: flex; flex-direction: column; gap: 8px; }
.hbar { display: grid; grid-template-columns: 130px minmax(0, 1fr) 64px; gap: 10px; align-items: center; font-size: 13px; }
.hbar .track { height: 10px; position: relative; }
.hbar .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--series-1); border-radius: 0 4px 4px 0; min-width: 2px; }
.hbar:hover .fill { background: var(--accent-strong); }
.hbar .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }

/* ------------------------------------------------------------ kod düzenleyici / dosyalar */

.files-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; min-height: 640px; }
@media (max-width: 1100px) { .files-layout { grid-template-columns: 1fr; } }
.tree { max-height: 72vh; overflow: auto; padding: 6px; font-size: 13px; }
.tree-item { display: flex; align-items: center; gap: 7px; padding: 5px 8px; border-radius: 7px; cursor: pointer; color: var(--text-2); white-space: nowrap; }
.tree-item:hover { background: var(--hover); }
.tree-item.active { background: var(--accent-soft); color: var(--accent-text); }
.tree-item.disabled { color: var(--faint); cursor: default; }
.tree-item svg { flex: none; color: var(--muted); }
.editor-shell { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--sunken); }
.editor-shell .cm-editor { height: 66vh; font-size: 13px; }
.editor-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--surface); font-size: 12.5px; flex-wrap: wrap; }
.diff { font-family: var(--mono); font-size: 12px; max-height: 60vh; overflow: auto; background: var(--sunken); border-radius: 10px; padding: 8px 0; }
.diff div { padding: 0 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.diff .add { background: rgba(134, 203, 168, 0.12); color: #b9e2cd; }
.diff .del { background: rgba(238, 143, 131, 0.12); color: #f5b8b0; }
.diff .gap { color: var(--faint); }

.console { background: #0c0a09; border: 1px solid var(--border); border-radius: 10px; font-family: var(--mono); font-size: 12.5px; padding: 12px; height: 60vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; color: #d9d1c9; }
.console .cmd { color: var(--accent-text); }
.console .err { color: var(--danger); }

/* ------------------------------------------------------------ giriş ekranı */

.login-body { display: grid; place-items: center; min-height: 100vh; padding: 16px;
  background: radial-gradient(900px 500px at 20% 10%, rgba(242, 160, 107, 0.10), transparent 60%), radial-gradient(700px 400px at 90% 90%, rgba(173, 96, 52, 0.12), transparent 60%), var(--bg); }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 18px; padding: 32px 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; text-align: center; align-items: center; }
.login-logo { width: 64px; height: 64px; border-radius: 16px; background: #000; }
.login-card .btn { width: 100%; height: 44px; font-size: 15px; }
.discord-btn { background: #5865F2; color: #fff; }
.discord-btn:hover { background: #6b76f4; color: #fff; }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--surface-3); border-top-color: var(--accent); animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-screen { min-height: 60vh; display: grid; place-items: center; }

.kbd { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 5px; background: var(--surface-3); color: var(--text-2); }
.divider { height: 1px; background: var(--border); margin: 4px 0; }
.pill-list { display: flex; flex-wrap: wrap; gap: 6px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 16px; }
.perm-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.perm-group { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; background: var(--sunken); border: 1px solid var(--border); border-radius: 10px; }
.perm-group-head { padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.perm-group .check.small { font-size: 13px; align-items: flex-start; line-height: 1.35; color: var(--text-2); }
.perm-group .check input { margin-top: 1px; flex: none; }
.check input:disabled { opacity: 0.55; cursor: default; }
.tree-card .card-body { padding: 0; }
.role-head { display: grid; grid-template-columns: minmax(180px, 1fr) 220px 150px 140px auto; gap: 12px; align-items: end; }
@media (max-width: 900px) { .role-head { grid-template-columns: 1fr 1fr; } }
/* dar ekran: menü üstte, düğmeyle açılır */
.nav-toggle, .nav-dot { display: none; }
@media (max-width: 900px) {
  .brand { padding-bottom: 4px; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .nav-dot { display: inline-block; margin-left: auto; }
  .nav-dot + .nav-toggle { margin-left: 8px; }
  .sidebar { padding: 10px 12px; }
  .sidebar:not(.open) .nav, .sidebar:not(.open) .sidebar-foot { display: none; }
  .topbar { flex-wrap: wrap; gap: 8px; }
  .topbar .search { max-width: none; flex-basis: 100%; order: 3; }
  .user-chip .who { display: none; }
}
.seg { max-width: 100%; overflow-x: auto; }
.seg button { white-space: nowrap; }

/* ilerleme çubuğu ve kademe noktaları (oyuncu sayfası: beceriler, itibar) */
.meter { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.meter.success > i { background: var(--success); }
.meter.warning > i { background: var(--warning); }
.rank-pips { display: inline-flex; gap: 3px; vertical-align: middle; }
.rank-pips i { width: 14px; height: 6px; border-radius: 3px; background: var(--surface-3); }
.rank-pips i.on { background: var(--accent); }
.big-number { font-size: 40px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.pos { color: var(--success); }
.neg { color: var(--danger); }
