/* ==========================================================================
   GOLD ROAD — Web Paneli
   Koyu, sakin ve okunakli bir arayuz. Renk, boşluk ve yazi olcegi
   birkac degiskene baglidir; tema degistirmek icin :root yeterlidir.
   ========================================================================== */

:root {
  /* Yuzeyler — arkadan one dogru acilir */
  --bg: #0d0e12;
  --surface-1: #14161c;
  --surface-2: #1a1d25;
  --surface-3: #22262f;
  --border: #2a2f3a;
  --border-soft: #21252e;

  /* Metin */
  --text: #e8eaef;
  --text-dim: #9aa1ad;
  --text-faint: #6b7280;

  /* Vurgular */
  --accent: #6366f1;
  --accent-hover: #7c7ff3;
  --accent-soft: rgba(99, 102, 241, 0.12);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.12);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.12);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.12);

  /* Olcek */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --sidebar: 264px;

  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.5);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }

::selection { background: var(--accent-soft); color: var(--text); }

/* Kaydirma cubugu */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #333846; }

/* ==========================================================================
   Karsilama sayfasi
   ========================================================================== */

.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  display: grid;
  place-items: center;
  font-size: 18px;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.hero {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 60px 32px 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Arka plandaki yumusak isik */
.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.14), transparent 62%);
  pointer-events: none;
}

.hero-inner { position: relative; max-width: 780px; }

.hero h1 {
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin-bottom: 20px;
}

.hero h1 .gradient {
  background: linear-gradient(120deg, #818cf8, #c084fc 60%, #f0abfc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 18px;
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.stats-strip {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border-soft);
}

.stat { text-align: center; }
.stat-value {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 13px; color: var(--text-faint); margin-top: 2px; }

.features {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px 100px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.feature {
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: border-color 0.2s, transform 0.2s;
}
.feature:hover { border-color: var(--border); transform: translateY(-2px); }
.feature-icon { font-size: 26px; margin-bottom: 14px; display: block; }
.feature h3 { font-size: 16px; margin-bottom: 8px; letter-spacing: -0.01em; }
.feature p { font-size: 14px; color: var(--text-dim); }

.landing-footer {
  padding: 28px 32px;
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
  border-top: 1px solid var(--border-soft);
}

/* ==========================================================================
   Butonlar
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-3); border-color: #343a47; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-danger { background: var(--danger-soft); border-color: rgba(248, 113, 113, 0.3); color: var(--danger); }
.btn-danger:hover { background: rgba(248, 113, 113, 0.2); }

.btn-ghost { background: transparent; border-color: transparent; color: var(--text-dim); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ==========================================================================
   Panel duzeni
   ========================================================================== */

.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar);
  flex-shrink: 0;
  background: var(--surface-1);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-head {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border-soft);
}

.guild-switch {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  width: 100%;
  text-align: left;
  transition: border-color 0.15s;
}
.guild-switch:hover { border-color: var(--border); }

.guild-avatar {
  width: 34px; height: 34px;
  border-radius: 9px;
  flex-shrink: 0;
  background: var(--surface-3);
  object-fit: cover;
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px;
}

.guild-info { min-width: 0; flex: 1; }
.guild-name {
  font-weight: 600; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.guild-meta { font-size: 12px; color: var(--text-faint); }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 10px; }

.nav-group { margin-bottom: 18px; }
.nav-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-faint);
  padding: 0 10px 7px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 14px;
  width: 100%;
  text-align: left;
  transition: background 0.12s, color 0.12s;
  position: relative;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.nav-item.active::before {
  content: '';
  position: absolute; left: -10px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.nav-emoji { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-dot {
  margin-left: auto;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}
.nav-dot.off { background: var(--surface-3); }

.sidebar-foot {
  padding: 12px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar { width: 30px; height: 30px; border-radius: 50%; }
.user-name {
  font-size: 13px; font-weight: 600; flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---- Ana alan ---- */

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(13, 14, 18, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar h1 { font-size: 19px; letter-spacing: -0.02em; font-weight: 700; }
.topbar-sub { font-size: 13px; color: var(--text-dim); }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.menu-toggle { display: none; }

.content { padding: 26px 28px 80px; max-width: 940px; width: 100%; }

/* ==========================================================================
   Ayar kartlari
   ========================================================================== */

.page-intro {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  margin-bottom: 22px;
}
.page-intro-icon { font-size: 26px; line-height: 1; }
.page-intro h2 { font-size: 17px; margin-bottom: 3px; letter-spacing: -0.01em; }
.page-intro p { font-size: 14px; color: var(--text-dim); }

.setting {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 18px 20px;
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  margin-bottom: 10px;
  transition: border-color 0.15s;
}
.setting:hover { border-color: var(--border); }
.setting.saving { border-color: var(--accent); }
.setting.saved { border-color: var(--success); }
.setting.error { border-color: var(--danger); }

.setting-info { flex: 1; min-width: 0; }
.setting-label { font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 7px; }
.setting-desc { font-size: 13px; color: var(--text-dim); margin-top: 3px; }
.setting-error { font-size: 13px; color: var(--danger); margin-top: 6px; }

.setting-control { flex-shrink: 0; min-width: 220px; max-width: 340px; }
.setting.stacked { flex-direction: column; gap: 12px; }
.setting.stacked .setting-control { width: 100%; max-width: none; }

.section-note {
  padding: 16px 18px;
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  font-size: 13.5px;
  color: var(--text-dim);
  margin-top: 18px;
  white-space: pre-wrap;
}
.section-note code {
  background: var(--surface-3);
  padding: 2px 6px;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text);
}

/* ==========================================================================
   Form ogeleri
   ========================================================================== */

.input, .select, .textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea { resize: vertical; min-height: 88px; font-family: inherit; line-height: 1.5; }
.select { cursor: pointer; appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239aa1ad' d='M6 8.5L2 4.5h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}

.input-row { display: flex; gap: 8px; align-items: center; }
.input-row .input { flex: 1; }
.input-suffix { font-size: 13px; color: var(--text-faint); white-space: nowrap; }

/* Anahtar */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-track {
  position: absolute; inset: 0;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: background 0.2s, border-color 0.2s;
}
.switch-track::before {
  content: '';
  position: absolute;
  height: 18px; width: 18px;
  left: 3px; top: 3px;
  background: var(--text-dim);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
.switch input:checked + .switch-track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .switch-track::before { transform: translateX(20px); background: #fff; }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px var(--accent-soft); }

/* Etiket girisi (liste) */
.tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px;
  min-height: 42px;
}
.tags:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-3);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 13px;
}
.tag button { color: var(--text-faint); font-size: 15px; line-height: 1; padding: 0 1px; }
.tag button:hover { color: var(--danger); }
.tags input {
  flex: 1; min-width: 100px;
  background: none; border: none; outline: none;
  font-size: 14px; padding: 3px;
}

/* Coklu secim */
.picker { position: relative; }
.picker-button {
  width: 100%;
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  min-height: 42px;
  text-align: left;
  flex-wrap: wrap;
}
.picker-button:hover { border-color: #343a47; }
.picker.open .picker-button { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.picker-placeholder { color: var(--text-faint); font-size: 14px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--surface-3);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 13px;
  max-width: 100%;
}
.chip-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.picker-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  max-height: 300px;
  display: none;
  flex-direction: column;
}
.picker.open .picker-menu { display: flex; }

.picker-search {
  padding: 9px 11px;
  border: none; border-bottom: 1px solid var(--border-soft);
  background: none; outline: none;
  font-size: 14px;
}
.picker-list { overflow-y: auto; padding: 5px; }

.picker-option {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px;
  border-radius: 6px;
  font-size: 14px;
  width: 100%;
  text-align: left;
  color: var(--text-dim);
}
.picker-option:hover { background: var(--surface-3); color: var(--text); }
.picker-option.selected { color: var(--text); font-weight: 500; }
.picker-option.selected::after { content: '✓'; margin-left: auto; color: var(--accent); }
.picker-empty { padding: 16px; text-align: center; color: var(--text-faint); font-size: 13px; }

/* Renk secici */
.color-input { display: flex; gap: 8px; align-items: center; }
.color-swatch {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  flex-shrink: 0;
}
.color-swatch input { width: 200%; height: 200%; margin: -25%; border: none; cursor: pointer; padding: 0; }

/* ==========================================================================
   Ozel gorunumler
   ========================================================================== */

.grid-toggles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 8px;
}

.toggle-card {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 15px;
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}
.toggle-card:hover { border-color: var(--border); }
.toggle-card .switch { margin-left: auto; }
.toggle-card-icon { font-size: 17px; }
.toggle-card-label { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Kurulum profilleri */
.presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 18px; }
.preset {
  padding: 20px;
  background: var(--surface-1);
  border: 2px solid var(--border-soft);
  border-radius: var(--radius);
  text-align: left;
  transition: border-color 0.15s, transform 0.15s;
}
.preset:hover { border-color: var(--border); transform: translateY(-2px); }
.preset.selected { border-color: var(--accent); background: var(--accent-soft); }
.preset-emoji { font-size: 30px; display: block; margin-bottom: 10px; }
.preset h3 { font-size: 16px; margin-bottom: 5px; }
.preset p { font-size: 13px; color: var(--text-dim); margin-bottom: 12px; }
.preset ul { list-style: none; font-size: 12.5px; color: var(--text-faint); }
.preset li { padding-left: 15px; position: relative; margin-bottom: 4px; }
.preset li::before { content: '▸'; position: absolute; left: 0; color: var(--accent); }

/* Istatistik */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat-card {
  padding: 18px;
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}
.stat-card-value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-card-label { font-size: 12.5px; color: var(--text-faint); margin-top: 2px; }

.chart-box {
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}
.chart-box h3 { font-size: 14px; margin-bottom: 14px; color: var(--text-dim); font-weight: 600; }
canvas { width: 100%; display: block; }

.bar-list { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 11px; align-items: center; font-size: 13px; }
.bar-track { display: block; height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
/* Satir ici bir span'in yuksekligi olmaz; blok yapilmazsa dolgu gorunmez. */
.bar-fill {
  display: block;
  height: 100%;
  min-width: 3px;
  background: linear-gradient(90deg, var(--accent), #a855f7);
  border-radius: 4px;
  transition: width 0.4s ease;
}
.bar-name { color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-value { color: var(--text-faint); font-variant-numeric: tabular-nums; font-size: 12.5px; }

/* ==========================================================================
   Bildirimler ve durum
   ========================================================================== */

.toasts {
  position: fixed;
  bottom: 22px; right: 22px;
  display: flex; flex-direction: column-reverse; gap: 9px;
  z-index: 200;
  pointer-events: none;
}

.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  min-width: 250px;
  max-width: 380px;
  animation: toast-in 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  pointer-events: auto;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--accent); }
.toast.hiding { animation: toast-out 0.2s forwards; }

@keyframes toast-in { from { opacity: 0; transform: translateX(30px) scale(0.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px) scale(0.96); } }

.loader {
  display: grid;
  place-items: center;
  padding: 90px 20px;
  color: var(--text-faint);
  gap: 14px;
}
.spinner {
  width: 30px; height: 30px;
  border: 3px solid var(--surface-3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; padding: 70px 20px; color: var(--text-faint); }
.empty-icon { font-size: 40px; margin-bottom: 14px; display: block; opacity: 0.6; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
  display: grid; place-items: center;
  z-index: 150;
  padding: 20px;
  animation: fade-in 0.15s;
}
@keyframes fade-in { from { opacity: 0; } }

.modal {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  animation: modal-in 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
@keyframes modal-in { from { opacity: 0; transform: scale(0.95) translateY(10px); } }

.modal-head { padding: 22px 24px 0; }
.modal-head h2 { font-size: 19px; letter-spacing: -0.02em; }
.modal-body { padding: 14px 24px; color: var(--text-dim); font-size: 14px; }
.modal-foot { padding: 14px 24px 22px; display: flex; gap: 9px; justify-content: flex-end; }

/* Sunucu secim ekrani */
.guild-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.guild-card {
  display: flex; align-items: center; gap: 13px;
  padding: 17px;
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  transition: border-color 0.15s, transform 0.15s;
  text-align: left;
  width: 100%;
}
.guild-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.guild-card .guild-avatar { width: 46px; height: 46px; border-radius: 13px; font-size: 17px; }

.badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 5px;
  font-weight: 600;
  background: var(--surface-3);
  color: var(--text-dim);
}
.badge.ok { background: var(--success-soft); color: var(--success); }
.badge.warn { background: var(--warning-soft); color: var(--warning); }

/* ==========================================================================
   Duyarli tasarim
   ========================================================================== */

@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }

  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }

  .sidebar-backdrop {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99;
  }

  .content { padding: 18px 16px 70px; }
  .topbar { padding: 13px 16px; gap: 10px; }

  /* Dar ekranda uzun sayfa adi satira sigmayip duzeni bozmasin */
  .topbar > div { min-width: 0; flex: 1; }
  .topbar h1 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-actions { flex-shrink: 0; }

  .setting { flex-direction: column; gap: 12px; align-items: stretch; }
  .setting-control { max-width: none; min-width: 0; }
  .setting .switch { align-self: flex-start; }

  .landing-nav { padding: 16px 20px; }
  .hero { padding: 40px 20px 70px; }
  .stats-strip { gap: 26px; }
  .features { padding: 0 20px 70px; }

  .bar-row { grid-template-columns: 96px 1fr auto; }
}

@media (max-width: 480px) {
  .toasts { left: 14px; right: 14px; bottom: 14px; }
  .toast { min-width: 0; max-width: none; }
}

/* Hareket azaltma tercihi */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------------------
   Talep kategorileri duzenleyicisi
   --------------------------------------------------------------------------- */

.cat-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }

.cat-card {
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s;
}
.cat-card:hover { border-color: var(--border); }

.cat-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.cat-card input,
.cat-card select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 14px;
  color: inherit;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cat-card input:focus,
.cat-card select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.cat-emoji { width: 62px; text-align: center; flex-shrink: 0; }
.cat-label { flex: 1; min-width: 160px; font-weight: 600; }
.cat-desc  { flex: 1; min-width: 200px; }
.cat-roles { min-width: 180px; max-width: 260px; height: 38px; cursor: pointer; }

.cat-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.cat-actions .btn:disabled { opacity: 0.5; cursor: default; }

@media (max-width: 640px) {
  .cat-label, .cat-desc, .cat-roles { min-width: 100%; max-width: none; }
}

/* ---------------------------------------------------------------------------
   Basvuru formlari duzenleyicisi
   --------------------------------------------------------------------------- */

.app-status { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.app-status:empty { display: none; }

.app-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--warning-soft);
  border: 1px solid rgba(251, 191, 36, 0.3);
  font-size: 14px;
}
.app-alert > span { flex: 1; min-width: 200px; }

.app-form {
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s;
}
.app-form:hover { border-color: var(--border); }

/* Yalnizca isaretli alanlar: switch ve onay kutulari etkilenmez */
.app-field {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 14px;
  color: inherit;
  font-family: inherit;
  min-width: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.app-field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.app-emoji { width: 62px; text-align: center; flex-shrink: 0; }
.app-label { flex: 1; min-width: 180px; font-weight: 600; }
.app-desc  { flex: 1; min-width: 200px; }
.app-open  { display: inline-flex; align-items: center; gap: 8px; min-width: 92px; }

.app-caption { font-size: 12.5px; color: var(--text-dim); }
.app-hint { font-size: 12.5px; color: var(--text-faint); }
.app-hint.warn { color: var(--warning); }

.app-roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.app-panel-forms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px 14px;
  margin-bottom: 10px;
}
.app-panel-forms .creator-check:has(input:disabled) { color: var(--text-faint); cursor: default; }
.app-roles-item { display: flex; flex-direction: column; gap: 5px; min-width: 0; }

.app-questions { border-top: 1px solid var(--border-soft); padding-top: 10px; }
.app-questions > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  list-style: none;
  user-select: none;
}
.app-questions > summary::-webkit-details-marker { display: none; }
.app-questions > summary::before {
  content: '▸';
  color: var(--text-faint);
  transition: transform 0.15s;
}
.app-questions[open] > summary::before { transform: rotate(90deg); }

.app-q-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; align-items: flex-start; }

.app-q {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 10px;
  border-left: 2px solid var(--border);
}
.app-q:focus-within { border-left-color: var(--accent); }
.app-q-num { width: 22px; color: var(--text-faint); font-weight: 600; flex-shrink: 0; }
.app-q-text { flex: 1; min-width: 200px; }
.app-q-style { width: 130px; cursor: pointer; }
.app-q-place { flex: 1; min-width: 200px; margin-left: 30px; }
.app-q .app-hint { margin-left: 30px; }
.app-q-tools { display: flex; gap: 6px; margin-left: auto; }

@media (max-width: 760px) {
  .app-roles { grid-template-columns: 1fr; }
  .app-label, .app-desc { min-width: 100%; }
  .app-q-text { min-width: 0; flex: 1 1 calc(100% - 30px); }
  .app-q-style { width: 120px; }
  .app-q-place { min-width: 0; }
  .app-q-place, .app-q .app-hint { margin-left: 0; }
}

/* ---------------------------------------------------------------------------
   VTC kayit defteri
   --------------------------------------------------------------------------- */

.vtc-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.vtc-toolbar .input { flex: 1; min-width: 200px; }
.vtc-toolbar .select { width: auto; min-width: 180px; }

/* Genis tablo dar ekranda sayfayi degil yalnizca kendini kaydirir */
.vtc-table-wrap { overflow-x: auto; margin-top: 8px; }

.vtc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.vtc-table th {
  text-align: left;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-faint);
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.vtc-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
  white-space: nowrap;
}
.vtc-table tbody tr:hover { background: var(--surface-2); }
.vtc-table .num { text-align: right; }
.vtc-table .mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }
.vtc-table a { color: var(--accent-hover); }

.vtc-staff { cursor: pointer; }
.vtc-staff.active { background: var(--accent-soft); }
.vtc-staff.active td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

/* ---------------------------------------------------------------------------
   Yayin duyurulari
   --------------------------------------------------------------------------- */

.creator-add {
  background: var(--surface-1);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.creator-add .input { flex: 1; min-width: 150px; }

.creator-name { flex: 1; min-width: 200px; font-size: 15px; }

.creator-handle {
  color: var(--text-faint);
  font-size: 13px;
  margin-left: 6px;
}

.creator-live {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #ed4245;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  vertical-align: middle;
}

.creator-kinds { gap: 16px; }

.creator-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}
.creator-check input { cursor: pointer; }

/* ---------------------------------------------------------------------------
   Duyuru duzenleyicisi
   --------------------------------------------------------------------------- */

.ann-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: 22px;
  align-items: start;
}

.ann-form [hidden],
.ann-preview-wrap [hidden] { display: none !important; }

.ann-section {
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ann-section-title { font-weight: 700; font-size: 15px; }
.ann-section-desc { font-size: 13px; color: var(--text-faint); margin-top: -8px; }

.ann-field { display: flex; flex-direction: column; gap: 6px; }
.ann-field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ann-label { font-size: 13px; font-weight: 600; color: var(--text-dim); }

.ann-counter { font-size: 12px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.ann-counter.warn { color: var(--warning); }
.ann-counter.over { color: var(--danger); font-weight: 700; }

.ann-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ann-row > .input { flex: 1; min-width: 160px; }
.ann-row > .select { width: auto; min-width: 150px; }

.ann-embed-body { display: flex; flex-direction: column; gap: 12px; }

.ann-switch {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; cursor: pointer; user-select: none;
}

/* Etiketler */
.ann-mentions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }

.ann-chip-toggle {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.ann-chip-toggle:hover { border-color: var(--accent); color: var(--text); }
.ann-chip-toggle.active {
  background: rgba(88, 101, 242, 0.18);
  border-color: #5865f2;
  color: #c9cdfb;
}

.ann-role-picker { position: relative; flex: 1; min-width: 200px; }
.ann-role-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  max-height: 240px; overflow-y: auto;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 20;
  padding: 4px;
}
.ann-role-option {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: none; border: none; color: var(--text);
  padding: 7px 9px; border-radius: 6px; cursor: pointer; text-align: left; font-size: 14px;
}
.ann-role-option:hover { background: var(--surface-3); }
.ann-role-note { margin-left: auto; font-size: 11px; color: var(--warning); }
.ann-role-empty { padding: 10px; color: var(--text-faint); font-size: 13px; }
.ann-role-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.ann-selected-roles { display: flex; gap: 6px; flex-wrap: wrap; }
.ann-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 6px 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 13px;
}
.ann-chip-x {
  background: none; border: none; color: var(--text-faint);
  cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px;
}
.ann-chip-x:hover { color: var(--danger); }

/* Renk */
.ann-color { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ann-color-text { width: 110px !important; flex: none !important; font-family: ui-monospace, monospace; }
.ann-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.ann-preset {
  width: 24px; height: 24px; border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  cursor: pointer; padding: 0;
  transition: transform 0.12s;
}
.ann-preset:hover { transform: scale(1.15); }

/* Bicim cubugu */
.ann-toolbar {
  display: flex; gap: 4px; flex-wrap: wrap;
  padding: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.ann-toolbar + .textarea { border-top-left-radius: 0; border-top-right-radius: 0; }
.ann-tool {
  min-width: 32px; height: 28px; padding: 0 8px;
  background: var(--surface-3); border: 1px solid transparent;
  color: var(--text-dim); border-radius: 6px;
  font-weight: 700; font-size: 12px; cursor: pointer;
}
.ann-tool:hover { border-color: var(--accent); color: var(--text); }

/* Alan ve buton kartlari */
.ann-fields { display: flex; flex-direction: column; gap: 8px; }
.ann-field-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.ann-emoji-input { width: 60px !important; flex: none !important; min-width: 0 !important; text-align: center; }

/* Hatalar */
.ann-errors {
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}
.ann-error { color: var(--danger); font-size: 14px; }
.ann-warning { color: var(--warning); font-size: 14px; }

.ann-actions {
  display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap;
  position: sticky; bottom: 0;
  padding: 12px 0;
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.ann-actions .btn-primary { min-width: 140px; }

/* Onizleme */
/* Ustteki sabit sayfa basliginin (84px) altinda kalir */
.ann-preview-wrap { position: sticky; top: 100px; }
.ann-preview-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--text-faint); margin-bottom: 8px;
}

.ann-preview {
  background: #313338;
  border-radius: var(--radius);
  padding: 16px 16px 18px 12px;
  font-family: "gg sans", "Noto Sans", "Segoe UI", sans-serif;
  color: #dbdee1;
  font-size: 15px;
  line-height: 1.375;
  overflow: hidden;
  border: 1px solid #1e1f22;
}

.dc-message { display: flex; gap: 14px; }
.dc-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: #5865f2; display: grid; place-items: center; overflow: hidden; font-size: 20px;
}
.dc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dc-body { min-width: 0; flex: 1; }
.dc-head { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.dc-name { color: #f2f3f5; font-weight: 600; }
.dc-bot {
  background: #5865f2; color: #fff; font-size: 10px; font-weight: 700;
  padding: 1px 5px; border-radius: 4px; letter-spacing: 0.2px;
}
.dc-time { color: #949ba4; font-size: 12px; }
.dc-content { word-wrap: break-word; }
.dc-empty { color: #949ba4; font-style: italic; margin-top: 4px; }

.dc-embed {
  display: flex; gap: 16px;
  margin-top: 6px;
  max-width: 432px;
  background: #2b2d31;
  border-left: 4px solid #5865f2;
  border-radius: 4px;
  padding: 10px 16px 14px 12px;
}
.dc-embed-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.dc-author { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #f2f3f5; }
.dc-author img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.dc-title { font-weight: 700; color: #f2f3f5; font-size: 16px; }
.dc-desc { font-size: 14px; word-wrap: break-word; }
.dc-thumb { width: 80px; height: 80px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.dc-image { max-width: 100%; border-radius: 4px; margin-top: 8px; max-height: 300px; object-fit: cover; }
.dc-image.broken, .dc-thumb.broken { display: none; }

.dc-fields { display: flex; flex-wrap: wrap; gap: 8px 0; margin-top: 4px; }
.dc-field { flex: 1 1 100%; min-width: 0; padding-right: 12px; font-size: 14px; }
.dc-field.inline { flex: 1 1 30%; }
.dc-field-name { font-weight: 700; color: #f2f3f5; margin-bottom: 2px; }

.dc-footer { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #b5bac1; margin-top: 4px; }
.dc-footer-icon { width: 20px; height: 20px; border-radius: 50%; }

.dc-h1 { font-size: 22px; font-weight: 800; color: #f2f3f5; margin: 6px 0 2px; }
.dc-h2 { font-size: 19px; font-weight: 700; color: #f2f3f5; margin: 6px 0 2px; }
.dc-h3 { font-size: 16px; font-weight: 700; color: #f2f3f5; margin: 6px 0 2px; }
.dc-sub { font-size: 12px; color: #949ba4; }
.dc-quote { border-left: 4px solid #4e5058; padding-left: 10px; margin: 2px 0; }
.dc-li { padding-left: 16px; position: relative; }
.dc-li::before { content: "\2022"; position: absolute; left: 4px; }
.dc-code { background: #1e1f22; padding: 1px 4px; border-radius: 4px; font-size: 13px; font-family: ui-monospace, monospace; }
.dc-codeblock {
  background: #1e1f22; border: 1px solid #1a1b1e; border-radius: 4px;
  padding: 8px; margin: 4px 0; font-size: 13px; white-space: pre-wrap; font-family: ui-monospace, monospace;
}
.dc-spoiler { background: #1e1f22; color: transparent; border-radius: 3px; transition: color 0.15s; cursor: pointer; }
.dc-spoiler:hover { color: inherit; }
.dc-link { color: #00a8fc; text-decoration: none; }
.dc-link:hover { text-decoration: underline; }
.dc-mention {
  background: rgba(88, 101, 242, 0.3); color: #c9cdfb;
  border-radius: 3px; padding: 0 2px; font-weight: 500;
}

.dc-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.dc-button {
  display: inline-flex; align-items: center; gap: 4px;
  background: #4e5058; color: #fff;
  padding: 6px 14px; border-radius: 4px;
  font-size: 14px; font-weight: 500;
}
.dc-button.invalid { outline: 2px solid var(--danger); }
.dc-ext { font-size: 12px; opacity: 0.8; }

/* Gecmis */
.ann-history {
  margin-top: 24px;
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px;
}
.ann-history-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ann-history-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.ann-history-main { flex: 1; min-width: 0; }
.ann-history-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ann-history-meta { font-size: 12px; color: var(--text-faint); }

@media (max-width: 1100px) {
  .ann-grid { grid-template-columns: 1fr; }
  .ann-preview-wrap { position: static; order: -1; }
}
