/*
 * Namanagement panel 3.0 · Kayıtlar ve Sistem kayıtları sayfaları
 * Yalnızca style.css belirteçlerini kullanır (--bg --card --line --text --muted --accent …).
 * Sınıf önekleri: lg- (olay günlüğü), sy- (sistem kayıtları).
 */
:root {
  --lv-debug: #9a99b0;
  --lv-info: #88aeff;
  --lv-warn: #edb571;
  --lv-err: #f5929f;
  --sy-bg: #08090d;
}
:root[data-theme="light"] {
  --lv-debug: #6b6a80;
  --lv-info: #2a5cc2;
  --lv-warn: #9c540a;
  --lv-err: #bd2640;
  --sy-bg: #fbfbfe;
}

/* ----- Yerleşim ---------------------------------------------------------------- */
.lg-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}
.lg-col,
.lg-aside {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.lg-aside .settingsform {
  scroll-margin-top: 80px;
}
.pageactions .secondary span,
.lg-sm span {
  white-space: nowrap;
}

/* ----- Canlı göstergesi ---------------------------------------------------------- */
.lg-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--line2);
  background: var(--card2);
  color: var(--text2);
  white-space: nowrap;
}
.lg-live i {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--faint);
}
.lg-live.on {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 35%, var(--line2));
  background: color-mix(in srgb, var(--ok) 9%, var(--card2));
}
.lg-live.on i {
  background: var(--ok);
}
.lg-live.on i::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--ok);
  animation: lgPulse 1.8s var(--ease) infinite;
}
.lg-live.err {
  color: var(--warnc);
  border-color: color-mix(in srgb, var(--warnc) 40%, var(--line2));
}
.lg-live.err i {
  background: var(--warnc);
}
@keyframes lgPulse {
  from {
    opacity: 0.8;
    transform: scale(0.5);
  }
  to {
    opacity: 0;
    transform: scale(1.5);
  }
}

/* ----- Filtreler ---------------------------------------------------------------- */
.lg-filters,
.sy-tools {
  padding: 14px;
  display: grid;
  gap: 12px;
}
.lg-frow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.lg-frow .searchbox {
  flex: 2 1 240px;
  max-width: none;
}
.lg-user {
  flex: 1 1 210px;
  min-width: 0;
  max-width: 340px;
}
.lg-user .picker-box {
  min-height: 40px;
}
.lg-frow select {
  flex: 1 1 160px;
  width: auto;
  max-width: 240px;
  min-width: 0;
}
.lg-frow2 {
  justify-content: space-between;
}
.lg-spans button .ic {
  width: 13px;
  height: 13px;
  opacity: 0.7;
}
.lg-clearbtn .ic {
  width: 13px;
  height: 13px;
}
.lg-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.lg-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 9px;
  border-radius: 99px;
  border: 1px solid var(--line2);
  background: var(--card2);
  color: var(--text2);
  font-size: 12.5px;
  font-weight: 560;
  transition:
    transform 0.15s var(--ease),
    background-color 0.2s,
    border-color 0.2s,
    color 0.2s,
    box-shadow 0.2s;
}
.lg-cat .ic {
  width: 14px;
  height: 14px;
  color: var(--tone, var(--muted));
}
.lg-cat b {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 650;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  background: var(--bg);
  transition:
    background-color 0.2s,
    color 0.2s;
}
.lg-cat .lg-wait {
  opacity: 0.5;
}
.lg-cat:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--tone, var(--accent)) 55%, var(--line2));
  color: var(--text);
}
.lg-cat:active {
  transform: scale(0.95);
}
.lg-cat[aria-pressed="true"] {
  background: var(--tbg, var(--accent-soft));
  border-color: color-mix(in srgb, var(--tone, var(--accent)) 60%, transparent);
  color: var(--tone, var(--text));
  box-shadow: 0 6px 16px -12px var(--tone, var(--accent));
}
.lg-cat[aria-pressed="true"] b {
  background: color-mix(in srgb, var(--tone, var(--accent)) 22%, transparent);
  color: var(--tone, var(--text));
}
.lg-cat.all {
  --tone: var(--accent2);
  --tbg: var(--accent-soft);
}
.lg-cat.bump b {
  animation: lgBump 0.6s var(--spring);
}
@keyframes lgBump {
  40% {
    transform: scale(1.3);
    background: color-mix(in srgb, var(--tone, var(--accent)) 35%, transparent);
    color: var(--text);
  }
}

/* ----- Akış kartı ---------------------------------------------------------------- */
.lg-stream {
  padding: 0;
  overflow: clip;
  overflow-clip-margin: 8px;
}
.lg-streamhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px 10px 16px;
  border-bottom: 1px solid var(--line);
}
.lg-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.lg-count b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.lg-count small {
  font-size: 11.5px;
  color: var(--faint);
}
.lg-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.lg-keys {
  font-size: 12px;
  color: var(--faint);
  margin-right: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.lg-keys kbd {
  font-size: 10px;
  padding: 2px 5px;
  min-width: 0;
}
.lg-sm {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
  gap: 5px;
}
.lg-sm .ic {
  width: 14px;
  height: 14px;
}
.lg-tools .iconbtn {
  width: 32px;
  height: 32px;
}
.lg-tools .iconbtn:hover {
  background: var(--card2);
  color: var(--text);
}
.iconbtn.spinning .ic {
  animation: spin 0.6s linear;
}
.lg-pillwrap {
  position: sticky;
  top: 70px;
  z-index: 6;
  height: 0;
  display: flex;
  justify-content: center;
}
.lg-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  margin-top: 8px;
  padding: 0 14px 0 11px;
  border-radius: 99px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 650;
  box-shadow:
    0 12px 28px -10px color-mix(in srgb, var(--accent) 80%, transparent),
    0 0 0 4px color-mix(in srgb, var(--bg) 70%, transparent);
  transition:
    transform 0.15s var(--ease),
    filter 0.2s;
}
.lg-pill .ic {
  width: 15px;
  height: 15px;
}
.lg-pill:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.lg-pill.pop {
  animation: lgPillIn 0.45s var(--spring);
}
@keyframes lgPillIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.85);
  }
}
.lg-list {
  min-height: 120px;
  transition: opacity 0.2s;
}
.lg-list.lg-dim {
  opacity: 0.5;
  pointer-events: none;
}
.lg-list > .skelwrap,
.lg-list > .emptystate,
.lg-list > .errorstate {
  padding: 18px 16px;
}
.lg-dayhead {
  position: sticky;
  top: 60px;
  z-index: 4;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 16px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.3px;
  color: var(--text2);
}
.lg-day + .lg-day .lg-dayhead {
  border-top: 1px solid var(--line);
}
.lg-dayhead small {
  font-weight: 500;
  color: var(--faint);
}
.lg-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}
.lg-row {
  position: relative;
  border-top: 1px solid var(--line);
  scroll-margin: 110px 0 24px;
  transition: background-color 0.25s;
}
.lg-row:first-child {
  border-top: 0;
}
.lg-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--tone, var(--accent));
  opacity: 0;
  transform: scaleY(0.4);
  transition:
    opacity 0.2s,
    transform 0.25s var(--ease);
}
.lg-row:hover::before,
.lg-row.sel::before,
.lg-row.open::before {
  opacity: 1;
  transform: none;
}
.lg-line {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px 10px 16px;
  text-align: left;
  border-radius: 0;
  transition: background-color 0.15s;
}
.lg-line:hover {
  background: color-mix(in srgb, var(--card2) 80%, transparent);
}
.lg-line:focus-visible {
  outline-offset: -2px;
  border-radius: 6px;
}
.lg-row.sel > .lg-line {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.lg-row.open {
  background: color-mix(in srgb, var(--card2) 55%, transparent);
}
.lg-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.lg-sum {
  color: var(--text);
  font-size: 14px;
  font-weight: 540;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}
.lg-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 12px;
  color: var(--muted);
  min-width: 0;
}
.lg-meta .badge {
  font-size: 11px;
  padding: 1px 7px;
}
.lg-who,
.lg-ch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
}
.lg-who .ic,
.lg-ch .ic {
  width: 13px;
  height: 13px;
  flex: none;
  color: var(--faint);
}
.lg-who b,
.lg-ch {
  font-weight: 560;
  color: var(--text2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lg-who i {
  font-style: normal;
  color: var(--faint);
}
.lg-when {
  display: grid;
  justify-items: end;
  gap: 1px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.lg-when small {
  font: 500 11px/1.2 var(--mono);
  color: var(--faint);
}
.lg-chev .ic {
  width: 16px;
  height: 16px;
  color: var(--faint);
  transition: transform 0.25s var(--ease);
}
.lg-row.open .lg-chev .ic {
  transform: rotate(180deg);
  color: var(--text2);
}
.lg-sum mark,
.sy-msg mark,
.sy-exc mark {
  background: color-mix(in srgb, var(--accent) 34%, transparent);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}
.lg-row.is-new {
  animation:
    lgRowIn 0.5s var(--ease) backwards,
    lgGlow 2.4s ease-out;
}
@keyframes lgRowIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}
@keyframes lgGlow {
  from {
    background: color-mix(in srgb, var(--accent) 16%, transparent);
  }
}
.lg-row.lg-flash {
  animation: lgFlash 1.8s var(--ease);
}
@keyframes lgFlash {
  0%,
  35% {
    box-shadow: inset 0 0 0 2px var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
  }
}

/* ----- Ayrıntı paneli -------------------------------------------------------------- */
.lg-detail {
  padding: 2px 16px 16px 60px;
  animation: lgOpen 0.28s var(--ease);
}
@keyframes lgOpen {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}
.lg-dgrid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 1fr);
  gap: 14px 22px;
  align-items: start;
}
.lg-dmain {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.lg-dfacts {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}
.lg-sec h4 {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--faint);
}
.lg-kv {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 14px;
  margin: 0;
  font-size: 13px;
}
.lg-kv dt {
  color: var(--muted);
}
.lg-kv dd {
  margin: 0;
  color: var(--text2);
  min-width: 0;
  overflow-wrap: anywhere;
}
.lg-kv .copybtn {
  width: 20px;
  height: 20px;
  margin-left: 0;
}
.lg-person {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 6px;
  min-width: 0;
}
.lg-person b {
  color: var(--text);
  font-weight: 600;
}
.lg-person .mono {
  font-size: 11.5px;
}
.lg-person > .ic {
  width: 14px;
  height: 14px;
  color: var(--faint);
}
.lg-quote {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--line2);
  border-radius: 4px 9px 9px 4px;
  background: var(--input);
  color: var(--text);
  font-size: 13.5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 280px;
  overflow: auto;
}
.lg-quote.bad {
  border-left-color: var(--bad);
}
.lg-quote.good {
  border-left-color: var(--ok);
}
.lg-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.lg-note .ic {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 2px;
}
.lg-diff {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.lg-dside {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--input);
  padding: 8px 12px 10px;
  min-width: 0;
}
.lg-dside p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.6;
}
.lg-dlab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.lg-dlab .ic {
  width: 12px;
  height: 12px;
}
.lg-dside.before .lg-dlab {
  color: var(--bad);
}
.lg-dside.after .lg-dlab {
  color: var(--ok);
}
.lg-diff del,
.lg-diff ins {
  border-radius: 4px;
  padding: 1px 2px;
  text-decoration: none;
}
.lg-diff del {
  background: color-mix(in srgb, var(--bad) 22%, transparent);
  color: var(--bad);
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--bad) 70%, transparent);
}
.lg-diff ins {
  background: color-mix(in srgb, var(--ok) 22%, transparent);
  color: var(--ok);
}
.lg-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.lg-role {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  background: var(--tbg);
  color: var(--tone);
  border: 1px solid color-mix(in srgb, var(--tone) 30%, transparent);
  animation: lgPop 0.35s var(--spring) backwards;
}
.lg-role:nth-child(2) {
  animation-delay: 40ms;
}
.lg-role:nth-child(3) {
  animation-delay: 80ms;
}
@keyframes lgPop {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
}
.lg-tablewrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
}
table.lg-changes {
  white-space: normal;
  font-size: 12.5px;
}
.lg-changes th,
.lg-changes td,
.lg-changes th:first-child,
.lg-changes td:first-child {
  padding: 7px 10px;
}
.lg-changes td {
  overflow-wrap: anywhere;
  vertical-align: top;
}
.lg-changes td:first-child {
  color: var(--text);
  font-weight: 560;
  white-space: nowrap;
}
.lg-changes .lg-b {
  color: var(--bad);
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--bad) 50%, transparent);
}
.lg-changes .lg-a {
  color: var(--ok);
}
.lg-voice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.lg-vch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 99px;
  border: 1px solid var(--line2);
  background: var(--input);
  font-size: 13px;
  font-weight: 560;
}
.lg-vch .ic {
  width: 14px;
  height: 14px;
  color: var(--faint);
}
.lg-vch.on {
  border-color: color-mix(in srgb, var(--ok) 40%, var(--line2));
  color: var(--ok);
}
.lg-vch.on .ic {
  color: var(--ok);
}
.lg-vch.empty {
  color: var(--faint);
  border-style: dashed;
}
.lg-varrow .ic {
  width: 16px;
  height: 16px;
  color: var(--faint);
}
.lg-att,
.lg-msgs {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
  font-size: 13px;
}
.lg-att li {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text2);
}
.lg-att .ic {
  width: 14px;
  height: 14px;
  color: var(--faint);
}
.lg-msgs {
  margin: 0;
  max-height: 260px;
  overflow: auto;
}
.lg-msgs li {
  display: grid;
  grid-template-columns: minmax(70px, max-content) minmax(0, 1fr);
  gap: 10px;
  padding: 6px 10px;
  border-radius: 7px;
  background: var(--input);
}
.lg-msgs b {
  color: var(--text);
}
.lg-msgs span {
  color: var(--text2);
  overflow-wrap: anywhere;
}
mark.lg-hit {
  background: color-mix(in srgb, var(--warnc) 30%, transparent);
  color: var(--text);
  font-weight: 600;
  padding: 0 3px;
}
.lg-ext {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 560;
  text-decoration: none;
}
.lg-ext:hover {
  text-decoration: underline;
}
.lg-ext .ic {
  width: 13px;
  height: 13px;
}
.lg-caselink {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent2);
  font-weight: 650;
  font-size: 13px;
  border-radius: 6px;
  padding: 1px 4px;
  margin-left: -4px;
  transition: background-color 0.15s;
}
.lg-caselink .ic {
  width: 14px;
  height: 14px;
}
.lg-caselink:hover {
  background: var(--accent-soft);
}
.lg-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
}
.lg-actions .chipbtn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.lg-actions .chipbtn .ic {
  width: 13px;
  height: 13px;
}
.lg-actions .chipbtn[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent2);
  background: var(--accent-soft);
}
.lg-actions .copybtn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line2);
  border-radius: 99px;
  background: var(--card2);
  margin: 0;
}
.lg-pre {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--sy-bg);
  color: var(--text2);
  font: 12px/1.55 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 340px;
  overflow: auto;
}
.lg-raw {
  margin-top: 12px;
  animation: lgOpen 0.25s var(--ease);
}

/* ----- Alt bilgi ------------------------------------------------------------------ */
.lg-foot {
  display: flex;
  justify-content: center;
  padding: 14px 16px 18px;
  border-top: 1px solid var(--line);
}
.lg-foot:empty {
  display: none;
}
#lg-sentinel {
  display: block;
  width: 1px;
  height: 1px;
}
.lg-end {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--faint);
}
.lg-end .ic {
  width: 14px;
  height: 14px;
  color: var(--ok);
}
.lg-spin {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--line2);
  border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
}

/* ----- Özet kartı ---------------------------------------------------------------- */
.lg-overview .cardhead {
  align-items: baseline;
}
.lg-ovnums {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
}
.lg-ovnums div {
  display: grid;
  gap: 1px;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--card2);
  border: 1px solid var(--line);
}
.lg-ovnums b {
  font-size: 20px;
  letter-spacing: -0.5px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.lg-ovnums small {
  font-size: 11.5px;
  color: var(--muted);
}
.lg-bar {
  display: flex;
  gap: 2px;
  height: 10px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--card2);
}
.lg-bar i {
  flex: 0 0 var(--w);
  min-width: 3px;
  background: var(--tone);
  transform-origin: left;
  animation: lgGrow 0.7s var(--ease) backwards;
}
.lg-bar i:nth-child(2) {
  animation-delay: 60ms;
}
.lg-bar i:nth-child(3) {
  animation-delay: 120ms;
}
.lg-bar i:nth-child(n + 4) {
  animation-delay: 180ms;
}
@keyframes lgGrow {
  from {
    transform: scaleX(0);
  }
}
.lg-legend {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.lg-legbtn {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto 38px;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 13px;
  text-align: left;
  color: var(--text2);
  transition:
    background-color 0.15s,
    transform 0.12s var(--ease);
}
.lg-legbtn:hover {
  background: var(--card2);
  color: var(--text);
}
.lg-legbtn:active {
  transform: scale(0.98);
}
.lg-legbtn i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--tone);
}
.lg-legbtn b {
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.lg-legbtn small {
  text-align: right;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.lg-formnote {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: -4px;
}
.lg-formnote .ic {
  width: 14px;
  height: 14px;
  flex: none;
  margin-top: 2px;
}

/* =============================================================================
 * Sistem kayıtları
 * ========================================================================== */
.lv-DEBUG {
  --lvc: var(--lv-debug);
}
.lv-INFO {
  --lvc: var(--lv-info);
}
.lv-WARNING {
  --lvc: var(--lv-warn);
}
.lv-ERROR,
.lv-CRITICAL {
  --lvc: var(--lv-err);
}
.sy-lv {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 64px;
  padding: 1px 6px;
  border-radius: 5px;
  font: 650 10.5px/1.6 var(--mono);
  letter-spacing: 0.3px;
  color: var(--lvc, var(--muted));
  background: color-mix(in srgb, var(--lvc, var(--muted)) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--lvc, var(--muted)) 30%, transparent);
}
.sy-lv b {
  color: var(--text);
  font-weight: 650;
}
.sy-levels {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card2);
}
.sy-lvbtn {
  padding: 5px 10px;
  border-radius: 7px;
  font: 650 11.5px/1.4 var(--mono);
  color: var(--muted);
  transition:
    background-color 0.2s,
    color 0.2s,
    box-shadow 0.2s,
    transform 0.12s var(--ease);
}
.sy-lvbtn:hover {
  color: var(--lvc);
}
.sy-lvbtn:active {
  transform: scale(0.95);
}
.sy-lvbtn[aria-pressed="true"] {
  color: var(--lvc);
  background: color-mix(in srgb, var(--lvc) 16%, var(--card));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--lvc) 45%, transparent);
}
.sy-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text2);
  cursor: pointer;
  user-select: none;
}
.sy-tools .linkbtn .ic {
  width: 13px;
  height: 13px;
}
.sy-card {
  padding: 0;
  overflow: hidden;
}
.sy-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.sy-counts {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sy-counts .sy-lv {
  min-width: 0;
  padding: 1px 8px;
}
.sy-total {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--muted);
}
.sy-viewwrap {
  position: relative;
}
.sy-view {
  height: clamp(340px, 64vh, 780px);
  overflow: auto;
  padding: 6px 0 10px;
  background: var(--sy-bg);
  font: 12.5px/1.6 var(--mono);
  outline: none;
  overscroll-behavior: contain;
}
.sy-view:focus-visible {
  box-shadow: inset 0 0 0 2px var(--focus);
}
.sy-view > .skelwrap,
.sy-skel,
.sy-empty,
.sy-view > .errorstate {
  padding: 16px;
  font-family: inherit;
}
.sy-line {
  display: grid;
  grid-template-columns: max-content max-content minmax(70px, 190px) minmax(0, 1fr) max-content;
  align-items: baseline;
  gap: 12px;
  padding: 1px 12px 1px 12px;
  border-left: 2px solid transparent;
  color: var(--text2);
  transition: background-color 0.15s;
}
.sy-line:hover {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.sy-line.lv-WARNING {
  border-left-color: color-mix(in srgb, var(--lv-warn) 70%, transparent);
  background: color-mix(in srgb, var(--lv-warn) 5%, transparent);
}
.sy-line.lv-ERROR,
.sy-line.lv-CRITICAL {
  border-left-color: var(--lv-err);
  background: color-mix(in srgb, var(--lv-err) 8%, transparent);
  color: var(--text);
}
.sy-line.lv-DEBUG {
  color: var(--muted);
}
.sy-time {
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sy-line .sy-lv {
  min-width: 62px;
  font-size: 10px;
  line-height: 1.5;
}
.sy-logger {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sy-msg {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sy-view.wrap .sy-msg {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sy-acts {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sy-acts .copybtn {
  width: 22px;
  height: 22px;
  margin: 0;
  opacity: 0;
  transition:
    opacity 0.15s,
    background-color 0.15s;
}
.sy-line:hover .copybtn,
.sy-line:focus-within .copybtn,
.sy-acts .copybtn.copied {
  opacity: 1;
}
.sy-excbtn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0 7px 0 4px;
  border-radius: 5px;
  font: 600 11px/1.6 var(--mono);
  color: var(--lv-err);
  border: 1px solid color-mix(in srgb, var(--lv-err) 35%, transparent);
  transition: background-color 0.15s;
}
.sy-excbtn:hover {
  background: color-mix(in srgb, var(--lv-err) 14%, transparent);
}
.sy-excbtn .ic {
  width: 12px;
  height: 12px;
  transition: transform 0.2s var(--ease);
}
.sy-excbtn[aria-expanded="true"] .ic {
  transform: rotate(180deg);
}
.sy-exc {
  grid-column: 1 / -1;
  margin: 4px 0 8px;
  padding: 10px 12px;
  border-radius: 6px;
  border-left: 3px solid var(--lv-err);
  background: color-mix(in srgb, var(--lv-err) 10%, var(--sy-bg));
  color: var(--text2);
  font: 12px/1.55 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  animation: lgOpen 0.25s var(--ease);
}
.sy-line.sy-sep {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0;
  padding: 2px 12px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  background: none;
}
.sy-line.sy-sep::before,
.sy-line.sy-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: color-mix(in srgb, var(--accent) 35%, transparent);
}
.sy-line.sy-sep > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  text-align: center;
}
.sy-line.sy-sep .ic {
  width: 12px;
  height: 12px;
}
.sy-line.sy-new {
  animation:
    syIn 0.4s var(--ease) backwards,
    syGlow 1.8s ease-out;
}
@keyframes syIn {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
}
@keyframes syGlow {
  from {
    background-color: color-mix(in srgb, var(--accent) 18%, transparent);
  }
}
.sy-jump {
  position: absolute;
  right: 18px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px 0 10px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 650;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line2);
  box-shadow: var(--shadow-lg);
  animation: lgPillIn 0.35s var(--spring);
  transition:
    transform 0.15s var(--ease),
    background-color 0.2s;
}
.sy-jump .ic {
  width: 15px;
  height: 15px;
}
.sy-jump:hover {
  transform: translateY(-1px);
}
.sy-jump.has-new {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}
.sy-denied {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 6px;
  max-width: 640px;
  margin: 10px auto 0;
  padding: 38px 28px;
}
.sy-denied .tile {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  margin-bottom: 8px;
  animation: lgPop 0.5s var(--spring);
}
.sy-denied .tile .ic {
  width: 26px;
  height: 26px;
}
.sy-denied h2 {
  font-size: 19px;
}
.sy-denied p {
  margin: 0;
  color: var(--text2);
  font-size: 14px;
}
.sy-denied .inline-tools {
  margin-top: 12px;
  justify-content: center;
}

/* ----- Duyarlı ------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .lg-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .lg-aside {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    align-items: start;
  }
}
@media (max-width: 900px) {
  .lg-aside {
    grid-template-columns: minmax(0, 1fr);
  }
  .lg-dgrid {
    grid-template-columns: minmax(0, 1fr);
  }
  .lg-detail {
    padding-left: 16px;
  }
  .lg-keys {
    display: none;
  }
}
@media (max-width: 860px) {
  .lg-pillwrap {
    top: 66px;
  }
  .lg-dayhead {
    top: 56px;
  }
}
@media (max-width: 640px) {
  .lg-frow .searchbox,
  .lg-user,
  .lg-frow select {
    flex: 1 1 100%;
    max-width: none;
  }
  .lg-line {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 12px;
  }
  .lg-line .tile {
    width: 30px;
    height: 30px;
  }
  .lg-chev {
    display: none;
  }
  .lg-when time {
    display: none;
  }
  .lg-detail {
    padding: 2px 12px 14px;
  }
  .lg-diff {
    grid-template-columns: minmax(0, 1fr);
  }
  .lg-streamhead {
    padding: 10px 12px;
  }
  .sy-line {
    grid-template-columns: max-content max-content minmax(0, 1fr) max-content;
    gap: 8px;
    padding: 2px 10px;
  }
  .sy-logger {
    display: none;
  }
  .sy-line .sy-lv {
    min-width: 0;
  }
  .sy-total {
    margin-left: 0;
  }
  .pageactions .lg-live {
    order: -1;
  }
}

/* ----- Hareket azaltma ------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .lg-live.on i::after,
  .lg-row.is-new,
  .lg-row.lg-flash,
  .lg-detail,
  .lg-raw,
  .lg-role,
  .lg-bar i,
  .lg-pill.pop,
  .lg-cat.bump b,
  .sy-line.sy-new,
  .sy-exc,
  .sy-jump,
  .sy-denied .tile,
  .iconbtn.spinning .ic,
  .lg-spin {
    animation: none !important;
  }
  .lg-cat,
  .lg-row,
  .lg-row::before,
  .lg-line,
  .lg-chev .ic,
  .lg-pill,
  .lg-legbtn,
  .sy-lvbtn,
  .sy-line,
  .sy-jump,
  .sy-excbtn .ic {
    transition: none !important;
  }
  .lg-cat:hover,
  .lg-pill:hover,
  .sy-jump:hover {
    transform: none;
  }
}
