/* Kamu İlan — tek sütun liste + kenar kartı; resmî ilan dilinden: mürekkep mavisi, son tarih için kehribar */
:root {
  --bg: #f5f6f8; --surface: #ffffff; --fg: #18212c; --muted: #5a6575; --line: #dfe3e9;
  --accent: #1d4f91; --accent-fg: #ffffff; --accent-soft: #e5edf8;
  --warn: #9a5b00; --warn-soft: #fcf0d9; --danger: #b0321c; --danger-soft: #fbe8e3; --ok: #1d7a4e; --ok-soft: #e2f3ea;
  /* Sistem yazı tipleri: dış sunucudan font yüklenmez (ziyaretçi IP'si üçüncü tarafa gitmez) */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --font-head: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10151c; --surface: #18202a; --fg: #e3e8ee; --muted: #98a3b2; --line: #2a3442;
    --accent: #7eaef0; --accent-fg: #0d1520; --accent-soft: #1c2c42;
    --warn: #f0c070; --warn-soft: #3a2d14; --danger: #f2937c; --danger-soft: #3c211b; --ok: #6fd3a0; --ok-soft: #15352a;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 var(--font); }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; margin: 0; text-wrap: balance; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.05rem; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top .in { max-width: 1120px; margin: 0 auto; padding: 14px max(16px, env(safe-area-inset-left)); display: flex;
  align-items: center; justify-content: space-between; gap: 12px; }
.brand { font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; color: var(--fg); text-decoration: none; }
.brand span { color: var(--accent); }

main { max-width: 1120px; margin: 0 auto; padding: 28px max(16px, env(safe-area-inset-left)) 64px; display: grid; gap: 28px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
@media (max-width: 900px) { .layout { grid-template-columns: minmax(0, 1fr); } .layout aside { order: -1; } }
.intro { display: grid; gap: 8px; max-width: 70ch; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
aside .card { position: sticky; top: 16px; display: grid; gap: 14px; }
form.stack { display: grid; gap: 12px; }
label { display: grid; gap: 4px; font-size: .9rem; font-weight: 500; }
label .hint { font-weight: 400; color: var(--muted); font-size: .8rem; }
input[type=text], input[type=email], input[type=search], select {
  font: inherit; font-size: .95rem; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--fg); width: 100%; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
legend { font-size: .9rem; font-weight: 500; margin-bottom: 4px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; padding: 4px 10px;
  border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; cursor: pointer; }
.checks input { margin: 0; }
.btn { font: inherit; font-weight: 500; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-fg);
  padding: 9px 16px; border-radius: 8px; cursor: pointer; text-decoration: none; display: inline-block; text-align: center; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn[disabled] { opacity: .6; cursor: default; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters input[type=search] { flex: 1 1 220px; width: auto; }
.filters select { width: auto; }

.ads { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.ad { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; }
.ad h3, .ad .meta { overflow-wrap: anywhere; min-width: 0; }
.ad h3 a { color: var(--fg); text-decoration: none; }
.ad h3 a:hover { color: var(--accent); }
.ad .meta { grid-column: 1; font-size: .875rem; color: var(--muted); }
.ad .chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.deadline { grid-row: 1 / 3; grid-column: 2; text-align: right; font-family: var(--mono); font-size: .85rem; white-space: nowrap; }
.deadline b { display: block; font-size: 1rem; font-weight: 500; }
.chip { font-size: .78rem; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pill { font-size: .75rem; padding: 2px 8px; border-radius: 999px; font-weight: 500; white-space: nowrap; }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
tr:last-child td { border-bottom: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tag { font-size: .72rem; padding: 1px 6px; border-radius: 4px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.tag b { color: var(--fg); font-weight: 500; }

.notice { padding: 12px 14px; border-radius: 8px; background: var(--ok-soft); color: var(--ok); font-size: .9rem; }
.notice.info { background: var(--accent-soft); color: var(--accent); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
footer { max-width: 1120px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left)) 40px; color: var(--muted); font-size: .8rem; }

/* İlan sayfası: kadro kartları (telefonda da tablo yerine kart) */
.kadro-group { display: grid; gap: 12px; min-width: 0; }
.kadrolar { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.kadro { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  display: grid; gap: 6px; min-width: 0; scroll-margin-top: 16px; }
.kadro.mine { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.kadro.hit { outline: 2px solid var(--accent); outline-offset: 2px; }
.kadro-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.kadro-title { font-weight: 600; }
.kadro-link { margin-left: auto; font-family: var(--mono); font-size: .8rem; color: var(--muted); text-decoration: none; }
.kadro-link:hover { color: var(--accent); }
.kadro-field { font-size: 1.02rem; overflow-wrap: anywhere; }
.kadro-reqs { display: flex; flex-wrap: wrap; gap: 6px; }
.kadro-text { font-size: .92rem; color: var(--fg); overflow-wrap: anywhere; max-width: 80ch; }
.kadro details summary { cursor: pointer; font-size: .82rem; color: var(--accent); }
.kadro details[open] summary { margin-bottom: 6px; }
.kadro-why .tag, .kadro.mine .chip { background: var(--surface); }
details.others > summary { cursor: pointer; list-style: none; }
details.others > summary::-webkit-details-marker { display: none; }
details.others > summary h2 { display: inline; }
details.others > summary::before { content: "▸ "; color: var(--muted); }
details.others[open] > summary::before { content: "▾ "; }
details.others[open] > summary { margin-bottom: 12px; }

/* KVKK tablosu */
.kv{border-collapse:collapse;width:100%;font-size:.9rem;min-width:520px}
.kv th,.kv td{border:1px solid var(--line, #dfe3e9);padding:8px 10px;text-align:left;vertical-align:top}
.kv th{background:var(--soft, rgba(127,127,127,.08))}

/* Kişisel filtre çipleri (× ile kapanır, yerinde kalır; tekrar tıklayınca açılır) */
.pf { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pf-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 6px 4px 12px;
  border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-fg);
  font-size: .85rem; text-decoration: none; }
.pf-chip span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-x { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent-fg) 20%, transparent); font-size: .95rem; line-height: 1; }
.pf-chip.off { background: transparent; color: var(--muted); border-color: var(--line); }
.pf-chip.off span:first-child { text-decoration: line-through; }
.pf-chip.off .pf-x { background: var(--bg); color: var(--accent); }
.pf-edit { font: inherit; font-size: .85rem; background: none; border: 1px dashed var(--line); color: var(--accent);
  border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.chip.fit { background: var(--ok-soft); color: var(--ok); }

.fdlg { width: min(480px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--fg); padding: 22px; }
.fdlg::backdrop { background: rgb(0 0 0 / .45); }
.fdlg h2 { font-size: 1.2rem; }
.fdlg-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fdlg fieldset .hint { font-weight: 400; color: var(--muted); font-size: .8rem; }
.fdlg legend { padding: 0; }
.chip.near { background: var(--warn-soft); color: var(--warn); }
.note-near { padding: 8px 12px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); }
.kadro.near { background: var(--surface); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }

/* İlan özeti penceresi */
.ads .ad { cursor: pointer; }
.ads .ad:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.qdlg { width: min(560px, calc(100vw - 24px)); max-height: min(86vh, 760px); overflow: auto; padding: 20px; position: relative; }
.qdlg-close { position: absolute; top: 8px; right: 10px; font: inherit; font-size: 1.5rem; line-height: 1; background: none;
  border: 0; color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.qdlg-close:hover { color: var(--fg); background: var(--bg); }
.quick { display: grid; gap: 12px; }
.quick-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding-right: 28px; }
.quick-head h2 { font-size: 1.15rem; overflow-wrap: anywhere; }
.quick-head .deadline { grid-row: auto; grid-column: auto; }
.quick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.quick-list a { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  text-decoration: none; color: var(--fg); background: var(--surface); }
.quick-list a:hover { border-color: var(--accent); }
.quick-list li.near a { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.q-title { font-weight: 600; font-size: .92rem; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.q-field { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.q-reqs { font-size: .8rem; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-actions .btn { flex: 1 1 200px; }
.quick-foot { position: sticky; bottom: -20px; margin: 0 -20px -20px; padding: 12px 20px 16px; display: grid; gap: 8px;
  background: var(--surface); border-top: 1px solid var(--line); }
.quick-actions .btn { flex: 1 1 160px; }
