/* Yoğun liste ekranları: posta akışı, karantina, SMTP retleri, şüpheli, giden denetim, denetim günlüğü, DMARC.
   Her satırın solundaki ince şerit kararı taşır (.ml-row[data-verdict]). */
.mail-workspace { display: flex; flex-direction: column; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.mail-workspace > .ml-tabs { padding: 0 0.375rem; }
.mail-workspace > .mail-cmdbar { padding: 0.625rem 0.75rem; border-bottom: 1px solid var(--line); }
.mail-workspace > .mail-filter-chips { padding: 0.4375rem 0.75rem; border-bottom: 1px solid var(--line); }
.mail-workspace > .mail-list-shell { border: 0; border-radius: 0; }
.mail-workspace > .pager { padding: 0.5rem 0.75rem; border-top: 1px solid var(--line); }
.mail-workspace > p { padding: 0.5rem 0.75rem !important; border-top: 1px solid var(--line); }

/* Komut çubuğu */
.mail-cmdbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin: 0; }
.ml-bar-row { display: contents; }
.ml-bar-spacer { flex: 1 1 auto; }
.mail-cmdbar-search { position: relative; display: flex; flex: 1 1 18rem; min-width: 12rem; }
.mail-cmdbar-search input {
  flex: 1 1 auto;
  padding-inline-start: 2.125rem !important;
  padding-inline-end: 3.75rem !important;
}
.mail-cmdbar-search-ico { position: absolute; inset-inline-start: 0.625rem; top: 50%; transform: translateY(-50%); color: var(--faint); display: inline-flex; pointer-events: none; }
.mail-cmdbar-search-ico svg { width: 15px; height: 15px; }
.mail-cmdbar-go { position: absolute; inset-inline-end: 0.1875rem; top: 0.1875rem; bottom: 0.1875rem; min-height: 0 !important; }
.mail-seg {
  display: inline-flex;
  height: var(--ctrl-h);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}
.mail-seg-btn {
  display: inline-flex;
  align-items: center;
  padding: 0 0.6875rem;
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 500;
  white-space: nowrap;
  border-inline-start: 1px solid var(--line);
}
.mail-seg-btn:first-child { border-inline-start: 0; }
.mail-seg-btn:hover { color: var(--text); background: var(--panel2); text-decoration: none; }
.mail-seg-btn.is-on { background: var(--neutral-soft); color: var(--text); font-weight: 600; }
.mail-cmd-field {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  height: var(--ctrl-h);
  padding-inline-start: 0.5625rem;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  min-width: 0;
}
.mail-cmd-field > span { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; }
.mail-cmd-field select, .mail-cmd-field input {
  width: auto !important;
  min-height: 0 !important;
  height: 100%;
  padding: 0 0.25rem !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: var(--fs-xs);
  font-weight: 500;
  max-width: 11rem;
}
.mail-cmd-field:focus-within { border-color: var(--accent); }
.ml-field-narrow { min-width: 0; }
.ml-dates { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }

/* Etkin filtreler */
.mail-filter-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; font-size: var(--fs-xs); }
.mail-filter-chips-lab { color: var(--muted); }
.mail-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0 0.4375rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 500;
  line-height: 1.375rem;
}
.mail-chip:hover { text-decoration: none; background: var(--panel2); }
.mail-chip-x { color: var(--muted); font-size: 0.875rem; }
.mail-chip-clear { margin-inline-start: 0.25rem; }

/* Liste kabı */
.mail-list-shell {
  padding: 0;
  margin: 0;
  overflow: auto;
  max-height: calc(100vh - 15rem);
  min-height: 11rem;
}
.ops-card { padding: 0; }
.mail-list-meta { padding: 0.5rem 0.75rem; font-size: var(--fs-xs); border-bottom: 1px solid var(--line); }
.ml-table { table-layout: fixed; min-width: 56rem; }
.ml-table th { z-index: 2; top: var(--ml-bulk-h, 0px); }
.ml-table td { padding: 0.4375rem 0.75rem; vertical-align: middle; }
.ml-table .col-score { white-space: nowrap; }
.ml-row[data-href] { cursor: pointer; }
.ml-table tbody tr:hover > td { background: var(--panel2); }
.ml-table tr.is-selected > td { background: var(--accent-soft); }

/* Karar şeridi */
.ml-table tbody tr > td:first-child { position: relative; }
.ml-row[data-verdict] > td:first-child::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
}
.ml-row[data-verdict="hold"] > td:first-child::before { background: var(--warn); }
.ml-row[data-verdict="block"] > td:first-child::before { background: var(--bad); }
.ml-row[data-verdict="fail"] > td:first-child::before { background: var(--series-fail); }

.ml-table td .badge {
  padding: 0;
  background: transparent;
  color: var(--text);
  font-size: var(--fs-xs);
  font-weight: 500;
}
.ml-table td .badge::before { content: ""; width: 7px; height: 7px; margin-inline-end: 0.3125rem; border-radius: 2px; background: var(--faint); flex: 0 0 auto; }
.ml-table td .badge.success::before { background: var(--ok); }
.ml-table td .badge.warning::before { background: var(--series-hold); }
.ml-table td .badge.critical::before { background: var(--series-block); }
.ml-table td .badge.info::before { background: var(--info); }
.ml-c-status { width: 8.25rem; }
.ml-c-score { width: 5.5rem; }
.ml-c-party { width: 25%; min-width: 14rem; }
.ml-c-subj { width: auto; }
.ml-c-ip { width: 8.25rem; }
.ml-c-date { width: 5.75rem; }
.ml-c-act { width: 6.25rem; }
.q-c-check { width: 2.5rem; }
.q-c-act { width: 11rem; }
.ph-c-act { width: 7.5rem; }
.sv-c-form { width: 26rem; }
.dm-c-domain { width: 14rem; }
.dm-c-num { width: 5.5rem; }
.dm-c-bar { width: 10rem; }
.au-c-user { width: 11rem; }
.au-c-tenant { width: 4.5rem; }
.au-c-action { width: 11rem; }
.au-c-object { width: 11rem; }
.au-c-result { width: 5rem; }

.sev { display: none; }
.col-score { font-family: var(--font-mono); font-size: var(--fs-sm); }
.col-score .score-low { color: var(--muted); font-weight: 400; }
.score-ml { font-size: var(--fs-2xs); margin-top: 0.0625rem; color: var(--faint); }
.score-ml span { color: inherit; font-weight: 400; }

.ml-party { min-width: 0; }
.ml-line { display: flex; align-items: center; gap: 0.3125rem; min-width: 0; line-height: 1.35; }
.ml-from { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ml-to { color: var(--muted); font-size: var(--fs-xs); }
.ml-to span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ml-arrow { flex: 0 0 auto; width: 0.875rem; text-align: center; color: var(--faint); }
.ml-dir { flex: 0 0 0.875rem; width: 0.875rem; text-align: center; font-size: var(--fs-xs); color: var(--faint); }
.ml-dir-outgoing { color: var(--accent); }
.ml-subj-cell { min-width: 0; overflow: hidden; }
.ml-subj {
  display: block;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.35;
}
.ml-subj:hover { color: var(--accent); }
.mail-subj-tags, .q-tags { margin-top: 0.1875rem; flex-wrap: nowrap; overflow: hidden; }
.q-tags .mail-subj-tags { margin-top: 0; }
.q-summary {
  margin-top: 0.1875rem;
  padding-inline-start: 0.4375rem;
  border-inline-start: 2px solid var(--ai-line);
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ml-ip { font-size: var(--fs-xs); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-ip a { color: inherit; }
.ml-when { font-family: var(--font-mono); font-size: var(--fs-xs); line-height: 1.4; }
.ml-sub { font-size: var(--fs-2xs); color: var(--muted); line-height: 1.3; }
.ml-addr { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-detail { font-size: var(--fs-xs); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-act { text-align: end; white-space: nowrap; }
.q-act { text-align: end; white-space: nowrap; }
.q-act form { display: inline-block; margin: 0; vertical-align: middle; }
.ml-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ctrl-h-sm);
  height: var(--ctrl-h-sm);
  border-radius: var(--radius);
  color: var(--muted);
  list-style: none;
  cursor: pointer;
  vertical-align: middle;
}
.ml-icon-btn::-webkit-details-marker { display: none; }
.ml-icon-btn:hover { background: var(--neutral-soft); color: var(--text); text-decoration: none; }
/* Satır işlemleri: dinlenirken sessiz, üzerine gelince görünür */
.q-act .btn { min-height: 1.625rem; padding: 0 0.4375rem; border-color: transparent; background: transparent; color: var(--muted); font-weight: 500; }
.q-act .btn.primary { color: var(--accent); }
.q-act .btn.bad { color: var(--bad); }
.q-act .btn:hover { background: var(--neutral-soft); }
@media (hover: hover) {
  .ml-act .ml-icon-btn { opacity: 0; }
  .ml-row:hover .ml-act .ml-icon-btn, .ml-act .ml-icon-btn:focus-visible { opacity: 1; }
}
/* Dar masaüstünde konu sütununa yer aç */
@media (max-width: 1320px) {
  .ml-mail col.ml-c-ip { width: 0; visibility: collapse; }
  .ml-mail td.ml-ip, .ml-mail th:nth-child(5):has(+ th + th) { display: none; }
}
.ml-row.is-locked .ml-from { color: var(--bad); }

/* Toplu işlem çubuğu: seçim yokken görünmez; seçince başlık satırının üstüne biner, tablo kaymaz */
.ml-bulk { position: sticky; top: 0; inset-inline-start: 0; z-index: 4; height: 0; margin: 0; }
.ml-bulk-bar {
  position: absolute;
  inset-inline-start: 2.5rem;
  inset-inline-end: 0;
  top: 0;
  display: none;
  align-items: center;
  gap: 0.375rem;
  height: 2.25rem;
  padding: 0 0.75rem;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--line-strong);
}
.ml-bulk-bar.is-active { display: flex; }
.ml-bulk-count { font-size: var(--fs-xs); font-weight: 600; min-width: 4.5rem; }
.ml-bulk-force { display: inline-flex; align-items: center; gap: 0.3125rem; font-size: var(--fs-xs); }
.ml-bulk-hint { display: none; }

/* Satır menüsü */
.ml-more { position: relative; display: inline-block; vertical-align: middle; }
.ml-menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 4px);
  z-index: 6;
  min-width: 15rem;
  max-width: 22rem;
  padding: 0.25rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-align: start;
  white-space: normal;
}
.ml-more.is-up .ml-menu { top: auto; bottom: calc(100% + 4px); }
.ml-menu form { display: block; }
.ml-menu-item {
  display: block;
  width: 100%;
  padding: 0.375rem 0.5rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: var(--fs-xs);
  text-align: start;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.ml-menu-item:hover { background: var(--panel2); text-decoration: none; }
.ml-menu-item.ok { color: var(--ok); }
.ml-menu-item.bad { color: var(--bad); }

.ml-alert {
  margin-bottom: var(--sp-3);
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--warn-line);
  border-inline-start: 3px solid var(--warn);
  border-radius: var(--radius);
  background: var(--warn-soft);
  font-size: var(--fs-sm);
}
.ml-alert ul { margin-top: 0.25rem; font-size: var(--fs-xs); }

.sv-form { display: grid; grid-template-columns: 7rem minmax(0, 1fr) auto auto; gap: 0.25rem; align-items: center; }
.sv-form input { min-height: var(--ctrl-h-sm) !important; font-size: var(--fs-xs); padding: 0 0.4375rem !important; }

.dm-bar { height: 5px; border-radius: var(--radius-pill); background: var(--neutral-soft); overflow: hidden; margin-top: 0.4375rem; }
.dm-bar > span { display: block; height: 100%; background: var(--ok); border-radius: inherit; }
.dm-bar > span.is-bad { background: var(--bad); }

/* SMTP retleri */
.sr-page { display: flex; flex-direction: column; gap: var(--sp-3); }
.sr-page .mail-list-shell { margin: 0; }
.sr-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: var(--sp-2); }
.sr-kpi {
  display: block;
  padding: 0.5rem 0.75rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
}
.sr-kpi:hover { text-decoration: none; border-color: var(--line-strong); }
.sr-kpi-lab { display: block; font-size: var(--fs-2xs); color: var(--muted); font-weight: 500; }
.sr-kpi-val { display: block; font-size: 1.125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.sr-kpi-sub { display: block; font-size: var(--fs-2xs); color: var(--muted); }
.sr-help { font-size: var(--fs-xs); color: var(--muted); }
.sr-table td { vertical-align: middle; }
.sr-detail > summary { font-size: var(--fs-xs); color: var(--accent); list-style: none; }
.sr-detail > summary::-webkit-details-marker { display: none; }
.sr-detail-body { margin-top: 0.25rem; font-size: var(--fs-xs); color: var(--muted); overflow-wrap: anywhere; white-space: normal; }

.domain-table td { vertical-align: middle; }
.dom-meta { display: block; font-size: var(--fs-xs); color: var(--muted); }
.dom-acts { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.dom-acts form { margin: 0; }

@media (max-width: 960px) {
  .mail-list-shell { max-height: none; }
}

/* Telefon: posta satırları kart gibi akar, yatay kaydırma gerekmez */
@media (max-width: 760px) {
  .ml-bulk { height: auto; }
  .ml-bulk-bar { position: static; height: auto; flex-wrap: wrap; padding: 0.375rem 0.75rem; }
  .ml-table:has(tr.ml-row) { display: block; min-width: 0; }
  .ml-table:has(tr.ml-row) colgroup, .ml-table:has(tr.ml-row) thead { display: none; }
  .ml-table:has(tr.ml-row) tbody { display: block; }
  tr.ml-row { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; padding-block: 0.625rem; padding-inline: 0.9375rem 0.75rem; border-bottom: 1px solid var(--line); }
  tr.ml-row > td { display: block; padding: 0; border: 0; background: transparent !important; position: static !important; min-width: 0; }
  tr.ml-row > td.ml-party { order: 2; flex: 1 1 100%; }
  tr.ml-row > td.ml-subj-cell { order: 3; flex: 1 1 100%; }
  tr.ml-row > td.ml-date { order: 1; margin-inline-start: auto; text-align: end; }
  tr.ml-row > td.ml-ip { order: 4; }
  tr.ml-row > td.ml-act { position: absolute !important; inset-inline-end: 0.5rem; bottom: 0.5rem; }
  tr.ml-row > td.q-act { order: 5; }
  .mail-cmd-field { flex: 1 1 calc(50% - 0.25rem); min-width: 0; }
  .mail-cmd-field select { flex: 1 1 auto; min-width: 0; max-width: none; width: 100% !important; }
  .ml-bar-spacer { display: none; }
  .mail-seg { flex: 1 1 100%; }
  .mail-seg-btn { flex: 1 1 0; justify-content: center; }
  tr.ml-row > td.q-act { flex: 1 1 100%; text-align: start; }
  .col-score { display: inline-flex !important; align-items: baseline; gap: 0.375rem; }
  .score-ml { margin: 0; padding: 0; }
  .sv-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* Kuyruk ve servisler: durum dosyası eskiyse satırlar soluk gösterilir (güncel durum sanılmasın). */
.sr-table tr.is-stale { opacity: 0.55; }
/* Alt alta birkaç kısa tablo: her biri içeriği kadar yer tutar (tek liste sayfasındaki sabit yükseklik burada boşluk bırakır). */
.q-page .mail-list-shell { min-height: 0; max-height: none; }
.q-page .empty-state { padding: 1.25rem var(--sp-4); }
