/* Ekrana özgü düzenler: raporlar, politika, listeler, kurulum, arşiv, domainler, hesap */

/* Yardımcılar (görünümlerdeki tekrar eden düzenler için) */
.u-mt-xs { margin-top: 0.25rem; }
.u-mt-md { margin-top: var(--sp-3); }
.u-mb-xs { margin-bottom: 0.375rem; }
.u-mb-sm { margin-bottom: var(--sp-3); }
.u-mb0 { margin-bottom: 0; }
.u-b { font-weight: 600; }
.u-select { user-select: all; }
.u-pre { white-space: pre-wrap; }
.u-scroll { overflow: auto; }
.u-row-top { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--sp-3); }
.mw-20 { max-width: 20rem; }
.mw-28 { max-width: 28rem; min-height: 8rem; }
.is-static { pointer-events: none; }
.sub-head { margin: var(--sp-4) 0 var(--sp-2); font-size: var(--fs-md); font-weight: 600; }
.sub-card { flex: 1 1 16rem; min-width: 0; padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--radius); }
.note-box { padding: 0.625rem 0.75rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel2); line-height: 1.55; }
.stat-link { color: inherit; display: block; }
.stat-link:hover { text-decoration: none; border-color: var(--line-strong); }
.qr-box { display: inline-block; padding: 0.75rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); line-height: 0; }
.stack-form { display: grid; gap: var(--sp-2); max-width: 40rem; }
.digest-pre { margin: 0; white-space: pre-wrap; font: inherit; font-size: var(--fs-sm); }
.grid-2col { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.grid-4col { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-3); }
.pager-pad { padding: var(--sp-3) var(--sp-4); }
.crumb-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; }
tr.is-focus > td { background: var(--accent-soft); }
.filters .form-row { flex: 0 1 11rem; min-width: 8rem; }
.filters .form-row.grow { flex: 1 1 14rem; }
@media (max-width: 760px) {
  .grid-2col, .grid-4col { grid-template-columns: minmax(0, 1fr); }
}

/* Raporlar */
.rep-tabs { margin-bottom: var(--sp-4); }
.rep-kpis { gap: 0; margin-bottom: var(--sp-4); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.rep-kpis .stat { border: 0; border-radius: 0; box-shadow: inset 1px 0 0 var(--line), inset 0 1px 0 var(--line); margin-block: -1px 0; margin-inline: -1px 0; }
.rep-digest { padding: 0.625rem var(--sp-4); }
.rep-digest > summary { font-size: var(--fs-sm); font-weight: 600; }
.rep-grid-main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--sp-4); margin-bottom: var(--sp-4); }
.rep-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); margin-bottom: var(--sp-4); }
.rep-grid-main > .card, .rep-grid-2 > .card { margin: 0; }
.rep-chart-card { margin: 0; }
.rep-canvas-wrap { position: relative; height: 260px; width: 100%; }
.rep-canvas-sm { height: 240px; }
.rep-hour-bars { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding: 0.25rem 0 1.4rem; }
.rep-hour-col { position: relative; flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.rep-hour-bar { width: 100%; max-width: 14px; min-height: 2px; background: var(--series-clean); border-radius: 3px 3px 0 0; }
.rep-hour-lab { position: absolute; bottom: -1.2rem; font-size: var(--fs-2xs); color: var(--muted); }
@media (max-width: 1100px) { .rep-grid-main, .rep-grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* Politika */
.policy-tabs { margin-bottom: var(--sp-4); }
.policy-pane { display: none; }
.policy-pane.on { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(22rem, 100%), 1fr)); gap: var(--sp-3) var(--sp-5); align-items: start; }
.policy-pane > *:not(.form-row) { grid-column: 1 / -1; }
.policy-pane > .form-row { margin: 0; }
.policy-pane > h2:first-child { margin-top: 0; }
.policy-pane h2 { font-size: var(--fs-md); margin: var(--sp-4) 0 var(--sp-2); }
.dlp-detectors { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); margin: 0.375rem 0 var(--sp-4); padding: 0.625rem 0.75rem; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius); }
.dlp-det { display: inline-flex; align-items: center; gap: 0.4375rem; font-size: var(--fs-sm); cursor: pointer; }
.dlp-rules { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.dlp-rule { margin: 0 !important; padding: 0.625rem 0.75rem !important; box-shadow: none; }
.dlp-rule-grid { display: grid; grid-template-columns: minmax(8rem, 1.2fr) 7rem minmax(10rem, 2fr) 7rem 7.5rem 4.5rem 5.5rem auto; gap: var(--sp-2); align-items: end; }
.dlp-rule-grid .form-row { margin: 0; min-width: 0; }
.dlp-rule-remove { min-width: var(--ctrl-h); padding: 0; }
@media (max-width: 1280px) { .dlp-rule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dlp-rule-remove { justify-self: start; } }
@media (max-width: 560px) { .dlp-rule-grid { grid-template-columns: minmax(0, 1fr); } }

/* Listeler */
.lists-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); align-items: start; }
.lists-grid > .card { margin: 0; }
.list-add-form { margin-bottom: var(--sp-3); }
.list-add-form .form-row { margin: 0; flex: 1 1 12rem; }
.list-subhead { margin: var(--sp-4) 0 0.25rem; font-size: var(--fs-2xs); font-weight: 600; letter-spacing: 0.035em; text-transform: uppercase; color: var(--muted); }
.sender-list { list-style: none; margin: 0; padding: 0; max-height: 24rem; overflow: auto; }
.sender-list-item { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); padding: 0.3125rem 0; border-bottom: 1px solid var(--line); }
.sender-list-item:last-child { border-bottom: 0; }
.sender-list-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3125rem; min-width: 0; }
.sender-list-email { font-size: var(--fs-xs); background: transparent; border: 0; padding: 0; overflow-wrap: anywhere; }
.sender-list-del { margin: 0; flex: 0 0 auto; }
@media (max-width: 900px) { .lists-grid { grid-template-columns: minmax(0, 1fr); } }

/* Kurulum */
.setup-progress { width: 14rem; height: 5px; background: var(--neutral-soft); border-radius: 3px; overflow: hidden; }
.setup-progress span { display: block; height: 100%; background: var(--accent); }
.setup-list { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.setup-item { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; gap: var(--sp-3); align-items: center; margin: 0; padding: 0.625rem var(--sp-4); }
.setup-item strong { font-size: var(--fs-sm); }
.setup-item p { font-size: var(--fs-xs); }
.setup-status { justify-self: start; padding: 0 0.375rem; border-radius: 3px; font-size: var(--fs-2xs); font-weight: 600; line-height: 1.125rem; background: var(--neutral-soft); color: var(--muted); }
.setup-item.is-ok .setup-status { background: var(--ok-soft); color: var(--ok); }
.setup-item.is-todo .setup-status { background: var(--warn-soft); color: var(--warn); }
@media (max-width: 640px) { .setup-item { grid-template-columns: minmax(0, 1fr); } }

/* Domain DNS tablosu */
.mail-dns-table { font-size: var(--fs-xs); }
.mail-dns-ok { color: var(--ok); font-weight: 600; }
.mail-dns-warn { color: var(--warn); font-weight: 600; }
.mail-dns-bad { color: var(--bad); font-weight: 600; }
table.domain-table .ip-line { display: flex; gap: 0.3125rem; align-items: center; margin-top: 0.3125rem; }
table.domain-table .ip-line input { flex: 1 1 auto; min-width: 0; min-height: var(--ctrl-h-sm); font-size: var(--fs-xs); }

.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: var(--sp-3); margin-top: var(--sp-3); }
.mini-stats div { display: flex; flex-direction: column; gap: 0.125rem; }
.mini-stats strong { font-size: var(--fs-lg); }
.mini-stats .muted { font-size: var(--fs-xs); }
.mail-body-legacy { white-space: pre-wrap; overflow-wrap: anywhere; padding: var(--sp-3); max-height: 55vh; overflow: auto; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius); font-size: var(--fs-sm); }
.ops-toolbar { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; padding: 0.5rem 0.75rem; margin-bottom: var(--sp-2); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.ops-toolbar .muted { font-size: var(--fs-xs); }
.ops-toolbar label { display: inline-flex; align-items: center; gap: 0.375rem; font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; }
.score-preset { font-size: var(--fs-xs); }

/* Domain tablosu */
.dom-secret { margin-top: 0.25rem; font-size: var(--fs-xs); }
.dom-secret > summary { color: var(--muted); }
.dom-secret code { display: inline-block; margin-top: 0.1875rem; font-size: var(--fs-2xs); }
.dom-acts { flex-wrap: nowrap; align-items: center; }

/* Yeni kayıt formu katlanır: liste önce görünür */
.add-panel > summary { display: flex; align-items: center; gap: 0.5rem; font-size: var(--fs-sm); font-weight: 600; list-style: none; cursor: pointer; }
.add-panel > summary::-webkit-details-marker { display: none; }
.add-panel:not([open]) { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.add-panel[open] > summary { margin-bottom: var(--sp-3); }
.add-plus { display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font-weight: 600; line-height: 1; }

/* Korunan kişiler */
.pp-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: var(--sp-3); align-items: start; }
.pp-form .form-row { margin: 0; }
.pp-form .form-row.grow { grid-column: span 2; }
.pp-form-actions { grid-column: 1 / -1; }
.pp-form-card { margin-bottom: var(--sp-4); }
.pp-table .pp-addr { font-size: var(--fs-xs); overflow-wrap: anywhere; max-width: 22rem; }
.pp-actions .btn + .btn { margin-inline-start: 0.25rem; }
@media (max-width: 40rem) { .pp-form .form-row.grow { grid-column: auto; } }

/* Tehdit istihbaratı ve posta ayrıntısındaki ek/bağlantı incelemesi */
.intel-terms { max-width: 26rem; }
.intel-terms .badge { margin-bottom: 0.25rem; }
.intel-err { color: var(--bad); overflow-wrap: anywhere; }
.intel-act form { display: flex; flex-direction: column; gap: 0.375rem; align-items: flex-start; min-width: 11rem; }
.intel-value code, .intel-found code { overflow-wrap: anywhere; font-size: var(--fs-xs); }
.intel-found { list-style: none; margin: var(--sp-2) 0 0; padding: 0; display: grid; gap: 0.375rem; }
.intel-search-card, .intel-form-card { margin: var(--sp-4) 0; }
.analysis-card { overflow-x: auto; min-width: 0; }
.analysis-card .analysis-table { margin-bottom: var(--sp-3); }
@media (max-width: 40rem) {
  .analysis-name { max-width: 11rem; }
  .analysis-hash { max-width: 10rem; }
}
.analysis-name { overflow-wrap: anywhere; max-width: 22rem; }
.analysis-hash { color: var(--muted); max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Kampanyalar ve posta gerekçesi */
.camp-filters { margin-bottom: var(--sp-3); align-items: end; }
.camp-addr { font-size: var(--fs-xs); overflow-wrap: anywhere; max-width: 16rem; }
.camp-val { overflow-wrap: anywhere; }
/* Arşiv: zincir, ek satırı, durum sayfası */
.thread-list tr.is-current td { background: var(--neutral-soft); }
.thread-addr { font-size: var(--fs-xs); overflow-wrap: anywhere; max-width: 14rem; }
.thread-note, .arch-note { padding: var(--sp-2) var(--sp-3); margin: 0; }
.arch-atts { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; margin-top: 0.125rem; }
.arch-att { white-space: nowrap; }
.arch-ext input { max-width: 6rem; }
.arch-check { align-self: end; padding-bottom: 0.5rem; }
.arch-hash { overflow-wrap: anywhere; margin: 0.25rem 0; }
.access-list li { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; align-items: baseline; }
.arch-health .card { margin-bottom: var(--sp-3); }
.arch-health-link { margin-inline-start: auto; }
/* Posta sunucusu profili ve roller */
.ms-type { display: block; }
.ms-test { list-style: none; margin: 0.25rem 0; padding: 0; font-size: var(--fs-xs); max-width: 26rem; }
.ms-test li { padding-inline-start: 0.875rem; position: relative; }
.ms-test li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.45em; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--line); }
.ms-test li.ms-ok::before { background: var(--ok); }
.ms-test li.ms-warn::before { background: var(--warn); }
.ms-test li.ms-bad::before { background: var(--bad); }
.ms-test-form { margin-top: 0.25rem; }
.ms-checklist summary { cursor: pointer; font-weight: 600; }
.ms-items { margin: 0.25rem 0 0.75rem; padding-inline-start: 1.125rem; font-size: var(--fs-sm); }
.ms-items li { margin-bottom: 0.375rem; }
.role-matrix td.yes { color: var(--ok); font-weight: 600; text-align: center; }
.role-matrix td.no { color: var(--muted); text-align: center; }
.role-matrix th.rm-role { text-align: center; white-space: nowrap; }
.role-matrix summary { cursor: pointer; font-weight: 600; }
.tenant-feats td { white-space: normal; }
.tenant-feats .feat { display: inline-block; margin-inline-end: 0.875rem; }
.tenant-feats .feat.on { color: var(--ok); }
.explain { border-inline-start: 3px solid var(--line); padding: 0 0 0 var(--sp-3); margin: 0 0 var(--sp-3); }
.explain p { margin: 0 0 0.375rem; }
.explain-head { font-weight: 600; }
.explain .badge { text-decoration: none; }

/* Güvenlik ekranları (Faz 10): tehdit, bağlantı, ek, sistem sağlığı */
.sv-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: var(--sp-3); }
.sv-bar-col { width: 30%; min-width: 5rem; }
.sv-bar { display: block; height: 0.5rem; background: var(--neutral-soft); border-radius: var(--radius-pill); overflow: hidden; }
.sv-bar > span { display: block; height: 100%; background: var(--series-clean); border-radius: inherit; }
.sv-bar.is-bad > span { background: var(--series-block); }
.sv-bar.is-warn > span { background: var(--series-hold); }
.sv-stack { display: flex; height: 0.625rem; border-radius: var(--radius-pill); overflow: hidden; min-width: 0.25rem; }
.sv-seg { display: block; height: 100%; }
.sv-malware { background: #8f1d6b; }
.sv-phishing { background: var(--series-block); }
.sv-bec { background: var(--orange); }
.sv-spam { background: var(--series-hold); }
.sv-suspicious { background: var(--series-fail); }
.sv-legend { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; padding: var(--sp-2) var(--sp-3); margin: 0; }
.sv-legend i.sv-seg { display: inline-block; width: 0.625rem; height: 0.625rem; border-radius: 2px; margin-inline-end: 0.375rem; vertical-align: -1px; }
.sv-addr, .sv-host { overflow-wrap: anywhere; max-width: 22rem; }
.sv-note { padding: var(--sp-2) var(--sp-3); margin: 0; }
.sv-page .note-box { margin: 0; }
.health-head { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; border-inline-start: 4px solid var(--line-strong); }
.health-head.health-ok { border-inline-start-color: var(--ok); }
.health-head.health-warn { border-inline-start-color: var(--warn); }
.health-head.health-bad { border-inline-start-color: var(--bad); }

/* Bağlam paneli */
.peek-panel { position: fixed; inset-block: var(--topbar-h) 0; inset-inline-end: 0; width: min(26rem, 100vw); z-index: 40;
  background: var(--panel); border-inline-start: 1px solid var(--line-strong); box-shadow: var(--shadow-md); display: flex; flex-direction: column; }
.peek-panel[hidden] { display: none; }
.peek-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--line); }
.peek-content { padding: var(--sp-3); overflow-y: auto; flex: 1; font-size: var(--fs-sm); }
.peek-subject { font-size: var(--fs-lg); margin: 0.25rem 0 0.5rem; overflow-wrap: anywhere; }
.peek-badges { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0 0 0.25rem; }
.peek-h { font-size: var(--fs-sm); margin: 0.75rem 0 0.25rem; }
.peek-list { list-style: none; margin: 0; padding: 0; }
.peek-list li { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; align-items: baseline; padding: 0.125rem 0; }
.peek-foot { margin: var(--sp-3) 0 0; }
@media (min-width: 1400px) { body.peek-open .shell { padding-inline-end: 26rem; } }

/* API anahtarları ve SIEM (Faz 11) */
.api-token, .api-example { background: var(--neutral-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-2) var(--sp-3);
  font-family: var(--font-mono); font-size: var(--fs-xs); overflow-x: auto; white-space: pre; margin: 0.5rem 0; }
.api-token { white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--fs-sm); }
.api-new { border-inline-start: 4px solid var(--warn); }
.api-scopes { border: 0; padding: 0; margin: 0; min-width: 16rem; }
.api-scopes legend { font-size: var(--fs-sm); color: var(--muted); padding: 0; margin-bottom: 0.25rem; }
.api-notes, .siem-notes { margin: 0.5rem 0 0; padding-inline-start: 1.125rem; }
.api-notes li, .siem-notes li { margin-bottom: 0.25rem; }
.mw-8 { max-width: 8rem; }
.llm-budget { padding: var(--sp-2) var(--sp-3); align-items: end; }
