/* Lukarix Bot paneli. Discord'un koyu arayuzunden esinlenen tek tema.
   Kose kurali: buton/girdi 4px, kart/acilir panel 8px, sunucu ikonlari daire (aktifken 16px). */
:root {
  --bg-rail: #1e1f22;
  --bg-side: #2b2d31;
  --bg-main: #313338;
  --bg-input: #1e1f22;
  --bg-float: #111214;
  --bg-hover: rgba(78, 80, 88, .3);
  --bg-active: rgba(78, 80, 88, .6);
  --line: #3f4147;
  --line-soft: rgba(255, 255, 255, .06);
  --text: #dbdee1;
  --text-strong: #f2f3f5;
  --muted: #949ba4;
  --faint: #80848e;
  --accent: #5865f2;
  --accent-hover: #4752c4;
  --accent-soft: rgba(88, 101, 242, .3);
  --success: #23a55a;
  --success-hover: #1a8346;
  --danger: #f23f43;
  --warning: #f0b232;
  --r-ctl: 4px;
  --r-card: 8px;
  --font: "gg sans", "Noto Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Consolas", "Cascadia Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg-main);
  color: var(--text);
  font: 15px/1.375 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: #00a8fc; text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
h1, h2, h3 { color: var(--text-strong); margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #00a8fc; outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 2px 16px;
  border: 0; border-radius: var(--r-ctl);
  font-size: 14px; font-weight: 600; white-space: nowrap;
  color: #fff; background: var(--accent); cursor: pointer;
  transition: background-color .17s ease, transform .1s ease;
  text-decoration: none !important;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn i { font-size: 18px; }
.btn-primary { background: var(--accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-success { background: var(--success); }
.btn-success:hover:not(:disabled) { background: var(--success-hover); }
.btn-secondary { background: #4e5058; }
.btn-secondary:hover:not(:disabled) { background: #6d6f78; }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: var(--bg-hover); }
.btn-link { background: transparent; color: var(--text); padding: 2px 12px; }
.btn-link:hover { text-decoration: underline !important; }
.btn-lg { min-height: 48px; padding: 2px 24px; font-size: 16px; }
.btn-lg i { font-size: 22px; }
.btn.is-loading { pointer-events: none; opacity: .8; }
.btn.is-loading::after {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px;
  border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--muted); cursor: pointer;
  font-size: 20px;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text-strong); }

.alert { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-ctl); margin: 0; font-size: 14px; }
.alert i { font-size: 18px; flex: none; margin-top: 1px; }
.alert-error { background: rgba(242, 63, 67, .12); color: #fa777c; box-shadow: inset 0 0 0 1px rgba(242, 63, 67, .4); }
.alert-warn { background: rgba(240, 178, 50, .1); color: #f5c76b; box-shadow: inset 0 0 0 1px rgba(240, 178, 50, .35); }

.brand-mark { width: 32px; height: 32px; border-radius: 10px; }

/* ---------- Giris sayfasi ---------- */
.page-login { background: var(--bg-rail); min-height: 100dvh; }
.login {
  min-height: 100dvh; max-width: 1240px; margin: 0 auto; padding: 48px 32px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: center;
}
.login-copy { display: grid; gap: 24px; justify-items: start; max-width: 480px; }
.login-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text-strong); font-weight: 700; font-size: 17px; }
.login-brand .brand-mark { width: 40px; height: 40px; border-radius: 12px; }
.login-copy h1 { font-size: clamp(2.25rem, 4.2vw, 3.5rem); line-height: 1.05; letter-spacing: -.03em; font-weight: 800; }
.login-sub { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.5; max-width: 40ch; }
.login-note { margin: 0; display: flex; gap: 8px; align-items: center; color: var(--faint); font-size: 13px; }
.login-note i { font-size: 16px; color: var(--success); }
.login-visual { position: relative; }
.login-visual::before {
  content: ""; position: absolute; inset: 10% -4% -6% 8%; z-index: 0; border-radius: 24px;
  background: radial-gradient(60% 60% at 70% 40%, rgba(255, 92, 116, .22), transparent 70%),
              radial-gradient(50% 50% at 20% 80%, rgba(88, 101, 242, .18), transparent 70%);
  filter: blur(20px);
}
.dc-window {
  position: relative; z-index: 1; background: var(--bg-main); border-radius: 12px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 30px 80px rgba(0, 0, 0, .55);
}
.dc-window-bar { display: flex; align-items: center; gap: 6px; height: 48px; padding: 0 16px; border-bottom: 1px solid #26272b; font-weight: 600; color: var(--text-strong); }
.dc-window-bar i { color: var(--faint); font-size: 22px; }
.dc-window .dc-msg { padding: 20px 16px 24px; }

@media (prefers-reduced-motion: no-preference) {
  .login-copy > * { animation: rise .7s var(--ease) both; }
  .login-copy > *:nth-child(2) { animation-delay: .06s; }
  .login-copy > *:nth-child(3) { animation-delay: .12s; }
  .login-copy > *:nth-child(n+4) { animation-delay: .18s; }
  .dc-window { animation: rise .9s .15s var(--ease) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; gap: 40px; padding: 32px 16px; align-content: start; }
}

/* ---------- Discord mesaj bileseni (giris + onizleme) ---------- */
.dc-msg { display: flex; gap: 16px; }
.dc-msg-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.dc-msg-body { min-width: 0; flex: 1; }
.dc-msg-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dc-msg-name { color: var(--text-strong); font-weight: 600; }
.dc-tag { background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 3px; line-height: 15px; }
.dc-msg-time { color: var(--faint); font-size: 12px; }
.dc-msg-text { margin-top: 2px; word-wrap: break-word; white-space: pre-wrap; }
.dc-mention { background: var(--accent-soft); color: #c9cdfb; border-radius: 3px; padding: 0 2px; font-weight: 500; }
.dc-msg-text code { font-family: var(--mono); font-size: 85%; background: #2b2d31; border-radius: 3px; padding: 0 3px; }
.dc-embed {
  margin-top: 8px; max-width: 520px; background: #2b2d31; border-radius: 4px; padding: 12px 16px 16px 12px;
  border-left: 4px solid var(--embed, var(--accent));
}
.dc-embed-brand { --embed: #ff5c74; }
.dc-embed-desc { font-size: 14px; white-space: pre-wrap; word-wrap: break-word; }
.dc-embed img { border-radius: 4px; margin-top: 12px; width: 100%; height: auto; aspect-ratio: 8 / 3; object-fit: cover; background: #1e1f22; }
.dc-embed-desc + img { margin-top: 12px; }
.dc-msg-text + .dc-embed { margin-top: 6px; }
.dc-window .dc-embed img { margin-top: 0; }

/* ---------- Ust bar + sunucu secimi ---------- */
.page-servers { min-height: 100dvh; background: var(--bg-main); }
.topbar {
  position: sticky; top: 0; z-index: 10; height: 64px; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(30, 31, 34, .92); backdrop-filter: blur(10px); border-bottom: 1px solid #1a1b1e;
}
.topbar-brand { display: flex; align-items: center; gap: 10px; color: var(--text-strong); font-weight: 700; }
.topbar-brand:hover { text-decoration: none; }
.topbar-user { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text-strong); }
.topbar-user img { border-radius: 50%; }
.topbar-user form { margin: 0; }
.servers { max-width: 1120px; margin: 0 auto; padding: 40px 24px 64px; }
.servers-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.servers-head h1 { font-size: 28px; letter-spacing: -.02em; }
.server-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.server-card { background: var(--bg-side); border-radius: var(--r-card); overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.server-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0, 0, 0, .35); }
.server-card-banner { height: 72px; background: linear-gradient(135deg, #3b3f73, #2b2d31); position: relative; overflow: hidden; }
.server-card-banner img { position: absolute; inset: -40%; width: 180%; height: 180%; max-width: none; object-fit: cover; filter: blur(28px) saturate(1.4); opacity: .7; }
.server-card.is-missing .server-card-banner { background: #232428; }
.server-card.is-missing .server-card-banner img { opacity: .25; filter: blur(28px) grayscale(1); }
.server-card-body { display: flex; align-items: center; gap: 12px; padding: 0 16px 16px; margin-top: -24px; position: relative; }
.server-card-text { flex: 1; min-width: 0; padding-top: 28px; display: grid; }
.server-card-text strong { color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.server-card-text span { font-size: 13px; color: var(--muted); }
.server-card .btn { margin-top: 28px; }
.empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 64px 16px; color: var(--muted); }
.empty > i { font-size: 48px; color: var(--faint); margin-bottom: 8px; }
.empty h2 { font-size: 20px; }
.empty p { margin: 0; max-width: 46ch; }
.empty .btn { margin-top: 12px; }

/* ---------- Sunucu ikonlari ---------- */
.guild-icon {
  width: 48px; height: 48px; border-radius: 50%; flex: none; overflow: hidden;
  display: grid; place-items: center; background: var(--bg-main); color: var(--text-strong);
  font-weight: 600; font-size: 18px; transition: border-radius .2s var(--ease), background-color .2s;
}
.guild-icon img { width: 100%; height: 100%; object-fit: cover; }
.guild-icon-lg { width: 64px; height: 64px; font-size: 24px; border: 5px solid var(--bg-side); box-sizing: content-box; }

/* ---------- Panel iskeleti ---------- */
.page-panel { overflow: hidden; }
.app { display: grid; grid-template-columns: 72px 240px minmax(0, 1fr); height: 100dvh; }
.rail { background: var(--bg-rail); padding: 12px 0; display: flex; flex-direction: column; align-items: center; gap: 8px; overflow-y: auto; scrollbar-width: none; }
.rail-item { position: relative; display: block; }
.rail-item:hover { text-decoration: none; }
.rail-item::before {
  content: ""; position: absolute; left: -12px; top: 50%; width: 4px; height: 0; border-radius: 0 4px 4px 0;
  background: var(--text-strong); transform: translateY(-50%); transition: height .2s var(--ease);
}
.rail-item:hover::before { height: 20px; }
.rail-item.is-active::before { height: 40px; }
.rail-item:hover .guild-icon, .rail-item.is-active .guild-icon { border-radius: 16px; }
.rail-item.is-active .guild-icon { box-shadow: 0 0 0 0 transparent; }
.rail-home .brand-mark { width: 48px; height: 48px; border-radius: 16px; }
.rail-sep { width: 32px; height: 2px; background: #35363c; border-radius: 1px; flex: none; }
.rail-add { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-main); color: var(--success); font-size: 22px; transition: border-radius .2s var(--ease), background-color .2s, color .2s; }
.rail-add:hover { border-radius: 16px; background: var(--success); color: #fff; }

.side { background: var(--bg-side); display: flex; flex-direction: column; min-height: 0; }
.side-head { height: 48px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #1f2023; box-shadow: 0 1px 0 rgba(4, 4, 5, .2); }
.side-head strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-strong); }
.side-close { display: none; }
.side-scroll { flex: 1; overflow-y: auto; padding: 8px; }
.side-group { margin: 16px 8px 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); }
.side-group:first-child { margin-top: 8px; }
.side-link {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--r-ctl);
  color: var(--muted); font-weight: 500; margin-bottom: 2px;
}
.side-link i { font-size: 20px; }
.side-link:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.side-link.is-active { background: var(--bg-active); color: var(--text-strong); }
.side-link.is-disabled { opacity: .55; cursor: default; }
.side-link.is-disabled:hover { background: transparent; color: var(--muted); }
.soon { margin-left: auto; font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 1px 6px; border-radius: 3px; background: #3f4147; color: var(--text); }
.side-user { display: flex; align-items: center; gap: 8px; padding: 8px; background: #232428; }
.side-user img { border-radius: 50%; }
.side-user div { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
.side-user strong { font-size: 14px; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user span { font-size: 12px; color: var(--muted); }
.side-user form { margin: 0; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.main-bar { height: 48px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 16px; border-bottom: 1px solid #26272b; box-shadow: 0 1px 0 rgba(4, 4, 5, .15); }
.main-bar h1 { font-size: 16px; }
.main-bar-icon { font-size: 22px; color: var(--faint); }
.main-bar-divider { width: 1px; height: 24px; background: var(--line); margin: 0 8px; }
.main-bar-sub { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-btn { display: none; }
/* Bot durumu: nokta burada gercek bir durumu gosterir */
.bot-pill {
  margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px;
  border-radius: 12px; background: #2b2d31; font-size: 13px; font-weight: 600; color: var(--text);
}
.bot-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.bot-pill.is-online::before { background: var(--success); }
.bot-pill.is-offline::before { background: var(--danger); }
.bot-pill.is-warn::before { background: var(--warning); }
.bot-banner { margin: 0 0 8px; }
.test-result { margin-top: 12px; }
.alert-ok { background: rgba(35, 165, 90, .12); color: #5fd38d; box-shadow: inset 0 0 0 1px rgba(35, 165, 90, .4); }
.main-scroll { flex: 1; overflow-y: auto; padding: 32px 40px 120px; }

/* ---------- Ayar sayfasi ---------- */
.view-grid { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 40px; max-width: 1180px; align-items: start; }
.view-intro { margin-bottom: 8px; }
.view-intro h2 { font-size: 20px; margin-bottom: 4px; }
.view-intro p { margin: 0; color: var(--muted); font-size: 14px; }
.setting { padding: 24px 0; border-bottom: 1px solid var(--line-soft); }
.setting:last-child { border-bottom: 0; }
.setting-label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); margin-bottom: 8px; }
.setting-help { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.field-error { margin: 8px 0 0; font-size: 14px; color: #fa777c; display: flex; gap: 6px; align-items: center; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.toggle-row h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.toggle-row p { margin: 0; color: var(--muted); font-size: 14px; }

/* Discord tarzi anahtar */
.switch { position: relative; flex: none; width: 40px; height: 24px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch-track { position: absolute; inset: 0; border-radius: 14px; background: #80848e; transition: background-color .2s ease; }
.switch-track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  transition: transform .2s var(--ease);
}
.switch input:checked + .switch-track { background: var(--success); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 2px solid #00a8fc; outline-offset: 2px; }

/* Kanal secici */
.picker { position: relative; }
.picker-btn {
  width: 100%; min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: var(--bg-input); border: 1px solid transparent; border-radius: var(--r-ctl); cursor: pointer; text-align: left; color: var(--text-strong);
}
.picker-btn:hover { border-color: #000; }
.picker-btn[aria-expanded="true"] { border-color: var(--accent); }
.picker-btn .ph-hash, .picker-btn .ph-megaphone-simple { font-size: 20px; color: var(--faint); }
.picker-btn .placeholder { color: var(--faint); }
.picker-btn .caret { margin-left: auto; color: var(--muted); transition: transform .2s var(--ease); }
.picker-btn[aria-expanded="true"] .caret { transform: rotate(180deg); }
.picker.has-error .picker-btn { border-color: var(--danger); }
.picker-pop {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--bg-side); border-radius: var(--r-card); box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 16px 40px rgba(0,0,0,.5);
  overflow: hidden; display: flex; flex-direction: column; max-height: 380px;
}
@media (prefers-reduced-motion: no-preference) { .picker-pop { animation: pop .18s var(--ease); } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.picker-search { padding: 8px; border-bottom: 1px solid #1f2023; }
.picker-search label { position: relative; display: block; }
.picker-search i { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.picker-search input {
  width: 100%; height: 34px; padding: 0 32px 0 10px; background: var(--bg-input); border: 0; border-radius: var(--r-ctl);
  color: var(--text-strong); font: inherit; font-size: 14px;
}
.picker-search input::placeholder { color: var(--faint); }
.picker-list { overflow-y: auto; padding: 4px 8px 8px; }
.cat {
  display: flex; align-items: center; gap: 2px; width: 100%; padding: 14px 4px 4px; border: 0; background: none; cursor: pointer;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); text-align: left;
}
.cat:hover { color: var(--text); }
.cat i { font-size: 12px; transition: transform .15s ease; }
.cat.is-collapsed i { transform: rotate(-90deg); }
.chan {
  display: flex; align-items: center; gap: 6px; width: 100%; padding: 6px 8px; margin: 1px 0;
  border: 0; border-radius: var(--r-ctl); background: none; color: var(--muted); font-weight: 500; text-align: left; cursor: pointer;
}
.chan > i:first-child { font-size: 20px; color: var(--faint); flex: none; }
.chan span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chan:hover:not(:disabled) { background: var(--bg-hover); color: var(--text); }
.chan.is-selected { background: var(--bg-active); color: var(--text-strong); }
.chan.is-selected .ph-check { color: var(--success); }
.chan:disabled { cursor: not-allowed; opacity: .55; }
.chan-warn { font-size: 11px; font-weight: 600; color: var(--warning); display: inline-flex; gap: 4px; align-items: center; flex: none; }
.picker-empty { padding: 24px 12px; text-align: center; color: var(--muted); font-size: 14px; }

/* Mesaj */
.textarea {
  width: 100%; min-height: 120px; resize: vertical; padding: 12px; background: var(--bg-input); color: var(--text-strong);
  border: 1px solid transparent; border-radius: var(--r-ctl); font: inherit; line-height: 1.45;
}
.textarea:focus { outline: none; border-color: var(--accent); }
.textarea.has-error { border-color: var(--danger); }
.msg-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 0; border-radius: var(--r-ctl); background: #3f4147; color: var(--text); font-family: var(--mono); font-size: 12px;
  padding: 4px 8px; cursor: pointer; transition: background-color .15s;
}
.chip:hover { background: #4e5058; color: var(--text-strong); }
.counter { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.counter.is-over { color: var(--danger); }

/* Temalar */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.theme {
  position: relative; display: grid; gap: 8px; padding: 6px 6px 10px; border-radius: var(--r-card); cursor: pointer;
  background: var(--bg-side); box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .15s, background-color .15s;
}
.theme:hover { background: #35373c; }
.theme input { position: absolute; opacity: 0; pointer-events: none; }
.theme img { border-radius: 4px; aspect-ratio: 8 / 3; width: 100%; object-fit: cover; background: #1e1f22; }
.theme span { display: flex; align-items: center; gap: 6px; padding: 0 4px; font-size: 14px; font-weight: 600; color: var(--text); }
.theme span i { margin-left: auto; color: var(--accent); font-size: 18px; opacity: 0; transition: opacity .15s; }
.theme:has(input:checked) { box-shadow: inset 0 0 0 2px var(--accent); }
.theme:has(input:checked) span i { opacity: 1; }
.theme:has(input:focus-visible) { outline: 2px solid #00a8fc; outline-offset: 2px; }

.test-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.test-row p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; min-width: 200px; }

/* Onizleme */
.preview { position: sticky; top: 0; }
.preview-card { background: #2b2d31; border-radius: var(--r-card); overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,.2); }
.preview-head { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; background: var(--bg-main); border-bottom: 1px solid #26272b; font-weight: 600; color: var(--text-strong); font-size: 15px; }
.preview-head i { color: var(--faint); font-size: 20px; }
.preview-head small { margin-left: auto; color: var(--faint); font-weight: 500; font-size: 12px; }
.preview-body { background: var(--bg-main); padding: 16px 14px 20px; }
.preview-off { padding: 10px 14px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; background: #2b2d31; }
.preview-off i { font-size: 16px; color: var(--warning); }

/* Iskelet yukleme */
.skeleton-page { display: grid; gap: 16px; max-width: 720px; }
.sk { border-radius: var(--r-card); background: linear-gradient(90deg, #2b2d31 0%, #35373c 50%, #2b2d31 100%); background-size: 200% 100%; }
@media (prefers-reduced-motion: no-preference) { .sk { animation: shimmer 1.4s linear infinite; } }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-card { height: 96px; }
.sk-tall { height: 220px; }

/* Kaydedilmemis degisiklik cubugu */
.savebar {
  position: fixed; z-index: 40; left: calc(72px + 240px + 40px); right: 40px; bottom: 24px; max-width: 900px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 10px 10px 16px;
  background: var(--bg-float); border-radius: var(--r-card); box-shadow: 0 8px 24px rgba(0,0,0,.45); font-weight: 500; color: var(--text-strong);
}
.savebar-actions { display: flex; gap: 8px; }
@media (prefers-reduced-motion: no-preference) {
  .savebar { animation: slideup .3s var(--ease); }
  .savebar.is-shake { animation: shake .4s ease; background: var(--danger); }
}
.savebar.is-shake { background: var(--danger); }
@keyframes slideup { from { opacity: 0; transform: translateY(24px); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* Bildirimler */
.toasts { position: fixed; z-index: 50; top: 16px; right: 16px; display: grid; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: 360px; padding: 12px 14px;
  background: var(--bg-float); border-radius: var(--r-card); box-shadow: 0 8px 24px rgba(0,0,0,.45); font-size: 14px; color: var(--text-strong);
}
.toast i { font-size: 20px; flex: none; }
.toast-ok i { color: var(--success); }
.toast-err i { color: var(--danger); }
@media (prefers-reduced-motion: no-preference) { .toast { animation: rise .3s var(--ease); } }

.scrim { display: none; }

/* ---------- Duyarli ---------- */
@media (max-width: 1280px) {
  .view-grid { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
  .preview { position: static; order: -1; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 72px minmax(0, 1fr); }
  .side {
    position: fixed; z-index: 60; left: 72px; top: 0; bottom: 0; width: 260px;
    transform: translateX(calc(-100% - 72px)); transition: transform .25s var(--ease);
  }
  .app.side-open .side { transform: none; }
  .app.side-open ~ .scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,.5); }
  .side-close, .menu-btn { display: inline-grid; }
  .main-bar-sub, .main-bar-divider { display: none; }
  .main-scroll { padding: 24px 16px 140px; }
  .savebar { left: 88px; right: 16px; bottom: 16px; }
}
@media (max-width: 560px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .side { left: 0; }
  .savebar { left: 16px; flex-direction: column; align-items: stretch; text-align: center; }
  .savebar-actions { justify-content: center; }
  .server-grid { grid-template-columns: 1fr; }
  .topbar { padding: 0 16px; }
  .topbar-user span { display: none; }
}
