:root {
  --bg: #f6f7f9; --surface: #ffffff; --surface-2: #f0f2f5; --text: #17202a; --muted: #5f6b7a;
  --line: #dfe3e8; --accent: #1f6feb; --accent-ink: #ffffff; --ok: #1a7f37; --ok-bg: #e3f5e8;
  --warn: #9a6700; --warn-bg: #fff4d6; --bad: #c62828; --bad-bg: #fde7e7; --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1419; --surface: #171d24; --surface-2: #1f2730; --text: #e6edf3; --muted: #97a3b0;
    --line: #2b3440; --accent: #4c8dff; --accent-ink: #0b1220; --ok: #56d364; --ok-bg: #12291a;
    --warn: #e3b341; --warn-bg: #2d2410; --bad: #ff7b72; --bad-bg: #331616;
    --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.35rem; margin: .2rem 0 .8rem; line-height: 1.3; }
h2 { font-size: 1.05rem; margin: 0 0 .7rem; }
h3 { font-size: .95rem; margin: 1rem 0 .5rem; }
code { font: 13px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; background: var(--surface-2);
  padding: 2px 6px; border-radius: 6px; word-break: break-all; }
code.copy { cursor: copy; }
code.copied { outline: 2px solid var(--ok); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; color: var(--text); white-space: nowrap; }
.brand-mark { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; }
.nav a { color: var(--text); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); margin-left: 4px; vertical-align: 2px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 16px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 16px; }

.flash { padding: 10px 14px; border-radius: var(--radius); margin: 0 0 14px; background: var(--surface-2); border: 1px solid var(--line); }
.flash.ok { background: var(--ok-bg); border-color: transparent; color: var(--ok); }
.flash.warn { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
.flash.err { background: var(--bad-bg); border-color: transparent; color: var(--bad); }
.flash.small { font-size: 13px; padding: 6px 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }

.btn { appearance: none; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  padding: 9px 16px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; display: inline-block; }
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.linkbtn { appearance: none; background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0 4px; }
.nav .linkbtn { color: var(--muted); }
form.inline { display: inline; margin: 0; }

input[type=text], input[type=password], input[type=number], input[type=url], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 11px; margin-top: 4px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
textarea { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.form { display: grid; gap: 12px; max-width: 560px; }
.form label { display: block; }
.form.row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; max-width: none; }
.form.row label { flex: 1 1 160px; }
.form.row label.check { flex: 0 0 auto; }
label.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
label.check input { width: 18px; height: 18px; margin: 0; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; display: grid; gap: 6px; margin: 0; }
legend { padding: 0 6px; color: var(--muted); font-size: 13px; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.inline-form input, .inline-form select { width: auto; margin: 0; padding: 5px 8px; }
.inline-form .num { width: 80px; }
.inline-form .cc { width: 64px; text-transform: uppercase; }

.add { display: flex; gap: 8px; margin-bottom: 6px; }
.add input { margin: 0; flex: 1; min-width: 0; }
.add .btn { flex: 0 0 auto; }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 20px; margin-top: 12px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 12px; }
.card { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; color: var(--text); box-shadow: var(--shadow); min-width: 0; }
.card:hover { border-color: var(--accent); text-decoration: none; }
.card.paused { opacity: .6; }
.thumb { flex: 0 0 72px; height: 72px; border-radius: 8px; background: #fff; display: flex; align-items: center;
  justify-content: center; overflow: hidden; border: 1px solid var(--line); }
.thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.thumb.big { flex-basis: 140px; height: 140px; }
.info { min-width: 0; flex: 1; }
.title { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price { font-size: 1.15rem; font-weight: 700; margin: 2px 0; }
.price.big { font-size: 1.6rem; }
.meta { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.badge { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }

.head { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.head-info { min-width: 0; flex: 1; }
.head h1 { margin-top: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.actions form { margin: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.panel > :last-child { margin-bottom: 0; }

.chart { width: 100%; height: auto; display: block; }
.ch-line { stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.ch-dot { fill: var(--accent); }
.ch-grid { stroke: var(--line); stroke-dasharray: 4 4; }
.ch-lab { fill: var(--muted); font-size: 12px; }

.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: 12px; color: var(--muted); font-weight: 600; }
.tbl tr.dim td { opacity: .55; }
.scroll { overflow-x: auto; }
.tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: 8px; color: var(--text); background: var(--surface); border: 1px solid var(--line); }
.tabs a.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.steps { padding-left: 1.2rem; }
.steps li { margin-bottom: 4px; }
.auth { max-width: 380px; margin: 8vh auto 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.auth .form { max-width: none; }

@media (max-width: 600px) {
  .wrap { padding: 12px; }
  .add { flex-direction: column; }
  .cards { grid-template-columns: 1fr; }
  .head { flex-direction: column; }
  .thumb.big { flex-basis: auto; width: 100%; height: 200px; }
  .top { padding: 8px 12px; }
  .nav { gap: 2px 12px; font-size: 14px; }
}
.inline-form .zip { width: 110px; }

/* Bildirimler (0.7.0) */
.nbadge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: var(--bad);
  color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; vertical-align: 1px; }
.nbadge[hidden] { display: none; }
.notif-bar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px; }
.notif-bar .actions { margin-top: 0; }
.notifs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.notif { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.notif.unread { border-left-color: var(--accent); background: var(--surface-2); }
.notif.k-price_down, .notif.k-stock_in, .notif.k-target { border-left-color: var(--ok); }
.notif.k-price_up, .notif.k-stock_out, .notif.k-unreadable, .notif.k-gone, .notif.k-admin { border-left-color: var(--warn); }
.notif-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.notif-body { white-space: pre-line; margin-top: 4px; font-size: 14px; overflow-wrap: anywhere; }
.notif-links { display: flex; gap: 14px; margin-top: 6px; }

/* Fiyat karşılaştırma (0.8.0) — seri renkleri (grafik çizgisi, nokta, gösterge) */
.ch-s0 { stroke: #1f6feb; fill: #1f6feb; color: #1f6feb; } .ch-s1 { stroke: #d1242f; fill: #d1242f; color: #d1242f; }
.ch-s2 { stroke: #1a7f37; fill: #1a7f37; color: #1a7f37; } .ch-s3 { stroke: #9a6700; fill: #9a6700; color: #9a6700; }
.ch-s4 { stroke: #8250df; fill: #8250df; color: #8250df; } .ch-s5 { stroke: #0f7b8a; fill: #0f7b8a; color: #0f7b8a; }
.ch-s6 { stroke: #bf3989; fill: #bf3989; color: #bf3989; } .ch-s7 { stroke: #57606a; fill: #57606a; color: #57606a; }
path.ch-line[class*="ch-s"] { fill: none; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; margin-top: 6px; }
.legend span::before { content: "●"; margin-right: 4px; }
.best { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.best .price.big { margin: 0; }
tr.cheapest td { background: var(--ok-bg); }
tr.dim td { opacity: .6; }
.num { text-align: right; white-space: nowrap; }
