/* Takip: Notion'dan is taslaklari (public/notion-isler.js). Taslak onaylanmadan is acilmaz; Notion'a bir sey yazilmaz.
   Kart "Senin adimlarin" kartiyla ayni yapida, Notion'un murekkep tonunda (notr gri), birincil eylem Hub mavisi. */
#trk-notion { --ink-soft: rgb(43 42 39 / .07); --ink-line: rgb(43 42 39 / .14); --warn-soft: rgb(226 166 50 / .12); --gut: 12px; }
.ntj-btn .ph { color: var(--text); }
.ntj-card { position: relative; border: 1px solid var(--ink-line); border-radius: 14px; overflow: hidden;
  background: linear-gradient(180deg, rgb(43 42 39 / .045), rgb(43 42 39 / 0) 120px), var(--panel);
  box-shadow: 0 1px 0 rgb(255 255 255 / .6) inset, 0 1px 2px rgb(30 30 25 / .04), 0 8px 24px -12px rgb(30 30 25 / .18); }

/* Baslik: simge | ad, aciklama, son tarama | tek grup: sayac ve "Hepsini onayla". */
.ntj-head { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; column-gap: 12px; align-items: start; padding: 16px 18px 14px; }
.ntj-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; color: #fff;
  background: linear-gradient(160deg, #3a3935, #1d1c1a); box-shadow: 0 1px 0 rgb(255 255 255 / .18) inset, 0 2px 6px -2px rgb(0 0 0 / .35); }
.ntj-ttl { min-width: 0; display: grid; gap: 3px; }
.ntj-head h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.005em; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.ntj-cin { display: none; }
.ntj-lead { margin: 0; font-size: 13px; color: var(--muted); text-wrap: pretty; }
.ntj-scan { margin: 2px 0 0; font-size: 12px; color: var(--faint); }
.ntj-hact { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; padding-left: 12px; }
.ntj-count { display: flex; align-items: baseline; gap: 6px; }
.ntj-count b { font: 600 24px/1 "Geist", sans-serif; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ntj-count span { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

.ntj-list { list-style: none; margin: 0; padding: 0 8px 8px; display: grid; }
.ntj-item { display: grid; row-gap: 10px; padding: 16px 10px; border-top: 1px solid var(--line); min-width: 0; }
.ntj-top { display: flex; align-items: baseline; gap: 6px 8px; flex-wrap: wrap; min-width: 0; }
.ntj-title { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--text); overflow-wrap: anywhere; margin-right: 2px; letter-spacing: -.005em; }
.ntj-chip { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 99px; font-size: 11px; font-weight: 500;
  color: var(--muted); background: var(--ink-soft); box-shadow: 0 0 0 1px var(--ink-line) inset; white-space: nowrap; }
.ntj-chip .ph { font-size: 12px; }

/* Brif etiketli satirlar: Gorev ozeti, Bitti sayilir, Belirsiz kalan. Hepsi ayni ic bosluktan (--gut) baslar; Belirsiz satiri ayni
   kenarda, yalniz zemini ve sol cizgisi farkli. */
.ntj-brief { margin: 0; display: grid; gap: 6px; font-size: 13px; line-height: 1.55; }
.ntj-l { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 3px 0 3px var(--gut); border-left: 2px solid transparent; border-radius: 0 8px 8px 0; }
.ntj-l dt { font-size: 12px; font-weight: 600; color: var(--muted); }
.ntj-l dd { margin: 0; color: var(--text); overflow-wrap: anywhere; text-wrap: pretty; min-width: 0; }
.ntj-l dd .clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ntj-l .ntj-more { display: inline-block; margin-top: 2px; }
.ntj-l.warn { border-left-color: color-mix(in srgb, var(--warn) 70%, transparent); }
.ntj-l.warn dt { color: var(--warn); }
.ntj-l.warn dd { color: var(--text); }
#trk-notion .lnk { all: unset; cursor: pointer; font-size: 12px; font-weight: 500; color: var(--accent); justify-self: start; }
#trk-notion .lnk:hover { text-decoration: underline; }
#trk-notion .lnk.dim { color: var(--muted); }
#trk-notion .lnk:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* Alt satir iki grup: solda proje kutusu, "Hub secsin" ve Notion linki; sagda eylemler. */
.ntj-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; margin-top: 2px; padding-left: var(--gut); }
.ntj-pgroup { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; min-width: 0; flex: 1 1 380px; }
.ntj-pcell { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 0 1 340px; }
.ntj-proj { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel); transition: border-color .16s var(--ease-out), box-shadow .16s var(--ease-out); }
.ntj-proj:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ntj-proj.auto { background: var(--ink-soft); border-style: dashed; }
.ntj-proj .ph { flex: none; font-size: 14px; color: var(--faint); }
.ntj-proj input { all: unset; flex: 1; min-width: 0; font: 12px/1 "Geist Mono", ui-monospace, monospace; color: var(--text); }
.ntj-proj input::placeholder { color: var(--faint); font-family: "Geist", sans-serif; }
.ntj-item.blocked .ntj-proj:not(.auto) { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.ntj-auto { all: unset; box-sizing: border-box; flex: none; display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 6px; border-radius: 8px;
  cursor: pointer; font-size: 12.5px; font-weight: 500; color: var(--muted); border: 1px solid transparent; white-space: nowrap;
  transition: background-color .16s var(--ease-out), color .16s var(--ease-out); }
.ntj-auto.sm { height: 24px; padding: 0 7px; font-size: 11.5px; background: var(--panel); }
.ntj-auto .ph { font-size: 14px; }
.ntj-auto { color: var(--text); font-size: 13px; }
.ntj-auto .ph-square { color: var(--muted); }
.ntj-auto[aria-pressed="true"] { color: var(--accent); }
.ntj-auto .ph-check-square { color: var(--accent); }
.ntj-auto:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ntj-link { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap;
  height: 30px; padding: 0 6px; border-radius: 8px; transition: background-color .16s var(--ease-out); }
.ntj-link .ph { font-size: 14px; }
.ntj-link.off { color: var(--faint); font-weight: 500; }
.ntj-link:not(.off):hover { background: var(--accent-soft); }
.ntj-acts { display: inline-flex; align-items: center; gap: 14px; flex: none; padding-left: 18px; border-left: 1px solid var(--line); }
/* Ikincil eylemler metin gibi: Simdilik gec, Vazgec. */
.ntj-txt { all: unset; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text); padding: 6px 4px; border-radius: 6px; }
.ntj-txt:hover { color: var(--text); text-decoration: underline; }
.ntj-txt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ntj-txt:disabled { opacity: .5; cursor: default; text-decoration: none; }
.ntj-acts .btn { height: 30px; }
/* Birincil onay: Hub mavisi. Kapaliyken acikca kapali: kesik cizgili, soluk yazi, kilit simgesi. */
#trk-notion .btn.ntj-ok { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; box-shadow: 0 1px 2px rgb(30 60 140 / .25); }
#trk-notion .btn.ntj-ok:hover:not(:disabled) { filter: brightness(1.08); }
#trk-notion .btn.ntj-ok:disabled { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--ink-soft) 6px 12px); border: 1px dashed color-mix(in srgb, var(--muted) 60%, transparent); color: var(--muted); box-shadow: none; opacity: 1; cursor: not-allowed; font-weight: 500; }
.ntj-why { display: flex; align-items: center; gap: 6px; margin: 0; padding-left: var(--gut); font-size: 12.5px; color: var(--warn); }
.ntj-why[hidden] { display: none; }
.ntj-why .ph { font-size: 14px; flex: none; }

/* Hepsini onayla: acilacak isler ve projeleri, atlananlar adiyla ve nasil duzelecegiyle; ikinci dokunusla acar. */
.ntj-confirm { margin: 0 18px 12px; padding: 8px 10px 8px 14px; border-radius: 10px; font-size: 13px; background: var(--ink-soft);
  display: grid; gap: 8px; }
.ntj-cbar { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; }
.ntj-csum { display: inline-flex; align-items: baseline; gap: 6px 10px; flex-wrap: wrap; min-width: 0; }
.ntj-confirm.open { background: var(--accent-soft); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent) inset; }
.ntj-confirm:not(.open) { box-shadow: 0 0 0 1px var(--ink-line) inset; }
#trk-notion .btn.ntj-all { background: var(--panel); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--accent); font-weight: 600; height: 30px; }
#trk-notion .btn.ntj-all:hover:not(:disabled) { background: var(--accent-soft); }
.ntj-cskip { color: var(--warn); }
/* Ornek veri etiketi (yalniz ornek sayfa; gercek veride yok). */
.ntj-sample { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 99px; font-size: 11px; font-weight: 600; letter-spacing: .02em;
  color: var(--warn); background: var(--warn-soft); box-shadow: 0 0 0 1px color-mix(in srgb, var(--warn) 35%, transparent) inset; }
.ntj-cskip::before { content: "·"; margin-right: 10px; color: var(--faint); }
.ntj-cbtns { display: inline-flex; align-items: center; gap: 12px; }
.ntj-cdet { display: grid; gap: 8px; padding-top: 6px; border-top: 1px solid color-mix(in srgb, var(--accent) 20%, transparent); }
/* Tarama surerken eldeki taslaklar eskimis sayilir: soluk, onay kapali (neden satiri yazar). */
.ntj-list.stale .ntj-item > :not(.ntj-why) { opacity: .55; }
.ntj-confirm ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ntj-confirm li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 4px 12px; min-width: 0; }
.ntj-confirm li > span:first-child { min-width: 0; color: var(--text); overflow-wrap: anywhere; }
.ntj-confirm code { justify-self: end; font: 11.5px/1.4 "Geist Mono", ui-monospace, monospace; color: var(--muted); padding: 1px 6px; border-radius: 6px; background: var(--panel); }
.ntj-skiph { color: var(--warn); }
.ntj-skips li { grid-template-columns: minmax(0, 1fr); }
.ntj-fixrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ntj-fix { font-size: 12px; color: var(--muted); }

.ntj-spin { animation: ntj-spin .8s linear infinite; }
@keyframes ntj-spin { to { transform: rotate(360deg); } }
.ntj-empty { display: flex; align-items: flex-start; gap: 10px; margin: 0 18px 16px; padding: 12px 14px; border-radius: 10px; font-size: 12.5px; line-height: 1.5;
  color: var(--muted); background: var(--ink-soft); border: 1px dashed var(--ink-line); text-wrap: pretty; }
.ntj-empty .ph { flex: none; font-size: 16px; margin-top: 1px; color: var(--faint); }
/* Durum satiri: tarama suruyor (mavi; oturumu ac, durdur) ya da son tarama okunamadi (kirmizi ton). */
.ntj-state { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin: 0 18px 12px; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.45; }
.ntj-state > span:not(.ntj-sacts) { flex: 1 1 220px; min-width: 0; text-wrap: pretty; }
.ntj-state > .ph { flex: none; font-size: 16px; }
.ntj-sacts { display: inline-flex; gap: 14px; }
.ntj-state.run { color: var(--text); background: var(--accent-soft); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent) inset; }
.ntj-state.run > .ph { color: var(--accent); }
.ntj-state.bad { color: var(--text); background: color-mix(in srgb, var(--bad) 9%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--bad) 30%, transparent) inset; }
.ntj-state.bad > .ph { color: var(--bad); }
.ntj-done { border-top: 1px solid var(--line); padding: 4px 8px 6px; }
.ntj-done-h { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; font-size: 12px; color: var(--muted); border-radius: 8px; }
.ntj-done-h:hover { color: var(--text); }
.ntj-done-h:focus-visible { outline: 2px solid var(--accent); }
.ntj-done-h .ph { font-size: 12px; transition: transform .16s var(--ease-out); }
.ntj-done-h[aria-expanded="true"] .ph { transform: rotate(90deg); }
.ntj-done ul { list-style: none; margin: 0; padding: 0 10px 6px; display: grid; gap: 4px; }
.ntj-done-i { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.ntj-done-i span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ntj-done-i .ph { flex: none; color: var(--faint); }
.ntj-done-i .ph.ok { color: var(--ok); }
/* Is panelinde Notion gorevi linki */
.is-ntlink { display: inline-flex; align-items: center; gap: 3px; color: var(--accent); text-decoration: none; }
.is-ntlink:hover { text-decoration: underline; }
/* Takip basligi: dar pencerede dugmeler yeni satira esit yukseklik ve araliklarla iner (Notion dugmesiyle uc dugme). */
@media (max-width: 760px) {
  #track .q-head { gap: 8px; }
  #track .q-head > .btn { flex: 1 1 auto; justify-content: center; height: 36px; }
}
@media (max-width: 420px) {
  #track .q-head > .btn { flex-basis: 100%; }
}
@media (prefers-color-scheme: dark) {
  #trk-notion { --ink-soft: rgb(236 236 234 / .07); --ink-line: rgb(236 236 234 / .14); --warn-soft: rgb(226 166 50 / .1); }
  .ntj-card { background: linear-gradient(180deg, rgb(236 236 234 / .04), rgb(236 236 234 / 0) 120px), var(--panel);
    box-shadow: 0 1px 0 rgb(255 255 255 / .03) inset, 0 10px 30px -14px rgb(0 0 0 / .6); }
  .ntj-ic { color: #1d1c1a; background: linear-gradient(160deg, #f4f3ef, #d9d7d0); }
}
/* Telefon: aciklama tam genislikte, sayac basligin yaninda, "Hepsini onayla" aciklamanin altinda. Ozet 3 satir; satir kisa tutulur
   ki onay dugmeleri ilk ekrana yakin kalsin. */
@media (max-width: 560px) {
  #trk-notion { --gut: 0px; }
  .ntj-head { grid-template-columns: 30px minmax(0, 1fr); padding: 14px 14px 12px; column-gap: 10px; row-gap: 10px; }
  .ntj-ic { width: 30px; height: 30px; font-size: 16px; border-radius: 9px; }
  .ntj-ttl { display: contents; }
  .ntj-head h2 { align-self: center; }
  .ntj-lead, .ntj-scan { grid-column: 1 / -1; margin: 0; }
  .ntj-hact { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; padding-left: 0; }
  .ntj-count { display: none; }
  .ntj-cin { display: inline-flex; align-items: baseline; gap: 4px; font-size: 12px; font-weight: 500; color: var(--muted); }
  .ntj-cin b { font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
  .ntj-state, .ntj-empty, .ntj-confirm { margin-left: 14px; margin-right: 14px; }
  .ntj-list { padding: 0 4px 6px; }
  .ntj-item { padding: 12px 10px; gap: 6px; }
  .ntj-l { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ntj-l:not(.warn) { padding-left: 0; }
  .ntj-l.warn { padding-left: 10px; }
  .ntj-l dd .clamp { -webkit-line-clamp: 3; }
  .ntj-pgroup, .ntj-pcell { flex-basis: 100%; }
  .ntj-acts { flex: 1 1 100%; border-left: 0; padding-left: 0; justify-content: space-between; }
  .ntj-acts .btn { flex: 0 1 60%; justify-content: center; height: 36px; }
  .ntj-l dt { font-size: 11.5px; }
  .ntj-confirm li { grid-template-columns: minmax(0, 1fr); }
  .ntj-confirm code { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { .ntj-spin { animation: none; } }
