/* ===== LOGS / AUDIT PAGE ===== */

.logs-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.stat-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  transition: var(--t-fast);
}
.stat-card:hover { border-color: rgba(255,229,0,0.2); }
.stat-card .material-icons-round { font-size: 28px; }
.stat-card .stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
}
.stat-card .stat-label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

/* Filters */
.logs-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: flex-end;
  padding: var(--sp-4);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-4);
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.filter-group label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.filter-group input,
.filter-group select {
  padding: 7px 10px;
  font-size: var(--fs-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--r-sm);
  color: var(--text-primary);
  min-width: 120px;
}
.filter-group input:focus,
.filter-group select:focus {
  border-color: var(--brand-yellow);
  outline: none;
}
.filter-search { flex: 1; min-width: 160px; }
.filter-search input { width: 100%; }

/* Count */
.logs-count {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
  padding-left: var(--sp-1);
}

/* Timeline */
.logs-timeline {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.log-date-separator {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) 0 var(--sp-2);
  margin-top: var(--sp-2);
}
.log-date-separator span {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--brand-yellow);
  background: var(--bg-secondary);
  padding: 4px 12px;
  border-radius: var(--r-full);
  border: 1px solid rgba(255,229,0,0.2);
  white-space: nowrap;
}
.log-date-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

/* Entry */
.log-entry {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--r-md);
  transition: var(--t-fast);
  align-items: flex-start;
}
.log-entry:hover {
  border-color: rgba(255,229,0,0.15);
  background: var(--bg-surface);
}

.log-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
.log-icon .material-icons-round { font-size: 18px; }

.log-content {
  flex: 1;
  min-width: 0;
}

.log-header {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: 2px;
}
.log-action {
  font-weight: 700;
  font-size: var(--fs-sm);
}
.log-os {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 2px 8px;
  background: var(--bg-surface);
  border-radius: var(--r-sm);
  transition: var(--t-fast);
}
.log-os:hover {
  color: var(--brand-yellow);
  background: var(--brand-yellow-soft);
}
.log-op-badge {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--brand-yellow);
  padding: 2px 8px;
  background: rgba(255,229,0,0.08);
  border: 1px solid rgba(255,229,0,0.15);
  border-radius: var(--r-sm);
}

.log-detail {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 4px;
  word-break: break-word;
}

.log-meta {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
}
.log-user, .log-time {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  color: var(--text-muted);
}
.log-user .material-icons-round,
.log-time .material-icons-round {
  font-size: 12px;
}

/* Edit type highlight */
.log-entry[data-type="edit"] { border-left: 3px solid var(--color-warning); }
.log-entry[data-type="problem"] { border-left: 3px solid var(--color-danger); }
.log-entry[data-type="loss"] { border-left: 3px solid var(--color-orange); }
.log-entry[data-type="quality"] { border-left: 3px solid var(--color-success); }

/* Responsive */
@media (max-width: 768px) {
  .logs-stats { grid-template-columns: repeat(2, 1fr); }
  .logs-filters { flex-direction: column; }
  .filter-group { width: 100%; }
  .filter-group input,
  .filter-group select { width: 100%; }
}
