:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1e222b;
  --line: #2a2f3a;
  --text: #e9eaee;
  --muted: #9097a6;
  --gold: #e8b04b;
  --gold-ink: #1b1406;
  --green: #3fb27f;
  --red: #e5534b;
  --blue: #5b9cf5;
  --radius: 12px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { width: 100%; max-width: 960px; margin: 0 auto; padding: 24px 16px 48px; flex: 1; }
h1 { font-size: 1.6rem; margin: 0 0 16px; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
h3 { font-size: 1.05rem; margin: 0 0 4px; }
p { margin: 0 0 10px; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--panel-2); padding: 2px 6px; border-radius: 6px; user-select: all; }

/* Üst menü */
.nav { max-width: 960px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
#header { border-bottom: 1px solid var(--line); background: rgba(15, 17, 21, 0.92); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(6px); }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--text); letter-spacing: -0.02em; }
.brand span { color: var(--gold); }
.brand:hover { text-decoration: none; }
.nav-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nav-right a { color: var(--text); }
.nav-right a.muted { color: var(--muted); }

/* Düğmeler */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--gold); color: var(--gold-ink); border: 0; border-radius: 10px; padding: 10px 18px; font-weight: 700; font-size: 0.95rem; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:disabled { opacity: 0.55; cursor: wait; }
.btn.small { padding: 7px 12px; font-size: 0.85rem; }
.btn.big { padding: 14px 24px; font-size: 1.05rem; width: 100%; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: var(--red); color: #fff; }
.btn.whatsapp { background: #25d366; color: #062b14; }
.link { background: none; border: 0; color: var(--gold); cursor: pointer; font: inherit; padding: 0; }

/* Kartlar ve formlar */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.card.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; position: relative; }
.field > span { font-weight: 600; font-size: 0.9rem; }
input, select { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; min-width: 0; }
input:focus, select:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: transparent; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; font-size: 0.9rem; color: var(--muted); }
.check input { margin-top: 4px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row input { flex: 1; }

/* Item önerileri */
.suggest { list-style: none; margin: 0; padding: 0; border-radius: 10px; overflow: hidden; }
.suggest:not(:empty) { border: 1px solid var(--line); }
.suggest li button { width: 100%; text-align: left; background: var(--panel-2); color: var(--text); border: 0; border-bottom: 1px solid var(--line); padding: 9px 12px; cursor: pointer; font: inherit; }
.suggest li button:hover { background: #262b36; }
.suggest li.muted { padding: 9px 12px; }

/* Rozetler */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.badge.open, .badge.active, .badge.started { background: rgba(91, 156, 245, 0.15); color: var(--blue); }
.badge.item_held, .badge.pending { background: rgba(232, 176, 75, 0.15); color: var(--gold); }
.badge.sold, .badge.paid, .badge.completed { background: rgba(63, 178, 127, 0.15); color: var(--green); }
.badge.cancelled, .badge.suspended, .badge.passive, .badge.closed { background: rgba(229, 83, 75, 0.12); color: var(--red); }
.badge.big { font-size: 0.95rem; padding: 6px 14px; margin-bottom: 16px; }

/* Teklif tablosu */
table.offers { width: 100%; border-collapse: collapse; margin-top: 12px; }
table.offers th { text-align: left; color: var(--muted); font-weight: 600; font-size: 0.8rem; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.offers td { padding: 10px 8px; border-bottom: 1px solid var(--line); }
table.offers td.amount { font-weight: 800; font-size: 1.05rem; }
table.offers tr.best td.amount { color: var(--gold); }
.offer-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.offer-row.focus { background: rgba(232, 176, 75, 0.08); border-radius: 10px; padding: 12px; }
.offer-row input { width: 140px; flex: none; }
.trade-box { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-top: 12px; background: var(--panel-2); }
.trade-box form { margin-top: 10px; }
.nick { font-size: 1.6rem; font-weight: 800; color: var(--gold); letter-spacing: 0.02em; user-select: all; }
.timeline { margin: 0; padding-left: 20px; }
.timeline li { margin-bottom: 6px; }
.timeline li small { margin-left: 8px; }
.plain { list-style: none; padding: 0; margin: 8px 0 0; }
.plain li { padding: 6px 0; border-bottom: 1px solid var(--line); }
details summary { cursor: pointer; color: var(--muted); margin-top: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { display: inline-flex; gap: 6px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 0.85rem; cursor: pointer; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; border-radius: 10px; color: var(--muted); border: 1px solid var(--line); }
.tabs a.active { color: var(--gold-ink); background: var(--gold); border-color: var(--gold); font-weight: 700; }
.tabs a:hover { text-decoration: none; }

/* Ana sayfa */
.hero { padding: 48px 0 32px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.12; max-width: 720px; letter-spacing: -0.03em; }
.hero h1 em { font-style: normal; color: var(--gold); }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 620px; margin-bottom: 24px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step .num { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); font-weight: 800; align-items: center; justify-content: center; margin-bottom: 10px; }
.step p { color: var(--muted); margin: 0; }

.footer { border-top: 1px solid var(--line); padding: 18px 16px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; font-size: 0.8rem; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--panel-2); border: 1px solid var(--line); color: var(--text); padding: 12px 18px; border-radius: 10px; opacity: 0; pointer-events: none; transition: 0.2s; max-width: calc(100% - 32px); z-index: 10; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: var(--red); }
.toast.ok { border-color: var(--green); }

@media (max-width: 560px) {
  .offer-row input { width: 100%; flex: 1; }
  .nav-right { gap: 10px; font-size: 0.9rem; }
}

/* Yasal metinler */
.legal { max-width: 760px; margin: 0 auto; }
.legal section { margin-top: 20px; }
.legal p, .legal li { color: #c9ccd4; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }

/* Erişim kayıtları */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.table-wrap { overflow-x: auto; margin-top: 8px; }
table.logs { font-size: 0.82rem; min-width: 760px; }
table.logs td { padding: 6px 8px; vertical-align: top; }
table.logs td.ua { max-width: 220px; color: var(--muted); word-break: break-word; }
table.logs td.mono-cell { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.log-result { margin-top: 18px; }

/* Onay penceresi */
.confirm-dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; width: min(440px, calc(100% - 32px)); }
.confirm-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.confirm-dialog p { margin-bottom: 14px; line-height: 1.5; }
.confirm-dialog input { width: 100%; margin-bottom: 14px; }
.dialog-actions { justify-content: flex-end; }
