/* =========================================================
   Domain & Proxy İzleyici — arayüz stilleri
   ========================================================= */

:root {
  --bg: #080c12;
  --bg-soft: #0d131c;
  --panel: #111925;
  --panel-2: #16202d;
  --line: #1e2b3c;
  --line-soft: #182334;
  --text: #e9eff8;
  --muted: #8598ae;
  --dim: #5c6f86;
  --accent: #34d399;
  --accent-2: #22d3ee;
  --red: #f87171;
  --amber: #fbbf24;
  --blue: #60a5fa;
  --radius: 16px;
  --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
  --mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, "Cascadia Code", monospace;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 40px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 520px at 8% -12%, rgba(52, 211, 153, 0.12), transparent 62%),
    radial-gradient(900px 560px at 96% 2%, rgba(34, 211, 238, 0.09), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(96, 165, 250, 0.07), transparent 65%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 78%);
  pointer-events: none;
}

::selection { background: rgba(52, 211, 153, 0.28); }

a { color: inherit; }

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

/* ----------------------------- üst bar ----------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 34px;
  background: rgba(8, 12, 18, 0.72);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid rgba(30, 43, 60, 0.75);
}

.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }

.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--accent);
  background: linear-gradient(160deg, rgba(52, 211, 153, 0.18), rgba(34, 211, 238, 0.05));
  border: 1px solid rgba(52, 211, 153, 0.28);
  box-shadow: 0 0 26px -8px rgba(52, 211, 153, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand-text h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.brand-text p {
  margin: 1px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.conn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(13, 19, 28, 0.7);
  white-space: nowrap;
}

.conn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.12);
}

.conn.ok .conn-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.14), 0 0 10px rgba(52, 211, 153, 0.7);
}

.conn.bad .conn-dot {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.14);
}

/* ----------------------------- butonlar ----------------------------- */

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #182434, #131d29);
  color: var(--text);
  font-weight: 550;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.12s ease, box-shadow 0.16s ease;
  white-space: nowrap;
}

.btn:hover {
  border-color: #2b3d55;
  background: linear-gradient(180deg, #1c2a3d, #16202e);
}

.btn:active { transform: translateY(1px); }

.btn:focus-visible {
  outline: 2px solid rgba(52, 211, 153, 0.65);
  outline-offset: 2px;
}

.btn.primary {
  border-color: rgba(52, 211, 153, 0.5);
  background: linear-gradient(180deg, #3ee0a5, #22b981);
  color: #04231a;
  font-weight: 650;
  box-shadow: 0 8px 24px -12px rgba(52, 211, 153, 0.9);
}

.btn.primary:hover {
  background: linear-gradient(180deg, #52e8b2, #2ac48b);
  border-color: rgba(52, 211, 153, 0.7);
}

.btn.ghost { background: rgba(17, 25, 37, 0.55); }

.btn.danger {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(248, 113, 113, 0.07);
}

.btn.danger:hover { background: rgba(248, 113, 113, 0.13); }

.btn.tiny { padding: 6px 10px; font-size: 12px; border-radius: 8px; }

.btn[disabled] { opacity: 0.55; pointer-events: none; }

.btn.loading::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: spin 0.7s linear infinite;
}

.icon-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 9px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease;
}

.icon-btn:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }

/* ----------------------------- özet ----------------------------- */

main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 26px 34px 10px;
}

.summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.summary-card {
  position: relative;
  overflow: hidden;
  padding: 15px 17px 14px;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: linear-gradient(165deg, rgba(22, 32, 45, 0.92), rgba(13, 19, 28, 0.9));
  box-shadow: var(--shadow);
}

.summary-card::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -40px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--tone, var(--accent));
  opacity: 0.07;
  filter: blur(6px);
}

.summary-card .s-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 600;
}

.summary-card .s-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tone, var(--accent));
  box-shadow: 0 0 8px var(--tone, var(--accent));
}

.summary-card .s-value {
  margin-top: 7px;
  font-size: 27px;
  font-weight: 680;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.summary-card .s-value small {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  margin-left: 3px;
  letter-spacing: 0;
}

.summary-card .s-hint {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ----------------------------- liste başlığı ----------------------------- */

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  border: 1px solid var(--line-soft);
  background: rgba(13, 19, 28, 0.75);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.tab b {
  font-weight: 600;
  color: var(--dim);
  margin-left: 5px;
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
}

.tab:hover { color: var(--text); }

.tab.active {
  background: linear-gradient(180deg, #1b2838, #16212f);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.tab.active b { color: var(--accent); }

.list-tools { display: flex; align-items: center; gap: 9px; }

.search {
  width: 230px;
  padding: 9px 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(13, 19, 28, 0.8);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search::placeholder { color: var(--dim); }

.search:focus {
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12);
}

/* ----------------------------- panel kartları ----------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(332px, 1fr));
  gap: 14px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: linear-gradient(168deg, rgba(20, 29, 42, 0.96), rgba(12, 18, 27, 0.96));
  box-shadow: var(--shadow);
  animation: cardIn 0.28s ease both;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  border-color: #26374d;
  transform: translateY(-2px);
  box-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.95);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, transparent, var(--tone, var(--blue)) 35%, var(--tone, var(--blue)) 65%, transparent);
  opacity: 0.75;
}

.card.state-up { --tone: var(--accent); }
.card.state-down { --tone: var(--red); }
.card.state-warn { --tone: var(--amber); }
.card.state-paused { --tone: #64748b; }
.card.state-unknown { --tone: var(--blue); }

.card.state-down {
  border-color: rgba(248, 113, 113, 0.24);
  background: linear-gradient(168deg, rgba(36, 21, 26, 0.94), rgba(15, 13, 18, 0.96));
}

.card.checking { opacity: 0.82; }

.card-top { display: flex; align-items: flex-start; gap: 10px; }

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 6px;
  flex: 0 0 auto;
  background: var(--tone, var(--blue));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone, var(--blue)) 14%, transparent);
}

.card.state-up .dot { animation: pulse 2.4s ease-out infinite; }

.titles { min-width: 0; flex: 1; }

.name {
  font-weight: 620;
  font-size: 14.5px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.url {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--dim);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.url:hover { color: var(--accent-2); text-decoration: underline; }

.switch {
  appearance: none;
  flex: 0 0 auto;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #0b1119;
  position: relative;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
  margin-top: 1px;
  padding: 0;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #64748b;
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), background 0.18s ease;
}

.switch.on { background: rgba(52, 211, 153, 0.18); border-color: rgba(52, 211, 153, 0.45); }
.switch.on::after { transform: translateX(16px); background: var(--accent); }

.sparkwrap {
  height: 42px;
  padding: 4px 1px;
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), transparent),
    repeating-linear-gradient(90deg, transparent 0 11px, rgba(255, 255, 255, 0.022) 11px 12px);
  overflow: hidden;
}

.spark { display: block; width: 100%; height: 100%; }

.meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}

.badge.up { color: #6ee7b7; background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.25); }
.badge.down { color: #fca5a5; background: rgba(248, 113, 113, 0.11); border-color: rgba(248, 113, 113, 0.3); }
.badge.warn { color: #fcd34d; background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.28); }
.badge.paused { color: #94a3b8; background: rgba(148, 163, 184, 0.08); border-color: rgba(148, 163, 184, 0.2); }
.badge.unknown { color: #93c5fd; background: rgba(96, 165, 250, 0.09); border-color: rgba(96, 165, 250, 0.24); }

.badge .spin {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  animation: spin 0.7s linear infinite;
}

.latency {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.uptime {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.errline {
  margin: -4px 0 0;
  font-size: 11.8px;
  color: #fda4a4;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 11px;
  border-top: 1px solid var(--line-soft);
  margin-top: auto;
}

.timing {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.next {
  font-size: 11px;
  line-height: 1.45;
  color: var(--dim);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.card-actions { display: flex; gap: 6px; }

.x-btn {
  appearance: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s ease, color 0.15s ease;
}

.x-btn:hover { background: rgba(248, 113, 113, 0.1); color: #fca5a5; }

/* ----------------------------- boş durum ----------------------------- */

.empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 56px 28px;
  border-radius: var(--radius);
  border: 1px dashed #243349;
  background: rgba(13, 19, 28, 0.55);
}

.empty .big {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
  color: var(--accent);
  font-size: 24px;
  margin-bottom: 4px;
}

.empty h3 { margin: 0; font-size: 16px; font-weight: 600; }
.empty p { margin: 0; color: var(--muted); max-width: 460px; font-size: 13px; }
.empty .row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; justify-content: center; }

/* ----------------------------- uyarı geçmişi ----------------------------- */

.alerts-block { margin-top: 30px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-head h2 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }

.alerts {
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: rgba(13, 19, 28, 0.6);
  overflow: hidden;
}

.alert-row {
  display: grid;
  grid-template-columns: 74px 10px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
}

.alert-row:last-child { border-bottom: 0; }

.alert-row .a-time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.alert-row .a-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.alert-row.up .a-dot { background: var(--accent); }
.alert-row.test .a-dot { background: var(--blue); }

.alert-row .a-main { min-width: 0; }
.alert-row .a-name { font-weight: 600; }
.alert-row .a-msg { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-row.up .a-name { color: #6ee7b7; }
.alert-row.down .a-name { color: #fca5a5; }

.channels { display: flex; gap: 4px; align-items: center; }

.ch {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.02em;
  padding: 2px 5px;
  border-radius: 5px;
  border: 1px solid var(--line);
  color: var(--dim);
  white-space: nowrap;
}

.ch.ok { color: #6ee7b7; border-color: rgba(52, 211, 153, 0.25); background: rgba(52, 211, 153, 0.06); }
.ch.err { color: #fca5a5; border-color: rgba(248, 113, 113, 0.25); background: rgba(248, 113, 113, 0.06); }

.alerts-empty {
  padding: 22px;
  text-align: center;
  color: var(--dim);
  font-size: 12.5px;
}

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--dim);
  font-size: 11.5px;
  flex-wrap: wrap;
}

.foot span { font-family: var(--mono); font-size: 10.8px; }

/* ----------------------------- modallar ----------------------------- */

.modal {
  border: 1px solid #243349;
  border-radius: 18px;
  padding: 0;
  width: min(560px, calc(100vw - 32px));
  max-height: min(90vh, 860px);
  background: linear-gradient(170deg, #121a26, #0c121a);
  color: var(--text);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  overflow: hidden;
}

.modal.wide { width: min(760px, calc(100vw - 32px)); }

.modal[open] { display: flex; flex-direction: column; animation: modalIn 0.18s ease both; }

.modal::backdrop {
  background: rgba(3, 7, 12, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal form { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.modal-head h3 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.modal-head p { margin: 3px 0 0; font-size: 12px; }

.modal-body {
  padding: 18px 22px 8px;
  overflow-y: auto;
  min-height: 0;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--line-soft);
  background: rgba(9, 14, 21, 0.5);
}

.modal-foot.split { justify-content: space-between; }
.modal-foot .foot-right { display: flex; gap: 8px; }

/* ----------------------------- form ----------------------------- */

.field { margin-bottom: 14px; min-width: 0; }

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  color: var(--muted);
}

.req { color: var(--accent); }
.opt { color: var(--dim); font-weight: 500; text-transform: none; letter-spacing: 0; }

.field input[type="text"],
.field input[type="number"],
.field input[type="password"],
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0a1018;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-size: 13px;
}

.field textarea { resize: vertical; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; }

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12);
}

.field input::placeholder, .field textarea::placeholder { color: #445568; }

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

.hint { margin: 6px 0 0; font-size: 11.5px; color: var(--dim); line-height: 1.45; }

.hint code, .modal code {
  font-family: var(--mono);
  font-size: 10.8px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: #a7b8cc;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: rgba(10, 16, 24, 0.5);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.check-row:hover { border-color: #26374d; background: rgba(14, 21, 31, 0.7); }

.check-row input[type="checkbox"] {
  appearance: none;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border-radius: 5px;
  border: 1px solid #33475f;
  background: #0a1018;
  cursor: pointer;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.check-row input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.check-row input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 1.5px;
  width: 4px;
  height: 8px;
  border: solid #04231a;
  border-width: 0 2px 2px 0;
  transform: rotate(43deg);
}

.check-row b { display: block; font-size: 12.8px; font-weight: 600; }
.check-row small { display: block; color: var(--dim); font-size: 11.5px; margin-top: 1px; line-height: 1.4; }

.inline-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin: 4px 0 8px; }

.file-btn { cursor: pointer; }

.form-error {
  margin: 4px 0 10px;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.08);
  color: #fca5a5;
  font-size: 12.5px;
}

.muted { color: var(--muted); }

/* ----------------------------- ayarlar ----------------------------- */

.settings-body { padding-top: 4px; }

.settings-section {
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--line-soft);
}

.settings-section:last-of-type { border-bottom: 0; }

.settings-section h4 {
  margin: 0 0 11px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.info-list {
  margin: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11.5px;
}

.info-list > div { display: flex; gap: 10px; }

.info-list dt { color: var(--dim); min-width: 88px; }
.info-list dd { margin: 0; color: var(--muted); font-family: var(--mono); font-size: 10.8px; word-break: break-all; }

.bulk-result {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(10, 16, 24, 0.6);
  font-size: 12px;
  color: var(--muted);
  max-height: 140px;
  overflow-y: auto;
}

.bulk-result b { color: var(--text); }
.bulk-result .skip { color: #fca5a5; }

/* ----------------------------- toast ----------------------------- */

.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: min(370px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  gap: 11px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(16, 24, 35, 0.97);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.95);
  animation: toastIn 0.24s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
  backdrop-filter: blur(10px);
}

.toast.out { animation: toastOut 0.2s ease both; }

.toast .t-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex: 0 0 auto;
  background: var(--blue);
  box-shadow: 0 0 10px currentColor;
}

.toast.down { border-color: rgba(248, 113, 113, 0.35); }
.toast.down .t-dot { background: var(--red); color: var(--red); }
.toast.ok .t-dot { background: var(--accent); color: var(--accent); }
.toast.info .t-dot { background: var(--blue); color: var(--blue); }

.toast .t-title { font-size: 12.8px; font-weight: 650; }
.toast .t-msg { font-size: 11.8px; color: var(--muted); margin-top: 1px; line-height: 1.4; word-break: break-word; }

/* ----------------------------- animasyonlar ----------------------------- */

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.35); }
  70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(18px); }
}

/* ----------------------------- kaydırma çubuğu ----------------------------- */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1f2c3d; border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2a3b51; }

/* ----------------------------- duyarlı ----------------------------- */

@media (max-width: 1100px) {
  .summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .topbar { padding: 14px 16px; align-items: flex-start; flex-direction: column; gap: 12px; }
  .top-actions { width: 100%; justify-content: flex-start; }
  main { padding: 18px 16px 8px; }
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-text p { display: none; }
  .list-head { align-items: stretch; }
  .list-tools { width: 100%; }
  .search { flex: 1; width: auto; }
  .grid { grid-template-columns: 1fr; }
  .alert-row { grid-template-columns: 58px 8px 1fr; }
  .alert-row .channels { display: none; }
  .modal-foot.split { flex-direction: column-reverse; align-items: stretch; }
  .modal-foot .foot-right { justify-content: flex-end; }
  .conn { display: none; }
}

@media (max-width: 520px) {
  .summary { grid-template-columns: 1fr 1fr; gap: 9px; }
  .summary-card { padding: 12px 13px; }
  .summary-card .s-value { font-size: 22px; }
  .summary-card .s-hint { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .top-actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ----------------------------- kullanıcı çipi ----------------------------- */

.userchip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 5px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(13, 19, 28, 0.7);
  font-size: 12px;
  color: var(--muted);
}

.userchip .avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, rgba(52, 211, 153, 0.22), rgba(34, 211, 238, 0.1));
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: #a7f3d0;
  font-size: 11px;
  font-weight: 700;
}

.userchip .btn { padding: 4px 9px; font-size: 11px; border-radius: 999px; }

/* ----------------------------- giriş ekranı ----------------------------- */

.login-page {
  display: flex;
  min-height: 100vh;
  padding: 0;
  position: relative;
  overflow-x: hidden;
}

.login-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(640px 460px at 50% 6%, rgba(52, 211, 153, 0.16), transparent 65%),
    radial-gradient(720px 520px at 88% 96%, rgba(34, 211, 238, 0.1), transparent 62%),
    radial-gradient(560px 480px at 4% 92%, rgba(96, 165, 250, 0.09), transparent 65%);
}

.login-wrap {
  margin: auto;
  width: min(410px, calc(100vw - 32px));
  padding: 44px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.login-card {
  width: 100%;
  padding: 32px 30px 26px;
  border-radius: 20px;
  border: 1px solid #223247;
  background: linear-gradient(168deg, rgba(20, 29, 42, 0.97), rgba(11, 17, 25, 0.98));
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  animation: modalIn 0.3s ease both;
}

.login-mark {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  margin-bottom: 18px;
}

.login-card h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.login-sub {
  margin: 4px 0 22px;
  color: var(--muted);
  font-size: 13px;
}

.login-btn {
  width: 100%;
  margin-top: 4px;
  padding: 11px 16px;
  font-size: 13.5px;
}

.login-note {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--dim);
  font-size: 11.5px;
  line-height: 1.55;
}

.login-note b { color: var(--muted); font-weight: 600; }

.login-foot {
  margin: 0;
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.02em;
}

@media (max-width: 520px) {
  .userchip span:not(.avatar) { display: none; }
  .login-card { padding: 26px 20px 22px; }
}

/* ----------------------------- domain / proxy türü ----------------------------- */

.seg {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #0a1018;
}

.seg button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.seg button:hover { color: var(--text); }

.seg button.active {
  background: linear-gradient(180deg, #1b2838, #16212f);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.kind-group[hidden] { display: none !important; }

.name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.name-row .name {
  flex: 1;
  min-width: 0;
}

.kind-tag {
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.055em;
  padding: 2px 5px;
  border-radius: 5px;
  border: 1px solid var(--line);
  color: var(--dim);
  line-height: 1.4;
}

.kind-tag.proxy {
  color: #c4b5fd;
  border-color: rgba(167, 139, 250, 0.32);
  background: rgba(167, 139, 250, 0.08);
}

.kind-tag.domain {
  color: #7dd3fc;
  border-color: rgba(125, 211, 252, 0.28);
  background: rgba(125, 211, 252, 0.06);
}

@media (max-width: 520px) {
  .seg { width: 100%; }
  .seg button { flex: 1; padding: 8px 10px; }
}

.kind-group .hint { margin-bottom: 12px; }
