/* ─── Log panel rows ────────────────────────────── */
.lg-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 2px 8px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.65;
  border-left: 2px solid transparent;
  cursor: pointer;
  transition: background .08s;
}
.lg-row:hover { background: var(--bg2); }

.lg-pill {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  min-width: 12px;
  text-align: center;
  flex-shrink: 0;
}
.lg-time {
  color: var(--muted2);
  font-size: 10px;
  min-width: 84px;
  flex-shrink: 0;
}
.lg-tag {
  color: var(--muted);
  font-size: 10px;
  min-width: 70px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 0;
}
.lg-msg {
  flex: 1;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-all;
  min-width: 0;
}
.lg-full-line { white-space: pre-wrap; word-break: break-all; }

/* Per-level accent */
.lg-l-V .lg-pill { color: #555; }
.lg-l-V .lg-msg  { color: #555; }
.lg-l-D .lg-pill { color: #4db8ff; }
.lg-l-D          { border-left-color: #4db8ff22; }
.lg-l-I .lg-pill { color: #7ec87e; }
.lg-l-W .lg-pill { color: #f5a623; }
.lg-l-W          { border-left-color: #f5a62344; background: #f5a62306; }
.lg-l-E .lg-pill { color: #e05252; }
.lg-l-E          { border-left-color: #e05252; background: #e0525210; }
.lg-l-F .lg-pill { color: #ff2d55; }
.lg-l-F          { border-left-color: #ff2d55; background: #ff2d5514; font-weight: 600; }

/* api-body category override */
.lg-cat-api-req .lg-msg  { color: #4db8ff; }
.lg-cat-api-req          { border-left-color: #4db8ff; background: #4db8ff10; }
.lg-cat-api-ok  .lg-msg  { color: #7ec87e; }
.lg-cat-api-ok           { border-left-color: #7ec87e; background: #7ec87e10; }
.lg-cat-api-err .lg-msg  { color: #e05252; font-weight: 600; }
.lg-cat-api-body .lg-msg { color: #8899bb; }

/* Search highlight mark */
.lg-hl {
  background: #f5a62366;
  color: inherit;
  border-radius: 2px;
}

/* ─── Expanded row detail ─────────────────────── */
.lg-detail {
  padding: 4px 8px 8px 30px;
  background: var(--bg2);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
}
.lg-meta {
  color: var(--muted2);
  font-size: 10px;
  margin-bottom: 4px;
  letter-spacing: .02em;
}
.lg-full-msg {
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-all;
  margin-bottom: 6px;
  line-height: 1.6;
}
.lg-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ─── Crash card ──────────────────────────────── */
.lg-crash-card {
  border-left: 3px solid #e05252;
  background: #e0525210;
  padding: 5px 8px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  transition: background .08s;
}
.lg-crash-card:hover { background: #e0525218; }
.lg-crash-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.lg-crash-badge {
  font-size: 9px;
  background: #e0525222;
  color: #e05252;
  border-radius: 10px;
  padding: 1px 6px;
  flex-shrink: 0;
}
.lg-crash-chevron {
  color: var(--muted2);
  font-size: 9px;
  margin-left: auto;
  flex-shrink: 0;
}
.lg-crash-stack {
  margin: 6px 0 6px 18px;
  padding: 6px 8px;
  background: var(--bg);
  border-radius: var(--rs);
  font-size: 10px;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.7;
  max-height: 300px;
  overflow-y: auto;
}

/* ─── Level chips (toolbar) ───────────────────── */
.lg-level-chip {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid var(--line2);
  background: transparent;
  cursor: pointer;
  font-family: var(--mono);
  transition: opacity .1s, background .1s;
  opacity: .35;
}
.lg-level-chip.active { background: var(--bg3); opacity: 1; }
.lg-level-chip[data-level="V"] { color: #666; }
.lg-level-chip[data-level="D"] { color: #4db8ff; }
.lg-level-chip[data-level="I"] { color: #7ec87e; }
.lg-level-chip[data-level="W"] { color: #f5a623; }
.lg-level-chip[data-level="E"] { color: #e05252; }
.lg-level-chip[data-level="F"] { color: #ff2d55; }

/* ─── Export dropdown ─────────────────────────── */
#logExportMenu {
  position: relative;
  flex-shrink: 0;
}
#logExportMenu > summary {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--line2);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font);
  list-style: none;
  user-select: none;
  white-space: nowrap;
}
#logExportMenu > summary::-webkit-details-marker { display: none; }
#logExportMenu[open] > summary { color: var(--text); }
.lg-export-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--rs);
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
  min-width: 168px;
  z-index: 200;
  overflow: hidden;
}
.lg-export-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 14px;
  font-size: 11px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-family: var(--font);
  border-bottom: 1px solid var(--line);
}
.lg-export-dropdown button:last-child { border-bottom: none; }
.lg-export-dropdown button:hover { background: var(--bg3); }

/* ─── Tail indicator ──────────────────────────── */
.lg-tail-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7ec87e;
  flex-shrink: 0;
  transition: background .2s;
}
.lg-tail-dot.paused { background: #f5a623; }

/* ─── Regex active glow on search input ──────── */
.lg-regex-active { border-color: var(--accent) !important; }

/* ─── JSON chip (row summary) ─────────────────── */
.lg-json-chip {
  display: inline-block;
  font-size: 9.5px;
  padding: 1px 7px;
  border-radius: 10px;
  background: #4db8ff18;
  color: #4db8ff;
  border: 1px solid #4db8ff33;
  font-style: normal;
  letter-spacing: .02em;
  cursor: pointer;
}

/* ─── JSON tree (in detail pane) ─────────────── */
.lg-json-tree {
  margin: 4px 0 8px 0;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.75;
  user-select: text;
}
.lg-jt-toggle {
  cursor: pointer;
  color: var(--muted2);
  border-bottom: 1px dotted var(--line2);
  padding-bottom: 1px;
  transition: color .1s;
}
.lg-jt-toggle:hover { color: var(--text); }
.lg-jt-body { padding-left: 16px; border-left: 1px solid var(--line); margin-left: 3px; }
.lg-jt-row  { line-height: 1.75; }
.lg-jt-key  { color: var(--muted); }
.lg-jt-str  { color: #7ec87e; word-break: break-all; }
.lg-jt-num  { color: #4db8ff; }
.lg-jt-bool { color: #f5a623; }
.lg-jt-null { color: #f5a623; font-style: italic; }
.lg-jt-bracket { color: var(--muted2); }
.lg-jt-close   { color: var(--muted2); }
