/* ==================================================================
   ORBIT müşteri paneli — tasarım sistemi
   ================================================================== */
:root {
  --accent: #5865f2;
  --accent-2: #8b5cf6;
  --bg: #0b0d12;
  --bg-elev: #111419;
  --surface: #151922;
  --surface-2: #1b202b;
  --surface-3: #232937;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.13);
  --text: #eef0f4;
  --text-2: #b5bccb;
  --muted: #8890a0;
  --ok: #23a55a;
  --warn: #f0b232;
  --err: #f23f43;
  --info: #3fa9f5;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.55);
  --glow: 0 18px 50px -22px color-mix(in srgb, var(--accent) 70%, transparent);
  --side-w: 268px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Exo 2", "Inter", sans-serif;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f4f5f9;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --surface-2: #f3f4f8;
  --surface-3: #e8eaf1;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.16);
  --text: #111827;
  --text-2: #374151;
  --muted: #6b7280;
  --shadow: 0 10px 30px -14px rgba(15, 23, 42, 0.18);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body.app {
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(1000px 500px at 85% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    var(--bg);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
code { font-size: 0.85em; padding: 0.1rem 0.35rem; border-radius: 6px; background: var(--surface-3); color: var(--text-2); }
h1, h2, h3, h4 { font-family: var(--font-head); letter-spacing: -0.01em; margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Düzen ---------- */
.app-side {
  position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 40;
  display: flex; flex-direction: column; gap: 1rem; padding: 1.1rem 0.9rem;
  background: var(--bg-elev); border-right: 1px solid var(--border); overflow-y: auto;
}
.app-main { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; }
.app-content { padding: 1.5rem 1.75rem 3rem; width: 100%; max-width: 1320px; }
.app-brand { display: flex; align-items: center; gap: 0.6rem; padding: 0 0.4rem; color: var(--text); font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; text-decoration: none !important; }
.app-brand small { font-family: var(--font); font-weight: 600; font-size: 0.72rem; color: var(--muted); margin-left: 0.15rem; }
.app-brand-mark { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.app-brand-mark svg { width: 17px; height: 17px; }

.guild-switch { position: relative; }
.guild-current {
  width: 100%; display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); color: var(--text); cursor: pointer; text-align: left; font: inherit;
}
.guild-current:hover { border-color: var(--border-strong); }
.guild-current img, .guild-initial { width: 40px; height: 40px; border-radius: 12px; flex: none; }
.guild-initial { display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-family: var(--font-head); font-weight: 800; }
.guild-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.guild-meta strong { font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guild-meta small { color: var(--muted); font-size: 0.75rem; }
.guild-current > i { color: var(--muted); font-size: 0.75rem; }

.app-nav { display: flex; flex-direction: column; gap: 2px; }
.app-nav a {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.58rem 0.75rem; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 500; text-decoration: none; transition: background 140ms, color 140ms;
}
.app-nav a i { width: 18px; text-align: center; color: var(--muted); transition: color 140ms; }
.app-nav a:hover { background: var(--surface-2); color: var(--text); }
.app-nav a.is-active { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--text); }
.app-nav a.is-active i { color: var(--accent); }
/* Menü grupları (açılır-kapanır) */
.nav-group summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 0.75rem; padding: 0.58rem 0.75rem; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 500; user-select: none; transition: background 140ms, color 140ms;
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary > i:first-child { width: 18px; text-align: center; color: var(--muted); }
.nav-group summary:hover { background: var(--surface-2); color: var(--text); }
.nav-group summary.has-active { color: var(--text); }
.nav-group summary.has-active > i:first-child { color: var(--accent); }
.nav-group summary small { font-size: 0.68rem; font-weight: 600; padding: 0.05rem 0.4rem; border-radius: 999px; background: var(--surface-3); color: var(--muted); }
.nav-caret { margin-left: auto; font-size: 0.7rem; color: var(--muted); transition: transform 160ms; }
.nav-group[open] .nav-caret { transform: rotate(180deg); }
.nav-group.is-off summary { opacity: 0.55; }
.nav-sub { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 1.45rem; padding-left: 0.7rem; border-left: 1px solid var(--border); }
.app-nav .nav-sub a { padding: 0.42rem 0.65rem; font-size: 0.9rem; color: var(--muted); }
.app-nav .nav-sub a:hover { color: var(--text); }
.app-nav .nav-sub a.is-active { color: var(--text); font-weight: 600; background: color-mix(in srgb, var(--accent) 14%, transparent); }
/* Sayfa içi alt sekmeler (bir grubun sayfaları arasında) */
.page-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: -0.25rem 0 1.1rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--border); }
.page-tabs a { padding: 0.42rem 0.8rem; border-radius: 999px; font-size: 0.88rem; font-weight: 500; color: var(--muted); text-decoration: none; }
.page-tabs a:hover { color: var(--text); background: var(--surface-2); }
.page-tabs a.is-active { color: var(--text); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.app-side-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding: 0.4rem; font-size: 0.8rem; }
.app-side-foot a { color: var(--muted); }

.app-top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 1rem;
  padding: 0.85rem 1.75rem; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
}
.app-top-title { flex: 1; min-width: 0; }
.app-top-title h1 { font-size: 1.25rem; font-weight: 700; }
.app-top-title p { margin: 0.1rem 0 0; color: var(--muted); font-size: 0.85rem; }
.app-top-actions { display: flex; align-items: center; gap: 0.5rem; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; }
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.user-chip { position: relative; }
.user-chip > button { display: flex; align-items: center; gap: 0.55rem; padding: 0.25rem 0.6rem 0.25rem 0.25rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.user-chip img { width: 30px; height: 30px; border-radius: 50%; }
.user-chip i { font-size: 0.7rem; color: var(--muted); }
.support-banner { margin: 1rem 1.75rem 0; padding: 0.7rem 1rem; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--text); border: 1px solid color-mix(in srgb, var(--info) 35%, transparent); font-size: 0.9rem; }
.support-banner.is-warn { background: color-mix(in srgb, var(--warn) 14%, transparent); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.support-banner i { margin-right: 0.4rem; }

/* ---------- Açılır menü ---------- */
.dropdown-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50; display: none; flex-direction: column; padding: 0.35rem;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow); min-width: 220px;
}
.dropdown-right { left: auto; right: 0; }
[data-dropdown].is-open .dropdown-menu { display: flex; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.65rem; border-radius: 8px; color: var(--text-2); background: none; border: 0; font: inherit; cursor: pointer; text-align: left; text-decoration: none; width: 100%; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-2); color: var(--text); }
.dropdown-menu a.is-current { color: var(--text); font-weight: 600; }
.dropdown-menu .dot { width: 9px; height: 9px; border-radius: 50%; }
.dropdown-label { padding: 0.4rem 0.65rem; font-size: 0.78rem; color: var(--muted); }

/* ---------- Kartlar ve sayfa başlıkları ---------- */
.p-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.15rem 1.25rem; box-shadow: var(--shadow); }
.p-card + .p-card { margin-top: 1rem; }
.p-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.9rem; flex-wrap: wrap; }
.p-card-head h2 { font-size: 1.02rem; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; }
.p-card-head h2 i { color: var(--accent); }
.p-card-head p { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.85rem; }
.p-card.is-flush { padding: 0; overflow: hidden; }
.p-card.is-flush .p-card-head { padding: 1rem 1.25rem 0; }
.section-gap { margin-top: 1.25rem; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.grid-split { grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); }
.muted { color: var(--muted); }
.small { font-size: 0.82rem; }

/* Sunucu başlığı */
.guild-hero { display: flex; align-items: center; gap: 1.1rem; padding: 1.3rem 1.4rem; border-radius: calc(var(--radius) + 4px); border: 1px solid var(--border);
  background: radial-gradient(600px 220px at 0% 0%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%), var(--surface); box-shadow: var(--glow); }
.guild-hero img, .guild-hero .guild-initial { width: 68px; height: 68px; border-radius: 20px; font-size: 1.6rem; }
.guild-hero h2 { font-size: 1.5rem; font-weight: 800; }
.guild-hero .hero-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin-top: 0.35rem; color: var(--muted); font-size: 0.86rem; }
.guild-hero .hero-meta span { display: inline-flex; align-items: center; gap: 0.4rem; }
.guild-hero .hero-actions { margin-left: auto; display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* İstatistik kartları */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.stat { position: relative; padding: 1rem 1.1rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.stat .stat-label { display: flex; align-items: center; gap: 0.45rem; color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.stat .stat-label i { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--tone, var(--accent)) 16%, transparent); color: var(--tone, var(--accent)); font-size: 0.8rem; }
.stat .stat-value { font-family: var(--font-head); font-size: 1.7rem; font-weight: 800; margin-top: 0.4rem; line-height: 1.1; }
.stat .stat-foot { color: var(--muted); font-size: 0.78rem; margin-top: 0.2rem; }
.stat.tone-ok { --tone: var(--ok); } .stat.tone-warn { --tone: var(--warn); } .stat.tone-err { --tone: var(--err); } .stat.tone-info { --tone: var(--info); }

/* Mini çubuk grafik */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 110px; padding-top: 0.5rem; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .bar span { width: 100%; max-width: 26px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 45%, transparent)); min-height: 3px; }
.bars .bar small { font-size: 0.68rem; color: var(--muted); }

/* ---------- Butonlar ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; padding: 0.55rem 0.95rem; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font: inherit; font-weight: 600; font-size: 0.88rem; cursor: pointer; text-decoration: none !important; transition: transform 120ms, filter 120ms, background 120ms; white-space: nowrap; }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, var(--accent-2))); border-color: transparent; color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { filter: brightness(1.08); background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, var(--accent-2))); }
.btn-danger { background: color-mix(in srgb, var(--err) 14%, transparent); border-color: color-mix(in srgb, var(--err) 40%, transparent); color: #ff8a8d; }
.btn-danger:hover { background: color-mix(in srgb, var(--err) 22%, transparent); }
.btn-ok { background: color-mix(in srgb, var(--ok) 14%, transparent); border-color: color-mix(in srgb, var(--ok) 40%, transparent); color: #5fd38e; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { padding: 0.35rem 0.65rem; font-size: 0.8rem; border-radius: 8px; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.inline-form { display: inline; }

/* ---------- Rozetler ---------- */
.pill { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.18rem 0.6rem; border-radius: 999px; font-size: 0.74rem; font-weight: 700; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.pill-ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: #5fd38e; }
.pill-warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: #f5c55e; }
.pill-err { background: color-mix(in srgb, var(--err) 16%, transparent); color: #ff8a8d; }
.pill-info { background: color-mix(in srgb, var(--info) 16%, transparent); color: #7cc4fa; }
.pill-brand { background: color-mix(in srgb, var(--accent) 18%, transparent); color: color-mix(in srgb, var(--accent) 70%, #fff); }
[data-theme="light"] .pill-ok { color: #157a41; } [data-theme="light"] .pill-warn { color: #9a6a06; } [data-theme="light"] .pill-err { color: #b42326; } [data-theme="light"] .pill-info { color: #1767a6; } [data-theme="light"] .pill-brand { color: var(--accent); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.role-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.role-chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.15rem 0.55rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 0.78rem; font-weight: 600; color: var(--text-2); }
.chip-list { display: flex; flex-wrap: wrap; gap: 0.35rem; }

/* ---------- Tablolar ---------- */
.table-wrap { overflow-x: auto; }
.p-table { width: 100%; border-collapse: collapse; }
.p-table th { text-align: left; font-size: 0.74rem; font-weight: 700; color: var(--muted); padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.p-table td { padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.p-table tbody tr:last-child td { border-bottom: 0; }
.p-table tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.p-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-user { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.cell-user img { width: 32px; height: 32px; border-radius: 50%; flex: none; }
.cell-user div { display: flex; flex-direction: column; min-width: 0; }
.cell-user small { color: var(--muted); font-size: 0.75rem; }

/* ---------- Formlar ---------- */
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label, .field-label { font-size: 0.8rem; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 0.76rem; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; padding: 0.6rem 0.75rem; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--bg-elev);
  color: var(--text); font: inherit; transition: border-color 120ms, box-shadow 120ms;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.textarea { min-height: 110px; resize: vertical; }
.input-color { padding: 0.25rem; height: 42px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.9rem; }
.form-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1rem; flex-wrap: wrap; }
.search { position: relative; }
.search i { position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 2.2rem; }

/* Anahtar (switch) */
.switch { position: relative; display: inline-flex; align-items: center; gap: 0.55rem; cursor: pointer; font-weight: 600; font-size: 0.85rem; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 40px; height: 22px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border-strong); position: relative; transition: background 150ms; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 150ms; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.switch input:checked + .track { background: var(--ok); border-color: transparent; }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Üç durumlu izin seçici (izin ver / devral / engelle) */
.tri { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 9px; overflow: hidden; }
.tri label { cursor: pointer; }
.tri input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tri span { display: grid; place-items: center; width: 34px; height: 28px; color: var(--muted); font-size: 0.8rem; }
.tri input:checked + span.t-deny { background: color-mix(in srgb, var(--err) 25%, transparent); color: #ff8a8d; }
.tri input:checked + span.t-inherit { background: var(--surface-3); color: var(--text); }
.tri input:checked + span.t-allow { background: color-mix(in srgb, var(--ok) 25%, transparent); color: #5fd38e; }
.tri input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Çoklu seçim çipleri (panel.js select[multiple].chip-select'i dönüştürür) */
.chip-select-ui { position: relative; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg-elev); padding: 0.35rem; display: flex; flex-wrap: wrap; gap: 0.3rem; min-height: 42px; align-items: center; }
.chip-select-ui:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.chip-select-ui .chip { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.3rem 0.2rem 0.55rem; border-radius: 999px; background: var(--surface-3); font-size: 0.78rem; font-weight: 600; }
.chip-select-ui .chip button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 0.2rem; font-size: 0.85rem; line-height: 1; }
.chip-select-ui .chip button:hover { color: var(--err); }
.chip-select-ui input { flex: 1; min-width: 120px; border: 0; background: none; color: var(--text); font: inherit; padding: 0.25rem 0.3rem; outline: none; }
.chip-select-ui .chip-options { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20; max-height: 220px; overflow-y: auto; display: none; flex-direction: column; padding: 0.3rem; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--shadow); }
.chip-select-ui.is-open .chip-options { display: flex; }
.chip-select-ui .chip-options button { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.55rem; border: 0; border-radius: 7px; background: none; color: var(--text-2); font: inherit; text-align: left; cursor: pointer; }
.chip-select-ui .chip-options button:hover, .chip-select-ui .chip-options button.is-focus { background: var(--surface-2); color: var(--text); }
.chip-select-ui .chip-empty { padding: 0.45rem 0.55rem; color: var(--muted); font-size: 0.82rem; }

/* ---------- Sekmeler ---------- */
.tabs { display: flex; gap: 0.25rem; padding: 0.25rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); width: fit-content; max-width: 100%; overflow-x: auto; margin-bottom: 1rem; }
.tabs a, .tabs button { padding: 0.45rem 0.9rem; border-radius: 9px; color: var(--text-2); font-weight: 600; font-size: 0.86rem; text-decoration: none; border: 0; background: none; cursor: pointer; white-space: nowrap; font-family: inherit; }
.tabs a.is-active, .tabs button.is-active { background: var(--surface-3); color: var(--text); }

/* ---------- Liste/öğe satırları ---------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 0; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item .li-main { flex: 1; min-width: 0; }
.list-item .li-main strong { display: block; font-size: 0.9rem; }
.list-item .li-main small { color: var(--muted); font-size: 0.78rem; }
.li-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--tone, var(--accent)) 15%, transparent); color: var(--tone, var(--accent)); flex: none; }
.empty { text-align: center; padding: 2.2rem 1rem; color: var(--muted); }
.empty i { font-size: 1.8rem; color: var(--border-strong); margin-bottom: 0.6rem; display: block; }
.empty strong { display: block; color: var(--text); margin-bottom: 0.25rem; }

/* Bot kartları */
.bot-card { display: flex; flex-direction: column; gap: 0.9rem; }
.bot-head { display: flex; align-items: center; gap: 0.85rem; }
.bot-head img { width: 52px; height: 52px; border-radius: 16px; }
.bot-head .status-dot { position: relative; }
.bot-head .status-dot::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--surface); background: var(--muted); }
.bot-head .status-dot.is-ok::after { background: var(--ok); } .bot-head .status-dot.is-warn::after { background: var(--warn); } .bot-head .status-dot.is-err::after { background: var(--err); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; font-size: 0.86rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* Kanal ağacı */
.tree-cat { margin-top: 0.8rem; }
.tree-cat > .tree-title { display: flex; align-items: center; gap: 0.4rem; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); padding: 0.3rem 0.4rem; text-transform: uppercase; }
.tree-ch { display: flex; align-items: center; gap: 0.55rem; padding: 0.42rem 0.6rem; border-radius: 8px; color: var(--text-2); text-decoration: none !important; }
.tree-ch:hover { background: var(--surface-2); color: var(--text); }
.tree-ch.is-active { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--text); }
.tree-ch i { width: 16px; text-align: center; color: var(--muted); }

/* Kart önizleme (botun canvas kartının HTML benzeri) */
.card-preview { border-radius: 18px; background: #111318; color: #f2f3f5; border: 1px solid rgba(255, 255, 255, 0.06); padding: 18px 20px; font-family: var(--font-head); position: relative; overflow: hidden; }
.card-preview::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--tone-c, var(--accent)), transparent 85%); }
.card-preview::after { content: ""; position: absolute; width: 320px; height: 320px; left: -80px; top: -200px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--tone-c, var(--accent)) 26%, transparent), transparent 70%); pointer-events: none; }
.card-preview .cp-head { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.card-preview .cp-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--tone-c, var(--accent)) 18%, transparent); color: var(--tone-c, var(--accent)); }
.card-preview .cp-title { font-weight: 700; font-size: 1.1rem; }
.card-preview .cp-body { margin-top: 12px; color: #d4d7dd; font-weight: 400; white-space: pre-wrap; position: relative; z-index: 1; font-size: 0.95rem; }
.card-preview .cp-foot { margin-top: 14px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.06); color: #6b7280; font-size: 0.75rem; display: flex; justify-content: space-between; position: relative; z-index: 1; }

/* ---------- Toast ---------- */
.toast-stack { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 100; display: flex; flex-direction: column; gap: 0.6rem; max-width: min(420px, calc(100vw - 2rem)); }
.toast { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.85rem 1rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow); animation: toast-in 200ms ease-out; }
.toast i { margin-top: 0.15rem; }
.toast.is-ok i { color: var(--ok); } .toast.is-err i { color: var(--err); } .toast.is-wait i { color: var(--accent); }
.toast p { margin: 0; flex: 1; font-size: 0.88rem; }
.toast button { border: 0; background: none; color: var(--muted); cursor: pointer; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Diyalog ---------- */
dialog.p-dialog { border: 1px solid var(--border-strong); border-radius: 16px; background: var(--surface); color: var(--text); padding: 0; width: min(560px, calc(100vw - 2rem)); box-shadow: var(--shadow); }
dialog.p-dialog::backdrop { background: rgba(5, 7, 12, 0.6); backdrop-filter: blur(3px); }
.p-dialog .dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.p-dialog .dlg-head h2 { font-size: 1.05rem; }
.p-dialog .dlg-body { padding: 1.1rem 1.25rem; max-height: 70vh; overflow-y: auto; }
.p-dialog .dlg-foot { display: flex; justify-content: flex-end; gap: 0.5rem; padding: 0.9rem 1.25rem; border-top: 1px solid var(--border); }

/* İzin ızgarası */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.4rem 1rem; }
.perm-grid label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.86rem; cursor: pointer; padding: 0.3rem 0; }
.perm-grid input { accent-color: var(--accent); width: 16px; height: 16px; }
.perm-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.perm-row:last-child { border-bottom: 0; }

/* Giriş ve sunucu seçimi (yan menüsüz sayfalar) */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; }
.auth-box { width: min(460px, 100%); padding: 2rem; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--glow); text-align: center; }
.auth-box h1 { font-size: 1.6rem; font-weight: 800; margin-top: 1rem; }
.auth-box p { color: var(--muted); }
.btn-discord { background: #5865f2; color: #fff; border-color: transparent; width: 100%; padding: 0.8rem; font-size: 0.95rem; }
.btn-discord:hover { background: #4752c4; }
.select-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; width: min(980px, 100%); }
.select-card { display: flex; align-items: center; gap: 0.9rem; padding: 1rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none !important; transition: border-color 140ms, transform 140ms; }
.select-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.select-card .guild-initial { width: 48px; height: 48px; }

/* ---------- Mobil ---------- */
.only-mobile { display: none; }
.app-backdrop { display: none; }
@media (max-width: 1100px) {
  .grid-main, .grid-3, .grid-split { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app-side { transform: translateX(-100%); transition: transform 200ms ease; box-shadow: var(--shadow); }
  body.side-open .app-side { transform: none; }
  body.side-open .app-backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(5, 7, 12, 0.55); }
  .app-main { margin-left: 0; }
  .only-mobile { display: grid; }
  .app-top { padding: 0.7rem 1rem; }
  .app-content { padding: 1rem 1rem 3rem; }
  .support-banner { margin: 0.75rem 1rem 0; }
  .grid-2 { grid-template-columns: 1fr; }
  .guild-hero { flex-wrap: wrap; }
  .guild-hero .hero-actions { margin-left: 0; }
  .hide-mobile { display: none; }
}

/* İnce, temaya uyumlu kaydırma çubukları */
* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--border-strong); background-clip: padding-box; }

/* ---------- Kayıt modülü ---------- */
.alert { padding: 0.75rem 1rem; border-radius: var(--radius-sm); font-size: 0.9rem; border: 1px solid color-mix(in srgb, var(--info) 35%, transparent); background: color-mix(in srgb, var(--info) 12%, transparent); }
.alert i { margin-right: 0.4rem; }
.alert-warn { border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.choice-card { position: relative; display: flex; gap: 0.8rem; align-items: flex-start; padding: 0.9rem 1rem; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: border-color 150ms, background 150ms; }
.choice-card:hover { border-color: var(--border-strong); }
.choice-card input { margin-top: 0.2rem; accent-color: var(--accent); flex: none; }
.choice-card strong { display: block; font-size: 0.92rem; }
.choice-card small { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 0.2rem; line-height: 1.45; }
.choice-card:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.sticky-actions { position: sticky; bottom: 0; z-index: 5; margin-top: 1rem; padding: 0.8rem 0; background: linear-gradient(180deg, transparent, var(--bg) 35%); }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.bars.is-dual .bar span + span { background: linear-gradient(180deg, var(--err), color-mix(in srgb, var(--err) 40%, transparent)); }
.bars.is-dual .bar .pair { display: flex; gap: 2px; align-items: flex-end; width: 100%; max-width: 30px; height: 100%; justify-content: center; }
.bars.is-dual .bar .pair span { width: 50%; }
.legend { display: flex; gap: 1rem; font-size: 0.76rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 0.35rem; vertical-align: -1px; background: var(--accent); }
.legend i.is-err { background: var(--err); }
.rank-no { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--surface-3); font-weight: 800; font-size: 0.8rem; }
.rank-no.is-1 { background: color-mix(in srgb, #f5c55e 30%, transparent); color: #f5c55e; }
.rank-no.is-2 { background: color-mix(in srgb, #cbd5e1 25%, transparent); }
.rank-no.is-3 { background: color-mix(in srgb, #d97706 25%, transparent); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }

/* ---------- Kullanıcı adı + şifre girişi ---------- */
.auth-divider { display: flex; align-items: center; gap: 0.8rem; margin: 1.2rem 0 1rem; color: var(--muted); font-size: 0.8rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.secret-box { display: grid; gap: 0.4rem; padding: 0.9rem 1rem; border-radius: 12px; border: 1px dashed var(--border-strong); background: var(--surface-2, var(--surface)); }
.secret-box code { font-size: 1rem; user-select: all; }

/* ---------- Rol/kanal eşleştirme ---------- */
.res-pick { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0.5rem; }
.res-group { display: flex; align-items: center; gap: 0.5rem; margin: 1.1rem 0 0.7rem; font-size: 0.95rem; font-weight: 700; }
.res-group:first-of-type { margin-top: 0.2rem; }
.res-group i { color: var(--accent); }
.room-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.6rem; align-items: end; }
@media (max-width: 640px) { .res-pick { grid-template-columns: 1fr; } }

/* ---------- Guard ---------- */
.guard-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.2rem; padding: 1.1rem 1.25rem; border-radius: 18px; background: linear-gradient(120deg, color-mix(in srgb, var(--ok) 12%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 30%, var(--border)); }
.guard-hero h2 { font-size: 1.15rem; font-weight: 800; margin: 0; }
.guard-hero.is-panic { background: linear-gradient(120deg, color-mix(in srgb, var(--err) 18%, var(--surface)), var(--surface)); border-color: color-mix(in srgb, var(--err) 45%, var(--border)); }
.guard-shield { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.4rem; color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, transparent); flex: none; }
.guard-hero.is-panic .guard-shield { color: var(--err); background: color-mix(in srgb, var(--err) 16%, transparent); }

/* ---------- Yedek: seçmeli geri yükleme ---------- */
.pick-list { max-height: 340px; overflow: auto; border: 1px solid var(--border); border-radius: 12px; padding: 0.35rem; background: var(--surface-2, var(--surface)); }
.pick-item { display: flex; align-items: center; gap: 0.55rem; padding: 0.4rem 0.55rem; border-radius: 8px; cursor: pointer; font-size: 0.88rem; }
.pick-item:hover { background: var(--surface-3); }
.pick-item input { accent-color: var(--accent); }
.pick-item small { margin-left: auto; }
.pick-item i { color: var(--muted); width: 14px; text-align: center; }

/* ---------- Yardım (komut listesi) ---------- */
.help-points { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.55rem; color: var(--text-2); font-size: 0.92rem; }
.help-points strong { color: var(--text); }
.help-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; position: sticky; top: 0; z-index: 5; padding: 0.6rem 0; background: var(--bg); }
.help-search { position: relative; flex: 1 1 280px; max-width: 420px; }
.help-search i { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 0.85rem; }
.help-search .input { padding-left: 2.3rem; }
.help-jump { display: flex; flex-wrap: wrap; gap: 4px; }
.help-jump a { padding: 0.35rem 0.7rem; border-radius: 999px; font-size: 0.85rem; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); text-decoration: none; }
.help-jump a:hover { color: var(--text); border-color: var(--border-strong); }
.help-jump a span { color: var(--muted); margin-left: 0.2rem; }
.help-list { display: grid; }
.help-cmd { padding: 0.95rem 1.25rem; border-top: 1px solid var(--border); }
.help-cmd.is-off { opacity: 0.6; }
.help-cmd-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.help-usage { font-size: 0.92rem; padding: 0.25rem 0.55rem; color: var(--text); background: color-mix(in srgb, var(--accent) 14%, var(--surface-3)); }
.help-who { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.8rem; color: var(--muted); }
.help-cmd > p { margin: 0.45rem 0 0; color: var(--text-2); font-size: 0.9rem; }
.help-aliases { font-size: 0.82rem !important; color: var(--muted) !important; }
.help-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.5rem; margin-top: 0.7rem; }
.help-actions div { padding: 0.55rem 0.7rem; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); font-size: 0.85rem; }
.help-actions strong { display: block; }
.help-actions span { color: var(--muted); font-size: 0.8rem; }
