/* 操作日志 · 全局审计流水 */

.oplog-intro {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.82;
}

.oplog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.oplog-toolbar input,
.oplog-toolbar select {
  min-height: 40px;
  font-size: 14px;
}

.oplog-toolbar #oplog-q {
  flex: 1 1 180px;
  min-width: 0;
}

.oplog-meta {
  margin-bottom: 8px;
}

.oplog-audit-list {
  max-height: min(58vh, 560px);
}

.oplog-audit-item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line, rgba(100, 116, 139, 0.3));
}

.oplog-audit-item:last-child {
  border-bottom: 0;
}

.oplog-audit-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 6px;
}

.oplog-audit-head .oplog-who {
  font-weight: 800;
  font-size: 14px;
}

.oplog-audit-head .oplog-when {
  font-size: 12px;
  opacity: 0.72;
  margin-left: auto;
}

.oplog-pill {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line, rgba(100, 116, 139, 0.35));
  white-space: nowrap;
}

.oplog-pill-action {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
  border-color: rgba(59, 130, 246, 0.35);
}

.oplog-pill-device-mobile {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.oplog-pill-device-desktop {
  background: rgba(148, 163, 184, 0.15);
}

.oplog-pill-model {
  background: rgba(34, 197, 94, 0.1);
  color: #15803d;
  border-color: rgba(34, 197, 94, 0.35);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oplog-audit-body {
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
  white-space: pre-wrap;
}

.oplog-audit-body .oplog-arrow {
  color: #dc2626;
  font-weight: 800;
  padding: 0 2px;
}

.oplog-more {
  width: 100%;
  margin-top: 10px;
}

html[data-theme="glass"] .oplog-pill-action,
html[data-theme="chrome-dark"] .oplog-pill-action {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.18);
}

html[data-theme="glass"] .oplog-pill-model,
html[data-theme="chrome-dark"] .oplog-pill-model {
  color: #86efac;
}

@media (max-width: 860px) {
  .oplog-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .oplog-toolbar input,
  .oplog-toolbar select,
  .oplog-toolbar button {
    width: 100%;
    max-width: none !important;
  }
  .oplog-audit-head .oplog-when {
    margin-left: 0;
    flex: 1 1 100%;
  }
}
