/* "PATH Güvenlik Takibi" tasarımından (Claude Design). Varsayılan koyu; sistem açıksa açık; seçim data-theme ile. */
:root {
  --bg: #0D1117; --surface: #151B23; --surface-2: #1B222C; --surface-3: #252D39; --border: #2B3440;
  --text: #E6EAF0; --text-2: #A9B2BF; --text-3: #8C96A5;
  --accent: #7AA9FF; --accent-bg: rgba(122,169,255,.13); --on-accent: #0D1117;
  --p0: #FF6F66; --p0-bg: rgba(255,111,102,.15); --p1: #FFA552; --p1-bg: rgba(255,165,82,.14);
  --p2: #F0CB62; --p2-bg: rgba(240,203,98,.12); --pq: #A9B2BF; --pq-bg: rgba(169,178,191,.13);
  --st-yeni: #7AA9FF; --st-yuk: #D3A0FF; --st-acik: #A9B2BF; --st-gecti: #FF6F66; --st-kapandi: #5DD68C; --st-kabul: #4FD1C5;
  --kev: #FF6F66; --kev-text: #240504; --ok: #5DD68C; --ok-bg: rgba(93,214,140,.12); --warn: #FFA552;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F4F6F8; --surface: #FFFFFF; --surface-2: #F1F3F6; --surface-3: #E7EAF0; --border: #D8DDE4;
    --text: #141920; --text-2: #454F5D; --text-3: #5A6472;
    --accent: #1D5BD6; --accent-bg: rgba(29,91,214,.08); --on-accent: #FFFFFF;
    --p0: #C3271C; --p0-bg: rgba(195,39,28,.09); --p1: #A35200; --p1-bg: rgba(163,82,0,.09);
    --p2: #7A5E00; --p2-bg: rgba(122,94,0,.10); --pq: #5A6472; --pq-bg: rgba(90,100,114,.10);
    --st-yeni: #1D5BD6; --st-yuk: #7A3EC4; --st-acik: #5A6472; --st-gecti: #C3271C; --st-kapandi: #1D7A43; --st-kabul: #0E766C;
    --kev: #C3271C; --kev-text: #FFFFFF; --ok: #1D7A43; --ok-bg: rgba(29,122,67,.09); --warn: #A35200;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F4F6F8; --surface: #FFFFFF; --surface-2: #F1F3F6; --surface-3: #E7EAF0; --border: #D8DDE4;
  --text: #141920; --text-2: #454F5D; --text-3: #5A6472;
  --accent: #1D5BD6; --accent-bg: rgba(29,91,214,.08); --on-accent: #FFFFFF;
  --p0: #C3271C; --p0-bg: rgba(195,39,28,.09); --p1: #A35200; --p1-bg: rgba(163,82,0,.09);
  --p2: #7A5E00; --p2-bg: rgba(122,94,0,.10); --pq: #5A6472; --pq-bg: rgba(90,100,114,.10);
  --st-yeni: #1D5BD6; --st-yuk: #7A3EC4; --st-acik: #5A6472; --st-gecti: #C3271C; --st-kapandi: #1D7A43; --st-kabul: #0E766C;
  --kev: #C3271C; --kev-text: #FFFFFF; --ok: #1D7A43; --ok-bg: rgba(29,122,67,.09); --warn: #A35200;
  color-scheme: light;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
       font: 14px/1.45 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, h2 { margin: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2;
      stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* üst çubuk */
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 14px 32px;
          background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.logo { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
        background: var(--accent-bg); color: var(--accent); }
.brand strong { display: block; font-size: 15px; }
.brand > span:not(.logo) span { display: block; font-size: 12px; color: var(--text-3); }
.tabs { display: flex; gap: 4px; margin-left: 12px; }
.tab { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 8px;
       color: var(--text-2); font-weight: 600; }
.tab:hover { background: var(--surface-2); text-decoration: none; }
.tab-on { color: var(--text); background: var(--surface-3); }
.tab-off { opacity: .55; cursor: default; }
.spacer { flex: 1 1 24px; }
.scaninfo { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.scaninfo strong { color: var(--text); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.dot-warn { background: var(--warn); }
.dot-err { background: var(--p0); }
.searchbox { position: relative; }
.searchbox .ic { position: absolute; left: 12px; top: 12px; color: var(--text-3); }
.search { height: 40px; width: 260px; padding: 0 12px 0 36px; border-radius: 8px; border: 1px solid var(--border);
          background: var(--surface-2); color: var(--text); font: inherit; }
.search::placeholder { color: var(--text-3); }
.who { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-2); }

/* yerleşim */
.page { max-width: 1440px; margin: 0 auto; padding: 24px 32px 56px; display: flex; flex-direction: column; gap: 22px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.h1 { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.h2 { font-size: 16px; font-weight: 700; }
.h3 { font-size: 15px; font-weight: 700; }
.split { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.split > .main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.split > .side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.pad { padding: 16px 18px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.between { justify-content: space-between; }

/* rozetler */
.sev { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px;
       font-weight: 650; font-size: 12px; white-space: nowrap; }
.sev-p0, .cnt-p0 { color: var(--p0); background: var(--p0-bg); }
.sev-p1, .cnt-p1 { color: var(--p1); background: var(--p1-bg); }
.sev-p2, .cnt-p2 { color: var(--p2); background: var(--p2-bg); }
.sev-pq, .cnt-pq { color: var(--pq); background: var(--pq-bg); }
.cnt { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 24px; padding: 0 6px;
       border-radius: 6px; font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.cnt-zero { color: var(--text-3); background: none; }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 550; white-space: nowrap; }
.st-yeni { color: var(--st-yeni); } .st-yuk { color: var(--st-yuk); } .st-acik { color: var(--st-acik); }
.st-gecti { color: var(--st-gecti); } .st-kapandi { color: var(--st-kapandi); } .st-kabul { color: var(--st-kabul); }
.st-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st-ring { width: 9px; height: 9px; border-radius: 50%; border: 2px solid currentColor; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11.5px;
       font-weight: 550; color: var(--text-2); background: var(--surface-3); white-space: nowrap; }
.env-prod { color: var(--p1); background: var(--p1-bg); }
.kev { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 5px; font-size: 11px;
       font-weight: 750; letter-spacing: .04em; color: var(--kev-text); background: var(--kev); }
.th { font-size: 11.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.c { text-align: center; }

/* düğmeler */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 14px;
       border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit;
       font-weight: 550; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); height: 34px; padding: 0 8px; }
.btn-icon { width: 40px; padding: 0; }
.btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 17px;
        border: 1px solid var(--border); background: transparent; color: var(--text-2); font-size: 13px; }
.chip:hover { text-decoration: none; background: var(--surface-2); }
.chip-on { background: var(--accent-bg); color: var(--accent); border-color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0 20px 14px; border-bottom: 1px solid var(--border); }
.filters .lbl { font-size: 12.5px; color: var(--text-3); margin-right: 4px; }

/* genel bakış */
.sevcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.sevcard { display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 16px; color: var(--text);
           background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.sevcard:hover { border-color: var(--text-3); text-decoration: none; }
.sevcard-on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.sevcard .big { font-size: 36px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.statusbar { display: flex; flex-wrap: wrap; gap: 8px 28px; padding: 14px 20px; align-items: center; }
.tree { overflow-x: auto; }
.tree-in { min-width: 860px; padding: 0 20px 8px; }
.tree-grid { display: grid; grid-template-columns: minmax(300px, 1fr) repeat(4, 56px) 140px 168px; align-items: center; column-gap: 8px; }
.tree-head { height: 40px; border-bottom: 1px solid var(--border); }
.client { border-bottom: 1px solid var(--border); }
.client > summary { list-style: none; cursor: pointer; }
.client > summary::-webkit-details-marker { display: none; }
.client > summary .chev { transition: transform .15s; color: var(--text-3); }
.client[open] > summary .chev { transform: rotate(90deg); }
.client-row { min-height: 56px; }
.repo-row { min-height: 48px; }
.repo-row:hover, .client-row:hover { background: var(--surface-2); }
.watch { display: flex; flex-direction: column; gap: 6px; padding: 12px 18px; border-top: 1px solid var(--border); color: var(--text); }
.watch:hover { background: var(--surface-2); text-decoration: none; }
.rules { display: flex; flex-direction: column; gap: 12px; }
.rules > div { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: var(--text-2); }
.rules .sev { min-width: 92px; }
.rules strong { color: var(--text); }

/* repo */
.dl { display: grid; grid-template-columns: 130px minmax(0, 1fr); row-gap: 8px; column-gap: 12px; margin: 0; font-size: 13px; }
.dl dt { color: var(--text-3); }
.dl dd { margin: 0; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.counts4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.counts4 > div { display: flex; flex-direction: column; gap: 6px; }
.counts4 .sev { align-self: flex-start; }
.counts4 .n { font-size: 26px; font-weight: 700; }
.ftable { overflow-x: auto; }
.ftable-in { min-width: 1340px; padding: 0 20px 12px; }
.fgrid { display: grid; grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 1fr) 84px 52px 60px 44px 92px minmax(170px, 1fr) 64px 160px 130px;
         align-items: center; column-gap: 10px; }
.frow { min-height: 56px; padding: 6px 0; border-top: 1px solid var(--border); }
.frow:hover { background: var(--surface-2); }
.fgroup { display: flex; align-items: center; gap: 10px; height: 46px; border-top: 1px solid var(--border); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 7px; border-radius: 5px; font-size: 11px;
      font-weight: 700; letter-spacing: .03em; white-space: nowrap; color: var(--text-2); background: var(--surface-3); }
.cu-open { color: var(--accent); background: var(--accent-bg); }
.cu-done { color: var(--ok); background: var(--ok-bg); }
.cu-sq { width: 8px; height: 8px; border-radius: 2px; background: currentColor; }

/* bulgu */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 10px; background: var(--surface-2); }
.tile-l { font-size: 12px; color: var(--text-3); }
.tile-v { font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile-n { font-size: 12.5px; color: var(--text-2); }
.bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.bar > div { height: 100%; }
.why { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; font-size: 13.5px; }
.chain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chain-i { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 6px;
           background: var(--surface-2); border: 1px solid var(--border); }
code.cmd { display: block; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border);
           overflow-x: auto; white-space: nowrap; }
.tl { display: grid; grid-template-columns: 96px 18px minmax(0, 1fr); column-gap: 12px; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; justify-self: center; background: var(--text-3); }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }

/* formlar */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; }
.input { width: 100%; min-height: 40px; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--border);
         background: var(--surface-2); color: var(--text); font: inherit; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 10px; border: 1px solid var(--border); cursor: pointer; }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-bg); }
.opt input[type="radio"] { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.dialog { max-width: 640px; }

/* giriş ve sistem sayfası */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.alert { padding: 12px 14px; border-radius: 10px; background: var(--p0-bg); color: var(--p0); font-size: 13.5px; }
.note { padding: 12px 14px; border-radius: 10px; background: var(--accent-bg); font-size: 13.5px; }
.note.ok { background: var(--ok-bg); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.tbl th { font-size: 12px; color: var(--text-3); font-weight: 600; }
.empty { padding: 36px 0; text-align: center; color: var(--text-2); }

/* orta genişlik: üst çubuk tek satırda kalsın (son tarama bilgisi Taramalar sayfasında da var) */
@media (max-width: 1360px) { .scaninfo { display: none; } }

/* mobil: tablolar karta döner */
@media (max-width: 760px) {
  .topbar, .page { padding-left: 16px; padding-right: 16px; }
  .topbar { gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .brand { order: 1; flex: 1 1 auto; }
  #theme-toggle { order: 2; }
  .who { order: 3; }
  .who > span { display: none; }
  .tabs { order: 4; margin-left: 0; flex: 1 1 100%; }
  .searchbox { order: 5; flex: 1 1 100%; }
  .search { width: 100%; }
  .spacer, .scaninfo { display: none; }
  .h1 { font-size: 22px; }
  .tree-in, .ftable-in { min-width: 0; padding: 0 12px 8px; }
  .tree-head, .fhead { display: none; }
  .tree-grid { grid-template-columns: 1fr repeat(4, 40px); row-gap: 4px; padding: 8px 0; }
  .tree-grid > .t-sure, .tree-grid > .t-cu { grid-column: 1 / -1; padding-left: 26px; }
  .fgrid { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 12px 0; }
  .fgrid > .f-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; }
  .fgrid > .f-hide { display: none; }
}
