:root, [data-theme="dark"] {
  --bg: #0a1214;
  --bg-accent: #0d1719;
  --panel: #0f1a1c;
  --panel2: #152226;
  --line: #243338;
  --text: #e7f0f0;
  --muted: #8aa0a4;
  --brand: #14b8a6;
  --brand-2: #0f766e;
  --accent: #14b8a6;
  --accent-2: #0d9488;
  --accent-soft: rgba(20, 184, 166, 0.14);
  --ok: #22c55e;
  --warn: #eab308;
  --bad: #ef4444;
  --info: #38bdf8;
  --neutral: var(--muted);
  --neutral-soft: var(--panel2);
  --success: var(--ok);
  --success-soft: color-mix(in srgb, var(--ok) 16%, transparent);
  --warning: var(--warn);
  --warning-soft: color-mix(in srgb, var(--warn) 18%, transparent);
  --critical: var(--bad);
  --critical-soft: color-mix(in srgb, var(--bad) 16%, transparent);
  --info-soft: color-mix(in srgb, var(--info) 16%, transparent);
  --shadow: none;
  --mail-bg: #ffffff;
  --mail-text: #1a1a1a;
  --radius: 8px;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --sidebar-w: 240px;
  --row-h: 2.15rem;
  --ctrl-h: 2.25rem;
  --ctrl-h-sm: 1.85rem;
  --ctrl-pad-x: 0.7rem;
  --ctrl-fs: 0.84rem;
  --ctrl-fs-sm: 0.75rem;
}

[data-theme="light"] {
  --bg: #f0f5f5;
  --bg-accent: #e4eeee;
  --panel: #ffffff;
  --panel2: #f5faf9;
  --line: #d2e0df;
  --text: #0f1f1e;
  --muted: #5b7270;
  --brand: #0f766e;
  --brand-2: #115e59;
  --accent: #0f766e;
  --accent-2: #115e59;
  --accent-soft: rgba(15, 118, 110, 0.1);
  --ok: #15803d;
  --warn: #a16207;
  --bad: #b91c1c;
  --info: #0369a1;
  --neutral: var(--muted);
  --neutral-soft: var(--panel2);
  --success: var(--ok);
  --success-soft: color-mix(in srgb, var(--ok) 12%, transparent);
  --warning: var(--warn);
  --warning-soft: color-mix(in srgb, var(--warn) 14%, transparent);
  --critical: var(--bad);
  --critical-soft: color-mix(in srgb, var(--bad) 10%, transparent);
  --info-soft: color-mix(in srgb, var(--info) 10%, transparent);
  --shadow: 0 1px 2px rgba(15, 31, 30, 0.05);
  --mail-bg: #ffffff;
  --mail-text: #1a1a1a;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.45;
}
body.app-body {
  background: var(--bg);
}
body.auth-body {
  display: block;
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(20, 184, 166, 0.16), transparent 55%),
    radial-gradient(700px 360px at 90% 10%, rgba(15, 118, 110, 0.1), transparent 50%),
    linear-gradient(165deg, #0a1214 0%, #0f1a1c 55%, #0a1214 100%);
}
[data-theme="light"] body.auth-body {
  background:
    radial-gradient(800px 380px at 10% -8%, rgba(15, 118, 110, 0.12), transparent 55%),
    radial-gradient(640px 320px at 92% 8%, rgba(20, 184, 166, 0.08), transparent 50%),
    linear-gradient(165deg, #e8f2f1 0%, #f0f5f5 45%, #e4eeee 100%);
}
code, pre, .mail-plain { font-family: var(--font-mono); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  position: relative;
}
.brand::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  bottom: 0.85rem;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, var(--accent), var(--brand-2));
}
.brand:hover { text-decoration: none; color: inherit; }
.brand-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
}
.brand-logo {
  width: 28px;
  height: 28px;
  filter: none;
}
.brand-text strong {
  display: block;
  font-weight: 650;
  font-size: 0.86rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.brand-text span {
  display: block;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 0.12rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sidebar-spacer { flex: 1; min-height: 0.5rem; }
.sidebar nav {
  padding: 0.25rem 0.5rem 0.4rem;
  flex: 0 0 auto;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  padding: 0.42rem 0.6rem;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.84rem;
  font-weight: 500;
  margin-bottom: 1px;
  transition: background .12s ease, color .12s ease;
}
.sidebar nav a:hover {
  color: var(--text);
  background: var(--panel2);
  text-decoration: none;
}
.sidebar nav a.on {
  color: var(--text);
  background: var(--accent-soft);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--accent);
}
[data-theme="light"] .sidebar nav a.on {
  color: var(--accent-2);
}
.sidebar-foot {
  padding: 0.65rem 0.75rem 0.9rem;
  border-top: 1px solid var(--line);
}
.theme-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--panel2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 4px;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
}

.shell { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.topbar h1 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.topbar .user {
  color: var(--muted);
  font-size: 0.85rem;
}

.main {
  flex: 1;
  padding: 1rem 1.25rem 1.75rem;
  max-width: none;
  width: 100%;
  min-width: 0;
}
.main.full {
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
body.embed-body {
  display: block;
  min-height: 100vh;
}
body.embed-body .embed-main {
  max-width: none;
  margin: 0;
  padding: 1rem 1.25rem 2rem;
  min-height: auto;
}

h1.page { font-size: 1.15rem; font-weight: 600; margin: 0 0 0.25rem; letter-spacing: -0.01em; }
.page-sub { color: var(--muted); margin: 0 0 0.9rem; font-size: 0.84rem; }
h2 {
  font-size: 0.72rem;
  margin: 1.25rem 0 0.55rem;
  color: var(--muted);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}
@media (max-width: 960px) {
  body { flex-direction: column; }
  .sidebar { width: 100%; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: 0.25rem; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.stat::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent);
  opacity: 0.55;
}
.stat.tone-ok::after { background: var(--ok); opacity: 0.85; }
.stat.tone-warn::after { background: var(--warn); opacity: 0.85; }
.stat.tone-bad::after { background: var(--bad); opacity: 0.85; }
.stat .label { color: var(--muted); font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.stat .value { font-size: 1.45rem; font-weight: 650; margin-top: 0.25rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

table { width: 100%; border-collapse: collapse; font-size: 0.82rem; table-layout: auto; }
th, td {
  text-align: left;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th {
  color: var(--muted);
  font-weight: 650;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  background: var(--panel2);
  position: sticky;
  top: 0;
  z-index: 1;
}
tr:hover td { background: var(--accent-soft); }
.score-ml {
  font-size: 0.68rem;
  margin-top: 0.1rem;
  font-weight: 500;
  white-space: nowrap;
}
.col-grow { width: 36%; min-width: 10rem; }
.col-score { width: 4.2rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.col-subject, td.col-grow { word-break: break-word; }

.badge {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  border-radius: 3px;
  font-size: 0.68rem;
  font-weight: 650;
  background: var(--panel2);
  color: var(--muted);
  letter-spacing: 0.01em;
}
.badge.muted,
.badge.neutral { background: var(--neutral-soft); color: var(--neutral); }
.badge.ok,
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.warn,
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.badge.bad,
.badge.critical { background: var(--critical-soft); color: var(--critical); }
.badge.info { background: var(--info-soft); color: var(--info); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  height: var(--ctrl-h);
  min-height: var(--ctrl-h);
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--text);
  padding: 0 var(--ctrl-pad-x);
  border-radius: var(--radius);
  font-size: var(--ctrl-fs);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.primary {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: #fff;
  font-weight: 650;
}
[data-theme="light"] .btn.primary {
  color: #fff;
  background: var(--accent);
}
.btn-block { width: 100%; height: auto; min-height: 2.6rem; padding: 0.65rem 1rem; font-size: 0.9rem; }
.btn.ok,
.btn.success { background: var(--success-soft); border-color: var(--success); color: var(--success); }
.btn.warn,
.btn.warning { background: var(--warning-soft); border-color: var(--warning); color: var(--warning); }
.btn.bad,
.btn.critical { background: var(--critical-soft); border-color: var(--critical); color: var(--critical); }
.btn.info { background: var(--info-soft); border-color: var(--info); color: var(--info); }
.btn.sm {
  height: var(--ctrl-h-sm);
  min-height: var(--ctrl-h-sm);
  padding: 0 0.55rem;
  font-size: var(--ctrl-fs-sm);
  border-radius: 4px;
}
.btn.disabled, .btn[aria-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
}

.form-row { margin-bottom: 0.85rem; max-width: 42rem; }
.form-row label { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 600; margin-bottom: 0.3rem; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
select,
textarea {
  width: 100%;
  max-width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius);
  padding: 0 var(--ctrl-pad-x);
  font: inherit;
  font-size: var(--ctrl-fs);
  line-height: 1.35;
  box-sizing: border-box;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
select {
  height: var(--ctrl-h);
  min-height: var(--ctrl-h);
}
textarea {
  height: auto;
  min-height: 4.5rem;
  padding: 0.55rem var(--ctrl-pad-x);
  resize: vertical;
  line-height: 1.45;
}
input[type="checkbox"],
input[type="radio"] {
  width: 1rem;
  height: 1rem;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
  flex-shrink: 0;
}
input[type="number"] { max-width: 8rem; }
select { appearance: none; background-image: none; cursor: pointer; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
  align-items: end;
}
.filters .form-row {
  margin: 0;
  min-width: 11rem;
  max-width: 18rem;
  flex: 1 1 11rem;
}
.filters .form-row.grow {
  max-width: 28rem;
  flex: 1 1 16rem;
}
.filters > .btn,
.filters > a.btn {
  flex: 0 0 auto;
  margin-bottom: 1px; /* label hizasını butonda dengele */
}
.flash {
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  background: var(--panel2);
  border: 1px solid var(--line);
  font-size: 0.9rem;
}
.flash.ok { border-color: var(--success); background: var(--success-soft); }
.flash.err,
.flash.critical { border-color: var(--critical); background: var(--critical-soft); }
.flash.warn { border-color: var(--warning); background: var(--warning-soft); }

.muted { color: var(--muted); }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 1rem 0;
  align-items: center;
}
td.actions, th.actions {
  margin: 0;
  white-space: nowrap;
  width: 1%;
}
td.actions .btn,
td.actions form {
  display: inline-flex;
  vertical-align: middle;
}
td.actions form { margin: 0; }

/* Karantina: 2 satır kompakt aksiyonlar */
td.q-actions {
  white-space: normal;
  width: auto;
  min-width: 15rem;
  max-width: 20rem;
  vertical-align: middle;
}
td.q-actions .q-act-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.28rem;
  align-items: center;
  margin: 0 0 0.28rem;
}
td.q-actions .q-act-row:last-child { margin-bottom: 0; }
td.q-actions .q-act-row form {
  display: inline-flex;
  margin: 0;
}
td.q-actions .btn.sm {
  padding: 0 0.45rem;
  font-size: 0.72rem;
}
.bar { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; margin-top: 0.35rem; }
.bar > span { display: block; height: 100%; background: var(--accent); }
.score-high { color: var(--bad); font-weight: 650; }
.score-mid { color: var(--warn); font-weight: 600; }
.score-low { color: var(--ok); font-weight: 600; }

/* Outlook-like reader */
.mail-reader {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.mail-reader-head {
  padding: 1.25rem 1.4rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--panel2);
}
.mail-reader-head .subject {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.85rem;
  line-height: 1.3;
}
.mail-meta-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.25rem 0.75rem;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}
.mail-meta-row .k { color: var(--muted); font-weight: 600; }
.mail-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.relay-pick {
  margin: 0;
  padding: 0.75rem 1.25rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.relay-pick-head {
  font-size: 0.82rem;
  font-weight: 650;
  margin-bottom: 0.45rem;
}
.relay-pick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
  margin-bottom: 0.65rem;
}
.relay-rcpt-lab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  margin: 0;
}
.mail-hint {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0 1.25rem 0.75rem;
}
.mail-frame-wrap {
  background: var(--mail-bg);
  min-height: 320px;
}
.mail-frame {
  width: 100%;
  min-height: 420px;
  border: 0;
  background: var(--mail-bg);
  color: var(--mail-text);
}
.mail-plain {
  white-space: pre-wrap;
  word-break: break-word;
  padding: 1.35rem 1.5rem;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--mail-text);
  background: var(--mail-bg);
  font-family: var(--font);
}
.view-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.65rem 1.25rem 0;
  background: var(--panel);
}
.view-tabs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0.45rem 0.75rem;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
}
.view-tabs button.on {
  background: var(--mail-bg);
  color: var(--text);
}
.mail-body-legacy {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  max-height: 55vh;
  overflow: auto;
  font-size: 0.85rem;
  line-height: 1.45;
}

/* —— Production shell —— */
.nav-section {
  padding: 0.85rem 1.15rem 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.85;
}
.sidebar nav a svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.85;
}
.sidebar nav a.on svg { opacity: 1; }
.nav-badge {
  margin-left: auto;
  background: var(--bad);
  color: #fff;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-logout {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.45rem 0.15rem 0.7rem;
}
.nav-logout svg { width: 18px; height: 18px; }
.nav-logout:hover { color: var(--text); text-decoration: none; }

/* —— Auth / login —— */
.auth-shell {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}
.auth-shell-split {
  max-width: 860px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(45, 212, 191, 0.22);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
  background: var(--panel);
}
[data-theme="light"] .auth-shell-split {
  border-color: var(--line);
  box-shadow: 0 18px 40px rgba(15, 31, 30, 0.1);
}
.auth-aside {
  display: flex;
  align-items: stretch;
  background:
    radial-gradient(420px 240px at 20% 0%, rgba(45, 212, 191, 0.22), transparent 60%),
    linear-gradient(165deg, #0a1214 0%, #134e4a 55%, #0f1a1c 100%);
  color: #e7f0f0;
  padding: 2rem 1.6rem;
}
.auth-aside-inner {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  justify-content: center;
}
.auth-aside img { margin-bottom: 0.35rem; }
.auth-aside strong {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.auth-aside p {
  margin: 0;
  color: #a7c2c0;
  font-size: 0.9rem;
  line-height: 1.45;
  max-width: 26ch;
}
.auth-aside-points {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.auth-aside-points li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.82rem;
  color: #d5e8e6;
  font-weight: 500;
}
.auth-aside-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #2dd4bf;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.18);
}
.auth-shell-split .auth-panel {
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  background: var(--panel);
  padding: 2rem 1.75rem 1.5rem;
}
.auth-panel {
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: 16px;
  padding: 2rem 1.75rem 1.5rem;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03) inset,
    0 24px 48px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}
.login-brand {
  text-align: left;
  margin-bottom: 1.35rem;
}
.auth-shell-split .login-brand { text-align: left; }
.login-brand img {
  display: block;
  margin: 0 0 0.85rem;
  filter: drop-shadow(0 8px 20px rgba(13, 148, 136, 0.4));
}
.login-brand h1 {
  margin: 0 0 0.35rem;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.login-brand p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}
.auth-brand-mark-sm {
  width: 48px;
  height: 48px;
  margin: 0 0 0.85rem;
  border-radius: 10px;
}
.auth-foot {
  margin: 1.25rem 0 0;
  text-align: left;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.5;
}
.auth-foot a { font-weight: 550; }
.auth-sep { margin: 0 0.35rem; opacity: 0.55; }
.auth-foot-plain { text-transform: none; letter-spacing: 0; }
@media (max-width: 760px) {
  .auth-shell-split {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
  .auth-aside { display: none; }
  .auth-shell-split .login-brand,
  .auth-shell-split .auth-foot { text-align: center; }
  .auth-brand-mark-sm { margin-left: auto; margin-right: auto; }
}

.topbar-title { min-width: 0; }
.topbar-sub {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0.45rem 0.2rem 0.25rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel2);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
}
.pill.live .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(52,199,138,0.2);
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.user-name { font-size: 0.85rem; color: var(--muted); }

.page-hero,
.dash-hero,
.rep-hero,
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.page-hero-copy,
.dash-hero-copy { min-width: 0; flex: 1; }
.page-kicker,
.dash-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.page-hero .page-sub,
.dash-hero .page-sub,
.rep-hero .page-sub,
.page-head .page-sub { margin-bottom: 0; }
.page-hero-actions,
.dash-actions,
.rep-period {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.page-hero .page,
.dash-hero .page,
.rep-hero .page,
.page-head .page { margin: 0 0 0.25rem; }
.empty-state {
  padding: 1.25rem 0.75rem;
  text-align: center;
}
.empty-state.compact { padding: 1.1rem 0.5rem; }
.empty-state strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}
.empty-state p {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.stat .stat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stat-icon {
  color: var(--muted);
  display: flex;
}
.stat-icon svg { width: 18px; height: 18px; }
.stat-foot {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.stat.tone-ok { border-color: rgba(52,199,138,0.35); }
.stat.tone-warn { border-color: rgba(226,179,64,0.4); }
.stat.tone-bad { border-color: rgba(239,95,95,0.35); }
.stat.tone-ok .value { color: var(--ok); }
.stat.tone-warn .value { color: var(--warn); }
.stat.tone-bad .value { color: var(--bad); }

.dash-split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (max-width: 960px) {
  .dash-split { grid-template-columns: 1fr; }
  .user-name { display: none; }
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.card-head h2 {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 650;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
  height: 160px;
  padding: 0.25rem 0.15rem 0;
}
.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 0.4rem;
}
.bar-stack {
  width: 100%;
  max-width: 36px;
  background: var(--accent-soft);
  border-radius: 6px 6px 2px 2px;
  position: relative;
  overflow: hidden;
}
.bar-q {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--warn);
  border-radius: 0;
}
.bar-lab {
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 600;
}
.chart-legend {
  display: flex;
  gap: 1rem;
  margin-top: 0.85rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.lg {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.lg-total { background: var(--accent); opacity: 0.5; }
.lg-q { background: var(--warn); }

.dist-row {
  display: grid;
  grid-template-columns: 88px 1fr 48px;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}
.dist-track {
  height: 8px;
  background: var(--bg);
  border-radius: 99px;
  overflow: hidden;
}
.dist-track > span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
}
.dist-track > span.out { background: var(--info); }
.dist-track > span.bad { background: var(--bad); }
.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.mini-stats.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 720px) {
  .mini-stats.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.mini-stats div { display: flex; flex-direction: column; gap: 0.2rem; }
.mini-stats strong { font-size: 1.1rem; }
.mini-stats .muted { font-size: 0.72rem; }

/* Marketing / SaaS home */
.mkt { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem 3rem; }
.mkt-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 0 0.5rem; gap: 1rem; flex-wrap: wrap;
}
.mkt-brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--text); font-weight: 650; }
.mkt-nav nav { display: flex; gap: 0.85rem; align-items: center; flex-wrap: wrap; }
.mkt-nav nav a { color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.mkt-nav nav a:hover { color: var(--text); }
.mkt-hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2rem; align-items: center;
  min-height: min(70vh, 560px); padding: 2rem 0 3rem;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 80%, color-mix(in srgb, #0d9488 12%, transparent), transparent 50%);
}
.mkt-kicker { font-size: 0.85rem; font-weight: 600; color: var(--accent); letter-spacing: 0.04em; text-transform: uppercase; margin: 0 0 0.5rem; }
.mkt-hero h1 { font-size: clamp(1.8rem, 4vw, 2.75rem); line-height: 1.15; letter-spacing: -0.03em; margin: 0 0 0.75rem; }
.mkt-lead { color: var(--muted); font-size: 1.05rem; max-width: 36rem; line-height: 1.55; margin: 0 0 1.5rem; }
.mkt-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.mkt-hero-visual { position: relative; min-height: 220px; }
.mkt-orbit {
  position: absolute; inset: 10% 15%; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  animation: mktPulse 6s ease-in-out infinite;
}
.mkt-panel-mock {
  position: relative; margin: 12% auto; max-width: 280px; padding: 1rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.mkt-panel-mock .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: 4px; opacity: .5; }
.mkt-bars { display: flex; align-items: flex-end; gap: 8px; height: 100px; margin-top: 1rem; }
.mkt-bars i { flex: 1; height: var(--h); background: linear-gradient(180deg, var(--accent), transparent); border-radius: 6px 6px 2px 2px; opacity: .85; }
@keyframes mktPulse { 0%,100% { transform: scale(1); opacity: .7; } 50% { transform: scale(1.04); opacity: 1; } }
.mkt-plans h2 { margin: 0 0 0.35rem; font-size: 1.4rem; letter-spacing: -0.02em; }
.mkt-plan-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.25rem;
}
.mkt-plan {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.25rem;
  display: flex; flex-direction: column; gap: 0.65rem;
}
.mkt-plan.is-free { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.mkt-plan h3 { margin: 0; font-size: 1.1rem; }
.mkt-price { font-weight: 700; color: var(--accent); font-size: 1.05rem; }
.mkt-plan ul { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.88rem; flex: 1; }
.mkt-plan li { margin: 0.25rem 0; }
.mkt-foot {
  display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem;
  padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem;
}
.mkt-foot a { color: var(--muted); }
.auth-main .mkt { max-width: none; padding: 0 1.5rem 2rem; }
.form-row label.check { display: flex; align-items: flex-start; gap: 0.5rem; font-weight: 500; }
@media (max-width: 800px) {
  .mkt-hero { grid-template-columns: 1fr; min-height: auto; }
  .mkt-hero-visual { display: none; }
}

.lang-switch { display: inline-flex; align-items: center; gap: 0.35rem; }
.lang-switch .lang-a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 650;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
}
.lang-switch .lang-a.on { color: var(--text); background: var(--panel2); }
.lang-switch-panel { margin-bottom: 0.55rem; padding: 0 0.15rem; }
.lang-sep { opacity: 0.45; font-size: 0.75rem; }
.auth-lang { position: absolute; top: 1rem; right: 1.25rem; z-index: 5; }
.auth-body { position: relative; }


.tpl-tabs { display:flex; gap:0.35rem; margin:1rem 0 0.25rem; }
.tpl-tab {
  appearance:none; border:1px solid var(--border); background:var(--panel2);
  color:var(--muted); padding:0.4rem 0.9rem; border-radius:8px; cursor:pointer; font-weight:600;
}
.tpl-tab.on { color:var(--text); background:var(--accent-soft, #1e3a5f); border-color:var(--accent, #3b82f6); }
.lg-lang { position:absolute; top:16px; right:16px; }
.lg-wrap { position:relative; width:100%; max-width:560px; }


/* —— Reports —— */
.rep-hero {
  /* page-hero ile aynı yüzey; dönem seçici sağda kalır */
  padding-bottom: 1rem;
}
.rep-period {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.2rem;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.rep-period-a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 650;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
}
.rep-period-a:hover { color: var(--text); text-decoration: none; }
.rep-period-a.on {
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}
.rep-kpis { margin-bottom: 1rem; }
.rep-grid-main {
  display: grid;
  grid-template-columns: 1.55fr 0.85fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.rep-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (max-width: 960px) {
  .rep-grid-main, .rep-grid-2 { grid-template-columns: 1fr; }
}
.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 {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  position: relative;
}
.rep-hour-bar {
  width: 100%;
  max-width: 14px;
  background: linear-gradient(180deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 55%, var(--panel2)) 100%);
  border-radius: 4px 4px 1px 1px;
  min-height: 2px;
}
.rep-hour-lab {
  position: absolute;
  bottom: -1.2rem;
  font-size: 0.62rem;
  color: var(--muted);
  font-weight: 600;
}

/* —— Enterprise ops console —— */
.ops-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.55rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: calc(var(--ctrl-h) + 1.1rem);
}
.ops-toolbar .muted { font-size: 0.78rem; }
.ops-toolbar .btn { height: var(--ctrl-h-sm); min-height: var(--ctrl-h-sm); font-size: var(--ctrl-fs-sm); }
.ops-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}
.card.ops-card { padding: 0; overflow: auto; max-height: calc(100vh - 220px); }
table.ops {
  font-size: 0.82rem;
}
table.ops th, table.ops td {
  padding: 0.4rem 0.55rem;
  vertical-align: middle;
}
table.ops td.actions {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}
table.domain-table { table-layout: fixed; }
table.domain-table th:nth-child(1),
table.domain-table td:nth-child(1) { width: 38%; }
table.domain-table th:nth-child(2),
table.domain-table td:nth-child(2) { width: 34%; }
table.domain-table th:nth-child(3),
table.domain-table td:nth-child(3) { width: 6.5rem; }
table.domain-table td.actions {
  white-space: normal;
  width: auto;
}
table.domain-table td.actions .dom-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}
table.domain-table .dom-meta {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
  word-break: break-all;
}
table.domain-table .ip-line {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  margin-top: 0.35rem;
}
table.domain-table .ip-line input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 1.85rem;
  font-size: 0.78rem;
}
table.ops td.mono, .mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.25rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.08rem 0.35rem;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--muted);
  white-space: nowrap;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chip.ok { border-color: rgba(34,197,94,0.35); color: var(--ok); background: rgba(34,197,94,0.08); }
.chip.warn { border-color: rgba(234,179,8,0.4); color: var(--warn); background: rgba(234,179,8,0.1); }
.chip.bad { border-color: rgba(239,68,68,0.4); color: var(--bad); background: rgba(239,68,68,0.1); }
.chip.info { border-color: rgba(56,189,248,0.35); color: var(--info); background: rgba(56,189,248,0.08); }
.sev {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
  background: var(--muted);
}
.sev.high,
.sev.critical { background: var(--critical); }
.sev.mid,
.sev.warning { background: var(--warning); }
.sev.low,
.sev.success { background: var(--success); }
.sev.info { background: var(--info); }
.subj-line { font-weight: 550; color: var(--text); }
.subj-line:hover { color: var(--accent); }
.auth-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: none;
}
.auth-shell-split .auth-panel {
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.login-brand img { filter: none; }
.dash-hero { box-shadow: var(--shadow); }
.pill {
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pill.live .dot { box-shadow: none; }
.avatar { border-radius: 4px; }
.page-hero,
.dash-hero,
.rep-hero,
.page-head { margin-bottom: 0.85rem; }
.kpi-strip,
.soc-banner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.95rem;
}
.kpi-strip .kpi,
.soc-banner > span:not(.sep) {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.7rem 0.85rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.75rem;
  color: var(--muted);
}
.kpi-strip .kpi.tone-success { border-top: 2px solid var(--success); }
.kpi-strip .kpi.tone-warning { border-top: 2px solid var(--warning); }
.kpi-strip .kpi.tone-critical { border-top: 2px solid var(--critical); }
.kpi-strip .kpi.tone-info { border-top: 2px solid var(--info); }
.kpi-strip .kpi.tone-neutral { border-top: 2px solid var(--line); }
.kpi-strip .kpi strong,
.soc-banner strong {
  font-size: 1.15rem;
  font-weight: 650;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.soc-banner .sep { display: none; }
@media (max-width: 720px) {
  .kpi-strip,
  .soc-banner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 0.85rem;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(20, 184, 166, 0.22), rgba(15, 118, 110, 0.08));
  border: 1px solid rgba(20, 184, 166, 0.35);
}
.brand-mark img { margin: 0 !important; filter: none !important; }
.q-toolbar-readonly {
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.65rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.82rem;
}

/* v10 — kurumsal düzen */
.page-head { margin-bottom: 1rem; }
.page-head .page { margin: 0 0 0.25rem; }
.card-title {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
}
.section-title {
  margin: 1.5rem 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem 0.85rem;
  align-items: end;
}
.form-grid .form-row {
  margin: 0;
  max-width: none;
}
.form-section {
  margin: 1.25rem 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.form-hint { margin: 0 0 0.65rem; font-size: 0.82rem; }
.form-actions { margin-top: 0.85rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-top: 0.85rem;
}
.table-card { padding: 0; overflow: auto; }
.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0;
}
.preset-row { display: flex; gap: 0.35rem; margin-top: 0.35rem; flex-wrap: wrap; }
.nav-section {
  padding: 0.75rem 1rem 0.2rem;
  font-size: 0.65rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.nav-badge.warn {
  background: var(--warn);
  color: #111;
}
.nav-account {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  padding: 0.42rem 0.6rem;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.84rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}
.nav-account:hover, .nav-account.on {
  color: var(--text);
  background: var(--panel2);
  text-decoration: none;
}
.pill.down { opacity: 0.85; }
.pill.down .dot { background: var(--bad); }
.setup-progress {
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.65rem;
  max-width: 280px;
  min-width: 160px;
  width: 220px;
}
.page-hero-actions .setup-progress { margin-top: 0; align-self: center; }
.setup-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
}
.setup-list { display: flex; flex-direction: column; gap: 0.65rem; margin-bottom: 1rem; }
.setup-item {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  gap: 0.85rem;
  align-items: center;
  margin: 0;
  padding: 0.85rem 1rem;
}
.setup-status {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.setup-item.is-ok .setup-status { color: var(--ok); }
.setup-item.is-todo .setup-status { color: var(--warn); }
body.auth-body {
  background: var(--bg);
}
[data-theme="dark"] body.auth-body {
  background: #0b1220;
}
@media (max-width: 720px) {
  .setup-item { grid-template-columns: 1fr; }
}

/* —— Politika / DLP form düzeni —— */
.policy-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 1.15rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}
.policy-tab {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--muted);
  border-radius: var(--radius);
  height: var(--ctrl-h);
  padding: 0 0.85rem;
  font-size: var(--ctrl-fs);
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
a.policy-tab:hover { text-decoration: none; color: var(--text); border-color: var(--accent); }
.rep-tabs { margin-top: 0.25rem; }
.policy-tab.on {
  background: var(--accent-soft);
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: inset 0 -2px 0 var(--accent);
}
.policy-pane { display: none; }
.policy-pane.on { display: block; }
.policy-pane > h2:first-child { margin-top: 0; }

.dlp-detectors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  margin: 0.35rem 0 1rem;
  padding: 0.75rem 0.9rem;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.dlp-det {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  font-weight: 500;
  margin: 0;
  color: var(--text);
  cursor: pointer;
}

.dlp-rules { display: flex; flex-direction: column; gap: 0.55rem; margin-bottom: 0.65rem; }
.dlp-rule {
  margin: 0 !important;
  padding: 0.75rem 0.85rem !important;
}
.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: 0.5rem 0.55rem;
  align-items: end;
}
.dlp-rule-grid .form-row {
  margin: 0;
  max-width: none;
  min-width: 0;
}
.dlp-rule-grid input[type="number"] { max-width: none; }
.dlp-rule-remove {
  height: var(--ctrl-h);
  min-width: var(--ctrl-h);
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
}
@media (max-width: 1100px) {
  .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: 1fr; }
}

/* Ayarlar kartı: form alanları taşmasın */
form.card > .policy-tabs,
form.card > .policy-pane {
  max-width: none;
}
form.card .form-actions,
form.card > .btn.primary {
  margin-top: 1rem;
}

/* Sayfalama butonları filtreyle aynı hizada */
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.85rem;
}
.pager .btn { height: var(--ctrl-h-sm); min-height: var(--ctrl-h-sm); font-size: var(--ctrl-fs-sm); }

/* Inline form satırları (listeler, kullanıcı ekle) */
.inline-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.inline-form select {
  width: auto;
  min-width: 10rem;
  max-width: 16rem;
}
.inline-form .btn { flex: 0 0 auto; }

/* Tablo içi checkbox hücreleri */
table td:has(> input[type="checkbox"]),
table th:has(> input[type="checkbox"]) {
  width: 2.25rem;
  text-align: center;
}
table input[type="checkbox"] {
  vertical-align: middle;
}

/* —— Listeler —— */
.lists-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 900px) {
  .lists-grid { grid-template-columns: 1fr; }
}
.list-card .card-title { margin-bottom: 0.75rem; }
.sender-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sender-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 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.35rem;
  min-width: 0;
}
.sender-list-email {
  font-size: 0.84rem;
  word-break: break-all;
}
.sender-list-del { margin: 0; flex-shrink: 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* —— Dashboard mail pipeline —— */
.mail-pipe {
  padding: 0;
  overflow: hidden;
  margin-bottom: 1rem;
}
.mail-pipe-head {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.mail-pipe-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
}
.mail-pipe-live.is-busy {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}
.mail-pipe-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}
.mail-pipe-live.is-busy i {
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
  animation: pipe-pulse 1.8s ease-out infinite;
}
.mail-pipe-now {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  min-height: 1.2em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mail-pipe-track {
  position: relative;
  padding: 1rem 1.1rem 1.25rem;
  background:
    linear-gradient(180deg, var(--accent-soft), transparent 42%),
    var(--panel);
}
.mail-pipe-rail {
  position: relative;
  height: 32px;
  margin: 0 0.2rem 0.95rem;
  z-index: 2;
}
.mail-pipe-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--accent) 65%, var(--line)) 10%,
    color-mix(in srgb, var(--accent) 65%, var(--line)) 90%,
    transparent 100%
  );
}
.mail-pipe-packets {
  position: absolute;
  inset: 0;
  overflow: visible;
}
.mail-packet {
  position: absolute;
  top: 50%;
  left: 0;
  width: 16px;
  height: 12px;
  border-radius: 3px;
  background: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, #000);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transform: translate3d(0, -50%, 0);
  opacity: 0;
  will-change: transform, opacity;
  z-index: 3;
  pointer-events: none;
}
.mail-packet::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.65) 40%, rgba(255,255,255,0.65) 50%, transparent 50%);
  border-radius: inherit;
  pointer-events: none;
}
.mail-packet-ok {
  background: #16a34a;
  border-color: #14532d;
}
.mail-packet-warn {
  background: #ca8a04;
  border-color: #713f12;
}
.mail-packet-bad {
  background: #dc2626;
  border-color: #7f1d1d;
}
.mail-pipe-stages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  position: relative;
  z-index: 1;
}
.mail-pipe-stage {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-height: 7.2rem;
  box-shadow: var(--shadow);
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.mail-pipe-stage.is-active {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow);
  transform: translateY(-2px);
}
.mail-pipe-ico {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 0.35rem;
}
.mail-pipe-ico svg { width: 16px; height: 16px; }
.mail-pipe-stage strong {
  font-size: 0.86rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.mail-pipe-stage em {
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.mail-pipe-stage small {
  margin-top: auto;
  font-size: 0.72rem;
  color: var(--muted);
}
.mail-pipe-outcomes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.85rem;
  position: relative;
  z-index: 1;
}
.mail-pipe-out {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, background .15s ease;
}
.mail-pipe-out:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.mail-pipe-out strong {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mail-pipe-out span {
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.mail-pipe-out.ok span { color: var(--ok); }
.mail-pipe-out.warn span { color: var(--warn); }
.mail-pipe-out.bad span { color: var(--bad); }
.mail-pipe-out.ok { box-shadow: inset 3px 0 0 var(--ok); }
.mail-pipe-out.warn { box-shadow: inset 3px 0 0 var(--warn); }
.mail-pipe-out.bad { box-shadow: inset 3px 0 0 var(--bad); }
.mail-pipe-out.is-hit {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  transform: scale(1.02);
}
.mail-pipe-out span { transition: transform .2s ease; }
.mail-pipe-out.is-hit span { transform: scale(1.08); }

@keyframes pipe-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
@media (max-width: 960px) {
  .mail-pipe-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .mail-pipe-outcomes { grid-template-columns: 1fr; }
  .mail-pipe-rail { margin-bottom: 0.65rem; }
}

